@ulu/frontend 0.1.0-beta.10 → 0.1.0-beta.101

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 (325) hide show
  1. package/CHANGELOG.md +647 -0
  2. package/README.dev.md +3 -3
  3. package/README.md +14 -4
  4. package/dist/ulu-frontend.min.css +1 -1
  5. package/dist/ulu-frontend.min.js +36 -29
  6. package/docs-dev/.nojekyll +1 -0
  7. package/docs-dev/assets/main.js +8290 -635
  8. package/docs-dev/assets/placeholder/icon-calendar.svg +1 -0
  9. package/docs-dev/assets/placeholder/icon-check.svg +1 -0
  10. package/docs-dev/assets/style.css +789 -338
  11. package/docs-dev/changelog/index.html +7203 -0
  12. package/docs-dev/demos/accordion/index.html +1277 -365
  13. package/docs-dev/demos/badge/index.html +5655 -0
  14. package/docs-dev/demos/badge-stack/index.html +5636 -0
  15. package/docs-dev/demos/{list-inline.1 → badge.1}/index.html +1231 -363
  16. package/docs-dev/demos/basic-hero/index.html +111 -0
  17. package/docs-dev/demos/breakpoints-manager/index.html +5666 -0
  18. package/docs-dev/demos/button/index.html +1309 -355
  19. package/docs-dev/demos/button-group/index.html +5652 -0
  20. package/docs-dev/demos/button-verbose/index.html +5658 -0
  21. package/docs-dev/demos/callout/index.html +1300 -347
  22. package/docs-dev/demos/captioned-figure/index.html +1271 -358
  23. package/docs-dev/demos/card/index.html +1374 -822
  24. package/docs-dev/demos/card-grid/index.html +5777 -0
  25. package/docs-dev/demos/counter-list/index.html +5660 -0
  26. package/docs-dev/demos/css-icons/index.html +1292 -356
  27. package/docs-dev/demos/data-grid/index.html +1271 -358
  28. package/docs-dev/demos/data-table/index.html +1405 -359
  29. package/docs-dev/demos/details-group/index.html +5687 -0
  30. package/docs-dev/demos/file-save/index.html +1271 -358
  31. package/docs-dev/demos/flipcard/index.html +1271 -358
  32. package/docs-dev/demos/form-theme/index.html +1295 -395
  33. package/docs-dev/demos/headline-label/index.html +5622 -0
  34. package/docs-dev/demos/hero/index.html +12 -4
  35. package/docs-dev/demos/image-grid/index.html +12 -4
  36. package/docs-dev/demos/index.html +1272 -359
  37. package/docs-dev/demos/list-inline/index.html +1271 -358
  38. package/docs-dev/demos/list-lines/index.html +1271 -358
  39. package/docs-dev/demos/menu-stack/index.html +1303 -375
  40. package/docs-dev/demos/modals/index.html +1382 -346
  41. package/docs-dev/demos/nav-strip/index.html +1271 -358
  42. package/docs-dev/demos/overlay-section/index.html +1335 -352
  43. package/docs-dev/demos/panel/index.html +5682 -0
  44. package/docs-dev/demos/popovers/index.html +1562 -407
  45. package/docs-dev/demos/print/index.html +1271 -358
  46. package/docs-dev/demos/pull-quote/index.html +1271 -358
  47. package/docs-dev/demos/rail/index.html +5730 -0
  48. package/docs-dev/demos/rule/index.html +1288 -363
  49. package/docs-dev/demos/scroll-slider/index.html +72 -106
  50. package/docs-dev/demos/scrollpoints/index.html +1272 -359
  51. package/docs-dev/demos/skeleton/index.html +5678 -0
  52. package/docs-dev/demos/slider/index.html +12 -4
  53. package/docs-dev/demos/spoke-spinner/index.html +1271 -358
  54. package/docs-dev/demos/sticky-list/index.html +5643 -0
  55. package/docs-dev/demos/tabs/index.html +1301 -352
  56. package/docs-dev/demos/tag/index.html +1282 -357
  57. package/docs-dev/demos/theme-toggle/index.html +5699 -0
  58. package/docs-dev/demos/tile-grid-overlay/index.html +12 -4
  59. package/docs-dev/demos/tiles/index.html +1271 -358
  60. package/docs-dev/demos/tooltip/index.html +1271 -358
  61. package/docs-dev/demos/wysiwyg/index.html +5672 -0
  62. package/docs-dev/guide/building-stylesheet/index.html +1271 -358
  63. package/docs-dev/guide/developing-ulu-scss-module/index.html +1271 -358
  64. package/docs-dev/guide/index.html +1271 -358
  65. package/docs-dev/index.html +1271 -358
  66. package/docs-dev/javascript/events/index.html +1303 -352
  67. package/docs-dev/javascript/index.html +1271 -358
  68. package/docs-dev/javascript/settings/index.html +5825 -0
  69. package/docs-dev/javascript/ui-breakpoints/index.html +1285 -374
  70. package/docs-dev/javascript/ui-collapsible/index.html +1270 -359
  71. package/docs-dev/javascript/ui-details-group/index.html +5742 -0
  72. package/docs-dev/javascript/ui-dialog/index.html +1302 -376
  73. package/docs-dev/javascript/ui-flipcard/index.html +1331 -364
  74. package/docs-dev/javascript/ui-grid/index.html +1274 -389
  75. package/docs-dev/javascript/ui-modal-builder/index.html +1497 -446
  76. package/docs-dev/javascript/ui-overflow-scroller/index.html +1270 -359
  77. package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +1270 -359
  78. package/docs-dev/javascript/ui-page/index.html +1270 -359
  79. package/docs-dev/javascript/ui-popover/index.html +1280 -373
  80. package/docs-dev/javascript/ui-print/index.html +1268 -365
  81. package/docs-dev/javascript/ui-print-details/index.html +1270 -359
  82. package/docs-dev/javascript/ui-programmatic-modal/index.html +1270 -359
  83. package/docs-dev/javascript/ui-proxy-click/index.html +1331 -335
  84. package/docs-dev/javascript/ui-resizer/index.html +1588 -412
  85. package/docs-dev/javascript/ui-scroll-slider/index.html +1310 -367
  86. package/docs-dev/javascript/ui-scrollpoint/index.html +1280 -376
  87. package/docs-dev/javascript/ui-slider/index.html +1454 -352
  88. package/docs-dev/javascript/ui-tabs/index.html +1261 -387
  89. package/docs-dev/javascript/ui-theme-toggle/index.html +5830 -0
  90. package/docs-dev/javascript/ui-tooltip/index.html +1273 -366
  91. package/docs-dev/javascript/utils-class-logger/index.html +1271 -360
  92. package/docs-dev/javascript/utils-css/index.html +5644 -0
  93. package/docs-dev/javascript/utils-dom/index.html +1269 -438
  94. package/docs-dev/javascript/utils-file-save/index.html +1270 -359
  95. package/docs-dev/javascript/utils-floating-ui/index.html +1270 -359
  96. package/docs-dev/javascript/utils-id/index.html +1270 -359
  97. package/docs-dev/javascript/utils-pause-youtube-video/index.html +1270 -359
  98. package/docs-dev/javascript/utils-system/index.html +5947 -0
  99. package/docs-dev/sass/base/color/index.html +1270 -359
  100. package/docs-dev/sass/base/elements/index.html +1271 -360
  101. package/docs-dev/sass/base/index/index.html +1271 -360
  102. package/docs-dev/sass/base/index.html +1271 -358
  103. package/docs-dev/sass/base/keyframes/index.html +1271 -360
  104. package/docs-dev/sass/base/layout/index.html +1271 -360
  105. package/docs-dev/sass/base/normalize/index.html +1270 -359
  106. package/docs-dev/sass/base/print/index.html +1271 -360
  107. package/docs-dev/sass/base/root/index.html +1274 -363
  108. package/docs-dev/sass/base/typography/index.html +1270 -359
  109. package/docs-dev/sass/components/accordion/index.html +1293 -375
  110. package/docs-dev/sass/components/adaptive-spacing/index.html +1270 -359
  111. package/docs-dev/sass/components/badge/index.html +1295 -366
  112. package/docs-dev/sass/components/badge-stack/index.html +5811 -0
  113. package/docs-dev/sass/components/basic-hero/index.html +5805 -0
  114. package/docs-dev/sass/components/button/index.html +1270 -359
  115. package/docs-dev/sass/components/button-group/index.html +5803 -0
  116. package/docs-dev/sass/components/button-verbose/index.html +1342 -356
  117. package/docs-dev/sass/components/callout/index.html +1352 -422
  118. package/docs-dev/sass/components/captioned-figure/index.html +1373 -347
  119. package/docs-dev/sass/components/card/index.html +1339 -356
  120. package/docs-dev/sass/components/card-grid/index.html +1270 -359
  121. package/docs-dev/sass/components/counter-list/index.html +5887 -0
  122. package/docs-dev/sass/components/css-icon/index.html +1271 -360
  123. package/docs-dev/sass/components/data-grid/index.html +1290 -372
  124. package/docs-dev/sass/components/data-table/index.html +1449 -348
  125. package/docs-dev/sass/components/fill-context/index.html +1270 -359
  126. package/docs-dev/sass/components/flipcard/index.html +1305 -363
  127. package/docs-dev/sass/components/flipcard-grid/index.html +1270 -359
  128. package/docs-dev/sass/components/form-theme/index.html +1449 -442
  129. package/docs-dev/sass/components/headline-label/index.html +5833 -0
  130. package/docs-dev/sass/components/hero/index.html +1316 -357
  131. package/docs-dev/sass/components/horizontal-rule/index.html +1270 -359
  132. package/docs-dev/sass/components/image-grid/index.html +1270 -359
  133. package/docs-dev/sass/components/index/index.html +1289 -369
  134. package/docs-dev/sass/components/index.html +1271 -358
  135. package/docs-dev/sass/components/links/index.html +1270 -359
  136. package/docs-dev/sass/components/list-inline/index.html +1270 -359
  137. package/docs-dev/sass/components/list-lines/index.html +1270 -359
  138. package/docs-dev/sass/components/list-ordered/index.html +1270 -359
  139. package/docs-dev/sass/components/list-unordered/index.html +1270 -359
  140. package/docs-dev/sass/components/menu-stack/index.html +1294 -369
  141. package/docs-dev/sass/components/modal/index.html +1306 -360
  142. package/docs-dev/sass/components/nav-strip/index.html +1278 -367
  143. package/docs-dev/sass/components/overlay-section/index.html +1278 -367
  144. package/docs-dev/sass/components/pager/index.html +1270 -359
  145. package/docs-dev/sass/components/panel/index.html +6033 -0
  146. package/docs-dev/sass/components/placeholder-block/index.html +1270 -359
  147. package/docs-dev/sass/components/popover/index.html +1323 -376
  148. package/docs-dev/sass/components/pull-quote/index.html +1282 -371
  149. package/docs-dev/sass/components/rail/index.html +5823 -0
  150. package/docs-dev/sass/components/ratio-box/index.html +1278 -367
  151. package/docs-dev/sass/components/rule/index.html +1271 -360
  152. package/docs-dev/sass/components/scroll-slider/index.html +1280 -381
  153. package/docs-dev/sass/components/skeleton/index.html +5861 -0
  154. package/docs-dev/sass/components/skip-link/index.html +1270 -359
  155. package/docs-dev/sass/components/slider/index.html +1310 -411
  156. package/docs-dev/sass/components/spoke-spinner/index.html +1272 -361
  157. package/docs-dev/sass/components/sticky-list/index.html +6023 -0
  158. package/docs-dev/sass/components/table-sticky/index.html +5677 -0
  159. package/docs-dev/sass/components/tabs/index.html +1291 -365
  160. package/docs-dev/sass/components/tag/index.html +1360 -355
  161. package/docs-dev/sass/components/tile-button/index.html +1270 -359
  162. package/docs-dev/sass/components/tile-grid/index.html +1270 -359
  163. package/docs-dev/sass/components/tile-grid-overlay/index.html +1270 -359
  164. package/docs-dev/sass/components/vignette/index.html +1282 -365
  165. package/docs-dev/sass/components/wysiwyg/index.html +1296 -367
  166. package/docs-dev/sass/core/breakpoint/index.html +1349 -386
  167. package/docs-dev/sass/core/button/index.html +1302 -389
  168. package/docs-dev/sass/core/color/index.html +1414 -370
  169. package/docs-dev/sass/core/cssvar/index.html +1270 -359
  170. package/docs-dev/sass/core/element/index.html +1641 -448
  171. package/docs-dev/sass/core/index.html +1270 -359
  172. package/docs-dev/sass/core/layout/index.html +1318 -388
  173. package/docs-dev/sass/core/path/index.html +1270 -359
  174. package/docs-dev/sass/core/selector/index.html +1270 -359
  175. package/docs-dev/sass/core/typography/index.html +1270 -359
  176. package/docs-dev/sass/core/units/index.html +1278 -361
  177. package/docs-dev/sass/core/utils/index.html +2580 -520
  178. package/docs-dev/sass/helpers/color/index.html +1270 -359
  179. package/docs-dev/sass/helpers/display/index.html +1271 -360
  180. package/docs-dev/sass/helpers/index/index.html +1270 -359
  181. package/docs-dev/sass/helpers/index.html +1271 -358
  182. package/docs-dev/sass/helpers/print/index.html +759 -298
  183. package/docs-dev/sass/helpers/typography/index.html +1270 -359
  184. package/docs-dev/sass/helpers/units/index.html +1270 -359
  185. package/docs-dev/sass/helpers/utilities/index.html +1272 -361
  186. package/docs-dev/sass/index.html +1271 -358
  187. package/js/events/index.js +17 -5
  188. package/js/index.js +1 -0
  189. package/js/settings.js +97 -0
  190. package/js/ui/breakpoints.js +19 -16
  191. package/js/ui/collapsible.js +8 -1
  192. package/js/ui/details-group.js +112 -0
  193. package/js/ui/dialog.js +103 -44
  194. package/js/ui/dialog.todo +2 -36
  195. package/js/ui/flipcard.js +37 -57
  196. package/js/ui/grid.js +15 -13
  197. package/js/ui/index.js +1 -0
  198. package/js/ui/modal-builder.js +127 -70
  199. package/js/ui/overflow-scroller.js +6 -4
  200. package/js/ui/page.js +2 -2
  201. package/js/ui/popover.js +38 -38
  202. package/js/ui/print.js +16 -25
  203. package/js/ui/programmatic-modal.js +9 -3
  204. package/js/ui/proxy-click.js +50 -36
  205. package/js/ui/resizer.js +408 -39
  206. package/js/ui/scroll-slider.js +24 -30
  207. package/js/ui/scrollpoint.js +29 -64
  208. package/js/ui/slider.js +108 -63
  209. package/js/ui/tabs.js +23 -36
  210. package/js/ui/theme-toggle.js +332 -94
  211. package/js/ui/tooltip.js +27 -32
  212. package/js/utils/class-logger.js +3 -3
  213. package/js/utils/css.js +13 -0
  214. package/js/utils/dom.js +23 -64
  215. package/js/utils/font-awesome.js +19 -0
  216. package/js/utils/index.js +2 -1
  217. package/js/utils/system.js +155 -0
  218. package/package.json +23 -8
  219. package/scss/README.md +9 -0
  220. package/scss/_breakpoint.scss +39 -5
  221. package/scss/_button.scss +7 -5
  222. package/scss/_color.scss +42 -10
  223. package/scss/_element.scss +124 -2
  224. package/scss/_layout.scss +7 -8
  225. package/scss/_units.scss +3 -2
  226. package/scss/_utils.scss +387 -16
  227. package/scss/base/_elements.scss +0 -1
  228. package/scss/base/_index.scss +1 -1
  229. package/scss/base/_keyframes.scss +15 -0
  230. package/scss/base/_layout.scss +1 -0
  231. package/scss/base/_print.scss +2 -0
  232. package/scss/base/_root.scss +2 -0
  233. package/scss/components/README.todos +14 -0
  234. package/scss/components/_accordion.scss +33 -19
  235. package/scss/components/_badge-stack.scss +84 -0
  236. package/scss/components/_badge.scss +30 -7
  237. package/scss/components/_basic-hero.scss +112 -0
  238. package/scss/components/_button-group.scss +90 -0
  239. package/scss/components/_button-verbose.scss +100 -18
  240. package/scss/components/_callout.scss +125 -78
  241. package/scss/components/_captioned-figure.scss +17 -0
  242. package/scss/components/_card-grid.scss +1 -1
  243. package/scss/components/_card.scss +229 -67
  244. package/scss/components/_counter-list.scss +151 -0
  245. package/scss/components/_css-icon.scss +27 -17
  246. package/scss/components/_data-grid.scss +55 -12
  247. package/scss/components/_data-table.scss +39 -3
  248. package/scss/components/_flipcard.scss +8 -3
  249. package/scss/components/_form-theme.scss +119 -108
  250. package/scss/components/_headline-label.scss +83 -0
  251. package/scss/components/_hero.scss +12 -10
  252. package/scss/components/_index.scss +54 -0
  253. package/scss/components/_menu-stack.scss +42 -25
  254. package/scss/components/_modal.scss +51 -23
  255. package/scss/components/_nav-strip.scss +2 -0
  256. package/scss/components/_overlay-section.scss +2 -5
  257. package/scss/components/_panel.scss +246 -0
  258. package/scss/components/_popover.scss +165 -64
  259. package/scss/components/_pull-quote.scss +13 -13
  260. package/scss/components/_rail.scss +127 -0
  261. package/scss/components/_ratio-box.scss +2 -5
  262. package/scss/components/_rule.scss +1 -0
  263. package/scss/components/_scroll-slider.scss +1 -5
  264. package/scss/components/_skeleton.scss +126 -0
  265. package/scss/components/_slider.scss +49 -72
  266. package/scss/components/_spoke-spinner.scss +2 -2
  267. package/scss/components/_sticky-list.scss +206 -0
  268. package/scss/components/_tabs.scss +22 -4
  269. package/scss/components/_tag.scss +49 -7
  270. package/scss/components/_vignette.scss +3 -5
  271. package/scss/components/_wysiwyg.scss +21 -13
  272. package/scss/helpers/_display.scss +15 -18
  273. package/scss/helpers/_print.scss +12 -7
  274. package/scss/helpers/_utilities.scss +41 -31
  275. package/types/events/index.d.ts +10 -1
  276. package/types/events/index.d.ts.map +1 -1
  277. package/types/index.d.ts +1 -0
  278. package/types/settings.d.ts +70 -0
  279. package/types/settings.d.ts.map +1 -0
  280. package/types/ui/breakpoints.d.ts +14 -14
  281. package/types/ui/breakpoints.d.ts.map +1 -1
  282. package/types/ui/collapsible.d.ts.map +1 -1
  283. package/types/ui/details-group.d.ts +38 -0
  284. package/types/ui/details-group.d.ts.map +1 -0
  285. package/types/ui/dialog.d.ts +20 -14
  286. package/types/ui/dialog.d.ts.map +1 -1
  287. package/types/ui/flipcard.d.ts +16 -10
  288. package/types/ui/flipcard.d.ts.map +1 -1
  289. package/types/ui/grid.d.ts +4 -6
  290. package/types/ui/grid.d.ts.map +1 -1
  291. package/types/ui/index.d.ts +2 -1
  292. package/types/ui/modal-builder.d.ts +116 -11
  293. package/types/ui/modal-builder.d.ts.map +1 -1
  294. package/types/ui/overflow-scroller.d.ts +2 -2
  295. package/types/ui/overflow-scroller.d.ts.map +1 -1
  296. package/types/ui/popover.d.ts +6 -7
  297. package/types/ui/popover.d.ts.map +1 -1
  298. package/types/ui/print.d.ts +0 -4
  299. package/types/ui/print.d.ts.map +1 -1
  300. package/types/ui/programmatic-modal.d.ts.map +1 -1
  301. package/types/ui/proxy-click.d.ts +19 -3
  302. package/types/ui/proxy-click.d.ts.map +1 -1
  303. package/types/ui/resizer.d.ts +116 -16
  304. package/types/ui/resizer.d.ts.map +1 -1
  305. package/types/ui/scroll-slider.d.ts +5 -7
  306. package/types/ui/scroll-slider.d.ts.map +1 -1
  307. package/types/ui/scrollpoint.d.ts +3 -8
  308. package/types/ui/scrollpoint.d.ts.map +1 -1
  309. package/types/ui/slider.d.ts +33 -14
  310. package/types/ui/slider.d.ts.map +1 -1
  311. package/types/ui/tabs.d.ts +6 -8
  312. package/types/ui/tabs.d.ts.map +1 -1
  313. package/types/ui/theme-toggle.d.ts +51 -7
  314. package/types/ui/theme-toggle.d.ts.map +1 -1
  315. package/types/ui/tooltip.d.ts +3 -5
  316. package/types/ui/tooltip.d.ts.map +1 -1
  317. package/types/utils/css.d.ts +11 -0
  318. package/types/utils/css.d.ts.map +1 -0
  319. package/types/utils/dom.d.ts +12 -32
  320. package/types/utils/dom.d.ts.map +1 -1
  321. package/types/utils/font-awesome.d.ts +5 -0
  322. package/types/utils/font-awesome.d.ts.map +1 -0
  323. package/types/utils/index.d.ts +2 -1
  324. package/types/utils/system.d.ts +113 -0
  325. package/types/utils/system.d.ts.map +1 -0
