@graupl/graupl 1.0.0-alpha.9 → 1.0.0-beta.1

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 (350) hide show
  1. package/.github/workflows/codeql-analysis.yml +3 -3
  2. package/.husky/commit-msg +0 -1
  3. package/.husky/pre-commit +0 -1
  4. package/CHANGELOG.md +160 -0
  5. package/build.js +7 -0
  6. package/dist/css/base/button.css +2 -0
  7. package/dist/css/base/button.css.map +1 -0
  8. package/dist/css/base/form.css +2 -0
  9. package/dist/css/base/form.css.map +1 -0
  10. package/dist/css/base/link.css +2 -0
  11. package/dist/css/base/link.css.map +1 -0
  12. package/dist/css/base/table.css +2 -0
  13. package/dist/css/base/table.css.map +1 -0
  14. package/dist/css/base.css +2 -0
  15. package/dist/css/base.css.map +1 -0
  16. package/dist/css/component/accordion.css +2 -0
  17. package/dist/css/component/accordion.css.map +1 -0
  18. package/dist/css/component/alert.css +2 -0
  19. package/dist/css/component/alert.css.map +1 -0
  20. package/dist/css/component/card.css +2 -0
  21. package/dist/css/component/card.css.map +1 -0
  22. package/dist/css/component/carousel.css +2 -0
  23. package/dist/css/component/carousel.css.map +1 -0
  24. package/dist/css/component/input-group.css +2 -0
  25. package/dist/css/component/input-group.css.map +1 -0
  26. package/dist/css/component/menu.css +2 -0
  27. package/dist/css/component/menu.css.map +1 -0
  28. package/dist/css/component/navigation.css +2 -0
  29. package/dist/css/component/navigation.css.map +1 -0
  30. package/dist/css/component.css +2 -0
  31. package/dist/css/component.css.map +1 -0
  32. package/dist/css/graupl.css +2 -0
  33. package/dist/css/graupl.css.map +1 -0
  34. package/dist/css/init.css +2 -0
  35. package/dist/css/init.css.map +1 -0
  36. package/dist/css/layout/columns.css +2 -0
  37. package/dist/css/layout/columns.css.map +1 -0
  38. package/dist/css/layout/container.css +2 -0
  39. package/dist/css/layout/container.css.map +1 -0
  40. package/dist/css/layout/flex-columns.css +2 -0
  41. package/dist/css/layout/flex-columns.css.map +1 -0
  42. package/dist/css/layout.css +2 -0
  43. package/dist/css/layout.css.map +1 -0
  44. package/dist/css/normalize.css +2 -0
  45. package/dist/css/normalize.css.map +1 -0
  46. package/dist/css/state/focus.css +2 -0
  47. package/dist/css/state/focus.css.map +1 -0
  48. package/dist/css/state.css +2 -0
  49. package/dist/css/state.css.map +1 -0
  50. package/dist/css/theme/color.css +2 -0
  51. package/dist/css/theme/color.css.map +1 -0
  52. package/dist/css/theme/typography.css +2 -0
  53. package/dist/css/theme/typography.css.map +1 -0
  54. package/dist/css/theme.css +2 -0
  55. package/dist/css/theme.css.map +1 -0
  56. package/dist/css/utilities/alignment.css +2 -0
  57. package/dist/css/utilities/alignment.css.map +1 -0
  58. package/dist/css/utilities/color.css +2 -0
  59. package/dist/css/utilities/color.css.map +1 -0
  60. package/dist/css/utilities/display.css +2 -0
  61. package/dist/css/utilities/display.css.map +1 -0
  62. package/dist/css/utilities/flex.css +2 -0
  63. package/dist/css/utilities/flex.css.map +1 -0
  64. package/dist/css/utilities/height.css +2 -0
  65. package/dist/css/utilities/height.css.map +1 -0
  66. package/dist/css/utilities/inset.css +2 -0
  67. package/dist/css/utilities/inset.css.map +1 -0
  68. package/dist/css/utilities/justification.css +2 -0
  69. package/dist/css/utilities/justification.css.map +1 -0
  70. package/dist/css/utilities/list.css +2 -0
  71. package/dist/css/utilities/list.css.map +1 -0
  72. package/dist/css/utilities/order.css +2 -0
  73. package/dist/css/utilities/order.css.map +1 -0
  74. package/dist/css/utilities/postion.css +2 -0
  75. package/dist/css/utilities/postion.css.map +1 -0
  76. package/dist/css/utilities/ratio.css +2 -0
  77. package/dist/css/utilities/ratio.css.map +1 -0
  78. package/dist/css/utilities/spacing.css +2 -0
  79. package/dist/css/utilities/spacing.css.map +1 -0
  80. package/dist/css/utilities/typography.css +2 -0
  81. package/dist/css/utilities/typography.css.map +1 -0
  82. package/dist/css/utilities/visibility.css +2 -0
  83. package/dist/css/utilities/visibility.css.map +1 -0
  84. package/dist/css/utilities/width.css +2 -0
  85. package/dist/css/utilities/width.css.map +1 -0
  86. package/dist/css/utilities.css +2 -0
  87. package/dist/css/utilities.css.map +1 -0
  88. package/dist/js/component/accordion.cjs.js +3 -0
  89. package/dist/js/component/accordion.esm.js +1289 -0
  90. package/dist/js/component/accordion.iife.js +3 -0
  91. package/dist/js/component/alert.cjs.js +3 -0
  92. package/dist/js/component/alert.esm.js +529 -0
  93. package/dist/js/component/alert.iife.js +3 -0
  94. package/dist/js/component/carousel.cjs.js +3 -0
  95. package/dist/js/component/carousel.esm.js +1110 -0
  96. package/dist/js/component/carousel.iife.js +3 -0
  97. package/dist/js/graupl.cjs.js +5 -0
  98. package/dist/js/graupl.esm.js +1462 -0
  99. package/dist/js/graupl.iife.js +5 -0
  100. package/docs/.vitepress/config.js +39 -12
  101. package/docs/components/alert.md +130 -0
  102. package/docs/components/button.md +84 -0
  103. package/docs/components/card.md +369 -0
  104. package/docs/components/index.md +1 -0
  105. package/docs/components/inputgroup.md +159 -0
  106. package/docs/components/menu.md +326 -0
  107. package/docs/components/navigation.md +158 -0
  108. package/docs/content.md +237 -0
  109. package/docs/defaults.md +121 -0
  110. package/docs/forms.md +79 -0
  111. package/docs/functions.md +9 -0
  112. package/docs/getting-started.md +1 -0
  113. package/docs/index.md +1 -7
  114. package/docs/introduction.md +22 -2
  115. package/docs/layout.md +200 -0
  116. package/docs/mixins.md +47 -0
  117. package/docs/state.md +67 -0
  118. package/docs/theme.md +258 -0
  119. package/docs/utilities.md +357 -0
  120. package/eslint.config.js +1 -0
  121. package/index.html +816 -327
  122. package/index.js +12 -0
  123. package/package.json +31 -10
  124. package/scss/base/button.scss +3 -0
  125. package/scss/base/form.scss +1 -1
  126. package/scss/base/link.scss +1 -1
  127. package/scss/base/table.scss +1 -1
  128. package/scss/base.scss +1 -1
  129. package/scss/component/accordion.scss +3 -0
  130. package/scss/component/alert.scss +3 -0
  131. package/scss/component/card.scss +3 -0
  132. package/scss/component/carousel.scss +3 -0
  133. package/scss/component/input-group.scss +1 -1
  134. package/scss/component/menu.scss +3 -0
  135. package/scss/component/navigation.scss +3 -0
  136. package/scss/component.scss +1 -1
  137. package/scss/graupl.scss +1 -3
  138. package/scss/init.scss +3 -0
  139. package/scss/layout/columns.scss +1 -1
  140. package/scss/layout/container.scss +1 -1
  141. package/scss/layout/flex-columns.scss +3 -0
  142. package/scss/layout.scss +1 -1
  143. package/scss/normalize.scss +3 -0
  144. package/scss/state/focus.scss +1 -1
  145. package/scss/state.scss +1 -1
  146. package/scss/theme/color.scss +1 -1
  147. package/scss/theme/typography.scss +1 -1
  148. package/scss/theme.scss +1 -1
  149. package/scss/utilities/alignment.scss +3 -0
  150. package/scss/utilities/color.scss +3 -0
  151. package/scss/utilities/display.scss +3 -0
  152. package/scss/utilities/flex.scss +3 -0
  153. package/scss/utilities/height.scss +3 -0
  154. package/scss/utilities/inset.scss +3 -0
  155. package/scss/utilities/justification.scss +3 -0
  156. package/scss/utilities/list.scss +3 -0
  157. package/scss/utilities/order.scss +3 -0
  158. package/scss/utilities/postion.scss +3 -0
  159. package/scss/utilities/ratio.scss +3 -0
  160. package/scss/utilities/spacing.scss +1 -1
  161. package/scss/utilities/typography.scss +1 -1
  162. package/scss/utilities/visibility.scss +3 -0
  163. package/scss/utilities/width.scss +3 -0
  164. package/scss/utilities.scss +1 -1
  165. package/src/js/accordion/Accordion.js +1163 -0
  166. package/src/js/accordion/AccordionItem.js +496 -0
  167. package/src/js/accordion/index.js +10 -0
  168. package/src/js/alert/Alert.js +581 -0
  169. package/src/js/alert/index.js +11 -0
  170. package/src/js/carousel/Carousel.js +1427 -0
  171. package/src/js/carousel/index.js +10 -0
  172. package/src/js/domHelpers.js +37 -0
  173. package/src/js/eventHandlers.js +39 -0
  174. package/src/js/navigation/index.js +36 -0
  175. package/src/js/storage.js +106 -0
  176. package/src/js/validate.js +225 -0
  177. package/src/scss/_defaults.scss +75 -6
  178. package/src/scss/_index.scss +4 -3
  179. package/src/scss/_init.scss +2 -2
  180. package/src/scss/_normalize.scss +197 -0
  181. package/src/scss/_variables.scss +17 -17
  182. package/src/scss/base/_index.scss +2 -1
  183. package/src/scss/base/button/_defaults.scss +60 -0
  184. package/src/scss/base/button/_index.scss +107 -0
  185. package/src/scss/base/button/_mixins.scss +166 -0
  186. package/src/scss/base/button/_variables.scss +176 -0
  187. package/src/scss/base/form/_defaults.scss +14 -4
  188. package/src/scss/base/form/_index.scss +23 -20
  189. package/src/scss/base/form/_variables.scss +46 -37
  190. package/src/scss/base/link/_defaults.scss +48 -5
  191. package/src/scss/base/link/_index.scss +111 -10
  192. package/src/scss/base/link/_variables.scss +239 -9
  193. package/src/scss/base/table/_defaults.scss +49 -4
  194. package/src/scss/base/table/_index.scss +102 -8
  195. package/src/scss/base/table/_variables.scss +87 -17
  196. package/src/scss/component/_index.scss +7 -3
  197. package/src/scss/component/accordion/_defaults.scss +40 -0
  198. package/src/scss/component/accordion/_index.scss +180 -0
  199. package/src/scss/component/accordion/_variables.scss +316 -0
  200. package/src/scss/component/alert/_defaults.scss +49 -0
  201. package/src/scss/component/alert/_index.scss +118 -0
  202. package/src/scss/component/alert/_variables.scss +170 -0
  203. package/src/scss/component/card/_defaults.scss +32 -0
  204. package/src/scss/component/card/_index.scss +178 -0
  205. package/src/scss/component/card/_variables.scss +186 -0
  206. package/src/scss/component/carousel/_defaults.scss +43 -0
  207. package/src/scss/component/carousel/_index.scss +188 -0
  208. package/src/scss/component/carousel/_variables.scss +104 -0
  209. package/src/scss/component/input-group/_defaults.scss +11 -4
  210. package/src/scss/component/input-group/_index.scss +13 -11
  211. package/src/scss/component/input-group/_variables.scss +16 -13
  212. package/src/scss/component/menu/_defaults.scss +66 -0
  213. package/src/scss/component/menu/_index.scss +305 -0
  214. package/src/scss/component/menu/_variables.scss +500 -0
  215. package/src/scss/component/navigation/_defaults.scss +29 -0
  216. package/src/scss/component/navigation/_index.scss +189 -0
  217. package/src/scss/component/navigation/_variables.scss +237 -0
  218. package/src/scss/functions/_important.scss +2 -0
  219. package/src/scss/functions/_screen.scss +30 -0
  220. package/src/scss/functions/_theme.scss +28 -7
  221. package/src/scss/layout/_index.scss +2 -1
  222. package/src/scss/layout/columns/_defaults.scss +12 -4
  223. package/src/scss/layout/columns/_index.scss +32 -10
  224. package/src/scss/layout/columns/_variables.scss +13 -9
  225. package/src/scss/layout/container/_defaults.scss +13 -4
  226. package/src/scss/layout/container/_index.scss +12 -7
  227. package/src/scss/layout/container/_variables.scss +14 -11
  228. package/src/scss/layout/flex-columns/_defaults.scss +18 -0
  229. package/src/scss/layout/flex-columns/_index.scss +80 -0
  230. package/src/scss/layout/flex-columns/_variables.scss +26 -0
  231. package/src/scss/mixins/_animation.scss +15 -0
  232. package/src/scss/mixins/_layer.scss +3 -5
  233. package/src/scss/mixins/_screen.scss +56 -0
  234. package/src/scss/mixins/_utility.scss +30 -0
  235. package/src/scss/mixins/_visually-hidden.scss +20 -0
  236. package/src/scss/state/_index.scss +1 -1
  237. package/src/scss/state/focus/_defaults.scss +6 -4
  238. package/src/scss/state/focus/_index.scss +7 -7
  239. package/src/scss/state/focus/_mixins.scss +15 -0
  240. package/src/scss/state/focus/_variables.scss +14 -10
  241. package/src/scss/theme/_index.scss +1 -1
  242. package/src/scss/theme/color/_defaults.scss +101 -19
  243. package/src/scss/theme/color/_index.scss +18 -18
  244. package/src/scss/theme/color/_variables.scss +73 -65
  245. package/src/scss/theme/typography/_defaults.scss +7 -5
  246. package/src/scss/theme/typography/_index.scss +1 -1
  247. package/src/scss/theme/typography/_variables.scss +62 -58
  248. package/src/scss/utilities/_index.scss +14 -2
  249. package/src/scss/utilities/alignment/_defaults.scss +62 -0
  250. package/src/scss/utilities/alignment/_index.scss +75 -0
  251. package/src/scss/utilities/alignment/_variables.scss +6 -0
  252. package/src/scss/utilities/color/_defaults.scss +35 -0
  253. package/src/scss/utilities/color/_index.scss +91 -0
  254. package/src/scss/utilities/color/_variables.scss +6 -0
  255. package/src/scss/utilities/display/_defaults.scss +32 -0
  256. package/src/scss/utilities/display/_index.scss +61 -0
  257. package/src/scss/utilities/display/_variables.scss +6 -0
  258. package/src/scss/utilities/flex/_defaults.scss +63 -0
  259. package/src/scss/utilities/flex/_index.scss +71 -0
  260. package/src/scss/utilities/flex/_variables.scss +6 -0
  261. package/src/scss/utilities/height/_defaults.scss +41 -0
  262. package/src/scss/utilities/height/_index.scss +98 -0
  263. package/src/scss/utilities/height/_variables.scss +6 -0
  264. package/src/scss/utilities/inset/_defaults.scss +41 -0
  265. package/src/scss/utilities/inset/_index.scss +37 -0
  266. package/src/scss/utilities/inset/_variables.scss +6 -0
  267. package/src/scss/utilities/justification/_defaults.scss +59 -0
  268. package/src/scss/utilities/justification/_index.scss +75 -0
  269. package/src/scss/utilities/justification/_variables.scss +6 -0
  270. package/src/scss/utilities/list/_defaults.scss +39 -0
  271. package/src/scss/utilities/list/_index.scss +56 -0
  272. package/src/scss/utilities/list/_variables.scss +6 -0
  273. package/src/scss/utilities/order/_defaults.scss +22 -0
  274. package/src/scss/utilities/order/_index.scss +63 -0
  275. package/src/scss/utilities/order/_variables.scss +6 -0
  276. package/src/scss/utilities/position/_defaults.scss +26 -0
  277. package/src/scss/utilities/position/_index.scss +37 -0
  278. package/src/scss/utilities/position/_variables.scss +6 -0
  279. package/src/scss/utilities/ratio/_defaults.scss +28 -0
  280. package/src/scss/utilities/ratio/_index.scss +52 -0
  281. package/src/scss/utilities/ratio/_variables.scss +9 -0
  282. package/src/scss/utilities/spacing/_defaults.scss +9 -4
  283. package/src/scss/utilities/spacing/_index.scss +138 -33
  284. package/src/scss/utilities/spacing/_variables.scss +5 -2
  285. package/src/scss/utilities/typography/_defaults.scss +29 -4
  286. package/src/scss/utilities/typography/_index.scss +155 -23
  287. package/src/scss/utilities/typography/_variables.scss +5 -2
  288. package/src/scss/utilities/visibility/_defaults.scss +25 -0
  289. package/src/scss/utilities/visibility/_index.scss +36 -0
  290. package/src/scss/utilities/visibility/_variables.scss +6 -0
  291. package/src/scss/utilities/width/_defaults.scss +41 -0
  292. package/src/scss/utilities/width/_index.scss +98 -0
  293. package/src/scss/utilities/width/_variables.scss +6 -0
  294. package/stylelint.config.js +5 -0
  295. package/vite.config.js +57 -0
  296. package/dist/base/form.css +0 -2
  297. package/dist/base/form.css.map +0 -1
  298. package/dist/base/link.css +0 -2
  299. package/dist/base/link.css.map +0 -1
  300. package/dist/base/table.css +0 -2
  301. package/dist/base/table.css.map +0 -1
  302. package/dist/base.css +0 -2
  303. package/dist/base.css.map +0 -1
  304. package/dist/component/button.css +0 -2
  305. package/dist/component/button.css.map +0 -1
  306. package/dist/component/input-group.css +0 -2
  307. package/dist/component/input-group.css.map +0 -1
  308. package/dist/component/table.css +0 -2
  309. package/dist/component/table.css.map +0 -1
  310. package/dist/component.css +0 -2
  311. package/dist/component.css.map +0 -1
  312. package/dist/graupl.css +0 -2
  313. package/dist/graupl.css.map +0 -1
  314. package/dist/layout/columns.css +0 -2
  315. package/dist/layout/columns.css.map +0 -1
  316. package/dist/layout/container.css +0 -2
  317. package/dist/layout/container.css.map +0 -1
  318. package/dist/layout.css +0 -2
  319. package/dist/layout.css.map +0 -1
  320. package/dist/state/focus.css +0 -2
  321. package/dist/state/focus.css.map +0 -1
  322. package/dist/state.css +0 -2
  323. package/dist/state.css.map +0 -1
  324. package/dist/theme/color.css +0 -2
  325. package/dist/theme/color.css.map +0 -1
  326. package/dist/theme/typography.css +0 -2
  327. package/dist/theme/typography.css.map +0 -1
  328. package/dist/theme.css +0 -2
  329. package/dist/theme.css.map +0 -1
  330. package/dist/utilities/colors.css +0 -2
  331. package/dist/utilities/colors.css.map +0 -1
  332. package/dist/utilities/spacing.css +0 -2
  333. package/dist/utilities/spacing.css.map +0 -1
  334. package/dist/utilities/typography.css +0 -2
  335. package/dist/utilities/typography.css.map +0 -1
  336. package/dist/utilities.css +0 -2
  337. package/dist/utilities.css.map +0 -1
  338. package/scss/component/button.scss +0 -3
  339. package/scss/component/table.scss +0 -3
  340. package/scss/utilities/colors.scss +0 -3
  341. package/src/scss/component/button/_defaults.scss +0 -39
  342. package/src/scss/component/button/_index.scss +0 -98
  343. package/src/scss/component/button/_variables.scss +0 -131
  344. package/src/scss/component/table/_defaults.scss +0 -30
  345. package/src/scss/component/table/_index.scss +0 -77
  346. package/src/scss/component/table/_variables.scss +0 -64
  347. package/src/scss/mixins/_media-queries.scss +0 -26
  348. package/src/scss/utilities/colors/_defaults.scss +0 -5
  349. package/src/scss/utilities/colors/_index.scss +0 -22
  350. package/src/scss/utilities/colors/_variables.scss +0 -3
