@cupped/tokens 0.2.0 → 0.2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @cupped/tokens
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#6](https://github.com/ybird-labs/cupped-design-system/pull/6) [`6a9ce2a`](https://github.com/ybird-labs/cupped-design-system/commit/6a9ce2ab72710b30c1d8c12a4a4fe3a412aca246) Thanks [@JeancarloBarrios](https://github.com/JeancarloBarrios)! - Distribute via **public npm**: consumers install `@cupped/tokens` with no registry auth or `.npmrc`. The release pipeline publishes to npmjs with provenance.
8
+
9
+ - [#5](https://github.com/ybird-labs/cupped-design-system/pull/5) [`e67f352`](https://github.com/ybird-labs/cupped-design-system/commit/e67f35207e1ee75149e6a0607d7a38a87f47e089) Thanks [@JeancarloBarrios](https://github.com/JeancarloBarrios)! - Harden the release pipeline and tighten the package manifest:
10
+
11
+ - **release.yml** — resilient GitHub Release `create`-or-`upload` for the CSS
12
+ assets (no more half-published versions), plus a `.sha256` sidecar so
13
+ consumers can verify pinned downloads.
14
+ - **ci.yml** — enforce a changeset on PRs that change the package, so a release
15
+ never silently no-ops on a token/API change.
16
+ - **package.json** — add a `default` export condition (resolvers matching none
17
+ of `react-native`/`import`/`require` now resolve), and drop the `engines`
18
+ Node gate that wrongly constrained _consumers_ (Node 22 is a build-only need).
19
+ - **docs** — fine-grained-PAT first-publish runbook; Phoenix download now
20
+ verifies the checksum sidecar.
21
+
22
+ - [#7](https://github.com/ybird-labs/cupped-design-system/pull/7) [`c27e9f4`](https://github.com/ybird-labs/cupped-design-system/commit/c27e9f42b3c700807873a6265b5126f43a4391ac) Thanks [@JeancarloBarrios](https://github.com/JeancarloBarrios)! - Revise the text input to design v0.3 and change the focus/error glow tokens to carry geometry.
23
+
24
+ Shipped as a 0.2.1 follow-up to the 0.2.0 glow tokens. Note — the shape of `focus-glow`/`error-glow`/`focusGlow`/`errorGlow` changes vs the published `@cupped/tokens@0.2.0` (a breaking shape change; called out here so consumers of 0.2.0's color-only glows can migrate):
25
+
26
+ - CSS/Tailwind: `--focus-glow`/`--error-glow` previously resolved to a bare **color** (e.g. `rgba(192, 85, 57, 0.22)`); they now resolve to a full **`box-shadow`** value (e.g. `0 0 6px 2px color-mix(...)` / `0 0 6px 2px rgba(...)`). Consumers that wrote `box-shadow: 0 0 6px 2px var(--focus-glow)` must change to `box-shadow: var(--focus-glow)` (using the token as a color now produces an invalid doubled box-shadow).
27
+ - Flat JSON: `"focus-glow"`/`"error-glow"` change from a color string (`"rgba(192, 85, 57, 0.22)"`) to a box-shadow string (`"0 0 6px 2px rgba(192, 85, 57, 0.22)"`).
28
+ - Native theme object: `focusGlow`/`errorGlow` change from a **string** (`"rgba(192, 85, 57, 0.22)"`) to an **object** `{ color, blur, spread }`. Consumers reading `theme.focusGlow`/`theme.errorGlow` as a color string (e.g. passing to `shadowColor`) must migrate to `theme.focusGlow.color`.
29
+
30
+ Other changes (additive):
31
+
32
+ - `.input` revised: 44pt min-height, hover border, AA placeholder (ink-secondary), accessible focus (primary-strong border + soft `--focus-glow` halo), error that persists on focus with `--error-glow`, icon-paired error hint, and a `validating` state with a new `.spinner-ink`. Hint is neutral by default, red on `.error`, neutral on `.validating`.
33
+ - Web `Input` wrapper gains `validating`, `leading`, and `trailing` props, an error alert icon, `aria-busy`, `aria-describedby` linking the hint, and a live-region hint (assertive on error, polite while validating). The existing `label`/`hint`/`error` API is unchanged.
34
+
3
35
  ## 0.1.0
4
36
 
5
37
  Initial release. DTCG token source under `tokens/` with generated, committed
@@ -106,16 +106,16 @@
106
106
  }
107
107
  /* Placeholder is essential text — ink-secondary clears AA; ink-muted does not. */
108
108
  .input::placeholder { color: var(--ink-secondary); }
109
- .input:hover:not(:focus):not([disabled]) { border-color: var(--ink-muted); }
109
+ .input:hover:not(:focus):not([disabled]):not(.error) { border-color: var(--ink-muted); }
110
110
  .input:focus {
111
111
  outline: none;
112
- border-color: var(--primary-strong); /* #C05539, ≥3:1 vs field — carries the contrast */
113
- box-shadow: 0 0 6px 2px var(--focus-glow); /* soft glow, decorative; buttons keep the two-tone ring */
112
+ border-color: var(--primary-strong); /* #C05539, ≥3:1 vs field — carries the contrast */
113
+ box-shadow: var(--focus-glow); /* soft glow, decorative; buttons keep the two-tone ring */
114
114
  }
115
115
  .input.error,
116
116
  .input.error:focus {
117
117
  border-color: var(--error);
118
- box-shadow: 0 0 6px 2px var(--error-glow); /* soft glow, error color — shown focused or not */
118
+ box-shadow: var(--error-glow); /* soft glow, error color — shown focused or not */
119
119
  }
120
120
  .input[disabled] { background: var(--canvas); color: var(--ink-muted); cursor: not-allowed; }
121
121
  .input-row { display: flex; flex-direction: column; gap: 6px; }
@@ -119,8 +119,8 @@
119
119
  --shimmer-duration: 1.5s;
120
120
  --motion-reduced: 120ms;
121
121
  --focus-ring: 0 0 0 2px var(--card), 0 0 0 4px var(--primary-strong);
122
- --focus-glow: color-mix(in srgb, var(--primary-strong) 22%, transparent);
123
- --error-glow: color-mix(in srgb, var(--error) 22%, transparent);
122
+ --focus-glow: 0 0 6px 2px color-mix(in srgb, var(--primary-strong) 22%, transparent);
123
+ --error-glow: 0 0 6px 2px color-mix(in srgb, var(--error) 22%, transparent);
124
124
  --hit-target-min: 44px;
125
125
 
126
126
  /* ── Materials ── */
@@ -1306,24 +1306,36 @@
1306
1306
  }
1307
1307
  },
