@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,1402 @@
|
|
|
1
|
+
/* Generated by packages/design-system/scripts/build-prop-types.ts from src/catalog/components. Do not edit. */
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
alertDialogContentProps,
|
|
5
|
+
aspectRatioProps,
|
|
6
|
+
autocompletePopupProps,
|
|
7
|
+
autocompleteProps,
|
|
8
|
+
avatarProps,
|
|
9
|
+
badgeProps,
|
|
10
|
+
blockquoteProps,
|
|
11
|
+
buttonProps,
|
|
12
|
+
calloutProps,
|
|
13
|
+
cardProps,
|
|
14
|
+
checkboxCardsProps,
|
|
15
|
+
checkboxGroupProps,
|
|
16
|
+
checkboxProps,
|
|
17
|
+
codeProps,
|
|
18
|
+
comboboxPopupProps,
|
|
19
|
+
comboboxProps,
|
|
20
|
+
contextMenuContentProps,
|
|
21
|
+
contextMenuItemProps,
|
|
22
|
+
dataListProps,
|
|
23
|
+
dialogContentProps,
|
|
24
|
+
drawerProps,
|
|
25
|
+
emProps,
|
|
26
|
+
headingProps,
|
|
27
|
+
iconButtonProps,
|
|
28
|
+
inputProps,
|
|
29
|
+
inputSlotProps,
|
|
30
|
+
insetProps,
|
|
31
|
+
itemGroupProps,
|
|
32
|
+
itemMediaProps,
|
|
33
|
+
itemProps,
|
|
34
|
+
kbdProps,
|
|
35
|
+
linkProps,
|
|
36
|
+
menubarContentProps,
|
|
37
|
+
menubarItemProps,
|
|
38
|
+
menuContentProps,
|
|
39
|
+
menuItemProps,
|
|
40
|
+
meterProps,
|
|
41
|
+
numberFieldProps,
|
|
42
|
+
otpFieldProps,
|
|
43
|
+
popoverContentProps,
|
|
44
|
+
previewCardContentProps,
|
|
45
|
+
progressProps,
|
|
46
|
+
quoteProps,
|
|
47
|
+
radioCardsProps,
|
|
48
|
+
radioGroupProps,
|
|
49
|
+
scrollAreaProps,
|
|
50
|
+
segmentedControlProps,
|
|
51
|
+
selectContentProps,
|
|
52
|
+
selectRootProps,
|
|
53
|
+
selectTriggerProps,
|
|
54
|
+
separatorProps,
|
|
55
|
+
skeletonProps,
|
|
56
|
+
sliderProps,
|
|
57
|
+
spinnerProps,
|
|
58
|
+
strongProps,
|
|
59
|
+
switchProps,
|
|
60
|
+
tableCellProps,
|
|
61
|
+
tableProps,
|
|
62
|
+
tableRowProps,
|
|
63
|
+
tabNavProps,
|
|
64
|
+
tabsListProps,
|
|
65
|
+
textAreaProps,
|
|
66
|
+
textComponentProps,
|
|
67
|
+
toastProps,
|
|
68
|
+
toggleGroupProps,
|
|
69
|
+
toggleProps,
|
|
70
|
+
toolbarProps,
|
|
71
|
+
} from "./components/index.js";
|
|
72
|
+
import type { PropsOf } from "./props.js";
|
|
73
|
+
|
|
74
|
+
export interface AlertDialogContentOwnProps {
|
|
75
|
+
/**
|
|
76
|
+
* Padding and type step of the popup, as in Radix Themes.
|
|
77
|
+
* @default "3"
|
|
78
|
+
*/
|
|
79
|
+
size?: "1" | "2" | "3" | "4";
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface AspectRatioOwnProps {}
|
|
83
|
+
|
|
84
|
+
export interface AutocompletePopupOwnProps {
|
|
85
|
+
/**
|
|
86
|
+
* How the component applies its color.
|
|
87
|
+
* @default "soft"
|
|
88
|
+
*/
|
|
89
|
+
variant?: "solid" | "soft";
|
|
90
|
+
/**
|
|
91
|
+
* The scale the highlighted row draws from; gray unless set.
|
|
92
|
+
* @default "gray"
|
|
93
|
+
*/
|
|
94
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
95
|
+
/**
|
|
96
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
97
|
+
* @default false
|
|
98
|
+
*/
|
|
99
|
+
highContrast?: boolean;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface AutocompleteOwnProps {
|
|
103
|
+
/**
|
|
104
|
+
* Control height: 1 is 16px, 2 is 20px, 3 is 24px, 4 is 32px.
|
|
105
|
+
* @default "3"
|
|
106
|
+
*/
|
|
107
|
+
size?: "1" | "2" | "3" | "4";
|
|
108
|
+
/**
|
|
109
|
+
* How the component applies its color.
|
|
110
|
+
* @default "surface"
|
|
111
|
+
*/
|
|
112
|
+
variant?: "surface" | "soft";
|
|
113
|
+
/**
|
|
114
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
115
|
+
*/
|
|
116
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
117
|
+
/**
|
|
118
|
+
* Overrides the theme's corner radius for this component.
|
|
119
|
+
*/
|
|
120
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface AvatarOwnProps {
|
|
124
|
+
/**
|
|
125
|
+
* Diameter: 1 is 16px, 2 is 20px, 3 is 24px, 4 is 32px.
|
|
126
|
+
* @default "3"
|
|
127
|
+
*/
|
|
128
|
+
size?: "1" | "2" | "3" | "4";
|
|
129
|
+
/**
|
|
130
|
+
* How the component applies its color.
|
|
131
|
+
* @default "soft"
|
|
132
|
+
*/
|
|
133
|
+
variant?: "solid" | "soft";
|
|
134
|
+
/**
|
|
135
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
136
|
+
*/
|
|
137
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
138
|
+
/**
|
|
139
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
140
|
+
* @default false
|
|
141
|
+
*/
|
|
142
|
+
highContrast?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Overrides the theme's corner radius for this component.
|
|
145
|
+
*/
|
|
146
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface BadgeOwnProps {
|
|
150
|
+
/**
|
|
151
|
+
* Control height: 1 is 16px, 2 is 20px, 3 is 24px.
|
|
152
|
+
* @default "2"
|
|
153
|
+
*/
|
|
154
|
+
size?: "1" | "2" | "3";
|
|
155
|
+
/**
|
|
156
|
+
* How the component applies its color.
|
|
157
|
+
* @default "soft"
|
|
158
|
+
*/
|
|
159
|
+
variant?: "solid" | "soft" | "surface" | "outline";
|
|
160
|
+
/**
|
|
161
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
162
|
+
*/
|
|
163
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
164
|
+
/**
|
|
165
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
166
|
+
* @default false
|
|
167
|
+
*/
|
|
168
|
+
highContrast?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Overrides the theme's corner radius for this component.
|
|
171
|
+
*/
|
|
172
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
173
|
+
/**
|
|
174
|
+
* Shows only a dot in the badge's color; the label stays for assistive technology.
|
|
175
|
+
* @default false
|
|
176
|
+
*/
|
|
177
|
+
dot?: boolean;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface BlockquoteOwnProps {
|
|
181
|
+
/**
|
|
182
|
+
* A step of the type scale; unset, it inherits.
|
|
183
|
+
*/
|
|
184
|
+
size?: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
|
|
185
|
+
/**
|
|
186
|
+
* Font weight, one of the weight tokens.
|
|
187
|
+
*/
|
|
188
|
+
weight?: "light" | "regular" | "medium" | "semibold" | "bold";
|
|
189
|
+
/**
|
|
190
|
+
* Truncates to one line with an ellipsis.
|
|
191
|
+
* @default false
|
|
192
|
+
*/
|
|
193
|
+
truncate?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* How lines break: `pretty` avoids orphans, `balance` evens line lengths.
|
|
196
|
+
*/
|
|
197
|
+
wrap?: "wrap" | "nowrap" | "pretty" | "balance";
|
|
198
|
+
/**
|
|
199
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
200
|
+
*/
|
|
201
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
202
|
+
/**
|
|
203
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
204
|
+
* @default false
|
|
205
|
+
*/
|
|
206
|
+
highContrast?: boolean;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface ButtonOwnProps {
|
|
210
|
+
/**
|
|
211
|
+
* Control height: 1 is 16px, 2 is 20px, 3 is 24px, 4 is 32px.
|
|
212
|
+
* @default "3"
|
|
213
|
+
*/
|
|
214
|
+
size?: "1" | "2" | "3" | "4";
|
|
215
|
+
/**
|
|
216
|
+
* How the component applies its color.
|
|
217
|
+
* @default "solid"
|
|
218
|
+
*/
|
|
219
|
+
variant?: "solid" | "soft" | "surface" | "outline" | "ghost";
|
|
220
|
+
/**
|
|
221
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
222
|
+
*/
|
|
223
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
224
|
+
/**
|
|
225
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
226
|
+
* @default false
|
|
227
|
+
*/
|
|
228
|
+
highContrast?: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Overrides the theme's corner radius for this component.
|
|
231
|
+
*/
|
|
232
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
233
|
+
/**
|
|
234
|
+
* Shows a spinner over the content, keeping the width, and disables the button.
|
|
235
|
+
* @default false
|
|
236
|
+
*/
|
|
237
|
+
loading?: boolean;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface CalloutOwnProps {
|
|
241
|
+
/**
|
|
242
|
+
* Padding, gap and type step of the callout: compact, standard, roomy.
|
|
243
|
+
* @default "2"
|
|
244
|
+
*/
|
|
245
|
+
size?: "1" | "2" | "3";
|
|
246
|
+
/**
|
|
247
|
+
* How the component applies its color.
|
|
248
|
+
* @default "soft"
|
|
249
|
+
*/
|
|
250
|
+
variant?: "soft" | "surface" | "outline";
|
|
251
|
+
/**
|
|
252
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
253
|
+
*/
|
|
254
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
255
|
+
/**
|
|
256
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
257
|
+
* @default false
|
|
258
|
+
*/
|
|
259
|
+
highContrast?: boolean;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export interface CardOwnProps {
|
|
263
|
+
/**
|
|
264
|
+
* Padding: 1 is 8px, 2 12px, 3 16px, 4 24px, 5 32px.
|
|
265
|
+
* @default "2"
|
|
266
|
+
*/
|
|
267
|
+
size?: "1" | "2" | "3" | "4" | "5";
|
|
268
|
+
/**
|
|
269
|
+
* How the component applies its color.
|
|
270
|
+
* @default "surface"
|
|
271
|
+
*/
|
|
272
|
+
variant?: "surface" | "ghost";
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export interface CheckboxCardsOwnProps {
|
|
276
|
+
/**
|
|
277
|
+
* Padding and type step of each card.
|
|
278
|
+
* @default "2"
|
|
279
|
+
*/
|
|
280
|
+
size?: "1" | "2" | "3";
|
|
281
|
+
/**
|
|
282
|
+
* How the component applies its color.
|
|
283
|
+
* @default "surface"
|
|
284
|
+
*/
|
|
285
|
+
variant?: "surface" | "soft";
|
|
286
|
+
/**
|
|
287
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
288
|
+
*/
|
|
289
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
290
|
+
/**
|
|
291
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
292
|
+
* @default false
|
|
293
|
+
*/
|
|
294
|
+
highContrast?: boolean;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export interface CheckboxGroupOwnProps {
|
|
298
|
+
/**
|
|
299
|
+
* Box: 1 is 12px, 2 is 16px, 3 is 20px.
|
|
300
|
+
* @default "2"
|
|
301
|
+
*/
|
|
302
|
+
size?: "1" | "2" | "3";
|
|
303
|
+
/**
|
|
304
|
+
* How the component applies its color.
|
|
305
|
+
* @default "surface"
|
|
306
|
+
*/
|
|
307
|
+
variant?: "surface" | "soft";
|
|
308
|
+
/**
|
|
309
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
310
|
+
*/
|
|
311
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
312
|
+
/**
|
|
313
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
314
|
+
* @default false
|
|
315
|
+
*/
|
|
316
|
+
highContrast?: boolean;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export interface CheckboxOwnProps {
|
|
320
|
+
/**
|
|
321
|
+
* Box: 1 is 12px, 2 is 16px, 3 is 20px.
|
|
322
|
+
* @default "2"
|
|
323
|
+
*/
|
|
324
|
+
size?: "1" | "2" | "3";
|
|
325
|
+
/**
|
|
326
|
+
* How the component applies its color.
|
|
327
|
+
* @default "surface"
|
|
328
|
+
*/
|
|
329
|
+
variant?: "surface" | "soft";
|
|
330
|
+
/**
|
|
331
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
332
|
+
*/
|
|
333
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
334
|
+
/**
|
|
335
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
336
|
+
* @default false
|
|
337
|
+
*/
|
|
338
|
+
highContrast?: boolean;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export interface CodeOwnProps {
|
|
342
|
+
/**
|
|
343
|
+
* A step of the type scale; unset, it follows the surrounding text.
|
|
344
|
+
*/
|
|
345
|
+
size?: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
|
|
346
|
+
/**
|
|
347
|
+
* How the component applies its color.
|
|
348
|
+
* @default "soft"
|
|
349
|
+
*/
|
|
350
|
+
variant?: "solid" | "soft" | "outline" | "ghost";
|
|
351
|
+
/**
|
|
352
|
+
* Font weight, one of the weight tokens.
|
|
353
|
+
*/
|
|
354
|
+
weight?: "light" | "regular" | "medium" | "semibold" | "bold";
|
|
355
|
+
/**
|
|
356
|
+
* Truncates to one line with an ellipsis.
|
|
357
|
+
* @default false
|
|
358
|
+
*/
|
|
359
|
+
truncate?: boolean;
|
|
360
|
+
/**
|
|
361
|
+
* How lines break: `pretty` avoids orphans, `balance` evens line lengths.
|
|
362
|
+
*/
|
|
363
|
+
wrap?: "wrap" | "nowrap" | "pretty" | "balance";
|
|
364
|
+
/**
|
|
365
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
366
|
+
*/
|
|
367
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
368
|
+
/**
|
|
369
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
370
|
+
* @default false
|
|
371
|
+
*/
|
|
372
|
+
highContrast?: boolean;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface ComboboxPopupOwnProps {
|
|
376
|
+
/**
|
|
377
|
+
* How the component applies its color.
|
|
378
|
+
* @default "soft"
|
|
379
|
+
*/
|
|
380
|
+
variant?: "solid" | "soft";
|
|
381
|
+
/**
|
|
382
|
+
* The scale the highlighted row draws from; gray unless set.
|
|
383
|
+
* @default "gray"
|
|
384
|
+
*/
|
|
385
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
386
|
+
/**
|
|
387
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
388
|
+
* @default false
|
|
389
|
+
*/
|
|
390
|
+
highContrast?: boolean;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export interface ComboboxOwnProps {
|
|
394
|
+
/**
|
|
395
|
+
* Control height: 1 is 16px, 2 is 20px, 3 is 24px, 4 is 32px.
|
|
396
|
+
* @default "3"
|
|
397
|
+
*/
|
|
398
|
+
size?: "1" | "2" | "3" | "4";
|
|
399
|
+
/**
|
|
400
|
+
* How the component applies its color.
|
|
401
|
+
* @default "surface"
|
|
402
|
+
*/
|
|
403
|
+
variant?: "surface" | "soft";
|
|
404
|
+
/**
|
|
405
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
406
|
+
*/
|
|
407
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
408
|
+
/**
|
|
409
|
+
* Overrides the theme's corner radius for this component.
|
|
410
|
+
*/
|
|
411
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export interface ContextMenuContentOwnProps {
|
|
415
|
+
/**
|
|
416
|
+
* Row height: 2 is 20px, 3 is 24px.
|
|
417
|
+
* @default "3"
|
|
418
|
+
*/
|
|
419
|
+
size?: "2" | "3";
|
|
420
|
+
/**
|
|
421
|
+
* How the component applies its color.
|
|
422
|
+
* @default "soft"
|
|
423
|
+
*/
|
|
424
|
+
variant?: "solid" | "soft";
|
|
425
|
+
/**
|
|
426
|
+
* The scale the highlighted row draws from; gray unless set.
|
|
427
|
+
* @default "gray"
|
|
428
|
+
*/
|
|
429
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
430
|
+
/**
|
|
431
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
432
|
+
* @default false
|
|
433
|
+
*/
|
|
434
|
+
highContrast?: boolean;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export interface ContextMenuItemOwnProps {
|
|
438
|
+
/**
|
|
439
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
440
|
+
*/
|
|
441
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export interface DataListOwnProps {
|
|
445
|
+
/**
|
|
446
|
+
* Labels beside their values, or above them.
|
|
447
|
+
* @default "horizontal"
|
|
448
|
+
*/
|
|
449
|
+
orientation?: "horizontal" | "vertical";
|
|
450
|
+
/**
|
|
451
|
+
* Type step and spacing of the rows.
|
|
452
|
+
* @default "2"
|
|
453
|
+
*/
|
|
454
|
+
size?: "1" | "2" | "3";
|
|
455
|
+
/**
|
|
456
|
+
* Trims the leading of the first and last rows.
|
|
457
|
+
*/
|
|
458
|
+
trim?: "normal" | "start" | "end" | "both";
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export interface DialogContentOwnProps {
|
|
462
|
+
/**
|
|
463
|
+
* Padding and type step of the popup, as in Radix Themes.
|
|
464
|
+
* @default "3"
|
|
465
|
+
*/
|
|
466
|
+
size?: "1" | "2" | "3" | "4";
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export interface DrawerOwnProps {
|
|
470
|
+
/**
|
|
471
|
+
* The edge the drawer slides in from.
|
|
472
|
+
* @default "bottom"
|
|
473
|
+
*/
|
|
474
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export interface EmOwnProps {
|
|
478
|
+
/**
|
|
479
|
+
* Truncates to one line with an ellipsis.
|
|
480
|
+
* @default false
|
|
481
|
+
*/
|
|
482
|
+
truncate?: boolean;
|
|
483
|
+
/**
|
|
484
|
+
* How lines break: `pretty` avoids orphans, `balance` evens line lengths.
|
|
485
|
+
*/
|
|
486
|
+
wrap?: "wrap" | "nowrap" | "pretty" | "balance";
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export interface HeadingOwnProps {
|
|
490
|
+
/**
|
|
491
|
+
* The heading level it renders.
|
|
492
|
+
* @default "h1"
|
|
493
|
+
*/
|
|
494
|
+
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
495
|
+
/**
|
|
496
|
+
* A step of the type scale.
|
|
497
|
+
* @default "6"
|
|
498
|
+
*/
|
|
499
|
+
size?: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
|
|
500
|
+
/**
|
|
501
|
+
* Font weight, one of the weight tokens.
|
|
502
|
+
*/
|
|
503
|
+
weight?: "light" | "regular" | "medium" | "semibold" | "bold";
|
|
504
|
+
/**
|
|
505
|
+
* Text alignment.
|
|
506
|
+
*/
|
|
507
|
+
align?: "left" | "center" | "right";
|
|
508
|
+
/**
|
|
509
|
+
* Trims the leading above the first line, below the last, or both, so text sits flush with its box.
|
|
510
|
+
*/
|
|
511
|
+
trim?: "normal" | "start" | "end" | "both";
|
|
512
|
+
/**
|
|
513
|
+
* Truncates to one line with an ellipsis.
|
|
514
|
+
* @default false
|
|
515
|
+
*/
|
|
516
|
+
truncate?: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* How lines break: `pretty` avoids orphans, `balance` evens line lengths.
|
|
519
|
+
*/
|
|
520
|
+
wrap?: "wrap" | "nowrap" | "pretty" | "balance";
|
|
521
|
+
/**
|
|
522
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
523
|
+
*/
|
|
524
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
525
|
+
/**
|
|
526
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
527
|
+
* @default false
|
|
528
|
+
*/
|
|
529
|
+
highContrast?: boolean;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export interface IconButtonOwnProps {
|
|
533
|
+
/**
|
|
534
|
+
* Control height: 1 is 16px, 2 is 20px, 3 is 24px, 4 is 32px.
|
|
535
|
+
* @default "3"
|
|
536
|
+
*/
|
|
537
|
+
size?: "1" | "2" | "3" | "4";
|
|
538
|
+
/**
|
|
539
|
+
* How the component applies its color.
|
|
540
|
+
* @default "solid"
|
|
541
|
+
*/
|
|
542
|
+
variant?: "solid" | "soft" | "surface" | "outline" | "ghost";
|
|
543
|
+
/**
|
|
544
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
545
|
+
*/
|
|
546
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
547
|
+
/**
|
|
548
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
549
|
+
* @default false
|
|
550
|
+
*/
|
|
551
|
+
highContrast?: boolean;
|
|
552
|
+
/**
|
|
553
|
+
* Overrides the theme's corner radius for this component.
|
|
554
|
+
*/
|
|
555
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
556
|
+
/**
|
|
557
|
+
* Shows a spinner over the content, keeping the width, and disables the button.
|
|
558
|
+
* @default false
|
|
559
|
+
*/
|
|
560
|
+
loading?: boolean;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export interface InputOwnProps {
|
|
564
|
+
/**
|
|
565
|
+
* Control height: 1 is 16px, 2 is 20px, 3 is 24px, 4 is 32px.
|
|
566
|
+
* @default "3"
|
|
567
|
+
*/
|
|
568
|
+
size?: "1" | "2" | "3" | "4";
|
|
569
|
+
/**
|
|
570
|
+
* How the component applies its color.
|
|
571
|
+
* @default "surface"
|
|
572
|
+
*/
|
|
573
|
+
variant?: "surface" | "soft";
|
|
574
|
+
/**
|
|
575
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
576
|
+
*/
|
|
577
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
578
|
+
/**
|
|
579
|
+
* Overrides the theme's corner radius for this component.
|
|
580
|
+
*/
|
|
581
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
export interface InputSlotOwnProps {
|
|
585
|
+
/**
|
|
586
|
+
* The side it sits on; unset, the first slot goes left and the next right.
|
|
587
|
+
*/
|
|
588
|
+
side?: "left" | "right";
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
export interface InsetOwnProps {
|
|
592
|
+
/**
|
|
593
|
+
* The edges it pulls out to.
|
|
594
|
+
* @default "all"
|
|
595
|
+
*/
|
|
596
|
+
side?: "all" | "x" | "y" | "top" | "bottom" | "left" | "right";
|
|
597
|
+
/**
|
|
598
|
+
* Clips its content to the card's border or its padding.
|
|
599
|
+
* @default "border-box"
|
|
600
|
+
*/
|
|
601
|
+
clip?: "border-box" | "padding-box";
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export interface ItemGroupOwnProps {
|
|
605
|
+
/**
|
|
606
|
+
* How the component applies its color.
|
|
607
|
+
* @default "ghost"
|
|
608
|
+
*/
|
|
609
|
+
variant?: "ghost" | "outline";
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
export interface ItemMediaOwnProps {
|
|
613
|
+
/**
|
|
614
|
+
* Sets an icon in a framed tile; unframed media, an Avatar, stays as it is.
|
|
615
|
+
* @default false
|
|
616
|
+
*/
|
|
617
|
+
framed?: boolean;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
export interface ItemOwnProps {
|
|
621
|
+
/**
|
|
622
|
+
* Padding: 1 is the compact row, 2 the standard one.
|
|
623
|
+
* @default "2"
|
|
624
|
+
*/
|
|
625
|
+
size?: "1" | "2";
|
|
626
|
+
/**
|
|
627
|
+
* How the component applies its color.
|
|
628
|
+
* @default "ghost"
|
|
629
|
+
*/
|
|
630
|
+
variant?: "ghost" | "outline" | "soft";
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
export interface KbdOwnProps {
|
|
634
|
+
/**
|
|
635
|
+
* A step of the type scale; unset, it follows the surrounding text.
|
|
636
|
+
*/
|
|
637
|
+
size?: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
|
|
638
|
+
/**
|
|
639
|
+
* How the component applies its color.
|
|
640
|
+
* @default "surface"
|
|
641
|
+
*/
|
|
642
|
+
variant?: "surface" | "soft";
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
export interface LinkOwnProps {
|
|
646
|
+
/**
|
|
647
|
+
* A step of the type scale; unset, it follows the surrounding text.
|
|
648
|
+
*/
|
|
649
|
+
size?: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
|
|
650
|
+
/**
|
|
651
|
+
* When the underline shows; `auto` shows it on hover, and always in high contrast.
|
|
652
|
+
* @default "auto"
|
|
653
|
+
*/
|
|
654
|
+
underline?: "auto" | "always" | "hover" | "none";
|
|
655
|
+
/**
|
|
656
|
+
* Font weight, one of the weight tokens.
|
|
657
|
+
*/
|
|
658
|
+
weight?: "light" | "regular" | "medium" | "semibold" | "bold";
|
|
659
|
+
/**
|
|
660
|
+
* Trims the leading above the first line, below the last, or both, so text sits flush with its box.
|
|
661
|
+
*/
|
|
662
|
+
trim?: "normal" | "start" | "end" | "both";
|
|
663
|
+
/**
|
|
664
|
+
* Truncates to one line with an ellipsis.
|
|
665
|
+
* @default false
|
|
666
|
+
*/
|
|
667
|
+
truncate?: boolean;
|
|
668
|
+
/**
|
|
669
|
+
* How lines break: `pretty` avoids orphans, `balance` evens line lengths.
|
|
670
|
+
*/
|
|
671
|
+
wrap?: "wrap" | "nowrap" | "pretty" | "balance";
|
|
672
|
+
/**
|
|
673
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
674
|
+
*/
|
|
675
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
676
|
+
/**
|
|
677
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
678
|
+
* @default false
|
|
679
|
+
*/
|
|
680
|
+
highContrast?: boolean;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
export interface MenubarContentOwnProps {
|
|
684
|
+
/**
|
|
685
|
+
* Row height: 2 is 20px, 3 is 24px.
|
|
686
|
+
* @default "3"
|
|
687
|
+
*/
|
|
688
|
+
size?: "2" | "3";
|
|
689
|
+
/**
|
|
690
|
+
* How the component applies its color.
|
|
691
|
+
* @default "soft"
|
|
692
|
+
*/
|
|
693
|
+
variant?: "solid" | "soft";
|
|
694
|
+
/**
|
|
695
|
+
* The scale the highlighted row draws from; gray unless set.
|
|
696
|
+
* @default "gray"
|
|
697
|
+
*/
|
|
698
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
699
|
+
/**
|
|
700
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
701
|
+
* @default false
|
|
702
|
+
*/
|
|
703
|
+
highContrast?: boolean;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export interface MenubarItemOwnProps {
|
|
707
|
+
/**
|
|
708
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
709
|
+
*/
|
|
710
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
export interface MenuContentOwnProps {
|
|
714
|
+
/**
|
|
715
|
+
* Row height: 2 is 20px, 3 is 24px.
|
|
716
|
+
* @default "3"
|
|
717
|
+
*/
|
|
718
|
+
size?: "2" | "3";
|
|
719
|
+
/**
|
|
720
|
+
* How the component applies its color.
|
|
721
|
+
* @default "soft"
|
|
722
|
+
*/
|
|
723
|
+
variant?: "solid" | "soft";
|
|
724
|
+
/**
|
|
725
|
+
* The scale the highlighted row draws from; gray unless set.
|
|
726
|
+
* @default "gray"
|
|
727
|
+
*/
|
|
728
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
729
|
+
/**
|
|
730
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
731
|
+
* @default false
|
|
732
|
+
*/
|
|
733
|
+
highContrast?: boolean;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
export interface MenuItemOwnProps {
|
|
737
|
+
/**
|
|
738
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
739
|
+
*/
|
|
740
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
export interface MeterOwnProps {
|
|
744
|
+
/**
|
|
745
|
+
* Track thickness: 1 is 4px, 2 is 6px, 3 is 8px.
|
|
746
|
+
* @default "2"
|
|
747
|
+
*/
|
|
748
|
+
size?: "1" | "2" | "3";
|
|
749
|
+
/**
|
|
750
|
+
* How the component applies its color.
|
|
751
|
+
* @default "surface"
|
|
752
|
+
*/
|
|
753
|
+
variant?: "surface" | "soft";
|
|
754
|
+
/**
|
|
755
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
756
|
+
*/
|
|
757
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
758
|
+
/**
|
|
759
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
760
|
+
* @default false
|
|
761
|
+
*/
|
|
762
|
+
highContrast?: boolean;
|
|
763
|
+
/**
|
|
764
|
+
* Overrides the theme's corner radius for this component.
|
|
765
|
+
*/
|
|
766
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
export interface NumberFieldOwnProps {
|
|
770
|
+
/**
|
|
771
|
+
* Control height: 1 is 16px, 2 is 20px, 3 is 24px, 4 is 32px.
|
|
772
|
+
* @default "3"
|
|
773
|
+
*/
|
|
774
|
+
size?: "1" | "2" | "3" | "4";
|
|
775
|
+
/**
|
|
776
|
+
* How the component applies its color.
|
|
777
|
+
* @default "surface"
|
|
778
|
+
*/
|
|
779
|
+
variant?: "surface" | "soft";
|
|
780
|
+
/**
|
|
781
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
782
|
+
*/
|
|
783
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
784
|
+
/**
|
|
785
|
+
* Overrides the theme's corner radius for this component.
|
|
786
|
+
*/
|
|
787
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
export interface OtpFieldOwnProps {
|
|
791
|
+
/**
|
|
792
|
+
* Control height: 1 is 16px, 2 is 20px, 3 is 24px, 4 is 32px.
|
|
793
|
+
* @default "4"
|
|
794
|
+
*/
|
|
795
|
+
size?: "1" | "2" | "3" | "4";
|
|
796
|
+
/**
|
|
797
|
+
* How the component applies its color.
|
|
798
|
+
* @default "surface"
|
|
799
|
+
*/
|
|
800
|
+
variant?: "surface" | "soft";
|
|
801
|
+
/**
|
|
802
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
803
|
+
*/
|
|
804
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
805
|
+
/**
|
|
806
|
+
* Overrides the theme's corner radius for this component.
|
|
807
|
+
*/
|
|
808
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
export interface PopoverContentOwnProps {
|
|
812
|
+
/**
|
|
813
|
+
* Padding and type step of the popup, as in Radix Themes.
|
|
814
|
+
* @default "2"
|
|
815
|
+
*/
|
|
816
|
+
size?: "1" | "2" | "3" | "4";
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
export interface PreviewCardContentOwnProps {
|
|
820
|
+
/**
|
|
821
|
+
* Padding and type step of the popup, as in Radix Themes.
|
|
822
|
+
* @default "2"
|
|
823
|
+
*/
|
|
824
|
+
size?: "1" | "2" | "3";
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
export interface ProgressOwnProps {
|
|
828
|
+
/**
|
|
829
|
+
* Track thickness: 1 is 4px, 2 is 6px, 3 is 8px.
|
|
830
|
+
* @default "2"
|
|
831
|
+
*/
|
|
832
|
+
size?: "1" | "2" | "3";
|
|
833
|
+
/**
|
|
834
|
+
* How the component applies its color.
|
|
835
|
+
* @default "surface"
|
|
836
|
+
*/
|
|
837
|
+
variant?: "surface" | "soft";
|
|
838
|
+
/**
|
|
839
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
840
|
+
*/
|
|
841
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
842
|
+
/**
|
|
843
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
844
|
+
* @default false
|
|
845
|
+
*/
|
|
846
|
+
highContrast?: boolean;
|
|
847
|
+
/**
|
|
848
|
+
* Overrides the theme's corner radius for this component.
|
|
849
|
+
*/
|
|
850
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
export interface QuoteOwnProps {
|
|
854
|
+
/**
|
|
855
|
+
* Truncates to one line with an ellipsis.
|
|
856
|
+
* @default false
|
|
857
|
+
*/
|
|
858
|
+
truncate?: boolean;
|
|
859
|
+
/**
|
|
860
|
+
* How lines break: `pretty` avoids orphans, `balance` evens line lengths.
|
|
861
|
+
*/
|
|
862
|
+
wrap?: "wrap" | "nowrap" | "pretty" | "balance";
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
export interface RadioCardsOwnProps {
|
|
866
|
+
/**
|
|
867
|
+
* Padding and type step of each card.
|
|
868
|
+
* @default "2"
|
|
869
|
+
*/
|
|
870
|
+
size?: "1" | "2" | "3";
|
|
871
|
+
/**
|
|
872
|
+
* How the component applies its color.
|
|
873
|
+
* @default "surface"
|
|
874
|
+
*/
|
|
875
|
+
variant?: "surface" | "soft";
|
|
876
|
+
/**
|
|
877
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
878
|
+
*/
|
|
879
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
880
|
+
/**
|
|
881
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
882
|
+
* @default false
|
|
883
|
+
*/
|
|
884
|
+
highContrast?: boolean;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
export interface RadioGroupOwnProps {
|
|
888
|
+
/**
|
|
889
|
+
* Box: 1 is 12px, 2 is 16px, 3 is 20px.
|
|
890
|
+
* @default "2"
|
|
891
|
+
*/
|
|
892
|
+
size?: "1" | "2" | "3";
|
|
893
|
+
/**
|
|
894
|
+
* How the component applies its color.
|
|
895
|
+
* @default "surface"
|
|
896
|
+
*/
|
|
897
|
+
variant?: "surface" | "soft";
|
|
898
|
+
/**
|
|
899
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
900
|
+
*/
|
|
901
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
902
|
+
/**
|
|
903
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
904
|
+
* @default false
|
|
905
|
+
*/
|
|
906
|
+
highContrast?: boolean;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
export interface ScrollAreaOwnProps {
|
|
910
|
+
/**
|
|
911
|
+
* Scrollbar thickness: 1 is 4px, 2 is 8px, 3 is 12px.
|
|
912
|
+
* @default "1"
|
|
913
|
+
*/
|
|
914
|
+
size?: "1" | "2" | "3";
|
|
915
|
+
/**
|
|
916
|
+
* Overrides the theme's corner radius for this component.
|
|
917
|
+
*/
|
|
918
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
919
|
+
/**
|
|
920
|
+
* Which scrollbars it draws.
|
|
921
|
+
* @default "both"
|
|
922
|
+
*/
|
|
923
|
+
scrollbars?: "vertical" | "horizontal" | "both";
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
export interface SegmentedControlOwnProps {
|
|
927
|
+
/**
|
|
928
|
+
* Control height: 2 is 20px, 3 is 24px, 4 is 32px.
|
|
929
|
+
* @default "3"
|
|
930
|
+
*/
|
|
931
|
+
size?: "2" | "3" | "4";
|
|
932
|
+
/**
|
|
933
|
+
* How the component applies its color.
|
|
934
|
+
* @default "surface"
|
|
935
|
+
*/
|
|
936
|
+
variant?: "surface" | "soft";
|
|
937
|
+
/**
|
|
938
|
+
* Overrides the theme's corner radius for this component.
|
|
939
|
+
*/
|
|
940
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
export interface SelectContentOwnProps {
|
|
944
|
+
/**
|
|
945
|
+
* How the component applies its color.
|
|
946
|
+
* @default "soft"
|
|
947
|
+
*/
|
|
948
|
+
variant?: "solid" | "soft";
|
|
949
|
+
/**
|
|
950
|
+
* The scale the highlighted row draws from; gray unless set.
|
|
951
|
+
* @default "gray"
|
|
952
|
+
*/
|
|
953
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
954
|
+
/**
|
|
955
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
956
|
+
* @default false
|
|
957
|
+
*/
|
|
958
|
+
highContrast?: boolean;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
export interface SelectRootOwnProps {
|
|
962
|
+
/**
|
|
963
|
+
* Control height: 1 is 16px, 2 is 20px, 3 is 24px, 4 is 32px.
|
|
964
|
+
* @default "3"
|
|
965
|
+
*/
|
|
966
|
+
size?: "1" | "2" | "3" | "4";
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
export interface SelectTriggerOwnProps {
|
|
970
|
+
/**
|
|
971
|
+
* How the component applies its color.
|
|
972
|
+
* @default "surface"
|
|
973
|
+
*/
|
|
974
|
+
variant?: "surface" | "soft" | "ghost";
|
|
975
|
+
/**
|
|
976
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
977
|
+
*/
|
|
978
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
979
|
+
/**
|
|
980
|
+
* Overrides the theme's corner radius for this component.
|
|
981
|
+
*/
|
|
982
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
export interface SeparatorOwnProps {
|
|
986
|
+
/**
|
|
987
|
+
* Length: 1 is 16px, 2 is 32px, 3 is 64px, 4 is the full length.
|
|
988
|
+
* @default "4"
|
|
989
|
+
*/
|
|
990
|
+
size?: "1" | "2" | "3" | "4";
|
|
991
|
+
/**
|
|
992
|
+
* The scale the line draws from; gray unless set.
|
|
993
|
+
* @default "gray"
|
|
994
|
+
*/
|
|
995
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
export interface SkeletonOwnProps {
|
|
999
|
+
/**
|
|
1000
|
+
* While false, renders its children in place of the skeleton, as Radix Themes does.
|
|
1001
|
+
* @default true
|
|
1002
|
+
*/
|
|
1003
|
+
loading?: boolean;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
export interface SliderOwnProps {
|
|
1007
|
+
/**
|
|
1008
|
+
* Track thickness: 1 is 4px, 2 is 6px, 3 is 8px.
|
|
1009
|
+
* @default "2"
|
|
1010
|
+
*/
|
|
1011
|
+
size?: "1" | "2" | "3";
|
|
1012
|
+
/**
|
|
1013
|
+
* How the component applies its color.
|
|
1014
|
+
* @default "surface"
|
|
1015
|
+
*/
|
|
1016
|
+
variant?: "surface" | "soft";
|
|
1017
|
+
/**
|
|
1018
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
1019
|
+
*/
|
|
1020
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
1021
|
+
/**
|
|
1022
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
1023
|
+
* @default false
|
|
1024
|
+
*/
|
|
1025
|
+
highContrast?: boolean;
|
|
1026
|
+
/**
|
|
1027
|
+
* Overrides the theme's corner radius for this component.
|
|
1028
|
+
*/
|
|
1029
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
export interface SpinnerOwnProps {
|
|
1033
|
+
/**
|
|
1034
|
+
* Diameter: 1 is 12px, 2 is 16px, 3 is 20px.
|
|
1035
|
+
* @default "2"
|
|
1036
|
+
*/
|
|
1037
|
+
size?: "1" | "2" | "3";
|
|
1038
|
+
/**
|
|
1039
|
+
* While false, renders its children in place of the spinner, as Radix Themes does.
|
|
1040
|
+
* @default true
|
|
1041
|
+
*/
|
|
1042
|
+
loading?: boolean;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
export interface StrongOwnProps {
|
|
1046
|
+
/**
|
|
1047
|
+
* Truncates to one line with an ellipsis.
|
|
1048
|
+
* @default false
|
|
1049
|
+
*/
|
|
1050
|
+
truncate?: boolean;
|
|
1051
|
+
/**
|
|
1052
|
+
* How lines break: `pretty` avoids orphans, `balance` evens line lengths.
|
|
1053
|
+
*/
|
|
1054
|
+
wrap?: "wrap" | "nowrap" | "pretty" | "balance";
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
export interface SwitchOwnProps {
|
|
1058
|
+
/**
|
|
1059
|
+
* Track height: 1 is 12px, 2 is 16px, 3 is 20px.
|
|
1060
|
+
* @default "2"
|
|
1061
|
+
*/
|
|
1062
|
+
size?: "1" | "2" | "3";
|
|
1063
|
+
/**
|
|
1064
|
+
* How the component applies its color.
|
|
1065
|
+
* @default "surface"
|
|
1066
|
+
*/
|
|
1067
|
+
variant?: "surface" | "soft";
|
|
1068
|
+
/**
|
|
1069
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
1070
|
+
*/
|
|
1071
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
1072
|
+
/**
|
|
1073
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
1074
|
+
* @default false
|
|
1075
|
+
*/
|
|
1076
|
+
highContrast?: boolean;
|
|
1077
|
+
/**
|
|
1078
|
+
* Overrides the theme's corner radius for this component.
|
|
1079
|
+
*/
|
|
1080
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
export interface TableCellOwnProps {
|
|
1084
|
+
/**
|
|
1085
|
+
* Where the cell's content sits along the row.
|
|
1086
|
+
* @default "start"
|
|
1087
|
+
*/
|
|
1088
|
+
justify?: "start" | "center" | "end";
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
export interface TableOwnProps {
|
|
1092
|
+
/**
|
|
1093
|
+
* Cell padding: compact, standard, roomy.
|
|
1094
|
+
* @default "2"
|
|
1095
|
+
*/
|
|
1096
|
+
size?: "1" | "2" | "3";
|
|
1097
|
+
/**
|
|
1098
|
+
* How the component applies its color.
|
|
1099
|
+
* @default "ghost"
|
|
1100
|
+
*/
|
|
1101
|
+
variant?: "surface" | "ghost";
|
|
1102
|
+
/**
|
|
1103
|
+
* The table's column layout algorithm.
|
|
1104
|
+
* @default "auto"
|
|
1105
|
+
*/
|
|
1106
|
+
layout?: "auto" | "fixed";
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
export interface TableRowOwnProps {
|
|
1110
|
+
/**
|
|
1111
|
+
* Where the row's cells sit vertically.
|
|
1112
|
+
* @default "start"
|
|
1113
|
+
*/
|
|
1114
|
+
align?: "start" | "center" | "end" | "baseline";
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
export interface TabNavOwnProps {
|
|
1118
|
+
/**
|
|
1119
|
+
* Link height: 1 is 24px, 2 is 32px.
|
|
1120
|
+
* @default "2"
|
|
1121
|
+
*/
|
|
1122
|
+
size?: "1" | "2";
|
|
1123
|
+
/**
|
|
1124
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
1125
|
+
*/
|
|
1126
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
1127
|
+
/**
|
|
1128
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
1129
|
+
* @default false
|
|
1130
|
+
*/
|
|
1131
|
+
highContrast?: boolean;
|
|
1132
|
+
/**
|
|
1133
|
+
* Where the links sit along the row.
|
|
1134
|
+
* @default "start"
|
|
1135
|
+
*/
|
|
1136
|
+
justify?: "start" | "center" | "end";
|
|
1137
|
+
/**
|
|
1138
|
+
* Whether the links wrap onto more rows.
|
|
1139
|
+
* @default "nowrap"
|
|
1140
|
+
*/
|
|
1141
|
+
wrap?: "nowrap" | "wrap" | "wrap-reverse";
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
export interface TabsListOwnProps {
|
|
1145
|
+
/**
|
|
1146
|
+
* Trigger height: 1 is 24px, 2 is 32px.
|
|
1147
|
+
* @default "2"
|
|
1148
|
+
*/
|
|
1149
|
+
size?: "1" | "2";
|
|
1150
|
+
/**
|
|
1151
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
1152
|
+
*/
|
|
1153
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
1154
|
+
/**
|
|
1155
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
1156
|
+
* @default false
|
|
1157
|
+
*/
|
|
1158
|
+
highContrast?: boolean;
|
|
1159
|
+
/**
|
|
1160
|
+
* Where the triggers sit along the list.
|
|
1161
|
+
* @default "start"
|
|
1162
|
+
*/
|
|
1163
|
+
justify?: "start" | "center" | "end";
|
|
1164
|
+
/**
|
|
1165
|
+
* Whether the triggers wrap onto more rows.
|
|
1166
|
+
* @default "nowrap"
|
|
1167
|
+
*/
|
|
1168
|
+
wrap?: "nowrap" | "wrap" | "wrap-reverse";
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
export interface TextAreaOwnProps {
|
|
1172
|
+
/**
|
|
1173
|
+
* The height of the Input it matches, which sets its padding and type: 1 is 16px, 2 is 20px, 3 is 24px, 4 is 32px.
|
|
1174
|
+
* @default "3"
|
|
1175
|
+
*/
|
|
1176
|
+
size?: "1" | "2" | "3" | "4";
|
|
1177
|
+
/**
|
|
1178
|
+
* How the component applies its color.
|
|
1179
|
+
* @default "surface"
|
|
1180
|
+
*/
|
|
1181
|
+
variant?: "surface" | "soft";
|
|
1182
|
+
/**
|
|
1183
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
1184
|
+
*/
|
|
1185
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
1186
|
+
/**
|
|
1187
|
+
* Overrides the theme's corner radius for this component.
|
|
1188
|
+
*/
|
|
1189
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
1190
|
+
/**
|
|
1191
|
+
* Which way the reader can resize it.
|
|
1192
|
+
* @default "vertical"
|
|
1193
|
+
*/
|
|
1194
|
+
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
export interface TextComponentOwnProps {
|
|
1198
|
+
/**
|
|
1199
|
+
* The element it renders.
|
|
1200
|
+
* @default "span"
|
|
1201
|
+
*/
|
|
1202
|
+
as?: "span" | "div" | "label" | "p";
|
|
1203
|
+
/**
|
|
1204
|
+
* A step of the type scale; unset, it inherits.
|
|
1205
|
+
*/
|
|
1206
|
+
size?: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
|
|
1207
|
+
/**
|
|
1208
|
+
* Font weight, one of the weight tokens.
|
|
1209
|
+
*/
|
|
1210
|
+
weight?: "light" | "regular" | "medium" | "semibold" | "bold";
|
|
1211
|
+
/**
|
|
1212
|
+
* Text alignment.
|
|
1213
|
+
*/
|
|
1214
|
+
align?: "left" | "center" | "right";
|
|
1215
|
+
/**
|
|
1216
|
+
* Trims the leading above the first line, below the last, or both, so text sits flush with its box.
|
|
1217
|
+
*/
|
|
1218
|
+
trim?: "normal" | "start" | "end" | "both";
|
|
1219
|
+
/**
|
|
1220
|
+
* Truncates to one line with an ellipsis.
|
|
1221
|
+
* @default false
|
|
1222
|
+
*/
|
|
1223
|
+
truncate?: boolean;
|
|
1224
|
+
/**
|
|
1225
|
+
* How lines break: `pretty` avoids orphans, `balance` evens line lengths.
|
|
1226
|
+
*/
|
|
1227
|
+
wrap?: "wrap" | "nowrap" | "pretty" | "balance";
|
|
1228
|
+
/**
|
|
1229
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
1230
|
+
*/
|
|
1231
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
1232
|
+
/**
|
|
1233
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
1234
|
+
* @default false
|
|
1235
|
+
*/
|
|
1236
|
+
highContrast?: boolean;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
export interface ToastOwnProps {
|
|
1240
|
+
/**
|
|
1241
|
+
* How the component applies its color.
|
|
1242
|
+
* @default "surface"
|
|
1243
|
+
*/
|
|
1244
|
+
variant?: "surface" | "soft" | "solid";
|
|
1245
|
+
/**
|
|
1246
|
+
* The status the toast reports; gray unless set.
|
|
1247
|
+
* @default "gray"
|
|
1248
|
+
*/
|
|
1249
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
1250
|
+
/**
|
|
1251
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
1252
|
+
* @default false
|
|
1253
|
+
*/
|
|
1254
|
+
highContrast?: boolean;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
export interface ToggleGroupOwnProps {
|
|
1258
|
+
/**
|
|
1259
|
+
* Control height: 1 is 16px, 2 is 20px, 3 is 24px, 4 is 32px.
|
|
1260
|
+
* @default "3"
|
|
1261
|
+
*/
|
|
1262
|
+
size?: "1" | "2" | "3" | "4";
|
|
1263
|
+
/**
|
|
1264
|
+
* How the component applies its color.
|
|
1265
|
+
* @default "ghost"
|
|
1266
|
+
*/
|
|
1267
|
+
variant?: "ghost" | "soft" | "surface" | "outline";
|
|
1268
|
+
/**
|
|
1269
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
1270
|
+
*/
|
|
1271
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
1272
|
+
/**
|
|
1273
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
1274
|
+
* @default false
|
|
1275
|
+
*/
|
|
1276
|
+
highContrast?: boolean;
|
|
1277
|
+
/**
|
|
1278
|
+
* Overrides the theme's corner radius for this component.
|
|
1279
|
+
*/
|
|
1280
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
export interface ToggleOwnProps {
|
|
1284
|
+
/**
|
|
1285
|
+
* Control height: 1 is 16px, 2 is 20px, 3 is 24px, 4 is 32px.
|
|
1286
|
+
* @default "3"
|
|
1287
|
+
*/
|
|
1288
|
+
size?: "1" | "2" | "3" | "4";
|
|
1289
|
+
/**
|
|
1290
|
+
* How the component applies its color.
|
|
1291
|
+
* @default "ghost"
|
|
1292
|
+
*/
|
|
1293
|
+
variant?: "ghost" | "soft" | "surface" | "outline";
|
|
1294
|
+
/**
|
|
1295
|
+
* The scale the component draws from. Unset, it inherits the nearest color, and the theme's accent at the root.
|
|
1296
|
+
*/
|
|
1297
|
+
color?: "accent" | "gray" | "danger" | "warning" | "success" | "info";
|
|
1298
|
+
/**
|
|
1299
|
+
* Uses the scale's darkest steps, for text and fills that need more contrast.
|
|
1300
|
+
* @default false
|
|
1301
|
+
*/
|
|
1302
|
+
highContrast?: boolean;
|
|
1303
|
+
/**
|
|
1304
|
+
* Overrides the theme's corner radius for this component.
|
|
1305
|
+
*/
|
|
1306
|
+
radius?: "none" | "small" | "medium" | "large" | "full";
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
export interface ToolbarOwnProps {
|
|
1310
|
+
/**
|
|
1311
|
+
* Control height: 2 is 20px, 3 is 24px, 4 is 32px.
|
|
1312
|
+
* @default "3"
|
|
1313
|
+
*/
|
|
1314
|
+
size?: "2" | "3" | "4";
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
type Equal<A, B> =
|
|
1318
|
+
(<T>() => T extends A ? 1 : 2) extends <T>() => T extends B ? 1 : 2
|
|
1319
|
+
? true
|
|
1320
|
+
: false;
|
|
1321
|
+
type Expect<T extends true> = T;
|
|
1322
|
+
|
|
1323
|
+
/** Fails to compile when a declaration above disagrees with its definitions. */
|
|
1324
|
+
export type PropTypesMatchDefinitions = [
|
|
1325
|
+
Expect<
|
|
1326
|
+
Equal<AlertDialogContentOwnProps, PropsOf<typeof alertDialogContentProps>>
|
|
1327
|
+
>,
|
|
1328
|
+
Expect<Equal<AspectRatioOwnProps, PropsOf<typeof aspectRatioProps>>>,
|
|
1329
|
+
Expect<
|
|
1330
|
+
Equal<AutocompletePopupOwnProps, PropsOf<typeof autocompletePopupProps>>
|
|
1331
|
+
>,
|
|
1332
|
+
Expect<Equal<AutocompleteOwnProps, PropsOf<typeof autocompleteProps>>>,
|
|
1333
|
+
Expect<Equal<AvatarOwnProps, PropsOf<typeof avatarProps>>>,
|
|
1334
|
+
Expect<Equal<BadgeOwnProps, PropsOf<typeof badgeProps>>>,
|
|
1335
|
+
Expect<Equal<BlockquoteOwnProps, PropsOf<typeof blockquoteProps>>>,
|
|
1336
|
+
Expect<Equal<ButtonOwnProps, PropsOf<typeof buttonProps>>>,
|
|
1337
|
+
Expect<Equal<CalloutOwnProps, PropsOf<typeof calloutProps>>>,
|
|
1338
|
+
Expect<Equal<CardOwnProps, PropsOf<typeof cardProps>>>,
|
|
1339
|
+
Expect<Equal<CheckboxCardsOwnProps, PropsOf<typeof checkboxCardsProps>>>,
|
|
1340
|
+
Expect<Equal<CheckboxGroupOwnProps, PropsOf<typeof checkboxGroupProps>>>,
|
|
1341
|
+
Expect<Equal<CheckboxOwnProps, PropsOf<typeof checkboxProps>>>,
|
|
1342
|
+
Expect<Equal<CodeOwnProps, PropsOf<typeof codeProps>>>,
|
|
1343
|
+
Expect<Equal<ComboboxPopupOwnProps, PropsOf<typeof comboboxPopupProps>>>,
|
|
1344
|
+
Expect<Equal<ComboboxOwnProps, PropsOf<typeof comboboxProps>>>,
|
|
1345
|
+
Expect<
|
|
1346
|
+
Equal<ContextMenuContentOwnProps, PropsOf<typeof contextMenuContentProps>>
|
|
1347
|
+
>,
|
|
1348
|
+
Expect<Equal<ContextMenuItemOwnProps, PropsOf<typeof contextMenuItemProps>>>,
|
|
1349
|
+
Expect<Equal<DataListOwnProps, PropsOf<typeof dataListProps>>>,
|
|
1350
|
+
Expect<Equal<DialogContentOwnProps, PropsOf<typeof dialogContentProps>>>,
|
|
1351
|
+
Expect<Equal<DrawerOwnProps, PropsOf<typeof drawerProps>>>,
|
|
1352
|
+
Expect<Equal<EmOwnProps, PropsOf<typeof emProps>>>,
|
|
1353
|
+
Expect<Equal<HeadingOwnProps, PropsOf<typeof headingProps>>>,
|
|
1354
|
+
Expect<Equal<IconButtonOwnProps, PropsOf<typeof iconButtonProps>>>,
|
|
1355
|
+
Expect<Equal<InputOwnProps, PropsOf<typeof inputProps>>>,
|
|
1356
|
+
Expect<Equal<InputSlotOwnProps, PropsOf<typeof inputSlotProps>>>,
|
|
1357
|
+
Expect<Equal<InsetOwnProps, PropsOf<typeof insetProps>>>,
|
|
1358
|
+
Expect<Equal<ItemGroupOwnProps, PropsOf<typeof itemGroupProps>>>,
|
|
1359
|
+
Expect<Equal<ItemMediaOwnProps, PropsOf<typeof itemMediaProps>>>,
|
|
1360
|
+
Expect<Equal<ItemOwnProps, PropsOf<typeof itemProps>>>,
|
|
1361
|
+
Expect<Equal<KbdOwnProps, PropsOf<typeof kbdProps>>>,
|
|
1362
|
+
Expect<Equal<LinkOwnProps, PropsOf<typeof linkProps>>>,
|
|
1363
|
+
Expect<Equal<MenubarContentOwnProps, PropsOf<typeof menubarContentProps>>>,
|
|
1364
|
+
Expect<Equal<MenubarItemOwnProps, PropsOf<typeof menubarItemProps>>>,
|
|
1365
|
+
Expect<Equal<MenuContentOwnProps, PropsOf<typeof menuContentProps>>>,
|
|
1366
|
+
Expect<Equal<MenuItemOwnProps, PropsOf<typeof menuItemProps>>>,
|
|
1367
|
+
Expect<Equal<MeterOwnProps, PropsOf<typeof meterProps>>>,
|
|
1368
|
+
Expect<Equal<NumberFieldOwnProps, PropsOf<typeof numberFieldProps>>>,
|
|
1369
|
+
Expect<Equal<OtpFieldOwnProps, PropsOf<typeof otpFieldProps>>>,
|
|
1370
|
+
Expect<Equal<PopoverContentOwnProps, PropsOf<typeof popoverContentProps>>>,
|
|
1371
|
+
Expect<
|
|
1372
|
+
Equal<PreviewCardContentOwnProps, PropsOf<typeof previewCardContentProps>>
|
|
1373
|
+
>,
|
|
1374
|
+
Expect<Equal<ProgressOwnProps, PropsOf<typeof progressProps>>>,
|
|
1375
|
+
Expect<Equal<QuoteOwnProps, PropsOf<typeof quoteProps>>>,
|
|
1376
|
+
Expect<Equal<RadioCardsOwnProps, PropsOf<typeof radioCardsProps>>>,
|
|
1377
|
+
Expect<Equal<RadioGroupOwnProps, PropsOf<typeof radioGroupProps>>>,
|
|
1378
|
+
Expect<Equal<ScrollAreaOwnProps, PropsOf<typeof scrollAreaProps>>>,
|
|
1379
|
+
Expect<
|
|
1380
|
+
Equal<SegmentedControlOwnProps, PropsOf<typeof segmentedControlProps>>
|
|
1381
|
+
>,
|
|
1382
|
+
Expect<Equal<SelectContentOwnProps, PropsOf<typeof selectContentProps>>>,
|
|
1383
|
+
Expect<Equal<SelectRootOwnProps, PropsOf<typeof selectRootProps>>>,
|
|
1384
|
+
Expect<Equal<SelectTriggerOwnProps, PropsOf<typeof selectTriggerProps>>>,
|
|
1385
|
+
Expect<Equal<SeparatorOwnProps, PropsOf<typeof separatorProps>>>,
|
|
1386
|
+
Expect<Equal<SkeletonOwnProps, PropsOf<typeof skeletonProps>>>,
|
|
1387
|
+
Expect<Equal<SliderOwnProps, PropsOf<typeof sliderProps>>>,
|
|
1388
|
+
Expect<Equal<SpinnerOwnProps, PropsOf<typeof spinnerProps>>>,
|
|
1389
|
+
Expect<Equal<StrongOwnProps, PropsOf<typeof strongProps>>>,
|
|
1390
|
+
Expect<Equal<SwitchOwnProps, PropsOf<typeof switchProps>>>,
|
|
1391
|
+
Expect<Equal<TableCellOwnProps, PropsOf<typeof tableCellProps>>>,
|
|
1392
|
+
Expect<Equal<TableOwnProps, PropsOf<typeof tableProps>>>,
|
|
1393
|
+
Expect<Equal<TableRowOwnProps, PropsOf<typeof tableRowProps>>>,
|
|
1394
|
+
Expect<Equal<TabNavOwnProps, PropsOf<typeof tabNavProps>>>,
|
|
1395
|
+
Expect<Equal<TabsListOwnProps, PropsOf<typeof tabsListProps>>>,
|
|
1396
|
+
Expect<Equal<TextAreaOwnProps, PropsOf<typeof textAreaProps>>>,
|
|
1397
|
+
Expect<Equal<TextComponentOwnProps, PropsOf<typeof textComponentProps>>>,
|
|
1398
|
+
Expect<Equal<ToastOwnProps, PropsOf<typeof toastProps>>>,
|
|
1399
|
+
Expect<Equal<ToggleGroupOwnProps, PropsOf<typeof toggleGroupProps>>>,
|
|
1400
|
+
Expect<Equal<ToggleOwnProps, PropsOf<typeof toggleProps>>>,
|
|
1401
|
+
Expect<Equal<ToolbarOwnProps, PropsOf<typeof toolbarProps>>>,
|
|
1402
|
+
];
|