@ulu/frontend 0.0.3 → 0.0.6

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 (285) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +3 -1
  3. package/js/deprecated/mini-collapsible.js +1 -1
  4. package/js/events/index.js +4 -1
  5. package/js/helpers/css-breakpoint.js +5 -7
  6. package/js/helpers/file-save.js +4 -0
  7. package/js/helpers/node-data-manager.js +4 -0
  8. package/js/helpers/pause-youtube-video.js +4 -0
  9. package/js/helpers/scrollbar-width-property.js +6 -2
  10. package/js/index.js +0 -2
  11. package/js/ui/flipcard.js +5 -1
  12. package/js/ui/grid.js +4 -0
  13. package/js/ui/modals.js +4 -1
  14. package/js/ui/overflow-scroller-pager.js +3 -0
  15. package/js/ui/overflow-scroller.js +4 -1
  16. package/js/ui/programmatic-modal.js +3 -0
  17. package/js/ui/resizer.js +3 -0
  18. package/js/ui/slider.js +7 -4
  19. package/js/ui/tabs.js +3 -0
  20. package/js/ui/tooltip.js +3 -0
  21. package/js/utils/logger.js +3 -0
  22. package/package.json +20 -11
  23. package/scss/_breakpoint.scss +3 -4
  24. package/scss/_button.scss +4 -4
  25. package/scss/_color.scss +2 -2
  26. package/scss/_grid.scss +0 -1
  27. package/scss/_layout.scss +2 -3
  28. package/scss/_typography.scss +2 -3
  29. package/scss/_utils.scss +21 -4
  30. package/scss/base/_normalize.scss +1 -1
  31. package/scss/helpers/_units.scss +7 -11
  32. package/scss/stylesheets/full.scss +1 -4
  33. package/js/polyfills/element-closest.js +0 -17
  34. package/js/utils/array.js +0 -28
  35. package/js/utils/dom.js +0 -122
  36. package/js/utils/object.js +0 -22
  37. package/js/utils/performance.js +0 -43
  38. package/js/utils/regex.js +0 -10
  39. package/js/utils/string.js +0 -107
  40. package/trash/js-old/deprecated/doc-ready.js +0 -28
  41. package/trash/js-old/deprecated/jquery-prototypes.js +0 -309
  42. package/trash/js-old/deprecated/mini-collapsible-popper-positioning.js +0 -126
  43. package/trash/js-old/deprecated/mini-collapsible.js +0 -607
  44. package/trash/js-old/deprecated/script-loader.js +0 -60
  45. package/trash/js-old/events/index.js +0 -42
  46. package/trash/js-old/helpers/css-breakpoint.js +0 -247
  47. package/trash/js-old/helpers/file-save.js +0 -48
  48. package/trash/js-old/helpers/node-data-manager.js +0 -74
  49. package/trash/js-old/helpers/pause-youtube-video.js +0 -42
  50. package/trash/js-old/index.js +0 -15
  51. package/trash/js-old/polyfills/element-closest.js +0 -17
  52. package/trash/js-old/ui/flipcard.js +0 -202
  53. package/trash/js-old/ui/grid.js +0 -67
  54. package/trash/js-old/ui/modals.js +0 -219
  55. package/trash/js-old/ui/programmatic-modal.js +0 -91
  56. package/trash/js-old/ui/resizer.js +0 -60
  57. package/trash/js-old/ui/slider.js +0 -469
  58. package/trash/js-old/ui/tabs.js +0 -109
  59. package/trash/js-old/ui/tooltip.js +0 -82
  60. package/trash/js-old/utils/array.js +0 -28
  61. package/trash/js-old/utils/dom.js +0 -122
  62. package/trash/js-old/utils/logger.js +0 -69
  63. package/trash/js-old/utils/object.js +0 -22
  64. package/trash/js-old/utils/performance.js +0 -43
  65. package/trash/js-old/utils/regex.js +0 -10
  66. package/trash/js-old/utils/string.js +0 -107
  67. package/trash/js-old/waypoints/README.md +0 -3
  68. package/trash/js-old/waypoints/anchor-menu.js +0 -76
  69. package/trash/js-old/waypoints/element-waypoint.js +0 -75
  70. package/trash/js-old/waypoints/examples/page-link-menu.md +0 -106
  71. package/trash/js-old/waypoints/state-in-attribute.js +0 -32
  72. package/trash/js-old-230729/deprecated/doc-ready.js +0 -28
  73. package/trash/js-old-230729/deprecated/jquery-prototypes.js +0 -309
  74. package/trash/js-old-230729/deprecated/mini-collapsible-popper-positioning.js +0 -126
  75. package/trash/js-old-230729/deprecated/mini-collapsible.js +0 -607
  76. package/trash/js-old-230729/deprecated/script-loader.js +0 -60
  77. package/trash/js-old-230729/events/index.js +0 -42
  78. package/trash/js-old-230729/helpers/css-breakpoint.js +0 -247
  79. package/trash/js-old-230729/helpers/file-save.js +0 -48
  80. package/trash/js-old-230729/helpers/node-data-manager.js +0 -74
  81. package/trash/js-old-230729/helpers/pause-youtube-video.js +0 -42
  82. package/trash/js-old-230729/helpers/scrollbar-width-property.js +0 -10
  83. package/trash/js-old-230729/index.js +0 -15
  84. package/trash/js-old-230729/polyfills/element-closest.js +0 -17
  85. package/trash/js-old-230729/ui/flipcard.js +0 -202
  86. package/trash/js-old-230729/ui/grid.js +0 -67
  87. package/trash/js-old-230729/ui/modals.js +0 -219
  88. package/trash/js-old-230729/ui/overflow-scroller-pager.js +0 -58
  89. package/trash/js-old-230729/ui/overflow-scroller.js +0 -160
  90. package/trash/js-old-230729/ui/programmatic-modal.js +0 -91
  91. package/trash/js-old-230729/ui/resizer.js +0 -60
  92. package/trash/js-old-230729/ui/slider.js +0 -468
  93. package/trash/js-old-230729/ui/tabs.js +0 -109
  94. package/trash/js-old-230729/ui/tooltip.js +0 -82
  95. package/trash/js-old-230729/utils/array.js +0 -28
  96. package/trash/js-old-230729/utils/dom.js +0 -122
  97. package/trash/js-old-230729/utils/logger.js +0 -69
  98. package/trash/js-old-230729/utils/object.js +0 -22
  99. package/trash/js-old-230729/utils/performance.js +0 -43
  100. package/trash/js-old-230729/utils/regex.js +0 -10
  101. package/trash/js-old-230729/utils/string.js +0 -107
  102. package/trash/js-old-230729/waypoints/README.md +0 -3
  103. package/trash/js-old-230729/waypoints/anchor-menu.js +0 -76
  104. package/trash/js-old-230729/waypoints/element-waypoint.js +0 -75
  105. package/trash/js-old-230729/waypoints/examples/page-link-menu.md +0 -106
  106. package/trash/js-old-230729/waypoints/state-in-attribute.js +0 -32
  107. package/trash/logo-1.svg +0 -13
  108. package/trash/logo.svg +0 -16
  109. package/trash/scss-before-cqc-update/README.md +0 -58
  110. package/trash/scss-before-cqc-update/_breakpoint.scss +0 -190
  111. package/trash/scss-before-cqc-update/_button.scss +0 -229
  112. package/trash/scss-before-cqc-update/_calculate.scss +0 -65
  113. package/trash/scss-before-cqc-update/_color.scss +0 -211
  114. package/trash/scss-before-cqc-update/_cssvar.scss +0 -116
  115. package/trash/scss-before-cqc-update/_element.scss +0 -275
  116. package/trash/scss-before-cqc-update/_index.scss +0 -29
  117. package/trash/scss-before-cqc-update/_layout.scss +0 -247
  118. package/trash/scss-before-cqc-update/_path.scss +0 -59
  119. package/trash/scss-before-cqc-update/_selector.scss +0 -82
  120. package/trash/scss-before-cqc-update/_typography.scss +0 -322
  121. package/trash/scss-before-cqc-update/_units.scss +0 -48
  122. package/trash/scss-before-cqc-update/_utility.scss +0 -13
  123. package/trash/scss-before-cqc-update/_utils.scss +0 -211
  124. package/trash/scss-before-cqc-update/base/_color.scss +0 -14
  125. package/trash/scss-before-cqc-update/base/_elements.scss +0 -189
  126. package/trash/scss-before-cqc-update/base/_index.scss +0 -63
  127. package/trash/scss-before-cqc-update/base/_keyframes.scss +0 -74
  128. package/trash/scss-before-cqc-update/base/_layout.scss +0 -88
  129. package/trash/scss-before-cqc-update/base/_normalize.scss +0 -316
  130. package/trash/scss-before-cqc-update/base/_typography.scss +0 -42
  131. package/trash/scss-before-cqc-update/components/README.md +0 -5
  132. package/trash/scss-before-cqc-update/components/README.todos +0 -15
  133. package/trash/scss-before-cqc-update/components/_button.scss +0 -96
  134. package/trash/scss-before-cqc-update/components/_grid.scss +0 -671
  135. package/trash/scss-before-cqc-update/components/_index.scss +0 -70
  136. package/trash/scss-before-cqc-update/components/_links.scss +0 -35
  137. package/trash/scss-before-cqc-update/components/_list-lines.scss +0 -74
  138. package/trash/scss-before-cqc-update/components/_list-ordered.scss +0 -17
  139. package/trash/scss-before-cqc-update/components/_list-unordered.scss +0 -22
  140. package/trash/scss-before-cqc-update/components/_rule.scss +0 -94
  141. package/trash/scss-before-cqc-update/helpers/_color.scss +0 -15
  142. package/trash/scss-before-cqc-update/helpers/_display.scss +0 -73
  143. package/trash/scss-before-cqc-update/helpers/_index.scss +0 -68
  144. package/trash/scss-before-cqc-update/helpers/_print.scss +0 -59
  145. package/trash/scss-before-cqc-update/helpers/_typography.scss +0 -73
  146. package/trash/scss-before-cqc-update/helpers/_units.scss +0 -79
  147. package/trash/scss-before-cqc-update/helpers/_utilities.scss +0 -88
  148. package/trash/scss-before-cqc-update/stylesheets/README.md +0 -3
  149. package/trash/scss-before-cqc-update/stylesheets/full.scss +0 -17
  150. package/trash/scss-old/README.md +0 -58
  151. package/trash/scss-old/_breakpoint.scss +0 -140
  152. package/trash/scss-old/_button.scss +0 -223
  153. package/trash/scss-old/_calculate.scss +0 -64
  154. package/trash/scss-old/_color.scss +0 -200
  155. package/trash/scss-old/_element.scss +0 -262
  156. package/trash/scss-old/_grid.scss +0 -558
  157. package/trash/scss-old/_index.scss +0 -25
  158. package/trash/scss-old/_layout.scss +0 -170
  159. package/trash/scss-old/_path.scss +0 -58
  160. package/trash/scss-old/_selector.scss +0 -81
  161. package/trash/scss-old/_typography.scss +0 -320
  162. package/trash/scss-old/_units.scss +0 -47
  163. package/trash/scss-old/_utility.scss +0 -12
  164. package/trash/scss-old/_utils.scss +0 -186
  165. package/trash/scss-old/base/_color.scss +0 -13
  166. package/trash/scss-old/base/_elements.scss +0 -183
  167. package/trash/scss-old/base/_index.scss +0 -62
  168. package/trash/scss-old/base/_keyframes.scss +0 -74
  169. package/trash/scss-old/base/_layout.scss +0 -81
  170. package/trash/scss-old/base/_normalize.scss +0 -316
  171. package/trash/scss-old/base/_typography.scss +0 -42
  172. package/trash/scss-old/components/README.md +0 -5
  173. package/trash/scss-old/components/README.todos +0 -15
  174. package/trash/scss-old/components/_button.scss +0 -74
  175. package/trash/scss-old/components/_index.scss +0 -63
  176. package/trash/scss-old/components/_links.scss +0 -34
  177. package/trash/scss-old/components/_list-lines.scss +0 -73
  178. package/trash/scss-old/components/_list-ordered.scss +0 -16
  179. package/trash/scss-old/components/_list-unordered.scss +0 -21
  180. package/trash/scss-old/components/_rule.scss +0 -84
  181. package/trash/scss-old/helpers/_color.scss +0 -14
  182. package/trash/scss-old/helpers/_display.scss +0 -68
  183. package/trash/scss-old/helpers/_index.scss +0 -67
  184. package/trash/scss-old/helpers/_print.scss +0 -59
  185. package/trash/scss-old/helpers/_typography.scss +0 -73
  186. package/trash/scss-old/helpers/_units.scss +0 -68
  187. package/trash/scss-old/helpers/_utilities.scss +0 -82
  188. package/trash/scss-old/packages/README.md +0 -3
  189. package/trash/scss-old/packages/everything.scss +0 -17
  190. package/trash/scss-old-2/README.md +0 -58
  191. package/trash/scss-old-2/_breakpoint.scss +0 -139
  192. package/trash/scss-old-2/_button.scss +0 -223
  193. package/trash/scss-old-2/_calculate.scss +0 -64
  194. package/trash/scss-old-2/_color.scss +0 -202
  195. package/trash/scss-old-2/_element.scss +0 -263
  196. package/trash/scss-old-2/_grid.scss +0 -558
  197. package/trash/scss-old-2/_index.scss +0 -25
  198. package/trash/scss-old-2/_layout.scss +0 -170
  199. package/trash/scss-old-2/_path.scss +0 -58
  200. package/trash/scss-old-2/_selector.scss +0 -81
  201. package/trash/scss-old-2/_typography.scss +0 -320
  202. package/trash/scss-old-2/_units.scss +0 -47
  203. package/trash/scss-old-2/_utility.scss +0 -12
  204. package/trash/scss-old-2/_utils.scss +0 -186
  205. package/trash/scss-old-2/base/_color.scss +0 -13
  206. package/trash/scss-old-2/base/_elements.scss +0 -182
  207. package/trash/scss-old-2/base/_index.scss +0 -62
  208. package/trash/scss-old-2/base/_keyframes.scss +0 -73
  209. package/trash/scss-old-2/base/_layout.scss +0 -83
  210. package/trash/scss-old-2/base/_normalize.scss +0 -315
  211. package/trash/scss-old-2/base/_typography.scss +0 -41
  212. package/trash/scss-old-2/components/README.md +0 -5
  213. package/trash/scss-old-2/components/README.todos +0 -15
  214. package/trash/scss-old-2/components/_button.scss +0 -95
  215. package/trash/scss-old-2/components/_index.scss +0 -63
  216. package/trash/scss-old-2/components/_links.scss +0 -33
  217. package/trash/scss-old-2/components/_list-lines.scss +0 -73
  218. package/trash/scss-old-2/components/_list-ordered.scss +0 -16
  219. package/trash/scss-old-2/components/_list-unordered.scss +0 -21
  220. package/trash/scss-old-2/components/_rule.scss +0 -84
  221. package/trash/scss-old-2/helpers/_color.scss +0 -14
  222. package/trash/scss-old-2/helpers/_display.scss +0 -67
  223. package/trash/scss-old-2/helpers/_index.scss +0 -67
  224. package/trash/scss-old-2/helpers/_print.scss +0 -58
  225. package/trash/scss-old-2/helpers/_typography.scss +0 -72
  226. package/trash/scss-old-2/helpers/_units.scss +0 -68
  227. package/trash/scss-old-2/helpers/_utilities.scss +0 -81
  228. package/trash/scss-old-2/packages/README.md +0 -3
  229. package/trash/scss-old-2/packages/everything.scss +0 -17
  230. package/trash/scss-old-230729/README.md +0 -58
  231. package/trash/scss-old-230729/_breakpoint.scss +0 -139
  232. package/trash/scss-old-230729/_button.scss +0 -223
  233. package/trash/scss-old-230729/_calculate.scss +0 -64
  234. package/trash/scss-old-230729/_color.scss +0 -202
  235. package/trash/scss-old-230729/_element.scss +0 -273
  236. package/trash/scss-old-230729/_grid.scss +0 -694
  237. package/trash/scss-old-230729/_index.scss +0 -25
  238. package/trash/scss-old-230729/_layout.scss +0 -193
  239. package/trash/scss-old-230729/_path.scss +0 -58
  240. package/trash/scss-old-230729/_selector.scss +0 -81
  241. package/trash/scss-old-230729/_typography.scss +0 -320
  242. package/trash/scss-old-230729/_units.scss +0 -47
  243. package/trash/scss-old-230729/_utility.scss +0 -12
  244. package/trash/scss-old-230729/_utils.scss +0 -186
  245. package/trash/scss-old-230729/base/_color.scss +0 -13
  246. package/trash/scss-old-230729/base/_elements.scss +0 -188
  247. package/trash/scss-old-230729/base/_index.scss +0 -62
  248. package/trash/scss-old-230729/base/_keyframes.scss +0 -73
  249. package/trash/scss-old-230729/base/_layout.scss +0 -83
  250. package/trash/scss-old-230729/base/_normalize.scss +0 -315
  251. package/trash/scss-old-230729/base/_typography.scss +0 -41
  252. package/trash/scss-old-230729/components/README.md +0 -5
  253. package/trash/scss-old-230729/components/README.todos +0 -15
  254. package/trash/scss-old-230729/components/_button.scss +0 -95
  255. package/trash/scss-old-230729/components/_index.scss +0 -63
  256. package/trash/scss-old-230729/components/_links.scss +0 -34
  257. package/trash/scss-old-230729/components/_list-lines.scss +0 -73
  258. package/trash/scss-old-230729/components/_list-ordered.scss +0 -16
  259. package/trash/scss-old-230729/components/_list-unordered.scss +0 -21
  260. package/trash/scss-old-230729/components/_rule.scss +0 -93
  261. package/trash/scss-old-230729/helpers/_color.scss +0 -14
  262. package/trash/scss-old-230729/helpers/_display.scss +0 -73
  263. package/trash/scss-old-230729/helpers/_index.scss +0 -67
  264. package/trash/scss-old-230729/helpers/_print.scss +0 -58
  265. package/trash/scss-old-230729/helpers/_typography.scss +0 -72
  266. package/trash/scss-old-230729/helpers/_units.scss +0 -68
  267. package/trash/scss-old-230729/helpers/_utilities.scss +0 -87
  268. package/trash/scss-old-230729/packages/README.md +0 -3
  269. package/trash/scss-old-230729/packages/everything.scss +0 -17
  270. package/trash/vue/directives/background-image-url.js +0 -12
  271. package/trash/vue/helpers/add-required-components.js +0 -14
  272. package/trash/vue/ui/CollapsibleRegion/CollapsibleRegion.vue +0 -277
  273. package/trash/vue/ui/CollapsibleRegion/Demo.vue +0 -101
  274. package/trash/vue/ui/Dropdown/Dropdown.vue +0 -184
  275. package/trash/vue/ui/Modals/components/Modal.vue +0 -49
  276. package/trash/vue/ui/Modals/components/Modals.vue +0 -103
  277. package/trash/vue/ui/Modals/plugin.js +0 -215
  278. package/trash/vue/ui/Modals/readme.note +0 -10
  279. package/trash/vue/ui/Modals/reference/example-usage.vue +0 -27
  280. package/trash/vue/ui/Modals/reference/wcag-example/dialog.js +0 -324
  281. /package/js/{waypoints → deprecated/waypoints}/README.md +0 -0
  282. /package/js/{waypoints → deprecated/waypoints}/anchor-menu.js +0 -0
  283. /package/js/{waypoints → deprecated/waypoints}/element-waypoint.js +0 -0
  284. /package/js/{waypoints → deprecated/waypoints}/examples/page-link-menu.md +0 -0
  285. /package/js/{waypoints → deprecated/waypoints}/state-in-attribute.js +0 -0