1308
1308
  "glow": {
1309
- "$type": "color",
1310
- "$value": "rgba(192, 85, 57, 0.22)",
1311
- "$description": "Decorative input focus halo — primary-strong @ 22%. The primary-strong border carries the ≥3:1 contrast; this glow is decorative. Buttons keep the two-tone focus ring.",
1309
+ "$type": "shadow",
1310
+ "$value": {
1311
+ "offsetX": "0px",
1312
+ "offsetY": "0px",
1313
+ "blur": "6px",
1314
+ "spread": "2px",
1315
+ "color": "rgba(192, 85, 57, 0.22)"
1316
+ },
1317
+ "$description": "Decorative input focus halo — 6px blur, 2px spread, primary-strong @ 22%. The primary-strong border carries the ≥3:1 contrast; this glow is decorative. Buttons keep the two-tone focus ring.",
1312
1318
  "$extensions": {
1313
1319
  "app.cupped": {
1314
1320
  "cssName": "focus-glow",
1315
- "cssValue": "color-mix(in srgb, var(--primary-strong) 22%, transparent)"
1321
+ "cssValue": "0 0 6px 2px color-mix(in srgb, var(--primary-strong) 22%, transparent)"
1316
1322
  }
1317
1323
  }
1318
1324
  },
1319
1325
  "errorGlow": {
1320
- "$type": "color",
1321
- "$value": "rgba(239, 68, 68, 0.22)",
1322
- "$description": "Decorative input error halo — error @ 22%. Pairs with the error border; shown whether or not the field is focused.",
1326
+ "$type": "shadow",
1327
+ "$value": {
1328
+ "offsetX": "0px",
1329
+ "offsetY": "0px",
1330
+ "blur": "6px",
1331
+ "spread": "2px",
1332
+ "color": "rgba(239, 68, 68, 0.22)"
1333
+ },
1334
+ "$description": "Decorative input error halo — 6px blur, 2px spread, error @ 22%. Pairs with the error border; shown whether or not the field is focused.",
1323
1335
  "$extensions": {
1324
1336
  "app.cupped": {
1325
1337
  "cssName": "error-glow",
1326
- "cssValue": "color-mix(in srgb, var(--error) 22%, transparent)"
1338
+ "cssValue": "0 0 6px 2px color-mix(in srgb, var(--error) 22%, transparent)"
1327
1339
  }
1328
1340
  }
1329
1341
  }
