@daffodil/design 0.93.0 → 0.94.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/README.md +0 -1
  2. package/accordion/src/accordion-theme.scss +2 -2
  3. package/article/src/article/_stops-article-cascade.scss +5 -1
  4. package/article/src/article-theme.scss +2 -2
  5. package/badge/README.md +85 -0
  6. package/badge/src/badge-theme.scss +197 -0
  7. package/beacon/README.md +61 -0
  8. package/beacon/src/beacon-theme.scss +61 -0
  9. package/breadcrumb/src/breadcrumb-theme.scss +2 -2
  10. package/button/src/button/basic/button-theme.scss +2 -2
  11. package/button/src/button/flat/flat-theme.scss +2 -2
  12. package/button/src/button/icon/icon-theme.scss +2 -2
  13. package/button/src/button/raised/raised-theme.scss +13 -13
  14. package/button/src/button/stroked/stroked-theme.scss +2 -2
  15. package/button/src/button/underline/underline-theme.scss +2 -2
  16. package/callout/src/callout-theme.scss +12 -2
  17. package/card/src/card/stroked/stroked-theme.scss +14 -22
  18. package/card/src/card-base-theme.scss +4 -4
  19. package/card/src/card-base.scss +13 -16
  20. package/fesm2022/daffodil-design-accordion.mjs +9 -15
  21. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  22. package/fesm2022/daffodil-design-article.mjs +2 -2
  23. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  24. package/fesm2022/daffodil-design-badge.mjs +87 -0
  25. package/fesm2022/daffodil-design-badge.mjs.map +1 -0
  26. package/fesm2022/daffodil-design-beacon.mjs +48 -0
  27. package/fesm2022/daffodil-design-beacon.mjs.map +1 -0
  28. package/fesm2022/daffodil-design-breadcrumb.mjs +1 -1
  29. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  30. package/fesm2022/daffodil-design-button.mjs +1 -1
  31. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  32. package/fesm2022/daffodil-design-callout.mjs +2 -2
  33. package/fesm2022/daffodil-design-card.mjs +9 -11
  34. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  35. package/fesm2022/daffodil-design-form-field.mjs +95 -115
  36. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  37. package/fesm2022/daffodil-design-form.mjs +5 -7
  38. package/fesm2022/daffodil-design-form.mjs.map +1 -1
  39. package/fesm2022/daffodil-design-image.mjs +41 -98
  40. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  41. package/fesm2022/daffodil-design-input.mjs +3 -3
  42. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  43. package/fesm2022/daffodil-design-list.mjs +16 -21
  44. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  45. package/fesm2022/daffodil-design-media-gallery.mjs +56 -61
  46. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  47. package/fesm2022/daffodil-design-menu.mjs +61 -38
  48. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  49. package/fesm2022/daffodil-design-modal.mjs +2 -2
  50. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  51. package/fesm2022/daffodil-design-native-select.mjs +3 -3
  52. package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
  53. package/fesm2022/daffodil-design-notification.mjs +17 -20
  54. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  55. package/fesm2022/daffodil-design-paginator.mjs +71 -76
  56. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  57. package/fesm2022/daffodil-design-progress-bar.mjs +33 -53
  58. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  59. package/fesm2022/daffodil-design-select.mjs +1 -1
  60. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  61. package/fesm2022/daffodil-design-sidebar.mjs +2 -2
  62. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  63. package/fesm2022/daffodil-design-spinner.mjs +17 -16
  64. package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
  65. package/fesm2022/daffodil-design-switch.mjs +20 -29
  66. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  67. package/fesm2022/daffodil-design-tabs.mjs +86 -88
  68. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  69. package/fesm2022/daffodil-design-tag.mjs +33 -28
  70. package/fesm2022/daffodil-design-tag.mjs.map +1 -1
  71. package/fesm2022/daffodil-design-text-snippet.mjs +18 -23
  72. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  73. package/fesm2022/daffodil-design-textarea.mjs +3 -3
  74. package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
  75. package/fesm2022/daffodil-design-toast.mjs +19 -20
  76. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  77. package/fesm2022/daffodil-design.mjs +111 -80
  78. package/fesm2022/daffodil-design.mjs.map +1 -1
  79. package/form/src/hint/hint-theme.scss +2 -2
  80. package/form-field/src/form-field-theme.scss +2 -2
  81. package/hero/src/hero-theme.scss +12 -2
  82. package/list/README.md +10 -0
  83. package/list/src/list-theme.scss +2 -2
  84. package/media-gallery/README.md +0 -5
  85. package/media-gallery/src/media-gallery-theme.scss +2 -2
  86. package/menu/README.md +5 -0
  87. package/menu/src/menu-theme.scss +4 -4
  88. package/notification/src/notification-theme.scss +2 -2
  89. package/package.json +1 -1
  90. package/paginator/src/paginator-theme.scss +2 -2
  91. package/progress-bar/README.md +1 -1
  92. package/progress-bar/src/progress-bar-theme.scss +2 -2
  93. package/scss/global.scss +4 -0
  94. package/scss/state/skeleton/_mixins.scss +2 -2
  95. package/scss/theme/default.scss +15 -0
  96. package/scss/theme.scss +4 -8
  97. package/scss/theming/_configure-palette.scss +5 -1
  98. package/scss/theming/_get-theme-mode.scss +1 -1
  99. package/scss/theming/_index.scss +2 -3
  100. package/scss/theming/_light-dark.scss +37 -12
  101. package/scss/theming/color-shift/_color-shift.scss +56 -0
  102. package/scss/theming/color-shift/_color-shift.spec.scss +107 -0
  103. package/scss/theming/color-shift/_index.scss +1 -0
  104. package/scss/theming/{_daff-theme.scss → default/_daff-theme.scss} +4 -4
  105. package/scss/theming/default/_index.scss +1 -0
  106. package/select/src/select-theme.scss +5 -3
  107. package/switch/src/switch-theme.scss +2 -2
  108. package/tabs/src/tabs-theme.scss +2 -2
  109. package/tag/README.md +10 -6
  110. package/tag/src/tag-theme.scss +102 -5
  111. package/toast/src/toast-theme.scss +2 -2
  112. package/tree/src/tree-theme.scss +2 -2
  113. package/types/daffodil-design-accordion.d.ts +4 -4
  114. package/types/daffodil-design-badge.d.ts +63 -0
  115. package/types/daffodil-design-beacon.d.ts +26 -0
  116. package/types/daffodil-design-card.d.ts +2 -2
  117. package/types/daffodil-design-form-field.d.ts +34 -31
  118. package/types/daffodil-design-form.d.ts +2 -2
  119. package/types/daffodil-design-image.d.ts +15 -28
  120. package/types/daffodil-design-list.d.ts +3 -3
  121. package/types/daffodil-design-media-gallery.d.ts +31 -20
  122. package/types/daffodil-design-menu.d.ts +51 -20
  123. package/types/daffodil-design-notification.d.ts +5 -6
  124. package/types/daffodil-design-paginator.d.ts +20 -25
  125. package/types/daffodil-design-progress-bar.d.ts +16 -21
  126. package/types/daffodil-design-spinner.d.ts +2 -2
  127. package/types/daffodil-design-switch.d.ts +7 -8
  128. package/types/daffodil-design-tabs.d.ts +29 -29
  129. package/types/daffodil-design-tag.d.ts +22 -16
  130. package/types/daffodil-design-text-snippet.d.ts +9 -9
  131. package/types/daffodil-design.d.ts +61 -41
  132. package/fesm2022/daffodil-design-loading-icon.mjs +0 -67
  133. package/fesm2022/daffodil-design-loading-icon.mjs.map +0 -1
  134. package/loading-icon/README.md +0 -59
  135. package/loading-icon/src/loading-icon-theme.scss +0 -103
  136. package/scss/theming/illuminate/illuminate.scss +0 -149
  137. package/scss/theming/illuminate/illuminate.spec.scss +0 -15
  138. package/types/daffodil-design-loading-icon.d.ts +0 -31
