@ulu/frontend 0.1.0-beta.8 → 0.1.0-beta.81

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 (294) hide show
  1. package/CHANGELOG.md +544 -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 +34 -27
  6. package/docs-dev/assets/main.js +8290 -635
  7. package/docs-dev/assets/placeholder/icon-calendar.svg +1 -0
  8. package/docs-dev/assets/placeholder/icon-check.svg +1 -0
  9. package/docs-dev/assets/style.css +789 -338
  10. package/docs-dev/changelog/index.html +6593 -0
  11. package/docs-dev/demos/accordion/index.html +850 -328
  12. package/docs-dev/demos/badge/index.html +5265 -0
  13. package/docs-dev/demos/basic-hero/index.html +111 -0
  14. package/docs-dev/demos/breakpoints-manager/index.html +5276 -0
  15. package/docs-dev/demos/button/index.html +892 -328
  16. package/docs-dev/demos/button-verbose/index.html +5268 -0
  17. package/docs-dev/demos/callout/index.html +895 -332
  18. package/docs-dev/demos/captioned-figure/index.html +850 -327
  19. package/docs-dev/demos/card/index.html +930 -768
  20. package/docs-dev/demos/card-grid/index.html +5387 -0
  21. package/docs-dev/demos/counter-list/index.html +5270 -0
  22. package/docs-dev/demos/css-icons/index.html +873 -327
  23. package/docs-dev/demos/data-grid/index.html +870 -347
  24. package/docs-dev/demos/data-table/index.html +1024 -368
  25. package/docs-dev/demos/details-group/index.html +5297 -0
  26. package/docs-dev/demos/file-save/index.html +850 -327
  27. package/docs-dev/demos/flipcard/index.html +850 -327
  28. package/docs-dev/demos/form-theme/index.html +868 -358
  29. package/docs-dev/demos/hero/index.html +12 -4
  30. package/docs-dev/demos/image-grid/index.html +12 -4
  31. package/docs-dev/demos/index.html +851 -328
  32. package/docs-dev/demos/list-inline/index.html +850 -327
  33. package/docs-dev/demos/list-lines/index.html +850 -327
  34. package/docs-dev/demos/menu-stack/index.html +884 -346
  35. package/docs-dev/demos/modals/index.html +977 -331
  36. package/docs-dev/demos/nav-strip/index.html +850 -327
  37. package/docs-dev/demos/overlay-section/index.html +939 -346
  38. package/docs-dev/demos/popovers/index.html +1112 -347
  39. package/docs-dev/demos/print/index.html +850 -327
  40. package/docs-dev/demos/pull-quote/index.html +850 -327
  41. package/docs-dev/demos/rule/index.html +863 -328
  42. package/docs-dev/demos/scroll-slider/index.html +72 -106
  43. package/docs-dev/demos/scrollpoints/index.html +851 -328
  44. package/docs-dev/demos/slider/index.html +12 -4
  45. package/docs-dev/demos/spoke-spinner/index.html +850 -327
  46. package/docs-dev/demos/{list-inline.1 → sticky-list}/index.html +883 -357
  47. package/docs-dev/demos/tabs/index.html +886 -327
  48. package/docs-dev/demos/tag/index.html +850 -327
  49. package/docs-dev/demos/theme-toggle/index.html +5309 -0
  50. package/docs-dev/demos/tile-grid-overlay/index.html +12 -4
  51. package/docs-dev/demos/tiles/index.html +850 -327
  52. package/docs-dev/demos/tooltip/index.html +850 -327
  53. package/docs-dev/guide/building-stylesheet/index.html +850 -327
  54. package/docs-dev/guide/developing-ulu-scss-module/index.html +850 -327
  55. package/docs-dev/guide/index.html +850 -327
  56. package/docs-dev/index.html +850 -327
  57. package/docs-dev/javascript/events/index.html +888 -327
  58. package/docs-dev/javascript/index.html +850 -327
  59. package/docs-dev/javascript/settings/index.html +5435 -0
  60. package/docs-dev/javascript/ui-breakpoints/index.html +862 -341
  61. package/docs-dev/javascript/ui-collapsible/index.html +847 -326
  62. package/docs-dev/javascript/ui-details-group/index.html +5352 -0
  63. package/docs-dev/javascript/ui-dialog/index.html +879 -343
  64. package/docs-dev/javascript/ui-flipcard/index.html +908 -331
  65. package/docs-dev/javascript/ui-grid/index.html +857 -362
  66. package/docs-dev/javascript/ui-modal-builder/index.html +1047 -386
  67. package/docs-dev/javascript/ui-overflow-scroller/index.html +847 -326
  68. package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +847 -326
  69. package/docs-dev/javascript/ui-page/index.html +847 -326
  70. package/docs-dev/javascript/ui-popover/index.html +855 -338
  71. package/docs-dev/javascript/ui-print/index.html +847 -334
  72. package/docs-dev/javascript/ui-print-details/index.html +847 -326
  73. package/docs-dev/javascript/ui-programmatic-modal/index.html +847 -326
  74. package/docs-dev/javascript/ui-proxy-click/index.html +934 -328
  75. package/docs-dev/javascript/ui-resizer/index.html +926 -336
  76. package/docs-dev/javascript/ui-scroll-slider/index.html +885 -332
  77. package/docs-dev/javascript/ui-scrollpoint/index.html +853 -339
  78. package/docs-dev/javascript/ui-slider/index.html +1043 -331
  79. package/docs-dev/javascript/ui-tabs/index.html +858 -374
  80. package/docs-dev/javascript/ui-theme-toggle/index.html +5440 -0
  81. package/docs-dev/javascript/ui-tooltip/index.html +854 -337
  82. package/docs-dev/javascript/utils-class-logger/index.html +848 -327
  83. package/docs-dev/javascript/utils-css/index.html +5254 -0
  84. package/docs-dev/javascript/utils-dom/index.html +887 -446
  85. package/docs-dev/javascript/utils-file-save/index.html +847 -326
  86. package/docs-dev/javascript/utils-floating-ui/index.html +847 -326
  87. package/docs-dev/javascript/utils-id/index.html +847 -326
  88. package/docs-dev/javascript/utils-pause-youtube-video/index.html +847 -326
  89. package/docs-dev/javascript/utils-system/index.html +5557 -0
  90. package/docs-dev/sass/base/color/index.html +847 -326
  91. package/docs-dev/sass/base/elements/index.html +847 -326
  92. package/docs-dev/sass/base/index/index.html +847 -326
  93. package/docs-dev/sass/base/index.html +850 -327
  94. package/docs-dev/sass/base/keyframes/index.html +847 -326
  95. package/docs-dev/sass/base/layout/index.html +847 -326
  96. package/docs-dev/sass/base/normalize/index.html +847 -326
  97. package/docs-dev/sass/base/print/index.html +847 -326
  98. package/docs-dev/sass/base/root/index.html +847 -326
  99. package/docs-dev/sass/base/typography/index.html +847 -326
  100. package/docs-dev/sass/components/accordion/index.html +866 -338
  101. package/docs-dev/sass/components/adaptive-spacing/index.html +847 -326
  102. package/docs-dev/sass/components/badge/index.html +869 -337
  103. package/docs-dev/sass/components/basic-hero/index.html +5415 -0
  104. package/docs-dev/sass/components/button/index.html +847 -326
  105. package/docs-dev/sass/components/button-verbose/index.html +933 -337
  106. package/docs-dev/sass/components/callout/index.html +958 -418
  107. package/docs-dev/sass/components/captioned-figure/index.html +970 -334
  108. package/docs-dev/sass/components/card/index.html +939 -346
  109. package/docs-dev/sass/components/card-grid/index.html +847 -326
  110. package/docs-dev/sass/components/counter-list/index.html +5497 -0
  111. package/docs-dev/sass/components/css-icon/index.html +864 -336
  112. package/docs-dev/sass/components/data-grid/index.html +868 -340
  113. package/docs-dev/sass/components/data-table/index.html +1063 -352
  114. package/docs-dev/sass/components/fill-context/index.html +847 -326
  115. package/docs-dev/sass/components/flipcard/index.html +888 -336
  116. package/docs-dev/sass/components/flipcard-grid/index.html +847 -326
  117. package/docs-dev/sass/components/form-theme/index.html +1063 -446
  118. package/docs-dev/sass/components/hero/index.html +903 -334
  119. package/docs-dev/sass/components/horizontal-rule/index.html +847 -326
  120. package/docs-dev/sass/components/image-grid/index.html +847 -326
  121. package/docs-dev/sass/components/index/index.html +860 -336
  122. package/docs-dev/sass/components/index.html +850 -327
  123. package/docs-dev/sass/components/links/index.html +847 -326
  124. package/docs-dev/sass/components/list-inline/index.html +847 -326
  125. package/docs-dev/sass/components/list-lines/index.html +847 -326
  126. package/docs-dev/sass/components/list-ordered/index.html +847 -326
  127. package/docs-dev/sass/components/list-unordered/index.html +847 -326
  128. package/docs-dev/sass/components/menu-stack/index.html +881 -347
  129. package/docs-dev/sass/components/modal/index.html +898 -342
  130. package/docs-dev/sass/components/nav-strip/index.html +855 -334
  131. package/docs-dev/sass/components/overlay-section/index.html +855 -334
  132. package/docs-dev/sass/components/pager/index.html +847 -326
  133. package/docs-dev/sass/components/placeholder-block/index.html +847 -326
  134. package/docs-dev/sass/components/popover/index.html +904 -347
  135. package/docs-dev/sass/components/pull-quote/index.html +859 -338
  136. package/docs-dev/sass/components/ratio-box/index.html +855 -334
  137. package/docs-dev/sass/components/rule/index.html +848 -327
  138. package/docs-dev/sass/components/scroll-slider/index.html +855 -346
  139. package/docs-dev/sass/components/skip-link/index.html +847 -326
  140. package/docs-dev/sass/components/slider/index.html +897 -388
  141. package/docs-dev/sass/components/spoke-spinner/index.html +849 -328
  142. package/docs-dev/sass/components/sticky-list/index.html +5633 -0
  143. package/docs-dev/sass/components/tabs/index.html +872 -336
  144. package/docs-dev/sass/components/tag/index.html +849 -328
  145. package/docs-dev/sass/components/tile-button/index.html +847 -326
  146. package/docs-dev/sass/components/tile-grid/index.html +847 -326
  147. package/docs-dev/sass/components/tile-grid-overlay/index.html +847 -326
  148. package/docs-dev/sass/components/vignette/index.html +861 -334
  149. package/docs-dev/sass/components/wysiwyg/index.html +847 -326
  150. package/docs-dev/sass/core/breakpoint/index.html +931 -358
  151. package/docs-dev/sass/core/button/index.html +847 -326
  152. package/docs-dev/sass/core/color/index.html +1019 -366
  153. package/docs-dev/sass/core/cssvar/index.html +847 -326
  154. package/docs-dev/sass/core/element/index.html +1108 -381
  155. package/docs-dev/sass/core/index.html +847 -326
  156. package/docs-dev/sass/core/layout/index.html +903 -363
  157. package/docs-dev/sass/core/path/index.html +847 -326
  158. package/docs-dev/sass/core/selector/index.html +847 -326
  159. package/docs-dev/sass/core/typography/index.html +847 -326
  160. package/docs-dev/sass/core/units/index.html +857 -330
  161. package/docs-dev/sass/core/utils/index.html +2104 -476
  162. package/docs-dev/sass/helpers/color/index.html +847 -326
  163. package/docs-dev/sass/helpers/display/index.html +848 -327
  164. package/docs-dev/sass/helpers/index/index.html +847 -326
  165. package/docs-dev/sass/helpers/index.html +850 -327
  166. package/docs-dev/sass/helpers/print/index.html +759 -298
  167. package/docs-dev/sass/helpers/typography/index.html +847 -326
  168. package/docs-dev/sass/helpers/units/index.html +847 -326
  169. package/docs-dev/sass/helpers/utilities/index.html +849 -328
  170. package/docs-dev/sass/index.html +850 -327
  171. package/js/events/index.js +17 -5
  172. package/js/index.js +1 -0
  173. package/js/settings.js +97 -0
  174. package/js/ui/breakpoints.js +19 -16
  175. package/js/ui/collapsible.js +8 -1
  176. package/js/ui/details-group.js +112 -0
  177. package/js/ui/dialog.js +132 -45
  178. package/js/ui/dialog.todo +2 -36
  179. package/js/ui/flipcard.js +37 -57
  180. package/js/ui/grid.js +15 -13
  181. package/js/ui/index.js +1 -0
  182. package/js/ui/modal-builder.js +126 -69
  183. package/js/ui/overflow-scroller.js +6 -4
  184. package/js/ui/page.js +2 -2
  185. package/js/ui/popover.js +38 -38
  186. package/js/ui/print.js +16 -25
  187. package/js/ui/programmatic-modal.js +9 -3
  188. package/js/ui/proxy-click.js +50 -36
  189. package/js/ui/resizer.js +186 -36
  190. package/js/ui/scroll-slider.js +24 -30
  191. package/js/ui/scrollpoint.js +29 -64
  192. package/js/ui/slider.js +108 -63
  193. package/js/ui/tabs.js +23 -36
  194. package/js/ui/theme-toggle.js +332 -94
  195. package/js/ui/tooltip.js +27 -32
  196. package/js/utils/class-logger.js +3 -3
  197. package/js/utils/css.js +13 -0
  198. package/js/utils/dom.js +23 -64
  199. package/js/utils/font-awesome.js +19 -0
  200. package/js/utils/index.js +2 -1
  201. package/js/utils/system.js +155 -0
  202. package/package.json +23 -8
  203. package/scss/README.md +4 -0
  204. package/scss/_breakpoint.scss +38 -4
  205. package/scss/_color.scss +40 -9
  206. package/scss/_element.scss +108 -2
  207. package/scss/_layout.scss +7 -8
  208. package/scss/_units.scss +3 -2
  209. package/scss/_utils.scss +380 -16
  210. package/scss/components/README.todos +14 -0
  211. package/scss/components/_accordion.scss +33 -19
  212. package/scss/components/_badge.scss +23 -4
  213. package/scss/components/_basic-hero.scss +112 -0
  214. package/scss/components/_button-verbose.scss +100 -18
  215. package/scss/components/_callout.scss +125 -78
  216. package/scss/components/_captioned-figure.scss +17 -0
  217. package/scss/components/_card-grid.scss +1 -1
  218. package/scss/components/_card.scss +246 -74
  219. package/scss/components/_counter-list.scss +151 -0
  220. package/scss/components/_css-icon.scss +35 -21
  221. package/scss/components/_data-grid.scss +55 -9
  222. package/scss/components/_data-table.scss +39 -3
  223. package/scss/components/_flipcard.scss +8 -3
  224. package/scss/components/_form-theme.scss +119 -108
  225. package/scss/components/_hero.scss +12 -10
  226. package/scss/components/_index.scss +18 -0
  227. package/scss/components/_menu-stack.scss +42 -26
  228. package/scss/components/_modal.scss +58 -29
  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 +22 -4
  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/events/index.d.ts +10 -1
  245. package/types/events/index.d.ts.map +1 -1
  246. package/types/index.d.ts +1 -0
  247. package/types/settings.d.ts +70 -0
  248. package/types/settings.d.ts.map +1 -0
  249. package/types/ui/breakpoints.d.ts +14 -14
  250. package/types/ui/breakpoints.d.ts.map +1 -1
  251. package/types/ui/collapsible.d.ts.map +1 -1
  252. package/types/ui/details-group.d.ts +38 -0
  253. package/types/ui/details-group.d.ts.map +1 -0
  254. package/types/ui/dialog.d.ts +20 -14
  255. package/types/ui/dialog.d.ts.map +1 -1
  256. package/types/ui/flipcard.d.ts +16 -10
  257. package/types/ui/flipcard.d.ts.map +1 -1
  258. package/types/ui/grid.d.ts +4 -6
  259. package/types/ui/grid.d.ts.map +1 -1
  260. package/types/ui/index.d.ts +2 -1
  261. package/types/ui/modal-builder.d.ts +116 -11
  262. package/types/ui/modal-builder.d.ts.map +1 -1
  263. package/types/ui/overflow-scroller.d.ts +2 -2
  264. package/types/ui/overflow-scroller.d.ts.map +1 -1
  265. package/types/ui/popover.d.ts +6 -7
  266. package/types/ui/popover.d.ts.map +1 -1
  267. package/types/ui/print.d.ts +0 -4
  268. package/types/ui/print.d.ts.map +1 -1
  269. package/types/ui/programmatic-modal.d.ts.map +1 -1
  270. package/types/ui/proxy-click.d.ts +19 -3
  271. package/types/ui/proxy-click.d.ts.map +1 -1
  272. package/types/ui/resizer.d.ts +39 -12
  273. package/types/ui/resizer.d.ts.map +1 -1
  274. package/types/ui/scroll-slider.d.ts +5 -7
  275. package/types/ui/scroll-slider.d.ts.map +1 -1
  276. package/types/ui/scrollpoint.d.ts +3 -8
  277. package/types/ui/scrollpoint.d.ts.map +1 -1
  278. package/types/ui/slider.d.ts +33 -14
  279. package/types/ui/slider.d.ts.map +1 -1
  280. package/types/ui/tabs.d.ts +6 -8
  281. package/types/ui/tabs.d.ts.map +1 -1
  282. package/types/ui/theme-toggle.d.ts +51 -7
  283. package/types/ui/theme-toggle.d.ts.map +1 -1
  284. package/types/ui/tooltip.d.ts +3 -5
  285. package/types/ui/tooltip.d.ts.map +1 -1
  286. package/types/utils/css.d.ts +11 -0
  287. package/types/utils/css.d.ts.map +1 -0
  288. package/types/utils/dom.d.ts +12 -32
  289. package/types/utils/dom.d.ts.map +1 -1
  290. package/types/utils/font-awesome.d.ts +5 -0
  291. package/types/utils/font-awesome.d.ts.map +1 -0
  292. package/types/utils/index.d.ts +2 -1
  293. package/types/utils/system.d.ts +113 -0
  294. package/types/utils/system.d.ts.map +1 -0
