@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,247 +0,0 @@
1
- ////
2
- /// @group layout
3
- ////
4
- /// @todo Finish Documentation
5
-
6
- @use "sass:map";
7
- @use "sass:list";
8
- @use "sass:meta";
9
- @use "breakpoint";
10
- @use "utils";
11
- @use "calculate";
12
- @use "breakpoint";
13
-
14
- /// Module Settings
15
- /// @type Map
16
- /// @prop {Number} $config.max-width Common max-width for site
17
- /// @prop {Number} $config.margin Common margin for site
18
- /// @prop {Number} $config.z-index-fixed Common z-index, above everything
19
- /// @prop {Number} $config.z-index-sticky Common z-index for sticky or stuck items
20
- /// @prop {Number} $config.z-index-above Common z-index, below sticky
21
- /// @prop {Number} columns [12] Default for grid mixins
22
- /// @prop {Number} gutter [14px] Default gutter for grid mixin
23
- /// @prop {Boolean|String} breakpoint [false] Change the default breakpoint, if falsy will get default breakpoint from breakpoint module
24
- /// @prop {Map} extra-breakpoints [Medium and large breakpint configs] Default extra breakpoints for grid mixins
25
- $config: (
26
- "max-width": 90rem,
27
- "margin": 2rem,
28
- "z-index-sticky": 100,
29
- "z-index-above": 450,
30
- "z-index-fixed": 1000,
31
- "columns": 12,
32
- "gutter": 14px,
33
- "breakpoint" : false, // Fallback to default
34
- "extra-breakpoints" : (
35
- "medium" : (
36
- "breakpoint" : "medium",
37
- "gutter" : 15px
38
- ),
39
- "large" : (
40
- "breakpoint" : "large",
41
- "gutter" : 20px
42
- )
43
- ),
44
- ) !default;
45
-
46
- /// Change modules $config
47
- /// @param {Map} $changes Map of changes
48
- /// @include module-name.set(( "property" : value ));
49
- @mixin set($changes) {
50
- $config: map.merge($config, $changes) !global;
51
- }
52
-
53
- /// Get a config option
54
- /// @param {Map} $name Name of property
55
- /// @include module-name.get("property");
56
-
57
- @function get($name) {
58
- @return utils.require-map-get($config, $name, "layout [config]");
59
- }
60
-
61
- $containers: (
62
- "container" : (
63
- "width" : 100%,
64
- "max-width" : get("max-width"),
65
- "padding" : (get("margin") get("margin")),
66
- "breakpoints" : null,
67
- "responsive" : false,
68
- "responsive-amount" : 3vw
69
- )
70
- ) !default;
71
-
72
- @mixin set-containers($changes, $deep: false, $overwrite: false) {
73
- $containers: utils.map-merge-or-overwrite($containers, $changes, $deep, $overwrite) !global;
74
- }
75
-
76
- @function get-container($name, $breakpoint: false) {
77
- $container: utils.require-map-get($containers, $name, "Layout [get-container]");
78
- $breakpoints: map.get($container, "breakpoints");
79
- @if ($breakpoint) {
80
- @return utils.require-map-get($breakpoints, $breakpoint, "[container breakpoint]");
81
- } @else {
82
- @return $container;
83
- }
84
- }
85
- /// Returns padding to another property including breakpoints
86
- /// ie. { top: $containers-padding; }
87
- @mixin match-container-padding($property, $name: "container", $sides: true) {
88
- $container: get-container($name);
89
- $breakpoints: map.get($container, "breakpoints");
90
- #{ $property }: get-container-padding($name, $sides);
91
- @if $breakpoints {
92
- @each $breakpoint, $props in $breakpoints {
93
- $direction: map.get($props, "direction");
94
- @include breakpoint.from($breakpoint, $direction) {
95
- #{ $property }: get-container-padding($name, $sides, $breakpoint);
96
- }
97
- }
98
- }
99
- }
100
-
101
- /// For a given property for every breakpoint in a given container
102
- /// creates a css calc value that will match the containers side margin
103
- /// The margin is created via empty space when the container hits the max-width
104
- /// If passing inlude padding it would be the containers
105
- /// side (x) + the padding. This accounts for the containers max-width to give an absoute value
106
- @mixin match-container-margin($property, $name: "container", $include-padding: true) {
107
- $container: get-container($name);
108
- $breakpoints: map.get($container, "breakpoints");
109
- $padding: if($include-padding, get-container-padding($name, true), 0);
110
- $max: map.get($container, "max-width");
111
- #{ $property }: max(((100vw - $max) / 2) + $padding, $padding);
112
- @if $breakpoints {
113
- @each $breakpoint, $props in $breakpoints {
114
- $direction: map.get($props, "direction");
115
- @include breakpoint.from($breakpoint, $direction) {
116
- $pad: if($include-padding, get-container-padding($name, true, $breakpoint), 0);
117
- #{ $property }: max(((100vw - $max) / 2) + $pad, $pad);
118
- }
119
- }
120
- }
121
- }
122
-
123
- @function get-container-padding($name, $sides: true, $specific-breakpoint: false) {
124
- $container: get-container($name, $specific-breakpoint);
125
- $padding: map.get($container, "padding");
126
- $is-list: meta.type-of($padding) == "list"; // Else number
127
- @if (not $is-list) {
128
- @return $padding;
129
- } @else {
130
- @return list.nth($padding, if($sides, 2, 1));
131
- }
132
- }
133
-
134
- @mixin container-padding($name, $sides: true, $ends: true, $specific-breakpoint: false) {
135
- $container: get-container($name, $specific-breakpoint);
136
- $responsive: map.get($container, "responsive");
137
- $x: get-container-padding-x($name, $specific-breakpoint);
138
- $y: get-container-padding-y($name, $specific-breakpoint);
139
- $resp-amount: if(meta.type-of($responsive) == number, $responsive, calculate.get("responsive-change"));
140
-
141
- @if $responsive {
142
- @if $sides {
143
- @include calculate.responsive-property("padding-left", $x, $resp-amount);
144
- @include calculate.responsive-property("padding-right", $x, $resp-amount);
145
- }
146
- @if $ends {
147
- @include calculate.responsive-property("padding-top", $y, $resp-amount);
148
- @include calculate.responsive-property("padding-bottom", $y, $resp-amount);
149
- }
150
- } @else {
151
- @if $sides {
152
- padding-left: $x;
153
- padding-right: $x;
154
- }
155
- @if $ends {
156
- padding-top: $y;
157
- padding-bottom: $y;
158
- }
159
- }
160
- }
161
- @function get-container-padding-x($name, $specific-breakpoint: false) {
162
- @return get-container-padding($name, true, $specific-breakpoint);
163
- }
164
- @function get-container-padding-y($name, $specific-breakpoint: false) {
165
- @return get-container-padding($name, false, $specific-breakpoint);
166
- }
167
- @mixin container-styles($name: "container", $specific-breakpoint: false) {
168
- $container: get-container($name, $specific-breakpoint);
169
- $breakpoints: map.get($container, "breakpoints");
170
-
171
- $width: map.get($container, "width");
172
- // @debug $specific-breakpoint;
173
- // @if $specific-breakpoint {
174
- // @debug $container;
175
- // }
176
- @if ($width == null) {
177
- $width: 100%;
178
- }
179
- display: block;
180
- margin-left: auto;
181
- margin-right: auto;
182
- width: $width;
183
- max-width: map.get($container, "max-width");
184
- @include container-padding($name, $specific-breakpoint: $specific-breakpoint);
185
-
186
- // Recursive print other breakpoints
187
- @if $breakpoints and not $specific-breakpoint {
188
- @each $breakpoint, $props in $breakpoints {
189
- $direction: map.get($props, "direction");
190
- @include breakpoint.from($breakpoint, $direction) {
191
- @include container-styles($name, $breakpoint);
192
- }
193
- }
194
- }
195
- }
196
-
197
- /// Prints clearfix styles
198
-
199
- @mixin clearfix() {
200
- &:before,
201
- &:after {
202
- content: "";
203
- display: table;
204
- flex-basis: 0; // Flexbox, clear fix for pseudo elements in Safari
205
- order: 1;
206
- }
207
- &:after {
208
- clear: both;
209
- }
210
- *zoom: 1;
211
- }
212
-
213
- /// Removes scrollbar with CSS
214
- @mixin remove-scrollbar() {
215
- -ms-overflow-style: none; /* for Internet Explorer, Edge */
216
- scrollbar-width: none; /* for Firefox */
217
- &::-webkit-scrollbar {
218
- display: none; /* for Chrome, Safari, and Opera */
219
- }
220
- }
221
-
222
-
223
- /// Returns gutter size for grid breakpoint map, defaults to the config's values
224
- /// Pass custom map to get gutter values from it
225
- /// @param {String} $name The name of the "grid breakpoint" (could be a different name than the actual breakpoint name it maps too)
226
- /// @param {Map} $custom-map Provide custom map of grid breakpoints to get the gutter from (defaults to the grid module's defaults 'extra-breakpoints')
227
-
228
- @function get-gutter($name: null, $custom-map: null) {
229
- @if (not $name) {
230
- @return get("gutter");
231
- } @else {
232
- $map: if($custom-map, $custom-map, get("extra-breakpoints"));
233
- $settings: utils.require-map-get($map, $name, "grid [get-gutter]");
234
- @return map.get($settings, "gutter");
235
- }
236
- }
237
-
238
- /// @return Default breakpoint name (from this module or falling back to breakpoint module default)
239
-
240
- @function get-default-breakpoint() {
241
- $breakpoint: get("breakpoint");
242
- @if ($breakpoint) {
243
- @return $breakpoint;
244
- } @else {
245
- @return breakpoint.get("default");
246
- }
247
- }
@@ -1,59 +0,0 @@
1
- ////
2
- /// @group path
3
- ////
4
- /// @todo Finish Documentation
5
-
6
- @use "sass:map";
7
- @use "sass:string";
8
- @use "utils";
9
-
10
- /// Aliases
11
- /// @type Map
12
- /// - Important: alias could be used for directory or file so omit trailing slash for directories
13
- /// - All aliases must start with "#"
14
-
15
- $aliases: (
16
- "#Images" : "/images",
17
- ) !default;
18
-
19
- /// Set aliases or change defaults
20
- /// @param {Map} $changes Map of changes
21
-
22
- @mixin set-aliases($changes) {
23
- $aliases: map.merge($aliases, $changes) !global;
24
- }
25
-
26
- /// Get an aliase's path
27
- /// @param {String} Name Name of alias
28
-
29
- @function get-alias($name) {
30
- @return utils.require-map-get($aliases, $name, '[path alias]');
31
- }
32
-
33
- /// Resolves a Path
34
- /// - Checks if path is an alias if so rewrite's it
35
- /// - Future could include rewrites for easier updating or rearranging of legacy things
36
- /// - Aliases work by starting with "#", Since it's an illegal uri character, needs to be escaped if used as literal, we felt that it was the safest way to mix aliases in with real URLs (so that a dev of a module using path.resolve can always pass paths through (user input unknown if alias)
37
- /// @example scss
38
- /// .img {
39
- /// background-image: url(path.resolve("#Images/branding/logo"));
40
- /// }
41
- ///
42
-
43
- @function resolve($path) {
44
- $is-alias: string.index($path, "#") == 1;
45
- $dir-index: string.index($path, "/");
46
- $resolved-path: $path;
47
- @if $is-alias {
48
- // Extract alias
49
- @if $dir-index {
50
- $alias: string.slice($path, 1, $dir-index - 1);
51
- @return "#{ get-alias($alias) }#{ string.slice($path, $dir-index) }";
52
- // Must just be only an alias
53
- } @else {
54
- @return "#{ get-alias($path) }";
55
- }
56
- } @else {
57
- @return $path;
58
- }
59
- }
@@ -1,82 +0,0 @@
1
- ////
2
- /// @group selector
3
- ////
4
- /// @todo Finish Documentation
5
-
6
- @use "sass:string";
7
- @use "sass:map";
8
- @use "utils";
9
-
10
- /// Module Settings
11
- /// - This module can be used for dynamic classnames (used in base and some components). Some components selectors are too complex or coupled for dynamic classnames.
12
- /// @todo See about documenting when a component doesn't run through the selecotr module to get it's base classname
13
- /// @type Map
14
- /// @prop {String} $config.prefix Global prefix for selectors (would be used for classname prefix for example)
15
-
16
- $config: (
17
- "prefix" : ""
18
- ) !default;
19
-
20
- // Map to store class overrides ("button" : "site-button") for example
21
- $-class-overrides: ();
22
- $-class-wildcards: ();
23
-
24
- /// Change modules $config
25
- /// @param {Map} $changes Map of changes
26
- /// @example scss - General example, replace module-name with module's name
27
- /// @include module-name.set(( "property" : value ));
28
- @mixin set($changes) {
29
- $config: map.merge($config, $changes) !global;
30
- }
31
-
32
- /// Get a config option
33
- /// @param {Map} $name Name of property
34
- /// @example scss - General example, replace module-name with module's name
35
- /// @include module-name.get("property");
36
-
37
- @function get($name) {
38
- @return utils.require-map-get($config, $name, "selector [config]");
39
- }
40
-
41
- /// Set the class selector overrides
42
- /// @param {Map} $changes Changes to merge
43
-
44
- @mixin set-class-overrides($changes) {
45
- @each $key, $prop in $changes {
46
- $index: string.index($key, "*");
47
- @if ($index) {
48
- $wild-key: string.slice($key, 1, $index - 1);
49
- $-class-wildcards: map.set($-class-wildcards, $wild-key, $prop) !global;
50
- $changes: map.remove($changes, $key);
51
- }
52
- }
53
- $-class-overrides: map.merge($-class-overrides, $changes) !global;
54
- }
55
-
56
- /// Used to allow global prefixing of classes, and also the ability to
57
- /// Change a class used in the system (ie. like a component for example)
58
- /// @param {String} $class The classname to set
59
-
60
- @function class($class, $name-only: false) {
61
- // Check if it's a wildcard
62
- $wildcard: get-class-wildcard($class);
63
- $override: map.get($-class-overrides, $class);
64
- $updated: if($override, $override, if($wildcard, $wildcard, $class));
65
- $name: "#{ get("prefix") }#{ $updated }";
66
- @if $name-only {
67
- @return $name;
68
- } @else {
69
- @return ".#{ $name }";
70
- }
71
- }
72
-
73
- @function get-class-wildcard($class) {
74
- $change: $class;
75
- @each $key, $prop in $-class-wildcards {
76
- $index: string.index($class, $key);
77
- @if ($index) {
78
- $change: utils.string-replace($class, $key, $prop);
79
- }
80
- }
81
- @return $change;
82
- }