@uncinq/component-tokens 1.8.1 → 1.9.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.
package/README.md CHANGED
@@ -20,7 +20,7 @@ Where primitive and semantic tokens are provided by [@uncinq/design-tokens](http
20
20
  --color-brand: var(--color-indigo-600);
21
21
 
22
22
  /* component token from @uncinq/component-tokens */
23
- --btn-background-color: var(--color-brand);
23
+ --btn-color-background: var(--color-brand);
24
24
  ```
25
25
 
26
26
  A component token answers: **"which semantic value does this part of this component use?"**
@@ -31,13 +31,13 @@ A component token answers: **"which semantic value does this part of this compon
31
31
 
32
32
  All component tokens follow the pattern: `--{component}-{property}-{sub-property?}-{state?}`
33
33
 
34
- The property mirrors the CSS property name, so the token reads the same way as the CSS declaration it controls.
34
+ The property mirrors the CSS property name, so the token reads the same way as the CSS declaration it controls — colors excepted, where `color` leads and the role follows (see the rules below).
35
35
 
36
36
  ```text
37
37
  --{component} --btn
38
- -{property} --btn-background-color
39
- -{sub-property} --btn-text-decoration-color
40
- -{state} --btn-background-color-hover
38
+ -{property} --btn-padding-inline
39
+ -{sub-property} --btn-color-text-decoration
40
+ -{state} --btn-color-background-hover
41
41
  ```
42
42
 
43
43
  ### Rules
@@ -61,7 +61,7 @@ The property mirrors the CSS property name, so the token reads the same way as t
61
61
  ```css
62
62
  /* Border */
63
63
  --btn-border-radius: var(--radius-control);
64
- --btn-border-width: var(--border-width-normal);
64
+ --btn-border-width: var(--border-width-sm);
65
65
 
66
66
  /* Color */
67
67
  --btn-color-background: var(--color-brand);
@@ -90,7 +90,7 @@ The property mirrors the CSS property name, so the token reads the same way as t
90
90
 
91
91
  --hero-color-background: var(--color-background);
92
92
  --hero-color-text: var(--color-text);
93
- --hero-min-height: 50svh;
93
+ --hero-media-brightness: 0.5;
94
94
  ```
95
95
 
96
96
  ---
@@ -106,7 +106,7 @@ All tokens are declared inside `@layer tokens`, the lowest-priority layer in the
106
106
  @layer tokens {
107
107
  :root {
108
108
  --btn-color-background: var(--color-light);
109
- --hero-min-height: 80svh;
109
+ --hero-height: 80svh;
110
110
  }
111
111
  }
112
112
  ```
@@ -143,8 +143,8 @@ yarn add @uncinq/component-tokens
143
143
 
144
144
  ```css
145
145
  @import '@uncinq/design-tokens';
146
- @import '@uncinq/component-tokens/css/component/button.css';
147
- @import '@uncinq/component-tokens/css/component/badge.css';
146
+ @import '@uncinq/component-tokens/css/components/button.css';
147
+ @import '@uncinq/component-tokens/css/components/badge.css';
148
148
  ```
149
149
 
150
150
  ### Usage — CDN (no build step)
@@ -179,7 +179,7 @@ For deeper changes (adding new tokens, renaming), fork the JSON source files and
179
179
 
180
180
  ```bash
181
181
  npm install
182
- npm run build # generates dist/css/component/*.css
182
+ npm run build # generates dist/css/components/*.css
183
183
  ```
184
184
 
185
185
  See [docs/STYLE-DICTIONARY.md](docs/STYLE-DICTIONARY.md) for build pipeline details and token naming conventions.
@@ -190,7 +190,7 @@ See [docs/STYLE-DICTIONARY.md](docs/STYLE-DICTIONARY.md) for build pipeline deta
190
190
 
191
191
  ```text
192
192
  tokens/ ← DTCG JSON source files (edit these)
193
- component/
193
+ components/
194
194
  alert.json
195
195
  badge.json
196
196
  button.json
@@ -198,12 +198,13 @@ tokens/ ← DTCG JSON source files (edit these)
198
198
 
199
199
  dist/css/ ← generated CSS (do not edit)
200
200
  index.css ← imports all component token files
201
- component/
201
+ components/
202
202
  alert.css ← alert / notification banner
203
203
  badge.css ← badge / pill / tag
204
204
  breadcrumb.css ← breadcrumb navigation
205
205
  button.css ← button (all variants)
206
206
  card.css ← card (alias → item tokens)
207
+ carousel.css ← carousel / slider
207
208
  container.css ← layout container + grid columns
208
209
  details.css ← <details> / accordion
209
210
  drawer.css ← off-canvas panel / drawer
@@ -219,6 +220,7 @@ dist/css/ ← generated CSS (do not edit)
219
220
  logo.css ← logotype
220
221
  map.css ← embedded map
221
222
  media.css ← media object (image + text)
223
+ modal.css ← centered dialog / modal
222
224
  nav.css ← navigation bar
223
225
  pagination.css ← pagination control
224
226
  surtitle.css ← small label above a heading
@@ -9,6 +9,11 @@
9
9
  --hero-color-link: var(--color-text);
10
10
  --hero-color-text: var(--color-text);
11
11
  --hero-gap: var(--spacing-sm);
12
+ --hero-gradient-color-from: var(--gradient-darken-color-from);
13
+ --hero-gradient-color-to: var(--gradient-darken-color-to);
14
+ --hero-gradient-stop: var(--gradient-darken-stop);
15
+ --hero-gradient-stop-tablet: var(--gradient-darken-stop-tablet);
16
+ --hero-gradient-stop-desktop: var(--gradient-darken-stop-desktop);
12
17
  --hero-height: clamp(25rem, 23.2394rem + 7.5117vw, 30rem);
13
18
  --hero-home-height: clamp(30rem, 26.4789rem + 15.0235vw, 40rem);
14
19
  --hero-media-brightness: 0.5;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uncinq/component-tokens",
3
- "version": "1.8.1",
3
+ "version": "1.9.0",
4
4
  "description": "Framework-agnostic CSS design tokens — component layers.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -18,6 +18,32 @@
18
18
  "$value": "{spacing.sm}",
19
19
  "$type": "dimension"
20
20
  },
21
+ "gradient": {
22
+ "color": {
23
+ "from": {
24
+ "$value": "{gradient.darken.color.from}",
25
+ "$type": "color"
26
+ },
27
+ "to": {
28
+ "$value": "{gradient.darken.color.to}",
29
+ "$type": "color"
30
+ }
31
+ },
32
+ "stop": {
33
+ "default": {
34
+ "$value": "{gradient.darken.stop.default}",
35
+ "$type": "dimension"
36
+ },
37
+ "tablet": {
38
+ "$value": "{gradient.darken.stop.tablet}",
39
+ "$type": "dimension"
40
+ },
41
+ "desktop": {
42
+ "$value": "{gradient.darken.stop.desktop}",
43
+ "$type": "dimension"
44
+ }
45
+ }
46
+ },
21
47
  "height": {
22
48
  "$value": "clamp(25rem, 23.2394rem + 7.5117vw, 30rem)",
23
49
  "$type": "dimension"