@ulu/frontend 0.1.0-beta.6 → 0.1.0-beta.61

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 (290) hide show
  1. package/CHANGELOG.md +428 -0
  2. package/dist/ulu-frontend.min.css +1 -1
  3. package/dist/ulu-frontend.min.js +28 -27
  4. package/docs-dev/assets/main.js +832 -421
  5. package/docs-dev/assets/placeholder/icon-calendar.svg +1 -0
  6. package/docs-dev/assets/placeholder/icon-check.svg +1 -0
  7. package/docs-dev/assets/style.css +629 -233
  8. package/docs-dev/changelog/index.html +6236 -0
  9. package/docs-dev/changelog/updates-and-changes/index.html +5109 -0
  10. package/docs-dev/demos/accordion/index.html +904 -321
  11. package/docs-dev/demos/basic-hero/index.html +111 -0
  12. package/docs-dev/demos/breakpoints-manager/index.html +5246 -0
  13. package/docs-dev/demos/button/index.html +916 -323
  14. package/docs-dev/demos/button-verbose/index.html +5238 -0
  15. package/docs-dev/demos/callout/index.html +951 -328
  16. package/docs-dev/demos/captioned-figure/index.html +904 -321
  17. package/docs-dev/demos/card/index.html +970 -748
  18. package/docs-dev/demos/card-grid/index.html +5357 -0
  19. package/docs-dev/demos/card-new/index.html +5088 -0
  20. package/docs-dev/demos/card-old/index.html +5223 -0
  21. package/docs-dev/demos/card.1/index.html +5223 -0
  22. package/docs-dev/demos/card.TRASH/index.html +5541 -0
  23. package/docs-dev/demos/counter-list/index.html +5224 -0
  24. package/docs-dev/demos/css-icons/index.html +904 -321
  25. package/docs-dev/demos/data-grid/index.html +1014 -511
  26. package/docs-dev/demos/data-table/index.html +1064 -348
  27. package/docs-dev/demos/details-group/index.html +5267 -0
  28. package/docs-dev/demos/file-save/index.html +904 -321
  29. package/docs-dev/demos/flipcard/index.html +904 -321
  30. package/docs-dev/demos/form-theme/index.html +922 -352
  31. package/docs-dev/demos/hero/index.html +12 -4
  32. package/docs-dev/demos/image-grid/index.html +12 -4
  33. package/docs-dev/demos/index.html +905 -322
  34. package/docs-dev/demos/list-inline/index.html +5220 -0
  35. package/docs-dev/demos/list-inline.1/index.html +4727 -0
  36. package/docs-dev/demos/list-lines/index.html +5210 -0
  37. package/docs-dev/demos/menu-stack/index.html +975 -377
  38. package/docs-dev/demos/modals/index.html +1010 -357
  39. package/docs-dev/demos/nav-strip/index.html +904 -321
  40. package/docs-dev/demos/overlay-section/index.html +979 -326
  41. package/docs-dev/demos/popovers/index.html +1152 -327
  42. package/docs-dev/demos/print/index.html +904 -321
  43. package/docs-dev/demos/pull-quote/index.html +904 -321
  44. package/docs-dev/demos/rule/index.html +952 -357
  45. package/docs-dev/demos/scroll-slider/index.html +72 -106
  46. package/docs-dev/demos/scrollpoints/index.html +905 -322
  47. package/docs-dev/demos/slider/index.html +12 -4
  48. package/docs-dev/demos/spoke-spinner/index.html +904 -321
  49. package/docs-dev/demos/sticky-list/index.html +5223 -0
  50. package/docs-dev/demos/tabs/index.html +944 -325
  51. package/docs-dev/demos/tag/index.html +904 -321
  52. package/docs-dev/demos/theme-toggle/index.html +5279 -0
  53. package/docs-dev/demos/tile-grid-overlay/index.html +12 -4
  54. package/docs-dev/demos/tiles/index.html +904 -321
  55. package/docs-dev/demos/tooltip/index.html +904 -321
  56. package/docs-dev/guide/building-stylesheet/index.html +904 -321
  57. package/docs-dev/guide/developing-ulu-scss-module/index.html +904 -321
  58. package/docs-dev/guide/index.html +904 -321
  59. package/docs-dev/guide/updates-and-changes/index.html +5033 -0
  60. package/docs-dev/index.html +904 -321
  61. package/docs-dev/javascript/events/index.html +901 -320
  62. package/docs-dev/javascript/index.html +904 -321
  63. package/docs-dev/javascript/settings/index.html +5400 -0
  64. package/docs-dev/javascript/ui-breakpoints/index.html +916 -335
  65. package/docs-dev/javascript/ui-collapsible/index.html +901 -320
  66. package/docs-dev/javascript/ui-details-group/index.html +5322 -0
  67. package/docs-dev/javascript/ui-dialog/index.html +967 -371
  68. package/docs-dev/javascript/ui-flipcard/index.html +964 -327
  69. package/docs-dev/javascript/ui-grid/index.html +913 -358
  70. package/docs-dev/javascript/ui-modal-builder/index.html +1067 -366
  71. package/docs-dev/javascript/ui-overflow-scroller/index.html +901 -320
  72. package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +901 -320
  73. package/docs-dev/javascript/ui-page/index.html +901 -320
  74. package/docs-dev/javascript/ui-popover/index.html +911 -334
  75. package/docs-dev/javascript/ui-print/index.html +901 -328
  76. package/docs-dev/javascript/ui-print-details/index.html +901 -320
  77. package/docs-dev/javascript/ui-programmatic-modal/index.html +901 -320
  78. package/docs-dev/javascript/ui-proxy-click/index.html +990 -324
  79. package/docs-dev/javascript/ui-resizer/index.html +901 -320
  80. package/docs-dev/javascript/ui-scroll-slider/index.html +941 -328
  81. package/docs-dev/javascript/ui-scrollpoint/index.html +907 -333
  82. package/docs-dev/javascript/ui-slider/index.html +1099 -327
  83. package/docs-dev/javascript/ui-tabs/index.html +914 -370
  84. package/docs-dev/javascript/ui-theme-toggle/index.html +5410 -0
  85. package/docs-dev/javascript/ui-tooltip/index.html +940 -363
  86. package/docs-dev/javascript/utils-class-logger/index.html +901 -320
  87. package/docs-dev/javascript/utils-css/index.html +5224 -0
  88. package/docs-dev/javascript/utils-dom/index.html +1054 -339
  89. package/docs-dev/javascript/utils-file-save/index.html +901 -320
  90. package/docs-dev/javascript/utils-floating-ui/index.html +901 -320
  91. package/docs-dev/javascript/utils-id/index.html +901 -320
  92. package/docs-dev/javascript/utils-pause-youtube-video/index.html +901 -320
  93. package/docs-dev/javascript/utils-system/index.html +5527 -0
  94. package/docs-dev/sass/base/color/index.html +901 -320
  95. package/docs-dev/sass/base/elements/index.html +901 -320
  96. package/docs-dev/sass/base/index/index.html +901 -320
  97. package/docs-dev/sass/base/index.html +904 -321
  98. package/docs-dev/sass/base/keyframes/index.html +901 -320
  99. package/docs-dev/sass/base/layout/index.html +901 -320
  100. package/docs-dev/sass/base/normalize/index.html +901 -320
  101. package/docs-dev/sass/base/print/index.html +901 -320
  102. package/docs-dev/sass/base/root/index.html +901 -320
  103. package/docs-dev/sass/base/typography/index.html +901 -320
  104. package/docs-dev/sass/components/accordion/index.html +908 -327
  105. package/docs-dev/sass/components/adaptive-spacing/index.html +901 -320
  106. package/docs-dev/sass/components/badge/index.html +909 -328
  107. package/docs-dev/sass/components/basic-hero/index.html +5385 -0
  108. package/docs-dev/sass/components/button/index.html +901 -320
  109. package/docs-dev/sass/components/button-verbose/index.html +989 -333
  110. package/docs-dev/sass/components/callout/index.html +1018 -414
  111. package/docs-dev/sass/components/captioned-figure/index.html +1026 -330
  112. package/docs-dev/sass/components/card/index.html +1003 -350
  113. package/docs-dev/sass/components/card-grid/index.html +901 -320
  114. package/docs-dev/sass/components/counter-list/index.html +5458 -0
  115. package/docs-dev/sass/components/css-icon/index.html +918 -330
  116. package/docs-dev/sass/components/data-grid/index.html +922 -334
  117. package/docs-dev/sass/components/data-table/index.html +1106 -333
  118. package/docs-dev/sass/components/fill-context/index.html +901 -320
  119. package/docs-dev/sass/components/flipcard/index.html +939 -327
  120. package/docs-dev/sass/components/flipcard-grid/index.html +901 -320
  121. package/docs-dev/sass/components/form-theme/index.html +1110 -433
  122. package/docs-dev/sass/components/hero/index.html +995 -366
  123. package/docs-dev/sass/components/horizontal-rule/index.html +901 -320
  124. package/docs-dev/sass/components/image-grid/index.html +901 -320
  125. package/docs-dev/sass/components/index/index.html +915 -330
  126. package/docs-dev/sass/components/index.html +904 -321
  127. package/docs-dev/sass/components/links/index.html +901 -320
  128. package/docs-dev/sass/components/list-inline/index.html +5399 -0
  129. package/docs-dev/sass/components/list-lines/index.html +936 -359
  130. package/docs-dev/sass/components/list-ordered/index.html +903 -322
  131. package/docs-dev/sass/components/list-unordered/index.html +901 -320
  132. package/docs-dev/sass/components/menu-stack/index.html +973 -379
  133. package/docs-dev/sass/components/modal/index.html +953 -365
  134. package/docs-dev/sass/components/nav-strip/index.html +909 -328
  135. package/docs-dev/sass/components/overlay-section/index.html +909 -328
  136. package/docs-dev/sass/components/pager/index.html +901 -320
  137. package/docs-dev/sass/components/placeholder-block/index.html +901 -320
  138. package/docs-dev/sass/components/popover/index.html +996 -379
  139. package/docs-dev/sass/components/pull-quote/index.html +913 -332
  140. package/docs-dev/sass/components/ratio-box/index.html +909 -328
  141. package/docs-dev/sass/components/rule/index.html +909 -328
  142. package/docs-dev/sass/components/scroll-slider/index.html +944 -375
  143. package/docs-dev/sass/components/skip-link/index.html +909 -328
  144. package/docs-dev/sass/components/slider/index.html +989 -420
  145. package/docs-dev/sass/components/spoke-spinner/index.html +903 -322
  146. package/docs-dev/sass/components/sticky-list/index.html +5603 -0
  147. package/docs-dev/sass/components/tabs/index.html +910 -329
  148. package/docs-dev/sass/components/tag/index.html +903 -322
  149. package/docs-dev/sass/components/tile-button/index.html +901 -320
  150. package/docs-dev/sass/components/tile-grid/index.html +901 -320
  151. package/docs-dev/sass/components/tile-grid-overlay/index.html +901 -320
  152. package/docs-dev/sass/components/vignette/index.html +915 -328
  153. package/docs-dev/sass/components/wysiwyg/index.html +901 -320
  154. package/docs-dev/sass/core/breakpoint/index.html +947 -352
  155. package/docs-dev/sass/core/button/index.html +901 -320
  156. package/docs-dev/sass/core/color/index.html +1078 -364
  157. package/docs-dev/sass/core/cssvar/index.html +901 -320
  158. package/docs-dev/sass/core/element/index.html +1096 -368
  159. package/docs-dev/sass/core/index.html +901 -320
  160. package/docs-dev/sass/core/layout/index.html +961 -361
  161. package/docs-dev/sass/core/path/index.html +901 -320
  162. package/docs-dev/sass/core/selector/index.html +901 -320
  163. package/docs-dev/sass/core/typography/index.html +901 -320
  164. package/docs-dev/sass/core/units/index.html +911 -324
  165. package/docs-dev/sass/core/utils/index.html +1871 -430
  166. package/docs-dev/sass/helpers/color/index.html +901 -320
  167. package/docs-dev/sass/helpers/display/index.html +902 -321
  168. package/docs-dev/sass/helpers/index/index.html +901 -320
  169. package/docs-dev/sass/helpers/index.html +904 -321
  170. package/docs-dev/sass/helpers/print/index.html +843 -292
  171. package/docs-dev/sass/helpers/typography/index.html +901 -320
  172. package/docs-dev/sass/helpers/units/index.html +901 -320
  173. package/docs-dev/sass/helpers/utilities/index.html +903 -322
  174. package/docs-dev/sass/index.html +904 -321
  175. package/js/index.js +1 -0
  176. package/js/settings.js +95 -0
  177. package/js/ui/breakpoints.js +19 -16
  178. package/js/ui/collapsible.js +8 -1
  179. package/js/ui/details-group.js +112 -0
  180. package/js/ui/dialog.js +90 -42
  181. package/js/ui/dialog.todo +2 -36
  182. package/js/ui/flipcard.js +37 -57
  183. package/js/ui/grid.js +15 -13
  184. package/js/ui/index.js +1 -0
  185. package/js/ui/modal-builder.js +76 -56
  186. package/js/ui/overflow-scroller.js +6 -4
  187. package/js/ui/popover.js +38 -38
  188. package/js/ui/print.js +16 -25
  189. package/js/ui/programmatic-modal.js +9 -3
  190. package/js/ui/proxy-click.js +50 -36
  191. package/js/ui/scroll-slider.js +24 -30
  192. package/js/ui/scrollpoint.js +28 -64
  193. package/js/ui/slider.js +108 -63
  194. package/js/ui/tabs.js +23 -36
  195. package/js/ui/theme-toggle.js +331 -94
  196. package/js/ui/tooltip.js +27 -32
  197. package/js/utils/css.js +13 -0
  198. package/js/utils/dom.js +85 -8
  199. package/js/utils/font-awesome.js +18 -0
  200. package/js/utils/index.js +2 -1
  201. package/js/utils/system.js +154 -0
  202. package/package.json +14 -7
  203. package/scss/_breakpoint.scss +16 -3
  204. package/scss/_color.scss +36 -5
  205. package/scss/_element.scss +94 -2
  206. package/scss/_layout.scss +7 -8
  207. package/scss/_units.scss +3 -2
  208. package/scss/_utils.scss +248 -13
  209. package/scss/components/README.todos +14 -0
  210. package/scss/components/_accordion.scss +5 -7
  211. package/scss/components/_basic-hero.scss +112 -0
  212. package/scss/components/_button-verbose.scss +100 -18
  213. package/scss/components/_callout.scss +125 -78
  214. package/scss/components/_captioned-figure.scss +17 -0
  215. package/scss/components/_card-grid.scss +1 -1
  216. package/scss/components/_card.scss +246 -74
  217. package/scss/components/_counter-list.scss +137 -0
  218. package/scss/components/_css-icon.scss +25 -21
  219. package/scss/components/_data-grid.scss +38 -9
  220. package/scss/components/_data-table.scss +44 -4
  221. package/scss/components/_flipcard.scss +8 -3
  222. package/scss/components/_form-theme.scss +119 -108
  223. package/scss/components/_hero.scss +12 -10
  224. package/scss/components/_index.scss +24 -0
  225. package/scss/components/_list-inline.scss +80 -0
  226. package/scss/components/_list-lines.scss +44 -32
  227. package/scss/components/_menu-stack.scss +42 -26
  228. package/scss/components/_modal.scss +13 -6
  229. package/scss/components/_nav-strip.scss +2 -0
  230. package/scss/components/_overlay-section.scss +2 -5
  231. package/scss/components/_popover.scss +165 -64
  232. package/scss/components/_pull-quote.scss +13 -13
  233. package/scss/components/_ratio-box.scss +2 -5
  234. package/scss/components/_rule.scss +1 -0
  235. package/scss/components/_scroll-slider.scss +1 -5
  236. package/scss/components/_slider.scss +49 -72
  237. package/scss/components/_spoke-spinner.scss +2 -2
  238. package/scss/components/_sticky-list.scss +206 -0
  239. package/scss/components/_tabs.scss +3 -1
  240. package/scss/components/_vignette.scss +3 -5
  241. package/scss/helpers/_display.scss +15 -18
  242. package/scss/helpers/_print.scss +12 -7
  243. package/scss/helpers/_utilities.scss +42 -32
  244. package/types/index.d.ts +1 -0
  245. package/types/settings.d.ts +66 -0
  246. package/types/settings.d.ts.map +1 -0
  247. package/types/ui/breakpoints.d.ts +14 -14
  248. package/types/ui/breakpoints.d.ts.map +1 -1
  249. package/types/ui/collapsible.d.ts.map +1 -1
  250. package/types/ui/details-group.d.ts +38 -0
  251. package/types/ui/details-group.d.ts.map +1 -0
  252. package/types/ui/dialog.d.ts +20 -14
  253. package/types/ui/dialog.d.ts.map +1 -1
  254. package/types/ui/flipcard.d.ts +16 -10
  255. package/types/ui/flipcard.d.ts.map +1 -1
  256. package/types/ui/grid.d.ts +4 -6
  257. package/types/ui/grid.d.ts.map +1 -1
  258. package/types/ui/index.d.ts +1 -0
  259. package/types/ui/modal-builder.d.ts +93 -11
  260. package/types/ui/modal-builder.d.ts.map +1 -1
  261. package/types/ui/overflow-scroller.d.ts +2 -2
  262. package/types/ui/overflow-scroller.d.ts.map +1 -1
  263. package/types/ui/popover.d.ts +6 -7
  264. package/types/ui/popover.d.ts.map +1 -1
  265. package/types/ui/print.d.ts +0 -4
  266. package/types/ui/print.d.ts.map +1 -1
  267. package/types/ui/programmatic-modal.d.ts.map +1 -1
  268. package/types/ui/proxy-click.d.ts +19 -3
  269. package/types/ui/proxy-click.d.ts.map +1 -1
  270. package/types/ui/scroll-slider.d.ts +5 -7
  271. package/types/ui/scroll-slider.d.ts.map +1 -1
  272. package/types/ui/scrollpoint.d.ts +3 -8
  273. package/types/ui/scrollpoint.d.ts.map +1 -1
  274. package/types/ui/slider.d.ts +33 -14
  275. package/types/ui/slider.d.ts.map +1 -1
  276. package/types/ui/tabs.d.ts +6 -8
  277. package/types/ui/tabs.d.ts.map +1 -1
  278. package/types/ui/theme-toggle.d.ts +51 -7
  279. package/types/ui/theme-toggle.d.ts.map +1 -1
  280. package/types/ui/tooltip.d.ts +3 -5
  281. package/types/ui/tooltip.d.ts.map +1 -1
  282. package/types/utils/css.d.ts +11 -0
  283. package/types/utils/css.d.ts.map +1 -0
  284. package/types/utils/dom.d.ts +45 -6
  285. package/types/utils/dom.d.ts.map +1 -1
  286. package/types/utils/font-awesome.d.ts +5 -0
  287. package/types/utils/font-awesome.d.ts.map +1 -0
  288. package/types/utils/index.d.ts +1 -0
  289. package/types/utils/system.d.ts +113 -0
  290. package/types/utils/system.d.ts.map +1 -0