@@ -0,0 +1,206 @@
1
+
2
+ ////
3
+ /// @group sticky-list
4
+ ////
5
+ /// Sticky first column, sticky elements inside adjacent columns to first. (Sticky list with header)
6
+
7
+ @use "sass:map";
8
+ @use "sass:meta";
9
+ @use "sass:color" as sassColor;
10
+
11
+ @use "../color";
12
+ @use "../element";
13
+ @use "../breakpoint";
14
+ @use "../typography";
15
+ @use "../utils";
16
+ @use "../selector";
17
+
18
+ // Used for function fallback
19
+ $-fallbacks: (
20
+ "margin" : (
21
+ "function" : meta.get-function("get", false, "element"),
22
+ "property" : "margin"
23
+ ),
24
+ );
25
+
26
+ /// Module Settings
27
+ /// @type Map
28
+ /// @prop {Color} background-color [transparent] Background color for the entire slider section.
29
+ /// @prop {Number} margin [true] Margin on ends of component (defaults to element margin)
30
+ /// @prop {Number} mask-offset-bottom [55vh] The offset for the mask (on bottom)
31
+ /// @prop {Number} mask-offset-top [5rem] The offset for the mask (on top)
32
+ /// @prop {Number} sticky-top [45vh] When to stick
33
+ /// @prop {String} breakpoint ["medium"] The upward breakpoint that this is allowed to be sticky
34
+ /// @prop {String} type-size ["medium"] The typography size to use for title
35
+ /// @prop {Number} title-width [40%] The width of the title when this is displayed in columns
36
+ /// @prop {Number} title-min-width [8em] The min width for title when displayed in columns
37
+ /// @prop {CssValue} title-text-align [right] Text alignment for title when displayed in columns
38
+ /// @prop {Number} item-padding-x [0] Optional padding on the left/right for items
39
+ /// @prop {Number} gap [2rem] The gap between title and items when displayed in columns
40
+ /// @prop {Color} background-color [white] The background color used for the mask
41
+ /// @prop {List} background-contexts Adjust the background mask color by contextual selectors. Pass List of Maps with ("selector" [parent/contextual selector], "background-color", "item-padding-x" [optional])
42
+
43
+ $config: (
44
+ "margin" : true,
45
+ "mask-offset-bottom" : 55vh,
46
+ "mask-offset-top" : 5rem,
47
+ "sticky-top" : 45vh,
48
+ "breakpoint" : "medium",
49
+ "type-size" : "large",
50
+ "title-width" : 40%,
51
+ "title-min-width" : 8em,
52
+ "title-text-align" : right,
53
+ "item-padding-x" : 0,
54
+ "gap" : 2rem,
55
+ "background-color" : white,
56
+ "background-contexts" : (
57
+ (
58
+ "selector" : ".background-dark",
59
+ "background-color" : black,
60
+ "item-padding-x" : 1em
61
+ ),
62
+ )
63
+ );
64
+
65
+ /// Change modules $config
66
+ /// @param {Map} $changes Map of changes
67
+ /// @example scss
68
+ /// @include ulu.component-sticky-list-set(( "property" : value ));
69
+
70
+ @mixin set($changes) {
71
+ $config: map.merge($config, $changes) !global;
72
+ }
73
+
74
+ /// Set sizes map
75
+ /// @param {Map} $changes Map of changes
76
+ /// @param {String} $merge-mode Merge mode see utils.map-merge() [null|"deep"|"overwrite"]
77
+
78
+ @mixin set-sizes($changes, $merge-mode: null) {
79
+ $sizes: utils.map-merge($sizes, $changes, $merge-mode) !global;
80
+ }
81
+
82
+ /// Get a config option
83
+ /// @param {Map} $name Name of property
84
+ /// @example scss
85
+ /// @include ulu.component-sticky-list-get("property");
86
+
87
+ @function get($name) {
88
+ $value: utils.require-map-get($config, $name, "sticky-list [config]");
89
+ @return utils.function-fallback($name, $value, $-fallbacks);
90
+ }
91
+
92
+ /// Prints component styles
93
+ /// @demo sticky-list
94
+ /// @example scss
95
+ /// @include ulu.component-sticky-list-styles();
96
+ /// @example html {preview}
97
+ /// <div class="sticky-list">
98
+ /// <strong class="sticky-list__title">Example:</strong>
99
+ /// <ul class="sticky-list__list">
100
+ /// <li class="sticky-list__item">
101
+ /// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec nisl magna
102
+ /// </li>
103
+ /// <li class="sticky-list__item">
104
+ /// Aenean sollicitudin mauris lectus, blandit suscipit lectus fringilla sed
105
+ /// </li>
106
+ /// <li class="sticky-list__item">
107
+ /// Suspendisse sollicitudin, justo sed efficitur tempor, risus
108
+ /// </li>
109
+ /// <li class="sticky-list__item">
110
+ /// Suspendisse sollicitudin, justo sed efficitur tempor, risus
111
+ /// </li>
112
+ /// <li class="sticky-list__item">
113
+ /// Suspendisse sollicitudin, justo sed efficitur tempor, risus
114
+ /// </li>
115
+ /// </ul>
116
+ /// </div>
117
+
118
+ @mixin styles {
119
+ $prefix: selector.class("sticky-list");
120
+ $mask-offset-top: get("mask-offset-top");
121
+ $mask-offset-bottom: get("mask-offset-bottom");
122
+ $type-size: get("type-size");
123
+ $sticky-top: get("sticky-top");
124
+
125
+ #{ $prefix } {
126
+ padding: get("margin") 0;
127
+ }
128
+ @include breakpoint.min(get("breakpoint")) {
129
+ #{ $prefix } {
130
+ display: flex;
131
+ align-items: flex-start;
132
+ gap: get("gap");
133
+ position: relative;
134
+ @if ($type-size and typography.has-size($type-size)) {
135
+ @include typography.size($type-size, $only-font-size: true);
136
+ } @else if ($type-size) {
137
+ @warn "Unable to find '#{$type-size}' typography size for title";
138
+ }
139
+ }
140
+ #{ $prefix }__title,
141
+ #{ $prefix } > :not(ul) {
142
+ display: block;
143
+ position: sticky;
144
+ top: $sticky-top;
145
+ flex-basis: get("title-width");
146
+ min-width: get("title-min-width");
147
+ padding-top: $mask-offset-top;
148
+ padding-bottom: $mask-offset-bottom;
149
+ text-align: get("title-text-align");
150
+ }
151
+ #{ $prefix }__list,
152
+ #{ $prefix } > ul {
153
+ list-style: none;
154
+ margin: 0;
155
+ display: flex;
156
+ flex-direction: column;
157
+ justify-content: space-between;
158
+ align-self: stretch;
159
+ }
160
+ #{ $prefix }__item,
161
+ #{ $prefix } > ul > li {
162
+ display: block;
163
+ position: sticky;
164
+ top: $sticky-top;
165
+ margin: 0 !important; // If in editor (to complicated for :not())
166
+ padding: $mask-offset-top get("item-padding-x") $mask-offset-bottom get("item-padding-x");
167
+ @include set-background(get("background-color"));
168
+ }
169
+ #{ $prefix }__item:first-child,
170
+ #{ $prefix } > ul > li:first-child {
171
+ margin-top: 0;
172
+ }
173
+ #{ $prefix }__item:last-child,
174
+ #{ $prefix } > ul > li:last-child {
175
+ margin-bottom: 0;
176
+ }
177
+ }
178
+
179
+ // Print out any contextual background styles
180
+ @each $props in get("background-contexts") {
181
+ $selector: map.get($props, "selector");
182
+ $item-padding-x: map.get($props, "item-padding-x");
183
+ @include breakpoint.min(get("breakpoint")) {
184
+ #{ $selector } {
185
+ #{ $prefix }__item,
186
+ #{ $prefix } > ul > li {
187
+ @if ($item-padding-x) {
188
+ padding-left: $item-padding-x;
189
+ padding-right: $item-padding-x;
190
+ }
191
+ @include set-background(map.get($props, "background-color"));
192
+ }
193
+ }
194
+ }
195
+ }
196
+ }
197
+
198
+ /// Outputs background color mask CSS (gradient from transparent to original color)
199
+ /// @param {Color} $color The color to create the CSS for
200
+
201
+ @mixin set-background($color) {
202
+ $color: color.get($color);
203
+ $color-transparent: sassColor.change($color, $alpha: 0);
204
+ background-color: $color;
205
+ background: linear-gradient(180deg, $color-transparent 0%, $color get("mask-offset-top"));
206
+ }
@@ -9,6 +9,7 @@
9
9
  @use "../color";
