@graupl/graupl 1.0.0-alpha.11 → 1.0.0-alpha.13

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 (195) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/base/button.css +2 -0
  3. package/dist/base/button.css.map +1 -0
  4. package/dist/base/form.css +1 -1
  5. package/dist/base/form.css.map +1 -1
  6. package/dist/base/link.css +1 -1
  7. package/dist/base/link.css.map +1 -1
  8. package/dist/base/table.css +1 -1
  9. package/dist/base/table.css.map +1 -1
  10. package/dist/base.css +1 -1
  11. package/dist/base.css.map +1 -1
  12. package/dist/component/card.css +2 -0
  13. package/dist/component/card.css.map +1 -0
  14. package/dist/component/input-group.css +1 -1
  15. package/dist/component/input-group.css.map +1 -1
  16. package/dist/component/menu.css +2 -0
  17. package/dist/component/menu.css.map +1 -0
  18. package/dist/component/navigation.css +2 -0
  19. package/dist/component/navigation.css.map +1 -0
  20. package/dist/component.css +1 -1
  21. package/dist/component.css.map +1 -1
  22. package/dist/graupl.css +1 -1
  23. package/dist/graupl.css.map +1 -1
  24. package/dist/init.css +2 -0
  25. package/dist/init.css.map +1 -0
  26. package/dist/layout/columns.css +1 -1
  27. package/dist/layout/columns.css.map +1 -1
  28. package/dist/layout/container.css.map +1 -1
  29. package/dist/layout/flex-columns.css +2 -0
  30. package/dist/layout/flex-columns.css.map +1 -0
  31. package/dist/layout.css +1 -1
  32. package/dist/layout.css.map +1 -1
  33. package/dist/normalize.css +2 -0
  34. package/dist/normalize.css.map +1 -0
  35. package/dist/state/focus.css.map +1 -1
  36. package/dist/state.css.map +1 -1
  37. package/dist/theme/color.css.map +1 -1
  38. package/dist/theme/typography.css +1 -1
  39. package/dist/theme/typography.css.map +1 -1
  40. package/dist/theme.css +1 -1
  41. package/dist/theme.css.map +1 -1
  42. package/dist/utilities/order.css +2 -0
  43. package/dist/utilities/order.css.map +1 -0
  44. package/dist/utilities/spacing.css +1 -1
  45. package/dist/utilities/spacing.css.map +1 -1
  46. package/dist/utilities/typography.css +1 -1
  47. package/dist/utilities/typography.css.map +1 -1
  48. package/dist/utilities.css +1 -1
  49. package/dist/utilities.css.map +1 -1
  50. package/eslint.config.js +1 -0
  51. package/index.html +619 -326
  52. package/package.json +2 -1
  53. package/scss/base/button.scss +3 -0
  54. package/scss/base/form.scss +1 -1
  55. package/scss/base/link.scss +1 -1
  56. package/scss/base/table.scss +1 -1
  57. package/scss/base.scss +1 -1
  58. package/scss/component/card.scss +3 -0
  59. package/scss/component/input-group.scss +1 -1
  60. package/scss/component/menu.scss +3 -0
  61. package/scss/component/navigation.scss +3 -0
  62. package/scss/component.scss +1 -1
  63. package/scss/graupl.scss +1 -3
  64. package/scss/init.scss +3 -0
  65. package/scss/layout/columns.scss +1 -1
  66. package/scss/layout/container.scss +1 -1
  67. package/scss/layout/flex-columns.scss +3 -0
  68. package/scss/layout.scss +1 -1
  69. package/scss/normalize.scss +3 -0
  70. package/scss/state/focus.scss +1 -1
  71. package/scss/state.scss +1 -1
  72. package/scss/theme/color.scss +1 -1
  73. package/scss/theme/typography.scss +1 -1
  74. package/scss/theme.scss +1 -1
  75. package/scss/utilities/alignment.scss +1 -1
  76. package/scss/utilities/color.scss +1 -1
  77. package/scss/utilities/display.scss +1 -1
  78. package/scss/utilities/flex.scss +1 -1
  79. package/scss/utilities/inset.scss +1 -1
  80. package/scss/utilities/justification.scss +1 -1
  81. package/scss/utilities/list.scss +1 -1
  82. package/scss/utilities/order.scss +3 -0
  83. package/scss/utilities/postion.scss +1 -1
  84. package/scss/utilities/spacing.scss +1 -1
  85. package/scss/utilities/typography.scss +1 -1
  86. package/scss/utilities/visibility.scss +1 -1
  87. package/scss/utilities.scss +1 -1
  88. package/src/js/navigation.js +34 -0
  89. package/src/scss/_defaults.scss +21 -5
  90. package/src/scss/_index.scss +4 -3
  91. package/src/scss/_init.scss +2 -2
  92. package/src/scss/_normalize.scss +197 -0
  93. package/src/scss/_variables.scss +4 -1
  94. package/src/scss/base/_index.scss +2 -1
  95. package/src/scss/base/button/_defaults.scss +53 -0
  96. package/src/scss/base/button/_index.scss +210 -0
  97. package/src/scss/{component → base}/button/_variables.scss +51 -12
  98. package/src/scss/base/form/_defaults.scss +14 -4
  99. package/src/scss/base/form/_index.scss +23 -20
  100. package/src/scss/base/form/_variables.scss +12 -1
  101. package/src/scss/base/link/_defaults.scss +48 -5
  102. package/src/scss/base/link/_index.scss +101 -17
  103. package/src/scss/base/link/_variables.scss +226 -5
  104. package/src/scss/base/table/_defaults.scss +49 -4
  105. package/src/scss/base/table/_index.scss +102 -8
  106. package/src/scss/base/table/_variables.scss +71 -1
  107. package/src/scss/component/_index.scss +4 -3
  108. package/src/scss/component/card/_defaults.scss +29 -0
  109. package/src/scss/component/card/_index.scss +143 -0
  110. package/src/scss/component/card/_variables.scss +185 -0
  111. package/src/scss/component/input-group/_defaults.scss +11 -4
  112. package/src/scss/component/input-group/_index.scss +11 -9
  113. package/src/scss/component/input-group/_variables.scss +4 -1
  114. package/src/scss/component/menu/_defaults.scss +65 -0
  115. package/src/scss/component/menu/_index.scss +304 -0
  116. package/src/scss/component/menu/_variables.scss +491 -0
  117. package/src/scss/component/navigation/_defaults.scss +29 -0
  118. package/src/scss/component/navigation/_index.scss +189 -0
  119. package/src/scss/component/navigation/_variables.scss +237 -0
  120. package/src/scss/functions/_important.scss +2 -0
  121. package/src/scss/functions/_theme.scss +18 -0
  122. package/src/scss/layout/_index.scss +2 -1
  123. package/src/scss/layout/columns/_defaults.scss +12 -4
  124. package/src/scss/layout/columns/_index.scss +27 -5
  125. package/src/scss/layout/columns/_variables.scss +4 -1
  126. package/src/scss/layout/container/_defaults.scss +13 -4
  127. package/src/scss/layout/container/_index.scss +12 -7
  128. package/src/scss/layout/container/_variables.scss +4 -1
  129. package/src/scss/layout/flex-columns/_defaults.scss +18 -0
  130. package/src/scss/layout/flex-columns/_index.scss +77 -0
  131. package/src/scss/layout/flex-columns/_variables.scss +26 -0
  132. package/src/scss/mixins/_layer.scss +1 -1
  133. package/src/scss/mixins/_media-queries.scss +10 -1
  134. package/src/scss/state/_index.scss +1 -1
  135. package/src/scss/state/focus/_defaults.scss +6 -4
  136. package/src/scss/state/focus/_index.scss +1 -1
  137. package/src/scss/state/focus/_variables.scss +4 -1
  138. package/src/scss/theme/_index.scss +1 -1
  139. package/src/scss/theme/color/_defaults.scss +6 -4
  140. package/src/scss/theme/color/_index.scss +1 -1
  141. package/src/scss/theme/color/_variables.scss +4 -1
  142. package/src/scss/theme/typography/_defaults.scss +7 -5
  143. package/src/scss/theme/typography/_index.scss +1 -1
  144. package/src/scss/theme/typography/_variables.scss +9 -3
  145. package/src/scss/utilities/_index.scss +3 -1
  146. package/src/scss/utilities/alignment/_defaults.scss +6 -4
  147. package/src/scss/utilities/alignment/_index.scss +1 -1
  148. package/src/scss/utilities/alignment/_variables.scss +4 -1
  149. package/src/scss/utilities/color/_defaults.scss +6 -4
  150. package/src/scss/utilities/color/_index.scss +1 -1
  151. package/src/scss/utilities/color/_variables.scss +4 -1
  152. package/src/scss/utilities/display/_defaults.scss +6 -4
  153. package/src/scss/utilities/display/_index.scss +1 -1
  154. package/src/scss/utilities/display/_variables.scss +4 -1
  155. package/src/scss/utilities/flex/_defaults.scss +6 -4
  156. package/src/scss/utilities/flex/_index.scss +1 -1
  157. package/src/scss/utilities/flex/_variables.scss +4 -1
  158. package/src/scss/utilities/inset/_defaults.scss +6 -4
  159. package/src/scss/utilities/inset/_index.scss +1 -1
  160. package/src/scss/utilities/inset/_variables.scss +4 -1
  161. package/src/scss/utilities/justification/_defaults.scss +6 -4
  162. package/src/scss/utilities/justification/_index.scss +1 -1
  163. package/src/scss/utilities/justification/_variables.scss +4 -1
  164. package/src/scss/utilities/list/_defaults.scss +6 -4
  165. package/src/scss/utilities/list/_index.scss +1 -1
  166. package/src/scss/utilities/list/_variables.scss +4 -1
  167. package/src/scss/utilities/order/_defaults.scss +19 -0
  168. package/src/scss/utilities/order/_index.scss +35 -0
  169. package/src/scss/utilities/order/_variables.scss +6 -0
  170. package/src/scss/utilities/position/_defaults.scss +6 -4
  171. package/src/scss/utilities/position/_index.scss +1 -1
  172. package/src/scss/utilities/position/_variables.scss +4 -1
  173. package/src/scss/utilities/ratio/_defaults.scss +24 -0
  174. package/src/scss/utilities/ratio/_index.scss +26 -0
  175. package/src/scss/utilities/ratio/_variables.scss +9 -0
  176. package/src/scss/utilities/spacing/_defaults.scss +6 -4
  177. package/src/scss/utilities/spacing/_index.scss +41 -17
  178. package/src/scss/utilities/spacing/_variables.scss +4 -1
  179. package/src/scss/utilities/typography/_defaults.scss +6 -4
  180. package/src/scss/utilities/typography/_index.scss +1 -1
  181. package/src/scss/utilities/typography/_variables.scss +4 -1
  182. package/src/scss/utilities/visibility/_defaults.scss +6 -4
  183. package/src/scss/utilities/visibility/_index.scss +1 -1
  184. package/src/scss/utilities/visibility/_variables.scss +4 -1
  185. package/dist/component/button.css +0 -2
  186. package/dist/component/button.css.map +0 -1
  187. package/dist/component/table.css +0 -2
  188. package/dist/component/table.css.map +0 -1
  189. package/scss/component/button.scss +0 -3
  190. package/scss/component/table.scss +0 -3
  191. package/src/scss/component/button/_defaults.scss +0 -39
  192. package/src/scss/component/button/_index.scss +0 -134
  193. package/src/scss/component/table/_defaults.scss +0 -30
  194. package/src/scss/component/table/_index.scss +0 -77
  195. package/src/scss/component/table/_variables.scss +0 -64