@@ -10,6 +10,7 @@
10
10
  @use "../utils";
11
11
  @use "../selector";
12
12
  @use "../color";
13
+ @use "../layout";
13
14
 
14
15
  // todo
15
16
  // sass color adjust for smooth transition. Add a comment for this if we can’t get to this
@@ -19,7 +20,6 @@
19
20
  /// @prop {Dimension} padding [2rem] The padding for the image icon
20
21
  /// @prop {Dimension} margin-y [3rem] Top and bottom margin for the card.
21
22
  /// @prop {Dimension} border-radius [5rem] The border radius of the card.
22
- /// @prop {String} horizontal-breakpoint [small] The breakpoint used to change the card to vertical if using the card--horizontal styling. Uses ulu's breakpoint module.
23
23
  /// @prop {CssValue} box-shadow [null] The box-shadow for the card.
24
24
  /// @prop {CssValue} box-shadow-hover [null] The box-shadow for the card when hovered or focused.
25
25
  /// @prop {Color} color [null] The type color of the card.
@@ -30,7 +30,7 @@
30
30
  /// @prop {Color} background-color [white] The background color of the card.
31
31
  /// @prop {Color} background-color-hover [rgb(242, 244, 246)] The background color of the card when hovered or focused.
32
32
  /// @prop {Dimension} max-width [28rem] The max-width of the card.
