Skip to content

Commit

Permalink
refactor: update theming values to use daff-map-get
Browse files Browse the repository at this point in the history
  • Loading branch information
gracetxgao committed Dec 17, 2024
1 parent d712c5d commit d97bba0
Show file tree
Hide file tree
Showing 28 changed files with 102 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@use 'theme' as daff-theme;

@mixin daffio-feature-comparison-theme($theme){
$secondary: map.get($theme, secondary);
$secondary: daff-theme.daff-map-get($theme, secondary);
$base: daff-theme.daff-map-get($theme, 'core', 'base');
$base-contrast: daff-theme.daff-map-get($theme, 'core','base-contrast');

Expand Down
2 changes: 1 addition & 1 deletion apps/daffio/src/app/core/footer/footer/footer-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$neutral: daff-theme.daff-map-get($theme, 'core', 'neutral');
$base: daff-theme.daff-map-get($theme, 'core', 'base');
$base-contrast: daff-theme.daff-map-get($theme, 'core', 'base-contrast');
$secondary: map.get($theme, secondary);
$secondary: daff-theme.daff-map-get($theme, secondary);

.daffio-footer {
border-top: 1px solid daff-theme.daff-illuminate($base, $neutral, 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@use 'theme' as daff-theme;

@mixin daffio-sub-footer-theme($theme) {
$secondary: map.get($theme, secondary);
$secondary: daff-theme.daff-map-get($theme, secondary);

.daffio-sub-footer {
background: linear-gradient(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@use 'theme' as daff-theme;

@mixin daffio-header-theme($theme) {
$primary: map.get($theme, primary);
$primary: daff-theme.daff-map-get($theme, primary);

.daffio-header-item {
&.active {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$neutral: daff-theme.daff-map-get($theme, 'core', 'neutral');
$base: daff-theme.daff-map-get($theme, 'core', 'base');
$base-contrast: daff-theme.daff-map-get($theme, 'core', 'base-contrast');
$primary: map.get($theme, primary);
$primary: daff-theme.daff-map-get($theme, primary);

.daffio-sidebar-footer {
background: daff-theme.daff-illuminate($base, $neutral, 2);
Expand Down
6 changes: 3 additions & 3 deletions apps/daffio/src/scss/type-descriptors/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
@use 'theme' as daff-theme;
@use 'utilities' as daff;

$primary: map.get(daff-theme.$theme, primary);
$secondary: map.get(daff-theme.$theme, secondary);
$tertiary: map.get(daff-theme.$theme, tertiary);
$primary: daff-theme.daff-map-get(daff-theme.$theme, primary);
$secondary: daff-theme.daff-map-get(daff-theme.$theme, secondary);
$tertiary: daff-theme.daff-map-get(daff-theme.$theme, tertiary);
$base: daff-theme.daff-map-get(daff-theme.$theme, 'core', 'base');
$base-contrast: daff-theme.daff-map-get(
daff-theme.$theme,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@mixin code-preview-theme($theme) {
$neutral: daff-theme.daff-map-get($theme, 'core', 'neutral');
$base: daff-theme.daff-map-get($theme, 'core', 'base');
$primary: map.get(daff-theme.$theme, primary);
$primary: daff-theme.daff-map-get(daff-theme.$theme, primary);
$font-color: daff-theme.daff-map-get($theme, 'core', 'font-color');
$border: 1px solid daff-theme.daff-illuminate($base, $neutral, 2);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$neutral: daff-theme.daff-map-get($theme, 'core', 'neutral');
$base: daff-theme.daff-map-get($theme, 'core', 'base');
$base-contrast: daff-theme.daff-map-get($theme, 'core', 'base-contrast');
$primary: map.get($theme, primary);
$primary: daff-theme.daff-map-get($theme, primary);

.design-land-sidebar-viewport {
&__sidebar {
Expand Down
6 changes: 3 additions & 3 deletions libs/design/article/src/article-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
@use '../../scss/theming';

@mixin daff-article-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$white: core.daff-map-get($theme, 'core', 'white');
Expand Down
14 changes: 7 additions & 7 deletions libs/design/button/src/button/basic/button-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
}

@mixin daff-button-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$info: map.get($theme, info);
$warn: map.get($theme, warn);
$critical: map.get($theme, critical);
$success: map.get($theme, success);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$info: core.daff-map-get($theme, informational);
$warn: core.daff-map-get($theme, warn);
$critical: core.daff-map-get($theme, critical);
$success: core.daff-map-get($theme, success);
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$white: core.daff-map-get($theme, 'core', 'white');
Expand Down
14 changes: 7 additions & 7 deletions libs/design/button/src/button/flat/flat-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
}

@mixin daff-flat-button-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$info: map.get($theme, info);
$warn: map.get($theme, warn);
$critical: map.get($theme, critical);
$success: map.get($theme, success);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$info: core.daff-map-get($theme, informational);
$warn: core.daff-map-get($theme, warn);
$critical: core.daff-map-get($theme, critical);
$success: core.daff-map-get($theme, success);
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$white: core.daff-map-get($theme, 'core', 'white');
Expand Down
14 changes: 7 additions & 7 deletions libs/design/button/src/button/icon/icon-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
}

@mixin daff-icon-button-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$info: map.get($theme, info);
$warn: map.get($theme, warn);
$critical: map.get($theme, critical);
$success: map.get($theme, success);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$info: core.daff-map-get($theme, informational);
$warn: core.daff-map-get($theme, warn);
$critical: core.daff-map-get($theme, critical);
$success: core.daff-map-get($theme, success);
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$white: core.daff-map-get($theme, 'core', 'white');
Expand Down
14 changes: 7 additions & 7 deletions libs/design/button/src/button/raised/raised-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
}

@mixin daff-raised-button-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$info: map.get($theme, info);
$warn: map.get($theme, warn);
$critical: map.get($theme, critical);
$success: map.get($theme, success);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$info: core.daff-map-get($theme, informational);
$warn: core.daff-map-get($theme, warn);
$critical: core.daff-map-get($theme, critical);
$success: core.daff-map-get($theme, success);
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$white: core.daff-map-get($theme, 'core', 'white');
Expand Down
14 changes: 7 additions & 7 deletions libs/design/button/src/button/stroked/stroked-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
}

@mixin daff-stroked-button-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$info: map.get($theme, info);
$warn: map.get($theme, warn);
$critical: map.get($theme, critical);
$success: map.get($theme, success);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$info: core.daff-map-get($theme, informational);
$warn: core.daff-map-get($theme, warn);
$critical: core.daff-map-get($theme, critical);
$success: core.daff-map-get($theme, success);
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$white: core.daff-map-get($theme, 'core', 'white');
Expand Down
14 changes: 7 additions & 7 deletions libs/design/button/src/button/underline/underline-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
}

@mixin daff-underline-button-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$info: map.get($theme, info);
$warn: map.get($theme, warn);
$critical: map.get($theme, critical);
$success: map.get($theme, success);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$info: core.daff-map-get($theme, informational);
$warn: core.daff-map-get($theme, warn);
$critical: core.daff-map-get($theme, critical);
$success: core.daff-map-get($theme, success);
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$white: core.daff-map-get($theme, 'core', 'white');
Expand Down
6 changes: 3 additions & 3 deletions libs/design/callout/src/callout-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
}

@mixin daff-callout-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$neutral: core.daff-map-get($theme, 'core', 'neutral');
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
Expand Down
6 changes: 3 additions & 3 deletions libs/design/card/src/card-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
@use './card-theme-variants/linkable-card' as linkable;

@mixin daff-card-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$white: core.daff-map-get($theme, 'core', 'white');
Expand Down
6 changes: 3 additions & 3 deletions libs/design/hero/src/hero-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
}

@mixin daff-hero-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$neutral: core.daff-map-get($theme, 'core', 'neutral');
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
Expand Down
6 changes: 3 additions & 3 deletions libs/design/loading-icon/src/loading-icon-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
@use '../../scss/theming';

@mixin daff-loading-icon-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$white: core.daff-map-get($theme, 'core', 'white');
Expand Down
6 changes: 3 additions & 3 deletions libs/design/navbar/src/navbar-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
}

@mixin daff-navbar-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$neutral: core.daff-map-get($theme, 'core', 'neutral');
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
Expand Down
14 changes: 7 additions & 7 deletions libs/design/notification/src/notification-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
@use '../../scss/theming';

@mixin daff-notification-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$info: map.get($theme, info);
$warn: map.get($theme, warn);
$critical: map.get($theme, critical);
$success: map.get($theme, success);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$info: core.daff-map-get($theme, informational);
$warn: core.daff-map-get($theme, warn);
$critical: core.daff-map-get($theme, critical);
$success: core.daff-map-get($theme, success);
$neutral: core.daff-map-get($theme, 'core', 'neutral');
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
Expand Down
6 changes: 3 additions & 3 deletions libs/design/paginator/src/paginator-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
@use '../../scss/theming';

@mixin daff-paginator-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$white: core.daff-map-get($theme, 'core', 'white');
Expand Down
6 changes: 3 additions & 3 deletions libs/design/progress-bar/src/progress-bar-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
@use '../../scss/theming';

@mixin daff-progress-bar-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$white: core.daff-map-get($theme, 'core', 'white');
Expand Down
6 changes: 3 additions & 3 deletions libs/design/scss/theming/_theme-css-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
@mixin daff-root-theme-tokens($theme) {
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$neutral: core.daff-map-get($theme, 'core', 'neutral');
$white: core.daff-map-get($theme, 'core', 'white');
$black: core.daff-map-get($theme, 'core', 'black');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
@use '../../../../../scss/theming';

@mixin daff-form-field-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$neutral: core.daff-map-get($theme, 'core', 'neutral');
Expand Down
6 changes: 3 additions & 3 deletions libs/design/tabs/src/tabs-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
@use '../../scss/theming';

@mixin daff-tabs-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$neutral: core.daff-map-get($theme, 'core', 'neutral');
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
Expand Down
14 changes: 7 additions & 7 deletions libs/design/toast/src/toast-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
@use '../../scss/theming';

@mixin daff-toast-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$info: map.get($theme, info);
$warn: map.get($theme, warn);
$critical: map.get($theme, critical);
$success: map.get($theme, success);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$info: core.daff-map-get($theme, informational);
$warn: core.daff-map-get($theme, warn);
$critical: core.daff-map-get($theme, critical);
$success: core.daff-map-get($theme, success);
$neutral: core.daff-map-get($theme, 'core', 'neutral');
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
Expand Down
6 changes: 3 additions & 3 deletions libs/design/tree/src/tree-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
@use '../../scss/core';

@mixin daff-tree-theme($theme) {
$primary: map.get($theme, primary);
$secondary: map.get($theme, secondary);
$tertiary: map.get($theme, tertiary);
$primary: core.daff-map-get($theme, primary);
$secondary: core.daff-map-get($theme, secondary);
$tertiary: core.daff-map-get($theme, tertiary);
$base: core.daff-map-get($theme, 'core', 'base');
$base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
$white: core.daff-map-get($theme, 'core', 'white');
Expand Down

0 comments on commit d97bba0

Please sign in to comment.