@@ -1,4 +1,4 @@
1
- // Color theme styles.
1
+ // @gruapl/graupl color theme styles.
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "../../mixins/layer" as *;
@@ -1,4 +1,7 @@
1
- // Variables referencing custom properties.
1
+ // @graupl/graupl color theme variables.
2
+ //
3
+ // These values are to be used to directly style components and provide a
4
+ // cleaner way to reference custom properties.
2
5
 
3
6
  @use "defaults";
4
7
  @use "../../defaults" as root-defaults;
@@ -1,13 +1,15 @@
1
- // Default values for Graupl.
1
+ // @graupl/graupl typography theme 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
 
9
11
  // font properties.
10
- $font-size: 1rem !default;
12
+ $font-size-base: 1rem !default;
11
13
  $root-font-size: clamp(0.85rem, calc(0.8rem + 0.5vw), 1.25rem) !default;
12
14
  $line-height: 1.2em !default;
13
15
 
@@ -1,4 +1,4 @@
1
- // Typography theme styles.
1
+ // @gruapl/graupl typography theme styles.
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "../../mixins/layer" as *;
@@ -1,4 +1,7 @@
1
- // Variables referencing custom properties.
1
+ // @graupl/graupl typography theme variables.
2
+ //
3
+ // These values are to be used to directly style components and provide a
4
+ // cleaner way to reference custom properties.
2
5
 
