@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,177 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: table
|
|
3
|
+
*
|
|
4
|
+
* <div class="table-root" data-size="1|2|3" data-variant="surface|ghost"
|
|
5
|
+
* data-layout="auto|fixed">
|
|
6
|
+
* <div class="scroll-area"> ScrollArea, for wide tables
|
|
7
|
+
* <table class="table">
|
|
8
|
+
* <thead class="table-header">
|
|
9
|
+
* <tr class="table-row">
|
|
10
|
+
* <th class="table-cell table-column-header-cell" scope="col"
|
|
11
|
+
* data-justify="start|center|end">
|
|
12
|
+
* <tbody class="table-body">
|
|
13
|
+
* <tr class="table-row" data-align="start|center|end|baseline"
|
|
14
|
+
* [tabindex] [role="button|link"] [aria-pressed|aria-selected]>
|
|
15
|
+
* <th class="table-cell table-row-header-cell" scope="row">
|
|
16
|
+
* <td class="table-cell" data-justify>
|
|
17
|
+
*
|
|
18
|
+
* Radix Themes' table on the system's scale. Sizes 1 to 3 pad the cells
|
|
19
|
+
* compact, standard and roomy. Surface frames the table on the raised
|
|
20
|
+
* surface with a tinted header; ghost is bare rows divided by hairlines.
|
|
21
|
+
* A row takes the hover fill only when it is a control (focusable, or a
|
|
22
|
+
* button or link), and a pressed or selected row keeps the fill: a button
|
|
23
|
+
* row takes `aria-pressed`, a grid row `aria-selected`. In a Card's Inset the
|
|
24
|
+
* first and last cells line up with the card's padding.
|
|
25
|
+
*
|
|
26
|
+
* `table` is on the <table> itself: Tailwind ships a `.table` utility that
|
|
27
|
+
* sets `display: table`, which would break the scrolling frame.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
@layer components {
|
|
31
|
+
.table-root {
|
|
32
|
+
--table-cell-padding-y: var(--space-2);
|
|
33
|
+
--table-cell-padding-x: var(--space-3);
|
|
34
|
+
--table-cell-min-height: var(--size-5);
|
|
35
|
+
--table-font-size: var(--font-size-2);
|
|
36
|
+
--table-line-height: var(--line-height-2);
|
|
37
|
+
--table-radius: calc(var(--shape-panel) * var(--corner-scale, 1));
|
|
38
|
+
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
min-width: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.table {
|
|
46
|
+
--table-row-background-color: transparent;
|
|
47
|
+
--table-row-box-shadow: inset 0 -1px var(--line-subtle);
|
|
48
|
+
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 0;
|
|
52
|
+
border-collapse: collapse;
|
|
53
|
+
border-spacing: 0;
|
|
54
|
+
color: var(--fg-default);
|
|
55
|
+
font-size: var(--table-font-size);
|
|
56
|
+
line-height: var(--table-line-height);
|
|
57
|
+
text-align: start;
|
|
58
|
+
vertical-align: top;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.table-root[data-layout="fixed"] .table {
|
|
62
|
+
table-layout: fixed;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.table-header,
|
|
66
|
+
.table-body,
|
|
67
|
+
.table-row {
|
|
68
|
+
vertical-align: inherit;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.table-cell {
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
height: var(--table-cell-min-height);
|
|
74
|
+
padding: var(--table-cell-padding-y) var(--table-cell-padding-x);
|
|
75
|
+
background-color: var(--table-row-background-color);
|
|
76
|
+
box-shadow: var(--table-row-box-shadow);
|
|
77
|
+
vertical-align: inherit;
|
|
78
|
+
text-align: start;
|
|
79
|
+
transition: background-color var(--duration-1) var(--ease-standard);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.table-column-header-cell {
|
|
83
|
+
color: var(--fg-muted);
|
|
84
|
+
font-weight: var(--font-weight-medium);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.table-row-header-cell {
|
|
88
|
+
font-weight: var(--font-weight-regular);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.table-cell[data-justify="center"] {
|
|
92
|
+
text-align: center;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.table-cell[data-justify="end"] {
|
|
96
|
+
text-align: end;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.table-row[data-align="start"] {
|
|
100
|
+
vertical-align: top;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.table-row[data-align="center"] {
|
|
104
|
+
vertical-align: middle;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.table-row[data-align="end"] {
|
|
108
|
+
vertical-align: bottom;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.table-row[data-align="baseline"] {
|
|
112
|
+
vertical-align: baseline;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.inset .table-cell:first-child {
|
|
116
|
+
padding-left: var(--inset-padding-left, var(--table-cell-padding-x));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.inset .table-cell:last-child {
|
|
120
|
+
padding-right: var(--inset-padding-right, var(--table-cell-padding-x));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* ---- sizes ---- */
|
|
124
|
+
|
|
125
|
+
.table-root[data-size="1"] {
|
|
126
|
+
--table-cell-padding-y: var(--space-1);
|
|
127
|
+
--table-cell-padding-x: var(--space-2);
|
|
128
|
+
--table-cell-min-height: var(--size-4);
|
|
129
|
+
--table-font-size: var(--font-size-1);
|
|
130
|
+
--table-line-height: var(--line-height-1);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.table-root[data-size="3"] {
|
|
134
|
+
--table-cell-padding-y: var(--space-3);
|
|
135
|
+
--table-cell-padding-x: var(--space-4);
|
|
136
|
+
--table-cell-min-height: var(--size-6);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* ---- variants ---- */
|
|
140
|
+
|
|
141
|
+
.table-root[data-variant="surface"] {
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
border: 1px solid var(--line-subtle);
|
|
144
|
+
border-radius: var(--table-radius);
|
|
145
|
+
corner-shape: var(--corner-shape, round);
|
|
146
|
+
background-color: var(--surface-raised);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.table-root[data-variant="surface"] .table-header {
|
|
150
|
+
--table-row-background-color: var(--gray-a2);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.table-root[data-variant="surface"] .table-body .table-row:last-child {
|
|
154
|
+
--table-row-box-shadow: none;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* ---- a row that is a control ---- */
|
|
158
|
+
|
|
159
|
+
.table-row:is([tabindex], [role="button"], [role="link"]) {
|
|
160
|
+
outline-style: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@media (hover: hover) {
|
|
164
|
+
.table-row:is([tabindex], [role="button"], [role="link"]):hover {
|
|
165
|
+
--table-row-background-color: var(--gray-a2);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.table-row:is([aria-pressed="true"], [aria-selected="true"]) {
|
|
170
|
+
--table-row-background-color: var(--gray-a3);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.table-row:focus-visible {
|
|
174
|
+
outline: var(--focus-ring-width) solid var(--line-focus);
|
|
175
|
+
outline-offset: calc(var(--focus-ring-width) * -1);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: tabs
|
|
3
|
+
*
|
|
4
|
+
* <div class="tabs" data-orientation> Base UI Tabs.Root
|
|
5
|
+
* <div class="tabs-list" role="tablist" Tabs.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] data-orientation>
|
|
10
|
+
* <button class="tabs-tab" role="tab" Tabs.Tab
|
|
11
|
+
* [data-active] [data-disabled]>
|
|
12
|
+
* <span class="tabs-indicator"> Tabs.Indicator
|
|
13
|
+
* <div class="tabs-panel" role="tabpanel"> Tabs.Panel [hidden]
|
|
14
|
+
*
|
|
15
|
+
* Radix Themes' tabs on the system's scale: a row of triggers over a
|
|
16
|
+
* hairline, the active one underlined by Base UI's indicator in the nearest
|
|
17
|
+
* `data-color`'s indicator step. Size 1 triggers are 24px tall, size 2 are
|
|
18
|
+
* 32px; each draws its hover tint one control step shorter, inset from its
|
|
19
|
+
* edges. Vertical tabs stack the list beside the panels with the line on
|
|
20
|
+
* its inline end.
|
|
21
|
+
*
|
|
22
|
+
* Tab Nav draws with these rules: `.tab-nav-list` is a list and
|
|
23
|
+
* `.tab-nav-link` a trigger, the current page's link (`aria-current="page"`)
|
|
24
|
+
* the active one. Its own sheet, tab-nav.css, adds only what links need.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
@layer components {
|
|
28
|
+
.tabs {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
gap: var(--space-2);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.tabs[data-orientation="vertical"] {
|
|
35
|
+
flex-direction: row;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:is(.tabs-list, .tab-nav-list) {
|
|
39
|
+
--tabs-tab-height: var(--control-height-4);
|
|
40
|
+
--tabs-tab-tint-height: var(--control-height-3);
|
|
41
|
+
--tabs-tab-padding-x: var(--control-padding-x-3);
|
|
42
|
+
--tabs-tab-icon-size: var(--control-icon-size-3);
|
|
43
|
+
position: relative;
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: flex-start;
|
|
46
|
+
flex-wrap: nowrap;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
overflow-x: auto;
|
|
49
|
+
scrollbar-width: none;
|
|
50
|
+
box-shadow: inset 0 -1px 0 0 var(--gray-a5);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:is(.tabs-list, .tab-nav-list)::-webkit-scrollbar {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:is(.tabs-list, .tab-nav-list)[data-size="1"] {
|
|
58
|
+
--tabs-tab-height: var(--control-height-3);
|
|
59
|
+
--tabs-tab-tint-height: var(--control-height-2);
|
|
60
|
+
--tabs-tab-padding-x: var(--control-padding-x-2);
|
|
61
|
+
--tabs-tab-icon-size: var(--control-icon-size-2);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:is(.tabs-list, .tab-nav-list)[data-justify="center"] {
|
|
65
|
+
justify-content: center;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:is(.tabs-list, .tab-nav-list)[data-justify="end"] {
|
|
69
|
+
justify-content: flex-end;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:is(.tabs-list, .tab-nav-list)[data-wrap="wrap"] {
|
|
73
|
+
flex-wrap: wrap;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:is(.tabs-list, .tab-nav-list)[data-wrap="wrap-reverse"] {
|
|
77
|
+
flex-wrap: wrap-reverse;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.tabs-list[data-orientation="vertical"] {
|
|
81
|
+
flex-direction: column;
|
|
82
|
+
align-items: stretch;
|
|
83
|
+
overflow: visible;
|
|
84
|
+
box-shadow: inset -1px 0 0 0 var(--gray-a5);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:is(.tabs-tab, .tab-nav-link) {
|
|
88
|
+
position: relative;
|
|
89
|
+
isolation: isolate;
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-shrink: 0;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
gap: var(--control-gap);
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
height: var(--tabs-tab-height);
|
|
97
|
+
padding: 0 calc(var(--tabs-tab-padding-x) + var(--control-padding-x-1));
|
|
98
|
+
border: 0;
|
|
99
|
+
background-color: transparent;
|
|
100
|
+
color: var(--gray-text);
|
|
101
|
+
font: inherit;
|
|
102
|
+
font-size: var(--control-font-size);
|
|
103
|
+
line-height: var(--control-line-height);
|
|
104
|
+
font-weight: var(--font-weight-medium);
|
|
105
|
+
white-space: nowrap;
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
-webkit-user-select: none;
|
|
108
|
+
user-select: none;
|
|
109
|
+
outline-style: none;
|
|
110
|
+
transition: color var(--duration-2) var(--ease-standard);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.tabs-list[data-orientation="vertical"] .tabs-tab {
|
|
114
|
+
justify-content: flex-start;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* The hover tint and focus ring, inset from the trigger. The list scrolls,
|
|
118
|
+
so the ring has to stay inside the trigger to stay visible. */
|
|
119
|
+
:is(.tabs-tab, .tab-nav-link)::before {
|
|
120
|
+
content: "";
|
|
121
|
+
position: absolute;
|
|
122
|
+
z-index: -1;
|
|
123
|
+
inset: calc((var(--tabs-tab-height) - var(--tabs-tab-tint-height)) / 2)
|
|
124
|
+
var(--control-padding-x-1);
|
|
125
|
+
border-radius: calc(var(--shape-control) * var(--corner-scale, 1));
|
|
126
|
+
corner-shape: var(--corner-shape, round);
|
|
127
|
+
transition: background-color var(--duration-2) var(--ease-standard);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:is(.tabs-tab, .tab-nav-link) svg {
|
|
131
|
+
flex-shrink: 0;
|
|
132
|
+
width: var(--tabs-tab-icon-size);
|
|
133
|
+
height: var(--tabs-tab-icon-size);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media (hover: hover) {
|
|
137
|
+
:is(.tabs-tab, .tab-nav-link):not([data-disabled]):hover {
|
|
138
|
+
color: var(--gray-12);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:is(.tabs-tab, .tab-nav-link):not([data-disabled]):hover::before {
|
|
142
|
+
background-color: var(--gray-a3);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:is(.tabs-tab, .tab-nav-link):not(
|
|
146
|
+
[data-disabled]
|
|
147
|
+
):focus-visible:hover::before {
|
|
148
|
+
background-color: var(--accent-a3);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:is(.tabs-tab[data-active], .tab-nav-link[aria-current="page"]) {
|
|
153
|
+
color: var(--gray-12);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:is(.tabs-tab, .tab-nav-link):focus-visible::before {
|
|
157
|
+
outline: var(--focus-ring-width) solid var(--line-focus);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.tabs-tab[data-disabled] {
|
|
161
|
+
cursor: not-allowed;
|
|
162
|
+
color: var(--gray-a8);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* The underline: Base UI's indicator under Tabs, the current link's own
|
|
166
|
+
::after under Tab Nav. :is() can't match a pseudo-element, so these
|
|
167
|
+
are a selector list. */
|
|
168
|
+
.tabs-indicator,
|
|
169
|
+
.tab-nav-link[aria-current="page"]::after {
|
|
170
|
+
position: absolute;
|
|
171
|
+
bottom: 0;
|
|
172
|
+
height: 2px;
|
|
173
|
+
background-color: var(--accent-indicator);
|
|
174
|
+
pointer-events: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.tabs-indicator {
|
|
178
|
+
left: var(--active-tab-left);
|
|
179
|
+
width: var(--active-tab-width);
|
|
180
|
+
transition-property: left, width, top, height;
|
|
181
|
+
transition-duration: var(--duration-2);
|
|
182
|
+
transition-timing-function: var(--ease-standard);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.tabs-list[data-orientation="vertical"] .tabs-indicator {
|
|
186
|
+
top: var(--active-tab-top);
|
|
187
|
+
bottom: auto;
|
|
188
|
+
left: auto;
|
|
189
|
+
right: 0;
|
|
190
|
+
width: 2px;
|
|
191
|
+
height: var(--active-tab-height);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.tabs-list[data-high-contrast] .tabs-indicator,
|
|
195
|
+
.tab-nav-list[data-high-contrast] .tab-nav-link[aria-current="page"]::after {
|
|
196
|
+
background-color: var(--accent-12);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@media (prefers-reduced-motion: reduce) {
|
|
200
|
+
.tabs-indicator {
|
|
201
|
+
transition: none;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.tabs-panel {
|
|
206
|
+
position: relative;
|
|
207
|
+
outline-style: none;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.tabs-panel:focus-visible {
|
|
211
|
+
outline: var(--focus-ring-width) solid var(--line-focus);
|
|
212
|
+
outline-offset: var(--focus-ring-offset);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Part: text-area
|
|
3
|
+
*
|
|
4
|
+
* <textarea class="text-area" Base UI Field.Control
|
|
5
|
+
* data-size="1|2|3|4" data-variant="surface|soft"
|
|
6
|
+
* data-resize="none|vertical|horizontal|both"
|
|
7
|
+
* [data-color="accent|gray|danger|warning|success|info"] [data-radius]
|
|
8
|
+
* [data-focused] [data-invalid] [data-disabled] [aria-invalid]>
|
|
9
|
+
*
|
|
10
|
+
* Radix Themes' text area on the system's scale: a multi-line field with
|
|
11
|
+
* the input's edge, fill and focus ring at the same size. Its vertical
|
|
12
|
+
* padding is (height - line) / 2, so a single line sits where an Input of
|
|
13
|
+
* the same size puts it, and it is at least three lines tall. Surface keeps
|
|
14
|
+
* neutral edges in every color, and soft is a tint of the color, as for the
|
|
15
|
+
* input.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
@layer components {
|
|
19
|
+
.text-area {
|
|
20
|
+
--control-font-size: var(--control-font-size-3);
|
|
21
|
+
--control-line-height: var(--control-line-height-3);
|
|
22
|
+
--_height: var(--control-height-3);
|
|
23
|
+
--_padding: var(--control-padding-x-4);
|
|
24
|
+
--_padding-y: calc((var(--_height) - var(--control-line-height)) / 2);
|
|
25
|
+
|
|
26
|
+
display: block;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
width: 100%;
|
|
29
|
+
min-width: 0;
|
|
30
|
+
min-height: calc(3 * var(--control-line-height) + 2 * var(--_padding-y));
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: var(--_padding-y) var(--_padding);
|
|
33
|
+
border: 0;
|
|
34
|
+
border-radius: calc(var(--shape-control) * var(--corner-scale, 1));
|
|
35
|
+
corner-shape: var(--corner-shape, round);
|
|
36
|
+
font: inherit;
|
|
37
|
+
font-size: var(--control-font-size);
|
|
38
|
+
line-height: var(--control-line-height);
|
|
39
|
+
resize: vertical;
|
|
40
|
+
outline-style: none;
|
|
41
|
+
transition-property: background-color, box-shadow;
|
|
42
|
+
transition-duration: var(--duration-2);
|
|
43
|
+
transition-timing-function: var(--ease-standard);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* ---- sizes ---- */
|
|
47
|
+
|
|
48
|
+
.text-area[data-size="1"] {
|
|
49
|
+
--control-font-size: var(--control-font-size-1);
|
|
50
|
+
--control-line-height: var(--control-line-height-1);
|
|
51
|
+
--_height: var(--control-height-1);
|
|
52
|
+
--_padding: var(--control-padding-x-2);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.text-area[data-size="2"] {
|
|
56
|
+
--control-font-size: var(--control-font-size-2);
|
|
57
|
+
--control-line-height: var(--control-line-height-2);
|
|
58
|
+
--_height: var(--control-height-2);
|
|
59
|
+
--_padding: var(--control-padding-x-3);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.text-area[data-size="4"] {
|
|
63
|
+
--control-font-size: var(--control-font-size-4);
|
|
64
|
+
--control-line-height: var(--control-line-height-4);
|
|
65
|
+
--_height: var(--control-height-4);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.text-area[data-resize="none"] {
|
|
69
|
+
resize: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.text-area[data-resize="horizontal"] {
|
|
73
|
+
resize: horizontal;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.text-area[data-resize="both"] {
|
|
77
|
+
resize: both;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* ---- variants ---- */
|
|
81
|
+
|
|
82
|
+
.text-area[data-variant="surface"] {
|
|
83
|
+
background-color: var(--fill-field);
|
|
84
|
+
box-shadow: inset 0 0 0 1px var(--line-strong);
|
|
85
|
+
color: var(--fg-default);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.text-area[data-variant="soft"] {
|
|
89
|
+
background-color: var(--accent-a3);
|
|
90
|
+
color: var(--accent-12);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.text-area::placeholder {
|
|
94
|
+
color: var(--fg-subtle);
|
|
95
|
+
opacity: 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.text-area[data-variant="soft"]::placeholder {
|
|
99
|
+
color: var(--accent-text);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media (hover: hover) {
|
|
103
|
+
.text-area[data-variant="surface"]:hover {
|
|
104
|
+
box-shadow: inset 0 0 0 1px var(--gray-a8);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.text-area:focus-visible {
|
|
109
|
+
outline: var(--focus-ring-width) solid var(--line-focus);
|
|
110
|
+
outline-offset: var(--focus-ring-offset);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* ---- invalid and disabled ---- */
|
|
114
|
+
|
|
115
|
+
.text-area:is([data-invalid], [aria-invalid="true"]) {
|
|
116
|
+
box-shadow: inset 0 0 0 1px var(--fill-danger);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.text-area:is([data-invalid], [aria-invalid="true"]):focus-visible {
|
|
120
|
+
outline-color: var(--fill-danger);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.text-area:disabled {
|
|
124
|
+
cursor: not-allowed;
|
|
125
|
+
color: var(--gray-a8);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.text-area:disabled::placeholder {
|
|
129
|
+
color: var(--gray-a8);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.text-area[data-variant="surface"]:disabled {
|
|
133
|
+
background-color: transparent;
|
|
134
|
+
box-shadow: inset 0 0 0 1px var(--gray-a6);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.text-area[data-variant="soft"]:disabled {
|
|
138
|
+
background-color: var(--gray-a3);
|
|
139
|
+
}
|
|
140
|
+
}
|