@peerproblem/sw3-ui 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +109 -2
- package/agent/components/accordion.md +95 -0
- package/agent/components/action-square.md +106 -0
- package/agent/components/agent-bridge.md +87 -0
- package/agent/components/agent-console.md +123 -0
- package/agent/components/alert-dialog.md +82 -0
- package/agent/components/app-shell.md +105 -0
- package/agent/components/area-chart.md +56 -0
- package/agent/components/async-options.md +47 -0
- package/agent/components/autocomplete.md +69 -0
- package/agent/components/avatar.md +88 -0
- package/agent/components/badge.md +51 -0
- package/agent/components/bar-chart.md +56 -0
- package/agent/components/bar-list.md +49 -0
- package/agent/components/breadcrumbs.md +43 -0
- package/agent/components/button.md +109 -0
- package/agent/components/calendar.md +114 -0
- package/agent/components/canvas.md +105 -0
- package/agent/components/card.md +78 -0
- package/agent/components/carousel.md +113 -0
- package/agent/components/chart-card.md +41 -0
- package/agent/components/chart-surface.md +56 -0
- package/agent/components/checkbox.md +88 -0
- package/agent/components/citation-chip.md +61 -0
- package/agent/components/collapsible.md +69 -0
- package/agent/components/color-picker.md +82 -0
- package/agent/components/combobox.md +104 -0
- package/agent/components/command.md +92 -0
- package/agent/components/dashboard-grid.md +73 -0
- package/agent/components/date-input.md +87 -0
- package/agent/components/date-picker.md +122 -0
- package/agent/components/dialog.md +97 -0
- package/agent/components/donut-chart.md +50 -0
- package/agent/components/drawer.md +101 -0
- package/agent/components/empty-state.md +52 -0
- package/agent/components/field.md +80 -0
- package/agent/components/file-input.md +84 -0
- package/agent/components/hover-card.md +64 -0
- package/agent/components/image-cropper.md +77 -0
- package/agent/components/input.md +49 -0
- package/agent/components/label.md +53 -0
- package/agent/components/line-chart.md +60 -0
- package/agent/components/listbox.md +84 -0
- package/agent/components/map-view.md +104 -0
- package/agent/components/menu.md +117 -0
- package/agent/components/menubar.md +67 -0
- package/agent/components/meter.md +59 -0
- package/agent/components/navigation-menu.md +98 -0
- package/agent/components/number-input.md +81 -0
- package/agent/components/otp-input.md +67 -0
- package/agent/components/pagination.md +80 -0
- package/agent/components/password-input.md +67 -0
- package/agent/components/pill-button.md +116 -0
- package/agent/components/popover.md +85 -0
- package/agent/components/poster-card.md +61 -0
- package/agent/components/preferences.md +92 -0
- package/agent/components/progress.md +63 -0
- package/agent/components/provider.md +47 -0
- package/agent/components/radio.md +91 -0
- package/agent/components/rating.md +66 -0
- package/agent/components/reorder.md +61 -0
- package/agent/components/resizable.md +87 -0
- package/agent/components/scatter-chart.md +49 -0
- package/agent/components/scroll-area.md +81 -0
- package/agent/components/segmented-control.md +56 -0
- package/agent/components/select.md +130 -0
- package/agent/components/separator.md +60 -0
- package/agent/components/shortcuts.md +50 -0
- package/agent/components/sidebar-nav.md +68 -0
- package/agent/components/skeleton.md +58 -0
- package/agent/components/slider.md +79 -0
- package/agent/components/sparkline.md +39 -0
- package/agent/components/squircle.md +58 -0
- package/agent/components/stat.md +58 -0
- package/agent/components/switch.md +48 -0
- package/agent/components/table.md +58 -0
- package/agent/components/tabs.md +108 -0
- package/agent/components/textarea.md +68 -0
- package/agent/components/time-input.md +84 -0
- package/agent/components/timeline.md +91 -0
- package/agent/components/toast.md +85 -0
- package/agent/components/toggle.md +76 -0
- package/agent/components/token-input.md +66 -0
- package/agent/components/toolbar.md +76 -0
- package/agent/components/tooltip.md +83 -0
- package/agent/components/tracker.md +47 -0
- package/agent/components/tree.md +87 -0
- package/agent/components/treemap.md +72 -0
- package/agent/components/trend-chart.md +80 -0
- package/agent/components/trigger-menu.md +67 -0
- package/agent/components/typography.md +51 -0
- package/agent/components/waterfall.md +78 -0
- package/agent/components/week-schedule.md +113 -0
- package/agent/llms/actions-and-layout.txt +1749 -0
- package/agent/llms/agents.txt +505 -0
- package/agent/llms/charts.txt +778 -0
- package/agent/llms/dashboards.txt +457 -0
- package/agent/llms/extend.txt +132 -0
- package/agent/llms/extras.txt +527 -0
- package/agent/llms/forms.txt +2152 -0
- package/agent/llms/foundations.txt +674 -0
- package/agent/llms/hooks.txt +178 -0
- package/agent/llms/maps.txt +229 -0
- package/agent/llms/overlays-and-navigation.txt +1167 -0
- package/agent/llms-full.txt +8717 -0
- package/agent/llms.txt +145 -0
- package/agent/registry.json +11289 -0
- package/agent/tokens.md +66 -0
- package/dist/agent/index.d.ts +235 -0
- package/dist/agent/index.js +21 -0
- package/dist/card-Ipm-Cj5f.d.ts +490 -0
- package/dist/charts/index.d.ts +289 -0
- package/dist/charts/index.js +815 -0
- package/dist/check/cli.d.ts +1 -0
- package/dist/check/cli.js +48 -0
- package/dist/check/rendered.d.ts +11 -0
- package/dist/check/rendered.js +77 -0
- package/dist/check/source.d.ts +13 -0
- package/dist/check/source.js +182 -0
- package/dist/chunk-3DXBM65D.js +65 -0
- package/dist/chunk-3H5X4ZP6.js +55 -0
- package/dist/chunk-6XC4BC5C.js +92 -0
- package/dist/chunk-7H6TEAWD.js +507 -0
- package/dist/chunk-I63ZTJOI.js +1089 -0
- package/dist/chunk-JCIRUM4W.js +33 -0
- package/dist/chunk-LTBEHZ3P.js +25 -0
- package/dist/chunk-QDPPLO4U.js +60 -0
- package/dist/chunk-U2XFBPU4.js +56 -0
- package/dist/chunk-UY2WH5AY.js +681 -0
- package/dist/extras.d.ts +203 -0
- package/dist/extras.js +904 -0
- package/dist/icons-BJiGEAnU.d.ts +68 -0
- package/dist/index.d.ts +3737 -0
- package/dist/index.js +14477 -0
- package/dist/map/index.d.ts +115 -0
- package/dist/map/index.js +394 -0
- package/dist/meta/index.d.ts +3314 -0
- package/dist/meta/index.js +5106 -0
- package/dist/rules-1RIZ_JZr.d.ts +38 -0
- package/dist/styles.css +4037 -0
- package/dist/themes/calm.css +42 -0
- package/dist/themes/frost.css +40 -0
- package/package.json +142 -4
package/dist/styles.css
ADDED
|
@@ -0,0 +1,4037 @@
|
|
|
1
|
+
@layer maplibre, sw3;
|
|
2
|
+
@layer sw3 {
|
|
3
|
+
/* tokens.css */
|
|
4
|
+
/* GENERATED by scripts/build-agent-docs.ts from src/tokens/tokens.ts — do not edit by hand. */
|
|
5
|
+
:root {
|
|
6
|
+
--sw-radius-none: 0px;
|
|
7
|
+
--sw-radius-xs: 6px;
|
|
8
|
+
--sw-radius-sm: 10px;
|
|
9
|
+
--sw-radius-md: 14px;
|
|
10
|
+
--sw-radius-lg: 20px;
|
|
11
|
+
--sw-radius-xl: 28px;
|
|
12
|
+
--sw-radius-2xl: 36px;
|
|
13
|
+
--sw-radius-full: 9999px;
|
|
14
|
+
--sw-smoothing-none: 0;
|
|
15
|
+
--sw-smoothing-soft: 0.6;
|
|
16
|
+
--sw-smoothing-max: 1;
|
|
17
|
+
--sw-space-0: 0px;
|
|
18
|
+
--sw-space-1: 4px;
|
|
19
|
+
--sw-space-2: 8px;
|
|
20
|
+
--sw-space-3: 12px;
|
|
21
|
+
--sw-space-4: 16px;
|
|
22
|
+
--sw-space-5: 20px;
|
|
23
|
+
--sw-space-6: 24px;
|
|
24
|
+
--sw-space-8: 32px;
|
|
25
|
+
--sw-space-10: 40px;
|
|
26
|
+
--sw-space-12: 48px;
|
|
27
|
+
--sw-space-16: 64px;
|
|
28
|
+
--sw-space-20: 80px;
|
|
29
|
+
--sw-font-sans: 'Geist Variable', 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
|
|
30
|
+
--sw-font-mono: 'Geist Mono Variable', 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
|
|
31
|
+
--sw-duration-instant: 100ms;
|
|
32
|
+
--sw-duration-fast: 150ms;
|
|
33
|
+
--sw-duration-base: 200ms;
|
|
34
|
+
--sw-duration-slow: 350ms;
|
|
35
|
+
--sw-duration-slower: 600ms;
|
|
36
|
+
--sw-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
37
|
+
--sw-ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
38
|
+
--sw-ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
39
|
+
--sw-ease-emphasized: cubic-bezier(0.2, 0, 0, 1);
|
|
40
|
+
color-scheme: light dark;
|
|
41
|
+
--sw-canvas: #f0f2f5;
|
|
42
|
+
--sw-background: #ffffff;
|
|
43
|
+
--sw-foreground: #0a0a0a;
|
|
44
|
+
--sw-muted: #f5f5f5;
|
|
45
|
+
--sw-muted-foreground: #6f6f6f;
|
|
46
|
+
--sw-subtle: #5d5d5d;
|
|
47
|
+
--sw-frame: #c8c8c8;
|
|
48
|
+
--sw-hairline: #ebebeb;
|
|
49
|
+
--sw-border: #e5e5e5;
|
|
50
|
+
--sw-accent: #424242;
|
|
51
|
+
--sw-accent-solid: #0a0a0a;
|
|
52
|
+
--sw-accent-solid-hover: #2d2d2d;
|
|
53
|
+
--sw-accent-foreground: #ffffff;
|
|
54
|
+
--sw-success: #00a74a;
|
|
55
|
+
--sw-warning: #c27800;
|
|
56
|
+
--sw-danger: #e40014;
|
|
57
|
+
--sw-selection: #e4e4e4;
|
|
58
|
+
--sw-chart-1: #006bff;
|
|
59
|
+
--sw-chart-2: #0a0a0a;
|
|
60
|
+
--sw-chart-3: #00a74a;
|
|
61
|
+
--sw-chart-4: #ff7a00;
|
|
62
|
+
--sw-chart-5: #8b5cf6;
|
|
63
|
+
--sw-chart-6: #e40014;
|
|
64
|
+
--sw-chart-7: #00b8d9;
|
|
65
|
+
--sw-chart-8: #a1a1a1;
|
|
66
|
+
--sw-outline: color-mix(in oklab, var(--sw-foreground) 80%, var(--sw-background));
|
|
67
|
+
}
|
|
68
|
+
@media (prefers-color-scheme: dark) {
|
|
69
|
+
:root:not([data-theme='light']) {
|
|
70
|
+
--sw-canvas: #101010;
|
|
71
|
+
--sw-background: #0a0a0a;
|
|
72
|
+
--sw-foreground: #fafafa;
|
|
73
|
+
--sw-muted: #262626;
|
|
74
|
+
--sw-muted-foreground: #a1a1a1;
|
|
75
|
+
--sw-subtle: #a4a4a4;
|
|
76
|
+
--sw-frame: #303030;
|
|
77
|
+
--sw-hairline: #1b1b1b;
|
|
78
|
+
--sw-border: rgba(255,255,255,0.1);
|
|
79
|
+
--sw-accent: #c9c9c9;
|
|
80
|
+
--sw-accent-solid: #fafafa;
|
|
81
|
+
--sw-accent-solid-hover: #dedede;
|
|
82
|
+
--sw-accent-foreground: #0a0a0a;
|
|
83
|
+
--sw-success: #7bf1a8;
|
|
84
|
+
--sw-warning: #f5b544;
|
|
85
|
+
--sw-danger: #ff6568;
|
|
86
|
+
--sw-selection: #323232;
|
|
87
|
+
--sw-chart-1: #5fa1f3;
|
|
88
|
+
--sw-chart-2: #fafafa;
|
|
89
|
+
--sw-chart-3: #7bf1a8;
|
|
90
|
+
--sw-chart-4: #ffa94d;
|
|
91
|
+
--sw-chart-5: #b197fc;
|
|
92
|
+
--sw-chart-6: #ff6568;
|
|
93
|
+
--sw-chart-7: #66d9e8;
|
|
94
|
+
--sw-chart-8: #737373;
|
|
95
|
+
--sw-outline: color-mix(in oklab, var(--sw-foreground) 42%, var(--sw-background));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
:root[data-theme='dark'], .dark {
|
|
99
|
+
color-scheme: dark;
|
|
100
|
+
--sw-canvas: #101010;
|
|
101
|
+
--sw-background: #0a0a0a;
|
|
102
|
+
--sw-foreground: #fafafa;
|
|
103
|
+
--sw-muted: #262626;
|
|
104
|
+
--sw-muted-foreground: #a1a1a1;
|
|
105
|
+
--sw-subtle: #a4a4a4;
|
|
106
|
+
--sw-frame: #303030;
|
|
107
|
+
--sw-hairline: #1b1b1b;
|
|
108
|
+
--sw-border: rgba(255,255,255,0.1);
|
|
109
|
+
--sw-accent: #c9c9c9;
|
|
110
|
+
--sw-accent-solid: #fafafa;
|
|
111
|
+
--sw-accent-solid-hover: #dedede;
|
|
112
|
+
--sw-accent-foreground: #0a0a0a;
|
|
113
|
+
--sw-success: #7bf1a8;
|
|
114
|
+
--sw-warning: #f5b544;
|
|
115
|
+
--sw-danger: #ff6568;
|
|
116
|
+
--sw-selection: #323232;
|
|
117
|
+
--sw-chart-1: #5fa1f3;
|
|
118
|
+
--sw-chart-2: #fafafa;
|
|
119
|
+
--sw-chart-3: #7bf1a8;
|
|
120
|
+
--sw-chart-4: #ffa94d;
|
|
121
|
+
--sw-chart-5: #b197fc;
|
|
122
|
+
--sw-chart-6: #ff6568;
|
|
123
|
+
--sw-chart-7: #66d9e8;
|
|
124
|
+
--sw-chart-8: #737373;
|
|
125
|
+
--sw-outline: color-mix(in oklab, var(--sw-foreground) 42%, var(--sw-background));
|
|
126
|
+
}
|
|
127
|
+
:root[data-theme='light'] { color-scheme: light; }
|
|
128
|
+
|
|
129
|
+
/* base.css */
|
|
130
|
+
/* Base: opt-in via the .sw-root class or apply globally. */
|
|
131
|
+
.sw-root, :where(body.sw-body) {
|
|
132
|
+
background: var(--sw-canvas);
|
|
133
|
+
color: var(--sw-foreground);
|
|
134
|
+
font-family: var(--sw-font-sans);
|
|
135
|
+
font-size: 16px;
|
|
136
|
+
line-height: 1.5;
|
|
137
|
+
-webkit-font-smoothing: antialiased;
|
|
138
|
+
text-rendering: optimizeLegibility;
|
|
139
|
+
-webkit-tap-highlight-color: transparent;
|
|
140
|
+
}
|
|
141
|
+
.sw-root ::selection { background: var(--sw-selection); }
|
|
142
|
+
:where([data-sw]) { box-sizing: border-box; }
|
|
143
|
+
:where([data-sw]) *, :where([data-sw]) *::before, :where([data-sw]) *::after { box-sizing: border-box; }
|
|
144
|
+
|
|
145
|
+
@media (prefers-reduced-motion: reduce) {
|
|
146
|
+
[data-sw], [data-sw] * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* ── Squircle layers (see primitives/squircle.tsx) ─────────────────────── */
|
|
150
|
+
.sw-sq { position: relative; isolation: isolate; outline: none; }
|
|
151
|
+
.sw-sq-fill { position: absolute; inset: 0; z-index: -1; background: var(--sw-sq-bg, transparent); transition: background-color var(--sw-duration-fast) var(--sw-ease-standard); pointer-events: none; }
|
|
152
|
+
/* The inside stroke paints above the content so full-bleed children and hover fills never hide it. */
|
|
153
|
+
.sw-sq-stroke { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: visible; }
|
|
154
|
+
.sw-sq-stroke path { stroke: var(--sw-sq-border, transparent); transition: stroke var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
155
|
+
.sw-sq-ring { position: absolute; z-index: 4; pointer-events: none; opacity: 0; transition: opacity var(--sw-duration-fast) var(--sw-ease-standard); overflow: visible; }
|
|
156
|
+
.sw-sq-ring path { stroke: var(--sw-sq-ring, var(--sw-accent)); }
|
|
157
|
+
.sw-sq:focus-visible > .sw-sq-ring { opacity: 1; }
|
|
158
|
+
|
|
159
|
+
.sw-inset-button { --sw-sq-bg: transparent; --sw-sq-ring: var(--sw-accent); border: 0; background: transparent; }
|
|
160
|
+
.sw-inset-button:hover:not(:disabled) { --sw-sq-bg: var(--sw-item-hover); }
|
|
161
|
+
.sw-inset-button:active:not(:disabled) { --sw-sq-bg: var(--sw-item-active); }
|
|
162
|
+
|
|
163
|
+
/* ── System constants ──────────────────────────────────────────────────── */
|
|
164
|
+
:root {
|
|
165
|
+
--sw-disabled-opacity: 0.5;
|
|
166
|
+
/* Corner shape for CSS-rounded fills (rows, chips, triggers). It must follow the SVG squircle
|
|
167
|
+
(smoothing 0.6) of the frame they sit in. Measured at the same radius: a round corner stays within
|
|
168
|
+
0.013 × r of that squircle; superellipse(1.6) bulges out by 0.125 × r (1px on an 8px row), which is
|
|
169
|
+
what made hover fills look off-centre in frame corners. A closer superellipse needs a larger
|
|
170
|
+
radius than the frame math gives, so the token is round. tests/corner-geometry checks the curve. */
|
|
171
|
+
--sw-corner-shape: round;
|
|
172
|
+
}
|
|
173
|
+
/* Inner radius, owned by the container. Fills never compute a radius: they read --sw-inner-r.
|
|
174
|
+
Only a frame whose fills sit at its inset publishes frame radius − inset, in its own rule (Listbox,
|
|
175
|
+
Menu/Popup, Command, Menubar, Toolbar, Tree, Accordion, Waterfall, Card panels…).
|
|
176
|
+
Every other squircle (a padded Card, a Button, the docs stage) resets it to the row radius. Its
|
|
177
|
+
content is not in its corners, so an inherited 28 − 4 = 24px would turn every row inside into a pill. */
|
|
178
|
+
:root, .sw-sq { --sw-inner-r: var(--sw-row-r, 8px); }
|
|
179
|
+
.sw-inner { border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape); }
|
|
180
|
+
|
|
181
|
+
/* Density: one setting (Preferences, or data-density on any ancestor) drives list-row height.
|
|
182
|
+
compact 28 · comfortable 32 · spacious 40. */
|
|
183
|
+
:root { --sw-row-h: 32px; --sw-row-r: 8px; }
|
|
184
|
+
/* Frameless dashboard surfaces (the shell, flush grids) behave like a dense md frame: 14px, so a 6px-inset
|
|
185
|
+
panel inside publishes 14 − 6 = 8, the row radius. */
|
|
186
|
+
.sw-app-shell, .sw-dashboard-grid[data-variant='flush'] { --sw-sq-r: 14px; --sw-inner-r: var(--sw-row-r); }
|
|
187
|
+
[data-density='compact'] { --sw-row-h: 28px; }
|
|
188
|
+
[data-density='comfortable'] { --sw-row-h: 32px; }
|
|
189
|
+
[data-density='spacious'] { --sw-row-h: 40px; }
|
|
190
|
+
|
|
191
|
+
/* components.css */
|
|
192
|
+
/* ── Typography ─────────────────────────────────────────────────────────── */
|
|
193
|
+
.sw-display { margin: 0; font-weight: 450; letter-spacing: -0.055em; line-height: 1; text-wrap: balance; }
|
|
194
|
+
.sw-display[data-size='md'] { font-size: clamp(2.25rem, 5vw, 3.75rem); letter-spacing: -0.045em; line-height: 1.08; }
|
|
195
|
+
.sw-display[data-size='lg'] { font-size: clamp(2.5rem, 7vw, 4.5rem); }
|
|
196
|
+
.sw-display[data-size='xl'] { font-size: clamp(3rem, 10vw, 7.5rem); line-height: 0.9; }
|
|
197
|
+
.sw-outline { color: var(--sw-background); -webkit-text-stroke: 2px var(--sw-outline); paint-order: stroke fill; }
|
|
198
|
+
.sw-heading { margin: 0; font-weight: 450; letter-spacing: -0.04em; line-height: 1.15; text-wrap: balance; }
|
|
199
|
+
.sw-heading[data-size='sm'] { font-size: 1.5rem; letter-spacing: -0.03em; }
|
|
200
|
+
.sw-heading[data-size='md'] { font-size: clamp(1.875rem, 4vw, 3rem); }
|
|
201
|
+
.sw-heading[data-size='lg'] { font-size: clamp(2.25rem, 6vw, 4.5rem); letter-spacing: -0.045em; line-height: 1.08; }
|
|
202
|
+
.sw-text { margin: 0; text-wrap: pretty; }
|
|
203
|
+
.sw-text[data-size='sm'] { font-size: 0.875rem; line-height: 1.43; }
|
|
204
|
+
.sw-text[data-size='base'] { font-size: 1rem; letter-spacing: -0.011em; }
|
|
205
|
+
.sw-text[data-size='lg'] { font-size: clamp(1.125rem, 2vw, 1.5rem); line-height: 1.45; letter-spacing: -0.015em; }
|
|
206
|
+
.sw-text[data-tone='muted'] { color: var(--sw-muted-foreground); }
|
|
207
|
+
.sw-text[data-tone='subtle'] { color: color-mix(in oklab, var(--sw-foreground) 70%, transparent); }
|
|
208
|
+
.sw-caption { font-family: var(--sw-font-mono); font-size: 11px; line-height: 1.55; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sw-muted-foreground); }
|
|
209
|
+
.sw-kbd { font-family: var(--sw-font-mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--sw-frame); border-radius: 5px; corner-shape: var(--sw-corner-shape); background: var(--sw-background); color: var(--sw-muted-foreground); }
|
|
210
|
+
/* Same tones as Separator: frame (default section rule) or hairline. */
|
|
211
|
+
|
|
212
|
+
/* ── Button ─────────────────────────────────────────────────────────────── */
|
|
213
|
+
.sw-button {
|
|
214
|
+
--sw-sq-bg: var(--sw-foreground);
|
|
215
|
+
--_sw-button-height: 40px;
|
|
216
|
+
height: var(--_sw-button-height);
|
|
217
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
|
|
218
|
+
border: 0; background: none; margin: 0; cursor: pointer; text-decoration: none; user-select: none;
|
|
219
|
+
font-family: inherit; font-weight: 450; letter-spacing: -0.02em; white-space: nowrap;
|
|
220
|
+
color: var(--sw-background);
|
|
221
|
+
transition: color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
222
|
+
}
|
|
223
|
+
.sw-button[data-size='2xs'] { --_sw-button-height: 20px; padding: 0 4px; font-size: 12px; gap: 4px; }
|
|
224
|
+
.sw-button[data-size='xs'] { --_sw-button-height: 28px; padding: 0 8px; font-size: 13px; gap: 6px; }
|
|
225
|
+
.sw-button[data-size='sm'] { --_sw-button-height: 32px; padding: 0 12px; font-size: 13px; }
|
|
226
|
+
.sw-button[data-size='md'] { padding: 0 16px; font-size: 15px; }
|
|
227
|
+
.sw-button[data-size='lg'] { --_sw-button-height: 52px; padding: 0 22px; font-size: 17px; letter-spacing: -0.025em; }
|
|
228
|
+
.sw-button[data-size='xl'] { --_sw-button-height: 80px; padding: 0 32px; font-size: 24px; letter-spacing: -0.03em; justify-content: space-between; gap: 16px; text-align: start; }
|
|
229
|
+
@media (max-width: 640px) { .sw-button[data-size='xl'] { --_sw-button-height: 64px; padding: 0 16px; font-size: 18px; } }
|
|
230
|
+
.sw-button--full { display: flex; width: 100%; }
|
|
231
|
+
.sw-button[data-icon-only] { flex: none; inline-size: var(--_sw-button-height); padding: 0; justify-content: center; }
|
|
232
|
+
.sw-button[data-icon-only] .sw-button__icon > svg:not([width]):not([height]) { inline-size: 1.23em; block-size: 1.23em; }
|
|
233
|
+
.sw-button:disabled { cursor: not-allowed; opacity: var(--sw-disabled-opacity); }
|
|
234
|
+
|
|
235
|
+
.sw-button[data-variant='primary']:not(:disabled):hover { --sw-sq-bg: color-mix(in oklab, var(--sw-foreground) 85%, transparent); }
|
|
236
|
+
.sw-button[data-variant='accent'] { --sw-sq-bg: var(--sw-accent-solid); color: var(--sw-accent-foreground); }
|
|
237
|
+
.sw-button[data-variant='accent']:not(:disabled):hover { --sw-sq-bg: var(--sw-accent-solid-hover); }
|
|
238
|
+
.sw-button[data-variant='secondary'] { --sw-sq-bg: var(--sw-button-secondary-bg, var(--sw-muted)); color: var(--sw-foreground); }
|
|
239
|
+
.sw-button[data-variant='secondary']:not(:disabled):hover { --sw-sq-bg: color-mix(in oklab, var(--sw-foreground) 10%, var(--sw-button-secondary-bg, var(--sw-muted))); }
|
|
240
|
+
.sw-button[data-variant='outline'] { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); color: var(--sw-foreground); }
|
|
241
|
+
.sw-button[data-variant='outline']:not(:disabled):hover { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
242
|
+
.sw-button[data-variant='ghost'] { --sw-sq-bg: transparent; color: var(--sw-foreground); }
|
|
243
|
+
.sw-button[data-variant='ghost']:not(:disabled):hover { --sw-sq-bg: color-mix(in oklab, var(--sw-foreground) 6%, transparent); }
|
|
244
|
+
.sw-button[data-variant='ghost'][data-icon-only]:is([data-size='2xs'], [data-size='xs']) { color: var(--sw-muted-foreground); }
|
|
245
|
+
.sw-button[data-variant='ghost'][data-icon-only]:is([data-size='2xs'], [data-size='xs']):not(:disabled):hover,
|
|
246
|
+
.sw-button[data-variant='ghost'][data-icon-only][aria-expanded='true'] { color: var(--sw-foreground); }
|
|
247
|
+
.sw-button[data-variant='ghost'][aria-expanded='true'][aria-haspopup] { --sw-sq-bg: color-mix(in oklab, var(--sw-foreground) 10%, transparent); }
|
|
248
|
+
.sw-button[data-size='2xs'][data-icon-only] .sw-button__icon > svg:not([width]):not([height]) { inline-size: 14px; block-size: 14px; }
|
|
249
|
+
/* Ghost icon buttons on a hovered row: one step above the row's own hover fill, so the target reads. */
|
|
250
|
+
.sw-button[data-variant='ghost'][data-size='2xs']:not(:disabled):hover { --sw-sq-bg: var(--sw-item-active); }
|
|
251
|
+
.sw-button[data-size='xs'][data-icon-only] .sw-button__icon > svg:not([width]):not([height]) { inline-size: 15px; block-size: 15px; }
|
|
252
|
+
.sw-button[data-variant='danger'] { --sw-sq-bg: var(--sw-danger); color: #fff; }
|
|
253
|
+
.sw-button[data-variant='danger']:not(:disabled):hover { --sw-sq-bg: color-mix(in oklab, var(--sw-danger) 85%, black); }
|
|
254
|
+
|
|
255
|
+
.sw-button__icon { display: inline-flex; flex-shrink: 0; }
|
|
256
|
+
.sw-button__icon > svg:not([width]):not([height]) { inline-size: 1.2em; block-size: 1.2em; }
|
|
257
|
+
.sw-button__label { display: inline-flex; }
|
|
258
|
+
.sw-button__spinner { width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: sw-spin 0.7s linear infinite; }
|
|
259
|
+
@keyframes sw-spin { to { transform: rotate(360deg); } }
|
|
260
|
+
|
|
261
|
+
/* ── Card ───────────────────────────────────────────────────────────────── */
|
|
262
|
+
.sw-card { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); display: flex; flex-direction: column; gap: 16px; min-width: 0; color: var(--sw-foreground); }
|
|
263
|
+
.sw-card[data-variant='muted'] { --sw-sq-bg: var(--sw-muted); --sw-sq-border: transparent; }
|
|
264
|
+
.sw-card[data-variant='inverse'] { --sw-sq-bg: var(--sw-foreground); --sw-sq-border: transparent; color: var(--sw-background); }
|
|
265
|
+
.sw-card[data-variant='ghost'] { --sw-sq-bg: transparent; }
|
|
266
|
+
.sw-card[data-padding='sm'] { padding: 16px; }
|
|
267
|
+
.sw-card[data-padding='md'] { padding: 24px; }
|
|
268
|
+
.sw-card[data-padding='lg'] { padding: 40px; }
|
|
269
|
+
@media (max-width: 640px) { .sw-card[data-padding='lg'] { padding: 24px; } }
|
|
270
|
+
.sw-card[data-interactive] { cursor: pointer; }
|
|
271
|
+
.sw-card[data-interactive]:hover { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 40%, var(--sw-background)); }
|
|
272
|
+
.sw-card__link { position: absolute; inset: 0; z-index: -1; outline: none; }
|
|
273
|
+
.sw-card__linked-content { display: contents; }
|
|
274
|
+
.sw-card:has(> .sw-card__link:focus-visible) > .sw-sq-ring { opacity: 1; }
|
|
275
|
+
.sw-link { color: var(--sw-accent); text-decoration: underline; text-underline-offset: 0.18em; }
|
|
276
|
+
.sw-link:hover { color: var(--sw-foreground); }
|
|
277
|
+
.sw-link:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 2px; }
|
|
278
|
+
.sw-card > :where(:not(.sw-sq-fill, .sw-sq-stroke, .sw-sq-ring, .sw-card__link)) { position: relative; }
|
|
279
|
+
.sw-card__header { display: flex; flex-direction: column; gap: 4px; }
|
|
280
|
+
.sw-card__title { margin: 0; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.025em; line-height: 1.3; }
|
|
281
|
+
.sw-card__description { margin: 0; font-size: 0.875rem; line-height: 1.43; color: var(--sw-muted-foreground); text-wrap: pretty; }
|
|
282
|
+
.sw-card[data-variant='inverse'] .sw-card__description { color: color-mix(in oklab, var(--sw-background) 65%, transparent); }
|
|
283
|
+
.sw-card__content { display: flex; flex-direction: column; gap: 12px; }
|
|
284
|
+
.sw-card__footer { display: flex; align-items: center; gap: 8px; margin-top: auto; }
|
|
285
|
+
|
|
286
|
+
/* ── PosterCard (container-query typography) ───────────── */
|
|
287
|
+
.sw-poster { container-type: inline-size; }
|
|
288
|
+
.sw-poster__inner { position: relative; display: flex; flex-direction: column; gap: 5cqi; height: 100%; padding: 7cqi; }
|
|
289
|
+
.sw-poster__head { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3cqi; }
|
|
290
|
+
.sw-poster__action { position: absolute; top: 0; right: 0; }
|
|
291
|
+
.sw-poster__title { display: flex; flex-direction: column; align-items: flex-start; font-size: 11cqi; }
|
|
292
|
+
.sw-poster__word {
|
|
293
|
+
display: block; font-weight: 450; letter-spacing: -0.05em; line-height: 0.9; white-space: nowrap; user-select: none; pointer-events: none;
|
|
294
|
+
--sw-outline: color-mix(in oklab, var(--sw-foreground) 80%, var(--sw-background));
|
|
295
|
+
}
|
|
296
|
+
.sw-poster__word[data-mode='outline'] { color: var(--sw-background); -webkit-text-stroke: 1.5px var(--sw-outline); paint-order: stroke fill; }
|
|
297
|
+
.sw-poster__word[data-mode='muted'] { color: color-mix(in oklab, var(--sw-foreground) 42%, var(--sw-background)); }
|
|
298
|
+
.sw-poster__caption { margin: 0; display: flex; flex-direction: column; font-family: var(--sw-font-mono); font-size: 10px; line-height: 1.55; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sw-foreground); }
|
|
299
|
+
@container (min-width: 36rem) { .sw-poster__caption { font-size: 11px; } }
|
|
300
|
+
.sw-poster__demo { position: relative; display: flex; flex: 1; width: 100%; min-width: 0; align-items: center; justify-content: center; padding-block: 2cqi; }
|
|
301
|
+
|
|
302
|
+
/* ── RadioGroup variant="card" ─────────────────────────────────────────── */
|
|
303
|
+
.sw-radio-group[data-variant='card'] { display: grid; gap: 4px; }
|
|
304
|
+
@container (min-width: 35rem) { .sw-radio-group[data-variant='card'][data-columns='2'] { grid-template-columns: repeat(2, 1fr); } .sw-radio-group[data-variant='card'][data-columns='3'] { grid-template-columns: repeat(3, 1fr); } .sw-radio-group[data-variant='card'][data-columns='4'] { grid-template-columns: repeat(4, 1fr); } }
|
|
305
|
+
@media (min-width: 640px) { .sw-radio-group[data-variant='card']:not(:where(.sw-poster *))[data-columns='2'] { grid-template-columns: repeat(2, 1fr); } .sw-radio-group[data-variant='card']:not(:where(.sw-poster *))[data-columns='3'] { grid-template-columns: repeat(3, 1fr); } .sw-radio-group[data-variant='card']:not(:where(.sw-poster *))[data-columns='4'] { grid-template-columns: repeat(4, 1fr); } }
|
|
306
|
+
.sw-option {
|
|
307
|
+
--sw-sq-bg: transparent;
|
|
308
|
+
position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 44px; padding: 8px 14px;
|
|
309
|
+
border: 0; background: none; text-align: start; cursor: pointer; font: inherit; font-size: 15px; font-weight: 450; letter-spacing: -0.01em;
|
|
310
|
+
color: var(--sw-muted-foreground);
|
|
311
|
+
transition: color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
312
|
+
}
|
|
313
|
+
.sw-option .sw-sq-fill { transition: background-color var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
314
|
+
.sw-option:not(:disabled):not([data-state='checked']):hover { --sw-sq-bg: color-mix(in oklab, var(--sw-foreground) 6%, transparent); color: var(--sw-foreground); }
|
|
315
|
+
.sw-option[data-state='checked'] { --sw-sq-bg: color-mix(in oklab, var(--sw-foreground) 10%, transparent); color: var(--sw-foreground); font-weight: 500; }
|
|
316
|
+
.sw-option:disabled { opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
317
|
+
.sw-option__icon { display: inline-flex; flex-shrink: 0; width: 18px; height: 18px; }
|
|
318
|
+
.sw-option__icon > svg { width: 100%; height: 100%; }
|
|
319
|
+
.sw-option__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
320
|
+
.sw-option__title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
|
|
321
|
+
.sw-option__description { font-size: 13px; font-weight: 400; line-height: 1.35; letter-spacing: 0; color: var(--sw-muted-foreground); }
|
|
322
|
+
.sw-radio-group[aria-invalid='true'] .sw-option { --sw-sq-border: var(--sw-danger); }
|
|
323
|
+
|
|
324
|
+
/* ── Badge ──────────────────────────────────────────────────────────────── */
|
|
325
|
+
.sw-badge { display: inline-flex; width: fit-content; max-width: 100%; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; background: var(--sw-muted); color: var(--sw-foreground); }
|
|
326
|
+
.sw-badge[data-mono] { font-family: var(--sw-font-mono); font-weight: 400; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
|
|
327
|
+
.sw-badge[data-variant='accent'] { background: color-mix(in oklab, var(--sw-accent) 12%, transparent); color: var(--sw-accent); }
|
|
328
|
+
.sw-badge[data-variant='success'] { background: color-mix(in oklab, var(--sw-success) 14%, transparent); color: var(--sw-success); }
|
|
329
|
+
.sw-badge[data-variant='warning'] {
|
|
330
|
+
background: color-mix(in oklab, var(--sw-warning) 14%, var(--sw-background));
|
|
331
|
+
color: color-mix(in oklab, var(--sw-warning) 70%, var(--sw-foreground));
|
|
332
|
+
}
|
|
333
|
+
.sw-badge[data-variant='danger'] { background: color-mix(in oklab, var(--sw-danger) 12%, transparent); color: var(--sw-danger); }
|
|
334
|
+
.sw-badge[data-variant='outline'] { background: transparent; box-shadow: inset 0 0 0 1px var(--sw-frame); }
|
|
335
|
+
.sw-badge[data-variant='inverse'] { background: var(--sw-foreground); color: var(--sw-background); }
|
|
336
|
+
.sw-badge__icon { display: grid; place-items: center; flex: 0 0 12px; width: 12px; height: 12px; }
|
|
337
|
+
.sw-badge__icon > svg { display: block; width: 100%; height: 100%; }
|
|
338
|
+
.sw-badge__pulse { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }
|
|
339
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
340
|
+
.sw-badge__pulse { animation: sw-status-pulse 1.8s ease-in-out infinite; }
|
|
341
|
+
}
|
|
342
|
+
:root[data-motion='reduce'] .sw-badge__pulse { animation: none; }
|
|
343
|
+
@keyframes sw-status-pulse { 50% { opacity: 0.4; } }
|
|
344
|
+
|
|
345
|
+
/* ── Switch ─────────────────────────────────────────────────────────────── */
|
|
346
|
+
.sw-switch { --w: 44px; --h: 26px; --p: 3px; --sw-sq-bg: color-mix(in oklab, var(--sw-foreground) 14%, var(--sw-background)); display: inline-flex; align-items: center; flex-shrink: 0; width: var(--w); height: var(--h); padding: var(--p); border: 0; cursor: pointer; background: transparent; }
|
|
347
|
+
.sw-switch[data-size='sm'] { --w: 34px; --h: 20px; --p: 2px; }
|
|
348
|
+
.sw-switch[data-state='on'] { justify-content: flex-end; --sw-sq-bg: var(--sw-accent-solid); }
|
|
349
|
+
.sw-switch:disabled { opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
350
|
+
.sw-switch__thumb { display: block; width: calc(var(--h) - var(--p) * 2); height: calc(var(--h) - var(--p) * 2); border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.2), 0 2px 6px rgb(0 0 0 / 0.08); }
|
|
351
|
+
.sw-switch[data-state='on'] .sw-switch__thumb { background: var(--sw-accent-foreground); }
|
|
352
|
+
.sw-field-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
|
|
353
|
+
.sw-field-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
354
|
+
/* Field-row type is shared with Checkbox/Radio rows: 14px/450 label, 13px muted description. */
|
|
355
|
+
.sw-field-row__label { font-size: 14px; font-weight: 450; letter-spacing: -0.01em; line-height: 20px; cursor: pointer; }
|
|
356
|
+
.sw-field-row__description { font-size: 13px; line-height: 1.4; color: var(--sw-muted-foreground); }
|
|
357
|
+
|
|
358
|
+
/* ── SegmentedControl ───────────────────────────────────────────────────── */
|
|
359
|
+
.sw-segmented { --sw-sq-bg: var(--sw-segmented-track-bg, var(--sw-muted)); display: inline-flex; padding: 3px; gap: 2px; }
|
|
360
|
+
.sw-segmented--full { display: flex; width: 100%; }
|
|
361
|
+
.sw-segmented--full .sw-segmented__item { flex: 1; }
|
|
362
|
+
.sw-segmented__item { position: relative; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; cursor: pointer; font: inherit; color: var(--sw-muted-foreground); padding: 0 14px; height: 34px; font-size: 14px; font-weight: 450; letter-spacing: -0.01em; transition: color var(--sw-duration-base) var(--sw-ease-standard); outline: none; white-space: nowrap; }
|
|
363
|
+
.sw-segmented[data-size='sm'] .sw-segmented__item { height: 28px; padding: 0 10px; font-size: 13px; }
|
|
364
|
+
.sw-segmented[data-appearance='icon-capsule'] .sw-segmented__item { flex: 0 0 auto; aspect-ratio: 1; padding: 0; }
|
|
365
|
+
.sw-segmented[data-appearance='icon-capsule'] .sw-segmented__label { display: grid; place-items: center; }
|
|
366
|
+
.sw-segmented__item:hover { color: var(--sw-foreground); }
|
|
367
|
+
.sw-segmented__item[data-state='checked'] { color: var(--sw-foreground); }
|
|
368
|
+
/* Focus ring sits on the pill (the focused segment is always the checked one). */
|
|
369
|
+
.sw-segmented:has(> .sw-segmented__item:focus-visible) > .sw-segmented__pill > .sw-sq-ring { opacity: 1; }
|
|
370
|
+
.sw-segmented__item:disabled { opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
371
|
+
.sw-segmented__pill { --sw-sq-bg: var(--sw-background); position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 0.1)); }
|
|
372
|
+
/* Glide only on a value change (set by the component); reflows move the pill instantly. */
|
|
373
|
+
.sw-segmented__pill[data-gliding] { transition: transform 260ms var(--sw-ease-emphasized), width 260ms var(--sw-ease-emphasized), height 260ms var(--sw-ease-emphasized); }
|
|
374
|
+
@media (prefers-reduced-motion: reduce) { .sw-segmented__pill[data-gliding] { transition: none; } }
|
|
375
|
+
:root[data-motion='reduce'] .sw-segmented__pill[data-gliding] { transition: none; }
|
|
376
|
+
.sw-segmented__label { position: relative; z-index: 1; }
|
|
377
|
+
|
|
378
|
+
/* ── Input ──────────────────────────────────────────────────────────────── */
|
|
379
|
+
.sw-input { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
|
|
380
|
+
.sw-input__label { font-size: 13px; font-weight: 500; letter-spacing: -0.01em; }
|
|
381
|
+
/* --sw-inset = gap between the frame and inner buttons (clear, reveal, steppers) so their corners are concentric. */
|
|
382
|
+
.sw-input__field { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); --sw-field-padding: 12px; --sw-inset: 6px; display: flex; align-items: center; gap: 8px; padding: 0 var(--sw-field-padding); height: 40px; }
|
|
383
|
+
.sw-input[data-size='xs'] .sw-input__field { --sw-field-padding: 6px; --sw-inset: 4px; gap: 6px; height: 28px; }
|
|
384
|
+
.sw-input[data-size='xs'] .sw-input__control { font-size: 13px; }
|
|
385
|
+
.sw-input[data-size='xs'] .sw-input__affix { font-size: 13px; }
|
|
386
|
+
.sw-input[data-size='xs'] .sw-input__affix > svg { width: 14px; height: 14px; }
|
|
387
|
+
.sw-input[data-size='sm'] .sw-input__field { --sw-field-padding: 10px; --sw-inset: 4px; height: 32px; }
|
|
388
|
+
/* Filled: borderless muted well for dense toolbars; the frame appears on focus. */
|
|
389
|
+
.sw-input[data-variant='filled'] .sw-input__field { --sw-sq-bg: var(--sw-item-hover); --sw-sq-border: transparent; }
|
|
390
|
+
.sw-input[data-variant='filled'] .sw-input__field:hover { --sw-sq-border: transparent; }
|
|
391
|
+
.sw-input[data-variant='filled'] .sw-input__field:focus-within { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-outline); }
|
|
392
|
+
.sw-input__control[type='search']::-webkit-search-cancel-button { appearance: none; }
|
|
393
|
+
.sw-input__kbd { flex: none; padding: 0 5px; border: 1px solid var(--sw-border); border-radius: 4px; font-family: var(--sw-font-mono); font-size: 10px; line-height: 16px; color: var(--sw-muted-foreground); }
|
|
394
|
+
.sw-input__field:focus-within .sw-input__kbd { display: none; }
|
|
395
|
+
.sw-input[data-size='lg'] .sw-input__field { --sw-field-padding: 16px; --sw-inset: 8px; height: 52px; }
|
|
396
|
+
.sw-input__field:hover { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
397
|
+
.sw-input__field:focus-within { --sw-sq-border: var(--sw-accent); }
|
|
398
|
+
.sw-input__field:has(:focus-visible) > .sw-sq-ring { opacity: 1; }
|
|
399
|
+
.sw-input[data-invalid] .sw-input__field { --sw-sq-border: var(--sw-danger); --sw-sq-ring: var(--sw-danger); }
|
|
400
|
+
.sw-input__control { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font: inherit; font-size: 15px; color: var(--sw-foreground); }
|
|
401
|
+
.sw-input[data-size='lg'] .sw-input__control { font-size: 17px; }
|
|
402
|
+
.sw-input__control::placeholder { color: color-mix(in oklab, var(--sw-muted-foreground) 80%, transparent); }
|
|
403
|
+
.sw-input__affix { display: inline-flex; color: var(--sw-muted-foreground); font-size: 14px; }
|
|
404
|
+
.sw-input__hint, .sw-input__error { margin: 0; font-size: 13px; line-height: 1.4; color: var(--sw-muted-foreground); }
|
|
405
|
+
.sw-input__error { color: var(--sw-danger); }
|
|
406
|
+
|
|
407
|
+
/* ── Stat ───────────────────────────────────────────────────────────────── */
|
|
408
|
+
.sw-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
409
|
+
.sw-stat__label { font-family: var(--sw-font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sw-muted-foreground); }
|
|
410
|
+
.sw-stat__row { display: flex; align-items: baseline; gap: 8px; }
|
|
411
|
+
.sw-stat__value { font-size: 2rem; font-weight: 450; letter-spacing: -0.045em; line-height: 1.1; font-variant-numeric: tabular-nums; }
|
|
412
|
+
.sw-stat[data-tone='warning'] .sw-stat__value { color: color-mix(in oklab, var(--sw-warning) 70%, var(--sw-foreground)); }
|
|
413
|
+
.sw-stat[data-tone='success'] .sw-stat__value { color: color-mix(in oklab, var(--sw-success) 70%, var(--sw-foreground)); }
|
|
414
|
+
.sw-stat[data-tone='danger'] .sw-stat__value { color: color-mix(in oklab, var(--sw-danger) 80%, var(--sw-foreground)); }
|
|
415
|
+
.sw-stat__delta { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
|
|
416
|
+
.sw-stat__delta[data-trend='up'] { color: var(--sw-success); }
|
|
417
|
+
.sw-stat__delta[data-trend='down'] { color: var(--sw-danger); }
|
|
418
|
+
.sw-stat__delta[data-trend='flat'] { color: var(--sw-muted-foreground); }
|
|
419
|
+
.sw-stat__status { align-self: flex-start; margin-top: 2px; }
|
|
420
|
+
.sw-stat__extra { margin-top: 4px; }
|
|
421
|
+
|
|
422
|
+
/* Stat, size sm: the dashboard metric. Sentence-case label, 24px tabular number, tinted delta pill, caption. */
|
|
423
|
+
.sw-stat[data-size='sm'] { gap: 2px; }
|
|
424
|
+
.sw-stat[data-size='sm'] .sw-stat__label { font-family: inherit; font-size: 13px; letter-spacing: 0; text-transform: none; }
|
|
425
|
+
.sw-stat[data-size='sm'] .sw-stat__row { align-items: center; gap: 8px; }
|
|
426
|
+
.sw-stat[data-size='sm'] .sw-stat__value { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.25; }
|
|
427
|
+
.sw-stat[data-size='sm'] .sw-stat__delta { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 6px; corner-shape: var(--sw-corner-shape); font-size: 12px; }
|
|
428
|
+
.sw-stat[data-size='sm'] .sw-stat__delta[data-trend='up'] { background: color-mix(in oklab, var(--sw-success) 14%, transparent); }
|
|
429
|
+
.sw-stat[data-size='sm'] .sw-stat__delta[data-trend='down'] { background: color-mix(in oklab, var(--sw-danger) 12%, transparent); }
|
|
430
|
+
.sw-stat[data-size='sm'] .sw-stat__delta[data-trend='flat'] { background: var(--sw-muted); }
|
|
431
|
+
.sw-stat__caption { font-size: 12px; color: var(--sw-muted-foreground); }
|
|
432
|
+
|
|
433
|
+
/* ── Card, panel layout (title / toolbar / footer) ─────────────────────────
|
|
434
|
+
Header bar = inset + 28px trigger + inset (40px at the default 6px inset). Fills sit `inset` from
|
|
435
|
+
the frame; text starts 6px further in, on the same line as the body padding. */
|
|
436
|
+
.sw-card[data-layout='panel'] { --sw-card-inset: 6px; --sw-card-pad: 12px; padding: 0; gap: 0; }
|
|
437
|
+
.sw-card[data-layout='panel'][data-padding='none'] { --sw-card-pad: 0px; }
|
|
438
|
+
.sw-card[data-layout='panel'][data-padding='md'] { --sw-card-inset: 10px; --sw-card-pad: 16px; }
|
|
439
|
+
.sw-card[data-layout='panel'][data-padding='lg'] { --sw-card-inset: 18px; --sw-card-pad: 24px; }
|
|
440
|
+
.sw-card:not([data-framed]) { --sw-sq-bg: transparent; }
|
|
441
|
+
/* A panel card publishes the inner radius for its fills: frame radius − its own inset. Framed, the frame is
|
|
442
|
+
itself; unframed (in a joined grid or the shell), it is the nearest frame's radius. */
|
|
443
|
+
.sw-card[data-layout='panel'] { --sw-inner-r: max(4px, calc(var(--sw-sq-r, 14px) - var(--sw-card-inset))); }
|
|
444
|
+
.sw-card__bar { position: relative; display: flex; align-items: center; gap: 4px; min-width: 0; padding: var(--sw-card-inset); }
|
|
445
|
+
.sw-card__heading { flex: 1; min-width: 0; margin: 0; font: inherit; }
|
|
446
|
+
.sw-card__trigger {
|
|
447
|
+
--sw-inset: var(--sw-card-inset);
|
|
448
|
+
display: flex; align-items: center; gap: 6px; max-width: 100%; height: 28px; padding: 0 6px;
|
|
449
|
+
border: 0; border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape); background: none; color: inherit;
|
|
450
|
+
font: inherit; font-size: 13px; font-weight: 500; letter-spacing: -0.005em; text-align: start; cursor: pointer; outline: none;
|
|
451
|
+
}
|
|
452
|
+
.sw-card__trigger[data-static] { cursor: default; }
|
|
453
|
+
button.sw-card__trigger:hover { background: var(--sw-item-hover); }
|
|
454
|
+
.sw-card__trigger:focus-visible { box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
455
|
+
.sw-card__bar-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
456
|
+
.sw-card__count { flex: none; font-family: var(--sw-font-mono); font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; color: var(--sw-muted-foreground); }
|
|
457
|
+
.sw-card__icon { display: inline-flex; flex: none; width: 15px; height: 15px; color: var(--sw-muted-foreground); }
|
|
458
|
+
.sw-card__icon > svg { width: 15px; height: 15px; }
|
|
459
|
+
.sw-card__chevron { display: inline-flex; flex: none; width: 14px; height: 14px; color: var(--sw-muted-foreground); transition: transform var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
460
|
+
.sw-card__chevron svg { width: 14px; height: 14px; }
|
|
461
|
+
.sw-card[data-state='open'] > .sw-card__bar .sw-card__chevron { transform: rotate(90deg); }
|
|
462
|
+
.sw-card__actions { display: flex; align-items: center; gap: 2px; flex: none; margin-left: auto; }
|
|
463
|
+
.sw-card__inner { display: flex; flex-direction: column; min-width: 0; }
|
|
464
|
+
.sw-card__toolbar { padding: 0 var(--sw-card-inset) var(--sw-card-inset); }
|
|
465
|
+
.sw-card[data-layout='panel']:not(:has(> .sw-card__bar)) .sw-card__toolbar { padding-top: var(--sw-card-inset); }
|
|
466
|
+
.sw-card__toolbar > .sw-toolbar { display: flex; flex-wrap: nowrap; width: 100%; }
|
|
467
|
+
.sw-card__toolbar .sw-toolbar__field { flex: 1; padding-inline: 6px; }
|
|
468
|
+
.sw-card__body { min-width: 0; padding: 0 var(--sw-card-pad) var(--sw-card-pad); }
|
|
469
|
+
.sw-card[data-layout='panel']:not(:has(> .sw-card__bar)) .sw-card__body { padding-top: var(--sw-card-pad); }
|
|
470
|
+
.sw-card__foot { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px max(12px, var(--sw-card-pad)); border-top: 1px solid var(--sw-border); font-size: 12px; color: var(--sw-muted-foreground); }
|
|
471
|
+
/* Lists and bars flush to the card: rows sit `inset` from the frame, their content on the 12px line. */
|
|
472
|
+
.sw-card[data-layout='panel'][data-padding='none'] .sw-card__body > :is(.sw-listbox, .sw-bar-list, .sw-carousel) .sw-listbox__body,
|
|
473
|
+
.sw-card[data-layout='panel'][data-padding='none'] .sw-card__body > .sw-listbox > .sw-listbox__body { padding: 0 var(--sw-card-inset) var(--sw-card-inset); }
|
|
474
|
+
.sw-card[data-layout='panel'][data-padding='none'] .sw-card__body .sw-bar-list { padding: 0 var(--sw-card-inset) var(--sw-card-inset); }
|
|
475
|
+
|
|
476
|
+
/* charts.css */
|
|
477
|
+
/* Unovis theme — maps Unovis CSS variables onto SW3 tokens. */
|
|
478
|
+
.sw-chart {
|
|
479
|
+
position: relative; width: 100%; min-width: 0;
|
|
480
|
+
--vis-font-family: var(--sw-font-sans);
|
|
481
|
+
--vis-color0: var(--sw-chart-1); --vis-color1: var(--sw-chart-2); --vis-color2: var(--sw-chart-3); --vis-color3: var(--sw-chart-4);
|
|
482
|
+
--vis-color4: var(--sw-chart-5); --vis-color5: var(--sw-chart-6); --vis-color6: var(--sw-chart-7); --vis-color7: var(--sw-chart-8);
|
|
483
|
+
--vis-axis-font-family: var(--sw-font-mono);
|
|
484
|
+
--vis-axis-tick-label-font-size: 10px;
|
|
485
|
+
--vis-axis-tick-label-color: var(--sw-muted-foreground);
|
|
486
|
+
--vis-axis-tick-color: transparent;
|
|
487
|
+
--vis-axis-domain-color: var(--sw-hairline);
|
|
488
|
+
--vis-axis-grid-color: var(--sw-hairline);
|
|
489
|
+
--vis-axis-grid-line-width: 1px;
|
|
490
|
+
--vis-axis-label-color: var(--sw-muted-foreground);
|
|
491
|
+
--vis-axis-label-font-size: 11px;
|
|
492
|
+
--vis-dark-axis-label-color: var(--sw-muted-foreground);
|
|
493
|
+
--vis-crosshair-line-stroke-color: color-mix(in oklab, var(--sw-foreground) 35%, transparent);
|
|
494
|
+
--vis-crosshair-line-stroke-width: 1px;
|
|
495
|
+
--vis-crosshair-circle-stroke-color: var(--sw-background);
|
|
496
|
+
--vis-crosshair-circle-stroke-width: 2px;
|
|
497
|
+
--vis-tooltip-background-color: var(--sw-background);
|
|
498
|
+
--vis-tooltip-border-color: var(--sw-frame);
|
|
499
|
+
--vis-tooltip-text-color: var(--sw-foreground);
|
|
500
|
+
/* Tooltip = the .sw-popup look: 1px frame, sm squircle radius, no one-off shadow. */
|
|
501
|
+
--vis-tooltip-border-radius: var(--sw-radius-sm);
|
|
502
|
+
--vis-tooltip-padding: 8px 10px;
|
|
503
|
+
--vis-tooltip-box-shadow: none;
|
|
504
|
+
--vis-donut-background-color: var(--sw-muted);
|
|
505
|
+
--vis-donut-segment-stroke-width: 0;
|
|
506
|
+
--vis-donut-icon-color: var(--sw-background); --vis-dark-donut-icon-color: var(--sw-background);
|
|
507
|
+
--vis-donut-central-label-font-size: 28px;
|
|
508
|
+
--vis-donut-central-label-font-weight: 450;
|
|
509
|
+
--vis-donut-central-label-text-color: var(--sw-foreground);
|
|
510
|
+
--vis-donut-central-sub-label-text-color: var(--sw-muted-foreground);
|
|
511
|
+
--vis-donut-central-sub-label-font-size: 11px;
|
|
512
|
+
--vis-grouped-bar-stroke-width: 0;
|
|
513
|
+
--vis-stacked-bar-stroke-width: 0;
|
|
514
|
+
--vis-area-stroke-width: 0;
|
|
515
|
+
--vis-scatter-stroke-color: var(--sw-background);
|
|
516
|
+
--vis-scatter-fill-opacity: 0.85;
|
|
517
|
+
--vis-scatter-point-label-text-color: var(--sw-muted-foreground); --vis-dark-scatter-point-label-text-color: var(--sw-muted-foreground);
|
|
518
|
+
--vis-scatter-point-label-text-color-dark: var(--sw-foreground); --vis-scatter-point-label-text-color-light: #fff;
|
|
519
|
+
--vis-dark-axis-tick-label-color: var(--sw-muted-foreground);
|
|
520
|
+
--vis-dark-axis-grid-color: var(--sw-hairline);
|
|
521
|
+
--vis-dark-tooltip-background-color: var(--sw-background);
|
|
522
|
+
--vis-dark-tooltip-text-color: var(--sw-foreground);
|
|
523
|
+
--vis-dark-tooltip-border-color: var(--sw-frame);
|
|
524
|
+
--vis-dark-donut-background-color: var(--sw-muted);
|
|
525
|
+
--vis-dark-donut-central-label-text-color: var(--sw-foreground);
|
|
526
|
+
--vis-dark-donut-central-sub-label-text-color: var(--sw-muted-foreground);
|
|
527
|
+
}
|
|
528
|
+
/* Every other Unovis component, mapped onto SW3 tokens. Light and dark names get the same
|
|
529
|
+
token because SW3 tokens already switch with data-theme. */
|
|
530
|
+
.sw-chart {
|
|
531
|
+
--vis-color-main: var(--sw-chart-1); --vis-dark-color-main: var(--sw-chart-1);
|
|
532
|
+
--vis-color-main-light: var(--sw-chart-1); --vis-dark-color-main-light: var(--sw-chart-1);
|
|
533
|
+
--vis-color-main-dark: var(--sw-chart-1); --vis-dark-color-main-dark: var(--sw-chart-1);
|
|
534
|
+
--vis-color-grey: var(--sw-muted-foreground); --vis-dark-color-grey: var(--sw-muted-foreground);
|
|
535
|
+
--vis-legend-font-family: var(--sw-font-sans); --vis-dark-legend-font-family: var(--sw-font-sans);
|
|
536
|
+
--vis-legend-label-color: var(--sw-muted-foreground); --vis-dark-legend-label-color: var(--sw-muted-foreground);
|
|
537
|
+
--vis-legend-label-font-size: 12px; --vis-dark-legend-label-font-size: 12px;
|
|
538
|
+
--vis-legend-bullet-size: 9px; --vis-dark-legend-bullet-size: 9px;
|
|
539
|
+
--vis-legend-bullet-label-spacing: 6px; --vis-dark-legend-bullet-label-spacing: 6px;
|
|
540
|
+
--vis-legend-item-spacing: 16px; --vis-dark-legend-item-spacing: 16px;
|
|
541
|
+
--vis-legend-bullet-inactive-opacity: 0.25; --vis-dark-legend-bullet-inactive-opacity: 0.25;
|
|
542
|
+
--vis-xy-label-font-size: 11px; --vis-dark-xy-label-font-size: 11px;
|
|
543
|
+
--vis-xy-label-text-color-dark: var(--sw-foreground); --vis-dark-xy-label-text-color-dark: var(--sw-foreground);
|
|
544
|
+
--vis-xy-label-text-color-light: #fff; --vis-dark-xy-label-text-color-light: #fff;
|
|
545
|
+
--vis-annotations-text-color: var(--sw-foreground); --vis-dark-annotations-text-color: var(--sw-foreground);
|
|
546
|
+
--vis-annotations-connector-stroke-color: var(--sw-muted-foreground); --vis-dark-annotations-connector-stroke-color: var(--sw-muted-foreground);
|
|
547
|
+
--vis-annotations-subject-stroke-color: var(--sw-muted-foreground); --vis-dark-annotations-subject-stroke-color: var(--sw-muted-foreground);
|
|
548
|
+
--vis-annotations-subject-fill-color: none; --vis-dark-annotations-subject-fill-color: none;
|
|
549
|
+
--vis-plotband-color: color-mix(in oklab, var(--sw-chart-1) 14%, transparent); --vis-dark-plotband-color: color-mix(in oklab, var(--sw-chart-1) 14%, transparent);
|
|
550
|
+
--vis-plotband-label-color: var(--sw-muted-foreground); --vis-dark-plotband-label-color: var(--sw-muted-foreground);
|
|
551
|
+
--vis-plotband-label-font-size: 11px; --vis-dark-plotband-label-font-size: 11px;
|
|
552
|
+
--vis-plotline-color: var(--sw-foreground); --vis-dark-plotline-color: var(--sw-foreground);
|
|
553
|
+
--vis-plotline-label-color: var(--sw-muted-foreground); --vis-dark-plotline-label-color: var(--sw-muted-foreground);
|
|
554
|
+
--vis-plotline-label-font-size: 11px; --vis-dark-plotline-label-font-size: 11px;
|
|
555
|
+
--vis-brush-selection-fill-color: transparent; --vis-dark-brush-selection-fill-color: transparent;
|
|
556
|
+
--vis-brush-selection-stroke-color: var(--sw-frame); --vis-dark-brush-selection-stroke-color: var(--sw-frame);
|
|
557
|
+
--vis-brush-unselected-fill-color: var(--sw-muted); --vis-dark-brush-unselected-fill-color: var(--sw-muted);
|
|
558
|
+
--vis-brush-unselected-opacity: 0.7; --vis-dark-brush-unselected-opacity: 0.7;
|
|
559
|
+
--vis-brush-handle-fill-color: var(--sw-foreground); --vis-dark-brush-handle-fill-color: var(--sw-foreground);
|
|
560
|
+
--vis-brush-handle-stroke-color: var(--sw-background); --vis-dark-brush-handle-stroke-color: var(--sw-background);
|
|
561
|
+
--vis-free-brush-selection-fill-color: var(--sw-accent-solid); --vis-dark-free-brush-selection-fill-color: var(--sw-accent-solid);
|
|
562
|
+
--vis-free-brush-selection-fill-opacity: 0.12; --vis-dark-free-brush-selection-fill-opacity: 0.12;
|
|
563
|
+
--vis-free-brush-selection-stroke-color: var(--sw-accent-solid); --vis-dark-free-brush-selection-stroke-color: var(--sw-accent-solid);
|
|
564
|
+
--vis-free-brush-handle-fill-color: var(--sw-accent-solid); --vis-dark-free-brush-handle-fill-color: var(--sw-accent-solid);
|
|
565
|
+
--vis-boxplot-fill-color: var(--sw-chart-1); --vis-dark-boxplot-fill-color: var(--sw-chart-1);
|
|
566
|
+
--vis-boxplot-fill-opacity: 0.3; --vis-dark-boxplot-fill-opacity: 0.3;
|
|
567
|
+
--vis-boxplot-stroke-color: var(--sw-chart-1); --vis-dark-boxplot-stroke-color: var(--sw-chart-1);
|
|
568
|
+
--vis-boxplot-median-stroke-color: var(--sw-foreground); --vis-dark-boxplot-median-stroke-color: var(--sw-foreground);
|
|
569
|
+
--vis-boxplot-whisker-stroke-color: var(--sw-muted-foreground); --vis-dark-boxplot-whisker-stroke-color: var(--sw-muted-foreground);
|
|
570
|
+
--vis-heatmap-cell-stroke-color: var(--sw-background); --vis-dark-heatmap-cell-stroke-color: var(--sw-background);
|
|
571
|
+
--vis-heatmap-cell-fill-color: var(--sw-muted); --vis-dark-heatmap-cell-fill-color: var(--sw-muted);
|
|
572
|
+
--vis-heatmap-cell-stroke-width: 1px; --vis-dark-heatmap-cell-stroke-width: 1px;
|
|
573
|
+
--vis-heatmap-label-color: var(--sw-foreground); --vis-dark-heatmap-label-color: var(--sw-foreground);
|
|
574
|
+
--vis-heatmap-label-font-family: var(--sw-font-mono); --vis-dark-heatmap-label-font-family: var(--sw-font-mono);
|
|
575
|
+
--vis-heatmap-label-font-size: 10px; --vis-dark-heatmap-label-font-size: 10px;
|
|
576
|
+
--vis-heatmap-color-1: color-mix(in oklab, var(--sw-chart-1) 18%, var(--sw-muted)); --vis-dark-heatmap-color-1: color-mix(in oklab, var(--sw-chart-1) 18%, var(--sw-muted));
|
|
577
|
+
--vis-heatmap-color-2: color-mix(in oklab, var(--sw-chart-1) 45%, var(--sw-muted)); --vis-dark-heatmap-color-2: color-mix(in oklab, var(--sw-chart-1) 45%, var(--sw-muted));
|
|
578
|
+
--vis-heatmap-color-3: color-mix(in oklab, var(--sw-chart-1) 72%, var(--sw-muted)); --vis-dark-heatmap-color-3: color-mix(in oklab, var(--sw-chart-1) 72%, var(--sw-muted));
|
|
579
|
+
--vis-heatmap-color-4: var(--sw-chart-1); --vis-dark-heatmap-color-4: var(--sw-chart-1);
|
|
580
|
+
--vis-radial-bar-background-color: var(--sw-muted); --vis-dark-radial-bar-background-color: var(--sw-muted);
|
|
581
|
+
--vis-radial-bar-central-label-text-color: var(--sw-foreground); --vis-dark-radial-bar-central-label-text-color: var(--sw-foreground);
|
|
582
|
+
--vis-radial-bar-central-sub-label-text-color: var(--sw-muted-foreground); --vis-dark-radial-bar-central-sub-label-text-color: var(--sw-muted-foreground);
|
|
583
|
+
--vis-circular-bar-background-color: var(--sw-muted); --vis-dark-circular-bar-background-color: var(--sw-muted);
|
|
584
|
+
--vis-circular-bar-icon-color: var(--sw-background); --vis-dark-circular-bar-icon-color: var(--sw-background);
|
|
585
|
+
--vis-nested-donut-background-color: var(--sw-muted); --vis-dark-nested-donut-background-color: var(--sw-muted);
|
|
586
|
+
--vis-nested-donut-segment-stroke-color: var(--sw-background); --vis-dark-nested-donut-segment-stroke-color: var(--sw-background);
|
|
587
|
+
--vis-nested-donut-segment-stroke-width: 1px; --vis-dark-nested-donut-segment-stroke-width: 1px;
|
|
588
|
+
--vis-nested-donut-central-label-text-color: var(--sw-foreground); --vis-dark-nested-donut-central-label-text-color: var(--sw-foreground);
|
|
589
|
+
--vis-nested-donut-central-sublabel-text-color: var(--sw-muted-foreground); --vis-dark-nested-donut-central-sublabel-text-color: var(--sw-muted-foreground);
|
|
590
|
+
--vis-nested-donut-segment-label-text-color-dark: #fff; --vis-dark-nested-donut-segment-label-text-color-dark: #fff;
|
|
591
|
+
--vis-nested-donut-segment-label-text-color-light: rgb(0 0 0 / 0.85); --vis-dark-nested-donut-segment-label-text-color-light: rgb(0 0 0 / 0.85);
|
|
592
|
+
--vis-treemap-tile-stroke-color: var(--sw-background); --vis-dark-treemap-tile-stroke-color: var(--sw-background);
|
|
593
|
+
--vis-treemap-tile-stroke-width: 1px; --vis-dark-treemap-tile-stroke-width: 1px;
|
|
594
|
+
--vis-treemap-tile-hover-stroke-color: var(--sw-foreground); --vis-dark-treemap-tile-hover-stroke-color: var(--sw-foreground);
|
|
595
|
+
--vis-treemap-label-text-color: rgb(0 0 0 / 0.85); --vis-dark-treemap-label-text-color: rgb(0 0 0 / 0.85);
|
|
596
|
+
--vis-treemap-label-text-color-light: #fff; --vis-dark-treemap-label-text-color-light: #fff;
|
|
597
|
+
--vis-chord-diagram-link-fill-color: color-mix(in oklab, var(--sw-chart-1) 45%, transparent); --vis-dark-chord-diagram-link-fill-color: color-mix(in oklab, var(--sw-chart-1) 45%, transparent);
|
|
598
|
+
--vis-chord-diagram-link-stroke-color: var(--sw-background); --vis-dark-chord-diagram-link-stroke-color: var(--sw-background);
|
|
599
|
+
--vis-chord-diagram-label-text-fill-color-dark: var(--sw-muted-foreground); --vis-dark-chord-diagram-label-text-fill-color-dark: var(--sw-muted-foreground);
|
|
600
|
+
--vis-chord-diagram-label-text-fill-color-bright: #fff; --vis-dark-chord-diagram-label-text-fill-color-bright: #fff;
|
|
601
|
+
--vis-sankey-node-color: var(--sw-chart-1); --vis-dark-sankey-node-color: var(--sw-chart-1);
|
|
602
|
+
--vis-sankey-link-color: color-mix(in oklab, var(--sw-foreground) 22%, transparent); --vis-dark-sankey-link-color: color-mix(in oklab, var(--sw-foreground) 22%, transparent);
|
|
603
|
+
--vis-sankey-node-label-color: var(--sw-foreground); --vis-dark-sankey-node-label-color: var(--sw-foreground);
|
|
604
|
+
--vis-sankey-node-label-font-size: 12px; --vis-dark-sankey-node-label-font-size: 12px;
|
|
605
|
+
--vis-sankey-node-sublabel-font-size: 11px; --vis-dark-sankey-node-sublabel-font-size: 11px;
|
|
606
|
+
--vis-sankey-label-font-family: var(--sw-font-sans); --vis-dark-sankey-label-font-family: var(--sw-font-sans);
|
|
607
|
+
--vis-sankey-node-label-background-fill-color: var(--sw-background); --vis-dark-sankey-node-label-background-fill-color: var(--sw-background);
|
|
608
|
+
--vis-sankey-node-label-background-stroke-color: var(--sw-frame); --vis-dark-sankey-node-label-background-stroke-color: var(--sw-frame);
|
|
609
|
+
--vis-sankey-icon-color: rgb(0 0 0 / 0.85); --vis-dark-sankey-icon-color: rgb(0 0 0 / 0.85);
|
|
610
|
+
--vis-graph-node-side-label-fill-color-bright: var(--sw-background); --vis-dark-graph-node-side-label-fill-color-bright: var(--sw-background);
|
|
611
|
+
--vis-graph-node-side-label-fill-color-dark: var(--sw-foreground); --vis-dark-graph-node-side-label-fill-color-dark: var(--sw-foreground);
|
|
612
|
+
--vis-graph-node-fill-color: var(--sw-background); --vis-dark-graph-node-fill-color: var(--sw-background);
|
|
613
|
+
--vis-graph-node-stroke-color: var(--sw-frame); --vis-dark-graph-node-stroke-color: var(--sw-frame);
|
|
614
|
+
--vis-graph-node-icon-fill-color: var(--sw-foreground); --vis-dark-graph-node-icon-fill-color: var(--sw-foreground);
|
|
615
|
+
--vis-graph-node-label-text-color: var(--sw-foreground); --vis-dark-graph-node-label-text-color: var(--sw-foreground);
|
|
616
|
+
--vis-graph-node-sublabel-text-color: var(--sw-muted-foreground); --vis-dark-graph-node-sublabel-text-color: var(--sw-muted-foreground);
|
|
617
|
+
--vis-graph-node-label-background: var(--sw-background); --vis-dark-graph-node-label-background: var(--sw-background);
|
|
618
|
+
--vis-graph-node-label-font-family: var(--sw-font-sans); --vis-dark-graph-node-label-font-family: var(--sw-font-sans);
|
|
619
|
+
--vis-graph-node-selection-color: var(--sw-muted-foreground); --vis-dark-graph-node-selection-color: var(--sw-muted-foreground);
|
|
620
|
+
--vis-graph-node-greyout-color: var(--sw-muted); --vis-dark-graph-node-greyout-color: var(--sw-muted);
|
|
621
|
+
--vis-graph-node-gauge-color: var(--sw-chart-1); --vis-dark-graph-node-gauge-color: var(--sw-chart-1);
|
|
622
|
+
--vis-graph-node-side-label-background-fill-color: var(--sw-foreground); --vis-dark-graph-node-side-label-background-fill-color: var(--sw-foreground);
|
|
623
|
+
--vis-graph-node-side-label-background-stroke-color: var(--sw-frame); --vis-dark-graph-node-side-label-background-stroke-color: var(--sw-frame);
|
|
624
|
+
--vis-graph-link-stroke-color: color-mix(in oklab, var(--sw-foreground) 28%, transparent); --vis-dark-graph-link-stroke-color: color-mix(in oklab, var(--sw-foreground) 28%, transparent);
|
|
625
|
+
--vis-graph-link-label-text-color: var(--sw-foreground); --vis-dark-graph-link-label-text-color: var(--sw-foreground);
|
|
626
|
+
--vis-graph-link-label-background: var(--sw-background); --vis-dark-graph-link-label-background: var(--sw-background);
|
|
627
|
+
--vis-graph-link-label-stroke-color: var(--sw-frame); --vis-dark-graph-link-label-stroke-color: var(--sw-frame);
|
|
628
|
+
--vis-graph-panel-fill-color: color-mix(in oklab, var(--sw-muted) 55%, transparent); --vis-dark-graph-panel-fill-color: color-mix(in oklab, var(--sw-muted) 55%, transparent);
|
|
629
|
+
--vis-graph-panel-border-color: var(--sw-frame); --vis-dark-graph-panel-border-color: var(--sw-frame);
|
|
630
|
+
--vis-graph-panel-label-color: var(--sw-muted-foreground); --vis-dark-graph-panel-label-color: var(--sw-muted-foreground);
|
|
631
|
+
--vis-graph-panel-label-background: var(--sw-background); --vis-dark-graph-panel-label-background: var(--sw-background);
|
|
632
|
+
--vis-graph-panel-label-font-family: var(--sw-font-mono); --vis-dark-graph-panel-label-font-family: var(--sw-font-mono);
|
|
633
|
+
--vis-graph-panel-dashed-outline-color: var(--sw-frame); --vis-dark-graph-panel-dashed-outline-color: var(--sw-frame);
|
|
634
|
+
--vis-timeline-label-color: var(--sw-muted-foreground); --vis-dark-timeline-label-color: var(--sw-muted-foreground);
|
|
635
|
+
--vis-timeline-label-font-size: 12px; --vis-dark-timeline-label-font-size: 12px;
|
|
636
|
+
--vis-timeline-line-color: var(--sw-chart-1); --vis-dark-timeline-line-color: var(--sw-chart-1);
|
|
637
|
+
--vis-timeline-row-even-fill-color: var(--sw-background); --vis-dark-timeline-row-even-fill-color: var(--sw-background);
|
|
638
|
+
--vis-timeline-row-odd-fill-color: color-mix(in oklab, var(--sw-muted) 55%, var(--sw-background)); --vis-dark-timeline-row-odd-fill-color: color-mix(in oklab, var(--sw-muted) 55%, var(--sw-background));
|
|
639
|
+
--vis-timeline-scrollbar-background-color: var(--sw-muted); --vis-dark-timeline-scrollbar-background-color: var(--sw-muted);
|
|
640
|
+
--vis-timeline-scrollbar-color: var(--sw-frame); --vis-dark-timeline-scrollbar-color: var(--sw-frame);
|
|
641
|
+
--vis-timeline-arrow-color: var(--sw-muted-foreground); --vis-dark-timeline-arrow-color: var(--sw-muted-foreground);
|
|
642
|
+
--vis-map-point-inner-label-text-color-dark: rgb(0 0 0 / 0.85); --vis-dark-map-point-inner-label-text-color-dark: rgb(0 0 0 / 0.85);
|
|
643
|
+
--vis-map-point-inner-label-text-color-light: #fff; --vis-dark-map-point-inner-label-text-color-light: #fff;
|
|
644
|
+
--vis-map-cluster-inner-label-text-color-dark: rgb(0 0 0 / 0.85); --vis-dark-map-cluster-inner-label-text-color-dark: rgb(0 0 0 / 0.85);
|
|
645
|
+
--vis-map-cluster-inner-label-text-color-light: #fff; --vis-dark-map-cluster-inner-label-text-color-light: #fff;
|
|
646
|
+
--vis-map-feature-color: color-mix(in oklab, var(--sw-muted) 70%, var(--sw-frame)); --vis-dark-map-feature-color: color-mix(in oklab, var(--sw-muted) 70%, var(--sw-frame));
|
|
647
|
+
--vis-map-boundary-color: var(--sw-background); --vis-dark-map-boundary-color: var(--sw-background);
|
|
648
|
+
--vis-map-container-background-color: var(--sw-canvas); --vis-dark-map-container-background-color: var(--sw-canvas);
|
|
649
|
+
--vis-map-label-font-family: var(--sw-font-sans); --vis-dark-map-label-font-family: var(--sw-font-sans);
|
|
650
|
+
--vis-map-point-default-fill-color: var(--sw-chart-1); --vis-dark-map-point-default-fill-color: var(--sw-chart-1);
|
|
651
|
+
--vis-map-point-default-stroke-color: var(--sw-background); --vis-dark-map-point-default-stroke-color: var(--sw-background);
|
|
652
|
+
--vis-map-point-bottom-label-text-color: var(--sw-foreground); --vis-dark-map-point-bottom-label-text-color: var(--sw-foreground);
|
|
653
|
+
--vis-map-point-label-text-color-dark: var(--sw-foreground); --vis-dark-map-point-label-text-color-dark: var(--sw-foreground);
|
|
654
|
+
--vis-map-point-label-text-color-light: #fff; --vis-dark-map-point-label-text-color-light: #fff;
|
|
655
|
+
--vis-map-point-ring-fill-color: var(--sw-background); --vis-dark-map-point-ring-fill-color: var(--sw-background);
|
|
656
|
+
--vis-map-area-label-text-color: var(--sw-foreground); --vis-dark-map-area-label-text-color: var(--sw-foreground);
|
|
657
|
+
--vis-map-area-label-halo-color: var(--sw-background); --vis-dark-map-area-label-halo-color: var(--sw-background);
|
|
658
|
+
--vis-map-cluster-default-fill-color: var(--sw-background); --vis-dark-map-cluster-default-fill-color: var(--sw-background);
|
|
659
|
+
--vis-map-cluster-default-stroke-color: var(--sw-chart-1); --vis-dark-map-cluster-default-stroke-color: var(--sw-chart-1);
|
|
660
|
+
--vis-map-cluster-expanded-background-fill-color: color-mix(in oklab, var(--sw-background) 80%, transparent); --vis-dark-map-cluster-expanded-background-fill-color: color-mix(in oklab, var(--sw-background) 80%, transparent);
|
|
661
|
+
}
|
|
662
|
+
/* Unovis tooltips carry an emotion class ending in "tooltip"; give them the CSS squircle corner. */
|
|
663
|
+
.sw-chart :where([class*='tooltip']) { corner-shape: var(--sw-corner-shape); }
|
|
664
|
+
.sw-tt { display: flex; flex-direction: column; gap: 4px; min-width: 140px; font-family: var(--sw-font-sans); }
|
|
665
|
+
.sw-tt__title { font-family: var(--sw-font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sw-muted-foreground); }
|
|
666
|
+
.sw-tt__row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
|
|
667
|
+
.sw-tt__swatch { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
|
|
668
|
+
.sw-tt__name { flex: 1; color: var(--sw-muted-foreground); }
|
|
669
|
+
.sw-tt__value { font-variant-numeric: tabular-nums; font-weight: 500; }
|
|
670
|
+
.sw-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--sw-muted-foreground); }
|
|
671
|
+
.sw-legend li { display: inline-flex; align-items: center; gap: 6px; }
|
|
672
|
+
.sw-legend__swatch { width: 8px; height: 8px; border-radius: 2px; }
|
|
673
|
+
.sw-chart-card__header { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 16px; }
|
|
674
|
+
.sw-chart-card__aside { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
|
|
675
|
+
.sw-chart-card__value { font-size: 1.75rem; font-weight: 450; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
|
|
676
|
+
|
|
677
|
+
/* The full donut is centered in its plot. Keep the two lines together inside its hole. */
|
|
678
|
+
.sw-donut__center { position: absolute; inset: 0; container-type: size; display: grid; place-items: center; pointer-events: none; }
|
|
679
|
+
.sw-donut__labels {
|
|
680
|
+
--_hole: max(0px, calc(min(100cqi, 100cqb) - 2 * max(0px, var(--sw-donut-arc-width))));
|
|
681
|
+
display: grid; gap: min(0.25rem, calc(var(--_hole) * 0.025)); width: calc(var(--_hole) * 0.8);
|
|
682
|
+
text-align: center; font-family: var(--sw-font-sans);
|
|
683
|
+
}
|
|
684
|
+
.sw-donut__value, .sw-donut__caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
685
|
+
.sw-donut__value {
|
|
686
|
+
color: var(--sw-foreground); font-size: min(1.75rem, calc(var(--_hole) * 0.175)); font-weight: 450;
|
|
687
|
+
font-variant-numeric: tabular-nums; letter-spacing: -0.04em; line-height: 1.1;
|
|
688
|
+
}
|
|
689
|
+
.sw-donut__caption { font-size: min(0.6875rem, calc(var(--_hole) * 0.075)); line-height: 1.3; }
|
|
690
|
+
|
|
691
|
+
/* ── Treemap ────────────────────────────────────────────────────────────────
|
|
692
|
+
Squircle tiles in SVG, labels in HTML on top. Leaf tiles are tints of their group color
|
|
693
|
+
(--_p of --_c over the surface), so foreground text stays readable in both themes.
|
|
694
|
+
Restyle with --sw-treemap-surface (what tints mix into) and --sw-treemap-group-tint. */
|
|
695
|
+
.sw-treemap { --_surface: var(--sw-treemap-surface, var(--sw-background)); overflow: visible; }
|
|
696
|
+
.sw-treemap__svg { position: absolute; inset: 0; display: block; overflow: visible; }
|
|
697
|
+
.sw-treemap__group { fill: color-mix(in oklab, var(--_c) var(--sw-treemap-group-tint, 12%), var(--_surface)); }
|
|
698
|
+
.sw-treemap__tile {
|
|
699
|
+
fill: color-mix(in oklab, var(--_c) var(--_p), var(--_surface));
|
|
700
|
+
transition: fill var(--sw-duration-fast, 0.15s) ease;
|
|
701
|
+
}
|
|
702
|
+
.sw-treemap__tile[data-active] { fill: color-mix(in oklab, var(--_c) calc(var(--_p) + 16%), var(--_surface)); }
|
|
703
|
+
.sw-treemap__header {
|
|
704
|
+
position: absolute; display: flex; align-items: center; gap: 6px; box-sizing: border-box; min-width: 0;
|
|
705
|
+
font-size: 13px; line-height: 16px; color: var(--sw-foreground); pointer-events: none; white-space: nowrap;
|
|
706
|
+
}
|
|
707
|
+
.sw-treemap__swatch { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
|
|
708
|
+
.sw-treemap__group-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; letter-spacing: -0.01em; }
|
|
709
|
+
.sw-treemap__group-value { flex-shrink: 0; margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--sw-muted-foreground); }
|
|
710
|
+
.sw-treemap__leaf {
|
|
711
|
+
position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; box-sizing: border-box;
|
|
712
|
+
margin: 0; border: 0; background: none; font: inherit; text-align: left; color: var(--sw-foreground);
|
|
713
|
+
overflow: hidden; corner-shape: var(--sw-corner-shape); outline: none; -webkit-tap-highlight-color: transparent;
|
|
714
|
+
}
|
|
715
|
+
button.sw-treemap__leaf { cursor: pointer; }
|
|
716
|
+
button.sw-treemap__leaf:focus-visible { box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
717
|
+
.sw-treemap__name {
|
|
718
|
+
display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--_lines, 1); line-clamp: var(--_lines, 1);
|
|
719
|
+
max-width: 100%; overflow: hidden; overflow-wrap: break-word; font-weight: 500; letter-spacing: -0.01em;
|
|
720
|
+
}
|
|
721
|
+
.sw-treemap__name[data-lines='one'] { display: block; white-space: nowrap; text-overflow: ellipsis; }
|
|
722
|
+
.sw-treemap__value { max-width: 100%; white-space: nowrap; font-variant-numeric: tabular-nums; opacity: 0.72; }
|
|
723
|
+
.sw-treemap__leaf[data-size='lg'] .sw-treemap__name { font-size: 20px; line-height: 24px; letter-spacing: -0.02em; }
|
|
724
|
+
.sw-treemap__leaf[data-size='lg'] .sw-treemap__value { font-size: 13px; line-height: 18px; }
|
|
725
|
+
.sw-treemap__leaf[data-size='md'] .sw-treemap__name { font-size: 14px; line-height: 18px; }
|
|
726
|
+
.sw-treemap__leaf[data-size='md'] .sw-treemap__value { font-size: 12px; line-height: 16px; }
|
|
727
|
+
.sw-treemap__leaf[data-size='sm'] .sw-treemap__name { font-size: 12px; line-height: 15px; }
|
|
728
|
+
.sw-treemap__leaf[data-size='sm'] .sw-treemap__value { font-size: 11px; line-height: 14px; }
|
|
729
|
+
.sw-treemap__tip {
|
|
730
|
+
position: absolute; z-index: 2; padding: 8px 10px; pointer-events: none; white-space: nowrap;
|
|
731
|
+
background: var(--sw-background); color: var(--sw-foreground); border: 1px solid var(--sw-frame);
|
|
732
|
+
border-radius: var(--sw-radius-sm); corner-shape: var(--sw-corner-shape);
|
|
733
|
+
}
|
|
734
|
+
.sw-treemap__share { font-size: 11px; color: var(--sw-muted-foreground); font-variant-numeric: tabular-nums; }
|
|
735
|
+
|
|
736
|
+
/* ── Dashboard charts: TrendChart (and Sparkline), BarList, Tracker ──────────────
|
|
737
|
+
Quiet by default: the data is the only ink. Fills fade to nothing, lines are 1.5px,
|
|
738
|
+
the latest value gets a dot, grids are dashed hairlines with labels inside the plot. */
|
|
739
|
+
.sw-trend {
|
|
740
|
+
--sw-trend-fill: 0.2;
|
|
741
|
+
position: relative; width: 100%; min-width: 0; color: var(--sw-trend-color);
|
|
742
|
+
outline: none; touch-action: pan-y; cursor: crosshair; -webkit-tap-highlight-color: transparent;
|
|
743
|
+
}
|
|
744
|
+
:root[data-theme='dark'] .sw-trend { --sw-trend-fill: 0.28; }
|
|
745
|
+
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .sw-trend { --sw-trend-fill: 0.28; } }
|
|
746
|
+
.sw-trend[data-spark] { cursor: default; --sw-trend-fill: 0.12; }
|
|
747
|
+
:root[data-theme='dark'] .sw-trend[data-spark] { --sw-trend-fill: 0.16; }
|
|
748
|
+
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .sw-trend[data-spark] { --sw-trend-fill: 0.16; } }
|
|
749
|
+
.sw-trend:focus-visible { box-shadow: 0 0 0 2px var(--sw-accent); border-radius: var(--sw-radius-xs); }
|
|
750
|
+
.sw-trend__svg { display: block; overflow: visible; }
|
|
751
|
+
.sw-trend__stop-top { stop-color: var(--sw-trend-color); stop-opacity: var(--sw-trend-fill); }
|
|
752
|
+
.sw-trend__stop-bottom { stop-color: var(--sw-trend-color); stop-opacity: 0; }
|
|
753
|
+
.sw-trend__line, .sw-trend__tail {
|
|
754
|
+
fill: none; stroke: var(--sw-trend-color); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;
|
|
755
|
+
}
|
|
756
|
+
/* Reveal once, left to right, on first mount (500ms ease-out). Data updates don't replay it. */
|
|
757
|
+
.sw-trend__series { animation: sw-trend-reveal 500ms var(--sw-ease-out) both; }
|
|
758
|
+
@keyframes sw-trend-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
|
|
759
|
+
.sw-trend__tail { stroke-dasharray: 3 3; stroke-linecap: butt; }
|
|
760
|
+
.sw-trend[data-spark] :is(.sw-trend__line, .sw-trend__tail) { stroke-width: 1.5; }
|
|
761
|
+
@keyframes sw-trend-fade { from { opacity: 0; } }
|
|
762
|
+
.sw-trend__series { transition: opacity 100ms var(--sw-ease-standard); }
|
|
763
|
+
.sw-trend__series[data-dim] { opacity: 0.32; }
|
|
764
|
+
/* Previous period: a pale tint of the same hue, not a second color. */
|
|
765
|
+
.sw-trend__compare { fill: none; stroke: var(--sw-trend-color); stroke-opacity: 0.32; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
|
|
766
|
+
.sw-trend__grid line { stroke: color-mix(in oklab, var(--sw-border) 70%, transparent); }
|
|
767
|
+
.sw-trend__grid text, .sw-trend__xlabel { font-family: var(--sw-font-mono); font-size: 10px; font-variant-numeric: tabular-nums; fill: var(--sw-muted-foreground); }
|
|
768
|
+
.sw-trend__baseline { stroke: var(--sw-border); }
|
|
769
|
+
.sw-trend__threshold line { stroke: var(--sw-warning); stroke-dasharray: 4 3; stroke-opacity: 0.8; }
|
|
770
|
+
.sw-trend__threshold text { font-family: var(--sw-font-mono); font-size: 10px; fill: var(--sw-warning); }
|
|
771
|
+
.sw-trend__marker line { stroke: var(--sw-muted-foreground); stroke-opacity: 0.35; stroke-dasharray: 1 3; }
|
|
772
|
+
.sw-trend__marker circle { fill: var(--sw-background); stroke: var(--sw-muted-foreground); stroke-width: 1.25; }
|
|
773
|
+
.sw-trend__marker[data-state='active'] line { stroke-opacity: 0.8; }
|
|
774
|
+
.sw-trend__marker[data-state='active'] circle { fill: var(--sw-foreground); stroke: var(--sw-foreground); }
|
|
775
|
+
.sw-trend__halo { fill: var(--sw-trend-color); fill-opacity: 0.25; transform-box: fill-box; transform-origin: center; animation: sw-trend-pulse 2s var(--sw-ease-out) infinite; }
|
|
776
|
+
@keyframes sw-trend-pulse { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }
|
|
777
|
+
/* The latest value: a dot ringed in the background color so it cuts out of the line. */
|
|
778
|
+
.sw-trend__dot { fill: var(--sw-trend-color); stroke: var(--sw-background); stroke-width: 2; }
|
|
779
|
+
.sw-trend__end { animation: sw-trend-fade 200ms var(--sw-ease-out) 450ms both; }
|
|
780
|
+
.sw-trend__cursor line { stroke: var(--sw-foreground); stroke-opacity: 0.22; }
|
|
781
|
+
.sw-trend__cursor-compare { fill: var(--sw-background); stroke: var(--sw-muted-foreground); stroke-width: 1.25; }
|
|
782
|
+
.sw-trend__bar { fill: var(--sw-trend-color); fill-opacity: 0.32; transition: fill-opacity var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
783
|
+
.sw-trend__bar[data-state='last'], .sw-trend__bar[data-state='active'] { fill-opacity: 1; }
|
|
784
|
+
.sw-trend__bar[data-state='dim'] { fill-opacity: 0.18; }
|
|
785
|
+
/* Over the threshold: the exception takes the warning color. */
|
|
786
|
+
.sw-trend__bar[data-over] { fill: var(--sw-warning); fill-opacity: 0.85; }
|
|
787
|
+
.sw-trend__bar[data-over][data-state='dim'] { fill-opacity: 0.35; }
|
|
788
|
+
.sw-trend__bar[data-incomplete] { fill-opacity: 0.32; stroke: var(--sw-trend-color); stroke-dasharray: 2 2; }
|
|
789
|
+
.sw-trend__tip {
|
|
790
|
+
position: absolute; top: 0; z-index: 2; width: 132px; padding: 6px 8px; pointer-events: none;
|
|
791
|
+
border-radius: var(--sw-radius-xs); background: var(--sw-background); color: var(--sw-foreground);
|
|
792
|
+
box-shadow: 0 0 0 1px var(--sw-frame), var(--sw-shadow-popup); font-size: 12px; line-height: 18px;
|
|
793
|
+
}
|
|
794
|
+
.sw-trend__tip-title { font-family: var(--sw-font-mono); font-size: 10px; color: var(--sw-muted-foreground); }
|
|
795
|
+
.sw-trend__tip-row { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 6px; }
|
|
796
|
+
.sw-trend__tip-row[data-muted] { color: var(--sw-muted-foreground); }
|
|
797
|
+
.sw-trend__tip-row b { font-weight: 500; font-variant-numeric: tabular-nums; }
|
|
798
|
+
.sw-trend__swatch { width: 10px; height: 2px; border-radius: 1px; background: var(--sw-trend-color); }
|
|
799
|
+
.sw-trend__swatch[data-compare] { opacity: 0.32; }
|
|
800
|
+
.sw-trend__tip-event { margin-top: 2px; padding-top: 4px; border-top: 1px solid var(--sw-divider); color: var(--sw-muted-foreground); font-size: 11px; }
|
|
801
|
+
|
|
802
|
+
/* ── BarList ── */
|
|
803
|
+
.sw-bar-list { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin: 0; padding: 6px; list-style: none; font-size: 13px; }
|
|
804
|
+
.sw-bar-list__item { min-width: 0; }
|
|
805
|
+
.sw-bar-list__row {
|
|
806
|
+
--sw-inset: 6px;
|
|
807
|
+
position: relative; isolation: isolate; display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 6px;
|
|
808
|
+
border: 0; border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape); background: none;
|
|
809
|
+
color: var(--sw-foreground); font: inherit; text-align: left; text-decoration: none; outline: none;
|
|
810
|
+
}
|
|
811
|
+
:is(a, button).sw-bar-list__row { cursor: pointer; }
|
|
812
|
+
:is(a, button).sw-bar-list__row:focus-visible { box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
813
|
+
.sw-bar-list__bar {
|
|
814
|
+
position: absolute; inset: 0 auto 0 0; z-index: -1; width: max(2%, calc(var(--sw-bar) * 100%));
|
|
815
|
+
border-radius: inherit; corner-shape: inherit;
|
|
816
|
+
background: color-mix(in oklab, var(--sw-chart-1) 15%, transparent);
|
|
817
|
+
transform-origin: left center; animation: sw-bar-grow 700ms var(--sw-ease-emphasized) both;
|
|
818
|
+
transition: background-color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
819
|
+
}
|
|
820
|
+
:is(a, button).sw-bar-list__row:hover .sw-bar-list__bar { background: color-mix(in oklab, var(--sw-chart-1) 26%, transparent); }
|
|
821
|
+
@keyframes sw-bar-grow { from { transform: scaleX(0); } }
|
|
822
|
+
.sw-bar-list__icon { display: inline-flex; flex: none; width: 15px; height: 15px; color: var(--sw-muted-foreground); }
|
|
823
|
+
.sw-bar-list__icon > svg { width: 15px; height: 15px; }
|
|
824
|
+
.sw-bar-list__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
825
|
+
.sw-bar-list__meta { flex: none; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--sw-muted-foreground); }
|
|
826
|
+
.sw-bar-list__value { flex: none; min-width: 4ch; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
|
|
827
|
+
|
|
828
|
+
/* ── Tracker ── */
|
|
829
|
+
.sw-tracker { position: relative; min-width: 0; border-radius: var(--sw-radius-xs); outline: none; }
|
|
830
|
+
.sw-tracker:focus-visible { box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
831
|
+
.sw-tracker__ticks { display: flex; align-items: stretch; gap: 1px; }
|
|
832
|
+
/* "ok" is quiet so the exceptions carry the color; degraded and down are full strength. */
|
|
833
|
+
.sw-tracker { --sw-tracker-ok: color-mix(in oklab, var(--sw-success) 42%, var(--sw-muted)); }
|
|
834
|
+
.sw-tracker__tick { flex: 1; min-width: 2px; border-radius: 1px; background: var(--sw-tracker-ok); transition: opacity 100ms var(--sw-ease-standard); }
|
|
835
|
+
.sw-tracker__tick:first-child { border-radius: 4px 1px 1px 4px; }
|
|
836
|
+
.sw-tracker__tick:last-child { border-radius: 1px 4px 4px 1px; }
|
|
837
|
+
.sw-tracker__tick[data-status='degraded'] { background: var(--sw-warning); }
|
|
838
|
+
.sw-tracker__tick[data-status='down'] { background: var(--sw-danger); }
|
|
839
|
+
.sw-tracker__tick[data-status='none'] { background: var(--sw-muted); }
|
|
840
|
+
.sw-tracker:is(:hover, :focus-visible) .sw-tracker__tick:not([data-active]) { opacity: 0.5; }
|
|
841
|
+
.sw-tracker__tip {
|
|
842
|
+
position: absolute; top: calc(100% + 6px); z-index: 2; display: flex; align-items: center; gap: 6px; padding: 4px 8px;
|
|
843
|
+
transform: translateX(-50%); white-space: nowrap; pointer-events: none;
|
|
844
|
+
border-radius: var(--sw-radius-xs); background: var(--sw-background); color: var(--sw-foreground);
|
|
845
|
+
box-shadow: 0 0 0 1px var(--sw-frame), var(--sw-shadow-popup); font-size: 12px;
|
|
846
|
+
}
|
|
847
|
+
.sw-tracker__swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--sw-success); }
|
|
848
|
+
.sw-tracker__swatch[data-status='degraded'] { background: var(--sw-warning); }
|
|
849
|
+
.sw-tracker__swatch[data-status='down'] { background: var(--sw-danger); }
|
|
850
|
+
.sw-tracker__swatch[data-status='none'] { background: var(--sw-muted); }
|
|
851
|
+
|
|
852
|
+
@media (prefers-reduced-motion: reduce) {
|
|
853
|
+
.sw-trend__series, .sw-trend__end, .sw-trend__halo, .sw-bar-list__bar { animation: none; }
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
/* map.css */
|
|
857
|
+
/* MapView — map chrome restyled with SW3 tokens. */
|
|
858
|
+
.sw-map {
|
|
859
|
+
--sw-map-control-inset: var(--sw-space-3);
|
|
860
|
+
--sw-map-control-size: var(--sw-space-10);
|
|
861
|
+
--sw-map-control-bg: light-dark(var(--sw-background), var(--sw-muted));
|
|
862
|
+
overflow: hidden;
|
|
863
|
+
}
|
|
864
|
+
.sw-map__canvas { position: absolute !important; inset: 0; container-type: inline-size; }
|
|
865
|
+
.sw-map .maplibregl-canvas:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: -3px; }
|
|
866
|
+
.sw-map__overlay { --sw-inset: var(--sw-map-control-inset); position: absolute; top: var(--sw-inset); left: var(--sw-inset); z-index: 2; pointer-events: auto; }
|
|
867
|
+
.sw-map__controls {
|
|
868
|
+
--sw-button-secondary-bg: var(--sw-map-control-bg);
|
|
869
|
+
position: absolute;
|
|
870
|
+
top: var(--sw-map-control-inset);
|
|
871
|
+
right: var(--sw-map-control-inset);
|
|
872
|
+
z-index: 2;
|
|
873
|
+
display: grid;
|
|
874
|
+
gap: var(--sw-space-2);
|
|
875
|
+
justify-items: end;
|
|
876
|
+
}
|
|
877
|
+
.sw-map__controls[data-after-zoom] { top: calc(var(--sw-map-control-inset) + 2 * var(--sw-map-control-size) + var(--sw-space-2)); }
|
|
878
|
+
/* Control group: sm squircle radius + 1px frame, no shadow (same recipe as every other framed control). */
|
|
879
|
+
.sw-map .maplibregl-ctrl-group { border: 1px solid var(--sw-frame); border-radius: var(--sw-radius-sm); corner-shape: var(--sw-corner-shape); overflow: hidden; box-shadow: none; background: var(--sw-background); }
|
|
880
|
+
.sw-map .maplibregl-ctrl-group:not(:empty) { box-shadow: none; }
|
|
881
|
+
.sw-map .maplibregl-ctrl-group button + button { border-top-color: var(--sw-hairline); }
|
|
882
|
+
.sw-map .maplibregl-ctrl-top-right { --sw-inset: var(--sw-map-control-inset); }
|
|
883
|
+
.sw-map .maplibregl-ctrl-top-right [data-sw='map-zoom'] {
|
|
884
|
+
margin: var(--sw-inset) var(--sw-inset) 0 0;
|
|
885
|
+
border: 0;
|
|
886
|
+
border-radius: var(--sw-radius-sm);
|
|
887
|
+
color: var(--sw-foreground);
|
|
888
|
+
background: var(--sw-map-control-bg);
|
|
889
|
+
}
|
|
890
|
+
.sw-map [data-sw='map-zoom'] button {
|
|
891
|
+
width: var(--sw-map-control-size);
|
|
892
|
+
height: var(--sw-map-control-size);
|
|
893
|
+
color: inherit;
|
|
894
|
+
}
|
|
895
|
+
.sw-map [data-sw='map-zoom'] button:not(:disabled):hover { background-color: var(--sw-item-hover); }
|
|
896
|
+
.sw-map [data-sw='map-zoom'] button:not(:disabled):active { background-color: var(--sw-item-active); }
|
|
897
|
+
.sw-map [data-sw='map-zoom'] button:focus-visible {
|
|
898
|
+
outline: 2px solid var(--sw-accent);
|
|
899
|
+
outline-offset: -4px;
|
|
900
|
+
box-shadow: none;
|
|
901
|
+
}
|
|
902
|
+
.sw-map .maplibregl-ctrl-group[data-sw='map-zoom'] button .maplibregl-ctrl-icon {
|
|
903
|
+
position: relative;
|
|
904
|
+
background-image: none;
|
|
905
|
+
}
|
|
906
|
+
.sw-map [data-sw='map-zoom'] .maplibregl-ctrl-icon::before,
|
|
907
|
+
.sw-map [data-sw='map-zoom'] .maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon::after {
|
|
908
|
+
content: '';
|
|
909
|
+
position: absolute;
|
|
910
|
+
top: 50%;
|
|
911
|
+
left: 50%;
|
|
912
|
+
width: 14px;
|
|
913
|
+
height: 2px;
|
|
914
|
+
background: currentColor;
|
|
915
|
+
transform: translate(-50%, -50%);
|
|
916
|
+
forced-color-adjust: none;
|
|
917
|
+
}
|
|
918
|
+
.sw-map [data-sw='map-zoom'] .maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
|
|
919
|
+
@media (forced-colors: active) {
|
|
920
|
+
.sw-map [data-sw='map-zoom'] .maplibregl-ctrl-icon { color: ButtonText; }
|
|
921
|
+
}
|
|
922
|
+
.sw-map-attribution {
|
|
923
|
+
margin: var(--sw-space-1) 0 0;
|
|
924
|
+
color: var(--sw-muted-foreground);
|
|
925
|
+
font: 12px/1.5 var(--sw-font-sans);
|
|
926
|
+
text-align: end;
|
|
927
|
+
}
|
|
928
|
+
.sw-map-attribution a { color: inherit; text-decoration: underline; }
|
|
929
|
+
.sw-map-area__swatch {
|
|
930
|
+
--sw-map-area-color: var(--sw-accent);
|
|
931
|
+
width: var(--sw-space-4);
|
|
932
|
+
height: var(--sw-space-3);
|
|
933
|
+
margin-top: var(--sw-space-1);
|
|
934
|
+
border: 1px solid var(--sw-map-area-color);
|
|
935
|
+
border-radius: var(--sw-radius-xs);
|
|
936
|
+
corner-shape: var(--sw-corner-shape);
|
|
937
|
+
background: color-mix(in srgb, var(--sw-map-area-color) 11%, transparent);
|
|
938
|
+
}
|
|
939
|
+
.sw-map-area[data-boundary='approximate'] > .sw-map-area__swatch { border-style: dashed; }
|
|
940
|
+
.sw-map-area__boundary {
|
|
941
|
+
display: block;
|
|
942
|
+
color: var(--sw-muted-foreground);
|
|
943
|
+
font-size: 12px;
|
|
944
|
+
}
|
|
945
|
+
.sw-map-area button { margin-inline-start: calc(-1 * var(--sw-space-2)); margin-block-start: var(--sw-space-1); }
|
|
946
|
+
.sw-map-area[data-tone='warning'] > .sw-map-area__swatch { --sw-map-area-color: var(--sw-warning); }
|
|
947
|
+
.sw-map-area[data-tone='danger'] > .sw-map-area__swatch { --sw-map-area-color: var(--sw-danger); }
|
|
948
|
+
.sw-map .maplibregl-ctrl-attrib { font-family: var(--sw-font-sans); font-size: 10px; }
|
|
949
|
+
.sw-map-marker { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--sw-foreground); box-shadow: 0 0 0 3px var(--sw-background), 0 1px 4px rgb(0 0 0 / 0.25); }
|
|
950
|
+
.sw-map-marker[data-kind='start'] { background: var(--sw-accent-solid); width: 14px; height: 14px; }
|
|
951
|
+
.sw-map-marker[data-kind='end'] { background: var(--sw-background); box-shadow: inset 0 0 0 3px var(--sw-accent-solid), 0 0 0 3px var(--sw-background), 0 1px 4px rgb(0 0 0 / 0.25); width: 14px; height: 14px; }
|
|
952
|
+
.sw-map-marker__label { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); padding: 3px 7px; border-radius: var(--sw-radius-xs); corner-shape: var(--sw-corner-shape); background: var(--sw-foreground); color: var(--sw-background); font-family: var(--sw-font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
|
|
953
|
+
|
|
954
|
+
.sw-map-marker[data-point], .sw-map-location__glyph {
|
|
955
|
+
display: grid;
|
|
956
|
+
place-items: center;
|
|
957
|
+
width: 24px;
|
|
958
|
+
height: 24px;
|
|
959
|
+
border: 1px solid currentColor;
|
|
960
|
+
border-radius: 50%;
|
|
961
|
+
background: var(--sw-background);
|
|
962
|
+
color: var(--sw-foreground);
|
|
963
|
+
}
|
|
964
|
+
.sw-map-point-icon {
|
|
965
|
+
display: block;
|
|
966
|
+
width: 14px;
|
|
967
|
+
height: 14px;
|
|
968
|
+
fill: none;
|
|
969
|
+
stroke: currentColor;
|
|
970
|
+
stroke-width: 1.5;
|
|
971
|
+
stroke-linecap: round;
|
|
972
|
+
stroke-linejoin: round;
|
|
973
|
+
}
|
|
974
|
+
.sw-map-marker[data-point] { box-shadow: 0 0 0 2px var(--sw-background); }
|
|
975
|
+
.sw-map-marker[data-popup] { cursor: pointer; }
|
|
976
|
+
.sw-map .sw-map-popup .maplibregl-popup-content { background: var(--sw-background); color: var(--sw-foreground); border: 1px solid var(--sw-frame); border-radius: var(--sw-radius-sm); corner-shape: var(--sw-corner-shape); box-shadow: none; padding: var(--sw-space-3) var(--sw-space-8) var(--sw-space-3) var(--sw-space-3); }
|
|
977
|
+
.sw-map .sw-map-popup .maplibregl-popup-tip { display: none; }
|
|
978
|
+
.sw-map .sw-map-popup p { margin: var(--sw-space-1) 0 0; }
|
|
979
|
+
.sw-map .sw-map-popup .maplibregl-popup-close-button { color: inherit; padding: var(--sw-space-1) var(--sw-space-2); }
|
|
980
|
+
.sw-map .sw-map-popup .maplibregl-popup-close-button:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: -2px; }
|
|
981
|
+
.sw-map-marker[data-point] .sw-map-marker__label { bottom: calc(100% + 4px); }
|
|
982
|
+
@container (max-width: 480px) {
|
|
983
|
+
.sw-map-marker__name { display: none; }
|
|
984
|
+
}
|
|
985
|
+
.sw-map-locations { min-width: 0; padding-block-start: 16px; color: var(--sw-foreground); }
|
|
986
|
+
.sw-map-locations__heading { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
|
|
987
|
+
.sw-map-locations__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(205px, 30%)), 1fr)); gap: 0 16px; margin: 0; padding: 0; list-style: none; }
|
|
988
|
+
.sw-map-location { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; padding-block: 10px; border-top: 1px solid var(--sw-hairline); overflow-wrap: anywhere; }
|
|
989
|
+
.sw-map-location__kind { display: block; font: 500 11px/1.4 var(--sw-font-mono); color: var(--sw-muted-foreground); text-transform: uppercase; }
|
|
990
|
+
.sw-map-location__name { display: block; font-size: 14px; font-weight: 550; }
|
|
991
|
+
.sw-map-location__description { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: var(--sw-muted-foreground); }
|
|
992
|
+
|
|
993
|
+
/* actions.css */
|
|
994
|
+
/*
|
|
995
|
+
* Action components:
|
|
996
|
+
* ActionSquare, PillButton.
|
|
997
|
+
*
|
|
998
|
+
* How to restyle (no selectors needed):
|
|
999
|
+
*
|
|
1000
|
+
* 1. Adjust one place .toolbar { --sw-pill-button-bg: #222; --sw-pill-button-radius: 16px; }
|
|
1001
|
+
* Public vars are never set on the component itself, so an ancestor always wins.
|
|
1002
|
+
* 2. Restyle one tone [data-design='calm'] { --sw-pill-button-night-bg: #24343a; }
|
|
1003
|
+
* Per-tone vars: --sw-<component>-<tone>-<prop>. This is what themes/*.css use.
|
|
1004
|
+
* 3. Swap the design <html data-design="calm"> (load themes/calm.css)
|
|
1005
|
+
*
|
|
1006
|
+
* Internals: [data-tone] / [data-size] (written by each component's recipe) set private --_* defaults,
|
|
1007
|
+
* and every property reads var(--sw-<public>, var(--_<private>)).
|
|
1008
|
+
*/
|
|
1009
|
+
|
|
1010
|
+
.sw-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
1011
|
+
|
|
1012
|
+
/* ── ActionSquare ───────────────────────────────────────────────────────── */
|
|
1013
|
+
.sw-action-square {
|
|
1014
|
+
--_size: 48px;
|
|
1015
|
+
--_font: 16px;
|
|
1016
|
+
display: inline-flex; align-items: center; gap: var(--sw-action-square-gap, 16px);
|
|
1017
|
+
margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
|
|
1018
|
+
font: inherit; font-size: var(--sw-action-square-font-size, var(--_font)); line-height: 1.5; font-weight: 500; letter-spacing: -0.01em;
|
|
1019
|
+
color: var(--sw-action-square-fg, var(--_fg)); white-space: nowrap; -webkit-tap-highlight-color: transparent;
|
|
1020
|
+
}
|
|
1021
|
+
.sw-action-square[data-size='lg'] { --_size: 60px; --_font: 18px; }
|
|
1022
|
+
.sw-action-square[data-tone='light'] {
|
|
1023
|
+
--_fg: var(--sw-action-square-light-fg, var(--sw-foreground));
|
|
1024
|
+
--_tile-fg: var(--sw-action-square-light-tile-fg, var(--sw-foreground));
|
|
1025
|
+
--_tile-fg-hover: var(--sw-action-square-light-tile-fg-hover, var(--_tile-fg));
|
|
1026
|
+
--_tile-bg: var(--sw-action-square-light-tile-bg, var(--sw-background));
|
|
1027
|
+
--_tile-border: var(--sw-action-square-light-tile-border, var(--sw-frame));
|
|
1028
|
+
--_tile-bg-hover: var(--sw-action-square-light-tile-bg-hover, color-mix(in oklab, var(--sw-foreground) 7%, var(--sw-background)));
|
|
1029
|
+
--_tile-bg-active: var(--sw-action-square-light-tile-bg-active, color-mix(in oklab, var(--sw-foreground) 12%, var(--sw-background)));
|
|
1030
|
+
}
|
|
1031
|
+
.sw-action-square[data-tone='ink'] {
|
|
1032
|
+
--_fg: var(--sw-action-square-ink-fg, var(--sw-foreground));
|
|
1033
|
+
--_tile-fg: var(--sw-action-square-ink-tile-fg, var(--sw-background));
|
|
1034
|
+
--_tile-fg-hover: var(--sw-action-square-ink-tile-fg-hover, var(--_tile-fg));
|
|
1035
|
+
--_tile-bg: var(--sw-action-square-ink-tile-bg, var(--sw-foreground));
|
|
1036
|
+
--_tile-bg-hover: var(--sw-action-square-ink-tile-bg-hover, color-mix(in oklab, var(--sw-foreground) 85%, var(--sw-background)));
|
|
1037
|
+
--_tile-bg-active: var(--sw-action-square-ink-tile-bg-active, color-mix(in oklab, var(--sw-foreground) 75%, var(--sw-background)));
|
|
1038
|
+
}
|
|
1039
|
+
.sw-action-square[data-tone='glass'] {
|
|
1040
|
+
--_fg: var(--sw-action-square-glass-fg, #fff);
|
|
1041
|
+
--_tile-fg: var(--sw-action-square-glass-tile-fg, #fff);
|
|
1042
|
+
--_tile-fg-hover: var(--sw-action-square-glass-tile-fg-hover, var(--_tile-fg));
|
|
1043
|
+
--_tile-bg: var(--sw-action-square-glass-tile-bg, rgb(255 255 255 / 0.14));
|
|
1044
|
+
--_tile-bg-hover: var(--sw-action-square-glass-tile-bg-hover, rgb(255 255 255 / 0.22));
|
|
1045
|
+
--_tile-bg-active: var(--sw-action-square-glass-tile-bg-active, rgb(255 255 255 / 0.3));
|
|
1046
|
+
}
|
|
1047
|
+
.sw-action-square[data-decorative] { cursor: inherit; }
|
|
1048
|
+
.sw-action-square--icon-first { flex-direction: row-reverse; }
|
|
1049
|
+
.sw-action-square__tile {
|
|
1050
|
+
--sw-sq-bg: var(--sw-action-square-tile-bg, var(--_tile-bg));
|
|
1051
|
+
--sw-sq-border: var(--sw-action-square-tile-border, var(--_tile-border, transparent));
|
|
1052
|
+
display: grid; place-items: center; flex: none;
|
|
1053
|
+
width: var(--sw-action-square-tile-size, var(--_size)); height: var(--sw-action-square-tile-size, var(--_size));
|
|
1054
|
+
color: var(--sw-action-square-tile-fg, var(--_tile-fg));
|
|
1055
|
+
}
|
|
1056
|
+
.sw-action-square__tile > svg:not(.sw-sq-stroke, .sw-sq-ring) { width: 50%; height: 50%; }
|
|
1057
|
+
.sw-action-square:hover .sw-action-square__tile,
|
|
1058
|
+
:is(a, button, [role='button']):hover .sw-action-square[data-decorative] .sw-action-square__tile {
|
|
1059
|
+
--sw-sq-bg: var(--sw-action-square-tile-bg-hover, var(--_tile-bg-hover));
|
|
1060
|
+
color: var(--sw-action-square-tile-fg-hover, var(--_tile-fg-hover));
|
|
1061
|
+
}
|
|
1062
|
+
.sw-action-square:active .sw-action-square__tile,
|
|
1063
|
+
:is(a, button, [role='button']):active .sw-action-square[data-decorative] .sw-action-square__tile {
|
|
1064
|
+
--sw-sq-bg: var(--sw-action-square-tile-bg-active, var(--_tile-bg-active));
|
|
1065
|
+
}
|
|
1066
|
+
.sw-action-square[data-tone='glass'] .sw-sq-fill { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
|
|
1067
|
+
.sw-action-square:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 4px; border-radius: 6px; }
|
|
1068
|
+
.sw-action-square:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
1069
|
+
|
|
1070
|
+
/* ── PillButton ─────────────────────────────────────────────────────────── */
|
|
1071
|
+
.sw-pill-button {
|
|
1072
|
+
--_h: 60px; --_px: 29px; --_radius: 999px; --_font: 18px; --_weight: 450; --_gap: 12px; --_blur: 0px;
|
|
1073
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
1074
|
+
gap: var(--sw-pill-button-gap, var(--_gap));
|
|
1075
|
+
height: var(--sw-pill-button-height, var(--_h)); padding: 0 var(--sw-pill-button-padding-x, var(--_px)); margin: 0;
|
|
1076
|
+
border: 0; border-radius: var(--sw-pill-button-radius, var(--_radius));
|
|
1077
|
+
background: var(--sw-pill-button-bg, var(--_bg)); color: var(--sw-pill-button-fg, var(--_fg));
|
|
1078
|
+
font: inherit; font-size: var(--sw-pill-button-font-size, var(--_font)); font-weight: var(--sw-pill-button-font-weight, var(--_weight));
|
|
1079
|
+
line-height: 1; letter-spacing: -0.015em; white-space: nowrap; text-decoration: none; cursor: pointer;
|
|
1080
|
+
backdrop-filter: blur(var(--sw-pill-button-blur, var(--_blur))); -webkit-backdrop-filter: blur(var(--sw-pill-button-blur, var(--_blur)));
|
|
1081
|
+
transition: background-color var(--_dur, 150ms) var(--sw-ease-standard, ease), color var(--_dur, 150ms) var(--sw-ease-standard, ease);
|
|
1082
|
+
-webkit-tap-highlight-color: transparent;
|
|
1083
|
+
}
|
|
1084
|
+
.sw-pill-button:is(:hover, [aria-expanded='true'], [aria-pressed='true']):not(:disabled) {
|
|
1085
|
+
background: var(--sw-pill-button-bg-hover, var(--_bg-hover));
|
|
1086
|
+
color: var(--sw-pill-button-fg-hover, var(--_fg-hover, var(--sw-pill-button-fg, var(--_fg))));
|
|
1087
|
+
}
|
|
1088
|
+
.sw-pill-button:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 3px; }
|
|
1089
|
+
.sw-pill-button:disabled { opacity: var(--sw-disabled-opacity, 0.5); cursor: not-allowed; }
|
|
1090
|
+
.sw-pill-button__icon { display: inline-flex; flex: none; width: 1.333em; height: 1.333em; }
|
|
1091
|
+
.sw-pill-button__icon > svg { width: 100%; height: 100%; }
|
|
1092
|
+
.sw-pill-button__icon--trailing { width: 0.85em; height: 0.85em; }
|
|
1093
|
+
|
|
1094
|
+
.sw-pill-button[data-size='sm'] { --_h: 36px; --_px: 14px; --_font: 14px; --_gap: 8px; }
|
|
1095
|
+
.sw-pill-button[data-size='md'] { --_h: 48px; --_px: 20px; --_font: 16px; --_gap: 10px; }
|
|
1096
|
+
.sw-pill-button[data-size='fluid'] {
|
|
1097
|
+
--_h: clamp(3rem, 2.4478rem + 2.5243vw, 6.25rem);
|
|
1098
|
+
--_px: clamp(1.5rem, 1.277rem + 1.0194vw, 2.8125rem);
|
|
1099
|
+
--_radius: clamp(1.25rem, 1.0376rem + 0.9709vw, 2.5rem);
|
|
1100
|
+
--_font: clamp(1rem, 0.915rem + 0.3883vw, 1.5rem);
|
|
1101
|
+
--_weight: 600;
|
|
1102
|
+
--_gap: clamp(0.375rem, 0.3113rem + 0.2913vw, 0.75rem);
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
/* Night and glass sit on photos/dark panels, so they are theme-independent: mixes of black/white, no hex
|
|
1106
|
+
(brand hex values live only in themes/*.css). */
|
|
1107
|
+
.sw-pill-button[data-tone='night'] {
|
|
1108
|
+
--_bg: var(--sw-pill-button-night-bg, color-mix(in oklab, white 25%, black));
|
|
1109
|
+
--_bg-hover: var(--sw-pill-button-night-bg-hover, color-mix(in oklab, white 32%, black));
|
|
1110
|
+
--_fg: var(--sw-pill-button-night-fg, white);
|
|
1111
|
+
--_fg-hover: var(--sw-pill-button-night-fg-hover, var(--_fg));
|
|
1112
|
+
--_blur: var(--sw-pill-button-night-blur, 0px);
|
|
1113
|
+
}
|
|
1114
|
+
.sw-pill-button[data-tone='ink'] {
|
|
1115
|
+
--_bg: var(--sw-pill-button-ink-bg, var(--sw-foreground));
|
|
1116
|
+
--_bg-hover: var(--sw-pill-button-ink-bg-hover, color-mix(in oklab, var(--sw-foreground) 85%, var(--sw-background)));
|
|
1117
|
+
--_fg: var(--sw-pill-button-ink-fg, var(--sw-background));
|
|
1118
|
+
--_fg-hover: var(--sw-pill-button-ink-fg-hover, var(--_fg));
|
|
1119
|
+
}
|
|
1120
|
+
.sw-pill-button[data-tone='soft'] {
|
|
1121
|
+
--_bg: var(--sw-pill-button-soft-bg, var(--sw-muted));
|
|
1122
|
+
--_bg-hover: var(--sw-pill-button-soft-bg-hover, color-mix(in oklab, var(--sw-foreground) 10%, var(--sw-muted)));
|
|
1123
|
+
--_fg: var(--sw-pill-button-soft-fg, var(--sw-foreground));
|
|
1124
|
+
--_fg-hover: var(--sw-pill-button-soft-fg-hover, var(--_fg));
|
|
1125
|
+
}
|
|
1126
|
+
.sw-pill-button[data-tone='glass'] {
|
|
1127
|
+
--_bg: var(--sw-pill-button-glass-bg, color-mix(in oklab, white 50%, transparent));
|
|
1128
|
+
--_bg-hover: var(--sw-pill-button-glass-bg-hover, black);
|
|
1129
|
+
--_fg: var(--sw-pill-button-glass-fg, black);
|
|
1130
|
+
--_fg-hover: var(--sw-pill-button-glass-fg-hover, white);
|
|
1131
|
+
--_blur: var(--sw-pill-button-glass-blur, 5px);
|
|
1132
|
+
--_dur: 300ms;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1136
|
+
:is(.sw-action-square, .sw-pill-button),
|
|
1137
|
+
:is(.sw-action-square, .sw-pill-button) * { transition-duration: 0s !important; transition-delay: 0s !important; }
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
/* kit.css */
|
|
1141
|
+
/* ── Shared surfaces for the component kit (see primitives/popup.tsx) ───── */
|
|
1142
|
+
:root {
|
|
1143
|
+
--sw-shadow-popup: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px -6px rgb(0 0 0 / 0.14), 0 24px 48px -12px rgb(0 0 0 / 0.12);
|
|
1144
|
+
--sw-shadow-modal: 0 2px 4px rgb(0 0 0 / 0.04), 0 24px 64px -12px rgb(0 0 0 / 0.28);
|
|
1145
|
+
--sw-backdrop: color-mix(in oklab, var(--sw-foreground) 18%, transparent);
|
|
1146
|
+
--sw-item-hover: color-mix(in oklab, var(--sw-foreground) 6%, transparent);
|
|
1147
|
+
--sw-item-active: color-mix(in oklab, var(--sw-foreground) 10%, transparent);
|
|
1148
|
+
/* Selected rows/items everywhere (Tree, Toolbar, Pagination, Nav, Listbox…): neutral, not accent. */
|
|
1149
|
+
--sw-item-selected: var(--sw-item-active);
|
|
1150
|
+
--sw-z-popup: 50;
|
|
1151
|
+
--sw-z-modal: 40;
|
|
1152
|
+
--sw-z-toast: 60;
|
|
1153
|
+
}
|
|
1154
|
+
:root[data-theme='dark'] { --sw-backdrop: rgb(0 0 0 / 0.55); --sw-shadow-popup: 0 0 0 0.5px rgb(255 255 255 / 0.06), 0 12px 32px -6px rgb(0 0 0 / 0.6); }
|
|
1155
|
+
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { --sw-backdrop: rgb(0 0 0 / 0.55); --sw-shadow-popup: 0 0 0 0.5px rgb(255 255 255 / 0.06), 0 12px 32px -6px rgb(0 0 0 / 0.6); } }
|
|
1156
|
+
|
|
1157
|
+
html[data-sw-scroll-lock] { overflow: hidden; padding-right: var(--sw-scrollbar-gap, 0); }
|
|
1158
|
+
|
|
1159
|
+
.sw-popup-positioner { z-index: var(--sw-z-popup); }
|
|
1160
|
+
.sw-popup {
|
|
1161
|
+
--sw-sq-bg: var(--sw-background);
|
|
1162
|
+
--sw-sq-border: var(--sw-frame);
|
|
1163
|
+
position: relative;
|
|
1164
|
+
min-width: 8rem;
|
|
1165
|
+
max-width: min(var(--sw-popup-available-width, 100vw), 26rem);
|
|
1166
|
+
max-height: var(--sw-popup-available-height, 70vh);
|
|
1167
|
+
display: flex;
|
|
1168
|
+
flex-direction: column;
|
|
1169
|
+
color: var(--sw-foreground);
|
|
1170
|
+
font-family: var(--sw-font-sans);
|
|
1171
|
+
font-size: 14px;
|
|
1172
|
+
line-height: 1.45;
|
|
1173
|
+
filter: drop-shadow(0 10px 24px rgb(0 0 0 / 0.12)) drop-shadow(0 1px 2px rgb(0 0 0 / 0.06));
|
|
1174
|
+
}
|
|
1175
|
+
.sw-popup__body { min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
|
|
1176
|
+
.sw-popup[data-padding='xs'] { --sw-inset: 4px; }
|
|
1177
|
+
.sw-popup[data-padding='sm'] { --sw-inset: 6px; }
|
|
1178
|
+
.sw-popup[data-padding='md'] { --sw-inset: 16px; }
|
|
1179
|
+
.sw-popup[data-padding='none'] { --sw-inset: 0px; }
|
|
1180
|
+
.sw-popup > .sw-popup__body { padding: var(--sw-inset); }
|
|
1181
|
+
/* Clip the scroller to the surface so scrolled rows never poke past the rounded corners. */
|
|
1182
|
+
.sw-popup__body { border-radius: calc(var(--sw-sq-r, 14px) - 1px); corner-shape: var(--sw-corner-shape); }
|
|
1183
|
+
|
|
1184
|
+
/* List items inside popups and listboxes (Menu, Select, Combobox, Command, Listbox). */
|
|
1185
|
+
.sw-item {
|
|
1186
|
+
position: relative; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px;
|
|
1187
|
+
/* Concentric by construction: the container's published inner radius (see base.css). */
|
|
1188
|
+
border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape);
|
|
1189
|
+
cursor: default; user-select: none; outline: none; color: var(--sw-foreground);
|
|
1190
|
+
font-size: 14px; letter-spacing: -0.01em;
|
|
1191
|
+
transition: background-color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
1192
|
+
}
|
|
1193
|
+
.sw-item[data-active] { background: var(--sw-item-hover); }
|
|
1194
|
+
.sw-item[data-active]:active, .sw-item[data-pressed] { background: var(--sw-item-active); }
|
|
1195
|
+
/* Selected = neutral fill + 500 weight (system-wide rule). Accent is reserved for focus and the trailing check. */
|
|
1196
|
+
.sw-item[data-selected], .sw-item[aria-selected='true']:not([role='option']) { background: var(--sw-item-active); font-weight: 500; }
|
|
1197
|
+
.sw-item[aria-disabled='true'], .sw-item[data-disabled] { opacity: var(--sw-disabled-opacity); pointer-events: none; }
|
|
1198
|
+
.sw-item[data-tone='danger'] { color: var(--sw-danger); }
|
|
1199
|
+
.sw-item[data-tone='danger'] .sw-item__icon { color: currentColor; }
|
|
1200
|
+
.sw-item__icon { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; color: var(--sw-muted-foreground); }
|
|
1201
|
+
.sw-item__icon svg { width: 16px; height: 16px; }
|
|
1202
|
+
.sw-item__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1203
|
+
.sw-item__hint { margin-left: auto; font-family: var(--sw-font-mono); font-size: 11px; color: var(--sw-muted-foreground); }
|
|
1204
|
+
.sw-item__check { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; margin-left: auto; color: var(--sw-accent); }
|
|
1205
|
+
.sw-group-label { padding: 8px 10px 4px; font-family: var(--sw-font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sw-muted-foreground); }
|
|
1206
|
+
/* Separators inset to the row edges; they never touch the frame. */
|
|
1207
|
+
.sw-list-separator { height: 1px; margin: 4px 0; background: var(--sw-hairline); border: 0; flex-shrink: 0; }
|
|
1208
|
+
.sw-empty { padding: 16px 10px; text-align: center; font-size: 13px; color: var(--sw-muted-foreground); }
|
|
1209
|
+
|
|
1210
|
+
/* Modal backdrop shared by Dialog, Alert Dialog, Drawer. */
|
|
1211
|
+
.sw-backdrop { position: fixed; inset: 0; z-index: var(--sw-z-modal); background: var(--sw-backdrop); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
|
|
1212
|
+
|
|
1213
|
+
/* Popups (menus, selects, comboboxes) publish the inner radius for their rows. */
|
|
1214
|
+
.sw-popup { --sw-inner-r: max(4px, calc(var(--sw-sq-r, 14px) - var(--sw-inset, 4px))); }
|
|
1215
|
+
|
|
1216
|
+
/* kit-forms.css */
|
|
1217
|
+
/* ── Forms ── */
|
|
1218
|
+
|
|
1219
|
+
/* Shared label/help look for Field, Label and choice rows. */
|
|
1220
|
+
.sw-label { display: inline-flex; align-items: baseline; gap: 3px; font-size: 13px; font-weight: 500; letter-spacing: -0.01em; color: var(--sw-foreground); cursor: default; }
|
|
1221
|
+
.sw-label[data-disabled] { opacity: var(--sw-disabled-opacity); }
|
|
1222
|
+
.sw-label__required { color: var(--sw-muted-foreground); font-weight: 450; }
|
|
1223
|
+
|
|
1224
|
+
/* Field */
|
|
1225
|
+
.sw-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
|
|
1226
|
+
.sw-field[data-disabled] .sw-field__description { opacity: var(--sw-disabled-opacity); }
|
|
1227
|
+
.sw-field__description, .sw-field__error { margin: 0; font-size: 13px; line-height: 1.4; color: var(--sw-muted-foreground); }
|
|
1228
|
+
.sw-field__error { color: var(--sw-danger); }
|
|
1229
|
+
.sw-field[data-invalid] .sw-input__field { --sw-sq-border: var(--sw-danger); --sw-sq-ring: var(--sw-danger); }
|
|
1230
|
+
|
|
1231
|
+
/* Input additions: clear button, message row with a trailing count. */
|
|
1232
|
+
.sw-input__clear, .sw-password-input__toggle {
|
|
1233
|
+
display: inline-grid; place-items: center; flex-shrink: 0; width: 24px; height: calc(100% - 2 * var(--sw-inset));
|
|
1234
|
+
margin-inline-end: calc(var(--sw-inset) - var(--sw-field-padding)); padding: 0;
|
|
1235
|
+
color: var(--sw-muted-foreground); cursor: pointer;
|
|
1236
|
+
transition: color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
1237
|
+
}
|
|
1238
|
+
.sw-input__clear:hover:not(:disabled), .sw-password-input__toggle:hover:not(:disabled) { color: var(--sw-foreground); }
|
|
1239
|
+
.sw-input__clear svg, .sw-password-input__toggle svg { display: block; }
|
|
1240
|
+
.sw-input[data-disabled] .sw-input__field { opacity: var(--sw-disabled-opacity); }
|
|
1241
|
+
.sw-input[data-disabled] .sw-input__control { cursor: not-allowed; }
|
|
1242
|
+
.sw-input__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
|
|
1243
|
+
|
|
1244
|
+
/* Textarea */
|
|
1245
|
+
.sw-textarea__field { height: auto !important; align-items: stretch; padding: 0 !important; }
|
|
1246
|
+
.sw-textarea__control { display: block; width: 100%; height: auto; padding: 9px 12px; resize: none; line-height: 1.45; font-size: 15px; }
|
|
1247
|
+
.sw-textarea[data-size='sm'] .sw-textarea__control { padding: 6px 10px; font-size: 14px; }
|
|
1248
|
+
.sw-textarea[data-size='lg'] .sw-textarea__control { padding: 13px 16px; font-size: 17px; }
|
|
1249
|
+
.sw-textarea__count { margin-left: auto; font-family: var(--sw-font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--sw-muted-foreground); font-variant-numeric: tabular-nums; }
|
|
1250
|
+
.sw-textarea__count[data-full] { color: var(--sw-danger); }
|
|
1251
|
+
|
|
1252
|
+
/* Number Input */
|
|
1253
|
+
.sw-number-input[data-stepper] .sw-number-input__field { --sw-inset: 4px; padding: 0 var(--sw-inset); gap: 0; }
|
|
1254
|
+
.sw-number-input__control { text-align: center; font-variant-numeric: tabular-nums; }
|
|
1255
|
+
.sw-number-input__step {
|
|
1256
|
+
display: inline-grid; place-items: center; flex-shrink: 0; width: 32px; height: calc(100% - 2 * var(--sw-inset)); padding: 0;
|
|
1257
|
+
color: var(--sw-muted-foreground); cursor: pointer; touch-action: manipulation; user-select: none;
|
|
1258
|
+
transition: color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
1259
|
+
}
|
|
1260
|
+
.sw-number-input[data-size='sm'] .sw-number-input__step { width: 26px; }
|
|
1261
|
+
.sw-number-input__step:hover:not(:disabled) { color: var(--sw-foreground); }
|
|
1262
|
+
.sw-number-input__step:disabled { opacity: var(--sw-disabled-opacity); cursor: default; }
|
|
1263
|
+
|
|
1264
|
+
/* Password Input */
|
|
1265
|
+
.sw-password-input__caps { flex-shrink: 0; padding: 2px 5px; border-radius: 4px; background: var(--sw-muted); font-family: var(--sw-font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sw-muted-foreground); }
|
|
1266
|
+
|
|
1267
|
+
/* Checkbox + Radio: shared row layout */
|
|
1268
|
+
.sw-checkbox-field, .sw-radio-field { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
|
|
1269
|
+
.sw-checkbox-field__text, .sw-radio-field__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding-top: 0; }
|
|
1270
|
+
.sw-checkbox-field__label, .sw-radio-field__label { font-size: 14px; font-weight: 450; letter-spacing: -0.01em; line-height: 20px; cursor: pointer; user-select: none; }
|
|
1271
|
+
.sw-checkbox-field__description, .sw-radio-field__description { font-size: 13px; line-height: 1.4; color: var(--sw-muted-foreground); }
|
|
1272
|
+
.sw-checkbox-field[data-disabled], .sw-radio-field[data-disabled] { opacity: var(--sw-disabled-opacity); }
|
|
1273
|
+
.sw-checkbox-field[data-disabled] label, .sw-radio-field[data-disabled] label { cursor: not-allowed; }
|
|
1274
|
+
|
|
1275
|
+
/* Checkbox */
|
|
1276
|
+
.sw-checkbox {
|
|
1277
|
+
--sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame);
|
|
1278
|
+
--box: 18px; position: relative; display: inline-grid; place-items: center; flex-shrink: 0; width: var(--box); height: var(--box); margin-top: 1px;
|
|
1279
|
+
padding: 0; border: 0; background: none; color: var(--sw-accent-foreground); cursor: pointer;
|
|
1280
|
+
}
|
|
1281
|
+
.sw-checkbox[data-size='sm'] { --box: 16px; margin-top: 2px; }
|
|
1282
|
+
.sw-checkbox[data-size='lg'] { --box: 22px; margin-top: -1px; }
|
|
1283
|
+
.sw-checkbox:hover:not(:disabled) { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
1284
|
+
.sw-checkbox[data-state='checked'], .sw-checkbox[data-state='indeterminate'] { --sw-sq-bg: var(--sw-accent-solid); --sw-sq-border: var(--sw-accent-solid); }
|
|
1285
|
+
.sw-checkbox[data-invalid] { --sw-sq-border: var(--sw-danger); --sw-sq-ring: var(--sw-danger); }
|
|
1286
|
+
.sw-checkbox:disabled { cursor: not-allowed; }
|
|
1287
|
+
.sw-checkbox:disabled:not(.sw-checkbox-field *) { opacity: var(--sw-disabled-opacity); }
|
|
1288
|
+
.sw-checkbox[data-readonly] { cursor: default; }
|
|
1289
|
+
.sw-checkbox__icon { position: relative; width: 78%; height: 78%; }
|
|
1290
|
+
|
|
1291
|
+
/* Checkbox / Radio groups */
|
|
1292
|
+
.sw-checkbox-group, .sw-radio-group { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
|
|
1293
|
+
.sw-checkbox-group[data-orientation='horizontal'], .sw-radio-group[data-orientation='horizontal'] { flex-direction: row; flex-wrap: wrap; gap: 10px 20px; }
|
|
1294
|
+
|
|
1295
|
+
/* Radio */
|
|
1296
|
+
.sw-radio {
|
|
1297
|
+
--box: 18px; position: relative; display: inline-grid; place-items: center; flex-shrink: 0; width: var(--box); height: var(--box); margin-top: 1px;
|
|
1298
|
+
padding: 0; border: 1px solid var(--sw-frame); border-radius: 50%;
|
|
1299
|
+
background: var(--sw-background); cursor: pointer; outline: none;
|
|
1300
|
+
transition: border-color var(--sw-duration-fast) var(--sw-ease-standard), background-color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
1301
|
+
}
|
|
1302
|
+
.sw-radio[data-size='sm'] { --box: 16px; margin-top: 2px; }
|
|
1303
|
+
.sw-radio[data-size='lg'] { --box: 22px; margin-top: -1px; }
|
|
1304
|
+
.sw-radio:hover:not(:disabled) { border-color: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
1305
|
+
.sw-radio[data-state='checked'] { border-color: var(--sw-accent-solid); background: var(--sw-accent-solid); }
|
|
1306
|
+
.sw-radio:focus-visible { box-shadow: 0 0 0 2px var(--sw-background), 0 0 0 4px var(--sw-accent); }
|
|
1307
|
+
.sw-radio:disabled { cursor: not-allowed; }
|
|
1308
|
+
.sw-radio:disabled:not(.sw-radio-field *) { opacity: var(--sw-disabled-opacity); }
|
|
1309
|
+
.sw-radio__dot { width: 40%; height: 40%; border-radius: 50%; background: var(--sw-accent-foreground); }
|
|
1310
|
+
.sw-radio-group[aria-invalid='true'] .sw-radio { border-color: var(--sw-danger); }
|
|
1311
|
+
|
|
1312
|
+
/* Toggle
|
|
1313
|
+
Standalone: transparent at rest (outline variant: frame), quiet hover, solid ink when pressed.
|
|
1314
|
+
In a ToggleGroup: a muted track behind the toggles. */
|
|
1315
|
+
.sw-toggle {
|
|
1316
|
+
--sw-sq-bg: transparent; --sw-sq-border: transparent;
|
|
1317
|
+
position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0;
|
|
1318
|
+
height: 36px; padding: 0 12px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 450; letter-spacing: -0.01em;
|
|
1319
|
+
color: var(--sw-muted-foreground); cursor: pointer; white-space: nowrap; user-select: none; outline: none;
|
|
1320
|
+
transition: color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
1321
|
+
}
|
|
1322
|
+
.sw-toggle[data-variant='outline'] { --sw-sq-border: var(--sw-frame); }
|
|
1323
|
+
.sw-toggle[data-size='sm'] { height: 30px; padding: 0 9px; font-size: 13px; }
|
|
1324
|
+
.sw-toggle[data-size='lg'] { height: 44px; padding: 0 16px; font-size: 15px; }
|
|
1325
|
+
.sw-toggle[data-icon-only] { width: 36px; padding: 0; }
|
|
1326
|
+
.sw-toggle[data-icon-only][data-size='sm'] { width: 30px; }
|
|
1327
|
+
.sw-toggle[data-icon-only][data-size='lg'] { width: 44px; }
|
|
1328
|
+
.sw-toggle[data-state='off']:hover:not([data-disabled]) { --sw-sq-bg: var(--sw-item-hover); color: var(--sw-foreground); }
|
|
1329
|
+
.sw-toggle[data-variant='outline'][data-state='off']:hover:not([data-disabled]) { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
1330
|
+
.sw-toggle[data-state='on'] { --sw-sq-bg: var(--sw-foreground); --sw-sq-border: var(--sw-foreground); color: var(--sw-background); }
|
|
1331
|
+
.sw-toggle[data-disabled] { opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
1332
|
+
.sw-toggle__icon { position: relative; display: inline-flex; }
|
|
1333
|
+
.sw-toggle__icon svg { width: 18px; height: 18px; }
|
|
1334
|
+
.sw-toggle[data-size='sm'] .sw-toggle__icon svg { width: 16px; height: 16px; }
|
|
1335
|
+
.sw-toggle__label { position: relative; }
|
|
1336
|
+
|
|
1337
|
+
.sw-toggle-group { --sw-sq-bg: var(--sw-muted); --sw-inset: 3px; display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; }
|
|
1338
|
+
.sw-toggle-group[data-variant='outline'] { --sw-sq-border: var(--sw-frame); }
|
|
1339
|
+
.sw-toggle-group[data-orientation='vertical'] { flex-direction: column; align-items: stretch; }
|
|
1340
|
+
.sw-toggle-group[aria-disabled='true'] { opacity: var(--sw-disabled-opacity); }
|
|
1341
|
+
.sw-toggle-group[aria-disabled='true'] .sw-toggle[data-disabled] { opacity: 1; }
|
|
1342
|
+
.sw-toggle-group .sw-toggle[data-state='off']:hover:not([data-disabled]) { --sw-sq-bg: transparent; }
|
|
1343
|
+
|
|
1344
|
+
/* Slider */
|
|
1345
|
+
.sw-slider { --thumb: 20px; --track: 4px; display: flex; flex-direction: column; gap: 10px; min-width: 0; width: 100%; touch-action: none; }
|
|
1346
|
+
.sw-slider[data-size='sm'] { --thumb: 16px; --track: 3px; }
|
|
1347
|
+
.sw-slider__header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
|
|
1348
|
+
.sw-slider__label { font-size: 13px; font-weight: 500; letter-spacing: -0.01em; }
|
|
1349
|
+
.sw-slider__value { margin-left: auto; font-family: var(--sw-font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--sw-muted-foreground); font-variant-numeric: tabular-nums; }
|
|
1350
|
+
.sw-slider__control { position: relative; display: flex; align-items: center; height: var(--thumb); margin: 0 calc(var(--thumb) / 2); cursor: pointer; }
|
|
1351
|
+
.sw-slider__track { position: relative; flex: 1; height: var(--track); border-radius: 999px; background: color-mix(in oklab, var(--sw-foreground) 12%, var(--sw-background)); }
|
|
1352
|
+
.sw-slider__indicator { position: absolute; top: 0; bottom: 0; border-radius: inherit; background: var(--sw-accent-solid); transition: left 120ms var(--sw-ease-standard), width 120ms var(--sw-ease-standard), bottom 120ms var(--sw-ease-standard), height 120ms var(--sw-ease-standard); }
|
|
1353
|
+
.sw-slider__mark { position: absolute; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: color-mix(in oklab, var(--sw-foreground) 30%, var(--sw-background)); transform: translate(-50%, -50%); }
|
|
1354
|
+
.sw-slider__mark[data-active] { background: var(--sw-accent-foreground); }
|
|
1355
|
+
.sw-slider__thumb {
|
|
1356
|
+
position: absolute; top: 50%; width: var(--thumb); height: var(--thumb); border-radius: 50%; background: #fff; cursor: grab;
|
|
1357
|
+
box-shadow: 0 0 0 1px color-mix(in oklab, var(--sw-foreground) 14%, transparent), 0 1px 3px rgb(0 0 0 / 0.18);
|
|
1358
|
+
transform: translate(-50%, -50%); outline: none; touch-action: none;
|
|
1359
|
+
transition: left 120ms var(--sw-ease-standard), bottom 120ms var(--sw-ease-standard), box-shadow var(--sw-duration-fast) var(--sw-ease-standard), scale var(--sw-duration-fast) var(--sw-ease-standard);
|
|
1360
|
+
}
|
|
1361
|
+
.sw-slider[data-dragging] .sw-slider__thumb { transition: box-shadow var(--sw-duration-fast) var(--sw-ease-standard), scale var(--sw-duration-fast) var(--sw-ease-standard); cursor: grabbing; }
|
|
1362
|
+
.sw-slider[data-dragging] .sw-slider__indicator { transition: none; }
|
|
1363
|
+
.sw-slider__thumb:focus-visible { box-shadow: 0 0 0 1px color-mix(in oklab, var(--sw-foreground) 14%, transparent), 0 0 0 2px var(--sw-background), 0 0 0 4px var(--sw-accent); }
|
|
1364
|
+
.sw-slider[data-dragging] .sw-slider__thumb:focus { scale: 1.08; }
|
|
1365
|
+
.sw-slider__marks { position: relative; height: 16px; margin: -4px calc(var(--thumb) / 2) 0; }
|
|
1366
|
+
.sw-slider__mark-label { position: absolute; top: 0; transform: translateX(-50%); font-family: var(--sw-font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sw-muted-foreground); white-space: nowrap; }
|
|
1367
|
+
.sw-slider[data-disabled] { opacity: var(--sw-disabled-opacity); }
|
|
1368
|
+
.sw-slider[data-disabled] .sw-slider__control, .sw-slider[data-readonly] .sw-slider__control, .sw-slider[data-disabled] .sw-slider__thumb { cursor: default; }
|
|
1369
|
+
/* vertical */
|
|
1370
|
+
.sw-slider[data-orientation='vertical'] { width: auto; height: 100%; min-height: 160px; align-items: center; }
|
|
1371
|
+
.sw-slider[data-orientation='vertical'] .sw-slider__control { flex: 1; flex-direction: column; width: var(--thumb); height: auto; margin: calc(var(--thumb) / 2) 0; }
|
|
1372
|
+
.sw-slider[data-orientation='vertical'] .sw-slider__track { width: var(--track); height: auto; }
|
|
1373
|
+
.sw-slider[data-orientation='vertical'] .sw-slider__indicator { top: auto; left: 0; right: 0; }
|
|
1374
|
+
.sw-slider[data-orientation='vertical'] .sw-slider__mark, .sw-slider[data-orientation='vertical'] .sw-slider__thumb { top: auto; left: 50%; transform: translate(-50%, 50%); }
|
|
1375
|
+
.sw-slider[data-orientation='vertical'] .sw-slider__marks { display: none; }
|
|
1376
|
+
|
|
1377
|
+
/* OTP Input */
|
|
1378
|
+
.sw-otp { --slot-w: 44px; --slot-h: 52px; position: relative; display: inline-flex; max-width: 100%; }
|
|
1379
|
+
.sw-otp[data-size='sm'] { --slot-w: 36px; --slot-h: 42px; }
|
|
1380
|
+
.sw-otp[data-size='lg'] { --slot-w: 52px; --slot-h: 60px; }
|
|
1381
|
+
.sw-otp__slots { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
1382
|
+
.sw-otp__slot {
|
|
1383
|
+
--sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame);
|
|
1384
|
+
display: inline-grid; place-items: center; flex: 0 1 var(--slot-w); width: var(--slot-w); min-width: 0; height: var(--slot-h);
|
|
1385
|
+
font-size: 20px; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--sw-foreground);
|
|
1386
|
+
}
|
|
1387
|
+
.sw-otp[data-size='lg'] .sw-otp__slot { font-size: 24px; }
|
|
1388
|
+
.sw-otp:hover:not([data-disabled]) .sw-otp__slot { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
1389
|
+
.sw-otp__slot[data-active] { --sw-sq-border: var(--sw-accent) !important; }
|
|
1390
|
+
.sw-otp__slot[data-active] > .sw-sq-ring { opacity: 1; }
|
|
1391
|
+
.sw-otp[data-invalid] .sw-otp__slot { --sw-sq-border: var(--sw-danger) !important; --sw-sq-ring: var(--sw-danger); }
|
|
1392
|
+
.sw-otp[data-disabled] { opacity: var(--sw-disabled-opacity); }
|
|
1393
|
+
.sw-otp__sep { flex-shrink: 0; width: 10px; height: 2px; border-radius: 1px; background: color-mix(in oklab, var(--sw-foreground) 25%, transparent); }
|
|
1394
|
+
.sw-otp__caret { position: absolute; width: 1.5px; height: 40%; background: var(--sw-foreground); animation: sw-otp-blink 1.1s steps(1) infinite; }
|
|
1395
|
+
@keyframes sw-otp-blink { 50% { opacity: 0; } }
|
|
1396
|
+
.sw-otp__control {
|
|
1397
|
+
position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; outline: none; background: transparent;
|
|
1398
|
+
color: transparent; caret-color: transparent; font-size: 16px; letter-spacing: 0; cursor: text; -webkit-text-fill-color: transparent;
|
|
1399
|
+
}
|
|
1400
|
+
.sw-otp__control::selection { background: transparent; }
|
|
1401
|
+
.sw-otp[data-disabled] .sw-otp__control { cursor: not-allowed; }
|
|
1402
|
+
|
|
1403
|
+
/* Separator */
|
|
1404
|
+
.sw-separator { flex-shrink: 0; background: var(--sw-hairline); }
|
|
1405
|
+
.sw-separator[data-tone='frame'] { background: var(--sw-frame); }
|
|
1406
|
+
.sw-separator[data-orientation='horizontal'] { width: 100%; height: 1px; }
|
|
1407
|
+
.sw-separator[data-orientation='vertical'] { width: 1px; align-self: stretch; min-height: 1em; }
|
|
1408
|
+
.sw-separator[data-labelled] { display: flex; align-items: center; gap: 12px; height: auto; background: none; }
|
|
1409
|
+
.sw-separator[data-labelled]::before, .sw-separator[data-labelled]::after { content: ''; flex: 1; height: 1px; background: var(--sw-hairline); }
|
|
1410
|
+
.sw-separator[data-labelled][data-tone='frame']::before, .sw-separator[data-labelled][data-tone='frame']::after { background: var(--sw-frame); }
|
|
1411
|
+
.sw-separator__label { font-family: var(--sw-font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sw-muted-foreground); }
|
|
1412
|
+
|
|
1413
|
+
/* Meter + Progress */
|
|
1414
|
+
.sw-meter, .sw-progress { --bar: 6px; display: flex; flex-direction: column; gap: 8px; width: 100%; min-width: 0; }
|
|
1415
|
+
.sw-meter[data-size='sm'], .sw-progress[data-size='sm'] { --bar: 4px; }
|
|
1416
|
+
.sw-meter[data-size='lg'], .sw-progress[data-size='lg'] { --bar: 10px; }
|
|
1417
|
+
.sw-meter__header, .sw-progress__header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
|
|
1418
|
+
.sw-meter__label, .sw-progress__label { font-size: 13px; font-weight: 500; letter-spacing: -0.01em; }
|
|
1419
|
+
.sw-meter__value, .sw-progress__value { margin-left: auto; font-family: var(--sw-font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--sw-muted-foreground); font-variant-numeric: tabular-nums; }
|
|
1420
|
+
.sw-meter__track, .sw-progress__track { position: relative; height: var(--bar); overflow: hidden; border-radius: 999px; background: color-mix(in oklab, var(--sw-foreground) 9%, var(--sw-background)); }
|
|
1421
|
+
.sw-meter__indicator { height: 100%; border-radius: inherit; background: var(--sw-foreground); transition: width var(--sw-duration-slow) var(--sw-ease-standard), background-color var(--sw-duration-base) var(--sw-ease-standard); }
|
|
1422
|
+
.sw-meter[data-state='optimum'] .sw-meter__indicator { background: var(--sw-success); }
|
|
1423
|
+
.sw-meter[data-state='suboptimum'] .sw-meter__indicator { background: var(--sw-warning); }
|
|
1424
|
+
.sw-meter[data-state='critical'] .sw-meter__indicator { background: var(--sw-danger); }
|
|
1425
|
+
.sw-progress__indicator { width: 100%; height: 100%; border-radius: inherit; background: var(--sw-accent-solid); transform-origin: left center; transition: transform var(--sw-duration-slow) var(--sw-ease-standard); }
|
|
1426
|
+
.sw-progress[data-state='complete'] .sw-progress__indicator { background: var(--sw-foreground); }
|
|
1427
|
+
.sw-progress[data-state='indeterminate'] .sw-progress__indicator { width: 40%; animation: sw-progress-slide 1.3s var(--sw-ease-standard) infinite; }
|
|
1428
|
+
@keyframes sw-progress-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
|
|
1429
|
+
|
|
1430
|
+
.sw-skeleton { --sw-sq-bg: var(--sw-skeleton-fill, var(--sw-muted)); max-width: 100%; }
|
|
1431
|
+
.sw-skeleton[data-inline] { display: inline-block; vertical-align: middle; }
|
|
1432
|
+
|
|
1433
|
+
.sw-empty-state {
|
|
1434
|
+
display: grid;
|
|
1435
|
+
justify-items: center;
|
|
1436
|
+
gap: 12px;
|
|
1437
|
+
min-width: 0;
|
|
1438
|
+
padding: 24px 16px;
|
|
1439
|
+
text-align: center;
|
|
1440
|
+
}
|
|
1441
|
+
.sw-empty-state__icon { display: grid; place-items: center; width: 24px; height: 24px; color: var(--sw-muted-foreground); }
|
|
1442
|
+
.sw-empty-state__icon > svg { display: block; width: 100%; height: 100%; }
|
|
1443
|
+
.sw-empty-state__copy { display: grid; gap: 4px; min-width: 0; max-width: 36ch; overflow-wrap: anywhere; }
|
|
1444
|
+
.sw-empty-state__title[data-size='sm'] { font-size: 17px; font-weight: 550; letter-spacing: -0.02em; }
|
|
1445
|
+
|
|
1446
|
+
/* Rating */
|
|
1447
|
+
.sw-rating { --star: 24px; display: inline-flex; gap: 2px; color: var(--sw-foreground); }
|
|
1448
|
+
.sw-rating[data-size='sm'] { --star: 18px; }
|
|
1449
|
+
.sw-rating[data-size='lg'] { --star: 32px; gap: 4px; }
|
|
1450
|
+
.sw-rating__item { position: relative; display: inline-flex; width: var(--star); height: var(--star); }
|
|
1451
|
+
.sw-rating__star { display: block; width: 100%; height: 100%; }
|
|
1452
|
+
.sw-rating__star path { fill: color-mix(in oklab, var(--sw-foreground) 12%, var(--sw-background)); stroke: none; }
|
|
1453
|
+
.sw-rating__fill { position: absolute; inset: 0; pointer-events: none; transition: clip-path var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
1454
|
+
.sw-rating__fill .sw-rating__star path { fill: currentColor; }
|
|
1455
|
+
.sw-rating[data-hovering] .sw-rating__fill { color: color-mix(in oklab, var(--sw-foreground) 55%, var(--sw-background)); }
|
|
1456
|
+
.sw-rating__hit { position: absolute; inset: 0; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; corner-shape: var(--sw-corner-shape); outline: none; }
|
|
1457
|
+
.sw-rating__hit[data-half='start'] { right: 50%; }
|
|
1458
|
+
.sw-rating__hit[data-half='end'] { left: 50%; }
|
|
1459
|
+
.sw-rating__hit:focus-visible { box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
1460
|
+
.sw-rating__item:has(.sw-rating__hit[data-half]:focus-visible) .sw-rating__hit:focus-visible { box-shadow: none; }
|
|
1461
|
+
.sw-rating__item:has(.sw-rating__hit[data-half]:focus-visible) { border-radius: 6px; corner-shape: var(--sw-corner-shape); box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
1462
|
+
.sw-rating[data-disabled] { opacity: var(--sw-disabled-opacity); }
|
|
1463
|
+
.sw-rating[data-disabled] .sw-rating__hit { cursor: not-allowed; }
|
|
1464
|
+
.sw-rating[data-readonly] .sw-rating__item { pointer-events: none; }
|
|
1465
|
+
|
|
1466
|
+
/* Resize grip (Textarea without autoResize, TriggerMenuInput): an arc of the field's own corner,
|
|
1467
|
+
4px inside the frame. Replaces the browser's square grip, which cut the squircle's curve. */
|
|
1468
|
+
.sw-resize-grip {
|
|
1469
|
+
position: absolute; right: 0; bottom: 0; z-index: 4; width: calc(var(--_g) + 10px); height: calc(var(--_g) + 10px);
|
|
1470
|
+
cursor: ns-resize; touch-action: none; -webkit-tap-highlight-color: transparent;
|
|
1471
|
+
}
|
|
1472
|
+
.sw-resize-grip__arc { position: absolute; right: 4px; bottom: 4px; display: block; pointer-events: none; }
|
|
1473
|
+
.sw-resize-grip__arc path {
|
|
1474
|
+
stroke: var(--sw-resize-grip-color, color-mix(in oklab, var(--sw-muted-foreground) 70%, transparent));
|
|
1475
|
+
stroke-width: 1.5; stroke-linecap: round; transition: stroke var(--sw-duration-fast) var(--sw-ease-standard);
|
|
1476
|
+
}
|
|
1477
|
+
.sw-resize-grip:hover .sw-resize-grip__arc path,
|
|
1478
|
+
.sw-resize-grip[data-dragging] .sw-resize-grip__arc path { stroke: var(--sw-resize-grip-active-color, var(--sw-foreground)); }
|
|
1479
|
+
|
|
1480
|
+
/* kit-overlays.css */
|
|
1481
|
+
/* ── Overlays kit: Popover, Tooltip, Hover Card, Dialog, Alert Dialog, Drawer, Toast ── */
|
|
1482
|
+
/* One spacing scale: padding by size — Dialog 24, Drawer 20, Popover / Hover Card 16;
|
|
1483
|
+
gap between blocks 16; title → description 6. */
|
|
1484
|
+
|
|
1485
|
+
/* Shared text parts */
|
|
1486
|
+
.sw-popover__title, .sw-dialog__title, .sw-alert-dialog__title, .sw-drawer__title {
|
|
1487
|
+
margin: 0; font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; color: var(--sw-foreground); text-wrap: balance;
|
|
1488
|
+
}
|
|
1489
|
+
.sw-popover__title { font-size: 0.9375rem; }
|
|
1490
|
+
.sw-popover__description, .sw-dialog__description, .sw-alert-dialog__description, .sw-drawer__description {
|
|
1491
|
+
margin: 0; font-size: 0.875rem; line-height: 1.45; letter-spacing: -0.006em; color: var(--sw-muted-foreground); text-wrap: pretty;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
/* ── Popover ── */
|
|
1495
|
+
.sw-popover { width: min(var(--sw-popover-width, 20rem), var(--sw-popup-available-width, 100vw)); max-width: none; }
|
|
1496
|
+
.sw-popover > .sw-popup__body { gap: 16px; }
|
|
1497
|
+
.sw-popover[data-padding-size='sm'] > .sw-popup__body { --sw-inset: 12px; padding: 12px; gap: 12px; }
|
|
1498
|
+
.sw-popover[data-padding-size='md'] > .sw-popup__body { --sw-inset: 16px; padding: 16px; }
|
|
1499
|
+
/* Title and description read as one header: 6px apart, whatever the block gap. */
|
|
1500
|
+
.sw-popover__title + .sw-popover__description { margin-top: calc(6px - 16px); }
|
|
1501
|
+
.sw-popover[data-padding-size='sm'] .sw-popover__title + .sw-popover__description { margin-top: calc(6px - 12px); }
|
|
1502
|
+
.sw-popover:focus-visible { outline: none; }
|
|
1503
|
+
|
|
1504
|
+
/* ── Citation Chip ── */
|
|
1505
|
+
.sw-citation-chip { display: inline-flex; vertical-align: baseline; }
|
|
1506
|
+
.sw-citation-chip__trigger[data-size='sm'] { height: 24px; padding-inline: 7px; gap: 4px; font-size: 12px; }
|
|
1507
|
+
.sw-citation-chip__trigger .sw-button__icon { width: 12px; height: 12px; }
|
|
1508
|
+
.sw-citation-chip__preview { overflow-wrap: anywhere; }
|
|
1509
|
+
.sw-citation-chip__excerpt { margin: 0; color: var(--sw-subtle); font-size: 13px; line-height: 1.5; }
|
|
1510
|
+
.sw-citation-chip__link { align-self: flex-start; }
|
|
1511
|
+
|
|
1512
|
+
/* ── Tooltip ── */
|
|
1513
|
+
.sw-tooltip {
|
|
1514
|
+
--sw-sq-bg: var(--sw-foreground);
|
|
1515
|
+
--sw-sq-border: transparent;
|
|
1516
|
+
min-width: 0;
|
|
1517
|
+
max-width: min(18rem, var(--sw-popup-available-width, 100vw));
|
|
1518
|
+
color: var(--sw-background);
|
|
1519
|
+
font-size: 12px;
|
|
1520
|
+
line-height: 1.4;
|
|
1521
|
+
letter-spacing: -0.005em;
|
|
1522
|
+
filter: drop-shadow(0 4px 12px rgb(0 0 0 / 0.12));
|
|
1523
|
+
pointer-events: auto;
|
|
1524
|
+
}
|
|
1525
|
+
.sw-tooltip > .sw-popup__body { flex-direction: row; align-items: center; gap: 8px; padding: 4px 8px; overflow: visible; }
|
|
1526
|
+
.sw-tooltip__kbd {
|
|
1527
|
+
font-family: var(--sw-font-mono); font-size: 11px; letter-spacing: 0.04em;
|
|
1528
|
+
color: color-mix(in oklab, var(--sw-background) 62%, transparent);
|
|
1529
|
+
}
|
|
1530
|
+
.sw-tooltip__sr, .sw-toaster__sr {
|
|
1531
|
+
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
/* ── Hover Card ── */
|
|
1535
|
+
.sw-hover-card__trigger {
|
|
1536
|
+
color: var(--sw-foreground);
|
|
1537
|
+
text-decoration: underline;
|
|
1538
|
+
text-decoration-color: color-mix(in oklab, var(--sw-foreground) 28%, transparent);
|
|
1539
|
+
text-underline-offset: 3px;
|
|
1540
|
+
text-decoration-thickness: 1px;
|
|
1541
|
+
border-radius: 3px;
|
|
1542
|
+
transition: text-decoration-color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
1543
|
+
}
|
|
1544
|
+
.sw-hover-card__trigger:hover, .sw-hover-card__trigger[data-state='open'] { text-decoration-color: currentColor; }
|
|
1545
|
+
.sw-hover-card__trigger:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 2px; }
|
|
1546
|
+
.sw-hover-card { width: min(var(--sw-hover-card-width, 19rem), var(--sw-popup-available-width, 100vw)); max-width: none; }
|
|
1547
|
+
.sw-hover-card > .sw-popup__body { --sw-inset: 16px; padding: 16px; gap: 16px; }
|
|
1548
|
+
|
|
1549
|
+
/* ── Dialog + Alert Dialog ── */
|
|
1550
|
+
.sw-dialog-layer { position: fixed; inset: 0; z-index: var(--sw-z-modal); }
|
|
1551
|
+
.sw-dialog__viewport {
|
|
1552
|
+
position: fixed; inset: 0; z-index: var(--sw-z-modal);
|
|
1553
|
+
/* The overlay scrolls, not the dialog body: a short window never squeezes the body
|
|
1554
|
+
into a tiny scroller that clips fields. */
|
|
1555
|
+
display: grid; place-items: safe center; padding: 16px; overflow-y: auto; overscroll-behavior: contain;
|
|
1556
|
+
}
|
|
1557
|
+
.sw-dialog__viewport:not([data-modal]) { pointer-events: none; }
|
|
1558
|
+
.sw-dialog {
|
|
1559
|
+
--sw-sq-bg: var(--sw-background);
|
|
1560
|
+
--sw-sq-border: var(--sw-frame);
|
|
1561
|
+
pointer-events: auto;
|
|
1562
|
+
width: 100%;
|
|
1563
|
+
max-width: 32.5rem;
|
|
1564
|
+
max-height: none;
|
|
1565
|
+
display: flex;
|
|
1566
|
+
flex-direction: column;
|
|
1567
|
+
gap: 16px;
|
|
1568
|
+
padding: 24px;
|
|
1569
|
+
color: var(--sw-foreground);
|
|
1570
|
+
font-family: var(--sw-font-sans);
|
|
1571
|
+
font-size: 15px;
|
|
1572
|
+
line-height: 1.5;
|
|
1573
|
+
font-weight: 450;
|
|
1574
|
+
filter: drop-shadow(0 24px 48px rgb(0 0 0 / 0.16)) drop-shadow(0 2px 4px rgb(0 0 0 / 0.05));
|
|
1575
|
+
outline: none;
|
|
1576
|
+
}
|
|
1577
|
+
.sw-dialog[data-size='sm'] { max-width: 25rem; }
|
|
1578
|
+
.sw-dialog[data-size='lg'] { max-width: 45rem; }
|
|
1579
|
+
.sw-dialog > :where(:not(.sw-sq-fill, .sw-sq-stroke, .sw-sq-ring)) { position: relative; }
|
|
1580
|
+
.sw-dialog__header { display: flex; flex-direction: column; gap: 6px; padding-right: 28px; }
|
|
1581
|
+
[role='alertdialog'] .sw-dialog__header { padding-right: 0; }
|
|
1582
|
+
.sw-dialog__body {
|
|
1583
|
+
flex: 0 0 auto; font-size: 0.9375rem; line-height: 1.55;
|
|
1584
|
+
}
|
|
1585
|
+
.sw-dialog__body > * + * { margin-top: 0.75em; }
|
|
1586
|
+
.sw-dialog__body p { margin-block: 0; }
|
|
1587
|
+
.sw-dialog__footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
|
|
1588
|
+
.sw-dialog > .sw-dialog__x { position: absolute; top: 14px; right: 14px; width: 32px; padding: 0; justify-content: center; color: var(--sw-muted-foreground); }
|
|
1589
|
+
.sw-dialog > .sw-dialog__x:hover { color: var(--sw-foreground); }
|
|
1590
|
+
@media (max-width: 639px) {
|
|
1591
|
+
.sw-dialog__viewport { place-items: safe end center; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
|
|
1592
|
+
.sw-dialog, .sw-dialog[data-size] { max-width: none; max-height: none; padding: 20px; }
|
|
1593
|
+
.sw-dialog__footer { flex-direction: column-reverse; }
|
|
1594
|
+
.sw-dialog__footer > * { width: 100%; }
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
.sw-dialog[role='alertdialog'] .sw-dialog__header { text-align: start; }
|
|
1598
|
+
.sw-alert-dialog__title { text-wrap: wrap; }
|
|
1599
|
+
.sw-dialog[role='alertdialog'] .sw-dialog__footer {
|
|
1600
|
+
display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px;
|
|
1601
|
+
}
|
|
1602
|
+
.sw-dialog[role='alertdialog'] .sw-dialog__footer > .sw-button {
|
|
1603
|
+
min-width: 0; width: 100%; height: auto; min-height: 40px; padding: 8px 10px;
|
|
1604
|
+
white-space: normal; text-align: center; overflow-wrap: anywhere;
|
|
1605
|
+
}
|
|
1606
|
+
@media (max-width: 319px) {
|
|
1607
|
+
.sw-dialog[role='alertdialog'] .sw-dialog__footer { grid-auto-flow: row; }
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
/* ── Drawer ── */
|
|
1611
|
+
.sw-drawer-layer { position: fixed; inset: 0; z-index: var(--sw-z-modal); pointer-events: none; }
|
|
1612
|
+
.sw-drawer-layer > .sw-backdrop { pointer-events: auto; }
|
|
1613
|
+
.sw-drawer {
|
|
1614
|
+
--sw-sq-bg: var(--sw-background);
|
|
1615
|
+
--sw-sq-border: var(--sw-frame);
|
|
1616
|
+
position: fixed;
|
|
1617
|
+
z-index: var(--sw-z-modal);
|
|
1618
|
+
display: flex;
|
|
1619
|
+
flex-direction: column;
|
|
1620
|
+
pointer-events: auto;
|
|
1621
|
+
color: var(--sw-foreground);
|
|
1622
|
+
font-family: var(--sw-font-sans);
|
|
1623
|
+
font-size: 15px;
|
|
1624
|
+
line-height: 1.5;
|
|
1625
|
+
font-weight: 450;
|
|
1626
|
+
touch-action: none;
|
|
1627
|
+
outline: none;
|
|
1628
|
+
filter: drop-shadow(0 -8px 32px rgb(0 0 0 / 0.12));
|
|
1629
|
+
}
|
|
1630
|
+
.sw-drawer > :where(:not(.sw-sq-fill, .sw-sq-stroke, .sw-sq-ring)) { position: relative; }
|
|
1631
|
+
.sw-drawer[data-side='bottom'], .sw-drawer[data-side='top'] {
|
|
1632
|
+
left: 8px; right: 8px; margin-inline: auto; max-width: var(--sw-drawer-width, 36rem);
|
|
1633
|
+
max-height: calc(100dvh - 24px - env(safe-area-inset-top));
|
|
1634
|
+
}
|
|
1635
|
+
.sw-drawer[data-side='bottom'] { bottom: calc(8px + env(safe-area-inset-bottom)); }
|
|
1636
|
+
.sw-drawer[data-side='top'] { top: calc(8px + env(safe-area-inset-top)); }
|
|
1637
|
+
.sw-drawer[data-side='left'], .sw-drawer[data-side='right'] { top: 8px; bottom: 8px; width: min(var(--sw-drawer-width, 24rem), calc(100vw - 40px)); }
|
|
1638
|
+
.sw-drawer[data-side='left'] { left: 8px; }
|
|
1639
|
+
.sw-drawer[data-side='right'] { right: 8px; }
|
|
1640
|
+
.sw-drawer[data-dragging] { cursor: grabbing; user-select: none; }
|
|
1641
|
+
.sw-drawer__inner { display: flex; flex-direction: column; gap: 16px; flex: 1 1 auto; min-height: 0; padding: 20px; }
|
|
1642
|
+
.sw-drawer[data-side='bottom'] > .sw-drawer__inner { padding-top: 12px; }
|
|
1643
|
+
.sw-drawer[data-side='top'] > .sw-drawer__inner { padding-bottom: 12px; }
|
|
1644
|
+
.sw-drawer__header { display: flex; flex-direction: column; gap: 6px; }
|
|
1645
|
+
.sw-drawer__body {
|
|
1646
|
+
flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-y;
|
|
1647
|
+
margin: -4px -20px; padding: 4px 20px;
|
|
1648
|
+
}
|
|
1649
|
+
.sw-drawer__footer { display: flex; gap: 8px; }
|
|
1650
|
+
.sw-drawer__footer > * { flex: 1 1 0; }
|
|
1651
|
+
.sw-drawer__handle {
|
|
1652
|
+
appearance: none; border: 0; background: transparent; padding: 0; color: inherit;
|
|
1653
|
+
display: grid; place-items: center; flex-shrink: 0; width: 64px; height: 20px; margin: 6px auto 0; border-radius: 6px; corner-shape: var(--sw-corner-shape); cursor: grab;
|
|
1654
|
+
}
|
|
1655
|
+
.sw-drawer[data-side='top'] > .sw-drawer__handle { margin: 0 auto 6px; }
|
|
1656
|
+
.sw-drawer__handle::before { content: ''; width: 36px; height: 4px; border-radius: 2px; background: color-mix(in oklab, var(--sw-foreground) 20%, transparent); transition: background-color var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
1657
|
+
.sw-drawer__handle:hover::before { background: color-mix(in oklab, var(--sw-foreground) 35%, transparent); }
|
|
1658
|
+
.sw-drawer__handle:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 0; }
|
|
1659
|
+
|
|
1660
|
+
/* ── Toast ── */
|
|
1661
|
+
.sw-toaster {
|
|
1662
|
+
position: fixed;
|
|
1663
|
+
z-index: var(--sw-z-toast);
|
|
1664
|
+
width: min(var(--sw-toaster-width, 22.5rem), calc(100vw - 32px));
|
|
1665
|
+
font-family: var(--sw-font-sans);
|
|
1666
|
+
color: var(--sw-foreground);
|
|
1667
|
+
font-weight: 450;
|
|
1668
|
+
}
|
|
1669
|
+
.sw-toaster[data-empty] { pointer-events: none; }
|
|
1670
|
+
.sw-toaster[data-side='bottom'] { bottom: calc(16px + env(safe-area-inset-bottom)); }
|
|
1671
|
+
.sw-toaster[data-side='top'] { top: calc(16px + env(safe-area-inset-top)); }
|
|
1672
|
+
.sw-toaster[data-align='end'] { right: 16px; }
|
|
1673
|
+
.sw-toaster[data-align='start'] { left: 16px; }
|
|
1674
|
+
.sw-toaster[data-align='center'] { left: 0; right: 0; margin-inline: auto; }
|
|
1675
|
+
.sw-toaster__list { position: relative; margin: 0; padding: 0; list-style: none; transition: height var(--sw-duration-base) var(--sw-ease-standard); }
|
|
1676
|
+
.sw-toast {
|
|
1677
|
+
--sw-sq-bg: var(--sw-background);
|
|
1678
|
+
--sw-sq-border: var(--sw-frame);
|
|
1679
|
+
position: absolute;
|
|
1680
|
+
left: 0;
|
|
1681
|
+
right: 0;
|
|
1682
|
+
outline: none;
|
|
1683
|
+
cursor: default;
|
|
1684
|
+
touch-action: pan-y;
|
|
1685
|
+
filter: drop-shadow(0 8px 20px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 2px rgb(0 0 0 / 0.05));
|
|
1686
|
+
}
|
|
1687
|
+
.sw-toaster[data-side='bottom'] .sw-toast { transform-origin: bottom center; }
|
|
1688
|
+
.sw-toaster[data-side='top'] .sw-toast { transform-origin: top center; }
|
|
1689
|
+
.sw-toast > :where(:not(.sw-sq-fill, .sw-sq-stroke, .sw-sq-ring)) { position: relative; }
|
|
1690
|
+
.sw-toast--behind { overflow: hidden; }
|
|
1691
|
+
.sw-toast--behind > .sw-toast__inner { opacity: 0; }
|
|
1692
|
+
.sw-toast__inner {
|
|
1693
|
+
display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
|
|
1694
|
+
transition: opacity var(--sw-duration-fast) var(--sw-ease-standard);
|
|
1695
|
+
}
|
|
1696
|
+
.sw-toast__icon { display: inline-flex; width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; color: var(--sw-muted-foreground); }
|
|
1697
|
+
.sw-toast__icon svg { width: 16px; height: 16px; }
|
|
1698
|
+
.sw-toast[data-variant='success'] .sw-toast__icon { color: var(--sw-success); }
|
|
1699
|
+
.sw-toast[data-variant='danger'] .sw-toast__icon { color: var(--sw-danger); }
|
|
1700
|
+
.sw-toast__spinner { width: 14px; height: 14px; margin: 1px; border-radius: 50%; border: 1.75px solid currentColor; border-right-color: transparent; animation: sw-spin 0.7s linear infinite; }
|
|
1701
|
+
.sw-toast__text { flex: 1 1 auto; min-width: 0; }
|
|
1702
|
+
.sw-toast__title { font-size: 0.875rem; font-weight: 500; letter-spacing: -0.012em; line-height: 1.4; overflow-wrap: anywhere; }
|
|
1703
|
+
.sw-toast__description { margin-top: 2px; font-size: 0.8125rem; line-height: 1.4; color: var(--sw-muted-foreground); overflow-wrap: anywhere; }
|
|
1704
|
+
.sw-toast__actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; align-self: center; }
|
|
1705
|
+
/* Close sits on the top-left corner, over the frame, so the text never reserves space for a hover-only button. */
|
|
1706
|
+
.sw-toast__close {
|
|
1707
|
+
position: absolute; top: -7px; left: -7px; z-index: 5; display: grid; place-items: center; width: 20px; height: 20px; padding: 0;
|
|
1708
|
+
appearance: none; border: 0; border-radius: 50%; background: var(--sw-background); box-shadow: 0 0 0 1px var(--sw-frame);
|
|
1709
|
+
color: var(--sw-muted-foreground); cursor: pointer;
|
|
1710
|
+
opacity: 0; transition: opacity var(--sw-duration-fast) var(--sw-ease-standard), background-color var(--sw-duration-fast) var(--sw-ease-standard), color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
1711
|
+
}
|
|
1712
|
+
.sw-toast__close svg { width: 12px; height: 12px; }
|
|
1713
|
+
.sw-toast__close:hover { background: color-mix(in oklab, var(--sw-foreground) 6%, var(--sw-background)); color: var(--sw-foreground); }
|
|
1714
|
+
.sw-toast__close:focus-visible { opacity: 1; outline: none; box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
1715
|
+
.sw-toast:hover .sw-toast__close, .sw-toast:focus-within .sw-toast__close { opacity: 1; }
|
|
1716
|
+
@media (hover: none) { .sw-toast__close { opacity: 1; } }
|
|
1717
|
+
@media (max-width: 639px) {
|
|
1718
|
+
.sw-toaster, .sw-toaster[data-align] { left: 8px; right: 8px; width: auto; margin-inline: 0; }
|
|
1719
|
+
.sw-toast__inner { flex-wrap: wrap; }
|
|
1720
|
+
.sw-toast__actions { width: 100%; justify-content: flex-end; }
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
/* kit-lists.css */
|
|
1724
|
+
/* ── Lists: Menu, Menubar, Select, Listbox, Combobox, Autocomplete, Command, Trigger Menu, Token Input ── */
|
|
1725
|
+
|
|
1726
|
+
/* Shared bits */
|
|
1727
|
+
.sw-shortcut { display: inline-flex; gap: 2px; align-items: center; padding-left: 12px; }
|
|
1728
|
+
.sw-shortcut__key { font: inherit; font-family: var(--sw-font-mono); font-size: 11px; min-width: 1.4em; text-align: center; color: var(--sw-muted-foreground); }
|
|
1729
|
+
.sw-list-option { align-items: flex-start; }
|
|
1730
|
+
.sw-list-option > .sw-item__icon { margin-top: 1px; }
|
|
1731
|
+
.sw-list-option > .sw-item__check { align-self: center; }
|
|
1732
|
+
.sw-list-option__text { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 1px; }
|
|
1733
|
+
.sw-list-option__desc { font-size: 12px; color: var(--sw-muted-foreground); line-height: 1.35; white-space: normal; }
|
|
1734
|
+
.sw-list-option[aria-selected='true'] .sw-item__label { font-weight: 500; }
|
|
1735
|
+
.sw-item:has(> .sw-row-fill) { background: transparent; isolation: isolate; }
|
|
1736
|
+
.sw-row-fill {
|
|
1737
|
+
position: absolute; inset: 0; z-index: -1; pointer-events: none;
|
|
1738
|
+
background: var(--sw-row-bg, transparent); border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape);
|
|
1739
|
+
transition: background-color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
1740
|
+
}
|
|
1741
|
+
.sw-item[data-active] > .sw-row-fill { --sw-row-bg: var(--sw-item-hover); }
|
|
1742
|
+
.sw-item[data-active]:active > .sw-row-fill,
|
|
1743
|
+
.sw-item[data-pressed] > .sw-row-fill { --sw-row-bg: var(--sw-item-active); }
|
|
1744
|
+
.sw-item[data-selected] > .sw-row-fill { --sw-row-bg: var(--sw-item-selected); }
|
|
1745
|
+
/* Search match: weight-free so nothing shifts while typing. The match keeps the foreground; the rest of the label goes muted. */
|
|
1746
|
+
.sw-list-hl { color: var(--sw-muted-foreground); }
|
|
1747
|
+
.sw-list-mark { background: none; color: var(--sw-foreground); font: inherit; }
|
|
1748
|
+
.sw-list-spinner {
|
|
1749
|
+
display: inline-block; width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%;
|
|
1750
|
+
border: 1.5px solid color-mix(in oklab, var(--sw-foreground) 18%, transparent); border-top-color: var(--sw-foreground);
|
|
1751
|
+
animation: sw-list-spin 0.7s linear infinite;
|
|
1752
|
+
}
|
|
1753
|
+
@keyframes sw-list-spin { to { transform: rotate(360deg); } }
|
|
1754
|
+
.sw-list-loading { display: flex; align-items: center; justify-content: center; gap: 8px; }
|
|
1755
|
+
@media (prefers-reduced-motion: reduce) { .sw-list-spinner { animation-duration: 2s; } }
|
|
1756
|
+
|
|
1757
|
+
/* ── Menu ── */
|
|
1758
|
+
.sw-menu { min-width: 12rem; outline: none; }
|
|
1759
|
+
.sw-menu-item:is(:focus, [data-state='open']) > .sw-row-fill { --sw-row-bg: var(--sw-item-hover); }
|
|
1760
|
+
.sw-menu-item:focus:active > .sw-row-fill { --sw-row-bg: var(--sw-item-active); }
|
|
1761
|
+
.sw-menu-item[data-tone='danger']:focus > .sw-row-fill { --sw-row-bg: color-mix(in oklab, var(--sw-danger) 10%, transparent); }
|
|
1762
|
+
.sw-menu-item[data-tone='danger']:focus:active > .sw-row-fill { --sw-row-bg: color-mix(in oklab, var(--sw-danger) 16%, transparent); }
|
|
1763
|
+
/* Checkbox / radio items: trailing accent check (.sw-item__check); the slot is always there so labels never shift. */
|
|
1764
|
+
.sw-item__check svg { width: 16px; height: 16px; }
|
|
1765
|
+
.sw-menu-item__chevron { display: inline-flex; margin-left: auto; color: var(--sw-muted-foreground); }
|
|
1766
|
+
.sw-menu-item__chevron svg { width: 14px; height: 14px; }
|
|
1767
|
+
.sw-menu-item > .sw-item__label { display: flex; flex-direction: column; }
|
|
1768
|
+
.sw-menu-context { outline: none; }
|
|
1769
|
+
|
|
1770
|
+
.sw-menu-trigger {
|
|
1771
|
+
--sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame);
|
|
1772
|
+
display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 14px; border: 0; background: none;
|
|
1773
|
+
font: inherit; font-size: 14px; font-weight: 450; letter-spacing: -0.01em; color: var(--sw-foreground); cursor: pointer;
|
|
1774
|
+
}
|
|
1775
|
+
.sw-menu-trigger[data-size='sm'] { height: 30px; padding: 0 8px 0 11px; font-size: 13px; }
|
|
1776
|
+
.sw-menu-trigger[data-size='lg'] { height: 46px; padding: 0 14px 0 18px; font-size: 15px; }
|
|
1777
|
+
.sw-menu-trigger:hover, .sw-menu-trigger[data-state='open'] { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
1778
|
+
.sw-menu-trigger:disabled { opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
1779
|
+
.sw-menu-trigger__chevron { display: inline-flex; color: var(--sw-muted-foreground); transition: transform var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
1780
|
+
.sw-menu-trigger__chevron svg { width: 14px; height: 14px; }
|
|
1781
|
+
.sw-menu-trigger[data-state='open'] .sw-menu-trigger__chevron { transform: rotate(180deg); }
|
|
1782
|
+
|
|
1783
|
+
/* ── Menubar ── */
|
|
1784
|
+
/* Reference for concentric inner corners: 10px bar − 3px inset = 7px triggers. */
|
|
1785
|
+
.sw-menubar { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); --sw-sq-r: 10px; --sw-inset: 3px; display: inline-flex; align-items: center; gap: 2px; padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
|
|
1786
|
+
.sw-menubar__trigger {
|
|
1787
|
+
display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border: 0; background: transparent;
|
|
1788
|
+
border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape);
|
|
1789
|
+
font: inherit; font-size: 13px; font-weight: 450; letter-spacing: -0.01em; color: var(--sw-foreground); cursor: default; outline: none; white-space: nowrap;
|
|
1790
|
+
}
|
|
1791
|
+
.sw-menubar__trigger:hover, .sw-menubar__trigger:focus-visible, .sw-menubar__trigger[data-state='open'] { background: var(--sw-item-hover); }
|
|
1792
|
+
.sw-menubar__trigger:active { background: var(--sw-item-active); }
|
|
1793
|
+
.sw-menubar__trigger:focus-visible { box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
1794
|
+
.sw-menubar__trigger:disabled { opacity: var(--sw-disabled-opacity); }
|
|
1795
|
+
|
|
1796
|
+
/* ── Select (trigger looks like Input) ── */
|
|
1797
|
+
.sw-select, .sw-combobox { display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; }
|
|
1798
|
+
.sw-select__label { font-size: 13px; font-weight: 500; letter-spacing: -0.01em; color: var(--sw-foreground); }
|
|
1799
|
+
.sw-select__trigger {
|
|
1800
|
+
--sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame);
|
|
1801
|
+
display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 10px 0 12px; border: 0; background: none;
|
|
1802
|
+
font: inherit; font-size: 15px; letter-spacing: -0.01em; color: var(--sw-foreground); text-align: left; cursor: pointer;
|
|
1803
|
+
}
|
|
1804
|
+
.sw-select[data-size='sm'] .sw-select__trigger { height: 32px; padding: 0 8px 0 10px; font-size: 14px; }
|
|
1805
|
+
.sw-select[data-size='lg'] .sw-select__trigger { height: 52px; padding: 0 14px 0 16px; font-size: 17px; }
|
|
1806
|
+
.sw-select__trigger:hover { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
1807
|
+
.sw-select__trigger:disabled { opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
1808
|
+
.sw-select[data-invalid] .sw-select__trigger { --sw-sq-border: var(--sw-danger); --sw-sq-ring: var(--sw-danger); }
|
|
1809
|
+
.sw-select__value { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
|
|
1810
|
+
.sw-select__value-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1811
|
+
.sw-select__value[data-placeholder] { color: color-mix(in oklab, var(--sw-muted-foreground) 80%, transparent); }
|
|
1812
|
+
.sw-select__value-icon, .sw-select__icon { display: inline-flex; color: var(--sw-muted-foreground); flex-shrink: 0; }
|
|
1813
|
+
.sw-select__value-icon svg, .sw-select__icon svg { width: 16px; height: 16px; }
|
|
1814
|
+
.sw-select__chevron { display: inline-flex; margin-left: auto; color: var(--sw-muted-foreground); flex-shrink: 0; transition: transform var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
1815
|
+
.sw-select__chevron svg { width: 16px; height: 16px; }
|
|
1816
|
+
.sw-select__trigger[data-state='open'] .sw-select__chevron { transform: rotate(180deg); }
|
|
1817
|
+
.sw-select__content { max-height: min(var(--sw-popup-available-height, 70vh), 340px); }
|
|
1818
|
+
.sw-select__content--searchable > .sw-popup__body { padding: 0; overflow: hidden; }
|
|
1819
|
+
.sw-select__search {
|
|
1820
|
+
display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 0 12px;
|
|
1821
|
+
border-bottom: 1px solid var(--sw-hairline); color: var(--sw-muted-foreground);
|
|
1822
|
+
}
|
|
1823
|
+
.sw-select__search > svg { flex: none; }
|
|
1824
|
+
.sw-select__search-input {
|
|
1825
|
+
flex: 1; min-width: 0; height: 40px; padding: 0; border: 0; outline: none; background: transparent;
|
|
1826
|
+
font: inherit; font-size: 16px; color: var(--sw-foreground);
|
|
1827
|
+
}
|
|
1828
|
+
.sw-select__search:focus-within { border-color: var(--sw-field-focus, var(--sw-frame)); }
|
|
1829
|
+
.sw-select__search-input::placeholder { color: var(--sw-muted-foreground); }
|
|
1830
|
+
.sw-select__results { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--sw-inset); }
|
|
1831
|
+
|
|
1832
|
+
/* ── Listbox ── */
|
|
1833
|
+
.sw-listbox { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); --sw-inset: 4px; display: flex; flex-direction: column; min-width: 0; max-height: var(--sw-listbox-max-height, 320px); outline: none; }
|
|
1834
|
+
/* The scroller is clipped to the surface so scrolled rows never poke past the rounded corners. */
|
|
1835
|
+
.sw-listbox__body {
|
|
1836
|
+
display: flex; flex-direction: column; padding: var(--sw-inset); overflow: auto; overscroll-behavior: contain; min-height: 0;
|
|
1837
|
+
border-radius: calc(var(--sw-sq-r, 14px) - 1px); corner-shape: var(--sw-corner-shape);
|
|
1838
|
+
}
|
|
1839
|
+
.sw-listbox:focus-visible { --sw-sq-border: var(--sw-accent); }
|
|
1840
|
+
/* One highlighted row: data-active follows the pointer (pointermove) and the keyboard. Hidden when neither is in play. */
|
|
1841
|
+
.sw-listbox:not(:focus-visible):not(:hover) .sw-item[data-active]:not([data-selected]) > .sw-row-fill { --sw-row-bg: transparent; }
|
|
1842
|
+
.sw-listbox .sw-item { cursor: pointer; }
|
|
1843
|
+
.sw-listbox[data-orientation='horizontal'] .sw-listbox__body { flex-direction: row; flex-wrap: wrap; gap: 2px; }
|
|
1844
|
+
.sw-listbox[data-disabled] { opacity: var(--sw-disabled-opacity); pointer-events: none; }
|
|
1845
|
+
.sw-listbox[data-invalid] { --sw-sq-border: var(--sw-danger); --sw-sq-ring: var(--sw-danger); }
|
|
1846
|
+
@media (forced-colors: active) {
|
|
1847
|
+
.sw-listbox:not([aria-multiselectable='true']) .sw-item[data-selected] { outline: 1px solid Highlight; outline-offset: -1px; }
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
/* ── Combobox / Autocomplete field ── */
|
|
1851
|
+
.sw-combobox__field {
|
|
1852
|
+
--sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame);
|
|
1853
|
+
/* The trailing buttons share the same inset from the field's top and end, even when chips wrap. */
|
|
1854
|
+
--sw-inset: 6px;
|
|
1855
|
+
--sw-combobox-block-padding: 4px;
|
|
1856
|
+
--sw-combobox-field-height: 40px;
|
|
1857
|
+
display: flex; align-items: center; gap: 6px; min-height: var(--sw-combobox-field-height);
|
|
1858
|
+
padding-block: var(--sw-combobox-block-padding); padding-inline: 12px var(--sw-inset); cursor: text;
|
|
1859
|
+
}
|
|
1860
|
+
.sw-combobox[data-size='sm'] .sw-combobox__field { --sw-inset: 4px; --sw-combobox-block-padding: 2px; --sw-combobox-field-height: 32px; padding-inline-start: 10px; }
|
|
1861
|
+
.sw-combobox[data-size='lg'] .sw-combobox__field { --sw-inset: 10px; --sw-combobox-block-padding: 6px; --sw-combobox-field-height: 52px; padding-inline-start: 16px; }
|
|
1862
|
+
.sw-combobox__field:hover { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
1863
|
+
.sw-combobox__field:focus-within { --sw-sq-border: var(--sw-accent); }
|
|
1864
|
+
.sw-combobox__field:has(:focus-visible) > .sw-sq-ring { opacity: 1; }
|
|
1865
|
+
.sw-combobox[data-invalid] .sw-combobox__field { --sw-sq-border: var(--sw-danger); --sw-sq-ring: var(--sw-danger); }
|
|
1866
|
+
.sw-combobox[data-disabled] .sw-combobox__field { opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
1867
|
+
.sw-combobox__values { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; flex: 1; min-width: 0; }
|
|
1868
|
+
.sw-combobox__input {
|
|
1869
|
+
flex: 1; min-width: min(4rem, 100%); height: 30px; border: 0; outline: none; background: transparent; padding: 0;
|
|
1870
|
+
font: inherit; font-size: 15px; letter-spacing: -0.01em; color: var(--sw-foreground);
|
|
1871
|
+
}
|
|
1872
|
+
.sw-combobox[data-size='sm'] .sw-combobox__input { height: 26px; font-size: 14px; }
|
|
1873
|
+
.sw-combobox[data-size='lg'] .sw-combobox__input { height: 38px; font-size: 17px; }
|
|
1874
|
+
.sw-combobox__input::placeholder { color: color-mix(in oklab, var(--sw-muted-foreground) 80%, transparent); }
|
|
1875
|
+
.sw-combobox__button {
|
|
1876
|
+
display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; flex: none;
|
|
1877
|
+
inline-size: calc(var(--sw-combobox-field-height) - 2 * var(--sw-inset)); aspect-ratio: 1;
|
|
1878
|
+
margin-block-start: calc(var(--sw-inset) - var(--sw-combobox-block-padding));
|
|
1879
|
+
padding: 0; color: var(--sw-muted-foreground); cursor: pointer;
|
|
1880
|
+
}
|
|
1881
|
+
.sw-combobox__button:hover:not(:disabled) { color: var(--sw-foreground); }
|
|
1882
|
+
.sw-combobox__button > svg:not(.sw-sq-ring) { width: 15px; height: 15px; }
|
|
1883
|
+
.sw-combobox[data-state='open'] [data-sw='combobox-trigger'] > svg:not(.sw-sq-ring) { transform: rotate(180deg); }
|
|
1884
|
+
|
|
1885
|
+
.sw-chip {
|
|
1886
|
+
display: inline-flex; align-items: center; gap: 2px; height: 24px; max-width: 100%; padding: 0 2px 0 8px;
|
|
1887
|
+
/* Half the inset instead of all of it: a plain arc inside a squircle field reads sharper than the field's curve. */
|
|
1888
|
+
border-radius: max(4px, calc(var(--sw-sq-r, 10px) - var(--sw-inset, 6px) / 2)); corner-shape: var(--sw-corner-shape);
|
|
1889
|
+
background: var(--sw-muted); font-size: 13px; letter-spacing: -0.01em; color: var(--sw-foreground);
|
|
1890
|
+
}
|
|
1891
|
+
.sw-chip__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1892
|
+
.sw-chip__remove {
|
|
1893
|
+
display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 4px;
|
|
1894
|
+
background: transparent; color: var(--sw-muted-foreground); cursor: pointer;
|
|
1895
|
+
}
|
|
1896
|
+
.sw-chip__remove:hover { background: color-mix(in oklab, var(--sw-foreground) 10%, transparent); color: var(--sw-foreground); }
|
|
1897
|
+
.sw-chip__remove svg { width: 12px; height: 12px; }
|
|
1898
|
+
|
|
1899
|
+
/* ── Command ── */
|
|
1900
|
+
/* --sw-inset is the list padding: rows get radius = frame radius − inset (concentric), and the search row lines up with row icons. */
|
|
1901
|
+
.sw-command {
|
|
1902
|
+
--sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); --sw-inset: 6px; --sw-command-pad-x: 10px;
|
|
1903
|
+
display: flex; flex-direction: column; width: 100%; min-width: 0; color: var(--sw-foreground);
|
|
1904
|
+
}
|
|
1905
|
+
/* Header rule is full-width (it meets the frame on its straight sides; the frame stroke paints on top). */
|
|
1906
|
+
.sw-command__search {
|
|
1907
|
+
display: flex; align-items: center; gap: 10px; flex-shrink: 0;
|
|
1908
|
+
padding: 0 calc(var(--sw-inset) + var(--sw-command-pad-x)); border-bottom: 1px solid var(--sw-hairline);
|
|
1909
|
+
}
|
|
1910
|
+
.sw-command__search-icon { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; color: var(--sw-muted-foreground); }
|
|
1911
|
+
.sw-command__search-icon svg { width: 16px; height: 16px; }
|
|
1912
|
+
/* Sub-page: a ghost back button takes the search icon's place; its arrow sits on the row-icon column. */
|
|
1913
|
+
.sw-command__back {
|
|
1914
|
+
display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: 0 -6px; padding: 0; border: 0; flex-shrink: 0;
|
|
1915
|
+
border-radius: clamp(4px, var(--sw-inner-r), 8px); corner-shape: var(--sw-corner-shape);
|
|
1916
|
+
background: transparent; color: var(--sw-muted-foreground); cursor: pointer;
|
|
1917
|
+
transition: background-color var(--sw-duration-fast) var(--sw-ease-standard), color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
1918
|
+
}
|
|
1919
|
+
.sw-command__back:hover { background: var(--sw-item-hover); color: var(--sw-foreground); }
|
|
1920
|
+
.sw-command__back:active { background: var(--sw-item-active); }
|
|
1921
|
+
.sw-command__back:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
1922
|
+
.sw-command__back svg { width: 16px; height: 16px; }
|
|
1923
|
+
.sw-command__input {
|
|
1924
|
+
flex: 1; min-width: 0; height: 50px; border: 0; outline: none; background: transparent; padding: 0;
|
|
1925
|
+
font: inherit; font-size: 16px; letter-spacing: -0.015em; color: var(--sw-foreground);
|
|
1926
|
+
}
|
|
1927
|
+
.sw-command__input::placeholder { color: color-mix(in oklab, var(--sw-muted-foreground) 80%, transparent); }
|
|
1928
|
+
.sw-command__list {
|
|
1929
|
+
display: flex; flex-direction: column; max-height: min(360px, 60vh); overflow: auto; overscroll-behavior: contain;
|
|
1930
|
+
padding: var(--sw-inset); scroll-padding: var(--sw-inset);
|
|
1931
|
+
/* Clip scrolled rows to the frame's bottom corners. */
|
|
1932
|
+
border-radius: 0 0 calc(var(--sw-sq-r, 14px) - 1px) calc(var(--sw-sq-r, 14px) - 1px); corner-shape: var(--sw-corner-shape);
|
|
1933
|
+
}
|
|
1934
|
+
.sw-command:not(:has(> .sw-command__search)) > .sw-command__list { border-radius: calc(var(--sw-sq-r, 14px) - 1px); }
|
|
1935
|
+
.sw-command__group:not(:has([data-sw='command-item'])) { display: none; }
|
|
1936
|
+
.sw-command__group + .sw-command__group { margin-top: 4px; }
|
|
1937
|
+
.sw-command-item { cursor: pointer; }
|
|
1938
|
+
.sw-command-item__desc { margin-left: 8px; font-size: 12px; color: var(--sw-muted-foreground); }
|
|
1939
|
+
.sw-command-item__chevron { display: inline-flex; margin-left: auto; color: var(--sw-muted-foreground); }
|
|
1940
|
+
.sw-command-item__chevron svg { width: 14px; height: 14px; }
|
|
1941
|
+
.sw-command-item[data-active] .sw-item__icon { color: var(--sw-foreground); }
|
|
1942
|
+
|
|
1943
|
+
.sw-command-dialog { position: fixed; inset: 0; z-index: var(--sw-z-modal); }
|
|
1944
|
+
.sw-command-dialog__positioner { position: fixed; inset: 0; z-index: calc(var(--sw-z-modal) + 1); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; pointer-events: none; }
|
|
1945
|
+
.sw-command-dialog__panel {
|
|
1946
|
+
--sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame);
|
|
1947
|
+
width: min(100%, 600px); pointer-events: auto; outline: none;
|
|
1948
|
+
filter: drop-shadow(0 24px 48px rgb(0 0 0 / 0.22)) drop-shadow(0 2px 4px rgb(0 0 0 / 0.06));
|
|
1949
|
+
}
|
|
1950
|
+
/* ⌘K dialog is the roomy density: 8px list inset, 40px rows (radius stays concentric via --sw-inset). */
|
|
1951
|
+
.sw-command-dialog__panel .sw-command { --sw-inset: 8px; }
|
|
1952
|
+
.sw-command-dialog__panel .sw-command__list { max-height: min(400px, 56vh); }
|
|
1953
|
+
.sw-command-dialog__panel .sw-command-item { min-height: 40px; }
|
|
1954
|
+
|
|
1955
|
+
/* ── Trigger Menu ── */
|
|
1956
|
+
.sw-trigger-menu { display: flex; flex-direction: column; min-width: 0; }
|
|
1957
|
+
.sw-trigger-menu__input { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
|
|
1958
|
+
.sw-trigger-menu__field { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); display: flex; }
|
|
1959
|
+
.sw-trigger-menu__field:hover { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
1960
|
+
.sw-trigger-menu__field:focus-within { --sw-sq-border: var(--sw-accent); }
|
|
1961
|
+
.sw-trigger-menu__field:has(:focus-visible) > .sw-sq-ring { opacity: 1; }
|
|
1962
|
+
.sw-trigger-menu__input[data-invalid] .sw-trigger-menu__field { --sw-sq-border: var(--sw-danger); --sw-sq-ring: var(--sw-danger); }
|
|
1963
|
+
.sw-trigger-menu__control {
|
|
1964
|
+
flex: 1; min-width: 0; border: 0; outline: none; background: transparent; resize: none; padding: 10px 12px;
|
|
1965
|
+
font: inherit; font-size: 15px; line-height: 1.5; letter-spacing: -0.01em; color: var(--sw-foreground);
|
|
1966
|
+
}
|
|
1967
|
+
input.sw-trigger-menu__control { height: 40px; padding: 0 12px; }
|
|
1968
|
+
.sw-trigger-menu__control::placeholder { color: color-mix(in oklab, var(--sw-muted-foreground) 80%, transparent); }
|
|
1969
|
+
.sw-trigger-menu__content { min-width: 14rem; max-height: min(var(--sw-popup-available-height, 60vh), 280px); }
|
|
1970
|
+
|
|
1971
|
+
/* ── Token Input ── */
|
|
1972
|
+
.sw-token-input {
|
|
1973
|
+
--sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); --sw-inset: 6px;
|
|
1974
|
+
position: relative; display: flex; flex-direction: column; min-width: 0; cursor: text;
|
|
1975
|
+
}
|
|
1976
|
+
.sw-token-input:hover { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
1977
|
+
.sw-token-input:focus-within { --sw-sq-border: var(--sw-accent); }
|
|
1978
|
+
.sw-token-input:has(.sw-token-input__editor:focus-visible) > .sw-sq-ring { opacity: 1; }
|
|
1979
|
+
.sw-token-input[data-invalid] { --sw-sq-border: var(--sw-danger); --sw-sq-ring: var(--sw-danger); }
|
|
1980
|
+
.sw-token-input[data-disabled] { opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
1981
|
+
.sw-token-input__editor {
|
|
1982
|
+
/* 28px lines: a 24px token sits 2px inside each line, so wrapped lines never touch.
|
|
1983
|
+
8px + 28px + 8px = the 44px single-line height; tokens end up 10px from the frame on every side. */
|
|
1984
|
+
min-height: 44px; max-height: 240px; overflow-y: auto; padding: 8px 12px; outline: none;
|
|
1985
|
+
font-size: 15px; line-height: 28px; letter-spacing: -0.01em; color: var(--sw-foreground);
|
|
1986
|
+
white-space: pre-wrap; overflow-wrap: anywhere;
|
|
1987
|
+
}
|
|
1988
|
+
.sw-token-input__editor[data-empty]::before { content: attr(aria-placeholder); color: color-mix(in oklab, var(--sw-muted-foreground) 80%, transparent); pointer-events: none; position: absolute; }
|
|
1989
|
+
.sw-token-input__host { display: inline; user-select: all; }
|
|
1990
|
+
/* One neutral look for every token type; the leading icon tells them apart. Centred in its 28px line (2px above and below). */
|
|
1991
|
+
.sw-token {
|
|
1992
|
+
display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 4px 0 8px; margin: 2px 2px 0; vertical-align: top;
|
|
1993
|
+
border-radius: max(6px, var(--sw-inner-r)); corner-shape: var(--sw-corner-shape);
|
|
1994
|
+
background: color-mix(in oklab, var(--sw-foreground) 8%, transparent); color: var(--sw-foreground);
|
|
1995
|
+
font-size: 14px; font-weight: 500; line-height: 1; letter-spacing: -0.01em; white-space: nowrap; user-select: none; cursor: default;
|
|
1996
|
+
transition: background-color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
1997
|
+
}
|
|
1998
|
+
.sw-token:hover { background: color-mix(in oklab, var(--sw-foreground) 12%, transparent); }
|
|
1999
|
+
.sw-token[data-status='pending'] { opacity: 0.6; }
|
|
2000
|
+
.sw-token[data-status='unresolved'] { background: color-mix(in oklab, var(--sw-danger) 12%, transparent); color: var(--sw-danger); }
|
|
2001
|
+
.sw-token__icon { display: inline-flex; color: var(--sw-muted-foreground); }
|
|
2002
|
+
.sw-token__icon svg { width: 14px; height: 14px; }
|
|
2003
|
+
.sw-token__hash { font-family: var(--sw-font-mono); font-size: 12px; color: var(--sw-muted-foreground); }
|
|
2004
|
+
/* Remove: concentric with the token (token radius − its 4px end padding), quiet until hovered. */
|
|
2005
|
+
.sw-token__remove {
|
|
2006
|
+
display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
|
|
2007
|
+
border-radius: max(4px, calc(var(--sw-inner-r) - 3px)); corner-shape: var(--sw-corner-shape);
|
|
2008
|
+
color: var(--sw-muted-foreground); cursor: pointer;
|
|
2009
|
+
transition: background-color var(--sw-duration-fast) var(--sw-ease-standard), color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
2010
|
+
}
|
|
2011
|
+
.sw-token__remove:hover { background: color-mix(in oklab, var(--sw-foreground) 12%, transparent); color: var(--sw-foreground); }
|
|
2012
|
+
.sw-token__remove svg { width: 12px; height: 12px; }
|
|
2013
|
+
.sw-token-input__host::selection, .sw-token::selection { background: transparent; }
|
|
2014
|
+
|
|
2015
|
+
/* ── Listbox as a data list: unframed inside a Card, density rows, inline description,
|
|
2016
|
+
meta that gives its place to hover actions, drag grip that swaps with the icon ── */
|
|
2017
|
+
.sw-listbox__body { position: relative; }
|
|
2018
|
+
.sw-listbox .sw-list-option { min-height: var(--sw-row-h); padding-block: 4px; }
|
|
2019
|
+
[data-density='compact'] .sw-listbox .sw-item { font-size: 13px; }
|
|
2020
|
+
/* Unframed lists grow with their content unless the app sets --sw-listbox-max-height. */
|
|
2021
|
+
.sw-listbox:not([data-framed]) { --sw-sq-bg: transparent; --sw-inset: 6px; max-height: var(--sw-listbox-max-height, none); }
|
|
2022
|
+
.sw-listbox:not([data-framed]) > .sw-listbox__body { border-radius: 0; padding: var(--sw-inset); }
|
|
2023
|
+
.sw-listbox:not([data-framed]) .sw-list-option { padding-inline: 6px; }
|
|
2024
|
+
/* Keyboard focus on an unframed list: a ring on the active row's fill, same radius as the fill. */
|
|
2025
|
+
.sw-listbox:not([data-framed]):focus-visible .sw-item[data-active] > .sw-row-fill { box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
2026
|
+
.sw-listbox[data-description='inline'] .sw-list-option { align-items: center; }
|
|
2027
|
+
.sw-listbox[data-description='inline'] .sw-list-option__text { flex-direction: row; align-items: baseline; gap: 8px; }
|
|
2028
|
+
.sw-listbox[data-description='inline'] .sw-item__label { flex: 0 1 auto; }
|
|
2029
|
+
.sw-listbox[data-description='inline'] .sw-list-option__desc { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2030
|
+
.sw-list-option__trail { display: grid; align-items: center; justify-items: end; flex: none; align-self: center; margin-left: auto; }
|
|
2031
|
+
/* Row actions: 20px Buttons inset 4px from the row on every side (row 28 = 4 + 20 + 4), 2px apart,
|
|
2032
|
+
radius = row radius − inset (8 − 4 = 4), so the curves nest. The trail overhangs the row padding by 2px
|
|
2033
|
+
to make the right inset 4 like the top and bottom. */
|
|
2034
|
+
.sw-list-option__trail { margin-inline-end: -2px; }
|
|
2035
|
+
.sw-list-option__actions { gap: 2px; }
|
|
2036
|
+
.sw-list-option__trail > * { grid-area: 1 / 1; }
|
|
2037
|
+
.sw-list-option__meta { font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; color: var(--sw-muted-foreground); white-space: nowrap; }
|
|
2038
|
+
.sw-list-option__actions { display: flex; align-items: center; opacity: 0; pointer-events: none; transition: opacity var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
2039
|
+
/* One "actions shown" state — hover, keyboard focus, a focused action, an open menu — drives both the
|
|
2040
|
+
actions and the meta, so they never show at the same time. */
|
|
2041
|
+
.sw-list-option:hover .sw-list-option__actions,
|
|
2042
|
+
.sw-listbox:focus-visible .sw-list-option[data-active] .sw-list-option__actions,
|
|
2043
|
+
.sw-list-option__actions:is(:focus-within, :has([aria-expanded='true'])) { opacity: 1; pointer-events: auto; }
|
|
2044
|
+
.sw-list-option[data-has-actions]:hover .sw-list-option__meta,
|
|
2045
|
+
.sw-listbox:focus-visible .sw-list-option[data-has-actions][data-active] .sw-list-option__meta,
|
|
2046
|
+
.sw-list-option__trail:has(> .sw-list-option__actions:focus-within) > .sw-list-option__meta,
|
|
2047
|
+
.sw-list-option__trail:has([aria-expanded='true']) > .sw-list-option__meta { visibility: hidden; }
|
|
2048
|
+
/* While its menu is open, the row keeps its hover fill so the open control has context. */
|
|
2049
|
+
.sw-list-option:has(.sw-list-option__actions [aria-expanded='true']) > .sw-row-fill { --sw-row-bg: var(--sw-item-hover); }
|
|
2050
|
+
.sw-list-option__lead { display: grid; place-items: center; flex: none; width: 16px; align-self: center; }
|
|
2051
|
+
.sw-list-option__lead > * { grid-area: 1 / 1; transition: opacity 100ms var(--sw-ease-standard); }
|
|
2052
|
+
.sw-list-option__handle {
|
|
2053
|
+
display: inline-flex; align-items: center; justify-content: center; flex: none; width: 16px; height: 20px; padding: 0;
|
|
2054
|
+
border: 0; border-radius: 4px; background: none; color: var(--sw-muted-foreground); cursor: grab; touch-action: none; outline: none;
|
|
2055
|
+
}
|
|
2056
|
+
.sw-list-option__handle svg { width: 14px; height: 14px; }
|
|
2057
|
+
.sw-list-option__handle:hover { color: var(--sw-foreground); }
|
|
2058
|
+
.sw-listbox[data-handle='hover'] .sw-list-option__handle { opacity: 0; }
|
|
2059
|
+
.sw-listbox[data-handle='hover'] .sw-list-option:hover .sw-list-option__handle,
|
|
2060
|
+
.sw-listbox[data-handle='hover']:focus-visible .sw-list-option[data-active] .sw-list-option__handle { opacity: 1; }
|
|
2061
|
+
.sw-listbox[data-handle='hover'] .sw-list-option:hover .sw-list-option__lead > .sw-item__icon,
|
|
2062
|
+
.sw-listbox[data-handle='hover']:focus-visible .sw-list-option[data-active] .sw-list-option__lead > .sw-item__icon { opacity: 0; }
|
|
2063
|
+
.sw-listbox[data-handle] .sw-list-option:active { cursor: grabbing; }
|
|
2064
|
+
@media (hover: none) {
|
|
2065
|
+
.sw-list-option__actions { opacity: 1; pointer-events: auto; }
|
|
2066
|
+
.sw-list-option[data-has-actions] .sw-list-option__meta { visibility: hidden; }
|
|
2067
|
+
.sw-list-option__lead { grid-auto-flow: column; width: auto; gap: 2px; }
|
|
2068
|
+
.sw-list-option__lead > * { grid-area: auto; opacity: 1 !important; }
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
/* Containers publish the inner radius for their fills, framed or not (base.css). */
|
|
2072
|
+
.sw-menubar { --sw-inner-r: max(4px, calc(var(--sw-sq-r, 10px) - var(--sw-inset, 3px))); }
|
|
2073
|
+
.sw-command { --sw-inner-r: max(4px, calc(var(--sw-sq-r, 14px) - var(--sw-inset, 6px))); }
|
|
2074
|
+
.sw-token-input { --sw-inner-r: max(4px, calc(var(--sw-sq-r, 14px) - var(--sw-inset, 6px))); }
|
|
2075
|
+
|
|
2076
|
+
.sw-listbox[data-framed] { --sw-inner-r: max(4px, calc(var(--sw-sq-r, 14px) - var(--sw-inset, 4px))); }
|
|
2077
|
+
|
|
2078
|
+
/* kit-dates.css */
|
|
2079
|
+
/* ── Dates ── */
|
|
2080
|
+
|
|
2081
|
+
/* ── Date Input / Time Input / Date Picker field ─────────────────────────── */
|
|
2082
|
+
.sw-date-input { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-family: var(--sw-font-sans); color: var(--sw-foreground); }
|
|
2083
|
+
.sw-date-input__label { font-size: 13px; font-weight: 500; letter-spacing: -0.01em; align-self: flex-start; }
|
|
2084
|
+
.sw-date-input__box {
|
|
2085
|
+
--sw-sq-bg: var(--sw-background);
|
|
2086
|
+
--sw-sq-border: var(--sw-frame);
|
|
2087
|
+
/* --sw-inset = frame-to-button gap, so the trailing buttons get concentric corners. */
|
|
2088
|
+
--sw-inset: 6px;
|
|
2089
|
+
--sw-date-button-size: 28px;
|
|
2090
|
+
position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 40px; padding: var(--sw-inset) var(--sw-inset) var(--sw-inset) 10px; cursor: text;
|
|
2091
|
+
min-width: 0; width: 100%;
|
|
2092
|
+
}
|
|
2093
|
+
/* Full width like Input; `inline` shrinks it to its content. */
|
|
2094
|
+
.sw-date-input[data-inline] { align-self: flex-start; max-width: 100%; }
|
|
2095
|
+
.sw-date-input[data-inline] .sw-date-input__box { width: fit-content; max-width: 100%; }
|
|
2096
|
+
.sw-date-input[data-size='sm'] .sw-date-input__box { --sw-inset: 4px; --sw-date-button-size: 24px; min-height: 32px; padding-inline-start: 8px; }
|
|
2097
|
+
.sw-date-input[data-size='lg'] .sw-date-input__box { --sw-inset: 8px; --sw-date-button-size: 36px; min-height: 52px; padding-inline-start: 14px; }
|
|
2098
|
+
.sw-date-input__box:hover { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
2099
|
+
.sw-date-input__box:focus-within { --sw-sq-border: var(--sw-accent); }
|
|
2100
|
+
.sw-date-input__box:has(:focus-visible) > .sw-sq-ring { opacity: 1; }
|
|
2101
|
+
.sw-date-input[data-invalid] .sw-date-input__box { --sw-sq-border: var(--sw-danger); --sw-sq-ring: var(--sw-danger); }
|
|
2102
|
+
/* Same disabled look as Input. */
|
|
2103
|
+
.sw-date-input[data-disabled] .sw-date-input__box { opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
2104
|
+
.sw-date-input[data-readonly] .sw-date-input__box { --sw-sq-bg: var(--sw-muted); }
|
|
2105
|
+
.sw-date-input__hint, .sw-date-input__error { margin: 0; font-size: 13px; line-height: 1.4; color: var(--sw-muted-foreground); }
|
|
2106
|
+
.sw-date-input__error { color: var(--sw-danger); }
|
|
2107
|
+
.sw-date-input__suffix { display: inline-flex; align-items: center; margin-left: auto; color: var(--sw-muted-foreground); }
|
|
2108
|
+
|
|
2109
|
+
.sw-date-input__segments { position: relative; z-index: 1; display: inline-flex; align-items: center; flex: none; font-size: 15px; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
|
|
2110
|
+
.sw-date-input[data-size='lg'] .sw-date-input__segments { font-size: 17px; }
|
|
2111
|
+
.sw-date-input[data-size='sm'] .sw-date-input__segments { font-size: 14px; }
|
|
2112
|
+
.sw-date-input__segment-slot { position: relative; display: inline-grid; flex: none; }
|
|
2113
|
+
.sw-date-input__segment-width { grid-area: 1 / 1; visibility: hidden; white-space: pre; padding: 3px 4px; min-width: 0; }
|
|
2114
|
+
.sw-date-input__segment {
|
|
2115
|
+
position: absolute; inset: 0; width: 100%; min-width: 0; padding: 3px 4px; margin: 0; border: 0; border-radius: var(--sw-radius-xs); corner-shape: var(--sw-corner-shape); outline: none;
|
|
2116
|
+
background: transparent; color: inherit; font: inherit; font-variant-numeric: tabular-nums; text-align: center; caret-color: transparent;
|
|
2117
|
+
-webkit-appearance: none; appearance: none;
|
|
2118
|
+
}
|
|
2119
|
+
.sw-date-input__segment::placeholder { color: color-mix(in oklab, var(--sw-muted-foreground) 75%, transparent); opacity: 1; }
|
|
2120
|
+
.sw-date-input__segment::selection { background: transparent; }
|
|
2121
|
+
.sw-date-input__segment:focus { background: var(--sw-selection); color: var(--sw-foreground); }
|
|
2122
|
+
.sw-date-input__segment:focus::placeholder { color: color-mix(in oklab, var(--sw-foreground) 55%, transparent); }
|
|
2123
|
+
.sw-date-input__segment:disabled { cursor: not-allowed; }
|
|
2124
|
+
.sw-date-input__literal { padding: 0 1px; color: var(--sw-muted-foreground); white-space: pre; user-select: none; }
|
|
2125
|
+
.sw-date-input__native { position: absolute; left: 8px; bottom: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
|
|
2126
|
+
|
|
2127
|
+
.sw-date-input__button {
|
|
2128
|
+
position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
|
|
2129
|
+
width: var(--sw-date-button-size); height: var(--sw-date-button-size); padding: 0; color: var(--sw-muted-foreground); cursor: pointer;
|
|
2130
|
+
transition: color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
2131
|
+
}
|
|
2132
|
+
.sw-date-input__button:first-of-type { margin-left: auto; }
|
|
2133
|
+
.sw-date-input__button > svg:not(.sw-sq-ring) { width: 16px; height: 16px; }
|
|
2134
|
+
.sw-date-input__button:hover:not(:disabled) { color: var(--sw-foreground); }
|
|
2135
|
+
.sw-date-input__button:disabled { cursor: not-allowed; opacity: var(--sw-disabled-opacity); }
|
|
2136
|
+
.sw-date-input[data-disabled] .sw-date-input__button:disabled { opacity: 1; }
|
|
2137
|
+
.sw-date-input__button[data-state='open'] { --sw-sq-bg: var(--sw-item-active); color: var(--sw-foreground); }
|
|
2138
|
+
|
|
2139
|
+
/* ── Date Picker ─────────────────────────────────────────────────────────── */
|
|
2140
|
+
.sw-date-picker__range { position: relative; z-index: 1; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; }
|
|
2141
|
+
.sw-date-picker__dash { color: var(--sw-muted-foreground); }
|
|
2142
|
+
.sw-popup.sw-date-picker__content { max-width: var(--sw-popup-available-width, calc(100vw - 16px)); }
|
|
2143
|
+
.sw-date-picker__layout { display: flex; gap: 6px; align-items: flex-start; }
|
|
2144
|
+
/* Presets are .sw-item rows: concentric with the popup (radius − its inset), neutral selected fill + 500. */
|
|
2145
|
+
.sw-date-picker__presets {
|
|
2146
|
+
display: flex; flex-direction: column; gap: 2px; min-width: 128px; padding-right: 6px;
|
|
2147
|
+
border-right: 1px solid var(--sw-hairline); align-self: stretch;
|
|
2148
|
+
}
|
|
2149
|
+
.sw-date-picker__preset {
|
|
2150
|
+
width: 100%; min-height: 32px; padding: 6px 10px; border: 0; background: transparent;
|
|
2151
|
+
font: inherit; font-size: 14px; text-align: start; white-space: nowrap; cursor: pointer;
|
|
2152
|
+
}
|
|
2153
|
+
.sw-date-picker__preset:hover { background: var(--sw-item-hover); }
|
|
2154
|
+
.sw-date-picker__preset:focus-visible { box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
2155
|
+
.sw-date-picker__preset[data-selected], .sw-date-picker__preset[data-selected]:hover { background: var(--sw-item-selected); font-weight: 500; }
|
|
2156
|
+
@media (max-width: 560px) {
|
|
2157
|
+
.sw-date-picker__layout { flex-direction: column-reverse; align-items: stretch; }
|
|
2158
|
+
.sw-date-picker__presets { flex-direction: row; flex-wrap: wrap; border-right: 0; border-top: 1px solid var(--sw-hairline); padding: 6px 0 0; }
|
|
2159
|
+
.sw-date-picker__preset { width: auto; }
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
/* ── Calendar ────────────────────────────────────────────────────────────── */
|
|
2163
|
+
.sw-calendar {
|
|
2164
|
+
--sw-calendar-cell: 38px;
|
|
2165
|
+
--sw-calendar-band: color-mix(in oklab, var(--sw-accent) 13%, transparent);
|
|
2166
|
+
--sw-calendar-preview: color-mix(in oklab, var(--sw-accent) 8%, transparent);
|
|
2167
|
+
/* Day corners are concentric with the host squircle: host radius − host inset − own padding.
|
|
2168
|
+
Framed: the calendar is the host. Unframed: the Card / popup around it is. */
|
|
2169
|
+
--sw-calendar-pad: 4px;
|
|
2170
|
+
--sw-calendar-day-r: max(4px, calc(var(--sw-sq-r, 14px) - var(--sw-inset, 6px) - var(--sw-calendar-pad)));
|
|
2171
|
+
position: relative; display: inline-flex; flex-direction: column; gap: 8px; padding: var(--sw-calendar-pad); max-width: 100%;
|
|
2172
|
+
font-family: var(--sw-font-sans); color: var(--sw-foreground); font-variant-numeric: tabular-nums;
|
|
2173
|
+
}
|
|
2174
|
+
.sw-calendar[data-size='sm'] { --sw-calendar-cell: 32px; }
|
|
2175
|
+
.sw-calendar[data-size='lg'] { --sw-calendar-cell: 44px; }
|
|
2176
|
+
.sw-calendar[data-framed] { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); --sw-inset: 10px; --sw-calendar-pad: 0px; padding: 10px; }
|
|
2177
|
+
.sw-calendar[data-disabled] { opacity: var(--sw-disabled-opacity); }
|
|
2178
|
+
.sw-calendar__header { position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; min-height: 32px; }
|
|
2179
|
+
.sw-calendar__heading {
|
|
2180
|
+
flex: 1; margin: 0; text-align: center; font-size: 14px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2;
|
|
2181
|
+
}
|
|
2182
|
+
.sw-calendar__nav {
|
|
2183
|
+
--sw-sq-bg: transparent;
|
|
2184
|
+
display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; background: none;
|
|
2185
|
+
color: var(--sw-muted-foreground); cursor: pointer; flex-shrink: 0;
|
|
2186
|
+
}
|
|
2187
|
+
.sw-calendar__nav > svg { position: relative; width: 16px; height: 16px; }
|
|
2188
|
+
.sw-calendar__nav:hover:not(:disabled) { --sw-sq-bg: var(--sw-item-hover); color: var(--sw-foreground); }
|
|
2189
|
+
.sw-calendar__nav:focus-visible { outline: none; }
|
|
2190
|
+
.sw-calendar__nav:focus-visible > .sw-sq-ring { opacity: 1; }
|
|
2191
|
+
.sw-calendar__nav:disabled { opacity: var(--sw-disabled-opacity); cursor: default; }
|
|
2192
|
+
.sw-calendar__months { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px 24px; }
|
|
2193
|
+
.sw-calendar__month { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
2194
|
+
.sw-calendar__caption {
|
|
2195
|
+
padding: 2px 0 2px; text-align: center; font-family: var(--sw-font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
|
|
2196
|
+
color: var(--sw-muted-foreground);
|
|
2197
|
+
}
|
|
2198
|
+
.sw-calendar__viewport { position: relative; overflow: hidden; width: calc(var(--sw-calendar-cell) * 7); max-width: 100%; }
|
|
2199
|
+
.sw-calendar__grid { border-collapse: collapse; border-spacing: 0; table-layout: fixed; width: calc(var(--sw-calendar-cell) * 7); max-width: 100%; }
|
|
2200
|
+
.sw-calendar__weekday {
|
|
2201
|
+
height: 28px; padding: 0; font-family: var(--sw-font-mono); font-size: 10px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase;
|
|
2202
|
+
color: var(--sw-muted-foreground); text-align: center;
|
|
2203
|
+
}
|
|
2204
|
+
/* Even 2px gutter: every day sits 1px inside its cell on all sides. */
|
|
2205
|
+
.sw-calendar__cell { position: relative; padding: 1px; text-align: center; }
|
|
2206
|
+
.sw-calendar__cell[data-in-range]::before {
|
|
2207
|
+
content: ''; position: absolute; inset: 1px 0; background: var(--sw-calendar-band); pointer-events: none;
|
|
2208
|
+
}
|
|
2209
|
+
.sw-calendar__cell[data-in-range][data-preview]::before { background: var(--sw-calendar-preview); }
|
|
2210
|
+
.sw-calendar__cell[data-in-range][data-range-start]::before { inset-inline-start: 50%; }
|
|
2211
|
+
.sw-calendar__cell[data-in-range][data-range-end]::before { inset-inline-end: 50%; }
|
|
2212
|
+
.sw-calendar__cell[data-in-range]:first-child::before { inset-inline-start: 1px; border-start-start-radius: var(--sw-calendar-day-r); border-end-start-radius: var(--sw-calendar-day-r); corner-shape: var(--sw-corner-shape); }
|
|
2213
|
+
.sw-calendar__cell[data-in-range]:last-child::before { inset-inline-end: 1px; border-start-end-radius: var(--sw-calendar-day-r); border-end-end-radius: var(--sw-calendar-day-r); corner-shape: var(--sw-corner-shape); }
|
|
2214
|
+
.sw-calendar__day {
|
|
2215
|
+
position: relative; display: inline-flex; align-items: center; justify-content: center; width: 100%; max-width: var(--sw-calendar-cell);
|
|
2216
|
+
aspect-ratio: 1; padding: 0; border: 0; border-radius: var(--sw-calendar-day-r); corner-shape: var(--sw-corner-shape); background: transparent; color: inherit;
|
|
2217
|
+
font: inherit; font-size: 14px; font-weight: 450; letter-spacing: -0.01em; cursor: pointer; outline: none;
|
|
2218
|
+
transition: background-color 120ms, color 120ms;
|
|
2219
|
+
}
|
|
2220
|
+
.sw-calendar[data-size='sm'] .sw-calendar__day { font-size: 13px; }
|
|
2221
|
+
.sw-calendar[data-size='lg'] .sw-calendar__day { font-size: 15px; }
|
|
2222
|
+
.sw-calendar__day:hover { background: var(--sw-item-hover); }
|
|
2223
|
+
.sw-calendar__day:focus-visible { z-index: 1; box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
2224
|
+
.sw-calendar__day[data-outside] { color: color-mix(in oklab, var(--sw-muted-foreground) 70%, transparent); }
|
|
2225
|
+
.sw-calendar__day[data-today]::after {
|
|
2226
|
+
content: ''; position: absolute; left: 50%; bottom: 15%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--sw-accent);
|
|
2227
|
+
}
|
|
2228
|
+
.sw-calendar__day[data-unavailable] { color: var(--sw-muted-foreground); text-decoration: line-through; text-decoration-color: color-mix(in oklab, var(--sw-muted-foreground) 60%, transparent); }
|
|
2229
|
+
.sw-calendar__day[data-disabled] { cursor: default; }
|
|
2230
|
+
.sw-calendar__day[data-disabled]:not([data-unavailable]) { opacity: var(--sw-disabled-opacity); }
|
|
2231
|
+
.sw-calendar__day[data-disabled]:hover { background: transparent; }
|
|
2232
|
+
.sw-calendar__day[data-range-middle] { background: transparent; border-radius: 0; }
|
|
2233
|
+
.sw-calendar__day[data-range-middle]:hover { background: color-mix(in oklab, var(--sw-accent) 10%, transparent); border-radius: var(--sw-calendar-day-r); }
|
|
2234
|
+
.sw-calendar[data-mode='single'] .sw-calendar__day[data-selected],
|
|
2235
|
+
.sw-calendar[data-mode='multiple'] .sw-calendar__day[data-selected],
|
|
2236
|
+
.sw-calendar__day[data-range-start],
|
|
2237
|
+
.sw-calendar__day[data-range-end] {
|
|
2238
|
+
background: var(--sw-accent-solid); color: var(--sw-accent-foreground); font-weight: 500;
|
|
2239
|
+
}
|
|
2240
|
+
.sw-calendar__day[data-preview][data-range-end]:not([data-range-start]) { background: color-mix(in oklab, var(--sw-accent-solid) 70%, var(--sw-background)); }
|
|
2241
|
+
.sw-calendar__day[data-selected][data-today]::after,
|
|
2242
|
+
.sw-calendar__day[data-range-start][data-today]::after,
|
|
2243
|
+
.sw-calendar__day[data-range-end][data-today]::after { background: var(--sw-accent-foreground); }
|
|
2244
|
+
/* Filled days: the same 2px ring, 2px off the edge so it reads against the accent fill. */
|
|
2245
|
+
.sw-calendar__day[data-selected]:focus-visible,
|
|
2246
|
+
.sw-calendar__day[data-range-start]:focus-visible,
|
|
2247
|
+
.sw-calendar__day[data-range-end]:focus-visible { box-shadow: 0 0 0 2px var(--sw-background), 0 0 0 4px var(--sw-accent); }
|
|
2248
|
+
.sw-calendar__cell[data-empty] { pointer-events: none; }
|
|
2249
|
+
|
|
2250
|
+
@media (max-width: 400px) {
|
|
2251
|
+
.sw-calendar { --sw-calendar-cell: min(38px, calc((100vw - 56px) / 7)); }
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
/* kit-structure.css */
|
|
2255
|
+
/* ── Structure kit: Accordion, Collapsible, Tabs, Navigation Menu, Pagination,
|
|
2256
|
+
Toolbar, Tree, Scroll Area, Resizable, Carousel, Table ───────────────── */
|
|
2257
|
+
|
|
2258
|
+
/* ── Table ── */
|
|
2259
|
+
.sw-table__viewport {
|
|
2260
|
+
min-inline-size: 0;
|
|
2261
|
+
max-inline-size: 100%;
|
|
2262
|
+
overflow-x: auto;
|
|
2263
|
+
}
|
|
2264
|
+
.sw-table__viewport:focus-visible {
|
|
2265
|
+
outline: 2px solid var(--sw-accent);
|
|
2266
|
+
outline-offset: 3px;
|
|
2267
|
+
}
|
|
2268
|
+
.sw-table {
|
|
2269
|
+
inline-size: 100%;
|
|
2270
|
+
border-collapse: collapse;
|
|
2271
|
+
background: var(--sw-background);
|
|
2272
|
+
color: var(--sw-foreground);
|
|
2273
|
+
font-size: 14px;
|
|
2274
|
+
line-height: 1.4;
|
|
2275
|
+
text-align: start;
|
|
2276
|
+
}
|
|
2277
|
+
.sw-table__caption {
|
|
2278
|
+
padding: 12px 14px;
|
|
2279
|
+
font-weight: 600;
|
|
2280
|
+
text-align: start;
|
|
2281
|
+
}
|
|
2282
|
+
.sw-table th, .sw-table td {
|
|
2283
|
+
padding: 10px 14px;
|
|
2284
|
+
border-block-end: 1px solid var(--sw-hairline);
|
|
2285
|
+
text-align: start;
|
|
2286
|
+
vertical-align: top;
|
|
2287
|
+
}
|
|
2288
|
+
.sw-table thead th {
|
|
2289
|
+
background: var(--sw-muted);
|
|
2290
|
+
color: var(--sw-muted-foreground);
|
|
2291
|
+
font-family: var(--sw-font-mono);
|
|
2292
|
+
font-size: 12px;
|
|
2293
|
+
font-weight: 550;
|
|
2294
|
+
}
|
|
2295
|
+
.sw-table tbody th { font-weight: 550; }
|
|
2296
|
+
.sw-table [data-align='end'] { text-align: end; font-variant-numeric: tabular-nums; }
|
|
2297
|
+
.sw-table__empty { color: var(--sw-muted-foreground); }
|
|
2298
|
+
.sw-table__sort { display: inline-flex; align-items: center; gap: var(--sw-space-2); padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
|
|
2299
|
+
.sw-table__sort span { color: var(--sw-muted-foreground); }
|
|
2300
|
+
.sw-table__sort:hover { text-decoration: underline; }
|
|
2301
|
+
.sw-table__sort:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 3px; }
|
|
2302
|
+
|
|
2303
|
+
/* Shared height-animated disclosure body (components/_structure-shared.tsx). */
|
|
2304
|
+
.sw-collapse { overflow: hidden; }
|
|
2305
|
+
.sw-collapse[hidden] { display: none !important; }
|
|
2306
|
+
|
|
2307
|
+
/* ── Accordion ── */
|
|
2308
|
+
.sw-accordion { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); --sw-inset: 4px; display: flex; flex-direction: column; width: 100%; color: var(--sw-foreground); }
|
|
2309
|
+
.sw-accordion[data-variant='plain'] { border-top: 1px solid var(--sw-hairline); }
|
|
2310
|
+
.sw-accordion__item { position: relative; }
|
|
2311
|
+
.sw-accordion__item + .sw-accordion__item { border-top: 1px solid var(--sw-hairline); }
|
|
2312
|
+
.sw-accordion[data-variant='plain'] .sw-accordion__item { border-bottom: 1px solid var(--sw-hairline); }
|
|
2313
|
+
.sw-accordion[data-variant='plain'] .sw-accordion__item + .sw-accordion__item { border-top: 0; }
|
|
2314
|
+
.sw-accordion__header { margin: 0; font: inherit; }
|
|
2315
|
+
.sw-accordion__trigger {
|
|
2316
|
+
position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 14px 18px;
|
|
2317
|
+
border: 0; background: none; color: inherit; font: inherit; font-size: 15px; font-weight: 450; letter-spacing: -0.012em;
|
|
2318
|
+
text-align: left; cursor: pointer; outline: none;
|
|
2319
|
+
transition: background-color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
2320
|
+
}
|
|
2321
|
+
.sw-accordion[data-variant='plain'] .sw-accordion__trigger { padding-inline: 2px; }
|
|
2322
|
+
.sw-accordion__trigger:hover:not([aria-disabled='true']) .sw-accordion__title { text-decoration: underline; text-decoration-color: var(--sw-border); text-underline-offset: 4px; }
|
|
2323
|
+
/* Focus ring inset 4px from the frame, concentric with it (frame radius − 4px), so it never sits flush in a corner. */
|
|
2324
|
+
.sw-accordion__trigger::after {
|
|
2325
|
+
content: ''; position: absolute; inset: var(--sw-inset); pointer-events: none; opacity: 0;
|
|
2326
|
+
border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape);
|
|
2327
|
+
box-shadow: inset 0 0 0 2px var(--sw-accent);
|
|
2328
|
+
}
|
|
2329
|
+
.sw-accordion[data-variant='plain'] .sw-accordion__trigger::after { inset: 2px -2px; border-radius: var(--sw-inner-r); }
|
|
2330
|
+
.sw-accordion__trigger:focus-visible::after { opacity: 1; }
|
|
2331
|
+
.sw-accordion__trigger[data-disabled] { color: var(--sw-muted-foreground); cursor: not-allowed; }
|
|
2332
|
+
.sw-accordion__trigger[aria-disabled='true']:not([data-disabled]) { cursor: default; }
|
|
2333
|
+
.sw-accordion__title { flex: 1; min-width: 0; }
|
|
2334
|
+
.sw-accordion__meta { flex-shrink: 0; font-family: var(--sw-font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--sw-muted-foreground); }
|
|
2335
|
+
.sw-accordion__chevron { display: inline-flex; flex-shrink: 0; width: 16px; height: 16px; color: var(--sw-muted-foreground); }
|
|
2336
|
+
.sw-accordion__chevron svg { width: 16px; height: 16px; }
|
|
2337
|
+
.sw-accordion__content { padding: 0 18px 18px; font-size: 14px; line-height: 1.6; color: var(--sw-muted-foreground); }
|
|
2338
|
+
.sw-accordion[data-variant='plain'] .sw-accordion__content { padding-inline: 2px; }
|
|
2339
|
+
.sw-accordion__content > :first-child { margin-top: 0; }
|
|
2340
|
+
.sw-accordion__content > :last-child { margin-bottom: 0; }
|
|
2341
|
+
|
|
2342
|
+
/* ── Collapsible ── */
|
|
2343
|
+
.sw-collapsible { display: flex; flex-direction: column; width: 100%; min-width: 0; }
|
|
2344
|
+
.sw-collapsible__trigger {
|
|
2345
|
+
display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 32px; padding: 4px 8px; margin-inline: -8px;
|
|
2346
|
+
border: 0; background: none; border-radius: var(--sw-radius-xs); corner-shape: var(--sw-corner-shape); color: var(--sw-foreground); font: inherit; font-size: 14px; font-weight: 450;
|
|
2347
|
+
letter-spacing: -0.01em; cursor: pointer; outline: none; transition: background-color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
2348
|
+
}
|
|
2349
|
+
.sw-collapsible__trigger:hover { background: var(--sw-item-hover); }
|
|
2350
|
+
.sw-collapsible__trigger:focus-visible { box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
2351
|
+
.sw-collapsible__trigger:disabled { color: var(--sw-muted-foreground); cursor: not-allowed; background: none; }
|
|
2352
|
+
.sw-collapsible__chevron { display: inline-flex; width: 14px; height: 14px; color: var(--sw-muted-foreground); }
|
|
2353
|
+
.sw-collapsible__chevron svg { width: 14px; height: 14px; }
|
|
2354
|
+
.sw-collapsible__content { padding-top: 8px; }
|
|
2355
|
+
|
|
2356
|
+
/* ── Tabs ── */
|
|
2357
|
+
.sw-tabs { display: flex; flex-direction: column; gap: 16px; width: 100%; min-width: 0; color: var(--sw-foreground); }
|
|
2358
|
+
.sw-tabs[data-orientation='vertical'] { flex-direction: row; align-items: flex-start; }
|
|
2359
|
+
.sw-tabs__list { position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
|
|
2360
|
+
.sw-tabs__list::-webkit-scrollbar { display: none; }
|
|
2361
|
+
.sw-tabs[data-variant='line'] .sw-tabs__list { box-shadow: inset 0 -1px 0 var(--sw-hairline); gap: 2px; }
|
|
2362
|
+
.sw-tabs[data-variant='pill'] .sw-tabs__list { --sw-sq-bg: var(--sw-muted); align-self: flex-start; padding: 3px; gap: 2px; }
|
|
2363
|
+
.sw-tabs[data-orientation='vertical'] .sw-tabs__list { flex-direction: column; overflow: visible; flex-shrink: 0; }
|
|
2364
|
+
.sw-tabs[data-orientation='vertical'][data-variant='line'] .sw-tabs__list { box-shadow: inset -1px 0 0 var(--sw-hairline); }
|
|
2365
|
+
.sw-tabs__tab {
|
|
2366
|
+
position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0;
|
|
2367
|
+
height: 40px; padding: 0 12px; border: 0; background: none; color: var(--sw-muted-foreground); font: inherit; font-size: 14px;
|
|
2368
|
+
font-weight: 450; letter-spacing: -0.01em; white-space: nowrap; cursor: pointer; outline: none;
|
|
2369
|
+
transition: color var(--sw-duration-base) var(--sw-ease-standard);
|
|
2370
|
+
}
|
|
2371
|
+
.sw-tabs[data-size='sm'] .sw-tabs__tab { height: 32px; padding: 0 10px; font-size: 13px; }
|
|
2372
|
+
.sw-tabs[data-variant='pill'] .sw-tabs__tab { height: 34px; padding: 0 14px; }
|
|
2373
|
+
.sw-tabs[data-variant='pill'][data-size='sm'] .sw-tabs__tab { height: 28px; padding: 0 10px; }
|
|
2374
|
+
.sw-tabs[data-orientation='vertical'] .sw-tabs__tab { justify-content: flex-start; padding-right: 20px; }
|
|
2375
|
+
.sw-tabs__tab:hover:not([data-disabled]) { color: var(--sw-foreground); }
|
|
2376
|
+
.sw-tabs__tab[data-state='active'] { color: var(--sw-foreground); }
|
|
2377
|
+
.sw-tabs__tab[data-disabled] { opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
2378
|
+
.sw-tabs__tab:focus-visible .sw-tabs__label { outline: 2px solid var(--sw-accent); outline-offset: 3px; border-radius: 4px; }
|
|
2379
|
+
.sw-tabs__label, .sw-tabs__icon { position: relative; z-index: 1; }
|
|
2380
|
+
.sw-tabs__icon { display: inline-flex; width: 16px; height: 16px; }
|
|
2381
|
+
.sw-tabs__icon svg { width: 16px; height: 16px; }
|
|
2382
|
+
.sw-tabs__indicator { position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; border-radius: 2px; background: var(--sw-foreground); z-index: 1; }
|
|
2383
|
+
.sw-tabs[data-orientation='vertical'] .sw-tabs__indicator { left: auto; right: 0; top: 8px; bottom: 8px; width: 2px; height: auto; }
|
|
2384
|
+
.sw-tabs__pill { --sw-sq-bg: var(--sw-background); position: absolute; inset: 0; z-index: 0; filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 0.1)); }
|
|
2385
|
+
.sw-tabs__panel { min-width: 0; flex: 1; outline: none; font-size: 14px; line-height: 1.6; border-radius: 6px; }
|
|
2386
|
+
.sw-tabs__panel:focus-visible { box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
2387
|
+
|
|
2388
|
+
/* ── Navigation Menu ── */
|
|
2389
|
+
.sw-navigation-menu { position: relative; display: flex; justify-content: center; max-width: 100%; color: var(--sw-foreground); z-index: 2; }
|
|
2390
|
+
.sw-navigation-menu__list { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; list-style: none; }
|
|
2391
|
+
.sw-navigation-menu__trigger,
|
|
2392
|
+
.sw-navigation-menu__top-link {
|
|
2393
|
+
--sw-sq-bg: transparent;
|
|
2394
|
+
display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 0; background: none;
|
|
2395
|
+
color: var(--sw-foreground); font: inherit; font-size: 14px; font-weight: 450; letter-spacing: -0.01em; text-decoration: none;
|
|
2396
|
+
cursor: pointer; outline: none; white-space: nowrap;
|
|
2397
|
+
/* One hover shape for the whole menu: the xs squircle (the trigger draws it as SVG, links with CSS corner-shape). */
|
|
2398
|
+
border-radius: var(--sw-radius-xs); corner-shape: var(--sw-corner-shape);
|
|
2399
|
+
}
|
|
2400
|
+
.sw-navigation-menu__trigger { border-radius: 0; }
|
|
2401
|
+
.sw-navigation-menu__trigger:hover, .sw-navigation-menu__trigger[data-state='open'] { --sw-sq-bg: var(--sw-item-hover); }
|
|
2402
|
+
.sw-navigation-menu__top-link:hover { background: var(--sw-item-hover); }
|
|
2403
|
+
.sw-navigation-menu__top-link:focus-visible { box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
2404
|
+
/* Current page = neutral fill + 500 (system rule). */
|
|
2405
|
+
.sw-navigation-menu__top-link[data-current] { background: var(--sw-item-selected); font-weight: 500; }
|
|
2406
|
+
.sw-navigation-menu__chevron { display: inline-flex; width: 12px; height: 12px; color: var(--sw-muted-foreground); }
|
|
2407
|
+
.sw-navigation-menu__chevron svg { width: 12px; height: 12px; }
|
|
2408
|
+
.sw-navigation-menu__positioner {
|
|
2409
|
+
position: absolute; top: 100%; left: 50%; translate: -50% 0; padding-top: 8px; z-index: var(--sw-z-popup);
|
|
2410
|
+
width: min(560px, calc(100vw - 32px));
|
|
2411
|
+
}
|
|
2412
|
+
.sw-navigation-menu__content {
|
|
2413
|
+
--sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); --sw-inset: 8px;
|
|
2414
|
+
padding: var(--sw-inset); filter: drop-shadow(0 10px 24px rgb(0 0 0 / 0.12)) drop-shadow(0 1px 2px rgb(0 0 0 / 0.06));
|
|
2415
|
+
}
|
|
2416
|
+
.sw-navigation-menu__content[data-columns='1'] { max-width: 340px; margin-inline: auto; }
|
|
2417
|
+
.sw-navigation-menu__links { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
|
|
2418
|
+
.sw-navigation-menu__content[data-columns='2'] .sw-navigation-menu__links { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
|
|
2419
|
+
.sw-navigation-menu__link {
|
|
2420
|
+
display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; color: var(--sw-foreground);
|
|
2421
|
+
/* Concentric with the panel: panel radius − 8px inset. */
|
|
2422
|
+
border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape);
|
|
2423
|
+
text-decoration: none; outline: none; transition: background-color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
2424
|
+
}
|
|
2425
|
+
.sw-navigation-menu__link:hover { background: var(--sw-item-hover); }
|
|
2426
|
+
.sw-navigation-menu__link:focus-visible { box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
2427
|
+
.sw-navigation-menu__link[data-current] { background: var(--sw-item-selected); }
|
|
2428
|
+
/* Bare 16px icon aligned with the label's first line (no tile). */
|
|
2429
|
+
.sw-navigation-menu__link-icon { display: inline-flex; flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; color: var(--sw-muted-foreground); }
|
|
2430
|
+
.sw-navigation-menu__link-icon svg { width: 16px; height: 16px; }
|
|
2431
|
+
.sw-navigation-menu__link:hover .sw-navigation-menu__link-icon { color: var(--sw-foreground); }
|
|
2432
|
+
.sw-navigation-menu__link-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
2433
|
+
.sw-navigation-menu__link-label { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
|
|
2434
|
+
.sw-navigation-menu__link-description { font-size: 13px; line-height: 1.4; color: var(--sw-muted-foreground); }
|
|
2435
|
+
|
|
2436
|
+
/* ── Pagination ── */
|
|
2437
|
+
.sw-pagination { display: flex; justify-content: center; max-width: 100%; color: var(--sw-foreground); }
|
|
2438
|
+
.sw-pagination__list { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; justify-content: center; }
|
|
2439
|
+
.sw-pagination__list > li { display: flex; }
|
|
2440
|
+
.sw-pagination__link, .sw-pagination__step {
|
|
2441
|
+
--sw-sq-bg: transparent; --sw-sq-border: transparent;
|
|
2442
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 36px; height: 36px; padding: 0 8px;
|
|
2443
|
+
border: 0; background: none; color: var(--sw-foreground); font: inherit; font-size: 14px; font-weight: 450;
|
|
2444
|
+
font-variant-numeric: tabular-nums; letter-spacing: -0.01em; text-decoration: none; cursor: pointer; outline: none;
|
|
2445
|
+
}
|
|
2446
|
+
.sw-pagination[data-size='sm'] .sw-pagination__link, .sw-pagination[data-size='sm'] .sw-pagination__step { min-width: 30px; height: 30px; font-size: 13px; }
|
|
2447
|
+
.sw-pagination__link:hover, .sw-pagination__step:hover:not([data-disabled]) { --sw-sq-bg: var(--sw-item-hover); }
|
|
2448
|
+
/* Current page = neutral fill + 500 (system rule), no ink frame. */
|
|
2449
|
+
.sw-pagination__link[data-current] { --sw-sq-bg: var(--sw-item-selected); font-weight: 500; cursor: default; }
|
|
2450
|
+
.sw-pagination__step--text { padding: 0 10px; }
|
|
2451
|
+
.sw-pagination__step[data-disabled] { color: var(--sw-muted-foreground); opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
2452
|
+
.sw-pagination__step-icon { display: inline-flex; align-items: center; }
|
|
2453
|
+
.sw-pagination__step-icon svg { width: 16px; height: 16px; }
|
|
2454
|
+
.sw-pagination__double { margin-left: -10px; }
|
|
2455
|
+
.sw-pagination__ellipsis { display: inline-flex; align-items: flex-end; justify-content: center; min-width: 24px; height: 36px; padding-bottom: 10px; color: var(--sw-muted-foreground); box-sizing: border-box; }
|
|
2456
|
+
.sw-pagination__status { align-items: center; padding: 0 10px; font-family: var(--sw-font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--sw-muted-foreground); font-variant-numeric: tabular-nums; }
|
|
2457
|
+
.sw-pagination__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
2458
|
+
@media (max-width: 479px) {
|
|
2459
|
+
.sw-pagination__step-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
2460
|
+
.sw-pagination__step--text { padding: 0 8px; }
|
|
2461
|
+
.sw-pagination__link, .sw-pagination__step { min-width: 32px; height: 32px; padding: 0 6px; }
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2464
|
+
/* ── Toolbar ── */
|
|
2465
|
+
.sw-toolbar { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); --sw-inset: 4px; display: inline-flex; align-items: center; gap: 2px; padding: var(--sw-inset); max-width: 100%; flex-wrap: wrap; color: var(--sw-foreground); }
|
|
2466
|
+
/* Plain toolbars have no frame to be concentric with: inner controls use the same 6px squircle as the framed ones. */
|
|
2467
|
+
.sw-toolbar[data-variant='plain'] { --sw-sq-r: 10px; padding: 0; }
|
|
2468
|
+
.sw-toolbar[data-orientation='vertical'] { flex-direction: column; align-items: stretch; }
|
|
2469
|
+
.sw-toolbar__group { display: inline-flex; align-items: center; gap: 2px; }
|
|
2470
|
+
.sw-toolbar[data-orientation='vertical'] .sw-toolbar__group { flex-direction: column; align-items: stretch; }
|
|
2471
|
+
.sw-toolbar__button {
|
|
2472
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; min-width: 32px; padding: 0 10px;
|
|
2473
|
+
border: 0; background: none; color: var(--sw-foreground); font: inherit; font-size: 13px; font-weight: 450;
|
|
2474
|
+
/* Concentric squircle: toolbar radius − 4px inset (same shape as the field). */
|
|
2475
|
+
border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape);
|
|
2476
|
+
letter-spacing: -0.01em; white-space: nowrap; text-decoration: none; cursor: pointer; outline: none;
|
|
2477
|
+
transition: background-color var(--sw-duration-fast) var(--sw-ease-standard), color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
2478
|
+
}
|
|
2479
|
+
.sw-toolbar[data-size='sm'] .sw-toolbar__button { height: 28px; min-width: 28px; padding: 0 8px; font-size: 12px; }
|
|
2480
|
+
.sw-toolbar__button[data-icon-only] { padding: 0; }
|
|
2481
|
+
.sw-toolbar__button:hover:not([aria-disabled='true'], [aria-pressed='true']) { background: var(--sw-item-hover); }
|
|
2482
|
+
.sw-toolbar__button:focus-visible { box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
2483
|
+
.sw-toolbar__button[aria-pressed='true'] { background: var(--sw-foreground); color: var(--sw-background); font-weight: 500; }
|
|
2484
|
+
.sw-toolbar__button[aria-pressed='false'] { color: var(--sw-muted-foreground); }
|
|
2485
|
+
.sw-toolbar__button[aria-pressed='false']:hover { color: var(--sw-foreground); }
|
|
2486
|
+
.sw-toolbar__button[aria-disabled='true'] { opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
2487
|
+
.sw-toolbar__icon { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; }
|
|
2488
|
+
.sw-toolbar__icon svg { width: 16px; height: 16px; }
|
|
2489
|
+
.sw-toolbar__separator { flex-shrink: 0; align-self: stretch; width: 1px; margin: 4px 4px; background: var(--sw-hairline); }
|
|
2490
|
+
.sw-toolbar__separator[data-orientation='horizontal'] { width: auto; height: 1px; margin: 4px 4px; }
|
|
2491
|
+
.sw-toolbar__field { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; min-width: 0; color: var(--sw-muted-foreground); }
|
|
2492
|
+
.sw-toolbar[data-size='sm'] .sw-toolbar__field { height: 28px; }
|
|
2493
|
+
.sw-toolbar__field:hover:not([data-disabled]) { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
2494
|
+
.sw-toolbar__field:focus-within { --sw-sq-border: var(--sw-accent); }
|
|
2495
|
+
.sw-toolbar__field:has(:focus-visible) > .sw-sq-ring { opacity: 1; }
|
|
2496
|
+
.sw-toolbar__field[data-disabled] { opacity: var(--sw-disabled-opacity); }
|
|
2497
|
+
.sw-toolbar__input { flex: 1; min-width: 0; width: 9rem; height: 100%; border: 0; outline: none; background: transparent; font: inherit; font-size: 13px; color: var(--sw-foreground); }
|
|
2498
|
+
.sw-toolbar__input::placeholder { color: var(--sw-muted-foreground); }
|
|
2499
|
+
|
|
2500
|
+
/* ── Tree ── */
|
|
2501
|
+
.sw-tree { --sw-tree-indent: 18px; --sw-tree-pad: 6px; display: flex; flex-direction: column; width: 100%; min-width: 0; color: var(--sw-foreground); font-size: 14px; letter-spacing: -0.01em; outline: none; }
|
|
2502
|
+
/* Framed by default: own squircle frame, 4px inset, rows concentric with it. */
|
|
2503
|
+
.sw-tree[data-framed] { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); --sw-inset: 4px; padding: var(--sw-inset); }
|
|
2504
|
+
.sw-tree__item { outline: none; }
|
|
2505
|
+
.sw-tree__row {
|
|
2506
|
+
display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 8px 4px calc(var(--sw-tree-pad) + var(--sw-tree-level, 0) * var(--sw-tree-indent));
|
|
2507
|
+
position: relative; isolation: isolate; cursor: default; user-select: none;
|
|
2508
|
+
}
|
|
2509
|
+
.sw-tree[data-size='sm'] { --sw-tree-indent: 16px; --sw-tree-pad: 4px; font-size: 13px; }
|
|
2510
|
+
.sw-tree[data-size='sm'] .sw-tree__row { min-height: 28px; }
|
|
2511
|
+
.sw-tree__row:hover > .sw-row-fill { --sw-row-bg: var(--sw-item-hover); }
|
|
2512
|
+
.sw-tree__item:focus-visible > .sw-tree__row > .sw-row-fill { box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
2513
|
+
/* Selected = neutral fill + 500 (system rule); accent stays on focus and the multi-select check. */
|
|
2514
|
+
.sw-tree__item[aria-selected='true'] > .sw-tree__row { font-weight: 500; }
|
|
2515
|
+
.sw-tree__item[aria-selected='true'] > .sw-tree__row > .sw-row-fill { --sw-row-bg: var(--sw-item-selected); }
|
|
2516
|
+
.sw-tree__item[data-disabled] > .sw-tree__row { opacity: var(--sw-disabled-opacity); }
|
|
2517
|
+
.sw-tree__chevron { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 16px; height: 16px; color: var(--sw-muted-foreground); cursor: pointer; border-radius: 4px; }
|
|
2518
|
+
.sw-tree__chevron svg { width: 14px; height: 14px; }
|
|
2519
|
+
.sw-tree__chevron:hover { color: var(--sw-foreground); }
|
|
2520
|
+
.sw-tree__chevron--leaf { cursor: default; }
|
|
2521
|
+
.sw-tree__icon { display: inline-flex; flex-shrink: 0; width: 16px; height: 16px; color: var(--sw-muted-foreground); }
|
|
2522
|
+
.sw-tree__icon svg { width: 16px; height: 16px; }
|
|
2523
|
+
.sw-tree__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2524
|
+
.sw-tree__meta { flex-shrink: 0; font-family: var(--sw-font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sw-muted-foreground); }
|
|
2525
|
+
.sw-tree__check { display: inline-flex; width: 14px; height: 14px; flex-shrink: 0; color: var(--sw-accent); }
|
|
2526
|
+
.sw-tree__check svg { width: 14px; height: 14px; }
|
|
2527
|
+
.sw-tree__group .sw-collapse__inner { position: relative; }
|
|
2528
|
+
.sw-tree__group .sw-collapse__inner::before {
|
|
2529
|
+
content: ''; position: absolute; top: 2px; bottom: 2px; left: calc(var(--sw-tree-pad) + 7.5px + var(--sw-tree-level, 0) * var(--sw-tree-indent)); width: 1px; background: var(--sw-hairline); pointer-events: none;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
/* ── Scroll Area ── */
|
|
2533
|
+
.sw-scroll-area { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; --sw-scroll-fade: 28px; }
|
|
2534
|
+
.sw-scroll-area__viewport {
|
|
2535
|
+
flex: 1; min-height: 0; max-height: inherit; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; outline: none;
|
|
2536
|
+
--sw-fade-t: 0px; --sw-fade-b: 0px; --sw-fade-l: 0px; --sw-fade-r: 0px;
|
|
2537
|
+
}
|
|
2538
|
+
.sw-scroll-area[data-orientation='vertical'] > .sw-scroll-area__viewport { overflow-x: hidden; }
|
|
2539
|
+
.sw-scroll-area[data-orientation='horizontal'] > .sw-scroll-area__viewport { overflow-y: hidden; }
|
|
2540
|
+
.sw-scroll-area__viewport::-webkit-scrollbar { display: none; }
|
|
2541
|
+
.sw-scroll-area__viewport:focus-visible { box-shadow: inset 0 0 0 2px var(--sw-accent); border-radius: 6px; }
|
|
2542
|
+
.sw-scroll-area[data-orientation='horizontal'] .sw-scroll-area__content { width: max-content; min-width: 100%; }
|
|
2543
|
+
.sw-scroll-area[data-orientation='both'] .sw-scroll-area__content { width: max-content; min-width: 100%; }
|
|
2544
|
+
.sw-scroll-area[data-fades][data-overflow-y]:not([data-at-y-start]) > .sw-scroll-area__viewport { --sw-fade-t: var(--sw-scroll-fade); }
|
|
2545
|
+
.sw-scroll-area[data-fades][data-overflow-y]:not([data-at-y-end]) > .sw-scroll-area__viewport { --sw-fade-b: var(--sw-scroll-fade); }
|
|
2546
|
+
.sw-scroll-area[data-fades][data-overflow-x]:not([data-at-x-start]) > .sw-scroll-area__viewport { --sw-fade-l: var(--sw-scroll-fade); }
|
|
2547
|
+
.sw-scroll-area[data-fades][data-overflow-x]:not([data-at-x-end]) > .sw-scroll-area__viewport { --sw-fade-r: var(--sw-scroll-fade); }
|
|
2548
|
+
.sw-scroll-area[data-fades] > .sw-scroll-area__viewport {
|
|
2549
|
+
-webkit-mask-image:
|
|
2550
|
+
linear-gradient(to bottom, transparent 0, black var(--sw-fade-t), black calc(100% - var(--sw-fade-b)), transparent 100%),
|
|
2551
|
+
linear-gradient(to right, transparent 0, black var(--sw-fade-l), black calc(100% - var(--sw-fade-r)), transparent 100%);
|
|
2552
|
+
-webkit-mask-composite: source-in;
|
|
2553
|
+
mask-image:
|
|
2554
|
+
linear-gradient(to bottom, transparent 0, black var(--sw-fade-t), black calc(100% - var(--sw-fade-b)), transparent 100%),
|
|
2555
|
+
linear-gradient(to right, transparent 0, black var(--sw-fade-l), black calc(100% - var(--sw-fade-r)), transparent 100%);
|
|
2556
|
+
mask-composite: intersect;
|
|
2557
|
+
}
|
|
2558
|
+
.sw-scroll-area__scrollbar {
|
|
2559
|
+
position: absolute; z-index: 2; display: flex; padding: 2px; opacity: 0; pointer-events: none; touch-action: none; user-select: none;
|
|
2560
|
+
transition: opacity var(--sw-duration-slow) var(--sw-ease-standard);
|
|
2561
|
+
}
|
|
2562
|
+
.sw-scroll-area__scrollbar[data-orientation='vertical'] { top: 2px; bottom: 2px; right: 1px; width: 10px; }
|
|
2563
|
+
.sw-scroll-area__scrollbar[data-orientation='horizontal'] { left: 2px; right: 2px; bottom: 1px; height: 10px; }
|
|
2564
|
+
.sw-scroll-area[data-orientation='both'] .sw-scroll-area__scrollbar[data-orientation='vertical'] { bottom: 12px; }
|
|
2565
|
+
.sw-scroll-area[data-orientation='both'] .sw-scroll-area__scrollbar[data-orientation='horizontal'] { right: 12px; }
|
|
2566
|
+
.sw-scroll-area__scrollbar[data-visible] { opacity: 1; pointer-events: auto; transition-duration: var(--sw-duration-fast); }
|
|
2567
|
+
.sw-scroll-area__thumb {
|
|
2568
|
+
flex-shrink: 0; border-radius: 999px; background: color-mix(in oklab, var(--sw-foreground) 28%, transparent);
|
|
2569
|
+
transition: background-color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
2570
|
+
}
|
|
2571
|
+
.sw-scroll-area__scrollbar[data-orientation='vertical'] .sw-scroll-area__thumb { width: 100%; }
|
|
2572
|
+
.sw-scroll-area__scrollbar[data-orientation='horizontal'] .sw-scroll-area__thumb { height: 100%; }
|
|
2573
|
+
.sw-scroll-area__scrollbar:hover .sw-scroll-area__thumb, .sw-scroll-area__scrollbar[data-dragging] .sw-scroll-area__thumb { background: color-mix(in oklab, var(--sw-foreground) 48%, transparent); }
|
|
2574
|
+
.sw-scroll-area__to-end {
|
|
2575
|
+
position: absolute; z-index: 3; left: 50%; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 10px;
|
|
2576
|
+
border: 1px solid var(--sw-frame); border-radius: 999px; background: var(--sw-background); color: var(--sw-foreground);
|
|
2577
|
+
font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; outline: none; box-shadow: var(--sw-shadow-popup);
|
|
2578
|
+
opacity: 0; translate: -50% 6px; pointer-events: none;
|
|
2579
|
+
transition: opacity var(--sw-duration-base) var(--sw-ease-standard), translate var(--sw-duration-base) var(--sw-ease-standard);
|
|
2580
|
+
}
|
|
2581
|
+
.sw-scroll-area__to-end svg { width: 14px; height: 14px; }
|
|
2582
|
+
.sw-scroll-area__to-end[data-visible] { opacity: 1; translate: -50% 0; pointer-events: auto; }
|
|
2583
|
+
.sw-scroll-area__to-end:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 2px; }
|
|
2584
|
+
|
|
2585
|
+
/* ── Resizable ── */
|
|
2586
|
+
/* Framed by default: the group draws its own 1px squircle (stroke paints on top) and clips panels to it.
|
|
2587
|
+
Panels stay transparent so the frame and the surface behind it read as one surface. */
|
|
2588
|
+
.sw-resizable { display: flex; width: 100%; height: 100%; min-height: 0; min-width: 0; overflow: hidden; }
|
|
2589
|
+
.sw-resizable[data-framed] { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); }
|
|
2590
|
+
.sw-resizable[data-orientation='vertical'] { flex-direction: column; }
|
|
2591
|
+
.sw-resizable[data-dragging] { user-select: none; cursor: col-resize; }
|
|
2592
|
+
.sw-resizable[data-dragging][data-orientation='vertical'] { cursor: row-resize; }
|
|
2593
|
+
.sw-resizable__panel { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
|
|
2594
|
+
.sw-resizable__handle {
|
|
2595
|
+
position: relative; flex: 0 0 1px; z-index: 1; background: var(--sw-frame); outline: none; touch-action: none;
|
|
2596
|
+
cursor: col-resize; transition: background-color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
2597
|
+
}
|
|
2598
|
+
.sw-resizable[data-orientation='vertical'] > .sw-resizable__handle { cursor: row-resize; }
|
|
2599
|
+
.sw-resizable__handle::before { content: ''; position: absolute; inset: 0 -6px; }
|
|
2600
|
+
.sw-resizable[data-orientation='vertical'] > .sw-resizable__handle::before { inset: -6px 0; }
|
|
2601
|
+
.sw-resizable__handle:hover, .sw-resizable__handle[data-dragging] { background: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
2602
|
+
.sw-resizable__handle:focus-visible { background: var(--sw-accent); }
|
|
2603
|
+
.sw-resizable__handle[data-disabled] { cursor: default; background: var(--sw-frame); }
|
|
2604
|
+
/* Grip: a small framed pill with a centred notch, so the handle reads as draggable at rest. */
|
|
2605
|
+
.sw-resizable__grip {
|
|
2606
|
+
position: absolute; top: 50%; left: 50%; translate: -50% -50%; display: flex; align-items: center; justify-content: center;
|
|
2607
|
+
width: 8px; height: 28px; border-radius: 4px; background: var(--sw-background); box-shadow: inset 0 0 0 1px var(--sw-frame); pointer-events: none;
|
|
2608
|
+
transition: box-shadow var(--sw-duration-fast) var(--sw-ease-standard);
|
|
2609
|
+
}
|
|
2610
|
+
.sw-resizable__grip::after { content: ''; width: 2px; height: 12px; border-radius: 1px; background: var(--sw-muted-foreground); transition: background-color var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
2611
|
+
.sw-resizable[data-orientation='vertical'] > .sw-resizable__handle > .sw-resizable__grip { width: 28px; height: 8px; }
|
|
2612
|
+
.sw-resizable[data-orientation='vertical'] > .sw-resizable__handle > .sw-resizable__grip::after { width: 12px; height: 2px; }
|
|
2613
|
+
.sw-resizable__handle:hover > .sw-resizable__grip, .sw-resizable__handle[data-dragging] > .sw-resizable__grip { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
2614
|
+
.sw-resizable__handle:hover > .sw-resizable__grip::after, .sw-resizable__handle[data-dragging] > .sw-resizable__grip::after { background: var(--sw-foreground); }
|
|
2615
|
+
.sw-resizable__handle:focus-visible > .sw-resizable__grip { box-shadow: inset 0 0 0 1.5px var(--sw-accent); }
|
|
2616
|
+
.sw-resizable__handle:focus-visible > .sw-resizable__grip::after { background: var(--sw-accent); }
|
|
2617
|
+
.sw-resizable__handle[data-disabled] > .sw-resizable__grip::after { background: var(--sw-frame); }
|
|
2618
|
+
|
|
2619
|
+
/* ── Carousel ── */
|
|
2620
|
+
.sw-carousel { display: flex; flex-direction: column; gap: 12px; width: 100%; min-width: 0; color: var(--sw-foreground); }
|
|
2621
|
+
/* The viewport bleeds 4px on every side (padding 4 / margin −4) so slide focus rings and frames aren't clipped; no radius of its own. */
|
|
2622
|
+
.sw-carousel__viewport {
|
|
2623
|
+
position: relative; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
|
|
2624
|
+
scrollbar-width: none; outline: none; padding: 4px; margin: -4px; scroll-padding-inline: 4px;
|
|
2625
|
+
}
|
|
2626
|
+
.sw-carousel__viewport::-webkit-scrollbar { display: none; }
|
|
2627
|
+
.sw-carousel__viewport:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: -2px; border-radius: var(--sw-radius-xs); corner-shape: var(--sw-corner-shape); }
|
|
2628
|
+
.sw-carousel__content { display: flex; gap: var(--sw-carousel-gap, 12px); width: 100%; }
|
|
2629
|
+
.sw-carousel__item {
|
|
2630
|
+
flex: 0 0 calc((100% - (var(--sw-carousel-per-page, 1) - 1) * var(--sw-carousel-gap, 12px)) / var(--sw-carousel-per-page, 1));
|
|
2631
|
+
min-width: 0; scroll-snap-align: start;
|
|
2632
|
+
}
|
|
2633
|
+
.sw-carousel__bar { display: flex; align-items: center; gap: 12px; min-height: 32px; }
|
|
2634
|
+
.sw-carousel__nav { display: inline-flex; gap: 6px; margin-left: auto; }
|
|
2635
|
+
.sw-carousel__button {
|
|
2636
|
+
--sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame);
|
|
2637
|
+
display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; padding: 0;
|
|
2638
|
+
border: 0; background: none; color: var(--sw-foreground); cursor: pointer;
|
|
2639
|
+
}
|
|
2640
|
+
.sw-carousel__button svg { width: 16px; height: 16px; }
|
|
2641
|
+
.sw-carousel__button:hover:not([data-disabled]) { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
2642
|
+
.sw-carousel__button[data-disabled] { color: var(--sw-muted-foreground); opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
2643
|
+
.sw-carousel__dots { display: inline-flex; align-items: center; gap: 2px; }
|
|
2644
|
+
.sw-carousel__dot {
|
|
2645
|
+
position: relative; width: 20px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer; outline: none; border-radius: 6px;
|
|
2646
|
+
}
|
|
2647
|
+
.sw-carousel__dot::before {
|
|
2648
|
+
content: ''; position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; translate: -50% -50%; border-radius: 3px;
|
|
2649
|
+
background: color-mix(in oklab, var(--sw-foreground) 22%, transparent);
|
|
2650
|
+
transition: width var(--sw-duration-base) var(--sw-ease-standard), background-color var(--sw-duration-base) var(--sw-ease-standard);
|
|
2651
|
+
}
|
|
2652
|
+
.sw-carousel__dot:hover::before { background: color-mix(in oklab, var(--sw-foreground) 45%, transparent); }
|
|
2653
|
+
.sw-carousel__dot[data-selected] { width: 28px; }
|
|
2654
|
+
.sw-carousel__dot[data-selected]::before { width: 18px; background: var(--sw-foreground); }
|
|
2655
|
+
.sw-carousel__dot:focus-visible { box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
2656
|
+
|
|
2657
|
+
/* Pagination, compact: "‹ 2 / 5 ›" for card and tile headers. */
|
|
2658
|
+
.sw-pagination[data-variant='compact'] { display: inline-flex; align-items: center; gap: 0; flex: none; }
|
|
2659
|
+
.sw-pagination__compact { min-width: 4ch; padding: 0 2px; font-family: var(--sw-font-mono); font-size: 11px; font-variant-numeric: tabular-nums; text-align: center; color: var(--sw-muted-foreground); white-space: nowrap; }
|
|
2660
|
+
.sw-pagination__slash { margin: 0 2px; opacity: 0.6; }
|
|
2661
|
+
|
|
2662
|
+
/* Tabs, metric: KPI cells that choose what the panel plots (Plausible / Vercel Analytics pattern). */
|
|
2663
|
+
.sw-tabs[data-variant='metric'] { gap: 0; }
|
|
2664
|
+
.sw-tabs[data-variant='metric'] .sw-tabs__list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; overflow: visible; box-shadow: inset 0 -1px 0 var(--sw-divider, var(--sw-border)); }
|
|
2665
|
+
.sw-tabs[data-variant='metric'] .sw-tabs__tab { position: relative; display: block; height: auto; min-width: 0; padding: 12px; text-align: start; color: inherit; transition: background-color var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
2666
|
+
.sw-tabs[data-variant='metric'] .sw-tabs__tab:hover:not([data-state='active']) { background: var(--sw-item-hover); }
|
|
2667
|
+
.sw-tabs[data-variant='metric'] .sw-tabs__tab:not([data-state='active']) .sw-stat__value { color: var(--sw-subtle); }
|
|
2668
|
+
.sw-tabs[data-variant='metric'] .sw-tabs__label { display: block; }
|
|
2669
|
+
.sw-tabs[data-variant='metric'] .sw-tabs__indicator { left: 0; right: 0; height: 2px; border-radius: 0; }
|
|
2670
|
+
.sw-tabs[data-variant='metric'] .sw-tabs__tab:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
2671
|
+
.sw-tabs[data-variant='metric'] .sw-tabs__tab:focus-visible .sw-tabs__label { outline: none; }
|
|
2672
|
+
.sw-tabs[data-variant='metric'] .sw-tabs__panel { padding: 12px; border-radius: 0; }
|
|
2673
|
+
@container (max-width: 520px) { .sw-tabs[data-variant='metric'] .sw-tabs__list { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
2674
|
+
.sw-tabs[data-variant='metric'] { container-type: inline-size; }
|
|
2675
|
+
|
|
2676
|
+
/* Accordion: header actions beside the trigger; size sm = dashboard sections; fill = shared height. */
|
|
2677
|
+
.sw-accordion__header { display: flex; align-items: center; min-width: 0; }
|
|
2678
|
+
.sw-accordion__actions { display: flex; align-items: center; gap: 2px; flex: none; padding-inline-end: 6px; }
|
|
2679
|
+
.sw-accordion[data-size='sm'] { --sw-inset: 6px; }
|
|
2680
|
+
.sw-accordion[data-size='sm'] .sw-accordion__header { padding: 6px; gap: 2px; }
|
|
2681
|
+
.sw-accordion[data-size='sm'] .sw-accordion__actions { padding: 0; }
|
|
2682
|
+
.sw-accordion[data-size='sm'] .sw-accordion__trigger {
|
|
2683
|
+
min-height: 28px; height: 28px; gap: 6px; padding: 0 6px; font-size: 13px; font-weight: 500; letter-spacing: -0.005em;
|
|
2684
|
+
border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape);
|
|
2685
|
+
}
|
|
2686
|
+
.sw-accordion[data-size='sm'] .sw-accordion__trigger:hover:not([aria-disabled='true']) { background: var(--sw-item-hover); }
|
|
2687
|
+
.sw-accordion[data-size='sm'] .sw-accordion__trigger:hover .sw-accordion__title { text-decoration: none; }
|
|
2688
|
+
.sw-accordion[data-size='sm'] .sw-accordion__trigger::after { inset: 0; border-radius: inherit; }
|
|
2689
|
+
.sw-accordion[data-size='sm'] .sw-accordion__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2690
|
+
.sw-accordion[data-size='sm'] .sw-accordion__meta { font-size: 11px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
|
|
2691
|
+
.sw-accordion[data-size='sm'] .sw-accordion__chevron, .sw-accordion[data-size='sm'] .sw-accordion__chevron svg { width: 14px; height: 14px; }
|
|
2692
|
+
.sw-accordion[data-size='sm'] .sw-accordion__content { padding: 0 12px 12px; font-size: 13px; line-height: 1.5; color: var(--sw-foreground); }
|
|
2693
|
+
.sw-accordion[data-size='sm'][data-variant='plain'] { border-top: 0; }
|
|
2694
|
+
.sw-accordion[data-size='sm'][data-variant='plain'] .sw-accordion__item { border-bottom-color: var(--sw-divider, var(--sw-border)); }
|
|
2695
|
+
.sw-accordion[data-size='sm'] .sw-accordion__content > :is(.sw-listbox:not([data-framed]), .sw-bar-list) { margin: 0 -12px -12px; }
|
|
2696
|
+
.sw-accordion[data-size='sm'] .sw-accordion__content > .sw-listbox:not([data-framed]) > .sw-listbox__body { padding-top: 0; }
|
|
2697
|
+
.sw-accordion[data-fill] { height: 100%; min-height: 0; }
|
|
2698
|
+
.sw-accordion[data-fill] > .sw-accordion__item { display: flex; flex-direction: column; flex: 0 0 auto; min-height: 0; transition: flex-grow var(--sw-duration-base) var(--sw-ease-standard); }
|
|
2699
|
+
.sw-accordion[data-fill] > .sw-accordion__item[data-state='open'] { flex: 1 1 0; }
|
|
2700
|
+
.sw-accordion[data-fill] > .sw-accordion__item > .sw-accordion__panel { flex: 1; min-height: 0; overflow: auto; }
|
|
2701
|
+
/* Narrow metric cells: the delta wraps under the number instead of running into the next cell. */
|
|
2702
|
+
.sw-tabs[data-variant='metric'] .sw-tabs__tab { overflow: hidden; }
|
|
2703
|
+
.sw-tabs[data-variant='metric'] .sw-stat__row { flex-wrap: wrap; row-gap: 2px; min-width: 0; }
|
|
2704
|
+
.sw-tabs[data-variant='metric'] .sw-stat__label, .sw-tabs[data-variant='metric'] .sw-stat__caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2705
|
+
@container (max-width: 520px) { .sw-tabs[data-variant='metric'] .sw-stat[data-size='sm'] .sw-stat__value { font-size: 1.25rem; } }
|
|
2706
|
+
|
|
2707
|
+
/* Containers publish the inner radius for their fills, framed or not (base.css). */
|
|
2708
|
+
.sw-accordion { --sw-inner-r: max(4px, calc(var(--sw-sq-r, 20px) - var(--sw-inset, 4px))); }
|
|
2709
|
+
.sw-accordion:not([data-variant='framed']) { --sw-inner-r: var(--sw-row-r); }
|
|
2710
|
+
.sw-navigation-menu__content { --sw-inner-r: max(4px, calc(var(--sw-sq-r, 14px) - var(--sw-inset, 8px))); }
|
|
2711
|
+
.sw-toolbar { --sw-inner-r: max(4px, calc(var(--sw-sq-r, 10px) - var(--sw-inset, 4px))); }
|
|
2712
|
+
.sw-tree { --sw-inner-r: max(4px, calc(var(--sw-sq-r, 14px) - var(--sw-inset, 4px))); }
|
|
2713
|
+
|
|
2714
|
+
/* kit-media.css */
|
|
2715
|
+
/* ── Media ─────────────────────────────────────────────────────────────────
|
|
2716
|
+
Avatar, Color Picker, File Input, Image Cropper, Timeline, Waterfall, Preferences. */
|
|
2717
|
+
|
|
2718
|
+
/* ── Avatar ── */
|
|
2719
|
+
.sw-avatar {
|
|
2720
|
+
--sw-avatar-size: 36px;
|
|
2721
|
+
position: relative;
|
|
2722
|
+
display: inline-flex;
|
|
2723
|
+
flex-shrink: 0;
|
|
2724
|
+
width: var(--sw-avatar-size);
|
|
2725
|
+
height: var(--sw-avatar-size);
|
|
2726
|
+
vertical-align: middle;
|
|
2727
|
+
color: var(--sw-foreground);
|
|
2728
|
+
font-family: var(--sw-font-sans);
|
|
2729
|
+
}
|
|
2730
|
+
.sw-avatar__clip {
|
|
2731
|
+
position: absolute;
|
|
2732
|
+
inset: 0;
|
|
2733
|
+
display: grid;
|
|
2734
|
+
place-items: center;
|
|
2735
|
+
overflow: hidden;
|
|
2736
|
+
border-radius: 50%;
|
|
2737
|
+
background: var(--sw-muted);
|
|
2738
|
+
box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--sw-foreground) 6%, transparent);
|
|
2739
|
+
}
|
|
2740
|
+
.sw-avatar[data-shape='squircle'] .sw-avatar__clip { border-radius: 32%; }
|
|
2741
|
+
.sw-avatar__image {
|
|
2742
|
+
position: absolute;
|
|
2743
|
+
inset: 0;
|
|
2744
|
+
width: 100%;
|
|
2745
|
+
height: 100%;
|
|
2746
|
+
object-fit: cover;
|
|
2747
|
+
transition: opacity var(--sw-duration-fast) var(--sw-ease-standard);
|
|
2748
|
+
}
|
|
2749
|
+
.sw-avatar__image[data-hidden] { opacity: 0; }
|
|
2750
|
+
.sw-avatar__fallback {
|
|
2751
|
+
display: inline-flex;
|
|
2752
|
+
align-items: center;
|
|
2753
|
+
justify-content: center;
|
|
2754
|
+
font-size: calc(var(--sw-avatar-size) * 0.38);
|
|
2755
|
+
font-weight: 500;
|
|
2756
|
+
line-height: 1;
|
|
2757
|
+
letter-spacing: -0.02em;
|
|
2758
|
+
color: var(--sw-subtle);
|
|
2759
|
+
user-select: none;
|
|
2760
|
+
}
|
|
2761
|
+
.sw-avatar__fallback[data-waiting] { visibility: hidden; }
|
|
2762
|
+
.sw-avatar__icon { width: 56%; height: 56%; color: var(--sw-muted-foreground); }
|
|
2763
|
+
.sw-avatar__ring { display: none; position: absolute; inset: -2px; border-radius: 50%; background: var(--sw-avatar-ring, var(--sw-background)); }
|
|
2764
|
+
.sw-avatar[data-shape='squircle'] .sw-avatar__ring { border-radius: 34%; }
|
|
2765
|
+
.sw-avatar__presence {
|
|
2766
|
+
position: absolute;
|
|
2767
|
+
right: -1px;
|
|
2768
|
+
bottom: -1px;
|
|
2769
|
+
width: max(8px, calc(var(--sw-avatar-size) * 0.28));
|
|
2770
|
+
height: max(8px, calc(var(--sw-avatar-size) * 0.28));
|
|
2771
|
+
border-radius: 50%;
|
|
2772
|
+
background: var(--sw-muted-foreground);
|
|
2773
|
+
box-shadow: 0 0 0 2px var(--sw-avatar-ring, var(--sw-background));
|
|
2774
|
+
}
|
|
2775
|
+
.sw-avatar[data-shape='squircle'] .sw-avatar__presence { right: -3px; bottom: -3px; }
|
|
2776
|
+
.sw-avatar__presence[data-presence='online'] { background: var(--sw-success); }
|
|
2777
|
+
.sw-avatar__presence[data-presence='away'] { background: var(--sw-chart-4); }
|
|
2778
|
+
.sw-avatar__presence[data-presence='busy'] { background: var(--sw-danger); }
|
|
2779
|
+
.sw-avatar__presence[data-presence='offline'] { background: transparent; box-shadow: inset 0 0 0 2px var(--sw-muted-foreground), 0 0 0 2px var(--sw-avatar-ring, var(--sw-background)); }
|
|
2780
|
+
|
|
2781
|
+
.sw-avatar-group { display: inline-flex; align-items: center; isolation: isolate; }
|
|
2782
|
+
.sw-avatar-group > .sw-avatar + .sw-avatar { margin-inline-start: calc(var(--sw-avatar-overlap) * -1); }
|
|
2783
|
+
.sw-avatar-group > .sw-avatar .sw-avatar__ring { display: block; }
|
|
2784
|
+
.sw-avatar-group > .sw-avatar { transition: transform var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
2785
|
+
.sw-avatar-group > .sw-avatar:hover { transform: translateY(-2px); z-index: 1; }
|
|
2786
|
+
.sw-avatar--more .sw-avatar__fallback { font-family: var(--sw-font-mono); font-size: max(10px, calc(var(--sw-avatar-size) * 0.32)); letter-spacing: 0; color: var(--sw-foreground); }
|
|
2787
|
+
|
|
2788
|
+
/* ── Timeline ── */
|
|
2789
|
+
.sw-timeline { --sw-tl-marker: 22px; display: flex; flex-direction: column; min-width: 0; font-family: var(--sw-font-sans); color: var(--sw-foreground); }
|
|
2790
|
+
.sw-timeline[data-size='sm'] { --sw-tl-marker: 14px; }
|
|
2791
|
+
.sw-timeline__item {
|
|
2792
|
+
position: relative;
|
|
2793
|
+
display: grid;
|
|
2794
|
+
grid-template-columns: var(--sw-tl-marker) minmax(0, 1fr);
|
|
2795
|
+
column-gap: 14px;
|
|
2796
|
+
padding-bottom: 22px;
|
|
2797
|
+
border-radius: var(--sw-radius-xs);
|
|
2798
|
+
corner-shape: var(--sw-corner-shape);
|
|
2799
|
+
outline: none;
|
|
2800
|
+
}
|
|
2801
|
+
.sw-timeline__item:last-child { padding-bottom: 0; }
|
|
2802
|
+
.sw-timeline__item:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 4px; }
|
|
2803
|
+
.sw-timeline__item > :not(.sw-timeline__marker, .sw-timeline__connector) { grid-column: 2; }
|
|
2804
|
+
.sw-timeline__marker {
|
|
2805
|
+
position: relative;
|
|
2806
|
+
z-index: 1;
|
|
2807
|
+
grid-column: 1;
|
|
2808
|
+
grid-row: 1 / span 3;
|
|
2809
|
+
display: grid;
|
|
2810
|
+
place-items: center;
|
|
2811
|
+
width: var(--sw-tl-marker);
|
|
2812
|
+
height: var(--sw-tl-marker);
|
|
2813
|
+
border-radius: 50%;
|
|
2814
|
+
background: var(--sw-background);
|
|
2815
|
+
box-shadow: inset 0 0 0 1.5px var(--sw-frame);
|
|
2816
|
+
color: var(--sw-muted-foreground);
|
|
2817
|
+
}
|
|
2818
|
+
.sw-timeline__marker:not([data-icon]):not([data-complete])::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in oklab, var(--sw-foreground) 45%, transparent); }
|
|
2819
|
+
.sw-timeline[data-size='sm'] .sw-timeline__marker:not([data-icon]):not([data-complete])::after { width: 4px; height: 4px; }
|
|
2820
|
+
.sw-timeline__marker svg { width: 60%; height: 60%; }
|
|
2821
|
+
.sw-timeline__marker[data-icon] { background: var(--sw-muted); box-shadow: inset 0 0 0 1px var(--sw-hairline); color: var(--sw-foreground); }
|
|
2822
|
+
.sw-timeline__marker[data-complete] { background: var(--sw-foreground); box-shadow: none; color: var(--sw-background); }
|
|
2823
|
+
.sw-timeline__marker[data-current] { box-shadow: inset 0 0 0 1.5px var(--sw-accent), 0 0 0 4px color-mix(in oklab, var(--sw-accent) 16%, transparent); color: var(--sw-accent); }
|
|
2824
|
+
.sw-timeline__marker[data-current]:not([data-icon])::after { background: var(--sw-accent); width: 8px; height: 8px; }
|
|
2825
|
+
.sw-timeline__marker[data-upcoming] { box-shadow: inset 0 0 0 1.5px var(--sw-border); }
|
|
2826
|
+
.sw-timeline__marker[data-upcoming]:not([data-icon])::after { background: transparent; }
|
|
2827
|
+
.sw-timeline__connector {
|
|
2828
|
+
position: absolute;
|
|
2829
|
+
top: calc(var(--sw-tl-marker) + 4px);
|
|
2830
|
+
bottom: 4px;
|
|
2831
|
+
left: calc(var(--sw-tl-marker) / 2 - 0.75px);
|
|
2832
|
+
width: 1.5px;
|
|
2833
|
+
border-radius: 1px;
|
|
2834
|
+
background: var(--sw-border);
|
|
2835
|
+
}
|
|
2836
|
+
.sw-timeline__connector[data-complete] { background: color-mix(in oklab, var(--sw-foreground) 70%, transparent); }
|
|
2837
|
+
.sw-timeline__connector[data-upcoming] { background: repeating-linear-gradient(to bottom, var(--sw-frame) 0 3px, transparent 3px 7px); }
|
|
2838
|
+
.sw-timeline__item:last-child > .sw-timeline__connector, .sw-timeline__item[data-last] > .sw-timeline__connector { display: none; }
|
|
2839
|
+
.sw-timeline__content { min-width: 0; padding-top: calc((var(--sw-tl-marker) - 21px) / 2); }
|
|
2840
|
+
.sw-timeline__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 12px; row-gap: 2px; }
|
|
2841
|
+
.sw-timeline__title { font-size: 14px; font-weight: 500; line-height: 21px; letter-spacing: -0.01em; }
|
|
2842
|
+
.sw-timeline__title[data-upcoming] { color: var(--sw-muted-foreground); }
|
|
2843
|
+
.sw-timeline__item[data-importance='high'] .sw-timeline__title { font-weight: 600; }
|
|
2844
|
+
.sw-timeline__importance { font-size: 11px; font-family: var(--sw-font-mono); color: var(--sw-muted-foreground); }
|
|
2845
|
+
.sw-timeline__time { font-family: var(--sw-font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--sw-muted-foreground); white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
2846
|
+
.sw-timeline__description { margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--sw-muted-foreground); }
|
|
2847
|
+
.sw-timeline__content > :where(:not(.sw-timeline__head, .sw-timeline__description)) { margin-top: 8px; }
|
|
2848
|
+
.sw-timeline[data-size='sm'] .sw-timeline__title { font-size: 13px; }
|
|
2849
|
+
.sw-timeline[data-size='sm'] .sw-timeline__item { padding-bottom: 16px; }
|
|
2850
|
+
|
|
2851
|
+
.sw-timeline[data-orientation='horizontal'] { flex-direction: row; overflow-x: auto; padding: 6px 4px; scrollbar-width: thin; }
|
|
2852
|
+
.sw-timeline[data-orientation='horizontal'] .sw-timeline__item { flex: 1 0 140px; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--sw-tl-marker) auto; row-gap: 12px; padding: 0 16px 0 0; }
|
|
2853
|
+
.sw-timeline[data-orientation='horizontal'] .sw-timeline__item:last-child { padding-right: 0; }
|
|
2854
|
+
.sw-timeline[data-orientation='horizontal'] .sw-timeline__marker { grid-row: 1; }
|
|
2855
|
+
.sw-timeline[data-orientation='horizontal'] .sw-timeline__item > :not(.sw-timeline__marker, .sw-timeline__connector) { grid-column: 1; grid-row: 2; }
|
|
2856
|
+
.sw-timeline[data-orientation='horizontal'] .sw-timeline__connector { top: calc(var(--sw-tl-marker) / 2 - 0.75px); bottom: auto; left: calc(var(--sw-tl-marker) + 6px); right: 6px; width: auto; height: 1.5px; }
|
|
2857
|
+
.sw-timeline[data-orientation='horizontal'] .sw-timeline__connector[data-upcoming] { background: repeating-linear-gradient(to right, var(--sw-frame) 0 3px, transparent 3px 7px); }
|
|
2858
|
+
.sw-timeline[data-orientation='horizontal'] .sw-timeline__content { padding-top: 0; }
|
|
2859
|
+
.sw-timeline[data-orientation='horizontal'] .sw-timeline__head { flex-direction: column; align-items: flex-start; }
|
|
2860
|
+
|
|
2861
|
+
/* ── Waterfall ── */
|
|
2862
|
+
.sw-waterfall {
|
|
2863
|
+
--sw-sq-bg: var(--sw-background);
|
|
2864
|
+
--sw-sq-border: var(--sw-frame);
|
|
2865
|
+
--sw-waterfall-name-width: 200px;
|
|
2866
|
+
--sw-inset: 4px;
|
|
2867
|
+
position: relative;
|
|
2868
|
+
padding: var(--sw-inset);
|
|
2869
|
+
min-width: 0;
|
|
2870
|
+
font-family: var(--sw-font-sans);
|
|
2871
|
+
font-size: 13px;
|
|
2872
|
+
color: var(--sw-foreground);
|
|
2873
|
+
container-type: inline-size;
|
|
2874
|
+
}
|
|
2875
|
+
@media (max-width: 520px) { .sw-waterfall { --sw-waterfall-name-width: 112px; } }
|
|
2876
|
+
@container (max-width: 560px) { .sw-waterfall__tick:nth-child(even):not([data-edge]) { display: none; } }
|
|
2877
|
+
.sw-waterfall__grid { display: flex; flex-direction: column; }
|
|
2878
|
+
.sw-waterfall__row {
|
|
2879
|
+
position: relative;
|
|
2880
|
+
display: grid;
|
|
2881
|
+
grid-template-columns: var(--sw-waterfall-cols);
|
|
2882
|
+
align-items: center;
|
|
2883
|
+
column-gap: 12px;
|
|
2884
|
+
min-height: 32px;
|
|
2885
|
+
padding: 0 8px;
|
|
2886
|
+
/* Concentric with the frame: frame radius − 4px inset. */
|
|
2887
|
+
border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape);
|
|
2888
|
+
outline: none;
|
|
2889
|
+
cursor: default;
|
|
2890
|
+
}
|
|
2891
|
+
.sw-waterfall__row:not(.sw-waterfall__row--header):hover { background: var(--sw-item-hover); z-index: 2; }
|
|
2892
|
+
.sw-waterfall__row:focus-visible { box-shadow: inset 0 0 0 2px var(--sw-accent); z-index: 2; }
|
|
2893
|
+
/* Selected = neutral fill + 500 (system rule). */
|
|
2894
|
+
.sw-waterfall__row[data-selected] { background: var(--sw-item-selected); }
|
|
2895
|
+
.sw-waterfall__row[data-selected] .sw-waterfall__label { font-weight: 500; }
|
|
2896
|
+
.sw-waterfall__row--header {
|
|
2897
|
+
min-height: 30px;
|
|
2898
|
+
margin-bottom: 4px;
|
|
2899
|
+
border-radius: 0;
|
|
2900
|
+
border-bottom: 1px solid var(--sw-hairline);
|
|
2901
|
+
font-family: var(--sw-font-mono);
|
|
2902
|
+
font-size: 10px;
|
|
2903
|
+
letter-spacing: 0.08em;
|
|
2904
|
+
text-transform: uppercase;
|
|
2905
|
+
color: var(--sw-muted-foreground);
|
|
2906
|
+
}
|
|
2907
|
+
.sw-waterfall__name { display: flex; align-items: center; gap: 6px; min-width: 0; padding-inline-start: calc(var(--sw-waterfall-level, 0) * 14px); }
|
|
2908
|
+
.sw-waterfall__toggle {
|
|
2909
|
+
display: inline-grid;
|
|
2910
|
+
place-items: center;
|
|
2911
|
+
flex-shrink: 0;
|
|
2912
|
+
width: 18px;
|
|
2913
|
+
height: 18px;
|
|
2914
|
+
padding: 0;
|
|
2915
|
+
border: 0;
|
|
2916
|
+
border-radius: 4px;
|
|
2917
|
+
corner-shape: var(--sw-corner-shape);
|
|
2918
|
+
background: transparent;
|
|
2919
|
+
color: var(--sw-muted-foreground);
|
|
2920
|
+
cursor: pointer;
|
|
2921
|
+
}
|
|
2922
|
+
.sw-waterfall__toggle[data-leaf] { cursor: default; }
|
|
2923
|
+
.sw-waterfall__toggle:not([data-leaf]):hover { background: var(--sw-item-active); color: var(--sw-foreground); }
|
|
2924
|
+
.sw-waterfall__toggle svg { width: 12px; height: 12px; transition: transform var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
2925
|
+
.sw-waterfall__toggle[data-state='open'] svg { transform: rotate(90deg); }
|
|
2926
|
+
.sw-waterfall__swatch { flex-shrink: 0; width: 8px; height: 8px; border-radius: 2px; background: var(--sw-waterfall-color, var(--sw-chart-1)); }
|
|
2927
|
+
.sw-waterfall__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
|
|
2928
|
+
.sw-waterfall__cell { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-family: var(--sw-font-mono); font-size: 11px; color: var(--sw-muted-foreground); white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
2929
|
+
.sw-waterfall__axis { position: relative; align-self: stretch; }
|
|
2930
|
+
.sw-waterfall__tick { position: absolute; top: 50%; left: var(--sw-waterfall-pos); transform: translate(-50%, -50%); white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
2931
|
+
.sw-waterfall__tick[data-edge='start'] { transform: translate(0, -50%); }
|
|
2932
|
+
.sw-waterfall__tick[data-edge='end'] { transform: translate(-100%, -50%); }
|
|
2933
|
+
.sw-waterfall__track { position: relative; align-self: stretch; min-height: 32px; }
|
|
2934
|
+
.sw-waterfall__bar {
|
|
2935
|
+
position: absolute;
|
|
2936
|
+
top: 50%;
|
|
2937
|
+
left: var(--sw-waterfall-start);
|
|
2938
|
+
width: max(2px, var(--sw-waterfall-size));
|
|
2939
|
+
height: 12px;
|
|
2940
|
+
transform: translateY(-50%);
|
|
2941
|
+
border-radius: 3px;
|
|
2942
|
+
background: var(--sw-waterfall-color);
|
|
2943
|
+
transition: opacity var(--sw-duration-fast) var(--sw-ease-standard), height var(--sw-duration-fast) var(--sw-ease-standard);
|
|
2944
|
+
}
|
|
2945
|
+
.sw-waterfall__row[data-branch] .sw-waterfall__bar { opacity: 0.85; }
|
|
2946
|
+
.sw-waterfall__row:hover .sw-waterfall__bar, .sw-waterfall__row[data-selected] .sw-waterfall__bar { height: 16px; opacity: 1; }
|
|
2947
|
+
.sw-waterfall__duration {
|
|
2948
|
+
position: absolute;
|
|
2949
|
+
top: 50%;
|
|
2950
|
+
left: calc(var(--sw-waterfall-start) + var(--sw-waterfall-size) + 6px);
|
|
2951
|
+
transform: translateY(-50%);
|
|
2952
|
+
font-family: var(--sw-font-mono);
|
|
2953
|
+
font-size: 10px;
|
|
2954
|
+
color: var(--sw-muted-foreground);
|
|
2955
|
+
white-space: nowrap;
|
|
2956
|
+
pointer-events: none;
|
|
2957
|
+
font-variant-numeric: tabular-nums;
|
|
2958
|
+
}
|
|
2959
|
+
.sw-waterfall__duration[data-side='before'] { left: auto; right: calc(100% - var(--sw-waterfall-start) + 6px); }
|
|
2960
|
+
.sw-waterfall__duration[data-side='inside'] { left: auto; right: calc(100% - var(--sw-waterfall-start) - var(--sw-waterfall-size) + 6px); color: var(--sw-background); font-weight: 500; }
|
|
2961
|
+
.sw-waterfall__mark-line { position: absolute; top: 0; bottom: 0; left: var(--sw-waterfall-pos); border-left: 1px dashed color-mix(in oklab, var(--sw-foreground) 28%, transparent); pointer-events: none; }
|
|
2962
|
+
.sw-waterfall__detail {
|
|
2963
|
+
position: absolute;
|
|
2964
|
+
top: calc(100% - 2px);
|
|
2965
|
+
left: var(--sw-waterfall-start);
|
|
2966
|
+
z-index: 5;
|
|
2967
|
+
min-width: 180px;
|
|
2968
|
+
max-width: 260px;
|
|
2969
|
+
padding: 10px 12px;
|
|
2970
|
+
border: 1px solid var(--sw-frame);
|
|
2971
|
+
border-radius: var(--sw-radius-sm);
|
|
2972
|
+
corner-shape: var(--sw-corner-shape);
|
|
2973
|
+
background: var(--sw-background);
|
|
2974
|
+
pointer-events: none;
|
|
2975
|
+
animation: sw-waterfall-in var(--sw-duration-fast) var(--sw-ease-standard);
|
|
2976
|
+
}
|
|
2977
|
+
.sw-waterfall__detail[data-side='end'] { left: auto; right: calc(100% - var(--sw-waterfall-start) - var(--sw-waterfall-size)); }
|
|
2978
|
+
@keyframes sw-waterfall-in { from { opacity: 0; transform: translateY(-3px); } }
|
|
2979
|
+
.sw-waterfall__detail-title { margin-bottom: 6px; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
|
|
2980
|
+
.sw-waterfall__detail dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 12px; }
|
|
2981
|
+
.sw-waterfall__detail dt { font-family: var(--sw-font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sw-muted-foreground); align-self: center; }
|
|
2982
|
+
.sw-waterfall__detail dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
|
|
2983
|
+
.sw-waterfall__footer {
|
|
2984
|
+
display: flex;
|
|
2985
|
+
flex-wrap: wrap;
|
|
2986
|
+
gap: 6px 16px;
|
|
2987
|
+
margin-top: 4px;
|
|
2988
|
+
padding: 10px 8px 4px;
|
|
2989
|
+
border-top: 1px solid var(--sw-hairline);
|
|
2990
|
+
font-family: var(--sw-font-mono);
|
|
2991
|
+
font-size: 10px;
|
|
2992
|
+
letter-spacing: 0.08em;
|
|
2993
|
+
text-transform: uppercase;
|
|
2994
|
+
color: var(--sw-muted-foreground);
|
|
2995
|
+
}
|
|
2996
|
+
.sw-waterfall__legend { display: inline-flex; align-items: center; gap: 6px; }
|
|
2997
|
+
.sw-waterfall__mark-key { width: 12px; border-top: 1px dashed color-mix(in oklab, var(--sw-foreground) 40%, transparent); }
|
|
2998
|
+
|
|
2999
|
+
/* ── Color Picker ── */
|
|
3000
|
+
.sw-color-picker, .sw-color-picker__trigger {
|
|
3001
|
+
--sw-cp-checker: repeating-conic-gradient(color-mix(in oklab, var(--sw-foreground) 12%, var(--sw-background)) 0 25%, var(--sw-background) 0 50%) 0 0 / 8px 8px;
|
|
3002
|
+
/* One inner shape: host radius − host inset (panel: 20 − 12 = 8px; trigger: 10 − its left padding). */
|
|
3003
|
+
--sw-cp-inner: max(4px, calc(var(--sw-sq-r, 20px) - var(--sw-inset, 12px)));
|
|
3004
|
+
}
|
|
3005
|
+
.sw-color-picker {
|
|
3006
|
+
--sw-sq-bg: var(--sw-background);
|
|
3007
|
+
--sw-sq-border: var(--sw-frame);
|
|
3008
|
+
--sw-inset: 12px;
|
|
3009
|
+
display: flex;
|
|
3010
|
+
flex-direction: column;
|
|
3011
|
+
gap: 12px;
|
|
3012
|
+
width: 264px;
|
|
3013
|
+
max-width: 100%;
|
|
3014
|
+
padding: var(--sw-inset);
|
|
3015
|
+
font-family: var(--sw-font-sans);
|
|
3016
|
+
color: var(--sw-foreground);
|
|
3017
|
+
}
|
|
3018
|
+
.sw-color-picker[data-disabled] { opacity: var(--sw-disabled-opacity); }
|
|
3019
|
+
.sw-color-picker[data-disabled] .sw-color-picker__area, .sw-color-picker[data-disabled] .sw-color-picker__slider { pointer-events: none; }
|
|
3020
|
+
.sw-color-picker__area {
|
|
3021
|
+
position: relative;
|
|
3022
|
+
height: 164px;
|
|
3023
|
+
/* The thumb is centered on the gradient edge at 0% and 100%, including at the panel corners. */
|
|
3024
|
+
margin: 8px 8px 2px;
|
|
3025
|
+
touch-action: none;
|
|
3026
|
+
cursor: crosshair;
|
|
3027
|
+
user-select: none;
|
|
3028
|
+
}
|
|
3029
|
+
.sw-color-picker__area-bg {
|
|
3030
|
+
position: absolute;
|
|
3031
|
+
inset: 0;
|
|
3032
|
+
border-radius: var(--sw-cp-inner); corner-shape: var(--sw-corner-shape);
|
|
3033
|
+
background: linear-gradient(to top, black, transparent), linear-gradient(to right, white, var(--sw-cp-hue));
|
|
3034
|
+
}
|
|
3035
|
+
.sw-color-picker__area-bg::after { content: ''; position: absolute; inset: 0; border-radius: inherit; corner-shape: inherit; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--sw-foreground) 10%, transparent); }
|
|
3036
|
+
.sw-color-picker__thumb {
|
|
3037
|
+
position: absolute;
|
|
3038
|
+
top: 50%;
|
|
3039
|
+
z-index: 1;
|
|
3040
|
+
width: 18px;
|
|
3041
|
+
height: 18px;
|
|
3042
|
+
border-radius: 50%;
|
|
3043
|
+
transform: translate(-50%, -50%);
|
|
3044
|
+
background: var(--sw-cp-solid);
|
|
3045
|
+
box-shadow: inset 0 0 0 3px white, 0 0 0 1px rgb(0 0 0 / 0.22), 0 1px 3px rgb(0 0 0 / 0.25);
|
|
3046
|
+
outline: none;
|
|
3047
|
+
cursor: grab;
|
|
3048
|
+
transition: scale var(--sw-duration-fast) var(--sw-ease-standard);
|
|
3049
|
+
}
|
|
3050
|
+
.sw-color-picker__thumb:active { cursor: grabbing; scale: 1.1; }
|
|
3051
|
+
.sw-color-picker__thumb:focus-visible { box-shadow: inset 0 0 0 3px white, 0 0 0 1px rgb(0 0 0 / 0.22), 0 0 0 4px var(--sw-accent); }
|
|
3052
|
+
.sw-color-picker__slider { position: relative; height: 14px; margin: 0 2px; touch-action: none; cursor: pointer; user-select: none; }
|
|
3053
|
+
.sw-color-picker__track { position: absolute; inset: 0; border-radius: var(--sw-cp-inner); corner-shape: var(--sw-corner-shape); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--sw-foreground) 10%, transparent); }
|
|
3054
|
+
.sw-color-picker__slider[data-channel='hue'] .sw-color-picker__track { background: linear-gradient(to right, red, yellow, lime, cyan, blue, magenta, red); }
|
|
3055
|
+
.sw-color-picker__slider[data-channel='alpha'] .sw-color-picker__track { background: linear-gradient(to right, transparent, var(--sw-cp-solid)), var(--sw-cp-checker); }
|
|
3056
|
+
.sw-color-picker__slider[data-channel='hue'] .sw-color-picker__thumb { background: var(--sw-cp-hue); }
|
|
3057
|
+
.sw-color-picker__slider[data-channel='alpha'] .sw-color-picker__thumb { background: linear-gradient(var(--sw-cp-color), var(--sw-cp-color)), var(--sw-cp-checker); }
|
|
3058
|
+
.sw-color-picker__row { display: flex; align-items: center; gap: 8px; }
|
|
3059
|
+
.sw-color-picker__preview {
|
|
3060
|
+
flex-shrink: 0;
|
|
3061
|
+
width: 32px;
|
|
3062
|
+
height: 32px;
|
|
3063
|
+
border-radius: var(--sw-cp-inner); corner-shape: var(--sw-corner-shape);
|
|
3064
|
+
background: linear-gradient(var(--sw-cp-color), var(--sw-cp-color)), var(--sw-cp-checker);
|
|
3065
|
+
box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--sw-foreground) 12%, transparent);
|
|
3066
|
+
}
|
|
3067
|
+
.sw-color-picker__input { flex: 1; }
|
|
3068
|
+
.sw-color-picker__input .sw-input__control { font-family: var(--sw-font-mono); font-size: 12px; letter-spacing: 0.02em; }
|
|
3069
|
+
.sw-color-picker__presets { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
|
|
3070
|
+
.sw-color-picker__preset {
|
|
3071
|
+
width: 22px;
|
|
3072
|
+
height: 22px;
|
|
3073
|
+
border-radius: var(--sw-cp-inner); corner-shape: var(--sw-corner-shape);
|
|
3074
|
+
background: linear-gradient(var(--sw-cp-preset), var(--sw-cp-preset)), var(--sw-cp-checker);
|
|
3075
|
+
box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--sw-foreground) 12%, transparent);
|
|
3076
|
+
outline: none;
|
|
3077
|
+
cursor: pointer;
|
|
3078
|
+
transition: scale var(--sw-duration-fast) var(--sw-ease-standard);
|
|
3079
|
+
}
|
|
3080
|
+
.sw-color-picker__preset:hover { scale: 1.08; }
|
|
3081
|
+
.sw-color-picker__preset[aria-selected='true'] { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--sw-foreground) 12%, transparent), 0 0 0 2px var(--sw-background), 0 0 0 3.5px var(--sw-foreground); }
|
|
3082
|
+
.sw-color-picker__preset:focus-visible { box-shadow: 0 0 0 2px var(--sw-background), 0 0 0 4px var(--sw-accent); }
|
|
3083
|
+
.sw-color-picker__preset[aria-disabled='true'] { cursor: default; scale: 1; }
|
|
3084
|
+
|
|
3085
|
+
.sw-color-picker-popover { display: inline-flex; }
|
|
3086
|
+
.sw-color-picker__trigger {
|
|
3087
|
+
--sw-sq-bg: var(--sw-background);
|
|
3088
|
+
--sw-sq-border: var(--sw-frame);
|
|
3089
|
+
--sw-inset: 6px;
|
|
3090
|
+
display: inline-flex;
|
|
3091
|
+
align-items: center;
|
|
3092
|
+
gap: 10px;
|
|
3093
|
+
height: 40px;
|
|
3094
|
+
padding: 0 14px 0 6px;
|
|
3095
|
+
border: 0;
|
|
3096
|
+
background: none;
|
|
3097
|
+
color: var(--sw-foreground);
|
|
3098
|
+
font-family: var(--sw-font-mono);
|
|
3099
|
+
font-size: 12px;
|
|
3100
|
+
letter-spacing: 0.02em;
|
|
3101
|
+
cursor: pointer;
|
|
3102
|
+
}
|
|
3103
|
+
.sw-color-picker__trigger .sw-color-picker__preview { width: 28px; height: 28px; }
|
|
3104
|
+
.sw-color-picker__trigger[data-size='sm'] { --sw-inset: 4px; height: 32px; padding-left: var(--sw-inset); }
|
|
3105
|
+
.sw-color-picker__trigger[data-size='sm'] .sw-color-picker__preview { width: 24px; height: 24px; }
|
|
3106
|
+
.sw-color-picker__trigger[data-size='lg'] { --sw-inset: 8px; height: 52px; padding-left: var(--sw-inset); font-size: 14px; }
|
|
3107
|
+
.sw-color-picker__trigger[data-size='lg'] .sw-color-picker__preview { width: 36px; height: 36px; }
|
|
3108
|
+
.sw-color-picker__trigger:hover { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 45%, var(--sw-background)); }
|
|
3109
|
+
.sw-color-picker__trigger[data-state='open'] { --sw-sq-border: var(--sw-accent); }
|
|
3110
|
+
.sw-color-picker__trigger:disabled { opacity: var(--sw-disabled-opacity); cursor: not-allowed; }
|
|
3111
|
+
.sw-color-picker__trigger-text { white-space: nowrap; }
|
|
3112
|
+
|
|
3113
|
+
/* ── File Input ── */
|
|
3114
|
+
.sw-file-input { display: flex; flex-direction: column; gap: 10px; width: 100%; min-width: 0; font-family: var(--sw-font-sans); color: var(--sw-foreground); }
|
|
3115
|
+
.sw-file-input__zone {
|
|
3116
|
+
--sw-sq-bg: color-mix(in oklab, var(--sw-muted) 55%, var(--sw-background));
|
|
3117
|
+
--sw-sq-border: color-mix(in oklab, var(--sw-foreground) 32%, var(--sw-background));
|
|
3118
|
+
display: flex;
|
|
3119
|
+
flex-direction: column;
|
|
3120
|
+
align-items: center;
|
|
3121
|
+
gap: 6px;
|
|
3122
|
+
padding: 24px 16px 20px;
|
|
3123
|
+
text-align: center;
|
|
3124
|
+
cursor: pointer;
|
|
3125
|
+
outline: none;
|
|
3126
|
+
}
|
|
3127
|
+
.sw-file-input__zone > * { pointer-events: none; }
|
|
3128
|
+
.sw-file-input__zone > .sw-button { pointer-events: auto; margin-top: 6px; }
|
|
3129
|
+
.sw-file-input__zone > .sw-sq-stroke path { stroke-dasharray: 3 4; stroke-linecap: round; }
|
|
3130
|
+
.sw-file-input__zone:hover { --sw-sq-border: color-mix(in oklab, var(--sw-foreground) 35%, var(--sw-background)); }
|
|
3131
|
+
.sw-file-input__zone[data-drag-accept] { --sw-sq-border: var(--sw-accent); --sw-sq-bg: color-mix(in oklab, var(--sw-accent) 7%, var(--sw-background)); }
|
|
3132
|
+
.sw-file-input__zone[data-drag-reject] { --sw-sq-border: var(--sw-danger); --sw-sq-bg: color-mix(in oklab, var(--sw-danger) 6%, var(--sw-background)); }
|
|
3133
|
+
/* Bare 20px icon: the dashed zone is already the frame (no frame-in-frame). */
|
|
3134
|
+
.sw-file-input__glyph {
|
|
3135
|
+
display: inline-flex;
|
|
3136
|
+
width: 20px;
|
|
3137
|
+
height: 20px;
|
|
3138
|
+
margin-bottom: 4px;
|
|
3139
|
+
color: var(--sw-muted-foreground);
|
|
3140
|
+
transition: transform var(--sw-duration-base) var(--sw-ease-standard), color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
3141
|
+
}
|
|
3142
|
+
.sw-file-input__glyph svg { width: 20px; height: 20px; }
|
|
3143
|
+
.sw-file-input__zone:hover .sw-file-input__glyph { color: var(--sw-foreground); }
|
|
3144
|
+
.sw-file-input__zone[data-drag-accept] .sw-file-input__glyph { transform: translateY(-3px); color: var(--sw-accent); }
|
|
3145
|
+
.sw-file-input__zone[data-drag-reject] .sw-file-input__glyph { color: var(--sw-danger); }
|
|
3146
|
+
.sw-file-input__title { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
|
|
3147
|
+
.sw-file-input__hint { max-width: 32ch; font-size: 13px; line-height: 1.4; text-wrap: balance; color: var(--sw-muted-foreground); }
|
|
3148
|
+
.sw-file-input__bar { display: flex; }
|
|
3149
|
+
.sw-file-input[data-disabled] { opacity: var(--sw-disabled-opacity); }
|
|
3150
|
+
.sw-file-input[data-disabled] .sw-file-input__zone { cursor: not-allowed; }
|
|
3151
|
+
.sw-file-input__list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
|
|
3152
|
+
/* Rows: CSS squircle (sm radius, corner-shape) with the 1px frame; thumb and remove button are concentric (10 − 6 = 4px). */
|
|
3153
|
+
.sw-file-input__item {
|
|
3154
|
+
--sw-sq-r: var(--sw-radius-sm);
|
|
3155
|
+
--sw-inset: 6px;
|
|
3156
|
+
display: flex;
|
|
3157
|
+
align-items: center;
|
|
3158
|
+
gap: 10px;
|
|
3159
|
+
min-height: 44px;
|
|
3160
|
+
padding: 5px;
|
|
3161
|
+
border: 1px solid var(--sw-frame);
|
|
3162
|
+
border-radius: var(--sw-sq-r);
|
|
3163
|
+
corner-shape: var(--sw-corner-shape);
|
|
3164
|
+
background: var(--sw-background);
|
|
3165
|
+
outline: none;
|
|
3166
|
+
overflow: hidden;
|
|
3167
|
+
}
|
|
3168
|
+
.sw-file-input__item:focus-visible { border-color: var(--sw-accent); box-shadow: 0 0 0 1px var(--sw-accent); }
|
|
3169
|
+
.sw-file-input__thumb { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; overflow: hidden; border-radius: max(4px, calc(var(--sw-sq-r) - var(--sw-inset))); corner-shape: var(--sw-corner-shape); background: var(--sw-muted); color: var(--sw-muted-foreground); }
|
|
3170
|
+
.sw-file-input__thumb img { width: 100%; height: 100%; object-fit: cover; }
|
|
3171
|
+
.sw-file-input__thumb svg { width: 16px; height: 16px; }
|
|
3172
|
+
.sw-file-input__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; letter-spacing: -0.01em; }
|
|
3173
|
+
.sw-file-input__size { flex-shrink: 0; font-family: var(--sw-font-mono); font-size: 11px; color: var(--sw-muted-foreground); font-variant-numeric: tabular-nums; }
|
|
3174
|
+
.sw-file-input__remove {
|
|
3175
|
+
display: grid;
|
|
3176
|
+
place-items: center;
|
|
3177
|
+
flex-shrink: 0;
|
|
3178
|
+
width: 28px;
|
|
3179
|
+
height: 28px;
|
|
3180
|
+
padding: 0;
|
|
3181
|
+
border: 0;
|
|
3182
|
+
border-radius: max(4px, calc(var(--sw-sq-r) - var(--sw-inset)));
|
|
3183
|
+
corner-shape: var(--sw-corner-shape);
|
|
3184
|
+
background: transparent;
|
|
3185
|
+
color: var(--sw-muted-foreground);
|
|
3186
|
+
cursor: pointer;
|
|
3187
|
+
}
|
|
3188
|
+
.sw-file-input__remove:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--sw-accent); }
|
|
3189
|
+
.sw-file-input__remove:hover { background: var(--sw-item-hover); color: var(--sw-foreground); }
|
|
3190
|
+
.sw-file-input__remove svg { width: 14px; height: 14px; }
|
|
3191
|
+
.sw-file-input__errors { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--sw-danger); }
|
|
3192
|
+
.sw-file-input__errors li { display: flex; align-items: center; gap: 6px; min-width: 0; }
|
|
3193
|
+
.sw-file-input__errors svg { width: 14px; height: 14px; flex-shrink: 0; }
|
|
3194
|
+
.sw-file-input__errors strong { font-weight: 500; overflow-wrap: anywhere; }
|
|
3195
|
+
|
|
3196
|
+
/* ── Image Cropper ── */
|
|
3197
|
+
.sw-image-cropper { display: flex; flex-direction: column; gap: 12px; width: 100%; min-width: 0; font-family: var(--sw-font-sans); color: var(--sw-foreground); }
|
|
3198
|
+
.sw-image-cropper__viewport {
|
|
3199
|
+
--sw-sq-bg: color-mix(in oklab, var(--sw-foreground) 88%, var(--sw-background));
|
|
3200
|
+
position: relative;
|
|
3201
|
+
overflow: hidden;
|
|
3202
|
+
touch-action: none;
|
|
3203
|
+
user-select: none;
|
|
3204
|
+
-webkit-user-select: none;
|
|
3205
|
+
}
|
|
3206
|
+
.sw-image-cropper[data-mode='frame'] .sw-image-cropper__viewport { cursor: grab; }
|
|
3207
|
+
.sw-image-cropper[data-mode='frame'][data-dragging] .sw-image-cropper__viewport { cursor: grabbing; }
|
|
3208
|
+
.sw-image-cropper__image { position: absolute; max-width: none; pointer-events: none; user-select: none; }
|
|
3209
|
+
.sw-image-cropper__empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: var(--sw-background); }
|
|
3210
|
+
.sw-image-cropper__selection {
|
|
3211
|
+
position: absolute;
|
|
3212
|
+
box-shadow: 0 0 0 9999px rgb(0 0 0 / 0.52);
|
|
3213
|
+
outline: 1px solid rgb(255 255 255 / 0.85);
|
|
3214
|
+
outline-offset: 0;
|
|
3215
|
+
cursor: move;
|
|
3216
|
+
}
|
|
3217
|
+
.sw-image-cropper[data-mode='frame'] .sw-image-cropper__selection { cursor: inherit; pointer-events: none; }
|
|
3218
|
+
.sw-image-cropper[data-shape='circle'] .sw-image-cropper__selection { border-radius: 50%; }
|
|
3219
|
+
.sw-image-cropper__selection:focus-visible { outline: 2px solid var(--sw-accent); }
|
|
3220
|
+
.sw-image-cropper__grid { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; opacity: 0.45; pointer-events: none; transition: opacity var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
3221
|
+
.sw-image-cropper[data-dragging] .sw-image-cropper__grid { opacity: 1; }
|
|
3222
|
+
.sw-image-cropper__grid i { position: absolute; background: rgb(255 255 255 / 0.55); }
|
|
3223
|
+
.sw-image-cropper__grid i:nth-child(1) { top: 0; bottom: 0; left: 33.333%; width: 1px; }
|
|
3224
|
+
.sw-image-cropper__grid i:nth-child(2) { top: 0; bottom: 0; left: 66.666%; width: 1px; }
|
|
3225
|
+
.sw-image-cropper__grid i:nth-child(3) { left: 0; right: 0; top: 33.333%; height: 1px; }
|
|
3226
|
+
.sw-image-cropper__grid i:nth-child(4) { left: 0; right: 0; top: 66.666%; height: 1px; }
|
|
3227
|
+
.sw-image-cropper__handle {
|
|
3228
|
+
position: absolute;
|
|
3229
|
+
width: 12px;
|
|
3230
|
+
height: 12px;
|
|
3231
|
+
margin: -6px 0 0 -6px;
|
|
3232
|
+
border-radius: 3px;
|
|
3233
|
+
background: white;
|
|
3234
|
+
box-shadow: 0 0 0 1px rgb(0 0 0 / 0.3), 0 1px 3px rgb(0 0 0 / 0.25);
|
|
3235
|
+
outline: none;
|
|
3236
|
+
touch-action: none;
|
|
3237
|
+
}
|
|
3238
|
+
.sw-image-cropper__handle::before { content: ''; position: absolute; inset: -10px; }
|
|
3239
|
+
.sw-image-cropper__handle:focus-visible { box-shadow: 0 0 0 2px var(--sw-accent), 0 0 0 4px white; }
|
|
3240
|
+
.sw-image-cropper__handle[data-position='nw'] { left: 0; top: 0; cursor: nwse-resize; }
|
|
3241
|
+
.sw-image-cropper__handle[data-position='n'] { left: 50%; top: 0; cursor: ns-resize; }
|
|
3242
|
+
.sw-image-cropper__handle[data-position='ne'] { left: 100%; top: 0; cursor: nesw-resize; }
|
|
3243
|
+
.sw-image-cropper__handle[data-position='e'] { left: 100%; top: 50%; cursor: ew-resize; }
|
|
3244
|
+
.sw-image-cropper__handle[data-position='se'] { left: 100%; top: 100%; cursor: nwse-resize; }
|
|
3245
|
+
.sw-image-cropper__handle[data-position='s'] { left: 50%; top: 100%; cursor: ns-resize; }
|
|
3246
|
+
.sw-image-cropper__handle[data-position='sw'] { left: 0; top: 100%; cursor: nesw-resize; }
|
|
3247
|
+
.sw-image-cropper__handle[data-position='w'] { left: 0; top: 50%; cursor: ew-resize; }
|
|
3248
|
+
.sw-image-cropper__handle:is([data-position='n'], [data-position='s'], [data-position='e'], [data-position='w']) { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; }
|
|
3249
|
+
.sw-image-cropper[data-shape='circle'] .sw-image-cropper__handle:is([data-position='nw'], [data-position='ne'], [data-position='se'], [data-position='sw']) { opacity: 0.6; }
|
|
3250
|
+
.sw-image-cropper[data-disabled] { opacity: 0.6; }
|
|
3251
|
+
.sw-image-cropper[data-disabled] .sw-image-cropper__selection, .sw-image-cropper[data-disabled] .sw-image-cropper__handle { pointer-events: none; }
|
|
3252
|
+
.sw-image-cropper__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
|
|
3253
|
+
.sw-image-cropper__zoom { display: flex; flex: 1 1 200px; align-items: center; gap: 10px; min-width: 0; }
|
|
3254
|
+
.sw-image-cropper__zoom-label { font-family: var(--sw-font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sw-muted-foreground); }
|
|
3255
|
+
.sw-image-cropper__zoom-value { width: 40px; text-align: right; font-family: var(--sw-font-mono); font-size: 11px; color: var(--sw-muted-foreground); font-variant-numeric: tabular-nums; }
|
|
3256
|
+
.sw-image-cropper__zoom input {
|
|
3257
|
+
flex: 1;
|
|
3258
|
+
min-width: 0;
|
|
3259
|
+
height: 4px;
|
|
3260
|
+
margin: 0;
|
|
3261
|
+
border-radius: 999px;
|
|
3262
|
+
background: linear-gradient(to right, var(--sw-foreground) var(--sw-ic-fill, 0%), var(--sw-muted) var(--sw-ic-fill, 0%));
|
|
3263
|
+
appearance: none;
|
|
3264
|
+
-webkit-appearance: none;
|
|
3265
|
+
cursor: pointer;
|
|
3266
|
+
outline: none;
|
|
3267
|
+
}
|
|
3268
|
+
.sw-image-cropper__zoom input::-webkit-slider-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--sw-background); box-shadow: 0 0 0 1px var(--sw-frame), 0 1px 3px rgb(0 0 0 / 0.18); -webkit-appearance: none; appearance: none; }
|
|
3269
|
+
.sw-image-cropper__zoom input::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--sw-background); box-shadow: 0 0 0 1px var(--sw-frame), 0 1px 3px rgb(0 0 0 / 0.18); }
|
|
3270
|
+
.sw-image-cropper__zoom input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 1px var(--sw-frame), 0 0 0 4px color-mix(in oklab, var(--sw-accent) 45%, transparent); }
|
|
3271
|
+
.sw-image-cropper__zoom input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 1px var(--sw-frame), 0 0 0 4px color-mix(in oklab, var(--sw-accent) 45%, transparent); }
|
|
3272
|
+
.sw-image-cropper__zoom input:disabled { opacity: 0.5; cursor: default; }
|
|
3273
|
+
|
|
3274
|
+
/* ── Preferences ── */
|
|
3275
|
+
.sw-preferences { display: flex; flex-direction: column; width: 100%; min-width: 0; font-family: var(--sw-font-sans); color: var(--sw-foreground); }
|
|
3276
|
+
.sw-preferences__item { padding: 14px 0; border-bottom: 1px solid var(--sw-hairline); }
|
|
3277
|
+
.sw-preferences__item:first-child { padding-top: 0; }
|
|
3278
|
+
.sw-preferences__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
|
|
3279
|
+
.sw-preferences__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
3280
|
+
.sw-preferences__title { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
|
|
3281
|
+
.sw-preferences__description { font-size: 13px; color: var(--sw-muted-foreground); }
|
|
3282
|
+
.sw-preferences__footer { display: flex; justify-content: flex-end; padding-top: 12px; }
|
|
3283
|
+
|
|
3284
|
+
/* What the preferences do to the page (attributes written by <PreferencesProvider>). */
|
|
3285
|
+
:root[data-motion='reduce'] [data-sw], :root[data-motion='reduce'] [data-sw] * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
|
|
3286
|
+
:root:root[data-contrast='more'] {
|
|
3287
|
+
--sw-border: color-mix(in oklab, var(--sw-foreground) 42%, var(--sw-background));
|
|
3288
|
+
--sw-frame: color-mix(in oklab, var(--sw-foreground) 55%, var(--sw-background));
|
|
3289
|
+
--sw-hairline: color-mix(in oklab, var(--sw-foreground) 30%, var(--sw-background));
|
|
3290
|
+
--sw-muted-foreground: color-mix(in oklab, var(--sw-foreground) 82%, var(--sw-background));
|
|
3291
|
+
}
|
|
3292
|
+
[data-density='compact'] { --sw-density: 0.85; }
|
|
3293
|
+
[data-density='comfortable'] { --sw-density: 1; }
|
|
3294
|
+
[data-density='spacious'] { --sw-density: 1.2; }
|
|
3295
|
+
:root[data-font-size='sm'] { font-size: 93.75%; }
|
|
3296
|
+
:root[data-font-size='lg'] { font-size: 112.5%; }
|
|
3297
|
+
:root[data-font-size='sm'] .sw-root { font-size: 15px; }
|
|
3298
|
+
:root[data-font-size='lg'] .sw-root { font-size: 18px; }
|
|
3299
|
+
|
|
3300
|
+
/* Containers publish the inner radius for their fills (base.css). */
|
|
3301
|
+
.sw-waterfall { --sw-inner-r: max(4px, calc(var(--sw-sq-r, 14px) - var(--sw-inset, 4px))); }
|
|
3302
|
+
|
|
3303
|
+
/* kit-dashboard.css */
|
|
3304
|
+
/* ── Dashboard layout (1.0): AppShell, SidebarNav, DashboardGrid, Breadcrumbs, reorder feedback ──
|
|
3305
|
+
Everything inside a dashboard is an ordinary component (Card panel layout, Listbox, Accordion,
|
|
3306
|
+
Tabs metric, Button xs/2xs, Input xs). Density: rows follow --sw-row-h (base.css). */
|
|
3307
|
+
|
|
3308
|
+
:root {
|
|
3309
|
+
--sw-shell-header-h: 44px;
|
|
3310
|
+
--sw-divider: var(--sw-border);
|
|
3311
|
+
}
|
|
3312
|
+
|
|
3313
|
+
|
|
3314
|
+
/* ── AppShell ── */
|
|
3315
|
+
.sw-app-shell {
|
|
3316
|
+
position: relative; isolation: isolate; display: grid; overflow: hidden;
|
|
3317
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
3318
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
3319
|
+
grid-template-areas: 'header header header' 'sidebar main inspector';
|
|
3320
|
+
min-width: 0; background: var(--sw-background); color: var(--sw-foreground);
|
|
3321
|
+
}
|
|
3322
|
+
.sw-app-shell[data-layout='sidebar-first'] { grid-template-areas: 'sidebar header header' 'sidebar main inspector'; }
|
|
3323
|
+
.sw-app-shell__header {
|
|
3324
|
+
grid-area: header; display: flex; align-items: center; gap: 8px; min-width: 0;
|
|
3325
|
+
height: var(--sw-shell-header-h); padding: 0 10px; box-shadow: inset 0 -1px 0 var(--sw-divider);
|
|
3326
|
+
background: var(--sw-app-shell-header-bg, var(--sw-background));
|
|
3327
|
+
}
|
|
3328
|
+
.sw-app-shell__slot { display: flex; align-items: center; gap: var(--sw-space-2); min-width: 0; }
|
|
3329
|
+
.sw-app-shell__slot[data-slot='start'] { flex: 1 1 0; }
|
|
3330
|
+
.sw-app-shell__slot[data-slot='center'] { flex: 0 1 440px; justify-content: center; }
|
|
3331
|
+
.sw-app-shell__slot[data-slot='end'] { flex: 0 0 auto; justify-content: flex-end; }
|
|
3332
|
+
.sw-app-shell__slot[data-slot='center'] + .sw-app-shell__slot[data-slot='end'] { flex: 1 1 0; }
|
|
3333
|
+
|
|
3334
|
+
.sw-app-shell__region {
|
|
3335
|
+
position: relative; min-height: 0; min-width: 0;
|
|
3336
|
+
transition: width var(--sw-duration-base) var(--sw-ease-standard);
|
|
3337
|
+
}
|
|
3338
|
+
.sw-app-shell__region[data-resizing], html[data-sw-resizing] .sw-app-shell__region, .sw-app-shell[data-instant] .sw-app-shell__region { transition: none; }
|
|
3339
|
+
.sw-app-shell__sidebar { grid-area: sidebar; background: var(--sw-app-shell-sidebar-bg, var(--sw-canvas)); }
|
|
3340
|
+
.sw-app-shell__inspector { grid-area: inspector; background: var(--sw-app-shell-inspector-bg, var(--sw-background)); }
|
|
3341
|
+
.sw-app-shell__sidebar:not([data-state='closed']):not([data-sheet]) { box-shadow: inset -1px 0 0 var(--sw-divider); }
|
|
3342
|
+
.sw-app-shell__inspector:not([data-state='closed']):not([data-sheet]) { box-shadow: inset 1px 0 0 var(--sw-divider); }
|
|
3343
|
+
.sw-app-shell__region-inner { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
|
|
3344
|
+
.sw-app-shell__region:not([data-sheet]) { overflow: visible; }
|
|
3345
|
+
.sw-app-shell__region:not([data-sheet]) > .sw-app-shell__region-inner { max-width: 100%; }
|
|
3346
|
+
.sw-app-shell__region-header {
|
|
3347
|
+
display: flex; align-items: center; gap: 6px; flex: none; height: var(--sw-shell-header-h); padding: 0 8px;
|
|
3348
|
+
box-shadow: inset 0 -1px 0 var(--sw-divider);
|
|
3349
|
+
}
|
|
3350
|
+
.sw-app-shell__region-body { flex: 1; min-height: 0; overflow: auto; padding: 8px; }
|
|
3351
|
+
.sw-app-shell__region-footer { flex: none; padding: 8px; border-top: 1px solid var(--sw-divider); }
|
|
3352
|
+
.sw-app-shell__sidebar[data-state='rail'] .sw-app-shell__region-body,
|
|
3353
|
+
.sw-app-shell__sidebar[data-state='rail'] .sw-app-shell__region-footer { padding-inline: 8px; overflow-x: hidden; }
|
|
3354
|
+
.sw-app-shell__inspector .sw-app-shell__region-body { padding: 0; }
|
|
3355
|
+
|
|
3356
|
+
.sw-app-shell__resizer { position: absolute; top: 0; bottom: 0; z-index: 5; width: 9px; cursor: col-resize; outline: none; touch-action: none; }
|
|
3357
|
+
.sw-app-shell__sidebar > .sw-app-shell__resizer { right: -5px; }
|
|
3358
|
+
.sw-app-shell__inspector > .sw-app-shell__resizer { left: -5px; }
|
|
3359
|
+
.sw-app-shell__resizer::after {
|
|
3360
|
+
content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 3px; opacity: 0;
|
|
3361
|
+
background: color-mix(in oklab, var(--sw-foreground) 28%, transparent);
|
|
3362
|
+
transition: opacity var(--sw-duration-fast) var(--sw-ease-standard);
|
|
3363
|
+
}
|
|
3364
|
+
.sw-app-shell__resizer:hover::after, .sw-app-shell__region[data-resizing] > .sw-app-shell__resizer::after { opacity: 1; transition-delay: 150ms; }
|
|
3365
|
+
.sw-app-shell__resizer:focus-visible::after { opacity: 1; background: var(--sw-accent); }
|
|
3366
|
+
html[data-sw-resizing='col'], html[data-sw-resizing='col'] * { cursor: col-resize !important; user-select: none; }
|
|
3367
|
+
|
|
3368
|
+
.sw-app-shell__main { grid-area: main; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--sw-app-shell-main-bg, var(--sw-background)); }
|
|
3369
|
+
.sw-app-shell__main-header {
|
|
3370
|
+
display: flex; align-items: center; gap: 8px; flex: none; min-width: 0; height: var(--sw-shell-header-h);
|
|
3371
|
+
padding: 0 16px; box-shadow: inset 0 -1px 0 var(--sw-divider);
|
|
3372
|
+
}
|
|
3373
|
+
.sw-app-shell__main-body { flex: 1; min-height: 0; overflow: auto; }
|
|
3374
|
+
.sw-app-shell__main[data-padding='sm'] > .sw-app-shell__main-body { padding: 12px; }
|
|
3375
|
+
.sw-app-shell__main[data-padding='md'] > .sw-app-shell__main-body { padding: 16px; }
|
|
3376
|
+
.sw-app-shell__main[data-padding='lg'] > .sw-app-shell__main-body { padding: 24px; }
|
|
3377
|
+
|
|
3378
|
+
/* Narrow containers: the sidebar and inspector slide over the content as sheets. */
|
|
3379
|
+
.sw-app-shell__region[data-sheet] {
|
|
3380
|
+
/* Out of its grid area, so the containing block is the whole shell. */
|
|
3381
|
+
grid-area: auto; position: absolute; top: 0; bottom: 0; z-index: 20; overflow: hidden;
|
|
3382
|
+
width: var(--sw-shell-sheet-w, 300px); max-width: calc(100% - 48px);
|
|
3383
|
+
background: var(--sw-background); box-shadow: var(--sw-shadow-modal);
|
|
3384
|
+
visibility: hidden;
|
|
3385
|
+
transition: transform var(--sw-duration-slow) var(--sw-ease-emphasized), visibility 0s linear var(--sw-duration-slow);
|
|
3386
|
+
}
|
|
3387
|
+
.sw-app-shell__sidebar[data-sheet] { left: 0; transform: translateX(-100%); }
|
|
3388
|
+
.sw-app-shell__inspector[data-sheet] { right: 0; transform: translateX(100%); }
|
|
3389
|
+
.sw-app-shell__region[data-sheet][data-state='open'] { transform: none; visibility: visible; transition-delay: 0s; }
|
|
3390
|
+
/* Narrow header: the search takes the middle, breadcrumbs keep only the current page. */
|
|
3391
|
+
.sw-app-shell[data-narrow] .sw-app-shell__slot[data-slot='center'] { flex: 1 1 0; }
|
|
3392
|
+
.sw-app-shell[data-narrow] .sw-app-shell__header:has(> .sw-app-shell__slot[data-slot='center']) > .sw-app-shell__slot:is([data-slot='start'], [data-slot='end']) { flex: 0 1 auto; }
|
|
3393
|
+
.sw-app-shell[data-narrow] .sw-breadcrumbs__item:not([data-current]) { display: none; }
|
|
3394
|
+
.sw-app-shell__scrim { grid-area: auto; position: absolute; inset: 0; z-index: 19; background: var(--sw-backdrop); animation: sw-fade-in var(--sw-duration-base) var(--sw-ease-standard); }
|
|
3395
|
+
@keyframes sw-fade-in { from { opacity: 0; } }
|
|
3396
|
+
|
|
3397
|
+
|
|
3398
|
+
/* ── SidebarNav ── */
|
|
3399
|
+
.sw-sidebar-nav { display: flex; flex-direction: column; gap: 12px; min-width: 0; font-size: 13px; }
|
|
3400
|
+
.sw-sidebar-nav[data-collapsed] { align-items: center; gap: 6px; }
|
|
3401
|
+
.sw-sidebar-group { display: flex; flex-direction: column; min-width: 0; }
|
|
3402
|
+
.sw-sidebar-group__items { display: flex; flex-direction: column; gap: 1px; padding-top: 1px; }
|
|
3403
|
+
.sw-sidebar-group[data-rail] { display: flex; flex-direction: column; align-items: center; gap: 2px; }
|
|
3404
|
+
.sw-sidebar-group[data-rail] + .sw-sidebar-group[data-rail] { padding-top: 6px; border-top: 1px solid var(--sw-divider); }
|
|
3405
|
+
.sw-sidebar-group__head { position: relative; display: flex; align-items: center; height: 28px; min-width: 0; }
|
|
3406
|
+
.sw-sidebar-group__trigger {
|
|
3407
|
+
display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; height: 28px; padding: 0 8px;
|
|
3408
|
+
border: 0; border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape); background: none; color: var(--sw-muted-foreground);
|
|
3409
|
+
font: inherit; font-size: 11px; font-weight: 500; letter-spacing: 0.02em; text-align: left; cursor: pointer; outline: none;
|
|
3410
|
+
}
|
|
3411
|
+
.sw-sidebar-group__trigger[data-static] { cursor: default; }
|
|
3412
|
+
.sw-sidebar-group__trigger:hover { color: var(--sw-foreground); }
|
|
3413
|
+
.sw-sidebar-group__trigger:focus-visible { box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
3414
|
+
.sw-sidebar-group__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
3415
|
+
.sw-sidebar-group__chevron { display: inline-flex; width: 12px; height: 12px; opacity: 0; transition: transform var(--sw-duration-fast) var(--sw-ease-standard), opacity var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
3416
|
+
.sw-sidebar-group__chevron svg { width: 12px; height: 12px; }
|
|
3417
|
+
.sw-sidebar-group[data-state='open'] .sw-sidebar-group__chevron { transform: rotate(90deg); }
|
|
3418
|
+
.sw-sidebar-group__head:hover .sw-sidebar-group__chevron, .sw-sidebar-group__trigger:focus-visible .sw-sidebar-group__chevron,
|
|
3419
|
+
.sw-sidebar-group[data-state='closed'] .sw-sidebar-group__chevron { opacity: 1; }
|
|
3420
|
+
|
|
3421
|
+
.sw-sidebar-item { position: relative; display: flex; align-items: center; min-width: 0; border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape); }
|
|
3422
|
+
.sw-sidebar-item:not([data-rail]):hover { background: var(--sw-item-hover); }
|
|
3423
|
+
.sw-sidebar-item[data-active] { background: var(--sw-item-selected); }
|
|
3424
|
+
.sw-sidebar-item__main {
|
|
3425
|
+
display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 28px; padding: 0 8px;
|
|
3426
|
+
border: 0; border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape); background: none; color: var(--sw-subtle);
|
|
3427
|
+
font: inherit; font-size: 13px; text-align: left; text-decoration: none; cursor: pointer; outline: none;
|
|
3428
|
+
}
|
|
3429
|
+
.sw-sidebar-item:has(> .sw-sidebar-item__trail) > .sw-sidebar-item__main { padding-right: 40px; }
|
|
3430
|
+
.sw-sidebar-item__main:hover, .sw-sidebar-item[data-active] > .sw-sidebar-item__main { color: var(--sw-foreground); }
|
|
3431
|
+
.sw-sidebar-item[data-active] > .sw-sidebar-item__main { font-weight: 500; }
|
|
3432
|
+
.sw-sidebar-item__main:focus-visible { box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
3433
|
+
.sw-sidebar-item__main[data-disabled] { opacity: 0.45; cursor: default; }
|
|
3434
|
+
.sw-sidebar-item__main[data-level='1'] { padding-left: 31px; }
|
|
3435
|
+
.sw-sidebar-item__main[data-level='2'] { padding-left: 54px; }
|
|
3436
|
+
.sw-sidebar-item__icon { display: inline-flex; flex: none; width: 15px; height: 15px; color: var(--sw-muted-foreground); }
|
|
3437
|
+
.sw-sidebar-item__icon > svg { width: 15px; height: 15px; }
|
|
3438
|
+
.sw-sidebar-item[data-active] .sw-sidebar-item__icon, .sw-sidebar-item__main:hover .sw-sidebar-item__icon { color: var(--sw-foreground); }
|
|
3439
|
+
.sw-sidebar-item__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
3440
|
+
.sw-sidebar-item[data-rail] { justify-content: center; }
|
|
3441
|
+
.sw-sidebar-item[data-rail] .sw-sidebar-item__main { flex: none; justify-content: center; width: 32px; height: 32px; padding: 0; }
|
|
3442
|
+
.sw-sidebar-item[data-rail] .sw-sidebar-item__main:hover { background: var(--sw-item-hover); }
|
|
3443
|
+
.sw-sidebar-item[data-rail] .sw-sidebar-item__main[aria-current='page'] { background: var(--sw-item-selected); color: var(--sw-foreground); }
|
|
3444
|
+
.sw-sidebar-item[data-rail] .sw-sidebar-item__label { display: none; }
|
|
3445
|
+
|
|
3446
|
+
/* Trailing slot: the count and the hover actions share one cell, so the row never reflows. */
|
|
3447
|
+
.sw-sidebar-item__trail { display: grid; align-items: center; justify-items: end; }
|
|
3448
|
+
.sw-sidebar-item__trail > * { grid-area: 1 / 1; }
|
|
3449
|
+
.sw-sidebar-item__trail { position: absolute; top: 0; right: 4px; bottom: 0; pointer-events: none; }
|
|
3450
|
+
.sw-sidebar-group__head > .sw-sidebar-item__trail { right: 4px; }
|
|
3451
|
+
.sw-sidebar-item__count { padding-right: 4px; font-family: var(--sw-font-mono); font-size: 11px; font-variant-numeric: tabular-nums; color: var(--sw-muted-foreground); }
|
|
3452
|
+
.sw-sidebar-item__actions { display: flex; align-items: center; gap: 2px; opacity: 0; pointer-events: none; transition: opacity var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
3453
|
+
.sw-sidebar-item:hover .sw-sidebar-item__actions, .sw-sidebar-item:focus-within .sw-sidebar-item__actions,
|
|
3454
|
+
.sw-sidebar-group__head:hover .sw-sidebar-item__actions, .sw-sidebar-group__head:focus-within .sw-sidebar-item__actions,
|
|
3455
|
+
.sw-sidebar-item__actions:is(:focus-within, :has([aria-expanded='true'])) { opacity: 1; pointer-events: auto; }
|
|
3456
|
+
.sw-sidebar-item__trail:has(> .sw-sidebar-item__actions:focus-within) > .sw-sidebar-item__count,
|
|
3457
|
+
.sw-sidebar-item__trail:has([aria-expanded='true']) > .sw-sidebar-item__count { visibility: hidden; }
|
|
3458
|
+
.sw-sidebar-item[data-has-actions]:is(:hover, :focus-within) .sw-sidebar-item__count,
|
|
3459
|
+
.sw-sidebar-group__head[data-has-actions]:is(:hover, :focus-within) .sw-sidebar-item__count { visibility: hidden; }
|
|
3460
|
+
|
|
3461
|
+
|
|
3462
|
+
/* ── Reorder feedback (primitives/reorder.tsx) ── */
|
|
3463
|
+
[data-reorder-id][data-dragging] { opacity: 0.4; }
|
|
3464
|
+
[data-reorder-id][data-lifted] { box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
3465
|
+
[data-reorder-id][data-flash] { animation: sw-reorder-flash 700ms var(--sw-ease-out); }
|
|
3466
|
+
@keyframes sw-reorder-flash { from { background-color: var(--sw-selection); } }
|
|
3467
|
+
.sw-reorder-line { position: absolute; z-index: 6; pointer-events: none; background: var(--sw-accent); border-radius: 0 1px 1px 0; }
|
|
3468
|
+
.sw-reorder-line[data-axis='x'] { height: 2px; }
|
|
3469
|
+
.sw-reorder-line[data-axis='y'] { width: 2px; }
|
|
3470
|
+
.sw-reorder-line::before {
|
|
3471
|
+
content: ''; position: absolute; width: 8px; height: 8px; box-sizing: border-box;
|
|
3472
|
+
border: 2px solid var(--sw-accent); border-radius: 50%; background: var(--sw-background);
|
|
3473
|
+
}
|
|
3474
|
+
.sw-reorder-line[data-axis='x']::before { left: -6px; top: -3px; }
|
|
3475
|
+
.sw-reorder-line[data-axis='y']::before { top: -6px; left: -3px; }
|
|
3476
|
+
.sw-reorder-preview {
|
|
3477
|
+
position: fixed; top: 0; left: 0; z-index: var(--sw-z-popup); pointer-events: none;
|
|
3478
|
+
max-width: 280px; padding: 4px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
3479
|
+
border-radius: 8px; background: var(--sw-background); color: var(--sw-foreground);
|
|
3480
|
+
box-shadow: 0 0 0 1px var(--sw-frame), var(--sw-shadow-popup); font-size: 13px; font-weight: 500;
|
|
3481
|
+
}
|
|
3482
|
+
html[data-sw-reordering], html[data-sw-reordering] * { cursor: grabbing !important; user-select: none; }
|
|
3483
|
+
html[data-sw-reordering] .sw-list-option__actions { opacity: 0 !important; }
|
|
3484
|
+
|
|
3485
|
+
|
|
3486
|
+
/* ── DashboardGrid / DashboardTile / DashboardSection ── */
|
|
3487
|
+
.sw-dashboard-grid { --sw-sq-bg: var(--sw-background); --sw-sq-border: var(--sw-frame); position: relative; container-type: inline-size; min-width: 0; }
|
|
3488
|
+
.sw-dashboard-grid:is([data-variant='joined'], [data-variant='flush']) { overflow: hidden; }
|
|
3489
|
+
.sw-dashboard-grid__grid { position: relative; display: grid; grid-template-columns: repeat(var(--sw-grid-cols, 12), minmax(0, 1fr)); }
|
|
3490
|
+
.sw-dashboard-grid[data-variant='gapped'] > .sw-dashboard-grid__grid { gap: 12px; }
|
|
3491
|
+
/* Joined and flush: each tile draws its right and bottom line. Joined overhangs both so its frame hides the
|
|
3492
|
+
outer lines; flush overhangs only the right, keeping the bottom line as the separator to what follows. */
|
|
3493
|
+
.sw-dashboard-grid[data-variant='joined'] > .sw-dashboard-grid__grid { margin: 0 -1px -1px 0; }
|
|
3494
|
+
.sw-dashboard-grid[data-variant='flush'] > .sw-dashboard-grid__grid { margin-right: -1px; }
|
|
3495
|
+
.sw-dashboard-grid:is([data-variant='joined'], [data-variant='flush']) .sw-dashboard-tile { border-right: 1px solid var(--sw-divider); border-bottom: 1px solid var(--sw-divider); }
|
|
3496
|
+
.sw-dashboard-tile { display: flex; flex-direction: column; min-width: 0; background: var(--sw-background); }
|
|
3497
|
+
.sw-dashboard-grid[data-variant='gapped'] .sw-dashboard-tile { background: transparent; }
|
|
3498
|
+
.sw-dashboard-tile > .sw-card { flex: 1; }
|
|
3499
|
+
.sw-dashboard-grid[data-reorderable] .sw-dashboard-tile .sw-card__bar { cursor: grab; }
|
|
3500
|
+
.sw-dashboard-grid[data-reorderable] .sw-dashboard-tile .sw-card__bar :is(button, a, input) { cursor: pointer; }
|
|
3501
|
+
/* The grip is an ordinary 2xs ghost Button in the header actions, shown on hover or focus. */
|
|
3502
|
+
.sw-dashboard-tile__grip { opacity: 0; transition: opacity var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
3503
|
+
.sw-dashboard-tile:hover .sw-dashboard-tile__grip, .sw-dashboard-tile__grip:focus-visible, .sw-dashboard-tile[data-lifted] .sw-dashboard-tile__grip { opacity: 1; }
|
|
3504
|
+
.sw-dashboard-tile[data-lifted] { box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
3505
|
+
|
|
3506
|
+
.sw-dashboard-section { display: flex; flex-direction: column; min-width: 0; }
|
|
3507
|
+
.sw-dashboard-section:not([data-flush]) + .sw-dashboard-section { margin-top: 8px; }
|
|
3508
|
+
.sw-dashboard-section__head { display: flex; align-items: center; gap: 8px; min-height: 36px; }
|
|
3509
|
+
.sw-dashboard-section__heading { margin: 0; font: inherit; min-width: 0; }
|
|
3510
|
+
.sw-dashboard-section__trigger {
|
|
3511
|
+
display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 6px;
|
|
3512
|
+
border: 0; border-radius: var(--sw-inner-r); corner-shape: var(--sw-corner-shape); background: none; color: var(--sw-foreground);
|
|
3513
|
+
font: inherit; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; cursor: pointer; outline: none;
|
|
3514
|
+
}
|
|
3515
|
+
.sw-dashboard-section__trigger:hover { background: var(--sw-item-hover); }
|
|
3516
|
+
.sw-dashboard-section__trigger:focus-visible { box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
3517
|
+
.sw-dashboard-section__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
3518
|
+
.sw-dashboard-section__chevron { display: inline-flex; flex: none; width: 14px; height: 14px; color: var(--sw-muted-foreground); transition: transform var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
3519
|
+
.sw-dashboard-section__chevron svg { width: 14px; height: 14px; }
|
|
3520
|
+
.sw-dashboard-section[data-state='open'] > .sw-dashboard-section__head .sw-dashboard-section__chevron { transform: rotate(90deg); }
|
|
3521
|
+
.sw-dashboard-section__count { flex: none; font-family: var(--sw-font-mono); font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; color: var(--sw-muted-foreground); }
|
|
3522
|
+
.sw-dashboard-section__actions { display: flex; align-items: center; gap: 2px; flex: none; margin-left: auto; }
|
|
3523
|
+
.sw-dashboard-section__rule { flex: 1; height: 1px; background: var(--sw-divider); }
|
|
3524
|
+
.sw-dashboard-section__inner { padding: 4px 0 8px; }
|
|
3525
|
+
/* Flush (inside AppShellMain): a 40px band on the shell's lines; tiles follow with no gap. */
|
|
3526
|
+
.sw-dashboard-section[data-flush] > .sw-dashboard-section__head { min-height: 40px; padding: 6px; gap: 4px; box-shadow: inset 0 -1px 0 var(--sw-divider); background: var(--sw-app-shell-section-bg, var(--sw-canvas)); }
|
|
3527
|
+
.sw-dashboard-section[data-flush] .sw-dashboard-section__trigger { font-size: 13px; padding: 0 6px; }
|
|
3528
|
+
.sw-dashboard-section[data-flush] .sw-dashboard-section__inner { padding: 0; }
|
|
3529
|
+
|
|
3530
|
+
|
|
3531
|
+
/* ── Breadcrumbs ── */
|
|
3532
|
+
.sw-breadcrumbs { min-width: 0; font-size: 13px; }
|
|
3533
|
+
.sw-breadcrumbs__list { display: flex; align-items: center; min-width: 0; margin: 0; padding: 0; list-style: none; }
|
|
3534
|
+
.sw-breadcrumbs__item { display: flex; align-items: center; flex: 0 1 auto; min-width: 0; }
|
|
3535
|
+
.sw-breadcrumbs__item[data-current] { flex-shrink: 0.25; }
|
|
3536
|
+
.sw-breadcrumbs__link {
|
|
3537
|
+
display: flex; align-items: center; gap: 6px; min-width: 0; height: 28px; padding: 0 6px;
|
|
3538
|
+
border-radius: var(--sw-radius-xs); color: var(--sw-muted-foreground); text-decoration: none; outline: none;
|
|
3539
|
+
}
|
|
3540
|
+
a.sw-breadcrumbs__link:hover { background: var(--sw-item-hover); color: var(--sw-foreground); }
|
|
3541
|
+
a.sw-breadcrumbs__link:focus-visible { box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
3542
|
+
.sw-breadcrumbs__item[data-current] .sw-breadcrumbs__link { color: var(--sw-foreground); font-weight: 500; }
|
|
3543
|
+
.sw-breadcrumbs__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
3544
|
+
.sw-breadcrumbs__icon { display: inline-flex; flex: none; width: 15px; height: 15px; }
|
|
3545
|
+
.sw-breadcrumbs__icon > svg { width: 15px; height: 15px; }
|
|
3546
|
+
.sw-breadcrumbs__sep { flex: none; padding: 0 1px; color: var(--sw-frame); }
|
|
3547
|
+
|
|
3548
|
+
|
|
3549
|
+
/* Touch: hover-revealed controls are always shown. */
|
|
3550
|
+
@media (hover: none) {
|
|
3551
|
+
.sw-sidebar-item__actions, .sw-dashboard-tile__grip { opacity: 1; pointer-events: auto; }
|
|
3552
|
+
.sw-sidebar-item[data-has-actions] .sw-sidebar-item__count { visibility: hidden; }
|
|
3553
|
+
}
|
|
3554
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3555
|
+
.sw-app-shell__region, .sw-app-shell__region[data-sheet] { transition: none; }
|
|
3556
|
+
[data-reorder-id][data-flash] { animation: none; }
|
|
3557
|
+
}
|
|
3558
|
+
|
|
3559
|
+
/* week-schedule.css */
|
|
3560
|
+
/* ── WeekSchedule ── */
|
|
3561
|
+
.sw-week-schedule {
|
|
3562
|
+
--sw-sq-bg: var(--sw-background);
|
|
3563
|
+
--sw-sq-border: var(--sw-frame);
|
|
3564
|
+
--sw-week-gutter: 56px;
|
|
3565
|
+
--sw-week-min-day: 84px;
|
|
3566
|
+
--sw-week-line: var(--sw-hairline);
|
|
3567
|
+
--sw-week-inset: 3px;
|
|
3568
|
+
display: flex; flex-direction: column; gap: 28px; width: 100%; min-width: 0; padding: 28px 28px 24px;
|
|
3569
|
+
color: var(--sw-foreground); font-family: var(--sw-font-sans);
|
|
3570
|
+
}
|
|
3571
|
+
.sw-week-schedule > :where(:not(.sw-sq-fill, .sw-sq-stroke, .sw-sq-ring)) { position: relative; }
|
|
3572
|
+
.sw-week-schedule[data-dragging] { user-select: none; -webkit-user-select: none; }
|
|
3573
|
+
.sw-week-schedule[data-dragging='move'] { cursor: grabbing; }
|
|
3574
|
+
.sw-week-schedule[data-dragging='resize'] { cursor: ns-resize; }
|
|
3575
|
+
|
|
3576
|
+
/* Total */
|
|
3577
|
+
.sw-week-schedule__summary { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
|
|
3578
|
+
.sw-week-schedule__total {
|
|
3579
|
+
font-size: 3rem; font-weight: 450; line-height: 0.9; letter-spacing: -0.05em; font-variant-numeric: tabular-nums;
|
|
3580
|
+
}
|
|
3581
|
+
.sw-week-schedule__summary-label,
|
|
3582
|
+
.sw-week-schedule__day,
|
|
3583
|
+
.sw-week-schedule__hour,
|
|
3584
|
+
.sw-week-schedule__legend-item {
|
|
3585
|
+
font-family: var(--sw-font-mono); font-size: 11px; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase;
|
|
3586
|
+
}
|
|
3587
|
+
.sw-week-schedule__summary-label { color: var(--sw-muted-foreground); font-size: 12px; }
|
|
3588
|
+
|
|
3589
|
+
/* Fit day columns to the container; the navigation changes the visible day range. */
|
|
3590
|
+
.sw-week-schedule__viewport { min-width: 0; }
|
|
3591
|
+
.sw-week-schedule__navigation {
|
|
3592
|
+
display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding-inline: 4px;
|
|
3593
|
+
font-size: 12px; text-align: center;
|
|
3594
|
+
}
|
|
3595
|
+
.sw-week-schedule__navigation > span { min-width: 0; overflow-wrap: anywhere; }
|
|
3596
|
+
.sw-week-schedule__board {
|
|
3597
|
+
display: grid; grid-template-columns: var(--sw-week-gutter) minmax(0, 1fr); grid-template-rows: auto auto;
|
|
3598
|
+
}
|
|
3599
|
+
.sw-week-schedule__days {
|
|
3600
|
+
grid-column: 2; grid-row: 1; display: grid; grid-template-columns: repeat(var(--sw-week-days), minmax(0, 1fr));
|
|
3601
|
+
border-bottom: 1.5px solid var(--sw-foreground);
|
|
3602
|
+
}
|
|
3603
|
+
.sw-week-schedule__day { padding: 0 0 10px 8px; color: var(--sw-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
3604
|
+
.sw-week-schedule__hours { grid-column: 1; grid-row: 1 / span 2; position: relative; }
|
|
3605
|
+
.sw-week-schedule__hours-inner { position: absolute; inset: auto 0 0 0; height: calc(var(--sw-week-hour) * var(--sw-week-hours)); }
|
|
3606
|
+
.sw-week-schedule__hour {
|
|
3607
|
+
position: absolute; right: 8px; translate: 0 -50%; color: var(--sw-muted-foreground); letter-spacing: 0.02em; white-space: nowrap;
|
|
3608
|
+
font-variant-numeric: tabular-nums;
|
|
3609
|
+
}
|
|
3610
|
+
.sw-week-schedule__body {
|
|
3611
|
+
grid-column: 2; grid-row: 2; position: relative; display: grid; grid-template-columns: repeat(var(--sw-week-days), minmax(0, 1fr));
|
|
3612
|
+
height: calc(var(--sw-week-hour) * var(--sw-week-hours));
|
|
3613
|
+
/* One hairline per hour, under each hour row except the last. */
|
|
3614
|
+
background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--sw-week-hour) - 1px), var(--sw-week-line) calc(var(--sw-week-hour) - 1px) var(--sw-week-hour));
|
|
3615
|
+
background-size: 100% calc(100% - var(--sw-week-hour) * 0.5);
|
|
3616
|
+
background-repeat: no-repeat;
|
|
3617
|
+
}
|
|
3618
|
+
.sw-week-schedule__col { border-left: 1px solid var(--sw-week-line); pointer-events: none; }
|
|
3619
|
+
|
|
3620
|
+
/* Events */
|
|
3621
|
+
.sw-week-schedule__event {
|
|
3622
|
+
position: absolute; z-index: 1;
|
|
3623
|
+
left: calc(var(--sw-week-d) * 100% / var(--sw-week-days) + var(--sw-week-inset));
|
|
3624
|
+
width: calc(100% / var(--sw-week-days) - var(--sw-week-inset) * 2);
|
|
3625
|
+
top: calc(var(--sw-week-t) * 1px + var(--sw-week-inset));
|
|
3626
|
+
height: max(6px, calc(var(--sw-week-h) * 1px - var(--sw-week-inset) * 2));
|
|
3627
|
+
display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 6px 7px; overflow: hidden;
|
|
3628
|
+
border: 1.5px solid var(--sw-foreground); border-radius: var(--sw-radius-xs); corner-shape: var(--sw-corner-shape);
|
|
3629
|
+
background-color: var(--sw-background); color: var(--sw-foreground);
|
|
3630
|
+
cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; outline: none;
|
|
3631
|
+
transition:
|
|
3632
|
+
top var(--sw-duration-fast) var(--sw-ease-standard), left var(--sw-duration-fast) var(--sw-ease-standard),
|
|
3633
|
+
height var(--sw-duration-fast) var(--sw-ease-standard), background-color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
3634
|
+
}
|
|
3635
|
+
.sw-week-schedule__event[data-size='sm'] { justify-content: center; padding-block: 0 5px; }
|
|
3636
|
+
.sw-week-schedule__event[data-size='sm'] .sw-week-schedule__range { display: none; }
|
|
3637
|
+
.sw-week-schedule__event[data-kind='meeting']:hover { background-color: color-mix(in oklab, var(--sw-foreground) 5%, var(--sw-background)); }
|
|
3638
|
+
.sw-week-schedule__event[data-kind='focus'] { background-color: var(--sw-foreground); color: var(--sw-background); }
|
|
3639
|
+
.sw-week-schedule__event[data-kind='away'] {
|
|
3640
|
+
background-image: repeating-linear-gradient(135deg, color-mix(in oklab, var(--sw-foreground) 24%, transparent) 0 1px, transparent 1px 7px);
|
|
3641
|
+
}
|
|
3642
|
+
.sw-week-schedule__event[data-selected] { z-index: 2; }
|
|
3643
|
+
.sw-week-schedule__event[data-kind='meeting'][data-selected],
|
|
3644
|
+
.sw-week-schedule__event[data-kind='away'][data-selected] { background-color: var(--sw-muted); }
|
|
3645
|
+
.sw-week-schedule__event[data-kind='focus'][data-selected] { background-color: color-mix(in oklab, var(--sw-foreground) 82%, var(--sw-background)); }
|
|
3646
|
+
.sw-week-schedule__event:focus-visible:not([data-pointer-focus]) { outline: 2px solid currentColor; outline-offset: -4px; }
|
|
3647
|
+
.sw-week-schedule__event[data-dragging] { z-index: 3; transition: background-color var(--sw-duration-fast) var(--sw-ease-standard); cursor: inherit; }
|
|
3648
|
+
.sw-week-schedule[data-readonly] .sw-week-schedule__event { cursor: default; touch-action: auto; }
|
|
3649
|
+
|
|
3650
|
+
.sw-week-schedule__title {
|
|
3651
|
+
flex: none; max-width: 100%; font-size: 14px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em;
|
|
3652
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
3653
|
+
}
|
|
3654
|
+
.sw-week-schedule__range {
|
|
3655
|
+
max-width: 100%; font-family: var(--sw-font-mono); font-size: var(--sw-week-range-size, 11px); line-height: 1; letter-spacing: 0; white-space: nowrap;
|
|
3656
|
+
overflow: hidden; text-overflow: ellipsis; color: var(--sw-muted-foreground); font-variant-numeric: tabular-nums;
|
|
3657
|
+
}
|
|
3658
|
+
.sw-week-schedule__event[data-kind='focus'] .sw-week-schedule__range { color: color-mix(in oklab, var(--sw-background) 62%, var(--sw-foreground)); }
|
|
3659
|
+
|
|
3660
|
+
/* Resize handle appears on hover, focus and during resizing, including short events. */
|
|
3661
|
+
.sw-week-schedule__handle {
|
|
3662
|
+
position: absolute; inset: auto 0 0; height: min(10px, 60%); cursor: ns-resize; display: flex; align-items: flex-end; justify-content: center;
|
|
3663
|
+
}
|
|
3664
|
+
.sw-week-schedule__handle::after {
|
|
3665
|
+
content: ''; width: min(22px, 50%); height: 2px; margin-bottom: 2px; border-radius: var(--sw-radius-full); background: currentColor; opacity: 0;
|
|
3666
|
+
transition: opacity var(--sw-duration-fast) var(--sw-ease-standard);
|
|
3667
|
+
}
|
|
3668
|
+
.sw-week-schedule__event:hover .sw-week-schedule__handle::after,
|
|
3669
|
+
.sw-week-schedule__event[data-selected] .sw-week-schedule__handle::after { opacity: 0.65; }
|
|
3670
|
+
.sw-week-schedule__event[data-dragging='resize'] .sw-week-schedule__handle::after,
|
|
3671
|
+
.sw-week-schedule__handle:hover::after { opacity: 0.9; }
|
|
3672
|
+
.sw-week-schedule[data-readonly] .sw-week-schedule__event[data-size='sm'] { padding-block: 0; }
|
|
3673
|
+
|
|
3674
|
+
/* Footer */
|
|
3675
|
+
.sw-week-schedule__footer { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; }
|
|
3676
|
+
.sw-week-schedule__legend { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; list-style: none; }
|
|
3677
|
+
.sw-week-schedule__legend-item { display: inline-flex; align-items: center; gap: 9px; color: var(--sw-muted-foreground); }
|
|
3678
|
+
.sw-week-schedule__swatch {
|
|
3679
|
+
width: 14px; height: 14px; flex: none; border: 1.5px solid var(--sw-foreground); border-radius: 3px; corner-shape: var(--sw-corner-shape);
|
|
3680
|
+
background-color: var(--sw-background);
|
|
3681
|
+
}
|
|
3682
|
+
.sw-week-schedule__swatch[data-kind='focus'] { background-color: var(--sw-foreground); }
|
|
3683
|
+
.sw-week-schedule__swatch[data-kind='away'] {
|
|
3684
|
+
background-image: repeating-linear-gradient(135deg, var(--sw-foreground) 0 1.5px, transparent 1.5px 4.5px);
|
|
3685
|
+
}
|
|
3686
|
+
|
|
3687
|
+
.sw-week-schedule__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
3688
|
+
|
|
3689
|
+
@media (max-width: 640px) {
|
|
3690
|
+
.sw-week-schedule { padding: 20px 16px 16px; gap: 22px; --sw-week-gutter: 48px; }
|
|
3691
|
+
.sw-week-schedule__total { font-size: 2.5rem; }
|
|
3692
|
+
}
|
|
3693
|
+
.sw-week-schedule[data-hour-format='12h'] .sw-week-schedule__hour { font-size: 10px; right: 4px; }
|
|
3694
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3695
|
+
.sw-week-schedule__event { transition: none; }
|
|
3696
|
+
}
|
|
3697
|
+
|
|
3698
|
+
/* canvas.css */
|
|
3699
|
+
/* ── Canvas ──
|
|
3700
|
+
Artboard with a 1px foreground frame, then the inspector. The outer surface is optional.
|
|
3701
|
+
Shapes are positioned in percent of the artboard; text is sized in container units so everything scales with the width. */
|
|
3702
|
+
.sw-canvas {
|
|
3703
|
+
--sw-canvas-hatch: repeating-linear-gradient(135deg, var(--sw-foreground) 0 1.25px, transparent 1.25px 9px);
|
|
3704
|
+
/* Tiled "/" line used as a mask so the hatch stays crisp at any size (a gradient moirés at fractional px). */
|
|
3705
|
+
--sw-canvas-hatch-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M-1 1l2-2M0 10L10 0M9 11l2-2' stroke='black' stroke-width='1.3'/%3E%3C/svg%3E");
|
|
3706
|
+
--sw-canvas-gray: color-mix(in oklab, var(--sw-foreground) 26%, var(--sw-background));
|
|
3707
|
+
--sw-canvas-frame: color-mix(in oklab, var(--sw-foreground) 85%, var(--sw-background));
|
|
3708
|
+
position: relative; display: flex; flex-direction: column; gap: 22px; width: 100%; min-width: 0;
|
|
3709
|
+
color: var(--sw-foreground);
|
|
3710
|
+
}
|
|
3711
|
+
.sw-canvas[data-framed] { --sw-sq-bg: var(--sw-muted); --sw-sq-border: var(--sw-frame); padding: 20px; }
|
|
3712
|
+
.sw-canvas > :where(:not(.sw-sq-fill, .sw-sq-stroke, .sw-sq-ring)) { position: relative; }
|
|
3713
|
+
|
|
3714
|
+
/* Artboard */
|
|
3715
|
+
.sw-canvas__board {
|
|
3716
|
+
position: relative; width: 100%; container-type: inline-size;
|
|
3717
|
+
background: var(--sw-background); border: 1px solid var(--sw-canvas-frame);
|
|
3718
|
+
border-radius: var(--sw-radius-xs); corner-shape: var(--sw-corner-shape);
|
|
3719
|
+
user-select: none; -webkit-user-select: none;
|
|
3720
|
+
}
|
|
3721
|
+
|
|
3722
|
+
/* Shapes */
|
|
3723
|
+
.sw-canvas__shape { position: absolute; cursor: grab; touch-action: none; outline: none; }
|
|
3724
|
+
.sw-canvas[data-dragging] .sw-canvas__shape { cursor: grabbing; }
|
|
3725
|
+
.sw-canvas__shape:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 2px; }
|
|
3726
|
+
/* Selected + focused: ring sits outside the dashed selection box instead of on top of it. */
|
|
3727
|
+
.sw-canvas__shape[data-selected]:focus-visible { outline-offset: 7px; }
|
|
3728
|
+
.sw-canvas__paint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
|
|
3729
|
+
.sw-canvas__shape[data-shape='ellipse'] .sw-canvas__paint { border-radius: 50%; }
|
|
3730
|
+
.sw-canvas__shape:not([data-shape='text'])[data-fill='ink'] .sw-canvas__paint { background: var(--sw-background); border: 1.5px solid var(--sw-foreground); }
|
|
3731
|
+
.sw-canvas__shape:not([data-shape='text'])[data-fill='gray'] .sw-canvas__paint { background: var(--sw-canvas-gray); }
|
|
3732
|
+
.sw-canvas__shape:not([data-shape='text'])[data-fill='white'] .sw-canvas__paint { background: var(--sw-foreground); }
|
|
3733
|
+
.sw-canvas__shape:not([data-shape='text'])[data-fill='hatch'] .sw-canvas__paint { border: 1.5px solid var(--sw-foreground); }
|
|
3734
|
+
.sw-canvas__shape:not([data-shape='text'])[data-fill='hatch'] .sw-canvas__paint::before,
|
|
3735
|
+
.sw-canvas__swatch[data-fill='hatch']::before {
|
|
3736
|
+
content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--sw-foreground);
|
|
3737
|
+
-webkit-mask: var(--sw-canvas-hatch-mask) 0 0 / 10px 10px repeat; mask: var(--sw-canvas-hatch-mask) 0 0 / 10px 10px repeat;
|
|
3738
|
+
}
|
|
3739
|
+
.sw-canvas__swatch[data-fill='hatch']::before { -webkit-mask-size: 6px 6px; mask-size: 6px 6px; }
|
|
3740
|
+
|
|
3741
|
+
/* Text: display face, sized from the shape height (h × 0.82 in artboard units → container width units). */
|
|
3742
|
+
.sw-canvas__shape[data-shape='text'] .sw-canvas__paint {
|
|
3743
|
+
font-family: var(--sw-font-sans); font-weight: 500; letter-spacing: -0.05em; line-height: 1; white-space: nowrap;
|
|
3744
|
+
font-size: calc(var(--sw-canvas-h) / var(--sw-canvas-w) * 82cqw);
|
|
3745
|
+
color: var(--sw-foreground);
|
|
3746
|
+
}
|
|
3747
|
+
.sw-canvas__shape[data-shape='text'][data-fill='gray'] .sw-canvas__paint { color: var(--sw-canvas-gray); }
|
|
3748
|
+
.sw-canvas__shape[data-shape='text'][data-fill='ink'] .sw-canvas__paint { color: var(--sw-background); -webkit-text-stroke: 1.25px var(--sw-foreground); }
|
|
3749
|
+
.sw-canvas__shape[data-shape='text'][data-fill='hatch'] .sw-canvas__paint {
|
|
3750
|
+
color: transparent; background: var(--sw-canvas-hatch); -webkit-background-clip: text; background-clip: text;
|
|
3751
|
+
-webkit-text-stroke: 1px var(--sw-foreground);
|
|
3752
|
+
}
|
|
3753
|
+
|
|
3754
|
+
/* Selection: dashed box just outside the shape + four square corner handles. */
|
|
3755
|
+
.sw-canvas__selection { position: absolute; pointer-events: none; animation: sw-canvas-in var(--sw-duration-fast) var(--sw-ease-standard); }
|
|
3756
|
+
.sw-canvas__selection::before { content: ''; position: absolute; inset: -3px; border: 1px dashed var(--sw-foreground); }
|
|
3757
|
+
.sw-canvas__handle {
|
|
3758
|
+
position: absolute; width: 9px; height: 9px; pointer-events: auto; touch-action: none; translate: -50% -50%;
|
|
3759
|
+
background: var(--sw-background); border: 1.5px solid var(--sw-foreground);
|
|
3760
|
+
}
|
|
3761
|
+
.sw-canvas__handle::after { content: ''; position: absolute; inset: -8px; }
|
|
3762
|
+
.sw-canvas__handle[data-corner='nw'] { left: -3px; top: -3px; cursor: nwse-resize; }
|
|
3763
|
+
.sw-canvas__handle[data-corner='ne'] { left: calc(100% + 3px); top: -3px; cursor: nesw-resize; }
|
|
3764
|
+
.sw-canvas__handle[data-corner='se'] { left: calc(100% + 3px); top: calc(100% + 3px); cursor: nwse-resize; }
|
|
3765
|
+
.sw-canvas__handle[data-corner='sw'] { left: -3px; top: calc(100% + 3px); cursor: nesw-resize; }
|
|
3766
|
+
.sw-canvas__handle:hover, .sw-canvas__handle[data-active] { background: var(--sw-foreground); }
|
|
3767
|
+
@keyframes sw-canvas-in { from { opacity: 0; } }
|
|
3768
|
+
@media (prefers-reduced-motion: reduce) { .sw-canvas__selection { animation: none; } }
|
|
3769
|
+
|
|
3770
|
+
/* Inspector */
|
|
3771
|
+
.sw-canvas__inspector { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
|
|
3772
|
+
.sw-canvas__section { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
|
|
3773
|
+
.sw-canvas__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
|
|
3774
|
+
.sw-canvas__label, .sw-canvas__readout {
|
|
3775
|
+
font-family: var(--sw-font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sw-muted-foreground);
|
|
3776
|
+
}
|
|
3777
|
+
.sw-canvas__readout { font-variant-numeric: tabular-nums; }
|
|
3778
|
+
|
|
3779
|
+
/* Layers: a framed vertical ToggleGroup; the selected row is solid foreground with background text. */
|
|
3780
|
+
.sw-canvas .sw-canvas__layers { --sw-sq-bg: var(--sw-background); display: flex; width: 100%; gap: 1px; }
|
|
3781
|
+
.sw-canvas .sw-canvas__layers .sw-toggle { justify-content: flex-start; gap: 10px; height: 34px; padding: 0 10px; color: var(--sw-foreground); }
|
|
3782
|
+
.sw-canvas .sw-canvas__layers .sw-toggle:hover:not([data-disabled]) { --sw-sq-bg: var(--sw-item-hover); }
|
|
3783
|
+
.sw-canvas .sw-canvas__layers .sw-toggle[data-state='on'],
|
|
3784
|
+
.sw-canvas .sw-canvas__layers .sw-toggle[data-state='on']:hover:not([data-disabled]) { --sw-sq-bg: var(--sw-foreground); color: var(--sw-background); filter: none; }
|
|
3785
|
+
.sw-canvas .sw-canvas__layers .sw-toggle__icon svg { width: 16px; height: 16px; }
|
|
3786
|
+
|
|
3787
|
+
/* X / Y / W / H: NumberInputs with a mono letter inside. */
|
|
3788
|
+
.sw-canvas__fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
|
|
3789
|
+
.sw-canvas__num { position: relative; min-width: 0; }
|
|
3790
|
+
.sw-canvas__num-key {
|
|
3791
|
+
position: absolute; left: 10px; top: 50%; translate: 0 -50%; z-index: 1; pointer-events: none;
|
|
3792
|
+
font-family: var(--sw-font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--sw-muted-foreground);
|
|
3793
|
+
}
|
|
3794
|
+
.sw-canvas__num .sw-input__field { padding-left: 26px; padding-right: 10px; }
|
|
3795
|
+
.sw-canvas__num .sw-input__control { text-align: right; font-family: var(--sw-font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
|
|
3796
|
+
|
|
3797
|
+
/* Fill swatches */
|
|
3798
|
+
.sw-canvas .sw-canvas__fills { --sw-sq-bg: transparent; padding: 0; gap: 6px; }
|
|
3799
|
+
.sw-canvas .sw-canvas__fills .sw-toggle,
|
|
3800
|
+
.sw-canvas .sw-canvas__fills .sw-toggle:hover:not([data-disabled]),
|
|
3801
|
+
.sw-canvas .sw-canvas__fills .sw-toggle[data-state='on'] { --sw-sq-bg: transparent; width: 36px; height: 36px; filter: none; }
|
|
3802
|
+
.sw-canvas__swatch {
|
|
3803
|
+
display: block; width: 24px; height: 24px; border: 1px solid var(--sw-canvas-frame);
|
|
3804
|
+
border-radius: 3px; corner-shape: var(--sw-corner-shape);
|
|
3805
|
+
transition: outline-color var(--sw-duration-fast) var(--sw-ease-standard);
|
|
3806
|
+
outline: 1.5px solid transparent; outline-offset: 3px;
|
|
3807
|
+
}
|
|
3808
|
+
.sw-canvas__swatch[data-fill='ink'] { background: var(--sw-background); }
|
|
3809
|
+
.sw-canvas__swatch[data-fill='gray'] { background: var(--sw-canvas-gray); }
|
|
3810
|
+
.sw-canvas__swatch[data-fill='white'] { background: var(--sw-foreground); }
|
|
3811
|
+
.sw-canvas__swatch[data-fill='hatch'] { position: relative; background: var(--sw-background); overflow: hidden; }
|
|
3812
|
+
.sw-canvas .sw-toggle[data-state='on'] .sw-canvas__swatch { outline-color: var(--sw-foreground); }
|
|
3813
|
+
.sw-canvas .sw-canvas__fills .sw-toggle:hover:not([data-disabled]):not([data-state='on']) .sw-canvas__swatch { outline-color: var(--sw-hairline); }
|
|
3814
|
+
|
|
3815
|
+
/* Opacity: monochrome slider */
|
|
3816
|
+
.sw-canvas .sw-canvas__opacity .sw-slider__indicator { background: var(--sw-foreground); }
|
|
3817
|
+
|
|
3818
|
+
@media (max-width: 480px) {
|
|
3819
|
+
.sw-canvas { gap: 18px; }
|
|
3820
|
+
.sw-canvas[data-framed] { padding: 14px; }
|
|
3821
|
+
.sw-canvas__fields { gap: 6px; }
|
|
3822
|
+
.sw-canvas__num-key { left: 8px; }
|
|
3823
|
+
.sw-canvas__num .sw-input__field { padding-left: 20px; padding-right: 8px; }
|
|
3824
|
+
}
|
|
3825
|
+
|
|
3826
|
+
/* agent-console.css */
|
|
3827
|
+
/* ── AgentConsole ── */
|
|
3828
|
+
.sw-agent-console {
|
|
3829
|
+
--sw-sq-bg: var(--sw-background);
|
|
3830
|
+
--sw-sq-border: var(--sw-frame);
|
|
3831
|
+
--sw-agent-console-pad: 20px;
|
|
3832
|
+
position: relative;
|
|
3833
|
+
display: flex;
|
|
3834
|
+
flex-direction: column;
|
|
3835
|
+
min-width: 0;
|
|
3836
|
+
min-height: var(--sw-agent-console-min-height, 360px);
|
|
3837
|
+
height: 100%;
|
|
3838
|
+
color: var(--sw-foreground);
|
|
3839
|
+
font-family: var(--sw-font-sans);
|
|
3840
|
+
}
|
|
3841
|
+
.sw-agent-console[data-variant='plain'] { background: var(--sw-background); }
|
|
3842
|
+
|
|
3843
|
+
.sw-agent-console__header {
|
|
3844
|
+
position: relative;
|
|
3845
|
+
display: flex;
|
|
3846
|
+
align-items: center;
|
|
3847
|
+
justify-content: space-between;
|
|
3848
|
+
gap: 12px;
|
|
3849
|
+
padding: 16px var(--sw-agent-console-pad) 14px;
|
|
3850
|
+
border-bottom: 1px solid var(--sw-hairline);
|
|
3851
|
+
}
|
|
3852
|
+
.sw-agent-console__title,
|
|
3853
|
+
.sw-agent-console__status {
|
|
3854
|
+
font-family: var(--sw-font-mono);
|
|
3855
|
+
font-size: 11px;
|
|
3856
|
+
line-height: 16px;
|
|
3857
|
+
letter-spacing: 0.08em;
|
|
3858
|
+
text-transform: uppercase;
|
|
3859
|
+
}
|
|
3860
|
+
.sw-agent-console__title { color: var(--sw-foreground); }
|
|
3861
|
+
.sw-agent-console__status { color: var(--sw-muted-foreground); font-variant-numeric: tabular-nums; }
|
|
3862
|
+
.sw-agent-console__status[data-status='running'] { color: var(--sw-accent); }
|
|
3863
|
+
.sw-agent-console__status[data-status='running']::before {
|
|
3864
|
+
content: '';
|
|
3865
|
+
display: inline-block;
|
|
3866
|
+
width: 6px;
|
|
3867
|
+
height: 6px;
|
|
3868
|
+
margin-right: 8px;
|
|
3869
|
+
vertical-align: 1px;
|
|
3870
|
+
border-radius: 50%;
|
|
3871
|
+
background: currentColor;
|
|
3872
|
+
animation: sw-agent-console-pulse 1s var(--sw-ease-standard) infinite alternate;
|
|
3873
|
+
}
|
|
3874
|
+
|
|
3875
|
+
/* ── Log ── */
|
|
3876
|
+
.sw-agent-console__log {
|
|
3877
|
+
position: relative;
|
|
3878
|
+
flex: 1 1 0;
|
|
3879
|
+
min-height: 0;
|
|
3880
|
+
overflow-y: auto;
|
|
3881
|
+
overscroll-behavior: contain;
|
|
3882
|
+
display: flex;
|
|
3883
|
+
flex-direction: column;
|
|
3884
|
+
gap: 14px;
|
|
3885
|
+
padding: 16px var(--sw-agent-console-pad);
|
|
3886
|
+
outline: none;
|
|
3887
|
+
}
|
|
3888
|
+
.sw-agent-console__log:focus-visible { box-shadow: inset 0 0 0 2px var(--sw-accent); }
|
|
3889
|
+
.sw-agent-console__empty {
|
|
3890
|
+
margin: auto 0 0;
|
|
3891
|
+
font-size: 13px;
|
|
3892
|
+
line-height: 1.5;
|
|
3893
|
+
color: var(--sw-muted-foreground);
|
|
3894
|
+
}
|
|
3895
|
+
.sw-agent-console__empty code { font-family: var(--sw-font-mono); font-size: 12px; color: var(--sw-foreground); }
|
|
3896
|
+
|
|
3897
|
+
.sw-agent-console__entry {
|
|
3898
|
+
margin: 0;
|
|
3899
|
+
min-width: 0;
|
|
3900
|
+
animation: sw-agent-console-in var(--sw-duration-slow) var(--sw-ease-emphasized) both;
|
|
3901
|
+
}
|
|
3902
|
+
.sw-agent-console__entry:first-child { margin-top: auto; }
|
|
3903
|
+
|
|
3904
|
+
.sw-agent-console__entry[data-kind='user'] {
|
|
3905
|
+
align-self: flex-end;
|
|
3906
|
+
max-width: 88%;
|
|
3907
|
+
padding: 8px 12px;
|
|
3908
|
+
border-radius: var(--sw-radius-xs);
|
|
3909
|
+
corner-shape: var(--sw-corner-shape);
|
|
3910
|
+
background: var(--sw-muted);
|
|
3911
|
+
font-size: 14px;
|
|
3912
|
+
line-height: 1.45;
|
|
3913
|
+
overflow-wrap: anywhere;
|
|
3914
|
+
}
|
|
3915
|
+
|
|
3916
|
+
/* Steps: a 1px rule on the left, the exact call, then the result. */
|
|
3917
|
+
.sw-agent-console__entry:is([data-kind='step'], [data-kind='planning']) {
|
|
3918
|
+
display: flex;
|
|
3919
|
+
flex-direction: column;
|
|
3920
|
+
gap: 6px;
|
|
3921
|
+
padding: 2px 0 2px 12px;
|
|
3922
|
+
border-left: 1px solid var(--sw-frame);
|
|
3923
|
+
transition: border-color var(--sw-duration-base) var(--sw-ease-standard);
|
|
3924
|
+
}
|
|
3925
|
+
.sw-agent-console__entry[data-kind='step'][data-status='running'] { border-left-color: var(--sw-accent); }
|
|
3926
|
+
.sw-agent-console__entry[data-kind='step'][data-status='error'] { border-left-color: var(--sw-danger); }
|
|
3927
|
+
.sw-agent-console__entry[data-kind='planning'] {
|
|
3928
|
+
font-family: var(--sw-font-mono);
|
|
3929
|
+
font-size: 12px;
|
|
3930
|
+
line-height: 1.6;
|
|
3931
|
+
color: var(--sw-muted-foreground);
|
|
3932
|
+
}
|
|
3933
|
+
.sw-agent-console__call,
|
|
3934
|
+
.sw-agent-console__result {
|
|
3935
|
+
display: block;
|
|
3936
|
+
font-family: var(--sw-font-mono);
|
|
3937
|
+
font-size: 12px;
|
|
3938
|
+
line-height: 1.6;
|
|
3939
|
+
white-space: pre-wrap;
|
|
3940
|
+
overflow-wrap: anywhere;
|
|
3941
|
+
}
|
|
3942
|
+
.sw-agent-console__call { color: var(--sw-foreground); }
|
|
3943
|
+
.sw-agent-console__arrow { color: var(--sw-muted-foreground); }
|
|
3944
|
+
.sw-agent-console__key { color: var(--sw-muted-foreground); }
|
|
3945
|
+
.sw-agent-console__value { color: var(--sw-foreground); }
|
|
3946
|
+
.sw-agent-console__result[data-tone='error'] { color: var(--sw-danger); }
|
|
3947
|
+
|
|
3948
|
+
.sw-agent-console__entry[data-kind='reply'] {
|
|
3949
|
+
font-size: 15px;
|
|
3950
|
+
line-height: 1.5;
|
|
3951
|
+
letter-spacing: -0.01em;
|
|
3952
|
+
overflow-wrap: anywhere;
|
|
3953
|
+
}
|
|
3954
|
+
|
|
3955
|
+
/* ── Composer ── */
|
|
3956
|
+
.sw-agent-console__composer {
|
|
3957
|
+
display: flex;
|
|
3958
|
+
flex-direction: column;
|
|
3959
|
+
gap: 10px;
|
|
3960
|
+
padding: 12px;
|
|
3961
|
+
border-top: 1px solid var(--sw-hairline);
|
|
3962
|
+
}
|
|
3963
|
+
.sw-agent-console__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
|
3964
|
+
.sw-agent-console__hint {
|
|
3965
|
+
display: inline-flex;
|
|
3966
|
+
align-items: center;
|
|
3967
|
+
gap: 6px;
|
|
3968
|
+
font-size: 12px;
|
|
3969
|
+
color: var(--sw-muted-foreground);
|
|
3970
|
+
}
|
|
3971
|
+
.sw-agent-console__send { margin-left: auto; }
|
|
3972
|
+
|
|
3973
|
+
/* ── Field marks: the block an agent step targets gets a dashed accent outline. ── */
|
|
3974
|
+
[data-agent-target] {
|
|
3975
|
+
outline: 1.5px dashed var(--sw-accent);
|
|
3976
|
+
outline-offset: 6px;
|
|
3977
|
+
border-radius: var(--sw-radius-xs);
|
|
3978
|
+
corner-shape: var(--sw-corner-shape);
|
|
3979
|
+
animation: sw-agent-target-in var(--sw-duration-base) var(--sw-ease-standard);
|
|
3980
|
+
}
|
|
3981
|
+
[data-agent-target='active'] {
|
|
3982
|
+
box-shadow: 0 0 0 6px color-mix(in oklab, var(--sw-accent) 9%, transparent);
|
|
3983
|
+
background: color-mix(in oklab, var(--sw-accent) 9%, transparent);
|
|
3984
|
+
}
|
|
3985
|
+
|
|
3986
|
+
@keyframes sw-agent-console-in {
|
|
3987
|
+
from { opacity: 0; transform: translateY(4px); }
|
|
3988
|
+
}
|
|
3989
|
+
@keyframes sw-agent-target-in {
|
|
3990
|
+
from { outline-color: transparent; }
|
|
3991
|
+
}
|
|
3992
|
+
@keyframes sw-agent-console-pulse {
|
|
3993
|
+
to { opacity: 0.35; }
|
|
3994
|
+
}
|
|
3995
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3996
|
+
.sw-agent-console__entry,
|
|
3997
|
+
[data-agent-target],
|
|
3998
|
+
.sw-agent-console__status[data-status='running']::before { animation: none; }
|
|
3999
|
+
}
|
|
4000
|
+
|
|
4001
|
+
/* system.css */
|
|
4002
|
+
/* ── System-wide rules (loaded last so they win over component sheets) ──── */
|
|
4003
|
+
|
|
4004
|
+
/* Field focus: quiet. A text field darkens its 1px frame when focused — no blue
|
|
4005
|
+
border, no outer ring. (Keyboard focus on buttons, checkboxes, tabs etc. keeps
|
|
4006
|
+
the accent ring: there it is the only sign of where focus is.) */
|
|
4007
|
+
:root { --sw-field-focus: color-mix(in oklab, var(--sw-foreground) 58%, var(--sw-background)); }
|
|
4008
|
+
:is(.sw-input__field, .sw-date-input__box, .sw-combobox__field, .sw-trigger-menu__field, .sw-token-input, .sw-toolbar__field):focus-within {
|
|
4009
|
+
--sw-sq-border: var(--sw-field-focus);
|
|
4010
|
+
}
|
|
4011
|
+
:is(.sw-input__field, .sw-date-input__box, .sw-combobox__field, .sw-trigger-menu__field, .sw-token-input, .sw-toolbar__field, .sw-otp__slot) > .sw-sq-ring {
|
|
4012
|
+
display: none;
|
|
4013
|
+
}
|
|
4014
|
+
.sw-otp__slot[data-active] { --sw-sq-border: var(--sw-field-focus); }
|
|
4015
|
+
/* Invalid fields keep the danger frame while focused. */
|
|
4016
|
+
:is(.sw-input[data-invalid] .sw-input__field, .sw-field[data-invalid] .sw-input__field, .sw-date-input[data-invalid] .sw-date-input__box, .sw-combobox[data-invalid] .sw-combobox__field, .sw-trigger-menu__input[data-invalid] .sw-trigger-menu__field, .sw-token-input[data-invalid]):focus-within {
|
|
4017
|
+
--sw-sq-border: var(--sw-danger);
|
|
4018
|
+
}
|
|
4019
|
+
|
|
4020
|
+
/* Scrollbars: thin, no track, a soft thumb that follows the theme. Applies to the
|
|
4021
|
+
page and to every SDK scroller (popups, dialogs, lists, code). Components that
|
|
4022
|
+
draw their own (ScrollArea, Tabs, Carousel) set scrollbar-width: none. */
|
|
4023
|
+
:root {
|
|
4024
|
+
--sw-scrollbar-thumb: color-mix(in oklab, var(--sw-foreground) 18%, transparent);
|
|
4025
|
+
--sw-scrollbar-thumb-hover: color-mix(in oklab, var(--sw-foreground) 32%, transparent);
|
|
4026
|
+
scrollbar-width: thin;
|
|
4027
|
+
scrollbar-color: var(--sw-scrollbar-thumb) transparent;
|
|
4028
|
+
}
|
|
4029
|
+
:where(.sw-root, [data-sw], .sw-popup-positioner) :where(*) {
|
|
4030
|
+
scrollbar-width: thin;
|
|
4031
|
+
scrollbar-color: var(--sw-scrollbar-thumb) transparent;
|
|
4032
|
+
}
|
|
4033
|
+
:where(.sw-root, [data-sw], .sw-popup-positioner) :where(*):hover {
|
|
4034
|
+
scrollbar-color: var(--sw-scrollbar-thumb-hover) transparent;
|
|
4035
|
+
}
|
|
4036
|
+
|
|
4037
|
+
}
|