@daffodil/design 0.81.1 → 0.83.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 (258) hide show
  1. package/accordion/README.md +44 -29
  2. package/accordion/accordion/accordion/accordion.component.d.ts +3 -0
  3. package/accordion/accordion/accordion-item/accordion-item.component.d.ts +23 -12
  4. package/accordion/accordion/accordion-item-title/accordion-item-title.directive.d.ts +3 -0
  5. package/accordion/accordion.d.ts +5 -0
  6. package/accordion/examples/disabled-accordion/disabled-accordion.component.d.ts +5 -0
  7. package/accordion/examples/initially-expanded-accordion/initially-expanded-accordion.component.d.ts +5 -0
  8. package/accordion/examples/public_api.d.ts +2 -0
  9. package/accordion/src/accordion-theme.scss +28 -6
  10. package/article/README.md +4 -3
  11. package/article/article.d.ts +3 -0
  12. package/article/src/article-theme.scss +128 -51
  13. package/breadcrumb/README.md +38 -28
  14. package/breadcrumb/breadcrumb/breadcrumb.component.d.ts +15 -2
  15. package/breadcrumb/breadcrumb-item/breadcrumb-item.directive.d.ts +18 -4
  16. package/breadcrumb/breadcrumb.d.ts +3 -0
  17. package/breadcrumb/examples/iterated-breadcrumb/iterated-breadcrumb.component.d.ts +6 -0
  18. package/breadcrumb/public_api.d.ts +2 -2
  19. package/button/README.md +43 -23
  20. package/button/button/basic/button.component.d.ts +5 -1
  21. package/button/button/button-base.directive.d.ts +11 -3
  22. package/button/button/button-sizable.directive.d.ts +1 -1
  23. package/button/button/raised/raised.component.d.ts +2 -0
  24. package/button/button/stroked/stroked.component.d.ts +5 -1
  25. package/button/button.d.ts +4 -2
  26. package/button/button.module.d.ts +1 -2
  27. package/button/examples/elevated-button/elevated-button.component.d.ts +6 -0
  28. package/button/examples/examples.d.ts +2 -1
  29. package/button/examples/public_api.d.ts +1 -0
  30. package/button/public_api.d.ts +0 -1
  31. package/button/src/button/basic/button-theme.scss +185 -80
  32. package/button/src/button/button-base.scss +41 -16
  33. package/button/src/button/flat/flat-theme.scss +144 -85
  34. package/button/src/button/icon/icon-theme.scss +183 -79
  35. package/button/src/button/raised/raised-theme.scss +2 -7
  36. package/button/src/button/stroked/stroked-theme.scss +128 -94
  37. package/button/src/button/underline/underline-theme.scss +112 -44
  38. package/callout/README.md +4 -3
  39. package/callout/callout.d.ts +3 -0
  40. package/card/README.md +6 -3
  41. package/card/card/basic/basic.component.d.ts +7 -0
  42. package/card/card/raised/raised.component.d.ts +7 -0
  43. package/card/card/stroked/stroked.component.d.ts +7 -0
  44. package/card/card-base.directive.d.ts +25 -0
  45. package/card/card.d.ts +18 -1
  46. package/card/card.module.d.ts +10 -8
  47. package/card/examples/card-theming/card-theming.component.d.ts +2 -1
  48. package/card/examples/public_api.d.ts +1 -1
  49. package/card/public_api.d.ts +6 -1
  50. package/card/src/card/raised/raised-theme.scss +30 -0
  51. package/card/src/card/stroked/stroked-theme.scss +135 -0
  52. package/card/src/card-base-theme.scss +197 -0
  53. package/card/src/card-base.scss +134 -0
  54. package/container/README.md +5 -3
  55. package/container/container.d.ts +3 -0
  56. package/core/colorable/colorable.d.ts +20 -14
  57. package/core/colorable/colorable.directive.d.ts +9 -6
  58. package/fesm2022/daffodil-design-accordion-examples.mjs +28 -4
  59. package/fesm2022/daffodil-design-accordion-examples.mjs.map +1 -1
  60. package/fesm2022/daffodil-design-accordion.mjs +56 -29
  61. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  62. package/fesm2022/daffodil-design-article-examples.mjs +30 -30
  63. package/fesm2022/daffodil-design-article.mjs +14 -11
  64. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  65. package/fesm2022/daffodil-design-breadcrumb-examples.mjs +24 -4
  66. package/fesm2022/daffodil-design-breadcrumb-examples.mjs.map +1 -1
  67. package/fesm2022/daffodil-design-breadcrumb.mjs +78 -40
  68. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  69. package/fesm2022/daffodil-design-button-examples.mjs +55 -33
  70. package/fesm2022/daffodil-design-button-examples.mjs.map +1 -1
  71. package/fesm2022/daffodil-design-button.mjs +79 -69
  72. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  73. package/fesm2022/daffodil-design-callout-examples.mjs +12 -12
  74. package/fesm2022/daffodil-design-callout-examples.mjs.map +1 -1
  75. package/fesm2022/daffodil-design-callout.mjs +25 -22
  76. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  77. package/fesm2022/daffodil-design-card-examples.mjs +35 -31
  78. package/fesm2022/daffodil-design-card-examples.mjs.map +1 -1
  79. package/fesm2022/daffodil-design-card.mjs +140 -86
  80. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  81. package/fesm2022/daffodil-design-checkbox-examples.mjs +6 -6
  82. package/fesm2022/daffodil-design-checkbox-examples.mjs.map +1 -1
  83. package/fesm2022/daffodil-design-container-examples.mjs +3 -3
  84. package/fesm2022/daffodil-design-container.mjs +10 -7
  85. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  86. package/fesm2022/daffodil-design-hero-examples.mjs +12 -12
  87. package/fesm2022/daffodil-design-hero-examples.mjs.map +1 -1
  88. package/fesm2022/daffodil-design-hero.mjs +25 -22
  89. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  90. package/fesm2022/daffodil-design-image-examples.mjs +9 -9
  91. package/fesm2022/daffodil-design-image.mjs +36 -19
  92. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  93. package/fesm2022/daffodil-design-input-examples.mjs +12 -12
  94. package/fesm2022/daffodil-design-link-set.mjs +19 -16
  95. package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
  96. package/fesm2022/daffodil-design-list-examples.mjs +12 -12
  97. package/fesm2022/daffodil-design-list.mjs +13 -10
  98. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  99. package/fesm2022/daffodil-design-loading-icon-examples.mjs +4 -4
  100. package/fesm2022/daffodil-design-loading-icon-examples.mjs.map +1 -1
  101. package/fesm2022/daffodil-design-loading-icon.mjs +11 -8
  102. package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
  103. package/fesm2022/daffodil-design-media-gallery-examples.mjs +62 -13
  104. package/fesm2022/daffodil-design-media-gallery-examples.mjs.map +1 -1
  105. package/fesm2022/daffodil-design-media-gallery.mjs +204 -250
  106. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  107. package/fesm2022/daffodil-design-menu-examples.mjs +6 -6
  108. package/fesm2022/daffodil-design-menu-examples.mjs.map +1 -1
  109. package/fesm2022/daffodil-design-menu.mjs +16 -16
  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 +28 -25
  113. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  114. package/fesm2022/daffodil-design-navbar-examples.mjs +12 -12
  115. package/fesm2022/daffodil-design-navbar-examples.mjs.map +1 -1
  116. package/fesm2022/daffodil-design-navbar.mjs +10 -7
  117. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  118. package/fesm2022/daffodil-design-notification-examples.mjs +17 -16
  119. package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
  120. package/fesm2022/daffodil-design-notification.mjs +23 -20
  121. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  122. package/fesm2022/daffodil-design-paginator-examples.mjs +6 -6
  123. package/fesm2022/daffodil-design-paginator.mjs +13 -7
  124. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  125. package/fesm2022/daffodil-design-progress-bar-examples.mjs +10 -10
  126. package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +1 -1
  127. package/fesm2022/daffodil-design-progress-bar.mjs +13 -13
  128. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  129. package/fesm2022/daffodil-design-quantity-field-examples.mjs +12 -12
  130. package/fesm2022/daffodil-design-radio-examples.mjs +3 -3
  131. package/fesm2022/daffodil-design-sidebar-examples.mjs +14 -14
  132. package/fesm2022/daffodil-design-sidebar-examples.mjs.map +1 -1
  133. package/fesm2022/daffodil-design-sidebar.mjs +150 -61
  134. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  135. package/fesm2022/daffodil-design-switch-examples.mjs +15 -15
  136. package/fesm2022/daffodil-design-switch-examples.mjs.map +1 -1
  137. package/fesm2022/daffodil-design-switch.mjs +38 -10
  138. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  139. package/fesm2022/daffodil-design-tabs-examples.mjs +23 -17
  140. package/fesm2022/daffodil-design-tabs-examples.mjs.map +1 -1
  141. package/fesm2022/daffodil-design-tabs.mjs +67 -35
  142. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  143. package/fesm2022/daffodil-design-text-snippet-examples.mjs +3 -3
  144. package/fesm2022/daffodil-design-text-snippet.mjs +4 -5
  145. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  146. package/fesm2022/daffodil-design-toast-examples.mjs +40 -15
  147. package/fesm2022/daffodil-design-toast-examples.mjs.map +1 -1
  148. package/fesm2022/daffodil-design-toast.mjs +296 -239
  149. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  150. package/fesm2022/daffodil-design-tree-examples.mjs +6 -6
  151. package/fesm2022/daffodil-design-tree.mjs +15 -12
  152. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  153. package/fesm2022/daffodil-design-youtube-player.mjs +104 -0
  154. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -0
  155. package/fesm2022/daffodil-design.mjs +167 -155
  156. package/fesm2022/daffodil-design.mjs.map +1 -1
  157. package/hero/README.md +4 -3
  158. package/hero/hero.d.ts +3 -0
  159. package/image/README.md +4 -3
  160. package/image/image/image.component.d.ts +22 -1
  161. package/image/image.d.ts +3 -0
  162. package/link-set/README.md +4 -3
  163. package/link-set/link-set.d.ts +3 -0
  164. package/list/README.md +4 -3
  165. package/list/list.d.ts +3 -0
  166. package/loading-icon/README.md +10 -7
  167. package/loading-icon/loading-icon.d.ts +3 -0
  168. package/loading-icon/src/loading-icon-theme.scss +66 -38
  169. package/media-gallery/README.md +19 -10
  170. package/media-gallery/examples/iterated-media-gallery/iterated-media-gallery.component.d.ts +13 -0
  171. package/media-gallery/examples/media-gallery-with-video/media-gallery-with-video.component.d.ts +5 -0
  172. package/media-gallery/examples/public_api.d.ts +2 -0
  173. package/media-gallery/helpers/media-gallery-registration.interface.d.ts +1 -1
  174. package/media-gallery/media-gallery/media-gallery.component.d.ts +89 -11
  175. package/media-gallery/media-gallery.d.ts +4 -2
  176. package/media-gallery/media-gallery.module.d.ts +1 -2
  177. package/media-gallery/public_api.d.ts +3 -4
  178. package/media-gallery/src/media-gallery-theme.scss +30 -4
  179. package/media-gallery/thumbnail/thumbnail.directive.d.ts +45 -22
  180. package/menu/README.md +1 -2
  181. package/modal/README.md +3 -2
  182. package/modal/modal.d.ts +3 -0
  183. package/navbar/README.md +3 -2
  184. package/navbar/navbar.d.ts +3 -0
  185. package/notification/README.md +5 -4
  186. package/notification/notification.d.ts +3 -0
  187. package/notification/src/notification-theme.scss +62 -23
  188. package/package.json +1 -1
  189. package/paginator/README.md +3 -2
  190. package/paginator/paginator/paginator.component.d.ts +3 -0
  191. package/paginator/paginator.d.ts +3 -0
  192. package/progress-bar/README.md +5 -6
  193. package/progress-bar/progress-bar.component.d.ts +0 -3
  194. package/progress-bar/progress-bar.d.ts +3 -0
  195. package/progress-bar/src/progress-bar-theme.scss +17 -8
  196. package/scss/theme.scss +36 -17
  197. package/scss/theming/_configure-theme.scss +2 -0
  198. package/scss/theming/_index.scss +1 -0
  199. package/scss/theming/_light-dark.scss +45 -0
  200. package/sidebar/README.md +20 -21
  201. package/sidebar/helper/sidebar-mode.d.ts +9 -15
  202. package/sidebar/public_api.d.ts +10 -11
  203. package/sidebar/sidebar/sidebar.component.d.ts +22 -7
  204. package/sidebar/sidebar-footer/sidebar-footer.component.d.ts +11 -0
  205. package/sidebar/sidebar-header/sidebar-header-title/sidebar-header-title.directive.d.ts +8 -0
  206. package/sidebar/sidebar-header/sidebar-header.component.d.ts +19 -1
  207. package/sidebar/sidebar-viewport/sidebar-viewport.component.d.ts +36 -15
  208. package/sidebar/sidebar-viewport-backdrop/sidebar-viewport-backdrop.component.d.ts +17 -0
  209. package/sidebar/sidebar.d.ts +4 -2
  210. package/sidebar/sidebar.module.d.ts +1 -2
  211. package/switch/README.md +3 -2
  212. package/switch/src/switch-theme.scss +29 -10
  213. package/switch/switch/switch.component.d.ts +31 -6
  214. package/switch/switch.d.ts +3 -0
  215. package/tabs/README.md +33 -3
  216. package/tabs/src/tabs-theme.scss +31 -13
  217. package/tabs/tabs/tab/tab.component.d.ts +1 -1
  218. package/tabs/tabs/tab-label/tab-label.component.d.ts +6 -0
  219. package/tabs/tabs/tab-panel/tab-panel.component.d.ts +8 -0
  220. package/tabs/tabs/tabs.component.d.ts +21 -4
  221. package/tabs/tabs.d.ts +8 -2
  222. package/text-snippet/README.md +19 -1
  223. package/toast/README.md +21 -151
  224. package/toast/examples/dismissible-toast/dismissible-toast.component.d.ts +11 -0
  225. package/toast/examples/public_api.d.ts +2 -1
  226. package/toast/interfaces/toast-action.d.ts +22 -11
  227. package/toast/interfaces/toast-action.type.d.ts +10 -0
  228. package/toast/interfaces/toast.d.ts +11 -5
  229. package/toast/options/daff-toast-options.d.ts +2 -1
  230. package/toast/public_api.d.ts +2 -6
  231. package/toast/service/position.service.d.ts +9 -1
  232. package/toast/service/toast.service.d.ts +63 -0
  233. package/toast/src/toast-theme.scss +80 -33
  234. package/toast/toast/toast-config.d.ts +24 -1
  235. package/toast/toast/toast-provider.d.ts +16 -0
  236. package/toast/toast/toast.component.d.ts +20 -1
  237. package/toast/toast-actions/toast-actions.directive.d.ts +3 -0
  238. package/toast/toast-message/toast-message.directive.d.ts +3 -0
  239. package/toast/toast-title/toast-title.directive.d.ts +3 -0
  240. package/tree/README.md +6 -10
  241. package/tree/src/tree-theme.scss +39 -13
  242. package/tree/tree.d.ts +3 -0
  243. package/youtube-player/index.d.ts +1 -0
  244. package/youtube-player/public_api.d.ts +3 -0
  245. package/youtube-player/safe-url.pipe.d.ts +10 -0
  246. package/youtube-player/youtube-player.component.d.ts +23 -0
  247. package/youtube-player/youtube-player.d.ts +6 -0
  248. package/card/card/card.component.d.ts +0 -48
  249. package/card/src/card-theme-variants/basic-card.scss +0 -6
  250. package/card/src/card-theme-variants/linkable-card.scss +0 -16
  251. package/card/src/card-theme-variants/stroked-card.scss +0 -3
  252. package/card/src/card-theme.scss +0 -170
  253. package/media-gallery/media-renderer/media-renderer.component.d.ts +0 -29
  254. package/media-gallery/registry/media-gallery.registry.d.ts +0 -34
  255. package/media-gallery/thumbnail/thumbnail-compat.token.d.ts +0 -1
  256. package/media-gallery/thumbnail/thumbnail-registration.interface.d.ts +0 -9
  257. package/scss/theming/prebuilt/internal-theme.scss +0 -13
  258. package/toast/toast.module.d.ts +0 -19
