@ulu/frontend 0.0.3 → 0.0.5

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 (246) hide show
  1. package/package.json +11 -10
  2. package/scss/_grid.scss +0 -1
  3. package/scss/_typography.scss +0 -1
  4. package/scss/helpers/_units.scss +1 -6
  5. package/scss/stylesheets/full.scss +1 -4
  6. package/trash/js-old/deprecated/doc-ready.js +0 -28
  7. package/trash/js-old/deprecated/jquery-prototypes.js +0 -309
  8. package/trash/js-old/deprecated/mini-collapsible-popper-positioning.js +0 -126
  9. package/trash/js-old/deprecated/mini-collapsible.js +0 -607
  10. package/trash/js-old/deprecated/script-loader.js +0 -60
  11. package/trash/js-old/events/index.js +0 -42
  12. package/trash/js-old/helpers/css-breakpoint.js +0 -247
  13. package/trash/js-old/helpers/file-save.js +0 -48
  14. package/trash/js-old/helpers/node-data-manager.js +0 -74
  15. package/trash/js-old/helpers/pause-youtube-video.js +0 -42
  16. package/trash/js-old/index.js +0 -15
  17. package/trash/js-old/polyfills/element-closest.js +0 -17
  18. package/trash/js-old/ui/flipcard.js +0 -202
  19. package/trash/js-old/ui/grid.js +0 -67
  20. package/trash/js-old/ui/modals.js +0 -219
  21. package/trash/js-old/ui/programmatic-modal.js +0 -91
  22. package/trash/js-old/ui/resizer.js +0 -60
  23. package/trash/js-old/ui/slider.js +0 -469
  24. package/trash/js-old/ui/tabs.js +0 -109
  25. package/trash/js-old/ui/tooltip.js +0 -82
  26. package/trash/js-old/utils/array.js +0 -28
  27. package/trash/js-old/utils/dom.js +0 -122
  28. package/trash/js-old/utils/logger.js +0 -69
  29. package/trash/js-old/utils/object.js +0 -22
  30. package/trash/js-old/utils/performance.js +0 -43
  31. package/trash/js-old/utils/regex.js +0 -10
  32. package/trash/js-old/utils/string.js +0 -107
  33. package/trash/js-old/waypoints/README.md +0 -3
  34. package/trash/js-old/waypoints/anchor-menu.js +0 -76
  35. package/trash/js-old/waypoints/element-waypoint.js +0 -75
  36. package/trash/js-old/waypoints/examples/page-link-menu.md +0 -106
  37. package/trash/js-old/waypoints/state-in-attribute.js +0 -32
  38. package/trash/js-old-230729/deprecated/doc-ready.js +0 -28
  39. package/trash/js-old-230729/deprecated/jquery-prototypes.js +0 -309
  40. package/trash/js-old-230729/deprecated/mini-collapsible-popper-positioning.js +0 -126
  41. package/trash/js-old-230729/deprecated/mini-collapsible.js +0 -607
  42. package/trash/js-old-230729/deprecated/script-loader.js +0 -60
  43. package/trash/js-old-230729/events/index.js +0 -42
  44. package/trash/js-old-230729/helpers/css-breakpoint.js +0 -247
  45. package/trash/js-old-230729/helpers/file-save.js +0 -48
  46. package/trash/js-old-230729/helpers/node-data-manager.js +0 -74
  47. package/trash/js-old-230729/helpers/pause-youtube-video.js +0 -42
  48. package/trash/js-old-230729/helpers/scrollbar-width-property.js +0 -10
  49. package/trash/js-old-230729/index.js +0 -15
  50. package/trash/js-old-230729/polyfills/element-closest.js +0 -17
  51. package/trash/js-old-230729/ui/flipcard.js +0 -202
  52. package/trash/js-old-230729/ui/grid.js +0 -67
  53. package/trash/js-old-230729/ui/modals.js +0 -219
  54. package/trash/js-old-230729/ui/overflow-scroller-pager.js +0 -58
  55. package/trash/js-old-230729/ui/overflow-scroller.js +0 -160
  56. package/trash/js-old-230729/ui/programmatic-modal.js +0 -91
  57. package/trash/js-old-230729/ui/resizer.js +0 -60
  58. package/trash/js-old-230729/ui/slider.js +0 -468
  59. package/trash/js-old-230729/ui/tabs.js +0 -109
  60. package/trash/js-old-230729/ui/tooltip.js +0 -82
  61. package/trash/js-old-230729/utils/array.js +0 -28
  62. package/trash/js-old-230729/utils/dom.js +0 -122
  63. package/trash/js-old-230729/utils/logger.js +0 -69
  64. package/trash/js-old-230729/utils/object.js +0 -22
  65. package/trash/js-old-230729/utils/performance.js +0 -43
  66. package/trash/js-old-230729/utils/regex.js +0 -10
  67. package/trash/js-old-230729/utils/string.js +0 -107
  68. package/trash/js-old-230729/waypoints/README.md +0 -3
  69. package/trash/js-old-230729/waypoints/anchor-menu.js +0 -76
  70. package/trash/js-old-230729/waypoints/element-waypoint.js +0 -75
  71. package/trash/js-old-230729/waypoints/examples/page-link-menu.md +0 -106
  72. package/trash/js-old-230729/waypoints/state-in-attribute.js +0 -32
  73. package/trash/logo-1.svg +0 -13
  74. package/trash/logo.svg +0 -16
  75. package/trash/scss-before-cqc-update/README.md +0 -58
  76. package/trash/scss-before-cqc-update/_breakpoint.scss +0 -190
  77. package/trash/scss-before-cqc-update/_button.scss +0 -229
  78. package/trash/scss-before-cqc-update/_calculate.scss +0 -65
  79. package/trash/scss-before-cqc-update/_color.scss +0 -211
  80. package/trash/scss-before-cqc-update/_cssvar.scss +0 -116
  81. package/trash/scss-before-cqc-update/_element.scss +0 -275
  82. package/trash/scss-before-cqc-update/_index.scss +0 -29
  83. package/trash/scss-before-cqc-update/_layout.scss +0 -247
  84. package/trash/scss-before-cqc-update/_path.scss +0 -59
  85. package/trash/scss-before-cqc-update/_selector.scss +0 -82
  86. package/trash/scss-before-cqc-update/_typography.scss +0 -322
  87. package/trash/scss-before-cqc-update/_units.scss +0 -48
  88. package/trash/scss-before-cqc-update/_utility.scss +0 -13
  89. package/trash/scss-before-cqc-update/_utils.scss +0 -211
  90. package/trash/scss-before-cqc-update/base/_color.scss +0 -14
  91. package/trash/scss-before-cqc-update/base/_elements.scss +0 -189
  92. package/trash/scss-before-cqc-update/base/_index.scss +0 -63
  93. package/trash/scss-before-cqc-update/base/_keyframes.scss +0 -74
  94. package/trash/scss-before-cqc-update/base/_layout.scss +0 -88
  95. package/trash/scss-before-cqc-update/base/_normalize.scss +0 -316
  96. package/trash/scss-before-cqc-update/base/_typography.scss +0 -42
  97. package/trash/scss-before-cqc-update/components/README.md +0 -5
  98. package/trash/scss-before-cqc-update/components/README.todos +0 -15
  99. package/trash/scss-before-cqc-update/components/_button.scss +0 -96
  100. package/trash/scss-before-cqc-update/components/_grid.scss +0 -671
  101. package/trash/scss-before-cqc-update/components/_index.scss +0 -70
  102. package/trash/scss-before-cqc-update/components/_links.scss +0 -35
  103. package/trash/scss-before-cqc-update/components/_list-lines.scss +0 -74
  104. package/trash/scss-before-cqc-update/components/_list-ordered.scss +0 -17
  105. package/trash/scss-before-cqc-update/components/_list-unordered.scss +0 -22
  106. package/trash/scss-before-cqc-update/components/_rule.scss +0 -94
  107. package/trash/scss-before-cqc-update/helpers/_color.scss +0 -15
  108. package/trash/scss-before-cqc-update/helpers/_display.scss +0 -73
  109. package/trash/scss-before-cqc-update/helpers/_index.scss +0 -68
  110. package/trash/scss-before-cqc-update/helpers/_print.scss +0 -59
  111. package/trash/scss-before-cqc-update/helpers/_typography.scss +0 -73
  112. package/trash/scss-before-cqc-update/helpers/_units.scss +0 -79
  113. package/trash/scss-before-cqc-update/helpers/_utilities.scss +0 -88
  114. package/trash/scss-before-cqc-update/stylesheets/README.md +0 -3
  115. package/trash/scss-before-cqc-update/stylesheets/full.scss +0 -17
  116. package/trash/scss-old/README.md +0 -58
  117. package/trash/scss-old/_breakpoint.scss +0 -140
  118. package/trash/scss-old/_button.scss +0 -223
  119. package/trash/scss-old/_calculate.scss +0 -64
  120. package/trash/scss-old/_color.scss +0 -200
  121. package/trash/scss-old/_element.scss +0 -262
  122. package/trash/scss-old/_grid.scss +0 -558
  123. package/trash/scss-old/_index.scss +0 -25
  124. package/trash/scss-old/_layout.scss +0 -170
  125. package/trash/scss-old/_path.scss +0 -58
  126. package/trash/scss-old/_selector.scss +0 -81
  127. package/trash/scss-old/_typography.scss +0 -320
  128. package/trash/scss-old/_units.scss +0 -47
  129. package/trash/scss-old/_utility.scss +0 -12
  130. package/trash/scss-old/_utils.scss +0 -186
  131. package/trash/scss-old/base/_color.scss +0 -13
  132. package/trash/scss-old/base/_elements.scss +0 -183
  133. package/trash/scss-old/base/_index.scss +0 -62
  134. package/trash/scss-old/base/_keyframes.scss +0 -74
  135. package/trash/scss-old/base/_layout.scss +0 -81
  136. package/trash/scss-old/base/_normalize.scss +0 -316
  137. package/trash/scss-old/base/_typography.scss +0 -42
  138. package/trash/scss-old/components/README.md +0 -5
  139. package/trash/scss-old/components/README.todos +0 -15
  140. package/trash/scss-old/components/_button.scss +0 -74
  141. package/trash/scss-old/components/_index.scss +0 -63
  142. package/trash/scss-old/components/_links.scss +0 -34
  143. package/trash/scss-old/components/_list-lines.scss +0 -73
  144. package/trash/scss-old/components/_list-ordered.scss +0 -16
  145. package/trash/scss-old/components/_list-unordered.scss +0 -21
  146. package/trash/scss-old/components/_rule.scss +0 -84
  147. package/trash/scss-old/helpers/_color.scss +0 -14
  148. package/trash/scss-old/helpers/_display.scss +0 -68
  149. package/trash/scss-old/helpers/_index.scss +0 -67
  150. package/trash/scss-old/helpers/_print.scss +0 -59
  151. package/trash/scss-old/helpers/_typography.scss +0 -73
  152. package/trash/scss-old/helpers/_units.scss +0 -68
  153. package/trash/scss-old/helpers/_utilities.scss +0 -82
  154. package/trash/scss-old/packages/README.md +0 -3
  155. package/trash/scss-old/packages/everything.scss +0 -17
  156. package/trash/scss-old-2/README.md +0 -58
  157. package/trash/scss-old-2/_breakpoint.scss +0 -139
  158. package/trash/scss-old-2/_button.scss +0 -223
  159. package/trash/scss-old-2/_calculate.scss +0 -64
  160. package/trash/scss-old-2/_color.scss +0 -202
  161. package/trash/scss-old-2/_element.scss +0 -263
  162. package/trash/scss-old-2/_grid.scss +0 -558
  163. package/trash/scss-old-2/_index.scss +0 -25
  164. package/trash/scss-old-2/_layout.scss +0 -170
  165. package/trash/scss-old-2/_path.scss +0 -58
  166. package/trash/scss-old-2/_selector.scss +0 -81
  167. package/trash/scss-old-2/_typography.scss +0 -320
  168. package/trash/scss-old-2/_units.scss +0 -47
  169. package/trash/scss-old-2/_utility.scss +0 -12
  170. package/trash/scss-old-2/_utils.scss +0 -186
  171. package/trash/scss-old-2/base/_color.scss +0 -13
  172. package/trash/scss-old-2/base/_elements.scss +0 -182
  173. package/trash/scss-old-2/base/_index.scss +0 -62
  174. package/trash/scss-old-2/base/_keyframes.scss +0 -73
  175. package/trash/scss-old-2/base/_layout.scss +0 -83
  176. package/trash/scss-old-2/base/_normalize.scss +0 -315
  177. package/trash/scss-old-2/base/_typography.scss +0 -41
  178. package/trash/scss-old-2/components/README.md +0 -5
  179. package/trash/scss-old-2/components/README.todos +0 -15
  180. package/trash/scss-old-2/components/_button.scss +0 -95
  181. package/trash/scss-old-2/components/_index.scss +0 -63
  182. package/trash/scss-old-2/components/_links.scss +0 -33
  183. package/trash/scss-old-2/components/_list-lines.scss +0 -73
  184. package/trash/scss-old-2/components/_list-ordered.scss +0 -16
  185. package/trash/scss-old-2/components/_list-unordered.scss +0 -21
  186. package/trash/scss-old-2/components/_rule.scss +0 -84
  187. package/trash/scss-old-2/helpers/_color.scss +0 -14
  188. package/trash/scss-old-2/helpers/_display.scss +0 -67
  189. package/trash/scss-old-2/helpers/_index.scss +0 -67
  190. package/trash/scss-old-2/helpers/_print.scss +0 -58
  191. package/trash/scss-old-2/helpers/_typography.scss +0 -72
  192. package/trash/scss-old-2/helpers/_units.scss +0 -68
  193. package/trash/scss-old-2/helpers/_utilities.scss +0 -81
  194. package/trash/scss-old-2/packages/README.md +0 -3
  195. package/trash/scss-old-2/packages/everything.scss +0 -17
  196. package/trash/scss-old-230729/README.md +0 -58
  197. package/trash/scss-old-230729/_breakpoint.scss +0 -139
  198. package/trash/scss-old-230729/_button.scss +0 -223
  199. package/trash/scss-old-230729/_calculate.scss +0 -64
  200. package/trash/scss-old-230729/_color.scss +0 -202
  201. package/trash/scss-old-230729/_element.scss +0 -273
  202. package/trash/scss-old-230729/_grid.scss +0 -694
  203. package/trash/scss-old-230729/_index.scss +0 -25
  204. package/trash/scss-old-230729/_layout.scss +0 -193
  205. package/trash/scss-old-230729/_path.scss +0 -58
  206. package/trash/scss-old-230729/_selector.scss +0 -81
  207. package/trash/scss-old-230729/_typography.scss +0 -320
  208. package/trash/scss-old-230729/_units.scss +0 -47
  209. package/trash/scss-old-230729/_utility.scss +0 -12
  210. package/trash/scss-old-230729/_utils.scss +0 -186
  211. package/trash/scss-old-230729/base/_color.scss +0 -13
  212. package/trash/scss-old-230729/base/_elements.scss +0 -188
  213. package/trash/scss-old-230729/base/_index.scss +0 -62
  214. package/trash/scss-old-230729/base/_keyframes.scss +0 -73
  215. package/trash/scss-old-230729/base/_layout.scss +0 -83
  216. package/trash/scss-old-230729/base/_normalize.scss +0 -315
  217. package/trash/scss-old-230729/base/_typography.scss +0 -41
  218. package/trash/scss-old-230729/components/README.md +0 -5
  219. package/trash/scss-old-230729/components/README.todos +0 -15
  220. package/trash/scss-old-230729/components/_button.scss +0 -95
  221. package/trash/scss-old-230729/components/_index.scss +0 -63
  222. package/trash/scss-old-230729/components/_links.scss +0 -34
  223. package/trash/scss-old-230729/components/_list-lines.scss +0 -73
  224. package/trash/scss-old-230729/components/_list-ordered.scss +0 -16
  225. package/trash/scss-old-230729/components/_list-unordered.scss +0 -21
  226. package/trash/scss-old-230729/components/_rule.scss +0 -93
  227. package/trash/scss-old-230729/helpers/_color.scss +0 -14
  228. package/trash/scss-old-230729/helpers/_display.scss +0 -73
  229. package/trash/scss-old-230729/helpers/_index.scss +0 -67
  230. package/trash/scss-old-230729/helpers/_print.scss +0 -58
  231. package/trash/scss-old-230729/helpers/_typography.scss +0 -72
  232. package/trash/scss-old-230729/helpers/_units.scss +0 -68
  233. package/trash/scss-old-230729/helpers/_utilities.scss +0 -87
  234. package/trash/scss-old-230729/packages/README.md +0 -3
  235. package/trash/scss-old-230729/packages/everything.scss +0 -17
  236. package/trash/vue/directives/background-image-url.js +0 -12
  237. package/trash/vue/helpers/add-required-components.js +0 -14
  238. package/trash/vue/ui/CollapsibleRegion/CollapsibleRegion.vue +0 -277
  239. package/trash/vue/ui/CollapsibleRegion/Demo.vue +0 -101
  240. package/trash/vue/ui/Dropdown/Dropdown.vue +0 -184
  241. package/trash/vue/ui/Modals/components/Modal.vue +0 -49
  242. package/trash/vue/ui/Modals/components/Modals.vue +0 -103
  243. package/trash/vue/ui/Modals/plugin.js +0 -215
  244. package/trash/vue/ui/Modals/readme.note +0 -10
  245. package/trash/vue/ui/Modals/reference/example-usage.vue +0 -27
  246. package/trash/vue/ui/Modals/reference/wcag-example/dialog.js +0 -324