@@ -1,186 +0,0 @@
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 ($value != null) {
48
- @return $value;
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 typpe 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
- /// Helps in providing a dynamic fallback for modules whose defaults should come from another
148
- /// @param {String} $prop Property trying to get fallback for
149
- /// @param {*} $value The value that may need the fallback
150
- /// @param {Map} $lookup Map of properties to functions (use sass:meta > meta.get-function to populate)
151
- /// @return {*} The user's original value, or if the value is true get the default value from the provided function
152
-
153
- @function function-fallback($prop, $value, $lookup) {
154
- // If there was already a value return it else resolve through passed function
155
- @if ($value == true) {
156
- $fn: map.get($lookup, $prop);
157
- @if ($fn) {
158
- @return meta.call($fn, $prop);
159
- }
160
- }
161
- @return $value;
162
- }
163
-
164
- /// Replaces all or one occurence of a string within a string
165
- /// @param {String} $string String to operate on
166
- /// @param {String} $find String to find within string
167
- /// @param {String} $replace String to replace found strings
168
- /// @param {Boolean} $all Default true replace all matches, if false replace only first
169
-
170
- @function string-replace($string, $find, $replace, $all: true) {
171
-
172
- $index: string.index($string, $find);
173
-
174
- @if ($index) {
175
- $start: if($index == 1, "", string.slice($string, 1, string.length($find) - 1));
176
- $end: string.slice($string, $index + string.length($find));
177
- $new: $start + $replace;
178
- @if ($all) {
179
- @return $new + string-replace($end, $find, $replace);
180
- } @else {
181
- @return $new + $end;
182
- }
183
- } @else {
184
- @return $string;
185
- }
186
- }
@@ -1,13 +0,0 @@
1
- ////
2
- /// @group base-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
- }
@@ -1,183 +0,0 @@
1
- ////
2
- /// @group base-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
- "links-state-styling" : false
21
- ) !default;
22
-
23
- /// Change modules $config
24
- /// @param {Map} $changes Map of changes
25
- /// @example scss - General example, replace module-name with module's name
26
- /// @include module-name.set(( "property" : value ));
27
- @mixin set($changes) {
28
- $config: map.merge($config, $changes) !global;
29
- }
30
-
31
- /// Get a config option
32
- /// @param {Map} $name Name of property
33
- /// @example scss - General example, replace module-name with module's name
34
- /// @include module-name.get("property");
35
-
36
- @function get($name) {
37
- @return utils.require-map-get($config, $name, "element [config]");
38
- }
39
-
40
- /// Prints elements base styles
41
- /// @name base-elements-styles
42
- /// @example scss
43
- /// @include ulu.base-elements-styles();
44
-
45
- @mixin styles {
46
-
47
- @include utils.file-header('base', 'elements');
48
-
49
- *,
50
- ::before,
51
- ::after {
52
- box-sizing: border-box;
53
- }
54
- html {
55
- -webkit-text-size-adjust: 100%;
56
- @media (prefers-reduced-motion: no-preference) {
57
- scroll-behavior: smooth;
58
- }
59
- }
60
- body {
61
- color: color.get('type');
62
- background-color: white;
63
- font-family: typography.get("font-family");
64
- margin: 0;
65
- // Note we are using relative units here instead of setting a
66
- // pixel base like we use to on the HTML
67
- // This will allow the user preference in font size
68
- // Useful for accessibility
69
- @include typography.size("base");
70
- @include breakpoint.embed-for-scripts();
71
- }
72
- h1,
73
- h2,
74
- h3,
75
- h4,
76
- h5,
77
- h6,
78
- ul,
79
- ol,
80
- li,
81
- pre,
82
- code,
83
- p {
84
- margin: 0;
85
- padding: 0;
86
- font-size: inherit;
87
- font-family: inherit;
88
- border-width: 0;
89
- border-style: solid;
90
- font-weight: inherit;
91
- }
92
- p {
93
- $margin-top: typography.get("margin-top");
94
- margin-top: if($margin-top, $margin-top, 0);
95
- margin-bottom: typography.get("margin-bottom");
96
- }
97
- sub, sup {
98
- font-size: 75%;
99
- line-height: 0;
100
- position: relative;
101
- vertical-align: baseline;
102
- }
103
- small {
104
- @include typography.size("small", ("line-height" : typography.get("line-height-dense")));
105
- }
106
- sub {
107
- bottom: -0.25em;
108
- }
109
- sup {
110
- top: -0.5em;
111
- }
112
- b,
113
- strong {
114
- font-weight: bold;
115
- }
116
- form {
117
- width: 100%;
118
- }
119
- code,
120
- kbd,
121
- samp,
122
- pre {
123
- font-family: typography.get("font-family-monospace");
124
- }
125
- hr {
126
- height: 0;
127
- border: 0;
128
- box-sizing: content-box;
129
- overflow: visible;
130
- margin: element.get("margin") 0;
131
- border-bottom: element.get-rule-style();
132
- }
133
- iframe {
134
- border: 0;
135
- outline: 0;
136
- }
137
- figure {
138
- margin: 0;
139
- }
140
- img {
141
- display: block;
142
- width: auto;
143
- height: auto;
144
- max-width: 100%;
145
- border-style: none;
146
- }
147
- // Not styling ordered lists because they are used in navigation and other UI components
148
- ul {
149
- list-style: none;
150
- }
151
- // Style ordered lists since we don't use them much in the UI components
152
- ol {
153
- list-style: none;
154
- }
155
-
156
- a {
157
- @if (get("links-state-styling")) {
158
- @include element.link();
159
- } @else {
160
- @include element.link-defaults();
161
- }
162
- }
163
- // button,
164
- // [type="button"],
165
- // [type="reset"],
166
- // [type="submit"] {
167
- // @include button.reset();
168
- // }
169
- // For accessible tabs
170
- [role="tab"] {
171
- cursor: pointer;
172
- }
173
- dt {
174
- font-weight: bold;
175
- }
176
- [hidden],
177
- template {
178
- display: none;
179
- }
180
- blockquote {
181
- margin: 0;
182
- }
183
- }
@@ -1,62 +0,0 @@
1
- ////
2
- /// @group base (import 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
-
@@ -1,74 +0,0 @@
1
- ////
2
- /// @group base-keyframes
3
- ////
4
-
5
- @use "../utils";
6
-
7
- /// Prints CSS keyframes
8
- /// @name base-keyframes-styles
9
- /// @example scss
10
- /// @include ulu.base-keyframes-styles();
11
-
12
- @mixin styles {
13
- @include utils.file-header('base', 'keyframes');
14
- @keyframes fadeIn {
15
- 0% {
16
- opacity: 0;
17
- }
18
- 100% {
19
- opacity: 1;
20
- }
21
- }
22
- @keyframes FadeDownIn {
23
- 0% {
24
- opacity: 0;
25
- transform: translateY(-10px);
26
- }
27
- 100% {
28
- opacity: 1;
29
- transform: translateY(0);
30
- }
31
- }
32
- @keyframes fadeInLeft {
33
- 0% {
34
- opacity: 0;
35
- transform: translatex(-10px);
36
- }
37
- 100% {
38
- opacity: 1;
39
- transform: translatex(0);
40
- }
41
- }
42
- @keyframes fadeInZoom {
43
- // Delay
44
- 0% {
45
- opacity: 0;
46
- transform: scale(0);
47
- }
48
- // Start
49
- 50% {
50
- opacity: 0;
51
- transform: scale(0);
52
- }
53
- 100% {
54
- opacity: 1;
55
- transform: scale(1);
56
- }
57
- }
58
- @keyframes rotate {
59
- 0% {
60
- transform: rotate(0deg);
61
- }
62
- 100% {
63
- transform: rotate(360deg);
64
- }
65
- }
66
- @keyframes spin {
67
- from {
68
- transform:rotate(0deg);
69
- }
70
- to {
71
- transform:rotate(360deg);
72
- }
73
- }
74
- }
@@ -1,81 +0,0 @@
1
- ////
2
- /// @group base-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
- @mixin styles {
38
-
39
- @if (get("containers")) {
40
- @each $name, $values in layout.$containers {
41
- $class: selector.class($name);
42
- #{ $class } {
43
- @include layout.container-styles($name);
44
- }
45
- }
46
- }
47
- @if (get("container-nested-no-padding")) {
48
- $prefix: selector.class("container", $name-only: true);
49
- [class|="#{ $prefix }"] {
50
- [class|="#{ $prefix }"] {
51
- padding-left: 0;
52
- padding-right: 0;
53
- }
54
- }
55
- }
56
-
57
- @if (get("layout-flex")) {
58
- $prefix: selector.class("layout-flex");
59
-
60
- #{ $prefix } {
61
- display: flex;
62
- }
63
- #{ $prefix }-justified {
64
- display: flex;
65
- justify-content: space-between;
66
- }
67
- #{ $prefix }-center {
68
- display: flex;
69
- align-items: center;
70
- }
71
- #{ $prefix }-column {
72
- display: flex;
73
- flex-direction: column;
74
- }
75
- #{ $prefix }-column-center {
76
- display: flex;
77
- flex-direction: column;
78
- justify-content: center;
79
- }
80
- }
81
- }