package/README.md CHANGED
@@ -37,7 +37,6 @@ Refer to the [Upgrade Guide](/libs/design/guides/upgrading.md).
37
37
  * [Native Select](/libs/design/src/atoms/form/native-select/README.md)
38
38
  * [Quantity Field](/libs/design/src/atoms/form/quantity-field/README.md)
39
39
  * [Image](/libs/design/image/README.md)
40
- * [Loading Icon](/libs/design/loading-icon/README.md)
41
40
  * [Tag](/libs/design/tag/README.md)
42
41
 
43
42
  ### Molecules
@@ -7,7 +7,7 @@
7
7
  $mode: daff-get-theme-mode($theme);
8
8
 
9
9
  .daff-accordion-item {
10
- @include light($mode) {
10
+ @include daff-light-mode($mode) {
11
11
  border-top: 1px solid daff-color($neutral, 20);
12
12
 
13
13
  &:last-child {
@@ -23,7 +23,7 @@
23
23
  }
24
24
  }
25
25
 
26
- @include dark($mode) {
26
+ @include daff-dark-mode($mode) {
27
27
  border-top: 1px solid daff-color($neutral, 80);
28
28
 
29
29
  &:last-child {
@@ -1,6 +1,10 @@
1
1
  @mixin stopsArticleCascade($selector...) {
2
2
  #{$selector} {
3
- &:not(.daff-ae *, .daff-ae) {
3
+ // `.daff-ae` only stops the cascade when it sits between the element and
4
+ // the article. Anchoring it to `.daff-article` keeps article styles
5
+ // working when an article is nested inside an encapsulated component.
6
+ // `:where` keeps the anchored selector from raising specificity.
7
+ &:not(.daff-ae, :where(.daff-article .daff-ae *)) {
4
8
  @content;
5
9
  }
6
10
  }
@@ -14,7 +14,7 @@
14
14
  $table-border-dark: daff-color($neutral, 80);
15
15
 
16
16
  .daff-article {
17
- @include light($mode) {
17
+ @include daff-light-mode($mode) {
18
18
  color: $text-color-light;
19
19
 
20
20
  @include stopsArticleCascade(a) {
@@ -98,7 +98,7 @@
98
98
  }
99
99
  }
100
100
 
101
- @include dark($mode) {
101
+ @include daff-dark-mode($mode) {
102
102
  color: $text-color-dark;
103
103
 
104
104
  @include stopsArticleCascade(a) {
@@ -0,0 +1,85 @@
1
+ # Badge
2
+ A badge is a compact visual label or indicator used to convey status or display short pieces of information.
3
+
4
+ ## Overview
5
+ Badges are small visual indicators that highlight quick, essential information. Use a badge to draw attention to a piece of content, such as a count, a status, or a short label.
6
+
7
+ Because badges are not interactive, they aren't meant to group, sort, or filter information. When you need those interactions, use [tags](/libs/design/tag/README.md) instead.
8
+
9
+ <daff-docs-example-viewer example="basic-badge"></daff-docs-example-viewer>
10
+
11
+ ## Best practices
12
+
13
+ **When to use**
14
+ - Show a status, such as success, error, or new
15
+ - Display a small piece of metadata
16
+ - Provide quick, scannable context inside a UI
17
+
18
+ **When not to use**
19
+ - To group, sort, or filter information (use [tags](/libs/design/tag/README.md) instead)
20
+ - For interactive elements, such as buttons or links
21
+
22
+ ## Usage
23
+
24
+ Import `DAFF_BADGE_COMPONENTS` into your component:
25
+
26
+ ```ts
27
+ import { DAFF_BADGE_COMPONENTS } from '@daffodil/design/badge';
28
+
29
+ @Component({
30
+ selector: 'custom-component',
31
+ templateUrl: './custom-component.component.html',
32
+ imports: [
33
+ DAFF_BADGE_COMPONENTS,
34
+ ],
35
+ })
36
+ export class CustomComponent {}
37
+ ```
38
+
39
+ ## Anatomy
40
+ A badge is composed of a wrapper, an optional prefix, and a label:
41
+
42
+ ```html
43
+ <daff-badge>
44
+ <fa-icon [icon]="faCircleCheck" daffPrefix></fa-icon>
45
+ Badge label
46
+ </daff-badge>
47
+ ```
48
+
49
+ - **`<daff-badge>`**: The wrapper component that holds the badge content.
50
+ - **`[daffPrefix]`**: A leading visual, typically an icon, displayed before the label.
51
+ - **Label**: The content of the badge, projected as a child element.
52
+
53
+ ## Features
54
+
55
+ ### Icon support
56
+ Use the `[daffPrefix]` element to display a leading visual icon before the badge label.
57
+
58
+ <daff-docs-example-viewer example="badge-prefix"></daff-docs-example-viewer>
59
+
60
+ ### Appearances
61
+ Use the `appearance` property to change the visual style of a badge.
62
+
63
+ <daff-docs-example-viewer example="badge-appearances"></daff-docs-example-viewer>
64
+
65
+ ### Colors
66
+ Use the `color` property to change the color of a badge. The default color is `light`.
67
+
68
+ <daff-docs-example-viewer example="badge-colors"></daff-docs-example-viewer>
69
+
70
+ ### Sizes
71
+ Use the `size` property to change the size of a badge. The default size is `md`.
72
+
73
+ <daff-docs-example-viewer example="badge-sizes"></daff-docs-example-viewer>
74
+
75
+ ### Statuses
76
+ Use the `status` property to convey semantic meaning. A `status` takes precedence over `color`.
77
+
78
+ <daff-docs-example-viewer example="badge-statuses"></daff-docs-example-viewer>
79
+
80
+ ## Accessibility
81
+ Badges are not interactive and do not receive focus.
82
+
83
+ ### Developer responsibilities
84
+ - Always provide a text label unless the icon is universally understood and accessible
85
+ - Use the `status` property to communicate semantic meaning
@@ -0,0 +1,197 @@
1
+ // stylelint-disable selector-class-pattern
2
+ @use '../../scss/theming' as *;
3
+
4
+ @mixin daff-badge-color-light-variants(
5
+ $variants,
6
+ $background,
7
+ $foreground,
8
+ $outline-shade
9
+ ) {
10
+ @each $name, $palette in $variants {
11
+ &.daff-#{$name} {
12
+ background: daff-color($palette, $background);
13
+ color: daff-color($palette, $foreground);
14
+
15
+ &.outlined {
16
+ border-color: daff-color($palette, $outline-shade);
17
+ }
18
+ }
19
+ }
20
+ }
21
+
22
+ @mixin daff-badge-color-dark-variants(
23
+ $variants,
24
+ $shade,
25
+ $foreground,
26
+ $outline-shade
27
+ ) {
28
+ @each $name, $palette in $variants {
29
+ &.daff-#{$name} {
30
+ background: daff-color($palette, $shade);
31
+ color: daff-color($palette, $foreground);
32
+
33
+ &.outlined {
34
+ border-color: daff-color($palette, $outline-shade);
35
+ }
36
+ }
37
+ }
38
+ }
39
+
40
+ @mixin daff-badge-theme($theme) {
41
+ $primary: daff-get-palette($theme, primary);
42
+ $secondary: daff-get-palette($theme, secondary);
43
+ $tertiary: daff-get-palette($theme, tertiary);
44
+ $info: daff-get-palette($theme, informational);
45
+ $warn: daff-get-palette($theme, warn);
46
+ $critical: daff-get-palette($theme, critical);
47
+ $success: daff-get-palette($theme, success);
48
+ $neutral: daff-get-palette($theme, neutral);
49
+ $black: daff-get-base-color($theme, 'black');
50
+ $white: daff-get-base-color($theme, 'white');
51
+ $mode: daff-get-theme-mode($theme);
52
+
53
+ .daff-badge {
54
+ @include daff-light-mode($mode) {
55
+ @include daff-badge-color-light-variants(
56
+ (
57
+ 'primary': $primary,
58
+ 'secondary': $secondary,
59
+ 'tertiary': $tertiary,
60
+ ),
61
+ 10,
62
+ 90,
63
+ 20
64
+ );
65
+
66
+ &.daff-dark {
67
+ background: daff-color($neutral, 80);
68
+ color: daff-color($neutral, 10);
69
+ }
70
+
71
+ &.daff-light {
72
+ background: daff-color($neutral, 10);
73
+ color: daff-color($neutral, 100);
74
+ }
75
+
76
+ &.daff-theme {
77
+ background: $white;
78
+ color: $black;
79
+ }
80
+
81
+ &.daff-theme-contrast {
82
+ background: daff-color($neutral, 90);
83
+ color: daff-color($neutral, 10);
84
+ }
85
+
86
+ &.outlined {
87
+ &.daff-dark {
88
+ border-color: daff-color($neutral, 90);
89
+ }
90
+
91
+ &.daff-light {
92
+ border-color: daff-color($neutral, 20);
93
+ }
94
+
95
+ &.daff-theme {
96
+ border-color: daff-color($neutral, 30);
97
+ }
98
+
99
+ &.daff-theme-contrast {
100
+ border-color: daff-color($neutral, 100);
101
+ }
102
+
103
+ &.daff-info {
104
+ border-color: daff-color($neutral, 30);
105
+ }
106
+ }
107
+
108
+ // `status` is a state modifier that must override `color`. Both apply
109
+ // equal-specificity `.daff-*` classes to the same element, so these
110
+ // rules are authored after every color variant above to win the cascade.
111
+ @include daff-badge-color-light-variants(
112
+ (
113
+ 'warn': $warn,
114
+ 'critical': $critical,
115
+ 'success': $success,
116
+ ),
117
+ 10,
118
+ 90,
119
+ 20
120
+ );
121
+
122
+ &.daff-info {
123
+ background: daff-color($neutral, 20);
124
+ color: daff-color($neutral, 90);
125
+ }
126
+ }
127
+
128
+ @include daff-dark-mode($mode) {
129
+ background: daff-color($neutral, 80);
130
+ color: daff-color($neutral, 20);
131
+
132
+ @include daff-badge-color-dark-variants(
133
+ (
134
+ 'primary': $primary,
135
+ 'secondary': $secondary,
136
+ 'tertiary': $tertiary,
137
+ 'dark': $neutral,
138
+ ),
139
+ 100,
140
+ 20,
141
+ 90
142
+ );
143
+
144
+ &.daff-light {
145
+ background: daff-color($neutral, 10);
146
+ color: daff-color($neutral, 100);
147
+ }
148
+
149
+ &.daff-theme {
150
+ background: $black;
151
+ color: $white;
152
+ }
153
+
154
+ &.daff-theme-contrast {
155
+ background: $white;
156
+ color: $black;
157
+ }
158
+
159
+ &.outlined {
160
+ &.daff-light {
161
+ border-color: daff-color($neutral, 30);
162
+ }
163
+
164
+ &.daff-theme {
165
+ border-color: daff-color($neutral, 90);
166
+ }
167
+
168
+ &.daff-theme-contrast {
169
+ border-color: daff-color($neutral, 30);
170
+ }
171
+
172
+ &.daff-info {
173
+ border-color: daff-color($neutral, 80);
174
+ }
175
+ }
176
+
177
+ // `status` is a state modifier that must override `color`. Both apply
178
+ // equal-specificity `.daff-*` classes to the same element, so these
179
+ // rules are authored after every color variant above to win the cascade.
180
+ @include daff-badge-color-dark-variants(
181
+ (
182
+ 'warn': $warn,
183
+ 'critical': $critical,
184
+ 'success': $success,
185
+ ),
186
+ 100,
187
+ 20,
188
+ 90
189
+ );
190
+
191
+ &.daff-info {
192
+ background: daff-color($neutral, 90);
193
+ color: daff-color($neutral, 20);
194
+ }
195
+ }
196
+ }
197
+ }
@@ -0,0 +1,61 @@
1
+ # Beacon
2
+ A beacon is a small indicator that draws visual attention to a specific location or element.
3
+
4
+ ## Overview
5
+ Use a beacon to signal a "live" status or highlight a point of interest, such as a new feature or an active notification. It renders as a pulsing dot that draws the eye without interrupting the surrounding content.
6
+
7
+ <daff-docs-example-viewer example="basic-beacon"></daff-docs-example-viewer>
8
+
9
+ ## Usage
10
+
11
+ Import `DaffBeaconComponent` into your component:
12
+
13
+ ```ts
14
+ import { DaffBeaconComponent } from '@daffodil/design/beacon';
15
+
16
+ @Component({
17
+ selector: 'custom-component',
18
+ templateUrl: './custom-component.component.html',
19
+ imports: [
20
+ DaffBeaconComponent,
21
+ ],
22
+ })
23
+ export class CustomComponent {}
24
+ ```
25
+
26
+ ## Anatomy
27
+ A beacon is a single dot with a ring that pulses outward from it. With no properties set, it renders at the default size and inherits the ambient text color:
28
+
29
+ ```html
30
+ <daff-beacon></daff-beacon>
31
+ ```
32
+
33
+ ## Features
34
+
35
+ ### Colors
36
+ Use the `color` property to change the color of a beacon. Left unset, the beacon matches the surrounding text color, so setting `color` on a parent element carries down to the beacon.
37
+
38
+ > Note: `dark`, `light`, and `theme` should be used on appropriate backgrounds for sufficient contrast.
39
+
40
+ <daff-docs-example-viewer example="beacon-colors"></daff-docs-example-viewer>
41
+
42
+ ### Status
43
+ Use the `status` property to color the beacon by meaning: `info`, `warn`, `critical`, or `success`. Use `status` instead of `color` when the dot represents a state.
44
+
45
+ <daff-docs-example-viewer example="beacon-statuses"></daff-docs-example-viewer>
46
+
47
+ ### Sizes
48
+ Use the `size` property to change the diameter of the dot. The default size is `sm`.
49
+
50
+ <daff-docs-example-viewer example="beacon-sizes"></daff-docs-example-viewer>
51
+
52
+ ### Speed
53
+ Use the `speed` property to set how fast the ring pulses. `slow` is a relaxed 3.6s cycle, `normal` (the default) a 2.4s cycle, and `fast` an urgent 1.2s cycle.
54
+
55
+ <daff-docs-example-viewer example="beacon-speeds"></daff-docs-example-viewer>
56
+
57
+ ## Accessibility
58
+
59
+ For users who have reduced motion enabled, the beacon shows as a still dot instead of pulsing.
60
+
61
+ Beacon is purely decorative and should never be the only thing that conveys status. Always pair it with visible text or another cue that communicates the same meaning.
@@ -0,0 +1,61 @@
1
+ @use '../../scss/theming' as *;
2
+
3
+ @mixin daff-beacon-theme($theme) {
4
+ $primary: daff-get-palette($theme, primary);
5
+ $secondary: daff-get-palette($theme, secondary);
6
+ $tertiary: daff-get-palette($theme, tertiary);
7
+ $info: daff-get-palette($theme, informational);
8
+ $warn: daff-get-palette($theme, warn);
9
+ $critical: daff-get-palette($theme, critical);
10
+ $success: daff-get-palette($theme, success);
11
+ $base: daff-get-base-color($theme, base);
12
+ $base-contrast: daff-get-base-color($theme, base-contrast);
13
+ $white: daff-get-base-color($theme, 'white');
14
+ $black: daff-get-base-color($theme, 'black');
15
+
16
+ .daff-beacon {
17
+ &.daff-primary {
18
+ color: daff-color($primary);
19
+ }
20
+
21
+ &.daff-secondary {
22
+ color: daff-color($secondary);
23
+ }
24
+
25
+ &.daff-tertiary {
26
+ color: daff-color($tertiary);
27
+ }
28
+
29
+ &.daff-theme {
30
+ color: $base;
31
+ }
32
+
33
+ &.daff-theme-contrast {
34
+ color: $base-contrast;
35
+ }
36
+
37
+ &.daff-dark {
38
+ color: $black;
39
+ }
40
+
41
+ &.daff-light {
42
+ color: $white;
43
+ }
44
+
45
+ &.daff-info {
46
+ color: daff-color($info);
47
+ }
48
+
49
+ &.daff-warn {
50
+ color: daff-color($warn);
51
+ }
52
+
53
+ &.daff-critical {
54
+ color: daff-color($critical);
55
+ }
56
+
57
+ &.daff-success {
58
+ color: daff-color($success);
59
+ }
60
+ }
61
+ }
@@ -6,12 +6,12 @@
6
6
 
7
7
  .daff-breadcrumb__item {
8
8
  a, .daff-breadcrumb__menu-activator {
9
- @include light($mode) {
9
+ @include daff-light-mode($mode) {
10
10
  color: daff-color($neutral, 80);
11
11
  text-decoration-color: daff-color($neutral, 80);
12
12
  }
13
13
 
14
- @include dark($mode) {
14
+ @include daff-dark-mode($mode) {
15
15
  color: daff-color($neutral, 30);
16
16
  text-decoration-color: daff-color($neutral, 30);
17
17
  }
@@ -43,7 +43,7 @@
43
43
  $mode: daff-get-theme-mode($theme);
44
44
 
45
45
  .daff-button {
46
- @include light($mode) {
46
+ @include daff-light-mode($mode) {
47
47
  @include daff-button-theme-variant(
48
48
  daff-color($neutral, 10),
49
49
  daff-color($neutral, 20),
@@ -131,7 +131,7 @@
131
131
  }
132
132
  }
133
133
 
134
- @include dark($mode) {
134
+ @include daff-dark-mode($mode) {
135
135
  @include daff-button-theme-variant(
136
136
  daff-color($neutral, 90),
137
137
  daff-color($neutral, 80),
@@ -30,7 +30,7 @@
30
30
  $mode: daff-get-theme-mode($theme);
31
31
 
32
32
  .daff-flat-button {
33
- @include light($mode) {
33
+ @include daff-light-mode($mode) {
34
34
  @include daff-flat-button-theme-variant(
35
35
  $base-contrast,
36
36
  );
@@ -96,7 +96,7 @@
96
96
  }
97
97
  }
98
98
 
99
- @include dark($mode) {
99
+ @include daff-dark-mode($mode) {
100
100
  @include daff-flat-button-theme-variant(
101
101
  $base-contrast,
102
102
  );
@@ -41,7 +41,7 @@
41
41
  $mode: daff-get-theme-mode($theme);
42
42
 
43
43
  .daff-icon-button {
44
- @include light($mode) {
44
+ @include daff-light-mode($mode) {
45
45
  @include daff-icon-button-theme-variant(
46
46
  daff-color($neutral, 50),
47
47
  daff-color($neutral, 60),
@@ -129,7 +129,7 @@
129
129
  }
130
130
  }
131
131
 
132
- @include dark($mode) {
132
+ @include daff-dark-mode($mode) {
133
133
  @include daff-icon-button-theme-variant(
134
134
  daff-color($neutral, 50),
135
135
  daff-color($neutral, 40),
@@ -1,6 +1,6 @@
1
1
  @use '../../../../scss/theming' as *;
2
2
 
3
- @mixin daff-raised-button-theme-variant($base-color) {
3
+ @mixin daff-raised-button-theme-variant($theme, $base-color) {
4
4
  @if daff-contrast-ratio($base-color, daff-text-contrast($base-color)) < 4.5 {
5
5
  @error 'Button Initial State: ' + map.get(a11y.$wcag-aa-errors, 'text-contrast');
6
6
  }
@@ -37,39 +37,39 @@
37
37
  $neutral: daff-get-palette($theme, neutral);
38
38
 
39
39
  .daff-raised-button {
40
- @include daff-raised-button-theme-variant(daff-color($neutral, 20));
40
+ @include daff-raised-button-theme-variant($theme, daff-color($neutral, 20));
41
41
 
42
42
  &.daff-primary {
43
- @include daff-raised-button-theme-variant(daff-color($primary));
43
+ @include daff-raised-button-theme-variant($theme, daff-color($primary));
44
44
  }
45
45
 
46
46
  &.daff-secondary {
47
- @include daff-raised-button-theme-variant(daff-color($secondary));
47
+ @include daff-raised-button-theme-variant($theme, daff-color($secondary));
48
48
  }
49
49
 
50
50
  &.daff-tertiary {
51
- @include daff-raised-button-theme-variant(daff-color($tertiary));
51
+ @include daff-raised-button-theme-variant($theme, daff-color($tertiary));
52
52
  }
53
53
 
54
54
  &.daff-dark {
55
- @include daff-raised-button-theme-variant($black);
55
+ @include daff-raised-button-theme-variant($theme, $black);
56
56
  }
57
57
 
58
58
  &.daff-light {
59
- @include daff-raised-button-theme-variant($white);
59
+ @include daff-raised-button-theme-variant($theme, $white);
60
60
  }
61
61
 
62
62
  &.daff-theme {
63
- @include daff-raised-button-theme-variant($base);
63
+ @include daff-raised-button-theme-variant($theme, $base);
64
64
  }
65
65
 
66
66
  &.daff-theme-contrast {
67
- @include daff-raised-button-theme-variant($base-contrast);
67
+ @include daff-raised-button-theme-variant($theme, $base-contrast);
68
68
  }
69
69
 
70
70
  &[disabled],
71
71
  &.daff-disabled {
72
- @include daff-raised-button-theme-variant(daff-color($neutral, 30));
72
+ @include daff-raised-button-theme-variant($theme, daff-color($neutral, 30));
73
73
  color: daff-color($neutral, 50);
74
74
 
75
75
  &::after {
@@ -78,15 +78,15 @@
78
78
  }
79
79
 
80
80
  &.daff-warn {
81
- @include daff-raised-button-theme-variant(daff-color($warn));
81
+ @include daff-raised-button-theme-variant($theme, daff-color($warn));
82
82
  }
83
83
 
84
84
  &.daff-critical {
85
- @include daff-raised-button-theme-variant(daff-color($critical));
85
+ @include daff-raised-button-theme-variant($theme, daff-color($critical));
86
86
  }
87
87
 
88
88
  &.daff-success {
89
- @include daff-raised-button-theme-variant(daff-color($success));
89
+ @include daff-raised-button-theme-variant($theme, daff-color($success));
90
90
  }
91
91
  }
92
92
  }
@@ -46,7 +46,7 @@
46
46
  }
47
47
  }
48
48
 
49
- @include light($mode) {
49
+ @include daff-light-mode($mode) {
50
50
  &.daff-primary {
51
51
  @include daff-stroked-button-theme-variant(
52
52
  daff-color($primary)
@@ -98,7 +98,7 @@
98
98
  }
99
99
  }
100
100
 
101
- @include dark($mode) {
101
+ @include daff-dark-mode($mode) {
102
102
  &.daff-primary {
103
103
  @include daff-stroked-button-theme-variant(
104
104
  daff-color($primary, 40)
@@ -24,7 +24,7 @@
24
24
  $mode: daff-get-theme-mode($theme);
25
25
 
26
26
  .daff-underline-button {
27
- @include light($mode) {
27
+ @include daff-light-mode($mode) {
28
28
  @include daff-underline-button-theme-variant(
29
29
  daff-color($neutral, 70)
30
30
  );
@@ -80,7 +80,7 @@
80
80
  }
81
81
  }
82
82
 
83
- @include dark($mode) {
83
+ @include daff-dark-mode($mode) {
84
84
  @include daff-underline-button-theme-variant(
85
85
  daff-color($neutral, 40)
86
86
  );
@@ -17,7 +17,7 @@
17
17
  $mode: daff-get-theme-mode($theme);
18
18
 
19
19
  .daff-callout {
20
- @include light($mode) {
20
+ @include daff-light-mode($mode) {
21
21
  @include daff-callout-theme-variant(daff-color($neutral, 10));
22
22
 
23
23
  &.daff-primary {
@@ -33,7 +33,7 @@
33
33
  }
34
34
  }
35
35
 
36
- @include dark($mode) {
36
+ @include daff-dark-mode($mode) {
37
37
  @include daff-callout-theme-variant(daff-color($neutral, 90));
38
38
 
39
39
  &.daff-primary {
@@ -57,12 +57,22 @@
57
57
  @include daff-callout-theme-variant($base-contrast);
58
58
  }
59
59
 
60
+ // remove when `DaffColorEnum.Black` is removed in v1.0.0
60
61
  &.daff-black {
61
62
  @include daff-callout-theme-variant($black);
62
63
  }
63
64
 
65
+ // remove when `DaffColorEnum.White` is removed in v1.0.0
64
66
  &.daff-white {
65
67
  @include daff-callout-theme-variant($white);
66
68
  }
69
+
70
+ &.daff-dark {
71
+ @include daff-callout-theme-variant($black);
72
+ }
73
+
74
+ &.daff-light {
75
+ @include daff-callout-theme-variant($white);
76
+ }
67
77
  }
68
78
  }