@agent-native/design-system 0.0.0-stage → 0.229.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 +78 -2
- package/THIRD_PARTY_NOTICES.md +58 -0
- package/css/appearances.css +91 -0
- package/css/main.css +174 -0
- package/css/parts/accordion.css +104 -0
- package/css/parts/alert-dialog.css +159 -0
- package/css/parts/app-shell.css +45 -0
- package/css/parts/aspect-ratio.css +20 -0
- package/css/parts/autocomplete.css +366 -0
- package/css/parts/avatar.css +108 -0
- package/css/parts/badge.css +100 -0
- package/css/parts/blockquote.css +23 -0
- package/css/parts/button.css +238 -0
- package/css/parts/callout.css +108 -0
- package/css/parts/card.css +144 -0
- package/css/parts/checkbox-cards.css +59 -0
- package/css/parts/checkbox-group.css +20 -0
- package/css/parts/checkbox.css +127 -0
- package/css/parts/code.css +194 -0
- package/css/parts/collapsible.css +40 -0
- package/css/parts/combobox.css +171 -0
- package/css/parts/context-menu.css +18 -0
- package/css/parts/data-list.css +130 -0
- package/css/parts/dialog.css +251 -0
- package/css/parts/drawer.css +289 -0
- package/css/parts/em.css +16 -0
- package/css/parts/field.css +55 -0
- package/css/parts/fieldset.css +34 -0
- package/css/parts/form.css +18 -0
- package/css/parts/heading.css +25 -0
- package/css/parts/icon-button.css +30 -0
- package/css/parts/input.css +206 -0
- package/css/parts/inset.css +90 -0
- package/css/parts/item.css +208 -0
- package/css/parts/kbd.css +126 -0
- package/css/parts/link.css +99 -0
- package/css/parts/menu.css +342 -0
- package/css/parts/menubar.css +71 -0
- package/css/parts/meter.css +112 -0
- package/css/parts/navigation-menu.css +199 -0
- package/css/parts/number-field.css +124 -0
- package/css/parts/otp-field.css +137 -0
- package/css/parts/page-header.css +45 -0
- package/css/parts/popover.css +149 -0
- package/css/parts/preview-card.css +116 -0
- package/css/parts/progress.css +159 -0
- package/css/parts/quote.css +18 -0
- package/css/parts/radio-cards.css +188 -0
- package/css/parts/radio-group.css +124 -0
- package/css/parts/scroll-area.css +95 -0
- package/css/parts/segmented-control.css +191 -0
- package/css/parts/select.css +378 -0
- package/css/parts/separator.css +48 -0
- package/css/parts/sidebar.css +211 -0
- package/css/parts/skeleton.css +65 -0
- package/css/parts/slider.css +156 -0
- package/css/parts/spinner.css +52 -0
- package/css/parts/strong.css +15 -0
- package/css/parts/switch.css +138 -0
- package/css/parts/tab-nav.css +48 -0
- package/css/parts/table.css +177 -0
- package/css/parts/tabs.css +214 -0
- package/css/parts/text-area.css +140 -0
- package/css/parts/text.css +245 -0
- package/css/parts/toast.css +302 -0
- package/css/parts/toggle-group.css +25 -0
- package/css/parts/toggle.css +181 -0
- package/css/parts/toolbar.css +133 -0
- package/css/parts/tooltip.css +61 -0
- package/css/parts/visually-hidden.css +21 -0
- package/css/styles.css +73 -0
- package/css/themes/agent-native.css +2321 -0
- package/css/themes/analytics.css +1159 -0
- package/css/themes/assets.css +1159 -0
- package/css/themes/baseline.css +1107 -0
- package/css/themes/brain.css +1159 -0
- package/css/themes/calendar.css +1159 -0
- package/css/themes/chat.css +1159 -0
- package/css/themes/clips.css +1159 -0
- package/css/themes/content.css +1159 -0
- package/css/themes/crm.css +1159 -0
- package/css/themes/design.css +1159 -0
- package/css/themes/desktop.css +1159 -0
- package/css/themes/dispatch.css +1159 -0
- package/css/themes/docs.css +1159 -0
- package/css/themes/factory.css +1159 -0
- package/css/themes/forms.css +1159 -0
- package/css/themes/mail.css +1159 -0
- package/css/themes/plan.css +1159 -0
- package/css/themes/slides.css +1159 -0
- package/css/themes/tasks.css +1159 -0
- package/css/tokens.css +1249 -0
- package/package.json +67 -4
- package/src/catalog/components/alert-dialog.ts +9 -0
- package/src/catalog/components/aspect-ratio.ts +6 -0
- package/src/catalog/components/autocomplete.ts +23 -0
- package/src/catalog/components/avatar.ts +16 -0
- package/src/catalog/components/badge.ts +19 -0
- package/src/catalog/components/blockquote.ts +10 -0
- package/src/catalog/components/button.ts +24 -0
- package/src/catalog/components/callout.ts +17 -0
- package/src/catalog/components/card.ts +10 -0
- package/src/catalog/components/checkbox-cards.ts +14 -0
- package/src/catalog/components/checkbox-group.ts +13 -0
- package/src/catalog/components/checkbox.ts +13 -0
- package/src/catalog/components/code.ts +22 -0
- package/src/catalog/components/combobox.ts +23 -0
- package/src/catalog/components/context-menu.ts +20 -0
- package/src/catalog/components/data-list.ts +14 -0
- package/src/catalog/components/dialog.ts +9 -0
- package/src/catalog/components/drawer.ts +9 -0
- package/src/catalog/components/em.ts +7 -0
- package/src/catalog/components/heading.ts +11 -0
- package/src/catalog/components/index.ts +54 -0
- package/src/catalog/components/input.ts +23 -0
- package/src/catalog/components/inset.ts +15 -0
- package/src/catalog/components/item.ts +21 -0
- package/src/catalog/components/kbd.ts +9 -0
- package/src/catalog/components/link.ts +19 -0
- package/src/catalog/components/menu.ts +20 -0
- package/src/catalog/components/menubar.ts +20 -0
- package/src/catalog/components/meter.ts +19 -0
- package/src/catalog/components/number-field.ts +10 -0
- package/src/catalog/components/otp-field.ts +9 -0
- package/src/catalog/components/popover.ts +9 -0
- package/src/catalog/components/preview-card.ts +9 -0
- package/src/catalog/components/progress.ts +24 -0
- package/src/catalog/components/quote.ts +7 -0
- package/src/catalog/components/radio-cards.ts +14 -0
- package/src/catalog/components/radio-group.ts +13 -0
- package/src/catalog/components/scroll-area.ts +15 -0
- package/src/catalog/components/segmented-control.ts +8 -0
- package/src/catalog/components/select.ts +26 -0
- package/src/catalog/components/separator.ts +14 -0
- package/src/catalog/components/skeleton.ts +8 -0
- package/src/catalog/components/slider.ts +19 -0
- package/src/catalog/components/spinner.ts +15 -0
- package/src/catalog/components/strong.ts +7 -0
- package/src/catalog/components/switch.ts +19 -0
- package/src/catalog/components/tab-nav.ts +18 -0
- package/src/catalog/components/table.ts +34 -0
- package/src/catalog/components/tabs.ts +18 -0
- package/src/catalog/components/text-area.ts +24 -0
- package/src/catalog/components/text.ts +11 -0
- package/src/catalog/components/toast.ts +12 -0
- package/src/catalog/components/toggle-group.ts +17 -0
- package/src/catalog/components/toggle.ts +17 -0
- package/src/catalog/components/toolbar.ts +6 -0
- package/src/catalog/index.ts +4 -0
- package/src/catalog/parts.ts +915 -0
- package/src/catalog/prop-types-source.ts +93 -0
- package/src/catalog/prop-types.generated.ts +1402 -0
- package/src/catalog/props.ts +225 -0
- package/src/css.ts +318 -0
- package/src/generated-css.ts +21 -0
- package/src/index.ts +8 -0
- package/src/model/compare.ts +127 -0
- package/src/model/dom.ts +253 -0
- package/src/model/ids.ts +25 -0
- package/src/model/index.ts +6 -0
- package/src/model/styles.ts +254 -0
- package/src/model/types.ts +97 -0
- package/src/model/validate.ts +133 -0
- package/src/themes/appearances.ts +105 -0
- package/src/themes/baseline.ts +27 -0
- package/src/themes/index.ts +85 -0
- package/src/themes/reference.ts +9 -0
- package/src/themes/shadcn.ts +239 -0
- package/src/themes/types.ts +53 -0
- package/src/tokens/at.ts +13 -0
- package/src/tokens/base.ts +48 -0
- package/src/tokens/color/bezier.ts +111 -0
- package/src/tokens/color/index.ts +2 -0
- package/src/tokens/color/radix-generator.ts +516 -0
- package/src/tokens/dtcg.ts +298 -0
- package/src/tokens/files/foundations.tokens.json +318 -0
- package/src/tokens/files/palette.tokens.json +58 -0
- package/src/tokens/files/themes/agent-native.dark.tokens.json +405 -0
- package/src/tokens/files/themes/agent-native.light.tokens.json +405 -0
- package/src/tokens/files/themes/analytics.dark.tokens.json +391 -0
- package/src/tokens/files/themes/analytics.light.tokens.json +391 -0
- package/src/tokens/files/themes/assets.dark.tokens.json +391 -0
- package/src/tokens/files/themes/assets.light.tokens.json +391 -0
- package/src/tokens/files/themes/brain.dark.tokens.json +391 -0
- package/src/tokens/files/themes/brain.light.tokens.json +391 -0
- package/src/tokens/files/themes/calendar.dark.tokens.json +391 -0
- package/src/tokens/files/themes/calendar.light.tokens.json +391 -0
- package/src/tokens/files/themes/chat.dark.tokens.json +391 -0
- package/src/tokens/files/themes/chat.light.tokens.json +391 -0
- package/src/tokens/files/themes/clips.dark.tokens.json +391 -0
- package/src/tokens/files/themes/clips.light.tokens.json +391 -0
- package/src/tokens/files/themes/content.dark.tokens.json +391 -0
- package/src/tokens/files/themes/content.light.tokens.json +391 -0
- package/src/tokens/files/themes/crm.dark.tokens.json +391 -0
- package/src/tokens/files/themes/crm.light.tokens.json +391 -0
- package/src/tokens/files/themes/design.dark.tokens.json +391 -0
- package/src/tokens/files/themes/design.light.tokens.json +391 -0
- package/src/tokens/files/themes/desktop.dark.tokens.json +391 -0
- package/src/tokens/files/themes/desktop.light.tokens.json +391 -0
- package/src/tokens/files/themes/dispatch.dark.tokens.json +391 -0
- package/src/tokens/files/themes/dispatch.light.tokens.json +391 -0
- package/src/tokens/files/themes/docs.dark.tokens.json +391 -0
- package/src/tokens/files/themes/docs.light.tokens.json +391 -0
- package/src/tokens/files/themes/factory.dark.tokens.json +391 -0
- package/src/tokens/files/themes/factory.light.tokens.json +391 -0
- package/src/tokens/files/themes/forms.dark.tokens.json +391 -0
- package/src/tokens/files/themes/forms.light.tokens.json +391 -0
- package/src/tokens/files/themes/mail.dark.tokens.json +391 -0
- package/src/tokens/files/themes/mail.light.tokens.json +391 -0
- package/src/tokens/files/themes/plan.dark.tokens.json +391 -0
- package/src/tokens/files/themes/plan.light.tokens.json +391 -0
- package/src/tokens/files/themes/slides.dark.tokens.json +391 -0
- package/src/tokens/files/themes/slides.light.tokens.json +391 -0
- package/src/tokens/files/themes/tasks.dark.tokens.json +391 -0
- package/src/tokens/files/themes/tasks.light.tokens.json +391 -0
- package/src/tokens/palette.ts +354 -0
- package/src/tokens/primitives.ts +84 -0
- package/src/tokens/roles.ts +269 -0
- package/src/tokens/round-trip.ts +277 -0
- package/src/tokens/source.ts +302 -0
- package/tsconfig.json +26 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: sidebar (a layout)
|
|
3
|
+
*
|
|
4
|
+
* <div class="sidebar" [data-collapsed]>
|
|
5
|
+
* <div class="sidebar-header"> the brand row
|
|
6
|
+
* <a class="sidebar-brand"> logo, name, a Badge
|
|
7
|
+
* <div class="sidebar-content"> search, then a NavigationMenu, Separators
|
|
8
|
+
* <div class="sidebar-footer"> the account Menu trigger, the collapse Button
|
|
9
|
+
* <div class="sidebar-backdrop"> <div class="sidebar-drawer"> at the mobile width
|
|
10
|
+
*
|
|
11
|
+
* A 256px column on the nav surface: a 56px brand row, the content, and a
|
|
12
|
+
* footer on a hairline. The parts inside keep their own look; the layout
|
|
13
|
+
* only places and spaces them. Collapsed, it is a 56px rail, and the parts
|
|
14
|
+
* inside show icons only.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
@layer components {
|
|
18
|
+
.sidebar {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
flex-shrink: 0;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
width: 256px;
|
|
24
|
+
height: 100%;
|
|
25
|
+
min-height: 0;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
border-inline-end: 1px solid var(--line-subtle);
|
|
28
|
+
background-color: var(--surface-nav);
|
|
29
|
+
color: var(--fg-default);
|
|
30
|
+
transition: width var(--duration-2) var(--ease-standard);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.sidebar[data-collapsed] {
|
|
34
|
+
width: var(--size-7);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* ---- brand row ---- */
|
|
38
|
+
|
|
39
|
+
.sidebar-header {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-shrink: 0;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: var(--space-2);
|
|
44
|
+
box-sizing: border-box;
|
|
45
|
+
height: var(--size-7);
|
|
46
|
+
padding-inline: var(--space-4);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.sidebar[data-collapsed] .sidebar-header {
|
|
50
|
+
justify-content: center;
|
|
51
|
+
padding-inline: var(--space-2);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.sidebar-brand {
|
|
55
|
+
display: flex;
|
|
56
|
+
min-width: 0;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: var(--space-2);
|
|
59
|
+
border-radius: var(--radius-2);
|
|
60
|
+
color: var(--fg-default);
|
|
61
|
+
text-decoration: none;
|
|
62
|
+
outline-style: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.sidebar-brand:focus-visible {
|
|
66
|
+
box-shadow: 0 0 0 var(--focus-ring-width) var(--line-focus);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.sidebar-brand-logo {
|
|
70
|
+
display: inline-flex;
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* As wide as an md control; the mark keeps its own proportions. */
|
|
75
|
+
.sidebar-brand-logo svg,
|
|
76
|
+
.sidebar-brand-logo img {
|
|
77
|
+
width: var(--control-height-3);
|
|
78
|
+
height: auto;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.sidebar-brand-name {
|
|
82
|
+
min-width: 0;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
font-size: var(--font-size-2);
|
|
85
|
+
line-height: var(--line-height-2);
|
|
86
|
+
font-weight: var(--font-weight-semibold);
|
|
87
|
+
text-overflow: ellipsis;
|
|
88
|
+
white-space: nowrap;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.sidebar-brand-badge {
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
flex-shrink: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.sidebar[data-collapsed] .sidebar-brand {
|
|
97
|
+
justify-content: center;
|
|
98
|
+
width: var(--control-height-4);
|
|
99
|
+
height: var(--control-height-4);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.sidebar[data-collapsed] .sidebar-brand-badge {
|
|
103
|
+
display: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* On the rail the name stays the link's accessible name. */
|
|
107
|
+
.sidebar[data-collapsed] .sidebar-brand-name {
|
|
108
|
+
position: absolute;
|
|
109
|
+
width: 1px;
|
|
110
|
+
height: 1px;
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
clip-path: inset(50%);
|
|
113
|
+
white-space: nowrap;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* ---- content ---- */
|
|
117
|
+
|
|
118
|
+
.sidebar-content {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex: 1;
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
min-height: 0;
|
|
123
|
+
gap: var(--space-3);
|
|
124
|
+
padding: var(--space-3) var(--space-2);
|
|
125
|
+
overflow-y: auto;
|
|
126
|
+
overscroll-behavior: contain;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Between groups of places, a divider a step clear of each. */
|
|
130
|
+
.sidebar-content .navigation-menu > .separator {
|
|
131
|
+
margin-block: var(--space-3);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.sidebar[data-collapsed] .sidebar-content .navigation-menu > .separator {
|
|
135
|
+
width: var(--control-height-4);
|
|
136
|
+
align-self: center;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* A second content region sits at the bottom, above the footer. */
|
|
140
|
+
.sidebar-content + .sidebar-content {
|
|
141
|
+
flex: none;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.sidebar[data-collapsed] .sidebar-content {
|
|
145
|
+
align-items: center;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* ---- footer ---- */
|
|
149
|
+
|
|
150
|
+
.sidebar-footer {
|
|
151
|
+
display: flex;
|
|
152
|
+
flex-shrink: 0;
|
|
153
|
+
align-items: center;
|
|
154
|
+
gap: var(--space-1);
|
|
155
|
+
padding: var(--space-2);
|
|
156
|
+
border-top: 1px solid var(--line-subtle);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.sidebar[data-collapsed] .sidebar-footer {
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* ---- the drawer, at the mobile width ---- */
|
|
164
|
+
|
|
165
|
+
.sidebar-backdrop {
|
|
166
|
+
position: fixed;
|
|
167
|
+
inset: 0;
|
|
168
|
+
z-index: var(--layer-dialog-backdrop);
|
|
169
|
+
background-color: var(--surface-overlay);
|
|
170
|
+
transition: opacity var(--duration-2) var(--ease-standard);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.sidebar-backdrop[data-starting-style],
|
|
174
|
+
.sidebar-backdrop[data-ending-style] {
|
|
175
|
+
opacity: 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.sidebar-drawer {
|
|
179
|
+
position: fixed;
|
|
180
|
+
inset-block: 0;
|
|
181
|
+
inset-inline-start: 0;
|
|
182
|
+
z-index: var(--layer-dialog);
|
|
183
|
+
display: flex;
|
|
184
|
+
max-width: calc(100vw - var(--space-7));
|
|
185
|
+
box-shadow: var(--shadow-5);
|
|
186
|
+
outline-style: none;
|
|
187
|
+
transition: translate var(--duration-2) var(--ease-standard);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.sidebar-drawer[data-starting-style],
|
|
191
|
+
.sidebar-drawer[data-ending-style] {
|
|
192
|
+
translate: -100%;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.sidebar-drawer:dir(rtl)[data-starting-style],
|
|
196
|
+
.sidebar-drawer:dir(rtl)[data-ending-style] {
|
|
197
|
+
translate: 100%;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.sidebar-drawer .sidebar {
|
|
201
|
+
border-inline-end: 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@media (prefers-reduced-motion: reduce) {
|
|
205
|
+
.sidebar,
|
|
206
|
+
.sidebar-backdrop,
|
|
207
|
+
.sidebar-drawer {
|
|
208
|
+
transition: none;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: skeleton
|
|
3
|
+
*
|
|
4
|
+
* <div class="skeleton" aria-hidden inert> empty: fills its box
|
|
5
|
+
* <span class="skeleton" data-inline-skeleton>text</span> around text
|
|
6
|
+
* <img class="skeleton …"> around an element, as that element
|
|
7
|
+
*
|
|
8
|
+
* Radix Themes' skeleton: a placeholder in the shape of loading content.
|
|
9
|
+
* Empty, it fills the box its layout gives it, one text line tall when that
|
|
10
|
+
* box has no height. Around content it takes the content's shape and hides
|
|
11
|
+
* it. It pulses between two gray tints, and holds still under reduced
|
|
12
|
+
* motion.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
@layer components {
|
|
16
|
+
.skeleton {
|
|
17
|
+
border: 0;
|
|
18
|
+
border-radius: calc(var(--shape-control) * var(--corner-scale, 1));
|
|
19
|
+
corner-shape: var(--corner-shape, round);
|
|
20
|
+
background-color: var(--gray-a3);
|
|
21
|
+
background-image: none;
|
|
22
|
+
box-shadow: none;
|
|
23
|
+
box-decoration-break: clone;
|
|
24
|
+
color: transparent;
|
|
25
|
+
outline: none;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
cursor: default;
|
|
28
|
+
-webkit-user-select: none;
|
|
29
|
+
user-select: none;
|
|
30
|
+
animation: skeleton-pulse 1s var(--ease-standard) infinite alternate-reverse;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.skeleton:empty {
|
|
34
|
+
display: block;
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
min-height: 1lh;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Inline, it adds no height to its line, so wrapped text keeps its rhythm. */
|
|
41
|
+
.skeleton[data-inline-skeleton] {
|
|
42
|
+
line-height: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.skeleton > *,
|
|
46
|
+
.skeleton::before,
|
|
47
|
+
.skeleton::after {
|
|
48
|
+
visibility: hidden;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media (prefers-reduced-motion: reduce) {
|
|
52
|
+
.skeleton {
|
|
53
|
+
animation: none;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@keyframes skeleton-pulse {
|
|
59
|
+
from {
|
|
60
|
+
background-color: var(--gray-a3);
|
|
61
|
+
}
|
|
62
|
+
to {
|
|
63
|
+
background-color: var(--gray-a4);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: slider
|
|
3
|
+
*
|
|
4
|
+
* <div class="slider" data-orientation Base UI Slider.Root
|
|
5
|
+
* data-size="1|2|3" data-variant="surface|soft"
|
|
6
|
+
* [data-color="accent|gray|danger|warning|success|info"]
|
|
7
|
+
* [data-high-contrast] [data-radius] [data-disabled]>
|
|
8
|
+
* <div class="slider-control"> Slider.Control
|
|
9
|
+
* <div class="slider-track"> Slider.Track
|
|
10
|
+
* <div class="slider-indicator"> Slider.Indicator
|
|
11
|
+
* <div class="slider-thumb" [data-dragging]> Slider.Thumb, one per value
|
|
12
|
+
*
|
|
13
|
+
* Radix Themes' slider on the system's scale: sizes 1 to 3 are 4, 6 and 8px
|
|
14
|
+
* tracks, with thumbs 12px larger, inside a control as tall as a size 3
|
|
15
|
+
* row, so the whole row takes the pointer. The range fills with the nearest
|
|
16
|
+
* color's track step; the thumb is a raised dot ringed in its indicator
|
|
17
|
+
* step. Surface draws the track as a gray field with an edge, soft as a
|
|
18
|
+
* tint. A pill unless `radius` sets the control shape. Vertical sliders fill
|
|
19
|
+
* their container's height.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
@layer components {
|
|
23
|
+
.slider {
|
|
24
|
+
--_track: 6px;
|
|
25
|
+
--_thumb: calc(var(--_track) + var(--space-3));
|
|
26
|
+
--_radius: var(--radius-full);
|
|
27
|
+
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
width: 100%;
|
|
31
|
+
touch-action: none;
|
|
32
|
+
-webkit-user-select: none;
|
|
33
|
+
user-select: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.slider[data-orientation="vertical"] {
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
width: auto;
|
|
39
|
+
height: 100%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.slider[data-radius] {
|
|
43
|
+
--_radius: var(--shape-control);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.slider-control {
|
|
47
|
+
position: relative;
|
|
48
|
+
display: flex;
|
|
49
|
+
flex: 1;
|
|
50
|
+
align-items: center;
|
|
51
|
+
min-height: var(--control-height-3);
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.slider[data-orientation="vertical"] .slider-control {
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
min-width: var(--control-height-3);
|
|
58
|
+
min-height: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.slider-track {
|
|
62
|
+
position: relative;
|
|
63
|
+
flex: 1;
|
|
64
|
+
height: var(--_track);
|
|
65
|
+
border-radius: calc(var(--_radius) * var(--corner-scale, 1));
|
|
66
|
+
corner-shape: var(--corner-shape, round);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.slider[data-orientation="vertical"] .slider-track {
|
|
70
|
+
width: var(--_track);
|
|
71
|
+
height: auto;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.slider-indicator {
|
|
75
|
+
border-radius: inherit;
|
|
76
|
+
background-color: var(--accent-track);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.slider[data-orientation="horizontal"] .slider-indicator {
|
|
80
|
+
height: 100%;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.slider[data-orientation="vertical"] .slider-indicator {
|
|
84
|
+
width: 100%;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.slider-thumb {
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
width: var(--_thumb);
|
|
90
|
+
height: var(--_thumb);
|
|
91
|
+
border: 2px solid var(--accent-indicator);
|
|
92
|
+
border-radius: calc(var(--_radius) * var(--corner-scale, 1));
|
|
93
|
+
corner-shape: var(--corner-shape, round);
|
|
94
|
+
background-color: var(--surface-raised);
|
|
95
|
+
box-shadow: var(--shadow-2);
|
|
96
|
+
outline-style: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.slider-thumb:has(:focus-visible) {
|
|
100
|
+
outline: var(--focus-ring-width) solid var(--line-focus);
|
|
101
|
+
outline-offset: var(--focus-ring-offset);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* ---- sizes ---- */
|
|
105
|
+
|
|
106
|
+
.slider[data-size="1"] {
|
|
107
|
+
--_track: var(--space-1);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.slider[data-size="3"] {
|
|
111
|
+
--_track: var(--space-2);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* ---- variants ---- */
|
|
115
|
+
|
|
116
|
+
.slider[data-variant="surface"] .slider-track {
|
|
117
|
+
background-color: var(--gray-a3);
|
|
118
|
+
box-shadow: inset 0 0 0 1px var(--gray-a7);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.slider[data-variant="soft"] .slider-track {
|
|
122
|
+
background-color: var(--gray-a4);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.slider[data-variant="soft"] .slider-indicator {
|
|
126
|
+
background-color: var(--accent-a7);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.slider[data-high-contrast] .slider-indicator {
|
|
130
|
+
background-color: var(--accent-12);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.slider[data-high-contrast] .slider-thumb {
|
|
134
|
+
border-color: var(--accent-12);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* ---- disabled ---- */
|
|
138
|
+
|
|
139
|
+
.slider[data-disabled] .slider-control {
|
|
140
|
+
cursor: not-allowed;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.slider[data-disabled][data-variant] .slider-track {
|
|
144
|
+
background-color: var(--gray-a3);
|
|
145
|
+
box-shadow: inset 0 0 0 1px var(--gray-a6);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.slider[data-disabled][data-variant] .slider-indicator {
|
|
149
|
+
background-color: var(--gray-a6);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.slider[data-disabled][data-variant] .slider-thumb {
|
|
153
|
+
border-color: var(--gray-a6);
|
|
154
|
+
box-shadow: none;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: spinner
|
|
3
|
+
*
|
|
4
|
+
* <span class="spinner" data-size="1|2|3">
|
|
5
|
+
*
|
|
6
|
+
* A turning ring the size of a control icon (12, 16 or 20px), in the
|
|
7
|
+
* current text color. Under reduced motion it pulses instead.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@layer components {
|
|
11
|
+
.spinner {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
width: var(--control-icon-size-3);
|
|
16
|
+
height: var(--control-icon-size-3);
|
|
17
|
+
border: 2px solid currentColor;
|
|
18
|
+
border-inline-end-color: transparent;
|
|
19
|
+
border-radius: var(--radius-full);
|
|
20
|
+
opacity: 0.8;
|
|
21
|
+
animation: spinner-turn 0.7s linear infinite;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.spinner[data-size="1"] {
|
|
25
|
+
width: var(--control-icon-size-2);
|
|
26
|
+
height: var(--control-icon-size-2);
|
|
27
|
+
border-width: 1.5px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.spinner[data-size="3"] {
|
|
31
|
+
width: var(--size-2);
|
|
32
|
+
height: var(--size-2);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (prefers-reduced-motion: reduce) {
|
|
36
|
+
.spinner {
|
|
37
|
+
animation: spinner-pulse 1.4s var(--ease-standard) infinite;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@keyframes spinner-turn {
|
|
43
|
+
to {
|
|
44
|
+
rotate: 360deg;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@keyframes spinner-pulse {
|
|
49
|
+
50% {
|
|
50
|
+
opacity: 0.3;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: strong
|
|
3
|
+
*
|
|
4
|
+
* <strong class="strong" [data-truncate]
|
|
5
|
+
* [data-wrap="wrap|nowrap|pretty|balance"]>
|
|
6
|
+
*
|
|
7
|
+
* Radix Themes' strong: important text, set bold in the surrounding text's
|
|
8
|
+
* family, size and color. Truncate and wrap are in text.css.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
@layer components {
|
|
12
|
+
.strong {
|
|
13
|
+
font-weight: var(--font-weight-bold);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: switch
|
|
3
|
+
*
|
|
4
|
+
* <span class="switch" role="switch" Base UI Switch.Root
|
|
5
|
+
* data-size="1|2|3" data-variant="surface|soft"
|
|
6
|
+
* [data-color="accent|gray|danger|warning|success|info"]
|
|
7
|
+
* [data-high-contrast] [data-radius] [data-checked] [data-unchecked]
|
|
8
|
+
* [data-invalid] [data-disabled]>
|
|
9
|
+
* <span class="switch-thumb" [data-checked]> Switch.Thumb
|
|
10
|
+
* <input type="checkbox" hidden> carries id, name
|
|
11
|
+
*
|
|
12
|
+
* Radix Themes' switch on the system's scale: sizes 1 to 3 are 12, 16 and
|
|
13
|
+
* 20px tracks, 20, 28 and 36px wide, each with a hit area 2px taller on
|
|
14
|
+
* both edges. Checked fills the track with the nearest color's track step.
|
|
15
|
+
* Surface's unchecked track is gray step a10, solid where Radix tints it, so
|
|
16
|
+
* the off state keeps a 3:1 contrast against the page; soft tints both
|
|
17
|
+
* states. A pill unless `radius` sets the control shape.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
@layer components {
|
|
21
|
+
.switch {
|
|
22
|
+
--_height: 16px;
|
|
23
|
+
--_width: 28px;
|
|
24
|
+
--_inset: 2px;
|
|
25
|
+
--_radius: var(--radius-full);
|
|
26
|
+
|
|
27
|
+
position: relative;
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
align-items: center;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
width: var(--_width);
|
|
33
|
+
height: var(--_height);
|
|
34
|
+
padding: var(--_inset);
|
|
35
|
+
border-radius: calc(var(--_radius) * var(--corner-scale, 1));
|
|
36
|
+
corner-shape: var(--corner-shape, round);
|
|
37
|
+
vertical-align: top;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
outline-style: none;
|
|
40
|
+
transition-property: background-color, box-shadow;
|
|
41
|
+
transition-duration: var(--duration-2);
|
|
42
|
+
transition-timing-function: var(--ease-standard);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.switch::after {
|
|
46
|
+
content: "";
|
|
47
|
+
position: absolute;
|
|
48
|
+
inset: -2px 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.switch[data-radius] {
|
|
52
|
+
--_radius: var(--shape-control);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.switch-thumb {
|
|
56
|
+
display: block;
|
|
57
|
+
width: calc(var(--_height) - 2 * var(--_inset));
|
|
58
|
+
height: calc(var(--_height) - 2 * var(--_inset));
|
|
59
|
+
border-radius: calc(
|
|
60
|
+
max(0px, var(--_radius) - var(--_inset)) * var(--corner-scale, 1)
|
|
61
|
+
);
|
|
62
|
+
corner-shape: var(--corner-shape, round);
|
|
63
|
+
background-color: var(--surface-raised);
|
|
64
|
+
box-shadow: var(--shadow-2);
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
transition: translate var(--duration-2) var(--ease-standard);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.switch-thumb[data-checked] {
|
|
70
|
+
translate: calc(var(--_width) - var(--_height));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.switch-thumb[data-checked]:dir(rtl) {
|
|
74
|
+
translate: calc((var(--_width) - var(--_height)) * -1);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (prefers-reduced-motion: reduce) {
|
|
78
|
+
.switch-thumb {
|
|
79
|
+
transition: none;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* ---- sizes ---- */
|
|
84
|
+
|
|
85
|
+
.switch[data-size="1"] {
|
|
86
|
+
--_height: 12px;
|
|
87
|
+
--_width: 20px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.switch[data-size="3"] {
|
|
91
|
+
--_height: 20px;
|
|
92
|
+
--_width: 36px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* ---- variants ---- */
|
|
96
|
+
|
|
97
|
+
.switch[data-variant="surface"] {
|
|
98
|
+
background-color: var(--gray-a10);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.switch[data-variant="surface"]:where([data-checked]) {
|
|
102
|
+
background-color: var(--accent-track);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.switch[data-variant="soft"] {
|
|
106
|
+
background-color: var(--gray-a4);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.switch[data-variant="soft"]:where([data-checked]) {
|
|
110
|
+
background-color: var(--accent-a6);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.switch[data-high-contrast]:where([data-checked]) {
|
|
114
|
+
background-color: var(--accent-12);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.switch[data-invalid][data-unchecked] {
|
|
118
|
+
box-shadow: inset 0 0 0 1px var(--fill-danger);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.switch:focus-visible {
|
|
122
|
+
outline: var(--focus-ring-width) solid var(--line-focus);
|
|
123
|
+
outline-offset: var(--focus-ring-offset);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* ---- disabled ---- */
|
|
127
|
+
|
|
128
|
+
.switch[data-disabled][data-variant] {
|
|
129
|
+
cursor: not-allowed;
|
|
130
|
+
background-color: var(--gray-a3);
|
|
131
|
+
box-shadow: inset 0 0 0 1px var(--gray-a6);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.switch[data-disabled] .switch-thumb {
|
|
135
|
+
background-color: var(--gray-2);
|
|
136
|
+
box-shadow: 0 0 0 1px var(--gray-a6);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: tab-nav
|
|
3
|
+
*
|
|
4
|
+
* <nav class="tab-nav" data-orientation="horizontal"> Base UI NavigationMenu.Root
|
|
5
|
+
* <ul class="tab-nav-list" NavigationMenu.List
|
|
6
|
+
* data-size="1|2" data-justify="start|center|end"
|
|
7
|
+
* data-wrap="nowrap|wrap|wrap-reverse"
|
|
8
|
+
* [data-color="accent|gray|danger|warning|success|info"]
|
|
9
|
+
* [data-high-contrast]>
|
|
10
|
+
* <li class="tab-nav-item"> NavigationMenu.Item
|
|
11
|
+
* <a class="tab-nav-link" NavigationMenu.Link
|
|
12
|
+
* [aria-current="page"] [data-active]>
|
|
13
|
+
*
|
|
14
|
+
* Radix Themes' tab nav: Tabs' row of triggers as links between pages, the
|
|
15
|
+
* current page's link underlined in the nearest `data-color`'s indicator
|
|
16
|
+
* step. The list, the links, their sizes, hover tint, focus ring and
|
|
17
|
+
* underline are tabs.css's rules, shared through `:is()` so the two stay
|
|
18
|
+
* one look; this sheet only resets the list and draws the underline's box.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
@layer components {
|
|
22
|
+
.tab-nav {
|
|
23
|
+
display: flex;
|
|
24
|
+
min-width: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.tab-nav-list {
|
|
28
|
+
flex: 1;
|
|
29
|
+
min-width: 0;
|
|
30
|
+
margin: 0;
|
|
31
|
+
padding: 0;
|
|
32
|
+
list-style: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.tab-nav-item {
|
|
36
|
+
display: flex;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.tab-nav-link {
|
|
40
|
+
text-decoration: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tab-nav-link[aria-current="page"]::after {
|
|
44
|
+
content: "";
|
|
45
|
+
left: 0;
|
|
46
|
+
right: 0;
|
|
47
|
+
}
|
|
48
|
+
}
|