@@ -3,6 +3,8 @@
3
3
  /// Outputs accordion component stylesheet, which can be used with <details> or custom disclosure components
4
4
  ////
5
5
 
6
+ // Internal note: We don't require the content to be wrapped, this is so that this can be used on details elements outside of our control. So we use negative margins
7
+
6
8
  @use "sass:map";
7
9
  @use "sass:math";
8
10
 
@@ -39,11 +41,12 @@
39
41
  /// @prop {Dimension} summary-type-size [false] The size of the text in the accordion summary.
40
42
  /// @prop {Dimension} transparent-padding-y [1em] The upper and lower padding of the transparent summary.
41
43
  /// @prop {Dimension} transparent-padding-x [0] The upper and lower padding of the transparent summary.
44
+ /// @prop {Dimension} borderless-margin-between [0.5rem] Margin between accordions when using no-border modiifier
42
45
 
43
46
  $config: (
44
47
  "background-color": "background",
45
- "background-color-open": "background-gray",
46
- "border-color": "rule",
48
+ "background-color-open": white,
49
+ "border-color": "rule-light",
47
50
  "border-radius": 0,
48
51
  "border-width": 1px,
49
52
  "box-shadow": none,
@@ -59,7 +62,7 @@ $config: (
59
62
  "icon-font-size": 1.5rem,
60
63
  "icon-size": auto,
61
64
  "icon-stroke-width": 0.15em,
62
- "summary-background-color": "white",
65
+ "summary-background-color": #f6f6f6,
63
66
  "summary-color": null,
64
67
  "summary-background-color-hover": null,
65
68
  "summary-color-hover": null,
@@ -68,6 +71,7 @@ $config: (
68
71
  "summary-type-size": false,
69
72
  "transparent-padding-x": 0,
70
73
  "transparent-padding-y": 1em,
74
+ "borderless-margin-between" : 0.5rem
71
75
  ) !default;
72
76
 
73
77
  /// Change modules $config
@@ -95,15 +99,16 @@ $config: (
95
99
 
96
100
  @mixin styles {
97
101
  $prefix: selector.class("accordion");
98
-
102
+ $padding-x: get("padding-x");
103
+ $padding-x-double: get("padding-x") * 2;
99
104
  $border: get("border-width") solid color.get(get("border-color"));
100
105
 
101
106
  // When not one of our custom classed details components
102
107
  #{ $prefix } {
103
108
  position: relative; // For active border
104
109
  border-radius: 0;
105
- padding-left: get("padding-x");
106
- padding-right: get("padding-x");
110
+ padding-left: $padding-x;
111
+ padding-right: $padding-x;
107
112
  margin-top: get("margin");
108
113
  margin-bottom: get("margin");
109
114
  border: $border;
@@ -120,7 +125,7 @@ $config: (
120
125
  & + & {
121
126
  $gap: -(get("margin") - get("margin-between"));
122
127
  margin-top: $gap;
123
- margin-top: calc($gap - 1px);
128
+ margin-top: calc($gap - get("border-width"));
124
129
  }
125
130
  &[open],
126
131
  &.is-active {
@@ -138,17 +143,18 @@ $config: (
138
143
  #{ $prefix }__summary {
139
144
  background-color: color.get(get("summary-background-color"));
140
145
  color: color.get(get("summary-color"));
141
- margin-left: -(get("padding-x"));
142
- margin-right: -(get("padding-x"));
146
+ margin-left: -($padding-x);
147
+ margin-right: -($padding-x);
143
148
  line-height: get("summary-line-height");
144
- padding: get("summary-padding-y") get("padding-x");
149
+ padding: get("summary-padding-y") $padding-x;
145
150
  vertical-align: top;
146
151
  font-weight: bold;
147
152
  cursor: pointer;
153
+ align-items: center;
154
+ width: calc(100% + $padding-x-double); // To fix if using <button>
155
+
148
156
  &:has(#{ $prefix }__icon) {
149
- display: flex; // For icon
150
- align-items: center;
151
- justify-content: space-between;
157
+ display: flex;
152
158
  list-style: none; // Remove the default arrow (old safari?)
153
159
  &::-webkit-details-marker,
154
160
  &::marker {
@@ -172,8 +178,8 @@ $config: (
172
178
  #{ $prefix }__icon {
173
179
  flex: 0 0 get("icon-size");
174
180
  color: color.get(get("icon-color"));
175
- margin-left: 0.5em;
176
- order: 3;
181
+ margin-left: auto;
182
+ padding-left: 0.5em;
177
183
  background-color: color.get(get("icon-background-color"));
178
184
  border-radius: get("icon-border-radius");
179
185
  width: get("icon-size");
@@ -194,6 +200,7 @@ $config: (
194
200
  > #{ $prefix }__summary {
195
201
  margin-left: -(get("transparent-padding-x"));
196
202
  margin-right: -(get("transparent-padding-x"));
203
+ width: 100%;
197
204
  padding: get("transparent-padding-y") get("transparent-padding-x");
198
205
  background-color: transparent;
199
206
  border: none;
@@ -207,11 +214,18 @@ $config: (
207
214
  }
208
215
  }
209
216
  }
210
- #{ $prefix }--no-borders {
217
+ #{ $prefix }--borderless {
211
218
  border: none;
212
- margin-bottom: 4rem;
213
- &[open] > .accordion__summary {
214
- border-bottom: none;
219
+ & + & {
220
+ $gap: -(get("margin") - get("borderless-margin-between"));
221
+ margin-top: $gap;
222
+ margin-top: calc($gap - get("border-width"));
223
+ }
224
+ &[open],
225
+ &.is-active {
226
+ & > .accordion__summary {
227
+ border-bottom: none;
228
+ }
215
229
  }
216
230
  }
217
231
  }
@@ -0,0 +1,84 @@
1
+ ////
2
+ /// @group badge-stack
3
+ /// Stacks badges
4
+ ////
5
+
6
+ @use "sass:map";
7
+ @use "../utils";
8
+ @use "../selector";
9
+ @use "../color";
10
+ @use "badge";
11
+
12
+ /// Module Settings
13
+ /// @type Map
14
+ /// @prop {Dimension} width [10rem] Width of the badge stack
15
+ /// @prop {Dimension} overlap [-5px] Right margin for stacked items
16
+ /// @prop {Dimension} border-width [3px] Border width for stacked items
17
+
18
+ $config: (
19
+ "width": 10rem,
20
+ "overlap": -5px,
21
+ "border-width": 3px,
22
+ "border-color" : "accent"
23
+ ) !default;
24
+
25
+ /// Change modules $config
26
+ /// @param {Map} $changes Map of changes
27
+ /// @example scss
28
+ /// @include ulu.component-badge-stack-set(( "property" : value ));
29
+
30
+ @mixin set($changes) {
31
+ $config: map.merge($config, $changes) !global;
32
+ }
33
+
34
+ /// Get a config option
35
+ /// @param {Map} $name Name of property
36
+ /// @example scss
37
+ /// @include ulu.component-badge-stack-get("property");
38
+
39
+ @function get($name) {
40
+ @return utils.require-map-get($config, $name, "badge-stack [config]");
41
+ }
42
+
43
+ /// Prints component styles
44
+ /// @demo badge-stack
45
+ /// @example scss
46
+ /// @include ulu.component-badge-stack-styles();
47
+
48
+ @mixin styles {
49
+ $prefix: selector.class("badge-stack");
50
+ $prefix-badge: selector.class("badge");
51
+
52
+ #{ $prefix } {
53
+ width: get("width");
54
+ display: flex;
55
+ }
56
+ #{ $prefix }__item {
57
+ flex: 0 1 min-content;
58
+ margin-right: get("overlap");
59
+
60
+ #{ $prefix-badge }__inner {
61
+ // box-shadow: ulu.element-get("box-shadow");
62
+ position: relative;
63
+ &:before {
64
+ content: '';
65
+ display: block;
66
+ position: absolute;
67
+ top: -1px;
68
+ bottom: -1px;
69
+ left: -1px;
70
+ right: -1px;
71
+ border-radius: badge.get("border-radius");
72
+ border: get("border-width") solid color.get(get("border-color"));
73
+ }
74
+ }
75
+ #{ $prefix-badge } {
76
+ &:focus,
77
+ &:hover {
78
+ #{ $prefix-badge }__inner {
79
+ z-index: 2;
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
@@ -3,11 +3,21 @@
3
3
  /// Outputs badge component stylesheet
4
4
  ////
5
5
 
6
+ @use "sass:meta";
6
7
  @use "sass:map";
7
8
  @use "../utils";
8
9
  @use "../selector";
10
+ @use "../typography";
9
11
  @use "../color";
10
12
 
13
+ // Used for function fallback
14
+ $-fallbacks: (
15
+ "font-family" : (
16
+ "function" : meta.get-function("get", false, "typography"),
17
+ "property" : "font-family-sans"
18
+ )
19
+ );
20
+
11
21
  /// Module Settings
12
22
  /// @type Map
13
23
  /// @prop {Number} background-color [gray] Background color (if no image)
@@ -15,20 +25,28 @@
15
25
  /// @prop {Number} color [black] Type color
16
26
  /// @prop {Number} font-size [1.3rem] Font size (basic ie. 1.3rem) for badge
17
27
  /// @prop {Number} font-weight [bold] Font weight
18
- /// @prop {List} sizes [Object] List of other sizes (large by default), each size is a map of (width, font-size)
28
+ /// @prop {Number} font-family [true] Specify font family, defaults to typography font-family-sans
19
29
  /// @prop {Number} width [10rem] Width of badge (default size)
30
+ /// @prop {Number} hover-scale [1.2] Scale of badge (if clickable) on hover (enlarges badge)
31
+ /// @prop {List} sizes [Object] List of other sizes (large by default), each size is a map of (width, font-size)
20
32
 
21
33
  $config: (
22
34
  "background-color": gray,
23
35
  "border-radius": 50%,
24
36
  "color": black,
25
- "font-size": 1.3rem,
37
+ "font-size": 1.5rem,
26
38
  "font-weight": bold,
27
- "width": 10rem,
39
+ "font-family": true,
40
+ "width": 7rem,
41
+ "hover-scale": 1.2,
28
42
  "sizes" : (
43
+ "small" : (
44
+ "font-size" : 1.2rem,
45
+ "width" : 5rem
46
+ ),
29
47
  "large" : (
30
48
  "font-size" : 2.75rem,
31
- "width" : 6rem
49
+ "width" : 9rem
32
50
  )
33
51
  )
34
52
  ) !default;
@@ -48,7 +66,8 @@ $config: (
48
66
  /// @include ulu.component-badge-get("property");
49
67
 
50
68
  @function get($name) {
51
- @return utils.require-map-get($config, $name, "badge [config]");
69
+ $value: utils.require-map-get($config, $name, "badge [config]");
70
+ @return utils.function-fallback($name, $value, $-fallbacks);
52
71
  }
53
72
 
54
73
  /// Output badge component styles
@@ -77,6 +96,7 @@ $config: (
77
96
  flex: 0 0 get("width");
78
97
  font-size: get("font-size");
79
98
  font-weight: get("font-weight");
99
+ font-family: get("font-family");
80
100
  }
81
101
  #{ $prefix }__inner {
82
102
  display: block;
@@ -99,11 +119,13 @@ $config: (
99
119
  color: color.get(get("color"));
100
120
  }
101
121
  }
102
- #{ $prefix }--clickable {
122
+ #{ $prefix }--clickable,
123
+ button#{ $prefix },
124
+ a#{ $prefix } {
103
125
  &:hover,
104
126
  &:focus {
105
127
  #{ $prefix }__inner {
106
- transform: scale(1.2);
128
+ transform: scale(get("hover-scale"));
107
129
  }
108
130
  }
109
131
  }
@@ -118,6 +140,7 @@ $config: (
118
140
  width: 100%;
119
141
  height: 100%;
120
142
  object-fit: cover;
143
+ margin: 0 !important;
121
144
  }
122
145
 
123
146
  @each $name, $props in get("sizes") {
@@ -0,0 +1,112 @@
1
+ ////
2
+ /// @group basic-hero
3
+ /// Basic styling for a hero
4
+ ////
5
+
6
+ @use "sass:map";
7
+ @use "sass:math";
8
+ @use "sass:meta";
9
+ @use "sass:list";
10
+
11
+ @use "../breakpoint";
12
+ @use "../selector";
13
+ @use "../utils";
14
+ @use "../typography";
15
+ @use "../color";
16
+
17
+ // Used for function fallback
18
+ $-fallbacks: (
19
+ "main-max-width" : (
20
+ "function" : meta.get-function("get", false, "typography"),
21
+ "property" : "max-width"
22
+ ),
23
+ "main-min-width" : (
24
+ "function" : meta.get-function("get", false, "typography"),
25
+ "property" : "max-width-small"
26
+ ),
27
+ );
28
+
29
+ /// Module Settings
30
+ /// @type Map
31
+ /// @prop {CssValue} text-align [center] Alignment of text within hero.
32
+ /// @prop {Color} background-color ["color-hero-background"] Background color of the hero
33
+
34
+ $config: (
35
+ "background-color" : "background-gray",
36
+ "padding-top": 3rem,
37
+ "padding-bottom" : 2rem,
38
+ "gap" : (4rem 2rem),
39
+ "main-max-width" : true,
40
+ "main-min-width" : true,
41
+ "media-max-width" : 20rem,
42
+ "media-vertical-align" : center
43
+ ) !default;
44
+
45
+ /// Change modules $config
46
+ /// @param {Map} $changes Map of changes
47
+ /// @example scss
48
+ /// @include ulu.component-basic-hero-set(( "property" : value ));
49
+
50
+ @mixin set($changes) {
51
+ $config: map.merge($config, $changes) !global;
52
+ }
53
+
54
+ /// Get a config option
55
+ /// @param {Map} $name Name of property
56
+ /// @example scss
57
+ /// @include ulu.component-basic-hero-get("property");
58
+
59
+ @function get($name) {
60
+ $value: utils.require-map-get($config, $name, "basic-hero [config]");
61
+ @return utils.function-fallback($name, $value, $-fallbacks);
62
+ }
63
+
64
+ /// Prints component styles
65
+ /// @example scss
66
+ /// @include ulu.component-basic-hero-styles();
67
+
68
+ @mixin styles {
69
+ $prefix: selector.class("basic-hero");
70
+
71
+ #{ $prefix } {
72
+ background-color: color.get(get("background-color"));
73
+ }
74
+ #{ $prefix }__content {
75
+ display: flex;
76
+ align-items: stretch;
77
+ flex-wrap: wrap;
78
+ justify-content: space-between;
79
+ gap: get("gap");
80
+ padding-top: get("padding-top");
81
+ padding-bottom: get("padding-bottom");
82
+ }
83
+ #{ $prefix }__content-main {
84
+ $min-width: if(get("main-min-width"), get("main-min-width"), get("main-max-width"));
85
+ // Using max/min-width so that we don't need to add selectors to change flex-basis
86
+ // when centered. Using flex-basis: 0 to allow flexbox to decide the items width
87
+ // allows it to expand/shrink within. min(100%... Never larger than parent
88
+ min-width: min(100%, $min-width);
89
+ max-width: get("main-max-width");
90
+ flex-shrink: 1;
91
+ flex-grow: 1;
92
+ flex-basis: 0;
93
+ }
94
+ #{ $prefix }__content-media {
95
+ display: flex;
96
+ align-items: center;
97
+ align-self: get("media-vertical-align");
98
+ justify-content: center;
99
+ flex: 0 0 auto;
100
+ width: min(100%, get("media-max-width"));
101
+ }
102
+
103
+ // Modifiers
104
+ #{ $prefix }--center {
105
+ #{ $prefix }__content {
106
+ flex-direction: column;
107
+ flex-wrap: nowrap;
108
+ text-align: center;
109
+ align-items: center;
110
+ }
111
+ }
112
+ }
@@ -0,0 +1,90 @@
1
+ ////
2
+ /// @group button-group
3
+ /// Groups a set of buttons
4
+ ////
5
+
6
+ @use "sass:map";
7
+ @use "sass:math";
8
+
9
+ @use "../selector";
10
+ @use "../utils";
11
+ @use "../color";
12
+ @use "../button";
13
+
14
+ /// Module Settings
15
+ /// @type Map
16
+ /// @prop {Dimension} gap [0.45em] Gap between buttons
17
+ /// @prop {Boolean} no-min-width [true] Buttons within the button group should have no min width
18
+
19
+ $config: (
20
+ "gap": 0.45em,
21
+ "no-min-width" : true
22
+ ) !default;
23
+
24
+ /// Change modules $config
25
+ /// @param {Map} $changes Map of changes
26
+ /// @example scss
27
+ /// @include ulu.component-button-group-set(( "property" : value ));
28
+
29
+ @mixin set($changes) {
30
+ $config: map.merge($config, $changes) !global;
31
+ }
32
+
33
+ /// Get a config option
34
+ /// @param {Map} $name Name of property
35
+ /// @example scss
36
+ /// @include ulu.component-button-group-get("property");
37
+
38
+ @function get($name) {
39
+ @return utils.require-map-get($config, $name, "button-group [config]");
40
+ }
41
+
42
+ /// Prints component styles
43
+ /// @demo button-group
44
+ /// @example scss
45
+ /// @include ulu.component-button-group-styles();
46
+
47
+ @mixin styles {
48
+ $prefix: selector.class("button-group");
49
+ $prefix-button: selector.class("button");
50
+
51
+ $button-radius: button.get("border-radius");
52
+
53
+ #{ $prefix } {
54
+ display: flex;
55
+ flex-wrap: wrap;
56
+ gap: get("gap");
57
+ #{ $prefix-button } {
58
+ margin: 0;
59
+ }
60
+ }
61
+ #{ $prefix }--joined {
62
+ flex-wrap: nowrap;
63
+ overflow-x: auto;
64
+ gap: 0;
65
+ // border-radius: button.get("border-radius");
66
+ #{ $prefix-button } {
67
+ position: relative; // To move to front when hover/active
68
+ border-radius: 0;
69
+ min-width: 0;
70
+ margin-left: -(button.get("border-width"));
71
+ &:first-child {
72
+ border-top-left-radius: $button-radius;
73
+ border-bottom-left-radius: $button-radius;
74
+ margin-left: 0;
75
+ }
76
+ &:last-child {
77
+ border-top-right-radius: $button-radius;
78
+ border-bottom-right-radius: $button-radius;
79
+ }
80
+ #{ button.get("active-selector") } {
81
+ z-index: 2;
82
+ }
83
+ &:hover,
84
+ &:focus {
85
+ z-index: 2;
86
+ }
87
+
88
+ }
89
+ }
90
+ }