@graupl/core 1.0.0-beta.10

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 (303) hide show
  1. package/dist/css/base/button.css +2 -0
  2. package/dist/css/base/button.css.map +1 -0
  3. package/dist/css/base/form.css +2 -0
  4. package/dist/css/base/form.css.map +1 -0
  5. package/dist/css/base/link.css +2 -0
  6. package/dist/css/base/link.css.map +1 -0
  7. package/dist/css/base/table.css +2 -0
  8. package/dist/css/base/table.css.map +1 -0
  9. package/dist/css/base.css +2 -0
  10. package/dist/css/base.css.map +1 -0
  11. package/dist/css/component/accordion.css +5 -0
  12. package/dist/css/component/accordion.css.map +1 -0
  13. package/dist/css/component/alert.css +2 -0
  14. package/dist/css/component/alert.css.map +1 -0
  15. package/dist/css/component/card.css +2 -0
  16. package/dist/css/component/card.css.map +1 -0
  17. package/dist/css/component/carousel.css +2 -0
  18. package/dist/css/component/carousel.css.map +1 -0
  19. package/dist/css/component/input-group.css +2 -0
  20. package/dist/css/component/input-group.css.map +1 -0
  21. package/dist/css/component/list.css +2 -0
  22. package/dist/css/component/list.css.map +1 -0
  23. package/dist/css/component/menu.css +2 -0
  24. package/dist/css/component/menu.css.map +1 -0
  25. package/dist/css/component/navigation.css +2 -0
  26. package/dist/css/component/navigation.css.map +1 -0
  27. package/dist/css/component.css +5 -0
  28. package/dist/css/component.css.map +1 -0
  29. package/dist/css/graupl.css +5 -0
  30. package/dist/css/graupl.css.map +1 -0
  31. package/dist/css/init.css +2 -0
  32. package/dist/css/init.css.map +1 -0
  33. package/dist/css/layout/columns.css +2 -0
  34. package/dist/css/layout/columns.css.map +1 -0
  35. package/dist/css/layout/container.css +2 -0
  36. package/dist/css/layout/container.css.map +1 -0
  37. package/dist/css/layout/flex-columns.css +2 -0
  38. package/dist/css/layout/flex-columns.css.map +1 -0
  39. package/dist/css/layout.css +5 -0
  40. package/dist/css/layout.css.map +1 -0
  41. package/dist/css/normalize.css +2 -0
  42. package/dist/css/normalize.css.map +1 -0
  43. package/dist/css/state/focus.css +2 -0
  44. package/dist/css/state/focus.css.map +1 -0
  45. package/dist/css/state.css +2 -0
  46. package/dist/css/state.css.map +1 -0
  47. package/dist/css/theme/color.css +2 -0
  48. package/dist/css/theme/color.css.map +1 -0
  49. package/dist/css/theme/typography.css +2 -0
  50. package/dist/css/theme/typography.css.map +1 -0
  51. package/dist/css/theme.css +2 -0
  52. package/dist/css/theme.css.map +1 -0
  53. package/dist/css/utilities/alignment.css +2 -0
  54. package/dist/css/utilities/alignment.css.map +1 -0
  55. package/dist/css/utilities/background.css +2 -0
  56. package/dist/css/utilities/background.css.map +1 -0
  57. package/dist/css/utilities/border.css +2 -0
  58. package/dist/css/utilities/border.css.map +1 -0
  59. package/dist/css/utilities/color.css +2 -0
  60. package/dist/css/utilities/color.css.map +1 -0
  61. package/dist/css/utilities/container.css +2 -0
  62. package/dist/css/utilities/container.css.map +1 -0
  63. package/dist/css/utilities/display.css +2 -0
  64. package/dist/css/utilities/display.css.map +1 -0
  65. package/dist/css/utilities/flex.css +2 -0
  66. package/dist/css/utilities/flex.css.map +1 -0
  67. package/dist/css/utilities/gradient.css +2 -0
  68. package/dist/css/utilities/gradient.css.map +1 -0
  69. package/dist/css/utilities/height.css +2 -0
  70. package/dist/css/utilities/height.css.map +1 -0
  71. package/dist/css/utilities/inset.css +2 -0
  72. package/dist/css/utilities/inset.css.map +1 -0
  73. package/dist/css/utilities/justification.css +2 -0
  74. package/dist/css/utilities/justification.css.map +1 -0
  75. package/dist/css/utilities/list.css +2 -0
  76. package/dist/css/utilities/list.css.map +1 -0
  77. package/dist/css/utilities/order.css +2 -0
  78. package/dist/css/utilities/order.css.map +1 -0
  79. package/dist/css/utilities/position.css +2 -0
  80. package/dist/css/utilities/position.css.map +1 -0
  81. package/dist/css/utilities/ratio.css +2 -0
  82. package/dist/css/utilities/ratio.css.map +1 -0
  83. package/dist/css/utilities/spacing.css +2 -0
  84. package/dist/css/utilities/spacing.css.map +1 -0
  85. package/dist/css/utilities/typography.css +2 -0
  86. package/dist/css/utilities/typography.css.map +1 -0
  87. package/dist/css/utilities/visibility.css +2 -0
  88. package/dist/css/utilities/visibility.css.map +1 -0
  89. package/dist/css/utilities/visually-hidden.css +2 -0
  90. package/dist/css/utilities/visually-hidden.css.map +1 -0
  91. package/dist/css/utilities/width.css +2 -0
  92. package/dist/css/utilities/width.css.map +1 -0
  93. package/dist/css/utilities/z-index.css +2 -0
  94. package/dist/css/utilities/z-index.css.map +1 -0
  95. package/dist/css/utilities.css +2 -0
  96. package/dist/css/utilities.css.map +1 -0
  97. package/package.json +58 -0
  98. package/scss/base/button.scss +3 -0
  99. package/scss/base/form.scss +3 -0
  100. package/scss/base/link.scss +3 -0
  101. package/scss/base/table.scss +3 -0
  102. package/scss/base.scss +3 -0
  103. package/scss/component/accordion.scss +3 -0
  104. package/scss/component/alert.scss +3 -0
  105. package/scss/component/card.scss +3 -0
  106. package/scss/component/carousel.scss +3 -0
  107. package/scss/component/input-group.scss +3 -0
  108. package/scss/component/list.scss +3 -0
  109. package/scss/component/menu.scss +3 -0
  110. package/scss/component/navigation.scss +3 -0
  111. package/scss/component.scss +3 -0
  112. package/scss/graupl.scss +3 -0
  113. package/scss/init.scss +3 -0
  114. package/scss/layout/columns.scss +3 -0
  115. package/scss/layout/container.scss +3 -0
  116. package/scss/layout/flex-columns.scss +3 -0
  117. package/scss/layout.scss +3 -0
  118. package/scss/normalize.scss +3 -0
  119. package/scss/state/focus.scss +3 -0
  120. package/scss/state.scss +3 -0
  121. package/scss/theme/color.scss +3 -0
  122. package/scss/theme/typography.scss +3 -0
  123. package/scss/theme.scss +3 -0
  124. package/scss/utilities/alignment.scss +3 -0
  125. package/scss/utilities/background.scss +3 -0
  126. package/scss/utilities/border.scss +3 -0
  127. package/scss/utilities/color.scss +3 -0
  128. package/scss/utilities/container.scss +3 -0
  129. package/scss/utilities/display.scss +3 -0
  130. package/scss/utilities/flex.scss +3 -0
  131. package/scss/utilities/gradient.scss +3 -0
  132. package/scss/utilities/height.scss +3 -0
  133. package/scss/utilities/inset.scss +3 -0
  134. package/scss/utilities/justification.scss +3 -0
  135. package/scss/utilities/list.scss +3 -0
  136. package/scss/utilities/order.scss +3 -0
  137. package/scss/utilities/position.scss +3 -0
  138. package/scss/utilities/ratio.scss +3 -0
  139. package/scss/utilities/spacing.scss +3 -0
  140. package/scss/utilities/typography.scss +3 -0
  141. package/scss/utilities/visibility.scss +3 -0
  142. package/scss/utilities/visually-hidden.scss +3 -0
  143. package/scss/utilities/width.scss +3 -0
  144. package/scss/utilities/z-index.scss +3 -0
  145. package/scss/utilities.scss +3 -0
  146. package/src/js/accordion/Accordion.js +1163 -0
  147. package/src/js/accordion/AccordionItem.js +496 -0
  148. package/src/js/accordion/index.js +10 -0
  149. package/src/js/alert/Alert.js +581 -0
  150. package/src/js/alert/index.js +11 -0
  151. package/src/js/carousel/Carousel.js +1427 -0
  152. package/src/js/carousel/index.js +10 -0
  153. package/src/js/domHelpers.js +37 -0
  154. package/src/js/eventHandlers.js +39 -0
  155. package/src/js/navigation/index.js +36 -0
  156. package/src/js/storage.js +106 -0
  157. package/src/js/validate.js +225 -0
  158. package/src/scss/_defaults.scss +184 -0
  159. package/src/scss/_index.scss +15 -0
  160. package/src/scss/_init.scss +6 -0
  161. package/src/scss/_normalize.scss +197 -0
  162. package/src/scss/_variables.scss +95 -0
  163. package/src/scss/base/_index.scss +6 -0
  164. package/src/scss/base/button/_defaults.scss +49 -0
  165. package/src/scss/base/button/_index.scss +206 -0
  166. package/src/scss/base/button/_mixins.scss +104 -0
  167. package/src/scss/base/button/_variables.scss +252 -0
  168. package/src/scss/base/form/_defaults.scss +24 -0
  169. package/src/scss/base/form/_index.scss +227 -0
  170. package/src/scss/base/form/_variables.scss +245 -0
  171. package/src/scss/base/link/_defaults.scss +35 -0
  172. package/src/scss/base/link/_index.scss +245 -0
  173. package/src/scss/base/link/_variables.scss +370 -0
  174. package/src/scss/base/table/_defaults.scss +68 -0
  175. package/src/scss/base/table/_index.scss +314 -0
  176. package/src/scss/base/table/_variables.scss +309 -0
  177. package/src/scss/component/_index.scss +10 -0
  178. package/src/scss/component/accordion/_defaults.scss +40 -0
  179. package/src/scss/component/accordion/_index.scss +198 -0
  180. package/src/scss/component/accordion/_variables.scss +356 -0
  181. package/src/scss/component/alert/_defaults.scss +49 -0
  182. package/src/scss/component/alert/_index.scss +119 -0
  183. package/src/scss/component/alert/_variables.scss +200 -0
  184. package/src/scss/component/card/_defaults.scss +32 -0
  185. package/src/scss/component/card/_index.scss +212 -0
  186. package/src/scss/component/card/_variables.scss +216 -0
  187. package/src/scss/component/carousel/_defaults.scss +43 -0
  188. package/src/scss/component/carousel/_index.scss +192 -0
  189. package/src/scss/component/carousel/_variables.scss +104 -0
  190. package/src/scss/component/input-group/_defaults.scss +30 -0
  191. package/src/scss/component/input-group/_index.scss +47 -0
  192. package/src/scss/component/input-group/_variables.scss +66 -0
  193. package/src/scss/component/list/_defaults.scss +15 -0
  194. package/src/scss/component/list/_index.scss +52 -0
  195. package/src/scss/component/list/_variables.scss +236 -0
  196. package/src/scss/component/menu/_defaults.scss +57 -0
  197. package/src/scss/component/menu/_index.scss +308 -0
  198. package/src/scss/component/menu/_variables.scss +642 -0
  199. package/src/scss/component/navigation/_defaults.scss +23 -0
  200. package/src/scss/component/navigation/_index.scss +190 -0
  201. package/src/scss/component/navigation/_variables.scss +290 -0
  202. package/src/scss/functions/_container.scss +38 -0
  203. package/src/scss/functions/_important.scss +36 -0
  204. package/src/scss/functions/_screen.scss +38 -0
  205. package/src/scss/functions/_theme.scss +39 -0
  206. package/src/scss/functions/_utility.scss +28 -0
  207. package/src/scss/layout/_index.scss +5 -0
  208. package/src/scss/layout/columns/_defaults.scss +24 -0
  209. package/src/scss/layout/columns/_index.scss +137 -0
  210. package/src/scss/layout/columns/_variables.scss +55 -0
  211. package/src/scss/layout/container/_defaults.scss +35 -0
  212. package/src/scss/layout/container/_index.scss +628 -0
  213. package/src/scss/layout/container/_variables.scss +114 -0
  214. package/src/scss/layout/flex-columns/_defaults.scss +28 -0
  215. package/src/scss/layout/flex-columns/_index.scss +184 -0
  216. package/src/scss/layout/flex-columns/_variables.scss +30 -0
  217. package/src/scss/mixins/_animation.scss +15 -0
  218. package/src/scss/mixins/_container.scss +80 -0
  219. package/src/scss/mixins/_layer.scss +16 -0
  220. package/src/scss/mixins/_screen.scss +77 -0
  221. package/src/scss/mixins/_state.scss +18 -0
  222. package/src/scss/mixins/_theme.scss +15 -0
  223. package/src/scss/mixins/_utility.scss +185 -0
  224. package/src/scss/mixins/_visually-hidden.scss +30 -0
  225. package/src/scss/state/_index.scss +3 -0
  226. package/src/scss/state/focus/_defaults.scss +9 -0
  227. package/src/scss/state/focus/_index.scss +42 -0
  228. package/src/scss/state/focus/_mixins.scss +13 -0
  229. package/src/scss/state/focus/_variables.scss +50 -0
  230. package/src/scss/theme/_index.scss +4 -0
  231. package/src/scss/theme/color/_defaults.scss +143 -0
  232. package/src/scss/theme/color/_index.scss +42 -0
  233. package/src/scss/theme/color/_variables.scss +133 -0
  234. package/src/scss/theme/typography/_defaults.scss +54 -0
  235. package/src/scss/theme/typography/_index.scss +120 -0
  236. package/src/scss/theme/typography/_variables.scss +248 -0
  237. package/src/scss/utilities/_index.scss +23 -0
  238. package/src/scss/utilities/_template/_defaults.scss +41 -0
  239. package/src/scss/utilities/_template/_index.scss +171 -0
  240. package/src/scss/utilities/_template/_variables.scss +6 -0
  241. package/src/scss/utilities/alignment/_defaults.scss +76 -0
  242. package/src/scss/utilities/alignment/_index.scss +336 -0
  243. package/src/scss/utilities/alignment/_variables.scss +6 -0
  244. package/src/scss/utilities/background/_defaults.scss +122 -0
  245. package/src/scss/utilities/background/_index.scss +634 -0
  246. package/src/scss/utilities/background/_variables.scss +6 -0
  247. package/src/scss/utilities/border/_defaults.scss +73 -0
  248. package/src/scss/utilities/border/_index.scss +558 -0
  249. package/src/scss/utilities/border/_variables.scss +6 -0
  250. package/src/scss/utilities/color/_defaults.scss +49 -0
  251. package/src/scss/utilities/color/_index.scss +469 -0
  252. package/src/scss/utilities/color/_variables.scss +6 -0
  253. package/src/scss/utilities/container/_defaults.scss +40 -0
  254. package/src/scss/utilities/container/_index.scss +174 -0
  255. package/src/scss/utilities/container/_variables.scss +6 -0
  256. package/src/scss/utilities/display/_defaults.scss +47 -0
  257. package/src/scss/utilities/display/_index.scss +184 -0
  258. package/src/scss/utilities/display/_variables.scss +6 -0
  259. package/src/scss/utilities/flex/_defaults.scss +99 -0
  260. package/src/scss/utilities/flex/_index.scss +486 -0
  261. package/src/scss/utilities/flex/_variables.scss +6 -0
  262. package/src/scss/utilities/gradient/_defaults.scss +70 -0
  263. package/src/scss/utilities/gradient/_index.scss +696 -0
  264. package/src/scss/utilities/gradient/_variables.scss +29 -0
  265. package/src/scss/utilities/height/_defaults.scss +54 -0
  266. package/src/scss/utilities/height/_index.scss +525 -0
  267. package/src/scss/utilities/height/_variables.scss +6 -0
  268. package/src/scss/utilities/inset/_defaults.scss +55 -0
  269. package/src/scss/utilities/inset/_index.scss +258 -0
  270. package/src/scss/utilities/inset/_variables.scss +6 -0
  271. package/src/scss/utilities/justification/_defaults.scss +73 -0
  272. package/src/scss/utilities/justification/_index.scss +333 -0
  273. package/src/scss/utilities/justification/_variables.scss +6 -0
  274. package/src/scss/utilities/list/_defaults.scss +53 -0
  275. package/src/scss/utilities/list/_index.scss +253 -0
  276. package/src/scss/utilities/list/_variables.scss +6 -0
  277. package/src/scss/utilities/order/_defaults.scss +36 -0
  278. package/src/scss/utilities/order/_index.scss +246 -0
  279. package/src/scss/utilities/order/_variables.scss +6 -0
  280. package/src/scss/utilities/position/_defaults.scss +41 -0
  281. package/src/scss/utilities/position/_index.scss +178 -0
  282. package/src/scss/utilities/position/_variables.scss +6 -0
  283. package/src/scss/utilities/ratio/_defaults.scss +42 -0
  284. package/src/scss/utilities/ratio/_index.scss +188 -0
  285. package/src/scss/utilities/ratio/_variables.scss +9 -0
  286. package/src/scss/utilities/spacing/_defaults.scss +64 -0
  287. package/src/scss/utilities/spacing/_index.scss +970 -0
  288. package/src/scss/utilities/spacing/_variables.scss +6 -0
  289. package/src/scss/utilities/typography/_defaults.scss +58 -0
  290. package/src/scss/utilities/typography/_index.scss +1089 -0
  291. package/src/scss/utilities/typography/_variables.scss +6 -0
  292. package/src/scss/utilities/visibility/_defaults.scss +39 -0
  293. package/src/scss/utilities/visibility/_index.scss +173 -0
  294. package/src/scss/utilities/visibility/_variables.scss +6 -0
  295. package/src/scss/utilities/visually-hidden/_defaults.scss +29 -0
  296. package/src/scss/utilities/visually-hidden/_index.scss +189 -0
  297. package/src/scss/utilities/visually-hidden/_variables.scss +6 -0
  298. package/src/scss/utilities/width/_defaults.scss +54 -0
  299. package/src/scss/utilities/width/_index.scss +525 -0
  300. package/src/scss/utilities/width/_variables.scss +6 -0
  301. package/src/scss/utilities/z-index/_defaults.scss +40 -0
  302. package/src/scss/utilities/z-index/_index.scss +173 -0
  303. package/src/scss/utilities/z-index/_variables.scss +6 -0
