@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
package/trash/logo.svg DELETED
@@ -1,16 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 198 203">
3
- <defs>
4
- <style>
5
- .cls-1 {
6
- fill: #fff;
7
- }
8
-
9
- .cls-2 {
10
- fill: #925f93;
11
- }
12
- </style>
13
- </defs>
14
- <circle class="cls-2" cx="99" cy="101.5" r="98.98"/>
15
- <path class="cls-1" d="m62,60.46h-12.6v-7.94h34.8v7.94h-12.6v52.75c0,6.98,1.37,13.15,4.24,17.67,4.52,6.99,12.74,10.83,23.15,10.83s18.91-3.98,23.15-11.23c2.74-4.66,4.25-10.55,4.25-17.54v-52.48h-12.61v-7.94h34.8v7.94h-12.61v52.88c0,8.91-2.19,16.99-6.16,22.75-6.3,9.32-17.54,14.39-30.83,14.39s-24.93-5.21-31.1-14.52c-4.11-6.03-5.9-13.57-5.9-22.61v-52.88Z"/>
16
- </svg>
@@ -1,58 +0,0 @@
1
-
2
- ### Directory Contents/Structure
3
-
4
- 1. Base - The area for the base styles (normalize, html elements)
5
- 2. Components - The area for reusable ui/layout components
6
- 3. Helpers - The place for stylesheets that provide overriding/atomic styles (accessibility, type classes, etc)
7
- 4. Lib - The modules that are used throughout the system and on the user's side
8
- 5. Stylesheets - Entry points for users to print entire stylesheet
9
- - Note: User's will need to add a namespace like `ulu` when importing a package
10
-
11
- ### Important Goals
12
-
13
- 1. You should be able get access to anything from the user's side
14
- - Mixins, Functions, Variables
15
- - Styles - Things should be able to be
16
- - Extended into a pre-existing system (when you have little selector control)
17
- - Mixing in styles when needed
18
- - Use placeholders as a more flexible selector system
19
- 2. Namespacing
20
- - Should you be able to namespace the library (selectors not modules)?
21
- - Would create a log of interpolation which makes the codebase harder to maintain
22
- - Bigger barrier if someone else works into this
23
- - Probably important with certain components
24
- - If it's within a module/component (interpolation) it's probably not a huge deal
25
-
26
- ### Rules
27
-
28
- - Leverage default parameters in mixin and functions over config defaults that rely on other module's configuration
29
- - Testing shows that these are evaluated when the function is called, which makes sense because if not these may have all the same references (thinking JS has the parameter scope and is evaluated on call)
30
- - No changing vars (aka with)
31
- - No extending (not supported, only within the same module for convenience)
32
- - No relying on use of @use > with to configure, it's too complicated for user (and me).
33
- - Use mixin to set vars (kind of a pain but we should probably rely more on maps so there isn't so much repetition)
34
- - Kabab case will be used for everything, @see "Module Prefixes" below, works better with kabab case
35
- - Modules use simple variable, mixins and function names relative to their module
36
- - Forwards will make namespacing in the overall ulu packaged module
37
- - **Module Prefixes:** Modules all get prefixed by parent module ie lib will transform color.set() to color-set(), adding the modules namespace for users that are importing the whole library. It also matches the core modules `map-get()` and when @used `map.get()`
38
-
39
- ### Writing Docs
40
-
41
- - Should be written from the user's point of view
42
- - Use prefixes @see "Module Prefixes" in member names. This will avoid confusion about normal use case. For advanced user importing specific parts would already be familiar with this pattern.
43
-
44
- ### Ideas
45
-
46
- - How to solve the inability to use standard vars (avoid with)
47
- - Use maps (reduce code repetition, just need boiler plate get/set (may be able to contain this in utils and extend the module not sure if you can add functions to a namespace dynamically?))
48
- - Issue: You can't use it for grandchild deps defaults, aka if another dep has .get() then it will get the unconfigured value
49
- - The issue is that these things are not references or there is no way to easily poin
50
- - Think how do we solve this in JS?
51
- - Could this be solved by some standardized lifecycle?
52
- - Fuzzy but something that the user has to call to initialize? (don't like this)
53
- - Could this be solved by tokens? Like the color library (actual value is set when requested, versus variables (on module init))
54
- - Note: This is one reason the element system ("_element()") mixin could be handy across the board. It still has the same issue though in terms of references changing (maps being cloned and they aren't references)
55
- - Could use a global config/theme and allow that to be set with "with"
56
- - Or allow the user to configure the modules and not try and group modules
57
- - One flat list
58
- - Needs more thought
@@ -1,190 +0,0 @@
1
- ////
2
- /// @group breakpoint
3
- ////
4
-
5
- @use "sass:map";
6
- @use "calculate";
7
- @use "utils";
8
-
9
- /// Module Settings
10
- /// @type Map
11
- /// @prop {Number} base [16px] Assumed pixel base, can change based on users font settings so this is just o get us in the ballpark). Note this is not the base font size but the user agent's or user's browser preferernce. This number is just being used for calculating estimated em sizes from average base. Since pixels are easier to understand but since we allow the user to set their font size. All of our css is relative to that, including most of the layout (rems, other relative units)
12
- /// @prop {Number} gap [0.01em] The amount to offset min from max media queries incase you are using both (ie prevent overlap)
13
- /// @prop {String} null-name ["none"] The name of the space from 0 to the first breakpoint (doesn't really matter) used when passing breakpoints to JS via content property
14
- /// @prop {String} default ["small"] The name of the breakpont that is considered the major change (ie desktop to mobile) used by other modules/components
15
-
16
- $config: (
17
- "base": 16px,
18
- "gap": 0.01em,
19
- "null-name": "none",
20
- "default" : "small"
21
- ) !default;
22
-
23
- /// Change modules $config
24
- /// @example scss Change default name
25
- /// @include breakpoint.set(( "default" : "mini" ));
26
- /// @param {Map} $changes Map of changes
27
-
28
- @mixin set($changes) {
29
- $config: map.merge($config, $changes) !global;
30
- }
31
-
32
- /// Get a config option
33
- /// @example scss Get default breakpoint name
34
- /// $default: breakpoint.get("default");
35
- /// @param {Map} $name Name of property
36
- /// @return {*} Property Value
37
-
38
- @function get($name) {
39
- @return utils.require-map-get($config, $name, 'breakpoint [config]');
40
- }
41
-
42
-
43
- /// The default breakpoint sizes (targets are not precise, using em's)
44
- /// - Map of breakpoints
45
- /// - Each property is the breakpoints name
46
- /// - Each value is that breakpoints point (set in em)
47
- /// @type Map
48
-
49
- $sizes: (
50
- "small" : calculate.pixel-to-em(680px, get("base")),
51
- "medium" : calculate.pixel-to-em(1200px, get("base")),
52
- "large" : calculate.pixel-to-em(1500px, get("base"))
53
- ) !default;
54
-
55
- /// Update the breakpoint sizes map
56
- /// @example scss Changing the medium breakpoint and adding jumbo
57
- /// @include breakpoints.set((
58
- /// "medium" : 50em,
59
- /// "jumbo" : 100em
60
- /// ));
61
- /// @param {Map} $changes A map to merge into the breakpoints map
62
- /// @param {Map} $deep [false] Deep map merge (doesn't apply here)
63
- /// @param {Map} $overwrite [false] Overwrite the sizes, instead of merging changes
64
-
65
- @mixin set-sizes($changes, $deep: false, $overwrite: false) {
66
- $sizes: utils.map-merge-or-overwrite($sizes, $changes, $deep, $overwrite) !global;
67
- }
68
-
69
- /// Get all breakpoint sizes (ie. $sizes)
70
- @function get-sizes() {
71
- @return $sizes;
72
- }
73
-
74
- /// Geta a specific size
75
- /// @param {String} $size The name of the size to get
76
- /// @return {Number} The sizes value
77
-
78
- @function get-size($size) {
79
- @return utils.require-map-get($sizes, $size, "breakpoint size");
80
- }
81
-
82
- /// Check if a specific size exist
83
- /// @param {String} $name The breakpoint size to check if exists
84
- /// @return {Boolean}
85
-
86
- @function exists($name) {
87
- $size: map.get($sizes, $name);
88
- @return if($size != null, true, false);
89
- }
90
-
91
- /// Create a media query that matches the min-width for a given size
92
- /// @example scss
93
- /// @include breakpoints.min("small") {
94
- /// // Your styles
95
- /// }
96
- /// @example css
97
- /// @media screen and (min-width: 42.5em) {
98
- /// // Your Styles
99
- /// }
100
- /// @param {String} $size The name of the breakpoint size
101
-
102
- @mixin min($size) {
103
- // Adding the small fraction to prevent overlap
104
- $min: get-size($size);
105
- @media screen and (min-width: $min) {
106
- @content;
107
- }
108
- }
109
-
110
- /// Create a media query that matches the max-width for a given size
111
- /// @example scss
112
- /// @include breakpoints.max("medium") {
113
- /// // Your styles
114
- /// }
115
- /// @example css
116
- /// @media screen and (max-width: 42.4em) {
117
- /// // Your Styles
118
- /// }
119
- /// @param {Number} $size The name of the breakpoint size
120
-
121
- @mixin max($size) {
122
- // Adding the small fraction to prevent overlap
123
- $max: get-size($size) - get("gap");
124
- @media screen and (max-width: $max) {
125
- @content;
126
- }
127
- }
128
-
129
- /// Create a media query that matches between two breakpoint sizes
130
- /// @example scss
131
- /// @include breakpoints.min-max("small", "medium") {
132
- /// // Your styles
133
- /// }
134
- /// @example css
135
- /// @media screen and (min-width: 42.5) and (max-width: 75em) {
136
- /// // Your Styles
137
- /// }
138
- /// @param {String} $size-min The name of the smallest breakpoint size
139
- /// @param {String} $size-max The name of the largest breakpoint size
140
-
141
- @mixin min-max($size-min, $size-max) {
142
- // Adding the small fraction to prevent overlap
143
- $min: get-size($size-min);
144
- $max: get-size($size-max);
145
- @media screen and (min-width: $min) and (max-width: $max) {
146
- @content;
147
- }
148
- }
149
-
150
- /// Create a media query from a specific size in either direction
151
- /// - This is for mostly programmatic usage, so that a user could pass a breakpoint confiuration in either direction
152
- /// - This way you don't need to repeat conditions (ie if min ... else ...)
153
- /// @example scss
154
- /// $size: map.get($user-breakpoint, "size");
155
- /// $dir: map.get($user-breakpoint, "direction");
156
- /// @include breakpoints.from($size, $dir) {
157
- /// // Your styles
158
- /// }
159
- /// @param {String} $name The name of the breakpoint size
160
- /// @param {String} $direction The direction the media query should target (min|up, max|down)
161
-
162
- @mixin from($name, $direction: "min") {
163
- @if ($direction == "min" or $direction == "up") {
164
- @include min($name) {
165
- @content;
166
- }
167
- } @else if ($direction == "max" or $direction == "down") {
168
- @include max($name) {
169
- @content;
170
- }
171
- } @else {
172
- @error "ULU: Mixin error (breakpoint.from), incorrect argument '$direction' use either (min, max, up, down)";
173
- }
174
- }
175
-
176
- /// Attaches breakpoints to an element psuedo content for access via script
177
- /// - Note you can also use cssvar.declare-breakpoints to get a similiar implementation with css custom-properties
178
- /// - Use with ulu/js/breakpoints. Breakpoints always min-width (upwards) for javascript setup
179
-
180
- @mixin embed-for-scripts() {
181
- &:before {
182
- display: none;
183
- content: get("null-name");
184
- @each $size, $breakpoint in $sizes {
185
- @include min($size) {
186
- content: $size;
187
- }
188
- }
189
- }
190
- }
@@ -1,229 +0,0 @@
1
- ////
2
- /// @group button
3
- ////
4
- /// @todo Finish Documentation
5
-
6
- /// Version: 1.0.2
7
-
8
- @use "sass:map";
9
- @use "sass:meta";
10
- @use "sass:string";
11
-
12
- @use "color";
13
- @use "element";
14
- @use "typography";
15
- @use "utils";
16
-
17
- // Used for function fallback
18
- $-element-get: meta.get-function("get", false, "element");
19
- $-fallbacks: (
20
- "box-shadow" : $-element-get
21
- );
22
-
23
- /// Module Settings
24
- /// @type Map
25
-
26
- $config: (
27
- "padding": (0.75em 1.5em),
28
- "background-color": color.tint(black, 30%),
29
- "background-color-hover": black,
30
- "font-family": inherit,
31
- "white-space" : nowrap,
32
- "font-weight": bold,
33
- "line-height": 1.1,
34
- "letter-spacing": 0.02em,
35
- "text-transform": none,
36
- "text-shadow": none,
37
- "font-size": "base",
38
- "color": white,
39
- "color-hover": white,
40
- "color-active": white,
41
- "box-shadow": true,
42
- "border-radius": 2rem,
43
- "border-width": 0,
44
- "border-color": transparent,
45
- "border-color-hover": transparent,
46
- "margin": (0.45em 0.5em 0.45em 0),
47
- "min-width": 9rem,
48
- "icon-size": 2.5rem,
49
- "icon-font-size": 1.38rem,
50
- "icon-border-radius": 50%,
51
- "text-decoration" : none
52
- ) !default;
53
-
54
- /// Button sizes
55
- /// @type Map
56
-
57
- $sizes: (
58
- "small" : (
59
- "padding": (0.35em 1.5em),
60
- "min-width": 0,
61
- "icon-size": 2rem,
62
- "icon-font-size": 1rem
63
- ),
64
- "large" : (
65
- "padding": (1em 2em),
66
- "min-width": 11rem,
67
- "icon-size": 3.5rem
68
- )
69
- ) !default;
70
-
71
- /// Button styles
72
- /// @type Map
73
-
74
- $styles: (
75
- "transparent" : (
76
- "background-color" : transparent,
77
- "color" : "type",
78
- "border-color" : transparent,
79
- "box-shadow" : none,
80
- "hover" : (
81
- "background-color" : "white",
82
- "color" : inherit,
83
- "border-color" : transparent,
84
- )
85
- ),
86
- "outline" : (
87
- "background-color" : transparent,
88
- "color" : "type",
89
- "border-color" : "rule",
90
- "box-shadow" : none,
91
- "hover" : (
92
- "background-color" : "white",
93
- )
94
- ),
95
- ) !default;
96
-
97
- /// Change modules $config
98
- /// @param {Map} $changes Map of changes
99
- /// @example scss - General example, replace module-name with module's name
100
- /// @include module-name.set(( "property" : value ));
101
-
102
- @mixin set($changes) {
103
- $config: map.merge($config, $changes) !global;
104
- }
105
-
106
- /// Get a config option
107
- /// @param {Map} $name Name of property
108
- /// @example scss - General example, replace module-name with module's name
109
- /// @include module-name.get("property");
110
-
111
-
112
- @function get($name) {
113
- $value: utils.require-map-get($config, $name, "button [config]");
114
- @return utils.function-fallback($name, $value, $-fallbacks);
115
- }
116
-
117
- @mixin set-styles($changes, $deep: false, $overwrite: false) {
118
- $styles: utils.map-merge-or-overwrite($styles, $changes, $deep, $overwrite) !global;
119
- }
120
- @mixin set-sizes($changes, $deep: false, $overwrite: false) {
121
- $sizes: utils.map-merge-or-overwrite($sizes, $changes, $deep, $overwrite) !global;
122
- }
123
-
124
- @mixin reset() {
125
- text-transform: none;
126
- text-align: inherit;
127
- background-color: transparent;
128
- border: transparent;
129
- border-radius: 0;
130
- margin: 0;
131
- padding: 0;
132
- appearance: none;
133
- color: inherit;
134
- cursor: pointer;
135
- }
136
- @mixin default($with-reset: false) {
137
- $font-size: get("font-size");
138
- @if ($with-reset) {
139
- @include reset();
140
- }
141
- appearance: none; // If used with select for example
142
- display: inline-block;
143
- text-transform: get("text-transform");
144
- text-align: center;
145
- text-shadow: get("text-shadow");
146
- vertical-align: middle;
147
- font-family: get("font-family");
148
- font-weight: get("font-weight");
149
- @if ($font-size) {
150
- @include typography.size($font-size, null, true);
151
- }
152
- border-radius: get("border-radius");
153
- background-clip: padding-box;
154
- padding: get("padding");
155
- line-height: get("line-height");
156
- letter-spacing: get("letter-spacing");
157
- box-shadow: get("box-shadow");
158
- margin: get("margin");
159
- min-width: get("min-width");
160
- white-space: get("white-space");
161
- max-width: 100%; // Questionable, not sure if it's needed
162
- // Should override link visted coloring
163
- &,
164
- &:visited {
165
- color: color.get(get("color"));
166
- border: get("border-width") solid get("border-color");
167
- background-color: get("background-color");
168
- text-decoration: get("text-decoration");
169
- }
170
- &:last-child {
171
- margin-right: 0;
172
- }
173
- &:hover,
174
- &:focus {
175
- color: get("color-hover");
176
- background-color: get("background-color-hover");
177
- border-color: get("border-color-hover");
178
- text-decoration: get("text-decoration");
179
- }
180
- }
181
-
182
- @mixin size($name) {
183
- $size: utils.require-map-get($sizes, $name, 'button [size]');
184
- $font-size: map.get($size, "font-size");
185
- padding: map.get($size, "padding");
186
- border-radius: map.get($size, "border-radius");
187
- border-width: map.get($size, "border-width");
188
- min-width: map.get($size, "min-width");
189
- @if $font-size {
190
- @include typography.size($font-size)
191
- }
192
- }
193
-
194
- @function get-style-value($name, $prop, $for-hover: false) {
195
- $is-color-prop: string.index($prop, "color");
196
- $style: utils.require-map-get($styles, $name, 'button [color value]');
197
- $hover: map.get($style, "hover");
198
- $hover: if($hover, $hover, ());
199
- $from: if($for-hover, $hover, $style);
200
- $value: map.get($from, $prop);
201
- $value: if($value, $value, map.get($style, $prop)); // Fallback to parent (if hover)
202
-
203
- @if (meta.type-of($value) == "string" and $is-color-prop and $value != "inherit" and $value != "transparent") {
204
- @return color.get($value);
205
- } @else {
206
- @return $value;
207
- }
208
- }
209
-
210
- @mixin style($name) {
211
- &,
212
- &:visited {
213
- background-color: get-style-value($name, "background-color", false);
214
- color: get-style-value($name, "color", false);
215
- border-color: get-style-value($name, "border-color", false);
216
- border-width: get-style-value($name, "border-width", false);
217
- box-shadow: get-style-value($name, "box-shadow", false);
218
- text-decoration: get-style-value($name, "text-decoration", false);
219
- font-weight: get-style-value($name, "font-weight", false);
220
- }
221
- &:hover,
222
- &:focus {
223
- background-color: get-style-value($name, "background-color", true);
224
- color: get-style-value($name, "color", true);
225
- border-color: get-style-value($name, "border-color", true);
226
- box-shadow: get-style-value($name, "box-shadow", true);
227
- text-decoration: get-style-value($name, "text-decoration", true);
228
- }
229
- }
@@ -1,65 +0,0 @@
1
- ////
2
- /// @group calculate
3
- ////
4
- /// @todo Finish Documentation
5
-
6
- @use "sass:math";
7
- @use "sass:map";
8
- @use "utils";
9
-
10
- /// Module Settings
11
- /// @type Map
12
- /// @prop {Number} $config.responsive-change Default responsive amount to modify items using responsive-property mixin
13
-
14
- $config: (
15
- "responsive-change": 0.5vw
16
- ) !default;
17
-
18
- /// Change modules $config
19
- /// @param {Map} $changes Map of changes
20
- /// @include module-name.set(( "property" : value ));
21
- @mixin set($changes) {
22
- $config: map.merge($config, $changes) !global;
23
- }
24
-
25
- /// Get a config option
26
- /// @param {Map} $name Name of property
27
- /// @include module-name.get("property");
28
-
29
- @function get($name) {
30
- @return utils.require-map-get($config, $name, "calculate [config]");
31
- }
32
-
33
- /// Calculate the size of something at a given scale (percentage/exponential)
34
- /// @param {Number} $base The number the scale starts at
35
- /// @param {Number} $ratio The amount the scale changes over one set
36
- /// @param {Number} $sizes The number of steps in the scale
37
- /// @param {Number} $size The step you are trying to calculate
38
- /// @return {Number}
39
-
40
- @function ratio-scale-size($base, $ratio, $sizes, $size) {
41
- @return $base * math.pow($ratio, math.div($size, $sizes));
42
- }
43
-
44
- /// Convert from pixel to em
45
- /// @param {Number} $pixels The number the scale starts at
46
- /// @param {Number} $base How many pixels equal 1em
47
- /// @return {Number} Em Conversion
48
-
49
- @function pixel-to-em($pixels, $base: 16px) {
50
- @return math.div($pixels, $base) + 1em;
51
- }
52
-
53
- /// Provides user with a fallback for a calc that's just an enhancement
54
- /// @param {String} $property The CSS property to set
55
- /// @param {*} $value The value to set on the property
56
- /// @param {Css} $responsive-change The amount to change (vw or vh units) (combined with unit past)
57
-
58
- @mixin responsive-property(
59
- $property,
60
- $value,
61
- $responsive-change: get("responsive-change")
62
- ) {
63
- #{ $property } : $value;
64
- #{ $property } : calc(#{ $value } + #{ $responsive-change });
65
- }