10
10
  @use "../selector";
11
11
  @use "../breakpoint";
12
+ @use "../layout";
12
13
  @use "../typography";
13
14
  @use "../element";
14
15
  @use "../utils";
@@ -39,6 +40,8 @@ $-fallbacks: (
39
40
  /// @prop {Dimension} tabpanel-padding [(2rem,)] Padding for the tabpanel
40
41
  /// @prop {Dimension} indicator-size [0.25em] The size of the tab's active border/indicator
41
42
  /// @prop {Color} indicator-color [currentColor] The color of the indicator
43
+ /// @prop {Color} indicator-transition-duration [200ms] The transition duration for indicator
44
+ /// @prop {Color} indicator-scale-start [0] The starting scale for the indicator (set to 1 to disable expanding on click)
42
45
  /// @prop {Color} tab-color [link] The type color for the tabs. This uses color.scss, so the value of this options should be a variable from color.scss.
43
46
  /// @prop {Color} tab-color-hover [link-hover] The type color for the tabs when hovered or focused. This uses color.scss, so the value of this options should be a variable from color.scss.
44
47
  /// @prop {Color} tab-color-selected [selected] The tab type color when selected. This uses color.scss, so the value of this options should be a variable from color.scss.
@@ -55,14 +58,17 @@ $-fallbacks: (
55
58
  /// @prop {Boolean} horizontal-tab-wrap [false] Set to true to allow line wrapping when the tabs are in horizontal orientation, vertical is always allowed to wrap
56
59
 
57
60
  $config: (
58
- "margin" : (2rem, 0),
61
+ "margin" : (2rem 0),
59
62
  "print-margin" : 1.5em,
60
63
  "tablist-divider" : true,
61
64
  "tablist-divider-width" : 1px,
62
65
  "indicator-size" : 3px,
63
66
  "indicator-color" : currentColor,
67
+ "indicator-transition-duration" : 200ms,
68
+ "indicator-transition-timing" : ease-out,
69
+ "indicator-scale-start" : 0,
64
70
  "tab-color" : "type-tertiary",
65
- "tab-color-hover" : "link-hover",
71
+ "tab-color-hover" : "selected",
66
72
  "tab-color-selected" : "selected",
67
73
  "tab-background-color-selected" : null,
68
74
  "tab-font-weight" : true,
@@ -118,6 +124,7 @@ $config: (
118
124
  overflow-x: auto;
119
125
  border-bottom: get("tablist-divider");
120
126
  border-bottom-width: get("tablist-divider-width");
127
+ @include layout.remove-scrollbar();
121
128
  }
122
129
  [role="tab"] {
123
130
  display: block;
@@ -140,17 +147,28 @@ $config: (
140
147
  left: 0;
141
148
  right: 0;
142
149
  height: get("indicator-size");
150
+ transition-property: opacity, background-color, transform;
151
+ transition-duration: get("indicator-transition-duration");
152
+ transition-timing-function: get("indicator-transition-timing");
153
+ transform: scaleX(get("indicator-scale-start"));
154
+ transform-origin: center;
143
155
  }
144
156
  &:hover {
145
157
  color: color.get(get("tab-color-hover"));
146
158
  }
159
+ // Add focus so as user clicks item it starts the active state styling
160
+ &:focus,
147
161
  &[aria-selected="true"] {
148
- color: color.get(get("tab-color-selected"));
149
- background-color: color.get(get("tab-background-color-selected"));
162
+ outline: none; // We are providing focus styling
150
163
  &::after {
151
164
  opacity: 1;
165
+ transform: scaleX(1);
152
166
  }
153
167
  }
168
+ &[aria-selected="true"] {
169
+ color: color.get(get("tab-color-selected"));
170
+ background-color: color.get(get("tab-background-color-selected"));
171
+ }
154
172
  }
155
173
  [role="tabpanel"] {
156
174
  position: relative;
@@ -8,10 +8,12 @@
8
8
  @use "sass:map";
9
9
  @use "../utils";
10
10
  @use "../selector";
11
+ @use "../layout";
11
12
 
12
13
  /// Module Settings
13
14
  /// @type Map
14
15
  /// @prop {Color} background-color [rgb(0,0,0)] Color used for the fade-in of the vignette. Must be actual color not color module palette name
16
+ /// @prop {CssValue} image-filter [saturate(85%)] Filter value placed over image.
15
17
 
16
18
  $config: (
17
19
  "background-color" : rgb(0,0,0),
@@ -48,11 +50,7 @@ $config: (
48
50
  &::after {
49
51
  content: "";
50
52
  display: block;
51
- position: absolute;
52
- top: 0;
53
- bottom: 0;
54
- left: 0;
55
- right: 0;
53
+ @include layout.absolute-fill();
56
54
  background: linear-gradient(0deg,color.change(get("background-color"), $alpha: 0.8),color.change(get("background-color"), $alpha: 0) 45%);
57
55
  pointer-events: none;
58
56
  }
@@ -20,53 +20,50 @@
20
20
 
21
21
  @include utils.file-header('helpers', 'display');
22
22
 
23
- $hiddenVisuallyPrefix: selector.class("hidden-visually");
23
+ $prefix-hidden-visually: selector.class("hidden-visually");
24
+ $prefix-display: selector.class("display");
25
+ $prefix-hidden: selector.class("hidden");
24
26
 
25
- #{ $hiddenVisuallyPrefix } {
27
+ #{ $prefix-hidden-visually } {
26
28
  @include element.hidden-visually();
27
29
  }
28
- #{ $hiddenVisuallyPrefix }-focusable {
30
+ #{ $prefix-hidden-visually }-focusable {
29
31
  &:not(:active):not(:focus) {
30
32
  @include element.hidden-visually();
31
33
  }
32
34
  }
33
- // Consider removing
34
- .clearfix,
35
- .cf {
36
- @include layout.clearfix();
37
- }
38
- .display-block {
35
+ #{ $prefix-display }-block {
39
36
  display: block;
40
37
  }
41
- .display-flex {
38
+ #{ $prefix-display }-flex {
42
39
  display: flex;
43
40
  }
44
- .display-inline-flex {
41
+ #{ $prefix-display }-inline-flex {
45
42
  display: inline-flex;
46
43
  }
47
- .display-inline {
44
+ #{ $prefix-display }-inline {
48
45
  display: inline;
49
46
  }
50
- .display-inline-all * {
47
+ #{ $prefix-display }-inline-all * {
51
48
  display: inline;
52
49
  }
53
- .display-inline-block {
50
+ #{ $prefix-display }-inline-block {
54
51
  display: inline-block;
55
52
  }
56
- .hidden,
57
- .display-none {
53
+ #{ $prefix-hidden },
54
+ #{ $prefix-display }-none {
58
55
  display: none !important;
59
56
  }
60
57
 
61
58
  // Display none per breakpoint
62
59
  @each $name in map.keys(breakpoint.$sizes) {
63
60
  @include breakpoint.min($name) {
64
- .hidden-min-#{ $name } {
61
+ #{ $prefix-hidden }-min-#{ $name } {
65
62
  display: none !important;
66
63
  }
67
64
  }
68
65
  @include breakpoint.max($name) {
69
- .hidden-max-#{ $name } {
66
+ #{ $prefix-hidden }-max-#{ $name } {
70
67
  display: none !important;
71
68
  }
72
69
  }
@@ -8,18 +8,23 @@
8
8
  /// @example scss
9
9
  /// @include ulu.helper-print-styles();
10
10
 
11
+ @use "../selector";
12
+
11
13
  @mixin styles {
14
+ $prefix-print: selector.class("print");
15
+ $prefix-no-print: selector.class("no-print");
12
16
 
13
- .print-exact {
14
- print-color-adjust: exact;
15
- -webkit-print-color-adjust: exact;
16
- }
17
- .no-print {
17
+ #{ $prefix-no-print } {
18
18
  @media print {
19
19
  display: none !important;
20
20
  }
21
21
  }
22
- .print-only {
22
+
23
+ #{ $prefix-print }-exact {
24
+ print-color-adjust: exact;
25
+ -webkit-print-color-adjust: exact;
26
+ }
27
+ #{ $prefix-print }-only {
23
28
  @media screen {
24
29
  display: none !important;
25
30
  }
@@ -27,7 +32,7 @@
27
32
  // Utility for making dark backgrounds print "ok"
28
33
  // - Grayscale added because colors are flipped
29
34
  // - Rotating colors doesn't really work
30
- .print-invert {
35
+ #{ $prefix-print }-invert {
31
36
  @media print {
32
37
  filter: invert(1) saturate(0);
33
38
  }
@@ -5,6 +5,7 @@
5
5
 
6
6
  @use "../utils";
7
7
  @use "../layout";
8
+ @use "../selector";
8
9
 
9
10
  /// Print utilities helper styles
10
11
  /// - Includes classes like (.crop-margins, .no-scroll-y, .image-full-width, etc)
@@ -13,99 +14,108 @@
13
14
 
14
15
  @mixin styles {
15
16
 
17
+ $prefix-no-scroll: selector.class("no-scroll");
18
+ $prefix-image: selector.class("image");
19
+ $prefix-margin: selector.class("margin");
20
+ $prefix-no-margin: selector.class("no-margin");
21
+ $prefix-crop-margins: selector.class("crop-margins");
22
+ $prefix-no-padding: selector.class("no-padding");
23
+ $prefix-align-self: selector.class("align-self");
24
+
25
+
16
26
  @include utils.file-header('helpers', 'utilities');
17
27
 
18
28
  // Consider removing
19
- .no-scroll-y {
29
+ #{ $prefix-no-scroll }-y {
20
30
  overflow-y: hidden;
21
31
  }
22
- .no-scroll-x {
32
+ #{ $prefix-no-scroll }-x {
23
33
  overflow-x: hidden;
24
34
  }
25
- .full-height {
35
+ #{ selector.class("full-height") } {
26
36
  height: 100%;
27
37
  }
28
- .full-width {
38
+ #{ selector.class("full-width") } {
29
39
  width: 100%;
30
40
  }
31
- .flex-basis-full {
41
+ #{ selector.class("flex-basis-full") } {
32
42
  flex-basis: 100%;
33
43
  }
34
- .full-min-height {
44
+ #{ selector.class("full-min-height") } {
35
45
  min-height: 100%;
36
46
  }
37
- .image-fill {
47
+ #{ $prefix-image }-fill {
38
48
  width: 100%;
39
49
  height: 100%;
40
50
  object-fit: cover;
41
51
  }
42
- .image-full-width img,
43
- .image-full-width {
52
+ #{ $prefix-image }-full-width img,
53
+ #{ $prefix-image }-full-width {
44
54
  width: 100%;
45
55
  height: auto;
46
56
  }
47
- .margin-auto,
48
- .center {
57
+ #{ $prefix-margin }-auto,
58
+ #{ selector.class("center") } {
49
59
  margin-left: auto;
50
60
  margin-right: auto;
51
61
  }
52
- .margin-left-auto {
53
- margin-left: auto;
62
+ #{ $prefix-margin }-left-auto {
63
+ margin-left: auto;
54
64
  }
55
- .margin-right-auto {
65
+ #{ $prefix-margin }-right-auto {
56
66
  margin-right: auto;
57
67
  }
58
- .no-margin {
68
+ #{ $prefix-no-margin } {
59
69
  margin: 0;
60
70
  }
61
- .no-margin-top {
71
+ #{ $prefix-no-margin }-top {
62
72
  margin-top: 0;
63
73
  }
64
- .no-margin-bottom {
74
+ #{ $prefix-no-margin }-bottom {
65
75
  margin-bottom: 0;
66
76
  }
67
- .no-margin-left {
77
+ #{ $prefix-no-margin }-left {
68
78
  margin-left: 0;
69
79
  }
70
- .no-margin-right {
80
+ #{ $prefix-no-margin }-right {
71
81
  margin-right: 0;
72
82
  }
73
- .crop-margins {
74
- &:not(.crop-margins--last) >:first-child {
83
+ #{ $prefix-crop-margins } {
84
+ &:not( #{ $prefix-crop-margins }--last) >:first-child {
75
85
  margin-top: 0;
76
86
  }
77
- &:not(.crop-margins--first) >:last-child {
87
+ &:not( #{ $prefix-crop-margins }--first) >:last-child {
78
88
  margin-bottom: 0;
79
89
  }
80
90
  }
81
- .no-padding {
91
+ #{ $prefix-no-padding } {
82
92
  padding: 0;
83
93
  }
84
- .no-padding-top {
94
+ #{ $prefix-no-padding }-top {
85
95
  padding-top: 0;
86
96
  }
87
- .no-padding-bottom {
97
+ #{ $prefix-no-padding }-bottom {
88
98
  padding-bottom: 0;
89
99
  }
90
- .no-padding-left {
100
+ #{ $prefix-no-padding }-left {
91
101
  padding-left: 0;
92
102
  }
93
- .no-padding-right {
103
+ #{ $prefix-no-padding }-right {
94
104
  padding-right: 0;
95
105
  }
96
- .align-self-start {
106
+ #{ $prefix-align-self }-start {
97
107
  align-self: start;
98
108
  }
99
- .align-self-center {
109
+ #{ $prefix-align-self }-center {
100
110
  align-self: center;
101
111
  }
102
- .align-self-end {
112
+ #{ $prefix-align-self }-end {
103
113
  align-self: end;
104
114
  }
105
- .align-self-baseline {
115
+ #{ $prefix-align-self }-baseline {
106
116
  align-self: baseline;
107
117
  }
108
- .overflow-hidden {
118
+ #{ selector.class("overflow-hidden") } {
109
119
  overflow: hidden;
110
120
  }
111
121
  // .justify-self-center {
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Triggers one of our custom events
2
+ * Triggers one of our custom events (page/document level events)
3
+ * - UI components may dispatch their own events, this is just used for system wide events
3
4
  * @param {String} type Type of event to dispatch
4
5
  * @param {Node} context Element to trigger the event from
5
6
  * @example
@@ -10,8 +11,16 @@
10
11
  export function dispatch(type: string, context: Node): void;
11
12
  /**
12
13
  * Namespaced event
14
+ * - Should be used for all ulu script/component events
13
15
  * @param {String} type Type of event to get the actual event name for
14
16
  * @returns {String}
15
17
  */
16
18
  export function getName(type: string): string;
19
+ /**
20
+ * Create ulu namespaced custom event
21
+ * @param {String} type Event base name (not prefixed)
22
+ * @param {any} data Custom data to pass with the event (will be available as `event.detail`)
23
+ * @param {Object} options CustomEvent options default `{ bubbles: true }`. If `detail` is also provided, it will be merged with this options object and will override the 'data' argument for this function
24
+ */
25
+ export function createEvent(type: string, data?: any, options?: any): CustomEvent<any>;
17
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../js/events/index.js"],"names":[],"mappings":"AA6CA;;;;;;;;GAQG;AACH,gDANW,IAAI,QAYd;AAED;;;;GAIG;AACH,8CAEC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../js/events/index.js"],"names":[],"mappings":"AA6CA;;;;;;;;;GASG;AACH,gDANW,IAAI,QAYd;AAED;;;;;GAKG;AACH,8CAEC;AAED;;;;;GAKG;AACH,iDAHW,GAAG,mCAKb"}
package/types/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * as settings from "./settings.js";
1
2
  export * as events from "./events/index.js";
2
3
  export * as ui from "./ui/index.js";
3
4
  export * as utils from "./utils/index.js";
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Retrieves a copy of the default settings.
3
+ * @returns {object} A copy of the default settings object.
4
+ */
5
+ export function getDefaultSettings(): object;
6
+ /**
7
+ * Updates multiple configuration settings.
8
+ * @param {object} changes An object containing the settings to update.
9
+ */
10
+ export function updateSettings(changes: object): void;
11
+ /**
12
+ * Retrieves a copy of the current configuration settings.
13
+ * @returns {object} A copy of the current settings object.
14
+ */
15
+ export function getSettings(): object;
16
+ /**
17
+ * Retrieves a specific configuration setting by key.
18
+ * @param {string} key The key of the setting to retrieve.
19
+ * @returns {*} The value of the setting, or undefined if not found.
20
+ */
21
+ export function getSetting(key: string): any;
22
+ /**
23
+ * Updates a specific configuration setting.
24
+ * @param {string} key The key of the setting to update.
25
+ * @param {*} value The new value for the setting.
26
+ */
27
+ export function updateSetting(key: string, value: any): void;
28
+ /**
29
+ * Creates a wrapped string representation of a configuration setting.
30
+ * This function returns an object with a `toString()` method that, when called,
31
+ * retrieves the current value of the specified setting. This allows the setting
32
+ * to be used as a string literal, dynamically retrieving its value.
33
+ *
34
+ * @param {String} key The key of the setting to wrap.
35
+ * @param {Function} transform Optional function to transform the setting's
36
+ * value when its string representation is requested.
37
+ * @returns {Object} An object with a `toString()` method that returns the
38
+ * (optionally transformed) setting value as a string.
39
+ */
40
+ export function wrapSettingString(key: string, transform: Function): any;
41
+ /**
42
+ * Default settings
43
+ */
44
+ export type Defaults = {
45
+ /**
46
+ * - The CSS class string for the close icon
47
+ */
48
+ iconClassClose: string;
49
+ /**
50
+ * - The CSS class string for the drag X icon
51
+ */
52
+ iconClassDragX: string;
53
+ /**
54
+ * - The CSS class string for the dragging in both directions
55
+ */
56
+ iconClassDragBoth: string;
57
+ /**
58
+ * - The CSS class string for the previous icon
59
+ */
60
+ iconClassPrevious: string;
61
+ /**
62
+ * - The CSS class string for the next icon
63
+ */
64
+ iconClassNext: string;
65
+ /**
66
+ * - The prefix to use for CSS custom properties
67
+ */
68
+ cssvarPrefix: string;
69
+ };
70
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../js/settings.js"],"names":[],"mappings":"AA+BA;;;GAGG;AACH,sCAFa,MAAM,CAIlB;AAED;;;GAGG;AACH,wCAFW,MAAM,QAIhB;AAED;;;GAGG;AACH,+BAFa,MAAM,CAIlB;AAED;;;;GAIG;AACH,gCAHW,MAAM,OAShB;AAED;;;;GAIG;AACH,mCAHW,MAAM,oBAKhB;AAED;;;;;;;;;;;GAWG;AACH,yEAOC;;;;;;;;oBAxFa,MAAM;;;;oBACN,MAAM;;;;uBACN,MAAM;;;;uBACN,MAAM;;;;mBACN,MAAM;;;;kBACN,MAAM"}