@directo-ui/astro 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -2
- package/components.css +833 -0
- package/index.d.ts +31 -0
- package/index.js +31 -0
- package/package.json +51 -4
- package/src/components/Accordion.astro +8 -0
- package/src/components/AccordionItem.astro +14 -0
- package/src/components/Alert.astro +42 -0
- package/src/components/Avatar.astro +21 -0
- package/src/components/Badge.astro +13 -0
- package/src/components/BottomSheet.astro +23 -0
- package/src/components/Breadcrumb.astro +18 -0
- package/src/components/Button.astro +31 -0
- package/src/components/Card.astro +25 -0
- package/src/components/Checkbox.astro +14 -0
- package/src/components/DatePicker.astro +25 -0
- package/src/components/Divider.astro +11 -0
- package/src/components/Dropdown.astro +71 -0
- package/src/components/EmptyState.astro +15 -0
- package/src/components/IconButton.astro +18 -0
- package/src/components/Modal.astro +34 -0
- package/src/components/Pagination.astro +30 -0
- package/src/components/Progress.astro +20 -0
- package/src/components/RadioGroup.astro +24 -0
- package/src/components/Select.astro +29 -0
- package/src/components/Skeleton.astro +13 -0
- package/src/components/Spinner.astro +17 -0
- package/src/components/Switch.astro +13 -0
- package/src/components/Tabs.astro +60 -0
- package/src/components/TextField.astro +24 -0
- package/src/components/Textarea.astro +41 -0
- package/src/components/Toaster.astro +8 -0
- package/src/components/Tooltip.astro +31 -0
- package/src/modal.d.ts +3 -0
- package/src/modal.js +39 -0
- package/src/pagination.d.ts +2 -0
- package/src/pagination.js +16 -0
- package/src/toast.d.ts +9 -0
- package/src/toast.js +66 -0
- package/styles.css +3 -0
- package/tokens.css +321 -0
package/components.css
ADDED
|
@@ -0,0 +1,833 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Directo Design System · Component styles
|
|
3
|
+
One markup contract (ds-* classes + data-* attributes) shared by
|
|
4
|
+
@directo-ui/web (React), @directo-ui/angular and @directo-ui/astro.
|
|
5
|
+
Requires the generated design tokens (design-tokens.css).
|
|
6
|
+
========================================================================== */
|
|
7
|
+
|
|
8
|
+
/* ---------- Component-level aliases ---------- */
|
|
9
|
+
:root {
|
|
10
|
+
--ds-font-sans: var(--ds-font-family-gotham, Gotham), "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
11
|
+
--ds-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
12
|
+
--ds-focus-ring: 0 0 0 3px color-mix(in srgb, var(--ds-color-primary-500) 32%, transparent);
|
|
13
|
+
--ds-overlay: rgb(11 14 20 / .48);
|
|
14
|
+
--ds-surface-raised: var(--ds-bg-primary);
|
|
15
|
+
--ds-ease-out: cubic-bezier(.2, .8, .2, 1);
|
|
16
|
+
--ds-duration-fast: 140ms;
|
|
17
|
+
--ds-duration-base: 200ms;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* ---------- Dark theme: re-map semantic tokens only ----------
|
|
21
|
+
Add class="dark" or data-theme="dark" to <html> (or any container). */
|
|
22
|
+
.dark, [data-theme="dark"] {
|
|
23
|
+
color-scheme: dark;
|
|
24
|
+
--ds-text-primary: #F2F4FA;
|
|
25
|
+
--ds-text-secondary: #CAD0E0;
|
|
26
|
+
--ds-text-secondary-hover: #E2E6F0;
|
|
27
|
+
--ds-text-tertiary: #A9B0C4;
|
|
28
|
+
--ds-text-tertiary-hover: #CAD0E0;
|
|
29
|
+
--ds-text-quaternay: #858DA3;
|
|
30
|
+
--ds-text-placeholder: #858DA3;
|
|
31
|
+
--ds-text-disabled: #676F88;
|
|
32
|
+
--ds-text-link: #6B95F4;
|
|
33
|
+
--ds-text-link-hover: #9DBAF8;
|
|
34
|
+
--ds-text-brand-primary: #6B95F4;
|
|
35
|
+
--ds-text-brand-secondary: #CFDEFC;
|
|
36
|
+
--ds-text-brand-tertiary: #9DBAF8;
|
|
37
|
+
--ds-text-error-tertiary: #F5A8A6;
|
|
38
|
+
--ds-text-warning-primary: #FBDE85;
|
|
39
|
+
--ds-text-success-primary: #8FE89A;
|
|
40
|
+
--ds-fg-primary: #F2F4FA;
|
|
41
|
+
--ds-fg-secondary: #CAD0E0;
|
|
42
|
+
--ds-fg-tertiary: #A9B0C4;
|
|
43
|
+
--ds-fg-quaternay: #858DA3;
|
|
44
|
+
--ds-fg-disabled: #676F88;
|
|
45
|
+
--ds-fg-brand-primary: #6B95F4;
|
|
46
|
+
--ds-fg-brand-secondary: #9DBAF8;
|
|
47
|
+
--ds-border-primary: #3F4658;
|
|
48
|
+
--ds-border-secondary: #343B4B;
|
|
49
|
+
--ds-border-tertiary: #262C38;
|
|
50
|
+
--ds-border-disabled: #343B4B;
|
|
51
|
+
--ds-border-brand: #3A71EF;
|
|
52
|
+
--ds-border-focus: #6B95F4;
|
|
53
|
+
--ds-bg-primary: #141821;
|
|
54
|
+
--ds-bg-primary-hover: #1B202B;
|
|
55
|
+
--ds-bg-secondary: #1B202B;
|
|
56
|
+
--ds-bg-secondary-hover: #242A37;
|
|
57
|
+
--ds-bg-tertiary: #262C38;
|
|
58
|
+
--ds-bg-active: #2A3140;
|
|
59
|
+
--ds-bg-disabled: #262C38;
|
|
60
|
+
--ds-bg-brand-primary: #2F66EC;
|
|
61
|
+
--ds-bg-brand-primary-hover: #3A71EF;
|
|
62
|
+
--ds-bg-brand-secondary: #13254F;
|
|
63
|
+
--ds-bg-brand-alt: #0D2333;
|
|
64
|
+
--ds-bg-error-secondary: #3A1212;
|
|
65
|
+
--ds-bg-warning-secondary: #33270A;
|
|
66
|
+
--ds-bg-success-secondary: #0E2B14;
|
|
67
|
+
--ds-overlay: rgb(0 0 0 / .62);
|
|
68
|
+
--ds-surface-raised: #1B202B;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Keep the viewport width stable while modal components lock page scrolling. */
|
|
72
|
+
@supports (scrollbar-gutter: stable) {
|
|
73
|
+
html { scrollbar-gutter: stable; }
|
|
74
|
+
html body[data-scroll-locked] { margin-right: 0 !important; }
|
|
75
|
+
}
|
|
76
|
+
html:has(dialog.ds-dialog[open]), html:has(dialog.ds-sheet[open]) { overflow: hidden; }
|
|
77
|
+
|
|
78
|
+
[class^="ds-"], [class*=" ds-"] { box-sizing: border-box; }
|
|
79
|
+
/* The hidden attribute must win over component display values. */
|
|
80
|
+
[class^="ds-"][hidden], [class*=" ds-"][hidden] { display: none !important; }
|
|
81
|
+
[class^="ds-"] *, [class^="ds-"] *::before, [class^="ds-"] *::after { box-sizing: border-box; }
|
|
82
|
+
|
|
83
|
+
/* ==========================================================================
|
|
84
|
+
Button
|
|
85
|
+
========================================================================== */
|
|
86
|
+
.ds-button {
|
|
87
|
+
--ds-button-bg: var(--ds-bg-brand-primary);
|
|
88
|
+
--ds-button-hover: var(--ds-bg-brand-primary-hover);
|
|
89
|
+
--ds-button-active: var(--ds-color-primary-700);
|
|
90
|
+
--ds-button-color: var(--ds-color-base-white);
|
|
91
|
+
--ds-button-border: transparent;
|
|
92
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 8px;
|
|
93
|
+
min-height: 40px; margin: 0; padding: 0 16px;
|
|
94
|
+
border: 1px solid var(--ds-button-border); border-radius: var(--ds-radius-md, 8px);
|
|
95
|
+
background: var(--ds-button-bg); color: var(--ds-button-color);
|
|
96
|
+
font: 500 14px/1.2 var(--ds-font-sans); letter-spacing: -.005em; text-decoration: none; white-space: nowrap;
|
|
97
|
+
cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
|
|
98
|
+
transition: background-color var(--ds-duration-fast), border-color var(--ds-duration-fast),
|
|
99
|
+
color var(--ds-duration-fast), box-shadow var(--ds-duration-fast), transform 180ms ease;
|
|
100
|
+
}
|
|
101
|
+
.ds-button[data-variant="secondary"] {
|
|
102
|
+
--ds-button-bg: var(--ds-bg-primary); --ds-button-hover: var(--ds-bg-secondary);
|
|
103
|
+
--ds-button-active: var(--ds-bg-secondary-hover); --ds-button-color: var(--ds-text-primary);
|
|
104
|
+
--ds-button-border: var(--ds-border-secondary);
|
|
105
|
+
box-shadow: var(--ds-shadow-xs);
|
|
106
|
+
}
|
|
107
|
+
.ds-button[data-variant="tertiary"] {
|
|
108
|
+
--ds-button-bg: transparent; --ds-button-hover: var(--ds-bg-brand-secondary);
|
|
109
|
+
--ds-button-active: var(--ds-bg-brand-secondary); --ds-button-color: var(--ds-text-brand-primary);
|
|
110
|
+
--ds-button-border: currentColor;
|
|
111
|
+
}
|
|
112
|
+
.ds-button[data-variant="text"], .ds-button[data-variant="ghost"] {
|
|
113
|
+
--ds-button-bg: transparent; --ds-button-hover: var(--ds-bg-brand-secondary);
|
|
114
|
+
--ds-button-active: var(--ds-bg-brand-secondary); --ds-button-color: var(--ds-text-brand-primary);
|
|
115
|
+
}
|
|
116
|
+
.ds-button[data-variant="danger"] {
|
|
117
|
+
--ds-button-bg: var(--ds-color-error-500); --ds-button-hover: var(--ds-color-error-600);
|
|
118
|
+
--ds-button-active: var(--ds-color-error-700); --ds-button-color: var(--ds-color-base-white);
|
|
119
|
+
}
|
|
120
|
+
.ds-button[data-size="xs"] { min-height: 28px; padding-inline: 10px; font-size: 12px; gap: 6px; border-radius: 6px; }
|
|
121
|
+
.ds-button[data-size="sm"] { min-height: 34px; padding-inline: 12px; font-size: 13px; }
|
|
122
|
+
.ds-button[data-size="lg"] { min-height: 44px; padding-inline: 18px; font-size: 15px; }
|
|
123
|
+
.ds-button[data-size="xl"] { min-height: 48px; padding-inline: 20px; font-size: 16px; border-radius: var(--ds-radius-lg, 12px); }
|
|
124
|
+
.ds-button[data-size="2xl"] { min-height: 56px; padding-inline: 24px; font-size: 17px; border-radius: var(--ds-radius-lg, 12px); }
|
|
125
|
+
.ds-button[data-full-width="true"] { width: 100%; }
|
|
126
|
+
.ds-button:hover:not(:disabled) { background: var(--ds-button-hover); }
|
|
127
|
+
.ds-button:active:not(:disabled) { background: var(--ds-button-active); transform: scale(.98); }
|
|
128
|
+
.ds-button:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
|
|
129
|
+
.ds-button:disabled { opacity: .45; cursor: not-allowed; }
|
|
130
|
+
.ds-button[aria-busy="true"] { cursor: progress; }
|
|
131
|
+
.ds-button-icon { display: inline-flex; flex: none; }
|
|
132
|
+
|
|
133
|
+
/* ==========================================================================
|
|
134
|
+
Icon button
|
|
135
|
+
========================================================================== */
|
|
136
|
+
.ds-icon-button {
|
|
137
|
+
display: inline-flex; align-items: center; justify-content: center; flex: none;
|
|
138
|
+
width: 40px; height: 40px; margin: 0; padding: 0; border: 1px solid transparent; border-radius: 10px;
|
|
139
|
+
color: var(--ds-color-base-white); background: var(--ds-bg-brand-primary); cursor: pointer;
|
|
140
|
+
transition: color var(--ds-duration-fast), background-color var(--ds-duration-fast),
|
|
141
|
+
border-color var(--ds-duration-fast), box-shadow var(--ds-duration-fast), transform 180ms ease;
|
|
142
|
+
}
|
|
143
|
+
.ds-icon-button[data-size="sm"] { width: 32px; height: 32px; border-radius: 8px; }
|
|
144
|
+
.ds-icon-button[data-size="lg"] { width: 48px; height: 48px; border-radius: 12px; }
|
|
145
|
+
.ds-icon-button[data-variant="secondary"] { color: var(--ds-text-primary); background: var(--ds-bg-primary); border-color: var(--ds-border-secondary); box-shadow: var(--ds-shadow-xs); }
|
|
146
|
+
.ds-icon-button[data-variant="tertiary"] { color: var(--ds-text-brand-primary); background: transparent; border-color: currentColor; }
|
|
147
|
+
.ds-icon-button[data-variant="icon"], .ds-icon-button[data-variant="ghost"] { color: var(--ds-text-tertiary); background: transparent; }
|
|
148
|
+
.ds-icon-button[data-variant="primary"]:hover:not(:disabled) { background: var(--ds-bg-brand-primary-hover); }
|
|
149
|
+
.ds-icon-button[data-variant="secondary"]:hover:not(:disabled) { background: var(--ds-bg-secondary); }
|
|
150
|
+
.ds-icon-button[data-variant="tertiary"]:hover:not(:disabled) { background: var(--ds-bg-brand-secondary); }
|
|
151
|
+
.ds-icon-button[data-variant="icon"]:hover:not(:disabled),
|
|
152
|
+
.ds-icon-button[data-variant="ghost"]:hover:not(:disabled) { color: var(--ds-text-primary); background: var(--ds-bg-secondary); }
|
|
153
|
+
.ds-icon-button:active:not(:disabled) { transform: scale(.94); }
|
|
154
|
+
.ds-icon-button:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
|
|
155
|
+
.ds-icon-button:disabled { color: var(--ds-text-disabled); background: var(--ds-bg-disabled); border-color: transparent; cursor: not-allowed; }
|
|
156
|
+
.ds-icon-button > span, .ds-icon-button > svg { display: inline-flex; }
|
|
157
|
+
|
|
158
|
+
/* ==========================================================================
|
|
159
|
+
Fields: TextField, Textarea, native Select, native Date
|
|
160
|
+
========================================================================== */
|
|
161
|
+
.ds-input {
|
|
162
|
+
display: flex; flex-direction: column; gap: 6px; min-width: 0;
|
|
163
|
+
color: var(--ds-text-primary); font-family: var(--ds-font-sans);
|
|
164
|
+
}
|
|
165
|
+
.ds-input > label, .ds-input-label { color: var(--ds-text-secondary); font-size: 13px; font-weight: 500; }
|
|
166
|
+
.ds-input-required { margin-inline-start: 2px; color: var(--ds-color-error-500); }
|
|
167
|
+
.ds-input-shell {
|
|
168
|
+
position: relative; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
|
|
169
|
+
border: 1px solid var(--ds-border-secondary); border-radius: var(--ds-radius-md, 8px);
|
|
170
|
+
background: var(--ds-bg-primary); color: var(--ds-text-primary);
|
|
171
|
+
transition: border-color var(--ds-duration-fast), box-shadow var(--ds-duration-fast), background-color var(--ds-duration-fast);
|
|
172
|
+
}
|
|
173
|
+
.ds-input-shell:hover { border-color: var(--ds-color-neutral-400); }
|
|
174
|
+
.ds-input-shell:focus-within { border-color: var(--ds-border-focus); box-shadow: var(--ds-focus-ring); }
|
|
175
|
+
.ds-input-shell > span[aria-hidden="true"], .ds-input-icon { display: inline-flex; flex: none; color: var(--ds-text-quaternay); }
|
|
176
|
+
.ds-input input, .ds-input textarea, .ds-input select {
|
|
177
|
+
width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; outline: none;
|
|
178
|
+
color: inherit; background: transparent; font: 400 15px/1.4 var(--ds-font-sans);
|
|
179
|
+
}
|
|
180
|
+
.ds-input input { height: 42px; }
|
|
181
|
+
.ds-input input::placeholder, .ds-input textarea::placeholder { color: var(--ds-text-placeholder); opacity: 1; }
|
|
182
|
+
.ds-input[data-multiline="true"] .ds-input-shell { align-items: stretch; padding: 10px 12px; }
|
|
183
|
+
.ds-input textarea { min-height: 88px; resize: vertical; }
|
|
184
|
+
.ds-input select { height: 42px; padding-inline-end: 24px; appearance: none; cursor: pointer; }
|
|
185
|
+
.ds-input select option { color: var(--ds-text-primary); background: var(--ds-bg-primary); }
|
|
186
|
+
.ds-select-native::after {
|
|
187
|
+
content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
|
|
188
|
+
border-right: 1.75px solid var(--ds-text-tertiary); border-bottom: 1.75px solid var(--ds-text-tertiary);
|
|
189
|
+
transform: rotate(45deg); pointer-events: none;
|
|
190
|
+
}
|
|
191
|
+
.ds-input input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .7; }
|
|
192
|
+
.dark .ds-input input[type="date"]::-webkit-calendar-picker-indicator,
|
|
193
|
+
[data-theme="dark"] .ds-input input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }
|
|
194
|
+
.ds-input small, .ds-input-hint { color: var(--ds-text-tertiary); font-size: 12px; line-height: 1.4; }
|
|
195
|
+
.ds-input-counter { align-self: flex-end; color: var(--ds-text-quaternay); font-size: 12px; font-variant-numeric: tabular-nums; }
|
|
196
|
+
.ds-input[data-error="true"] .ds-input-shell { border-color: var(--ds-border-error); }
|
|
197
|
+
.ds-input[data-error="true"] .ds-input-shell:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-color-error-500) 25%, transparent); }
|
|
198
|
+
.ds-input[data-error="true"] small, .ds-input[data-error="true"] .ds-input-hint { color: var(--ds-text-error-tertiary); }
|
|
199
|
+
.ds-input[data-disabled="true"] .ds-input-shell { background: var(--ds-bg-secondary); border-color: var(--ds-border-tertiary); }
|
|
200
|
+
.ds-input[data-disabled="true"] { opacity: .6; }
|
|
201
|
+
.ds-input[data-disabled="true"] input, .ds-input[data-disabled="true"] select,
|
|
202
|
+
.ds-input[data-disabled="true"] textarea { cursor: not-allowed; }
|
|
203
|
+
.ds-input[data-size="sm"] .ds-input-shell { min-height: 36px; }
|
|
204
|
+
.ds-input[data-size="sm"] input, .ds-input[data-size="sm"] select { height: 34px; font-size: 14px; }
|
|
205
|
+
.ds-input[data-size="lg"] .ds-input-shell { min-height: 52px; }
|
|
206
|
+
.ds-input[data-size="lg"] input, .ds-input[data-size="lg"] select { height: 50px; font-size: 16px; }
|
|
207
|
+
|
|
208
|
+
/* ==========================================================================
|
|
209
|
+
Choices: Checkbox, Radio, Switch (native inputs + Radix React)
|
|
210
|
+
========================================================================== */
|
|
211
|
+
.ds-choice, .ds-react-choice {
|
|
212
|
+
display: inline-flex; align-items: center; gap: 10px; min-height: 32px;
|
|
213
|
+
color: var(--ds-text-primary); font: 400 14px/1.4 var(--ds-font-sans); cursor: pointer;
|
|
214
|
+
}
|
|
215
|
+
.ds-choice:has(input:disabled), .ds-react-choice:has(button:disabled) { color: var(--ds-text-disabled); cursor: not-allowed; }
|
|
216
|
+
.ds-choice-text { display: flex; flex-direction: column; gap: 2px; }
|
|
217
|
+
.ds-choice-description { color: var(--ds-text-tertiary); font-size: 12px; }
|
|
218
|
+
.ds-choice input[type="checkbox"], .ds-choice input[type="radio"],
|
|
219
|
+
.ds-react-checkbox, .ds-react-radio {
|
|
220
|
+
appearance: none; display: inline-flex; align-items: center; justify-content: center; flex: none;
|
|
221
|
+
width: 20px; height: 20px; margin: 0; padding: 0;
|
|
222
|
+
border: 1.5px solid var(--ds-color-neutral-400); background: var(--ds-bg-primary); color: var(--ds-color-base-white);
|
|
223
|
+
cursor: pointer; transition: background-color var(--ds-duration-fast), border-color var(--ds-duration-fast), box-shadow var(--ds-duration-fast);
|
|
224
|
+
}
|
|
225
|
+
.ds-choice input[type="checkbox"], .ds-react-checkbox { border-radius: 6px; }
|
|
226
|
+
.ds-choice input[type="radio"], .ds-react-radio { border-radius: 50%; }
|
|
227
|
+
.ds-choice input[type="checkbox"]:hover:not(:disabled), .ds-choice input[type="radio"]:hover:not(:disabled),
|
|
228
|
+
.ds-react-checkbox:hover:not(:disabled), .ds-react-radio:hover:not(:disabled) { border-color: var(--ds-border-brand); }
|
|
229
|
+
.ds-choice input[type="checkbox"]:checked, .ds-choice input[type="checkbox"]:indeterminate,
|
|
230
|
+
.ds-react-checkbox[data-state="checked"], .ds-react-checkbox[data-state="indeterminate"] {
|
|
231
|
+
border-color: var(--ds-bg-brand-primary); background-color: var(--ds-bg-brand-primary);
|
|
232
|
+
}
|
|
233
|
+
.ds-choice input[type="checkbox"]:not([role="switch"]):checked {
|
|
234
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
|
|
235
|
+
background-size: 14px; background-position: center; background-repeat: no-repeat;
|
|
236
|
+
}
|
|
237
|
+
.ds-choice input[type="checkbox"]:not([role="switch"]):indeterminate {
|
|
238
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M4 8h8'/%3E%3C/svg%3E");
|
|
239
|
+
background-size: 14px; background-position: center; background-repeat: no-repeat;
|
|
240
|
+
}
|
|
241
|
+
.ds-choice input[type="radio"]:checked, .ds-react-radio[data-state="checked"] {
|
|
242
|
+
border-color: var(--ds-bg-brand-primary);
|
|
243
|
+
background: radial-gradient(circle, var(--ds-bg-brand-primary) 0 4.5px, var(--ds-bg-primary) 5px);
|
|
244
|
+
}
|
|
245
|
+
.ds-react-radio-indicator { display: none; }
|
|
246
|
+
.ds-choice input:focus-visible, .ds-react-checkbox:focus-visible, .ds-react-radio:focus-visible,
|
|
247
|
+
.ds-react-switch:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
|
|
248
|
+
.ds-choice input:disabled, .ds-react-checkbox:disabled, .ds-react-radio:disabled, .ds-react-switch:disabled {
|
|
249
|
+
opacity: .5; cursor: not-allowed;
|
|
250
|
+
}
|
|
251
|
+
/* Switch */
|
|
252
|
+
.ds-choice input[role="switch"], .ds-react-switch {
|
|
253
|
+
appearance: none; position: relative; flex: none; width: 44px; height: 24px; margin: 0; padding: 0;
|
|
254
|
+
border: 0; border-radius: 999px; background: var(--ds-color-neutral-300); cursor: pointer;
|
|
255
|
+
transition: background-color var(--ds-duration-base);
|
|
256
|
+
}
|
|
257
|
+
.ds-choice input[role="switch"]::before {
|
|
258
|
+
content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
|
|
259
|
+
background: var(--ds-color-base-white); box-shadow: 0 1px 3px rgb(0 0 0 / .2);
|
|
260
|
+
transition: transform var(--ds-duration-base) var(--ds-ease-out);
|
|
261
|
+
}
|
|
262
|
+
.ds-choice input[role="switch"]:checked, .ds-react-switch[data-state="checked"] { background: var(--ds-bg-brand-primary); }
|
|
263
|
+
.ds-choice input[role="switch"]:checked::before { transform: translateX(20px); }
|
|
264
|
+
.ds-react-switch-thumb {
|
|
265
|
+
display: block; width: 20px; height: 20px; border-radius: 50%; background: var(--ds-color-base-white);
|
|
266
|
+
box-shadow: 0 1px 3px rgb(0 0 0 / .2); transform: translateX(2px); transition: transform var(--ds-duration-base) var(--ds-ease-out);
|
|
267
|
+
}
|
|
268
|
+
.ds-react-switch-thumb[data-state="checked"] { transform: translateX(22px); }
|
|
269
|
+
/* Radio group */
|
|
270
|
+
.ds-radio-group, .ds-react-radio-group {
|
|
271
|
+
display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0;
|
|
272
|
+
font-family: var(--ds-font-sans);
|
|
273
|
+
}
|
|
274
|
+
.ds-radio-group[data-orientation="horizontal"], .ds-react-radio-group[data-orientation="horizontal"] { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; }
|
|
275
|
+
.ds-radio-group > legend { margin-bottom: 6px; padding: 0; color: var(--ds-text-secondary); font-size: 13px; font-weight: 500; }
|
|
276
|
+
|
|
277
|
+
/* ==========================================================================
|
|
278
|
+
Select (Radix React)
|
|
279
|
+
========================================================================== */
|
|
280
|
+
.ds-select-trigger {
|
|
281
|
+
display: flex; align-items: center; justify-content: space-between; gap: 12px;
|
|
282
|
+
width: 100%; min-height: 44px; margin: 0; padding: 0 12px;
|
|
283
|
+
color: var(--ds-text-primary); background: var(--ds-bg-primary);
|
|
284
|
+
border: 1px solid var(--ds-border-secondary); border-radius: var(--ds-radius-md, 8px);
|
|
285
|
+
font: 400 15px var(--ds-font-sans); text-align: start;
|
|
286
|
+
cursor: pointer; transition: border-color var(--ds-duration-fast), box-shadow var(--ds-duration-fast);
|
|
287
|
+
}
|
|
288
|
+
.ds-select-trigger[data-placeholder] { color: var(--ds-text-placeholder); }
|
|
289
|
+
.ds-select-trigger:hover:not(:disabled) { border-color: var(--ds-color-neutral-400); }
|
|
290
|
+
.ds-select-trigger[data-state="open"], .ds-select-trigger:focus-visible { outline: none; border-color: var(--ds-border-focus); box-shadow: var(--ds-focus-ring); }
|
|
291
|
+
.ds-select-trigger:disabled { opacity: .5; cursor: not-allowed; background: var(--ds-bg-secondary); }
|
|
292
|
+
.ds-select-trigger > span:last-child { display: inline-flex; color: var(--ds-text-tertiary); }
|
|
293
|
+
.ds-select-content {
|
|
294
|
+
z-index: 90; min-width: var(--radix-select-trigger-width, 8rem); max-height: var(--radix-select-content-available-height, 80vh);
|
|
295
|
+
overflow: auto; padding: 4px; color: var(--ds-text-primary); background: var(--ds-surface-raised);
|
|
296
|
+
border: 1px solid var(--ds-border-tertiary); border-radius: 10px; box-shadow: var(--ds-shadow-lg);
|
|
297
|
+
font: 400 14px var(--ds-font-sans); transform-origin: var(--radix-select-content-transform-origin);
|
|
298
|
+
}
|
|
299
|
+
.ds-select-viewport { padding: 0; }
|
|
300
|
+
.ds-select-item {
|
|
301
|
+
display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px;
|
|
302
|
+
border-radius: 6px; cursor: pointer; outline: none; user-select: none;
|
|
303
|
+
transition: background-color 120ms, color 120ms;
|
|
304
|
+
}
|
|
305
|
+
.ds-select-item[data-highlighted] { background: var(--ds-bg-brand-secondary); color: var(--ds-text-brand-secondary); }
|
|
306
|
+
.ds-select-item[data-disabled] { opacity: .5; cursor: not-allowed; }
|
|
307
|
+
.ds-select-check { display: inline-flex; margin-left: auto; color: var(--ds-text-brand-primary); }
|
|
308
|
+
|
|
309
|
+
/* ==========================================================================
|
|
310
|
+
Tabs (native ARIA tabs + Radix React)
|
|
311
|
+
========================================================================== */
|
|
312
|
+
.ds-tabs { display: flex; flex-direction: column; min-width: 0; font-family: var(--ds-font-sans); }
|
|
313
|
+
.ds-tabs-list, .ds-react-tabs-list {
|
|
314
|
+
display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
|
|
315
|
+
border-bottom: 1px solid var(--ds-border-tertiary);
|
|
316
|
+
}
|
|
317
|
+
.ds-tabs-list::-webkit-scrollbar, .ds-react-tabs-list::-webkit-scrollbar { display: none; }
|
|
318
|
+
.ds-tab, .ds-react-tab {
|
|
319
|
+
position: relative; flex: none; margin: 0; padding: 10px 14px; border: 0; border-radius: 8px 8px 0 0;
|
|
320
|
+
color: var(--ds-text-tertiary); background: transparent;
|
|
321
|
+
font: 500 14px var(--ds-font-sans); white-space: nowrap; cursor: pointer;
|
|
322
|
+
transition: color var(--ds-duration-fast), background-color var(--ds-duration-fast), box-shadow var(--ds-duration-fast);
|
|
323
|
+
}
|
|
324
|
+
.ds-tab:hover:not(:disabled):not([aria-selected="true"]), .ds-react-tab:hover:not(:disabled):not([aria-selected="true"]) { color: var(--ds-text-primary); }
|
|
325
|
+
.ds-tab[aria-selected="true"], .ds-react-tab[aria-selected="true"] { color: var(--ds-text-brand-primary); box-shadow: inset 0 -2px var(--ds-border-brand); }
|
|
326
|
+
.ds-tab:focus-visible, .ds-react-tab:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
|
|
327
|
+
.ds-tab:disabled, .ds-react-tab:disabled { opacity: .45; cursor: not-allowed; }
|
|
328
|
+
/* pills */
|
|
329
|
+
.ds-tabs-list[data-variant="pills"], .ds-react-tabs-list[data-variant="pills"] {
|
|
330
|
+
align-self: flex-start; max-width: 100%; padding: 4px; border: 0; border-radius: 10px; background: var(--ds-bg-secondary);
|
|
331
|
+
}
|
|
332
|
+
[data-variant="pills"] > .ds-tab, [data-variant="pills"] > .ds-react-tab { padding: 7px 14px; border-radius: 7px; }
|
|
333
|
+
[data-variant="pills"] > .ds-tab[aria-selected="true"], [data-variant="pills"] > .ds-react-tab[aria-selected="true"] {
|
|
334
|
+
color: var(--ds-text-primary); background: var(--ds-bg-primary); box-shadow: var(--ds-shadow-sm);
|
|
335
|
+
}
|
|
336
|
+
/* enclosed */
|
|
337
|
+
.ds-tabs-list[data-variant="enclosed"], .ds-react-tabs-list[data-variant="enclosed"] { gap: 2px; }
|
|
338
|
+
[data-variant="enclosed"] > .ds-tab[aria-selected="true"], [data-variant="enclosed"] > .ds-react-tab[aria-selected="true"] {
|
|
339
|
+
background: var(--ds-bg-primary); box-shadow: inset 0 0 0 1px var(--ds-border-tertiary), 0 1px 0 var(--ds-bg-primary);
|
|
340
|
+
}
|
|
341
|
+
.ds-tab-panel, .ds-react-tab-panel { padding-top: 16px; color: var(--ds-text-primary); font-size: 14px; outline: none; }
|
|
342
|
+
.ds-tab-panel[hidden] { display: none; }
|
|
343
|
+
.ds-tab-panel:focus-visible, .ds-react-tab-panel:focus-visible { box-shadow: var(--ds-focus-ring); border-radius: 6px; }
|
|
344
|
+
.ds-react-tab-panel[data-state="active"], .ds-tab-panel:not([hidden]) { animation: ds-panel-enter 200ms ease-out; }
|
|
345
|
+
|
|
346
|
+
/* ==========================================================================
|
|
347
|
+
Card
|
|
348
|
+
========================================================================== */
|
|
349
|
+
.ds-card {
|
|
350
|
+
display: block; width: 100%; padding: 20px; border: 1px solid var(--ds-border-tertiary); border-radius: var(--ds-radius-lg, 12px);
|
|
351
|
+
color: var(--ds-text-primary); background: var(--ds-bg-primary); font-family: var(--ds-font-sans); text-align: left;
|
|
352
|
+
}
|
|
353
|
+
.ds-card[data-padding="none"] { padding: 0; }
|
|
354
|
+
.ds-card[data-padding="sm"] { padding: 12px; }
|
|
355
|
+
.ds-card[data-padding="md"] { padding: 20px; }
|
|
356
|
+
.ds-card[data-padding="lg"] { padding: 28px; }
|
|
357
|
+
.ds-card[data-variant="elevated"] { border-color: transparent; box-shadow: var(--ds-shadow-lg); }
|
|
358
|
+
.ds-card[data-variant="outlined"] { border-color: var(--ds-border-secondary); }
|
|
359
|
+
.ds-card[data-variant="filled"] { border-color: transparent; background: var(--ds-bg-secondary); }
|
|
360
|
+
.ds-card[data-variant="interactive"] {
|
|
361
|
+
cursor: pointer; transition: border-color 160ms, box-shadow 160ms, transform 180ms ease;
|
|
362
|
+
}
|
|
363
|
+
.ds-card[data-variant="interactive"]:hover { border-color: var(--ds-color-primary-300); box-shadow: var(--ds-shadow-md); transform: translateY(-2px); }
|
|
364
|
+
.ds-card[data-variant="interactive"]:active { transform: translateY(0); }
|
|
365
|
+
.ds-card[data-selected="true"] { border-color: var(--ds-border-brand); box-shadow: inset 0 0 0 1px var(--ds-border-brand); background: var(--ds-bg-brand-secondary); }
|
|
366
|
+
.ds-card[role="button"]:focus-visible, a.ds-card:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
|
|
367
|
+
a.ds-card { text-decoration: none; }
|
|
368
|
+
.ds-card-header { margin-bottom: 12px; color: var(--ds-text-primary); font-size: 16px; font-weight: 600; }
|
|
369
|
+
.ds-card-title { margin: 0; color: var(--ds-text-primary); font-size: 16px; font-weight: 600; line-height: 1.35; }
|
|
370
|
+
.ds-card-description { margin: 4px 0 0; color: var(--ds-text-tertiary); font-size: 14px; font-weight: 400; line-height: 1.5; }
|
|
371
|
+
.ds-card-content { color: var(--ds-text-secondary); font-size: 14px; line-height: 1.55; }
|
|
372
|
+
.ds-card-footer { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ds-border-tertiary); }
|
|
373
|
+
.ds-card-media { margin: -20px -20px 16px; overflow: hidden; border-radius: 11px 11px 0 0; }
|
|
374
|
+
.ds-card-media img { display: block; width: 100%; height: auto; }
|
|
375
|
+
|
|
376
|
+
/* ==========================================================================
|
|
377
|
+
Badge
|
|
378
|
+
========================================================================== */
|
|
379
|
+
.ds-badge {
|
|
380
|
+
display: inline-flex; align-items: center; gap: 5px; vertical-align: middle;
|
|
381
|
+
border-radius: 999px; font: 500 12px/1.3 var(--ds-font-sans); white-space: nowrap;
|
|
382
|
+
color: var(--ds-text-brand-secondary); background: var(--ds-bg-brand-secondary);
|
|
383
|
+
}
|
|
384
|
+
.ds-badge[data-size="sm"] { min-height: 20px; padding: 1px 8px; font-size: 11px; }
|
|
385
|
+
.ds-badge, .ds-badge[data-size="md"] { min-height: 24px; padding: 2px 10px; }
|
|
386
|
+
.ds-badge[data-size="lg"] { min-height: 28px; padding: 4px 12px; font-size: 13px; }
|
|
387
|
+
.ds-badge[data-variant="primary"] { color: var(--ds-text-brand-secondary); background: var(--ds-bg-brand-secondary); }
|
|
388
|
+
.ds-badge[data-variant="secondary"], .ds-badge[data-variant="info"] { color: var(--ds-text-accent-secondary); background: var(--ds-bg-brand-alt); }
|
|
389
|
+
.ds-badge[data-variant="success"] { color: var(--ds-text-success-primary); background: var(--ds-bg-success-secondary); }
|
|
390
|
+
.ds-badge[data-variant="warning"] { color: var(--ds-text-warning-primary); background: var(--ds-bg-warning-secondary); }
|
|
391
|
+
.ds-badge[data-variant="error"] { color: var(--ds-text-error-tertiary); background: var(--ds-bg-error-secondary); }
|
|
392
|
+
.ds-badge[data-variant="neutral"] { color: var(--ds-text-secondary); background: var(--ds-bg-tertiary); }
|
|
393
|
+
.ds-badge[data-variant="solid"] { color: var(--ds-color-base-white); background: var(--ds-bg-brand-primary); }
|
|
394
|
+
.ds-badge[data-variant="outline"] { color: var(--ds-text-secondary); background: transparent; box-shadow: inset 0 0 0 1px var(--ds-border-secondary); }
|
|
395
|
+
.ds-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
|
|
396
|
+
.ds-badge-remove {
|
|
397
|
+
display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center;
|
|
398
|
+
margin: 0 -5px 0 0; padding: 0; border: 0; border-radius: 50%; color: inherit; background: transparent;
|
|
399
|
+
font: inherit; line-height: 1; cursor: pointer;
|
|
400
|
+
}
|
|
401
|
+
.ds-badge-remove:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
|
|
402
|
+
.ds-badge-remove:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
|
|
403
|
+
|
|
404
|
+
/* ==========================================================================
|
|
405
|
+
Alert
|
|
406
|
+
========================================================================== */
|
|
407
|
+
.ds-alert {
|
|
408
|
+
--ds-alert-accent: var(--ds-fg-brand-primary);
|
|
409
|
+
display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
|
|
410
|
+
border: 1px solid color-mix(in srgb, var(--ds-alert-accent) 22%, transparent); border-radius: var(--ds-radius-lg, 12px);
|
|
411
|
+
color: var(--ds-text-primary); background: var(--ds-bg-brand-secondary); font: 400 14px/1.5 var(--ds-font-sans);
|
|
412
|
+
}
|
|
413
|
+
.ds-alert[data-variant="success"] { --ds-alert-accent: var(--ds-fg-success-primary); background: var(--ds-bg-success-secondary); }
|
|
414
|
+
.ds-alert[data-variant="warning"] { --ds-alert-accent: var(--ds-fg-warning-primary); background: var(--ds-bg-warning-secondary); }
|
|
415
|
+
.ds-alert[data-variant="error"] { --ds-alert-accent: var(--ds-fg-error-primary); background: var(--ds-bg-error-secondary); }
|
|
416
|
+
.ds-alert-icon { display: inline-flex; flex: none; margin-top: 1px; color: var(--ds-alert-accent); }
|
|
417
|
+
.ds-alert-icon svg { width: 20px; height: 20px; }
|
|
418
|
+
.ds-alert-content { flex: 1; min-width: 0; }
|
|
419
|
+
.ds-alert-title { display: block; margin: 0; font-weight: 600; color: var(--ds-text-primary); }
|
|
420
|
+
.ds-alert-description { margin: 2px 0 0; color: var(--ds-text-secondary); font-size: 13.5px; }
|
|
421
|
+
.ds-alert-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
|
|
422
|
+
.ds-alert-close {
|
|
423
|
+
display: inline-flex; flex: none; width: 28px; height: 28px; align-items: center; justify-content: center;
|
|
424
|
+
margin: -4px -6px -4px 0; padding: 0; border: 0; border-radius: 6px;
|
|
425
|
+
color: var(--ds-text-tertiary); background: transparent; font: inherit; font-size: 18px; line-height: 1; cursor: pointer;
|
|
426
|
+
}
|
|
427
|
+
.ds-alert-close:hover { color: var(--ds-text-primary); background: color-mix(in srgb, currentColor 10%, transparent); }
|
|
428
|
+
.ds-alert-close:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
|
|
429
|
+
|
|
430
|
+
/* ==========================================================================
|
|
431
|
+
Avatar
|
|
432
|
+
========================================================================== */
|
|
433
|
+
.ds-avatar {
|
|
434
|
+
--ds-avatar-size: 40px;
|
|
435
|
+
position: relative; display: inline-flex; flex: none; width: var(--ds-avatar-size); height: var(--ds-avatar-size);
|
|
436
|
+
vertical-align: middle; border-radius: 50%;
|
|
437
|
+
}
|
|
438
|
+
.ds-avatar[data-size="xs"] { --ds-avatar-size: 24px; }
|
|
439
|
+
.ds-avatar[data-size="sm"] { --ds-avatar-size: 32px; }
|
|
440
|
+
.ds-avatar[data-size="lg"] { --ds-avatar-size: 48px; }
|
|
441
|
+
.ds-avatar[data-size="xl"] { --ds-avatar-size: 64px; }
|
|
442
|
+
.ds-avatar[data-size="2xl"] { --ds-avatar-size: 80px; }
|
|
443
|
+
.ds-avatar[data-shape="rounded"] { border-radius: 25%; }
|
|
444
|
+
.ds-avatar[data-shape="square"] { border-radius: 8px; }
|
|
445
|
+
.ds-avatar > img, .ds-avatar-fallback {
|
|
446
|
+
width: 100%; height: 100%; border-radius: inherit; object-fit: cover;
|
|
447
|
+
}
|
|
448
|
+
.ds-avatar-fallback {
|
|
449
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
450
|
+
color: var(--ds-text-brand-secondary); background: var(--ds-bg-brand-secondary);
|
|
451
|
+
font: 600 calc(var(--ds-avatar-size) * .38)/1 var(--ds-font-sans); letter-spacing: -.02em; user-select: none;
|
|
452
|
+
}
|
|
453
|
+
.ds-avatar-status {
|
|
454
|
+
position: absolute; right: 0; bottom: 0; width: max(10px, 26%); height: max(10px, 26%);
|
|
455
|
+
border: 2px solid var(--ds-bg-primary); border-radius: 50%;
|
|
456
|
+
}
|
|
457
|
+
.ds-avatar-status[data-status="online"] { background: var(--ds-color-success-500); }
|
|
458
|
+
.ds-avatar-status[data-status="offline"] { background: var(--ds-color-neutral-400); }
|
|
459
|
+
.ds-avatar-status[data-status="away"] { background: var(--ds-color-warning-500); }
|
|
460
|
+
.ds-avatar-status[data-status="busy"] { background: var(--ds-color-error-500); }
|
|
461
|
+
.ds-avatar-group { display: inline-flex; }
|
|
462
|
+
.ds-avatar-group > .ds-avatar { box-shadow: 0 0 0 2px var(--ds-bg-primary); }
|
|
463
|
+
.ds-avatar-group > .ds-avatar + .ds-avatar { margin-inline-start: -8px; }
|
|
464
|
+
|
|
465
|
+
/* ==========================================================================
|
|
466
|
+
Modal / Dialog (Radix React + native <dialog>)
|
|
467
|
+
========================================================================== */
|
|
468
|
+
.ds-modal-overlay, .ds-sheet-overlay { position: fixed; inset: 0; z-index: 80; background: var(--ds-overlay); }
|
|
469
|
+
.ds-modal-content {
|
|
470
|
+
position: fixed; top: 50%; left: 50%; z-index: 81; translate: -50% -50%;
|
|
471
|
+
width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px;
|
|
472
|
+
color: var(--ds-text-primary); background: var(--ds-surface-raised);
|
|
473
|
+
border: 1px solid var(--ds-border-tertiary); border-radius: 16px; box-shadow: var(--ds-shadow-xl), 0 24px 48px rgb(0 0 0 / .12);
|
|
474
|
+
font-family: var(--ds-font-sans); outline: none;
|
|
475
|
+
}
|
|
476
|
+
.ds-modal-content[data-size="sm"], dialog.ds-dialog[data-size="sm"] { width: min(380px, calc(100vw - 32px)); }
|
|
477
|
+
.ds-modal-content[data-size="lg"], dialog.ds-dialog[data-size="lg"] { width: min(640px, calc(100vw - 32px)); }
|
|
478
|
+
dialog.ds-dialog {
|
|
479
|
+
width: min(480px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 24px;
|
|
480
|
+
color: var(--ds-text-primary); background: var(--ds-surface-raised);
|
|
481
|
+
border: 1px solid var(--ds-border-tertiary); border-radius: 16px; box-shadow: var(--ds-shadow-xl), 0 24px 48px rgb(0 0 0 / .12);
|
|
482
|
+
font-family: var(--ds-font-sans); outline: none;
|
|
483
|
+
}
|
|
484
|
+
dialog.ds-dialog::backdrop { background: var(--ds-overlay); }
|
|
485
|
+
dialog.ds-dialog[open] { animation: ds-pop-enter 230ms var(--ds-ease-out) both; }
|
|
486
|
+
dialog.ds-dialog[open]::backdrop { animation: ds-overlay-enter 220ms ease-out both; }
|
|
487
|
+
.ds-modal-header { display: flex; flex-direction: column; gap: 6px; padding-inline-end: 32px; margin-bottom: 16px; }
|
|
488
|
+
.ds-modal-title { margin: 0; color: var(--ds-text-primary); font-size: 18px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
|
|
489
|
+
.ds-modal-description { margin: 0; color: var(--ds-text-tertiary); font-size: 14px; line-height: 1.5; }
|
|
490
|
+
.ds-modal-body { color: var(--ds-text-secondary); font-size: 14px; line-height: 1.55; }
|
|
491
|
+
.ds-modal-footer, .ds-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 24px; }
|
|
492
|
+
.ds-modal-close {
|
|
493
|
+
position: absolute; top: 14px; right: 14px; display: inline-flex; width: 32px; height: 32px;
|
|
494
|
+
align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 8px;
|
|
495
|
+
color: var(--ds-text-tertiary); background: transparent; font: inherit; font-size: 20px; line-height: 1; cursor: pointer;
|
|
496
|
+
}
|
|
497
|
+
dialog.ds-dialog { position: fixed; }
|
|
498
|
+
.ds-modal-close:hover { color: var(--ds-text-primary); background: var(--ds-bg-secondary); }
|
|
499
|
+
.ds-modal-close:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
|
|
500
|
+
.ds-modal-overlay[data-state="open"], .ds-sheet-overlay[data-state="open"] { animation: ds-overlay-enter 220ms ease-out both; }
|
|
501
|
+
.ds-modal-overlay[data-state="closed"], .ds-sheet-overlay[data-state="closed"] { animation: ds-overlay-exit 160ms ease-in both; }
|
|
502
|
+
.ds-modal-content[data-state="open"] { animation: ds-pop-enter 230ms var(--ds-ease-out) both; }
|
|
503
|
+
.ds-modal-content[data-state="closed"] { animation: ds-pop-exit 160ms ease-in both; }
|
|
504
|
+
|
|
505
|
+
/* ==========================================================================
|
|
506
|
+
Bottom sheet (Radix React + native <dialog class="ds-sheet">)
|
|
507
|
+
========================================================================== */
|
|
508
|
+
.ds-sheet {
|
|
509
|
+
position: fixed; bottom: 0; left: 50%; z-index: 81; transform: translateX(-50%);
|
|
510
|
+
width: 100%; max-width: 560px; max-height: 90dvh; margin: 0; padding: 0; overflow-y: auto;
|
|
511
|
+
border: 0; border-radius: 20px 20px 0 0; color: var(--ds-text-primary); background: var(--ds-surface-raised);
|
|
512
|
+
box-shadow: 0 -12px 40px rgb(0 0 0 / .16); font-family: var(--ds-font-sans); outline: none;
|
|
513
|
+
}
|
|
514
|
+
dialog.ds-sheet { top: auto; inset-inline: 0; transform: none; margin: auto auto 0; }
|
|
515
|
+
dialog.ds-sheet::backdrop { background: var(--ds-overlay); }
|
|
516
|
+
dialog.ds-sheet[open] { animation: ds-sheet-up 280ms var(--ds-ease-out) both; }
|
|
517
|
+
.ds-sheet[data-state="open"] { animation: ds-sheet-enter 280ms var(--ds-ease-out) both; }
|
|
518
|
+
.ds-sheet[data-state="closed"] { animation: ds-sheet-exit 190ms ease-in both; }
|
|
519
|
+
.ds-sheet-handle { width: 40px; height: 4px; margin: 10px auto 6px; border-radius: 2px; background: var(--ds-border-secondary); }
|
|
520
|
+
.ds-sheet-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 16px 4px 24px; }
|
|
521
|
+
.ds-sheet-header h2 { margin: 0; font-size: 17px; font-weight: 600; }
|
|
522
|
+
.ds-sheet-close {
|
|
523
|
+
display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
|
|
524
|
+
border: 0; border-radius: 10px; color: var(--ds-text-tertiary); background: transparent; font: inherit; font-size: 22px; cursor: pointer;
|
|
525
|
+
}
|
|
526
|
+
.ds-sheet-close:hover { color: var(--ds-text-primary); background: var(--ds-bg-secondary); }
|
|
527
|
+
.ds-sheet-close:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
|
|
528
|
+
.ds-sheet-body { padding: 8px 24px 28px; color: var(--ds-text-secondary); font-size: 14px; line-height: 1.55; }
|
|
529
|
+
|
|
530
|
+
/* ==========================================================================
|
|
531
|
+
Tooltip (Radix React + CSS-only for Angular/Astro)
|
|
532
|
+
========================================================================== */
|
|
533
|
+
.ds-tooltip {
|
|
534
|
+
z-index: 100; max-width: 260px; padding: 6px 10px; border-radius: 6px;
|
|
535
|
+
color: #fff; background: #1E222B; box-shadow: var(--ds-shadow-md);
|
|
536
|
+
font: 500 12px/1.4 var(--ds-font-sans);
|
|
537
|
+
}
|
|
538
|
+
.dark .ds-tooltip, [data-theme="dark"] .ds-tooltip { color: #1E222B; background: #F2F4FA; }
|
|
539
|
+
.ds-tooltip[data-state="delayed-open"], .ds-tooltip[data-state="instant-open"] { animation: ds-pop-enter 160ms ease-out both; }
|
|
540
|
+
.ds-tooltip[data-state="closed"] { animation: ds-pop-exit 120ms ease-in both; }
|
|
541
|
+
.ds-tooltip-arrow { fill: #1E222B; }
|
|
542
|
+
.dark .ds-tooltip-arrow, [data-theme="dark"] .ds-tooltip-arrow { fill: #F2F4FA; }
|
|
543
|
+
.ds-tooltip-wrap { position: relative; display: inline-flex; }
|
|
544
|
+
.ds-tooltip-wrap > .ds-tooltip {
|
|
545
|
+
position: absolute; left: 50%; bottom: calc(100% + 8px); width: max-content; translate: -50% 4px;
|
|
546
|
+
opacity: 0; visibility: hidden; pointer-events: none;
|
|
547
|
+
transition: opacity 140ms ease, translate 140ms ease, visibility 0s linear 140ms;
|
|
548
|
+
}
|
|
549
|
+
.ds-tooltip-wrap > .ds-tooltip[data-side="bottom"] { top: calc(100% + 8px); bottom: auto; translate: -50% -4px; }
|
|
550
|
+
.ds-tooltip-wrap > .ds-tooltip[data-side="right"] { left: calc(100% + 8px); top: 50%; bottom: auto; translate: -4px -50%; }
|
|
551
|
+
.ds-tooltip-wrap > .ds-tooltip[data-side="left"] { right: calc(100% + 8px); left: auto; top: 50%; bottom: auto; translate: 4px -50%; }
|
|
552
|
+
.ds-tooltip-wrap:hover > .ds-tooltip, .ds-tooltip-wrap:focus-within > .ds-tooltip {
|
|
553
|
+
opacity: 1; visibility: visible; transition-delay: var(--ds-tooltip-delay, 250ms), var(--ds-tooltip-delay, 250ms), 0s;
|
|
554
|
+
}
|
|
555
|
+
.ds-tooltip-wrap:hover > .ds-tooltip:not([data-side]), .ds-tooltip-wrap:focus-within > .ds-tooltip:not([data-side]),
|
|
556
|
+
.ds-tooltip-wrap:hover > .ds-tooltip[data-side="top"], .ds-tooltip-wrap:focus-within > .ds-tooltip[data-side="top"],
|
|
557
|
+
.ds-tooltip-wrap:hover > .ds-tooltip[data-side="bottom"], .ds-tooltip-wrap:focus-within > .ds-tooltip[data-side="bottom"] { translate: -50% 0; }
|
|
558
|
+
.ds-tooltip-wrap:hover > .ds-tooltip[data-side="right"], .ds-tooltip-wrap:focus-within > .ds-tooltip[data-side="right"],
|
|
559
|
+
.ds-tooltip-wrap:hover > .ds-tooltip[data-side="left"], .ds-tooltip-wrap:focus-within > .ds-tooltip[data-side="left"] { translate: 0 -50%; }
|
|
560
|
+
.ds-tooltip-wrap[data-dismissed="true"] > .ds-tooltip { opacity: 0 !important; visibility: hidden !important; }
|
|
561
|
+
|
|
562
|
+
/* ==========================================================================
|
|
563
|
+
Dropdown menu (Radix React + native menu for Angular/Astro)
|
|
564
|
+
========================================================================== */
|
|
565
|
+
.ds-menu { position: relative; display: inline-flex; }
|
|
566
|
+
.ds-dropdown {
|
|
567
|
+
z-index: 90; min-width: 200px; padding: 4px; border: 1px solid var(--ds-border-tertiary);
|
|
568
|
+
border-radius: 10px; color: var(--ds-text-primary); background: var(--ds-surface-raised); box-shadow: var(--ds-shadow-lg);
|
|
569
|
+
font: 400 14px var(--ds-font-sans); transform-origin: var(--radix-dropdown-menu-content-transform-origin, top left);
|
|
570
|
+
}
|
|
571
|
+
.ds-menu > .ds-dropdown { position: absolute; top: calc(100% + 6px); left: 0; }
|
|
572
|
+
.ds-menu[data-align="end"] > .ds-dropdown { left: auto; right: 0; }
|
|
573
|
+
.ds-menu > .ds-dropdown[hidden] { display: none; }
|
|
574
|
+
.ds-dropdown-label { padding: 6px 10px 4px; color: var(--ds-text-quaternay); font-size: 12px; font-weight: 500; }
|
|
575
|
+
.ds-dropdown-separator { height: 1px; margin: 4px -4px; background: var(--ds-border-tertiary); }
|
|
576
|
+
.ds-dropdown-item {
|
|
577
|
+
display: flex; width: 100%; min-height: 36px; align-items: center; gap: 10px; margin: 0; padding: 6px 10px;
|
|
578
|
+
border: 0; border-radius: 6px; color: inherit; background: transparent; font: inherit; text-align: start; text-decoration: none;
|
|
579
|
+
cursor: pointer; outline: none; transition: background-color 120ms, color 120ms;
|
|
580
|
+
}
|
|
581
|
+
.ds-dropdown-item[data-highlighted], .ds-dropdown-item:hover:not(:disabled), .ds-dropdown-item:focus-visible {
|
|
582
|
+
background: var(--ds-bg-secondary); color: var(--ds-text-primary);
|
|
583
|
+
}
|
|
584
|
+
.ds-dropdown-item[data-variant="danger"] { color: var(--ds-text-error-tertiary); }
|
|
585
|
+
.ds-dropdown-item[data-disabled], .ds-dropdown-item:disabled { color: var(--ds-text-disabled); cursor: not-allowed; }
|
|
586
|
+
.ds-dropdown-item-icon { display: inline-flex; color: var(--ds-text-tertiary); }
|
|
587
|
+
.ds-dropdown-shortcut { margin-inline-start: auto; color: var(--ds-text-quaternay); font-size: 12px; }
|
|
588
|
+
.ds-dropdown[data-state="open"], .ds-select-content[data-state="open"], .ds-menu > .ds-dropdown:not([hidden]) { animation: ds-pop-enter 170ms ease-out both; }
|
|
589
|
+
.ds-dropdown[data-state="closed"], .ds-select-content[data-state="closed"] { animation: ds-pop-exit 130ms ease-in both; }
|
|
590
|
+
|
|
591
|
+
/* ==========================================================================
|
|
592
|
+
Date picker (React calendar)
|
|
593
|
+
========================================================================== */
|
|
594
|
+
.ds-date-field { display: inline-flex; flex-direction: column; gap: 6px; font-family: var(--ds-font-sans); color: var(--ds-text-primary); }
|
|
595
|
+
.ds-date-field label { color: var(--ds-text-secondary); font-size: 13px; font-weight: 500; }
|
|
596
|
+
.ds-date-trigger {
|
|
597
|
+
min-height: 44px; padding: 0 12px; border: 1px solid var(--ds-border-secondary); border-radius: 8px;
|
|
598
|
+
color: var(--ds-text-primary); background: var(--ds-bg-primary); cursor: pointer; font: 400 15px var(--ds-font-sans); text-align: start;
|
|
599
|
+
transition: border-color var(--ds-duration-fast), box-shadow var(--ds-duration-fast);
|
|
600
|
+
}
|
|
601
|
+
.ds-date-trigger:hover:not(:disabled) { border-color: var(--ds-color-neutral-400); }
|
|
602
|
+
.ds-date-trigger[data-state="open"], .ds-date-trigger:focus-visible { outline: none; border-color: var(--ds-border-focus); box-shadow: var(--ds-focus-ring); }
|
|
603
|
+
.ds-calendar button:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
|
|
604
|
+
.ds-date-trigger:disabled, .ds-calendar button:disabled { opacity: .45; cursor: not-allowed; }
|
|
605
|
+
.ds-calendar {
|
|
606
|
+
position: fixed; z-index: 90; width: 312px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow: auto; padding: 12px;
|
|
607
|
+
color: var(--ds-text-primary); background: var(--ds-surface-raised); border: 1px solid var(--ds-border-tertiary); border-radius: 14px;
|
|
608
|
+
box-shadow: var(--ds-shadow-xl); font-family: var(--ds-font-sans);
|
|
609
|
+
}
|
|
610
|
+
.ds-calendar[data-state="open"] { animation: ds-pop-enter 200ms ease-out both; }
|
|
611
|
+
.ds-calendar[data-state="closed"] { animation: ds-pop-exit 150ms ease-in both; }
|
|
612
|
+
.ds-calendar-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
|
613
|
+
.ds-calendar-header h2 { margin: 0; font-size: 14px; font-weight: 600; text-transform: capitalize; }
|
|
614
|
+
.ds-calendar-header button { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; color: inherit; background: transparent; cursor: pointer; font-size: 20px; }
|
|
615
|
+
.ds-calendar-header button:hover:not(:disabled) { background: var(--ds-bg-secondary); }
|
|
616
|
+
.ds-calendar-grid { width: 100%; table-layout: fixed; border-spacing: 2px; margin: 8px 0 0; }
|
|
617
|
+
.ds-calendar-grid th { color: var(--ds-text-quaternay); font-size: 12px; font-weight: 500; }
|
|
618
|
+
.ds-calendar-grid abbr { text-decoration: none; }
|
|
619
|
+
.ds-calendar-grid td { padding: 0; }
|
|
620
|
+
.ds-calendar-day { width: 100%; height: 36px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; transition: background-color 120ms, color 120ms; }
|
|
621
|
+
.ds-calendar-day[data-other-month="true"] { color: var(--ds-text-disabled); }
|
|
622
|
+
.ds-calendar-day[aria-current="date"] { font-weight: 700; color: var(--ds-text-brand-primary); }
|
|
623
|
+
.ds-calendar-day[data-selected="true"] { color: #fff; background: var(--ds-bg-brand-primary); }
|
|
624
|
+
.ds-calendar-day:hover:not(:disabled):not([data-selected="true"]) { background: var(--ds-bg-secondary); }
|
|
625
|
+
|
|
626
|
+
/* ==========================================================================
|
|
627
|
+
Loading: spinner, dots, skeleton, progress
|
|
628
|
+
========================================================================== */
|
|
629
|
+
.ds-loading { display: inline-flex; align-items: center; gap: 8px; color: var(--ds-text-tertiary); font: 400 13px var(--ds-font-sans); }
|
|
630
|
+
.ds-loading > svg { animation: ds-spin .8s linear infinite; }
|
|
631
|
+
.ds-spinner {
|
|
632
|
+
display: inline-block; flex: none; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent;
|
|
633
|
+
border-radius: 50%; animation: ds-spin .7s linear infinite; vertical-align: middle;
|
|
634
|
+
}
|
|
635
|
+
.ds-spinner[data-size="sm"] { width: 14px; height: 14px; }
|
|
636
|
+
.ds-spinner[data-size="lg"] { width: 32px; height: 32px; border-width: 3px; }
|
|
637
|
+
.ds-loading .ds-spinner { color: var(--ds-fg-brand-primary); }
|
|
638
|
+
.ds-loading-dots { display: inline-flex; align-items: center; gap: 4px; }
|
|
639
|
+
.ds-loading-dots span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ds-fg-brand-primary); animation: ds-dot-pulse 1s infinite alternate; }
|
|
640
|
+
.ds-loading-dots span:nth-child(2) { animation-delay: 160ms; }
|
|
641
|
+
.ds-loading-dots span:nth-child(3) { animation-delay: 320ms; }
|
|
642
|
+
.ds-skeleton { display: flex; width: 100%; flex-direction: column; gap: 10px; }
|
|
643
|
+
.ds-skeleton > span, .ds-skeleton-line {
|
|
644
|
+
display: block; height: 14px; border-radius: 6px;
|
|
645
|
+
background: linear-gradient(90deg, var(--ds-bg-tertiary) 0%, var(--ds-bg-secondary) 40%, var(--ds-bg-tertiary) 80%);
|
|
646
|
+
background-size: 200% 100%; animation: ds-shimmer 1.4s ease-in-out infinite;
|
|
647
|
+
}
|
|
648
|
+
.ds-skeleton > span:nth-child(3n+2) { width: 82%; }
|
|
649
|
+
.ds-skeleton > span:nth-child(3n) { width: 64%; }
|
|
650
|
+
.ds-skeleton-circle { display: block; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--ds-bg-tertiary); animation: ds-shimmer 1.4s ease-in-out infinite; }
|
|
651
|
+
.ds-progress { display: block; width: 100%; font-family: var(--ds-font-sans); }
|
|
652
|
+
.ds-progress-header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: var(--ds-text-secondary); font-size: 13px; }
|
|
653
|
+
.ds-progress-header span:last-child { font-variant-numeric: tabular-nums; color: var(--ds-text-tertiary); }
|
|
654
|
+
.ds-progress-track { display: block; height: 6px; overflow: hidden; border-radius: 999px; background: var(--ds-bg-tertiary); }
|
|
655
|
+
.ds-progress[data-size="sm"] .ds-progress-track { height: 4px; }
|
|
656
|
+
.ds-progress[data-size="lg"] .ds-progress-track { height: 10px; }
|
|
657
|
+
.ds-progress-value { display: block; height: 100%; border-radius: inherit; background: var(--ds-bg-brand-primary); transition: width 240ms var(--ds-ease-out); }
|
|
658
|
+
.ds-progress[data-variant="success"] .ds-progress-value { background: var(--ds-color-success-500); }
|
|
659
|
+
.ds-progress[data-variant="warning"] .ds-progress-value { background: var(--ds-color-warning-500); }
|
|
660
|
+
.ds-progress[data-variant="error"] .ds-progress-value { background: var(--ds-color-error-500); }
|
|
661
|
+
.ds-progress[data-indeterminate="true"] .ds-progress-value { width: 40% !important; animation: ds-indeterminate 1.2s ease-in-out infinite; }
|
|
662
|
+
.ds-progress-label { display: block; margin-top: 6px; color: var(--ds-text-tertiary); font: 400 12px var(--ds-font-sans); }
|
|
663
|
+
|
|
664
|
+
/* ==========================================================================
|
|
665
|
+
Empty state
|
|
666
|
+
========================================================================== */
|
|
667
|
+
.ds-empty-state {
|
|
668
|
+
display: flex; max-width: 420px; flex-direction: column; align-items: center; justify-content: center;
|
|
669
|
+
margin-inline: auto; padding: 40px 24px; color: var(--ds-text-primary); text-align: center; font-family: var(--ds-font-sans);
|
|
670
|
+
}
|
|
671
|
+
.ds-empty-state-icon {
|
|
672
|
+
display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin-bottom: 16px;
|
|
673
|
+
border-radius: 20px; color: var(--ds-text-brand-primary); background: var(--ds-bg-brand-secondary);
|
|
674
|
+
}
|
|
675
|
+
.ds-empty-state-icon:empty { display: none; }
|
|
676
|
+
.ds-empty-state-icon svg { width: 36px; height: 36px; }
|
|
677
|
+
.ds-empty-state[data-variant="error"] .ds-empty-state-icon { color: var(--ds-fg-error-primary); background: var(--ds-bg-error-secondary); }
|
|
678
|
+
.ds-empty-state h3 { margin: 0 0 6px; color: var(--ds-text-primary); font-size: 17px; font-weight: 600; }
|
|
679
|
+
.ds-empty-state p { margin: 0 0 20px; color: var(--ds-text-tertiary); font-size: 14px; line-height: 1.55; }
|
|
680
|
+
.ds-empty-state-action { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
|
|
681
|
+
.ds-empty-state-action:empty { display: none; }
|
|
682
|
+
|
|
683
|
+
/* ==========================================================================
|
|
684
|
+
Accordion (native <details>)
|
|
685
|
+
========================================================================== */
|
|
686
|
+
.ds-accordion { display: flex; flex-direction: column; border: 1px solid var(--ds-border-tertiary); border-radius: var(--ds-radius-lg, 12px); overflow: hidden; font-family: var(--ds-font-sans); background: var(--ds-bg-primary); }
|
|
687
|
+
.ds-accordion[data-variant="separated"] { gap: 8px; border: 0; overflow: visible; background: transparent; }
|
|
688
|
+
.ds-accordion-item { border-top: 1px solid var(--ds-border-tertiary); }
|
|
689
|
+
.ds-accordion-item:first-child { border-top: 0; }
|
|
690
|
+
.ds-accordion[data-variant="separated"] .ds-accordion-item { border: 1px solid var(--ds-border-tertiary); border-radius: var(--ds-radius-lg, 12px); background: var(--ds-bg-primary); overflow: hidden; }
|
|
691
|
+
.ds-accordion-trigger {
|
|
692
|
+
display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px;
|
|
693
|
+
color: var(--ds-text-primary); font-size: 15px; font-weight: 500; list-style: none; cursor: pointer; user-select: none;
|
|
694
|
+
transition: background-color var(--ds-duration-fast);
|
|
695
|
+
}
|
|
696
|
+
.ds-accordion-trigger::-webkit-details-marker { display: none; }
|
|
697
|
+
.ds-accordion-trigger::after {
|
|
698
|
+
content: ""; flex: none; width: 8px; height: 8px; margin-top: -4px;
|
|
699
|
+
border-right: 1.75px solid var(--ds-text-tertiary); border-bottom: 1.75px solid var(--ds-text-tertiary);
|
|
700
|
+
transform: rotate(45deg); transition: transform var(--ds-duration-base) var(--ds-ease-out);
|
|
701
|
+
}
|
|
702
|
+
.ds-accordion-item[open] > .ds-accordion-trigger::after { transform: translateY(4px) rotate(-135deg); }
|
|
703
|
+
.ds-accordion-trigger:hover { background: var(--ds-bg-primary-hover); }
|
|
704
|
+
.ds-accordion-trigger:focus-visible { outline: none; box-shadow: inset var(--ds-focus-ring); }
|
|
705
|
+
.ds-accordion-item[aria-disabled="true"] > .ds-accordion-trigger { color: var(--ds-text-disabled); cursor: not-allowed; pointer-events: none; }
|
|
706
|
+
.ds-accordion-content { padding: 0 18px 18px; color: var(--ds-text-secondary); font-size: 14px; line-height: 1.6; }
|
|
707
|
+
.ds-accordion-item[open] > .ds-accordion-content { animation: ds-panel-enter 200ms ease-out; }
|
|
708
|
+
|
|
709
|
+
/* ==========================================================================
|
|
710
|
+
Breadcrumb
|
|
711
|
+
========================================================================== */
|
|
712
|
+
.ds-breadcrumb { font: 400 13px var(--ds-font-sans); }
|
|
713
|
+
.ds-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
|
|
714
|
+
.ds-breadcrumb li { display: inline-flex; align-items: center; gap: 6px; color: var(--ds-text-tertiary); }
|
|
715
|
+
.ds-breadcrumb li + li::before {
|
|
716
|
+
content: ""; width: 6px; height: 6px; margin-inline-end: 2px;
|
|
717
|
+
border-top: 1.5px solid var(--ds-text-quaternay); border-right: 1.5px solid var(--ds-text-quaternay); transform: rotate(45deg);
|
|
718
|
+
}
|
|
719
|
+
.ds-breadcrumb[data-separator="slash"] li + li::before { content: "/"; width: auto; height: auto; border: 0; transform: none; color: var(--ds-text-quaternay); }
|
|
720
|
+
.ds-breadcrumb a { color: var(--ds-text-tertiary); text-decoration: none; border-radius: 4px; transition: color var(--ds-duration-fast); }
|
|
721
|
+
.ds-breadcrumb a:hover { color: var(--ds-text-brand-primary); }
|
|
722
|
+
.ds-breadcrumb a:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
|
|
723
|
+
.ds-breadcrumb [aria-current="page"] { color: var(--ds-text-primary); font-weight: 500; }
|
|
724
|
+
|
|
725
|
+
/* ==========================================================================
|
|
726
|
+
Pagination
|
|
727
|
+
========================================================================== */
|
|
728
|
+
.ds-pagination { font: 500 14px var(--ds-font-sans); }
|
|
729
|
+
.ds-pagination ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
|
|
730
|
+
.ds-page {
|
|
731
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 36px; height: 36px; margin: 0; padding: 0 10px;
|
|
732
|
+
border: 1px solid transparent; border-radius: 8px; color: var(--ds-text-secondary); background: transparent;
|
|
733
|
+
font: inherit; text-decoration: none; font-variant-numeric: tabular-nums; cursor: pointer;
|
|
734
|
+
transition: background-color var(--ds-duration-fast), color var(--ds-duration-fast), border-color var(--ds-duration-fast);
|
|
735
|
+
}
|
|
736
|
+
.ds-page:hover:not(:disabled):not([aria-current="page"]) { color: var(--ds-text-primary); background: var(--ds-bg-secondary); }
|
|
737
|
+
.ds-page[aria-current="page"] { color: #fff; background: var(--ds-bg-brand-primary); }
|
|
738
|
+
.ds-page:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
|
|
739
|
+
.ds-page:disabled, .ds-page[aria-disabled="true"] { opacity: .4; cursor: not-allowed; pointer-events: none; }
|
|
740
|
+
.ds-page-ellipsis { display: inline-flex; min-width: 28px; justify-content: center; color: var(--ds-text-quaternay); }
|
|
741
|
+
.ds-pagination[data-variant="outlined"] .ds-page:not([aria-current="page"]) { border-color: var(--ds-border-tertiary); }
|
|
742
|
+
|
|
743
|
+
/* ==========================================================================
|
|
744
|
+
Divider
|
|
745
|
+
========================================================================== */
|
|
746
|
+
.ds-divider { display: block; flex: none; width: 100%; height: 1px; margin: 16px 0; border: 0; background: var(--ds-border-tertiary); }
|
|
747
|
+
.ds-divider[data-orientation="vertical"] { display: inline-block; width: 1px; height: auto; min-height: 1em; margin: 0 12px; align-self: stretch; }
|
|
748
|
+
.ds-divider[data-label] {
|
|
749
|
+
display: flex; align-items: center; gap: 12px; height: auto; background: none;
|
|
750
|
+
color: var(--ds-text-quaternay); font: 500 12px var(--ds-font-sans); letter-spacing: .02em;
|
|
751
|
+
}
|
|
752
|
+
.ds-divider[data-label]::before, .ds-divider[data-label]::after { content: ""; flex: 1; height: 1px; background: var(--ds-border-tertiary); }
|
|
753
|
+
|
|
754
|
+
/* ==========================================================================
|
|
755
|
+
Toast
|
|
756
|
+
========================================================================== */
|
|
757
|
+
.ds-toaster {
|
|
758
|
+
position: fixed; z-index: 120; right: 16px; bottom: 16px; display: flex; flex-direction: column-reverse; gap: 10px;
|
|
759
|
+
width: min(380px, calc(100vw - 32px)); margin: 0; padding: 0; list-style: none; pointer-events: none;
|
|
760
|
+
}
|
|
761
|
+
.ds-toaster[data-position="top-right"] { top: 16px; bottom: auto; flex-direction: column; }
|
|
762
|
+
.ds-toaster[data-position="top-center"] { top: 16px; bottom: auto; left: 50%; right: auto; translate: -50% 0; flex-direction: column; }
|
|
763
|
+
.ds-toaster[data-position="bottom-center"] { left: 50%; right: auto; translate: -50% 0; }
|
|
764
|
+
.ds-toast {
|
|
765
|
+
--ds-toast-accent: var(--ds-fg-brand-primary);
|
|
766
|
+
display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 16px; pointer-events: auto;
|
|
767
|
+
border: 1px solid var(--ds-border-tertiary); border-radius: 12px; color: var(--ds-text-primary); background: var(--ds-surface-raised);
|
|
768
|
+
box-shadow: var(--ds-shadow-xl), 0 12px 32px rgb(0 0 0 / .08); font: 400 14px/1.45 var(--ds-font-sans);
|
|
769
|
+
animation: ds-toast-enter 260ms var(--ds-ease-out) both;
|
|
770
|
+
}
|
|
771
|
+
.ds-toast[data-state="closing"] { animation: ds-toast-exit 180ms ease-in both; }
|
|
772
|
+
.ds-toast[data-variant="success"] { --ds-toast-accent: var(--ds-fg-success-primary); }
|
|
773
|
+
.ds-toast[data-variant="warning"] { --ds-toast-accent: var(--ds-fg-warning-primary); }
|
|
774
|
+
.ds-toast[data-variant="error"] { --ds-toast-accent: var(--ds-fg-error-primary); }
|
|
775
|
+
.ds-toast-icon { display: inline-flex; flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--ds-toast-accent); }
|
|
776
|
+
.ds-toast-icon svg { width: 20px; height: 20px; }
|
|
777
|
+
.ds-toast-content { flex: 1; min-width: 0; }
|
|
778
|
+
.ds-toast-title { display: block; font-weight: 600; }
|
|
779
|
+
.ds-toast-description { margin: 2px 0 0; color: var(--ds-text-tertiary); font-size: 13px; }
|
|
780
|
+
.ds-toast-action { margin-top: 8px; }
|
|
781
|
+
.ds-toast-close {
|
|
782
|
+
display: inline-flex; flex: none; width: 26px; height: 26px; align-items: center; justify-content: center; margin: -3px -3px 0 0;
|
|
783
|
+
padding: 0; border: 0; border-radius: 6px; color: var(--ds-text-quaternay); background: transparent; font: inherit; font-size: 18px; line-height: 1; cursor: pointer;
|
|
784
|
+
}
|
|
785
|
+
.ds-toast-close:hover { color: var(--ds-text-primary); background: var(--ds-bg-secondary); }
|
|
786
|
+
.ds-toast-close:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
|
|
787
|
+
|
|
788
|
+
/* ==========================================================================
|
|
789
|
+
Sliding button (React)
|
|
790
|
+
========================================================================== */
|
|
791
|
+
.ds-slide { position: relative; display: flex; align-items: center; padding: 4px; width: 100%; max-width: 331px; border-radius: 10px; font-family: var(--ds-font-sans); }
|
|
792
|
+
.ds-slide-progress { position: absolute; inset-block: 4px; inset-inline-start: 4px; max-width: calc(100% - 8px); border-radius: 7px; background: rgb(255 255 255 / .18); pointer-events: none; transition: width 200ms ease-out; }
|
|
793
|
+
.ds-slide-handle { flex-shrink: 0; position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 8px; border: 0; color: white; touch-action: none; user-select: none; cursor: grab; transition: transform 200ms; }
|
|
794
|
+
.ds-slide-handle:hover:not(:disabled) { filter: brightness(1.1); }
|
|
795
|
+
.ds-slide-handle:active:not(:disabled) { cursor: grabbing; }
|
|
796
|
+
.ds-slide-handle:focus-visible { outline: 2px solid white; outline-offset: -4px; }
|
|
797
|
+
.ds-slide-handle:disabled { cursor: not-allowed; }
|
|
798
|
+
.ds-slide-label { position: absolute; left: 76px; right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: white; font: 500 14px var(--ds-font-sans); pointer-events: none; }
|
|
799
|
+
.ds-slide-status { position: absolute; left: 72px; right: 72px; color: white; text-align: center; font: 500 14px var(--ds-font-sans); pointer-events: none; }
|
|
800
|
+
|
|
801
|
+
/* ==========================================================================
|
|
802
|
+
Utilities shared by the frameworks
|
|
803
|
+
========================================================================== */
|
|
804
|
+
.ds-link { color: var(--ds-text-link); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
|
|
805
|
+
.ds-link:hover { color: var(--ds-text-link-hover); text-decoration-color: currentColor; }
|
|
806
|
+
.ds-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
807
|
+
.ds-kbd { display: inline-flex; align-items: center; white-space: nowrap; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--ds-border-secondary); border-bottom-width: 2px; border-radius: 5px; color: var(--ds-text-tertiary); background: var(--ds-bg-secondary); font: 500 11px var(--ds-font-mono); }
|
|
808
|
+
|
|
809
|
+
/* ==========================================================================
|
|
810
|
+
Keyframes & reduced motion
|
|
811
|
+
========================================================================== */
|
|
812
|
+
@keyframes ds-spin { to { transform: rotate(360deg); } }
|
|
813
|
+
@keyframes ds-dot-pulse { to { opacity: .25; transform: scale(.8); } }
|
|
814
|
+
@keyframes ds-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
|
|
815
|
+
@keyframes ds-indeterminate { from { margin-inline-start: -40%; } to { margin-inline-start: 100%; } }
|
|
816
|
+
@keyframes ds-overlay-enter { from { opacity: 0; } to { opacity: 1; } }
|
|
817
|
+
@keyframes ds-overlay-exit { from { opacity: 1; } to { opacity: 0; } }
|
|
818
|
+
@keyframes ds-pop-enter { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
|
|
819
|
+
@keyframes ds-pop-exit { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(4px) scale(.98); } }
|
|
820
|
+
@keyframes ds-sheet-enter { from { opacity: 0; transform: translate(-50%, 32px); } to { opacity: 1; transform: translate(-50%, 0); } }
|
|
821
|
+
@keyframes ds-sheet-exit { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, 32px); } }
|
|
822
|
+
@keyframes ds-sheet-up { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: translateY(0); } }
|
|
823
|
+
@keyframes ds-panel-enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
|
|
824
|
+
@keyframes ds-toast-enter { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
|
|
825
|
+
@keyframes ds-toast-exit { to { opacity: 0; transform: translateX(16px); } }
|
|
826
|
+
|
|
827
|
+
@media (prefers-reduced-motion: reduce) {
|
|
828
|
+
[class^="ds-"], [class*=" ds-"], [class^="ds-"]::before, [class^="ds-"]::after, dialog.ds-dialog::backdrop, dialog.ds-sheet::backdrop {
|
|
829
|
+
animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important;
|
|
830
|
+
}
|
|
831
|
+
.ds-spinner, .ds-loading > svg { animation: ds-spin 1.6s linear infinite !important; }
|
|
832
|
+
.ds-button:hover, .ds-icon-button:hover, .ds-card:hover { transform: none !important; }
|
|
833
|
+
}
|