33
- /// @prop {Dimension} body-min-height [10rem] the min-height of the card body.
33
+ /// @prop {Dimension} body-min-height [8rem] the min-height of the card body.
34
34
  /// @prop {CssValue} border [1px solid #ccc] The card border.
35
35
  /// @prop {CssValue} border-hover [2px solid #278cca] The card border when hovered or focused.
36
36
  /// @prop {Dimension} header-margin [0.75em] The margin for the card header.
@@ -58,9 +58,18 @@
58
58
  /// @prop {Boolean} image-transition-enabled [true] Enable or disable the image transition.
59
59
  /// @prop {Time} image-transition-duration [350ms] The duration of the image transition.
60
60
  /// @prop {CssValue} image-transition-timing-function [ease-in-out] The timing function for the image transition.
61
+ /// @prop {Number} image-fit-padding [1rem] Padding on inside of image when using image fit modifier
62
+ /// @prop {CssValue} image-fit-filter [drop-shadow(0 0px 8px rgba(0, 0, 0, 0.2))] Filter to use on image when using image fit modifier
63
+ /// @prop {List} image-icon-max-width [10rem] Max width for image when using the modifier on the .card__image--icon
61
64
  /// @prop {List} image-transition-properties [(transform, filter)] The properties for the image transitions.
