@superwall/studio 1.6.1 → 1.6.2

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.
Files changed (63) hide show
  1. package/README.md +27 -10
  2. package/dist/assets/index-BMe9fPdZ.css +1 -0
  3. package/dist/assets/index-Czsb6jZs.js +11 -0
  4. package/dist/index.html +3 -3
  5. package/dist/lib/components/Dialog.d.ts +7 -0
  6. package/dist/lib/components/EmptyState.d.ts +9 -0
  7. package/dist/lib/components/InlineCode.d.ts +2 -0
  8. package/dist/lib/components/PaywallToasts.d.ts +8 -0
  9. package/dist/lib/components/SuperwallLogo.d.ts +9 -0
  10. package/dist/lib/components/Tooltip.d.ts +3 -1
  11. package/dist/lib/components/chrome/TopBar.d.ts +2 -3
  12. package/dist/lib/components/controls.d.ts +10 -1
  13. package/dist/lib/components/icons.d.ts +30 -17
  14. package/dist/lib/components/menus/ActionMenu.d.ts +4 -1
  15. package/dist/lib/components/menus/Menu.d.ts +19 -0
  16. package/dist/lib/index.d.ts +3 -1
  17. package/dist/lib/index.js +2582 -2054
  18. package/dist/lib/lib/actions.d.ts +3 -2
  19. package/dist/lib/lib/contract.d.ts +4 -0
  20. package/dist/lib/lib/notify.d.ts +4 -1
  21. package/dist/lib/lib/promotion.d.ts +17 -0
  22. package/dist/lib/lib/steps.d.ts +2 -1
  23. package/dist/lib/lib/surfaces.d.ts +10 -4
  24. package/dist/lib/studio.css +1 -1
  25. package/package.json +2 -2
  26. package/src/StudioApp.tsx +3 -2
  27. package/src/components/Dialog.tsx +74 -0
  28. package/src/components/DownloadScreenshot.tsx +13 -20
  29. package/src/components/EmptyState.tsx +32 -0
  30. package/src/components/InlineCode.tsx +7 -0
  31. package/src/components/OpenInApp.tsx +15 -14
  32. package/src/components/PaywallToasts.tsx +44 -37
  33. package/src/components/PreviewOnDevice.tsx +61 -43
  34. package/src/components/SuperwallLogo.tsx +72 -0
  35. package/src/components/SurfaceCard.tsx +34 -18
  36. package/src/components/Tooltip.tsx +25 -2
  37. package/src/components/chrome/StudioShell.tsx +1 -1
  38. package/src/components/chrome/Toolbar.tsx +10 -8
  39. package/src/components/chrome/TopBar.tsx +21 -22
  40. package/src/components/controls.tsx +116 -31
  41. package/src/components/icons.tsx +140 -59
  42. package/src/components/menus/ActionMenu.tsx +221 -97
  43. package/src/components/menus/CompareMenu.tsx +48 -67
  44. package/src/components/menus/Menu.tsx +144 -0
  45. package/src/components/panels/MissingProducts.tsx +27 -34
  46. package/src/components/panels/SidePanel.tsx +9 -9
  47. package/src/components/panels/VariablesPanel.tsx +57 -49
  48. package/src/components/preview/DeviceFrame.tsx +4 -6
  49. package/src/index.ts +9 -0
  50. package/src/lib/actions.ts +13 -4
  51. package/src/lib/contract.ts +2 -0
  52. package/src/lib/notify.tsx +15 -18
  53. package/src/lib/project.ts +1 -0
  54. package/src/lib/promotion.ts +47 -0
  55. package/src/lib/steps.ts +9 -1
  56. package/src/lib/surfaces.ts +22 -2
  57. package/src/main.tsx +22 -10
  58. package/src/screens/SurfaceEditor.tsx +101 -63
  59. package/src/screens/SurfaceList.tsx +112 -69
  60. package/src/scroll-fade.css +425 -0
  61. package/src/styles.css +380 -182
  62. package/dist/assets/index-CTn2zVi-.js +0 -11
  63. package/dist/assets/index-DrsTCwot.css +0 -1
package/src/styles.css CHANGED
@@ -1,8 +1,51 @@
1
1
  @import "tailwindcss";