@@ -0,0 +1,525 @@
1
+ // @graupl/core width utilities styles.
2
+ //
3
+ // This file generates the width utility classes provided by Graupl.
4
+ //
5
+ // The following classes are generated by default:
6
+ // - `.w-auto`: Sets the width property to `auto`.
7
+ // - `.w-fit-content`: Sets the width property to `fit-content`.
8
+ // - `.w-max-content`: Sets the width property to `max-content`.
9
+ // - `.w-min-content`: Sets the width property to `min-content`.
10
+ // - `.w-stretch`: Sets the width property to `stretch`.
11
+ // - `.w-full`: Sets the width property to `100%`.
12
+ // - `.w-quarter`: Sets the width property to `25%`.
13
+ // - `.w-half`: Sets the width property to `50%`.
14
+ // - `.w-three-quarters`: Sets the width property to `75%`.
15
+ // - `.w-third`: Sets the width property to `calc(100% / 3)`.
16
+ // - `.w-two-thirds`: Sets the width property to `calc(100% / 1.5)`.
17
+ // - `.w-half-screen`: Sets the width property to `50vh`.
18
+ // - `.w-third-screen`: Sets the width property to `calc(100vh / 3)`.
19
+ // - `.w-two-thirds-screen`: Sets the width property to `calc(100vh / 1.5)`.
20
+ // - `.w-quarter-screen`: Sets the width property to `25vh`.
21
+ // - `.w-three-quarters-screen`: Sets the width property to `75vh`.
22
+ // - `.w-full-screen`: Sets the width property to `100vh`.
23
+ // - `.w-0`: Sets the width property to Graupl's spacer 0 value.
24
+ // - `.w-1`: Sets the width property to Graupl's spacer 1 value.
25
+ // - `.w-2`: Sets the width property to Graupl's spacer 2 value.
26
+ // - `.w-3`: Sets the width property to Graupl's spacer 3 value.
27
+ // - `.w-4`: Sets the width property to Graupl's spacer 4 value.
28
+ // - `.w-5`: Sets the width property to Graupl's spacer 5 value.
29
+ // - `.w-6`: Sets the width property to Graupl's spacer 6 value.
30
+ // - `.w-7`: Sets the width property to Graupl's spacer 7 value.
31
+ // - `.w-8`: Sets the width property to Graupl's spacer 8 value.
32
+ // - `.w-9`: Sets the width property to Graupl's spacer 9 value.
33
+ // - `.w-10`: Sets the width property to Graupl's spacer 10 value.
34
+ // - `.max-w-auto`: Sets the max-width property to `auto`.
35
+ // - `.max-w-fit-content`: Sets the max-width property to `fit-content`.
36
+ // - `.max-w-max-content`: Sets the max-width property to `max-content`.
37
+ // - `.max-w-min-content`: Sets the max-width property to `min-content`.
38
+ // - `.max-w-stretch`: Sets the max-width property to `stretch`.
39
+ // - `.max-w-full`: Sets the max-width property to `100%`.
40
+ // - `.max-w-quarter`: Sets the max-width property to `25%`.
41
+ // - `.max-w-half`: Sets the max-width property to `50%`.
42
+ // - `.max-w-three-quarters`: Sets the max-width property to `75%`.
43
+ // - `.max-w-third`: Sets the max-width property to `calc(100% / 3)`.
44
+ // - `.max-w-two-thirds`: Sets the max-width property to `calc(100% / 1.5)`.
45
+ // - `.max-w-half-screen`: Sets the max-width property to `50vh`.
46
+ // - `.max-w-third-screen`: Sets the max-width property to `calc(100vh / 3)`.
47
+ // - `.max-w-two-thirds-screen`: Sets the max-width property to `calc(100vh / 1.5)`.
48
+ // - `.max-w-quarter-screen`: Sets the max-width property to `25vh`.
49
+ // - `.max-w-three-quarters-screen`: Sets the max-width property to `75vh`.
50
+ // - `.max-w-full-screen`: Sets the max-width property to `100vh`.
51
+ // - `.max-w-0`: Sets the max-width property to Graupl's spacer 0 value.
52
+ // - `.max-w-1`: Sets the max-width property to Graupl's spacer 1 value.
53
+ // - `.max-w-2`: Sets the max-width property to Graupl's spacer 2 value.
54
+ // - `.max-w-3`: Sets the max-width property to Graupl's spacer 3 value.
55
+ // - `.max-w-4`: Sets the max-width property to Graupl's spacer 4 value.
56
+ // - `.max-w-5`: Sets the max-width property to Graupl's spacer 5 value.
57
+ // - `.max-w-6`: Sets the max-width property to Graupl's spacer 6 value.
58
+ // - `.max-w-7`: Sets the max-width property to Graupl's spacer 7 value.
59
+ // - `.max-w-8`: Sets the max-width property to Graupl's spacer 8 value.
60
+ // - `.max-w-9`: Sets the max-width property to Graupl's spacer 9 value.
61
+ // - `.max-w-10`: Sets the max-width property to Graupl's spacer 10 value.
62
+ // - `.min-w-auto`: Sets the min-width property to `auto`.
63
+ // - `.min-w-fit-content`: Sets the min-width property to `fit-content`.
64
+ // - `.min-w-max-content`: Sets the min-width property to `max-content`.
65
+ // - `.min-w-min-content`: Sets the min-width property to `min-content`.
66
+ // - `.min-w-stretch`: Sets the min-width property to `stretch`.
67
+ // - `.min-w-full`: Sets the min-width property to `100%`.
68
+ // - `.min-w-quarter`: Sets the min-width property to `25%`.
69
+ // - `.min-w-half`: Sets the min-width property to `50%`.
70
+ // - `.min-w-three-quarters`: Sets the min-width property to `75%`.
71
+ // - `.min-w-third`: Sets the min-width property to `calc(100% / 3)`.
72
+ // - `.min-w-two-thirds`: Sets the min-width property to `calc(100% / 1.5)`.
73
+ // - `.min-w-half-screen`: Sets the min-width property to `50vh`.
74
+ // - `.min-w-third-screen`: Sets the min-width property to `calc(100vh / 3)`.
75
+ // - `.min-w-two-thirds-screen`: Sets the min-width property to `calc(100vh / 1.5)`.
76
+ // - `.min-w-quarter-screen`: Sets the min-width property to `25vh`.
77
+ // - `.min-w-three-quarters-screen`: Sets the min-width property to `75vh`.
78
+ // - `.min-w-full-screen`: Sets the min-width property to `100vh`.
79
+ // - `.min-w-0`: Sets the min-width property to Graupl's spacer 0 value.
80
+ // - `.min-w-1`: Sets the min-width property to Graupl's spacer 1 value.
81
+ // - `.min-w-2`: Sets the min-width property to Graupl's spacer 2 value.
82
+ // - `.min-w-3`: Sets the min-width property to Graupl's spacer 3 value.
83
+ // - `.min-w-4`: Sets the min-width property to Graupl's spacer 4 value.
84
+ // - `.min-w-5`: Sets the min-width property to Graupl's spacer 5 value.
85
+ // - `.min-w-6`: Sets the min-width property to Graupl's spacer 6 value.
86
+ // - `.min-w-7`: Sets the min-width property to Graupl's spacer 7 value.
87
+ // - `.min-w-8`: Sets the min-width property to Graupl's spacer 8 value.
88
+ // - `.min-w-9`: Sets the min-width property to Graupl's spacer 9 value.
89
+ // - `.min-w-10`: Sets the min-width property to Graupl's spacer 10 value.
90
+ //
91
+ // The following custom properties control the generated classes:
92
+ // - N/A.
93
+ //
94
+ // The following variables control the generated classes:
95
+ // - `$selector-base`: The base selector for the utility classes.
96
+ // - `$use-important`: A flag to determine if the `!important` flag should be added to the utility classes.
97
+ // - `$screen-aware`: A flag to generate screen-aware utility classes.
98
+ // - `$theme-aware`: A flag to generate theme-aware utility classes.
99
+ // - `$state-aware`: A flag to generate state-aware utility classes.
100
+ // - `$container-aware`: A flag to generate container-aware utility classes.
101
+ // - `$screen-aware-separator`: The separator for screen-aware utility classes.
102
+ // - `$theme-aware-separator`: The separator for theme-aware utility classes.
103
+ // - `$state-aware-separator`: The separator for state-aware utility classes.
104
+ // - `$container-aware-separator`: The separator for container-aware utility classes.
105
+ // - `$screen-aware-selector-prefix`: The prefix for screen-aware utility classes.
106
+ // - `$theme-aware-selector-prefix`: The prefix for theme-aware utility classes.
107
+ // - `$state-aware-selector-prefix`: The prefix for state-aware utility classes.
108
+ // - `$container-aware-selector-prefix`: The prefix for container-aware utility classes.
109
+ // - `$width-selector-prefix`: The prefix for the width utility classes.
110
+ // - `$max-width-selector-prefix`: The prefix for the max-width utility classes.
111
+ // - `$min-width-selector-prefix`: The prefix for the min-width utility classes.
112
+ // - `$base-width-values`: The base properties and values for the width utility classes.
113
+ // - `$custom-width-values`: The custom properties and values for the width utility classes.
114
+ // - `$width-values`: The combined properties and values for the width utility classes.
115
+ //
116
+ // Generating responsive utility classes can be done by setting `$screen-aware`, `$theme-aware`, or `$state-aware` to `true`.
117
+ // By default, no responsive utility classes are generated.
118
+ //
119
+ // When set to true, screen-aware utility classes will be generated for each screen size in the following pattern:
120
+ // - `.{screen-prefix}{screen-name}:{prefix}{value}`
121
+ //
122
+ // e.g. `.sm:w-auto` will set the `width` property to `auto` on screens equal to or larger than the `sm` breakpoint.
123
+ //
124
+ // When set to true, theme-aware utility classes will be generated for each theme in the following pattern:
125
+ // - `.{theme-prefix}{theme-name}:{prefix}{value}`
126
+ //
127
+ // e.g. `.dark:w-auto` will set the `width` property to `auto` when the `dark` theme is active.
128
+ //
129
+ // When set to true, state-aware utility classes will be generated for each state in the following pattern:
130
+ // - `.{state-prefix}{state-name}:{prefix}{value}`
131
+ //
132
+ // e.g. `.hover:w-auto` will set the `width` property to `auto` when the element is hovered.
133
+ //
134
+ // When set to true, container-aware utility classes will be generated for each container in the following pattern:
135
+ // - `.{container-prefix}{container-name}:{prefix}{value}`
136
+ //
137
+ // e.g. `.cq:md:w-auto` will set the `width` property to `auto` when the parent container is larger than the `md` breakpoint.
138
+ //
139
+ // @example
140
+ // <div class="w-5">This element has a width equal to Graupl's spacer 5 value.</div>
141
+
142
+ @use "../../defaults" as root-defaults;
143
+ @use "../../mixins/layer" as *;
144
+ @use "../../mixins/utility";
145
+ @use "../../theme/color/variables" as color;
146
+ @use "../../variables" as root-variables;
147
+ @use "defaults";
148
+ @use "sass:map";
149
+ @use "variables" as *;
150
+
151
+ @include layer(utilities) {
152
+ // `.`
153
+ $selector-prefix: defaults.$selector-base;
154
+
155
+ // For each width property, create a utility class.
156
+ @each $width, $value in defaults.$width-values {
157
+ // e.g. `.w-min-content` or `.w-full`
158
+ $selector: #{$selector-prefix}#{defaults.$width-selector-prefix}#{$width};
159
+
160
+ @include utility.create(
161
+ $selector,
162
+ width,
163
+ $value,
164
+ $important: defaults.$use-important
165
+ );
166
+
167
+ // e.g. `.max-w-min-content` or `.max-w-full`
168
+ $selector: #{$selector-prefix}#{defaults.$max-width-selector-prefix}#{$width};
169
+
170
+ @include utility.create(
171
+ $selector,
172
+ max-width,
173
+ $value,
174
+ $important: defaults.$use-important
175
+ );
176
+
177
+ // e.g. `.min-w-min-content` or `.min-w-full`
178
+ $selector: #{$selector-prefix}#{defaults.$min-width-selector-prefix}#{$width};
179
+
180
+ @include utility.create(
181
+ $selector,
182
+ min-width,
183
+ $value,
184
+ $important: defaults.$use-important
185
+ );
186
+ }
187
+
188
+ @each $spacer, $value in root-variables.$spacers {
189
+ // e.g. `.w-1` or `.w-2`
190
+ $selector: #{$selector-prefix}#{defaults.$width-selector-prefix}#{$spacer};
191
+
192
+ @include utility.create(
193
+ $selector,
194
+ width,
195
+ $value,
196
+ $important: defaults.$use-important
197
+ );
198
+
199
+ // e.g. `.max-w-1` or `.max-w-2`
200
+ $selector: #{$selector-prefix}#{defaults.$max-width-selector-prefix}#{$spacer};
201
+
202
+ @include utility.create(
203
+ $selector,
204
+ max-width,
205
+ $value,
206
+ $important: defaults.$use-important
207
+ );
208
+
209
+ // e.g. `.min-w-1` or `.min-w-2`
210
+ $selector: #{$selector-prefix}#{defaults.$min-width-selector-prefix}#{$spacer};
211
+
212
+ @include utility.create(
213
+ $selector,
214
+ min-width,
215
+ $value,
216
+ $important: defaults.$use-important
217
+ );
218
+ }
219
+
220
+ // Generate screen-aware utilities.
221
+ @if defaults.$screen-aware {
222
+ @each $screen-name in map.keys(root-defaults.$screen-sizes) {
223
+ // e.g. `.md:` or `.lg:`
224
+ $selector-prefix: #{defaults.$selector-base}#{defaults.$screen-aware-selector-prefix}#{$screen-name}#{defaults.$screen-aware-separator};
225
+
226
+ // For each width property, create a utility class.
227
+ @each $width, $value in defaults.$width-values {
228
+ // e.g. `.md:w-min-content` or `.lg:w-full`
229
+ $selector: #{$selector-prefix}#{defaults.$width-selector-prefix}#{$width};
230
+
231
+ @include utility.create(
232
+ $selector,
233
+ width,
234
+ $value,
235
+ $important: defaults.$use-important,
236
+ $screen: $screen-name
237
+ );
238
+
239
+ // e.g. `.md:max-w-min-content` or `.lg:max-w-full`
240
+ $selector: #{$selector-prefix}#{defaults.$max-width-selector-prefix}#{$width};
241
+
242
+ @include utility.create(
243
+ $selector,
244
+ max-width,
245
+ $value,
246
+ $important: defaults.$use-important,
247
+ $screen: $screen-name
248
+ );
249
+
250
+ // e.g. `.md:min-w-min-content` or `.lg:min-w-full`
251
+ $selector: #{$selector-prefix}#{defaults.$min-width-selector-prefix}#{$width};
252
+
253
+ @include utility.create(
254
+ $selector,
255
+ min-width,
256
+ $value,
257
+ $important: defaults.$use-important,
258
+ $screen: $screen-name
259
+ );
260
+ }
261
+
262
+ @each $spacer, $value in root-variables.$spacers {
263
+ // e.g. `.md:w-1` or `.lg:w-2`
264
+ $selector: #{$selector-prefix}#{defaults.$width-selector-prefix}#{$spacer};
265
+
266
+ @include utility.create(
267
+ $selector,
268
+ width,
269
+ $value,
270
+ $important: defaults.$use-important,
271
+ $screen: $screen-name
272
+ );
273
+
274
+ // e.g. `.md:max-w-1` or `.lg:max-w-2`
275
+ $selector: #{$selector-prefix}#{defaults.$max-width-selector-prefix}#{$spacer};
276
+
277
+ @include utility.create(
278
+ $selector,
279
+ max-width,
280
+ $value,
281
+ $important: defaults.$use-important,
282
+ $screen: $screen-name
283
+ );
284
+
285
+ // e.g. `.md:min-w-1` or `.lg:min-w-2`
286
+ $selector: #{$selector-prefix}#{defaults.$min-width-selector-prefix}#{$spacer};
287
+
288
+ @include utility.create(
289
+ $selector,
290
+ min-width,
291
+ $value,
292
+ $important: defaults.$use-important,
293
+ $screen: $screen-name
294
+ );
295
+ }
296
+ }
297
+ }
298
+
299
+ // Generate theme-aware utilities.
300
+ @if defaults.$theme-aware and root-defaults.$theme-aware-utilities {
301
+ @each $theme-name, $colors in color.$themes {
302
+ @if $theme-name != active {
303
+ // e.g. `.dark:` or `.light:`
304
+ $selector-prefix: #{defaults.$selector-base}#{defaults.$theme-aware-selector-prefix}#{$theme-name}#{defaults.$theme-aware-separator};
305
+
306
+ // For each width property, create a utility class.
307
+ @each $width, $value in defaults.$width-values {
308
+ // e.g. `.dark:w-min-content` or `.light:w-full`
309
+ $selector: #{$selector-prefix}#{defaults.$width-selector-prefix}#{$width};
310
+
311
+ @include utility.create(
312
+ $selector,
313
+ width,
314
+ $value,
315
+ $important: defaults.$use-important,
316
+ $theme: $theme-name
317
+ );
318
+
319
+ // e.g. `.dark:max-w-min-content` or `.light:max-w-full`
320
+ $selector: #{$selector-prefix}#{defaults.$max-width-selector-prefix}#{$width};
321
+
322
+ @include utility.create(
323
+ $selector,
324
+ max-width,
325
+ $value,
326
+ $important: defaults.$use-important,
327
+ $theme: $theme-name
328
+ );
329
+
330
+ // e.g. `.dark:min-w-min-content` or `.light:min-w-full`
331
+ $selector: #{$selector-prefix}#{defaults.$min-width-selector-prefix}#{$width};
332
+
333
+ @include utility.create(
334
+ $selector,
335
+ min-width,
336
+ $value,
337
+ $important: defaults.$use-important,
338
+ $theme: $theme-name
339
+ );
340
+ }
341
+
342
+ @each $spacer, $value in root-variables.$spacers {
343
+ // e.g. `.dark:w-1` or `.light:w-2`
344
+ $selector: #{$selector-prefix}#{defaults.$width-selector-prefix}#{$spacer};
345
+
346
+ @include utility.create(
347
+ $selector,
348
+ width,
349
+ $value,
350
+ $important: defaults.$use-important,
351
+ $theme: $theme-name
352
+ );
353
+
354
+ // e.g. `.dark:max-w-1` or `.light:max-w-2`
355
+ $selector: #{$selector-prefix}#{defaults.$max-width-selector-prefix}#{$spacer};
356
+
357
+ @include utility.create(
358
+ $selector,
359
+ max-width,
360
+ $value,
361
+ $important: defaults.$use-important,
362
+ $theme: $theme-name
363
+ );
364
+
365
+ // e.g. `.dark:min-w-1` or `.light:min-w-2`
366
+ $selector: #{$selector-prefix}#{defaults.$min-width-selector-prefix}#{$spacer};
367
+
368
+ @include utility.create(
369
+ $selector,
370
+ min-width,
371
+ $value,
372
+ $important: defaults.$use-important,
373
+ $theme: $theme-name
374
+ );
375
+ }
376
+ }
377
+ }
378
+ }
379
+
380
+ // Generate state-aware utilities.
381
+ @if defaults.$state-aware and root-defaults.$state-aware-utilities {
382
+ @each $state-name, $value in root-defaults.$state-selectors {
383
+ // e.g. `.hover:` or `.focus:`
384
+ $selector-prefix: #{defaults.$selector-base}#{defaults.$state-aware-selector-prefix}#{$state-name}#{defaults.$state-aware-separator};
385
+
386
+ // For each width property, create a utility class.
387
+ @each $width, $value in defaults.$width-values {
388
+ // e.g. `.hover:w-min-content` or `.focus:w-full`
389
+ $selector: #{$selector-prefix}#{defaults.$width-selector-prefix}#{$width};
390
+
391
+ @include utility.create($selector, width, $value, $state: $state-name);
392
+
393
+ // e.g. `.hover:max-w-min-content` or `.focus:max-w-full`
394
+ $selector: #{$selector-prefix}#{defaults.$max-width-selector-prefix}#{$width};
395
+
396
+ @include utility.create(
397
+ $selector,
398
+ max-width,
399
+ $value,
400
+ $important: defaults.$use-important,
401
+ $state: $state-name
402
+ );
403
+
404
+ // e.g. `.hover:min-w-min-content` or `.focus:min-w-full`
405
+ $selector: #{$selector-prefix}#{defaults.$min-width-selector-prefix}#{$width};
406
+
407
+ @include utility.create(
408
+ $selector,
409
+ min-width,
410
+ $value,
411
+ $important: defaults.$use-important,
412
+ $state: $state-name
413
+ );
414
+ }
415
+
416
+ @each $spacer, $value in root-variables.$spacers {
417
+ // e.g. `.hover:w-1` or `.focus:w-2`
418
+ $selector: #{$selector-prefix}#{defaults.$width-selector-prefix}#{$spacer};
419
+
420
+ @include utility.create($selector, width, $value, $state: $state-name);
421
+
422
+ // e.g. `.hover:max-w-1` or `.focus:max-w-2`
423
+ $selector: #{$selector-prefix}#{defaults.$max-width-selector-prefix}#{$spacer};
424
+
425
+ @include utility.create(
426
+ $selector,
427
+ max-width,
428
+ $value,
429
+ $important: defaults.$use-important,
430
+ $state: $state-name
431
+ );
432
+
433
+ // e.g. `.hover:min-w-1` or `.focus:min-w-2`
434
+ $selector: #{$selector-prefix}#{defaults.$min-width-selector-prefix}#{$spacer};
435
+
436
+ @include utility.create(
437
+ $selector,
438
+ min-width,
439
+ $value,
440
+ $important: defaults.$use-important,
441
+ $state: $state-name
442
+ );
443
+ }
444
+ }
445
+ }
446
+
447
+ // Generate container-aware utilities.
448
+ @if defaults.$container-aware {
449
+ @each $container-name in map.keys(root-defaults.$container-sizes) {
450
+ // e.g. `.md:` or `.lg:`
451
+ $selector-prefix: #{defaults.$selector-base}#{defaults.$container-aware-selector-prefix}#{$container-name}#{defaults.$container-aware-separator};
452
+
453
+ // For each width property, create a utility class.
454
+ @each $width, $value in defaults.$width-values {
455
+ // e.g. `.md:w-min-content` or `.lg:w-full`
456
+ $selector: #{$selector-prefix}#{defaults.$width-selector-prefix}#{$width};
457
+
458
+ @include utility.create(
459
+ $selector,
460
+ width,
461
+ $value,
462
+ $important: defaults.$use-important,
463
+ $container: $container-name
464
+ );
465
+
466
+ // e.g. `.md:max-w-min-content` or `.lg:max-w-full`
467
+ $selector: #{$selector-prefix}#{defaults.$max-width-selector-prefix}#{$width};
468
+
469
+ @include utility.create(
470
+ $selector,
471
+ max-width,
472
+ $value,
473
+ $important: defaults.$use-important,
474
+ $container: $container-name
475
+ );
476
+
477
+ // e.g. `.md:min-w-min-content` or `.lg:min-w-full`
478
+ $selector: #{$selector-prefix}#{defaults.$min-width-selector-prefix}#{$width};
479
+
480
+ @include utility.create(
481
+ $selector,
482
+ min-width,
483
+ $value,
484
+ $important: defaults.$use-important,
485
+ $container: $container-name
486
+ );
487
+ }
488
+
489
+ @each $spacer, $value in root-variables.$spacers {
490
+ // e.g. `.md:w-1` or `.lg:w-2`
491
+ $selector: #{$selector-prefix}#{defaults.$width-selector-prefix}#{$spacer};
492
+
493
+ @include utility.create(
494
+ $selector,
495
+ width,
496
+ $value,
497
+ $important: defaults.$use-important,
498
+ $container: $container-name
499
+ );
500
+
501
+ // e.g. `.md:max-w-1` or `.lg:max-w-2`
502
+ $selector: #{$selector-prefix}#{defaults.$max-width-selector-prefix}#{$spacer};
503
+
504
+ @include utility.create(
505
+ $selector,
506
+ max-width,
507
+ $value,
508
+ $important: defaults.$use-important,
509
+ $container: $container-name
510
+ );
511
+
512
+ // e.g. `.md:min-w-1` or `.lg:min-w-2`
513
+ $selector: #{$selector-prefix}#{defaults.$min-width-selector-prefix}#{$spacer};
514
+
515
+ @include utility.create(
516
+ $selector,
517
+ min-width,
518
+ $value,
519
+ $important: defaults.$use-important,
520
+ $container: $container-name
521
+ );
522
+ }
523
+ }
524
+ }
525
+ }
@@ -0,0 +1,6 @@
1
+ // @graupl/core width utilities variables.
2
+ //
3
+ // These values are to be used to directly style components and provide a
4
+ // cleaner way to reference custom properties.
5
+
6
+ @use "defaults";
@@ -0,0 +1,40 @@
1
+ // @graupl/core z-index utilities default values.
2
+ //
3
+ // Generally, these should not be used directly when styling components unless a static value is needed.
4
+ // They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
5
+ //
6
+ // They should not be used to define direct property values (i.e. font-size, color, etc.).
7
+ // Those should be defined as custom properties in the `_variables.scss` file.
8
+
9
+ @use "../../defaults" as root-defaults;
10
+ @use "sass:map";
11
+
12
+ // Utility modifiers.
13
+ $selector-base: root-defaults.$utility-selector-base !default;
14
+ $use-important: root-defaults.$use-important !default;
15
+ $screen-aware: false !default;
16
+ $theme-aware: false !default;
17
+ $state-aware: false !default;
18
+ $container-aware: false !default;
19
+ $screen-aware-separator: root-defaults.$utility-screen-aware-separator !default;
20
+ $theme-aware-separator: root-defaults.$utility-theme-aware-separator !default;
21
+ $state-aware-separator: root-defaults.$utility-state-aware-separator !default;
22
+ $container-aware-separator: root-defaults.$utility-container-aware-separator !default;
23
+ $screen-aware-selector-prefix: root-defaults.$utility-screen-aware-selector-prefix !default;
24
+ $theme-aware-selector-prefix: root-defaults.$utility-theme-aware-selector-prefix !default;
25
+ $state-aware-selector-prefix: root-defaults.$utility-state-aware-selector-prefix !default;
26
+ $container-aware-selector-prefix: root-defaults.$utility-container-aware-selector-prefix !default;
27
+
28
+ // Z-index properties.
29
+
30
+ $z-index-selector-prefix: "z-" !default;
31
+ $base-z-index-properties: (
32
+ "n1": -1,
33
+ 0: 0,
34
+ 1: 1,
35
+ );
36
+ $custom-z-index-properties: () !default;
37
+ $z-index-properties: map.merge(
38
+ $base-z-index-properties,
39
+ $custom-z-index-properties
40
+ );