@oardi/css-utils 0.129.1 → 0.131.0

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.
@@ -1,7 +1,57 @@
1
1
  {
2
2
  "package": "@oardi/css-utils",
3
- "version": "0.129.1",
3
+ "version": "0.131.0",
4
4
  "breakpoints": { "sm": "576px", "md": "768px", "lg": "992px", "xl": "1200px", "xxl": "1400px" },
5
+ "lifecycle": {
6
+ "deprecated": [
7
+ {
8
+ "pattern": "lh-{value}",
9
+ "values": ["xs", "sm", "md", "lg", "xl", "xxl", "xxxl"],
10
+ "deprecatedIn": "0.123.0",
11
+ "plannedRemoval": "next major release",
12
+ "replacements": {
13
+ "lh-xs": "line-height-none",
14
+ "lh-sm": "line-height-tight",
15
+ "lh-md": "line-height-snug",
16
+ "lh-lg": "line-height-normal",
17
+ "lh-xl": "line-height-relaxed",
18
+ "lh-xxl": "line-height-loose",
19
+ "lh-xxxl": "line-height-extra-loose"
20
+ }
21
+ },
22
+ {
23
+ "pattern": "letter-space-{value}",
24
+ "values": ["0", "1", "2", "3", "4", "5"],
25
+ "deprecatedIn": "0.130.0",
26
+ "plannedRemoval": "next major release",
27
+ "replacement": "letter-spacing-{effect}",
28
+ "note": "Choose an effect intentionally; the relative scale is not a visual alias for the pixel scale."
29
+ }
30
+ ],
31
+ "removed": [
32
+ {
33
+ "pattern": "active",
34
+ "deprecatedIn": "0.53.0",
35
+ "removedIn": "0.60.0",
36
+ "replacement": "is-active",
37
+ "note": "This was a component state class."
38
+ },
39
+ {
40
+ "pattern": "bg-{value}-light",
41
+ "values": ["primary", "secondary", "success", "warning", "error", "white", "black"],
42
+ "removedIn": "0.37.0",
43
+ "replacement": "bg-{value}",
44
+ "note": "Use current background and opacity utilities; no exact visual alias is guaranteed."
45
+ },
46
+ {
47
+ "pattern": "bg-{value}-dark",
48
+ "values": ["primary", "secondary", "success", "warning", "error", "white", "black"],
49
+ "removedIn": "0.37.0",
50
+ "replacement": "bg-{value}",
51
+ "note": "Use current background and opacity utilities; no exact visual alias is guaranteed."
52
+ }
53
+ ]
54
+ },
5
55
  "utilities": {
6
56
  "Display": {
7
57
  "families": [
@@ -21,6 +71,10 @@
21
71
  "Text / colors": {
22
72
  "families": [
23
73
  { "patterns": ["letter-space-{value}"], "values": ["0", "1", "2", "3", "4", "5"] },
74
+ {
75
+ "patterns": ["letter-spacing-{value}"],
76
+ "values": ["normal", "tight", "wide", "wider", "widest"]
77
+ },
24
78
  {
25
79
  "patterns": ["lh-{value}"],
26
80
  "values": ["lg", "md", "sm", "xl", "xs", "xxl", "xxxl"]
@@ -199,12 +253,30 @@
199
253
  "Grid": {
200
254
  "families": [
201
255
  {
202
- "patterns": ["col-{breakpoint}-{value}", "col-{value}"],
256
+ "patterns": [
257
+ "col-end-{breakpoint}-{value}",
258
+ "col-end-{value}",
259
+ "col-start-{breakpoint}-{value}",
260
+ "col-start-{value}"
261
+ ],
262
+ "values": ["1", "10", "11", "12", "13", "2", "3", "4", "5", "6", "7", "8", "9"]
263
+ },
264
+ {
265
+ "patterns": ["col-offset-{breakpoint}-{value}", "col-offset-{value}"],
266
+ "values": ["0", "1", "10", "11", "2", "3", "4", "5", "6", "7", "8", "9"]
267
+ },
268
+ {
269
+ "patterns": [
270
+ "col-{breakpoint}-{value}",
271
+ "col-{value}",
272
+ "row-span-{breakpoint}-{value}",
273
+ "row-span-{value}"
274
+ ],
203
275
  "values": ["1", "10", "11", "12", "2", "3", "4", "5", "6", "7", "8", "9"]
204
276
  }
205
277
  ],
206
278
  "patterns": [],
207
- "classes": ["col", "grid"]
279
+ "classes": ["col", "grid", "grid-auto-fit"]
208
280
  },
209
281
  "Gap": {
210
282
  "families": [
@@ -3,7 +3,7 @@
3
3
  > Generated automatically. Do not edit manually.
4
4
 
5
5
  - Package: `@oardi/css-utils`
6
- - Version: `0.129.1`
6
+ - Version: `0.131.0`
7
7
  - Source: public SCSS entry point and utility configuration
8
8
 
9
9
  ## Usage guidance
@@ -14,6 +14,55 @@ Use `@oardi/css-utils` as the primary styling system. Check this reference befor
14
14
 
15
15
  `{breakpoint}` means one of `sm` (576px), `md` (768px), `lg` (992px), `xl` (1200px), `xxl` (1400px). Variants apply from that breakpoint upward. `{value}` means one of the values listed beside its pattern. Decimal spacing classes use a literal dot, for example `m-0.5`.
16
16
 
17
+ ## Class lifecycle
18
+
19
+ Deprecated classes are still emitted and remain listed in the current API groups. Removed classes are historical migration aids and are not emitted by the current package.
20
+
21
+ ### Deprecated
22
+
23
+ - `lh-{value}`
24
+ - Values: `xs` | `sm` | `md` | `lg` | `xl` | `xxl` | `xxxl`
25
+ - Deprecated in: `0.123.0`
26
+ - Planned removal: next major release
27
+ - Replacements:
28
+ - `lh-xs` -> `line-height-none`
29
+ - `lh-sm` -> `line-height-tight`
30
+ - `lh-md` -> `line-height-snug`
31
+ - `lh-lg` -> `line-height-normal`
32
+ - `lh-xl` -> `line-height-relaxed`
33
+ - `lh-xxl` -> `line-height-loose`
34
+ - `lh-xxxl` -> `line-height-extra-loose`
35
+
36
+ - `letter-space-{value}`
37
+ - Values: `0` | `1` | `2` | `3` | `4` | `5`
38
+ - Deprecated in: `0.130.0`
39
+ - Planned removal: next major release
40
+ - Replacement: `letter-spacing-{effect}`
41
+ - Note: Choose an effect intentionally; the relative scale is not a visual alias for the pixel scale.
42
+
43
+ ### Removed
44
+
45
+ - `active`
46
+ - Deprecated in: `0.53.0`
47
+ - Removed in: `0.60.0`
48
+ - Replacement: `is-active`
49
+ - Note: This was a component state class.
50
+ - Availability: not emitted by the current package
51
+
52
+ - `bg-{value}-light`
53
+ - Values: `primary` | `secondary` | `success` | `warning` | `error` | `white` | `black`
54
+ - Removed in: `0.37.0`
55
+ - Replacement: `bg-{value}`
56
+ - Note: Use current background and opacity utilities; no exact visual alias is guaranteed.
57
+ - Availability: not emitted by the current package
58
+
59
+ - `bg-{value}-dark`
60
+ - Values: `primary` | `secondary` | `success` | `warning` | `error` | `white` | `black`
61
+ - Removed in: `0.37.0`
62
+ - Replacement: `bg-{value}`
63
+ - Note: Use current background and opacity utilities; no exact visual alias is guaranteed.
64
+ - Availability: not emitted by the current package
65
+
17
66
  ## Display
18
67
 
19
68
  Values: `block` | `flex` | `inline` | `none`
@@ -48,6 +97,10 @@ Values: `0` | `1` | `2` | `3` | `4` | `5`
48
97
 
49
98
  - `letter-space-{value}`
50
99
 
100
+ Values: `normal` | `tight` | `wide` | `wider` | `widest`
101
+
102
+ - `letter-spacing-{value}`
103
+
51
104
  Values: `lg` | `md` | `sm` | `xl` | `xs` | `xxl` | `xxxl`
52
105
 
53
106
  - `lh-{value}`
@@ -162,15 +215,30 @@ Classes:
162
215
 
163
216
  ## Grid
164
217
 
218
+ Values: `1` | `10` | `11` | `12` | `13` | `2` | `3` | `4` | `5` | `6` | `7` | `8` | `9`
219
+
220
+ - `col-end-{breakpoint}-{value}`
221
+ - `col-end-{value}`
222
+ - `col-start-{breakpoint}-{value}`
223
+ - `col-start-{value}`
224
+
225
+ Values: `0` | `1` | `10` | `11` | `2` | `3` | `4` | `5` | `6` | `7` | `8` | `9`
226
+
227
+ - `col-offset-{breakpoint}-{value}`
228
+ - `col-offset-{value}`
229
+
165
230
  Values: `1` | `10` | `11` | `12` | `2` | `3` | `4` | `5` | `6` | `7` | `8` | `9`
166
231
 
167
232
  - `col-{breakpoint}-{value}`
168
233
  - `col-{value}`
234
+ - `row-span-{breakpoint}-{value}`
235
+ - `row-span-{value}`
169
236
 
170
237
  Classes:
171
238
 
172
239
  - `col`
173
240
  - `grid`
241
+ - `grid-auto-fit`
174
242
 
175
243
  ## Gap
176
244
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oardi/css-utils",
3
- "version": "0.129.1",
3
+ "version": "0.131.0",
4
4
  "author": "Ardian Shala",
5
5
  "homepage": "https://css-utils.oardi.com",
6
6
  "description": "Powerful set of semantic css classes with support for breakpoints, directions and spacings",
@@ -9,7 +9,31 @@
9
9
  @media (min-width: #{$bp-value}) {
10
10
  @for $i from 1 through 12 {
11
11
  .col-#{$bp}-#{$i} {
12
- grid-column: span $i;
12
+ grid-column: span $i / span $i;
13
+ }
14
+
15
+ .row-span-#{$bp}-#{$i} {
16
+ grid-row: span $i;
17
+ }
18
+ }
19
+
20
+ @for $i from 1 through 13 {
21
+ .col-start-#{$bp}-#{$i} {
22
+ grid-column-start: $i;
23
+ }
24
+
25
+ .col-end-#{$bp}-#{$i} {
26
+ grid-column-end: $i;
27
+ }
28
+ }
29
+
30
+ .col-offset-#{$bp}-0 {
31
+ grid-column-start: auto;
32
+ }
33
+
34
+ @for $i from 1 through 11 {
35
+ .col-offset-#{$bp}-#{$i} {
36
+ grid-column-start: $i + 1;
13
37
  }
14
38
  }
15
39
  }
package/scss/grid.scss CHANGED
@@ -3,6 +3,7 @@
3
3
  @layer utilities.grid {
4
4
  .grid {
5
5
  --grid-gap: var(--spacer-3);
6
+ --grid-min-column-width: 16rem;
6
7
 
7
8
  display: grid;
8
9
  grid-template-columns: repeat(12, minmax(0, 1fr));
@@ -10,13 +11,44 @@
10
11
  gap: var(--grid-gap);
11
12
  }
12
13
 
14
+ .grid-auto-fit {
15
+ grid-template-columns: repeat(
16
+ auto-fit,
17
+ minmax(min(100%, var(--grid-min-column-width)), 1fr)
18
+ );
19
+ }
20
+
13
21
  .col {
14
- grid-column: span 12;
22
+ grid-column: span 12 / span 12;
15
23
  }
16
24
 
17
25
  @for $i from 1 through 12 {
18
26
  .col-#{$i} {
19
- grid-column: span $i;
27
+ grid-column: span $i / span $i;
28
+ }
29
+
30
+ .row-span-#{$i} {
31
+ grid-row: span $i;
32
+ }
33
+ }
34
+
35
+ @for $i from 1 through 13 {
36
+ .col-start-#{$i} {
37
+ grid-column-start: $i;
38
+ }
39
+
40
+ .col-end-#{$i} {
41
+ grid-column-end: $i;
42
+ }
43
+ }
44
+
45
+ .col-offset-0 {
46
+ grid-column-start: auto;
47
+ }
48
+
49
+ @for $i from 1 through 11 {
50
+ .col-offset-#{$i} {
51
+ grid-column-start: $i + 1;
20
52
  }
