@daffodil/design 0.83.0 → 0.85.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 (251) hide show
  1. package/accordion/src/accordion-theme.scss +11 -13
  2. package/article/src/article-theme.scss +36 -38
  3. package/atoms/form/checkbox/cva/checkbox-cva.directive.d.ts +3 -0
  4. package/atoms/form/error-message/error-message.component.d.ts +4 -1
  5. package/atoms/form/error-message/error-message.module.d.ts +4 -1
  6. package/atoms/form/form-field/form-field/form-field.component.d.ts +40 -25
  7. package/atoms/form/form-field/form-field-control.d.ts +19 -4
  8. package/atoms/form/form-field/form-field-state.d.ts +7 -0
  9. package/atoms/form/form-field/form-field.d.ts +10 -0
  10. package/atoms/form/form-field/form-field.module.d.ts +6 -4
  11. package/atoms/form/form-field/public_api.d.ts +2 -1
  12. package/atoms/form/form-label/form-label.directive.d.ts +4 -1
  13. package/atoms/form/form-label/form-label.module.d.ts +4 -1
  14. package/atoms/form/hint/hint.component.d.ts +13 -0
  15. package/atoms/form/hint/public_api.d.ts +1 -0
  16. package/atoms/form/native-select/native-select.component.d.ts +5 -1
  17. package/atoms/form/radio/cva/radio-cva.directive.d.ts +3 -0
  18. package/breadcrumb/breadcrumb/breadcrumb.component.d.ts +3 -0
  19. package/breadcrumb/src/breadcrumb-theme.scss +14 -7
  20. package/button/button/button-base.directive.d.ts +6 -23
  21. package/button/button/raised/raised.component.d.ts +1 -1
  22. package/button/src/button/basic/button-theme.scss +84 -114
  23. package/button/src/button/button-base.scss +17 -4
  24. package/button/src/button/flat/flat-theme.scss +32 -68
  25. package/button/src/button/icon/icon-theme.scss +78 -106
  26. package/button/src/button/raised/raised-theme.scss +30 -32
  27. package/button/src/button/stroked/stroked-theme.scss +35 -69
  28. package/button/src/button/underline/underline-theme.scss +34 -50
  29. package/callout/src/callout-theme.scss +37 -22
  30. package/card/card/basic/basic.component.d.ts +3 -0
  31. package/card/card/raised/raised.component.d.ts +3 -0
  32. package/card/card/stroked/stroked.component.d.ts +3 -0
  33. package/card/src/card/raised/raised-theme.scss +9 -11
  34. package/card/src/card/stroked/stroked-theme.scss +32 -34
  35. package/card/src/card-base-theme.scss +42 -44
  36. package/checkbox/examples/basic-checkbox/basic-checkbox.component.d.ts +3 -0
  37. package/checkbox/examples/checkbox-set/checkbox-set.component.d.ts +3 -0
  38. package/core/article-encapsulated/article-encapsulated.directive.d.ts +3 -0
  39. package/core/colorable/colorable.d.ts +2 -2
  40. package/core/colorable/colorable.directive.d.ts +8 -0
  41. package/core/manage-container-layout/manage-container-layout.directive.d.ts +3 -0
  42. package/core/openable/openable.directive.d.ts +3 -0
  43. package/core/prefix-suffix/prefix-suffix.module.d.ts +1 -1
  44. package/core/prefix-suffix/prefix.directive.d.ts +4 -1
  45. package/core/prefix-suffix/public_api.d.ts +0 -4
  46. package/core/prefix-suffix/suffix.directive.d.ts +4 -1
  47. package/core/sizable/sizable.directive.d.ts +8 -0
  48. package/core/statusable/statusable.directive.d.ts +2 -0
  49. package/core/text-alignable/text-alignable.directive.d.ts +6 -1
  50. package/fesm2022/daffodil-design-accordion-examples.mjs +10 -10
  51. package/fesm2022/daffodil-design-accordion-examples.mjs.map +1 -1
  52. package/fesm2022/daffodil-design-accordion.mjs +15 -15
  53. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  54. package/fesm2022/daffodil-design-article-examples.mjs +31 -31
  55. package/fesm2022/daffodil-design-article-examples.mjs.map +1 -1
  56. package/fesm2022/daffodil-design-article.mjs +11 -11
  57. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  58. package/fesm2022/daffodil-design-breadcrumb-examples.mjs +7 -7
  59. package/fesm2022/daffodil-design-breadcrumb-examples.mjs.map +1 -1
  60. package/fesm2022/daffodil-design-breadcrumb.mjs +15 -12
  61. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  62. package/fesm2022/daffodil-design-button-examples.mjs +41 -37
  63. package/fesm2022/daffodil-design-button-examples.mjs.map +1 -1
  64. package/fesm2022/daffodil-design-button.mjs +46 -53
  65. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  66. package/fesm2022/daffodil-design-callout-examples.mjs +13 -13
  67. package/fesm2022/daffodil-design-callout-examples.mjs.map +1 -1
  68. package/fesm2022/daffodil-design-callout.mjs +23 -23
  69. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  70. package/fesm2022/daffodil-design-card-examples.mjs +19 -19
  71. package/fesm2022/daffodil-design-card-examples.mjs.map +1 -1
  72. package/fesm2022/daffodil-design-card.mjs +44 -35
  73. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  74. package/fesm2022/daffodil-design-checkbox-examples.mjs +13 -7
  75. package/fesm2022/daffodil-design-checkbox-examples.mjs.map +1 -1
  76. package/fesm2022/daffodil-design-container-examples.mjs +4 -4
  77. package/fesm2022/daffodil-design-container-examples.mjs.map +1 -1
  78. package/fesm2022/daffodil-design-container.mjs +8 -8
  79. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  80. package/fesm2022/daffodil-design-hero-examples.mjs +13 -13
  81. package/fesm2022/daffodil-design-hero-examples.mjs.map +1 -1
  82. package/fesm2022/daffodil-design-hero.mjs +23 -23
  83. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  84. package/fesm2022/daffodil-design-image-examples.mjs +10 -10
  85. package/fesm2022/daffodil-design-image-examples.mjs.map +1 -1
  86. package/fesm2022/daffodil-design-image.mjs +9 -9
  87. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  88. package/fesm2022/daffodil-design-input-examples.mjs +72 -28
  89. package/fesm2022/daffodil-design-input-examples.mjs.map +1 -1
  90. package/fesm2022/daffodil-design-input.mjs +96 -0
  91. package/fesm2022/daffodil-design-input.mjs.map +1 -0
  92. package/fesm2022/daffodil-design-link-set.mjs +17 -17
  93. package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
  94. package/fesm2022/daffodil-design-list-examples.mjs +13 -13
  95. package/fesm2022/daffodil-design-list-examples.mjs.map +1 -1
  96. package/fesm2022/daffodil-design-list.mjs +12 -12
  97. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  98. package/fesm2022/daffodil-design-loading-icon-examples.mjs +4 -4
  99. package/fesm2022/daffodil-design-loading-icon-examples.mjs.map +1 -1
  100. package/fesm2022/daffodil-design-loading-icon.mjs +8 -8
  101. package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
  102. package/fesm2022/daffodil-design-media-gallery-examples.mjs +16 -16
  103. package/fesm2022/daffodil-design-media-gallery-examples.mjs.map +1 -1
  104. package/fesm2022/daffodil-design-media-gallery.mjs +14 -21
  105. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  106. package/fesm2022/daffodil-design-menu-examples.mjs +7 -7
  107. package/fesm2022/daffodil-design-menu-examples.mjs.map +1 -1
  108. package/fesm2022/daffodil-design-menu.mjs +39 -26
  109. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  110. package/fesm2022/daffodil-design-modal-examples.mjs +7 -7
  111. package/fesm2022/daffodil-design-modal-examples.mjs.map +1 -1
  112. package/fesm2022/daffodil-design-modal.mjs +61 -28
  113. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  114. package/fesm2022/daffodil-design-navbar-examples.mjs +13 -13
  115. package/fesm2022/daffodil-design-navbar-examples.mjs.map +1 -1
  116. package/fesm2022/daffodil-design-navbar.mjs +9 -9
  117. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  118. package/fesm2022/daffodil-design-notification-examples.mjs +17 -22
  119. package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
  120. package/fesm2022/daffodil-design-notification.mjs +51 -24
  121. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  122. package/fesm2022/daffodil-design-paginator-examples.mjs +7 -7
  123. package/fesm2022/daffodil-design-paginator-examples.mjs.map +1 -1
  124. package/fesm2022/daffodil-design-paginator.mjs +9 -9
  125. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  126. package/fesm2022/daffodil-design-progress-bar-examples.mjs +10 -10
  127. package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +1 -1
  128. package/fesm2022/daffodil-design-progress-bar.mjs +30 -12
  129. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  130. package/fesm2022/daffodil-design-quantity-field-examples.mjs +23 -22
  131. package/fesm2022/daffodil-design-quantity-field-examples.mjs.map +1 -1
  132. package/fesm2022/daffodil-design-quantity-field.mjs +355 -0
  133. package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -0
  134. package/fesm2022/daffodil-design-radio-examples.mjs +4 -4
  135. package/fesm2022/daffodil-design-radio-examples.mjs.map +1 -1
  136. package/fesm2022/daffodil-design-sidebar-examples.mjs +13 -13
  137. package/fesm2022/daffodil-design-sidebar-examples.mjs.map +1 -1
  138. package/fesm2022/daffodil-design-sidebar.mjs +27 -27
  139. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  140. package/fesm2022/daffodil-design-switch-examples.mjs +17 -17
  141. package/fesm2022/daffodil-design-switch-examples.mjs.map +1 -1
  142. package/fesm2022/daffodil-design-switch.mjs +6 -7
  143. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  144. package/fesm2022/daffodil-design-tabs-examples.mjs +16 -16
  145. package/fesm2022/daffodil-design-tabs-examples.mjs.map +1 -1
  146. package/fesm2022/daffodil-design-tabs.mjs +38 -19
  147. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  148. package/fesm2022/daffodil-design-text-snippet-examples.mjs +4 -4
  149. package/fesm2022/daffodil-design-text-snippet-examples.mjs.map +1 -1
  150. package/fesm2022/daffodil-design-text-snippet.mjs +4 -4
  151. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  152. package/fesm2022/daffodil-design-toast-examples.mjs +22 -16
  153. package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -1
  154. package/fesm2022/daffodil-design-toast.mjs +24 -26
  155. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  156. package/fesm2022/daffodil-design-tree-examples.mjs +7 -7
  157. package/fesm2022/daffodil-design-tree-examples.mjs.map +1 -1
  158. package/fesm2022/daffodil-design-tree.mjs +30 -16
  159. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  160. package/fesm2022/daffodil-design-youtube-player.mjs +10 -7
  161. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
  162. package/fesm2022/daffodil-design.mjs +531 -818
  163. package/fesm2022/daffodil-design.mjs.map +1 -1
  164. package/hero/src/hero-theme.scss +37 -22
  165. package/input/README.md +66 -0
  166. package/input/examples/examples.d.ts +2 -2
  167. package/input/examples/input-disabled/input-disabled.component.d.ts +2 -0
  168. package/input/examples/input-hint/input-hint.component.d.ts +5 -0
  169. package/input/examples/input-hint-and-error/input-hint-and-error.component.d.ts +9 -0
  170. package/input/examples/input-with-form-field/input-with-form-field.component.d.ts +2 -0
  171. package/input/index.d.ts +1 -0
  172. package/{atoms/form/input → input}/input.component.d.ts +16 -20
  173. package/input/input.module.d.ts +10 -0
  174. package/list/list/list.component.d.ts +1 -1
  175. package/list/src/list-theme.scss +20 -26
  176. package/loading-icon/src/loading-icon-theme.scss +20 -22
  177. package/media-gallery/media-gallery/media-gallery.component.d.ts +0 -4
  178. package/media-gallery/src/media-gallery-theme.scss +10 -12
  179. package/menu/helpers/create-overlay.d.ts +1 -1
  180. package/menu/menu/menu.component.d.ts +15 -0
  181. package/menu/menu-activator/menu-activator.component.d.ts +3 -0
  182. package/menu/src/menu-theme.scss +34 -16
  183. package/modal/modal/modal.component.d.ts +21 -0
  184. package/modal/modal-actions/modal-actions.component.d.ts +3 -0
  185. package/modal/modal-close/modal-close.directive.d.ts +3 -0
  186. package/modal/modal-content/modal-content.component.d.ts +3 -0
  187. package/modal/modal-title/modal-title.directive.d.ts +3 -0
  188. package/modal/src/modal-theme.scss +2 -2
  189. package/navbar/src/navbar-theme.scss +21 -18
  190. package/notification/README.md +11 -12
  191. package/notification/notification/notification.component.d.ts +17 -2
  192. package/notification/notification-actions/notification-actions.directive.d.ts +3 -0
  193. package/notification/notification-message/notification-message.directive.d.ts +3 -0
  194. package/notification/notification-subtitle/notification-subtitle.directive.d.ts +3 -0
  195. package/notification/notification-title/notification-title.directive.d.ts +3 -0
  196. package/notification/notification.d.ts +2 -2
  197. package/notification/src/notification-theme.scss +44 -46
  198. package/package.json +1 -1
  199. package/paginator/src/paginator-theme.scss +26 -23
  200. package/progress-bar/progress-bar-label/progress-bar-label.directive.d.ts +3 -0
  201. package/progress-bar/progress-bar.component.d.ts +15 -0
  202. package/progress-bar/src/progress-bar-theme.scss +18 -20
  203. package/public_api.d.ts +1 -2
  204. package/quantity-field/README.md +63 -0
  205. package/quantity-field/index.d.ts +1 -0
  206. package/quantity-field/public_api.d.ts +2 -0
  207. package/{atoms/form/quantity-field → quantity-field}/quantity-field.component.d.ts +5 -4
  208. package/quantity-field/quantity-field.module.d.ts +11 -0
  209. package/{atoms/form/quantity-field → quantity-field}/quantity-input/quantity-input.component.d.ts +5 -2
  210. package/{atoms/form/quantity-field → quantity-field}/quantity-select/quantity-select.component.d.ts +2 -2
  211. package/scss/state/skeleton/_mixins.scss +22 -13
  212. package/scss/theme.scss +2 -2
  213. package/scss/theming/_configure-theme.scss +16 -16
  214. package/scss/theming/_get-base-color.scss +19 -0
  215. package/scss/theming/_get-palette.scss +27 -0
  216. package/scss/theming/_get-theme-mode.scss +9 -0
  217. package/scss/theming/_index.scss +3 -0
  218. package/scss/theming/_light-dark.scss +4 -4
  219. package/scss/theming/_theme-css-variables.scss +20 -20
  220. package/sidebar/src/sidebar-theme.scss +4 -5
  221. package/src/atoms/form/error-message/error-message-theme.scss +4 -2
  222. package/src/atoms/form/form-field/form-field/form-field-theme.scss +47 -24
  223. package/src/atoms/form/hint/hint-theme.scss +22 -0
  224. package/src/atoms/form/native-select/native-select-theme.scss +5 -7
  225. package/switch/src/switch-theme.scss +13 -15
  226. package/switch/switch.d.ts +2 -2
  227. package/tabs/src/tabs-theme.scss +13 -15
  228. package/tabs/tabs/tab-activator/tab-activator.component.d.ts +15 -0
  229. package/tabs/tabs/tab-label/tab-label.component.d.ts +2 -5
  230. package/tabs/tabs/tabs.component.d.ts +3 -0
  231. package/toast/examples/default-toast/default-toast.component.d.ts +3 -0
  232. package/toast/examples/toast-positions/toast-positions.component.d.ts +3 -0
  233. package/toast/src/toast-theme.scss +36 -38
  234. package/toast/toast/toast.component.d.ts +3 -5
  235. package/tree/interfaces/tree-data.d.ts +15 -0
  236. package/tree/interfaces/tree-render-mode.d.ts +2 -2
  237. package/tree/src/tree-theme.scss +20 -22
  238. package/tree/tree/tree-notifier.service.d.ts +3 -3
  239. package/tree/tree/tree.component.d.ts +13 -3
  240. package/tree/tree-item/tree-item.directive.d.ts +6 -0
  241. package/youtube-player/youtube-player.component.d.ts +3 -0
  242. package/atoms/form/input/input.module.d.ts +0 -8
  243. package/atoms/form/quantity-field/public_api.d.ts +0 -4
  244. package/atoms/form/quantity-field/quantity-field.module.d.ts +0 -13
  245. package/core/prefix-suffix/prefixable/prefixable-interface.d.ts +0 -7
  246. package/core/prefix-suffix/prefixable/prefixable.d.ts +0 -11
  247. package/core/prefix-suffix/suffixable/suffixable-interface.d.ts +0 -7
  248. package/core/prefix-suffix/suffixable/suffixable.d.ts +0 -11
  249. package/input/examples/basic-input/basic-input.component.d.ts +0 -5
  250. package/src/atoms/form/input/input-theme.scss +0 -16
  251. /package/{atoms/form/input → input}/public_api.d.ts +0 -0