62
-
63
-
65
+ /// @prop {String} horizontal-breakpoint [small] The breakpoint used to change the card to vertical if using the card--horizontal styling. Uses ulu's breakpoint module.
66
+ /// @prop {Unit} horizontal-min-height [10rem] Minimum height when horizontal
67
+ /// @prop {Unit} horizontal-max-width [40rem] Maximum width when horizontal
68
+ /// @prop {Unit} horizontal-body-max-width [80rem] The max-width of body when horizontal
69
+ /// @prop {Boolean} aside-rule [false] Whether or not to have a rule separating body and aside
70
+ /// @prop {CssUnit} aside-rule-width [1px] Size of rule
71
+ /// @prop {CssUnit} aside-rule-color ["rule-light"] Color of rule
72
+ /// @prop {CssUnit} aside-rule-background-color [transparent] Color of aside background color
64
73
 
65
74
  $config: (
66
75
  "background-color" : white,
@@ -79,18 +88,25 @@ $config: (
79
88
  "footer-padding-y" : 0.25rem,
80
89
  "footer-min-height" : 2.5rem,
81
90
  "horizontal-breakpoint" : "small",
91
+ "horizontal-image-width" : min(33%, 20rem),
92
+ "horizontal-body-max-width" : 40rem,
93
+ "horizontal-min-height" : 20rem,
94
+ "horizontal-max-width" : 80rem,
82
95
  "header-margin" : 0.75em,
83
96
  "image-ratio" : 56.25%,
84
97
  "image-aspect-ratio": list.slash(5, 3),
85
- "image-background-color" : rgb(197, 197, 197),
98
+ "image-background-color" : rgb(238, 238, 238),
86
99
  "image-border" : null, // For when you have a margin
87
100
  "image-filter-hover" : null,
88
101
  "image-margin" : null,
102
+ "image-icon-max-width" : 8rem,
89
103
  "image-transform-hover" : null,
90
104
  "image-transition-duration" : 350ms,
91
105
  "image-transition-enabled" : true,
92
106
  "image-transition-properties" : (transform, filter),
93
107
  "image-transition-timing-function" : ease-in-out,
108
+ "image-fit-padding" : 1rem,
109
+ "image-fit-filter" : drop-shadow(0 0px 8px rgba(0, 0, 0, 0.3)),
94
110
  "margin-y" : 3rem,
95
111
  "max-width" : 28rem,
96
112
  "padding" : 2rem,
@@ -110,7 +126,12 @@ $config: (
110
126
  "overlay-background-color": rgba(0, 0, 0, 0.6),
111
127
  "overlay-shading": true,
112
128
  "overlay-body-padding-y": 1rem,
113
- ) !default;
129
+ // new below
130
+ "aside-rule" : false,
131
+ "aside-rule-width" : 1px,
132
+ "aside-background-color" : transparent,
133
+ "aside-rule-color": "rule-light",
134
+ ) !default;
114
135
 
115
136
  /// Change modules $config
116
137
  /// @param {Map} $changes Map of changes
@@ -138,19 +159,34 @@ $config: (
138
159
 
139
160
  @mixin when-clickable($hover: false) {
140
161
  $prefix: selector.class("card");
162
+ // When proxy click enabled
141
163
  @if (get("clickable-card-enabled") and get("clickable-card-selector")) {
142
- #{ $prefix } {
143
- &#{ get("clickable-card-selector") } {
144
- @if ($hover) {
145
- #{ get("clickable-card-interact-selector") } {
146
- @content;
147
- }
148
- } @else {
164
+ #{ $prefix }#{ get("clickable-card-selector") },
165
+ a#{ $prefix },
166
+ button#{ $prefix },
167
+ #{ $prefix }--clickable {
168
+ @if ($hover) {
169
+ #{ get("clickable-card-interact-selector") } {
149
170
  @content;
150
171
  }
172
+ } @else {
173
+ @content;
151
174
  }
152
175
  }
153
- }
176
+ // Without proxy click (only if interactive)
177
+ } @else {
178
+ a#{ $prefix },
179
+ button#{ $prefix },
180
+ #{ $prefix }--clickable {
181
+ @if ($hover) {
182
+ #{ get("clickable-card-interact-selector") } {
183
+ @content;
184
+ }
185
+ } @else {
186
+ @content;
187
+ }
188
+ }
189
+ }
154
190
  }