2
+ @import "./scroll-fade.css";
3
+
4
+ @source inline("m-0 m-auto text-cream text-cream/55 text-[0.6875rem] text-[0.8125rem] font-mono");
5
+
6
+ @custom-variant hover {
7
+ @media (hover: hover) {
8
+ &:hover:not(:disabled, [aria-disabled="true"], [data-disabled]) {
9
+ @slot;
10
+ }
11
+ }
12
+ }
13
+
14
+ @theme inline {
15
+ --font-sans:
16
+ "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
17
+ --font-mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
18
+ --text-xs: 0.8125rem;
19
+ --text-xs--line-height: 1.125rem;
20
+ --font-weight-medium: 500;
21
+ --font-weight-semibold: 600;
22
+
23
+ --color-cream: var(--cream);
24
+ --color-background: var(--background);
25
+ --color-foreground: var(--foreground);
26
+ --color-card: var(--card);
27
+ --color-popover: var(--popover);
28
+ --color-muted: var(--muted);
29
+ --color-secondary: var(--secondary);
30
+ --color-accent: var(--accent);
31
+ --color-fg-secondary: var(--fg-secondary);
32
+ --color-fg-tertiary: var(--fg-tertiary);
33
+ --color-fg-muted: var(--fg-muted);
34
+ --color-muted-foreground: var(--fg-tertiary);
35
+ --color-border: var(--border);
36
+ --color-input: var(--border);
37
+ --color-primary: var(--primary);
38
+ --color-primary-foreground: var(--primary-foreground);
39
+ --color-destructive: var(--destructive);
40
+ --color-destructive-foreground: var(--destructive-foreground);
41
+ --color-success: var(--success);
42
+ --color-success-foreground: var(--success-foreground);
43
+ --color-warning: var(--warning);
44
+ --color-warning-foreground: var(--warning-foreground);
45
+ --color-info: var(--info);
46
+ --color-info-foreground: var(--info-foreground);
47
+ --color-scrim: var(--scrim);
2
48
 
3
- @theme {
4
- /* One restrained corner at every scale, so a control's size never changes
5
- the visual language. Genuinely circular shapes stay 9999px. */
6
49
  --radius: 3px;
7
50
  --radius-xs: 3px;
8
51
  --radius-sm: 3px;
@@ -11,42 +54,112 @@
11
54
  --radius-xl: 3px;
12
55
  --radius-2xl: 3px;
13
56
  --radius-3xl: 3px;
57
+ --radius-4xl: 3px;
58
+
59
+ --shadow: 0 0 #0000;
60
+ --shadow-inner: inset 0 0 #0000;
61
+ --drop-shadow: 0 0 #0000;
62
+ --shadow-2xs: 0 0 #0000;
63
+ --shadow-xs: 0 0 #0000;
64
+ --shadow-sm: 0 0 #0000;
65
+ --shadow-md: 0 0 #0000;
66
+ --shadow-lg: 0 0 #0000;
67
+ --shadow-xl: 0 0 #0000;
68
+ --shadow-2xl: 0 0 #0000;
69
+ --inset-shadow-2xs: inset 0 0 #0000;
70
+ --inset-shadow-xs: inset 0 0 #0000;
71
+ --inset-shadow-sm: inset 0 0 #0000;
72
+ --drop-shadow-xs: 0 0 #0000;
73
+ --drop-shadow-sm: 0 0 #0000;
74
+ --drop-shadow-md: 0 0 #0000;
75
+ --drop-shadow-lg: 0 0 #0000;
76
+ --drop-shadow-xl: 0 0 #0000;
77
+ --drop-shadow-2xl: 0 0 #0000;
78
+ --text-shadow-2xs: 0 0 #0000;
79
+ --text-shadow-xs: 0 0 #0000;
80
+ --text-shadow-sm: 0 0 #0000;
81
+ --text-shadow-md: 0 0 #0000;
82
+ --text-shadow-lg: 0 0 #0000;
83
+ }
84
+
85
+ @theme static {
86
+ --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
87
+ --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
88
+ --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
89
+ --transition-duration-hover: 150ms;
90
+ --transition-duration-popup: 150ms;
91
+ --transition-duration-move: 200ms;
92
+ --transition-duration-dialog: 200ms;
93
+ --transition-duration-sheet: 250ms;
94
+ --default-transition-duration: 150ms;
95
+ --default-transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
96
+ }
97
+
98
+ @utility icon-tertiary {
99
+ color: var(--foreground);
100
+ filter: opacity(0.55);
101
+ }
14
102
 
15
- /* Structure is one hairline everywhere; controls carry a slightly stronger
16
- edge because they hold a shape of their own. */
17
- --hairline: color-mix(in srgb, var(--color-cream) 10%, transparent);
18
- --edge: color-mix(in srgb, var(--color-cream) 18%, transparent);
19
-
20
- --color-ink: #1a1918;
21
- --color-bar: #211f1d;
22
- --color-panel: #242220;
23
- --color-cream: #fdfef6;
24
- --color-accent: #46d7d4;
25
- --color-red: #ff7474;
26
- --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
27
- --font-mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
103
+ @utility transition-disclosure {
104
+ transition-property: rotate, transform, color, filter;
105
+ transition-duration:
106
+ var(--transition-duration-move), var(--transition-duration-move),
107
+ var(--transition-duration-hover), var(--transition-duration-hover);
108
+ transition-timing-function: var(--ease-out);
28
109
  }
29
110
 
30
111
  @layer base {
112
+ :root,
113
+ :host {
114
+ --tint-h: 262;
115
+ --tint-c: 0.0055;
116
+ --border-alpha: 10%;
117
+ --cream: #fdfef6;
118
+ --ink: #0c0b0a;
119
+
120
+ --background: oklch(0.16 calc(var(--tint-c) * 0.7) var(--tint-h));
121
+ --card: oklch(0.195 var(--tint-c) var(--tint-h));
122
+ --popover: oklch(0.215 calc(var(--tint-c) * 1.25) var(--tint-h));
123
+ --muted: oklch(0.25 calc(var(--tint-c) * 0.6) var(--tint-h));
124
+ --secondary: oklch(0.29 calc(var(--tint-c) * 0.6) var(--tint-h));
125
+ --accent: oklch(0.86 calc(var(--tint-c) * 0.6) var(--tint-h) / 0.08);
126
+ --foreground: var(--cream);
127
+ --fg-secondary: color-mix(in oklch, var(--foreground) 70%, transparent);
128
+ --fg-tertiary: color-mix(in oklch, var(--foreground) 55%, transparent);
129
+ --fg-muted: color-mix(in oklch, var(--foreground) 45%, transparent);
130
+ --border: color-mix(in oklch, var(--foreground) var(--border-alpha), transparent);
131
+ --primary: #46d7d4;
132
+ --primary-foreground: var(--ink);
133
+ --destructive: #ee6d2e;
134
+ --destructive-foreground: #f3996d;
135
+ --success: #9fd947;
136
+ --success-foreground: #b7e375;
137
+ --warning: #ffc459;
138
+ --warning-foreground: #ffd07a;
139
+ --info: #7c97dd;
140
+ --info-foreground: #b4c4eb;
141
+ --scrim: color-mix(in oklch, var(--ink) 45%, transparent);
142
+ }
143
+
31
144
  .sw-studio {
32
145
  color-scheme: dark;
146
+ font-family: var(--font-sans);
147
+ -webkit-font-smoothing: antialiased;
148
+ text-rendering: optimizeLegibility;
33
149
  }
34
150
 
35
151
  .sw-studio ::selection {
36
- background: color-mix(in srgb, var(--color-accent) 50%, transparent);
152
+ background: color-mix(in oklch, var(--primary) 20%, transparent);
153
+ color: var(--primary);
37
154
  }
38
155
 
39
156
  .sw-studio :focus-visible {
40
- outline: 2px solid var(--color-accent);
41
- outline-offset: -2px;
42
- }
43
-
44
- .sw-studio button {
45
- cursor: pointer;
157
+ outline: none;
46
158
  }
47
159
 
48
160
  .sw-studio,
49
161
  .sw-studio * {
162
+ border-color: var(--border);
50
163
  scrollbar-width: none;
51
164
  }
52
165
 
@@ -56,199 +169,257 @@
56
169
  height: 0;
57
170
  display: none;
58
171
  }
172
+
173
+ .sw-studio
174
+ :where(
175
+ button,
176
+ select,
177
+ summary,
178
+ label[for],
179
+ [role="button"],
180
+ [role="switch"],
181
+ [role="option"],
182
+ [role="menuitem"],
183
+ [role="menuitemradio"],
184
+ [role="link"]
185
+ ):not(:disabled, [aria-disabled="true"], [data-disabled]) {
186
+ cursor: pointer;
187
+ }
188
+
189
+ .sw-studio
190
+ :where(button, input, select, textarea, a, [role="button"], [role="switch"]):where(
191
+ :disabled,
192
+ [aria-disabled="true"],
193
+ [data-disabled]
194
+ ) {
195
+ cursor: not-allowed;
196
+ }
197
+
198
+ .sw-studio :where(svg, .icon-tertiary) {
199
+ transition-property: filter;
200
+ transition-duration: var(--transition-duration-hover);
201
+ transition-timing-function: var(--ease-out);
202
+ }
203
+
204
+ .sw-studio :where(code, kbd, pre, samp) {
205
+ font-family: var(--font-mono);
206
+ }
207
+
208
+ .sw-studio :where(strong, b) {
209
+ font-weight: var(--font-weight-semibold);
210
+ }
211
+
212
+ .sw-studio :where(h1, h2, h3, h4) {
213
+ font-weight: var(--font-weight-medium);
214
+ }
215
+
216
+ @media (prefers-reduced-motion: reduce) {
217
+ .sw-studio *,
218
+ .sw-studio ::before,
219
+ .sw-studio ::after {
220
+ transition-property:
221
+ color, background-color, border-color, outline-color, text-decoration-color, fill, stroke,
222
+ opacity, filter !important;
223
+ }
224
+ }
59
225
  }