@@ -0,0 +1,30 @@
1
+ @use 'sass:map';
2
+ @use '../../../../scss/core';
3
+ @use '../../../../scss/theming';
4
+
5
+ @mixin daff-raised-card-theme($theme) {
6
+ $primary: core.daff-map-get($theme, primary);
7
+ $secondary: core.daff-map-get($theme, secondary);
8
+ $tertiary: core.daff-map-get($theme, tertiary);
9
+ $base: core.daff-map-get($theme, 'core', 'base');
10
+ $base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
11
+ $white: core.daff-map-get($theme, 'core', 'white');
12
+ $black: core.daff-map-get($theme, 'core', 'black');
13
+ $neutral: core.daff-map-get($theme, 'core', 'neutral');
14
+
15
+ .daff-raised-card {
16
+ box-shadow: 0 6px 12px -4px rgba($black, 0.12),
17
+ 0 4px 8px -2px rgba($black, 0.06);
18
+ }
19
+
20
+ a {
21
+ &.daff-raised-card {
22
+ .daff-card__wrapper {
23
+ &::after {
24
+ box-shadow: 0 16px 32px -4px rgba($black, 0.12),
25
+ 0 8px 12px -2px rgba($black, 0.06);
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,135 @@
1
+ @use 'sass:map';
2
+ @use '../../../../scss/core';
3
+ @use '../../../../scss/theming';
4
+
5
+ @mixin stroked-card-theme-variant($color) {
6
+ border: 1px solid $color;
7
+ color: $color;
8
+ }
9
+
10
+ @mixin linkable-stroked-card-theme-variant($hover-color, $opacity: 0.08) {
11
+ .daff-card__wrapper {
12
+ &::after {
13
+ background: rgba($hover-color, $opacity);
14
+ }
15
+ }
16
+
17
+ &:hover,
18
+ &:focus {
19
+ .daff-card__wrapper {
20
+ &::after {
21
+ opacity: 1;
22
+ }
23
+ }
24
+ }
25
+ }
26
+
27
+ @mixin daff-stroked-card-theme($theme) {
28
+ $primary: core.daff-map-get($theme, primary);
29
+ $secondary: core.daff-map-get($theme, secondary);
30
+ $tertiary: core.daff-map-get($theme, tertiary);
31
+ $base: core.daff-map-get($theme, 'core', 'base');
32
+ $base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
33
+ $white: core.daff-map-get($theme, 'core', 'white');
34
+ $black: core.daff-map-get($theme, 'core', 'black');
35
+ $neutral: core.daff-map-get($theme, 'core', 'neutral');
36
+ $type: core.daff-map-get($theme, 'core', 'type');
37
+
38
+ .daff-stroked-card {
39
+ &.daff-primary {
40
+ @include stroked-card-theme-variant(theming.daff-color($primary));
41
+ }
42
+
43
+ &.daff-secondary {
44
+ @include stroked-card-theme-variant(theming.daff-color($secondary));
45
+ }
46
+
47
+ &.daff-tertiary {
48
+ @include stroked-card-theme-variant(theming.daff-color($tertiary));
49
+ }
50
+
51
+ &.daff-dark {
52
+ @include stroked-card-theme-variant(theming.daff-color($neutral, 90));
53
+ }
54
+
55
+ &.daff-light {
56
+ @include stroked-card-theme-variant(theming.daff-color($neutral, 20));
57
+ }
58
+
59
+ @include theming.light($type) {
60
+ @include stroked-card-theme-variant(theming.daff-color($neutral, 20));
61
+ color: $base-contrast;
62
+
63
+ &.daff-theme {
64
+ @include stroked-card-theme-variant(theming.daff-color($neutral, 20));
65
+ color: $base-contrast;
66
+ }
67
+
68
+ &.daff-theme-contrast {
69
+ @include stroked-card-theme-variant(theming.daff-color($neutral, 90));
70
+ }
71
+ }
72
+
73
+ @include theming.dark($type) {
74
+ @include stroked-card-theme-variant(theming.daff-color($neutral, 90));
75
+ color: $base-contrast;
76
+
77
+ &.daff-theme {
78
+ @include stroked-card-theme-variant(theming.daff-color($neutral, 90));
79
+ color: $base-contrast;
80
+ }
81
+
82
+ &.daff-theme-contrast {
83
+ @include stroked-card-theme-variant(theming.daff-color($neutral, 20));
84
+ }
85
+ }
86
+ }
87
+
88
+ a {
89
+ &.daff-stroked-card {
90
+ @include theming.light($type) {
91
+ @include linkable-stroked-card-theme-variant(
92
+ theming.daff-color($neutral, 20),
93
+ 0.2
94
+ );
95
+ }
96
+
97
+ @include theming.dark($type) {
98
+ @include linkable-stroked-card-theme-variant(
99
+ theming.daff-color($neutral, 90),
100
+ 0.2
101
+ );
102
+ }
103
+
104
+ &.daff-primary {
105
+ @include linkable-stroked-card-theme-variant(
106
+ theming.daff-color($primary)
107
+ );
108
+ }
109
+
110
+ &.daff-secondary {
111
+ @include linkable-stroked-card-theme-variant(
112
+ theming.daff-color($secondary)
113
+ );
114
+ }
115
+
116
+ &.daff-tertiary {
117
+ @include linkable-stroked-card-theme-variant(
118
+ theming.daff-color($tertiary)
119
+ );
120
+ }
121
+
122
+ &.daff-dark {
123
+ @include linkable-stroked-card-theme-variant(
124
+ theming.daff-color($neutral, 90)
125
+ );
126
+ }
127
+
128
+ &.daff-light {
129
+ @include linkable-stroked-card-theme-variant(
130
+ theming.daff-color($neutral, 20)
131
+ );
132
+ }
133
+ }
134
+ }
135
+ }
@@ -0,0 +1,197 @@
1
+ @use 'sass:map';
2
+ @use '../../scss/core';
3
+ @use '../../scss/theming';
4
+
5
+ @mixin daff-basic-card-theme-variant($color) {
6
+ background: $color;
7
+ color: theming.daff-text-contrast($color);
8
+ }
9
+
10
+ @mixin daff-linkable-card-theme-variant($hover-color) {
11
+ .daff-card__wrapper {
12
+ &::after {
13
+ background: $hover-color;
14
+ }
15
+ }
16
+
17
+ &:hover,
18
+ &:focus {
19
+ color: theming.daff-text-contrast($hover-color);
20
+
21
+ .daff-card__wrapper {
22
+ &::after {
23
+ opacity: 1;
24
+ }
25
+ }
26
+ }
27
+ }
28
+
29
+ @mixin daff-card-base-theme($theme) {
30
+ $primary: core.daff-map-get($theme, primary);
31
+ $secondary: core.daff-map-get($theme, secondary);
32
+ $tertiary: core.daff-map-get($theme, tertiary);
33
+ $base: core.daff-map-get($theme, 'core', 'base');
34
+ $base-contrast: core.daff-map-get($theme, 'core', 'base-contrast');
35
+ $white: core.daff-map-get($theme, 'core', 'white');
36
+ $black: core.daff-map-get($theme, 'core', 'black');
37
+ $neutral: core.daff-map-get($theme, 'core', 'neutral');
38
+ $type: core.daff-map-get($theme, 'core', 'type');
39
+
40
+ .daff-card,
41
+ .daff-raised-card {
42
+ @include theming.light($type) {
43
+ @include daff-basic-card-theme-variant(theming.daff-color($neutral, 10));
44
+
45
+ &.daff-primary {
46
+ @include daff-basic-card-theme-variant(theming.daff-color($primary));
47
+ }
48
+
49
+ &.daff-secondary {
50
+ @include daff-basic-card-theme-variant(theming.daff-color($secondary));
51
+ }
52
+
53
+ &.daff-tertiary {
54
+ @include daff-basic-card-theme-variant(theming.daff-color($tertiary));
55
+ }
56
+ }
57
+
58
+ @include theming.dark($type) {
59
+ @include daff-basic-card-theme-variant(theming.daff-color($neutral, 90));
60
+
61
+ &.daff-primary {
62
+ @include daff-basic-card-theme-variant(
63
+ theming.daff-color($primary, 60)
64
+ );
65
+ }
66
+
67
+ &.daff-secondary {
68
+ @include daff-basic-card-theme-variant(
69
+ theming.daff-color($secondary, 60)
70
+ );
71
+ }
72
+
73
+ &.daff-tertiary {
74
+ @include daff-basic-card-theme-variant(
75
+ theming.daff-color($tertiary, 60)
76
+ );
77
+ }
78
+ }
79
+
80
+ &.daff-theme {
81
+ @include daff-basic-card-theme-variant($base);
82
+ }
83
+
84
+ &.daff-theme-contrast {
85
+ @include daff-basic-card-theme-variant($base-contrast);
86
+ }
87
+
88
+ &.daff-dark {
89
+ @include daff-basic-card-theme-variant(theming.daff-color($neutral, 90));
90
+ }
91
+
92
+ &.daff-light {
93
+ @include daff-basic-card-theme-variant(theming.daff-color($neutral, 10));
94
+ }
95
+ }
96
+
97
+ a {
98
+ &.daff-card,
99
+ &.daff-raised-card {
100
+ @include theming.light($type) {
101
+ @include daff-linkable-card-theme-variant(
102
+ theming.daff-color($neutral, 20)
103
+ );
104
+
105
+ &.daff-primary {
106
+ @include daff-linkable-card-theme-variant(
107
+ theming.daff-color($primary, 70)
108
+ );
109
+ }
110
+
111
+ &.daff-secondary {
112
+ @include daff-linkable-card-theme-variant(
113
+ theming.daff-color($secondary, 70)
114
+ );
115
+ }
116
+
117
+ &.daff-tertiary {
118
+ @include daff-linkable-card-theme-variant(
119
+ theming.daff-color($tertiary, 70)
120
+ );
121
+ }
122
+
123
+ &.daff-theme {
124
+ @include daff-linkable-card-theme-variant(
125
+ theming.daff-color($neutral, 10)
126
+ );
127
+ }
128
+
129
+ &.daff-theme-contrast {
130
+ @include daff-linkable-card-theme-variant(
131
+ theming.daff-color($neutral, 100)
132
+ );
133
+ }
134
+
135
+ &.daff-dark {
136
+ @include daff-linkable-card-theme-variant(
137
+ theming.daff-color($neutral, 90)
138
+ );
139
+ }
140
+
141
+ &.daff-light {
142
+ @include daff-linkable-card-theme-variant(
143
+ theming.daff-color($neutral, 10)
144
+ );
145
+ }
146
+ }
147
+
148
+ @include theming.dark($type) {
149
+ @include daff-linkable-card-theme-variant(
150
+ theming.daff-color($neutral, 80)
151
+ );
152
+
153
+ &.daff-primary {
154
+ @include daff-linkable-card-theme-variant(
155
+ theming.daff-color($primary, 70)
156
+ );
157
+ }
158
+
159
+ &.daff-secondary {
160
+ @include daff-linkable-card-theme-variant(
161
+ theming.daff-color($secondary, 70)
162
+ );
163
+ }
164
+
165
+ &.daff-tertiary {
166
+ @include daff-linkable-card-theme-variant(
167
+ theming.daff-color($tertiary, 70)
168
+ );
169
+ }
170
+
171
+ &.daff-theme {
172
+ @include daff-linkable-card-theme-variant(
173
+ theming.daff-color($neutral, 90)
174
+ );
175
+ }
176
+
177
+ &.daff-theme-contrast {
178
+ @include daff-linkable-card-theme-variant(
179
+ theming.daff-color($neutral, 10)
180
+ );
181
+ }
182
+
183
+ &.daff-dark {
184
+ @include daff-linkable-card-theme-variant(
185
+ theming.daff-color($neutral, 100)
186
+ );
187
+ }
188
+
189
+ &.daff-light {
190
+ @include daff-linkable-card-theme-variant(
191
+ theming.daff-color($neutral, 10)
192
+ );
193
+ }
194
+ }
195
+ }
196
+ }
197
+ }
@@ -0,0 +1,134 @@
1
+ @use '../../scss/typography' as t;
2
+ @use '../../scss/layout';
3
+
4
+ $card-border-radius: 8px;
5
+ $card-inner-border-radius: calc(#{$card-border-radius} - 1px);
6
+
7
+ @mixin daff-card-base {
8
+ display: flex;
9
+ border-radius: $card-border-radius;
10
+ position: relative;
11
+
12
+ .daff-card__image {
13
+ display: inline-block;
14
+ width: 100%;
15
+ }
16
+
17
+ .daff-card__wrapper {
18
+ position: relative;
19
+ height: 100%;
20
+
21
+ &::after {
22
+ content: '';
23
+ position: absolute;
24
+ left: 0;
25
+ top: 0;
26
+ height: 100%;
27
+ border-radius: $card-border-radius;
28
+ opacity: 0;
29
+ width: 100%;
30
+ transition: opacity 300ms;
31
+ z-index: 1;
32
+ }
33
+ }
34
+
35
+ &.vertical {
36
+ flex-direction: column;
37
+
38
+ .daff-card__image {
39
+ border-radius: $card-inner-border-radius $card-inner-border-radius 0 0;
40
+
41
+ img {
42
+ border-radius: $card-inner-border-radius $card-inner-border-radius 0 0;
43
+ }
44
+ }
45
+ }
46
+
47
+ &.horizontal {
48
+ flex-wrap: wrap;
49
+
50
+ @include layout.breakpoint(mobile) {
51
+ flex-direction: row;
52
+ flex-wrap: nowrap;
53
+ }
54
+
55
+ .daff-card__image {
56
+ border-radius: $card-inner-border-radius 0 0 $card-inner-border-radius;
57
+
58
+ img {
59
+ border-radius: $card-inner-border-radius 0 0 $card-inner-border-radius;
60
+ object-fit: cover;
61
+ object-position: center center;
62
+ height: 100% !important; /* stylelint-disable-line declaration-no-important */
63
+ width: 100%;
64
+ }
65
+ }
66
+ }
67
+
68
+ .daff-card__body {
69
+ padding: 1.5rem;
70
+ position: relative;
71
+ z-index: 2;
72
+ }
73
+
74
+ .daff-card__icon {
75
+ display: block;
76
+ margin: 0 0 0.5rem;
77
+ }
78
+
79
+ .daff-card__tagline {
80
+ @include t.subheading;
81
+ padding: 0;
82
+ margin: 0 0 0.25rem;
83
+ }
84
+
85
+ .daff-card__title {
86
+ font-size: 1.25rem;
87
+ font-weight: 600;
88
+ line-height: 1.5rem;
89
+
90
+ + .daff-card__content {
91
+ margin: 1rem 0 0;
92
+ }
93
+ }
94
+
95
+ .daff-card__content {
96
+ p {
97
+ &:first-of-type {
98
+ margin-top: 0;
99
+ }
100
+
101
+ &:last-of-type {
102
+ margin-bottom: 0;
103
+ }
104
+ }
105
+ }
106
+
107
+ .daff-card__actions {
108
+ padding: 0 1.5rem 1.5rem;
109
+ position: relative;
110
+ z-index: 2;
111
+ }
112
+ }
113
+
114
+ @mixin daff-linked-card-base {
115
+ text-decoration: none;
116
+
117
+ .daff-card__image {
118
+ + .daff-card__wrapper {
119
+ &::after {
120
+ border-radius: 0 0 $card-border-radius $card-border-radius;
121
+ }
122
+ }
123
+ }
124
+
125
+ &.horizontal {
126
+ .daff-card__image {
127
+ + .daff-card__wrapper {
128
+ &::after {
129
+ border-radius: 0 $card-border-radius $card-border-radius 0;
130
+ }
131
+ }
132
+ }
133
+ }
134
+ }
@@ -23,13 +23,15 @@ Supported sizes: `xs | sm | md | lg | xl`
23
23
  ## Usage
24
24
 
25
25
  ### Within a standalone component
26
- To use container in a standalone component, import it directly into your custom component:
26
+ To use container in a standalone component, import `DAFF_CONTAINER_COMPONENTS` directly into your custom component:
27
27
 
28
28
  ```ts
29
+
30
+ import { DAFF_CONTAINER_COMPONENTS } from '@daffodil/design/container';
31
+
29
32
  @Component({
30
33
  selector: 'custom-component',
31
34
  templateUrl: './custom-component.component.html',
32
- standalone: true,
33
35
  imports: [
34
36
  DAFF_CONTAINER_COMPONENTS,
35
37
  ],
@@ -42,8 +44,8 @@ To use container in a module, import `DaffCalloutModule` into your custom module
42
44
 
43
45
  ```ts
44
46
  import { NgModule } from '@angular/core';
45
-
46
47
  import { DaffCalloutModule } from '@daffodil/design/container';
48
+ import { CustomComponent } from './custom.component';
47
49
 
48
50
  @NgModule({
49
51
  declarations: [
@@ -1,2 +1,5 @@
1
1
  import { DaffContainerComponent } from './container/container.component';
2
+ /**
3
+ * @docs-private
4
+ */
2
5
  export declare const DAFF_CONTAINER_COMPONENTS: readonly [typeof DaffContainerComponent];
@@ -1,17 +1,13 @@
1
- /**
2
- * In order to be colorable, our class must implement this property
3
- */
4
1
  export interface DaffColorable {
5
2
  color: DaffPalette;
6
3
  }
7
4
  /**
8
- * These are the valid options that can be passed to a DaffColorable component
5
+ * These are the valid options that can be passed to a DaffColorable component.
9
6
  */
10
- export type DaffPalette = 'primary' | 'secondary' | 'tertiary' | 'black' | 'white' | 'theme' | 'theme-contrast' | undefined;
7
+ export type DaffPalette = 'primary' | 'secondary' | 'tertiary' | 'light' | 'dark' | 'theme' | 'theme-contrast' | 'black' | 'white' | undefined;
11
8
  /**
12
9
  * Enumerates the available color palette options for a component.
13
- * These values can be used to apply specific color styles to components within the
14
- * application.
10
+ * These values can be used to apply specific color styles to components within the application.
15
11
  */
16
12
  export declare enum DaffPaletteEnum {
17
13
  /**
@@ -27,19 +23,29 @@ export declare enum DaffPaletteEnum {
27
23
  */
28
24
  Tertiary = "tertiary",
29
25
  /**
30
- * Black. It's dark.
26
+ * A light color that does not change based on the defined theme.
31
27
  */
32
- Black = "black",
28
+ Light = "light",
33
29
  /**
34
- * White. It's bright.
30
+ * A dark color that does not change based on the defined theme.
35
31
  */
36
- White = "white",
32
+ Dark = "dark",
37
33
  /**
38
- * The default color for your theme.
34
+ * A color that matches the defined theme.
39
35
  */
40
36
  Theme = "theme",
41
37
  /**
42
- * A color that constrats against your defined theme.
38
+ * A color that contrasts against the defined theme.
39
+ */
40
+ ThemeContrast = "theme-contrast",
41
+ /**
42
+ * @deprecated Deprecated in version 0.82.0. Will be removed in version 0.85.0.
43
+ * Black. It's dark.
44
+ */
45
+ Black = "black",
46
+ /**
47
+ * @deprecated Deprecated in version 0.82.0. Will be removed in version 0.85.0.
48
+ * White. It's bright.
43
49
  */
44
- ThemeContrast = "theme-contrast"
50
+ White = "white"
45
51
  }
@@ -6,18 +6,20 @@ import * as i0 from "@angular/core";
6
6
  * styles by setting CSS classes based on the specified color. This directive is useful
7
7
  * for applying different color palettes to a component in an Angular application.
8
8
  *
9
- * Supported colors: `primary | secondary | tertiary | black | white | theme | theme-contrast`
9
+ * Supported colors: `primary | secondary | tertiary | light | dark | theme | theme-contrast`
10
10
  *
11
11
  * | Color | Class |
12
12
  * | -------- | ----- |
13
13
  * | `primary` | `.daff-primary`|
14
14
  * | `secondary` | `.daff-secondary`|
15
15
  * | `tertiary` | `.daff-tertiary`|
16
- * | `black` | `.daff-black`|
17
- * | `white` | `.daff-white`|
16
+ * | `light` | `daff-light` |
17
+ * | `dark` | `daff-dark` |
18
18
  * | `theme` | `daff-theme`|
19
19
  * | `theme-contrast` | `.daff-theme-contrast`|
20
20
  *
21
+ * `white` and `black` have been deprecated in favor of `light` and `dark`.
22
+ *
21
23
  * @example Implementing it as an attribute directive
22
24
  *
23
25
  * ```html
@@ -39,7 +41,6 @@ import * as i0 from "@angular/core";
39
41
  *
40
42
  * ```ts
41
43
  * @Component({
42
- * standalone: true,
43
44
  * selector: 'custom-component',
44
45
  * template: 'custom-component.html',
45
46
  * hostDirectives: [
@@ -72,10 +73,12 @@ export declare class DaffColorableDirective implements DaffColorable, OnChanges,
72
73
  'daff-primary': boolean;
73
74
  'daff-secondary': boolean;
74
75
  'daff-tertiary': boolean;
75
- 'daff-black': boolean;
76
- 'daff-white': boolean;
76
+ 'daff-light': boolean;
77
+ 'daff-dark': boolean;
77
78
  'daff-theme': boolean;
78
79
  'daff-theme-contrast': boolean;
80
+ 'daff-black': boolean;
81
+ 'daff-white': boolean;
79
82
  };
80
83
  /**
81
84
  * Sets the color on a component.