155
191
 
156
192
 
@@ -179,21 +215,17 @@ $config: (
179
215
  flex-direction: column;
180
216
  justify-content: flex-end;
181
217
  max-width: get("max-width");
182
- }
183
- @if (get("border") or get("border-hover") or get("overlay-background-color-hover")) {
184
- @include when-clickable($hover: false) {
185
- &:after {
186
- position: absolute;
187
- content: if(get("border"), "", false);
188
- top: 0;
189
- bottom: 0;
190
- right: 0;
191
- left: 0;
192
- border: get("border");
193
- border-radius: get("border-radius");
194
- z-index: 4;
195
- pointer-events: none;
196
- }
218
+ // Not absolutely necessary, incase we want to remove in future
219
+ overflow: hidden;
220
+
221
+ // Border is on pseudo so that it's on top of image/etc
222
+ &::after {
223
+ @include layout.absolute-fill();
224
+ content: if(get("border"), "", null);
225
+ border: get("border");
226
+ border-radius: get("border-radius");
227
+ z-index: 4;
228
+ pointer-events: none;
197
229
  }
198
230
  }
199
231
 
@@ -203,7 +235,7 @@ $config: (
203
235
  box-shadow: get("box-shadow-hover");
204
236
 
205
237
  @if (get("border-hover") or get("overlay-background-color-hover")) {
206
- &:after {
238
+ &::after {
207
239
  content: "";
208
240
  border: get("border-hover");
209
241
  background-color: color.get(get("overlay-background-color-hover"));
@@ -227,14 +259,15 @@ $config: (
227
259
  margin-bottom: get("title-margin");
228
260
  display: block;
229
261
  font-weight: get("title-font-weight");
230
- @if get("title-color-hover") {
231
- &:hover,
232
- &:focus {
233
- color: color.get(get("title-color-hover"));
234
- }
235
- }
236
262
  #{ $prefix }__title-link {
237
263
  all: unset;
264
+ cursor: pointer;
265
+ @if get("title-color-hover") {
266
+ &:hover,
267
+ &:focus {
268
+ color: color.get(get("title-color-hover"));
269
+ }
270
+ }
238
271
  }
239
272
  }
240
273
  @if get("title-color-hover") {
@@ -266,11 +299,7 @@ $config: (
266
299
  }
267
300
  #{ $prefix }__image img,
268
301
  #{ $prefix}__image-media {
269
- position: absolute;
270
- top: 0;
271
- left: 0;
272
- width: 100%;
273
- height: 100%;
302
+ @include layout.absolute-fill(true);
274
303
  border: 0;
275
304
  object-fit: cover;
276
305
  transform-origin: center center;
@@ -289,21 +318,28 @@ $config: (
289
318
  }
290
319
  }
291
320
  }
292
- #{ $prefix }__body,
293
- #{ $prefix }__footer,
294
- #{ $prefix }__image--icon {
321
+
322
+ #{ $prefix }__footer {
323
+ padding: get("padding");
324
+ }
325
+ #{ $prefix }__main {
326
+ padding: get("padding");
327
+ }
328
+ #{ $prefix }__aside {
329
+ position: relative;
295
330
  padding: get("padding");
296
331
  }
