@ulu/frontend 0.0.3

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 (323) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -0
  3. package/dist/ulu-frontend.min.css +1 -0
  4. package/dist/ulu-frontend.min.js +1 -0
  5. package/index.js +2 -0
  6. package/js/deprecated/doc-ready.js +28 -0
  7. package/js/deprecated/jquery-prototypes.js +309 -0
  8. package/js/deprecated/mini-collapsible-popper-positioning.js +126 -0
  9. package/js/deprecated/mini-collapsible.js +607 -0
  10. package/js/deprecated/script-loader.js +60 -0
  11. package/js/events/index.js +42 -0
  12. package/js/helpers/css-breakpoint.js +247 -0
  13. package/js/helpers/file-save.js +48 -0
  14. package/js/helpers/node-data-manager.js +74 -0
  15. package/js/helpers/pause-youtube-video.js +42 -0
  16. package/js/helpers/scrollbar-width-property.js +10 -0
  17. package/js/index.js +15 -0
  18. package/js/polyfills/element-closest.js +17 -0
  19. package/js/ui/flipcard.js +202 -0
  20. package/js/ui/grid.js +67 -0
  21. package/js/ui/modals.js +219 -0
  22. package/js/ui/overflow-scroller-pager.js +58 -0
  23. package/js/ui/overflow-scroller.js +160 -0
  24. package/js/ui/programmatic-modal.js +91 -0
  25. package/js/ui/resizer.js +60 -0
  26. package/js/ui/slider.js +468 -0
  27. package/js/ui/tabs.js +109 -0
  28. package/js/ui/tooltip.js +82 -0
  29. package/js/utils/array.js +28 -0
  30. package/js/utils/dom.js +122 -0
  31. package/js/utils/logger.js +69 -0
  32. package/js/utils/object.js +22 -0
  33. package/js/utils/performance.js +43 -0
  34. package/js/utils/regex.js +10 -0
  35. package/js/utils/string.js +107 -0
  36. package/js/waypoints/README.md +3 -0
  37. package/js/waypoints/anchor-menu.js +76 -0
  38. package/js/waypoints/element-waypoint.js +75 -0
  39. package/js/waypoints/examples/page-link-menu.md +106 -0
  40. package/js/waypoints/state-in-attribute.js +32 -0
  41. package/package.json +38 -0
  42. package/scss/README.md +58 -0
  43. package/scss/_breakpoint.scss +190 -0
  44. package/scss/_button.scss +241 -0
  45. package/scss/_calculate.scss +64 -0
  46. package/scss/_color.scss +211 -0
  47. package/scss/_cssvar.scss +116 -0
  48. package/scss/_element.scss +276 -0
  49. package/scss/_grid.scss +699 -0
  50. package/scss/_index.scss +29 -0
  51. package/scss/_layout.scss +202 -0
  52. package/scss/_path.scss +58 -0
  53. package/scss/_selector.scss +81 -0
  54. package/scss/_typography.scss +320 -0
  55. package/scss/_units.scss +47 -0
  56. package/scss/_utility.scss +12 -0
  57. package/scss/_utils.scss +209 -0
  58. package/scss/base/_color.scss +13 -0
  59. package/scss/base/_elements.scss +188 -0
  60. package/scss/base/_index.scss +62 -0
  61. package/scss/base/_keyframes.scss +78 -0
  62. package/scss/base/_layout.scss +100 -0
  63. package/scss/base/_normalize.scss +315 -0
  64. package/scss/base/_typography.scss +41 -0
  65. package/scss/components/README.md +5 -0
  66. package/scss/components/README.todos +15 -0
  67. package/scss/components/_button.scss +95 -0
  68. package/scss/components/_index.scss +63 -0
  69. package/scss/components/_links.scss +34 -0
  70. package/scss/components/_list-lines.scss +73 -0
  71. package/scss/components/_list-ordered.scss +16 -0
  72. package/scss/components/_list-unordered.scss +21 -0
  73. package/scss/components/_rule.scss +93 -0
  74. package/scss/helpers/_color.scss +14 -0
  75. package/scss/helpers/_display.scss +73 -0
  76. package/scss/helpers/_index.scss +67 -0
  77. package/scss/helpers/_print.scss +58 -0
  78. package/scss/helpers/_typography.scss +80 -0
  79. package/scss/helpers/_units.scss +79 -0
  80. package/scss/helpers/_utilities.scss +102 -0
  81. package/scss/stylesheets/README.md +3 -0
  82. package/scss/stylesheets/full.scss +17 -0
  83. package/trash/js-old/deprecated/doc-ready.js +28 -0
  84. package/trash/js-old/deprecated/jquery-prototypes.js +309 -0
  85. package/trash/js-old/deprecated/mini-collapsible-popper-positioning.js +126 -0
  86. package/trash/js-old/deprecated/mini-collapsible.js +607 -0
  87. package/trash/js-old/deprecated/script-loader.js +60 -0
  88. package/trash/js-old/events/index.js +42 -0
  89. package/trash/js-old/helpers/css-breakpoint.js +247 -0
  90. package/trash/js-old/helpers/file-save.js +48 -0
  91. package/trash/js-old/helpers/node-data-manager.js +74 -0
  92. package/trash/js-old/helpers/pause-youtube-video.js +42 -0
  93. package/trash/js-old/index.js +15 -0
  94. package/trash/js-old/polyfills/element-closest.js +17 -0
  95. package/trash/js-old/ui/flipcard.js +202 -0
  96. package/trash/js-old/ui/grid.js +67 -0
  97. package/trash/js-old/ui/modals.js +219 -0
  98. package/trash/js-old/ui/programmatic-modal.js +91 -0
  99. package/trash/js-old/ui/resizer.js +60 -0
  100. package/trash/js-old/ui/slider.js +469 -0
  101. package/trash/js-old/ui/tabs.js +109 -0
  102. package/trash/js-old/ui/tooltip.js +82 -0
  103. package/trash/js-old/utils/array.js +28 -0
  104. package/trash/js-old/utils/dom.js +122 -0
  105. package/trash/js-old/utils/logger.js +69 -0
  106. package/trash/js-old/utils/object.js +22 -0
  107. package/trash/js-old/utils/performance.js +43 -0
  108. package/trash/js-old/utils/regex.js +10 -0
  109. package/trash/js-old/utils/string.js +107 -0
  110. package/trash/js-old/waypoints/README.md +3 -0
  111. package/trash/js-old/waypoints/anchor-menu.js +76 -0
  112. package/trash/js-old/waypoints/element-waypoint.js +75 -0
  113. package/trash/js-old/waypoints/examples/page-link-menu.md +106 -0
  114. package/trash/js-old/waypoints/state-in-attribute.js +32 -0
  115. package/trash/js-old-230729/deprecated/doc-ready.js +28 -0
  116. package/trash/js-old-230729/deprecated/jquery-prototypes.js +309 -0
  117. package/trash/js-old-230729/deprecated/mini-collapsible-popper-positioning.js +126 -0
  118. package/trash/js-old-230729/deprecated/mini-collapsible.js +607 -0
  119. package/trash/js-old-230729/deprecated/script-loader.js +60 -0
  120. package/trash/js-old-230729/events/index.js +42 -0
  121. package/trash/js-old-230729/helpers/css-breakpoint.js +247 -0
  122. package/trash/js-old-230729/helpers/file-save.js +48 -0
  123. package/trash/js-old-230729/helpers/node-data-manager.js +74 -0
  124. package/trash/js-old-230729/helpers/pause-youtube-video.js +42 -0
  125. package/trash/js-old-230729/helpers/scrollbar-width-property.js +10 -0
  126. package/trash/js-old-230729/index.js +15 -0
  127. package/trash/js-old-230729/polyfills/element-closest.js +17 -0
  128. package/trash/js-old-230729/ui/flipcard.js +202 -0
  129. package/trash/js-old-230729/ui/grid.js +67 -0
  130. package/trash/js-old-230729/ui/modals.js +219 -0
  131. package/trash/js-old-230729/ui/overflow-scroller-pager.js +58 -0
  132. package/trash/js-old-230729/ui/overflow-scroller.js +160 -0
  133. package/trash/js-old-230729/ui/programmatic-modal.js +91 -0
  134. package/trash/js-old-230729/ui/resizer.js +60 -0
  135. package/trash/js-old-230729/ui/slider.js +468 -0
  136. package/trash/js-old-230729/ui/tabs.js +109 -0
  137. package/trash/js-old-230729/ui/tooltip.js +82 -0
  138. package/trash/js-old-230729/utils/array.js +28 -0
  139. package/trash/js-old-230729/utils/dom.js +122 -0
  140. package/trash/js-old-230729/utils/logger.js +69 -0
  141. package/trash/js-old-230729/utils/object.js +22 -0
  142. package/trash/js-old-230729/utils/performance.js +43 -0
  143. package/trash/js-old-230729/utils/regex.js +10 -0
  144. package/trash/js-old-230729/utils/string.js +107 -0
  145. package/trash/js-old-230729/waypoints/README.md +3 -0
  146. package/trash/js-old-230729/waypoints/anchor-menu.js +76 -0
  147. package/trash/js-old-230729/waypoints/element-waypoint.js +75 -0
  148. package/trash/js-old-230729/waypoints/examples/page-link-menu.md +106 -0
  149. package/trash/js-old-230729/waypoints/state-in-attribute.js +32 -0
  150. package/trash/logo-1.svg +13 -0
  151. package/trash/logo.svg +16 -0
  152. package/trash/scss-before-cqc-update/README.md +58 -0
  153. package/trash/scss-before-cqc-update/_breakpoint.scss +190 -0
  154. package/trash/scss-before-cqc-update/_button.scss +229 -0
  155. package/trash/scss-before-cqc-update/_calculate.scss +65 -0
  156. package/trash/scss-before-cqc-update/_color.scss +211 -0
  157. package/trash/scss-before-cqc-update/_cssvar.scss +116 -0
  158. package/trash/scss-before-cqc-update/_element.scss +275 -0
  159. package/trash/scss-before-cqc-update/_index.scss +29 -0
  160. package/trash/scss-before-cqc-update/_layout.scss +247 -0
  161. package/trash/scss-before-cqc-update/_path.scss +59 -0
  162. package/trash/scss-before-cqc-update/_selector.scss +82 -0
  163. package/trash/scss-before-cqc-update/_typography.scss +322 -0
  164. package/trash/scss-before-cqc-update/_units.scss +48 -0
  165. package/trash/scss-before-cqc-update/_utility.scss +13 -0
  166. package/trash/scss-before-cqc-update/_utils.scss +211 -0
  167. package/trash/scss-before-cqc-update/base/_color.scss +14 -0
  168. package/trash/scss-before-cqc-update/base/_elements.scss +189 -0
  169. package/trash/scss-before-cqc-update/base/_index.scss +63 -0
  170. package/trash/scss-before-cqc-update/base/_keyframes.scss +74 -0
  171. package/trash/scss-before-cqc-update/base/_layout.scss +88 -0
  172. package/trash/scss-before-cqc-update/base/_normalize.scss +316 -0
  173. package/trash/scss-before-cqc-update/base/_typography.scss +42 -0
  174. package/trash/scss-before-cqc-update/components/README.md +5 -0
  175. package/trash/scss-before-cqc-update/components/README.todos +15 -0
  176. package/trash/scss-before-cqc-update/components/_button.scss +96 -0
  177. package/trash/scss-before-cqc-update/components/_grid.scss +671 -0
  178. package/trash/scss-before-cqc-update/components/_index.scss +70 -0
  179. package/trash/scss-before-cqc-update/components/_links.scss +35 -0
  180. package/trash/scss-before-cqc-update/components/_list-lines.scss +74 -0
  181. package/trash/scss-before-cqc-update/components/_list-ordered.scss +17 -0
  182. package/trash/scss-before-cqc-update/components/_list-unordered.scss +22 -0
  183. package/trash/scss-before-cqc-update/components/_rule.scss +94 -0
  184. package/trash/scss-before-cqc-update/helpers/_color.scss +15 -0
  185. package/trash/scss-before-cqc-update/helpers/_display.scss +73 -0
  186. package/trash/scss-before-cqc-update/helpers/_index.scss +68 -0
  187. package/trash/scss-before-cqc-update/helpers/_print.scss +59 -0
  188. package/trash/scss-before-cqc-update/helpers/_typography.scss +73 -0
  189. package/trash/scss-before-cqc-update/helpers/_units.scss +79 -0
  190. package/trash/scss-before-cqc-update/helpers/_utilities.scss +88 -0
  191. package/trash/scss-before-cqc-update/stylesheets/README.md +3 -0
  192. package/trash/scss-before-cqc-update/stylesheets/full.scss +17 -0
  193. package/trash/scss-old/README.md +58 -0
  194. package/trash/scss-old/_breakpoint.scss +140 -0
  195. package/trash/scss-old/_button.scss +223 -0
  196. package/trash/scss-old/_calculate.scss +64 -0
  197. package/trash/scss-old/_color.scss +200 -0
  198. package/trash/scss-old/_element.scss +262 -0
  199. package/trash/scss-old/_grid.scss +558 -0
  200. package/trash/scss-old/_index.scss +25 -0
  201. package/trash/scss-old/_layout.scss +170 -0
  202. package/trash/scss-old/_path.scss +58 -0
  203. package/trash/scss-old/_selector.scss +81 -0
  204. package/trash/scss-old/_typography.scss +320 -0
  205. package/trash/scss-old/_units.scss +47 -0
  206. package/trash/scss-old/_utility.scss +12 -0
  207. package/trash/scss-old/_utils.scss +186 -0
  208. package/trash/scss-old/base/_color.scss +13 -0
  209. package/trash/scss-old/base/_elements.scss +183 -0
  210. package/trash/scss-old/base/_index.scss +62 -0
  211. package/trash/scss-old/base/_keyframes.scss +74 -0
  212. package/trash/scss-old/base/_layout.scss +81 -0
  213. package/trash/scss-old/base/_normalize.scss +316 -0
  214. package/trash/scss-old/base/_typography.scss +42 -0
  215. package/trash/scss-old/components/README.md +5 -0
  216. package/trash/scss-old/components/README.todos +15 -0
  217. package/trash/scss-old/components/_button.scss +74 -0
  218. package/trash/scss-old/components/_index.scss +63 -0
  219. package/trash/scss-old/components/_links.scss +34 -0
  220. package/trash/scss-old/components/_list-lines.scss +73 -0
  221. package/trash/scss-old/components/_list-ordered.scss +16 -0
  222. package/trash/scss-old/components/_list-unordered.scss +21 -0
  223. package/trash/scss-old/components/_rule.scss +84 -0
  224. package/trash/scss-old/helpers/_color.scss +14 -0
  225. package/trash/scss-old/helpers/_display.scss +68 -0
  226. package/trash/scss-old/helpers/_index.scss +67 -0
  227. package/trash/scss-old/helpers/_print.scss +59 -0
  228. package/trash/scss-old/helpers/_typography.scss +73 -0
  229. package/trash/scss-old/helpers/_units.scss +68 -0
  230. package/trash/scss-old/helpers/_utilities.scss +82 -0
  231. package/trash/scss-old/packages/README.md +3 -0
  232. package/trash/scss-old/packages/everything.scss +17 -0
  233. package/trash/scss-old-2/README.md +58 -0
  234. package/trash/scss-old-2/_breakpoint.scss +139 -0
  235. package/trash/scss-old-2/_button.scss +223 -0
  236. package/trash/scss-old-2/_calculate.scss +64 -0
  237. package/trash/scss-old-2/_color.scss +202 -0
  238. package/trash/scss-old-2/_element.scss +263 -0
  239. package/trash/scss-old-2/_grid.scss +558 -0
  240. package/trash/scss-old-2/_index.scss +25 -0
  241. package/trash/scss-old-2/_layout.scss +170 -0
  242. package/trash/scss-old-2/_path.scss +58 -0
  243. package/trash/scss-old-2/_selector.scss +81 -0
  244. package/trash/scss-old-2/_typography.scss +320 -0
  245. package/trash/scss-old-2/_units.scss +47 -0
  246. package/trash/scss-old-2/_utility.scss +12 -0
  247. package/trash/scss-old-2/_utils.scss +186 -0
  248. package/trash/scss-old-2/base/_color.scss +13 -0
  249. package/trash/scss-old-2/base/_elements.scss +182 -0
  250. package/trash/scss-old-2/base/_index.scss +62 -0
  251. package/trash/scss-old-2/base/_keyframes.scss +73 -0
  252. package/trash/scss-old-2/base/_layout.scss +83 -0
  253. package/trash/scss-old-2/base/_normalize.scss +315 -0
  254. package/trash/scss-old-2/base/_typography.scss +41 -0
  255. package/trash/scss-old-2/components/README.md +5 -0
  256. package/trash/scss-old-2/components/README.todos +15 -0
  257. package/trash/scss-old-2/components/_button.scss +95 -0
  258. package/trash/scss-old-2/components/_index.scss +63 -0
  259. package/trash/scss-old-2/components/_links.scss +33 -0
  260. package/trash/scss-old-2/components/_list-lines.scss +73 -0
  261. package/trash/scss-old-2/components/_list-ordered.scss +16 -0
  262. package/trash/scss-old-2/components/_list-unordered.scss +21 -0
  263. package/trash/scss-old-2/components/_rule.scss +84 -0
  264. package/trash/scss-old-2/helpers/_color.scss +14 -0
  265. package/trash/scss-old-2/helpers/_display.scss +67 -0
  266. package/trash/scss-old-2/helpers/_index.scss +67 -0
  267. package/trash/scss-old-2/helpers/_print.scss +58 -0
  268. package/trash/scss-old-2/helpers/_typography.scss +72 -0
  269. package/trash/scss-old-2/helpers/_units.scss +68 -0
  270. package/trash/scss-old-2/helpers/_utilities.scss +81 -0
  271. package/trash/scss-old-2/packages/README.md +3 -0
  272. package/trash/scss-old-2/packages/everything.scss +17 -0
  273. package/trash/scss-old-230729/README.md +58 -0
  274. package/trash/scss-old-230729/_breakpoint.scss +139 -0
  275. package/trash/scss-old-230729/_button.scss +223 -0
  276. package/trash/scss-old-230729/_calculate.scss +64 -0
  277. package/trash/scss-old-230729/_color.scss +202 -0
  278. package/trash/scss-old-230729/_element.scss +273 -0
  279. package/trash/scss-old-230729/_grid.scss +694 -0
  280. package/trash/scss-old-230729/_index.scss +25 -0
  281. package/trash/scss-old-230729/_layout.scss +193 -0
  282. package/trash/scss-old-230729/_path.scss +58 -0
  283. package/trash/scss-old-230729/_selector.scss +81 -0
  284. package/trash/scss-old-230729/_typography.scss +320 -0
  285. package/trash/scss-old-230729/_units.scss +47 -0
  286. package/trash/scss-old-230729/_utility.scss +12 -0
  287. package/trash/scss-old-230729/_utils.scss +186 -0
  288. package/trash/scss-old-230729/base/_color.scss +13 -0
  289. package/trash/scss-old-230729/base/_elements.scss +188 -0
  290. package/trash/scss-old-230729/base/_index.scss +62 -0
  291. package/trash/scss-old-230729/base/_keyframes.scss +73 -0
  292. package/trash/scss-old-230729/base/_layout.scss +83 -0
  293. package/trash/scss-old-230729/base/_normalize.scss +315 -0
  294. package/trash/scss-old-230729/base/_typography.scss +41 -0
  295. package/trash/scss-old-230729/components/README.md +5 -0
  296. package/trash/scss-old-230729/components/README.todos +15 -0
  297. package/trash/scss-old-230729/components/_button.scss +95 -0
  298. package/trash/scss-old-230729/components/_index.scss +63 -0
  299. package/trash/scss-old-230729/components/_links.scss +34 -0
  300. package/trash/scss-old-230729/components/_list-lines.scss +73 -0
  301. package/trash/scss-old-230729/components/_list-ordered.scss +16 -0
  302. package/trash/scss-old-230729/components/_list-unordered.scss +21 -0
  303. package/trash/scss-old-230729/components/_rule.scss +93 -0
  304. package/trash/scss-old-230729/helpers/_color.scss +14 -0
  305. package/trash/scss-old-230729/helpers/_display.scss +73 -0
  306. package/trash/scss-old-230729/helpers/_index.scss +67 -0
  307. package/trash/scss-old-230729/helpers/_print.scss +58 -0
  308. package/trash/scss-old-230729/helpers/_typography.scss +72 -0
  309. package/trash/scss-old-230729/helpers/_units.scss +68 -0
  310. package/trash/scss-old-230729/helpers/_utilities.scss +87 -0
  311. package/trash/scss-old-230729/packages/README.md +3 -0
  312. package/trash/scss-old-230729/packages/everything.scss +17 -0
  313. package/trash/vue/directives/background-image-url.js +12 -0
  314. package/trash/vue/helpers/add-required-components.js +14 -0
  315. package/trash/vue/ui/CollapsibleRegion/CollapsibleRegion.vue +277 -0
  316. package/trash/vue/ui/CollapsibleRegion/Demo.vue +101 -0
  317. package/trash/vue/ui/Dropdown/Dropdown.vue +184 -0
  318. package/trash/vue/ui/Modals/components/Modal.vue +49 -0
  319. package/trash/vue/ui/Modals/components/Modals.vue +103 -0
  320. package/trash/vue/ui/Modals/plugin.js +215 -0
  321. package/trash/vue/ui/Modals/readme.note +10 -0
  322. package/trash/vue/ui/Modals/reference/example-usage.vue +27 -0
  323. package/trash/vue/ui/Modals/reference/wcag-example/dialog.js +324 -0