3
6
  @use "defaults";
4
7
  @use "../../defaults" as root-defaults;
@@ -6,7 +9,10 @@
6
9
  @use "sass:map";
7
10
 
8
11
  // Font properties.
9
- $font-size: var(--#{root-defaults.$prefix}-font-base, #{defaults.$font-size});
12
+ $font-size-base: var(
13
+ --#{root-defaults.$prefix}-font-size-base,
14
+ #{defaults.$font-size-base}
15
+ );
10
16
  $line-height: var(
11
17
  --#{root-defaults.$prefix}-line-height,
12
18
  #{defaults.$line-height}
@@ -18,7 +24,7 @@ $font-sizes: ();
18
24
  @each $key, $value in defaults.$font-size-multipliers {
19
25
  $size: var(
20
26
  --#{root-defaults.$prefix}-font-#{$key},
21
- calc(#{$value} * #{$font-size})
27
+ calc(#{$value} * #{$font-size-base})
22
28
  );
23
29
  $font-sizes: map.set($font-sizes, $key, $size);
24
30
  }
@@ -1,4 +1,4 @@
1
- // Graupl utilities.
1
+ // @gruapl/graupl utilities styles.
2
2
 
3
3
  @forward "alignment";
4
4
  @forward "color";
@@ -7,7 +7,9 @@
7
7
  @forward "inset";
8
8
  @forward "justification";
9
9
  @forward "list";
10
+ @forward "order";
10
11
  @forward "position";
12
+ @forward "ratio";
11
13
  @forward "spacing";
12
14
  @forward "typography";
13
15
  @forward "visibility";
@@ -1,8 +1,10 @@
1
- // Default values for Graupl.
1
+ // @graupl/graupl alignment 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
 
@@ -1,4 +1,4 @@
1
- // Graupl alignment utilities.
1
+ // @gruapl/graupl alignment utilities styles.
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "defaults" as defaults;
@@ -1,3 +1,6 @@
1
- // Variables referencing custom properties.
1
+ // @graupl/graupl alignment utilities variables.
2
+ //
3
+ // These values are to be used to directly style components and provide a
4
+ // cleaner way to reference custom properties.
2
5
 
3
6
  @forward "defaults";
@@ -1,8 +1,10 @@
1
- // Default values for Graupl.
1
+ // @graupl/graupl color 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
 
@@ -1,4 +1,4 @@
1
- // Graupl color utilities.
1
+ // @gruapl/graupl color utilities styles.
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "defaults";
@@ -1,3 +1,6 @@
1
- // Variables referencing custom properties.
1
+ // @graupl/graupl color utilities variables.
2
+ //
3
+ // These values are to be used to directly style components and provide a
4
+ // cleaner way to reference custom properties.
2
5
 
3
6
  @forward "defaults";
@@ -1,8 +1,10 @@
1
- // Default values for Graupl.
1
+ // @graupl/graupl display 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
 
@@ -1,4 +1,4 @@
1
- // Graupl display utilities.
1
+ // @gruapl/graupl display utilities styles.
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "defaults" as defaults;
@@ -1,3 +1,6 @@
1
- // Variables referencing custom properties.
1
+ // @graupl/graupl display utilities variables.
2
+ //
3
+ // These values are to be used to directly style components and provide a
4
+ // cleaner way to reference custom properties.
2
5
 
3
6
  @forward "defaults";
@@ -1,8 +1,10 @@
1
- // Default values for Graupl.
1
+ // @graupl/graupl flex 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
 
@@ -1,4 +1,4 @@
1
- // Graupl flex utilities.
1
+ // @gruapl/graupl flex utilities styles.
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "defaults" as defaults;
@@ -1,3 +1,6 @@
1
- // Variables referencing custom properties.
1
+ // @graupl/graupl flex utilities variables.
2
+ //
3
+ // These values are to be used to directly style components and provide a
4
+ // cleaner way to reference custom properties.
2
5
 
3
6
  @forward "defaults";
@@ -1,8 +1,10 @@
1
- // Default values for Graupl.
1
+ // @graupl/graupl inset 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
 
@@ -1,4 +1,4 @@
1
- // Graupl inset utilities.
1
+ // @gruapl/graupl inset utilities styles.
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "defaults" as defaults;
@@ -1,3 +1,6 @@
1
- // Variables referencing custom properties.
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.
2
5
 
3
6
  @forward "defaults";
@@ -1,8 +1,10 @@
1
- // Default values for Graupl.
1
+ // @graupl/graupl justification 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
 
@@ -1,4 +1,4 @@
1
- // Graupl justification utilities.
1
+ // @gruapl/graupl justification utilities styles.
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "defaults" as defaults;
@@ -1,3 +1,6 @@
1
- // Variables referencing custom properties.
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.
2
5
 
3
6
  @forward "defaults";
@@ -1,8 +1,10 @@
1
- // Default values for Graupl.
1
+ // @graupl/graupl list 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
 
@@ -1,4 +1,4 @@
1
- // Graupl visibility utilities.
1
+ // @gruapl/graupl list utilities styles.
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "defaults" as defaults;
@@ -1,3 +1,6 @@
1
- // Variables referencing custom properties.
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.
2
5
 
3
6
  @forward "defaults";
@@ -0,0 +1,19 @@
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);
@@ -0,0 +1,35 @@
1
+ // @gruapl/graupl order utilities styles.
2
+
3
+ @use "variables" as *;
4
+ @use "defaults" as defaults;
5
+ @use "../../layout/columns/defaults" as columns-defaults;
6
+ @use "../../layout/flex-columns/defaults" as flex-columns-defaults;
7
+ @use "../../mixins/layer" as *;
8
+ @use "../../functions/important";
9
+
10
+ @include layer(utilities) {
11
+ @each $order-property, $order-value in $order-properties {
12
+ .#{$order-class-prefix}#{$order-property} {
13
+ order: $order-value;
14
+ }
15
+ }
16
+
17
+ $order-max-count: 0;
18
+
19
+ /* stylelint-disable scss/operator-no-newline-after -- Prettier wants to format it this way. */
20
+ @if (
21
+ columns-defaults.$columns-max-count >
22
+ flex-columns-defaults.$flex-columns-max-count
23
+ ) {
24
+ $order-max-count: columns-defaults.$columns-max-count;
25
+ } @else {
26
+ $order-max-count: flex-columns-defaults.$flex-columns-max-count;
27
+ }
28
+ /* stylelint-enable scss/operator-no-newline-after */
29
+
30
+ @for $i from 1 through $order-max-count {
31
+ .#{$order-class-prefix}#{$i} {
32
+ order: $i;
33
+ }
34
+ }
35
+ }
@@ -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
+ @forward "defaults";
@@ -1,8 +1,10 @@
1
- // Default values for Graupl.
1
+ // @graupl/graupl position 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
 
@@ -1,4 +1,4 @@
1
- // Graupl position utilities.
1
+ // @gruapl/graupl position utilities styles.
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "defaults" as defaults;
@@ -1,3 +1,6 @@
1
- // Variables referencing custom properties.
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.
2
5
 
3
6
  @forward "defaults";
@@ -0,0 +1,24 @@
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-selector: ".ratio" !default;
13
+ $ratio-variant-selector-prefix: "." !default;
14
+ $base-ratios: (
15
+ "one-by-one": 100%,
16
+ "two-by-one": 50%,
17
+ "four-by-three": 75%,
18
+ "four-by-one": 25%,
19
+ "sixteen-by-nine": calc(9 / 16 * 100%),
20
+ "three-by-two": calc(2 / 3 * 100%),
21
+ "eight-by-five": calc(5 / 8 * 100%),
22
+ );
23
+ $custom-ratios: () !default;
24
+ $ratios: map.merge($base-ratios, $custom-ratios);
@@ -0,0 +1,26 @@
1
+ // @gruapl/graupl ratio utilities styles.
2
+
3
+ @use "variables" as *;
4
+ @use "defaults" as defaults;
5
+ @use "../../defaults" as root-defaults;
6
+ @use "../../mixins/layer" as *;
7
+ @use "../../functions/important";
8
+
9
+ @include layer(utilities) {
10
+ #{defaults.$ratio-selector} {
11
+ position: relative;
12
+ width: 100%;
13
+
14
+ &::before {
15
+ content: "";
16
+ display: block;
17
+ padding-top: $ratio;
18
+ }
19
+ }
20
+
21
+ @each $ratio-selector, $value in defaults.$ratios {
22
+ #{defaults.$ratio-variant-selector-prefix}#{$ratio-selector} {
23
+ --#{root-defaults.$prefix}-ratio: #{$value};
24
+ }
25
+ }
26
+ }
@@ -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
 