297
332
 
298
333
  #{ $prefix }__image--icon {
299
- background-color: transparent;
334
+ // background-color: transparent;
300
335
  display: flex;
301
336
  align-items: center;
302
337
  justify-content: center;
338
+ // padding: 2rem;
303
339
  img {
304
340
  position: static;
305
341
  display: block;
306
- max-width: 30rem;
342
+ max-width: get("image-icon-max-width");
307
343
  height: auto;
308
344
  top: auto;
309
345
  left: auto;
@@ -315,9 +351,25 @@ $config: (
315
351
  z-index: 2; // Above image
316
352
  }
317
353
  #{ $prefix }__body {
354
+ display: flex;
355
+ flex-direction: column;
318
356
  flex-grow: 1;
319
357
  min-height: get("body-min-height");
320
358
  }
359
+ @if(get("aside-rule")) {
360
+ #{ $prefix }__aside {
361
+ background-color: color.get(get("aside-background-color"));
362
+ }
363
+ #{ $prefix }__aside::after {
364
+ content: "";
365
+ position: absolute;
366
+ top: calc(0rem - get("aside-rule-width") / 2);
367
+ left: get("padding");
368
+ right: get("padding");
369
+ height: get("aside-rule-width");
370
+ background-color: color.get(get("aside-rule-color"));
371
+ }
372
+ }
321
373
  // For actions/messages
322
374
  // - Layout as flex with min height to support buttons
323
375
  // and text without relying so much on padding
@@ -346,6 +398,12 @@ $config: (
346
398
  min-height: 0;
347
399
  padding-top: get("overlay-body-padding-y");
348
400
  padding-bottom: get("overlay-body-padding-y");
401
+
402
+ &:not(:has(~ #{ $prefix }__footer)) {
403
+ border-bottom-left-radius: get("border-radius");
404
+ border-bottom-right-radius: get("border-radius");
405
+ }
406
+
349
407
  @if (get("overlay-shading")) {
350
408
  margin-top: 4rem;
351
409
  &::before {
@@ -362,16 +420,21 @@ $config: (
362
420
  #{ $prefix }__footer {
363
421
  background-color: color.get(get("overlay-background-color"));
364
422
  color: color.get(get("color-overlay"));
423
+ border-bottom-left-radius: get("border-radius");
424
+ border-bottom-right-radius: get("border-radius");
425
+ }
426
+ #{ $prefix }__body,
427
+ #{ $prefix }__footer {
428
+ &:last-child {
429
+ border-bottom-left-radius: get("border-radius");
430
+ border-bottom-right-radius: get("border-radius");
431
+ }
365
432
  }
366
433
  #{ $prefix }__title {
367
434
  color: color.get(get("color-overlay"));
368
435
  }
369
436
  #{ $prefix }__image {
370
- position: absolute;
371
- top: 0;
372
- left: 0;
373
- bottom: 0;
374
- right: 0;
437
+ @include layout.absolute-fill();
375
438
  overflow: hidden;
376
439
  padding-top: 0;
377
440
  background-color: color.get(rgb(255, 255, 255));
@@ -385,40 +448,149 @@ $config: (
385
448
  border: 0;
386
449
  object-fit: cover;
387
450
  &::before {
388
- position: absolute;
451
+ @include layout.absolute-fill(true);
389
452
  display: block;
390
- top: 0;
391
- bottom: 0;
392
- left: 0;
393
- right: 0;
394
453
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.9));
395
454
  }
396
455
  }
397
456
  }
398
457
  }
399
458
 
