@phcdevworks/spectre-ui 0.2.2 → 0.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 +18 -1
- package/dist/index.css +1029 -4
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -323,7 +323,24 @@ Designers update tokens in `@phcdevworks/spectre-tokens`. Engineering evolves re
|
|
|
323
323
|
npm run build
|
|
324
324
|
```
|
|
325
325
|
|
|
326
|
-
|
|
326
|
+
The build process consists of two steps:
|
|
327
|
+
|
|
328
|
+
1. **TypeScript & CSS Copy (via tsup):**
|
|
329
|
+
|
|
330
|
+
- Compiles the TypeScript source to ESM, CJS, and type definitions in `dist/`.
|
|
331
|
+
- Copies raw CSS files (`base.css`, `components.css`, `utilities.css`) from `src/styles/` to `dist/`.
|
|
332
|
+
|
|
333
|
+
2. **CSS Bundling (via PostCSS):**
|
|
334
|
+
|
|
335
|
+
- Processes `src/styles/index.css` with PostCSS (including imports and plugins) and outputs the bundled CSS as `dist/index.css`.
|
|
336
|
+
|
|
337
|
+
The `npm run build` script runs both steps in sequence:
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
tsup --config tsup.config.ts && npm run build:css
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
This ensures all JavaScript, type definitions, and CSS bundles are up to date in `dist/` for publishing.
|
|
327
344
|
|
|
328
345
|
For release history and version notes, see the **[Changelog](CHANGELOG.md)**.
|
|
329
346
|
|
package/dist/index.css
CHANGED
|
@@ -2,7 +2,1032 @@
|
|
|
2
2
|
- Tokens first (defines --sp-* vars)
|
|
3
3
|
- Then UI base, components, utilities
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
:root {
|
|
6
|
+
--sp-surface-page: #f8fafc;
|
|
7
|
+
--sp-surface-card: #ffffff;
|
|
8
|
+
--sp-surface-input: #ffffff;
|
|
9
|
+
--sp-surface-overlay: rgba(15,23,42,0.6);
|
|
10
|
+
--sp-text-on-page-default: #0f172a;
|
|
11
|
+
--sp-text-on-page-muted: #475569;
|
|
12
|
+
--sp-text-on-page-meta: #94a3b8;
|
|
13
|
+
--sp-text-on-surface-default: #0f172a;
|
|
14
|
+
--sp-text-on-surface-muted: #6b7280;
|
|
15
|
+
--sp-text-on-surface-meta: #94a3b8;
|
|
16
|
+
--sp-component-card-text: #0f172a;
|
|
17
|
+
--sp-component-card-text-muted: #6b7280;
|
|
18
|
+
--sp-component-input-text: #0f172a;
|
|
19
|
+
--sp-component-input-placeholder: #94a3b8;
|
|
20
|
+
--sp-button-text-default: #0f172a;
|
|
21
|
+
--sp-button-text-on-primary: #ffffff;
|
|
22
|
+
--sp-badge-neutral-bg: #f1f5f9;
|
|
23
|
+
--sp-badge-neutral-text: #334155;
|
|
24
|
+
--sp-badge-info-bg: #dbeafe;
|
|
25
|
+
--sp-badge-info-text: #1d4ed8;
|
|
26
|
+
--sp-badge-success-bg: #dcfce7;
|
|
27
|
+
--sp-badge-success-text: #15803d;
|
|
28
|
+
--sp-badge-warning-bg: #fef3c7;
|
|
29
|
+
--sp-badge-warning-text: #b45309;
|
|
30
|
+
--sp-badge-danger-bg: #fee2e2;
|
|
31
|
+
--sp-badge-danger-text: #b91c1c;
|
|
32
|
+
--sp-icon-box-bg: #ffffff;
|
|
33
|
+
--sp-icon-box-border: #e2e8f0;
|
|
34
|
+
--sp-icon-box-icon-default: #6c32e6;
|
|
35
|
+
--sp-icon-box-icon-success: #16a34a;
|
|
36
|
+
--sp-icon-box-icon-warning: #d97706;
|
|
37
|
+
--sp-icon-box-icon-danger: #dc2626;
|
|
38
|
+
--sp-color-brand-50: #f5f0ff;
|
|
39
|
+
--sp-color-brand-100: #ebe2ff;
|
|
40
|
+
--sp-color-brand-200: #d7c6ff;
|
|
41
|
+
--sp-color-brand-300: #bfa1ff;
|
|
42
|
+
--sp-color-brand-400: #a37aff;
|
|
43
|
+
--sp-color-brand-500: #8652ff;
|
|
44
|
+
--sp-color-brand-600: #6c32e6;
|
|
45
|
+
--sp-color-brand-700: #5626b4;
|
|
46
|
+
--sp-color-brand-800: #3d1b7f;
|
|
47
|
+
--sp-color-brand-900: #241147;
|
|
48
|
+
--sp-color-neutral-50: #f8fafc;
|
|
49
|
+
--sp-color-neutral-100: #f1f5f9;
|
|
50
|
+
--sp-color-neutral-200: #e2e8f0;
|
|
51
|
+
--sp-color-neutral-300: #cbd5f5;
|
|
52
|
+
--sp-color-neutral-400: #94a3b8;
|
|
53
|
+
--sp-color-neutral-500: #64748b;
|
|
54
|
+
--sp-color-neutral-600: #475569;
|
|
55
|
+
--sp-color-neutral-700: #334155;
|
|
56
|
+
--sp-color-neutral-800: #1e293b;
|
|
57
|
+
--sp-color-neutral-900: #0f172a;
|
|
58
|
+
--sp-color-accent-50: #e5fff8;
|
|
59
|
+
--sp-color-accent-100: #b8ffed;
|
|
60
|
+
--sp-color-accent-200: #89ffe1;
|
|
61
|
+
--sp-color-accent-300: #59ffd6;
|
|
62
|
+
--sp-color-accent-400: #29ffca;
|
|
63
|
+
--sp-color-accent-500: #03e6b3;
|
|
64
|
+
--sp-color-accent-600: #00b389;
|
|
65
|
+
--sp-color-accent-700: #008060;
|
|
66
|
+
--sp-color-accent-800: #004d38;
|
|
67
|
+
--sp-color-accent-900: #002a20;
|
|
68
|
+
--sp-color-success-50: #f0fdf4;
|
|
69
|
+
--sp-color-success-100: #dcfce7;
|
|
70
|
+
--sp-color-success-200: #bbf7d0;
|
|
71
|
+
--sp-color-success-300: #86efac;
|
|
72
|
+
--sp-color-success-400: #4ade80;
|
|
73
|
+
--sp-color-success-500: #22c55e;
|
|
74
|
+
--sp-color-success-600: #16a34a;
|
|
75
|
+
--sp-color-success-700: #15803d;
|
|
76
|
+
--sp-color-success-800: #166534;
|
|
77
|
+
--sp-color-success-900: #14532d;
|
|
78
|
+
--sp-color-warning-50: #fffbeb;
|
|
79
|
+
--sp-color-warning-100: #fef3c7;
|
|
80
|
+
--sp-color-warning-200: #fde68a;
|
|
81
|
+
--sp-color-warning-300: #fcd34d;
|
|
82
|
+
--sp-color-warning-400: #fbbf24;
|
|
83
|
+
--sp-color-warning-500: #f59e0b;
|
|
84
|
+
--sp-color-warning-600: #d97706;
|
|
85
|
+
--sp-color-warning-700: #b45309;
|
|
86
|
+
--sp-color-warning-800: #92400e;
|
|
87
|
+
--sp-color-warning-900: #78350f;
|
|
88
|
+
--sp-color-error-50: #fef2f2;
|
|
89
|
+
--sp-color-error-100: #fee2e2;
|
|
90
|
+
--sp-color-error-200: #fecaca;
|
|
91
|
+
--sp-color-error-300: #fca5a5;
|
|
92
|
+
--sp-color-error-400: #f87171;
|
|
93
|
+
--sp-color-error-500: #ef4444;
|
|
94
|
+
--sp-color-error-600: #dc2626;
|
|
95
|
+
--sp-color-error-700: #b91c1c;
|
|
96
|
+
--sp-color-error-800: #991b1b;
|
|
97
|
+
--sp-color-error-900: #7f1d1d;
|
|
98
|
+
--sp-color-info-50: #eff6ff;
|
|
99
|
+
--sp-color-info-100: #dbeafe;
|
|
100
|
+
--sp-color-info-200: #bfdbfe;
|
|
101
|
+
--sp-color-info-300: #93c5fd;
|
|
102
|
+
--sp-color-info-400: #60a5fa;
|
|
103
|
+
--sp-color-info-500: #3b82f6;
|
|
104
|
+
--sp-color-info-600: #2563eb;
|
|
105
|
+
--sp-color-info-700: #1d4ed8;
|
|
106
|
+
--sp-color-info-800: #1e40af;
|
|
107
|
+
--sp-color-info-900: #1e3a8a;
|
|
108
|
+
--sp-color-focus-primary: #8652ff;
|
|
109
|
+
--sp-color-focus-error: #ef4444;
|
|
110
|
+
--sp-color-focus-info: #3b82f6;
|
|
111
|
+
--sp-space-0: 0rem;
|
|
112
|
+
--sp-space-4: 0.25rem;
|
|
113
|
+
--sp-space-8: 0.5rem;
|
|
114
|
+
--sp-space-12: 0.75rem;
|
|
115
|
+
--sp-space-16: 1rem;
|
|
116
|
+
--sp-space-20: 1.25rem;
|
|
117
|
+
--sp-space-24: 1.5rem;
|
|
118
|
+
--sp-space-32: 2rem;
|
|
119
|
+
--sp-space-40: 2.5rem;
|
|
120
|
+
--sp-space-48: 3rem;
|
|
121
|
+
--sp-space-56: 3.5rem;
|
|
122
|
+
--sp-space-64: 4rem;
|
|
123
|
+
--sp-space-80: 5rem;
|
|
124
|
+
--sp-space-96: 6rem;
|
|
125
|
+
--sp-layout-section-padding-sm: 1.5rem;
|
|
126
|
+
--sp-layout-section-padding-md: 2rem;
|
|
127
|
+
--sp-layout-section-padding-lg: 3rem;
|
|
128
|
+
--sp-layout-section-gap-sm: 1rem;
|
|
129
|
+
--sp-layout-section-gap-md: 1.5rem;
|
|
130
|
+
--sp-layout-section-gap-lg: 2rem;
|
|
131
|
+
--sp-layout-stack-gap-sm: 0.5rem;
|
|
132
|
+
--sp-layout-stack-gap-md: 0.75rem;
|
|
133
|
+
--sp-layout-stack-gap-lg: 1rem;
|
|
134
|
+
--sp-layout-container-padding-inline-sm: 1rem;
|
|
135
|
+
--sp-layout-container-padding-inline-md: 1.5rem;
|
|
136
|
+
--sp-layout-container-padding-inline-lg: 2rem;
|
|
137
|
+
--sp-radius-none: 0;
|
|
138
|
+
--sp-radius-sm: 2px;
|
|
139
|
+
--sp-radius-md: 4px;
|
|
140
|
+
--sp-radius-lg: 8px;
|
|
141
|
+
--sp-radius-pill: 999px;
|
|
142
|
+
--sp-font-family-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
|
|
143
|
+
--sp-font-family-serif: 'Spectre Serif', 'Georgia', serif;
|
|
144
|
+
--sp-font-family-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
|
|
145
|
+
--sp-font-xs-size: 0.75rem;
|
|
146
|
+
--sp-font-xs-line-height: 1.25rem;
|
|
147
|
+
--sp-font-xs-weight: 400;
|
|
148
|
+
--sp-font-sm-size: 0.875rem;
|
|
149
|
+
--sp-font-sm-line-height: 1.5rem;
|
|
150
|
+
--sp-font-sm-weight: 400;
|
|
151
|
+
--sp-font-md-size: 1rem;
|
|
152
|
+
--sp-font-md-line-height: 1.75rem;
|
|
153
|
+
--sp-font-md-weight: 500;
|
|
154
|
+
--sp-font-lg-size: 1.25rem;
|
|
155
|
+
--sp-font-lg-line-height: 2rem;
|
|
156
|
+
--sp-font-lg-weight: 500;
|
|
157
|
+
--sp-font-xl-size: 1.5rem;
|
|
158
|
+
--sp-font-xl-line-height: 2.125rem;
|
|
159
|
+
--sp-font-xl-weight: 600;
|
|
160
|
+
--sp-font-2xl-size: 1.875rem;
|
|
161
|
+
--sp-font-2xl-line-height: 2.5rem;
|
|
162
|
+
--sp-font-2xl-weight: 600;
|
|
163
|
+
--sp-font-xs-letter-spacing: 0.02em;
|
|
164
|
+
--sp-text-on-page-default: #0f172a;
|
|
165
|
+
--sp-text-on-page-muted: #475569;
|
|
166
|
+
--sp-text-on-surface-default: #0f172a;
|
|
167
|
+
--sp-text-on-surface-muted: #6b7280;
|
|
168
|
+
--sp-text-on-surface-meta: #94a3b8;
|
|
169
|
+
--sp-badge-neutral-bg: #f1f5f9;
|
|
170
|
+
--sp-badge-neutral-text: #334155;
|
|
171
|
+
--sp-badge-info-bg: #dbeafe;
|
|
172
|
+
--sp-badge-info-text: #1d4ed8;
|
|
173
|
+
--sp-badge-success-bg: #dcfce7;
|
|
174
|
+
--sp-badge-success-text: #15803d;
|
|
175
|
+
--sp-badge-warning-bg: #fef3c7;
|
|
176
|
+
--sp-badge-warning-text: #b45309;
|
|
177
|
+
--sp-badge-danger-bg: #fee2e2;
|
|
178
|
+
--sp-badge-danger-text: #b91c1c;
|
|
179
|
+
--sp-icon-box-bg: #ffffff;
|
|
180
|
+
--sp-icon-box-border: #e2e8f0;
|
|
181
|
+
--sp-icon-box-icon-default: #6c32e6;
|
|
182
|
+
--sp-icon-box-icon-success: #16a34a;
|
|
183
|
+
--sp-icon-box-icon-warning: #d97706;
|
|
184
|
+
--sp-icon-box-icon-danger: #dc2626;
|
|
185
|
+
--sp-shadow-none: none;
|
|
186
|
+
--sp-shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.08);
|
|
187
|
+
--sp-shadow-md: 0 3px 8px -1px rgba(15, 23, 42, 0.1);
|
|
188
|
+
--sp-shadow-lg: 0 8px 20px -4px rgba(15, 23, 42, 0.18);
|
|
189
|
+
--sp-breakpoint-sm: 640px;
|
|
190
|
+
--sp-breakpoint-md: 768px;
|
|
191
|
+
--sp-breakpoint-lg: 1024px;
|
|
192
|
+
--sp-breakpoint-xl: 1280px;
|
|
193
|
+
--sp-breakpoint-2xl: 1536px;
|
|
194
|
+
--sp-z-index-base: 0;
|
|
195
|
+
--sp-z-index-dropdown: 1000;
|
|
196
|
+
--sp-z-index-sticky: 1100;
|
|
197
|
+
--sp-z-index-fixed: 1200;
|
|
198
|
+
--sp-z-index-overlay: 1300;
|
|
199
|
+
--sp-z-index-modal: 1400;
|
|
200
|
+
--sp-z-index-popover: 1500;
|
|
201
|
+
--sp-z-index-tooltip: 1600;
|
|
202
|
+
--sp-duration-instant: 75ms;
|
|
203
|
+
--sp-duration-fast: 150ms;
|
|
204
|
+
--sp-duration-base: 200ms;
|
|
205
|
+
--sp-duration-moderate: 300ms;
|
|
206
|
+
--sp-duration-slow: 500ms;
|
|
207
|
+
--sp-duration-slower: 700ms;
|
|
208
|
+
--sp-easing-linear: linear;
|
|
209
|
+
--sp-easing-in: cubic-bezier(0.4, 0, 1, 1);
|
|
210
|
+
--sp-easing-out: cubic-bezier(0, 0, 0.2, 1);
|
|
211
|
+
--sp-easing-inout: cubic-bezier(0.4, 0, 0.2, 1);
|
|
212
|
+
--sp-easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
213
|
+
--sp-opacity-disabled: 0.38;
|
|
214
|
+
--sp-opacity-hover: 0.92;
|
|
215
|
+
--sp-opacity-active: 0.84;
|
|
216
|
+
--sp-opacity-focus: 1;
|
|
217
|
+
--sp-opacity-overlay: 0.5;
|
|
218
|
+
--sp-opacity-tooltip: 0.95;
|
|
219
|
+
--sp-focus-ring-width: 2px;
|
|
220
|
+
--sp-focus-ring-offset: 2px;
|
|
221
|
+
--sp-focus-ring-style: solid;
|
|
222
|
+
--sp-min-touch-target: 44px;
|
|
223
|
+
--sp-min-text-size: 16px;
|
|
224
|
+
--sp-button-primary-bg: #8652ff;
|
|
225
|
+
--sp-button-primary-bghover: #6c32e6;
|
|
226
|
+
--sp-button-primary-bgactive: #5626b4;
|
|
227
|
+
--sp-button-primary-bgdisabled: #cbd5f5;
|
|
228
|
+
--sp-button-primary-text: #ffffff;
|
|
229
|
+
--sp-button-primary-textdisabled: #94a3b8;
|
|
230
|
+
--sp-button-secondary-bg: #ffffff;
|
|
231
|
+
--sp-button-secondary-bghover: #f1f5f9;
|
|
232
|
+
--sp-button-secondary-bgactive: #e2e8f0;
|
|
233
|
+
--sp-button-secondary-bgdisabled: #f8fafc;
|
|
234
|
+
--sp-button-secondary-text: #8652ff;
|
|
235
|
+
--sp-button-secondary-textdisabled: #94a3b8;
|
|
236
|
+
--sp-button-secondary-border: #8652ff;
|
|
237
|
+
--sp-button-secondary-borderdisabled: #cbd5f5;
|
|
238
|
+
--sp-button-ghost-bg: transparent;
|
|
239
|
+
--sp-button-ghost-bghover: #f5f0ff;
|
|
240
|
+
--sp-button-ghost-bgactive: #ebe2ff;
|
|
241
|
+
--sp-button-ghost-bgdisabled: transparent;
|
|
242
|
+
--sp-button-ghost-text: #8652ff;
|
|
243
|
+
--sp-button-ghost-textdisabled: #94a3b8;
|
|
244
|
+
--sp-button-danger-bg: #ef4444;
|
|
245
|
+
--sp-button-danger-bghover: #dc2626;
|
|
246
|
+
--sp-button-danger-bgactive: #b91c1c;
|
|
247
|
+
--sp-button-danger-bgdisabled: #fecaca;
|
|
248
|
+
--sp-button-danger-text: #ffffff;
|
|
249
|
+
--sp-button-danger-textdisabled: #94a3b8;
|
|
250
|
+
--sp-button-success-bg: #22c55e;
|
|
251
|
+
--sp-button-success-bghover: #16a34a;
|
|
252
|
+
--sp-button-success-bgactive: #15803d;
|
|
253
|
+
--sp-button-success-bgdisabled: #bbf7d0;
|
|
254
|
+
--sp-button-success-text: #ffffff;
|
|
255
|
+
--sp-button-success-textdisabled: #94a3b8;
|
|
256
|
+
--sp-form-default-bg: #ffffff;
|
|
257
|
+
--sp-form-default-border: #cbd5f5;
|
|
258
|
+
--sp-form-default-text: #0f172a;
|
|
259
|
+
--sp-form-default-placeholder: #94a3b8;
|
|
260
|
+
--sp-form-hover-border: #8652ff;
|
|
261
|
+
--sp-form-focus-border: #8652ff;
|
|
262
|
+
--sp-form-focus-ring: #8652ff;
|
|
263
|
+
--sp-form-valid-border: #22c55e;
|
|
264
|
+
--sp-form-valid-bg: #f0fdf4;
|
|
265
|
+
--sp-form-valid-text: #15803d;
|
|
266
|
+
--sp-form-invalid-border: #ef4444;
|
|
267
|
+
--sp-form-invalid-bg: #fef2f2;
|
|
268
|
+
--sp-form-invalid-text: #b91c1c;
|
|
269
|
+
--sp-form-disabled-bg: #f8fafc;
|
|
270
|
+
--sp-form-disabled-border: #e2e8f0;
|
|
271
|
+
--sp-form-disabled-text: #94a3b8;
|
|
272
|
+
--sp-animation-fadein-duration: 200ms;
|
|
273
|
+
--sp-animation-fadein-easing: cubic-bezier(0, 0, 0.2, 1);
|
|
274
|
+
--sp-animation-fadein-keyframes: fade-in;
|
|
275
|
+
--sp-animation-fadeout-duration: 150ms;
|
|
276
|
+
--sp-animation-fadeout-easing: cubic-bezier(0.4, 0, 1, 1);
|
|
277
|
+
--sp-animation-fadeout-keyframes: fade-out;
|
|
278
|
+
--sp-animation-slideup-duration: 300ms;
|
|
279
|
+
--sp-animation-slideup-easing: cubic-bezier(0, 0, 0.2, 1);
|
|
280
|
+
--sp-animation-slideup-keyframes: slide-up;
|
|
281
|
+
--sp-animation-slidedown-duration: 300ms;
|
|
282
|
+
--sp-animation-slidedown-easing: cubic-bezier(0, 0, 0.2, 1);
|
|
283
|
+
--sp-animation-slidedown-keyframes: slide-down;
|
|
284
|
+
--sp-animation-scalein-duration: 200ms;
|
|
285
|
+
--sp-animation-scalein-easing: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
286
|
+
--sp-animation-scalein-keyframes: scale-in;
|
|
287
|
+
--sp-animation-bounce-duration: 500ms;
|
|
288
|
+
--sp-animation-bounce-easing: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
289
|
+
--sp-animation-bounce-keyframes: bounce;
|
|
290
|
+
--sp-animation-shake-duration: 400ms;
|
|
291
|
+
--sp-animation-shake-easing: cubic-bezier(0.4, 0, 0.2, 1);
|
|
292
|
+
--sp-animation-shake-keyframes: shake;
|
|
293
|
+
--sp-animation-pulse-duration: 1500ms;
|
|
294
|
+
--sp-animation-pulse-easing: cubic-bezier(0.4, 0, 0.2, 1);
|
|
295
|
+
--sp-animation-pulse-keyframes: pulse;
|
|
296
|
+
}
|
|
297
|
+
:root[data-spectre-theme="dark"] {
|
|
298
|
+
--sp-surface-page: #0f172a;
|
|
299
|
+
--sp-surface-card: #1e293b;
|
|
300
|
+
--sp-surface-input: #334155;
|
|
301
|
+
--sp-surface-overlay: #1e293b;
|
|
302
|
+
--sp-text-on-page-default: #f8fafc;
|
|
303
|
+
--sp-text-on-page-muted: #cbd5f5;
|
|
304
|
+
--sp-text-on-page-meta: #94a3b8;
|
|
305
|
+
--sp-text-on-surface-default: #f1f5f9;
|
|
306
|
+
--sp-text-on-surface-muted: #cbd5f5;
|
|
307
|
+
--sp-text-on-surface-meta: #94a3b8;
|
|
308
|
+
--sp-component-card-text: #f1f5f9;
|
|
309
|
+
--sp-component-card-text-muted: #cbd5f5;
|
|
310
|
+
--sp-component-input-text: #f1f5f9;
|
|
311
|
+
--sp-component-input-placeholder: #94a3b8;
|
|
312
|
+
--sp-button-text-default: #f1f5f9;
|
|
313
|
+
--sp-button-text-on-primary: #ffffff;
|
|
314
|
+
--sp-badge-neutral-bg: #334155;
|
|
315
|
+
--sp-badge-neutral-text: #f1f5f9;
|
|
316
|
+
--sp-badge-info-bg: #1e40af;
|
|
317
|
+
--sp-badge-info-text: #dbeafe;
|
|
318
|
+
--sp-badge-success-bg: #166534;
|
|
319
|
+
--sp-badge-success-text: #dcfce7;
|
|
320
|
+
--sp-badge-warning-bg: #92400e;
|
|
321
|
+
--sp-badge-warning-text: #fef3c7;
|
|
322
|
+
--sp-badge-danger-bg: #991b1b;
|
|
323
|
+
--sp-badge-danger-text: #fee2e2;
|
|
324
|
+
--sp-icon-box-bg: #1e293b;
|
|
325
|
+
--sp-icon-box-border: #334155;
|
|
326
|
+
--sp-icon-box-icon-default: #a37aff;
|
|
327
|
+
--sp-icon-box-icon-success: #4ade80;
|
|
328
|
+
--sp-icon-box-icon-warning: #fbbf24;
|
|
329
|
+
--sp-icon-box-icon-danger: #f87171;
|
|
330
|
+
}
|
|
331
|
+
@layer base {
|
|
332
|
+
|
|
333
|
+
*,
|
|
334
|
+
*::before,
|
|
335
|
+
*::after {
|
|
336
|
+
box-sizing: border-box;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
html,
|
|
340
|
+
body {
|
|
341
|
+
margin: 0;
|
|
342
|
+
padding: 0;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
body {
|
|
346
|
+
min-height: 100vh;
|
|
347
|
+
font-family: var(--sp-font-family-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
|
|
348
|
+
font-size: var(--sp-font-md-size, 1rem);
|
|
349
|
+
line-height: var(--sp-font-md-line-height, 1.5);
|
|
350
|
+
color: var(--sp-text-on-page-default);
|
|
351
|
+
background-color: var(--sp-surface-page);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
img,
|
|
355
|
+
picture,
|
|
356
|
+
video,
|
|
357
|
+
canvas,
|
|
358
|
+
svg {
|
|
359
|
+
display: block;
|
|
360
|
+
max-width: 100%;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
input,
|
|
364
|
+
button,
|
|
365
|
+
textarea,
|
|
366
|
+
select {
|
|
367
|
+
font: inherit;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
button {
|
|
371
|
+
border: none;
|
|
372
|
+
background: none;
|
|
373
|
+
padding: 0;
|
|
374
|
+
cursor: pointer;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
a {
|
|
378
|
+
color: var(--sp-color-brand-600, inherit);
|
|
379
|
+
text-decoration: none;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
a:hover {
|
|
383
|
+
text-decoration: underline;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
:focus-visible {
|
|
387
|
+
outline: var(--sp-focus-ring-width, 2px) solid var(--sp-color-focus-primary,
|
|
388
|
+
var(--sp-color-brand-600, currentColor));
|
|
389
|
+
outline-offset: var(--sp-focus-ring-offset, 2px);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
::selection {
|
|
393
|
+
background-color: var(--sp-color-brand-100, #ebe2ff);
|
|
394
|
+
color: inherit;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
@layer components {
|
|
398
|
+
|
|
399
|
+
:root {
|
|
400
|
+
/* button roles */
|
|
401
|
+
--sp-component-button-border-base: var(--sp-component-button-ghost-bg, var(--sp-button-ghost-bg));
|
|
402
|
+
--sp-component-button-shadow: var(--sp-shadow-sm);
|
|
403
|
+
--sp-component-button-primary-bg: var(--sp-button-primary-bg);
|
|
404
|
+
--sp-component-button-primary-bg-hover: var(--sp-button-primary-bghover);
|
|
405
|
+
--sp-component-button-primary-bg-active: var(--sp-button-primary-bgactive);
|
|
406
|
+
--sp-component-button-primary-bg-disabled: var(--sp-button-primary-bgdisabled);
|
|
407
|
+
--sp-component-button-primary-text: var(--sp-button-primary-text);
|
|
408
|
+
--sp-component-button-primary-text-disabled: var(--sp-button-primary-textdisabled);
|
|
409
|
+
--sp-component-button-secondary-bg: var(--sp-button-secondary-bg);
|
|
410
|
+
--sp-component-button-secondary-bg-hover: var(--sp-button-secondary-bghover);
|
|
411
|
+
--sp-component-button-secondary-bg-active: var(--sp-button-secondary-bgactive);
|
|
412
|
+
--sp-component-button-secondary-bg-disabled: var(--sp-button-secondary-bgdisabled);
|
|
413
|
+
--sp-component-button-secondary-text: var(--sp-button-secondary-text);
|
|
414
|
+
--sp-component-button-secondary-text-disabled: var(--sp-button-secondary-textdisabled);
|
|
415
|
+
--sp-component-button-secondary-border: var(--sp-button-secondary-border);
|
|
416
|
+
--sp-component-button-secondary-border-disabled: var(--sp-button-secondary-borderdisabled);
|
|
417
|
+
--sp-component-button-ghost-bg: var(--sp-button-ghost-bg);
|
|
418
|
+
--sp-component-button-ghost-bg-hover: var(--sp-button-ghost-bghover);
|
|
419
|
+
--sp-component-button-ghost-bg-active: var(--sp-button-ghost-bgactive);
|
|
420
|
+
--sp-component-button-ghost-bg-disabled: var(--sp-button-ghost-bgdisabled);
|
|
421
|
+
--sp-component-button-ghost-text: var(--sp-button-ghost-text);
|
|
422
|
+
--sp-component-button-ghost-text-disabled: var(--sp-button-ghost-textdisabled);
|
|
423
|
+
--sp-component-button-danger-bg: var(--sp-button-danger-bg);
|
|
424
|
+
--sp-component-button-danger-bg-hover: var(--sp-button-danger-bghover);
|
|
425
|
+
--sp-component-button-danger-bg-active: var(--sp-button-danger-bgactive);
|
|
426
|
+
--sp-component-button-danger-bg-disabled: var(--sp-button-danger-bgdisabled);
|
|
427
|
+
--sp-component-button-danger-text: var(--sp-button-danger-text);
|
|
428
|
+
--sp-component-button-danger-text-disabled: var(--sp-button-danger-textdisabled);
|
|
429
|
+
--sp-component-button-success-bg: var(--sp-button-success-bg);
|
|
430
|
+
--sp-component-button-success-bg-hover: var(--sp-button-success-bghover);
|
|
431
|
+
--sp-component-button-success-bg-active: var(--sp-button-success-bgactive);
|
|
432
|
+
--sp-component-button-success-bg-disabled: var(--sp-button-success-bgdisabled);
|
|
433
|
+
--sp-component-button-success-text: var(--sp-button-success-text);
|
|
434
|
+
--sp-component-button-success-text-disabled: var(--sp-button-success-textdisabled);
|
|
435
|
+
|
|
436
|
+
/* card roles */
|
|
437
|
+
--sp-component-card-bg: var(--sp-surface-card, var(--sp-color-neutral-50));
|
|
438
|
+
--sp-component-card-text: var(--sp-text-on-surface-default, var(--sp-color-neutral-900));
|
|
439
|
+
--sp-component-card-text-muted: var(--sp-text-on-surface-muted, var(--sp-color-neutral-600));
|
|
440
|
+
--sp-component-card-border: var(--sp-color-neutral-200);
|
|
441
|
+
--sp-component-card-border-base: var(--sp-component-card-ghost-border, var(--sp-component-card-bg));
|
|
442
|
+
--sp-component-card-shadow: var(--sp-shadow-sm);
|
|
443
|
+
--sp-component-card-shadow-elevated: var(--sp-shadow-lg);
|
|
444
|
+
--sp-component-card-shadow-flat: var(--sp-shadow-none);
|
|
445
|
+
--sp-component-card-shadow-outline: var(--sp-shadow-none);
|
|
446
|
+
--sp-component-card-shadow-ghost: var(--sp-shadow-none);
|
|
447
|
+
--sp-component-card-outline-bg: var(--sp-component-card-bg);
|
|
448
|
+
--sp-component-card-outline-border: var(--sp-component-card-border);
|
|
449
|
+
--sp-component-card-ghost-bg: var(--sp-component-button-ghost-bg, var(--sp-button-ghost-bg));
|
|
450
|
+
--sp-component-card-ghost-border: var(--sp-component-card-ghost-bg);
|
|
451
|
+
|
|
452
|
+
/* input roles */
|
|
453
|
+
--sp-component-input-role-border: var(--sp-component-input-border,
|
|
454
|
+
var(--sp-surface-input, var(--sp-color-neutral-200, #e2e8f0)));
|
|
455
|
+
--sp-component-input-role-bg: var(--sp-component-input-bg,
|
|
456
|
+
var(--sp-surface-input, var(--sp-color-neutral-50, #f8fafc)));
|
|
457
|
+
--sp-component-input-role-text: var(--sp-component-input-text,
|
|
458
|
+
var(--sp-text-on-surface-default, var(--sp-color-neutral-900, #0f172a)));
|
|
459
|
+
--sp-component-input-role-placeholder: var(--sp-component-input-placeholder,
|
|
460
|
+
var(--sp-text-on-surface-muted, var(--sp-color-neutral-500, #64748b)));
|
|
461
|
+
--sp-component-input-role-border-focus: var(--sp-component-input-border-focus,
|
|
462
|
+
var(--sp-color-brand-500, #8652ff));
|
|
463
|
+
--sp-component-input-role-ring: var(--sp-component-input-ring,
|
|
464
|
+
var(--sp-color-brand-500, #8652ff));
|
|
465
|
+
--sp-component-input-role-border-error: var(--sp-component-input-border-error,
|
|
466
|
+
var(--sp-color-error-500, #ef4444));
|
|
467
|
+
--sp-component-input-role-bg-error: var(--sp-component-input-bg-error,
|
|
468
|
+
var(--sp-color-error-50, #fef2f2));
|
|
469
|
+
--sp-component-input-role-text-error: var(--sp-component-input-text-error,
|
|
470
|
+
var(--sp-color-error-700, #b91c1c));
|
|
471
|
+
--sp-component-input-role-border-success: var(--sp-component-input-border-success,
|
|
472
|
+
var(--sp-color-success-500, #22c55e));
|
|
473
|
+
--sp-component-input-role-bg-success: var(--sp-component-input-bg-success,
|
|
474
|
+
var(--sp-color-success-50, #f0fdf4));
|
|
475
|
+
--sp-component-input-role-text-success: var(--sp-component-input-text-success,
|
|
476
|
+
var(--sp-color-success-700, #15803d));
|
|
477
|
+
--sp-component-input-role-bg-disabled: var(--sp-component-input-bg-disabled,
|
|
478
|
+
var(--sp-surface-input, var(--sp-color-neutral-50, #f8fafc)));
|
|
479
|
+
--sp-component-input-role-text-disabled: var(--sp-component-input-text-disabled,
|
|
480
|
+
var(--sp-text-on-surface-muted, var(--sp-color-neutral-400, #94a3b8)));
|
|
481
|
+
--sp-component-input-role-border-disabled: var(--sp-component-input-border-disabled,
|
|
482
|
+
var(--sp-surface-input, var(--sp-color-neutral-200, #e2e8f0)));
|
|
483
|
+
|
|
484
|
+
/* badge roles */
|
|
485
|
+
--sp-component-badge-font: var(--sp-font-family-sans, system-ui);
|
|
486
|
+
--sp-component-badge-weight: var(--sp-font-sm-weight, 500);
|
|
487
|
+
--sp-component-badge-gap: var(--sp-space-4xs, 0.125rem);
|
|
488
|
+
--sp-component-badge-radius: var(--sp-radius-pill, 999px);
|
|
489
|
+
--sp-component-badge-primary-bg: var(--sp-badge-primary-bg,
|
|
490
|
+
var(--sp-color-brand-500, #8652ff));
|
|
491
|
+
--sp-component-badge-primary-text: var(--sp-badge-primary-text,
|
|
492
|
+
var(--sp-text-on-surface-default, var(--sp-color-neutral-900, #0f172a)));
|
|
493
|
+
--sp-component-badge-success-bg: var(--sp-badge-success-bg,
|
|
494
|
+
var(--sp-color-success-500, #22c55e));
|
|
495
|
+
--sp-component-badge-success-text: var(--sp-badge-success-text,
|
|
496
|
+
var(--sp-text-on-surface-default, var(--sp-color-neutral-900, #0f172a)));
|
|
497
|
+
--sp-component-badge-warning-bg: var(--sp-badge-warning-bg,
|
|
498
|
+
var(--sp-color-warning-500, #f59e0b));
|
|
499
|
+
--sp-component-badge-warning-text: var(--sp-badge-warning-text,
|
|
500
|
+
var(--sp-text-on-surface-default, var(--sp-color-neutral-900, #0f172a)));
|
|
501
|
+
--sp-component-badge-danger-bg: var(--sp-badge-danger-bg,
|
|
502
|
+
var(--sp-color-error-500, #ef4444));
|
|
503
|
+
--sp-component-badge-danger-text: var(--sp-badge-danger-text,
|
|
504
|
+
var(--sp-text-on-surface-default, var(--sp-color-neutral-900, #0f172a)));
|
|
505
|
+
--sp-component-badge-padding-x-sm: var(--sp-space-xs, 0.5rem);
|
|
506
|
+
--sp-component-badge-padding-x-md: var(--sp-space-sm, 0.75rem);
|
|
507
|
+
--sp-component-badge-padding-x-lg: var(--sp-space-md, 1rem);
|
|
508
|
+
--sp-component-badge-padding-y-sm: var(--sp-space-4xs, 0.125rem);
|
|
509
|
+
--sp-component-badge-padding-y-md: var(--sp-space-3xs, 0.1875rem);
|
|
510
|
+
--sp-component-badge-padding-y-lg: var(--sp-space-2xs, 0.25rem);
|
|
511
|
+
|
|
512
|
+
/* icon box roles */
|
|
513
|
+
--sp-component-iconbox-radius: var(--sp-radius-lg, 8px);
|
|
514
|
+
--sp-component-iconbox-size-sm: var(--sp-space-xl, 2rem);
|
|
515
|
+
--sp-component-iconbox-size-md: var(--sp-space-2xl, 3rem);
|
|
516
|
+
--sp-component-iconbox-size-lg: var(--sp-space-3xl, 4rem);
|
|
517
|
+
--sp-component-iconbox-primary-bg: var(--sp-color-brand-50, #f5f0ff);
|
|
518
|
+
--sp-component-iconbox-primary-text: var(--sp-color-brand-700, #5626b4);
|
|
519
|
+
--sp-component-iconbox-success-bg: var(--sp-color-success-50, #f0fdf4);
|
|
520
|
+
--sp-component-iconbox-success-text: var(--sp-color-success-700, #15803d);
|
|
521
|
+
--sp-component-iconbox-warning-bg: var(--sp-color-warning-50, #fffbeb);
|
|
522
|
+
--sp-component-iconbox-warning-text: var(--sp-color-warning-700, #b45309);
|
|
523
|
+
--sp-component-iconbox-danger-bg: var(--sp-color-error-50, #fef2f2);
|
|
524
|
+
--sp-component-iconbox-danger-text: var(--sp-color-error-700, #b91c1c);
|
|
525
|
+
--sp-component-iconbox-info-bg: var(--sp-color-info-50, #eff6ff);
|
|
526
|
+
--sp-component-iconbox-info-text: var(--sp-color-info-700, #1d4ed8);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/* BUTTONS -------------------------------------------------------------- */
|
|
530
|
+
.sp-btn {
|
|
531
|
+
display: inline-flex;
|
|
532
|
+
align-items: center;
|
|
533
|
+
justify-content: center;
|
|
534
|
+
gap: var(--sp-space-2xs, 0.25rem);
|
|
535
|
+
padding: var(--sp-space-2xs, 0.25rem) var(--sp-space-md, 1rem);
|
|
536
|
+
border-radius: var(--sp-radius-md, 4px);
|
|
537
|
+
border: 1px solid var(--sp-component-button-border-base,
|
|
538
|
+
var(--sp-component-button-ghost-bg, var(--sp-button-ghost-bg)));
|
|
539
|
+
font-family: var(--sp-font-family-sans, system-ui);
|
|
540
|
+
font-size: var(--sp-font-md-size, 1rem);
|
|
541
|
+
line-height: 1;
|
|
542
|
+
font-weight: var(--sp-font-md-weight, 500);
|
|
543
|
+
text-decoration: none;
|
|
544
|
+
appearance: none;
|
|
545
|
+
transition:
|
|
546
|
+
background-color var(--sp-duration-fast, 150ms) var(--sp-easing-out, ease),
|
|
547
|
+
color var(--sp-duration-fast, 150ms) var(--sp-easing-out, ease),
|
|
548
|
+
box-shadow var(--sp-duration-fast, 150ms) var(--sp-easing-out, ease),
|
|
549
|
+
border-color var(--sp-duration-fast, 150ms) var(--sp-easing-out, ease);
|
|
550
|
+
cursor: pointer;
|
|
551
|
+
min-height: var(--sp-min-touch-target, 44px);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.sp-btn:disabled,
|
|
555
|
+
.sp-btn[aria-disabled="true"],
|
|
556
|
+
.sp-btn.sp-btn--disabled {
|
|
557
|
+
cursor: not-allowed;
|
|
558
|
+
opacity: var(--sp-opacity-disabled, 0.5);
|
|
559
|
+
pointer-events: none;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.sp-btn--loading {
|
|
563
|
+
pointer-events: none;
|
|
564
|
+
opacity: var(--sp-opacity-loading, 0.7);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.sp-btn--full {
|
|
568
|
+
width: 100%;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.sp-btn--icon {
|
|
572
|
+
padding-inline: var(--sp-space-sm, 0.75rem);
|
|
573
|
+
padding-block: var(--sp-space-3xs, 0.125rem);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/* sizes */
|
|
577
|
+
.sp-btn--sm {
|
|
578
|
+
padding: var(--sp-space-3xs, 0.125rem) var(--sp-space-sm, 0.75rem);
|
|
579
|
+
font-size: var(--sp-font-sm-size, 0.875rem);
|
|
580
|
+
line-height: var(--sp-font-sm-line-height, 1.5rem);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.sp-btn--md {
|
|
584
|
+
padding: var(--sp-space-2xs, 0.25rem) var(--sp-space-md, 1rem);
|
|
585
|
+
font-size: var(--sp-font-md-size, 1rem);
|
|
586
|
+
line-height: var(--sp-font-md-line-height, 1.75rem);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.sp-btn--lg {
|
|
590
|
+
padding: var(--sp-space-xs, 0.5rem) var(--sp-space-lg, 1.5rem);
|
|
591
|
+
font-size: var(--sp-font-lg-size, 1.125rem);
|
|
592
|
+
line-height: var(--sp-font-lg-line-height, 1.75rem);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/* primary */
|
|
596
|
+
.sp-btn--primary {
|
|
597
|
+
background-color: var(--sp-component-button-primary-bg);
|
|
598
|
+
color: var(--sp-component-button-primary-text);
|
|
599
|
+
box-shadow: var(--sp-component-button-shadow,
|
|
600
|
+
var(--sp-shadow-sm));
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.sp-btn--primary.sp-btn--hover,
|
|
604
|
+
.sp-btn--primary:hover {
|
|
605
|
+
background-color: var(--sp-component-button-primary-bg-hover);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.sp-btn--primary.sp-btn--active,
|
|
609
|
+
.sp-btn--primary:active {
|
|
610
|
+
background-color: var(--sp-component-button-primary-bg-active);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.sp-btn--primary.sp-btn--disabled,
|
|
614
|
+
.sp-btn--primary:disabled {
|
|
615
|
+
background-color: var(--sp-component-button-primary-bg-disabled);
|
|
616
|
+
color: var(--sp-component-button-primary-text-disabled);
|
|
617
|
+
box-shadow: none;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/* secondary */
|
|
621
|
+
.sp-btn--secondary {
|
|
622
|
+
background-color: var(--sp-component-button-secondary-bg);
|
|
623
|
+
color: var(--sp-component-button-secondary-text);
|
|
624
|
+
border-color: var(--sp-component-button-secondary-border);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
.sp-btn--secondary.sp-btn--hover,
|
|
628
|
+
.sp-btn--secondary:hover {
|
|
629
|
+
background-color: var(--sp-component-button-secondary-bg-hover);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.sp-btn--secondary.sp-btn--active,
|
|
633
|
+
.sp-btn--secondary:active {
|
|
634
|
+
background-color: var(--sp-component-button-secondary-bg-active);
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
.sp-btn--secondary.sp-btn--disabled,
|
|
638
|
+
.sp-btn--secondary:disabled {
|
|
639
|
+
background-color: var(--sp-component-button-secondary-bg-disabled);
|
|
640
|
+
color: var(--sp-component-button-secondary-text-disabled);
|
|
641
|
+
border-color: var(--sp-component-button-secondary-border-disabled);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/* ghost */
|
|
645
|
+
.sp-btn--ghost {
|
|
646
|
+
background-color: var(--sp-component-button-ghost-bg);
|
|
647
|
+
color: var(--sp-component-button-ghost-text);
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.sp-btn--ghost.sp-btn--hover,
|
|
651
|
+
.sp-btn--ghost:hover {
|
|
652
|
+
background-color: var(--sp-component-button-ghost-bg-hover);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.sp-btn--ghost.sp-btn--active,
|
|
656
|
+
.sp-btn--ghost:active {
|
|
657
|
+
background-color: var(--sp-component-button-ghost-bg-active);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
.sp-btn--ghost.sp-btn--disabled,
|
|
661
|
+
.sp-btn--ghost:disabled {
|
|
662
|
+
color: var(--sp-component-button-ghost-text-disabled);
|
|
663
|
+
background-color: var(--sp-component-button-ghost-bg-disabled);
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/* danger */
|
|
667
|
+
.sp-btn--danger {
|
|
668
|
+
background-color: var(--sp-component-button-danger-bg);
|
|
669
|
+
color: var(--sp-component-button-danger-text);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
.sp-btn--danger.sp-btn--hover,
|
|
673
|
+
.sp-btn--danger:hover {
|
|
674
|
+
background-color: var(--sp-component-button-danger-bg-hover);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
.sp-btn--danger.sp-btn--active,
|
|
678
|
+
.sp-btn--danger:active {
|
|
679
|
+
background-color: var(--sp-component-button-danger-bg-active);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.sp-btn--danger.sp-btn--disabled,
|
|
683
|
+
.sp-btn--danger:disabled {
|
|
684
|
+
background-color: var(--sp-component-button-danger-bg-disabled);
|
|
685
|
+
color: var(--sp-component-button-danger-text-disabled);
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
/* success */
|
|
689
|
+
.sp-btn--success {
|
|
690
|
+
background-color: var(--sp-component-button-success-bg);
|
|
691
|
+
color: var(--sp-component-button-success-text);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.sp-btn--success.sp-btn--hover,
|
|
695
|
+
.sp-btn--success:hover {
|
|
696
|
+
background-color: var(--sp-component-button-success-bg-hover);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
.sp-btn--success.sp-btn--active,
|
|
700
|
+
.sp-btn--success:active {
|
|
701
|
+
background-color: var(--sp-component-button-success-bg-active);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.sp-btn--success.sp-btn--disabled,
|
|
705
|
+
.sp-btn--success:disabled {
|
|
706
|
+
background-color: var(--sp-component-button-success-bg-disabled);
|
|
707
|
+
color: var(--sp-component-button-success-text-disabled);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/* INPUTS --------------------------------------------------------------- */
|
|
711
|
+
|
|
712
|
+
.sp-input-wrapper {
|
|
713
|
+
display: grid;
|
|
714
|
+
gap: var(--sp-space-4xs, 0.125rem);
|
|
715
|
+
width: 100%;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.sp-label {
|
|
719
|
+
color: var(--sp-component-input-role-text);
|
|
720
|
+
font-size: var(--sp-font-sm-size, 0.875rem);
|
|
721
|
+
font-weight: var(--sp-font-sm-weight, 500);
|
|
722
|
+
line-height: var(--sp-font-sm-line-height, 1.25rem);
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
.sp-helper-text {
|
|
726
|
+
color: var(--sp-text-on-surface-muted);
|
|
727
|
+
font-size: var(--sp-font-xs-size, 0.75rem);
|
|
728
|
+
line-height: var(--sp-font-xs-line-height, 1rem);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.sp-error-message {
|
|
732
|
+
color: var(--sp-color-error-600, #dc2626);
|
|
733
|
+
font-size: var(--sp-font-xs-size, 0.75rem);
|
|
734
|
+
line-height: var(--sp-font-xs-line-height, 1rem);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.sp-input {
|
|
738
|
+
width: 100%;
|
|
739
|
+
display: block;
|
|
740
|
+
appearance: none;
|
|
741
|
+
padding: var(--sp-space-2xs, 0.25rem) var(--sp-space-md, 1rem);
|
|
742
|
+
border-radius: var(--sp-radius-md, 4px);
|
|
743
|
+
border: 1px solid var(--sp-component-input-role-border);
|
|
744
|
+
background-color: var(--sp-component-input-role-bg);
|
|
745
|
+
color: var(--sp-component-input-role-text);
|
|
746
|
+
font-family: var(--sp-font-family-sans, system-ui);
|
|
747
|
+
font-size: var(--sp-font-md-size, 1rem);
|
|
748
|
+
line-height: var(--sp-font-md-line-height, 1.5rem);
|
|
749
|
+
transition:
|
|
750
|
+
border-color var(--sp-duration-fast, 150ms) var(--sp-easing-out, ease),
|
|
751
|
+
box-shadow var(--sp-duration-fast, 150ms) var(--sp-easing-out, ease),
|
|
752
|
+
background-color var(--sp-duration-fast, 150ms) var(--sp-easing-out, ease);
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.sp-input::placeholder {
|
|
756
|
+
color: var(--sp-component-input-role-placeholder);
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
.sp-input--sm {
|
|
760
|
+
padding: var(--sp-space-3xs, 0.125rem) var(--sp-space-sm, 0.75rem);
|
|
761
|
+
font-size: var(--sp-font-sm-size, 0.875rem);
|
|
762
|
+
line-height: var(--sp-font-sm-line-height, 1.25rem);
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.sp-input--md {
|
|
766
|
+
padding: var(--sp-space-2xs, 0.25rem) var(--sp-space-md, 1rem);
|
|
767
|
+
font-size: var(--sp-font-md-size, 1rem);
|
|
768
|
+
line-height: var(--sp-font-md-line-height, 1.5rem);
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
.sp-input--lg {
|
|
772
|
+
padding: var(--sp-space-xs, 0.5rem) var(--sp-space-lg, 1.5rem);
|
|
773
|
+
font-size: var(--sp-font-lg-size, 1.125rem);
|
|
774
|
+
line-height: var(--sp-font-lg-line-height, 1.75rem);
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.sp-input--full {
|
|
778
|
+
width: 100%;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
.sp-input:focus,
|
|
782
|
+
.sp-input--focus {
|
|
783
|
+
border-color: var(--sp-component-input-role-border-focus);
|
|
784
|
+
box-shadow: 0 0 0 var(--sp-focus-ring-width, 2px) var(--sp-component-input-role-ring);
|
|
785
|
+
outline: none;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
.sp-input--error {
|
|
789
|
+
border-color: var(--sp-component-input-role-border-error);
|
|
790
|
+
background-color: var(--sp-component-input-role-bg-error);
|
|
791
|
+
color: var(--sp-component-input-role-text-error);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
.sp-input--success {
|
|
795
|
+
border-color: var(--sp-component-input-role-border-success);
|
|
796
|
+
background-color: var(--sp-component-input-role-bg-success);
|
|
797
|
+
color: var(--sp-component-input-role-text-success);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
.sp-input--disabled {
|
|
801
|
+
background-color: var(--sp-component-input-role-bg-disabled);
|
|
802
|
+
color: var(--sp-component-input-role-text-disabled);
|
|
803
|
+
border-color: var(--sp-component-input-role-border-disabled);
|
|
804
|
+
cursor: not-allowed;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
.sp-input--disabled,
|
|
808
|
+
.sp-input--disabled:focus {
|
|
809
|
+
box-shadow: none;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
/* CARDS ---------------------------------------------------------------- */
|
|
813
|
+
|
|
814
|
+
.sp-card {
|
|
815
|
+
background-color: var(--sp-component-card-bg);
|
|
816
|
+
color: var(--sp-component-card-text);
|
|
817
|
+
border-radius: var(--sp-radius-lg, 8px);
|
|
818
|
+
padding: var(--sp-space-lg, 1.5rem);
|
|
819
|
+
box-shadow: var(--sp-component-card-shadow, var(--sp-shadow-sm));
|
|
820
|
+
border: 1px solid var(--sp-component-card-border-base,
|
|
821
|
+
var(--sp-component-card-ghost-border, var(--sp-component-card-bg)));
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
.sp-card p,
|
|
825
|
+
.sp-card span {
|
|
826
|
+
color: var(--sp-component-card-text-muted);
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
.sp-card h3,
|
|
830
|
+
.sp-card h4 {
|
|
831
|
+
color: var(--sp-component-card-text);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
.sp-card--elevated {
|
|
835
|
+
box-shadow: var(--sp-component-card-shadow-elevated, var(--sp-shadow-lg));
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
.sp-card--flat {
|
|
839
|
+
box-shadow: var(--sp-component-card-shadow-flat, var(--sp-shadow-none));
|
|
840
|
+
border-color: var(--sp-component-card-border);
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
.sp-card--outline {
|
|
844
|
+
background-color: var(--sp-component-card-outline-bg, var(--sp-component-card-bg));
|
|
845
|
+
border-color: var(--sp-component-card-outline-border, var(--sp-component-card-border));
|
|
846
|
+
box-shadow: var(--sp-component-card-shadow-outline, var(--sp-shadow-none));
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.sp-card--ghost {
|
|
850
|
+
background-color: var(--sp-component-card-ghost-bg);
|
|
851
|
+
border-color: var(--sp-component-card-ghost-border);
|
|
852
|
+
box-shadow: var(--sp-component-card-shadow-ghost, var(--sp-shadow-none));
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
.sp-card--padded {
|
|
856
|
+
padding: var(--sp-space-xl, 2rem);
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.sp-card--full {
|
|
860
|
+
height: 100%;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
.sp-card--interactive {
|
|
864
|
+
cursor: pointer;
|
|
865
|
+
transition:
|
|
866
|
+
transform var(--sp-duration-fast, 150ms) var(--sp-easing-out, ease),
|
|
867
|
+
box-shadow var(--sp-duration-fast, 150ms) var(--sp-easing-out, ease);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
.sp-card--interactive:hover,
|
|
871
|
+
.sp-card--interactive:focus-visible,
|
|
872
|
+
.sp-card--interactive:focus-within {
|
|
873
|
+
transform: translateY(-1px);
|
|
874
|
+
box-shadow: var(--sp-component-card-shadow-elevated, var(--sp-shadow-lg));
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
/* BADGES --------------------------------------------------------------- */
|
|
878
|
+
|
|
879
|
+
.sp-badge {
|
|
880
|
+
display: inline-flex;
|
|
881
|
+
align-items: center;
|
|
882
|
+
justify-content: center;
|
|
883
|
+
gap: var(--sp-component-badge-gap, var(--sp-space-4xs, 0.125rem));
|
|
884
|
+
border-radius: var(--sp-component-badge-radius, var(--sp-radius-pill, 999px));
|
|
885
|
+
font-family: var(--sp-component-badge-font, var(--sp-font-family-sans, system-ui));
|
|
886
|
+
font-weight: var(--sp-component-badge-weight, var(--sp-font-sm-weight, 500));
|
|
887
|
+
padding: var(--sp-component-badge-padding-y-md, var(--sp-space-3xs, 0.1875rem))
|
|
888
|
+
var(--sp-component-badge-padding-x-md, var(--sp-space-sm, 0.75rem));
|
|
889
|
+
font-size: var(--sp-font-sm-size, 0.875rem);
|
|
890
|
+
line-height: var(--sp-font-sm-line-height, 1.5rem);
|
|
891
|
+
border: 1px solid transparent;
|
|
892
|
+
white-space: nowrap;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
.sp-badge--sm {
|
|
896
|
+
padding: var(--sp-component-badge-padding-y-sm, var(--sp-space-4xs, 0.125rem))
|
|
897
|
+
var(--sp-component-badge-padding-x-sm, var(--sp-space-xs, 0.5rem));
|
|
898
|
+
font-size: var(--sp-font-xs-size, 0.75rem);
|
|
899
|
+
line-height: var(--sp-font-xs-line-height, 1.25rem);
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
.sp-badge--md {
|
|
903
|
+
padding: var(--sp-component-badge-padding-y-md, var(--sp-space-3xs, 0.1875rem))
|
|
904
|
+
var(--sp-component-badge-padding-x-md, var(--sp-space-sm, 0.75rem));
|
|
905
|
+
font-size: var(--sp-font-sm-size, 0.875rem);
|
|
906
|
+
line-height: var(--sp-font-sm-line-height, 1.5rem);
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
.sp-badge--lg {
|
|
910
|
+
padding: var(--sp-component-badge-padding-y-lg, var(--sp-space-2xs, 0.25rem))
|
|
911
|
+
var(--sp-component-badge-padding-x-lg, var(--sp-space-md, 1rem));
|
|
912
|
+
font-size: var(--sp-font-md-size, 1rem);
|
|
913
|
+
line-height: var(--sp-font-md-line-height, 1.75rem);
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
.sp-badge--primary {
|
|
917
|
+
background-color: var(--sp-component-badge-primary-bg);
|
|
918
|
+
color: var(--sp-component-badge-primary-text);
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
.sp-badge--success {
|
|
922
|
+
background-color: var(--sp-component-badge-success-bg);
|
|
923
|
+
color: var(--sp-component-badge-success-text);
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
.sp-badge--warning {
|
|
927
|
+
background-color: var(--sp-component-badge-warning-bg);
|
|
928
|
+
color: var(--sp-component-badge-warning-text);
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
.sp-badge--danger {
|
|
932
|
+
background-color: var(--sp-component-badge-danger-bg);
|
|
933
|
+
color: var(--sp-component-badge-danger-text);
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
/* ICON BOXES ----------------------------------------------------------- */
|
|
937
|
+
|
|
938
|
+
.sp-iconbox {
|
|
939
|
+
display: inline-flex;
|
|
940
|
+
align-items: center;
|
|
941
|
+
justify-content: center;
|
|
942
|
+
border-radius: var(--sp-component-iconbox-radius, var(--sp-radius-lg, 8px));
|
|
943
|
+
color: var(--sp-component-iconbox-primary-text);
|
|
944
|
+
background-color: var(--sp-component-iconbox-primary-bg);
|
|
945
|
+
font-family: var(--sp-font-family-sans, system-ui);
|
|
946
|
+
font-weight: var(--sp-font-md-weight, 500);
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
.sp-iconbox--sm {
|
|
950
|
+
width: var(--sp-component-iconbox-size-sm, var(--sp-space-xl, 2rem));
|
|
951
|
+
height: var(--sp-component-iconbox-size-sm, var(--sp-space-xl, 2rem));
|
|
952
|
+
font-size: var(--sp-font-sm-size, 0.875rem);
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
.sp-iconbox--md {
|
|
956
|
+
width: var(--sp-component-iconbox-size-md, var(--sp-space-2xl, 3rem));
|
|
957
|
+
height: var(--sp-component-iconbox-size-md, var(--sp-space-2xl, 3rem));
|
|
958
|
+
font-size: var(--sp-font-md-size, 1rem);
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
.sp-iconbox--lg {
|
|
962
|
+
width: var(--sp-component-iconbox-size-lg, var(--sp-space-3xl, 4rem));
|
|
963
|
+
height: var(--sp-component-iconbox-size-lg, var(--sp-space-3xl, 4rem));
|
|
964
|
+
font-size: var(--sp-font-lg-size, 1.125rem);
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
.sp-iconbox > svg,
|
|
968
|
+
.sp-iconbox > i {
|
|
969
|
+
width: 1em;
|
|
970
|
+
height: 1em;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
.sp-iconbox--primary {
|
|
974
|
+
background-color: var(--sp-component-iconbox-primary-bg);
|
|
975
|
+
color: var(--sp-component-iconbox-primary-text);
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.sp-iconbox--success {
|
|
979
|
+
background-color: var(--sp-component-iconbox-success-bg);
|
|
980
|
+
color: var(--sp-component-iconbox-success-text);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
.sp-iconbox--warning {
|
|
984
|
+
background-color: var(--sp-component-iconbox-warning-bg);
|
|
985
|
+
color: var(--sp-component-iconbox-warning-text);
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
.sp-iconbox--danger {
|
|
989
|
+
background-color: var(--sp-component-iconbox-danger-bg);
|
|
990
|
+
color: var(--sp-component-iconbox-danger-text);
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
.sp-iconbox--info {
|
|
994
|
+
background-color: var(--sp-component-iconbox-info-bg);
|
|
995
|
+
color: var(--sp-component-iconbox-info-text);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
@layer utilities {
|
|
999
|
+
.sp-stack {
|
|
1000
|
+
display: flex;
|
|
1001
|
+
flex-direction: column;
|
|
1002
|
+
gap: var(--sp-layout-stack-gap-md, var(--sp-space-md, 1rem));
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
.sp-hstack {
|
|
1006
|
+
display: flex;
|
|
1007
|
+
flex-direction: row;
|
|
1008
|
+
align-items: center;
|
|
1009
|
+
gap: var(--sp-layout-stack-gap-md, var(--sp-space-md, 1rem));
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
.sp-container {
|
|
1013
|
+
width: 100%;
|
|
1014
|
+
margin-left: auto;
|
|
1015
|
+
margin-right: auto;
|
|
1016
|
+
padding-left: var(--sp-layout-container-padding-inline-md, var(--sp-space-md, 1rem));
|
|
1017
|
+
padding-right: var(--sp-layout-container-padding-inline-md, var(--sp-space-md, 1rem));
|
|
1018
|
+
max-width: var(--sp-container-max-width, 72rem);
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
.sp-section {
|
|
1022
|
+
padding-top: var(--sp-layout-section-padding-md, var(--sp-space-2xl, 3rem));
|
|
1023
|
+
padding-bottom: var(--sp-layout-section-padding-md, var(--sp-space-2xl, 3rem));
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
.sp-shadow-soft {
|
|
1027
|
+
box-shadow: var(--sp-shadow-md);
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
.sp-shadow-strong {
|
|
1031
|
+
box-shadow: var(--sp-shadow-lg);
|
|
1032
|
+
}
|
|
1033
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phcdevworks/spectre-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Framework-agnostic UI layer for the Spectre design system. Provides base CSS, component classes, utilities, and a Tailwind preset powered by @phcdevworks/spectre-tokens.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"phcdevworks",
|
|
@@ -64,7 +64,8 @@
|
|
|
64
64
|
],
|
|
65
65
|
"sideEffects": false,
|
|
66
66
|
"scripts": {
|
|
67
|
-
"build": "tsup --config tsup.config.ts",
|
|
67
|
+
"build": "tsup --config tsup.config.ts && npm run build:css",
|
|
68
|
+
"build:css": "mkdir -p dist && postcss src/styles/index.css -o dist/index.css",
|
|
68
69
|
"dev": "tsup --config tsup.config.ts --watch",
|
|
69
70
|
"clean": "rm -rf dist",
|
|
70
71
|
"test": "vitest run"
|
|
@@ -81,6 +82,8 @@
|
|
|
81
82
|
"devDependencies": {
|
|
82
83
|
"autoprefixer": "^10.4.20",
|
|
83
84
|
"postcss": "^8.4.35",
|
|
85
|
+
"postcss-cli": "^11.0.1",
|
|
86
|
+
"postcss-import": "^16.1.1",
|
|
84
87
|
"tailwindcss": "^3.4.15",
|
|
85
88
|
"tsup": "^8.5.1",
|
|
86
89
|
"typescript": "^5.9.3",
|