@@ -1,4 +1,4 @@
1
- // Graupl spacing utilities.
1
+ // @gruapl/graupl spacing utilities styles.
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "defaults" as defaults;
@@ -6,16 +6,18 @@
6
6
  @use "../../functions/important";
7
7
  @use "../../variables" as root-variables;
8
8
  @use "../../defaults" as root-defaults;
9
+ @use "../../layout/columns/defaults" as columns-defaults;
10
+ @use "../../layout/flex-columns/defaults" as flex-columns-defaults;
9
11
 
10
12
  @include layer(utilities) {
11
13
  // For each spacing property, create a utility class.
12
14
  @each $name, $property in defaults.$spacing-properties {
13
15
  @each $key, $value in root-variables.$spacers {
14
16
  .#{$name}-#{$key} {
15
- // If we're dealing with gap, column-gap, or row-gap inside of .columns, we should update
17
+ // If we're dealing with gap, column-gap, or row-gap inside of #{columns-defaults.$columns-selector}, we should update
16
18
  // the columns-column-gap property instead of the raw property.
17
19
  @if $name == "g" {
18
- &.columns {
20
+ &#{columns-defaults.$columns-selector} {
19
21
  --#{root-defaults.$prefix}-columns-column-gap: #{important.insert(
20
22
  $value
21
23
  )};
@@ -24,34 +26,49 @@
24
26
  )};
25
27
  }