459
+ // Incase this modifier is being used to hide the image
460
+ // not just to tell the component how to layout without image
461
+ // - Use case is hiding image when you can't control the output
462
+ // of the inside of the card (printed no matter what). We had
463
+ // this happen in HHRC, including this extra CSS for that
464
+ #{ $prefix }--no-image {
465
+ #{ $prefix }__image {
466
+ display: none;
467
+ }
468
+ }
469
+ #{ $prefix }--image-fit {
470
+ #{ $prefix }__image {
471
+ img {
472
+ padding: get("image-fit-padding");
473
+ object-fit: contain;
474
+ object-position: top center;
475
+ filter: get("image-fit-filter");
476
+ }
477
+ }
478
+ }
479
+ #{ $prefix }--fill {
480
+ max-width: none;
481
+ height: 100%;
482
+ margin: 0;
483
+ }
484
+
400
485
  @if (get("horizontal-breakpoint")) {
401
486
  @include breakpoint.min(get("horizontal-breakpoint")) {
402
- #{ $prefix }--horizontal {
403
- display: flex;
404
- justify-content: center;
405
- align-items: center;
406
- #{ $prefix }__image {
407
- width: 33%;
408
- flex: 0 1 33%;
409
- // max-width: 30rem;
410
- min-height: 28rem;
411
- // padding-top: 0;
412
- }
413
- #{ $prefix }__body {
414
- display: flex;
415
- flex: 1;
416
- flex-direction: column;
417
- justify-content: center;
418
- max-width: 80rem;
419
- }
487
+ @include -horizontal-card-styles();
488
+ }
489
+ } @else {
490
+ @include -horizontal-card-styles();
491
+ }
492
+ }
493
+
494
+ @mixin -horizontal-card-styles() {
495
+ $prefix: selector.class("card");
496
+
497
+ #{ $prefix }--horizontal {
498
+ display: grid;
499
+ grid-template-columns: get("horizontal-image-width") 1fr;
500
+ // Creating the two rows (body and footer), if one is missing it's height will be 0
501
+ // Cannot use gap with the grid as it will create space when a row isn't needed
502
+ grid-template-rows: auto auto;
503
+ min-height: get("horizontal-min-height");
504
+ max-width: get("horizontal-max-width");
505
+
506
+ // When no footer remove extra row
507
+ &:not(:has(> #{ $prefix }__footer)) {
508
+ grid-template-rows: auto;
509
+ }
510
+ #{ $prefix }__image {
511
+ grid-column: 1 / 2;
512
+ grid-row: 1 / -1;
513
+ aspect-ratio: auto;
514
+ border-top-right-radius: 0;
515
+ border-bottom-left-radius: get("border-radius");
516
+ }
517
+ #{ $prefix }__body,
518
+ #{ $prefix }__footer {
519
+ grid-column: 2 / 3;
520
+ }
521
+ #{ $prefix }__body {
522
+ flex-direction: row;
523
+ max-width: get("horizontal-body-max-width");
524
+ }
525
+
526
+ @if(get("aside-rule")) {
527
+ #{ $prefix }__main {
528
+ flex: 1 1 60%;
529
+ }
530
+ #{ $prefix }__aside {
531
+ flex: 1 1 40%;
532
+ height: 100%;
533
+ // flex-basis: 40%;
534
+ // min-width: 40%;
535
+ }
536
+ #{ $prefix }__aside::after {
537
+ content: "";
538
+ position: absolute;
539
+ top: get("padding");
540
+ left: calc(0rem - get("aside-rule-width") / 2);
541
+ height: calc(100% - get("padding") - get("padding"));
542
+ width: get("aside-rule-width");
543
+ background-color: get("aside-rule-color");
420
544
  }
421
545
  }
546
+
547
+ // For modern browsers
548
+ // Optionally use no-image modifier for older browser support
549
+ &:not(:has(#{ $prefix }__image)) {
550
+ @include -card-horizontal-no-image-styles();
551
+ }
552
+ &#{ $prefix }--no-image {
553
+ @include -card-horizontal-no-image-styles();
554
+ }
555
+ }
556
+ #{ $prefix }--horizontal-center {
557
+ #{ $prefix }__body {
558
+ align-self: center;
559
+ }
422
560
  }
423
561
  }
424
562
 