60
226
 
61
227
  @layer components {
228
+ .sw-icon {
229
+ flex: none;
230
+ width: 14px;
231
+ height: 14px;
232
+ stroke: currentColor;
233
+ fill: none;
234
+ stroke-width: 2;
235
+ stroke-linecap: round;
236
+ stroke-linejoin: round;
237
+ }
238
+
239
+ .sw-spinner {
240
+ flex: none;
241
+ width: 14px;
242
+ height: 14px;
243
+ }
244
+
245
+ .sw-spinner rect {
246
+ fill: currentColor;
247
+ stroke: none;
248
+ opacity: 0.26;
249
+ animation: sw-spinner-spoke 0.8s linear infinite;
250
+ }
251
+
62
252
  .sw-btn {
63
- border-radius: var(--radius);
253
+ position: relative;
64
254
  display: inline-flex;
255
+ flex: none;
65
256
  align-items: center;
66
257
  justify-content: center;
67
- gap: 7px;
68
- height: 30px;
69
- padding: 0 12px;
70
- border: 1px solid var(--edge);
258
+ gap: 9px;
259
+ height: 32px;
260
+ padding: 0 11px;
261
+ border: 1px solid var(--border);
262
+ border-radius: var(--radius);
71
263
  background: transparent;
72
- color: var(--color-cream);
73
- font-size: 0.8125rem;
264
+ color: var(--foreground);
265
+ font-size: 0.875rem;
266
+ line-height: 1.25rem;
74
267
  font-weight: 500;
75
268
  white-space: nowrap;
76
- transition: background-color 150ms ease;
269
+ outline: none;
270
+ transition-property: color, background-color, border-color;
271
+ transition-duration: var(--transition-duration-hover);
272
+ transition-timing-function: var(--ease-out);
77
273
  }
78
274
 
79
- .sw-btn:hover:not(:disabled):not(.sw-btn--blocked) {
80
- background: color-mix(in srgb, var(--color-cream) 5%, transparent);
275
+ .sw-btn svg {
276
+ margin: 0 -1px;
277
+ pointer-events: none;
81
278
  }
82
279
 
83
- .sw-btn:disabled,
84
- .sw-btn--blocked {
85
- opacity: 0.4;
86
- cursor: not-allowed;
280
+ .sw-btn > .sw-icon,
281
+ .sw-btn > .sw-spinner {
282
+ width: 14px;
283
+ height: 14px;
87
284
  }
88
285
 
89
- .sw-btn--primary {
90
- background: var(--color-cream);
91
- border-color: var(--color-cream);
92
- color: var(--color-ink);
286
+ .sw-btn > .sw-icon:not(.icon-tertiary) {
287
+ opacity: 0.8;
93
288
  }
94
289
 
95
- .sw-btn--primary:hover:not(:disabled):not(.sw-btn--blocked) {
96
- background: color-mix(in srgb, var(--color-cream) 85%, transparent);
290
+ .sw-btn--sm {
291
+ height: 28px;
292
+ padding: 0 9px;
293
+ }
294
+
295
+ .sw-btn--xs {
296
+ gap: 7px;
297
+ height: 24px;
298
+ padding: 0 7px;
299
+ font-size: var(--text-xs);
300
+ line-height: var(--text-xs--line-height);
97
301
  }
98
302
 
99
303
  .sw-btn--icon {
100
- width: 30px;
304
+ width: 32px;
101
305
  padding: 0;
102
306
  }
103
307
 
104
- .sw-icon,
105
- .sw-btn svg,
106
- .sw-segmented svg {
107
- width: 14px;
108
- height: 14px;
109
- stroke: currentColor;
110
- fill: none;
111
- stroke-width: 1.5;
112
- stroke-linecap: round;
113
- stroke-linejoin: round;
308
+ .sw-btn--icon.sw-btn--sm {
309
+ width: 28px;
114
310
  }
115
311
 
116
- .sw-chip {
117
- border-radius: var(--radius);
118
- display: inline-flex;
119
- align-items: center;
120
- height: 20px;
121
- padding: 0 7px;
122
- border: 1px solid var(--edge);
123
- color: var(--color-cream);
124
- white-space: nowrap;
312
+ .sw-btn--icon > .sw-icon,
313
+ .sw-btn--icon > .sw-spinner {
314
+ width: 16px;
315
+ height: 16px;
125
316
  }
126
317
 
127
- .sw-tool-label {
128
- font-size: 0.75rem;
129
- font-weight: 500;
130
- color: color-mix(in srgb, var(--color-cream) 55%, transparent);
131
- white-space: nowrap;
318
+ .sw-btn:is(:hover, [aria-pressed="true"], [aria-expanded="true"]):not(
319
+ :disabled,
320
+ [aria-disabled="true"]
321
+ ) {
322
+ border-color: color-mix(in oklch, var(--foreground) 20%, transparent);
323
+ background-color: var(--accent);
132
324
  }
133
325
 
134
- .sw-tool-label--key {
135
- font-family: var(--font-mono);
136
- letter-spacing: 0.04em;
137
- font-size: 11px;
326
+ .sw-btn--primary {
327
+ border-color: var(--primary);
328
+ background-color: var(--primary);
329
+ color: var(--primary-foreground);
138
330
  }
139
331
 
140
- .sw-select {
141
- border-radius: var(--radius);
142
- appearance: none;
143
- cursor: pointer;
144
- height: 30px;
145
- padding: 0 24px 0 9px;
146
- border: 1px solid var(--edge);
147
- background:
148
- linear-gradient(
149
- 45deg,
150
- transparent 50%,
151
- color-mix(in srgb, var(--color-cream) 55%, transparent) 50%
152
- )
153
- calc(100% - 13px) 55% / 4px 4px no-repeat,
154
- linear-gradient(
155
- 135deg,
156
- color-mix(in srgb, var(--color-cream) 55%, transparent) 50%,
157
- transparent 50%
158
- )
159
- calc(100% - 9px) 55% / 4px 4px no-repeat;
160
- background-color: transparent;
161
- color: var(--color-cream);
162
- font: inherit;
163
- font-size: 0.8125rem;
164
- font-weight: 500;
332
+ .sw-btn--primary:is(:hover, [aria-expanded="true"]):not(:disabled, [aria-disabled="true"]) {
333
+ border-color: color-mix(in oklch, var(--primary) 90%, transparent);
334
+ background-color: color-mix(in oklch, var(--primary) 90%, transparent);
165
335
  }
166
336
 
167
- .sw-select option {
168
- background: var(--color-bar);
337
+ .sw-btn--ghost {
338
+ border-color: transparent;
339
+ color: var(--fg-secondary);
169
340
  }
170
341
 
171
- .sw-segmented {
172
- border-radius: var(--radius);
173
- display: inline-flex;
174
- border: 1px solid var(--edge);
175
- height: 30px;
342
+ .sw-btn--ghost > .sw-icon {
343
+ color: var(--foreground);
344
+ filter: opacity(0.55);
176
345
  }
177
346
 
178
- .sw-segmented button {
179
- display: inline-flex;
180
- align-items: center;
181
- gap: 6px;
182
- padding: 0 11px;
183
- font-size: 0.8125rem;
184
- font-weight: 500;
185
- color: color-mix(in srgb, var(--color-cream) 55%, transparent);
186
- transition:
187
- background-color 150ms ease,
188
- color 150ms ease;
347
+ .sw-btn--ghost > .sw-icon:not(.icon-tertiary) {
348
+ opacity: 1;
189
349
  }
190
350
 
191
- .sw-segmented button + button {
192
- border-left: 1px solid var(--edge);
351
+ .sw-btn--ghost:is(:hover, [aria-pressed="true"], [aria-expanded="true"]):not(
352
+ :disabled,
353
+ [aria-disabled="true"]
354
+ ) {
355
+ border-color: transparent;
356
+ background-color: var(--accent);
357
+ color: var(--foreground);
193
358
  }
194
359
 
195
- .sw-segmented button:first-child {
196
- border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px);
360
+ .sw-btn--ghost:is(:hover, [aria-pressed="true"], [aria-expanded="true"]):not(
361
+ :disabled,
362
+ [aria-disabled="true"]
363
+ )
364
+ > .sw-icon {
365
+ filter: none;
197
366
  }
198
367
 
199
- .sw-segmented button:last-child {
200
- border-radius: 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0;
368
+ .sw-btn--plain {
369
+ height: auto;
370
+ padding: 0;
371
+ border-width: 0;
372
+ color: var(--fg-secondary);
201
373
  }
202
374
 
203
- .sw-segmented button[aria-pressed="true"] {
204
- background: var(--color-cream);
205
- color: var(--color-ink);
375
+ .sw-btn--plain:is(:hover):not(:disabled, [aria-disabled="true"]) {
376
+ background-color: transparent;
377
+ color: var(--foreground);
206
378
  }
207
379
 
208
- .sw-stepper {
380
+ .sw-btn--plain::before {
381
+ content: "";
382
+ position: absolute;
383
+ inset: -2px -4px;
384
+ border: 1px solid transparent;
209
385
  border-radius: var(--radius);
210
- display: inline-flex;
211
- border: 1px solid var(--edge);
212
- height: 30px;
386
+ pointer-events: none;
387
+ transition: border-color var(--transition-duration-hover) var(--ease-out);
213
388
  }
214
389
 
215
- .sw-stepper button {
216
- display: inline-flex;
217
- align-items: center;
218
- justify-content: center;
219
- color: var(--color-cream);
220
- transition: background-color 150ms ease;
390
+ .sw-btn--plain:focus-visible::before {
391
+ border-color: var(--primary);
221
392
  }
222
393
 
223
- .sw-stepper button:hover {
224
- background: color-mix(in srgb, var(--color-cream) 5%, transparent);
394
+ .sw-btn:focus-visible {
395
+ border-color: var(--primary);
225
396
  }
226
397
 
227
- .sw-stepper button + button {
228
- border-left: 1px solid var(--edge);
398
+ .sw-btn--primary:focus-visible {
399
+ border-color: var(--foreground);
229
400
  }
230
401
 
231
- .sw-stepper > button:first-child,
232
- .sw-stepper > button:last-child {
233
- width: 28px;
402
+ .sw-btn:disabled:not([aria-busy="true"]),
403
+ .sw-btn[aria-disabled="true"]:not([aria-busy="true"]) {
404
+ opacity: 0.5;
234
405
  }
235
406
 
236
- .sw-stepper > button:first-child {
237
- border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px);
407
+ .sw-btn[aria-busy="true"] {
408
+ cursor: progress;
238
409
  }
239
410
 
240
- .sw-stepper > button:last-child {
241
- border-radius: 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0;
242
- }
243
-
244
- .sw-stepper svg {
245
- width: 14px;
246
- height: 14px;
247
- stroke: currentColor;
248
- fill: none;
249
- stroke-width: 1.5;
250
- stroke-linecap: round;
251
- stroke-linejoin: round;
411
+ .sw-chip {
412
+ display: inline-flex;
413
+ align-items: center;
414
+ height: 20px;
415
+ padding: 0 5px;
416
+ border: 1px solid var(--border);
417
+ border-radius: var(--radius);
418
+ background: var(--card);
419
+ color: var(--foreground);
420
+ font-size: 0.75rem;
421
+ font-weight: 500;
422
+ white-space: nowrap;
252
423
  }
253
424
 
254
425
  input[type="search"]::-webkit-search-cancel-button,
@@ -261,44 +432,71 @@
261
432
  }
262
433
 
263
434
  .sw-input {
435
+ width: 100%;
436
+ min-width: 0;
437
+ height: 32px;
438
+ padding: 0 11px;
439
+ border: 1px solid var(--border);
264
440
  border-radius: var(--radius);
265
- height: 30px;
266
- padding: 0 9px;
267
- border: 1px solid var(--edge);
268
441
  background: transparent;
269
- color: var(--color-cream);
442
+ color: var(--foreground);
270
443
  font: inherit;
271
- font-size: 0.8125rem;
444
+ font-size: 0.875rem;
445
+ line-height: 1.5;
446
+ outline: none;
447
+ transition: border-color var(--transition-duration-hover) var(--ease-out);
448
+ }
449
+
450
+ .sw-input::placeholder {
451
+ color: var(--fg-muted);
452
+ }
453
+
454
+ .sw-input:focus-visible {
455
+ border-color: var(--primary);
456
+ }
457
+
458
+ .sw-input--sm {
459
+ height: 28px;
460
+ padding: 0 9px;
461
+ }
462
+
463
+ .sw-select {
464
+ appearance: none;
272
465
  width: 100%;
466
+ min-width: 9rem;
467
+ height: 32px;
468
+ padding: 0 33px 0 11px;
469
+ border: 1px solid var(--border);
470
+ border-radius: var(--radius);
471
+ color: var(--foreground);
472
+ font: inherit;
473
+ font-size: 0.875rem;
474
+ line-height: 1.25rem;
475
+ font-weight: 500;
476
+ outline: none;
273
477
  }
274
478
 
275
- .sw-switch {
276
- position: relative;
277
- width: 34px;
278
- height: 19px;
279
- border-radius: 9999px;
280
- background: color-mix(in srgb, var(--color-cream) 18%, transparent);
281
- transition: background-color 150ms ease;
282
- flex: none;
479
+ .sw-select:focus-visible {
480
+ border-color: var(--primary);
283
481
  }
284
482
 
285
- .sw-switch[aria-checked="true"] {
286
- background: var(--color-accent);
483
+ .sw-select--sm {
484
+ height: 28px;
485
+ padding: 0 31px 0 9px;
287
486
  }
288
487
 
289
- .sw-switch::after {
290
- content: "";
291
- position: absolute;
292
- top: 3px;
293
- left: 3px;
294
- width: 13px;
295
- height: 13px;
296
- border-radius: 9999px;
297
- background: var(--color-ink);
298
- transition: transform 150ms ease;
488
+ .sw-select option {
489
+ background: var(--popover);
490
+ color: var(--foreground);
299
491
  }
492
+ }
300
493
 
301
- .sw-switch[aria-checked="true"]::after {
302
- transform: translateX(15px);
494
+ @keyframes sw-spinner-spoke {
495
+ 0% {
496
+ opacity: 0.855;
497
+ }
498
+ 51.25%,
499
+ 100% {
500
+ opacity: 0.26;
303
501
  }
304
502
  }