@@ -1,25 +0,0 @@
1
- /// Main entry for library as single module use
2
- /// - All modules get namespaced
3
- /// @example scss - Example of color modules
4
- /// // Namespaced
5
- /// ulu.color-get();
6
- /// // Versus
7
- /// color.get();
8
- ///
9
-
10
- @forward "path" as path-*;
11
- @forward "color" as color-*;
12
- @forward "units" as units-*;
13
- @forward "calculate" as calculate-*;
14
- @forward "breakpoint" as breakpoint-*;
15
- @forward "selector" as selector-*;
16
- @forward "element" as element-*;
17
- @forward "typography" as typography-*;
18
- @forward "button" as button-*;
19
- @forward "utility" as utility-*;
20
- @forward "layout" as layout-*;
21
- @forward "grid" as grid-*;
22
- @forward "base" as base-*;
23
- @forward "components" as component-*;
24
- @forward "helpers" as helper-*;
25
- @forward "utils" as utils-*;
@@ -1,193 +0,0 @@
1
- ////
2
- /// @group layout
3
- ////
4
-
5
- @use "sass:map";
6
- @use "sass:list";
7
- @use "sass:meta";
8
- @use "utils";
9
- @use "calculate";
10
- @use "breakpoint";
11
-
12
- /// Module Settings
13
- /// @type Map
14
- /// @prop {Number} $config.max-width Common max-width for site
15
- /// @prop {Number} $config.margin Common margin for site
16
- /// @prop {Number} $config.z-index-fixed Common z-index, above everything
17
- /// @prop {Number} $config.z-index-sticky Common z-index for sticky or stuck items
18
- /// @prop {Number} $config.z-index-above Common z-index, below sticky
19
-
20
- $config: (
21
- "max-width": 90rem,
22
- "margin": 2rem,
23
- "z-index-sticky": 100,
24
- "z-index-above": 450,
25
- "z-index-fixed": 1000
26
- ) !default;
27
-
28
- /// Change modules $config
29
- /// @param {Map} $changes Map of changes
30
- /// @include module-name.set(( "property" : value ));
31
- @mixin set($changes) {
32
- $config: map.merge($config, $changes) !global;
33
- }
34
-
35
- /// Get a config option
36
- /// @param {Map} $name Name of property
37
- /// @include module-name.get("property");
38
-
39
- @function get($name) {
40
- @return utils.require-map-get($config, $name, "layout [config]");
41
- }
42
-
43
- $containers: (
44
- "container" : (
45
- "width" : 100%,
46
- "max-width" : get("max-width"),
47
- "padding" : (get("margin") get("margin")),
48
- "breakpoints" : null,
49
- "responsive" : false,
50
- "responsive-amount" : 3vw
51
- )
52
- ) !default;
53
-
54
- @mixin set-containers($changes) {
55
- $containers: map.merge($containers, $changes) !global;
56
- }
57
-
58
- @function get-container($name, $breakpoint: false) {
59
- $container: utils.require-map-get($containers, $name, "Layout [get-container]");
60
- $breakpoints: map.get($container, "breakpoints");
61
- @if ($breakpoint) {
62
- @return utils.require-map-get($breakpoints, $breakpoint, "[container breakpoint]");
63
- } @else {
64
- @return $container;
65
- }
66
- }
67
- /// Returns padding to another property including breakpoints
68
- /// ie. { top: $containers-padding; }
69
- @mixin match-container-padding($property, $name: "container", $sides: true) {
70
- $container: get-container($name);
71
- $breakpoints: map.get($container, "breakpoints");
72
- #{ $property }: get-container-padding($name, $sides);
73
- @if $breakpoints {
74
- @each $breakpoint, $props in $breakpoints {
75
- $direction: map.get($props, "direction");
76
- @include breakpoint.from($breakpoint, $direction) {
77
- #{ $property }: get-container-padding($name, $sides, $breakpoint);
78
- }
79
- }
80
- }
81
- }
82
-
83
- /// For a given property for every breakpoint in a given container
84
- /// creates a css calc value that will match the containers side margin
85
- /// The margin is created via empty space when the container hits the max-width
86
- /// If passing inlude padding it would be the containers
87
- /// side (x) + the padding. This accounts for the containers max-width to give an absoute value
88
- @mixin match-container-margin($property, $name: "container", $include-padding: true) {
89
- $container: get-container($name);
90
- $breakpoints: map.get($container, "breakpoints");
91
- $padding: if($include-padding, get-container-padding($name, true), 0);
92
- $max: map.get($container, "max-width");
93
- #{ $property }: max(((100vw - $max) / 2) + $padding, $padding);
94
- @if $breakpoints {
95
- @each $breakpoint, $props in $breakpoints {
96
- $direction: map.get($props, "direction");
97
- @include breakpoint.from($breakpoint, $direction) {
98
- $pad: if($include-padding, get-container-padding($name, true, $breakpoint), 0);
99
- #{ $property }: max(((100vw - $max) / 2) + $pad, $pad);
100
- }
101
- }
102
- }
103
- }
104
-
105
- @function get-container-padding($name, $sides: true, $specific-breakpoint: false) {
106
- $container: get-container($name, $specific-breakpoint);
107
- $padding: map.get($container, "padding");
108
- $is-list: meta.type-of($padding) == "list"; // Else number
109
- @if (not $is-list) {
110
- @return $padding;
111
- } @else {
112
- @return list.nth($padding, if($sides, 2, 1));
113
- }
114
- }
115
-
116
- @mixin container-padding($name, $sides: true, $ends: true, $specific-breakpoint: false) {
117
- $container: get-container($name, $specific-breakpoint);
118
- $responsive: map.get($container, "responsive");
119
- $x: get-container-padding-x($name, $specific-breakpoint);
120
- $y: get-container-padding-y($name, $specific-breakpoint);
121
- $resp-amount: if(meta.type-of($responsive) == number, $responsive, calculate.get("responsive-change"));
122
-
123
- @if $responsive {
124
- @if $sides {
125
- @include calculate.responsive-property("padding-left", $x, $resp-amount);
126
- @include calculate.responsive-property("padding-right", $x, $resp-amount);
127
- }
128
- @if $ends {
129
- @include calculate.responsive-property("padding-top", $y, $resp-amount);
130
- @include calculate.responsive-property("padding-bottom", $y, $resp-amount);
131
- }
132
- } @else {
133
- @if $sides {
134
- padding-left: $x;
135
- padding-right: $x;
136
- }
137
- @if $ends {
138
- padding-top: $y;
139
- padding-bottom: $y;
140
- }
141
- }
142
- }
143
- @function get-container-padding-x($name, $specific-breakpoint: false) {
144
- @return get-container-padding($name, true, $specific-breakpoint);
145
- }
146
- @function get-container-padding-y($name, $specific-breakpoint: false) {
147
- @return get-container-padding($name, false, $specific-breakpoint);
148
- }
149
- @mixin container-styles($name: "container", $specific-breakpoint: false) {
150
- $container: get-container($name, $specific-breakpoint);
151
- $breakpoints: map.get($container, "breakpoints");
152
-
153
- $width: map.get($container, "width");
154
- // @debug $specific-breakpoint;
155
- // @if $specific-breakpoint {
156
- // @debug $container;
157
- // }
158
- @if ($width == null) {
159
- $width: 100%;
160
- }
161
- display: block;
162
- margin-left: auto;
163
- margin-right: auto;
164
- width: $width;
165
- max-width: map.get($container, "max-width");
166
- @include container-padding($name, $specific-breakpoint: $specific-breakpoint);
167
-
168
- // Recursive print other breakpoints
169
- @if $breakpoints and not $specific-breakpoint {
170
- @each $breakpoint, $props in $breakpoints {
171
- $direction: map.get($props, "direction");
172
- @include breakpoint.from($breakpoint, $direction) {
173
- @include container-styles($name, $breakpoint);
174
- }
175
- }
176
- }
177
- }
178
-
179
- /// Prints clearfix styles
180
-
181
- @mixin clearfix() {
182
- &:before,
183
- &:after {
184
- content: "";
185
- display: table;
186
- flex-basis: 0; // Flexbox, clear fix for pseudo elements in Safari
187
- order: 1;
188
- }
189
- &:after {
190
- clear: both;
191
- }
192
- *zoom: 1;
193
- }
@@ -1,58 +0,0 @@
1
- ////
2
- /// @group path
3
- ////
4
-
5
- @use "sass:map";
6
- @use "sass:string";
7
- @use "utils";
8
-
9
- /// Aliases
10
- /// @type Map
11
- /// - Important: alias could be used for directory or file so omit trailing slash for directories
12
- /// - All aliases must start with "#"
13
-
14
- $aliases: (
15
- "#Images" : "/images",
16
- ) !default;
17
-
18
- /// Set aliases or change defaults
19
- /// @param {Map} $changes Map of changes
20
-
21
- @mixin set-aliases($changes) {
22
- $aliases: map.merge($aliases, $changes) !global;
23
- }
24
-
25
- /// Get an aliase's path
26
- /// @param {String} Name Name of alias
27
-
28
- @function get-alias($name) {
29
- @return utils.require-map-get($aliases, $name, '[path alias]');
30
- }
31
-
32
- /// Resolves a Path
33
- /// - Checks if path is an alias if so rewrite's it
34
- /// - Future could include rewrites for easier updating or rearranging of legacy things
35
- /// - 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)
36
- /// @example scss
37
- /// .img {
38
- /// background-image: url(path.resolve("#Images/branding/logo"));
39
- /// }
40
- ///
41
-
42
- @function resolve($path) {
43
- $is-alias: string.index($path, "#") == 1;
44
- $dir-index: string.index($path, "/");
45
- $resolved-path: $path;
46
- @if $is-alias {
47
- // Extract alias
48
- @if $dir-index {
49
- $alias: string.slice($path, 1, $dir-index - 1);
50
- @return "#{ get-alias($alias) }#{ string.slice($path, $dir-index) }";
51
- // Must just be only an alias
52
- } @else {
53
- @return "#{ get-alias($path) }";
54
- }
55
- } @else {
56
- @return $path;
57
- }
58
- }
@@ -1,81 +0,0 @@
1
- ////
2
- /// @group selector
3
- ////
4
-
5
- @use "sass:string";
6
- @use "sass:map";
7
- @use "utils";
8
-
9
- /// Module Settings
10
- /// - 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.
11
- /// @todo See about documenting when a component doesn't run through the selecotr module to get it's base classname
12
- /// @type Map
13
- /// @prop {String} $config.prefix Global prefix for selectors (would be used for classname prefix for example)
14
-
15
- $config: (
16
- "prefix" : ""
17
- ) !default;
18
-
19
- // Map to store class overrides ("button" : "site-button") for example
20
- $-class-overrides: ();
21
- $-class-wildcards: ();
22
-
23
- /// Change modules $config
24
- /// @param {Map} $changes Map of changes
25
- /// @example scss - General example, replace module-name with module's name
26
- /// @include module-name.set(( "property" : value ));
27
- @mixin set($changes) {
28
- $config: map.merge($config, $changes) !global;
29
- }
30
-
31
- /// Get a config option
32
- /// @param {Map} $name Name of property
33
- /// @example scss - General example, replace module-name with module's name
34
- /// @include module-name.get("property");
35
-
36
- @function get($name) {
37
- @return utils.require-map-get($config, $name, "selector [config]");
38
- }
39
-
40
- /// Set the class selector overrides
41
- /// @param {Map} $changes Changes to merge
42
-
43
- @mixin set-class-overrides($changes) {
44
- @each $key, $prop in $changes {
45
- $index: string.index($key, "*");
46
- @if ($index) {
47
- $wild-key: string.slice($key, 1, $index - 1);
48
- $-class-wildcards: map.set($-class-wildcards, $wild-key, $prop) !global;
49
- $changes: map.remove($changes, $key);
50
- }
51
- }
52
- $-class-overrides: map.merge($-class-overrides, $changes) !global;
53
- }
54
-
55
- /// Used to allow global prefixing of classes, and also the ability to
56
- /// Change a class used in the system (ie. like a component for example)
57
- /// @param {String} $class The classname to set
58
-
59
- @function class($class, $name-only: false) {
60
- // Check if it's a wildcard
61
- $wildcard: get-class-wildcard($class);
62
- $override: map.get($-class-overrides, $class);
63
- $updated: if($override, $override, if($wildcard, $wildcard, $class));
64
- $name: "#{ get("prefix") }#{ $updated }";
65
- @if $name-only {
66
- @return $name;
67
- } @else {
68
- @return ".#{ $name }";
69
- }
70
- }
71
-
72
- @function get-class-wildcard($class) {
73
- $change: $class;
74
- @each $key, $prop in $-class-wildcards {
75
- $index: string.index($class, $key);
76
- @if ($index) {
77
- $change: utils.string-replace($class, $key, $prop);
78
- }
79
- }
80
- @return $change;
81
- }
@@ -1,320 +0,0 @@
1
- ////
2
- /// @group typography
3
- /// @todo Idea: Should the maps value be processes when using the set-sizes, set? Instead of recalculated each time get-size is or get is used.
4
- //// @version 1.0.2
5
- ////
6
-
7
- @use "sass:map";
8
- @use "sass:math";
9
- @use "sass:meta";
10
- @use "sass:string";
11
-
12
- @use "color";
13
- @use "utils";
14
- @use "utility";
15
- @use "calculate";
16
- @use "breakpoint";
17
-
18
- /// Module Settings
19
- /// @type Map
20
- /// @prop {Number} $config.font-size Default font size (use pixels, converted, is used for rem base)
21
- /// @prop {Number} $config.font-family Default font family
22
- /// @prop {Number} $config.font-family-monospace Base font-family for monospace
23
- /// @prop {Number} $config.line-height Default line height
24
- /// @prop {Number} $config.line-height-dense Default dense line height
25
- /// @prop {Number} $config.size-ratio Font size scale when using preset sizes, ratio mixin)
26
- /// @prop {Number} $config.size-line-height-ratio Default line height scaling (when using preset sizes, ratio mixin). Can shrink line-height as size increase if desrireable
27
- /// @prop {Number} $config.responsive-change Amount to scale typography by browser's width (use viewport units)
28
- /// @prop {Number} $config.margin Default margin for typography (like paragraphs)
29
-
30
- $config: (
31
- "font-size" : 16px,
32
- "font-family" : (ui-sans-serif, "Open Sans", Helvetica, Arial, sans-serif),
33
- "font-family-sans" : (ui-sans-serif, "Open Sans", Helvetica, Arial, sans-serif),
34
- "font-family-serif" : (Cambria, Georgia, serif),
35
- "font-family-monospace" : (Menlo, Consolas, Monaco, monospace),
36
- "font-weight" : inherit,
37
- "font-weight-headline" : bold,
38
- "font-weight-light" : 300,
39
- "font-weight-normal" : normal,
40
- "font-weight-semibold" : 600,
41
- "font-weight-bold" : bold,
42
- "line-height" : 1.5,
43
- "line-height-dense": 1.3,
44
- "line-height-spaced": 1.75,
45
- "size-ratio": 2,
46
- "size-line-height-ratio": 0.97,
47
- "scale-steps": 5,
48
- "responsive-change": 0.05vw,
49
- "margin-bottom": 1em,
50
- "margin-top": false,
51
- "letter-spacing-uppercase" : 0.04em,
52
- "max-width" : 60rem,
53
- "max-width-small" : 50rem
54
- ) !default;
55
-
56
- /// Change modules $config
57
- /// @param {Map} $changes Map of changes
58
- /// @include typography.set-options(( "font-size" : 14px ));
59
-
60
- @mixin set($changes) {
61
- $config: map.merge($config, $changes) !global;
62
- }
63
-
64
- /// Get a config option
65
- /// @param {Map} $changes Map of changes
66
- /// @include typography.set-options(( "font-size" : 14px ));
67
-
68
- @function get($name) {
69
- @return utils.require-map-get($config, $name, 'typography [config]');
70
- }
71
-
72
- /// Get scale of the base font-size
73
- /// @param {Number} $step Current size in the scale you want to calculate
74
- /// @return {Number} Scaled value
75
-
76
- @function scale($step) {
77
- @return calculate.ratio-scale-size(get("font-size"), get("size-ratio"), get("scale-steps"), $step);
78
- }
79
-
80
- /// Get scale of the line-height
81
- /// @param {Number} $step Current size in the scale you want to calculate
82
- /// @return {Number} Scaled value
83
- /// @todo Setup breakpoints
84
-
85
- @function scale-line-height($step) {
86
- @return calculate.ratio-scale-size(get("line-height"), get("size-line-height-ratio"), get("scale-steps"), $step);
87
- }
88
-
89
- /// Convert pixel value to rem value based on typography $font-size
90
- /// @param {Number} $pixels Pixel value to convert from
91
- /// @return {Number} Rem value
92
-
93
- @function rem($pixels) {
94
- @if math.unit($pixels) == "px" {
95
- @return math.div($pixels, get("font-size")) * 1rem;
96
- } @else {
97
- @return $pixels + 1rem;
98
- }
99
- }
100
-
101
- /// Changes pixels to em
102
- /// @param {Number} $value Pixel value to convert from
103
- /// @param {Number} $base Conversion base (defaults to font-size)
104
- /// @return {Number} Rem value
105
-
106
- @function em($value, $base: null) {
107
- @if (math.unit($value) == "px") {
108
- $base: if($base, $base, get("font-size"));
109
- @return math.div($base, $value) * 1em;
110
- } @else {
111
- @return $value;
112
- }
113
- }
114
-
115
- /// Break word stradegy
116
- /// @param {Boolean} $force Force words to break (will have unusual breaks)
117
-
118
- @mixin word-break($force: false) {
119
- word-break: if($force, break-all, normal);
120
- word-break: break-word;
121
- hyphens: auto;
122
- }
123
-
124
- /// Creates a size map
125
- /// - This is just an accelerator for creating a size map
126
- /// - You can pass your own size maps using set-sizes()
127
- /// @param {Number} $font-size Font size
128
- /// @param {Number} $line-height Line height
129
- /// @param {Boolean} $is-headline Is a headline
130
-
131
- @function new-size($font-size, $line-height: true, $is-headline: false) {
132
- @return (
133
- "font-size": $font-size,
134
- "font-weight" : if($is-headline, get("font-weight-headline"), null),
135
- "line-height": $line-height,
136
- "responsive" : true,
137
- "helper-class" : if($is-headline, false, true),
138
- "helper-class-prefixed" : true,
139
- "base-class" : if($is-headline, true, false),
140
- "base-class-prefixed" : false
141
- );
142
- }
143
-
144
- /// Default size presets
145
- /// @type Map
146
- /// @prop {Number} $size.name Name of size
147
- /// @prop {Number} $size.name.font-size Font size in rems or pixels
148
- /// @prop {Number} $size.name.line-height Line height (unitless)
149
- /// @prop {Number} $size.name.responsive Apply responsive sizes
150
- /// @prop {Boolean} $size.name.base-class This style should be included in the base (top can be overriden)
151
- /// @prop {Boolean} $size.name.helper-class This style should be included in the helpers (overrides)
152
- /// @todo Add adaptive and use a map of breakpoints and whether it's up or down
153
- /// @todo Add headlines
154
-
155
- $sizes: (
156
- "small-x" : new-size(scale(-2)),
157
- "small" : new-size(scale(-1)),
158
- "base" : new-size(scale(0)),
159
- "large" : new-size(scale(1), scale-line-height(1)),
160
- "large-x" : new-size(scale(2), scale-line-height(2)),
161
- "large-xx" : new-size(scale(3), scale-line-height(3)),
162
- "large-xxx" : new-size(scale(4), scale-line-height(4)),
163
- "h1" : new-size(scale(6), scale-line-height(6), true),
164
- "h2" : new-size(scale(5), scale-line-height(5), true),
165
- "h3" : new-size(scale(4), scale-line-height(4), true),
166
- "h4" : new-size(scale(3), scale-line-height(3), true),
167
- "h5" : new-size(scale(2), scale-line-height(2), true),
168
- "h6" : new-size(scale(1), scale-line-height(1), true)
169
- ) !default;
170
-
171
- /// Update the typography presets map
172
- /// @param {Map} $changes A map to merge into the color palette
173
- /// @param {Map} $deep Use deep merge
174
- /// @param {Map} $overwrite Overwrite the presets completly (cannot be used with deep)
175
- /// @example scss Setting the error and type color
176
- /// @include typography.set((
177
- /// "small" : 0.8rem
178
- /// ));
179
-
180
- @mixin set-sizes($changes, $deep: false, $overwrite: false) {
181
- $sizes: utils.map-merge-or-overwrite($sizes, $changes, $deep, $overwrite) !global;
182
- }
183
-
184
- /// Get a size's map
185
- /// @param {String} $name Name of size
186
- /// @return {Map}
187
-
188
- @function get-size($name) {
189
- @return utils.require-map-get($sizes, $name, 'typography [size]');
190
- }
191
-
192
- /// Print a font-size for a given size
193
- /// @todo Remove doesn't work for breakpoints or responsive
194
- /// @param {String} $value Size name
195
-
196
- @function font-size($name: null) {
197
- $size: get-size($name);
198
- $font-size: map.get($size, "font-size");
199
- @return rem($font-size);
200
- }
201
-
202
- /// Forces conversion to unitless line-height
203
- /// @param {Number} $line-height Line height size in px, em, or rem
204
- /// @param {Number} $font-size Font size in px, em, or rem
205
-
206
- @function unitless-line-height($line-height, $font-size) {
207
- // Font size is rems, line-height is unkown
208
- @if (math.is-unitless($line-height)) {
209
- @return $line-height;
210
- }
211
- $unit: math.unit($line-height);
212
- @if ($unit == "em") {
213
- @return utility.strip-unit($line-height);
214
- } @else if ($unit == "pixels" or $unit == "rem") {
215
- $calc: math.div(rem($line-height), rem($font-size));
216
- @return utility.strip-unit($calc);
217
- } @else {
218
- @error "ULU: Unable to convert to unitless line-height for: #{ $line-height }";
219
- }
220
- }
221
- /// Print a value from the size and convert it (to appropriate unit for framework)
222
- /// @param {Map} $size Size's map
223
- /// @param {String} $props The property to get
224
-
225
- @function get-size-converted-value($size, $prop) {
226
- // Font size is calculated differently
227
- $value: map.get($size, $prop);
228
- $font-size: map.get($size, "font-size");
229
- $type: meta.type-of($value);
230
-
231
- @if ($value == false or $value == null) {
232
- @return null;
233
- // Numbers and true (default) need to be converted
234
- } @else if ($value == true or $type == number) {
235
- // Get default value
236
- @if ($value == true) {
237
- $value: get($prop);
238
- }
239
- // Force line-height to be unitless
240
- @if ($prop == "line-height") {
241
- @return unitless-line-height($value, $font-size);
242
- }
243
- // Convert to REM
244
- @if (math.unit($value) == "px") {
245
- $value: rem($value);
246
- }
247
- @return $value;
248
- } @else {
249
- @return $value;
250
- }
251
- }
252
-
253
-
254
- /// Get a sizes property value that doesn't need conversion
255
- /// - Reason: Will map to default if user set's size prop to true
256
- /// @param {Map} $size Size's map
257
- /// @param {String} $props The property to get
258
-
259
- @function get-size-value($size, $prop) {
260
- $value: map.get($size, $prop);
261
- // Default
262
- @if ($value == true) {
263
- $value: get($prop);
264
- }
265
- @return $value;
266
- }
267
-
268
- /// Print's the responsive type formula
269
- /// @param {String} $font-size Name to retrieve from sizes map or a unique size map that follows the API
270
- /// @param {Map} $changes Modifications to be merged into size before using
271
-
272
- @mixin font-size-responsive($font-size, $amount: get("responsive-change")) {
273
- font-size: calc(#{ $font-size } + #{ $amount });
274
- }
275
-
276
- /// Print a typography size (font-size, line-height)
277
- /// @param {String} $nameOrMap Name to retrieve from sizes map or a unique size map that follows the API
278
- /// @param {Map} $changes Modifications to be merged into size before using
279
-
280
- @mixin size($name, $changes: false, $only-font-size: null) {
281
- $size: $name;
282
- // Allow custom maps
283
- @if (meta.type-of($name) == "string") {
284
- $size: get-size($name);
285
- }
286
- @if ($changes) {
287
- $size: map.merge($size, $changes);
288
- }
289
- $font-size: get-size-converted-value($size, "font-size");
290
- $breakpoints: map.get($size, "breakpoints");
291
- $responsive: map.get($size, "responsive");
292
- $color: map.get($size, "color");
293
-
294
- font-size: $font-size;
295
- @if ($responsive) {
296
- @if (meta.type-of($responsive) == "number") {
297
- @include font-size-responsive($font-size, $responsive);
298
- } @else {
299
- @include font-size-responsive($font-size);
300
- }
301
- }
302
- @if (not $only-font-size) {
303
- font-weight: get-size-value($size, "font-weight");
304
- font-family: get-size-value($size, "font-family");
305
- line-height: get-size-converted-value($size, "line-height");
306
- margin-top: get-size-converted-value($size, "margin-top");
307
- margin-bottom: get-size-converted-value($size, "margin-bottom");
308
- color: if($color, color.get($color), null);
309
- }
310
-
311
- // If they have breakpoints, process them
312
- @if $breakpoints {
313
- @each $name, $breakpoint in $breakpoints {
314
- $direction: map.get($breakpoint, "direction");
315
- @include breakpoint.from($name, $direction) {
316
- @include size($breakpoint, null, $only-font-size);
317
- }
318
- }
319
- }
320
- }