@phcdevworks/spectre-ui 1.6.0 → 1.7.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/CHANGELOG.md +65 -10
- package/README.md +21 -34
- package/dist/base.css +22 -25
- package/dist/components.css +552 -34
- package/dist/index.cjs +197 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +552 -34
- package/dist/index.d.cts +106 -2
- package/dist/index.d.ts +106 -2
- package/dist/index.js +194 -18
- package/dist/index.js.map +1 -1
- package/dist/utilities.css +22 -25
- package/package.json +12 -10
package/CHANGELOG.md
CHANGED
|
@@ -6,18 +6,73 @@ reflects package releases published to npm.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.7.0] - 2026-06-03
|
|
10
|
+
|
|
11
|
+
Release Title: Tag Variant Expansion and Token Alignment
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Tag Variants**: Expanded Tag recipe with `primary`, `secondary`, `success`,
|
|
16
|
+
`warning`, `danger`, `info`, `neutral`, `accent`, `cta`, and `ghost` variants
|
|
17
|
+
for full parity with Badge and Button components. CSS selectors backed by
|
|
18
|
+
token roles only.
|
|
19
|
+
- **Dark Mode Fixtures**: Added dark mode verification fixtures under `examples/`
|
|
20
|
+
for Alert, Avatar, and Tag recipes.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- **Token Alignment**: Updated `@phcdevworks/spectre-tokens` dependency to
|
|
25
|
+
`^2.7.0`.
|
|
26
|
+
- **CI**: Promoted Node 24.x to the primary CI matrix target; Node 22.x
|
|
27
|
+
retained for one more cycle.
|
|
28
|
+
- **Documentation**: Added Recipe Composition section to `CONTRIBUTING.md`
|
|
29
|
+
covering how adapters compose multiple recipe helpers, contract guarantees
|
|
30
|
+
(pure function, deterministic output, no side effects), and non-guarantees
|
|
31
|
+
(CSS specificity interactions, class ordering).
|
|
32
|
+
|
|
33
|
+
## [1.6.0] - 2026-05-22
|
|
34
|
+
|
|
35
|
+
Release Title: Contract Expansion and Governance Hardening
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- **Component Variants**: Added `cta` variant support for `Badge` and
|
|
40
|
+
`IconBox`, `fullWidth` structural support for `IconBox`, and structural
|
|
41
|
+
`elevated`, `flat`, `outline`, and `ghost` variants for `Testimonial`.
|
|
42
|
+
- **Input Recipes**: Added wrapper, label, helper-text, and error-message class
|
|
43
|
+
helpers so adapters can reuse the full input sub-element contract.
|
|
44
|
+
- **Contract Governance**: Added Claude, Codex, Copilot, and Jules agent
|
|
45
|
+
guidance, PR template requirements, maintenance instructions, release
|
|
46
|
+
readiness prompts, and CodeRabbit configuration for review hygiene.
|
|
47
|
+
- **Validation Shortcut**: Added `npm run check` as the canonical local and CI
|
|
48
|
+
validation gate.
|
|
49
|
+
|
|
9
50
|
### Changed
|
|
10
51
|
|
|
11
|
-
-
|
|
12
|
-
`@phcdevworks/spectre-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
52
|
+
- **Token Alignment**: Updated the package to consume
|
|
53
|
+
`@phcdevworks/spectre-tokens` `^2.6.0` and refreshed dependency metadata.
|
|
54
|
+
- **Runtime Contract**: Raised the Node.js requirement to `^22.13.0` or
|
|
55
|
+
`>=24.0.0`, documented npm `>=10.0.0`, and updated CI to validate on Node
|
|
56
|
+
22.x and 24.x.
|
|
57
|
+
- **Validation Tooling**: Migrated build and validation scripts from `.mjs` to
|
|
58
|
+
TypeScript entry points executed with `node --experimental-strip-types`.
|
|
59
|
+
- **Package Metadata**: Repositioned the package description and keywords
|
|
60
|
+
around Layer 2 CSS bundles, Tailwind tooling, and class recipes; included
|
|
61
|
+
`CHANGELOG.md` in the published package files.
|
|
62
|
+
- **Documentation**: Expanded README, contributing, roadmap, TODO, and agent
|
|
63
|
+
guidance around the Spectre layer model, framework boundaries, contract
|
|
64
|
+
validation, package exports, and release-readiness workflows.
|
|
65
|
+
|
|
66
|
+
### Fixed
|
|
67
|
+
|
|
68
|
+
- **State Parity**: Improved Badge, Card, IconBox, PricingCard, and Testimonial
|
|
69
|
+
recipe/CSS parity for forced hover, focus, active, disabled, loading, and
|
|
70
|
+
structural state coverage.
|
|
71
|
+
- **Selector Coverage**: Added testimonial attribute-selector support and
|
|
72
|
+
refreshed contract tests, export snapshots, and manifest entries for the new
|
|
73
|
+
public recipe helpers and variants.
|
|
74
|
+
- **Docs Drift**: Corrected README badges, package links, Node/npm guidance,
|
|
75
|
+
Jules automation wording, and stale agent-reference paths.
|
|
21
76
|
|
|
22
77
|
## [1.5.0] - 2026-05-04
|
|
23
78
|
|
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @phcdevworks/spectre-ui
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@phcdevworks/spectre-ui)
|
|
4
|
-
[](https://github.com/phcdevworks/spectre-ui/actions/workflows/ci.yml)
|
|
5
|
-
[](https://github.com/phcdevworks/spectre-ui/actions/workflows/ci.yml)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://nodejs.org)
|
|
7
7
|
|
|
8
8
|
`@phcdevworks/spectre-ui` is **Layer 2 of the Spectre design suite**. It turns
|
|
9
9
|
[`@phcdevworks/spectre-tokens`](https://github.com/phcdevworks/spectre-tokens)
|
|
@@ -17,7 +17,8 @@ styling contract without re-implementing class logic themselves.
|
|
|
17
17
|
`@phcdevworks/spectre-tokens`) or building framework-specific components (that
|
|
18
18
|
belongs in adapter packages such as `@phcdevworks/spectre-ui-astro`).
|
|
19
19
|
|
|
20
|
-
[Contributing](CONTRIBUTING.md) | [
|
|
20
|
+
[Contributing](CONTRIBUTING.md) | [Code of Conduct](CODE_OF_CONDUCT.md) |
|
|
21
|
+
[Changelog](CHANGELOG.md) | [Roadmap](ROADMAP.md) |
|
|
21
22
|
[Security Policy](SECURITY.md)
|
|
22
23
|
|
|
23
24
|
## Source of truth
|
|
@@ -40,37 +41,15 @@ full UI contract.
|
|
|
40
41
|
|
|
41
42
|
## Architecture
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
│ consumed by
|
|
49
|
-
▼
|
|
50
|
-
┌─────────────────────────────┐
|
|
51
|
-
│ @phcdevworks/spectre-ui │ Layer 2 — THIS PACKAGE
|
|
52
|
-
│ CSS bundles, recipes, │ translates tokens into structure
|
|
53
|
-
│ Tailwind helpers │
|
|
54
|
-
└──────────────┬──────────────┘
|
|
55
|
-
│ consumed by
|
|
56
|
-
▼
|
|
57
|
-
┌─────────────────────────────┐
|
|
58
|
-
│ @phcdevworks/spectre- │ Layer 3 — canonical Lit web components
|
|
59
|
-
│ components │ wraps CSS classes and recipes as
|
|
60
|
-
│ │ framework-agnostic custom elements
|
|
61
|
-
└──────────────┬──────────────┘
|
|
62
|
-
│ alongside / consumed by
|
|
63
|
-
▼
|
|
64
|
-
┌─────────────────────────────┐
|
|
65
|
-
│ Adapters and apps │ Layer 4 — framework-specific delivery
|
|
66
|
-
│ spectre-ui-astro, React, │ binds Spectre contracts to native
|
|
67
|
-
│ Vue, WordPress, etc. │ framework ergonomics
|
|
68
|
-
└─────────────────────────────┘
|
|
69
|
-
```
|
|
44
|
+
| Layer | Package or consumer | Responsibility | Relationship to this package |
|
|
45
|
+
|---|---|---|---|
|
|
46
|
+
| 1 | `@phcdevworks/spectre-tokens` | Defines design values and semantic token meaning | Upstream source of truth |
|
|
47
|
+
| 2 | `@phcdevworks/spectre-ui` | Translates tokens into CSS bundles, Tailwind helpers, and class recipes | This package |
|
|
48
|
+
| 3 | Adapters and apps, such as `@phcdevworks/spectre-ui-astro` | Deliver Spectre through framework-native ergonomics | Downstream consumers |
|
|
70
49
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
50
|
+
`@phcdevworks/spectre-components` is a separate component package that can wrap
|
|
51
|
+
this styling contract in Lit web components. This package owns Layer 2 only: it
|
|
52
|
+
does not deliver components and it does not define tokens.
|
|
74
53
|
|
|
75
54
|
## Key capabilities
|
|
76
55
|
|
|
@@ -251,6 +230,10 @@ All options are optional and fall back to sensible defaults.
|
|
|
251
230
|
| PricingCard | `getPricingCardClasses` | — | — | `featured` `interactive` `disabled` `loading` `fullHeight` |
|
|
252
231
|
| Rating | `getRatingClasses` | — | `sm` `md` `lg` | `interactive` `disabled` `loading` `pill` `fullWidth` |
|
|
253
232
|
| Testimonial | `getTestimonialClasses` | `elevated` `flat` `outline` `ghost` | — | `interactive` `disabled` `loading` `fullHeight` |
|
|
233
|
+
| Alert | `getAlertClasses` | `info` `success` `warning` `danger` `neutral` | `sm` `md` `lg` | `dismissed` |
|
|
234
|
+
| Avatar | `getAvatarClasses` | — | `sm` `md` `lg` `xl` | shape: `circle` `square` |
|
|
235
|
+
| Tag | `getTagClasses` | `default` `primary` `secondary` `success` `warning` `danger` `info` `neutral` `accent` `cta` `outline` `ghost` | `sm` `md` `lg` | `dismissible` `selected` `disabled` `loading` `interactive` `fullWidth` |
|
|
236
|
+
| Spinner | `getSpinnerClasses` | — | `sm` `md` `lg` | — |
|
|
254
237
|
|
|
255
238
|
Each recipe family also exports sub-element helpers for its structural parts
|
|
256
239
|
(labels, wrappers, sub-containers, text elements). See the full list below.
|
|
@@ -270,6 +253,8 @@ Root constants:
|
|
|
270
253
|
|
|
271
254
|
Root recipe functions:
|
|
272
255
|
|
|
256
|
+
- `getAlertClasses`
|
|
257
|
+
- `getAvatarClasses`
|
|
273
258
|
- `getBadgeClasses`
|
|
274
259
|
- `getButtonClasses`
|
|
275
260
|
- `getCardClasses`
|
|
@@ -277,6 +262,8 @@ Root recipe functions:
|
|
|
277
262
|
- `getInputClasses`
|
|
278
263
|
- `getPricingCardClasses`
|
|
279
264
|
- `getRatingClasses`
|
|
265
|
+
- `getSpinnerClasses`
|
|
266
|
+
- `getTagClasses`
|
|
280
267
|
- `getTestimonialClasses`
|
|
281
268
|
|
|
282
269
|
Root recipe helper functions:
|
package/dist/base.css
CHANGED
|
@@ -144,10 +144,14 @@
|
|
|
144
144
|
--sp-layout-container-max-width: 72rem;
|
|
145
145
|
--sp-border-width-base: 1px;
|
|
146
146
|
--sp-border-width-thick: 2px;
|
|
147
|
+
--sp-border-style-none: none;
|
|
148
|
+
--sp-border-style-solid: solid;
|
|
147
149
|
--sp-radius-none: 0;
|
|
148
150
|
--sp-radius-sm: 2px;
|
|
149
151
|
--sp-radius-md: 4px;
|
|
150
152
|
--sp-radius-lg: 8px;
|
|
153
|
+
--sp-radius-xl: 12px;
|
|
154
|
+
--sp-radius-2xl: 16px;
|
|
151
155
|
--sp-radius-pill: 999px;
|
|
152
156
|
--sp-font-family-sans: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
|
|
153
157
|
--sp-font-family-serif: 'Times New Roman', Times, serif;
|
|
@@ -183,34 +187,21 @@
|
|
|
183
187
|
--sp-font-6xl-line-height: 5rem;
|
|
184
188
|
--sp-font-6xl-weight: 900;
|
|
185
189
|
--sp-font-xs-letter-spacing: 0.02em;
|
|
186
|
-
--sp-
|
|
187
|
-
--sp-
|
|
188
|
-
--sp-
|
|
189
|
-
--sp-
|
|
190
|
-
--sp-
|
|
191
|
-
--sp-
|
|
192
|
-
--sp-
|
|
193
|
-
--sp-
|
|
194
|
-
--sp-
|
|
195
|
-
--sp-badge-neutral-text: #374253;
|
|
196
|
-
--sp-badge-info-bg: #e0f2fe;
|
|
197
|
-
--sp-badge-info-text: #075985;
|
|
198
|
-
--sp-badge-success-bg: #dcfce7;
|
|
199
|
-
--sp-badge-success-text: #166534;
|
|
200
|
-
--sp-badge-warning-bg: #fff1c2;
|
|
201
|
-
--sp-badge-warning-text: #8f5200;
|
|
202
|
-
--sp-badge-danger-bg: #fee2e2;
|
|
203
|
-
--sp-badge-danger-text: #991b1b;
|
|
204
|
-
--sp-icon-box-bg: #ffffff;
|
|
205
|
-
--sp-icon-box-border: #d9dfeb;
|
|
206
|
-
--sp-icon-box-icon-default: #0369a1;
|
|
207
|
-
--sp-icon-box-icon-success: #16a34a;
|
|
208
|
-
--sp-icon-box-icon-warning: #d48806;
|
|
209
|
-
--sp-icon-box-icon-danger: #dc2626;
|
|
190
|
+
--sp-font-sm-letter-spacing: 0em;
|
|
191
|
+
--sp-font-md-letter-spacing: 0em;
|
|
192
|
+
--sp-font-lg-letter-spacing: 0em;
|
|
193
|
+
--sp-font-xl-letter-spacing: 0em;
|
|
194
|
+
--sp-font-2xl-letter-spacing: 0em;
|
|
195
|
+
--sp-font-3xl-letter-spacing: 0em;
|
|
196
|
+
--sp-font-4xl-letter-spacing: 0em;
|
|
197
|
+
--sp-font-5xl-letter-spacing: 0em;
|
|
198
|
+
--sp-font-6xl-letter-spacing: 0em;
|
|
210
199
|
--sp-shadow-none: none;
|
|
211
200
|
--sp-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.06);
|
|
212
201
|
--sp-shadow-md: 0 2px 6px -1px rgba(0, 0, 0, 0.08);
|
|
213
202
|
--sp-shadow-lg: 0 6px 16px -4px rgba(0, 0, 0, 0.12);
|
|
203
|
+
--sp-shadow-xl: 0 12px 24px -6px rgba(0, 0, 0, 0.15);
|
|
204
|
+
--sp-shadow-2xl: 0 20px 48px -12px rgba(0, 0, 0, 0.20);
|
|
214
205
|
--sp-breakpoint-sm: 640px;
|
|
215
206
|
--sp-breakpoint-md: 768px;
|
|
216
207
|
--sp-breakpoint-lg: 1024px;
|
|
@@ -224,20 +215,26 @@
|
|
|
224
215
|
--sp-z-index-modal: 1400;
|
|
225
216
|
--sp-z-index-popover: 1500;
|
|
226
217
|
--sp-z-index-tooltip: 1600;
|
|
218
|
+
--sp-z-index-toast: 1700;
|
|
227
219
|
--sp-duration-instant: 75ms;
|
|
228
220
|
--sp-duration-fast: 150ms;
|
|
229
221
|
--sp-duration-base: 200ms;
|
|
222
|
+
--sp-duration-relaxed: 250ms;
|
|
230
223
|
--sp-duration-moderate: 300ms;
|
|
231
224
|
--sp-duration-slow: 500ms;
|
|
232
225
|
--sp-duration-slower: 700ms;
|
|
226
|
+
--sp-duration-long: 1000ms;
|
|
227
|
+
--sp-duration-slowest: 1200ms;
|
|
233
228
|
--sp-easing-linear: linear;
|
|
234
229
|
--sp-easing-in: cubic-bezier(0.4, 0, 1, 1);
|
|
235
230
|
--sp-easing-out: cubic-bezier(0, 0, 0.2, 1);
|
|
236
231
|
--sp-easing-inout: cubic-bezier(0.4, 0, 0.2, 1);
|
|
237
232
|
--sp-easing-spring: cubic-bezier(0.4, 0, 0.2, 1);
|
|
233
|
+
--sp-easing-overshoot: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
238
234
|
--sp-opacity-disabled: 0.38;
|
|
239
235
|
--sp-opacity-hover: 0.92;
|
|
240
236
|
--sp-opacity-active: 0.84;
|
|
237
|
+
--sp-opacity-loading: 0.6;
|
|
241
238
|
--sp-opacity-focus: 1;
|
|
242
239
|
--sp-opacity-overlay: 0.5;
|
|
243
240
|
--sp-opacity-tooltip: 0.95;
|
|
@@ -369,7 +366,7 @@
|
|
|
369
366
|
--sp-button-text-default: #eef1f6;
|
|
370
367
|
--sp-button-text-on-primary: #ffffff;
|
|
371
368
|
--sp-badge-neutral-bg: #374253;
|
|
372
|
-
--sp-badge-neutral-text: #
|
|
369
|
+
--sp-badge-neutral-text: #f7f8fb;
|
|
373
370
|
--sp-badge-info-bg: #0c4a6e;
|
|
374
371
|
--sp-badge-info-text: #e0f2fe;
|
|
375
372
|
--sp-badge-success-bg: #166534;
|