@@ -0,0 +1,47 @@
1
+ ////
2
+ /// @group units
3
+ ////
4
+
5
+ @use "sass:meta";
6
+ @use "sass:map";
7
+ @use "utils";
8
+
9
+ /// Module Settings
10
+ /// @type Map
11
+ /// @prop {Number} small-x
12
+ /// @prop {Number} small
13
+ /// @prop {Number} default Base unit of measurent
14
+ /// @prop {Number} large
15
+ /// @prop {Number} large-x
16
+ /// @prop {Number} large-xx
17
+
18
+ $config: (
19
+ "small-x" : 1rem * 0.5,
20
+ "small" : 1rem * 0.75,
21
+ "default" : 1rem,
22
+ "large" : 1rem * 2,
23
+ "large-x" : 1rem * 3,
24
+ "large-xx" : 1rem * 4
25
+ ) !default;
26
+
27
+ /// Update the units config
28
+ /// @param {Map} $changes A map to merge into the color palette
29
+ /// @example scss Setting the error and type color
30
+ /// @include units.set((
31
+ /// "default" : 1.5em
32
+ /// ));
33
+
34
+ @mixin set($changes) {
35
+ $config: map.merge($config, $changes) !global;
36
+ }
37
+
38
+ /// Get a unit by name (preset) or number (multiplier of base)
39
+ /// @param {Number|String} $value if a number is passed it is used as a multiplier of the base, if a string is passed it is used to lookup a value from unit presets @see $config
40
+ /// @return {Number}
41
+
42
+ @function get($value: 1) {
43
+ @if (meta.type-of($value) == string) {
44
+ @return utils.require-map-get($config, $value, 'unit [config]');
45
+ }
46
+ @return get("default") * $value;
47
+ }
@@ -0,0 +1,12 @@
1
+ ////
2
+ /// @group utility
3
+ ////
4
+
5
+ @use "sass:math";
6
+
7
+ /// Strips the unit from the number
8
+ /// @link https://stackoverflow.com/questions/12328259/how-do-you-strip-the-unit-from-any-number-in-sass/12335841#12335841 Orginal source (Miriam Suzanne)
9
+
10
+ @function strip-unit($value) {
11
+ @return math.div($value, ($value * 0 + 1));
12
+ }
@@ -0,0 +1,209 @@
1
+ ////
2
+ /// @group utils
3
+ ////
4
+
5
+ @use "sass:map";
6
+ @use "sass:meta";
7
+ @use "sass:math";
8
+ @use "sass:list";
9
+ @use "sass:string";
10
+
11
+ /// Module Settings
12
+ /// @type Map
13
+ /// @prop {Boolean} $config.debug-maps Debugs include map print outs
14
+ /// @prop {Boolean} $config.file-header-comments Remove comment headers if you'd like
15
+
16
+ $config: (
17
+ "debug-maps": true,
18
+ "file-header-comments": true
19
+ ) !default;
20
+
21
+ /// Change modules $config
22
+ /// @param {Map} $changes Map of changes
23
+ /// @example scss - General example, replace module-name with module's name
24
+ /// @include module-name.set(( "property" : value ));
25
+ @mixin set($changes) {
26
+ $config: map.merge($config, $changes) !global;
27
+ }
28
+
29
+ /// Get a config option
30
+ /// @param {Map} $name Name of property
31
+ /// @example scss - General example, replace module-name with module's name
32
+ /// @include module-name.get("property");
33
+
34
+ @function get($name) {
35
+ @return require-map-get($config, $name, 'utils');
36
+ }
37
+
38
+ /// Get a required value from a map, throw an error if not found
39
+ /// - Remeber that that maps cannot intentionally use null (use false instead, if trying to avoid output if unconfigured)
40
+ /// @param {Map} $map The map to get the value from
41
+ /// @param {String} $key The key in the map to get value from
42
+ /// @param {String} $context The context of using this function for debugging help
43
+ /// @return {*} The value from the map
44
+
45
+ @function require-map-get($map, $key, $context: "unknown") {
46
+ // $value: map.get($map, $key);
47
+ @if (map.has-key($map, $key)) {
48
+ @return map.get($map, $key);
49
+ } @else {
50
+ @if (get("debug-maps")) {
51
+ @debug $map;
52
+ }
53
+ @error 'ULU: Unable to find "#{ $key }" in #{ $context } map.';
54
+ }
55
+ }
56
+
57
+ /// Ensure a value is present in the list, throw an error if not found
58
+ /// @param {List} $list The map to get the value from
59
+ /// @param {String} $value The value to search for in the list
60
+ /// @param {String} $context The context of using this function for debugging help
61
+
62
+ @mixin require-list-has($list, $value, $context: "unknown") {
63
+ $index: list.index($list, $value) != null;
64
+ @if ($index == null) {
65
+ @error 'ULU: Unable to find item "#{ $value }" in #{ $context } list.';
66
+ }
67
+ }
68
+
69
+ /// Require that the list only is only made up of allowed items
70
+ /// @param {List} $allowed The list of allowed items
71
+ /// @param {String} $list The list to test allowed against
72
+
73
+ @mixin require-list-contains($allowed, $list, $context: "unknown") {
74
+ @each $item in $list {
75
+ @include require-list-has($allowed, $item, $context);
76
+ }
77
+ }
78
+
79
+ /// Returns true if we should include something (map of booleans)
80
+ /// @param {String} $name Name of item to see if it's included
81
+ /// @param {Map} $includes Map of includes
82
+
83
+ @function included($name, $includes) {
84
+ $value: map.get($includes, $name);
85
+ @return $value == true;
86
+ }
87
+
88
+ /// Returns true if we should include something (used for output checking)
89
+ /// @param {List} $context The root area of the framework this file comes from
90
+ /// @param {List} $name The name of the specific area/file (optional)
91
+
92
+ @mixin file-header($context, $name: "") {
93
+ @if ("file-header-comments") {
94
+ /*
95
+ =============================================================================
96
+ #{ $context }:#{ $name }
97
+ =============================================================================
98
+ */
99
+ }
100
+ }
101
+
102
+ // Provide a default when value type is not correct
103
+ /// @param {String} $type type of value it should be
104
+ /// @param {String} $value the value to provide if it is that type
105
+ /// @param {String} $fallback the fallback value
106
+
107
+ @function if-type($type, $value, $fallback) {
108
+ @if meta.type-of($value) == $type {
109
+ @return $value;
110
+ } @else {
111
+ @return $fallback;
112
+ }
113
+ }
114
+
115
+ // Returns number unit info, and strips the unit
116
+ /// @param {String} $number Number to get meta info for
117
+ /// @return {Map} With properties (unit, value)
118
+
119
+ @function number-info($number) {
120
+ $is-number: meta.type-of($number) != 'number';
121
+ $is-unitless: math.is-unitless($number);
122
+ @if ($is-unitless or not $is-number) {
123
+ @return (
124
+ "unit": null,
125
+ "value": $number
126
+ );
127
+ } @else {
128
+ @return (
129
+ "unit" : math.unit($value),
130
+ "value": math.div($number, ($number * 0 + 1))
131
+ );
132
+ }
133
+ }
134
+
135
+ /// Repeatable pattern in core
136
+
137
+ @function map-merge-or-overwrite($original, $changes, $deep: false, $overwrite: false) {
138
+ @if $deep {
139
+ @return map.deep-merge($original, $changes);
140
+ } @else if $overwrite {
141
+ @return $changes;
142
+ } @else {
143
+ @return map.merge($original, $changes);
144
+ }
145
+ }
146
+
147
+ /// Utility for providing fallbacks, the first truthy value (non false or null) will be returned
148
+ /// @return {*} The first truthy value
149
+
150
+ @function fallback($args...) {
151
+ @each $arg in $args {
152
+ @if ($arg) {
153
+ @return $arg;
154
+ }
155
+ }
156
+ @return null;
157
+ }
158
+
159
+ /// Provides fallback values from the same map
160
+ @function map-fallback($map, $properties...) {
161
+ @each $prop in $properties {
162
+ $value: map.get($map, $prop);
163
+ @if ($value) {
164
+ @return $value;
165
+ }
166
+ }
167
+ @return null;
168
+ }
169
+
170
+ /// Helps in providing a dynamic fallback for modules whose defaults should come from another
171
+ /// @param {String} $prop Property trying to get fallback for
172
+ /// @param {*} $value The value that may need the fallback
173
+ /// @param {Map} $lookup Map of properties to functions (use sass:meta > meta.get-function to populate)
174
+ /// @return {*} The user's original value, or if the value is true get the default value from the provided function
175
+
176
+ @function function-fallback($prop, $value, $lookup) {
177
+ // If there was already a value return it else resolve through passed function
178
+ @if ($value == true) {
179
+ $fn: map.get($lookup, $prop);
180
+ @if ($fn) {
181
+ @return meta.call($fn, $prop);
182
+ }
183
+ }
184
+ @return $value;
185
+ }
186
+
187
+ /// Replaces all or one occurence of a string within a string
188
+ /// @param {String} $string String to operate on
189
+ /// @param {String} $find String to find within string
190
+ /// @param {String} $replace String to replace found strings
191
+ /// @param {Boolean} $all Default true replace all matches, if false replace only first
192
+
193
+ @function string-replace($string, $find, $replace, $all: true) {
194
+
195
+ $index: string.index($string, $find);
196
+
197
+ @if ($index) {
198
+ $start: if($index == 1, "", string.slice($string, 1, string.length($find) - 1));
199
+ $end: string.slice($string, $index + string.length($find));
200
+ $new: $start + $replace;
201
+ @if ($all) {
202
+ @return $new + string-replace($end, $find, $replace);
203
+ } @else {
204
+ @return $new + $end;
205
+ }
206
+ } @else {
207
+ @return $string;
208
+ }
209
+ }
@@ -0,0 +1,13 @@
1
+ ////
2
+ /// @group color
3
+ ////
4
+
5
+ @use "../utils";
6
+ @use "../color";
7
+
8
+ /// Prints color-context styles as base classes (top of stylesheet)
9
+
10
+ @mixin styles {
11
+ @include utils.file-header('base', 'color');
12
+ @include color.all-context-styles("base-class");
13
+ }
@@ -0,0 +1,188 @@
1
+ ////
2
+ /// @group elements
3
+ ////
4
+
5
+ @use "sass:map";
6
+
7
+ @use "../utils";
8
+ @use "../color";
9
+ @use "../element";
10
+ @use "../typography";
11
+ @use "../breakpoint";
12
+ @use "../button";
13
+
14
+
15
+ /// Module Settings
16
+ /// @type Map
17
+ /// @prop {Number} $config.links-state-styling Just color/defaults vs hover/visited/active
18
+
19
+ $config: (
20
+ "link" : true,
21
+ "link:hover" : true,
22
+ "link:visited" : false
23
+ ) !default;
24
+
25
+ /// Change modules $config
26
+ /// @param {Map} $changes Map of changes
27
+ /// @example scss - General example, replace module-name with module's name
28
+ /// @include module-name.set(( "property" : value ));
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 - General example, replace module-name with module's name
36
+ /// @include module-name.get("property");
37
+
38
+ @function get($name) {
39
+ @return utils.require-map-get($config, $name, "element [config]");
40
+ }
41
+
42
+ /// Prints elements base styles
43
+ /// @name base-elements-styles
44
+ /// @example scss
45
+ /// @include ulu.base-elements-styles();
46
+
47
+ @mixin styles {
48
+
49
+ @include utils.file-header('base', 'elements');
50
+
51
+ *,
52
+ ::before,
53
+ ::after {
54
+ box-sizing: border-box;
55
+ }
56
+ html {
57
+ -webkit-text-size-adjust: 100%;
58
+ @media (prefers-reduced-motion: no-preference) {
59
+ scroll-behavior: smooth;
60
+ }
61
+ }
62
+ body {
63
+ color: color.get('type');
64
+ background-color: color.get("background");
65
+ font-family: typography.get("font-family");
66
+ margin: 0;
67
+ // Note we are using relative units here instead of setting a
68
+ // pixel base like we use to on the HTML
69
+ // This will allow the user preference in font size
70
+ // Useful for accessibility
71
+ @include typography.size("base");
72
+ @include breakpoint.embed-for-scripts();
73
+ }
74
+ h1,
75
+ h2,
76
+ h3,
77
+ h4,
78
+ h5,
79
+ h6,
80
+ ul,
81
+ ol,
82
+ li,
83
+ pre,
84
+ code,
85
+ p {
86
+ margin: 0;
87
+ padding: 0;
88
+ font-size: inherit;
89
+ font-family: inherit;
90
+ border-width: 0;
91
+ border-style: solid;
92
+ font-weight: inherit;
93
+ }
94
+ p {
95
+ $margin-top: typography.get("margin-top");
96
+ margin-top: if($margin-top, $margin-top, 0);
97
+ margin-bottom: typography.get("margin-bottom");
98
+ }
99
+ sub, sup {
100
+ font-size: 75%;
101
+ line-height: 0;
102
+ position: relative;
103
+ vertical-align: baseline;
104
+ }
105
+ small {
106
+ @include typography.size("small", ("line-height" : typography.get("line-height-dense")));
107
+ }
108
+ sub {
109
+ bottom: -0.25em;
110
+ }
111
+ sup {
112
+ top: -0.5em;
113
+ }
114
+ b,
115
+ strong {
116
+ font-weight: bold;
117
+ }
118
+ form {
119
+ width: 100%;
120
+ }
121
+ code,
122
+ kbd,
123
+ samp,
124
+ pre {
125
+ font-family: typography.get("font-family-monospace");
126
+ }
127
+ hr {
128
+ height: 0;
129
+ border: 0;
130
+ box-sizing: content-box;
131
+ overflow: visible;
132
+ margin: element.get("margin") 0;
133
+ border-bottom: element.get-rule-style();
134
+ }
135
+ iframe {
136
+ border: 0;
137
+ outline: 0;
138
+ }
139
+ figure {
140
+ margin: 0;
141
+ }
142
+ img {
143
+ display: block;
144
+ width: auto;
145
+ height: auto;
146
+ max-width: 100%;
147
+ border-style: none;
148
+ }
149
+ // Not styling ordered lists because they are used in navigation and other UI components
150
+ ul {
151
+ list-style: none;
152
+ }
153
+ // Style ordered lists since we don't use them much in the UI components
154
+ ol {
155
+ list-style: none;
156
+ }
157
+
158
+ a {
159
+ // User can disable link styling if they want to add more specific styling
160
+ // and omit this in element base
161
+ @if (get("link")) {
162
+ @include element.link-defaults(
163
+ $hover: get("link:hover"),
164
+ $visited: get("link:visited"),
165
+ );
166
+ }
167
+ }
168
+ // button,
169
+ // [type="button"],
170
+ // [type="reset"],
171
+ // [type="submit"] {
172
+ // @include button.reset();
173
+ // }
174
+ // For accessible tabs
175
+ [role="tab"] {
176
+ cursor: pointer;
177
+ }
178
+ dt {
179
+ font-weight: bold;
180
+ }
181
+ [hidden],
182
+ template {
183
+ display: none;
184
+ }
185
+ blockquote {
186
+ margin: 0;
187
+ }
188
+ }
@@ -0,0 +1,62 @@
1
+ ////
2
+ /// @group all
3
+ ////
4
+
5
+ @forward "normalize" as normalize-*;
6
+ @forward "elements" as elements-*;
7
+ @forward "keyframes" as keyframes-*;
8
+ @forward "typography" as typography-*;
9
+ @forward "layout" as layout-*;
10
+
11
+ @use "sass:map";
12
+ @use "../utils";
13
+ @use "normalize";
14
+ @use "typography";
15
+ @use "elements";
16
+ @use "color";
17
+ @use "keyframes";
18
+ @use "layout";
19
+
20
+ // Used to check against user's includes
21
+
22
+ $-all-includes: (
23
+ "normalize" : true,
24
+ "elements" : true,
25
+ "keyframes" : true,
26
+ "typography" : true,
27
+ "color" : true,
28
+ "layout" : true
29
+ );
30
+
31
+ /// Prints all Base styles
32
+ /// @name base-styles
33
+ /// @param {List} $includes A list of changes to this module's includes
34
+ /// @example scss
35
+ /// @include ulu.base-styles();
36
+
37
+ @mixin styles($includes: null) {
38
+ @include utils.file-header("base");
39
+ @if $includes {
40
+ @include utils.require-list-contains($-all-includes, $includes);
41
+ $-all-includes: map.merge($-all-includes, $includes) !global;
42
+ }
43
+ @if (map.get($-all-includes, "normalize")) {
44
+ @include normalize.styles;
45
+ }
46
+ @if (map.get($-all-includes, "elements")) {
47
+ @include elements.styles;
48
+ }
49
+ @if (map.get($-all-includes, "keyframes")) {
50
+ @include keyframes.styles;
51
+ }
52
+ @if (map.get( $-all-includes, "typography")) {
53
+ @include typography.styles;
54
+ }
55
+ @if (map.get($-all-includes, "color")) {
56
+ @include color.styles;
57
+ }
58
+ @if (map.get($-all-includes, "layout")) {
59
+ @include layout.styles;
60
+ }
61
+ }
62
+
@@ -0,0 +1,78 @@
1
+ ////
2
+ /// @group keyframes
3
+ ////
4
+
5
+ @use "../utils";
6
+
7
+ /// Prints CSS keyframes
8
+ /// @example scss
9
+ /// @include ulu.base-keyframes-styles();
10
+
11
+ @mixin styles {
12
+ @include utils.file-header('base', 'keyframes');
13
+ @keyframes fadeIn {
14
+ 0% {
15
+ opacity: 0;
16
+ }
17
+ 100% {
18
+ opacity: 1;
19
+ }
20
+ }
21
+ @keyframes FadeDownIn {
22
+ 0% {
23
+ opacity: 0;
24
+ transform: translateY(-10px);
25
+ }
26
+ 100% {
27
+ opacity: 1;
28
+ transform: translateY(0);
29
+ }
30
+ }
31
+ @keyframes fadeInLeft {
32
+ 0% {
33
+ opacity: 0;
34
+ transform: translatex(-10px);
35
+ }
36
+ 100% {
37
+ opacity: 1;
38
+ transform: translatex(0);
39
+ }
40
+ }
41
+ @keyframes fadeInZoom {
42
+ // Delay
43
+ 0% {
44
+ opacity: 0;
45
+ transform: scale(0);
46
+ }
47
+ // Start
48
+ 50% {
49
+ opacity: 0;
50
+ transform: scale(0);
51
+ }
52
+ 100% {
53
+ opacity: 1;
54
+ transform: scale(1);
55
+ }
56
+ }
57
+ @keyframes rotate {
58
+ 0% {
59
+ transform: rotate(0deg);
60
+ }
61
+ 100% {
62
+ transform: rotate(360deg);
63
+ }
64
+ }
65
+ @keyframes spin {
66
+ from {
67
+ transform:rotate(0deg);
68
+ }
69
+ to {
70
+ transform:rotate(360deg);
71
+ }
72
+ }
73
+ @keyframes pulse {
74
+ 50% {
75
+ opacity: 0.5;
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,100 @@
1
+ ////
2
+ /// @group layout
3
+ ////
4
+
5
+ @use "sass:map";
6
+ @use "../layout";
7
+ @use "../selector";
8
+ @use "../utils";
9
+
10
+ /// Module Settings
11
+ /// @type Map
12
+ /// @prop {Number} $config.sides Sides to print for helper classes (ie. reduce output of uneeded sides)
13
+
14
+ $config: (
15
+ "containers" : true,
16
+ "container-nested-no-padding" : false,
17
+ "layout-flex" : true,
18
+ ) !default;
19
+
20
+ /// Change modules $config
21
+ /// @param {Map} $changes Map of changes
22
+ /// @example scss - General example, replace module-name with module's name
23
+ /// @include module-name.set(( "property" : value ));
24
+ @mixin set($changes) {
25
+ $config: map.merge($config, $changes) !global;
26
+ }
27
+
28
+ /// Get a config option
29
+ /// @param {Map} $name Name of property
30
+ /// @example scss - General example, replace module-name with module's name
31
+ /// @include module-name.get("property");
32
+
33
+ @function get($name) {
34
+ @return utils.require-map-get($config, $name, "base layout [config]");
35
+ }
36
+
37
+ /// Output Styles
38
+
39
+ @mixin styles {
40
+
41
+ @if (get("containers")) {
42
+ @each $name, $values in layout.$containers {
43
+ $class: selector.class($name);
44
+ #{ $class } {
45
+ @include layout.container-styles($name);
46
+ }
47
+ }
48
+ }
49
+ @if (get("container-nested-no-padding")) {
50
+ $prefix: selector.class("container", $name-only: true);
51
+ [class|="#{ $prefix }"] {
52
+ [class|="#{ $prefix }"] {
53
+ padding-left: 0;
54
+ padding-right: 0;
55
+ }
56
+ }
57
+ }
58
+
59
+ @if (get("layout-flex")) {
60
+ $prefix: selector.class("layout-flex");
61
+
62
+ #{ $prefix } {
63
+ display: flex;
64
+ }
65
+ #{ $prefix }-justified {
66
+ display: flex;
67
+ justify-content: space-between;
68
+ }
69
+ #{ $prefix }-center {
70
+ display: flex;
71
+ align-items: center;
72
+ }
73
+ #{ $prefix }-center-all {
74
+ display: flex;
75
+ align-items: center;
76
+ justify-content: center;
77
+ }
78
+ #{ $prefix }-justify-end {
79
+ display: flex;
80
+ justify-content: flex-end;
81
+ }
82
+ #{ $prefix }-baseline {
83
+ display: flex;
84
+ align-items: baseline;
85
+ }
86
+ #{ $prefix }-end {
87
+ display: flex;
88
+ align-items: flex-end;
89
+ }
90
+ #{ $prefix }-column {
91
+ display: flex;
92
+ flex-direction: column;
93
+ }
94
+ #{ $prefix }-column-center {
95
+ display: flex;
96
+ flex-direction: column;
97
+ justify-content: center;
98
+ }
99
+ }
100
+ }