26
28
 
27
- &:not(.columns) {
28
- @each $prop in $property {
29
- #{$prop}: important.insert($value);
30
- }
29
+ &#{flex-columns-defaults.$flex-columns-selector} {
30
+ --#{root-defaults.$prefix}-flex-columns-column-gap: #{important.insert(
31
+ $value
32
+ )};
33
+ --#{root-defaults.$prefix}-flex-columns-row-gap: #{important.insert(
34
+ $value
35
+ )};
36
+ }
37
+
38
+ @each $prop in $property {
39
+ #{$prop}: important.insert($value);
31
40
  }
32
41
  } @else if $name == "cg" {
33
- &.columns {
42
+ &#{columns-defaults.$columns-selector} {
34
43
  --#{root-defaults.$prefix}-columns-column-gap: #{important.insert(
35
44
  $value
36
45
  )};
37
46
  }
38
47
 
39
- &:not(.columns) {
40
- @each $prop in $property {
41
- #{$prop}: important.insert($value);
42
- }
48
+ &#{flex-columns-defaults.$flex-columns-selector} {
49
+ --#{root-defaults.$prefix}-flex-columns-column-gap: #{important.insert(
50
+ $value
51
+ )};
52
+ }
53
+
54
+ @each $prop in $property {
55
+ #{$prop}: important.insert($value);
43
56
  }