563
+ @mixin -card-horizontal-no-image-styles() {
564
+ $prefix: selector.class("card");
565
+ grid-template-columns: 1fr;
566
+ #{ $prefix }__body,
567
+ #{ $prefix }__footer {
568
+ grid-column: 1 / 2;
569
+ }
570
+ }
571
+
572
+ // OLD CSS FOR HORIZONTAL
573
+ // #{ $prefix }--horizontal {
574
+ // display: flex;
575
+ // flex-direction: row;
576
+ // justify-content: center;
577
+ // align-items: center;
578
+ // #{ $prefix }__image {
579
+ // align-self: stretch;
580
+ // border-top-right-radius: 0;
581
+ // border-bottom-left-radius: get("border-radius");
582
+ // width: get("horizontal-image-width");
583
+ // flex: 0 0 get("horizontal-image-width");
584
+ // // max-width: 30rem;
585
+ // // min-height: 28rem;
586
+ // // padding-top: 0;
587
+ // }
588
+ // #{ $prefix }__body {
589
+ // display: flex;
590
+ // flex: 1;
591
+ // flex-direction: column;
592
+ // justify-content: center;
593
+ // max-width: get("horizontal-body-max-width");
594
+ // }
595
+ // }
596
+
@@ -0,0 +1,137 @@
1
+ ////
2
+ /// @group counter-list
3
+ /// Outputs a styled list with counters
4
+
5
+ @use "sass:map";
6
+ @use "../utils";
7
+ @use "../selector";
8
+ @use "../color";
9
+ @use "../breakpoint";
10
+
11
+ /// Module Settings
12
+ /// @type Map
13
+ /// @prop {List|CssUnit} margin [(2rem 0)] The top and bottom margin of the list.
14
+ /// @prop {List|CssUnit} item-margin [(0, 0, 1rem, 0)] The margin applied to each list item.
15
+ /// @prop {Keyword} align-items [baseline] How to align the counter (flexbox align-items values)
16
+ /// @prop {CssUnit} counter-width [2.4em] The width and height (if height is falsy)
17
+ /// @prop {CssUnit} counter-height [null] The height (optional)
18
+ /// @prop {CssUnit} counter-gap [1em] The gap between the counter and the list item content.
19
+ /// @prop {String} counter-style [numeric] The list-style-type used for the counter.
20
+ /// @prop {Keyword|Percentage} counter-border-radius [50%] The border-radius of the counter element.
21
+ /// @prop {CssUnit} counter-font-size [1.2em] The font-size of the counter text.
22
+ /// @prop {Color|String} counter-color [white] The text color of the counter. Accepts color names or hex codes.
23
+ /// @prop {Color|String} counter-background-color ["accent"] The background color of the counter. Refers to a color in the color module.
24
+
25
+ $config: (
26
+ "margin" : (2rem 0),
27
+ "item-margin" : (0, 0, 1rem, 0),
28
+ "align-items" : baseline,
29
+ "counter-width" : 2.4em,
30
+ "counter-height" : null,
31
+ "counter-gap" : 1em,
32
+ "counter-style" : numeric,
33
+ "counter-border-radius" : 50%,
34
+ "counter-font-size" : 1.2em,
35
+ "counter-font-weight" : null,
36
+ "counter-font-family" : null,
37
+ "counter-color" : white,
38
+ "counter-background-color" : "accent",
39
+ ) !default;
40
+
41
+ /// Change modules $config
42
+ /// @param {Map} $changes Map of changes
43
+ /// @example scss
44
+ /// @include ulu.component-counter-list-set(( "property" : value ));
45
+
46
+ @mixin set($changes) {
47
+ $config: map.merge($config, $changes) !global;
48
+ }
49
+
50
+ /// Get a config option
51
+ /// @param {Map} $name Name of property
52
+ /// @example scss
53
+ /// @include ulu.component-counter-list-get("property");
54
+
55
+ @function get($name) {
56
+ @return utils.require-map-get($config, $name, "counter-list [config]");
57
+ }
58
+
59
+ /// Output counter-list component styles
60
+ /// @demo counter-list
61
+ /// @example html {preview}
62
+ /// <ol class="counter-list">
63
+ /// <li class="counter-list__item">This is a item that will get counted</li>
64
+ /// <li class="counter-list__item">Another item that has more content to show line wrapping. Lorem ipsum et depsi anu. Dolor et anu.</li>
65
+ /// <li class="counter-list__item">Small Amount of Text</li>
66
+ /// </ol>
67
+
68
+ @mixin styles {
69
+ $prefix: selector.class("counter-list");
70
+ $width: get("counter-width");
71
+ $height: utils.fallback(get("counter-height"), $width);
72
+
73
+ #{ $prefix } {
74
+ margin: get("margin");
75
+ counter-reset: ulu-counter-list;
76
+ }
77
+
78
+ #{ $prefix } > li,
79
+ #{ $prefix }__item {
80
+ display: flex;
81
+ gap: get("counter-gap");
82
+ align-items: get("align-items");
83
+ margin: get("item-margin");
84
+ min-height: $height;
85
+ &::before {
86
+ display: flex;
87
+ align-items: center;
88
+ justify-content: center;
89
+ width: $width;
90
+ height: $height;
91
+ flex: 0 0 $width;
92
+ counter-increment: ulu-counter-list;
93
+ content: counter(ulu-counter-list, get("counter-style"));
94
+ font-size: get("counter-font-size");
95
+ font-family: get("counter-font-family");
96
+ font-weight: get("counter-font-weight");
97
+ color: color.get(get("counter-color"));
98
+ background-color: color.get(get("counter-background-color"));
99
+ border-radius: get("counter-border-radius");
100
+ }
101
+
102
+ // Keeping this could be useful
103
+ // but we need to think about how its setup
104
+ // - Probably should be a modifier (choice)
105
+ // - May need either option for how align-items is set (flex-start vs center)
106
+ // - This could be useful when used in grid
107
+ // - May need to be pervasive and not linked to a breakpoint (alternate style)
108
+ // - It's also just useful to know you could override the layout like this
109
+ // to get useful variations (maybe we don't need to include it but users
110
+ // can do specific)
111
+ // @if ( get("counter-mobile-toggle") ) {
112
+ // @include breakpoint.max("small") {
113
+ // padding-left: 0;
114
+ // padding-top: calc(get("counter-width") + get("counter-gap-mobile"));
115
+ // flex-direction: column;
116
+ // align-items: center;
117
+ // }
118
+ // }
119
+ }
120
+
121
+ // Modifiers
122
+ #{ $prefix }--alphabetical {
123
+ & > li::before,
124
+ & > #{ $prefix }__item::before {
125
+ content: counter(ulu-counter-list, upper-alpha);
126
+ }
127
+ }
128
+ #{ $prefix }--numeric {
129
+ & > li::before,
130
+ & > #{ $prefix }__item::before {
131
+ content: counter(ulu-counter-list, numeric);
132
+ }
133
+ }
134
+ #{ $prefix }--no-reset {
135
+ counter-reset: none;
136
+ }
137
+ }