21
53
  }
22
54
  }
package/scss/text.scss CHANGED
@@ -2,6 +2,7 @@
2
2
  @use './layers.scss';
3
3
  @use './theme.scss' as theme;
4
4
 
5
+ // Deprecated: retained for the existing pixel-based utilities.
5
6
  $letterSpacings: 0, 1, 2, 3, 4, 5;
6
7
 
7
8
  @layer utilities {
@@ -99,6 +100,13 @@ $letterSpacings: 0, 1, 2, 3, 4, 5;
99
100
  }
100
101
  }
101
102
 
103
+ @each $name, $value in map.get(theme.$theme, letterSpacings) {
104
+ .letter-spacing-#{$name} {
105
+ letter-spacing: var(--letter-spacing-#{$name});
106
+ }
107
+ }
108
+
109
+ // Deprecated: use .letter-spacing-* utilities instead.
102
110
  @each $letterSpacing in $letterSpacings {
103
111
  .letter-space-#{$letterSpacing} {
104
112
  letter-spacing: #{$letterSpacing}px;
package/scss/theme.scss CHANGED
@@ -189,6 +189,14 @@ $line-height-effect-names: (
189
189
  extra-loose: xxxl,
190
190
  );
191
191
 
192
+ $-letter-spacings: (
193
+ tight: -0.025em,
194
+ normal: 0,
195
+ wide: 0.025em,
196
+ wider: 0.05em,
197
+ widest: 0.1em,
198
+ );
199
+
192
200
  $-font-sizes: (
193
201
  xs: 0.75rem,
194
202
  sm: 0.875rem,
@@ -209,6 +217,7 @@ $default-theme: (
209
217
  zIndexLevels: $-z-index-levels,
210
218
  breakpoints: $-breakpoints,
211
219
  lineHeights: $-line-heights,
220
+ letterSpacings: $-letter-spacings,
212
221
  fontSizes: $-font-sizes,
213
222
  );
214
223
 
@@ -41,6 +41,10 @@
41
41
  --line-height-#{$name}: #{$value};
42
42
  }
43
43
 
44
+ @each $name, $value in map.get(theme.$theme, letterSpacings) {
45
+ --letter-spacing-#{$name}: #{$value};
46
+ }
47
+
44
48
  --font-size: 16px;
45
49
  @each $name, $value in map.get(theme.$theme, fontSizes) {
46
50
  --font-size-#{$name}: #{$value};