44
57
  } @else if $name == "rg" {
45
- &.columns {
58
+ &#{columns-defaults.$columns-selector} {
46
59
  --#{root-defaults.$prefix}-columns-row-gap: #{important.insert(
47
60
  $value
48
61
  )};
49
62
  }
50
63
 
51
- &:not(.columns) {
52
- @each $prop in $property {
53
- #{$prop}: important.insert($value);
54
- }
64
+ &#{flex-columns-defaults.$flex-columns-selector} {
65
+ --#{root-defaults.$prefix}-flex-columns-row-gap: #{important.insert(
66
+ $value
67
+ )};
68
+ }
69
+
70
+ @each $prop in $property {
71
+ #{$prop}: important.insert($value);
55
72
  }
56
73
  } @else {
57
74
  @each $prop in $property {
@@ -60,5 +77,12 @@
60
77
  }
61
78
  }
62
79
  }
80
+
81
+ // Create the "auto" utility class.
82
+ .#{$name}-auto {
83
+ @each $prop in $property {
84
+ #{$prop}: important.insert(auto);
85
+ }
86
+ }
63
87
  }
64
88
  }
@@ -1,3 +1,6 @@
1
- // Variables referencing custom properties.
1
+ // @graupl/graupl spacing utilities variables.
2
+ //
3
+ // These values are to be used to directly style components and provide a
4
+ // cleaner way to reference custom properties.
2
5
 
3
6
  @forward "defaults";
@@ -1,8 +1,10 @@
1
- // Default values for Graupl.
1
+ // @graupl/graupl typography 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
 
@@ -1,4 +1,4 @@
1
- // Graupl typography utilities.
1
+ // @gruapl/graupl typography utilities styles.
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "defaults";