@@ -1,6 +1,4 @@
1
- @use 'sass:map';
2
- @use '../../../../scss/theming';
3
- @use '../../../../scss/core';
1
+ @use '../../../../scss/theming' as *;
4
2
 
5
3
  @mixin daff-icon-button-theme-variant(
6
4
  $base-color: currentColor,
@@ -24,219 +22,193 @@
24
22
  }
25
23
 
26
24
  @mixin daff-icon-button-theme($theme) {
27
- $primary: core.daff-map-get($theme, primary);
28
- $secondary: core.daff-map-get($theme, secondary);
29
- $tertiary: core.daff-map-get($theme, tertiary);
30
- $info: core.daff-map-get($theme, informational);
31
- $warn: core.daff-map-get($theme, warn);
32
- $critical: core.daff-map-get($theme, critical);
33
- $success: core.daff-map-get($theme, success);
34
- $base: core.daff-map-get($theme, 'core', 'base');
35
- $base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
36
- $white: core.daff-map-get($theme, 'core', 'white');
37
- $black: core.daff-map-get($theme, 'core', 'black');
38
- $neutral: core.daff-map-get($theme, 'core', 'neutral');
39
- $type: core.daff-map-get($theme, 'core', 'type');
25
+ $primary: daff-get-palette($theme, primary);
26
+ $secondary: daff-get-palette($theme, secondary);
27
+ $tertiary: daff-get-palette($theme, tertiary);
28
+ $info: daff-get-palette($theme, informational);
29
+ $warn: daff-get-palette($theme, warn);
30
+ $critical: daff-get-palette($theme, critical);
31
+ $success: daff-get-palette($theme, success);
32
+ $base: daff-get-base-color($theme, base);
33
+ $base-contrast: daff-get-base-color($theme, base-contrast);
34
+ $white: daff-get-base-color($theme, 'white');
35
+ $black: daff-get-base-color($theme, 'black');
36
+ $neutral: daff-get-palette($theme, neutral);
37
+ $mode: daff-get-theme-mode($theme);
40
38
 
41
39
  .daff-icon-button {
42
- @include theming.light($type) {
40
+ @include light($mode) {
43
41
  @include daff-icon-button-theme-variant(
44
- theming.daff-color($neutral, 50),
45
- theming.daff-color($neutral, 60),
46
- theming.daff-color($neutral, 70)
42
+ daff-color($neutral, 50),
43
+ daff-color($neutral, 60),
44
+ daff-color($neutral, 70)
47
45
  );
48
46
 
49
47
  &.daff-primary {
50
48
  @include daff-icon-button-theme-variant(
51
- theming.daff-color($primary),
52
- theming.daff-color($primary, 70),
53
- theming.daff-color($primary, 80)
49
+ daff-color($primary),
50
+ daff-color($primary, 70),
51
+ daff-color($primary, 80)
54
52
  );
55
53
  }
56
54
 
57
55
  &.daff-secondary {
58
56
  @include daff-icon-button-theme-variant(
59
- theming.daff-color($secondary),
60
- theming.daff-color($secondary, 70),
61
- theming.daff-color($secondary, 80)
57
+ daff-color($secondary),
58
+ daff-color($secondary, 70),
59
+ daff-color($secondary, 80)
62
60
  );
63
61
  }
64
62
 
65
63
  &.daff-tertiary {
66
64
  @include daff-icon-button-theme-variant(
67
- theming.daff-color($tertiary),
68
- theming.daff-color($tertiary, 70),
69
- theming.daff-color($tertiary, 80)
65
+ daff-color($tertiary),
66
+ daff-color($tertiary, 70),
67
+ daff-color($tertiary, 80)
70
68
  );
71
69
  }
72
70
 
73
- &.daff-black {
71
+ &.daff-dark {
74
72
  @include daff-icon-button-theme-variant(
75
73
  $black,
76
- theming.daff-color($neutral, 90),
77
- theming.daff-color($neutral, 80)
74
+ daff-color($neutral, 90),
75
+ daff-color($neutral, 80)
78
76
  );
79
77
  }
80
78
 
81
- &.daff-white {
79
+ &.daff-light {
82
80
  @include daff-icon-button-theme-variant(
83
81
  $white,
84
- theming.daff-color($neutral, 20),
85
- theming.daff-color($neutral, 30)
82
+ daff-color($neutral, 20),
83
+ daff-color($neutral, 30)
86
84
  );
87
85
  }
88
86
 
89
87
  &.daff-theme {
90
88
  @include daff-icon-button-theme-variant(
91
89
  $base,
92
- theming.daff-color($neutral, 10),
93
- theming.daff-color($neutral, 20)
90
+ daff-color($neutral, 10),
91
+ daff-color($neutral, 20)
94
92
  );
95
93
  }
96
94
 
97
95
  &.daff-theme-contrast {
98
96
  @include daff-icon-button-theme-variant(
99
97
  $base-contrast,
100
- theming.daff-color($neutral, 90),
101
- theming.daff-color($neutral, 80)
98
+ daff-color($neutral, 90),
99
+ daff-color($neutral, 80)
102
100
  );
103
101
  }
104
102
 
105
- &[disabled],
106
- &.disabled {
107
- @include daff-icon-button-theme-variant(
108
- theming.daff-color($neutral, 40),
109
- theming.daff-color($neutral, 40),
110
- theming.daff-color($neutral, 40)
111
- );
112
-
113
- &:hover {
114
- color: theming.daff-color($neutral, 40);
115
- }
116
- }
117
-
118
103
  &.daff-warn {
119
104
  @include daff-icon-button-theme-variant(
120
- theming.daff-color($warn),
121
- theming.daff-color($warn, 70),
122
- theming.daff-color($warn, 80)
105
+ daff-color($warn),
106
+ daff-color($warn, 70),
107
+ daff-color($warn, 80)
123
108
  );
124
109
  }
125
110
 
126
111
  &.daff-critical {
127
112
  @include daff-icon-button-theme-variant(
128
- theming.daff-color($critical),
129
- theming.daff-color($critical, 70),
130
- theming.daff-color($critical, 80)
113
+ daff-color($critical),
114
+ daff-color($critical, 70),
115
+ daff-color($critical, 80)
131
116
  );
132
117
  }
133
118
 
134
119
  &.daff-success {
135
120
  @include daff-icon-button-theme-variant(
136
- theming.daff-color($success),
137
- theming.daff-color($success, 70),
138
- theming.daff-color($success, 80)
121
+ daff-color($success),
122
+ daff-color($success, 70),
123
+ daff-color($success, 80)
139
124
  );
140
125
  }
141
126
  }
142
127
 
143
- @include theming.dark($type) {
128
+ @include dark($mode) {
144
129
  @include daff-icon-button-theme-variant(
145
- theming.daff-color($neutral, 50),
146
- theming.daff-color($neutral, 40),
147
- theming.daff-color($neutral, 30)
130
+ daff-color($neutral, 50),
131
+ daff-color($neutral, 40),
132
+ daff-color($neutral, 30)
148
133
  );
149
134
 
150
135
  &.daff-primary {
151
136
  @include daff-icon-button-theme-variant(
152
- theming.daff-color($primary),
153
- theming.daff-color($primary, 40),
154
- theming.daff-color($primary, 30)
137
+ daff-color($primary),
138
+ daff-color($primary, 40),
139
+ daff-color($primary, 30)
155
140
  );
156
141
  }
157
142
 
158
143
  &.daff-secondary {
159
144
  @include daff-icon-button-theme-variant(
160
- theming.daff-color($secondary),
161
- theming.daff-color($secondary, 40),
162
- theming.daff-color($secondary, 30)
145
+ daff-color($secondary),
146
+ daff-color($secondary, 40),
147
+ daff-color($secondary, 30)
163
148
  );
164
149
  }
165
150
 
166
151
  &.daff-tertiary {
167
152
  @include daff-icon-button-theme-variant(
168
- theming.daff-color($tertiary),
169
- theming.daff-color($tertiary, 40),
170
- theming.daff-color($tertiary, 30)
153
+ daff-color($tertiary),
154
+ daff-color($tertiary, 40),
155
+ daff-color($tertiary, 30)
171
156
  );
172
157
  }
173
158
 
174
- &.daff-black {
159
+ &.daff-dark {
175
160
  @include daff-icon-button-theme-variant(
176
161
  $black,
177
- theming.daff-color($neutral, 100),
178
- theming.daff-color($neutral, 80)
162
+ daff-color($neutral, 100),
163
+ daff-color($neutral, 80)
179
164
  );
180
165
  }
181
166
 
182
- &.daff-white {
167
+ &.daff-light {
183
168
  @include daff-icon-button-theme-variant(
184
169
  $white,
185
- theming.daff-color($neutral, 20),
186
- theming.daff-color($neutral, 30)
170
+ daff-color($neutral, 20),
171
+ daff-color($neutral, 30)
187
172
  );
188
173
  }
189
174
 
190
175
  &.daff-theme {
191
176
  @include daff-icon-button-theme-variant(
192
177
  $base,
193
- theming.daff-color($neutral, 100),
194
- theming.daff-color($neutral, 80)
178
+ daff-color($neutral, 100),
179
+ daff-color($neutral, 80)
195
180
  );
196
181
  }
197
182
 
198
183
  &.daff-theme-contrast {
199
184
  @include daff-icon-button-theme-variant(
200
185
  $base-contrast,
201
- theming.daff-color($neutral, 20),
202
- theming.daff-color($neutral, 30)
186
+ daff-color($neutral, 20),
187
+ daff-color($neutral, 30)
203
188
  );
204
189
  }
205
190
 
206
- &[disabled],
207
- &.disabled {
208
- @include daff-icon-button-theme-variant(
209
- theming.daff-color($neutral, 40),
210
- theming.daff-color($neutral, 40),
211
- theming.daff-color($neutral, 40)
212
- );
213
-
214
- &:hover {
215
- color: theming.daff-color($neutral, 40);
216
- }
217
- }
218
-
219
191
  &.daff-warn {
220
192
  @include daff-icon-button-theme-variant(
221
- theming.daff-color($warn),
222
- theming.daff-color($warn, 40),
223
- theming.daff-color($warn, 30)
193
+ daff-color($warn),
194
+ daff-color($warn, 40),
195
+ daff-color($warn, 30)
224
196
  );
225
197
  }
226
198
 
227
199
  &.daff-critical {
228
200
  @include daff-icon-button-theme-variant(
229
- theming.daff-color($critical),
230
- theming.daff-color($critical, 40),
231
- theming.daff-color($critical, 30)
201
+ daff-color($critical),
202
+ daff-color($critical, 40),
203
+ daff-color($critical, 30)
232
204
  );
233
205
  }
234
206
 
235
207
  &.daff-success {
236
208
  @include daff-icon-button-theme-variant(
237
- theming.daff-color($success),
238
- theming.daff-color($success, 40),
239
- theming.daff-color($success, 30)
209
+ daff-color($success),
210
+ daff-color($success, 40),
211
+ daff-color($success, 30)
240
212
  );
241
213
  }
242
214
  }
@@ -1,27 +1,25 @@
1
- @use 'sass:map';
2
- @use '../../../../scss/theming';
3
- @use '../../../../scss/core';
1
+ @use '../../../../scss/theming' as *;
4
2
 
5
3
  @mixin daff-raised-button-theme-variant($base-color) {
6
- @if theming.daff-contrast-ratio(
4
+ @if daff-contrast-ratio(
7
5
  $base-color,
8
- theming.daff-text-contrast($base-color)
6
+ daff-text-contrast($base-color)
9
7
  ) < 4.5 {
10
8
  @error 'Button Initial State: ' + map.get(a11y.$wcag-aa-errors, 'text-contrast');
11
9
  }
12
10
 
13
- @if theming.daff-contrast-ratio(
11
+ @if daff-contrast-ratio(
14
12
  $base-color,
15
- theming.daff-text-contrast($base-color)
13
+ daff-text-contrast($base-color)
16
14
  ) < 4.5 {
17
15
  @error 'Button Hover State: ' + map.get(a11y.$wcag-aa-errors, 'text-contrast');
18
16
  }
19
17
 
20
- $black: theming.daff-color(theming.$daff-neutral, 110);
18
+ $black: daff-color($daff-neutral, 110);
21
19
  background-color: $base-color;
22
20
  border: 1px solid $base-color;
23
21
  box-shadow: 0 1px 5px -4px rgba($black, 0.5), 0 4px 8px 0 rgba($black, 0.05);
24
- color: theming.daff-text-contrast($base-color);
22
+ color: daff-text-contrast($base-color);
25
23
 
26
24
  &:hover {
27
25
  box-shadow: 0 6px 12px rgba($black, 0.08), 0 4px 6px rgba($black, 0.04);
@@ -29,41 +27,41 @@
29
27
  }
30
28
 
31
29
  @mixin daff-raised-button-theme($theme) {
32
- $primary: core.daff-map-get($theme, primary);
33
- $secondary: core.daff-map-get($theme, secondary);
34
- $tertiary: core.daff-map-get($theme, tertiary);
35
- $info: core.daff-map-get($theme, informational);
36
- $warn: core.daff-map-get($theme, warn);
37
- $critical: core.daff-map-get($theme, critical);
38
- $success: core.daff-map-get($theme, success);
39
- $base: core.daff-map-get($theme, 'core', 'base');
40
- $base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
41
- $white: core.daff-map-get($theme, 'core', 'white');
42
- $black: core.daff-map-get($theme, 'core', 'black');
43
- $neutral: core.daff-map-get($theme, 'core', 'neutral');
30
+ $primary: daff-get-palette($theme, primary);
31
+ $secondary: daff-get-palette($theme, secondary);
32
+ $tertiary: daff-get-palette($theme, tertiary);
33
+ $info: daff-get-palette($theme, informational);
34
+ $warn: daff-get-palette($theme, warn);
35
+ $critical: daff-get-palette($theme, critical);
36
+ $success: daff-get-palette($theme, success);
37
+ $base: daff-get-base-color($theme, base);
38
+ $base-contrast: daff-get-base-color($theme, base-contrast);
39
+ $white: daff-get-base-color($theme, 'white');
40
+ $black: daff-get-base-color($theme, 'black');
41
+ $neutral: daff-get-palette($theme, neutral);
44
42
 
45
43
  .daff-raised-button {
46
44
  @include daff-raised-button-theme-variant(
47
- theming.daff-illuminate($base, $neutral, 2)
45
+ daff-illuminate($base, $neutral, 2)
48
46
  );
49
47
 
50
48
  &.daff-primary {
51
- @include daff-raised-button-theme-variant(theming.daff-color($primary));
49
+ @include daff-raised-button-theme-variant(daff-color($primary));
52
50
  }
53
51
 
54
52
  &.daff-secondary {
55
- @include daff-raised-button-theme-variant(theming.daff-color($secondary));
53
+ @include daff-raised-button-theme-variant(daff-color($secondary));
56
54
  }
57
55
 
58
56
  &.daff-tertiary {
59
- @include daff-raised-button-theme-variant(theming.daff-color($tertiary));
57
+ @include daff-raised-button-theme-variant(daff-color($tertiary));
60
58
  }
61
59
 
62
- &.daff-black {
60
+ &.daff-dark {
63
61
  @include daff-raised-button-theme-variant($black);
64
62
  }
65
63
 
66
- &.daff-white {
64
+ &.daff-light {
67
65
  @include daff-raised-button-theme-variant($white);
68
66
  }
69
67
 
@@ -78,9 +76,9 @@
78
76
  &[disabled],
79
77
  &.disabled {
80
78
  @include daff-raised-button-theme-variant(
81
- theming.daff-illuminate($base, $neutral, 3)
79
+ daff-illuminate($base, $neutral, 3)
82
80
  );
83
- color: theming.daff-illuminate($base, $neutral, 5);
81
+ color: daff-illuminate($base, $neutral, 5);
84
82
 
85
83
  &::after {
86
84
  box-shadow: none;
@@ -88,15 +86,15 @@
88
86
  }
89
87
 
90
88
  &.daff-warn {
91
- @include daff-raised-button-theme-variant(theming.daff-color($warn));
89
+ @include daff-raised-button-theme-variant(daff-color($warn));
92
90
  }
93
91
 
94
92
  &.daff-critical {
95
- @include daff-raised-button-theme-variant(theming.daff-color($critical));
93
+ @include daff-raised-button-theme-variant(daff-color($critical));
96
94
  }
97
95
 
98
96
  &.daff-success {
99
- @include daff-raised-button-theme-variant(theming.daff-color($success));
97
+ @include daff-raised-button-theme-variant(daff-color($success));
100
98
  }
101
99
  }
102
100
  }
@@ -1,6 +1,4 @@
1
- @use 'sass:map';
2
- @use '../../../../scss/theming';
3
- @use '../../../../scss/core';
1
+ @use '../../../../scss/theming' as *;
4
2
 
5
3
  @mixin daff-stroked-button-theme-variant($base-color) {
6
4
  border: 1px solid $base-color;
@@ -19,59 +17,59 @@
19
17
  }
20
18
 
21
19
  @mixin daff-stroked-button-theme($theme) {
22
- $primary: core.daff-map-get($theme, primary);
23
- $secondary: core.daff-map-get($theme, secondary);
24
- $tertiary: core.daff-map-get($theme, tertiary);
25
- $info: core.daff-map-get($theme, informational);
26
- $warn: core.daff-map-get($theme, warn);
27
- $critical: core.daff-map-get($theme, critical);
28
- $success: core.daff-map-get($theme, success);
29
- $base: core.daff-map-get($theme, 'core', 'base');
30
- $base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
31
- $white: core.daff-map-get($theme, 'core', 'white');
32
- $black: core.daff-map-get($theme, 'core', 'black');
33
- $neutral: core.daff-map-get($theme, 'core', 'neutral');
34
- $type: core.daff-map-get($theme, 'core', 'type');
20
+ $primary: daff-get-palette($theme, primary);
21
+ $secondary: daff-get-palette($theme, secondary);
22
+ $tertiary: daff-get-palette($theme, tertiary);
23
+ $info: daff-get-palette($theme, informational);
24
+ $warn: daff-get-palette($theme, warn);
25
+ $critical: daff-get-palette($theme, critical);
26
+ $success: daff-get-palette($theme, success);
27
+ $base: daff-get-base-color($theme, base);
28
+ $base-contrast: daff-get-base-color($theme, base-contrast);
29
+ $white: daff-get-base-color($theme, 'white');
30
+ $black: daff-get-base-color($theme, 'black');
31
+ $neutral: daff-get-palette($theme, neutral);
32
+ $mode: daff-get-theme-mode($theme);
35
33
 
36
34
  .daff-stroked-button {
37
35
  background: transparent;
38
- border: 1px solid theming.daff-color($neutral, 50);
36
+ border: 1px solid daff-color($neutral, 50);
39
37
  color: currentColor;
40
38
 
41
39
  &::after {
42
- background: rgba(theming.daff-color($neutral, 50), 0.1);
40
+ background: rgba(daff-color($neutral, 50), 0.1);
43
41
  }
44
42
 
45
43
  &:active {
46
44
  &::after {
47
- background: rgba(theming.daff-color($neutral, 50), 0.2);
45
+ background: rgba(daff-color($neutral, 50), 0.2);
48
46
  }
49
47
  }
50
48
 
51
- @include theming.light($type) {
49
+ @include light($mode) {
52
50
  &.daff-primary {
53
51
  @include daff-stroked-button-theme-variant(
54
- theming.daff-color($primary)
52
+ daff-color($primary)
55
53
  );
56
54
  }
57
55
 
58
56
  &.daff-secondary {
59
57
  @include daff-stroked-button-theme-variant(
60
- theming.daff-color($secondary)
58
+ daff-color($secondary)
61
59
  );
62
60
  }
63
61
 
64
62
  &.daff-tertiary {
65
63
  @include daff-stroked-button-theme-variant(
66
- theming.daff-color($tertiary)
64
+ daff-color($tertiary)
67
65
  );
68
66
  }
69
67
 
70
- &.daff-black {
68
+ &.daff-dark {
71
69
  @include daff-stroked-button-theme-variant($black);
72
70
  }
73
71
 
74
- &.daff-white {
72
+ &.daff-light {
75
73
  @include daff-stroked-button-theme-variant($white);
76
74
  }
77
75
 
@@ -83,63 +81,47 @@
83
81
  @include daff-stroked-button-theme-variant($base-contrast);
84
82
  }
85
83
 
86
- &[disabled],
87
- &.disabled {
88
- background-color: transparent;
89
- border-color: theming.daff-color($neutral, 30);
90
- color: theming.daff-color($neutral, 50);
91
-
92
- &:hover {
93
- color: theming.daff-color($neutral, 50);
94
-
95
- &::after {
96
- background-color: transparent;
97
- opacity: 0;
98
- }
99
- }
100
- }
101
-
102
84
  &.daff-warn {
103
- @include daff-stroked-button-theme-variant(theming.daff-color($warn));
85
+ @include daff-stroked-button-theme-variant(daff-color($warn));
104
86
  }
105
87
 
106
88
  &.daff-critical {
107
89
  @include daff-stroked-button-theme-variant(
108
- theming.daff-color($critical)
90
+ daff-color($critical)
109
91
  );
110
92
  }
111
93
 
112
94
  &.daff-success {
113
95
  @include daff-stroked-button-theme-variant(
114
- theming.daff-color($success)
96
+ daff-color($success)
115
97
  );
116
98
  }
117
99
  }
118
100
 
119
- @include theming.dark($type) {
101
+ @include dark($mode) {
120
102
  &.daff-primary {
121
103
  @include daff-stroked-button-theme-variant(
122
- theming.daff-color($primary, 40)
104
+ daff-color($primary, 40)
123
105
  );
124
106
  }
125
107
 
126
108
  &.daff-secondary {
127
109
  @include daff-stroked-button-theme-variant(
128
- theming.daff-color($secondary, 40)
110
+ daff-color($secondary, 40)
129
111
  );
130
112
  }
131
113
 
132
114
  &.daff-tertiary {
133
115
  @include daff-stroked-button-theme-variant(
134
- theming.daff-color($tertiary, 40)
116
+ daff-color($tertiary, 40)
135
117
  );
136
118
  }
137
119
 
138
- &.daff-black {
120
+ &.daff-dark {
139
121
  @include daff-stroked-button-theme-variant($black);
140
122
  }
141
123
 
142
- &.daff-white {
124
+ &.daff-light {
143
125
  @include daff-stroked-button-theme-variant($white);
144
126
  }
145
127
 
@@ -151,37 +133,21 @@
151
133
  @include daff-stroked-button-theme-variant($base-contrast);
152
134
  }
153
135
 
154
- &[disabled],
155
- &.disabled {
156
- background-color: transparent;
157
- border-color: theming.daff-color($neutral, 70);
158
- color: theming.daff-color($neutral);
159
-
160
- &:hover {
161
- color: theming.daff-color($neutral);
162
-
163
- &::after {
164
- background-color: transparent;
165
- opacity: 0;
166
- }
167
- }
168
- }
169
-
170
136
  &.daff-warn {
171
137
  @include daff-stroked-button-theme-variant(
172
- theming.daff-color($warn, 40)
138
+ daff-color($warn, 40)
173
139
  );
174
140
  }
175
141
 
176
142
  &.daff-critical {
177
143
  @include daff-stroked-button-theme-variant(
178
- theming.daff-color($critical, 40)
144
+ daff-color($critical, 40)
179
145
  );
180
146
  }
181
147
 
182
148
  &.daff-success {
183
149
  @include daff-stroked-button-theme-variant(
184
- theming.daff-color($success, 40)
150
+ daff-color($success, 40)
185
151
  );
186
152
  }
187
153
  }