@@ -0,0 +1,37 @@
1
+ // @graupl/graupl inset utilities styles.
2
+ //
3
+ // Responsive class must be within their own loop to prevent specificity issues.
4
+ // This keeps responsive specificity tied to screen size before property order.
5
+
6
+ @use "../../defaults" as root-defaults;
7
+ @use "../../functions/important";
8
+ @use "../../mixins/layer" as *;
9
+ @use "../../mixins/utility";
10
+ @use "defaults";
11
+ @use "sass:map";
12
+ @use "variables" as *;
13
+
14
+ @include layer(utilities) {
15
+ // For each inset property, create a utility class.
16
+ @each $type, $property in defaults.$inset-properties {
17
+ @each $name, $value in defaults.$inset-values {
18
+ @include utility.create(".#{$type}-#{$name}", $property, $value);
19
+ }
20
+ }
21
+
22
+ @if defaults.$responsive and root-defaults.$responsive-utilities {
23
+ @each $screen-size in map.keys(root-defaults.$screen-sizes) {
24
+ // For each inset property, create a utility class.
25
+ @each $type, $property in defaults.$inset-properties {
26
+ @each $name, $value in defaults.$inset-values {
27
+ @include utility.create(
28
+ ".#{$screen-size}#{root-defaults.$responsive-separator}#{$type}-#{$name}",
29
+ $property,
30
+ $value,
31
+ $screen-size
32
+ );
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,6 @@
1
+ // @graupl/graupl inset 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,59 @@
1
+ // @graupl/graupl justification 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 "sass:map";
10
+
11
+ // Justify content properties.
12
+ $justify-content-class-prefix: "justify-content-" !default;
13
+ $base-justify-content-properties: (
14
+ normal: normal,
15
+ start: flex-start,
16
+ end: flex-end,
17
+ center: center,
18
+ between: space-between,
19
+ around: space-around,
20
+ evenly: space-evenly,
21
+ stretch: stretch,
22
+ );
23
+ $custom-justify-content-properties: () !default;
24
+ $justify-content-properties: map.merge(
25
+ $base-justify-content-properties,
26
+ $custom-justify-content-properties
27
+ );
28
+
29
+ // Justify items properties.
30
+ $justify-items-class-prefix: "justify-items-" !default;
31
+ $base-justify-items-properties: (
32
+ start: start,
33
+ end: end,
34
+ center: center,
35
+ stretch: stretch,
36
+ );
37
+ $custom-justify-items-properties: () !default;
38
+ $justify-items-properties: map.merge(
39
+ $base-justify-items-properties,
40
+ $custom-justify-items-properties
41
+ );
42
+
43
+ // Justify self properties.
44
+ $justify-self-class-prefix: "justify-self-" !default;
45
+ $base-justify-self-properties: (
46
+ auto: auto,
47
+ start: start,
48
+ end: end,
49
+ center: center,
50
+ stretch: stretch,
51
+ );
52
+ $custom-justify-self-properties: () !default;
53
+ $justify-self-properties: map.merge(
54
+ $base-justify-self-properties,
55
+ $custom-justify-self-properties
56
+ );
57
+
58
+ // Responsive utility flag.
59
+ $responsive: false !default;
@@ -0,0 +1,75 @@
1
+ // @graupl/graupl justification utilities styles.
2
+ //
3
+ // Responsive class must be within their own loop to prevent specificity issues.
4
+ // This keeps responsive specificity tied to screen size before property order.
5
+
6
+ @use "../../defaults" as root-defaults;
7
+ @use "../../mixins/layer" as *;
8
+ @use "../../mixins/utility";
9
+ @use "defaults";
10
+ @use "sass:map";
11
+ @use "variables" as *;
12
+
13
+ @include layer(utilities) {
14
+ // For each justify content property, create a utility class.
15
+ @each $name, $value in defaults.$justify-content-properties {
16
+ @include utility.create(
17
+ ".#{defaults.$justify-content-class-prefix}#{$name}",
18
+ justify-content,
19
+ $value
20
+ );
21
+ }
22
+
23
+ // For each justify items property, create a utility class.
24
+ @each $name, $value in defaults.$justify-items-properties {
25
+ @include utility.create(
26
+ ".#{defaults.$justify-items-class-prefix}#{$name}",
27
+ justify-items,
28
+ $value
29
+ );
30
+ }
31
+
32
+ // For each justify self property, create a utility class.
33
+ @each $name, $value in defaults.$justify-self-properties {
34
+ @include utility.create(
35
+ ".#{defaults.$justify-self-class-prefix}#{$name}",
36
+ justify-self,
37
+ $value
38
+ );
39
+ }
40
+
41
+ // Generate responsive utilities.
42
+ @if defaults.$responsive and root-defaults.$responsive-utilities {
43
+ @each $screen-size in map.keys(root-defaults.$screen-sizes) {
44
+ // For each justify content property, create a utility class.
45
+ @each $name, $value in defaults.$justify-content-properties {
46
+ @include utility.create(
47
+ ".#{$screen-size}#{root-defaults.$responsive-separator}#{defaults.$justify-content-class-prefix}#{$name}",
48
+ justify-content,
49
+ $value,
50
+ $screen-size
51
+ );
52
+ }
53
+
54
+ // For each justify items property, create a utility class.
55
+ @each $name, $value in defaults.$justify-items-properties {
56
+ @include utility.create(
57
+ ".#{$screen-size}#{root-defaults.$responsive-separator}#{defaults.$justify-items-class-prefix}#{$name}",
58
+ justify-items,
59
+ $value,
60
+ $screen-size
61
+ );
62
+ }
63
+
64
+ // For each justify self property, create a utility class.
65
+ @each $name, $value in defaults.$justify-self-properties {
66
+ @include utility.create(
67
+ ".#{$screen-size}#{root-defaults.$responsive-separator}#{defaults.$justify-self-class-prefix}#{$name}",
68
+ justify-self,
69
+ $value,
70
+ $screen-size
71
+ );
72
+ }
73
+ }
74
+ }
75
+ }
@@ -0,0 +1,6 @@
1
+ // @graupl/graupl justification 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,39 @@
1
+ // @graupl/graupl list 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 "sass:map";
10
+
11
+ // List style type properties.
12
+ $list-style-type-class-prefix: "list-style-" !default;
13
+ $base-list-style-type-properties: (
14
+ none: none,
15
+ disc: disc,
16
+ decimal: decimal,
17
+ circle: circle,
18
+ square: square,
19
+ );
20
+ $custom-list-style-type-properties: () !default;
21
+ $list-style-type-properties: map.merge(
22
+ $base-list-style-type-properties,
23
+ $custom-list-style-type-properties
24
+ );
25
+
26
+ // List style position properties.
27
+ $list-style-position-class-prefix: "list-style-" !default;
28
+ $base-list-style-position-properties: (
29
+ inside: inside,
30
+ outside: outside,
31
+ );
32
+ $custom-list-style-position-properties: () !default;
33
+ $list-style-position-properties: map.merge(
34
+ $base-list-style-position-properties,
35
+ $custom-list-style-position-properties
36
+ );
37
+
38
+ // Responsive utility flag.
39
+ $responsive: false !default;
@@ -0,0 +1,56 @@
1
+ // @graupl/graupl list utilities styles.
2
+ //
3
+ // Responsive class must be within their own loop to prevent specificity issues.
4
+ // This keeps responsive specificity tied to screen size before property order.
5
+
6
+ @use "../../defaults" as root-defaults;
7
+ @use "../../mixins/layer" as *;
8
+ @use "../../mixins/utility";
9
+ @use "defaults";
10
+ @use "sass:map";
11
+ @use "variables" as *;
12
+
13
+ @include layer(utilities) {
14
+ // For each list style type property, create a utility class.
15
+ @each $name, $property in defaults.$list-style-type-properties {
16
+ @include utility.create(
17
+ ".#{defaults.$list-style-type-class-prefix}#{$name}",
18
+ list-style-type,
19
+ $property
20
+ );
21
+ }
22
+
23
+ // For each list style position property, create a utility class.
24
+ @each $name, $property in defaults.$list-style-position-properties {
25
+ @include utility.create(
26
+ ".#{defaults.$list-style-position-class-prefix}#{$name}",
27
+ list-style-position,
28
+ $property
29
+ );
30
+ }
31
+
32
+ // Generate responsive utilities.
33
+ @if defaults.$responsive and root-defaults.$responsive-utilities {
34
+ @each $screen-size in map.keys(root-defaults.$screen-sizes) {
35
+ // For each list style type property, create a utility class.
36
+ @each $name, $property in defaults.$list-style-type-properties {
37
+ @include utility.create(
38
+ ".#{$screen-size}#{root-defaults.$responsive-separator}#{defaults.$list-style-type-class-prefix}#{$name}",
39
+ list-style-type,
40
+ $property,
41
+ $screen-size
42
+ );
43
+ }
44
+
45
+ // For each list style position property, create a utility class.
46
+ @each $name, $property in defaults.$list-style-position-properties {
47
+ @include utility.create(
48
+ ".#{$screen-size}#{root-defaults.$responsive-separator}#{defaults.$list-style-position-class-prefix}#{$name}",
49
+ list-style-position,
50
+ $property,
51
+ $screen-size
52
+ );
53
+ }
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,6 @@
1
+ // @graupl/graupl list 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,22 @@
1
+ // @graupl/graupl order 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 "sass:map";
10
+
11
+ // Order properties.
12
+ $order-class-prefix: "order-" !default;
13
+ $base-order-properties: (
14
+ "none": 0,
15
+ "first": -9999,
16
+ "last": 9999,
17
+ );
18
+ $custom-order-properties: () !default;
19
+ $order-properties: map.merge($base-order-properties, $custom-order-properties);
20
+
21
+ // Responsive utility flag.
22
+ $responsive: true !default;
@@ -0,0 +1,63 @@
1
+ // @graupl/graupl order utilities styles.
2
+ //
3
+ // Responsive class must be within their own loop to prevent specificity issues.
4
+ // This keeps responsive specificity tied to screen size before property order.
5
+
6
+ @use "../../defaults" as root-defaults;
7
+ @use "../../layout/columns/defaults" as columns-defaults;
8
+ @use "../../layout/flex-columns/defaults" as flex-columns-defaults;
9
+ @use "../../mixins/layer" as *;
10
+ @use "../../mixins/utility";
11
+ @use "defaults";
12
+ @use "sass:map";
13
+ @use "variables" as *;
14
+
15
+ @include layer(utilities) {
16
+ $order-max-count: 0;
17
+
18
+ /* stylelint-disable scss/operator-no-newline-after -- Prettier wants to format it this way. */
19
+ @if (
20
+ columns-defaults.$columns-max-count >
21
+ flex-columns-defaults.$flex-columns-max-count
22
+ ) {
23
+ $order-max-count: columns-defaults.$columns-max-count;
24
+ } @else {
25
+ $order-max-count: flex-columns-defaults.$flex-columns-max-count;
26
+ }
27
+ /* stylelint-enable scss/operator-no-newline-after */
28
+
29
+ @each $order-property, $order-value in defaults.$order-properties {
30
+ @include utility.create(
31
+ ".#{defaults.$order-class-prefix}#{$order-property}",
32
+ order,
33
+ $order-value
34
+ );
35
+ }
36
+
37
+ @for $i from 1 through $order-max-count {
38
+ @include utility.create(".#{defaults.$order-class-prefix}#{$i}", order, $i);
39
+ }
40
+
41
+ // Generate responsive utilities.
42
+ @if defaults.$responsive and root-defaults.$responsive-utilities {
43
+ @each $screen-size in map.keys(root-defaults.$screen-sizes) {
44
+ @each $order-property, $order-value in defaults.$order-properties {
45
+ @include utility.create(
46
+ ".#{$screen-size}#{root-defaults.$responsive-separator}#{defaults.$order-class-prefix}#{$order-property}",
47
+ order,
48
+ $order-value,
49
+ $screen-size
50
+ );
51
+ }
52
+
53
+ @for $i from 1 through $order-max-count {
54
+ @include utility.create(
55
+ ".#{$screen-size}#{root-defaults.$responsive-separator}#{defaults.$order-class-prefix}#{$i}",
56
+ order,
57
+ $i,
58
+ $screen-size
59
+ );
60
+ }
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,6 @@
1
+ // @graupl/graupl order 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,26 @@
1
+ // @graupl/graupl position 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 "sass:map";
10
+
11
+ $position-class-prefix: "position-" !default;
12
+ $base-position-properties: (
13
+ static: static,
14
+ fixed: fixed,
15
+ absolute: absolute,
16
+ relative: relative,
17
+ sticky: sticky,
18
+ );
19
+ $custom-position-properties: () !default;
20
+ $position-properties: map.merge(
21
+ $base-position-properties,
22
+ $custom-position-properties
23
+ );
24
+
25
+ // Responsive utility flag.
26
+ $responsive: false !default;
@@ -0,0 +1,37 @@
1
+ // @graupl/graupl position utilities styles.
2
+ //
3
+ // Responsive class must be within their own loop to prevent specificity issues.
4
+ // This keeps responsive specificity tied to screen size before property order.
5
+
6
+ @use "../../defaults" as root-defaults;
7
+ @use "../../mixins/layer" as *;
8
+ @use "../../mixins/utility";
9
+ @use "defaults";
10
+ @use "sass:map";
11
+ @use "variables" as *;
12
+
13
+ @include layer(utilities) {
14
+ // For each position property, create a utility class.
15
+ @each $name, $property in defaults.$position-properties {
16
+ @include utility.create(
17
+ ".#{defaults.$position-class-prefix}#{$name}",
18
+ position,
19
+ $property
20
+ );
21
+ }
22
+
23
+ // Generate responsive utilities.
24
+ @if defaults.$responsive and root-defaults.$responsive-utilities {
25
+ @each $screen-size in map.keys(root-defaults.$screen-sizes) {
26
+ // For each position property, create a utility class.
27
+ @each $name, $property in defaults.$position-properties {
28
+ @include utility.create(
29
+ ".#{$screen-size}#{root-defaults.$responsive-separator}#{defaults.$position-class-prefix}#{$name}",
30
+ position,
31
+ $property,
32
+ $screen-size
33
+ );
34
+ }
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,6 @@
1
+ // @graupl/graupl position 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,28 @@
1
+ // @graupl/graupl ratio 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 "sass:map";
10
+
11
+ // Ratio utilities.
12
+ $ratio-class: "ratio" !default;
13
+ $ratio-variant-class-prefix: "" !default;
14
+ $force-ratio-class: "force-ratio" !default;
15
+ $base-ratios: (
16
+ "one-by-one": 100%,
17
+ "two-by-one": 50%,
18
+ "four-by-three": 75%,
19
+ "four-by-one": 25%,
20
+ "sixteen-by-nine": calc(9 / 16 * 100%),
21
+ "three-by-two": calc(2 / 3 * 100%),
22
+ "eight-by-five": calc(5 / 8 * 100%),
23
+ );
24
+ $custom-ratios: () !default;
25
+ $ratios: map.merge($base-ratios, $custom-ratios);
26
+
27
+ // Responsive utility flag.
28
+ $responsive: false !default;
@@ -0,0 +1,52 @@
1
+ // @graupl/graupl ratio utilities styles.
2
+ //
3
+ // Responsive class must be within their own loop to prevent specificity issues.
4
+ // This keeps responsive specificity tied to screen size before property order.
5
+
6
+ @use "../../defaults" as root-defaults;
7
+ @use "../../mixins/layer" as *;
8
+ @use "../../mixins/screen";
9
+ @use "../../mixins/utility";
10
+ @use "defaults";
11
+ @use "sass:map";
12
+ @use "variables" as *;
13
+
14
+ @include layer(utilities) {
15
+ .#{defaults.$ratio-class} {
16
+ position: relative;
17
+ width: 100%;
18
+
19
+ &::before {
20
+ content: "";
21
+ display: block;
22
+ padding-top: $ratio;
23
+ }
24
+
25
+ .#{defaults.$force-ratio-class} {
26
+ position: absolute;
27
+ inset: 0;
28
+ width: 100%;
29
+ height: 100%;
30
+ object-fit: cover;
31
+ }
32
+ }
33
+
34
+ @each $ratio-class, $value in defaults.$ratios {
35
+ .#{defaults.$ratio-variant-class-prefix}#{$ratio-class} {
36
+ --#{root-defaults.$prefix}ratio: #{$value};
37
+ }
38
+ }
39
+
40
+ // Generate responsive utilities.
41
+ @if defaults.$responsive and root-defaults.$responsive-utilities {
42
+ @each $screen-size in map.keys(root-defaults.$screen-sizes) {
43
+ @each $ratio-class, $value in defaults.$ratios {
44
+ .#{$screen-size}#{root-defaults.$responsive-separator}#{defaults.$ratio-variant-class-prefix}#{$ratio-class} {
45
+ @include screen.up($screen-size) {
46
+ --#{root-defaults.$prefix}ratio: #{$value};
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,9 @@
1
+ // @graupl/graupl ratio 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";
7
+ @use "../../defaults" as root-defaults;
8
+
9
+ $ratio: var(--#{root-defaults.$prefix}ratio);
@@ -1,8 +1,10 @@
1
- // Default values for Graupl.
1
+ // @graupl/graupl spacing utilities default values.
2
2
  //
3
- // Generally, these should not be used directly when styling components.
4
- // They are mainly used to provide default fallbacks for custom properties
5
- // which can be found in the `variables.scss` file.
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.
6
8
 
7
9
  @use "sass:map";
8
10
 
@@ -42,3 +44,6 @@ $spacing-properties: map.merge(
42
44
  $base-spacing-properties,
43
45
  $custom-spacing-properties
44
46
  );
47
+
48
+ // Responsive utility flag.
49
+ $responsive: true !default;