@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,211 +0,0 @@
1
- ////
2
- /// @group color
3
- ////
4
- /// @todo Finish Documentation
5
-
6
- @use "sass:map";
7
- @use "sass:meta";
8
- @use "sass:string";
9
- @use "utils";
10
- @use "selector";
11
-
12
- /// The color palette map, can be extended or modified with set() and accessed with get()
13
- /// Note do not use names that start with "--" as those are reserved for custom-properties (pass through) also "inherit" is reserved.
14
- /// @type map
15
-
16
- $palette: (
17
- "black": black,
18
- "white": white,
19
- "type": black,
20
- "background": white,
21
- "focus": blue,
22
- "error": red,
23
- "accent": orange,
24
- "selected" : green,
25
- "box-shadow": rgba(0, 0, 0, 0.349),
26
- "box-shadow:hover" : rgba(0, 0, 0, 0.5),
27
- "rule": gray,
28
- "rule-light": lightgray,
29
- "link": blue,
30
- "link:hover": darkblue,
31
- "link:active": darkblue,
32
- "link:visited": purple,
33
- "bullet": inherit
34
- ) !default;
35
-
36
- /// Pairs of background-color and color definitions
37
- /// @type map
38
- /// @prop {Number|String} $contexts.name.background-color Color value or name of color in $palette
39
- /// @prop {Number|String} $contexts.name.color Color value or name of color in $palette
40
- /// @prop {Boolean} $contexts.name.base-class Print this value in the base module as a class (if base prints)
41
-
42
- $contexts: (
43
- "dark" : (
44
- "background-color" : "black",
45
- "color" : "white",
46
- "base-class" : true
47
- ),
48
- "light" : (
49
- "background-color" : "white",
50
- "color" : "black",
51
- "base-class" : true
52
- ),
53
- );
54
-
55
- /// Palette entries that are output as classes when using all-color-class-styles
56
- $color-classes: (
57
- "black" : true,
58
- "white" : true,
59
- "type": true
60
- ) !default;
61
-
62
- /// Used to override or extend the color palette
63
- /// @param {Map} $changes A map to merge into the color palette
64
- /// @example scss Setting the error and type color
65
- /// @include color.set((
66
- /// "type" : #444,
67
- /// "error" : orange,
68
- /// ));
69
-
70
- @mixin set($changes) {
71
- $palette: map.merge($palette, $changes) !global;
72
- }
73
-
74
- /// Get a color from the palette by name
75
- /// @param {String} $name Name of color to get
76
- /// @return {Color} Note if non-string value is passed it is sent back through, along with custom properties and keyword inherit
77
-
78
- @function get($name) {
79
- // Allow non lookup if the value is already a color (helps with code flow)
80
- @if (meta.type-of($name) == "string") {
81
- // Allow custom-properties and keyword inherit to pass through
82
- @if ($name == "inherit" or string.index($name, "var(") == 1) {
83
- @return $name;
84
- // Else look up the color from the palette
85
- } @else {
86
- @return utils.require-map-get($palette, $name, 'color');
87
- }
88
- }
89
- // Allow everything other than strings to pass through
90
- // - color, null, false, etc (so they can not output)
91
- @return $name;
92
- }
93
-
94
- /// Set ouput classes for all-color-class-styles
95
- /// @param {Map} $changes Map of changes (you can disable defaults this way)
96
-
97
- @mixin set-color-classes($changes) {
98
- $color-classes: map.merge($color-classes, $changes) !global;
99
- }
100
-
101
- @function exists($name) {
102
- $color: map.get($palette, $name);
103
- @return if($color != null, true, false);
104
- }
105
-
106
- /// Set color contexts
107
- /// @param {Map} $changes A map to merge
108
- /// @param {Map} $deep Use deep merge
109
- /// @param {Map} $overwrite Overwrite the completly (cannot be used with deep)
110
- /// @example scss Overwriting contexts
111
- /// @include color.set-contexts((
112
- /// "dark" : (
113
- /// "background-color" : red,
114
- /// "color" : white,
115
- /// )
116
- /// ), false, true);
117
-
118
- @mixin set-contexts($changes, $deep: false, $overwrite: false) {
119
- $contexts: utils.map-merge-or-overwrite($contexts, $changes, $deep, $overwrite) !global;
120
- }
121
-
122
- /// Get a context by name
123
- /// @param {String} $name Name of context
124
- /// @return {Map}
125
-
126
- @function get-context($name) {
127
- @return utils.require-map-get($contexts, $name, 'context');
128
- }
129
-
130
- /// Get a context's value'
131
- /// @param {String} $name Name of context
132
- /// @param {String} $prop The property to get
133
- /// @return {Color}
134
-
135
- @function get-context-value($name, $prop) {
136
- $context: get-context($name);
137
- $value: map.get($context, $prop);
138
- // Get from pallete by name
139
- @if (meta.type-of($value) == "string") {
140
- $value: get($value);
141
- }
142
- @return $value;
143
- }
144
-
145
- /// Prints contexts styles
146
- /// @param {String} $name Name of context
147
-
148
- @mixin context-styles($name) {
149
- $context: get-context($name);
150
- background-color: get-context-value($name, "background-color");
151
- background: map.get($context, "background"); // Allow gradients/images
152
- background-image: map.get($context, "background-image"); // Allow gradients/images
153
- color: get-context-value($name, "color");
154
- }
155
-
156
- /// Lighten a color using the default white by a percentage
157
- /// @param {Color, String} $color Color/palette color name to apply to tint
158
- /// @param {Number} $percentage Percentage
159
- /// @return {Color}
160
- /// @author
161
- /// @link https://css-tricks.com/snippets/sass/tint-shade-functions/ Modified from source (CSS Tricks, Kitty Giraudel)
162
-
163
- @function tint($color, $percentage) {
164
- @return mix(get("white"), get($color), $percentage);
165
- }
166
-
167
- /// Darken a color with the default black by a percentage
168
- /// @param {Color, String} $color Color/palette color name to shade
169
- /// @param {Number} $percentage Percentage to shade
170
- /// @return {Color}
171
- /// @author Kitty Giraudel
172
- /// @link https://css-tricks.com/snippets/sass/tint-shade-functions/ Modified from source (CSS Tricks, Kitty Giraudel)
173
-
174
- @function shade($color, $percentage) {
175
- @return mix(get("black"), get($color), $percentage);
176
- }
177
-
178
- /// Prints all context styles
179
- /// @param {String} $with-prop Checks the specific context for a certain prop (has to be truthy)(used for output in helper/base color modules)
180
- /// @example scss
181
- /// @include ulu.all-context-styles();
182
- /// @example raw Example of a color-context
183
- /// <div class="color-context-dark" style="padding: 1rem">
184
- //// Some text in dark context
185
- //// </div>
186
- @mixin all-context-styles($with-prop: null) {
187
- $prefix: selector.class("color-context");
188
- @each $name, $context in $contexts {
189
- @if (not $with-prop or map.get($context, $with-prop)) {
190
- #{ $prefix }-#{ $name } {
191
- @include context-styles($name);
192
- }
193
- }
194
- }
195
- }
196
-
197
- /// Outputs all color classes
198
- /// @example scss
199
- /// @include ulu.all-color-class-styles();
200
- /// @example raw Example of a color-context
201
- /// <span class="color-name">Some text</span>
202
- @mixin all-color-class-styles() {
203
- $prefix: selector.class("color");
204
- @each $name, $output in $color-classes {
205
- @if ($output) {
206
- #{ $prefix }-#{ $name } {
207
- color: get($name);
208
- }
209
- }
210
- }
211
- }
@@ -1,116 +0,0 @@
1
- ////
2
- /// @group cssvar
3
- ////
4
- /// Provides support for custom-properties implementations
5
-
6
- @use "sass:meta";
7
- @use "sass:map";
8
- @use "sass:string";
9
- @use "utils";
10
- @use "breakpoint";
11
-
12
- /// Module Settings
13
- /// @type Map
14
- /// @prop {String} prefix [""] Default prefix, will be added to all custom properties when using mixin or functions, unless overriden, set to empty quotes to disable
15
-
16
- $config: (
17
- "prefix" : ""
18
- ) !default;
19
-
20
- /// Change modules $config
21
- /// @example scss Setting the prefix to 'ulu'
22
- /// @include cssvar.set(( "prefix" : "ulu" ));
23
- /// @param {Map} $changes Map of changes
24
-
25
- @mixin set($changes) {
26
- $config: map.merge($config, $changes) !global;
27
- }
28
-
29
- /// Get a config option
30
- /// @example scss Getting the config value for prefix
31
- /// $prefix: cssvar.get("prefix");
32
- /// @param {String} $name Name of property
33
- /// @return {*} Map property value
34
-
35
- @function get($name) {
36
- @return utils.require-map-get($config, $name, "css-vars [config]");
37
- }
38
-
39
- /// Get a custom property name (with optional prefix)
40
- /// @example scss Getting a custom property name
41
- /// #{ cssvar.name("base-color") } { ... }
42
- /// @param {String} $name Name of custom property
43
- /// @param {String} $prefix [$config.prefix] Override default prefix
44
- /// @return {String} The formatted property name (unquoted string)
45
-
46
- @function name($name, $prefix: get("prefix")) {
47
- @if (string.length($prefix) > 0) {
48
- @return string.unquote("--#{ $prefix }-#{ $name }");
49
- } @else {
50
- @return string.unquote("--#{ $name }");
51
- }
52
- }
53
-
54
- /// Function to use a custom property within a declartion value
55
- /// @example scss Print an custom property as a value
56
- /// .test {
57
- /// color: cssvar.use("base-color");
58
- /// }
59
- /// @param {String} $name Name of custom property
60
- /// @param {String} $prefix [$config.prefix] Override default prefix
61
- /// @return {String} Formatted custom propety for use in property value (ie. var(...))
62
-
63
- @function use($name, $prefix: get("prefix")) {
64
- @return var(name($name, $prefix));
65
- }
66
-
67
- /// Outputs a single custom property declaration
68
- /// @example scss Declare a custom property
69
- /// :root {
70
- /// @include cssvar.declare("base-color", red);
71
- /// }
72
- /// @param {String} $name Name of property
73
- /// @param {*} $value The properties value to declare
74
- /// @param {String} $prefix [$config.prefix] Override default prefix
75
-
76
- @mixin declare($name, $value, $prefix: get("prefix")) {
77
- #{ name($name, $prefix) } : #{ $value };
78
- }
79
-
80
- /// Outputs a map as custom properties
81
- /// @example scss Declare each property in a map as a custom property
82
- /// :root {
83
- /// @include cssvar.declare($colors);
84
- /// }
85
- /// @param {Map} $props Properties to declare
86
- /// @param {String} $prefix [$config.prefix] Override default prefix
87
-
88
- @mixin declare-all($props, $prefix: get("prefix")) {
89
- @each $name, $value in $props {
90
- @include declare($name, $value, $prefix);
91
- }
92
- }
93
-
94
- /// Declare a custom property for current breakpoint
95
- /// @example scss Declare each property in a map as a custom property
96
- /// :root {
97
- /// @include cssvar.declare-breakpoint();
98
- /// }
99
- /// @param {Map} $breakpoints [breakpoint.get-sizes()] Breakpoints to declare
100
- /// @param {String} $name ["breakpoint"] Name to use for custom property
101
- /// @param {Map} $initial [breakpoint.get("null-name")] The value for the custom property when not within breakpoint
102
- /// @param {String} $prefix [$config.prefix] Override default prefix
103
-
104
- @mixin declare-breakpoint(
105
- $breakpoints: breakpoint.get-sizes(),
106
- $name: "breakpoint",
107
- $initial: breakpoint.get("null-name"),
108
- $prefix: get("prefix")
109
- ) {
110
- @include declare($name, $initial, $prefix);
111
- @each $size, $value in $breakpoints {
112
- @include breakpoint.min($size) {
113
- @include declare($name, $size, $prefix);
114
- }
115
- }
116
- }
@@ -1,275 +0,0 @@
1
- ////
2
- /// @group element
3
- ////
4
- /// @todo Finish Documentation
5
-
6
- @use "sass:map";
7
- @use "sass:meta";
8
- @use "color";
9
- @use "utils";
10
-
11
- /// Module Settings
12
- /// @type Map
13
- /// @prop {Number} $config.backdrop-blur Backdrop blur amount used on elements/components
14
- /// @prop {Color} $config.backdrop-color Backdrop color (modal overlays, etc)
15
- /// @prop {List} $config.box-shadow Box-shadow definition for elements that are on top of page
16
- /// @prop {List} $config.box-shadow-raised Box-shadow definition for elements that are raised off of the page (dropdowns, etc)
17
- /// @prop {List} $config.box-shadow-above Box-shadow definition for elements that are above the page (fixed items, etc)
18
- /// @prop {Number} $config.border-radius Common element border radius
19
- /// @prop {Number} $config.border-radius-small Common element border radius (small)
20
- /// @prop {Number} $config.border-radius-large Common element border radius (large)
21
- /// @prop {List} $config.text-shadow Common text shadow
22
- /// @prop {Number} $config.margin-small Common element margin (small) (default for lists)
23
- /// @prop {Number} $config.margin Common element margin
24
- /// @prop {Number} $config.margin-large Common element margin (large)
25
- /// @prop {String} $config.ol-list-style-type Ordered list type (level 1)
26
- /// @prop {String} $config.ol-list-style-type-2 Ordered list type (level 2)
27
- /// @prop {String} $config.ol-list-style-type-3 Ordered list type (level 3)
28
- /// @prop {String} $config.ul-list-style-type
29
- /// @prop {String} $config.ul-list-style-type-2
30
- /// @prop {String} $config.ul-list-style-type-3
31
- /// @prop {String} $config.link-text-decoration-default Whether links use underline, remember that removing underline will create an accessiblity issue (not relying on color)
32
- /// @prop {String} $config.link-text-decoration
33
- /// @prop {String} $config.link-text-decoration-style
34
- /// @prop {Color} $config.link-text-decoration-color
35
- /// @prop {String} $config.link-text-decoration-style-hover
36
- /// @prop {Color} $config.link-text-decoration-color-hover
37
- /// @prop {Number} $config.link-text-decoration-thickness
38
- /// @prop {Number} $config.link-text-underline-offset
39
-
40
- $config: (
41
- "backdrop-blur": 4px,
42
- "backdrop-color": rgba(73, 73, 73, 0.459),
43
- "box-shadow": 0 1px 5px color.get('box-shadow'),
44
- "box-shadow:hover": 0 1px 5px color.get('box-shadow:hover'),
45
- "box-shadow-raised": 0 1px 12px color.get('box-shadow'),
46
- "box-shadow-above": 0 1px 20px color.get('box-shadow'),
47
- "box-shadow-inset": 0 1px 5px color.get('box-shadow'),
48
- "border-radius": 6px,
49
- "border-radius-small": 3px,
50
- "border-radius-large": 12px,
51
- "text-shadow": 0 1px 4px rgba(0,0,0,0.3),
52
- "margin-small": 0.65em,
53
- "margin": 1em,
54
- "margin-large": 2em,
55
- "ol-list-style-type": decimal,
56
- "ol-list-style-type-2": lower-alpha,
57
- "ol-list-style-type-3": lower-roman,
58
- "ul-list-style-type": disc,
59
- "ul-list-style-type-2": circle,
60
- "ul-list-style-type-3": square,
61
- "link-text-decoration-default": none,
62
- "link-text-decoration": underline,
63
- "link-text-decoration-style": dotted,
64
- "link-text-decoration-color": initial,
65
- "link-text-decoration-style-hover": solid,
66
- "link-text-decoration-color-hover": false,
67
- "link-text-decoration-thickness": 0.1em,
68
- "link-text-underline-offset" : auto
69
- ) !default;
70
-
71
- /// Rule style map, redifine defaults or add to
72
- /// @type Map
73
-
74
- $rule-styles: (
75
- "default": 1px solid color.get("rule"),
76
- "light": 1px solid color.get("rule-light"),
77
- ) !default;
78
-
79
- /// Common rule margins (space between rule and type)
80
- /// @type Map
81
-
82
- $rule-margins: (
83
- "smallest": 0.5rem,
84
- "small": 1rem,
85
- "medium": 2rem,
86
- "large": 3rem
87
- ) !default;
88
-
89
- /// Change modules $config
90
- /// @param {Map} $changes Map of changes
91
- /// @include module-name.set(( "property" : value ));
92
- @mixin set($changes) {
93
- $config: map.merge($config, $changes) !global;
94
- }
95
-
96
- /// Get a config option
97
- /// @param {Map} $name Name of property
98
- /// @include module-name.get("property");
99
-
100
- @function get($name) {
101
- @return utils.require-map-get($config, $name, "element [config]");
102
- }
103
-
104
- /// Sets rule styles
105
- /// @param {Map} $changes Map of changes
106
-
107
- @mixin set-rule-styles($changes) {
108
- $rule-styles: map.merge($rule-styles, $changes) !global;
109
- }
110
-
111
- /// Sets rule margins
112
- /// @param {Map} $changes Map of changes
113
-
114
- @mixin set-rule-margins($changes) {
115
- $rule-margins: map.merge($rule-margins, $changes) !global;
116
- }
117
-
118
- /// Get a rule style
119
- /// @param {Map} $changes Map of changes
120
-
121
- @function get-rule-style($name: "default") {
122
- @return utils.require-map-get($rule-styles, $name, "element [rule style]");
123
- }
124
-
125
- /// Sets rule margin
126
- /// @param {Map} $changes Map of changes
127
-
128
- @function get-rule-margin($name) {
129
- @return utils.require-map-get($rule-margins, $name, "element [rule style]");
130
- }
131
-
132
- /// Get full rule CSS (style and margin)
133
- /// @param {Map} $changes Map of changes
134
-
135
- @mixin rule(
136
- $style-name: "default",
137
- $margin-name: null
138
- ) {
139
- @include rule-style($style-name);
140
- @include rule-margin($margin-name);
141
- }
142
- @mixin rule-style($name: "default") {
143
- border-bottom: get-rule-style($name);
144
- }
145
- @mixin rule-margin($name: null) {
146
- $margin: if($name, get-rule-margin($name), get("margin"));
147
- margin-top: $margin;
148
- margin-bottom: $margin;
149
- }
150
-
151
- /// Print link styles
152
- /// @param {Boolean} $visited Include visited style
153
- /// @param {Boolean} $active Include active style
154
-
155
- @mixin link($visited: false, $active: false) {
156
- color: color.get("link");
157
- text-decoration: get("link-text-decoration");
158
- text-decoration-style: get("link-text-decoration-style");
159
- text-decoration-color: get("link-text-decoration-color");
160
- text-decoration-thickness: get("link-text-decoration-thickness");
161
- text-underline-offset: get("link-text-underline-offset");
162
- &:hover {
163
- color: color.get("link:hover");
164
- text-decoration-style: get("link-text-decoration-style-hover");
165
- text-decoration-color: get("link-text-decoration-color-hover");
166
- }
167
- @if ($visited) {
168
- &:visited {
169
- color: color.get("link:visited");
170
- }
171
- }
172
- @if ($active) {
173
- &:active {
174
- color: color.get("link:active");
175
- }
176
- }
177
- }
178
-
179
- /// Print the defautl link styling (no hover and focus styles)
180
-
181
- @mixin link-defaults($hover: true, $visited: false) {
182
- color: color.get("link");
183
- text-decoration: get("link-text-decoration-default");
184
- @if ($hover) {
185
- &:hover {
186
- color: color.get("link:hover");
187
- }
188
- }
189
- @if ($visited) {
190
- &:visited {
191
- color: color.get("link:visited");
192
- }
193
- }
194
- }
195
-
196
- /// Print the ordered list items styling
197
- /// @param {Boolean} $bullet-color Optional bullet color (defaults to palette 'bullet')
198
-
199
- @mixin styles-ordered-list($bullet-color: "bullet") {
200
- margin-bottom: get("margin");
201
- list-style: get("ol-list-style-type") outside;
202
- li {
203
- margin-bottom: get("margin-small");
204
- margin-left: 1em;
205
- }
206
- > li {
207
- &::marker {
208
- color: color.get($bullet-color);
209
- }
210
- }
211
- ol {
212
- margin: get("margin-small") 0 0 get("margin-small");
213
- list-style: get("ol-list-style-type-2");
214
- ol {
215
- list-style-type: get("ol-list-style-type-3");
216
- }
217
- }
218
- ul,
219
- ol {
220
- margin-top: get("margin-small");
221
- margin-bottom: get("margin-small");
222
- }
223
- }
224
-
225
- /// Print the unordered list items styling
226
- /// @param {Boolean} $bullet-color Optional bullet color
227
-
228
- @mixin styles-unordered-list($bullet-color: "bullet") {
229
- list-style: get("ul-list-style-type") outside;
230
- > li {
231
- margin-left: 1.5em;
232
- margin-bottom: get("margin-small");
233
- &::marker {
234
- color: color.get($bullet-color);
235
- }
236
- }
237
- ul {
238
- list-style-type: get("ul-list-style-type-2");
239
- }
240
- ul ul {
241
- list-style-type: get("ul-list-style-type-3");
242
- }
243
- ul,
244
- ol {
245
- margin-top: get("margin-small");
246
- margin-bottom: get("margin-small");
247
- }
248
- }
249
-
250
- /// Hide text for assistive devices
251
- /// @param {Boolean} $hidden Defaults to true, pass false to override the hidden css (ie. on focus)
252
- /// @example scss
253
- /// @include ulu.layout-hidden-visually()
254
- /// // Reset styling
255
- /// @include ulu.layout-hidden-visually(false)
256
-
257
- @mixin hidden-visually($hidden: true) {
258
- @if $hidden {
259
- clip: rect(0 0 0 0);
260
- clip-path: inset(50%);
261
- height: 1px;
262
- overflow: hidden;
263
- position: absolute;
264
- white-space: nowrap;
265
- width: 1px;
266
- } @else {
267
- clip: auto;
268
- clip-path: none;
269
- height: auto;
270
- overflow: visible;
271
- position: static;
272
- white-space: normal;
273
- width: auto;
274
- }
275
- }
@@ -1,29 +0,0 @@
1
- ////
2
- /// @group index
3
- ////
4
- /// @todo Finish Documentation
5
- /// Main entry for library as single module use
6
- /// - All modules get namespaced
7
- /// @example scss - Example of color modules
8
- /// // Namespaced
9
- /// ulu.color-get();
10
- /// // Versus
11
- /// color.get();
12
- ///
13
-
14
- @forward "path" as path-*;
15
- @forward "cssvar" as cssvar-*;
16
- @forward "color" as color-*;
17
- @forward "units" as units-*;
18
- @forward "calculate" as calculate-*;
19
- @forward "breakpoint" as breakpoint-*;
20
- @forward "selector" as selector-*;
21
- @forward "element" as element-*;
22
- @forward "typography" as typography-*;
23
- @forward "button" as button-*;
24
- @forward "utility" as utility-*;
25
- @forward "layout" as layout-*;
26
- @forward "base" as base-*;
27
- @forward "components" as component-*;
28
- @forward "helpers" as helper-*;
29
- @forward "utils" as utils-*;