@@ -77,8 +77,8 @@
77
77
  "shimmer-duration": "1.5s",
78
78
  "motion-reduced": "120ms",
79
79
  "focus-ring": "0 0 0 2px #FFFFFF, 0 0 0 4px #C05539",
80
- "focus-glow": "rgba(192, 85, 57, 0.22)",
81
- "error-glow": "rgba(239, 68, 68, 0.22)",
80
+ "focus-glow": "0 0 6px 2px rgba(192, 85, 57, 0.22)",
81
+ "error-glow": "0 0 6px 2px rgba(239, 68, 68, 0.22)",
82
82
  "hit-target-min": "44px",
83
83
  "radius-sm": "8px",
84
84
  "radius-md": "12px",
@@ -271,8 +271,16 @@ const tokens = {
271
271
  "innerColor": "#FFFFFF",
272
272
  "color": "#C05539"
273
273
  },
274
- "focusGlow": "rgba(192, 85, 57, 0.22)",
275
- "errorGlow": "rgba(239, 68, 68, 0.22)",
274
+ "focusGlow": {
275
+ "color": "rgba(192, 85, 57, 0.22)",
276
+ "blur": 6,
277
+ "spread": 2
278
+ },
279
+ "errorGlow": {
280
+ "color": "rgba(239, 68, 68, 0.22)",
281
+ "blur": 6,
282
+ "spread": 2
283
+ },
276
284
  "material": {
277
285
  "chromeBg": "rgba(255, 255, 255, 0.95)",
278
286
  "scrim": "rgba(15, 23, 42, 0.45)",
@@ -271,8 +271,16 @@ export declare const tokens: {
271
271
  readonly "innerColor": "#FFFFFF";
272
272
  readonly "color": "#C05539";
273
273
  };
274
- readonly "focusGlow": "rgba(192, 85, 57, 0.22)";
275
- readonly "errorGlow": "rgba(239, 68, 68, 0.22)";
274
+ readonly "focusGlow": {
275
+ readonly "color": "rgba(192, 85, 57, 0.22)";
276
+ readonly "blur": 6;
277
+ readonly "spread": 2;
278
+ };
279
+ readonly "errorGlow": {
280
+ readonly "color": "rgba(239, 68, 68, 0.22)";
281
+ readonly "blur": 6;
282
+ readonly "spread": 2;
283
+ };
276
284
  readonly "material": {
277
285
  readonly "chromeBg": "rgba(255, 255, 255, 0.95)";
278
286
  readonly "scrim": "rgba(15, 23, 42, 0.45)";
@@ -270,8 +270,16 @@ export const tokens = {
270
270
  "innerColor": "#FFFFFF",
271
271
  "color": "#C05539"
272
272
  },
273
- "focusGlow": "rgba(192, 85, 57, 0.22)",
274
- "errorGlow": "rgba(239, 68, 68, 0.22)",
273
+ "focusGlow": {
274
+ "color": "rgba(192, 85, 57, 0.22)",
275
+ "blur": 6,
276
+ "spread": 2
277
+ },
278
+ "errorGlow": {
279
+ "color": "rgba(239, 68, 68, 0.22)",
280
+ "blur": 6,
281
+ "spread": 2
282
+ },
275
283
  "material": {
276
284
  "chromeBg": "rgba(255, 255, 255, 0.95)",
277
285
  "scrim": "rgba(15, 23, 42, 0.45)",
@@ -143,8 +143,8 @@
143
143
  --shimmer-duration: 1.5s;
144
144
  --motion-reduced: 120ms;
145
145
  --focus-ring: 0 0 0 2px #FFFFFF, 0 0 0 4px #C05539;
146
- --focus-glow: rgba(192, 85, 57, 0.22);
147
- --error-glow: rgba(239, 68, 68, 0.22);
146
+ --focus-glow: 0 0 6px 2px rgba(192, 85, 57, 0.22);
147
+ --error-glow: 0 0 6px 2px rgba(239, 68, 68, 0.22);
148
148
  --hit-target-min: 44px;
149
149
  --material-chrome-bg: rgba(255, 255, 255, 0.95);
150
150
  --material-chrome-blur: saturate(1.4) blur(20px);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cupped/tokens",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Cupped design tokens — canonical DTCG source with generated CSS custom properties, Tailwind v4 @theme, React Native theme object, and raw JSON.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -42,21 +42,33 @@
42
42
  "$extensions": { "app.cupped": { "innerWidthPx": 2, "outerWidthPx": 2 } }
43
43
  },
44
44
  "glow": {
45
- "$type": "color",
46
- "$value": "rgba(192, 85, 57, 0.22)",
47
- "$description": "Decorative input focus halo — primary-strong @ 22%. The primary-strong border carries the ≥3:1 contrast; this glow is decorative. Buttons keep the two-tone focus ring.",
45
+ "$type": "shadow",
46
+ "$value": {
47
+ "offsetX": "0px",
48
+ "offsetY": "0px",
49
+ "blur": "6px",
50
+ "spread": "2px",
51
+ "color": "rgba(192, 85, 57, 0.22)"
52
+ },
53
+ "$description": "Decorative input focus halo — 6px blur, 2px spread, primary-strong @ 22%. The primary-strong border carries the ≥3:1 contrast; this glow is decorative. Buttons keep the two-tone focus ring.",
48
54
  "$extensions": { "app.cupped": {
49
55
  "cssName": "focus-glow",
50
- "cssValue": "color-mix(in srgb, var(--primary-strong) 22%, transparent)"
56
+ "cssValue": "0 0 6px 2px color-mix(in srgb, var(--primary-strong) 22%, transparent)"
51
57
  } }
52
58
  },
53
59
  "errorGlow": {
54
- "$type": "color",
55
- "$value": "rgba(239, 68, 68, 0.22)",
56
- "$description": "Decorative input error halo — error @ 22%. Pairs with the error border; shown whether or not the field is focused.",
60
+ "$type": "shadow",
61
+ "$value": {
62
+ "offsetX": "0px",
63
+ "offsetY": "0px",
64
+ "blur": "6px",
65
+ "spread": "2px",
66
+ "color": "rgba(239, 68, 68, 0.22)"
67
+ },
68
+ "$description": "Decorative input error halo — 6px blur, 2px spread, error @ 22%. Pairs with the error border; shown whether or not the field is focused.",
57
69
  "$extensions": { "app.cupped": {
58
70
  "cssName": "error-glow",
59
- "cssValue": "color-mix(in srgb, var(--error) 22%, transparent)"
71
+ "cssValue": "0 0 6px 2px color-mix(in srgb, var(--error) 22%, transparent)"
60
72
  } }
61
73
  }
62
74
  },