@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,88 +0,0 @@
1
- ////
2
- /// @group utilities
3
- ////
4
- /// @todo Finish Documentation
5
-
6
- @use "../utils";
7
- @use "../utility";
8
- @use "../layout";
9
-
10
- /// Print utilities helper styles
11
- /// @example scss
12
- /// @include ulu.helper-utilities-styles();
13
-
14
- @mixin styles {
15
-
16
- @include utils.file-header('helpers', 'utilities');
17
-
18
- // Consider removing
19
- .no-scroll-y {
20
- overflow-y: hidden;
21
- }
22
- .no-scroll-x {
23
- overflow-x: hidden;
24
- }
25
- .full-height {
26
- height: 100%;
27
- }
28
- .full-width {
29
- width: 100%;
30
- }
31
- .flex-basis-full {
32
- flex-basis: 100%;
33
- }
34
- .full-min-height {
35
- min-height: 100%;
36
- }
37
- .image-fill {
38
- width: 100%;
39
- height: 100%;
40
- object-fit: cover;
41
- }
42
- .image-full-width img,
43
- .image-full-width {
44
- width: 100%;
45
- height: auto;
46
- }
47
- .margin-auto,
48
- .center {
49
- margin-left: auto;
50
- margin-right: auto;
51
- }
52
- .margin-left-auto {
53
- margin-left: auto;
54
- }
55
- .margin-right-auto {
56
- margin-right: auto;
57
- }
58
- .no-margin {
59
- margin: 0;
60
- }
61
- .no-margin-top {
62
- margin-top: 0;
63
- }
64
- .no-margin-bottom {
65
- margin-bottom: 0;
66
- }
67
- .no-margin-left {
68
- margin-left: 0;
69
- }
70
- .no-margin-right {
71
- margin-right: 0;
72
- }
73
- .no-padding {
74
- padding: 0;
75
- }
76
- .no-padding-top {
77
- padding-top: 0;
78
- }
79
- .no-padding-bottom {
80
- padding-bottom: 0;
81
- }
82
- .no-padding-left {
83
- padding-left: 0;
84
- }
85
- .no-padding-right {
86
- padding-right: 0;
87
- }
88
- }
@@ -1,3 +0,0 @@
1
- # About Packages
2
-
3
- Packages are imports than bring in certain sets of stylesheets or libraries.
@@ -1,17 +0,0 @@
1
- ////
2
- /// @group stylesheet
3
- ////
4
- /// Stylesheet includes everything user just imports it
5
- /// - Note: Not configurable as far as output of styles (use minimal)
6
- /// @todo Finish Documentation
7
-
8
- @forward "../";
9
-
10
- @use "../base";
11
- @use "../components";
12
- @use "../helpers";
13
-
14
- // Output all stylesheets
15
- @include base.styles();
16
- @include components.styles();
17
- @include helpers.styles();
@@ -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. Packages - Entry points for users with preset imports
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,140 +0,0 @@
1
- ////
2
- /// @group breakpoint
3
- /// Breakpoint Utility Functions
4
- ////
5
-
6
- @use "sass:map";
7
- @use "calculate";
8
- @use "utils";
9
-
10
- /// Module Settings
11
- /// @type Map
12
- /// @prop {Number} $config.base 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)
13
- /// @prop {Number} $config.gap The amount to offset min from max media queries incase you are using both (ie prevent overlap)
14
- /// @prop {String} $config.null-name The name of the space from 0 to the first breakpoint (doesn't really matter) used when passing breakpoints to JS via content property
15
- /// @prop {String} $config.default the name of the breakpont that is considered the major change (ie desktop to mobile) used by other modules/components
16
-
17
- $config: (
18
- "base": 16px,
19
- "gap": 0.01em,
20
- "null-name": "none",
21
- "default" : "small"
22
- ) !default;
23
-
24
- /// Change modules $config
25
- /// @param {Map} $changes Map of changes
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
- /// @include module-name.get("property");
34
-
35
- @function get($name) {
36
- @return utils.require-map-get($config, $name, 'breakpoint [config]');
37
- }
38
-
39
-
40
- /// The default breakpoint sizes (targets are not precise, using em's)
41
- /// @type Map
42
-
43
- $sizes: (
44
- "small" : calculate.pixel-to-em(680px, get("base")),
45
- "medium" : calculate.pixel-to-em(1200px, get("base")),
46
- "large" : calculate.pixel-to-em(1500px, get("base"))
47
- ) !default;
48
-
49
- /// Update the breakpoint sizes map
50
- /// @param {Map} $changes A map to merge into the breakpoints map
51
- /// @example scss Changing the medium breakpoint and adding jumbo
52
- /// @include breakpoints.set((
53
- /// "medium" : 50em,
54
- /// "jumbo" : 100em
55
- /// ));
56
-
57
- @mixin set($changes) {
58
- $sizes: map.merge($sizes, $changes) !global;
59
- }
60
-
61
- @function exists($name) {
62
- $size: map.get($sizes, $name);
63
- @return if($size != null, true, false);
64
- }
65
-
66
- /// Create a media query that matches the min-width for a given size
67
- /// @param {Number} $size The name of the breakpoint bsize
68
- /// @example scss
69
- /// @include breakpoints.min("small") {
70
- /// // Your styles
71
- /// }
72
-
73
- @mixin min($size) {
74
- // Adding the small fraction to prevent overlap
75
- $min: utils.require-map-get($sizes, $size, "breakpoints");
76
- @media screen and (min-width: $min) {
77
- @content;
78
- }
79
- }
80
-
81
- /// Create a media query that matches the max-width for a given size
82
- /// @param {Number} $size The name of the breakpoint size
83
- /// @example scss
84
- /// @include breakpoints.max("medium") {
85
- /// // Your styles
86
- /// }
87
-
88
- @mixin max($size) {
89
- // Adding the small fraction to prevent overlap
90
- $max: utils.require-map-get($sizes, $size) - get("gap");
91
- @media screen and (max-width: $max) {
92
- @content;
93
- }
94
- }
95
-
96
- /// Create a media query that matches the min-width and max-width sizes
97
- /// @param {Number} $size The name of the breakpoint size
98
- /// @example scss
99
- /// @include breakpoints.min-max("small", "medium") {
100
- /// // Your styles
101
- /// }
102
-
103
- @mixin min-max($size-min, $size-max) {
104
- // Adding the small fraction to prevent overlap
105
- $min: utils.require-map-get($sizes, $size-min, "breakpoints");
106
- $max: utils.require-map-get($sizes, $size-max, "breakpoints") - get("gap");
107
- @media screen and (min-width: $min) and (max-width: $max) {
108
- @content;
109
- }
110
- }
111
-
112
- @mixin from($name, $direction: "min") {
113
- @if ($direction == "min" or $direction == "up") {
114
- @include min($name) {
115
- @content;
116
- }
117
- } @else if ($direction == "max" or $direction == "down") {
118
- @include max($name) {
119
- @content;
120
- }
121
- } @else {
122
- @error "ULU: Mixin error (breakpoint.from), incorrect argument '$direction' use either (min, max, up, down)";
123
- }
124
-
125
- }
126
-
127
- /// Attaches breakpoints to an element psuedo content for access via script
128
- /// Use with ulu/js/breakpoints. Breakpoints always min-width (upwards)
129
-
130
- @mixin embed-for-scripts() {
131
- &:before {
132
- display: none;
133
- content: get("null-name");
134
- @each $size, $breakpoint in $sizes {
135
- @include min($size) {
136
- content: $size;
137
- }
138
- }
139
- }
140
- }
@@ -1,223 +0,0 @@
1
- ////
2
- /// @group button
3
- ////
4
-
5
- /// Version: 1.0.1
6
-
7
- @use "sass:map";
8
- @use "sass:meta";
9
- @use "sass:string";
10
-
11
- @use "color";
12
- @use "element";
13
- @use "typography";
14
- @use "utils";
15
-
16
- // Used for function fallback
17
- $-element-get: meta.get-function("get", false, "element");
18
- $-fallbacks: (
19
- "box-shadow" : $-element-get
20
- );
21
-
22
- /// Module Settings
23
- /// @type Map
24
-
25
- $config: (
26
- "padding": (0.75em 1.5em),
27
- "background-color": color.tint(black, 30%),
28
- "background-color-hover": black,
29
- "font-family": inherit,
30
- "font-weight": bold,
31
- "line-height": 1.1,
32
- "letter-spacing": 0.02em,
33
- "text-transform": normal,
34
- "text-shadow": none,
35
- "font-size": "base",
36
- "color": white,
37
- "color-hover": white,
38
- "box-shadow": true,
39
- "border-radius": 2rem,
40
- "border-width": 0,
41
- "border-color": transparent,
42
- "border-color-hover": transparent,
43
- "margin": (0.45em 0.5em 0.45em 0),
44
- "min-width": 9rem,
45
- "icon-size": 2.5rem,
46
- "icon-font-size": 1.38rem,
47
- "icon-border-radius": 50%,
48
- "text-decoration" : none
49
- ) !default;
50
-
51
- /// Button sizes
52
- /// @type Map
53
-
54
- $sizes: (
55
- "small" : (
56
- "padding": (0.35em 1.5em),
57
- "min-width": 0,
58
- "icon-size": 2rem,
59
- "icon-font-size": 1rem
60
- ),
61
- "large" : (
62
- "padding": (1em 2em),
63
- "min-width": 11rem,
64
- "icon-size": 3.5rem
65
- )
66
- ) !default;
67
-
68
- /// Button styles
69
- /// @type Map
70
-
71
- $styles: (
72
- "transparent" : (
73
- "background-color" : transparent,
74
- "color" : "type",
75
- "border-color" : transparent,
76
- "box-shadow" : none,
77
- "hover" : (
78
- "background-color" : "white",
79
- "color" : inherit,
80
- "border-color" : transparent,
81
- )
82
- ),
83
- "outline" : (
84
- "background-color" : transparent,
85
- "color" : "type",
86
- "border-color" : "rule",
87
- "box-shadow" : none,
88
- "hover" : (
89
- "background-color" : "white",
90
- )
91
- ),
92
- ) !default;
93
-
94
- /// Change modules $config
95
- /// @param {Map} $changes Map of changes
96
- /// @example scss - General example, replace module-name with module's name
97
- /// @include module-name.set(( "property" : value ));
98
-
99
- @mixin set($changes) {
100
- $config: map.merge($config, $changes) !global;
101
- }
102
-
103
- /// Get a config option
104
- /// @param {Map} $name Name of property
105
- /// @example scss - General example, replace module-name with module's name
106
- /// @include module-name.get("property");
107
-
108
-
109
- @function get($name) {
110
- $value: utils.require-map-get($config, $name, "button [config]");
111
- @return utils.function-fallback($name, $value, $-fallbacks);
112
- }
113
-
114
- @mixin set-styles($changes, $deep: false, $overwrite: false) {
115
- $styles: utils.map-merge-or-overwrite($styles, $changes, $deep, $overwrite) !global;
116
- }
117
- @mixin set-sizes($changes, $deep: false, $overwrite: false) {
118
- $sizes: utils.map-merge-or-overwrite($sizes, $changes, $deep, $overwrite) !global;
119
- }
120
-
121
- @mixin reset() {
122
- text-transform: none;
123
- text-align: inherit;
124
- background-color: transparent;
125
- border: transparent;
126
- border-radius: 0;
127
- margin: 0;
128
- padding: 0;
129
- appearance: none;
130
- color: inherit;
131
- cursor: pointer;
132
- }
133
- @mixin default($with-reset: false) {
134
- $font-size: get("font-size");
135
- @if ($with-reset) {
136
- @include reset();
137
- }
138
- display: inline-block;
139
- text-transform: get("text-transform");
140
- text-align: center;
141
- text-shadow: get("text-shadow");
142
- vertical-align: middle;
143
- font-family: get("font-family");
144
- font-weight: get("font-weight");
145
- font-size: if(get("font-size"), typography.font-size(get("font-size")), null);
146
- @if ($font-size) {
147
- @include typography.size($font-size, null, true);
148
- }
149
- border-radius: get("border-radius");
150
- background-clip: padding-box;
151
- padding: get("padding");
152
- line-height: get("line-height");
153
- letter-spacing: get("letter-spacing");
154
- box-shadow: get("box-shadow");
155
- margin: get("margin");
156
- min-width: get("min-width");
157
- max-width: 100%; // Questionable, not sure if it's needed
158
- // Should override link visted coloring
159
- &,
160
- &:visited {
161
- color: color.get(get("color"));
162
- border: get("border-width") solid get("border-color");
163
- background-color: get("background-color");
164
- text-decoration: get("text-decoration");
165
- }
166
- &:last-child {
167
- margin-right: 0;
168
- }
169
- &:hover {
170
- color: get("color-hover");
171
- background-color: get("background-color-hover");
172
- border-color: get("border-color-hover");
173
- text-decoration: get("text-decoration");
174
- }
175
- }
176
-
177
- @mixin size($name) {
178
- $size: utils.require-map-get($sizes, $name, 'button [size]');
179
- $font-size: map.get($size, "font-size");
180
- padding: map.get($size, "padding");
181
- border-radius: map.get($size, "border-radius");
182
- border-width: map.get($size, "border-width");
183
- min-width: map.get($size, "min-width");
184
- @if $font-size {
185
- @include typography.size($font-size)
186
- }
187
- }
188
-
189
- @function get-style-value($name, $prop, $for-hover: false) {
190
- $is-color-prop: string.index($prop, "color");
191
- $style: utils.require-map-get($styles, $name, 'button [color value]');
192
- $hover: map.get($style, "hover");
193
- $hover: if($hover, $hover, ());
194
- $from: if($for-hover, $hover, $style);
195
- $value: map.get($from, $prop);
196
- $value: if($value, $value, map.get($style, $prop)); // Fallback to parent (if hover)
197
-
198
- @if (meta.type-of($value) == "string" and $is-color-prop and $value != "inherit" and $value != "transparent") {
199
- @return color.get($value);
200
- } @else {
201
- @return $value;
202
- }
203
- }
204
-
205
- @mixin style($name) {
206
- &,
207
- &:visited {
208
- background-color: get-style-value($name, "background-color", false);
209
- color: get-style-value($name, "color", false);
210
- border-color: get-style-value($name, "border-color", false);
211
- border-width: get-style-value($name, "border-width", false);
212
- box-shadow: get-style-value($name, "box-shadow", false);
213
- text-decoration: get-style-value($name, "text-decoration", false);
214
- font-weight: get-style-value($name, "font-weight", false);
215
- }
216
- &:hover {
217
- background-color: get-style-value($name, "background-color", true);
218
- color: get-style-value($name, "color", true);
219
- border-color: get-style-value($name, "border-color", true);
220
- box-shadow: get-style-value($name, "box-shadow", true);
221
- text-decoration: get-style-value($name, "text-decoration", true);
222
- }
223
- }
@@ -1,64 +0,0 @@
1
- ////
2
- /// @group calculate
3
- ////
4
-
5
- @use "sass:math";
6
- @use "sass:map";
7
- @use "utils";
8
-
9
- /// Module Settings
10
- /// @type Map
11
- /// @prop {Number} $config.responsive-change Default responsive amount to modify items using responsive-property mixin
12
-
13
- $config: (
14
- "responsive-change": 0.5vw
15
- ) !default;
16
-
17
- /// Change modules $config
18
- /// @param {Map} $changes Map of changes
19
- /// @include module-name.set(( "property" : value ));
20
- @mixin set($changes) {
21
- $config: map.merge($config, $changes) !global;
22
- }
23
-
24
- /// Get a config option
25
- /// @param {Map} $name Name of property
26
- /// @include module-name.get("property");
27
-
28
- @function get($name) {
29
- @return utils.require-map-get($config, $name, "calculate [config]");
30
- }
31
-
32
- /// Calculate the size of something at a given scale (percentage/exponential)
33
- /// @param {Number} $base The number the scale starts at
34
- /// @param {Number} $ratio The amount the scale changes over one set
35
- /// @param {Number} $sizes The number of steps in the scale
36
- /// @param {Number} $size The step you are trying to calculate
37
- /// @return {Number}
38
-
39
- @function ratio-scale-size($base, $ratio, $sizes, $size) {
40
- @return $base * math.pow($ratio, math.div($size, $sizes));
41
- }
42
-
43
- /// Convert from pixel to em
44
- /// @param {Number} $pixels The number the scale starts at
45
- /// @param {Number} $base How many pixels equal 1em
46
- /// @return {Number} Em Conversion
47
-
48
- @function pixel-to-em($pixels, $base: 16px) {
49
- @return math.div($pixels, $base) + 1em;
50
- }
51
-
52
- /// Provides user with a fallback for a calc that's just an enhancement
53
- /// @param {String} $property The CSS property to set
54
- /// @param {*} $value The value to set on the property
55
- /// @param {Css} $responsive-change The amount to change (vw or vh units) (combined with unit past)
56
-
57
- @mixin responsive-property(
58
- $property,
59
- $value,
60
- $responsive-change: get("responsive-change")
61
- ) {
62
- #{ $property } : $value;
63
- #{ $property } : calc(#{ $value } + #{ $responsive-change });
64
- }