@phcdevworks/spectre-ui 1.1.2 → 1.3.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 +38 -11
- package/dist/base.css +35 -22
- package/dist/components.css +256 -63
- package/dist/index.cjs +88 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +260 -66
- package/dist/index.d.cts +29 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +88 -12
- package/dist/index.js.map +1 -1
- package/dist/utilities.css +31 -19
- package/package.json +25 -13
package/README.md
CHANGED
|
@@ -110,19 +110,44 @@ Golden rule: consume tokens, do not redefine them.
|
|
|
110
110
|
|
|
111
111
|
### Root package
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
The root package exports CSS path constants plus the recipe functions re-exported
|
|
114
|
+
from `src/recipes/index.ts`.
|
|
115
|
+
|
|
116
|
+
Root constants:
|
|
114
117
|
|
|
115
118
|
- `spectreStyles`
|
|
116
|
-
- `
|
|
119
|
+
- `spectreBaseStylesPath`
|
|
120
|
+
- `spectreComponentsStylesPath`
|
|
121
|
+
- `spectreUtilitiesStylesPath`
|
|
122
|
+
|
|
123
|
+
Root recipe functions:
|
|
124
|
+
|
|
117
125
|
- `getBadgeClasses`
|
|
126
|
+
- `getButtonClasses`
|
|
118
127
|
- `getCardClasses`
|
|
119
|
-
- `getInputClasses`
|
|
120
128
|
- `getIconBoxClasses`
|
|
129
|
+
- `getInputClasses`
|
|
121
130
|
- `getPricingCardClasses`
|
|
122
|
-
- `getTestimonialClasses`
|
|
123
131
|
- `getRatingClasses`
|
|
132
|
+
- `getTestimonialClasses`
|
|
133
|
+
|
|
134
|
+
Root recipe helper functions:
|
|
124
135
|
|
|
125
|
-
|
|
136
|
+
- `getPricingCardBadgeClasses`
|
|
137
|
+
- `getPricingCardDescriptionClasses`
|
|
138
|
+
- `getPricingCardPriceClasses`
|
|
139
|
+
- `getPricingCardPriceContainerClasses`
|
|
140
|
+
- `getRatingStarClasses`
|
|
141
|
+
- `getRatingStarsClasses`
|
|
142
|
+
- `getRatingTextClasses`
|
|
143
|
+
- `getTestimonialAuthorClasses`
|
|
144
|
+
- `getTestimonialAuthorInfoClasses`
|
|
145
|
+
- `getTestimonialAuthorNameClasses`
|
|
146
|
+
- `getTestimonialAuthorTitleClasses`
|
|
147
|
+
- `getTestimonialQuoteClasses`
|
|
148
|
+
|
|
149
|
+
The root package also re-exports the related recipe option, variant, size, and
|
|
150
|
+
state TypeScript types defined by those recipes.
|
|
126
151
|
|
|
127
152
|
### Tailwind entry point
|
|
128
153
|
|
|
@@ -154,12 +179,14 @@ implementation drift.
|
|
|
154
179
|
|
|
155
180
|
## Development
|
|
156
181
|
|
|
157
|
-
Install dependencies, then run the package
|
|
182
|
+
Install dependencies, then run the package verification flow:
|
|
158
183
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
184
|
+
npm run ci:verify
|
|
185
|
+
|
|
186
|
+
Planning artifacts for contract hardening live in:
|
|
187
|
+
|
|
188
|
+
- [`ROADMAP.md`](ROADMAP.md)
|
|
189
|
+
- [`TODO.md`](TODO.md)
|
|
163
190
|
|
|
164
191
|
Key source areas:
|
|
165
192
|
|
|
@@ -189,7 +216,7 @@ When contributing:
|
|
|
189
216
|
- keep styling token-driven
|
|
190
217
|
- keep recipe APIs and CSS classes in sync
|
|
191
218
|
- avoid local visual values unless clearly intentional
|
|
192
|
-
- run
|
|
219
|
+
- run npm run ci:verify before opening a pull request
|
|
193
220
|
|
|
194
221
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full workflow.
|
|
195
222
|
|
package/dist/base.css
CHANGED
|
@@ -3,17 +3,20 @@
|
|
|
3
3
|
--sp-surface-card: #ffffff;
|
|
4
4
|
--sp-surface-input: #ffffff;
|
|
5
5
|
--sp-surface-overlay: rgba(20, 27, 36, 0.6);
|
|
6
|
+
--sp-surface-alternate: #eef1f6;
|
|
6
7
|
--sp-surface-hero: linear-gradient(135deg, #5b6ee1 0%, #6f3fd7 100%);
|
|
7
8
|
--sp-text-on-page-default: #141b24;
|
|
8
9
|
--sp-text-on-page-muted: #4b576a;
|
|
9
10
|
--sp-text-on-page-subtle: #657287;
|
|
10
11
|
--sp-text-on-page-meta: #657287;
|
|
12
|
+
--sp-text-on-page-brand: #1f57db;
|
|
11
13
|
--sp-text-on-surface-default: #141b24;
|
|
12
14
|
--sp-text-on-surface-muted: #4b576a;
|
|
13
15
|
--sp-text-on-surface-subtle: #657287;
|
|
14
16
|
--sp-text-on-surface-meta: #657287;
|
|
17
|
+
--sp-text-on-surface-brand: #1f57db;
|
|
15
18
|
--sp-component-card-text: #141b24;
|
|
16
|
-
--sp-component-card-text-muted: #
|
|
19
|
+
--sp-component-card-text-muted: #4b576a;
|
|
17
20
|
--sp-component-input-text: #141b24;
|
|
18
21
|
--sp-component-input-placeholder: #657287;
|
|
19
22
|
--sp-button-text-default: #141b24;
|
|
@@ -110,20 +113,8 @@
|
|
|
110
113
|
--sp-color-focus-primary: #336df4;
|
|
111
114
|
--sp-color-focus-error: #ef4444;
|
|
112
115
|
--sp-color-focus-info: #0369a1;
|
|
113
|
-
--sp-color-white
|
|
114
|
-
--sp-color-
|
|
115
|
-
--sp-color-white-2: f;
|
|
116
|
-
--sp-color-white-3: f;
|
|
117
|
-
--sp-color-white-4: f;
|
|
118
|
-
--sp-color-white-5: f;
|
|
119
|
-
--sp-color-white-6: f;
|
|
120
|
-
--sp-color-black-0: #;
|
|
121
|
-
--sp-color-black-1: 0;
|
|
122
|
-
--sp-color-black-2: 0;
|
|
123
|
-
--sp-color-black-3: 0;
|
|
124
|
-
--sp-color-black-4: 0;
|
|
125
|
-
--sp-color-black-5: 0;
|
|
126
|
-
--sp-color-black-6: 0;
|
|
116
|
+
--sp-color-white: #ffffff;
|
|
117
|
+
--sp-color-black: #000000;
|
|
127
118
|
--sp-space-0: 0rem;
|
|
128
119
|
--sp-space-4: 0.25rem;
|
|
129
120
|
--sp-space-8: 0.5rem;
|
|
@@ -172,13 +163,25 @@
|
|
|
172
163
|
--sp-font-md-weight: 500;
|
|
173
164
|
--sp-font-lg-size: 1.25rem;
|
|
174
165
|
--sp-font-lg-line-height: 2rem;
|
|
175
|
-
--sp-font-lg-weight:
|
|
166
|
+
--sp-font-lg-weight: 600;
|
|
176
167
|
--sp-font-xl-size: 1.5rem;
|
|
177
168
|
--sp-font-xl-line-height: 2.125rem;
|
|
178
169
|
--sp-font-xl-weight: 600;
|
|
179
170
|
--sp-font-2xl-size: 1.875rem;
|
|
180
171
|
--sp-font-2xl-line-height: 2.5rem;
|
|
181
|
-
--sp-font-2xl-weight:
|
|
172
|
+
--sp-font-2xl-weight: 700;
|
|
173
|
+
--sp-font-3xl-size: 2.25rem;
|
|
174
|
+
--sp-font-3xl-line-height: 2.75rem;
|
|
175
|
+
--sp-font-3xl-weight: 700;
|
|
176
|
+
--sp-font-4xl-size: 3rem;
|
|
177
|
+
--sp-font-4xl-line-height: 3.5rem;
|
|
178
|
+
--sp-font-4xl-weight: 800;
|
|
179
|
+
--sp-font-5xl-size: 3.75rem;
|
|
180
|
+
--sp-font-5xl-line-height: 4.25rem;
|
|
181
|
+
--sp-font-5xl-weight: 800;
|
|
182
|
+
--sp-font-6xl-size: 4.5rem;
|
|
183
|
+
--sp-font-6xl-line-height: 5rem;
|
|
184
|
+
--sp-font-6xl-weight: 900;
|
|
182
185
|
--sp-font-xs-letter-spacing: 0.02em;
|
|
183
186
|
--sp-text-on-page-default: #141b24;
|
|
184
187
|
--sp-text-on-page-muted: #4b576a;
|
|
@@ -250,6 +253,7 @@
|
|
|
250
253
|
--sp-button-primary-text: #ffffff;
|
|
251
254
|
--sp-button-primary-textdisabled: #8a96ad;
|
|
252
255
|
--sp-button-primary-focusring: rgba(14, 165, 233, 0.4);
|
|
256
|
+
--sp-button-primary-focusvisible: rgba(14, 165, 233, 0.4);
|
|
253
257
|
--sp-button-secondary-bg: #ffffff;
|
|
254
258
|
--sp-button-secondary-bghover: #f7f8fb;
|
|
255
259
|
--sp-button-secondary-bgactive: #eef1f6;
|
|
@@ -259,6 +263,7 @@
|
|
|
259
263
|
--sp-button-secondary-border: #075985;
|
|
260
264
|
--sp-button-secondary-borderdisabled: #d9dfeb;
|
|
261
265
|
--sp-button-secondary-focusring: rgba(14, 165, 233, 0.4);
|
|
266
|
+
--sp-button-secondary-focusvisible: rgba(14, 165, 233, 0.4);
|
|
262
267
|
--sp-button-ghost-bg: transparent;
|
|
263
268
|
--sp-button-ghost-bghover: #f0f9ff;
|
|
264
269
|
--sp-button-ghost-bgactive: #e0f2fe;
|
|
@@ -266,6 +271,7 @@
|
|
|
266
271
|
--sp-button-ghost-text: #075985;
|
|
267
272
|
--sp-button-ghost-textdisabled: #8a96ad;
|
|
268
273
|
--sp-button-ghost-focusring: rgba(14, 165, 233, 0.4);
|
|
274
|
+
--sp-button-ghost-focusvisible: rgba(14, 165, 233, 0.4);
|
|
269
275
|
--sp-button-danger-bg: #dc2626;
|
|
270
276
|
--sp-button-danger-bghover: #b91c1c;
|
|
271
277
|
--sp-button-danger-bgactive: #991b1b;
|
|
@@ -295,6 +301,7 @@
|
|
|
295
301
|
--sp-button-accent-text: #ffffff;
|
|
296
302
|
--sp-button-accent-textdisabled: #8a96ad;
|
|
297
303
|
--sp-button-accent-focusring: rgba(133, 79, 247, 0.4);
|
|
304
|
+
--sp-button-accent-focusvisible: rgba(133, 79, 247, 0.4);
|
|
298
305
|
--sp-form-default-bg: #ffffff;
|
|
299
306
|
--sp-form-default-border: #b7c1d4;
|
|
300
307
|
--sp-form-default-text: #141b24;
|
|
@@ -302,6 +309,8 @@
|
|
|
302
309
|
--sp-form-hover-border: #0ea5e9;
|
|
303
310
|
--sp-form-focus-border: #0ea5e9;
|
|
304
311
|
--sp-form-focus-ring: #0ea5e9;
|
|
312
|
+
--sp-form-focusvisible-border: #0ea5e9;
|
|
313
|
+
--sp-form-focusvisible-ring: #0ea5e9;
|
|
305
314
|
--sp-form-valid-border: #22c55e;
|
|
306
315
|
--sp-form-valid-bg: #f0fdf4;
|
|
307
316
|
--sp-form-valid-text: #15803d;
|
|
@@ -341,15 +350,18 @@
|
|
|
341
350
|
--sp-surface-card: #222b38;
|
|
342
351
|
--sp-surface-input: #374253;
|
|
343
352
|
--sp-surface-overlay: #222b38;
|
|
344
|
-
--sp-surface-
|
|
353
|
+
--sp-surface-alternate: #222b38;
|
|
354
|
+
--sp-surface-hero: linear-gradient(135deg, #5d28b8 0%, #401f75 100%);
|
|
345
355
|
--sp-text-on-page-default: #f7f8fb;
|
|
346
356
|
--sp-text-on-page-muted: #b7c1d4;
|
|
347
357
|
--sp-text-on-page-subtle: #8a96ad;
|
|
348
358
|
--sp-text-on-page-meta: #8a96ad;
|
|
359
|
+
--sp-text-on-page-brand: #5a92ff;
|
|
349
360
|
--sp-text-on-surface-default: #eef1f6;
|
|
350
361
|
--sp-text-on-surface-muted: #b7c1d4;
|
|
351
362
|
--sp-text-on-surface-subtle: #8a96ad;
|
|
352
363
|
--sp-text-on-surface-meta: #8a96ad;
|
|
364
|
+
--sp-text-on-surface-brand: #5a92ff;
|
|
353
365
|
--sp-component-card-text: #eef1f6;
|
|
354
366
|
--sp-component-card-text-muted: #b7c1d4;
|
|
355
367
|
--sp-component-input-text: #eef1f6;
|
|
@@ -368,7 +380,7 @@
|
|
|
368
380
|
--sp-badge-danger-text: #fee2e2;
|
|
369
381
|
--sp-icon-box-bg: #222b38;
|
|
370
382
|
--sp-icon-box-border: #374253;
|
|
371
|
-
--sp-icon-box-icon-default: #
|
|
383
|
+
--sp-icon-box-icon-default: #38bdf8;
|
|
372
384
|
--sp-icon-box-icon-success: #4ade80;
|
|
373
385
|
--sp-icon-box-icon-warning: #ffc21a;
|
|
374
386
|
--sp-icon-box-icon-danger: #f87171;
|
|
@@ -381,13 +393,14 @@
|
|
|
381
393
|
box-sizing: border-box;
|
|
382
394
|
}
|
|
383
395
|
|
|
384
|
-
html
|
|
385
|
-
body {
|
|
396
|
+
html {
|
|
386
397
|
margin: 0;
|
|
387
398
|
padding: 0;
|
|
388
399
|
}
|
|
389
400
|
|
|
390
401
|
body {
|
|
402
|
+
margin: 0;
|
|
403
|
+
padding: 0;
|
|
391
404
|
min-height: 100vh;
|
|
392
405
|
font-family: var(--sp-font-family-sans);
|
|
393
406
|
font-size: var(--sp-font-md-size);
|
|
@@ -406,13 +419,13 @@
|
|
|
406
419
|
}
|
|
407
420
|
|
|
408
421
|
input,
|
|
409
|
-
button,
|
|
410
422
|
textarea,
|
|
411
423
|
select {
|
|
412
424
|
font: inherit;
|
|
413
425
|
}
|
|
414
426
|
|
|
415
427
|
button {
|
|
428
|
+
font: inherit;
|
|
416
429
|
border: none;
|
|
417
430
|
background: none;
|
|
418
431
|
padding: 0;
|