cetec-design-system 2.2.2-next.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cetec-preset-CcvrY8wh.js → cetec-preset-D23KFUx3.js} +2023 -1574
- package/dist/cetec-preset-D23KFUx3.js.map +1 -0
- package/dist/icon-metadata.json +447 -178
- package/dist/index.js +13313 -9676
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +463 -358
- package/dist/playroom-static.css +68896 -180259
- package/dist/preset.js +1 -1
- package/dist/specs/color-palette.json +4 -0
- package/dist/specs/conditions.json +12 -0
- package/dist/specs/recipes.json +166 -39
- package/dist/specs/semantic-tokens.json +178 -0
- package/dist/specs/tokens.json +5 -0
- package/dist/sprite.svg +1 -1
- package/dist/sprite.symbol.html +463 -180
- package/dist/styles.css +2280 -647
- package/dist/svgs/cheese.svg +1 -0
- package/dist/svgs/collapse-vertical.svg +1 -0
- package/dist/svgs/expand-vertical.svg +1 -0
- package/dist/svgs/magnet.svg +1 -0
- package/dist/svgs/to-date-backward.svg +1 -0
- package/dist/svgs/to-date-forward.svg +1 -0
- package/dist/types/index.d.ts +3245 -285
- package/dist/types/preset.d.ts +15 -0
- package/package.json +6 -1
- package/src/recipes/autocomplete.ts +266 -0
- package/src/recipes/calendar.ts +92 -0
- package/src/recipes/chip.ts +6 -0
- package/src/recipes/dateMenus.ts +40 -0
- package/src/recipes/dateTimeMenus.ts +43 -0
- package/src/recipes/menu.ts +13 -1
- package/src/recipes/modal.ts +1 -1
- package/src/recipes/recipes-slot.ts +7 -2
- package/src/recipes/segmentedFields.ts +192 -0
- package/src/recipes/segmentedInputs.ts +106 -0
- package/src/recipes/text.ts +32 -28
- package/src/recipes/timeMenus.ts +110 -0
- package/src/styles/primitives/zIndex.ts +1 -0
- package/src/styles/semantics/colors.ts +44 -0
- package/src/styles/semantics/zIndex.ts +2 -0
- package/src/styles/utilities/conditions.ts +1 -0
- package/src/styles/utilities/transitions.ts +2 -1
- package/src/utils/dsChain.ts +113 -0
- package/src/utils/dsComponent.ts +44 -0
- package/src/utils/dsPart.ts +41 -0
- package/src/utils/splitProps.ts +15 -0
- package/dist/cetec-preset-CcvrY8wh.js.map +0 -1
- package/src/recipes/datePicker.ts +0 -230
- package/src/recipes/timePicker.ts +0 -206
package/dist/types/index.d.ts
CHANGED
|
@@ -4,17 +4,22 @@ import { Component } from 'react';
|
|
|
4
4
|
import { ComponentPropsWithRef } from 'react';
|
|
5
5
|
import { ComponentType } from 'react';
|
|
6
6
|
import { ElementType } from 'react';
|
|
7
|
+
import { FormApi } from '@tanstack/react-form';
|
|
8
|
+
import { FormAsyncValidateOrFn } from '@tanstack/react-form';
|
|
9
|
+
import { FormValidateOrFn } from '@tanstack/react-form';
|
|
7
10
|
import { HTMLProps } from 'react';
|
|
8
11
|
import { JSX } from 'react/jsx-runtime';
|
|
9
12
|
import { JSX as JSX_2 } from 'react';
|
|
10
|
-
import {
|
|
13
|
+
import { KeyboardEventHandler } from 'react';
|
|
11
14
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
12
15
|
import { Placement } from '@floating-ui/react';
|
|
13
16
|
import { Preset } from '@pandacss/dev';
|
|
14
17
|
import { ReactElement } from 'react';
|
|
18
|
+
import { ReactFormExtendedApi } from '@tanstack/react-form';
|
|
15
19
|
import { ReactNode } from 'react';
|
|
20
|
+
import { Ref } from 'react';
|
|
16
21
|
import { RefObject } from 'react';
|
|
17
|
-
import {
|
|
22
|
+
import { useForm } from '@tanstack/react-form';
|
|
18
23
|
|
|
19
24
|
declare type AdvancedPseudos =
|
|
20
25
|
| ":-moz-any()"
|
|
@@ -42,6 +47,12 @@ declare type AdvancedPseudos =
|
|
|
42
47
|
| ":nth-of-type"
|
|
43
48
|
| ":where";
|
|
44
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Numeric design-token sizes supported by the icon recipe. Non-numeric sizes
|
|
52
|
+
* do not have corresponding recipe variants.
|
|
53
|
+
*/
|
|
54
|
+
export declare type AllowedIconSizes = keyof typeof numericSizes;
|
|
55
|
+
|
|
45
56
|
declare type AnimationToken = "spin" | "ping" | "pulse" | "bounce" | "skeletonWave"
|
|
46
57
|
|
|
47
58
|
declare type AnySelector = `${string}&` | `&${string}` | `@${AtRuleType}${string}`
|
|
@@ -65,6 +76,8 @@ declare type AriaAttributes =
|
|
|
65
76
|
declare type AspectRatioToken = "square" | "landscape" | "portrait" | "wide" | "ultrawide" | "golden"
|
|
66
77
|
|
|
67
78
|
declare type AsProp<T extends ElementType> = {
|
|
79
|
+
/** Element or component rendered by the polymorphic component. */
|
|
80
|
+
/** @default "div" */
|
|
68
81
|
as?: T;
|
|
69
82
|
};
|
|
70
83
|
|
|
@@ -84,38 +97,205 @@ declare type AtRuleType = 'media' | 'layer' | 'container' | 'supports' | 'page'
|
|
|
84
97
|
declare type AttributeSelector = `&${Pseudos | DataAttributes | AriaAttributes}`
|
|
85
98
|
|
|
86
99
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
100
|
+
* Filters and selects one or more metadata-only `Option` values.
|
|
101
|
+
*
|
|
102
|
+
* Use controlled `value` and `onValueChange`, or initialize uncontrolled state
|
|
103
|
+
* with `defaultValue`. The input uses combobox semantics; arrow keys navigate,
|
|
104
|
+
* Enter selects, and Escape closes the listbox. Supply `aria-label` or
|
|
105
|
+
* `aria-labelledby` when no external label is associated with the input.
|
|
106
|
+
* Selected values render as dismissible chips in both single- and
|
|
107
|
+
* multiple-selection modes.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```tsx
|
|
111
|
+
* <Autocomplete defaultValue="active" aria-label="Status">
|
|
112
|
+
* <Option value="active" label="Active" />
|
|
113
|
+
* <Option value="archived" label="Archived" />
|
|
114
|
+
* </Autocomplete>
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
export declare const Autocomplete: (props: AutocompleteProps) => JSX.Element;
|
|
118
|
+
|
|
119
|
+
declare type AutocompleteBaseProps = Omit<BoxProps, keyof AutocompleteVariantProps | 'children' | 'defaultValue' | 'onChange' | 'value'> & AutocompleteVariantProps & {
|
|
120
|
+
/** Controlled text displayed in the input. */
|
|
121
|
+
inputValue?: string;
|
|
122
|
+
/** Initial input text when `inputValue` is not provided. */
|
|
123
|
+
defaultInputValue?: string;
|
|
124
|
+
/** Runs when typing, selection, or clearing changes the input text. */
|
|
125
|
+
onInputValueChange?: (value: string, reason: AutocompleteInputChangeReason) => void;
|
|
126
|
+
/**
|
|
127
|
+
* Runs when the input text changes.
|
|
128
|
+
*
|
|
129
|
+
* @deprecated Use `onInputValueChange`.
|
|
130
|
+
*/
|
|
131
|
+
onInputChange?: (value: string, reason: AutocompleteInputChangeReason) => void;
|
|
132
|
+
/** Controlled listbox visibility. Pair with `onOpenChange`. */
|
|
133
|
+
open?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Initial listbox visibility when `open` is not provided.
|
|
136
|
+
*
|
|
137
|
+
* @default false
|
|
138
|
+
*/
|
|
139
|
+
defaultOpen?: boolean;
|
|
140
|
+
/** Runs when interaction requests that the listbox open or close. */
|
|
141
|
+
onOpenChange?: (open: boolean, reason: AutocompleteOpenChangeReason) => void;
|
|
142
|
+
/**
|
|
143
|
+
* Offers the current input as a selectable option when it has no exact
|
|
144
|
+
* match.
|
|
145
|
+
*
|
|
146
|
+
* @default false
|
|
147
|
+
*/
|
|
148
|
+
allowCustomValue?: boolean;
|
|
149
|
+
/** Creates the visible label for a custom-value option. */
|
|
150
|
+
getCreateOptionLabel?: (inputValue: string) => string;
|
|
151
|
+
/**
|
|
152
|
+
* Maximum selected chips shown while an unfocused multiple Autocomplete
|
|
153
|
+
* is collapsed. Negative values and `undefined` show every chip.
|
|
154
|
+
*/
|
|
155
|
+
limitTags?: number;
|
|
156
|
+
/**
|
|
157
|
+
* Input hint shown while no value is selected.
|
|
158
|
+
*
|
|
159
|
+
* @default 'Select...'
|
|
160
|
+
*/
|
|
161
|
+
placeholder?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Floating UI placement of the listbox relative to the control.
|
|
164
|
+
*
|
|
165
|
+
* @default 'bottom-start'
|
|
166
|
+
*/
|
|
167
|
+
placement?: Placement;
|
|
168
|
+
/**
|
|
169
|
+
* Gap between the control and listbox, in pixels.
|
|
170
|
+
*
|
|
171
|
+
* @default 4
|
|
172
|
+
*/
|
|
173
|
+
offset?: number;
|
|
174
|
+
/** Metadata-only `Option` children used to populate the listbox. */
|
|
175
|
+
children?: ReactNode;
|
|
176
|
+
/** Identifier for the combobox input. A generated identifier is used when omitted. */
|
|
177
|
+
id?: string;
|
|
178
|
+
/** Form field name used by hidden inputs for selected values. */
|
|
179
|
+
name?: string;
|
|
180
|
+
/** Prevents focus and interaction. Overrides field context when provided. */
|
|
181
|
+
disabled?: boolean;
|
|
182
|
+
/** Allows focus and text selection while preventing value changes. */
|
|
183
|
+
readOnly?: boolean;
|
|
184
|
+
/** Applies error styling and `aria-invalid`. Overrides field context when provided. */
|
|
185
|
+
error?: boolean;
|
|
186
|
+
/** Applies valid styling to the control. */
|
|
187
|
+
valid?: boolean;
|
|
188
|
+
/** Applies invalid styling and `aria-invalid`. Overrides field context when provided. */
|
|
189
|
+
invalid?: boolean;
|
|
190
|
+
/** Spacing density used by listbox options. */
|
|
191
|
+
density?: MenuDensity;
|
|
192
|
+
/**
|
|
193
|
+
* Shows a loading indicator and replaces an empty list with `loadingText`.
|
|
194
|
+
*
|
|
195
|
+
* @default false
|
|
196
|
+
*/
|
|
197
|
+
loading?: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Shows `loadingText` after the current options during incremental loading.
|
|
200
|
+
*
|
|
201
|
+
* @default false
|
|
202
|
+
*/
|
|
203
|
+
loadingMore?: boolean;
|
|
204
|
+
/** Indicates that scrolling can request another page of options. */
|
|
205
|
+
hasMore?: boolean;
|
|
206
|
+
/** Runs near the end of the list when more options are available. */
|
|
207
|
+
onLoadMore?: () => void;
|
|
208
|
+
/**
|
|
209
|
+
* Status content shown while options are loading.
|
|
210
|
+
*
|
|
211
|
+
* @default 'Loading options…'
|
|
212
|
+
*/
|
|
213
|
+
loadingText?: ReactNode;
|
|
214
|
+
/**
|
|
215
|
+
* Status content shown when filtering produces no options.
|
|
216
|
+
*
|
|
217
|
+
* @default 'No options'
|
|
218
|
+
*/
|
|
219
|
+
noOptionsText?: ReactNode;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
/** User actions that can change the selected Autocomplete value. */
|
|
223
|
+
export declare type AutocompleteChangeReason = 'select-option' | 'remove-option' | 'clear' | 'create-option';
|
|
224
|
+
|
|
225
|
+
/** Actions that can change the text displayed in the Autocomplete input. */
|
|
226
|
+
export declare type AutocompleteInputChangeReason = 'input' | 'selection' | 'clear';
|
|
227
|
+
|
|
228
|
+
/** Interactions that can request an Autocomplete listbox visibility change. */
|
|
229
|
+
export declare type AutocompleteOpenChangeReason = 'input' | 'focus' | 'keyboard' | 'selection' | 'escape' | 'outside-press';
|
|
230
|
+
|
|
231
|
+
/** Props accepted by {@link Autocomplete}, discriminated by `multiple`. */
|
|
232
|
+
export declare type AutocompleteProps<Multiple extends boolean = boolean> = Multiple extends true ? MultipleAutocompleteProps : Multiple extends false ? SingleAutocompleteProps : SingleAutocompleteProps | MultipleAutocompleteProps;
|
|
233
|
+
|
|
234
|
+
/** Selected value shape for single- or multiple-selection `Autocomplete`. */
|
|
235
|
+
export declare type AutocompleteValue<Multiple extends boolean = false> = Multiple extends true ? string[] : Multiple extends false ? string | null : string | string[] | null;
|
|
236
|
+
|
|
237
|
+
declare interface AutocompleteVariant {
|
|
238
|
+
/**
|
|
239
|
+
* @default "elevated"
|
|
240
|
+
*/
|
|
241
|
+
layer: "elevated" | "modalFloating"
|
|
242
|
+
/**
|
|
243
|
+
* @default "md"
|
|
244
|
+
*/
|
|
245
|
+
size: "sm" | "md" | "lg" | "xl"
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
declare type AutocompleteVariantProps = {
|
|
249
|
+
[key in keyof AutocompleteVariant]?: ConditionalValue<AutocompleteVariant[key]> | undefined
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Represents a person or entity with an image and deterministic fallback.
|
|
254
|
+
*
|
|
255
|
+
* Presence and status indicators are visual only. Supply equivalent text when
|
|
256
|
+
* either state is meaningful to assistive technology.
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```tsx
|
|
260
|
+
* <Avatar src="/people/ada.jpg" alt="Ada Lovelace" name="Ada Lovelace" />
|
|
261
|
+
* ```
|
|
89
262
|
*/
|
|
90
263
|
export declare const Avatar: (props: AvatarProps) => JSX.Element;
|
|
91
264
|
|
|
265
|
+
/** Presence states displayed at the bottom-right of an avatar. */
|
|
92
266
|
declare type AvatarPresence = 'online' | 'busy' | 'offline' | 'focus';
|
|
93
267
|
|
|
94
|
-
|
|
95
|
-
|
|
268
|
+
/** Props accepted by {@link Avatar}. */
|
|
269
|
+
export declare type AvatarProps = Omit<BoxProps, keyof AvatarVariantProps> & Omit<AvatarVariantProps, 'size' | 'shape'> & {
|
|
270
|
+
/** Image URL. A failed or missing image falls back to custom content, initials, or a user icon. */
|
|
96
271
|
src?: string;
|
|
97
|
-
/**
|
|
272
|
+
/** Alternative text for the image. Use an empty string when nearby text already identifies the entity. */
|
|
273
|
+
/** @default "" */
|
|
98
274
|
alt?: string;
|
|
99
|
-
/** Name
|
|
275
|
+
/** Name used to generate first-and-last initials when no image is available. */
|
|
100
276
|
name?: string;
|
|
101
|
-
/**
|
|
277
|
+
/** Visual size. An explicit value takes precedence over slot context. */
|
|
102
278
|
size?: AvatarSize;
|
|
103
|
-
/**
|
|
279
|
+
/** Outline shape of the avatar. */
|
|
280
|
+
/** @default "circle" */
|
|
104
281
|
shape?: AvatarShape;
|
|
105
|
-
/**
|
|
282
|
+
/** Decorative presence indicator shown at the bottom-right. Provide equivalent text elsewhere when the state matters. */
|
|
106
283
|
presence?: AvatarPresence;
|
|
107
|
-
/**
|
|
284
|
+
/** Decorative status indicator shown at the top-right. Provide equivalent text elsewhere when the state matters. */
|
|
108
285
|
status?: AvatarStatus;
|
|
109
|
-
/**
|
|
286
|
+
/** Fallback content that takes precedence over generated initials and the default user icon. */
|
|
110
287
|
fallback?: ReactNode;
|
|
111
|
-
/**
|
|
288
|
+
/** CSS border color applied to the avatar root. */
|
|
112
289
|
borderColor?: string;
|
|
113
290
|
};
|
|
114
291
|
|
|
292
|
+
/** Supported outline shapes for {@link Avatar}. */
|
|
115
293
|
declare type AvatarShape = AvatarVariantProps['shape'];
|
|
116
294
|
|
|
295
|
+
/** Supported visual sizes for {@link Avatar}. */
|
|
117
296
|
declare type AvatarSize = NonNullable<AvatarVariantProps['size']>;
|
|
118
297
|
|
|
298
|
+
/** Status states displayed at the top-right of an avatar. */
|
|
119
299
|
declare type AvatarStatus = 'approved' | 'declined' | 'locked';
|
|
120
300
|
|
|
121
301
|
declare interface AvatarVariant {
|
|
@@ -134,26 +314,36 @@ declare type AvatarVariantProps = {
|
|
|
134
314
|
}
|
|
135
315
|
|
|
136
316
|
/**
|
|
137
|
-
*
|
|
317
|
+
* Displays a notification count or compact status indicator.
|
|
318
|
+
*
|
|
319
|
+
* Without `children`, the badge is standalone. With children, it positions the
|
|
320
|
+
* indicator at the anchor's top-right. Omitting `count` renders a dot. The
|
|
321
|
+
* badge does not announce updates by itself; add an accessible label or live
|
|
322
|
+
* region when the value conveys essential information.
|
|
138
323
|
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
324
|
+
* @example
|
|
325
|
+
* ```tsx
|
|
326
|
+
* <Badge count={3}><Icon name="bell" aria-label="Notifications" /></Badge>
|
|
327
|
+
* ```
|
|
143
328
|
*/
|
|
144
329
|
export declare const Badge: (props: BadgeProps) => JSX.Element | null;
|
|
145
330
|
|
|
146
|
-
|
|
147
|
-
|
|
331
|
+
/** Props accepted by {@link Badge}. */
|
|
332
|
+
export declare type BadgeProps = Omit<BoxProps, keyof BadgeVariantProps> & Omit<BadgeVariantProps, 'standalone' | 'dot'> & {
|
|
333
|
+
/** Numeric content. Providing a value switches the badge from dot mode to count mode. */
|
|
148
334
|
count?: number;
|
|
149
|
-
/**
|
|
335
|
+
/** Keeps the indicator visible when `count` is zero. */
|
|
336
|
+
/** @default false */
|
|
150
337
|
showZero?: boolean;
|
|
151
|
-
/**
|
|
338
|
+
/** Largest count shown directly; larger values render as `{overflowCount}+`. */
|
|
339
|
+
/** @default 99 */
|
|
152
340
|
overflowCount?: number;
|
|
153
|
-
/**
|
|
341
|
+
/** Semantic color treatment of the indicator. */
|
|
342
|
+
/** @default "danger" */
|
|
154
343
|
variant?: BadgeVariantProps['variant'];
|
|
155
|
-
/** Content
|
|
344
|
+
/** Content used as the positioning anchor. Without children, the badge is standalone. */
|
|
156
345
|
children?: ReactNode;
|
|
346
|
+
/** Visual indicator size. An explicit value takes precedence over slot context. */
|
|
157
347
|
size?: BadgeVariantProps['size'];
|
|
158
348
|
};
|
|
159
349
|
|
|
@@ -199,13 +389,25 @@ declare type BorderToken = "default" | "bold" | "inverse" | "disabled" | "input"
|
|
|
199
389
|
declare type BorderWidthToken = "0" | "1" | "2" | "4" | "8" | "16"
|
|
200
390
|
|
|
201
391
|
/**
|
|
202
|
-
*
|
|
203
|
-
*
|
|
392
|
+
* Renders a token-aware polymorphic foundation for design-system components.
|
|
393
|
+
*
|
|
394
|
+
* `Box` renders a `div` by default. Set `as` to use another semantic element or
|
|
395
|
+
* component; compatible native props and the React 19 `ref` prop follow that
|
|
396
|
+
* selection. Prefer a semantic component when one already expresses the
|
|
397
|
+
* intended behavior.
|
|
398
|
+
*
|
|
399
|
+
* @example
|
|
400
|
+
* ```tsx
|
|
401
|
+
* <Box as="section" p="16" aria-labelledby="summary-heading">
|
|
402
|
+
* Summary content
|
|
403
|
+
* </Box>
|
|
404
|
+
* ```
|
|
204
405
|
*/
|
|
205
|
-
export declare const Box: <T extends ElementType = "div">(props: BoxProps<T>) =>
|
|
406
|
+
export declare const Box: <T extends ElementType = "div">(props: BoxProps<T>) => JSX.Element;
|
|
206
407
|
|
|
207
408
|
declare type BoxOwnProps = SystemStyleObject_2 & BoxVariantProps;
|
|
208
409
|
|
|
410
|
+
/** Props accepted by {@link Box}, including Panda style and native element props. */
|
|
209
411
|
export declare type BoxProps<T extends ElementType = ElementType> = PolymorphicComponentProps<T, BoxOwnProps>;
|
|
210
412
|
|
|
211
413
|
declare interface BoxVariant {
|
|
@@ -216,9 +418,32 @@ declare type BoxVariantProps = {
|
|
|
216
418
|
[key in keyof BoxVariant]?: ConditionalValue<BoxVariant[key]> | undefined
|
|
217
419
|
}
|
|
218
420
|
|
|
421
|
+
/**
|
|
422
|
+
* Displays the current navigation path as a semantic unordered list.
|
|
423
|
+
*
|
|
424
|
+
* Linked segments use {@link Link}; segments without `href` are rendered as
|
|
425
|
+
* plain text. Use page navigation instead when the hierarchy is not a path to
|
|
426
|
+
* the current location.
|
|
427
|
+
*
|
|
428
|
+
* @example
|
|
429
|
+
* ```tsx
|
|
430
|
+
* <Breadcrumbs
|
|
431
|
+
* items={[
|
|
432
|
+
* { id: 'home', label: 'Home', href: '/' },
|
|
433
|
+
* { id: 'invoices', label: 'Invoices' },
|
|
434
|
+
* ]}
|
|
435
|
+
* />
|
|
436
|
+
* ```
|
|
437
|
+
*/
|
|
219
438
|
export declare const Breadcrumbs: (props: BreadcrumbsProps) => JSX.Element;
|
|
220
439
|
|
|
221
|
-
|
|
440
|
+
/** Props for {@link Breadcrumbs}. */
|
|
441
|
+
export declare type BreadcrumbsProps = Omit<BoxProps, keyof BreadcrumbsVariantProps> & BreadcrumbsVariantProps & {
|
|
442
|
+
/**
|
|
443
|
+
* Ordered path segments. A segment with `href` renders as a link; a segment
|
|
444
|
+
* without it renders as plain text, which is normally the current page.
|
|
445
|
+
* Keep the final segment non-linked when it represents the current page.
|
|
446
|
+
*/
|
|
222
447
|
items: {
|
|
223
448
|
id: string;
|
|
224
449
|
label: string;
|
|
@@ -234,9 +459,23 @@ declare type BreadcrumbsVariantProps = {
|
|
|
234
459
|
[key in keyof BreadcrumbsVariant]?: ConditionalValue<BreadcrumbsVariant[key]> | undefined
|
|
235
460
|
}
|
|
236
461
|
|
|
462
|
+
/**
|
|
463
|
+
* Displays the largest currently matching design-system breakpoint.
|
|
464
|
+
*
|
|
465
|
+
* This is a development aid, not user-facing application content. It renders a
|
|
466
|
+
* colored `Tag` from `@media/base` through `@media/2xl` based on media-query
|
|
467
|
+
* hooks.
|
|
468
|
+
*
|
|
469
|
+
* @example
|
|
470
|
+
* ```tsx
|
|
471
|
+
* <BreakpointIndicator />
|
|
472
|
+
* ```
|
|
473
|
+
*/
|
|
237
474
|
export declare const BreakpointIndicator: (props: BreakpointIndicatorProps) => JSX.Element;
|
|
238
475
|
|
|
239
|
-
|
|
476
|
+
/** Props for {@link BreakpointIndicator}, a development breakpoint readout. */
|
|
477
|
+
export declare type BreakpointIndicatorProps = Omit<BoxProps, keyof BreakpointIndicatorVariantProps> & BreakpointIndicatorVariantProps & {
|
|
478
|
+
/** Recipe variant for the indicator's visual treatment. */
|
|
240
479
|
variant?: BreakpointIndicatorVariantProps['variant'];
|
|
241
480
|
};
|
|
242
481
|
|
|
@@ -251,6 +490,7 @@ declare type BreakpointIndicatorVariantProps = {
|
|
|
251
490
|
[key in keyof BreakpointIndicatorVariant]?: ConditionalValue<BreakpointIndicatorVariant[key]> | undefined
|
|
252
491
|
}
|
|
253
492
|
|
|
493
|
+
/** Key of a Cetec viewport breakpoint token. */
|
|
254
494
|
declare type BreakpointKey = keyof typeof breakpoints;
|
|
255
495
|
|
|
256
496
|
declare const breakpoints: {
|
|
@@ -264,20 +504,78 @@ declare const breakpoints: {
|
|
|
264
504
|
|
|
265
505
|
declare type BreakpointToken = "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
|
|
266
506
|
|
|
507
|
+
/**
|
|
508
|
+
* Performs an action or navigates to a location.
|
|
509
|
+
*
|
|
510
|
+
* Renders a native `button` by default, or an anchor when `href` is supplied.
|
|
511
|
+
* Use {@link IconButton} for actions represented only by an icon. In a
|
|
512
|
+
* `FormField` or slot context, explicitly supplied `size`, `error`, `invalid`,
|
|
513
|
+
* and `disabled` values take precedence over slot context, which takes
|
|
514
|
+
* precedence over field context. Its recipe defaults to the `standard` variant
|
|
515
|
+
* and `md` size.
|
|
516
|
+
*
|
|
517
|
+
* @example
|
|
518
|
+
* ```tsx
|
|
519
|
+
* <Button onClick={saveInvoice}>Save invoice</Button>
|
|
520
|
+
* ```
|
|
521
|
+
*/
|
|
267
522
|
export declare const Button: (props: ButtonProps) => JSX.Element;
|
|
268
523
|
|
|
269
|
-
|
|
524
|
+
/**
|
|
525
|
+
* Props for {@link Button}. Extends {@link BoxProps} for layout and native
|
|
526
|
+
* element attributes while reserving the button recipe's visual variants.
|
|
527
|
+
*/
|
|
528
|
+
export declare type ButtonProps = Omit<BoxProps, keyof ButtonVariantProps | 'fontSize' | 'fontVariant'> & Omit<ButtonVariantProps, 'before' | 'after' | 'iconBefore' | 'iconAfter'> & {
|
|
529
|
+
/** Content rendered before the button label. Takes precedence over `iconBefore`. */
|
|
270
530
|
before?: ReactNode;
|
|
531
|
+
/** Content rendered after the button label. Takes precedence over `iconAfter`. */
|
|
271
532
|
after?: ReactNode;
|
|
533
|
+
/**
|
|
534
|
+
* Legacy icon name rendered before the label when `before` is not provided.
|
|
535
|
+
*
|
|
536
|
+
* @deprecated Use `before={<Icon name="..." aria-hidden />}`. This alias
|
|
537
|
+
* will be removed in a future major release.
|
|
538
|
+
*/
|
|
272
539
|
iconBefore?: IconNamesList;
|
|
540
|
+
/**
|
|
541
|
+
* Legacy icon name rendered after the label when `after` is not provided.
|
|
542
|
+
*
|
|
543
|
+
* @deprecated Use `after={<Icon name="..." aria-hidden />}`. This alias
|
|
544
|
+
* will be removed in a future major release.
|
|
545
|
+
*/
|
|
273
546
|
iconAfter?: IconNamesList;
|
|
547
|
+
/** When provided, renders an anchor instead of a native button. */
|
|
274
548
|
href?: string;
|
|
549
|
+
/**
|
|
550
|
+
* Shows a centered spinner, hides the visible content, and sets
|
|
551
|
+
* `aria-busy`. Loading does not disable the control; set `disabled` when
|
|
552
|
+
* the action must not be available.
|
|
553
|
+
*
|
|
554
|
+
* @default false
|
|
555
|
+
*/
|
|
275
556
|
loading?: boolean;
|
|
557
|
+
/** Visible label and optional inline content for the action. */
|
|
276
558
|
children: string | ReactNode;
|
|
559
|
+
/** Marks the control as having an error for styling and descendant slots. */
|
|
277
560
|
error?: boolean;
|
|
561
|
+
/** Sets `aria-invalid` and marks the control invalid for styling and slots. */
|
|
278
562
|
invalid?: boolean;
|
|
563
|
+
/**
|
|
564
|
+
* Disables a native button. For links, marks the anchor `aria-disabled` and
|
|
565
|
+
* prevents its default click navigation.
|
|
566
|
+
*/
|
|
279
567
|
disabled?: boolean;
|
|
568
|
+
/**
|
|
569
|
+
* Native button type; ignored when `href` causes the component to render an
|
|
570
|
+
* anchor.
|
|
571
|
+
*
|
|
572
|
+
* @default 'button'
|
|
573
|
+
*/
|
|
280
574
|
type?: 'submit' | 'reset' | 'button';
|
|
575
|
+
/** Font size forwarded to the button's text treatment. */
|
|
576
|
+
fontSize?: BoxProps['fontSize'];
|
|
577
|
+
/** Font variant forwarded to the button's text treatment. */
|
|
578
|
+
fontVariant?: BoxProps['fontVariant'];
|
|
281
579
|
};
|
|
282
580
|
|
|
283
581
|
declare interface ButtonVariant {
|
|
@@ -297,13 +595,91 @@ declare type ButtonVariantProps = {
|
|
|
297
595
|
[key in keyof ButtonVariant]?: ConditionalValue<ButtonVariant[key]> | undefined
|
|
298
596
|
}
|
|
299
597
|
|
|
598
|
+
/**
|
|
599
|
+
* Displays an accessible day, month, and year selection grid.
|
|
600
|
+
*
|
|
601
|
+
* Use `value` and `onChange` for date selection. `viewDate` separately controls
|
|
602
|
+
* the visible month; omit it to let Calendar manage navigation internally.
|
|
603
|
+
* Dates outside `minDate` and `maxDate` remain visible but unavailable.
|
|
604
|
+
*
|
|
605
|
+
* @example
|
|
606
|
+
* ```tsx
|
|
607
|
+
* <Calendar value={date} onChange={setDate} label="Choose invoice date" />
|
|
608
|
+
* ```
|
|
609
|
+
*/
|
|
610
|
+
export declare const Calendar: (props: CalendarProps) => JSX.Element;
|
|
611
|
+
|
|
612
|
+
/** Props for {@link Calendar}, including selection, bounds, and visible-month state. */
|
|
613
|
+
export declare type CalendarProps = Omit<BoxProps, keyof CalendarVariantProps | 'children'> & Omit<CalendarVariantProps, 'type'> & {
|
|
614
|
+
/** Controlled selected date. */
|
|
615
|
+
value?: DateValue | null;
|
|
616
|
+
/** Runs when a selectable day is chosen. Calendar never clears its own value. */
|
|
617
|
+
onChange?: (value: DateValue) => void;
|
|
618
|
+
/**
|
|
619
|
+
* Range-selection endpoints, for DateRangeMenu. Independent of `value` —
|
|
620
|
+
* a Calendar can show a range highlight (start/end fill + in-between
|
|
621
|
+
* tint) regardless of which month it's currently displaying, since a
|
|
622
|
+
* range's two endpoints may fall in months neither calendar is showing.
|
|
623
|
+
*/
|
|
624
|
+
rangeStart?: DateValue | null;
|
|
625
|
+
/** End of the optional visual range highlight. */
|
|
626
|
+
rangeEnd?: DateValue | null;
|
|
627
|
+
/** Earliest selectable date. */
|
|
628
|
+
minDate?: DateValue;
|
|
629
|
+
/** Latest selectable date. */
|
|
630
|
+
maxDate?: DateValue;
|
|
631
|
+
/** Controlled visible month and year. */
|
|
632
|
+
viewDate?: ViewDate;
|
|
633
|
+
/** Initial visible month and year when `viewDate` is not provided. Defaults to `value`, then today. */
|
|
634
|
+
defaultViewDate?: ViewDate;
|
|
635
|
+
/** Runs when month or year navigation requests a new visible month. */
|
|
636
|
+
onViewDateChange?: (viewDate: ViewDate) => void;
|
|
637
|
+
/** Prevents navigation and date selection. */
|
|
638
|
+
disabled?: boolean;
|
|
639
|
+
/** Accessible label prefix for the calendar grid. */
|
|
640
|
+
label?: string;
|
|
641
|
+
};
|
|
642
|
+
|
|
643
|
+
declare interface CalendarVariant {
|
|
644
|
+
/**
|
|
645
|
+
* @default "days"
|
|
646
|
+
*/
|
|
647
|
+
type: "days" | "months" | "years"
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
declare type CalendarVariantProps = {
|
|
651
|
+
[key in keyof CalendarVariant]?: ConditionalValue<CalendarVariant[key]> | undefined
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Groups related content in a visual container that can optionally navigate or
|
|
656
|
+
* act as a control.
|
|
657
|
+
*
|
|
658
|
+
* A card with `href` renders an anchor. A card that is otherwise interactive
|
|
659
|
+
* renders a button; a non-interactive card renders a `div`. Avoid nesting other
|
|
660
|
+
* interactive elements inside an interactive card.
|
|
661
|
+
*
|
|
662
|
+
* @example
|
|
663
|
+
* ```tsx
|
|
664
|
+
* <Card href="/orders/123">Order 123</Card>
|
|
665
|
+
* ```
|
|
666
|
+
*/
|
|
300
667
|
export declare const Card: (props: CardProps) => JSX.Element;
|
|
301
668
|
|
|
302
|
-
|
|
669
|
+
/** Props accepted by {@link Card}. */
|
|
670
|
+
export declare type CardProps = Omit<BoxProps, keyof CardVariantProps> & CardVariantProps & {
|
|
671
|
+
/** Destination that makes the entire card render as a link. */
|
|
303
672
|
href?: string;
|
|
673
|
+
/** Card content. */
|
|
304
674
|
children?: string | ReactNode;
|
|
675
|
+
/** Marks the card as currently grabbed by a drag interaction. */
|
|
676
|
+
/** @default false */
|
|
305
677
|
grabbed?: boolean;
|
|
678
|
+
/** Disables the rendered button or prevents link navigation. */
|
|
679
|
+
/** @default false */
|
|
306
680
|
disabled?: boolean;
|
|
681
|
+
/** Forces button semantics and interactive styling without an `href`. */
|
|
682
|
+
/** @default false */
|
|
307
683
|
interactive?: boolean;
|
|
308
684
|
};
|
|
309
685
|
|
|
@@ -319,46 +695,89 @@ declare type CardVariantProps = {
|
|
|
319
695
|
[key in keyof CardVariant]?: ConditionalValue<CardVariant[key]> | undefined
|
|
320
696
|
}
|
|
321
697
|
|
|
698
|
+
/**
|
|
699
|
+
* Panda CSS preset containing Cetec tokens, semantic tokens, recipes,
|
|
700
|
+
* utilities, patterns, global CSS, and conditions.
|
|
701
|
+
*
|
|
702
|
+
* Add this preset to a Panda configuration to generate styles that match the
|
|
703
|
+
* design system. It extends Panda's base preset while replacing its
|
|
704
|
+
* `dropShadow` utility and omitting the base `box` and `divider` patterns.
|
|
705
|
+
*
|
|
706
|
+
* @example
|
|
707
|
+
* ```ts
|
|
708
|
+
* import { cetecPreset } from 'cetec-design-system';
|
|
709
|
+
*
|
|
710
|
+
* export default defineConfig({ presets: [cetecPreset] });
|
|
711
|
+
* ```
|
|
712
|
+
*/
|
|
322
713
|
export declare const cetecPreset: Preset;
|
|
323
714
|
|
|
324
715
|
/**
|
|
325
|
-
*
|
|
716
|
+
* A native checkbox control without a visible label.
|
|
717
|
+
*
|
|
718
|
+
* Use {@link CheckboxInput} when the checkbox needs a text label. Supply
|
|
719
|
+
* `checked` with `onChange` for controlled state, or `defaultChecked` for
|
|
720
|
+
* uncontrolled state. The primitive renders an `<input type="checkbox">`, so
|
|
721
|
+
* its `name` participates in native form submission. Associate it with a
|
|
722
|
+
* visible label using `id`; `indeterminate` is a visual mixed state only.
|
|
326
723
|
*
|
|
327
724
|
* @example
|
|
328
|
-
*
|
|
725
|
+
* ```tsx
|
|
726
|
+
* <Checkbox name="notifications" defaultChecked />
|
|
727
|
+
* ```
|
|
329
728
|
*
|
|
330
729
|
* @example
|
|
730
|
+
* ```tsx
|
|
331
731
|
* const [checked, setChecked] = useState(false);
|
|
332
|
-
* <Checkbox checked={checked} onChange={(
|
|
732
|
+
* <Checkbox name="notifications" checked={checked} onChange={(event) => setChecked(event.target.checked)} />
|
|
733
|
+
* ```
|
|
333
734
|
*/
|
|
334
735
|
export declare const Checkbox: (props: CheckboxProps) => JSX.Element;
|
|
335
736
|
|
|
336
737
|
/**
|
|
337
|
-
*
|
|
738
|
+
* Native change event emitted by {@link Checkbox}.
|
|
338
739
|
* @example
|
|
339
740
|
* const handleChange: CheckboxChangeHandler = (e) => setChecked(e.target.checked);
|
|
340
741
|
*/
|
|
341
|
-
declare type CheckboxChangeEvent = ChangeEvent<HTMLInputElement>;
|
|
742
|
+
export declare type CheckboxChangeEvent = ChangeEvent<HTMLInputElement>;
|
|
342
743
|
|
|
343
744
|
/**
|
|
344
|
-
*
|
|
745
|
+
* Handler for a {@link Checkbox} native change event.
|
|
345
746
|
* @example
|
|
346
747
|
* const handleChange: CheckboxChangeHandler = (e) => setChecked(e.target.checked);
|
|
347
748
|
*/
|
|
348
|
-
declare type CheckboxChangeHandler = (e: CheckboxChangeEvent) => void;
|
|
749
|
+
export declare type CheckboxChangeHandler = (e: CheckboxChangeEvent) => void;
|
|
349
750
|
|
|
751
|
+
/**
|
|
752
|
+
* A checkbox paired with a clickable label.
|
|
753
|
+
*
|
|
754
|
+
* Use this instead of {@link Checkbox} for ordinary labelled form controls.
|
|
755
|
+
* It generates an input ID when needed and connects it to the rendered label.
|
|
756
|
+
* Its checked-state and field-context behavior match `Checkbox`; explicit
|
|
757
|
+
* `disabled`, `error`, and `invalid` props override field context.
|
|
758
|
+
*
|
|
759
|
+
* @example
|
|
760
|
+
* ```tsx
|
|
761
|
+
* <CheckboxInput name="terms" defaultChecked>
|
|
762
|
+
* I agree to the terms
|
|
763
|
+
* </CheckboxInput>
|
|
764
|
+
* ```
|
|
765
|
+
*/
|
|
350
766
|
export declare const CheckboxInput: (props: CheckboxInputProps) => JSX.Element;
|
|
351
767
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
checked
|
|
768
|
+
/** Props for {@link CheckboxInput}, a labelled {@link Checkbox}. */
|
|
769
|
+
export declare type CheckboxInputProps = Omit<BoxProps, keyof CheckboxInputVariantProps> & CheckboxInputVariantProps & {
|
|
770
|
+
/** Form field name submitted when checked. */ name: string;
|
|
771
|
+
/** Controlled checked state. Pair with `onChange`; do not combine with `defaultChecked`. */ checked?: boolean;
|
|
772
|
+
/** Initial uncontrolled checked state; updates after mount are ignored. */
|
|
773
|
+
/** @default false */
|
|
355
774
|
defaultChecked?: boolean;
|
|
356
|
-
onChange?: CheckboxChangeHandler;
|
|
357
|
-
id?: string;
|
|
358
|
-
error?: boolean;
|
|
359
|
-
invalid?: boolean;
|
|
360
|
-
children?: string | ReactNode;
|
|
361
|
-
disabled?: boolean;
|
|
775
|
+
/** Runs when the contained native checkbox changes. */ onChange?: CheckboxChangeHandler;
|
|
776
|
+
/** Input ID. When omitted, a stable React ID is generated for the label association. */ id?: string;
|
|
777
|
+
/** Applies error styling to the checkbox and overrides field context. */ error?: boolean;
|
|
778
|
+
/** Marks the checkbox invalid and overrides field context. */ invalid?: boolean;
|
|
779
|
+
/** Visible label content. Provide text or an accessible label element; this wrapper supplies `htmlFor`. */ children?: string | ReactNode;
|
|
780
|
+
/** Disables the label and checkbox, overriding field context. */ disabled?: boolean;
|
|
362
781
|
};
|
|
363
782
|
|
|
364
783
|
declare interface CheckboxInputVariant {
|
|
@@ -369,16 +788,19 @@ declare type CheckboxInputVariantProps = {
|
|
|
369
788
|
[key in keyof CheckboxInputVariant]?: ConditionalValue<CheckboxInputVariant[key]> | undefined
|
|
370
789
|
}
|
|
371
790
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
checked
|
|
791
|
+
/** Props for {@link Checkbox}, the unlabelled native checkbox primitive. */
|
|
792
|
+
export declare type CheckboxProps = Omit<BoxProps, 'checked' | 'defaultChecked' | 'onChange' | keyof CheckboxVariantProps> & CheckboxVariantProps & {
|
|
793
|
+
/** Form field name submitted when the checkbox is checked. */ name: string;
|
|
794
|
+
/** Controlled checked state. Pair with `onChange`; do not combine with `defaultChecked`. */ checked?: boolean;
|
|
795
|
+
/** Initial uncontrolled checked state; later updates are ignored. */
|
|
796
|
+
/** @default false */
|
|
375
797
|
defaultChecked?: boolean;
|
|
376
|
-
onChange?: CheckboxChangeHandler;
|
|
377
|
-
id?: string;
|
|
378
|
-
error?: boolean;
|
|
379
|
-
invalid?: boolean;
|
|
380
|
-
disabled?: boolean;
|
|
381
|
-
indeterminate?: boolean;
|
|
798
|
+
/** Runs for the native input change event; read the next state from `event.target.checked`. */ onChange?: CheckboxChangeHandler;
|
|
799
|
+
/** Native input ID. Use it to associate an external `<label>` with the checkbox. */ id?: string;
|
|
800
|
+
/** Applies error styling, taking precedence over field context. */ error?: boolean;
|
|
801
|
+
/** Marks the native input invalid with `aria-invalid` and takes precedence over field context. */ invalid?: boolean;
|
|
802
|
+
/** Disables interaction and takes precedence over field context. */ disabled?: boolean;
|
|
803
|
+
/** Displays the mixed state and sets the native `indeterminate` property. This does not change `checked`. */ indeterminate?: boolean;
|
|
382
804
|
};
|
|
383
805
|
|
|
384
806
|
declare interface CheckboxVariant {
|
|
@@ -389,51 +811,135 @@ declare type CheckboxVariantProps = {
|
|
|
389
811
|
[key in keyof CheckboxVariant]?: ConditionalValue<CheckboxVariant[key]> | undefined
|
|
390
812
|
}
|
|
391
813
|
|
|
814
|
+
/**
|
|
815
|
+
* Renders a compact label, optionally with an action or dismissal control.
|
|
816
|
+
*
|
|
817
|
+
* A chip is static unless it has `onClick` or both a `value` and a parent
|
|
818
|
+
* `ChipGroup`. Grouped single-select chips use radio behavior and arrow-key
|
|
819
|
+
* roving focus; grouped multi-select chips use checkbox behavior. `before` and
|
|
820
|
+
* `after` slots inherit state through slot context.
|
|
821
|
+
*
|
|
822
|
+
* @example
|
|
823
|
+
* ```tsx
|
|
824
|
+
* <Chip dismissable onDismiss={() => remove('design')}>Design</Chip>
|
|
825
|
+
* ```
|
|
826
|
+
*/
|
|
392
827
|
export declare const Chip: (props: ChipProps) => JSX.Element;
|
|
393
828
|
|
|
829
|
+
/**
|
|
830
|
+
* Coordinates the selection and keyboard behavior of child {@link Chip} values.
|
|
831
|
+
*
|
|
832
|
+
* Use `value` with `onChange` for controlled selection, or `defaultValue` for
|
|
833
|
+
* initialization only. In a single-select group, arrow keys move focus and
|
|
834
|
+
* select the newly focused chip. Label the group with `label` when it needs an
|
|
835
|
+
* accessible name.
|
|
836
|
+
*
|
|
837
|
+
* @example
|
|
838
|
+
* ```tsx
|
|
839
|
+
* <ChipGroup type="single" defaultValue="all" label="Status">
|
|
840
|
+
* <Chip value="all">All</Chip>
|
|
841
|
+
* <Chip value="open">Open</Chip>
|
|
842
|
+
* </ChipGroup>
|
|
843
|
+
* ```
|
|
844
|
+
*/
|
|
394
845
|
export declare const ChipGroup: (props: ChipGroupProps) => JSX.Element;
|
|
395
846
|
|
|
847
|
+
/** Shared selection and keyboard-navigation state for a {@link ChipGroup}. */
|
|
396
848
|
declare type ChipGroupContextValue = {
|
|
849
|
+
/** The group's single- or multi-select behavior. */
|
|
397
850
|
type: ChipGroupType;
|
|
851
|
+
/** Optional size inherited by child chips. */
|
|
398
852
|
size?: ChipGroupSize;
|
|
853
|
+
/** Current selected value or values. */
|
|
399
854
|
value: string | string[];
|
|
855
|
+
/** Updates the group's selected value or values. */
|
|
400
856
|
onChange: (value: string | string[]) => void;
|
|
857
|
+
/** Optional shared form metadata supplied by the group. */
|
|
401
858
|
name?: string;
|
|
859
|
+
/** Registers a selectable child chip for keyboard navigation. */
|
|
402
860
|
registerChip: (value: string, ref: RefObject<HTMLButtonElement | null>) => void;
|
|
861
|
+
/** Removes a child chip from keyboard navigation. */
|
|
403
862
|
unregisterChip: (value: string) => void;
|
|
863
|
+
/** Moves focus to the next or previous registered chip. */
|
|
404
864
|
focusChip: (direction: 'next' | 'prev', currentValue: string) => void;
|
|
865
|
+
/** Registered selectable chip values in DOM registration order. */
|
|
405
866
|
chipValues: string[];
|
|
406
867
|
};
|
|
407
868
|
|
|
408
|
-
declare type
|
|
869
|
+
declare type ChipGroupOwnProps = {
|
|
870
|
+
/** Required selection model. `'single'` uses radio semantics; `'multi'` uses checkbox semantics. */
|
|
409
871
|
type: ChipGroupType;
|
|
872
|
+
/** Controlled selected value. Use a string for `'single'` or a string array for `'multi'`, with `onChange` to accept updates. */
|
|
410
873
|
value?: string | string[];
|
|
874
|
+
/**
|
|
875
|
+
* Initial selected value for an uncontrolled group. It is used only on first render.
|
|
876
|
+
* @default '' for `'single'`; [] for `'multi'`
|
|
877
|
+
*/
|
|
411
878
|
defaultValue?: string | string[];
|
|
879
|
+
/** Called with the next selection when a child chip is activated. */
|
|
412
880
|
onChange?: (value: string | string[]) => void;
|
|
881
|
+
/** `Chip` children. Chips require a unique `value` to participate in selection. */
|
|
413
882
|
children: ReactNode;
|
|
883
|
+
/** Size inherited by child chips unless a child supplies its own size. */
|
|
414
884
|
size?: ChipGroupSize;
|
|
885
|
+
/** Accessible name applied to the group container. */
|
|
415
886
|
label?: string;
|
|
887
|
+
/** Container identifier. When supplied, the container references `${id}-label`, which consumers must render themselves. */
|
|
416
888
|
id?: string;
|
|
889
|
+
/** Shared form metadata exposed to child-chip context; it does not create native form inputs. */
|
|
417
890
|
name?: string;
|
|
418
891
|
};
|
|
419
892
|
|
|
893
|
+
/** Props for {@link ChipGroup}, which coordinates selectable child chips. */
|
|
894
|
+
export declare type ChipGroupProps = Omit<BoxProps, keyof ChipGroupWrapProps | keyof ChipGroupOwnProps | 'role'> & ChipGroupWrapProps & ChipGroupOwnProps;
|
|
895
|
+
|
|
896
|
+
/** Chip recipe size inherited by `Chip` descendants of a group. */
|
|
420
897
|
declare type ChipGroupSize = ChipVariantProps['size'];
|
|
421
898
|
|
|
899
|
+
/** Selection model used by {@link ChipGroup}. */
|
|
422
900
|
declare type ChipGroupType = 'single' | 'multi';
|
|
423
901
|
|
|
424
|
-
declare type
|
|
902
|
+
declare type ChipGroupWrapProps = Pick<WrapProps, 'align' | 'columnGap' | 'gap' | 'justify' | 'rowGap'>;
|
|
903
|
+
|
|
904
|
+
/** Props for {@link Chip}, a compact label that can be static, actionable, selectable, or dismissible. */
|
|
905
|
+
export declare type ChipProps = Omit<BoxProps, keyof ChipVariantProps> & Omit<ChipVariantProps, 'before' | 'after' | 'dismissable'> & {
|
|
906
|
+
/** Visible chip label, also used in the default dismissal label. */
|
|
425
907
|
children: string;
|
|
908
|
+
/** Content displayed before the chip label. */
|
|
426
909
|
before?: ReactNode;
|
|
910
|
+
/** Content displayed after the chip label and before the dismiss control. */
|
|
427
911
|
after?: ReactNode;
|
|
912
|
+
/** Disables the primary action and dismiss button. The local value takes precedence over slot and field context. */
|
|
428
913
|
disabled?: boolean;
|
|
914
|
+
/** Shows a spinner and disables chip interaction. */
|
|
429
915
|
loading?: boolean;
|
|
916
|
+
/** Applies deleted styling without removing the chip from the DOM. */
|
|
430
917
|
deleted?: boolean;
|
|
918
|
+
/** Adds a dismiss button after the chip content. */
|
|
431
919
|
dismissable?: boolean;
|
|
920
|
+
/**
|
|
921
|
+
* Accessible name for the dismiss button.
|
|
922
|
+
* @default `Remove ${children}`
|
|
923
|
+
*/
|
|
432
924
|
dismissLabel?: string;
|
|
925
|
+
/** Ref forwarded to the dismiss button. */
|
|
926
|
+
dismissButtonRef?: Ref<HTMLButtonElement>;
|
|
927
|
+
/** Tab order override for the dismiss button. */
|
|
928
|
+
dismissButtonTabIndex?: number;
|
|
929
|
+
/** Applies error styling. The local value takes precedence over slot and field context. */
|
|
433
930
|
error?: boolean;
|
|
931
|
+
/** Marks the chip invalid with `aria-invalid`. The local value takes precedence over slot and field context. */
|
|
434
932
|
invalid?: boolean;
|
|
933
|
+
/** Called when the dismiss button is activated. The button is disabled when this callback is absent. */
|
|
435
934
|
onDismiss?: () => void;
|
|
935
|
+
/** Keyboard handler composed onto the dismiss button. */
|
|
936
|
+
onDismissKeyDown?: KeyboardEventHandler<HTMLButtonElement>;
|
|
937
|
+
/**
|
|
938
|
+
* Native type for the chip's primary button when it is selectable or has `onClick`.
|
|
939
|
+
* @default 'button'
|
|
940
|
+
*/
|
|
436
941
|
type?: 'button' | 'submit' | 'reset';
|
|
942
|
+
/** Value used by a parent `ChipGroup` to identify and select this chip. */
|
|
437
943
|
value?: string;
|
|
438
944
|
};
|
|
439
945
|
|
|
@@ -451,10 +957,24 @@ declare type ChipVariantProps = {
|
|
|
451
957
|
[key in keyof ChipVariant]?: ConditionalValue<ChipVariant[key]> | undefined
|
|
452
958
|
}
|
|
453
959
|
|
|
960
|
+
/**
|
|
961
|
+
* Renders code content in a native `code` element.
|
|
962
|
+
*
|
|
963
|
+
* Use `Pre` for a preformatted code block. `lang` supplies element language
|
|
964
|
+
* metadata; it does not perform syntax highlighting.
|
|
965
|
+
*
|
|
966
|
+
* @example
|
|
967
|
+
* ```tsx
|
|
968
|
+
* <Code>npm run build</Code>
|
|
969
|
+
* ```
|
|
970
|
+
*/
|
|
454
971
|
export declare const Code: (props: CodeProps) => JSX.Element;
|
|
455
972
|
|
|
456
|
-
|
|
973
|
+
/** Props accepted by {@link Code}. */
|
|
974
|
+
export declare type CodeProps = Omit<BoxProps, keyof CodeVariantProps | keyof TextProps> & CodeVariantProps & TextProps & {
|
|
975
|
+
/** Source code or inline content to render. */
|
|
457
976
|
children?: string | ReactNode;
|
|
977
|
+
/** Language metadata forwarded to the native `code` element. */
|
|
458
978
|
lang?: string;
|
|
459
979
|
};
|
|
460
980
|
|
|
@@ -466,7 +986,7 @@ declare type CodeVariantProps = {
|
|
|
466
986
|
[key in keyof CodeVariant]?: ConditionalValue<CodeVariant[key]> | undefined
|
|
467
987
|
}
|
|
468
988
|
|
|
469
|
-
declare type ColorToken = "transparent" | "current" | "inherit" | "neutral.0" | "neutral.10" | "neutral.20" | "neutral.30" | "neutral.40" | "neutral.50" | "neutral.60" | "neutral.70" | "neutral.80" | "neutral.90" | "neutral.100" | "neutral.110" | "neutralA.10" | "neutralA.20" | "neutralA.30" | "neutralA.40" | "neutralA.50" | "darkNeutral.0" | "darkNeutral.10" | "darkNeutral.20" | "darkNeutral.25" | "darkNeutral.30" | "darkNeutral.35" | "darkNeutral.40" | "darkNeutral.50" | "darkNeutral.60" | "darkNeutral.70" | "darkNeutral.80" | "darkNeutral.90" | "darkNeutral.100" | "darkNeutral.110" | "darkNeutral.120" | "darkNeutralA.10" | "darkNeutralA.20" | "darkNeutralA.25" | "darkNeutralA.30" | "darkNeutralA.35" | "darkNeutralA.40" | "darkNeutralA.50" | "darkNeutralA.-10" | "slate.0" | "slate.1" | "slate.2" | "slate.3" | "slate.4" | "slate.5" | "slate.10" | "slate.20" | "slate.30" | "slate.40" | "slate.50" | "slate.60" | "slate.70" | "slate.80" | "slate.90" | "slate.100" | "slate_inverse.0" | "slate_inverse.1" | "slate_inverse.2" | "slate_inverse.3" | "slate_inverse.4" | "slate_inverse.5" | "slate_inverse.10" | "slate_inverse.20" | "slate_inverse.30" | "slate_inverse.40" | "slate_inverse.50" | "slate_inverse.60" | "slate_inverse.70" | "slate_inverse.80" | "slate_inverse.90" | "slate_inverse.100" | "gold.1" | "gold.2" | "gold.3" | "gold.4" | "gold.5" | "gold.10" | "gold.15" | "gold.20" | "gold.30" | "gold.40" | "gold.50" | "gold.60" | "gold.70" | "gold.80" | "gold.90" | "blue.1" | "blue.2" | "blue.3" | "blue.4" | "blue.5" | "blue.10" | "blue.20" | "blue.30" | "blue.40" | "blue.50" | "blue.60" | "blue.70" | "blue.80" | "blue.90" | "green.1" | "green.2" | "green.3" | "green.4" | "green.5" | "green.10" | "green.20" | "green.30" | "green.40" | "green.50" | "green.60" | "green.70" | "green.80" | "green.90" | "yellow.1" | "yellow.2" | "yellow.3" | "yellow.4" | "yellow.5" | "yellow.10" | "yellow.20" | "yellow.30" | "yellow.40" | "yellow.50" | "yellow.60" | "yellow.70" | "yellow.80" | "yellow.90" | "red.1" | "red.2" | "red.3" | "red.4" | "red.5" | "red.10" | "red.20" | "red.30" | "red.40" | "red.50" | "red.60" | "red.70" | "red.80" | "red.90" | "tomato.5" | "tomato.10" | "tomato.20" | "tomato.30" | "tomato.40" | "tomato.50" | "tomato.60" | "tomato.70" | "tomato.80" | "tomato.90" | "tan.5" | "tan.10" | "tan.20" | "tan.30" | "tan.40" | "tan.50" | "tan.60" | "tan.70" | "tan.80" | "tan.90" | "orange.5" | "orange.10" | "orange.20" | "orange.30" | "orange.40" | "orange.50" | "orange.60" | "orange.70" | "orange.80" | "orange.90" | "pear.5" | "pear.10" | "pear.20" | "pear.30" | "pear.40" | "pear.50" | "pear.60" | "pear.70" | "pear.80" | "pear.90" | "grass.5" | "grass.10" | "grass.20" | "grass.30" | "grass.40" | "grass.50" | "grass.60" | "grass.70" | "grass.80" | "grass.90" | "mint.5" | "mint.10" | "mint.20" | "mint.30" | "mint.40" | "mint.50" | "mint.60" | "mint.70" | "mint.80" | "mint.90" | "cyan.5" | "cyan.10" | "cyan.20" | "cyan.30" | "cyan.40" | "cyan.50" | "cyan.60" | "cyan.70" | "cyan.80" | "cyan.90" | "indigo.5" | "indigo.10" | "indigo.20" | "indigo.30" | "indigo.40" | "indigo.50" | "indigo.60" | "indigo.70" | "indigo.80" | "indigo.90" | "purple.5" | "purple.10" | "purple.20" | "purple.30" | "purple.40" | "purple.50" | "purple.60" | "purple.70" | "purple.80" | "purple.90" | "violet.5" | "violet.10" | "violet.20" | "violet.30" | "violet.40" | "violet.50" | "violet.60" | "violet.70" | "violet.80" | "violet.90" | "pink.5" | "pink.10" | "pink.20" | "pink.30" | "pink.40" | "pink.50" | "pink.60" | "pink.70" | "pink.80" | "pink.90" | "rose.5" | "rose.10" | "rose.20" | "rose.30" | "rose.40" | "rose.50" | "rose.60" | "rose.70" | "rose.80" | "rose.90" | "magenta.5" | "magenta.10" | "magenta.20" | "magenta.30" | "magenta.40" | "magenta.50" | "magenta.60" | "magenta.70" | "magenta.80" | "magenta.90" | "shadow.8" | "shadow.16" | "shadow.24" | "shadow.32" | "shadow.40" | "shadow.48" | "shadow.56" | "shadow.64" | "bg.disabled" | "bg.neutral" | "bg.neutral.hovered" | "bg.neutral.pressed" | "bg.neutral.bold" | "bg.neutral.bold.hovered" | "bg.neutral.bold.pressed" | "bg.neutral.boldest" | "bg.neutral.subtle" | "bg.neutral.subtle.hovered" | "bg.neutral.subtle.pressed" | "bg.neutral.inverse" | "bg.neutral.inverse.subtle" | "bg.neutral.inverse.subtle.hovered" | "bg.neutral.solid" | "bg.selected" | "bg.selected.hovered" | "bg.selected.pressed" | "bg.selected.bold" | "bg.selected.bold.hovered" | "bg.selected.bold.pressed" | "bg.success" | "bg.success.hovered" | "bg.success.pressed" | "bg.success.bold" | "bg.success.bold.hovered" | "bg.success.bold.pressed" | "bg.warning" | "bg.warning.hovered" | "bg.warning.pressed" | "bg.warning.bold" | "bg.warning.bold.hovered" | "bg.warning.bold.pressed" | "bg.danger" | "bg.danger.hovered" | "bg.danger.pressed" | "bg.danger.bold" | "bg.danger.bold.hovered" | "bg.danger.bold.pressed" | "bg.info" | "bg.info.hovered" | "bg.info.pressed" | "bg.info.bold" | "bg.info.bold.hovered" | "bg.info.bold.pressed" | "bg.cta" | "bg.cta.hovered" | "bg.cta.pressed" | "bg.cta.bold" | "bg.cta.bold.hovered" | "bg.cta.bold.pressed" | "bg.input" | "bg.input.hovered" | "bg.input.pressed" | "bg.accent.neutral" | "bg.accent.neutral.subtle" | "bg.accent.neutral.subtlest" | "bg.accent.neutral.bold" | "bg.accent.gold" | "bg.accent.gold.subtle" | "bg.accent.gold.subtlest" | "bg.accent.gold.bold" | "bg.accent.blue" | "bg.accent.blue.subtle" | "bg.accent.blue.subtlest" | "bg.accent.blue.bold" | "bg.accent.green" | "bg.accent.green.subtle" | "bg.accent.green.subtlest" | "bg.accent.green.bold" | "bg.accent.yellow" | "bg.accent.yellow.subtle" | "bg.accent.yellow.subtlest" | "bg.accent.yellow.bold" | "bg.accent.red" | "bg.accent.red.subtle" | "bg.accent.red.subtlest" | "bg.accent.red.bold" | "bg.accent.tomato" | "bg.accent.tomato.subtle" | "bg.accent.tomato.subtlest" | "bg.accent.tomato.bold" | "bg.accent.tan" | "bg.accent.tan.subtle" | "bg.accent.tan.subtlest" | "bg.accent.tan.bold" | "bg.accent.orange" | "bg.accent.orange.subtle" | "bg.accent.orange.subtlest" | "bg.accent.orange.bold" | "bg.accent.pear" | "bg.accent.pear.subtle" | "bg.accent.pear.subtlest" | "bg.accent.pear.bold" | "bg.accent.grass" | "bg.accent.grass.subtle" | "bg.accent.grass.subtlest" | "bg.accent.grass.bold" | "bg.accent.mint" | "bg.accent.mint.subtle" | "bg.accent.mint.subtlest" | "bg.accent.mint.bold" | "bg.accent.cyan" | "bg.accent.cyan.subtle" | "bg.accent.cyan.subtlest" | "bg.accent.cyan.bold" | "bg.accent.indigo" | "bg.accent.indigo.subtle" | "bg.accent.indigo.subtlest" | "bg.accent.indigo.bold" | "bg.accent.purple" | "bg.accent.purple.subtle" | "bg.accent.purple.subtlest" | "bg.accent.purple.bold" | "bg.accent.violet" | "bg.accent.violet.subtle" | "bg.accent.violet.subtlest" | "bg.accent.violet.bold" | "bg.accent.pink" | "bg.accent.pink.subtle" | "bg.accent.pink.subtlest" | "bg.accent.pink.bold" | "bg.accent.rose" | "bg.accent.rose.subtle" | "bg.accent.rose.subtlest" | "bg.accent.rose.bold" | "bg.accent.magenta" | "bg.accent.magenta.subtle" | "bg.accent.magenta.subtlest" | "bg.accent.magenta.bold" | "bg.slate.0" | "bg.slate.1" | "bg.slate.2" | "bg.slate.3" | "bg.slate.4" | "bg.slate.5" | "bg.slate.10" | "bg.slate.20" | "bg.slate.30" | "bg.slate.40" | "bg.slate.50" | "bg.slate.60" | "bg.slate.70" | "bg.slate.80" | "bg.slate.90" | "bg.slate.100" | "blanket" | "blanket.danger" | "blanket.selected" | "border" | "border.bold" | "border.inverse" | "border.inverse.focused" | "border.disabled" | "border.focused" | "border.focused.inverse" | "border.selected" | "border.input" | "border.success" | "border.warning" | "border.danger" | "border.info" | "icon" | "icon.subtle" | "icon.subtlest" | "icon.inverse" | "icon.selected" | "icon.disabled" | "icon.decorative" | "icon.decorative.hovered" | "icon.decorative.inverse" | "icon.decorative.inverse.hovered" | "icon.decorative.subtle" | "icon.success" | "icon.warning" | "icon.warning.inverse" | "icon.danger" | "icon.danger.inverse" | "icon.info" | "icon.cta" | "icon.cta.hovered" | "link" | "link.pressed" | "surface" | "surface.hovered" | "surface.pressed" | "surface.raised" | "surface.raised.hovered" | "surface.raised.pressed" | "surface.overlay" | "surface.overlay.hovered" | "surface.overlay.pressed" | "surface.sunken" | "surface.selected" | "surface.selected.hovered" | "surface.selected.pressed" | "text" | "text.subtle" | "text.subtlest" | "text.bold" | "text.inverse" | "text.inverse.subtlest" | "text.selected" | "text.placeholder" | "text.disabled" | "text.success" | "text.success.inverse" | "text.warning" | "text.warning.inverse" | "text.danger" | "text.danger.inverse" | "text.info" | "text.info.inverse" | "text.cta" | "text.cta.inverse" | "text.accent.neutral" | "text.accent.neutral.bold" | "text.accent.gold" | "text.accent.gold.bold" | "text.accent.blue" | "text.accent.blue.bold" | "text.accent.green" | "text.accent.green.bold" | "text.accent.yellow" | "text.accent.yellow.bold" | "text.accent.red" | "text.accent.red.bold" | "text.accent.tomato" | "text.accent.tomato.bold" | "text.accent.tan" | "text.accent.tan.bold" | "text.accent.orange" | "text.accent.orange.bold" | "text.accent.pear" | "text.accent.pear.bold" | "text.accent.grass" | "text.accent.grass.bold" | "text.accent.mint" | "text.accent.mint.bold" | "text.accent.cyan" | "text.accent.cyan.bold" | "text.accent.indigo" | "text.accent.indigo.bold" | "text.accent.purple" | "text.accent.purple.bold" | "text.accent.violet" | "text.accent.violet.bold" | "text.accent.pink" | "text.accent.pink.bold" | "text.accent.rose" | "text.accent.rose.bold" | "text.accent.magenta" | "text.accent.magenta.bold" | "brand.slate" | "brand.gold" | "success.lighter" | "success.light" | "success.default" | "success.dark" | "success.darker" | "warning.lighter" | "warning.light" | "warning.default" | "warning.dark" | "warning.darker" | "error.lighter" | "error.light" | "error.default" | "error.dark" | "error.darker" | "info.lighter" | "info.light" | "info.default" | "info.dark" | "info.darker" | "shadow.raised.1" | "shadow.raised.2" | "shadow.elevated.1" | "shadow.elevated.2" | "shadow.elevated.3" | "shadow.overlay.1" | "shadow.overlay.2" | "shadow.overlay.3" | "shadow.overlay.4" | "shadow.overlay.5" | "shadow.overflow.1" | "shadow.overflow.2" | "shadow.overflow.3" | "utility.shadowColor" | "utility.headingColor" | "utility.textColor" | "utility.borderColor" | "colorPalette" | "colorPalette.0" | "colorPalette.10" | "colorPalette.20" | "colorPalette.30" | "colorPalette.40" | "colorPalette.50" | "colorPalette.60" | "colorPalette.70" | "colorPalette.80" | "colorPalette.90" | "colorPalette.100" | "colorPalette.110" | "colorPalette.25" | "colorPalette.35" | "colorPalette.120" | "colorPalette.-10" | "colorPalette.1" | "colorPalette.2" | "colorPalette.3" | "colorPalette.4" | "colorPalette.5" | "colorPalette.15" | "colorPalette.8" | "colorPalette.16" | "colorPalette.24" | "colorPalette.32" | "colorPalette.48" | "colorPalette.56" | "colorPalette.64" | "colorPalette.disabled" | "colorPalette.neutral" | "colorPalette.neutral.hovered" | "colorPalette.hovered" | "colorPalette.neutral.pressed" | "colorPalette.pressed" | "colorPalette.neutral.bold" | "colorPalette.bold" | "colorPalette.neutral.bold.hovered" | "colorPalette.bold.hovered" | "colorPalette.neutral.bold.pressed" | "colorPalette.bold.pressed" | "colorPalette.neutral.boldest" | "colorPalette.boldest" | "colorPalette.neutral.subtle" | "colorPalette.subtle" | "colorPalette.neutral.subtle.hovered" | "colorPalette.subtle.hovered" | "colorPalette.neutral.subtle.pressed" | "colorPalette.subtle.pressed" | "colorPalette.neutral.inverse" | "colorPalette.inverse" | "colorPalette.neutral.inverse.subtle" | "colorPalette.inverse.subtle" | "colorPalette.neutral.inverse.subtle.hovered" | "colorPalette.inverse.subtle.hovered" | "colorPalette.neutral.solid" | "colorPalette.solid" | "colorPalette.selected" | "colorPalette.selected.hovered" | "colorPalette.selected.pressed" | "colorPalette.selected.bold" | "colorPalette.selected.bold.hovered" | "colorPalette.selected.bold.pressed" | "colorPalette.success" | "colorPalette.success.hovered" | "colorPalette.success.pressed" | "colorPalette.success.bold" | "colorPalette.success.bold.hovered" | "colorPalette.success.bold.pressed" | "colorPalette.warning" | "colorPalette.warning.hovered" | "colorPalette.warning.pressed" | "colorPalette.warning.bold" | "colorPalette.warning.bold.hovered" | "colorPalette.warning.bold.pressed" | "colorPalette.danger" | "colorPalette.danger.hovered" | "colorPalette.danger.pressed" | "colorPalette.danger.bold" | "colorPalette.danger.bold.hovered" | "colorPalette.danger.bold.pressed" | "colorPalette.info" | "colorPalette.info.hovered" | "colorPalette.info.pressed" | "colorPalette.info.bold" | "colorPalette.info.bold.hovered" | "colorPalette.info.bold.pressed" | "colorPalette.cta" | "colorPalette.cta.hovered" | "colorPalette.cta.pressed" | "colorPalette.cta.bold" | "colorPalette.cta.bold.hovered" | "colorPalette.cta.bold.pressed" | "colorPalette.input" | "colorPalette.input.hovered" | "colorPalette.input.pressed" | "colorPalette.accent.neutral" | "colorPalette.accent.neutral.subtle" | "colorPalette.accent.neutral.subtlest" | "colorPalette.neutral.subtlest" | "colorPalette.subtlest" | "colorPalette.accent.neutral.bold" | "colorPalette.accent.gold" | "colorPalette.gold" | "colorPalette.accent.gold.subtle" | "colorPalette.gold.subtle" | "colorPalette.accent.gold.subtlest" | "colorPalette.gold.subtlest" | "colorPalette.accent.gold.bold" | "colorPalette.gold.bold" | "colorPalette.accent.blue" | "colorPalette.blue" | "colorPalette.accent.blue.subtle" | "colorPalette.blue.subtle" | "colorPalette.accent.blue.subtlest" | "colorPalette.blue.subtlest" | "colorPalette.accent.blue.bold" | "colorPalette.blue.bold" | "colorPalette.accent.green" | "colorPalette.green" | "colorPalette.accent.green.subtle" | "colorPalette.green.subtle" | "colorPalette.accent.green.subtlest" | "colorPalette.green.subtlest" | "colorPalette.accent.green.bold" | "colorPalette.green.bold" | "colorPalette.accent.yellow" | "colorPalette.yellow" | "colorPalette.accent.yellow.subtle" | "colorPalette.yellow.subtle" | "colorPalette.accent.yellow.subtlest" | "colorPalette.yellow.subtlest" | "colorPalette.accent.yellow.bold" | "colorPalette.yellow.bold" | "colorPalette.accent.red" | "colorPalette.red" | "colorPalette.accent.red.subtle" | "colorPalette.red.subtle" | "colorPalette.accent.red.subtlest" | "colorPalette.red.subtlest" | "colorPalette.accent.red.bold" | "colorPalette.red.bold" | "colorPalette.accent.tomato" | "colorPalette.tomato" | "colorPalette.accent.tomato.subtle" | "colorPalette.tomato.subtle" | "colorPalette.accent.tomato.subtlest" | "colorPalette.tomato.subtlest" | "colorPalette.accent.tomato.bold" | "colorPalette.tomato.bold" | "colorPalette.accent.tan" | "colorPalette.tan" | "colorPalette.accent.tan.subtle" | "colorPalette.tan.subtle" | "colorPalette.accent.tan.subtlest" | "colorPalette.tan.subtlest" | "colorPalette.accent.tan.bold" | "colorPalette.tan.bold" | "colorPalette.accent.orange" | "colorPalette.orange" | "colorPalette.accent.orange.subtle" | "colorPalette.orange.subtle" | "colorPalette.accent.orange.subtlest" | "colorPalette.orange.subtlest" | "colorPalette.accent.orange.bold" | "colorPalette.orange.bold" | "colorPalette.accent.pear" | "colorPalette.pear" | "colorPalette.accent.pear.subtle" | "colorPalette.pear.subtle" | "colorPalette.accent.pear.subtlest" | "colorPalette.pear.subtlest" | "colorPalette.accent.pear.bold" | "colorPalette.pear.bold" | "colorPalette.accent.grass" | "colorPalette.grass" | "colorPalette.accent.grass.subtle" | "colorPalette.grass.subtle" | "colorPalette.accent.grass.subtlest" | "colorPalette.grass.subtlest" | "colorPalette.accent.grass.bold" | "colorPalette.grass.bold" | "colorPalette.accent.mint" | "colorPalette.mint" | "colorPalette.accent.mint.subtle" | "colorPalette.mint.subtle" | "colorPalette.accent.mint.subtlest" | "colorPalette.mint.subtlest" | "colorPalette.accent.mint.bold" | "colorPalette.mint.bold" | "colorPalette.accent.cyan" | "colorPalette.cyan" | "colorPalette.accent.cyan.subtle" | "colorPalette.cyan.subtle" | "colorPalette.accent.cyan.subtlest" | "colorPalette.cyan.subtlest" | "colorPalette.accent.cyan.bold" | "colorPalette.cyan.bold" | "colorPalette.accent.indigo" | "colorPalette.indigo" | "colorPalette.accent.indigo.subtle" | "colorPalette.indigo.subtle" | "colorPalette.accent.indigo.subtlest" | "colorPalette.indigo.subtlest" | "colorPalette.accent.indigo.bold" | "colorPalette.indigo.bold" | "colorPalette.accent.purple" | "colorPalette.purple" | "colorPalette.accent.purple.subtle" | "colorPalette.purple.subtle" | "colorPalette.accent.purple.subtlest" | "colorPalette.purple.subtlest" | "colorPalette.accent.purple.bold" | "colorPalette.purple.bold" | "colorPalette.accent.violet" | "colorPalette.violet" | "colorPalette.accent.violet.subtle" | "colorPalette.violet.subtle" | "colorPalette.accent.violet.subtlest" | "colorPalette.violet.subtlest" | "colorPalette.accent.violet.bold" | "colorPalette.violet.bold" | "colorPalette.accent.pink" | "colorPalette.pink" | "colorPalette.accent.pink.subtle" | "colorPalette.pink.subtle" | "colorPalette.accent.pink.subtlest" | "colorPalette.pink.subtlest" | "colorPalette.accent.pink.bold" | "colorPalette.pink.bold" | "colorPalette.accent.rose" | "colorPalette.rose" | "colorPalette.accent.rose.subtle" | "colorPalette.rose.subtle" | "colorPalette.accent.rose.subtlest" | "colorPalette.rose.subtlest" | "colorPalette.accent.rose.bold" | "colorPalette.rose.bold" | "colorPalette.accent.magenta" | "colorPalette.magenta" | "colorPalette.accent.magenta.subtle" | "colorPalette.magenta.subtle" | "colorPalette.accent.magenta.subtlest" | "colorPalette.magenta.subtlest" | "colorPalette.accent.magenta.bold" | "colorPalette.magenta.bold" | "colorPalette.slate.0" | "colorPalette.slate.1" | "colorPalette.slate.2" | "colorPalette.slate.3" | "colorPalette.slate.4" | "colorPalette.slate.5" | "colorPalette.slate.10" | "colorPalette.slate.20" | "colorPalette.slate.30" | "colorPalette.slate.40" | "colorPalette.slate.50" | "colorPalette.slate.60" | "colorPalette.slate.70" | "colorPalette.slate.80" | "colorPalette.slate.90" | "colorPalette.slate.100" | "colorPalette.inverse.focused" | "colorPalette.focused" | "colorPalette.focused.inverse" | "colorPalette.decorative" | "colorPalette.decorative.hovered" | "colorPalette.decorative.inverse" | "colorPalette.decorative.inverse.hovered" | "colorPalette.inverse.hovered" | "colorPalette.decorative.subtle" | "colorPalette.warning.inverse" | "colorPalette.danger.inverse" | "colorPalette.raised" | "colorPalette.raised.hovered" | "colorPalette.raised.pressed" | "colorPalette.overlay" | "colorPalette.overlay.hovered" | "colorPalette.overlay.pressed" | "colorPalette.sunken" | "colorPalette.inverse.subtlest" | "colorPalette.placeholder" | "colorPalette.success.inverse" | "colorPalette.info.inverse" | "colorPalette.cta.inverse" | "colorPalette.slate" | "colorPalette.lighter" | "colorPalette.light" | "colorPalette.default" | "colorPalette.dark" | "colorPalette.darker" | "colorPalette.raised.1" | "colorPalette.raised.2" | "colorPalette.elevated.1" | "colorPalette.elevated.2" | "colorPalette.elevated.3" | "colorPalette.overlay.1" | "colorPalette.overlay.2" | "colorPalette.overlay.3" | "colorPalette.overlay.4" | "colorPalette.overlay.5" | "colorPalette.overflow.1" | "colorPalette.overflow.2" | "colorPalette.overflow.3" | "colorPalette.shadowColor" | "colorPalette.headingColor" | "colorPalette.textColor" | "colorPalette.borderColor"
|
|
989
|
+
declare type ColorToken = "transparent" | "current" | "inherit" | "neutral.0" | "neutral.10" | "neutral.20" | "neutral.30" | "neutral.40" | "neutral.50" | "neutral.60" | "neutral.70" | "neutral.80" | "neutral.90" | "neutral.100" | "neutral.110" | "neutralA.10" | "neutralA.20" | "neutralA.30" | "neutralA.40" | "neutralA.50" | "darkNeutral.0" | "darkNeutral.10" | "darkNeutral.20" | "darkNeutral.25" | "darkNeutral.30" | "darkNeutral.35" | "darkNeutral.40" | "darkNeutral.50" | "darkNeutral.60" | "darkNeutral.70" | "darkNeutral.80" | "darkNeutral.90" | "darkNeutral.100" | "darkNeutral.110" | "darkNeutral.120" | "darkNeutralA.10" | "darkNeutralA.20" | "darkNeutralA.25" | "darkNeutralA.30" | "darkNeutralA.35" | "darkNeutralA.40" | "darkNeutralA.50" | "darkNeutralA.-10" | "slate.0" | "slate.1" | "slate.2" | "slate.3" | "slate.4" | "slate.5" | "slate.10" | "slate.20" | "slate.30" | "slate.40" | "slate.50" | "slate.60" | "slate.70" | "slate.80" | "slate.90" | "slate.100" | "slate_inverse.0" | "slate_inverse.1" | "slate_inverse.2" | "slate_inverse.3" | "slate_inverse.4" | "slate_inverse.5" | "slate_inverse.10" | "slate_inverse.20" | "slate_inverse.30" | "slate_inverse.40" | "slate_inverse.50" | "slate_inverse.60" | "slate_inverse.70" | "slate_inverse.80" | "slate_inverse.90" | "slate_inverse.100" | "gold.1" | "gold.2" | "gold.3" | "gold.4" | "gold.5" | "gold.10" | "gold.15" | "gold.20" | "gold.30" | "gold.40" | "gold.50" | "gold.60" | "gold.70" | "gold.80" | "gold.90" | "blue.1" | "blue.2" | "blue.3" | "blue.4" | "blue.5" | "blue.10" | "blue.20" | "blue.30" | "blue.40" | "blue.50" | "blue.60" | "blue.70" | "blue.80" | "blue.90" | "green.1" | "green.2" | "green.3" | "green.4" | "green.5" | "green.10" | "green.20" | "green.30" | "green.40" | "green.50" | "green.60" | "green.70" | "green.80" | "green.90" | "yellow.1" | "yellow.2" | "yellow.3" | "yellow.4" | "yellow.5" | "yellow.10" | "yellow.20" | "yellow.30" | "yellow.40" | "yellow.50" | "yellow.60" | "yellow.70" | "yellow.80" | "yellow.90" | "red.1" | "red.2" | "red.3" | "red.4" | "red.5" | "red.10" | "red.20" | "red.30" | "red.40" | "red.50" | "red.60" | "red.70" | "red.80" | "red.90" | "tomato.5" | "tomato.10" | "tomato.20" | "tomato.30" | "tomato.40" | "tomato.50" | "tomato.60" | "tomato.70" | "tomato.80" | "tomato.90" | "tan.5" | "tan.10" | "tan.20" | "tan.30" | "tan.40" | "tan.50" | "tan.60" | "tan.70" | "tan.80" | "tan.90" | "orange.5" | "orange.10" | "orange.20" | "orange.30" | "orange.40" | "orange.50" | "orange.60" | "orange.70" | "orange.80" | "orange.90" | "pear.5" | "pear.10" | "pear.20" | "pear.30" | "pear.40" | "pear.50" | "pear.60" | "pear.70" | "pear.80" | "pear.90" | "grass.5" | "grass.10" | "grass.20" | "grass.30" | "grass.40" | "grass.50" | "grass.60" | "grass.70" | "grass.80" | "grass.90" | "mint.5" | "mint.10" | "mint.20" | "mint.30" | "mint.40" | "mint.50" | "mint.60" | "mint.70" | "mint.80" | "mint.90" | "cyan.5" | "cyan.10" | "cyan.20" | "cyan.30" | "cyan.40" | "cyan.50" | "cyan.60" | "cyan.70" | "cyan.80" | "cyan.90" | "indigo.5" | "indigo.10" | "indigo.20" | "indigo.30" | "indigo.40" | "indigo.50" | "indigo.60" | "indigo.70" | "indigo.80" | "indigo.90" | "purple.5" | "purple.10" | "purple.20" | "purple.30" | "purple.40" | "purple.50" | "purple.60" | "purple.70" | "purple.80" | "purple.90" | "violet.5" | "violet.10" | "violet.20" | "violet.30" | "violet.40" | "violet.50" | "violet.60" | "violet.70" | "violet.80" | "violet.90" | "pink.5" | "pink.10" | "pink.20" | "pink.30" | "pink.40" | "pink.50" | "pink.60" | "pink.70" | "pink.80" | "pink.90" | "rose.5" | "rose.10" | "rose.20" | "rose.30" | "rose.40" | "rose.50" | "rose.60" | "rose.70" | "rose.80" | "rose.90" | "magenta.5" | "magenta.10" | "magenta.20" | "magenta.30" | "magenta.40" | "magenta.50" | "magenta.60" | "magenta.70" | "magenta.80" | "magenta.90" | "shadow.8" | "shadow.16" | "shadow.24" | "shadow.32" | "shadow.40" | "shadow.48" | "shadow.56" | "shadow.64" | "bg.disabled" | "bg.neutral" | "bg.neutral.hovered" | "bg.neutral.pressed" | "bg.neutral.bold" | "bg.neutral.bold.hovered" | "bg.neutral.bold.pressed" | "bg.neutral.boldest" | "bg.neutral.subtle" | "bg.neutral.subtle.hovered" | "bg.neutral.subtle.pressed" | "bg.neutral.inverse" | "bg.neutral.inverse.subtle" | "bg.neutral.inverse.subtle.hovered" | "bg.neutral.solid" | "bg.selected" | "bg.selected.hovered" | "bg.selected.pressed" | "bg.selected.bold" | "bg.selected.bold.hovered" | "bg.selected.bold.pressed" | "bg.success" | "bg.success.hovered" | "bg.success.pressed" | "bg.success.bold" | "bg.success.bold.hovered" | "bg.success.bold.pressed" | "bg.success.subtle" | "bg.success.subtle.hovered" | "bg.success.subtle.pressed" | "bg.warning" | "bg.warning.hovered" | "bg.warning.pressed" | "bg.warning.bold" | "bg.warning.bold.hovered" | "bg.warning.bold.pressed" | "bg.warning.subtle" | "bg.warning.subtle.hovered" | "bg.warning.subtle.pressed" | "bg.danger" | "bg.danger.hovered" | "bg.danger.pressed" | "bg.danger.bold" | "bg.danger.bold.hovered" | "bg.danger.bold.pressed" | "bg.danger.subtle" | "bg.danger.subtle.hovered" | "bg.danger.subtle.pressed" | "bg.info" | "bg.info.hovered" | "bg.info.pressed" | "bg.info.bold" | "bg.info.bold.hovered" | "bg.info.bold.pressed" | "bg.info.subtle" | "bg.info.subtle.hovered" | "bg.info.subtle.pressed" | "bg.cta" | "bg.cta.hovered" | "bg.cta.pressed" | "bg.cta.bold" | "bg.cta.bold.hovered" | "bg.cta.bold.pressed" | "bg.input" | "bg.input.hovered" | "bg.input.pressed" | "bg.accent.neutral" | "bg.accent.neutral.subtle" | "bg.accent.neutral.subtlest" | "bg.accent.neutral.bold" | "bg.accent.gold" | "bg.accent.gold.subtle" | "bg.accent.gold.subtlest" | "bg.accent.gold.bold" | "bg.accent.blue" | "bg.accent.blue.subtle" | "bg.accent.blue.subtlest" | "bg.accent.blue.bold" | "bg.accent.green" | "bg.accent.green.subtle" | "bg.accent.green.subtlest" | "bg.accent.green.bold" | "bg.accent.yellow" | "bg.accent.yellow.subtle" | "bg.accent.yellow.subtlest" | "bg.accent.yellow.bold" | "bg.accent.red" | "bg.accent.red.subtle" | "bg.accent.red.subtlest" | "bg.accent.red.bold" | "bg.accent.tomato" | "bg.accent.tomato.subtle" | "bg.accent.tomato.subtlest" | "bg.accent.tomato.bold" | "bg.accent.tan" | "bg.accent.tan.subtle" | "bg.accent.tan.subtlest" | "bg.accent.tan.bold" | "bg.accent.orange" | "bg.accent.orange.subtle" | "bg.accent.orange.subtlest" | "bg.accent.orange.bold" | "bg.accent.pear" | "bg.accent.pear.subtle" | "bg.accent.pear.subtlest" | "bg.accent.pear.bold" | "bg.accent.grass" | "bg.accent.grass.subtle" | "bg.accent.grass.subtlest" | "bg.accent.grass.bold" | "bg.accent.mint" | "bg.accent.mint.subtle" | "bg.accent.mint.subtlest" | "bg.accent.mint.bold" | "bg.accent.cyan" | "bg.accent.cyan.subtle" | "bg.accent.cyan.subtlest" | "bg.accent.cyan.bold" | "bg.accent.indigo" | "bg.accent.indigo.subtle" | "bg.accent.indigo.subtlest" | "bg.accent.indigo.bold" | "bg.accent.purple" | "bg.accent.purple.subtle" | "bg.accent.purple.subtlest" | "bg.accent.purple.bold" | "bg.accent.violet" | "bg.accent.violet.subtle" | "bg.accent.violet.subtlest" | "bg.accent.violet.bold" | "bg.accent.pink" | "bg.accent.pink.subtle" | "bg.accent.pink.subtlest" | "bg.accent.pink.bold" | "bg.accent.rose" | "bg.accent.rose.subtle" | "bg.accent.rose.subtlest" | "bg.accent.rose.bold" | "bg.accent.magenta" | "bg.accent.magenta.subtle" | "bg.accent.magenta.subtlest" | "bg.accent.magenta.bold" | "bg.slate.0" | "bg.slate.1" | "bg.slate.2" | "bg.slate.3" | "bg.slate.4" | "bg.slate.5" | "bg.slate.10" | "bg.slate.20" | "bg.slate.30" | "bg.slate.40" | "bg.slate.50" | "bg.slate.60" | "bg.slate.70" | "bg.slate.80" | "bg.slate.90" | "bg.slate.100" | "blanket" | "blanket.danger" | "blanket.selected" | "border" | "border.bold" | "border.inverse" | "border.inverse.focused" | "border.disabled" | "border.focused" | "border.focused.inverse" | "border.selected" | "border.input" | "border.success" | "border.warning" | "border.danger" | "border.info" | "icon" | "icon.subtle" | "icon.subtlest" | "icon.inverse" | "icon.selected" | "icon.disabled" | "icon.decorative" | "icon.decorative.hovered" | "icon.decorative.inverse" | "icon.decorative.inverse.hovered" | "icon.decorative.subtle" | "icon.success" | "icon.warning" | "icon.warning.inverse" | "icon.danger" | "icon.danger.inverse" | "icon.info" | "icon.cta" | "icon.cta.hovered" | "link" | "link.pressed" | "surface" | "surface.hovered" | "surface.pressed" | "surface.raised" | "surface.raised.hovered" | "surface.raised.pressed" | "surface.overlay" | "surface.overlay.hovered" | "surface.overlay.pressed" | "surface.sunken" | "surface.selected" | "surface.selected.hovered" | "surface.selected.pressed" | "text" | "text.subtle" | "text.subtlest" | "text.bold" | "text.inverse" | "text.inverse.subtlest" | "text.selected" | "text.placeholder" | "text.disabled" | "text.success" | "text.success.inverse" | "text.warning" | "text.warning.inverse" | "text.danger" | "text.danger.inverse" | "text.info" | "text.info.inverse" | "text.cta" | "text.cta.inverse" | "text.accent.neutral" | "text.accent.neutral.bold" | "text.accent.gold" | "text.accent.gold.bold" | "text.accent.blue" | "text.accent.blue.bold" | "text.accent.green" | "text.accent.green.bold" | "text.accent.yellow" | "text.accent.yellow.bold" | "text.accent.red" | "text.accent.red.bold" | "text.accent.tomato" | "text.accent.tomato.bold" | "text.accent.tan" | "text.accent.tan.bold" | "text.accent.orange" | "text.accent.orange.bold" | "text.accent.pear" | "text.accent.pear.bold" | "text.accent.grass" | "text.accent.grass.bold" | "text.accent.mint" | "text.accent.mint.bold" | "text.accent.cyan" | "text.accent.cyan.bold" | "text.accent.indigo" | "text.accent.indigo.bold" | "text.accent.purple" | "text.accent.purple.bold" | "text.accent.violet" | "text.accent.violet.bold" | "text.accent.pink" | "text.accent.pink.bold" | "text.accent.rose" | "text.accent.rose.bold" | "text.accent.magenta" | "text.accent.magenta.bold" | "brand.slate" | "brand.gold" | "success.lighter" | "success.light" | "success.default" | "success.dark" | "success.darker" | "warning.lighter" | "warning.light" | "warning.default" | "warning.dark" | "warning.darker" | "error.lighter" | "error.light" | "error.default" | "error.dark" | "error.darker" | "info.lighter" | "info.light" | "info.default" | "info.dark" | "info.darker" | "shadow.raised.1" | "shadow.raised.2" | "shadow.elevated.1" | "shadow.elevated.2" | "shadow.elevated.3" | "shadow.overlay.1" | "shadow.overlay.2" | "shadow.overlay.3" | "shadow.overlay.4" | "shadow.overlay.5" | "shadow.overflow.1" | "shadow.overflow.2" | "shadow.overflow.3" | "utility.shadowColor" | "utility.headingColor" | "utility.textColor" | "utility.borderColor" | "colorPalette" | "colorPalette.0" | "colorPalette.10" | "colorPalette.20" | "colorPalette.30" | "colorPalette.40" | "colorPalette.50" | "colorPalette.60" | "colorPalette.70" | "colorPalette.80" | "colorPalette.90" | "colorPalette.100" | "colorPalette.110" | "colorPalette.25" | "colorPalette.35" | "colorPalette.120" | "colorPalette.-10" | "colorPalette.1" | "colorPalette.2" | "colorPalette.3" | "colorPalette.4" | "colorPalette.5" | "colorPalette.15" | "colorPalette.8" | "colorPalette.16" | "colorPalette.24" | "colorPalette.32" | "colorPalette.48" | "colorPalette.56" | "colorPalette.64" | "colorPalette.disabled" | "colorPalette.neutral" | "colorPalette.neutral.hovered" | "colorPalette.hovered" | "colorPalette.neutral.pressed" | "colorPalette.pressed" | "colorPalette.neutral.bold" | "colorPalette.bold" | "colorPalette.neutral.bold.hovered" | "colorPalette.bold.hovered" | "colorPalette.neutral.bold.pressed" | "colorPalette.bold.pressed" | "colorPalette.neutral.boldest" | "colorPalette.boldest" | "colorPalette.neutral.subtle" | "colorPalette.subtle" | "colorPalette.neutral.subtle.hovered" | "colorPalette.subtle.hovered" | "colorPalette.neutral.subtle.pressed" | "colorPalette.subtle.pressed" | "colorPalette.neutral.inverse" | "colorPalette.inverse" | "colorPalette.neutral.inverse.subtle" | "colorPalette.inverse.subtle" | "colorPalette.neutral.inverse.subtle.hovered" | "colorPalette.inverse.subtle.hovered" | "colorPalette.neutral.solid" | "colorPalette.solid" | "colorPalette.selected" | "colorPalette.selected.hovered" | "colorPalette.selected.pressed" | "colorPalette.selected.bold" | "colorPalette.selected.bold.hovered" | "colorPalette.selected.bold.pressed" | "colorPalette.success" | "colorPalette.success.hovered" | "colorPalette.success.pressed" | "colorPalette.success.bold" | "colorPalette.success.bold.hovered" | "colorPalette.success.bold.pressed" | "colorPalette.success.subtle" | "colorPalette.success.subtle.hovered" | "colorPalette.success.subtle.pressed" | "colorPalette.warning" | "colorPalette.warning.hovered" | "colorPalette.warning.pressed" | "colorPalette.warning.bold" | "colorPalette.warning.bold.hovered" | "colorPalette.warning.bold.pressed" | "colorPalette.warning.subtle" | "colorPalette.warning.subtle.hovered" | "colorPalette.warning.subtle.pressed" | "colorPalette.danger" | "colorPalette.danger.hovered" | "colorPalette.danger.pressed" | "colorPalette.danger.bold" | "colorPalette.danger.bold.hovered" | "colorPalette.danger.bold.pressed" | "colorPalette.danger.subtle" | "colorPalette.danger.subtle.hovered" | "colorPalette.danger.subtle.pressed" | "colorPalette.info" | "colorPalette.info.hovered" | "colorPalette.info.pressed" | "colorPalette.info.bold" | "colorPalette.info.bold.hovered" | "colorPalette.info.bold.pressed" | "colorPalette.info.subtle" | "colorPalette.info.subtle.hovered" | "colorPalette.info.subtle.pressed" | "colorPalette.cta" | "colorPalette.cta.hovered" | "colorPalette.cta.pressed" | "colorPalette.cta.bold" | "colorPalette.cta.bold.hovered" | "colorPalette.cta.bold.pressed" | "colorPalette.input" | "colorPalette.input.hovered" | "colorPalette.input.pressed" | "colorPalette.accent.neutral" | "colorPalette.accent.neutral.subtle" | "colorPalette.accent.neutral.subtlest" | "colorPalette.neutral.subtlest" | "colorPalette.subtlest" | "colorPalette.accent.neutral.bold" | "colorPalette.accent.gold" | "colorPalette.gold" | "colorPalette.accent.gold.subtle" | "colorPalette.gold.subtle" | "colorPalette.accent.gold.subtlest" | "colorPalette.gold.subtlest" | "colorPalette.accent.gold.bold" | "colorPalette.gold.bold" | "colorPalette.accent.blue" | "colorPalette.blue" | "colorPalette.accent.blue.subtle" | "colorPalette.blue.subtle" | "colorPalette.accent.blue.subtlest" | "colorPalette.blue.subtlest" | "colorPalette.accent.blue.bold" | "colorPalette.blue.bold" | "colorPalette.accent.green" | "colorPalette.green" | "colorPalette.accent.green.subtle" | "colorPalette.green.subtle" | "colorPalette.accent.green.subtlest" | "colorPalette.green.subtlest" | "colorPalette.accent.green.bold" | "colorPalette.green.bold" | "colorPalette.accent.yellow" | "colorPalette.yellow" | "colorPalette.accent.yellow.subtle" | "colorPalette.yellow.subtle" | "colorPalette.accent.yellow.subtlest" | "colorPalette.yellow.subtlest" | "colorPalette.accent.yellow.bold" | "colorPalette.yellow.bold" | "colorPalette.accent.red" | "colorPalette.red" | "colorPalette.accent.red.subtle" | "colorPalette.red.subtle" | "colorPalette.accent.red.subtlest" | "colorPalette.red.subtlest" | "colorPalette.accent.red.bold" | "colorPalette.red.bold" | "colorPalette.accent.tomato" | "colorPalette.tomato" | "colorPalette.accent.tomato.subtle" | "colorPalette.tomato.subtle" | "colorPalette.accent.tomato.subtlest" | "colorPalette.tomato.subtlest" | "colorPalette.accent.tomato.bold" | "colorPalette.tomato.bold" | "colorPalette.accent.tan" | "colorPalette.tan" | "colorPalette.accent.tan.subtle" | "colorPalette.tan.subtle" | "colorPalette.accent.tan.subtlest" | "colorPalette.tan.subtlest" | "colorPalette.accent.tan.bold" | "colorPalette.tan.bold" | "colorPalette.accent.orange" | "colorPalette.orange" | "colorPalette.accent.orange.subtle" | "colorPalette.orange.subtle" | "colorPalette.accent.orange.subtlest" | "colorPalette.orange.subtlest" | "colorPalette.accent.orange.bold" | "colorPalette.orange.bold" | "colorPalette.accent.pear" | "colorPalette.pear" | "colorPalette.accent.pear.subtle" | "colorPalette.pear.subtle" | "colorPalette.accent.pear.subtlest" | "colorPalette.pear.subtlest" | "colorPalette.accent.pear.bold" | "colorPalette.pear.bold" | "colorPalette.accent.grass" | "colorPalette.grass" | "colorPalette.accent.grass.subtle" | "colorPalette.grass.subtle" | "colorPalette.accent.grass.subtlest" | "colorPalette.grass.subtlest" | "colorPalette.accent.grass.bold" | "colorPalette.grass.bold" | "colorPalette.accent.mint" | "colorPalette.mint" | "colorPalette.accent.mint.subtle" | "colorPalette.mint.subtle" | "colorPalette.accent.mint.subtlest" | "colorPalette.mint.subtlest" | "colorPalette.accent.mint.bold" | "colorPalette.mint.bold" | "colorPalette.accent.cyan" | "colorPalette.cyan" | "colorPalette.accent.cyan.subtle" | "colorPalette.cyan.subtle" | "colorPalette.accent.cyan.subtlest" | "colorPalette.cyan.subtlest" | "colorPalette.accent.cyan.bold" | "colorPalette.cyan.bold" | "colorPalette.accent.indigo" | "colorPalette.indigo" | "colorPalette.accent.indigo.subtle" | "colorPalette.indigo.subtle" | "colorPalette.accent.indigo.subtlest" | "colorPalette.indigo.subtlest" | "colorPalette.accent.indigo.bold" | "colorPalette.indigo.bold" | "colorPalette.accent.purple" | "colorPalette.purple" | "colorPalette.accent.purple.subtle" | "colorPalette.purple.subtle" | "colorPalette.accent.purple.subtlest" | "colorPalette.purple.subtlest" | "colorPalette.accent.purple.bold" | "colorPalette.purple.bold" | "colorPalette.accent.violet" | "colorPalette.violet" | "colorPalette.accent.violet.subtle" | "colorPalette.violet.subtle" | "colorPalette.accent.violet.subtlest" | "colorPalette.violet.subtlest" | "colorPalette.accent.violet.bold" | "colorPalette.violet.bold" | "colorPalette.accent.pink" | "colorPalette.pink" | "colorPalette.accent.pink.subtle" | "colorPalette.pink.subtle" | "colorPalette.accent.pink.subtlest" | "colorPalette.pink.subtlest" | "colorPalette.accent.pink.bold" | "colorPalette.pink.bold" | "colorPalette.accent.rose" | "colorPalette.rose" | "colorPalette.accent.rose.subtle" | "colorPalette.rose.subtle" | "colorPalette.accent.rose.subtlest" | "colorPalette.rose.subtlest" | "colorPalette.accent.rose.bold" | "colorPalette.rose.bold" | "colorPalette.accent.magenta" | "colorPalette.magenta" | "colorPalette.accent.magenta.subtle" | "colorPalette.magenta.subtle" | "colorPalette.accent.magenta.subtlest" | "colorPalette.magenta.subtlest" | "colorPalette.accent.magenta.bold" | "colorPalette.magenta.bold" | "colorPalette.slate.0" | "colorPalette.slate.1" | "colorPalette.slate.2" | "colorPalette.slate.3" | "colorPalette.slate.4" | "colorPalette.slate.5" | "colorPalette.slate.10" | "colorPalette.slate.20" | "colorPalette.slate.30" | "colorPalette.slate.40" | "colorPalette.slate.50" | "colorPalette.slate.60" | "colorPalette.slate.70" | "colorPalette.slate.80" | "colorPalette.slate.90" | "colorPalette.slate.100" | "colorPalette.inverse.focused" | "colorPalette.focused" | "colorPalette.focused.inverse" | "colorPalette.decorative" | "colorPalette.decorative.hovered" | "colorPalette.decorative.inverse" | "colorPalette.decorative.inverse.hovered" | "colorPalette.inverse.hovered" | "colorPalette.decorative.subtle" | "colorPalette.warning.inverse" | "colorPalette.danger.inverse" | "colorPalette.raised" | "colorPalette.raised.hovered" | "colorPalette.raised.pressed" | "colorPalette.overlay" | "colorPalette.overlay.hovered" | "colorPalette.overlay.pressed" | "colorPalette.sunken" | "colorPalette.inverse.subtlest" | "colorPalette.placeholder" | "colorPalette.success.inverse" | "colorPalette.info.inverse" | "colorPalette.cta.inverse" | "colorPalette.slate" | "colorPalette.lighter" | "colorPalette.light" | "colorPalette.default" | "colorPalette.dark" | "colorPalette.darker" | "colorPalette.raised.1" | "colorPalette.raised.2" | "colorPalette.elevated.1" | "colorPalette.elevated.2" | "colorPalette.elevated.3" | "colorPalette.overlay.1" | "colorPalette.overlay.2" | "colorPalette.overlay.3" | "colorPalette.overlay.4" | "colorPalette.overlay.5" | "colorPalette.overflow.1" | "colorPalette.overflow.2" | "colorPalette.overflow.3" | "colorPalette.shadowColor" | "colorPalette.headingColor" | "colorPalette.textColor" | "colorPalette.borderColor"
|
|
470
990
|
|
|
471
991
|
declare type ComponentProps<T extends ElementType> = T extends ComponentType<infer P> | Component<infer P>
|
|
472
992
|
? JSX_2.LibraryManagedAttributes<T, P>
|
|
@@ -704,6 +1224,8 @@ declare interface Conditions {
|
|
|
704
1224
|
"_deleted": string
|
|
705
1225
|
/** `&:is([aria-collapsed=true], [data-collapsed=true], [data-state="collapsed"])` */
|
|
706
1226
|
"_collapsed": string
|
|
1227
|
+
/** `&[data-new=true]` */
|
|
1228
|
+
"_new": string
|
|
707
1229
|
/** `&[data-utility=true]` */
|
|
708
1230
|
"_utility": string
|
|
709
1231
|
/** `&:is([data-error=true])` */
|
|
@@ -808,6 +1330,87 @@ declare interface Conditions {
|
|
|
808
1330
|
"base": string
|
|
809
1331
|
}
|
|
810
1332
|
|
|
1333
|
+
/**
|
|
1334
|
+
* Renders a confirmation alert dialog with cancel and confirm actions.
|
|
1335
|
+
*
|
|
1336
|
+
* Dismiss paths (Cancel, Escape, overlay, close button) call
|
|
1337
|
+
* `onOpenChange(false)` only. They do not invoke `onConfirm`. Call
|
|
1338
|
+
* `onOpenChange(false)` from `onConfirm` when the action completes.
|
|
1339
|
+
*
|
|
1340
|
+
* For async confirms, catch errors and clear `confirmLoading` in `finally`.
|
|
1341
|
+
* This component does not swallow rejections from `onConfirm`.
|
|
1342
|
+
*
|
|
1343
|
+
* @example
|
|
1344
|
+
* ```tsx
|
|
1345
|
+
* <ConfirmationModal
|
|
1346
|
+
* open={open}
|
|
1347
|
+
* onOpenChange={setOpen}
|
|
1348
|
+
* title="Delete item"
|
|
1349
|
+
* description="This action cannot be undone."
|
|
1350
|
+
* confirmLabel="Delete"
|
|
1351
|
+
* type="delete"
|
|
1352
|
+
* confirmLoading={confirmLoading}
|
|
1353
|
+
* onConfirm={async () => {
|
|
1354
|
+
* setConfirmLoading(true);
|
|
1355
|
+
* try {
|
|
1356
|
+
* await deleteItem();
|
|
1357
|
+
* setOpen(false);
|
|
1358
|
+
* } finally {
|
|
1359
|
+
* setConfirmLoading(false);
|
|
1360
|
+
* }
|
|
1361
|
+
* }}
|
|
1362
|
+
* />
|
|
1363
|
+
* ```
|
|
1364
|
+
*/
|
|
1365
|
+
export declare const ConfirmationModal: (props: ConfirmationModalProps) => JSX.Element;
|
|
1366
|
+
|
|
1367
|
+
/** Props for {@link ConfirmationModal}, a non-form confirm/cancel dialog. */
|
|
1368
|
+
export declare type ConfirmationModalProps = {
|
|
1369
|
+
/** Controlled dialog state. */
|
|
1370
|
+
open: boolean;
|
|
1371
|
+
/** Called when the dialog requests an open-state change. */
|
|
1372
|
+
onOpenChange: (open: boolean) => void;
|
|
1373
|
+
/** Alert dialog title rendered in {@link ModalHeader}. */
|
|
1374
|
+
title: string;
|
|
1375
|
+
/** Supporting message describing the action or consequence. */
|
|
1376
|
+
description: string;
|
|
1377
|
+
/** Label for the confirm action button. */
|
|
1378
|
+
confirmLabel: string;
|
|
1379
|
+
/** Label for the cancel button. @default 'Cancel' */
|
|
1380
|
+
cancelLabel?: string;
|
|
1381
|
+
/**
|
|
1382
|
+
* Visual treatment for the confirm action.
|
|
1383
|
+
* @default 'default'
|
|
1384
|
+
*/
|
|
1385
|
+
type?: ConfirmationModalType;
|
|
1386
|
+
/**
|
|
1387
|
+
* Called when the user activates the confirm button. Async work, error
|
|
1388
|
+
* handling, and `confirmLoading` are consumer-owned — catch rejections and
|
|
1389
|
+
* clear loading in `finally` so the button does not stay stuck.
|
|
1390
|
+
*/
|
|
1391
|
+
onConfirm: () => void | Promise<void>;
|
|
1392
|
+
/** Shows a loading state on the confirm button. */
|
|
1393
|
+
confirmLoading?: boolean;
|
|
1394
|
+
/** Disables the confirm button. */
|
|
1395
|
+
confirmDisabled?: boolean;
|
|
1396
|
+
/**
|
|
1397
|
+
* Prevents overlay clicks from closing the dialog.
|
|
1398
|
+
* Defaults to `false` for `default` and `true` for `delete`.
|
|
1399
|
+
*/
|
|
1400
|
+
preventOverlayClose?: boolean;
|
|
1401
|
+
/**
|
|
1402
|
+
* Shows the header close button.
|
|
1403
|
+
* Defaults to `true` for `default` and `false` for `delete`.
|
|
1404
|
+
*/
|
|
1405
|
+
showCloseButton?: boolean;
|
|
1406
|
+
/** Recipe size forwarded to {@link ModalWrapper}. @default 'sm' */
|
|
1407
|
+
size?: ModalVariantProps['size'];
|
|
1408
|
+
};
|
|
1409
|
+
|
|
1410
|
+
/** Visual intent for {@link ConfirmationModal} footer actions. */
|
|
1411
|
+
export declare type ConfirmationModalType = 'default' | 'delete';
|
|
1412
|
+
|
|
1413
|
+
/** Key of a Cetec container-size token. */
|
|
811
1414
|
declare type ContainerSizeKey = keyof typeof containerSizes;
|
|
812
1415
|
|
|
813
1416
|
declare const containerSizes: {
|
|
@@ -1236,77 +1839,483 @@ declare namespace DataType {
|
|
|
1236
1839
|
type VisualBox = "border-box" | "content-box" | "padding-box";
|
|
1237
1840
|
}
|
|
1238
1841
|
|
|
1239
|
-
|
|
1842
|
+
/** Segment order and separator convention used to display a date. */
|
|
1843
|
+
export declare type DateFormat = 'MM/DD/YYYY' | 'YYYY-MM-DD';
|
|
1844
|
+
|
|
1845
|
+
/**
|
|
1846
|
+
* Renders a segmented date field with optional leading and trailing content.
|
|
1847
|
+
*
|
|
1848
|
+
* The field accepts keyboard entry and stepping through year, month, and day
|
|
1849
|
+
* segments. Use `DatePicker` when a calendar menu is also needed.
|
|
1850
|
+
*
|
|
1851
|
+
* @example
|
|
1852
|
+
* ```tsx
|
|
1853
|
+
* <DateInput label="Invoice date" defaultValue={{ year: 2026, month: 8, day: 3 }} />
|
|
1854
|
+
* ```
|
|
1855
|
+
*/
|
|
1856
|
+
export declare const DateInput: (props: DateInputProps) => JSX.Element;
|
|
1240
1857
|
|
|
1241
|
-
|
|
1242
|
-
|
|
1858
|
+
/** Props for {@link DateInput}, including segmented date state and field slots. */
|
|
1859
|
+
export declare type DateInputProps = Omit<BoxProps, keyof SegmentedFieldsVariantProps | 'children'> & Omit<SegmentedFieldsVariantProps, 'field' | 'range' | 'before' | 'after'> & {
|
|
1860
|
+
/** Identifier forwarded to the segmented date group. */
|
|
1861
|
+
id?: string;
|
|
1862
|
+
/** Controlled date. Pair with `onChange`. */
|
|
1243
1863
|
value?: DateValue | null;
|
|
1244
|
-
/** Initial
|
|
1864
|
+
/** Initial date when `value` is not provided. */
|
|
1245
1865
|
defaultValue?: DateValue | null;
|
|
1246
|
-
/**
|
|
1866
|
+
/** Runs when the segmented date becomes complete or is cleared. */
|
|
1247
1867
|
onChange?: (value: DateValue | null) => void;
|
|
1248
|
-
/**
|
|
1249
|
-
|
|
1250
|
-
/**
|
|
1251
|
-
maxDate?: DateValue;
|
|
1252
|
-
/** Accessible label for the input group */
|
|
1868
|
+
/** Segment order and separator convention. */
|
|
1869
|
+
dateFormat?: DateFormat;
|
|
1870
|
+
/** Accessible name for the segmented date group. */
|
|
1253
1871
|
label?: string;
|
|
1254
|
-
|
|
1872
|
+
/** Content before the date field. Takes precedence over `iconBefore`. */
|
|
1873
|
+
before?: ReactNode;
|
|
1874
|
+
/** Content after the date field. Takes precedence over `iconAfter`. */
|
|
1875
|
+
after?: ReactNode;
|
|
1876
|
+
/** Legacy icon rendered before the field when `before` is absent. */
|
|
1877
|
+
iconBefore?: IconNamesList;
|
|
1878
|
+
/** Legacy icon rendered after the field when `after` is absent. */
|
|
1879
|
+
iconAfter?: IconNamesList;
|
|
1880
|
+
/** Applies error styling. Overrides field context when provided. */
|
|
1255
1881
|
error?: boolean;
|
|
1882
|
+
/** Prevents editing. Overrides field context when provided. */
|
|
1883
|
+
disabled?: boolean;
|
|
1884
|
+
/** Applies invalid styling. Overrides field context when provided. */
|
|
1256
1885
|
invalid?: boolean;
|
|
1257
|
-
|
|
1258
|
-
name?: string;
|
|
1259
|
-
/** Controlled popover open state */
|
|
1886
|
+
/** Reflected through to the segmented field — lets a wrapping Menu/Picker show "active anchor" styling */
|
|
1260
1887
|
open?: boolean;
|
|
1261
|
-
/**
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1888
|
+
/** Forwarded to the segmented field — see SegmentedDate's onFocusWithin */
|
|
1889
|
+
onFocusWithin?: () => void;
|
|
1890
|
+
/** Forwarded to the segmented field — see SegmentedDate's onBlurWithin */
|
|
1891
|
+
onBlurWithin?: (relatedTarget: Node | null) => void;
|
|
1265
1892
|
};
|
|
1266
1893
|
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
|
|
1894
|
+
/**
|
|
1895
|
+
* Presents a calendar in a Menu and commits a selected day immediately.
|
|
1896
|
+
*
|
|
1897
|
+
* Supply a `trigger`, or set inherited `inline` to render the calendar in
|
|
1898
|
+
* normal flow. Selecting an enabled date calls `onChange` and closes a
|
|
1899
|
+
* triggered menu.
|
|
1900
|
+
*
|
|
1901
|
+
* @example
|
|
1902
|
+
* ```tsx
|
|
1903
|
+
* <DateMenu trigger={<Button>Choose date</Button>} onChange={setDate} />
|
|
1904
|
+
* ```
|
|
1905
|
+
*/
|
|
1906
|
+
export declare const DateMenu: (props: DateMenuProps) => any;
|
|
1279
1907
|
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
/** Called when end date changes */
|
|
1288
|
-
onEndChange?: (value: DateValue | null) => void;
|
|
1289
|
-
/** Earliest selectable date (applies to both pickers) */
|
|
1908
|
+
/** Props for {@link DateMenu}, a Calendar presented through Menu behavior. */
|
|
1909
|
+
export declare type DateMenuProps = Omit<MenuProps, 'children' | 'onChange' | 'value'> & {
|
|
1910
|
+
/** Selected date shown by the calendar. */
|
|
1911
|
+
value?: DateValue | null;
|
|
1912
|
+
/** Commits immediately on day selection, then closes the menu. */
|
|
1913
|
+
onChange?: (value: DateValue | null) => void;
|
|
1914
|
+
/** Earliest selectable date. */
|
|
1290
1915
|
minDate?: DateValue;
|
|
1291
|
-
/** Latest selectable date
|
|
1916
|
+
/** Latest selectable date. */
|
|
1292
1917
|
maxDate?: DateValue;
|
|
1918
|
+
/** Controlled visible calendar month. */
|
|
1919
|
+
viewDate?: ViewDate_2;
|
|
1920
|
+
/** Initial visible month when `viewDate` is not provided. */
|
|
1921
|
+
defaultViewDate?: ViewDate_2;
|
|
1922
|
+
/** Runs when calendar navigation requests a new visible month. */
|
|
1923
|
+
onViewDateChange?: (viewDate: ViewDate_2) => void;
|
|
1924
|
+
/** Prevents opening or selection and returns only the trigger. */
|
|
1293
1925
|
disabled?: boolean;
|
|
1294
|
-
|
|
1295
|
-
/** Size passed to both DatePickers */
|
|
1296
|
-
size?: DatePickerVariantProps['size'];
|
|
1297
|
-
/** Accessible label prefix — used to build "Start date" and "End date" labels */
|
|
1926
|
+
/** Accessible label passed to the calendar grid. */
|
|
1298
1927
|
label?: string;
|
|
1299
1928
|
};
|
|
1300
1929
|
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1930
|
+
/**
|
|
1931
|
+
* Combines keyboard date entry with a calendar selection menu.
|
|
1932
|
+
*
|
|
1933
|
+
* Focusing the segmented input opens the menu. Typed dates and calendar
|
|
1934
|
+
* selections update the same controlled or uncontrolled value.
|
|
1935
|
+
*
|
|
1936
|
+
* @example
|
|
1937
|
+
* ```tsx
|
|
1938
|
+
* <DatePicker label="Due date" value={date} onChange={setDate} />
|
|
1939
|
+
* ```
|
|
1940
|
+
*/
|
|
1941
|
+
export declare const DatePicker: (props: DatePickerProps) => JSX.Element;
|
|
1942
|
+
|
|
1943
|
+
/** Props for {@link DatePicker}, combining a segmented input and calendar menu. */
|
|
1944
|
+
export declare type DatePickerProps = Pick<DateInputProps, 'id' | 'label' | 'before' | 'after' | 'iconBefore' | 'iconAfter' | 'error' | 'disabled' | 'invalid' | 'dateFormat' | 'size'> & {
|
|
1945
|
+
/** Controlled selected date. Pair with `onChange`. */
|
|
1946
|
+
value?: DateValue | null;
|
|
1947
|
+
/** Initial selected date when `value` is not provided. */
|
|
1948
|
+
defaultValue?: DateValue | null;
|
|
1949
|
+
/** Runs when typing or calendar selection commits a date. */
|
|
1950
|
+
onChange?: (value: DateValue | null) => void;
|
|
1951
|
+
/** Earliest selectable calendar date. */
|
|
1952
|
+
minDate?: DateValue;
|
|
1953
|
+
/** Latest selectable calendar date. */
|
|
1954
|
+
maxDate?: DateValue;
|
|
1955
|
+
/** Controlled visible calendar month. */
|
|
1956
|
+
viewDate?: ViewDate_4;
|
|
1957
|
+
/** Initial visible month when `viewDate` is not provided. */
|
|
1958
|
+
defaultViewDate?: ViewDate_4;
|
|
1959
|
+
/** Runs when calendar navigation requests a new visible month. */
|
|
1960
|
+
onViewDateChange?: (viewDate: ViewDate_4) => void;
|
|
1961
|
+
/** Floating UI placement of the calendar menu. */
|
|
1962
|
+
placement?: Placement;
|
|
1963
|
+
/** Controlled menu visibility. Pair with `onOpenChange`. */
|
|
1964
|
+
open?: boolean;
|
|
1965
|
+
/**
|
|
1966
|
+
* Initial menu visibility when `open` is not provided.
|
|
1967
|
+
*
|
|
1968
|
+
* @default false
|
|
1969
|
+
*/
|
|
1970
|
+
defaultOpen?: boolean;
|
|
1971
|
+
/** Runs when interaction requests that the menu open or close. */
|
|
1972
|
+
onOpenChange?: (open: boolean) => void;
|
|
1973
|
+
};
|
|
1974
|
+
|
|
1975
|
+
/**
|
|
1976
|
+
* Renders start and end dates as two coordinated segmented fields.
|
|
1977
|
+
*
|
|
1978
|
+
* Each endpoint commits independently while the component preserves the other
|
|
1979
|
+
* endpoint. Use `DateRangePicker` when a calendar menu and Apply/Cancel flow
|
|
1980
|
+
* are also needed.
|
|
1981
|
+
*
|
|
1982
|
+
* @example
|
|
1983
|
+
* ```tsx
|
|
1984
|
+
* <DateRangeInput startLabel="Arrival" endLabel="Departure" />
|
|
1985
|
+
* ```
|
|
1986
|
+
*/
|
|
1987
|
+
export declare const DateRangeInput: (props: DateRangeInputProps) => JSX.Element;
|
|
1988
|
+
|
|
1989
|
+
/** Props for {@link DateRangeInput}, including range state and field slots. */
|
|
1990
|
+
export declare type DateRangeInputProps = Omit<BoxProps, keyof SegmentedFieldsVariantProps | 'children'> & Omit<SegmentedFieldsVariantProps, 'field' | 'range' | 'before' | 'after'> & {
|
|
1991
|
+
/** Identifier applied to the range container. */
|
|
1992
|
+
id?: string;
|
|
1993
|
+
/** Controlled start and end dates. Pair with `onChange`. */
|
|
1994
|
+
value?: DateRangeValue | null;
|
|
1995
|
+
/** Initial range when `value` is not provided. */
|
|
1996
|
+
defaultValue?: DateRangeValue | null;
|
|
1997
|
+
/** Runs whenever either endpoint becomes complete or is cleared. */
|
|
1998
|
+
onChange?: (value: DateRangeValue | null) => void;
|
|
1999
|
+
/** Segment order and separator convention shared by both endpoints. */
|
|
2000
|
+
dateFormat?: DateFormat;
|
|
2001
|
+
/** Accessible name for the start-date segments. */
|
|
2002
|
+
startLabel?: string;
|
|
2003
|
+
/** Accessible name for the end-date segments. */
|
|
2004
|
+
endLabel?: string;
|
|
2005
|
+
/** Content before the range. Takes precedence over `iconBefore`. */
|
|
2006
|
+
before?: ReactNode;
|
|
2007
|
+
/** Content after the range. Takes precedence over `iconAfter`. */
|
|
2008
|
+
after?: ReactNode;
|
|
2009
|
+
/** Legacy icon rendered before the range when `before` is absent. */
|
|
2010
|
+
iconBefore?: IconNamesList;
|
|
2011
|
+
/** Legacy icon rendered after the range when `after` is absent. */
|
|
2012
|
+
iconAfter?: IconNamesList;
|
|
2013
|
+
/** Applies error styling. Overrides field context when provided. */
|
|
2014
|
+
error?: boolean;
|
|
2015
|
+
/** Prevents editing both endpoints. Overrides field context when provided. */
|
|
2016
|
+
disabled?: boolean;
|
|
2017
|
+
/** Applies invalid styling. Overrides field context when provided. */
|
|
2018
|
+
invalid?: boolean;
|
|
2019
|
+
/** Reflected through to the segmented fields — lets a wrapping Menu/Picker show "active anchor" styling */
|
|
2020
|
+
open?: boolean;
|
|
2021
|
+
/** Forwarded to both segmented fields — see SegmentedDate's onFocusWithin */
|
|
2022
|
+
onFocusWithin?: () => void;
|
|
2023
|
+
/** Forwarded to both segmented fields — see SegmentedDate's onBlurWithin */
|
|
2024
|
+
onBlurWithin?: (relatedTarget: Node | null) => void;
|
|
2025
|
+
};
|
|
2026
|
+
|
|
2027
|
+
/**
|
|
2028
|
+
* Selects a date range from two independently navigable calendars.
|
|
2029
|
+
*
|
|
2030
|
+
* Selection is held as a draft until Apply is pressed. Cancel restores the
|
|
2031
|
+
* committed `value`. Apply is unavailable until both endpoints are selected.
|
|
2032
|
+
*
|
|
2033
|
+
* @example
|
|
2034
|
+
* ```tsx
|
|
2035
|
+
* <DateRangeMenu
|
|
2036
|
+
* trigger={<Button>Choose dates</Button>}
|
|
2037
|
+
* value={range}
|
|
2038
|
+
* onChange={setRange}
|
|
2039
|
+
* />
|
|
2040
|
+
* ```
|
|
2041
|
+
*/
|
|
2042
|
+
export declare const DateRangeMenu: (props: DateRangeMenuProps) => any;
|
|
2043
|
+
|
|
2044
|
+
/** Props for {@link DateRangeMenu}, including committed range and bounds. */
|
|
2045
|
+
export declare type DateRangeMenuProps = Omit<MenuProps, 'children' | 'onChange' | 'value'> & {
|
|
2046
|
+
/** Committed start and end dates used to initialize the menu draft. */
|
|
2047
|
+
value?: DateRangeValue | null;
|
|
2048
|
+
/** Commits the complete draft when Apply is pressed; Cancel discards it. */
|
|
2049
|
+
onChange?: (value: DateRangeValue | null) => void;
|
|
2050
|
+
/** Earliest selectable date for both calendars. */
|
|
2051
|
+
minDate?: DateValue;
|
|
2052
|
+
/** Latest selectable date for both calendars. */
|
|
2053
|
+
maxDate?: DateValue;
|
|
2054
|
+
/** Prevents opening or selection and returns only the trigger. */
|
|
2055
|
+
disabled?: boolean;
|
|
2056
|
+
/** Accessible label for the first calendar. */
|
|
2057
|
+
startLabel?: string;
|
|
2058
|
+
/** Accessible label for the second calendar. */
|
|
2059
|
+
endLabel?: string;
|
|
2060
|
+
};
|
|
2061
|
+
|
|
2062
|
+
/**
|
|
2063
|
+
* Combines segmented range entry with a two-calendar selection menu.
|
|
2064
|
+
*
|
|
2065
|
+
* Typed endpoints commit immediately. Calendar choices remain a draft until
|
|
2066
|
+
* Apply is pressed; Cancel restores the currently committed range.
|
|
2067
|
+
*
|
|
2068
|
+
* @example
|
|
2069
|
+
* ```tsx
|
|
2070
|
+
* <DateRangePicker startLabel="Arrival" endLabel="Departure" />
|
|
2071
|
+
* ```
|
|
2072
|
+
*/
|
|
2073
|
+
export declare const DateRangePicker: (props: DateRangePickerProps) => JSX.Element;
|
|
2074
|
+
|
|
2075
|
+
/** Props for {@link DateRangePicker}, combining range input and calendar menu. */
|
|
2076
|
+
export declare type DateRangePickerProps = Pick<DateRangeInputProps, 'id' | 'startLabel' | 'endLabel' | 'before' | 'after' | 'iconBefore' | 'iconAfter' | 'error' | 'disabled' | 'invalid' | 'dateFormat' | 'size'> & {
|
|
2077
|
+
/** Controlled start and end dates. Pair with `onChange`. */
|
|
2078
|
+
value?: DateRangeValue | null;
|
|
2079
|
+
/** Initial range when `value` is not provided. */
|
|
2080
|
+
defaultValue?: DateRangeValue | null;
|
|
2081
|
+
/** Runs for typed endpoint changes and applied calendar drafts. */
|
|
2082
|
+
onChange?: (value: DateRangeValue | null) => void;
|
|
2083
|
+
/** Earliest selectable date for both calendars. */
|
|
2084
|
+
minDate?: DateValue;
|
|
2085
|
+
/** Latest selectable date for both calendars. */
|
|
2086
|
+
maxDate?: DateValue;
|
|
2087
|
+
/** Floating UI placement of the calendar menu. */
|
|
2088
|
+
placement?: Placement;
|
|
2089
|
+
/** Controlled menu visibility. Pair with `onOpenChange`. */
|
|
2090
|
+
open?: boolean;
|
|
2091
|
+
/**
|
|
2092
|
+
* Initial menu visibility when `open` is not provided.
|
|
2093
|
+
*
|
|
2094
|
+
* @default false
|
|
2095
|
+
*/
|
|
2096
|
+
defaultOpen?: boolean;
|
|
2097
|
+
/** Runs when interaction requests that the menu open or close. */
|
|
2098
|
+
onOpenChange?: (open: boolean) => void;
|
|
2099
|
+
};
|
|
2100
|
+
|
|
2101
|
+
/** A committed date range — either endpoint may be null while only partially filled in. */
|
|
2102
|
+
export declare interface DateRangeValue {
|
|
2103
|
+
start: DateValue | null;
|
|
2104
|
+
end: DateValue | null;
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
/**
|
|
2108
|
+
* Renders coordinated segmented date and time fields in one control.
|
|
2109
|
+
*
|
|
2110
|
+
* Each complete portion is preserved while the other changes. Use
|
|
2111
|
+
* `DateTimePicker` when calendar and time-selection menus are also needed.
|
|
2112
|
+
*
|
|
2113
|
+
* @example
|
|
2114
|
+
* ```tsx
|
|
2115
|
+
* <DateTimeInput dateLabel="Due date" timeLabel="Due time" />
|
|
2116
|
+
* ```
|
|
2117
|
+
*/
|
|
2118
|
+
export declare const DateTimeInput: (props: DateTimeInputProps) => JSX.Element;
|
|
2119
|
+
|
|
2120
|
+
/** Props for {@link DateTimeInput}, including combined state and field slots. */
|
|
2121
|
+
export declare type DateTimeInputProps = Omit<BoxProps, keyof SegmentedFieldsVariantProps | 'children'> & Omit<SegmentedFieldsVariantProps, 'field' | 'range' | 'before' | 'after'> & {
|
|
2122
|
+
/** Identifier applied to the combined field container. */
|
|
2123
|
+
id?: string;
|
|
2124
|
+
/** Controlled date and time. Pair with `onChange`. */
|
|
2125
|
+
value?: DateTimeValue | null;
|
|
2126
|
+
/** Initial date and time when `value` is not provided. */
|
|
2127
|
+
defaultValue?: DateTimeValue | null;
|
|
2128
|
+
/** Runs whenever the date or time portion changes. */
|
|
2129
|
+
onChange?: (value: DateTimeValue | null) => void;
|
|
2130
|
+
/** Segment order and separator convention for the date portion. */
|
|
2131
|
+
dateFormat?: DateFormat;
|
|
2132
|
+
/** Display cycle for the time portion. */
|
|
2133
|
+
timeFormat?: TimeFormat;
|
|
2134
|
+
/** Minute increment used by keyboard stepping. */
|
|
2135
|
+
minuteStep?: number;
|
|
2136
|
+
/** Accessible name for the date segments. */
|
|
2137
|
+
dateLabel?: string;
|
|
2138
|
+
/** Accessible name for the time segments. */
|
|
2139
|
+
timeLabel?: string;
|
|
2140
|
+
/** Content before the combined field. Takes precedence over `iconBefore`. */
|
|
2141
|
+
before?: ReactNode;
|
|
2142
|
+
/** Content after the combined field. Takes precedence over `iconAfter`. */
|
|
2143
|
+
after?: ReactNode;
|
|
2144
|
+
/** Legacy icon rendered before the field when `before` is absent. */
|
|
2145
|
+
iconBefore?: IconNamesList;
|
|
2146
|
+
/** Legacy icon rendered after the field when `after` is absent. */
|
|
2147
|
+
iconAfter?: IconNamesList;
|
|
2148
|
+
/** Applies error styling. Overrides field context when provided. */
|
|
2149
|
+
error?: boolean;
|
|
2150
|
+
/** Prevents editing both portions. Overrides field context when provided. */
|
|
2151
|
+
disabled?: boolean;
|
|
2152
|
+
/** Applies invalid styling. Overrides field context when provided. */
|
|
2153
|
+
invalid?: boolean;
|
|
2154
|
+
/** Reflected through to the segmented fields — lets a wrapping Menu/Picker show "active anchor" styling */
|
|
2155
|
+
open?: boolean;
|
|
2156
|
+
/** Forwarded to both segmented fields — see SegmentedDate/SegmentedTime's onFocusWithin */
|
|
2157
|
+
onFocusWithin?: () => void;
|
|
2158
|
+
/** Forwarded to both segmented fields — see SegmentedDate/SegmentedTime's onBlurWithin */
|
|
2159
|
+
onBlurWithin?: (relatedTarget: Node | null) => void;
|
|
2160
|
+
};
|
|
2161
|
+
|
|
2162
|
+
/**
|
|
2163
|
+
* Selects a date and time from a calendar and aligned time columns.
|
|
2164
|
+
*
|
|
2165
|
+
* Changes remain a draft until Apply is pressed. Cancel restores `value`, and
|
|
2166
|
+
* Apply is unavailable until both the date and time portions are complete.
|
|
2167
|
+
*
|
|
2168
|
+
* @example
|
|
2169
|
+
* ```tsx
|
|
2170
|
+
* <DateTimeMenu
|
|
2171
|
+
* trigger={<Button>Schedule</Button>}
|
|
2172
|
+
* value={scheduledAt}
|
|
2173
|
+
* onChange={setScheduledAt}
|
|
2174
|
+
* />
|
|
2175
|
+
* ```
|
|
2176
|
+
*/
|
|
2177
|
+
export declare const DateTimeMenu: (props: DateTimeMenuProps) => any;
|
|
2178
|
+
|
|
2179
|
+
/** Props for {@link DateTimeMenu}, including committed value and constraints. */
|
|
2180
|
+
export declare type DateTimeMenuProps = Omit<MenuProps, 'children' | 'onChange' | 'value'> & {
|
|
2181
|
+
/** Committed date and time used to initialize the menu draft. */
|
|
2182
|
+
value?: DateTimeValue | null;
|
|
2183
|
+
/** Commits the complete draft when Apply is pressed; Cancel discards it. */
|
|
2184
|
+
onChange?: (value: DateTimeValue | null) => void;
|
|
2185
|
+
/** Earliest selectable calendar date. */
|
|
2186
|
+
minDate?: DateValue;
|
|
2187
|
+
/** Latest selectable calendar date. */
|
|
2188
|
+
maxDate?: DateValue;
|
|
2189
|
+
/** Controlled visible calendar month. */
|
|
2190
|
+
viewDate?: ViewDate_3;
|
|
2191
|
+
/** Initial visible calendar month when `viewDate` is not provided. */
|
|
2192
|
+
defaultViewDate?: ViewDate_3;
|
|
2193
|
+
/** Runs when calendar navigation requests a new visible month. */
|
|
2194
|
+
onViewDateChange?: (viewDate: ViewDate_3) => void;
|
|
2195
|
+
/** Display cycle for the time columns. */
|
|
2196
|
+
timeFormat?: TimeFormat;
|
|
2197
|
+
/** Interval used to generate minute choices. */
|
|
2198
|
+
minuteStep?: number;
|
|
2199
|
+
/** Prevents opening or selection and returns only the trigger. */
|
|
2200
|
+
disabled?: boolean;
|
|
2201
|
+
/** Accessible label passed to the calendar grid. */
|
|
2202
|
+
dateLabel?: string;
|
|
2203
|
+
};
|
|
2204
|
+
|
|
2205
|
+
/**
|
|
2206
|
+
* Combines segmented date-time entry with a calendar and time menu.
|
|
2207
|
+
*
|
|
2208
|
+
* Typed portions commit immediately. Menu choices remain a draft until Apply
|
|
2209
|
+
* is pressed; Cancel restores the currently committed value.
|
|
2210
|
+
*
|
|
2211
|
+
* @example
|
|
2212
|
+
* ```tsx
|
|
2213
|
+
* <DateTimePicker dateLabel="Due date" timeLabel="Due time" />
|
|
2214
|
+
* ```
|
|
2215
|
+
*/
|
|
2216
|
+
export declare const DateTimePicker: (props: DateTimePickerProps) => JSX.Element;
|
|
2217
|
+
|
|
2218
|
+
/** Props for {@link DateTimePicker}, combining segmented entry and menu. */
|
|
2219
|
+
export declare type DateTimePickerProps = Pick<DateTimeInputProps, 'id' | 'dateLabel' | 'timeLabel' | 'before' | 'after' | 'iconBefore' | 'iconAfter' | 'error' | 'disabled' | 'invalid' | 'dateFormat' | 'timeFormat' | 'size'> & {
|
|
2220
|
+
/** Controlled combined date and time. Pair with `onChange`. */
|
|
2221
|
+
value?: DateTimeValue | null;
|
|
2222
|
+
/** Initial combined value when `value` is not provided. */
|
|
2223
|
+
defaultValue?: DateTimeValue | null;
|
|
2224
|
+
/** Runs for typed changes and applied menu drafts. */
|
|
2225
|
+
onChange?: (value: DateTimeValue | null) => void;
|
|
2226
|
+
/** Minute interval used by segmented stepping and menu choices. */
|
|
2227
|
+
minuteStep?: number;
|
|
2228
|
+
/** Earliest selectable calendar date. */
|
|
2229
|
+
minDate?: DateValue;
|
|
2230
|
+
/** Latest selectable calendar date. */
|
|
2231
|
+
maxDate?: DateValue;
|
|
2232
|
+
/** Controlled visible calendar month. */
|
|
2233
|
+
viewDate?: ViewDate_5;
|
|
2234
|
+
/** Initial visible month when `viewDate` is not provided. */
|
|
2235
|
+
defaultViewDate?: ViewDate_5;
|
|
2236
|
+
/** Runs when calendar navigation requests a new visible month. */
|
|
2237
|
+
onViewDateChange?: (viewDate: ViewDate_5) => void;
|
|
2238
|
+
/** Floating UI placement of the date-time menu. */
|
|
2239
|
+
placement?: Placement;
|
|
2240
|
+
/** Controlled menu visibility. Pair with `onOpenChange`. */
|
|
2241
|
+
open?: boolean;
|
|
2242
|
+
/**
|
|
2243
|
+
* Initial menu visibility when `open` is not provided.
|
|
2244
|
+
*
|
|
2245
|
+
* @default false
|
|
2246
|
+
*/
|
|
2247
|
+
defaultOpen?: boolean;
|
|
2248
|
+
/** Runs when interaction requests that the menu open or close. */
|
|
2249
|
+
onOpenChange?: (open: boolean) => void;
|
|
2250
|
+
};
|
|
2251
|
+
|
|
2252
|
+
/**
|
|
2253
|
+
* Coordinates independent start and end `DateTimePicker` controls.
|
|
2254
|
+
*
|
|
2255
|
+
* The controls render side by side when space allows and stack at narrow
|
|
2256
|
+
* widths. Each endpoint has its own menu and commits independently.
|
|
2257
|
+
*
|
|
2258
|
+
* @example
|
|
2259
|
+
* ```tsx
|
|
2260
|
+
* <DateTimeRangePicker
|
|
2261
|
+
* startDateLabel="Starts on"
|
|
2262
|
+
* startTimeLabel="Starts at"
|
|
2263
|
+
* endDateLabel="Ends on"
|
|
2264
|
+
* endTimeLabel="Ends at"
|
|
2265
|
+
* />
|
|
2266
|
+
* ```
|
|
2267
|
+
*/
|
|
2268
|
+
export declare const DateTimeRangePicker: (props: DateTimeRangePickerProps) => JSX.Element;
|
|
2269
|
+
|
|
2270
|
+
/** Props for {@link DateTimeRangePicker}, which coordinates two pickers. */
|
|
2271
|
+
export declare type DateTimeRangePickerProps = Pick<DateTimeInputProps, 'before' | 'after' | 'iconBefore' | 'iconAfter' | 'error' | 'disabled' | 'invalid' | 'dateFormat' | 'timeFormat' | 'size'> & {
|
|
2272
|
+
/** Controlled start and end date-times. Pair with `onChange`. */
|
|
2273
|
+
value?: DateTimeRangeValue | null;
|
|
2274
|
+
/** Initial range when `value` is not provided. */
|
|
2275
|
+
defaultValue?: DateTimeRangeValue | null;
|
|
2276
|
+
/** Runs whenever either endpoint commits a new value. */
|
|
2277
|
+
onChange?: (value: DateTimeRangeValue | null) => void;
|
|
2278
|
+
/** Minute interval shared by both endpoint pickers. */
|
|
2279
|
+
minuteStep?: number;
|
|
2280
|
+
/** Earliest selectable date for both endpoints. */
|
|
2281
|
+
minDate?: DateValue;
|
|
2282
|
+
/** Latest selectable date for both endpoints. */
|
|
2283
|
+
maxDate?: DateValue;
|
|
2284
|
+
/** Accessible date label for the start picker. */
|
|
2285
|
+
startDateLabel?: string;
|
|
2286
|
+
/** Accessible time label for the start picker. */
|
|
2287
|
+
startTimeLabel?: string;
|
|
2288
|
+
/** Accessible date label for the end picker. */
|
|
2289
|
+
endDateLabel?: string;
|
|
2290
|
+
/** Accessible time label for the end picker. */
|
|
2291
|
+
endTimeLabel?: string;
|
|
2292
|
+
/** Floating UI placement shared by both endpoint menus. */
|
|
2293
|
+
placement?: Placement;
|
|
2294
|
+
};
|
|
2295
|
+
|
|
2296
|
+
/** A committed date+time range — either endpoint may be null while only partially filled in. */
|
|
2297
|
+
export declare interface DateTimeRangeValue {
|
|
2298
|
+
start: DateTimeValue | null;
|
|
2299
|
+
end: DateTimeValue | null;
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
/** A combined date+time value — either half may be null while only partially filled in. */
|
|
2303
|
+
export declare interface DateTimeValue {
|
|
2304
|
+
date: DateValue | null;
|
|
2305
|
+
time: TimeValue | null;
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
/** A calendar date. Month is 1-indexed (1 = January) to match human-readable input. */
|
|
2309
|
+
export declare interface DateValue {
|
|
2310
|
+
year: number;
|
|
2311
|
+
month: number;
|
|
2312
|
+
day: number;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
/** Returns explicit `textValue` when present, otherwise derives searchable text from item metadata. */
|
|
2316
|
+
export declare const deriveItemTextValue: ({ textValue, label, description, getItemText, }: {
|
|
2317
|
+
textValue?: string;
|
|
2318
|
+
label?: string;
|
|
1310
2319
|
description?: string;
|
|
1311
2320
|
getItemText: (item: {
|
|
1312
2321
|
label?: string;
|
|
@@ -1316,10 +2325,26 @@ export declare const deriveItemTextValue: ({ textValue, label, description, getI
|
|
|
1316
2325
|
|
|
1317
2326
|
declare type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Omit<T, K> : never
|
|
1318
2327
|
|
|
2328
|
+
/**
|
|
2329
|
+
* Draws a visual separator between adjacent regions.
|
|
2330
|
+
*
|
|
2331
|
+
* `Divider` is decorative and renders a `div`; use semantic sectioning and
|
|
2332
|
+
* headings when the separation must also be conveyed to assistive technology.
|
|
2333
|
+
*
|
|
2334
|
+
* @example
|
|
2335
|
+
* ```tsx
|
|
2336
|
+
* <Divider />
|
|
2337
|
+
* ```
|
|
2338
|
+
*/
|
|
1319
2339
|
export declare const Divider: (props: DividerProps) => JSX.Element;
|
|
1320
2340
|
|
|
1321
|
-
|
|
2341
|
+
/** Props accepted by {@link Divider}. */
|
|
2342
|
+
export declare type DividerProps = Omit<BoxProps, keyof DividerVariantProps> & DividerVariantProps & {
|
|
2343
|
+
/** Axis along which the visual divider extends. */
|
|
2344
|
+
/** @default "horizontal" */
|
|
1322
2345
|
direction?: DividerVariantProps['direction'];
|
|
2346
|
+
/** Visual thickness of the divider. */
|
|
2347
|
+
/** @default "thin" */
|
|
1323
2348
|
weight?: DividerVariantProps['weight'];
|
|
1324
2349
|
};
|
|
1325
2350
|
|
|
@@ -1338,6 +2363,43 @@ declare type DividerVariantProps = {
|
|
|
1338
2363
|
[key in keyof DividerVariant]?: ConditionalValue<DividerVariant[key]> | undefined
|
|
1339
2364
|
}
|
|
1340
2365
|
|
|
2366
|
+
/**
|
|
2367
|
+
* Adds a test id to the interaction chain shared with a subtree.
|
|
2368
|
+
*
|
|
2369
|
+
* Design-system components pick this up automatically: `Box` opens a scope
|
|
2370
|
+
* whenever it receives a `data-testid`, so anything rendered through the
|
|
2371
|
+
* library already contributes. Reach for `DsChainScope` only around raw DOM
|
|
2372
|
+
* that does not render through `Box` and still needs to appear in the chain,
|
|
2373
|
+
* such as an application-owned wrapper element.
|
|
2374
|
+
*
|
|
2375
|
+
* The chain exists so portaled content can be attributed back to the subtree
|
|
2376
|
+
* that opened it. A menu, modal, or tooltip renders into `document.body` and
|
|
2377
|
+
* has no DOM ancestry to its opener, but React context follows the React tree
|
|
2378
|
+
* through a portal, so the chain resolves correctly on either side.
|
|
2379
|
+
*
|
|
2380
|
+
* Renders no DOM of its own. The chain keeps the five nearest ids.
|
|
2381
|
+
*
|
|
2382
|
+
* @example
|
|
2383
|
+
* ```tsx
|
|
2384
|
+
* <DsChainScope testId="order-row">
|
|
2385
|
+
* <tr data-testid="order-row">{cells}</tr>
|
|
2386
|
+
* </DsChainScope>
|
|
2387
|
+
* ```
|
|
2388
|
+
*/
|
|
2389
|
+
export declare const DsChainScope: ({ testId, children }: DsChainScopeProps) => JSX.Element;
|
|
2390
|
+
|
|
2391
|
+
/** Props accepted by {@link DsChainScope}. */
|
|
2392
|
+
export declare type DsChainScopeProps = {
|
|
2393
|
+
/**
|
|
2394
|
+
* `data-testid` value appended to the chain inherited by `children`. Match it
|
|
2395
|
+
* to the `data-testid` written on the element this scope describes so the
|
|
2396
|
+
* chain and the DOM agree.
|
|
2397
|
+
*/
|
|
2398
|
+
testId: string;
|
|
2399
|
+
/** Subtree that resolves the extended chain. */
|
|
2400
|
+
children?: ReactNode;
|
|
2401
|
+
};
|
|
2402
|
+
|
|
1341
2403
|
declare type DurationToken = "fastest" | "faster" | "fast" | "normal" | "slow" | "slower" | "slowest"
|
|
1342
2404
|
|
|
1343
2405
|
declare type EasingToken = "default" | "linear" | "in" | "out" | "in-out"
|
|
@@ -1350,24 +2412,83 @@ declare type FontToken = "heading" | "body" | "mono"
|
|
|
1350
2412
|
|
|
1351
2413
|
declare type FontWeightToken = "light" | "normal" | "medium" | "bold" | "black"
|
|
1352
2414
|
|
|
2415
|
+
export { FormApi }
|
|
2416
|
+
|
|
2417
|
+
/**
|
|
2418
|
+
* Groups a label, control, help text, and validation message into one field.
|
|
2419
|
+
*
|
|
2420
|
+
* `labelFor` must match the `id` of the nested input. The component provides
|
|
2421
|
+
* `size`, `error`, `invalid`, and `disabled` through field context to
|
|
2422
|
+
* compatible descendants, but it does not add native input attributes for
|
|
2423
|
+
* them. If `success` and an error state are both true, success messaging wins.
|
|
2424
|
+
*
|
|
2425
|
+
* @example
|
|
2426
|
+
* ```tsx
|
|
2427
|
+
* <FormField label="Email" labelFor="email" required>
|
|
2428
|
+
* <TextInput id="email" type="email" required />
|
|
2429
|
+
* </FormField>
|
|
2430
|
+
* ```
|
|
2431
|
+
*/
|
|
1353
2432
|
export declare const FormField: (props: FormFieldProps) => JSX.Element;
|
|
1354
2433
|
|
|
1355
|
-
|
|
2434
|
+
/**
|
|
2435
|
+
* Props for {@link FormField}. It supplies field state to compatible
|
|
2436
|
+
* descendants through `FieldContext`.
|
|
2437
|
+
*/
|
|
2438
|
+
export declare type FormFieldProps = Omit<BoxProps, keyof FormFieldVariantProps | 'gap'> & FormFieldVariantProps & {
|
|
2439
|
+
/** Visible label text for the field. */
|
|
1356
2440
|
label: string;
|
|
2441
|
+
/**
|
|
2442
|
+
* The `id` of the labeled input. The child input must use this exact `id`
|
|
2443
|
+
* for the rendered label's `htmlFor` relationship to work.
|
|
2444
|
+
*/
|
|
1357
2445
|
labelFor: string;
|
|
2446
|
+
/** Input or control content associated with this field. */
|
|
1358
2447
|
children: ReactNode;
|
|
2448
|
+
/** Supporting guidance displayed near the input. */
|
|
1359
2449
|
helpText?: string;
|
|
2450
|
+
/**
|
|
2451
|
+
* Displays a visual required indicator. Also set `required` on the native
|
|
2452
|
+
* input when browser validation or required semantics are needed.
|
|
2453
|
+
*/
|
|
1360
2454
|
required?: boolean;
|
|
2455
|
+
/** Marks the field and compatible descendants as having an error. */
|
|
1361
2456
|
error?: boolean;
|
|
2457
|
+
/** Marks the field invalid and supplies invalid state to compatible descendants. */
|
|
1362
2458
|
invalid?: boolean;
|
|
2459
|
+
/** Marks the field successful. Success text takes precedence over error text. */
|
|
1363
2460
|
success?: boolean;
|
|
2461
|
+
/** Message displayed when `error` or `invalid` is true and `success` is false. */
|
|
1364
2462
|
errorText?: string;
|
|
2463
|
+
/** Message displayed when `success` is true, including when error state is also set. */
|
|
1365
2464
|
successText?: string;
|
|
2465
|
+
/**
|
|
2466
|
+
* Marks the field `aria-disabled`, applies disabled styling, and supplies
|
|
2467
|
+
* disabled state to compatible descendants. Native child controls must
|
|
2468
|
+
* still receive `disabled` themselves.
|
|
2469
|
+
*/
|
|
1366
2470
|
disabled?: boolean;
|
|
2471
|
+
/** Optional title shown by the label-help tooltip when `tooltipText` is provided. */
|
|
1367
2472
|
tooltipTitle?: string;
|
|
2473
|
+
/**
|
|
2474
|
+
* Help text that enables the informational tooltip beside the label. The
|
|
2475
|
+
* tooltip is not rendered without this value.
|
|
2476
|
+
*/
|
|
1368
2477
|
tooltipText?: string;
|
|
2478
|
+
/**
|
|
2479
|
+
* Field size passed to compatible descendants and used by the field recipe.
|
|
2480
|
+
*
|
|
2481
|
+
* @default 'md'
|
|
2482
|
+
*/
|
|
1369
2483
|
size?: FormFieldVariantProps['size'];
|
|
2484
|
+
/**
|
|
2485
|
+
* Uses a stacked field by default; `inline` places label and control in a
|
|
2486
|
+
* two-column layout.
|
|
2487
|
+
*
|
|
2488
|
+
* @default 'default'
|
|
2489
|
+
*/
|
|
1370
2490
|
layout?: FormFieldVariantProps['layout'];
|
|
2491
|
+
/** Spacing token applied between controls in the field's input container. */
|
|
1371
2492
|
gap?: SpacingToken;
|
|
1372
2493
|
};
|
|
1373
2494
|
|
|
@@ -1386,8 +2507,10 @@ declare type FormFieldVariantProps = {
|
|
|
1386
2507
|
[key in keyof FormFieldVariant]?: ConditionalValue<FormFieldVariant[key]> | undefined
|
|
1387
2508
|
}
|
|
1388
2509
|
|
|
2510
|
+
/** Returns the internal menu compound-component marker for a React element, or `null` for other values. */
|
|
1389
2511
|
export declare const getComponentType: (node: unknown) => string | null;
|
|
1390
2512
|
|
|
2513
|
+
/** Splits text into case-insensitive query-match parts for highlight rendering. */
|
|
1391
2514
|
export declare const getHighlightedTextParts: (value: string, query: string) => {
|
|
1392
2515
|
text: string;
|
|
1393
2516
|
match: boolean;
|
|
@@ -1397,12 +2520,27 @@ declare type Globals = "-moz-initial" | "inherit" | "initial" | "revert" | "reve
|
|
|
1397
2520
|
|
|
1398
2521
|
export declare type GlobalStyleObject = Record<string, unknown>;
|
|
1399
2522
|
|
|
2523
|
+
/** Returns whether a child tree contains any visible menu item, subgroup, or submenu for a filter. */
|
|
1400
2524
|
export declare const hasMatchingItems: (children: ReactNode, filterContext: MenuFilterContextValue) => boolean;
|
|
1401
2525
|
|
|
2526
|
+
/**
|
|
2527
|
+
* Renders a semantic document heading with the matching typography.
|
|
2528
|
+
*
|
|
2529
|
+
* Choose `level` from the page outline rather than for visual size alone.
|
|
2530
|
+
*
|
|
2531
|
+
* @example
|
|
2532
|
+
* ```tsx
|
|
2533
|
+
* <Heading level="h2">Shipping details</Heading>
|
|
2534
|
+
* ```
|
|
2535
|
+
*/
|
|
1402
2536
|
export declare const Heading: (props: HeadingProps) => JSX.Element;
|
|
1403
2537
|
|
|
1404
|
-
|
|
2538
|
+
/** Props accepted by {@link Heading}. */
|
|
2539
|
+
export declare type HeadingProps = Omit<TextProps, keyof HeadingVariantProps> & HeadingVariantProps & {
|
|
2540
|
+
/** Heading content. */
|
|
1405
2541
|
children?: string | ReactNode;
|
|
2542
|
+
/** Semantic heading level and matching visual treatment. */
|
|
2543
|
+
/** @default "h2" */
|
|
1406
2544
|
level?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
1407
2545
|
};
|
|
1408
2546
|
|
|
@@ -1418,11 +2556,33 @@ declare type HeadingVariantProps = {
|
|
|
1418
2556
|
[key in keyof HeadingVariant]?: ConditionalValue<HeadingVariant[key]> | undefined
|
|
1419
2557
|
}
|
|
1420
2558
|
|
|
2559
|
+
/**
|
|
2560
|
+
* Renders case-insensitive literal matches in text using semantic `mark`
|
|
2561
|
+
* elements.
|
|
2562
|
+
*
|
|
2563
|
+
* Empty or whitespace-only queries, and `enabled={false}`, render the original
|
|
2564
|
+
* string without wrapper markup. Use it directly for custom content; default
|
|
2565
|
+
* {@link ListItem} content uses it automatically when highlighting is enabled.
|
|
2566
|
+
*
|
|
2567
|
+
* @example
|
|
2568
|
+
* ```tsx
|
|
2569
|
+
* <HighlightText value="Account settings" query="account" />
|
|
2570
|
+
* ```
|
|
2571
|
+
*/
|
|
1421
2572
|
export declare const HighlightText: (props: HighlightTextProps) => JSX.Element;
|
|
1422
2573
|
|
|
1423
|
-
|
|
2574
|
+
/** Props for {@link HighlightText}. */
|
|
2575
|
+
export declare type HighlightTextProps = Omit<BoxProps, keyof HighlightTextVariantProps> & HighlightTextVariantProps & {
|
|
2576
|
+
/** Text to render and search within. */
|
|
1424
2577
|
value: string;
|
|
2578
|
+
/** Case-insensitive literal text to mark within `value`. */
|
|
1425
2579
|
query: string;
|
|
2580
|
+
/**
|
|
2581
|
+
* When false, returns `value` without creating highlight markup or applying
|
|
2582
|
+
* styling props.
|
|
2583
|
+
*
|
|
2584
|
+
* @default true
|
|
2585
|
+
*/
|
|
1426
2586
|
enabled?: boolean;
|
|
1427
2587
|
};
|
|
1428
2588
|
|
|
@@ -1434,22 +2594,74 @@ declare type HighlightTextVariantProps = {
|
|
|
1434
2594
|
[key in keyof HighlightTextVariant]?: ConditionalValue<HighlightTextVariant[key]> | undefined
|
|
1435
2595
|
}
|
|
1436
2596
|
|
|
1437
|
-
declare type HourCycle = '12' | '24';
|
|
1438
|
-
|
|
1439
2597
|
declare type HTMLStyledProps<T extends ElementType> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, JsxStyleProps>
|
|
1440
2598
|
|
|
2599
|
+
/**
|
|
2600
|
+
* Renders an SVG symbol from the configured icon sprite.
|
|
2601
|
+
*
|
|
2602
|
+
* Icons are visual content, not automatically hidden or named. Pass
|
|
2603
|
+
* `aria-hidden` for decorative icons; give meaningful standalone icons an
|
|
2604
|
+
* accessible name such as `aria-label`. Wrap meaningful actions in
|
|
2605
|
+
* {@link IconButton} rather than using a bare clickable SVG.
|
|
2606
|
+
*
|
|
2607
|
+
* @example
|
|
2608
|
+
* ```tsx
|
|
2609
|
+
* <Icon name="info" aria-label="More information" />
|
|
2610
|
+
* ```
|
|
2611
|
+
*/
|
|
1441
2612
|
export declare const Icon: (props: IconProps) => JSX.Element;
|
|
1442
2613
|
|
|
2614
|
+
/**
|
|
2615
|
+
* Performs an icon-only action or navigation with a required accessible label.
|
|
2616
|
+
*
|
|
2617
|
+
* Renders a native `button` by default, or an anchor when `href` is supplied.
|
|
2618
|
+
* Its explicit `size`, `error`, `invalid`, and `disabled` values take
|
|
2619
|
+
* precedence over slot context, which takes precedence over field context.
|
|
2620
|
+
* Its recipe defaults to the `standard` variant and `md` size.
|
|
2621
|
+
*
|
|
2622
|
+
* @example
|
|
2623
|
+
* ```tsx
|
|
2624
|
+
* <IconButton iconName="edit" altText="Edit invoice" onClick={editInvoice} />
|
|
2625
|
+
* ```
|
|
2626
|
+
*/
|
|
1443
2627
|
export declare const IconButton: (props: IconButtonProps) => JSX.Element;
|
|
1444
2628
|
|
|
1445
|
-
|
|
2629
|
+
/**
|
|
2630
|
+
* Props for {@link IconButton}. Extends {@link BoxProps} for layout and native
|
|
2631
|
+
* element attributes while reserving its visual recipe variants.
|
|
2632
|
+
*/
|
|
2633
|
+
export declare type IconButtonProps = Omit<BoxProps, keyof IconButtonVariantProps> & IconButtonVariantProps & {
|
|
2634
|
+
/** Icon symbol rendered for the action. */
|
|
1446
2635
|
iconName: IconNamesList;
|
|
2636
|
+
/**
|
|
2637
|
+
* Required accessible label for the button and text used by its tooltip.
|
|
2638
|
+
* Describe the action, not the icon's shape.
|
|
2639
|
+
*/
|
|
1447
2640
|
altText: string;
|
|
2641
|
+
/** When provided, renders an anchor instead of a native button. */
|
|
1448
2642
|
href?: string;
|
|
2643
|
+
/**
|
|
2644
|
+
* Shows a centered spinner, hides the icon, and sets `aria-busy`. Loading
|
|
2645
|
+
* does not disable the control; set `disabled` when the action is unavailable.
|
|
2646
|
+
*
|
|
2647
|
+
* @default false
|
|
2648
|
+
*/
|
|
1449
2649
|
loading?: boolean;
|
|
2650
|
+
/** Marks the control as having an error for styling. */
|
|
1450
2651
|
error?: boolean;
|
|
2652
|
+
/** Sets `aria-invalid` and marks the control invalid for styling. */
|
|
1451
2653
|
invalid?: boolean;
|
|
2654
|
+
/**
|
|
2655
|
+
* Disables a native button. For links, marks the anchor `aria-disabled` and
|
|
2656
|
+
* prevents its default click navigation.
|
|
2657
|
+
*/
|
|
1452
2658
|
disabled?: boolean;
|
|
2659
|
+
/**
|
|
2660
|
+
* Native button type; ignored when `href` causes the component to render an
|
|
2661
|
+
* anchor.
|
|
2662
|
+
*
|
|
2663
|
+
* @default 'button'
|
|
2664
|
+
*/
|
|
1453
2665
|
type?: 'submit' | 'reset' | 'button';
|
|
1454
2666
|
};
|
|
1455
2667
|
|
|
@@ -1468,6 +2680,7 @@ declare type IconButtonVariantProps = {
|
|
|
1468
2680
|
[key in keyof IconButtonVariant]?: ConditionalValue<IconButtonVariant[key]> | undefined
|
|
1469
2681
|
}
|
|
1470
2682
|
|
|
2683
|
+
/** Resolved SVG sprite configuration shared by {@link IconProvider}. */
|
|
1471
2684
|
declare type IconConfigContextValue = {
|
|
1472
2685
|
spritePath: string;
|
|
1473
2686
|
};
|
|
@@ -1536,6 +2749,7 @@ export declare const IconNames: {
|
|
|
1536
2749
|
readonly 'checkbox-focus': "checkbox-focus";
|
|
1537
2750
|
readonly 'checkbox-indeterminate': "checkbox-indeterminate";
|
|
1538
2751
|
readonly checkbox: "checkbox";
|
|
2752
|
+
readonly cheese: "cheese";
|
|
1539
2753
|
readonly 'circle-change': "circle-change";
|
|
1540
2754
|
readonly 'circle-check': "circle-check";
|
|
1541
2755
|
readonly circle: "circle";
|
|
@@ -1546,6 +2760,7 @@ export declare const IconNames: {
|
|
|
1546
2760
|
readonly clock: "clock";
|
|
1547
2761
|
readonly 'cloud-synced': "cloud-synced";
|
|
1548
2762
|
readonly code: "code";
|
|
2763
|
+
readonly 'collapse-vertical': "collapse-vertical";
|
|
1549
2764
|
readonly color: "color";
|
|
1550
2765
|
readonly compass: "compass";
|
|
1551
2766
|
readonly computer: "computer";
|
|
@@ -1575,6 +2790,7 @@ export declare const IconNames: {
|
|
|
1575
2790
|
readonly eraser: "eraser";
|
|
1576
2791
|
readonly error: "error";
|
|
1577
2792
|
readonly 'event-list': "event-list";
|
|
2793
|
+
readonly 'expand-vertical': "expand-vertical";
|
|
1578
2794
|
readonly export: "export";
|
|
1579
2795
|
readonly extension: "extension";
|
|
1580
2796
|
readonly 'eye-slash': "eye-slash";
|
|
@@ -1642,6 +2858,7 @@ export declare const IconNames: {
|
|
|
1642
2858
|
readonly 'list-numbers': "list-numbers";
|
|
1643
2859
|
readonly 'lock-open': "lock-open";
|
|
1644
2860
|
readonly lock: "lock";
|
|
2861
|
+
readonly magnet: "magnet";
|
|
1645
2862
|
readonly 'map-pin': "map-pin";
|
|
1646
2863
|
readonly map: "map";
|
|
1647
2864
|
readonly 'mark-unread': "mark-unread";
|
|
@@ -1751,6 +2968,8 @@ export declare const IconNames: {
|
|
|
1751
2968
|
readonly textbox: "textbox";
|
|
1752
2969
|
readonly 'time-add': "time-add";
|
|
1753
2970
|
readonly timer: "timer";
|
|
2971
|
+
readonly 'to-date-backward': "to-date-backward";
|
|
2972
|
+
readonly 'to-date-forward': "to-date-forward";
|
|
1754
2973
|
readonly toolbox: "toolbox";
|
|
1755
2974
|
readonly tools: "tools";
|
|
1756
2975
|
readonly trash: "trash";
|
|
@@ -1850,6 +3069,7 @@ declare type IconNamesList =
|
|
|
1850
3069
|
| 'checkbox-focus'
|
|
1851
3070
|
| 'checkbox-indeterminate'
|
|
1852
3071
|
| 'checkbox'
|
|
3072
|
+
| 'cheese'
|
|
1853
3073
|
| 'circle-change'
|
|
1854
3074
|
| 'circle-check'
|
|
1855
3075
|
| 'circle'
|
|
@@ -1860,6 +3080,7 @@ declare type IconNamesList =
|
|
|
1860
3080
|
| 'clock'
|
|
1861
3081
|
| 'cloud-synced'
|
|
1862
3082
|
| 'code'
|
|
3083
|
+
| 'collapse-vertical'
|
|
1863
3084
|
| 'color'
|
|
1864
3085
|
| 'compass'
|
|
1865
3086
|
| 'computer'
|
|
@@ -1889,6 +3110,7 @@ declare type IconNamesList =
|
|
|
1889
3110
|
| 'eraser'
|
|
1890
3111
|
| 'error'
|
|
1891
3112
|
| 'event-list'
|
|
3113
|
+
| 'expand-vertical'
|
|
1892
3114
|
| 'export'
|
|
1893
3115
|
| 'extension'
|
|
1894
3116
|
| 'eye-slash'
|
|
@@ -1956,6 +3178,7 @@ declare type IconNamesList =
|
|
|
1956
3178
|
| 'list-numbers'
|
|
1957
3179
|
| 'lock-open'
|
|
1958
3180
|
| 'lock'
|
|
3181
|
+
| 'magnet'
|
|
1959
3182
|
| 'map-pin'
|
|
1960
3183
|
| 'map'
|
|
1961
3184
|
| 'mark-unread'
|
|
@@ -2065,6 +3288,8 @@ declare type IconNamesList =
|
|
|
2065
3288
|
| 'textbox'
|
|
2066
3289
|
| 'time-add'
|
|
2067
3290
|
| 'timer'
|
|
3291
|
+
| 'to-date-backward'
|
|
3292
|
+
| 'to-date-forward'
|
|
2068
3293
|
| 'toolbox'
|
|
2069
3294
|
| 'tools'
|
|
2070
3295
|
| 'trash'
|
|
@@ -2099,16 +3324,57 @@ declare type IconNamesList =
|
|
|
2099
3324
|
| 'zoom-in'
|
|
2100
3325
|
| 'zoom-out';
|
|
2101
3326
|
|
|
2102
|
-
declare type
|
|
3327
|
+
declare type IconOwnProps = {
|
|
3328
|
+
/** Symbol identifier from the configured SVG sprite. */
|
|
2103
3329
|
name: IconNamesList;
|
|
3330
|
+
/**
|
|
3331
|
+
* Icon size recipe variant. Responsive/conditional recipe values are
|
|
3332
|
+
* supported. An explicit value takes precedence over slot context.
|
|
3333
|
+
*
|
|
3334
|
+
* @default 24px when no size is supplied by the icon or its slot context
|
|
3335
|
+
*/
|
|
2104
3336
|
size?: IconVariantProps['size'];
|
|
3337
|
+
/**
|
|
3338
|
+
* Design-token fill color. An explicit value takes precedence over slot
|
|
3339
|
+
* context; otherwise the recipe uses the decorative icon color.
|
|
3340
|
+
*
|
|
3341
|
+
* @default 'icon.decorative'
|
|
3342
|
+
*/
|
|
2105
3343
|
fill?: ColorToken;
|
|
2106
3344
|
};
|
|
2107
3345
|
|
|
3346
|
+
/**
|
|
3347
|
+
* Props for {@link Icon}. Extends SVG and Box props for presentation and
|
|
3348
|
+
* accessibility attributes.
|
|
3349
|
+
*/
|
|
3350
|
+
export declare type IconProps = Omit<BoxProps, keyof IconVariantProps | keyof IconOwnProps> & Omit<IconVariantProps, keyof IconOwnProps> & IconOwnProps;
|
|
3351
|
+
|
|
3352
|
+
/**
|
|
3353
|
+
* Configures the SVG sprite used by descendant {@link Icon} components.
|
|
3354
|
+
*
|
|
3355
|
+
* Use it at an application or embedded-library boundary when the default
|
|
3356
|
+
* `/sprite.svg` location is not available. Nested providers override the
|
|
3357
|
+
* sprite path for their own descendants.
|
|
3358
|
+
*
|
|
3359
|
+
* @example
|
|
3360
|
+
* ```tsx
|
|
3361
|
+
* <IconProvider spritePath="/assets/icons.svg">
|
|
3362
|
+
* <App />
|
|
3363
|
+
* </IconProvider>
|
|
3364
|
+
* ```
|
|
3365
|
+
*/
|
|
2108
3366
|
export declare const IconProvider: ({ children, spritePath }: IconProviderProps) => JSX.Element;
|
|
2109
3367
|
|
|
3368
|
+
/** Props for {@link IconProvider}. */
|
|
2110
3369
|
export declare type IconProviderProps = {
|
|
3370
|
+
/** Components that should resolve sprite symbols from this provider. */
|
|
2111
3371
|
children: ReactNode;
|
|
3372
|
+
/**
|
|
3373
|
+
* URL or path to the SVG sprite file. This provider value applies to all
|
|
3374
|
+
* descendant `Icon` components.
|
|
3375
|
+
*
|
|
3376
|
+
* @default '/sprite.svg'
|
|
3377
|
+
*/
|
|
2112
3378
|
spritePath?: string;
|
|
2113
3379
|
};
|
|
2114
3380
|
|
|
@@ -2125,6 +3391,7 @@ declare type Important = ImportantMark | WhitespaceImportant
|
|
|
2125
3391
|
|
|
2126
3392
|
declare type ImportantMark = "!" | "!important"
|
|
2127
3393
|
|
|
3394
|
+
/** Returns whether text is visible for the supplied filtering mode and query. */
|
|
2128
3395
|
export declare const isItemMatch: ({ textValue, query, filterMode, }: {
|
|
2129
3396
|
textValue: string;
|
|
2130
3397
|
query: string;
|
|
@@ -2139,23 +3406,46 @@ P
|
|
|
2139
3406
|
declare type JsxStyleProps = SystemStyleObject_2 & WithCss
|
|
2140
3407
|
|
|
2141
3408
|
/**
|
|
2142
|
-
*
|
|
2143
|
-
*
|
|
2144
|
-
*
|
|
2145
|
-
*
|
|
3409
|
+
* Displays a keyboard shortcut as a group of native `kbd` elements.
|
|
3410
|
+
*
|
|
3411
|
+
* Known symbols receive readable tooltip labels: ⌘ command, ⌥ option,
|
|
3412
|
+
* ⌃ control, ⇪ shift, ⎋ escape, ⌫ delete, ↩ return, ⇥ tab, and the four arrow
|
|
3413
|
+
* symbols. `Kbd` describes a shortcut; it is not an interactive control.
|
|
3414
|
+
*
|
|
3415
|
+
* @example
|
|
3416
|
+
* ```tsx
|
|
3417
|
+
* <Kbd keys={['⌘', 'K']} />
|
|
3418
|
+
* ```
|
|
2146
3419
|
*/
|
|
2147
3420
|
export declare const Kbd: (props: KbdProps) => JSX.Element;
|
|
2148
3421
|
|
|
3422
|
+
/** Props accepted by {@link Kbd}. */
|
|
2149
3423
|
export declare type KbdProps = Omit<BoxProps, 'children'> & {
|
|
3424
|
+
/** Ordered key labels that make up the shortcut. */
|
|
2150
3425
|
keys: KbdValue[];
|
|
2151
3426
|
};
|
|
2152
3427
|
|
|
3428
|
+
/** A visible key label accepted by `Kbd`. */
|
|
2153
3429
|
declare type KbdValue = string;
|
|
2154
3430
|
|
|
3431
|
+
/**
|
|
3432
|
+
* Renders a native label for a form control.
|
|
3433
|
+
*
|
|
3434
|
+
* `htmlFor` must match the target control's `id`. Use `FormField` when the
|
|
3435
|
+
* control also needs help text, validation messaging, or shared field state.
|
|
3436
|
+
*
|
|
3437
|
+
* @example
|
|
3438
|
+
* ```tsx
|
|
3439
|
+
* <Label htmlFor="email">Email address</Label>
|
|
3440
|
+
* ```
|
|
3441
|
+
*/
|
|
2155
3442
|
export declare const Label: (props: LabelProps) => JSX.Element;
|
|
2156
3443
|
|
|
2157
|
-
|
|
3444
|
+
/** Props accepted by {@link Label}. */
|
|
3445
|
+
export declare type LabelProps = Omit<BoxProps, keyof LabelVariantProps> & LabelVariantProps & {
|
|
3446
|
+
/** ID of the form control labeled by this element. */
|
|
2158
3447
|
htmlFor: string;
|
|
3448
|
+
/** Visible label content. */
|
|
2159
3449
|
children?: string | ReactNode;
|
|
2160
3450
|
};
|
|
2161
3451
|
|
|
@@ -2167,6 +3457,7 @@ declare interface LabelVariant {
|
|
|
2167
3457
|
bold: boolean
|
|
2168
3458
|
italic: boolean
|
|
2169
3459
|
underline: boolean
|
|
3460
|
+
dashedUnderline: boolean
|
|
2170
3461
|
truncate: boolean
|
|
2171
3462
|
allCaps: boolean
|
|
2172
3463
|
size: "10" | "12" | "14" | "16" | "20" | "24" | "32" | "40" | "48" | "64" | "72" | "80" | "96"
|
|
@@ -2182,18 +3473,45 @@ declare type LetterSpacingToken = "tighter" | "tight" | "normal" | "wide" | "wid
|
|
|
2182
3473
|
|
|
2183
3474
|
declare type LineHeightToken = "none" | "tight" | "default" | "loose"
|
|
2184
3475
|
|
|
3476
|
+
/**
|
|
3477
|
+
* Navigates to another location using a native anchor.
|
|
3478
|
+
*
|
|
3479
|
+
* Set `external` for destinations that should open in a new tab. Use `Button`
|
|
3480
|
+
* for actions that do not navigate.
|
|
3481
|
+
*
|
|
3482
|
+
* @example
|
|
3483
|
+
* ```tsx
|
|
3484
|
+
* <Link href="/orders">View orders</Link>
|
|
3485
|
+
* ```
|
|
3486
|
+
*/
|
|
2185
3487
|
export declare const Link: (props: LinkProps) => JSX.Element;
|
|
2186
3488
|
|
|
2187
|
-
|
|
3489
|
+
/** Props accepted by {@link Link}. */
|
|
3490
|
+
export declare type LinkProps = Omit<BoxProps, keyof LinkVariantProps> & LinkVariantProps & {
|
|
3491
|
+
/** Destination URL for the native anchor. */
|
|
2188
3492
|
href: string;
|
|
3493
|
+
/** Opens the destination in a new tab and displays an external-link icon. */
|
|
3494
|
+
/** @default false */
|
|
2189
3495
|
external?: boolean;
|
|
3496
|
+
/** Prevents navigation and removes the link from sequential keyboard focus. */
|
|
3497
|
+
/** @default false */
|
|
2190
3498
|
disabled?: boolean;
|
|
3499
|
+
/** Visual text size. */
|
|
2191
3500
|
size?: LinkVariantProps['size'];
|
|
3501
|
+
/** Font family token used for the link text. */
|
|
3502
|
+
/** @default "body" */
|
|
2192
3503
|
family?: FontToken;
|
|
3504
|
+
/** Applies italic styling to the link text. */
|
|
3505
|
+
/** @default false */
|
|
2193
3506
|
italic?: boolean;
|
|
3507
|
+
/** Applies the recipe's bold link treatment. */
|
|
3508
|
+
/** @default false */
|
|
2194
3509
|
bold?: boolean;
|
|
3510
|
+
/** Explicit font-weight token. */
|
|
2195
3511
|
weight?: FontWeightToken;
|
|
3512
|
+
/** Additional class name merged with the link recipe class. */
|
|
2196
3513
|
className?: string;
|
|
3514
|
+
/** Link label and inline content. */
|
|
2197
3515
|
children?: ReactNode;
|
|
2198
3516
|
};
|
|
2199
3517
|
|
|
@@ -2205,38 +3523,99 @@ declare interface LinkVariant {
|
|
|
2205
3523
|
bold: boolean
|
|
2206
3524
|
italic: boolean
|
|
2207
3525
|
underline: boolean
|
|
3526
|
+
dashedUnderline: boolean
|
|
2208
3527
|
truncate: boolean
|
|
2209
3528
|
allCaps: boolean
|
|
2210
3529
|
size: "10" | "12" | "14" | "16" | "20" | "24" | "32" | "40" | "48" | "64" | "72" | "80" | "96"
|
|
2211
3530
|
weight: "light" | "normal" | "medium" | "bold" | "black"
|
|
2212
|
-
_disabled: boolean
|
|
2213
3531
|
}
|
|
2214
3532
|
|
|
2215
3533
|
declare type LinkVariantProps = {
|
|
2216
3534
|
[key in keyof LinkVariant]?: ConditionalValue<LinkVariant[key]> | undefined
|
|
2217
3535
|
}
|
|
2218
3536
|
|
|
3537
|
+
/**
|
|
3538
|
+
* Lays out related {@link ListItem} controls and shares density and search
|
|
3539
|
+
* highlighting settings with its descendants.
|
|
3540
|
+
*
|
|
3541
|
+
* The component renders a `div` and does not assign an ARIA role. When its
|
|
3542
|
+
* children are interactive options, provide the appropriate role and label
|
|
3543
|
+
* (for example, `role="listbox"` and `aria-label`).
|
|
3544
|
+
*
|
|
3545
|
+
* @example
|
|
3546
|
+
* ```tsx
|
|
3547
|
+
* <List role="listbox" aria-label="Account settings">
|
|
3548
|
+
* <ListItem label="Profile" />
|
|
3549
|
+
* </List>
|
|
3550
|
+
* ```
|
|
3551
|
+
*/
|
|
2219
3552
|
export declare const List: (props: ListProps) => JSX.Element;
|
|
2220
3553
|
|
|
3554
|
+
/** Values inherited by descendants of a {@link ListProvider}. */
|
|
2221
3555
|
declare type ListContextValue = {
|
|
3556
|
+
/** Resolved list spacing density. */
|
|
2222
3557
|
density: ListDensity;
|
|
3558
|
+
/** Search text for default list-item content. */
|
|
2223
3559
|
query: string;
|
|
3560
|
+
/** Whether default list-item text should mark query matches. */
|
|
2224
3561
|
highlightMatches: boolean;
|
|
3562
|
+
/** Reserved list-item variant metadata for custom list composition. */
|
|
2225
3563
|
variant?: ListItemVariantProps['variant'];
|
|
3564
|
+
/** Reserved leading icon metadata for custom list composition. */
|
|
2226
3565
|
iconBefore?: IconNamesList;
|
|
3566
|
+
/** Reserved trailing icon metadata for custom list composition. */
|
|
2227
3567
|
iconAfter?: IconNamesList;
|
|
2228
3568
|
};
|
|
2229
3569
|
|
|
3570
|
+
/** Responsive density value shared by List primitives. */
|
|
2230
3571
|
declare type ListDensity = ListItemVariantProps['density'];
|
|
2231
3572
|
|
|
3573
|
+
/**
|
|
3574
|
+
* Renders an interactive option, link, selection control, or visual divider.
|
|
3575
|
+
*
|
|
3576
|
+
* Except for the `divider` variant, it renders a native `button` with
|
|
3577
|
+
* `type="button"` by default, or an anchor when `href` is provided, and sets
|
|
3578
|
+
* `role="option"`. Place interactive items in a suitably labeled parent such
|
|
3579
|
+
* as `<List role="listbox">`. Pass custom `children` for fully custom item
|
|
3580
|
+
* content; doing so replaces the label, description, controls, icons, and
|
|
3581
|
+
* match highlighting.
|
|
3582
|
+
*
|
|
3583
|
+
* @example
|
|
3584
|
+
* ```tsx
|
|
3585
|
+
* <ListItem label="Profile" description="Manage your account" />
|
|
3586
|
+
* ```
|
|
3587
|
+
*/
|
|
2232
3588
|
export declare const ListItem: (props: ListItemProps) => JSX.Element;
|
|
2233
3589
|
|
|
3590
|
+
/**
|
|
3591
|
+
* Groups related list items under an optional label and can add a trailing
|
|
3592
|
+
* separator.
|
|
3593
|
+
*
|
|
3594
|
+
* The group inherits search settings from its parent list and provides its
|
|
3595
|
+
* resolved density to descendants. Use {@link List} as the parent when items
|
|
3596
|
+
* should share list semantics and configuration.
|
|
3597
|
+
*
|
|
3598
|
+
* @example
|
|
3599
|
+
* ```tsx
|
|
3600
|
+
* <ListItemGroup label="Account">
|
|
3601
|
+
* <ListItem label="Profile" />
|
|
3602
|
+
* </ListItemGroup>
|
|
3603
|
+
* ```
|
|
3604
|
+
*/
|
|
2234
3605
|
export declare const ListItemGroup: (props: ListItemGroupProps) => JSX.Element;
|
|
2235
3606
|
|
|
2236
|
-
|
|
3607
|
+
/** Props for {@link ListItemGroup}. */
|
|
3608
|
+
export declare type ListItemGroupProps = Omit<BoxProps, keyof ListItemGroupVariantProps | 'children'> & ListItemGroupVariantProps & {
|
|
3609
|
+
/** Optional heading displayed above the group's children. */
|
|
2237
3610
|
label?: string;
|
|
3611
|
+
/** Items or other content belonging to this group. */
|
|
2238
3612
|
children: BoxProps['children'];
|
|
3613
|
+
/** Displays a separator after the group. */
|
|
2239
3614
|
divider?: boolean;
|
|
3615
|
+
/**
|
|
3616
|
+
* Density inherited by descendant list items unless they provide their own
|
|
3617
|
+
* value. Responsive recipe values are supported.
|
|
3618
|
+
*/
|
|
2240
3619
|
density?: ListDensity;
|
|
2241
3620
|
};
|
|
2242
3621
|
|
|
@@ -2251,21 +3630,75 @@ declare type ListItemGroupVariantProps = {
|
|
|
2251
3630
|
[key in keyof ListItemGroupVariant]?: ConditionalValue<ListItemGroupVariant[key]> | undefined
|
|
2252
3631
|
}
|
|
2253
3632
|
|
|
2254
|
-
|
|
3633
|
+
/**
|
|
3634
|
+
* Props for {@link ListItem}. It extends button-like Box props, except its
|
|
3635
|
+
* semantic element and button type are controlled by the component.
|
|
3636
|
+
*/
|
|
3637
|
+
export declare type ListItemProps = Omit<BoxProps, keyof ListItemVariantProps | 'as' | 'type' | 'href'> & Omit<ListItemVariantProps, 'selected' | 'iconBefore' | 'iconAfter'> & {
|
|
3638
|
+
/** When provided, renders an anchor instead of the default native button. */
|
|
2255
3639
|
href?: string;
|
|
3640
|
+
/** Content rendered before the default label and description. */
|
|
3641
|
+
before?: ReactNode;
|
|
3642
|
+
/** Primary text rendered when custom `children` are not supplied. */
|
|
2256
3643
|
label?: string;
|
|
3644
|
+
/** Secondary text rendered below `label` when custom `children` are not supplied. */
|
|
2257
3645
|
description?: string;
|
|
3646
|
+
/** Search text used to highlight this item's default `label` and `description`. */
|
|
2258
3647
|
query?: string;
|
|
3648
|
+
/**
|
|
3649
|
+
* Enables highlighting for this item's default text. When omitted, inherits
|
|
3650
|
+
* the nearest {@link List} setting.
|
|
3651
|
+
*/
|
|
2259
3652
|
highlightMatches?: boolean;
|
|
3653
|
+
/**
|
|
3654
|
+
* Native `name` passed to the checkbox or toggle created by the matching
|
|
3655
|
+
* `variant`.
|
|
3656
|
+
*
|
|
3657
|
+
* @default 'list-item'
|
|
3658
|
+
*/
|
|
2260
3659
|
controlName?: string;
|
|
3660
|
+
/**
|
|
3661
|
+
* Runs for the native change event from a checkbox or toggle variant. It
|
|
3662
|
+
* does not update `selected`; update that prop from the owning state.
|
|
3663
|
+
*/
|
|
2261
3664
|
onControlChange?: ChangeEventHandler<HTMLInputElement>;
|
|
3665
|
+
/**
|
|
3666
|
+
* Sets `aria-selected` and selected styling. This is controlled state and
|
|
3667
|
+
* does not change when the item is clicked.
|
|
3668
|
+
*
|
|
3669
|
+
* @default false
|
|
3670
|
+
*/
|
|
2262
3671
|
selected?: boolean;
|
|
3672
|
+
/**
|
|
3673
|
+
* Chooses default content, a checkbox, a toggle, or a noninteractive
|
|
3674
|
+
* divider. The `divider` variant ignores item content and other Box props.
|
|
3675
|
+
*
|
|
3676
|
+
* @default 'default'
|
|
3677
|
+
*/
|
|
2263
3678
|
variant?: ListItemVariantProps['variant'];
|
|
3679
|
+
/**
|
|
3680
|
+
* Overrides the nearest {@link List} or {@link ListItemGroup} density.
|
|
3681
|
+
* Responsive recipe values are supported.
|
|
3682
|
+
*/
|
|
2264
3683
|
density?: ListDensity;
|
|
3684
|
+
/** Icon symbol rendered before the default text content. */
|
|
2265
3685
|
iconBefore?: IconNamesList;
|
|
3686
|
+
/** Icon symbol rendered after the default text content. */
|
|
2266
3687
|
iconAfter?: IconNamesList;
|
|
3688
|
+
/** Fill token for `iconBefore`. */
|
|
2267
3689
|
iconBeforeFill?: IconProps['fill'];
|
|
3690
|
+
/** Fill token for `iconAfter`. */
|
|
2268
3691
|
iconAfterFill?: IconProps['fill'];
|
|
3692
|
+
/**
|
|
3693
|
+
* Internal record primary key rendered as `data-row-id` on the item root.
|
|
3694
|
+
* It targets one row in a test and identifies which record an interaction
|
|
3695
|
+
* applied to.
|
|
3696
|
+
*
|
|
3697
|
+
* It must never be a row index, a composite value, or a customer-facing
|
|
3698
|
+
* identifier such as an order number or part number. It is unrelated to
|
|
3699
|
+
* React's `key`.
|
|
3700
|
+
*/
|
|
3701
|
+
rowId?: string;
|
|
2269
3702
|
};
|
|
2270
3703
|
|
|
2271
3704
|
declare interface ListItemVariant {
|
|
@@ -2286,10 +3719,33 @@ declare type ListItemVariantProps = {
|
|
|
2286
3719
|
[key in keyof ListItemVariant]?: ConditionalValue<ListItemVariant[key]> | undefined
|
|
2287
3720
|
}
|
|
2288
3721
|
|
|
2289
|
-
|
|
3722
|
+
/**
|
|
3723
|
+
* Props for {@link List}. Its values are provided to nested list primitives
|
|
3724
|
+
* through list context.
|
|
3725
|
+
*/
|
|
3726
|
+
export declare type ListProps = Omit<BoxProps, keyof ListVariantProps | 'children'> & ListVariantProps & {
|
|
3727
|
+
/** List items and optional {@link ListItemGroup} sections. */
|
|
2290
3728
|
children: ReactNode;
|
|
3729
|
+
/**
|
|
3730
|
+
* Shared spacing density for descendants that do not set their own density.
|
|
3731
|
+
* Responsive recipe values are supported.
|
|
3732
|
+
*
|
|
3733
|
+
* @default 'compact'
|
|
3734
|
+
*/
|
|
2291
3735
|
density?: ListDensity;
|
|
3736
|
+
/**
|
|
3737
|
+
* Search text inherited by descendants that do not provide their own
|
|
3738
|
+
* `query`. It is used only when highlighting is enabled.
|
|
3739
|
+
*
|
|
3740
|
+
* @default ''
|
|
3741
|
+
*/
|
|
2292
3742
|
query?: string;
|
|
3743
|
+
/**
|
|
3744
|
+
* Enables highlighting of inherited `query` matches in default
|
|
3745
|
+
* `ListItem` labels and descriptions. Child items can override it.
|
|
3746
|
+
*
|
|
3747
|
+
* @default false
|
|
3748
|
+
*/
|
|
2293
3749
|
highlightMatches?: boolean;
|
|
2294
3750
|
};
|
|
2295
3751
|
|
|
@@ -2304,10 +3760,27 @@ declare type ListVariantProps = {
|
|
|
2304
3760
|
[key in keyof ListVariant]?: ConditionalValue<ListVariant[key]> | undefined
|
|
2305
3761
|
}
|
|
2306
3762
|
|
|
3763
|
+
/**
|
|
3764
|
+
* Displays a keyboard-navigable action list from a trigger or inline in a layout.
|
|
3765
|
+
*
|
|
3766
|
+
* Use `MenuItem`, `MenuGroup`, and `SubMenu` as children. A triggered menu
|
|
3767
|
+
* restores the trigger relationship through Floating UI and dismisses on Escape
|
|
3768
|
+
* or outside press. Use an inline menu when the list should always be visible.
|
|
3769
|
+
*
|
|
3770
|
+
* @example
|
|
3771
|
+
* ```tsx
|
|
3772
|
+
* <Menu trigger={<Button>Actions</Button>}>
|
|
3773
|
+
* <MenuItem label="Edit" onClick={edit} />
|
|
3774
|
+
* <MenuItem label="Archive" onClick={archive} />
|
|
3775
|
+
* </Menu>
|
|
3776
|
+
* ```
|
|
3777
|
+
*/
|
|
2307
3778
|
export declare const Menu: (props: MenuProps) => JSX.Element;
|
|
2308
3779
|
|
|
3780
|
+
/** Spacing density shared by a menu panel and its rows. */
|
|
2309
3781
|
export declare type MenuDensity = ListDensity;
|
|
2310
3782
|
|
|
3783
|
+
/** Filtering state consumed by menu compound components. */
|
|
2311
3784
|
declare type MenuFilterContextValue = {
|
|
2312
3785
|
query: string;
|
|
2313
3786
|
filterMode: MenuFilterMode;
|
|
@@ -2318,37 +3791,89 @@ declare type MenuFilterContextValue = {
|
|
|
2318
3791
|
}) => string;
|
|
2319
3792
|
};
|
|
2320
3793
|
|
|
3794
|
+
/** Determines whether `query` hides non-matching menu items. */
|
|
2321
3795
|
declare type MenuFilterMode = 'none' | 'contains';
|
|
2322
3796
|
|
|
3797
|
+
/**
|
|
3798
|
+
* Groups related menu rows under an optional label.
|
|
3799
|
+
*
|
|
3800
|
+
* A group is hidden when none of its supported menu children match the parent
|
|
3801
|
+
* menu's active filter.
|
|
3802
|
+
*
|
|
3803
|
+
* @example
|
|
3804
|
+
* ```tsx
|
|
3805
|
+
* <MenuGroup label="File">
|
|
3806
|
+
* <MenuItem label="Download" />
|
|
3807
|
+
* </MenuGroup>
|
|
3808
|
+
* ```
|
|
3809
|
+
*/
|
|
2323
3810
|
export declare const MenuGroup: (props: MenuGroupProps) => JSX.Element | null;
|
|
2324
3811
|
|
|
2325
|
-
|
|
3812
|
+
declare type MenuGroupOwnProps = {
|
|
3813
|
+
/** Optional group heading. */
|
|
2326
3814
|
label?: string;
|
|
3815
|
+
/** Menu children shown only when at least one child matches the current filter. */
|
|
2327
3816
|
children: ReactNode;
|
|
3817
|
+
/** Adds a divider before the group. */
|
|
2328
3818
|
divider?: boolean;
|
|
2329
3819
|
};
|
|
2330
3820
|
|
|
3821
|
+
/** Props for {@link MenuGroup}, a labeled group of related menu children. */
|
|
3822
|
+
export declare type MenuGroupProps = Omit<BoxProps, keyof MenuGroupOwnProps> & MenuGroupOwnProps;
|
|
3823
|
+
|
|
3824
|
+
/**
|
|
3825
|
+
* Renders an actionable row within a {@link Menu}.
|
|
3826
|
+
*
|
|
3827
|
+
* It renders a button by default, or an anchor when `href` is supplied. Arrow
|
|
3828
|
+
* keys and typeahead participate in the parent menu's roving focus behavior.
|
|
3829
|
+
* Use `variant="checkbox"` or `"toggle"` when `selected` is meaningful.
|
|
3830
|
+
*
|
|
3831
|
+
* @example
|
|
3832
|
+
* ```tsx
|
|
3833
|
+
* <MenuItem label="Duplicate" iconBefore="copy" onClick={duplicate} />
|
|
3834
|
+
* ```
|
|
3835
|
+
*/
|
|
2331
3836
|
export declare const MenuItem: (props: MenuItemProps) => JSX.Element | null;
|
|
2332
3837
|
|
|
2333
|
-
|
|
3838
|
+
/** Props for {@link MenuItem}, a selectable row inside a {@link Menu}. */
|
|
3839
|
+
export declare type MenuItemProps = Omit<BoxProps, 'as' | 'ref' | 'onClick' | 'type'> & Omit<MenuVariantProps, 'iconBefore' | 'iconAfter'> & {
|
|
3840
|
+
/** Primary visible text, also used for typeahead and filtering unless `textValue` is supplied. */
|
|
2334
3841
|
label?: string;
|
|
3842
|
+
/** Secondary visible text included in filtering by default. */
|
|
2335
3843
|
description?: string;
|
|
3844
|
+
/**
|
|
3845
|
+
* Chooses a regular item, checkable item, toggle item, or divider.
|
|
3846
|
+
* @default 'default'
|
|
3847
|
+
*/
|
|
2336
3848
|
variant?: MenuItemVariant;
|
|
3849
|
+
/** Prevents activation and marks the row unavailable to assistive technology. */
|
|
2337
3850
|
disabled?: boolean;
|
|
3851
|
+
/** Sets selected styling and `aria-checked` for checkbox and toggle variants. */
|
|
2338
3852
|
selected?: boolean;
|
|
3853
|
+
/** Icon displayed before the item text. */
|
|
2339
3854
|
iconBefore?: IconNamesList;
|
|
3855
|
+
/** Icon displayed after the item text. */
|
|
2340
3856
|
iconAfter?: IconNamesList;
|
|
3857
|
+
/** Renders the item as an anchor instead of a button. */
|
|
2341
3858
|
href?: string;
|
|
3859
|
+
/** Browsing context for an anchor item. */
|
|
2342
3860
|
target?: string;
|
|
3861
|
+
/** Relationship attribute for an anchor item, such as `noopener` for a new tab. */
|
|
2343
3862
|
rel?: string;
|
|
3863
|
+
/** Overrides the parent menu's `closeOnSelect` behavior for this item. */
|
|
2344
3864
|
closeOnSelect?: boolean;
|
|
3865
|
+
/** Overrides the parent menu's row density for this item. */
|
|
2345
3866
|
density?: MenuDensity;
|
|
3867
|
+
/** Explicit text used for typeahead and filtering instead of label and description. */
|
|
2346
3868
|
textValue?: string;
|
|
3869
|
+
/** Called for pointer selection before the menu closes. Call `event.preventDefault()` to prevent the automatic close and tree click event. */
|
|
2347
3870
|
onClick?: (event: MouseEvent_2<HTMLElement>) => void;
|
|
2348
3871
|
};
|
|
2349
3872
|
|
|
3873
|
+
/** Visual and ARIA role variants supported by {@link MenuItem}. */
|
|
2350
3874
|
export declare type MenuItemVariant = 'default' | 'checkbox' | 'toggle' | 'divider';
|
|
2351
3875
|
|
|
3876
|
+
/** Roving-focus state for one menu level. */
|
|
2352
3877
|
declare type MenuListContextValue = {
|
|
2353
3878
|
activeIndex: number | null;
|
|
2354
3879
|
getItemProps: (userProps?: HTMLProps<HTMLElement>) => HTMLProps<HTMLElement>;
|
|
@@ -2360,30 +3885,96 @@ declare type MenuListContextValue = {
|
|
|
2360
3885
|
closeParentSubMenuFlyout?: () => void;
|
|
2361
3886
|
};
|
|
2362
3887
|
|
|
2363
|
-
|
|
3888
|
+
declare type MenuOwnProps = {
|
|
3889
|
+
/** Trigger element cloned with the menu's event handlers and ARIA attributes. Omit it, or use `inline`, to render the menu in place. */
|
|
2364
3890
|
trigger?: ReactElement;
|
|
3891
|
+
/** `MenuItem`, `MenuGroup`, and `SubMenu` children that make up the menu. */
|
|
2365
3892
|
children: ReactNode;
|
|
3893
|
+
/** Controlled popup state. Pair with `onOpenChange`; omit it to use `defaultOpen`. */
|
|
2366
3894
|
open?: boolean;
|
|
3895
|
+
/**
|
|
3896
|
+
* Initial popup state for an uncontrolled triggered menu. It is used only on first render.
|
|
3897
|
+
* @default false
|
|
3898
|
+
*/
|
|
2367
3899
|
defaultOpen?: boolean;
|
|
3900
|
+
/** Called when interaction requests that a triggered menu open or close. */
|
|
2368
3901
|
onOpenChange?: (open: boolean) => void;
|
|
3902
|
+
/**
|
|
3903
|
+
* Floating UI placement of a triggered menu relative to its trigger.
|
|
3904
|
+
* @default 'bottom-start'
|
|
3905
|
+
*/
|
|
2369
3906
|
placement?: Placement;
|
|
3907
|
+
/**
|
|
3908
|
+
* Positioning strategy for a triggered menu.
|
|
3909
|
+
* @default 'absolute'
|
|
3910
|
+
*/
|
|
2370
3911
|
strategy?: 'absolute' | 'fixed';
|
|
3912
|
+
/**
|
|
3913
|
+
* Closes the root menu after a `MenuItem` is selected unless that item overrides it.
|
|
3914
|
+
* @default true
|
|
3915
|
+
*/
|
|
2371
3916
|
closeOnSelect?: boolean;
|
|
3917
|
+
/**
|
|
3918
|
+
* Renders the panel in normal document flow without requiring a trigger.
|
|
3919
|
+
* @default false
|
|
3920
|
+
*/
|
|
2372
3921
|
inline?: boolean;
|
|
3922
|
+
/**
|
|
3923
|
+
* Pointer interactions that open the trigger.
|
|
3924
|
+
* @default 'click'
|
|
3925
|
+
*/
|
|
2373
3926
|
triggerInteraction?: MenuTriggerInteraction;
|
|
3927
|
+
/**
|
|
3928
|
+
* Delay before hover interaction opens the menu, in milliseconds.
|
|
3929
|
+
* @default 75
|
|
3930
|
+
*/
|
|
2374
3931
|
triggerOpenDelay?: number;
|
|
3932
|
+
/**
|
|
3933
|
+
* Delay before hover interaction closes the menu, in milliseconds.
|
|
3934
|
+
* @default 100
|
|
3935
|
+
*/
|
|
2375
3936
|
triggerCloseDelay?: number;
|
|
3937
|
+
/**
|
|
3938
|
+
* Default presentation for descendant `SubMenu` components.
|
|
3939
|
+
* @default 'hover'
|
|
3940
|
+
*/
|
|
2376
3941
|
subMenuInteraction?: SubMenuInteraction;
|
|
3942
|
+
/**
|
|
3943
|
+
* Spacing density for menu rows.
|
|
3944
|
+
* @default 'compact'
|
|
3945
|
+
*/
|
|
2377
3946
|
density?: MenuDensity;
|
|
3947
|
+
/**
|
|
3948
|
+
* Text used to filter `MenuItem` and `SubMenu` labels when `filterMode` is `'contains'`.
|
|
3949
|
+
* @default ''
|
|
3950
|
+
*/
|
|
2378
3951
|
query?: string;
|
|
3952
|
+
/** Reserved for external filtering controls; this component does not call it. */
|
|
2379
3953
|
onQueryChange?: (query: string) => void;
|
|
3954
|
+
/**
|
|
3955
|
+
* Enables case-insensitive substring filtering when set to `'contains'`.
|
|
3956
|
+
* @default 'none'
|
|
3957
|
+
*/
|
|
2380
3958
|
filterMode?: MenuFilterMode;
|
|
3959
|
+
/**
|
|
3960
|
+
* Content rendered when filtering leaves no visible menu children.
|
|
3961
|
+
* @default 'No results found'
|
|
3962
|
+
*/
|
|
2381
3963
|
renderNoResults?: ReactNode;
|
|
3964
|
+
/**
|
|
3965
|
+
* Highlights case-insensitive query matches in visible labels and descriptions.
|
|
3966
|
+
* @default Boolean(query)
|
|
3967
|
+
*/
|
|
2382
3968
|
highlightMatches?: boolean;
|
|
3969
|
+
/**
|
|
3970
|
+
* Derives searchable text when an item does not provide `textValue`. It receives the item's label and description.
|
|
3971
|
+
* @default joins label and description with a space
|
|
3972
|
+
*/
|
|
2383
3973
|
getItemText?: (item: {
|
|
2384
3974
|
label?: string;
|
|
2385
3975
|
description?: string;
|
|
2386
3976
|
}) => string;
|
|
3977
|
+
/** Applies the recipe's panel visual treatment. */
|
|
2387
3978
|
panel?: MenuVariantProps['panel'];
|
|
2388
3979
|
/**
|
|
2389
3980
|
* When this `Menu` is used as one section of a horizontal menubar, pass a
|
|
@@ -2396,16 +3987,37 @@ export declare type MenuProps = {
|
|
|
2396
3987
|
* row and horizontal menubar keys would not run on the trigger).
|
|
2397
3988
|
*/
|
|
2398
3989
|
onMenubarEdgeNavigate?: (direction: 1 | -1) => void;
|
|
2399
|
-
}
|
|
3990
|
+
};
|
|
3991
|
+
|
|
3992
|
+
/** Props for {@link Menu}, including popup state, filtering, and nested-menu behavior. */
|
|
3993
|
+
export declare type MenuProps = Omit<BoxProps, keyof MenuOwnProps> & MenuOwnProps;
|
|
2400
3994
|
|
|
3995
|
+
/**
|
|
3996
|
+
* Provides menu root and filter context for custom compound-menu composition.
|
|
3997
|
+
*
|
|
3998
|
+
* Normal menus provide this context automatically. Use this provider only when
|
|
3999
|
+
* composing `MenuItem`, `MenuGroup`, or `SubMenu` outside a `Menu`.
|
|
4000
|
+
*
|
|
4001
|
+
* @example
|
|
4002
|
+
* ```tsx
|
|
4003
|
+
* <MenuProvider>
|
|
4004
|
+
* <MenuItem label="Refresh" />
|
|
4005
|
+
* </MenuProvider>
|
|
4006
|
+
* ```
|
|
4007
|
+
*/
|
|
2401
4008
|
export declare const MenuProvider: ({ children, root, filter }: MenuProviderProps) => JSX.Element;
|
|
2402
4009
|
|
|
4010
|
+
/** Props for {@link MenuProvider}, an escape hatch for custom menu composition. */
|
|
2403
4011
|
export declare type MenuProviderProps = {
|
|
4012
|
+
/** Descendants that consume the supplied menu contexts. */
|
|
2404
4013
|
children: ReactNode;
|
|
4014
|
+
/** Partial root behavior merged with the normal menu defaults. */
|
|
2405
4015
|
root?: Partial<MenuRootContextValue>;
|
|
4016
|
+
/** Partial filtering behavior merged with the normal menu defaults. */
|
|
2406
4017
|
filter?: Partial<MenuFilterContextValue>;
|
|
2407
4018
|
};
|
|
2408
4019
|
|
|
4020
|
+
/** Shared root behavior consumed by menu compound components. */
|
|
2409
4021
|
declare type MenuRootContextValue = {
|
|
2410
4022
|
density: MenuDensity;
|
|
2411
4023
|
panel?: MenuVariantProps['panel'];
|
|
@@ -2420,9 +4032,14 @@ declare type MenuRootContextValue = {
|
|
|
2420
4032
|
onMenubarEdgeNavigate?: (direction: 1 | -1) => void;
|
|
2421
4033
|
};
|
|
2422
4034
|
|
|
2423
|
-
|
|
4035
|
+
/** Pointer or focus interactions that can open a menu trigger. */
|
|
4036
|
+
declare type MenuTriggerInteraction = 'click' | 'hover' | 'focus' | 'click-and-hover';
|
|
2424
4037
|
|
|
2425
4038
|
declare interface MenuVariant {
|
|
4039
|
+
/**
|
|
4040
|
+
* @default "elevated"
|
|
4041
|
+
*/
|
|
4042
|
+
layer: "elevated" | "modalFloating"
|
|
2426
4043
|
/**
|
|
2427
4044
|
* @default "compact"
|
|
2428
4045
|
*/
|
|
@@ -2434,55 +4051,156 @@ declare type MenuVariantProps = {
|
|
|
2434
4051
|
[key in keyof MenuVariant]?: ConditionalValue<MenuVariant[key]> | undefined
|
|
2435
4052
|
}
|
|
2436
4053
|
|
|
2437
|
-
|
|
4054
|
+
/**
|
|
4055
|
+
* Renders a form modal with a title, TanStack Form wiring, and default footer
|
|
4056
|
+
* actions.
|
|
4057
|
+
*
|
|
4058
|
+
* Validation and error display are consumer-owned: define validators on
|
|
4059
|
+
* `form.Field` and map field meta to {@link FormField}. Call `close()` from
|
|
4060
|
+
* `onSubmit` when the dialog should dismiss after a successful action. Form
|
|
4061
|
+
* values reset to the current `defaultValues` when `open` changes.
|
|
4062
|
+
*
|
|
4063
|
+
* @example
|
|
4064
|
+
* ```tsx
|
|
4065
|
+
* <Modal
|
|
4066
|
+
* open={open}
|
|
4067
|
+
* onOpenChange={setOpen}
|
|
4068
|
+
* title="Create process"
|
|
4069
|
+
* submitLabel="Create"
|
|
4070
|
+
* defaultValues={{ name: '' }}
|
|
4071
|
+
* onSubmit={async ({ value, close }) => {
|
|
4072
|
+
* await createProcess(value.name);
|
|
4073
|
+
* close();
|
|
4074
|
+
* }}
|
|
4075
|
+
* >
|
|
4076
|
+
* {(form) => (
|
|
4077
|
+
* <form.Field name="name">
|
|
4078
|
+
* {(field) => (
|
|
4079
|
+
* <FormField label="Name" labelFor="name">
|
|
4080
|
+
* <TextInput
|
|
4081
|
+
* id="name"
|
|
4082
|
+
* value={field.state.value}
|
|
4083
|
+
* onChange={(e) => field.handleChange(e.target.value)}
|
|
4084
|
+
* />
|
|
4085
|
+
* </FormField>
|
|
4086
|
+
* )}
|
|
4087
|
+
* </form.Field>
|
|
4088
|
+
* )}
|
|
4089
|
+
* </Modal>
|
|
4090
|
+
* ```
|
|
4091
|
+
*/
|
|
4092
|
+
export declare const Modal: <TFormData extends Record<string, unknown>>(props: ModalProps<TFormData>) => JSX.Element;
|
|
2438
4093
|
|
|
4094
|
+
/**
|
|
4095
|
+
* Renders the main content region of a {@link ModalWrapper}.
|
|
4096
|
+
*
|
|
4097
|
+
* @example
|
|
4098
|
+
* ```tsx
|
|
4099
|
+
* <ModalBody>Changes are saved automatically.</ModalBody>
|
|
4100
|
+
* ```
|
|
4101
|
+
*/
|
|
2439
4102
|
export declare const ModalBody: (props: ModalBodyProps) => JSX.Element;
|
|
2440
4103
|
|
|
2441
|
-
|
|
2442
|
-
|
|
4104
|
+
/** Props for {@link ModalBody}, the main content region of a modal. */
|
|
4105
|
+
export declare type ModalBodyProps = Omit<BoxProps, 'children'> & {
|
|
4106
|
+
/** Content displayed in the modal's body region. */
|
|
2443
4107
|
children: ReactNode;
|
|
2444
4108
|
};
|
|
2445
4109
|
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
4110
|
+
/**
|
|
4111
|
+
* Renders the action region of a {@link ModalWrapper}.
|
|
4112
|
+
*
|
|
4113
|
+
* @example
|
|
4114
|
+
* ```tsx
|
|
4115
|
+
* <ModalFooter><Button>Save</Button></ModalFooter>
|
|
4116
|
+
* ```
|
|
4117
|
+
*/
|
|
2455
4118
|
export declare const ModalFooter: (props: ModalFooterProps) => JSX.Element;
|
|
2456
4119
|
|
|
2457
|
-
|
|
2458
|
-
|
|
4120
|
+
/** Props for {@link ModalFooter}, the action region of a modal. */
|
|
4121
|
+
export declare type ModalFooterProps = Omit<BoxProps, 'children'> & {
|
|
4122
|
+
/** Content displayed in the footer, typically dialog action buttons. */
|
|
2459
4123
|
children: ReactNode;
|
|
2460
4124
|
};
|
|
2461
4125
|
|
|
4126
|
+
/** TanStack Form instance passed to {@link Modal} children. */
|
|
4127
|
+
export declare type ModalFormApi<TFormData extends Record<string, unknown>> = ReactFormExtendedApi<TFormData, FormValidateOrFn<TFormData> | undefined, FormValidateOrFn<TFormData> | undefined, FormAsyncValidateOrFn<TFormData> | undefined, FormValidateOrFn<TFormData> | undefined, FormAsyncValidateOrFn<TFormData> | undefined, FormValidateOrFn<TFormData> | undefined, FormAsyncValidateOrFn<TFormData> | undefined, FormValidateOrFn<TFormData> | undefined, FormAsyncValidateOrFn<TFormData> | undefined, FormAsyncValidateOrFn<TFormData> | undefined, unknown>;
|
|
4128
|
+
|
|
4129
|
+
/**
|
|
4130
|
+
* Renders the optional header region of a parent {@link ModalWrapper}.
|
|
4131
|
+
*
|
|
4132
|
+
* Use `title` for the standard heading or provide `children` for custom header
|
|
4133
|
+
* content. It must be rendered inside `ModalWrapper` because it uses modal
|
|
4134
|
+
* context to close the dialog.
|
|
4135
|
+
*
|
|
4136
|
+
* @example
|
|
4137
|
+
* ```tsx
|
|
4138
|
+
* <ModalHeader title="Edit profile" />
|
|
4139
|
+
* ```
|
|
4140
|
+
*/
|
|
2462
4141
|
export declare const ModalHeader: (props: ModalHeaderProps) => JSX.Element;
|
|
2463
4142
|
|
|
2464
|
-
|
|
2465
|
-
|
|
4143
|
+
/** Props for {@link ModalHeader}, the optional heading and close-control region. */
|
|
4144
|
+
export declare type ModalHeaderProps = Omit<BoxProps, 'children'> & {
|
|
4145
|
+
/** Text rendered as the default level-three heading when `children` is omitted. */
|
|
2466
4146
|
title?: string;
|
|
2467
|
-
/**
|
|
4147
|
+
/**
|
|
4148
|
+
* Identifier applied to the title heading for `aria-labelledby` on the dialog.
|
|
4149
|
+
* Pass the same value to the parent shell's `aria-labelledby`.
|
|
4150
|
+
*/
|
|
4151
|
+
titleId?: string;
|
|
4152
|
+
/**
|
|
4153
|
+
* Shows the built-in button that calls the parent modal's `onOpenChange(false)`.
|
|
4154
|
+
* @default true
|
|
4155
|
+
*/
|
|
2468
4156
|
showCloseButton?: boolean;
|
|
2469
|
-
/**
|
|
4157
|
+
/** Custom header content. When supplied, it replaces both `title` and the built-in close button. */
|
|
2470
4158
|
children?: ReactNode;
|
|
2471
4159
|
};
|
|
2472
4160
|
|
|
2473
|
-
|
|
2474
|
-
|
|
4161
|
+
/** Props for {@link Modal}, a pre-built form dialog. */
|
|
4162
|
+
export declare type ModalProps<TFormData extends Record<string, unknown>> = {
|
|
4163
|
+
/** Controlled dialog state. */
|
|
2475
4164
|
open: boolean;
|
|
2476
|
-
/**
|
|
2477
|
-
onOpenChange: (open: boolean) => void;
|
|
2478
|
-
/**
|
|
2479
|
-
|
|
2480
|
-
/**
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
4165
|
+
/** Called when the dialog requests an open-state change. */
|
|
4166
|
+
onOpenChange: (open: boolean) => void;
|
|
4167
|
+
/** Visible dialog title rendered in {@link ModalHeader}. */
|
|
4168
|
+
title: string;
|
|
4169
|
+
/**
|
|
4170
|
+
* Default field values passed to TanStack Form. Reseeded via `form.reset`
|
|
4171
|
+
* whenever `open` changes. To edit a different record while the dialog stays
|
|
4172
|
+
* open, remount with `key={recordId}`.
|
|
4173
|
+
*/
|
|
4174
|
+
defaultValues: TFormData;
|
|
4175
|
+
/**
|
|
4176
|
+
* Called after TanStack Form validation succeeds. Call `close()` when the
|
|
4177
|
+
* action completes and the dialog should dismiss.
|
|
4178
|
+
*/
|
|
4179
|
+
onSubmit: (context: ModalSubmitContext<TFormData>) => void | Promise<void>;
|
|
4180
|
+
/** Render prop receiving the modal's TanStack Form instance for field wiring. */
|
|
4181
|
+
children: (form: ModalFormApi<TFormData>) => ReactNode;
|
|
4182
|
+
/** Label for the default primary submit button. @default 'Submit' */
|
|
4183
|
+
submitLabel?: string;
|
|
4184
|
+
/** Label for the default cancel button. @default 'Cancel' */
|
|
4185
|
+
cancelLabel?: string;
|
|
4186
|
+
/** Additional disable flag applied to the default submit button. */
|
|
4187
|
+
submitDisabled?: boolean;
|
|
4188
|
+
/** Replaces the default cancel/submit footer. Submit wiring is consumer-owned. */
|
|
4189
|
+
footer?: ReactNode;
|
|
4190
|
+
/** Recipe size forwarded to {@link ModalWrapper}. @default 'md' */
|
|
2484
4191
|
size?: ModalVariantProps['size'];
|
|
2485
|
-
|
|
4192
|
+
/** Prevents overlay clicks from closing the dialog. @default false */
|
|
4193
|
+
preventOverlayClose?: boolean;
|
|
4194
|
+
/** Shows the header close button. @default true */
|
|
4195
|
+
showCloseButton?: boolean;
|
|
4196
|
+
};
|
|
4197
|
+
|
|
4198
|
+
/** Context passed to {@link ModalProps.onSubmit}. */
|
|
4199
|
+
export declare type ModalSubmitContext<TFormData extends Record<string, unknown>> = {
|
|
4200
|
+
/** Validated form values from TanStack Form. */
|
|
4201
|
+
value: TFormData;
|
|
4202
|
+
/** Requests closing through the modal's `onOpenChange(false)`. */
|
|
4203
|
+
close: () => void;
|
|
2486
4204
|
};
|
|
2487
4205
|
|
|
2488
4206
|
declare interface ModalVariant {
|
|
@@ -2500,6 +4218,72 @@ declare type ModalVariantProps = {
|
|
|
2500
4218
|
[key in keyof ModalVariant]?: ConditionalValue<ModalVariant[key]> | undefined
|
|
2501
4219
|
}
|
|
2502
4220
|
|
|
4221
|
+
/**
|
|
4222
|
+
* Renders a controlled modal dialog shell in a portal with focus management and
|
|
4223
|
+
* a scroll-locking overlay.
|
|
4224
|
+
*
|
|
4225
|
+
* Escape always calls `onOpenChange(false)`. By default, pressing the overlay
|
|
4226
|
+
* does too. The dialog remains mounted for a 150 ms closing animation. Supply
|
|
4227
|
+
* an accessible name through `aria-label` or `aria-labelledby`; a visible
|
|
4228
|
+
* `ModalHeader` title alone is not linked automatically.
|
|
4229
|
+
*
|
|
4230
|
+
* Compose with `ModalHeader`, `ModalBody`, and `ModalFooter`, or use the
|
|
4231
|
+
* pre-built {@link Modal} and {@link ConfirmationModal} components.
|
|
4232
|
+
*
|
|
4233
|
+
* @example
|
|
4234
|
+
* ```tsx
|
|
4235
|
+
* <ModalWrapper open={open} onOpenChange={setOpen} aria-label="Delete project">
|
|
4236
|
+
* <ModalHeader title="Delete project" />
|
|
4237
|
+
* <ModalBody>This cannot be undone.</ModalBody>
|
|
4238
|
+
* <ModalFooter><Button onClick={remove}>Delete</Button></ModalFooter>
|
|
4239
|
+
* </ModalWrapper>
|
|
4240
|
+
* ```
|
|
4241
|
+
*/
|
|
4242
|
+
export declare const ModalWrapper: (props: ModalWrapperProps) => JSX.Element | null;
|
|
4243
|
+
|
|
4244
|
+
/** State and close behavior shared with descendants of {@link ModalWrapper}. */
|
|
4245
|
+
declare interface ModalWrapperContextValue {
|
|
4246
|
+
/** Whether the modal is currently in its open phase. */
|
|
4247
|
+
open: boolean;
|
|
4248
|
+
/** Requests closing through the parent modal's `onOpenChange(false)`. */
|
|
4249
|
+
onClose: () => void;
|
|
4250
|
+
/** Whether the parent modal blocks overlay-triggered closing. */
|
|
4251
|
+
preventOverlayClose?: boolean;
|
|
4252
|
+
}
|
|
4253
|
+
|
|
4254
|
+
/** Props for {@link ModalWrapper}, a controlled, portalled dialog shell. */
|
|
4255
|
+
export declare type ModalWrapperProps = Omit<BoxProps, keyof ModalVariantProps> & ModalVariantProps & {
|
|
4256
|
+
/** Controlled dialog state. Render state changes by updating this value after `onOpenChange`. */
|
|
4257
|
+
open: boolean;
|
|
4258
|
+
/** Called when Escape, overlay interaction, or a descendant close control requests closing. */
|
|
4259
|
+
onOpenChange: (open: boolean) => void;
|
|
4260
|
+
/**
|
|
4261
|
+
* Prevents overlay clicks from requesting close. Escape still requests close.
|
|
4262
|
+
* @default false
|
|
4263
|
+
*/
|
|
4264
|
+
preventOverlayClose?: boolean;
|
|
4265
|
+
/**
|
|
4266
|
+
* Element to focus when the dialog opens. Forwarded to Floating UI's
|
|
4267
|
+
* `FloatingFocusManager`. A number selects by tabbable index; a ref targets
|
|
4268
|
+
* a specific element (for example Cancel on a delete confirmation).
|
|
4269
|
+
*/
|
|
4270
|
+
initialFocus?: number | RefObject<HTMLElement | null>;
|
|
4271
|
+
/** Dialog content, typically composed from `ModalHeader`, `ModalBody`, and `ModalFooter`. */
|
|
4272
|
+
children: ReactNode;
|
|
4273
|
+
/** Identifier applied to the dialog element. Provide accessible naming with `aria-label` or `aria-labelledby`. */
|
|
4274
|
+
id?: string;
|
|
4275
|
+
/**
|
|
4276
|
+
* Recipe size for the dialog panel.
|
|
4277
|
+
* @default 'md'
|
|
4278
|
+
*/
|
|
4279
|
+
size?: ModalVariantProps['size'];
|
|
4280
|
+
/**
|
|
4281
|
+
* Recipe position for the dialog panel.
|
|
4282
|
+
* @default 'centered'
|
|
4283
|
+
*/
|
|
4284
|
+
position?: ModalVariantProps['position'];
|
|
4285
|
+
};
|
|
4286
|
+
|
|
2503
4287
|
declare interface ModernCssProperties {
|
|
2504
4288
|
/**
|
|
2505
4289
|
* Defines a name for the anchor element that can be referenced by positioned elements.
|
|
@@ -2592,6 +4376,24 @@ declare interface ModernCssProperties {
|
|
|
2592
4376
|
WebkitTextSecurity?: Globals | 'none' | 'circle' | 'disc' | 'square'
|
|
2593
4377
|
}
|
|
2594
4378
|
|
|
4379
|
+
/** Props for a multiple-selection {@link Autocomplete}. */
|
|
4380
|
+
declare type MultipleAutocompleteProps = AutocompleteBaseProps & {
|
|
4381
|
+
/** Enables multiple selection. Selected values render as chips. */
|
|
4382
|
+
multiple: true;
|
|
4383
|
+
/** Controlled selected values. Pair with `onValueChange`. */
|
|
4384
|
+
value?: AutocompleteValue<true>;
|
|
4385
|
+
/** Initial selected values when `value` is not provided. */
|
|
4386
|
+
defaultValue?: AutocompleteValue<true>;
|
|
4387
|
+
/** Runs when selection, removal, clearing, or creation requests new values. */
|
|
4388
|
+
onValueChange?: (value: AutocompleteValue<true>, reason: AutocompleteChangeReason) => void;
|
|
4389
|
+
/**
|
|
4390
|
+
* Runs when the selected values change.
|
|
4391
|
+
*
|
|
4392
|
+
* @deprecated Use `onValueChange`.
|
|
4393
|
+
*/
|
|
4394
|
+
onChange?: (value: AutocompleteValue<true>, reason: AutocompleteChangeReason) => void;
|
|
4395
|
+
};
|
|
4396
|
+
|
|
2595
4397
|
declare type Nested<P> = P & {
|
|
2596
4398
|
[K in Selectors]?: Nested<P>
|
|
2597
4399
|
} & {
|
|
@@ -2602,6 +4404,162 @@ declare type Nested<P> = P & {
|
|
|
2602
4404
|
|
|
2603
4405
|
declare type Number_2 = number & {}
|
|
2604
4406
|
|
|
4407
|
+
declare const numericSizes: {
|
|
4408
|
+
'0': {
|
|
4409
|
+
value: string;
|
|
4410
|
+
};
|
|
4411
|
+
'1': {
|
|
4412
|
+
value: string;
|
|
4413
|
+
};
|
|
4414
|
+
'2': {
|
|
4415
|
+
value: string;
|
|
4416
|
+
};
|
|
4417
|
+
'3': {
|
|
4418
|
+
value: string;
|
|
4419
|
+
};
|
|
4420
|
+
'4': {
|
|
4421
|
+
value: string;
|
|
4422
|
+
};
|
|
4423
|
+
'5': {
|
|
4424
|
+
value: string;
|
|
4425
|
+
};
|
|
4426
|
+
'6': {
|
|
4427
|
+
value: string;
|
|
4428
|
+
};
|
|
4429
|
+
'7': {
|
|
4430
|
+
value: string;
|
|
4431
|
+
};
|
|
4432
|
+
'8': {
|
|
4433
|
+
value: string;
|
|
4434
|
+
};
|
|
4435
|
+
'9': {
|
|
4436
|
+
value: string;
|
|
4437
|
+
};
|
|
4438
|
+
'10': {
|
|
4439
|
+
value: string;
|
|
4440
|
+
};
|
|
4441
|
+
'12': {
|
|
4442
|
+
value: string;
|
|
4443
|
+
};
|
|
4444
|
+
'14': {
|
|
4445
|
+
value: string;
|
|
4446
|
+
};
|
|
4447
|
+
'16': {
|
|
4448
|
+
value: string;
|
|
4449
|
+
};
|
|
4450
|
+
'18': {
|
|
4451
|
+
value: string;
|
|
4452
|
+
};
|
|
4453
|
+
'20': {
|
|
4454
|
+
value: string;
|
|
4455
|
+
};
|
|
4456
|
+
'22': {
|
|
4457
|
+
value: string;
|
|
4458
|
+
};
|
|
4459
|
+
'24': {
|
|
4460
|
+
value: string;
|
|
4461
|
+
};
|
|
4462
|
+
'28': {
|
|
4463
|
+
value: string;
|
|
4464
|
+
};
|
|
4465
|
+
'32': {
|
|
4466
|
+
value: string;
|
|
4467
|
+
};
|
|
4468
|
+
'40': {
|
|
4469
|
+
value: string;
|
|
4470
|
+
};
|
|
4471
|
+
'48': {
|
|
4472
|
+
value: string;
|
|
4473
|
+
};
|
|
4474
|
+
'56': {
|
|
4475
|
+
value: string;
|
|
4476
|
+
};
|
|
4477
|
+
'64': {
|
|
4478
|
+
value: string;
|
|
4479
|
+
};
|
|
4480
|
+
'72': {
|
|
4481
|
+
value: string;
|
|
4482
|
+
};
|
|
4483
|
+
'80': {
|
|
4484
|
+
value: string;
|
|
4485
|
+
};
|
|
4486
|
+
'88': {
|
|
4487
|
+
value: string;
|
|
4488
|
+
};
|
|
4489
|
+
'96': {
|
|
4490
|
+
value: string;
|
|
4491
|
+
};
|
|
4492
|
+
'104': {
|
|
4493
|
+
value: string;
|
|
4494
|
+
};
|
|
4495
|
+
'112': {
|
|
4496
|
+
value: string;
|
|
4497
|
+
};
|
|
4498
|
+
'120': {
|
|
4499
|
+
value: string;
|
|
4500
|
+
};
|
|
4501
|
+
'128': {
|
|
4502
|
+
value: string;
|
|
4503
|
+
};
|
|
4504
|
+
'136': {
|
|
4505
|
+
value: string;
|
|
4506
|
+
};
|
|
4507
|
+
'144': {
|
|
4508
|
+
value: string;
|
|
4509
|
+
};
|
|
4510
|
+
'152': {
|
|
4511
|
+
value: string;
|
|
4512
|
+
};
|
|
4513
|
+
'160': {
|
|
4514
|
+
value: string;
|
|
4515
|
+
};
|
|
4516
|
+
'168': {
|
|
4517
|
+
value: string;
|
|
4518
|
+
};
|
|
4519
|
+
'176': {
|
|
4520
|
+
value: string;
|
|
4521
|
+
};
|
|
4522
|
+
'184': {
|
|
4523
|
+
value: string;
|
|
4524
|
+
};
|
|
4525
|
+
'192': {
|
|
4526
|
+
value: string;
|
|
4527
|
+
};
|
|
4528
|
+
'200': {
|
|
4529
|
+
value: string;
|
|
4530
|
+
};
|
|
4531
|
+
'208': {
|
|
4532
|
+
value: string;
|
|
4533
|
+
};
|
|
4534
|
+
'216': {
|
|
4535
|
+
value: string;
|
|
4536
|
+
};
|
|
4537
|
+
'224': {
|
|
4538
|
+
value: string;
|
|
4539
|
+
};
|
|
4540
|
+
'232': {
|
|
4541
|
+
value: string;
|
|
4542
|
+
};
|
|
4543
|
+
'240': {
|
|
4544
|
+
value: string;
|
|
4545
|
+
};
|
|
4546
|
+
'248': {
|
|
4547
|
+
value: string;
|
|
4548
|
+
};
|
|
4549
|
+
'256': {
|
|
4550
|
+
value: string;
|
|
4551
|
+
};
|
|
4552
|
+
'264': {
|
|
4553
|
+
value: string;
|
|
4554
|
+
};
|
|
4555
|
+
'272': {
|
|
4556
|
+
value: string;
|
|
4557
|
+
};
|
|
4558
|
+
'280': {
|
|
4559
|
+
value: string;
|
|
4560
|
+
};
|
|
4561
|
+
};
|
|
4562
|
+
|
|
2605
4563
|
declare type NumericSizeToken = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "12" | "14" | "16" | "18" | "20" | "22" | "24" | "28" | "32" | "40" | "48" | "56" | "64" | "72" | "80" | "88" | "96" | "104" | "112" | "120" | "128" | "136" | "144" | "152" | "160" | "168" | "176" | "184" | "192" | "200" | "208" | "216" | "224" | "232" | "240" | "248" | "256" | "264" | "272" | "280"
|
|
2606
4564
|
|
|
2607
4565
|
declare interface ObsoleteProperties<TLength = (string & {}) | 0, TTime = string & {}> {
|
|
@@ -3663,6 +5621,38 @@ declare type ObsoletePropertiesFallback<TLength = (string & {}) | 0, TTime = str
|
|
|
3663
5621
|
|
|
3664
5622
|
declare type OmittedHTMLProps = 'color' | 'translate' | 'transition' | 'width' | 'height' | 'content'
|
|
3665
5623
|
|
|
5624
|
+
/**
|
|
5625
|
+
* Declares selectable metadata for a parent `Autocomplete`.
|
|
5626
|
+
*
|
|
5627
|
+
* `Option` renders no DOM by itself. Place it directly inside `Autocomplete`;
|
|
5628
|
+
* the parent builds the visible listbox and selection behavior.
|
|
5629
|
+
*
|
|
5630
|
+
* @example
|
|
5631
|
+
* ```tsx
|
|
5632
|
+
* <Autocomplete aria-label="Assignee">
|
|
5633
|
+
* <Option value="ada" label="Ada Lovelace" />
|
|
5634
|
+
* </Autocomplete>
|
|
5635
|
+
* ```
|
|
5636
|
+
*/
|
|
5637
|
+
declare const Option_2: (_props: OptionProps) => null;
|
|
5638
|
+
export { Option_2 as Option }
|
|
5639
|
+
|
|
5640
|
+
/** Metadata accepted by an {@link Option} inside `Autocomplete`. */
|
|
5641
|
+
export declare type OptionProps = {
|
|
5642
|
+
/** Stable value reported when this option is selected. */
|
|
5643
|
+
value: string;
|
|
5644
|
+
/** Visible option text and selected-value label. */
|
|
5645
|
+
label: string;
|
|
5646
|
+
/** Prevents the option from receiving navigation or selection. */
|
|
5647
|
+
disabled?: boolean;
|
|
5648
|
+
/** Secondary text included when filtering options. */
|
|
5649
|
+
description?: string;
|
|
5650
|
+
/** Icon rendered before the option label. */
|
|
5651
|
+
iconLeft?: IconNamesList;
|
|
5652
|
+
/** Icon rendered after the option label. */
|
|
5653
|
+
iconRight?: IconNamesList;
|
|
5654
|
+
};
|
|
5655
|
+
|
|
3666
5656
|
export declare namespace Panda {
|
|
3667
5657
|
export type RecipeConfig<V extends RecipeVariantRecord = RecipeVariantRecord> = BaseRecipeConfig<V>;
|
|
3668
5658
|
export type SlotRecipeConfig<S extends string = string, V extends SlotRecipeVariantRecord<S> = SlotRecipeVariantRecord<S>> = BaseSlotRecipeConfig<S, V>;
|
|
@@ -3688,6 +5678,10 @@ export declare type PatternConfig<T extends PatternProperties = PatternPropertie
|
|
|
3688
5678
|
|
|
3689
5679
|
export declare type PatternProperties = Record<string, unknown>;
|
|
3690
5680
|
|
|
5681
|
+
/**
|
|
5682
|
+
* Combines custom props with the compatible native props and ref for the
|
|
5683
|
+
* element selected by `as`.
|
|
5684
|
+
*/
|
|
3691
5685
|
declare type PolymorphicComponentProps<T extends ElementType, Props extends object = object> = Props & AsProp<T> & Omit<ComponentPropsWithRef<T>, PropsToOmit<T, Props>>;
|
|
3692
5686
|
|
|
3693
5687
|
declare type PositionAreaAxis =
|
|
@@ -3754,14 +5748,31 @@ declare type PositionTry =
|
|
|
3754
5748
|
| 'inline-end'
|
|
3755
5749
|
| DashedIdent
|
|
3756
5750
|
|
|
5751
|
+
/**
|
|
5752
|
+
* Renders a preformatted code block using native `pre` and `code` semantics.
|
|
5753
|
+
*
|
|
5754
|
+
* Whitespace in string content is preserved. The component does not perform
|
|
5755
|
+
* syntax highlighting.
|
|
5756
|
+
*
|
|
5757
|
+
* @example
|
|
5758
|
+
* ```tsx
|
|
5759
|
+
* <Pre lang="typescript">{'const ready = true;'}</Pre>
|
|
5760
|
+
* ```
|
|
5761
|
+
*/
|
|
3757
5762
|
export declare const Pre: (props: PreProps) => JSX.Element;
|
|
3758
5763
|
|
|
3759
|
-
declare type
|
|
5764
|
+
declare type PreOwnProps = {
|
|
5765
|
+
/** Preformatted code content. */
|
|
3760
5766
|
children: string | ReactNode;
|
|
5767
|
+
/** Language metadata forwarded to the nested `Code` element. */
|
|
3761
5768
|
lang?: string;
|
|
5769
|
+
/** Element override for the rendered `pre` container. */
|
|
3762
5770
|
as?: string;
|
|
3763
5771
|
};
|
|
3764
5772
|
|
|
5773
|
+
/** Props accepted by {@link Pre}. */
|
|
5774
|
+
export declare type PreProps = Omit<BoxProps, keyof PreOwnProps> & PreOwnProps;
|
|
5775
|
+
|
|
3765
5776
|
declare interface PropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}>
|
|
3766
5777
|
extends StandardPropertiesFallback<TLength, TTime>,
|
|
3767
5778
|
VendorPropertiesFallback<TLength, TTime>,
|
|
@@ -5512,68 +7523,117 @@ declare namespace Property {
|
|
|
5512
7523
|
type VectorEffect = Globals | "non-scaling-stroke" | "none";
|
|
5513
7524
|
}
|
|
5514
7525
|
|
|
7526
|
+
/** Record of native attributes and Panda CSS properties accepted by `splitProps`. */
|
|
5515
7527
|
declare type PropsRecord = Record<string, unknown>;
|
|
5516
7528
|
|
|
5517
7529
|
declare type PropsToOmit<T extends ElementType, P extends object> = keyof (AsProp<T> & P);
|
|
5518
7530
|
|
|
5519
7531
|
declare type Pseudos = AdvancedPseudos | SimplePseudos;
|
|
5520
7532
|
|
|
7533
|
+
/** Direction used when comparing a viewport or container size token. */
|
|
5521
7534
|
declare type QueryDirection = 'min' | 'max';
|
|
5522
7535
|
|
|
7536
|
+
/** Direction used when comparing a viewport or container size token. */
|
|
5523
7537
|
declare type QueryDirection_2 = 'min' | 'max';
|
|
5524
7538
|
|
|
5525
7539
|
/**
|
|
5526
|
-
*
|
|
7540
|
+
* A native radio control without a visible label.
|
|
7541
|
+
*
|
|
7542
|
+
* Prefer {@link RadioInput} inside {@link RadioGroup} for a labelled,
|
|
7543
|
+
* keyboard-navigable choice group. For standalone use, group radios by `name`
|
|
7544
|
+
* and associate each with a label using `id`. Use `checked` with `onChange` for
|
|
7545
|
+
* controlled state, or `defaultChecked` only for uncontrolled state.
|
|
5527
7546
|
*
|
|
5528
7547
|
* @example
|
|
5529
|
-
*
|
|
7548
|
+
* ```tsx
|
|
7549
|
+
* <Radio name="shipping" defaultChecked />
|
|
7550
|
+
* ```
|
|
5530
7551
|
*
|
|
5531
7552
|
* @example
|
|
7553
|
+
* ```tsx
|
|
5532
7554
|
* const [checked, setChecked] = useState(false);
|
|
5533
|
-
* <Radio checked={checked} onChange={(
|
|
7555
|
+
* <Radio name="shipping" checked={checked} onChange={(event) => setChecked(event.target.checked)} />
|
|
7556
|
+
* ```
|
|
5534
7557
|
*/
|
|
5535
7558
|
export declare const Radio: (props: RadioProps) => JSX.Element;
|
|
5536
7559
|
|
|
5537
7560
|
/**
|
|
5538
|
-
*
|
|
7561
|
+
* Native change event emitted by {@link Radio}.
|
|
5539
7562
|
* @example
|
|
5540
7563
|
* const handleChange: RadioChangeHandler = (e) => setChecked(e.target.checked);
|
|
5541
7564
|
*/
|
|
5542
|
-
declare type RadioChangeEvent = ChangeEvent<HTMLInputElement>;
|
|
7565
|
+
export declare type RadioChangeEvent = ChangeEvent<HTMLInputElement>;
|
|
5543
7566
|
|
|
5544
7567
|
/**
|
|
5545
|
-
*
|
|
7568
|
+
* Handler for a {@link Radio} native change event.
|
|
5546
7569
|
* @example
|
|
5547
7570
|
* const handleChange: RadioChangeHandler = (e) => setChecked(e.target.checked);
|
|
5548
7571
|
*/
|
|
5549
|
-
declare type RadioChangeHandler = (e: RadioChangeEvent) => void;
|
|
7572
|
+
export declare type RadioChangeHandler = (e: RadioChangeEvent) => void;
|
|
5550
7573
|
|
|
7574
|
+
/**
|
|
7575
|
+
* Coordinates a mutually exclusive set of {@link RadioInput} controls.
|
|
7576
|
+
*
|
|
7577
|
+
* It renders a `radiogroup` and shares its name, selected value, and disabled
|
|
7578
|
+
* state through context. Each grouped `RadioInput` needs a `value`; its native
|
|
7579
|
+
* radio behavior provides arrow-key navigation. Use `value` with `onChange` for
|
|
7580
|
+
* controlled state or `defaultValue` for uncontrolled state, never both.
|
|
7581
|
+
*
|
|
7582
|
+
* @example
|
|
7583
|
+
* ```tsx
|
|
7584
|
+
* <RadioGroup name="size" defaultValue="medium" label="Size">
|
|
7585
|
+
* <RadioInput value="small">Small</RadioInput>
|
|
7586
|
+
* <RadioInput value="medium">Medium</RadioInput>
|
|
7587
|
+
* </RadioGroup>
|
|
7588
|
+
* ```
|
|
7589
|
+
*/
|
|
5551
7590
|
export declare const RadioGroup: (props: RadioGroupProps) => JSX.Element;
|
|
5552
7591
|
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
7592
|
+
/** Props for {@link RadioGroup}, which coordinates descendant {@link RadioInput} controls. */
|
|
7593
|
+
export declare type RadioGroupProps = Omit<BoxProps, 'children' | 'role'> & {
|
|
7594
|
+
/** Shared native name for descendant grouped radios. */ name: string;
|
|
7595
|
+
/** Controlled selected value. Pair with `onChange`; use `null` for no selection. */ value?: string | null;
|
|
7596
|
+
/** Initial uncontrolled selected value; later updates are ignored. */
|
|
7597
|
+
/** @default null */
|
|
5556
7598
|
defaultValue?: string | null;
|
|
5557
|
-
onChange?: (value: string) => void;
|
|
5558
|
-
children: ReactNode;
|
|
5559
|
-
label?: string;
|
|
5560
|
-
id?: string;
|
|
5561
|
-
disabled?: boolean;
|
|
7599
|
+
/** Runs with the selected child `value` after a grouped radio changes. */ onChange?: (value: string) => void;
|
|
7600
|
+
/** Grouped `RadioInput` children. */ children: ReactNode;
|
|
7601
|
+
/** Accessible name applied as `aria-label`. Use when no separate visible group label is available. */ label?: string;
|
|
7602
|
+
/** Group ID. When supplied, descendants should provide an element with `${id}-label` as the visible group label. */ id?: string;
|
|
7603
|
+
/** Disables descendant grouped radios unless a child explicitly supplies `disabled`. */ disabled?: boolean;
|
|
5562
7604
|
};
|
|
5563
7605
|
|
|
7606
|
+
/**
|
|
7607
|
+
* A labelled radio option.
|
|
7608
|
+
*
|
|
7609
|
+
* Place it in {@link RadioGroup} with a unique `value` to receive shared
|
|
7610
|
+
* selection state, its name, and group-disabled state. Outside a group it acts
|
|
7611
|
+
* like a labelled {@link Radio}; supply `name` to form a native radio group.
|
|
7612
|
+
* Explicit `disabled` wins over group and field context.
|
|
7613
|
+
*
|
|
7614
|
+
* @example
|
|
7615
|
+
* ```tsx
|
|
7616
|
+
* <RadioGroup name="plan" defaultValue="standard" label="Plan">
|
|
7617
|
+
* <RadioInput value="standard">Standard</RadioInput>
|
|
7618
|
+
* </RadioGroup>
|
|
7619
|
+
* ```
|
|
7620
|
+
*/
|
|
5564
7621
|
export declare const RadioInput: (props: RadioInputProps) => JSX.Element;
|
|
5565
7622
|
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
7623
|
+
/** Props for {@link RadioInput}, a labelled radio that can join a {@link RadioGroup}. */
|
|
7624
|
+
export declare type RadioInputProps = Omit<BoxProps, keyof RadioInputVariantProps> & RadioInputVariantProps & {
|
|
7625
|
+
/** Native group name when the input is not inside a `RadioGroup`; group context takes precedence. */ name?: string;
|
|
7626
|
+
/** Value reported to the nearest `RadioGroup`; required for the input to participate in that group. */ value?: string;
|
|
7627
|
+
/** Controlled state for standalone use. Group context takes precedence when `value` is supplied. */ checked?: boolean;
|
|
7628
|
+
/** Initial standalone selected state; ignored for grouped radios and after mount. */
|
|
7629
|
+
/** @default false */
|
|
5570
7630
|
defaultChecked?: boolean;
|
|
5571
|
-
onChange?: RadioChangeHandler;
|
|
5572
|
-
id?: string;
|
|
5573
|
-
error?: boolean;
|
|
5574
|
-
invalid?: boolean;
|
|
5575
|
-
children?: string | ReactNode;
|
|
5576
|
-
disabled?: boolean;
|
|
7631
|
+
/** Runs after group selection is requested and for standalone native changes. The group `onChange` receives the selected value. */ onChange?: RadioChangeHandler;
|
|
7632
|
+
/** Input ID. A stable ID is generated when omitted and associated with the wrapper label. */ id?: string;
|
|
7633
|
+
/** Applies error styling, overriding field context. */ error?: boolean;
|
|
7634
|
+
/** Marks the radio invalid, overriding field context. */ invalid?: boolean;
|
|
7635
|
+
/** Visible label content. */ children?: string | ReactNode;
|
|
7636
|
+
/** Disables the radio, overriding group and field context. */ disabled?: boolean;
|
|
5577
7637
|
};
|
|
5578
7638
|
|
|
5579
7639
|
declare interface RadioInputVariant {
|
|
@@ -5584,15 +7644,18 @@ declare type RadioInputVariantProps = {
|
|
|
5584
7644
|
[key in keyof RadioInputVariant]?: ConditionalValue<RadioInputVariant[key]> | undefined
|
|
5585
7645
|
}
|
|
5586
7646
|
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
7647
|
+
/** Props for {@link Radio}, the unlabelled native radio primitive. */
|
|
7648
|
+
export declare type RadioProps = Omit<BoxProps, 'checked' | 'defaultChecked' | 'onChange' | keyof RadioVariantProps> & RadioVariantProps & {
|
|
7649
|
+
/** Native radio group name. Radios with the same name are mutually exclusive. */ name?: string;
|
|
7650
|
+
/** Controlled selected state. Pair with `onChange`; do not combine with `defaultChecked`. */ checked?: boolean;
|
|
7651
|
+
/** Initial selected state for uncontrolled use; later updates are ignored. */
|
|
7652
|
+
/** @default false */
|
|
5590
7653
|
defaultChecked?: boolean;
|
|
5591
|
-
onChange?: RadioChangeHandler;
|
|
5592
|
-
id?: string;
|
|
5593
|
-
error?: boolean;
|
|
5594
|
-
invalid?: boolean;
|
|
5595
|
-
disabled?: boolean;
|
|
7654
|
+
/** Runs for the native input change event when this radio becomes selected. */ onChange?: RadioChangeHandler;
|
|
7655
|
+
/** Native input ID used by an external label. */ id?: string;
|
|
7656
|
+
/** Applies error styling, overriding field context. */ error?: boolean;
|
|
7657
|
+
/** Marks the native input invalid with `aria-invalid`, overriding field context. */ invalid?: boolean;
|
|
7658
|
+
/** Disables interaction, overriding field context. */ disabled?: boolean;
|
|
5596
7659
|
};
|
|
5597
7660
|
|
|
5598
7661
|
declare interface RadioVariant {
|
|
@@ -5609,38 +7672,333 @@ export declare type RecipeConfig<V extends RecipeVariantRecord = RecipeVariantRe
|
|
|
5609
7672
|
|
|
5610
7673
|
export declare type RecipeVariantRecord = Record<string, Record<string, unknown> | string | number | boolean | null | undefined>;
|
|
5611
7674
|
|
|
7675
|
+
/**
|
|
7676
|
+
* Edits a date as separate year, month, and day spinbutton segments.
|
|
7677
|
+
*
|
|
7678
|
+
* The component clamps days to the selected month and emits only complete
|
|
7679
|
+
* dates or a fully cleared `null` value. Use `DateInput` when leading or
|
|
7680
|
+
* trailing slots and field validation styling are needed.
|
|
7681
|
+
*
|
|
7682
|
+
* @example
|
|
7683
|
+
* ```tsx
|
|
7684
|
+
* <SegmentedDate defaultValue={{ year: 2026, month: 8, day: 3 }} />
|
|
7685
|
+
* ```
|
|
7686
|
+
*/
|
|
7687
|
+
export declare const SegmentedDate: (props: SegmentedDateProps) => JSX.Element;
|
|
7688
|
+
|
|
7689
|
+
declare type SegmentedDateFormat = DateFormat;
|
|
7690
|
+
|
|
7691
|
+
/** Props for {@link SegmentedDate}, a keyboard-editable date field. */
|
|
7692
|
+
export declare type SegmentedDateProps = Omit<BoxProps, keyof SegmentedInputsVariantProps | 'children' | 'onChange' | 'value'> & SegmentedInputVariantProps & {
|
|
7693
|
+
/** Ref attached to the segmented group container. */
|
|
7694
|
+
ref?: Ref<HTMLDivElement>;
|
|
7695
|
+
/** Controlled date. Pair with `onChange`; `null` clears every segment. */
|
|
7696
|
+
value?: DateValue | null;
|
|
7697
|
+
/** Initial date when `value` is not provided. */
|
|
7698
|
+
defaultValue?: DateValue | null;
|
|
7699
|
+
/** Runs after all date segments form a date, or after every segment is cleared. */
|
|
7700
|
+
onChange?: (value: DateValue | null) => void;
|
|
7701
|
+
/**
|
|
7702
|
+
* Segment order and default separator.
|
|
7703
|
+
*
|
|
7704
|
+
* @default 'YYYY-MM-DD'
|
|
7705
|
+
*/
|
|
7706
|
+
format?: SegmentedDateFormat;
|
|
7707
|
+
/** Overrides separator content or spacing between date segments. */
|
|
7708
|
+
separators?: SeparatorConfig;
|
|
7709
|
+
/**
|
|
7710
|
+
* Accessible name for the segmented group.
|
|
7711
|
+
*
|
|
7712
|
+
* @default 'Date'
|
|
7713
|
+
*/
|
|
7714
|
+
label?: string;
|
|
7715
|
+
/** Prevents editing and keyboard interaction. */
|
|
7716
|
+
disabled?: boolean;
|
|
7717
|
+
/** Runs when focus enters any date segment. */
|
|
7718
|
+
onFocusWithin?: () => void;
|
|
7719
|
+
/** Runs when focus leaves a date segment and provides the next focused node. */
|
|
7720
|
+
onBlurWithin?: (relatedTarget: Node | null) => void;
|
|
7721
|
+
};
|
|
7722
|
+
|
|
7723
|
+
declare interface SegmentedFieldsVariant {
|
|
7724
|
+
/**
|
|
7725
|
+
* @default "md"
|
|
7726
|
+
*/
|
|
7727
|
+
size: "sm" | "md" | "lg" | "xl"
|
|
7728
|
+
field: "date" | "time" | "dateTime"
|
|
7729
|
+
range: "date" | "time"
|
|
7730
|
+
before: boolean
|
|
7731
|
+
after: boolean
|
|
7732
|
+
}
|
|
7733
|
+
|
|
7734
|
+
declare type SegmentedFieldsVariantProps = {
|
|
7735
|
+
[key in keyof SegmentedFieldsVariant]?: ConditionalValue<SegmentedFieldsVariant[key]> | undefined
|
|
7736
|
+
}
|
|
7737
|
+
|
|
7738
|
+
/**
|
|
7739
|
+
* Renders a keyboard-editable group of numeric and choice segments.
|
|
7740
|
+
*
|
|
7741
|
+
* This is the low-level primitive used by `SegmentedDate` and
|
|
7742
|
+
* `SegmentedTime`. Each segment uses spinbutton semantics; arrow keys step
|
|
7743
|
+
* values, number or choice keys enter values, and focus advances between
|
|
7744
|
+
* completed numeric segments.
|
|
7745
|
+
*
|
|
7746
|
+
* @example
|
|
7747
|
+
* ```tsx
|
|
7748
|
+
* <SegmentedInput
|
|
7749
|
+
* label="Quantity"
|
|
7750
|
+
* items={[{
|
|
7751
|
+
* type: 'segment', kind: 'numeric', id: 'quantity',
|
|
7752
|
+
* label: 'Quantity', placeholder: '0', value: null,
|
|
7753
|
+
* min: 0, max: 99, digits: 2,
|
|
7754
|
+
* }]}
|
|
7755
|
+
* />
|
|
7756
|
+
* ```
|
|
7757
|
+
*/
|
|
7758
|
+
export declare const SegmentedInput: (props: SegmentedInputProps) => JSX.Element;
|
|
7759
|
+
|
|
7760
|
+
/** Change payload containing the complete value map and changed segment. */
|
|
7761
|
+
declare type SegmentedInputChange = {
|
|
7762
|
+
values: SegmentedInputValueMap;
|
|
7763
|
+
changedSegmentId: string;
|
|
7764
|
+
};
|
|
7765
|
+
|
|
7766
|
+
/** Editable segment or visual separator accepted by `SegmentedInput`. */
|
|
7767
|
+
export declare type SegmentedInputItem = SegmentItem | SeparatorItem;
|
|
7768
|
+
|
|
7769
|
+
/** Props for the low-level {@link SegmentedInput} composition primitive. */
|
|
7770
|
+
export declare type SegmentedInputProps = Omit<BoxProps, keyof SegmentedInputsVariantProps | 'children' | 'onChange' | 'value'> & SegmentedInputVariantProps_2 & {
|
|
7771
|
+
/** Ref attached to the segment group container. */
|
|
7772
|
+
ref?: Ref<HTMLDivElement>;
|
|
7773
|
+
/** Ordered editable segments and visual separators. */
|
|
7774
|
+
items: readonly SegmentedInputItem[];
|
|
7775
|
+
/** Accessible name announced for the complete group. */
|
|
7776
|
+
label: string;
|
|
7777
|
+
/** Prevents editing and keyboard interaction. Overrides field context. */
|
|
7778
|
+
disabled?: boolean;
|
|
7779
|
+
/** Controlled values keyed by segment identifier. */
|
|
7780
|
+
value?: SegmentedInputValueMap;
|
|
7781
|
+
/** Runs after a segment changes with the complete next value map. */
|
|
7782
|
+
onChange?: (change: SegmentedInputChange) => void;
|
|
7783
|
+
/** Runs when focus enters any editable segment. */
|
|
7784
|
+
onFocusWithin?: () => void;
|
|
7785
|
+
/** Runs when focus leaves a segment and provides the next focused node. */
|
|
7786
|
+
onBlurWithin?: (relatedTarget: Node | null) => void;
|
|
7787
|
+
};
|
|
7788
|
+
|
|
7789
|
+
declare interface SegmentedInputsVariant {
|
|
7790
|
+
/**
|
|
7791
|
+
* @default "md"
|
|
7792
|
+
*/
|
|
7793
|
+
size: "sm" | "md" | "lg" | "xl"
|
|
7794
|
+
}
|
|
7795
|
+
|
|
7796
|
+
declare type SegmentedInputsVariantProps = {
|
|
7797
|
+
[key in keyof SegmentedInputsVariant]?: ConditionalValue<SegmentedInputsVariant[key]> | undefined
|
|
7798
|
+
}
|
|
7799
|
+
|
|
7800
|
+
/** Current segment values keyed by each segment's stable identifier. */
|
|
7801
|
+
export declare type SegmentedInputValueMap = Record<string, SegmentValue>;
|
|
7802
|
+
|
|
7803
|
+
declare type SegmentedInputVariantProps = Omit<SegmentedInputsVariantProps, 'bare'>;
|
|
7804
|
+
|
|
7805
|
+
declare type SegmentedInputVariantProps_2 = Omit<SegmentedInputsVariantProps, 'bare'>;
|
|
7806
|
+
|
|
7807
|
+
declare type SegmentedInputVariantProps_3 = Omit<SegmentedInputsVariantProps, 'bare'>;
|
|
7808
|
+
|
|
7809
|
+
/**
|
|
7810
|
+
* Edits a time as separate hour, minute, and optional meridiem segments.
|
|
7811
|
+
*
|
|
7812
|
+
* Display may use 12- or 24-hour time, but values always store hours from 0
|
|
7813
|
+
* through 23. Use `TimeInput` when leading or trailing slots and field
|
|
7814
|
+
* validation styling are needed.
|
|
7815
|
+
*
|
|
7816
|
+
* @example
|
|
7817
|
+
* ```tsx
|
|
7818
|
+
* <SegmentedTime defaultValue={{ hour: 13, minute: 30 }} timeFormat="12" />
|
|
7819
|
+
* ```
|
|
7820
|
+
*/
|
|
7821
|
+
export declare const SegmentedTime: (props: SegmentedTimeProps) => JSX.Element;
|
|
7822
|
+
|
|
7823
|
+
/** Props for {@link SegmentedTime}, a keyboard-editable time field. */
|
|
7824
|
+
export declare type SegmentedTimeProps = Omit<BoxProps, keyof SegmentedInputsVariantProps | 'children' | 'onChange' | 'value'> & SegmentedInputVariantProps_3 & {
|
|
7825
|
+
/** Ref attached to the segmented group container. */
|
|
7826
|
+
ref?: Ref<HTMLDivElement>;
|
|
7827
|
+
/** Controlled 24-hour time value. Pair with `onChange`. */
|
|
7828
|
+
value?: TimeValue | null;
|
|
7829
|
+
/** Initial time when `value` is not provided. */
|
|
7830
|
+
defaultValue?: TimeValue | null;
|
|
7831
|
+
/** Runs when the hour and minute segments form a complete time. */
|
|
7832
|
+
onChange?: (value: TimeValue | null) => void;
|
|
7833
|
+
/**
|
|
7834
|
+
* Display cycle; emitted values always use 24-hour hours.
|
|
7835
|
+
*
|
|
7836
|
+
* @default '12'
|
|
7837
|
+
*/
|
|
7838
|
+
timeFormat?: TimeFormat;
|
|
7839
|
+
/**
|
|
7840
|
+
* Minute increment used by keyboard stepping. Unsupported values are normalized.
|
|
7841
|
+
*
|
|
7842
|
+
* @default 1
|
|
7843
|
+
*/
|
|
7844
|
+
minuteStep?: number;
|
|
7845
|
+
/** Overrides content or spacing around time and meridiem separators. */
|
|
7846
|
+
separators?: {
|
|
7847
|
+
time?: SeparatorConfig;
|
|
7848
|
+
meridiem?: SeparatorConfig;
|
|
7849
|
+
};
|
|
7850
|
+
/**
|
|
7851
|
+
* Accessible name for the segmented group.
|
|
7852
|
+
*
|
|
7853
|
+
* @default 'Time'
|
|
7854
|
+
*/
|
|
7855
|
+
label?: string;
|
|
7856
|
+
/** Prevents editing and keyboard interaction. */
|
|
7857
|
+
disabled?: boolean;
|
|
7858
|
+
/** Runs when focus enters any time segment. */
|
|
7859
|
+
onFocusWithin?: () => void;
|
|
7860
|
+
/** Runs when focus leaves a time segment and provides the next focused node. */
|
|
7861
|
+
onBlurWithin?: (relatedTarget: Node | null) => void;
|
|
7862
|
+
};
|
|
7863
|
+
|
|
7864
|
+
/** Metadata for an editable numeric or choice segment. */
|
|
7865
|
+
declare type SegmentItem = {
|
|
7866
|
+
type: 'segment';
|
|
7867
|
+
id: string;
|
|
7868
|
+
label: string;
|
|
7869
|
+
placeholder: string;
|
|
7870
|
+
value: SegmentValue;
|
|
7871
|
+
disabled?: boolean;
|
|
7872
|
+
} & ({
|
|
7873
|
+
kind: 'numeric';
|
|
7874
|
+
min: number;
|
|
7875
|
+
max: number;
|
|
7876
|
+
digits: number;
|
|
7877
|
+
step?: number;
|
|
7878
|
+
format?: (value: number) => string;
|
|
7879
|
+
clampValue?: (value: number, values: SegmentedInputValueMap) => number;
|
|
7880
|
+
} | {
|
|
7881
|
+
kind: 'choice';
|
|
7882
|
+
choices: readonly string[];
|
|
7883
|
+
inputKeys?: Record<string, string>;
|
|
7884
|
+
});
|
|
7885
|
+
|
|
7886
|
+
/** Value stored by one editable segment. */
|
|
7887
|
+
declare type SegmentValue = number | string | null;
|
|
7888
|
+
|
|
7889
|
+
/**
|
|
7890
|
+
* Chooses one or more values from metadata-only {@link SelectOption} children.
|
|
7891
|
+
*
|
|
7892
|
+
* The trigger uses combobox/listbox semantics. Arrow keys, Enter, and Space open
|
|
7893
|
+
* it; typeahead and arrow keys navigate options; Escape or outside press closes
|
|
7894
|
+
* it. Focus stays on the trigger when the non-modal popup opens.
|
|
7895
|
+
*
|
|
7896
|
+
* @example
|
|
7897
|
+
* ```tsx
|
|
7898
|
+
* <Select defaultValue="draft" name="status">
|
|
7899
|
+
* <SelectOption value="draft" label="Draft" />
|
|
7900
|
+
* <SelectOption value="published" label="Published" />
|
|
7901
|
+
* </Select>
|
|
7902
|
+
* ```
|
|
7903
|
+
*/
|
|
5612
7904
|
export declare const Select: (props: SelectProps) => JSX.Element;
|
|
5613
7905
|
|
|
7906
|
+
/**
|
|
7907
|
+
* Declares an option for a parent {@link Select}.
|
|
7908
|
+
*
|
|
7909
|
+
* This component returns `null`; place it directly inside `Select` so the
|
|
7910
|
+
* parent can interpret its metadata.
|
|
7911
|
+
*
|
|
7912
|
+
* @example
|
|
7913
|
+
* ```tsx
|
|
7914
|
+
* <SelectOption value="medium" label="Medium" />
|
|
7915
|
+
* ```
|
|
7916
|
+
*/
|
|
5614
7917
|
export declare const SelectOption: (_props: SelectOptionProps) => null;
|
|
5615
7918
|
|
|
7919
|
+
/** Metadata consumed by {@link Select}; `SelectOption` does not render an element itself. */
|
|
5616
7920
|
export declare type SelectOptionProps = Omit<BoxProps, 'children'> & {
|
|
7921
|
+
/** Stable value emitted by the parent `Select`. */
|
|
5617
7922
|
value: string;
|
|
7923
|
+
/** Visible option text and the value used for keyboard typeahead. */
|
|
5618
7924
|
label: string;
|
|
7925
|
+
/** Excludes the option from pointer and keyboard selection. */
|
|
5619
7926
|
disabled?: boolean;
|
|
7927
|
+
/** Supporting text displayed below the label in the popup. */
|
|
5620
7928
|
description?: string;
|
|
7929
|
+
/** Icon displayed before the option label. */
|
|
5621
7930
|
iconLeft?: IconNamesList;
|
|
7931
|
+
/** Icon displayed after the option label. */
|
|
5622
7932
|
iconRight?: IconNamesList;
|
|
5623
7933
|
};
|
|
5624
7934
|
|
|
5625
7935
|
declare type Selectors = AttributeSelector | ParentSelector
|
|
5626
7936
|
|
|
5627
|
-
|
|
7937
|
+
/** Props for {@link Select}, an ARIA listbox-based single or multiple select. */
|
|
7938
|
+
export declare type SelectProps = Omit<BoxProps, keyof SelectVariantProps | 'children' | 'onChange' | 'type' | 'value'> & SelectVariantProps & {
|
|
7939
|
+
/** Controlled selected value. Use a string for single selection or a string array for multiple selection, with `onChange` to accept changes. */
|
|
5628
7940
|
value?: SelectValue;
|
|
7941
|
+
/**
|
|
7942
|
+
* Initial selected value for an uncontrolled select. It is used only on first render.
|
|
7943
|
+
* @default null
|
|
7944
|
+
*/
|
|
5629
7945
|
defaultValue?: SelectValue;
|
|
7946
|
+
/** Called when the user selects, deselects, or clears an option. In controlled mode, update `value` with the supplied value. */
|
|
5630
7947
|
onChange?: (value: SelectValue) => void;
|
|
7948
|
+
/**
|
|
7949
|
+
* Allows several options to be selected and renders selected options as removable chips.
|
|
7950
|
+
* @default false
|
|
7951
|
+
*/
|
|
5631
7952
|
multiple?: boolean;
|
|
7953
|
+
/**
|
|
7954
|
+
* Text shown while no option is selected.
|
|
7955
|
+
* @default 'Select...'
|
|
7956
|
+
*/
|
|
5632
7957
|
placeholder?: string;
|
|
7958
|
+
/** Controlled popup state. Pair with `onOpenChange`; omit it to use `defaultOpen`. */
|
|
5633
7959
|
open?: boolean;
|
|
7960
|
+
/**
|
|
7961
|
+
* Initial popup state for an uncontrolled select. It is used only on first render.
|
|
7962
|
+
* @default false
|
|
7963
|
+
*/
|
|
5634
7964
|
defaultOpen?: boolean;
|
|
7965
|
+
/** Called when user interaction requests that the popup open or close. */
|
|
5635
7966
|
onOpenChange?: (open: boolean) => void;
|
|
7967
|
+
/**
|
|
7968
|
+
* Floating UI placement for the listbox relative to the trigger.
|
|
7969
|
+
* @default 'bottom-start'
|
|
7970
|
+
*/
|
|
5636
7971
|
placement?: Placement;
|
|
7972
|
+
/**
|
|
7973
|
+
* Gap between the trigger and listbox, in pixels.
|
|
7974
|
+
* @default 4
|
|
7975
|
+
*/
|
|
5637
7976
|
offset?: number;
|
|
7977
|
+
/** Metadata-only `SelectOption` children used to build the listbox. Other children are ignored. */
|
|
5638
7978
|
children?: ReactNode;
|
|
7979
|
+
/** Identifier for the combobox trigger. A generated identifier is used when omitted. */
|
|
5639
7980
|
id?: string;
|
|
7981
|
+
/** Form field name. Each selected value is submitted through a hidden input. */
|
|
5640
7982
|
name?: string;
|
|
7983
|
+
/**
|
|
7984
|
+
* Prevents opening, selection, and hidden-input submission.
|
|
7985
|
+
* @default false
|
|
7986
|
+
*/
|
|
5641
7987
|
disabled?: boolean;
|
|
7988
|
+
/**
|
|
7989
|
+
* Marks the combobox as invalid with `aria-invalid` and error styling.
|
|
7990
|
+
* @default false
|
|
7991
|
+
*/
|
|
5642
7992
|
error?: boolean;
|
|
7993
|
+
/**
|
|
7994
|
+
* Density applied to the popup options.
|
|
7995
|
+
* @default 'compact'
|
|
7996
|
+
*/
|
|
5643
7997
|
density?: MenuDensity;
|
|
7998
|
+
/**
|
|
7999
|
+
* Shrinks the trigger to its content instead of using the standard select width.
|
|
8000
|
+
* @default false
|
|
8001
|
+
*/
|
|
5644
8002
|
autoSize?: boolean;
|
|
5645
8003
|
};
|
|
5646
8004
|
|
|
@@ -5659,6 +8017,25 @@ declare type SelectVariantProps = {
|
|
|
5659
8017
|
[key in keyof SelectVariant]?: ConditionalValue<SelectVariant[key]> | undefined
|
|
5660
8018
|
}
|
|
5661
8019
|
|
|
8020
|
+
/** Content and spacing used for a separator between editable segments. */
|
|
8021
|
+
export declare type SeparatorConfig = {
|
|
8022
|
+
/** Visual separator content. */
|
|
8023
|
+
content?: ReactNode;
|
|
8024
|
+
/** Space placed around the separator. */
|
|
8025
|
+
gap?: SeparatorGap;
|
|
8026
|
+
};
|
|
8027
|
+
|
|
8028
|
+
/** Spacing applied around a visual separator between editable segments. */
|
|
8029
|
+
export declare type SeparatorGap = 'none' | 'tight' | 'normal' | 'loose';
|
|
8030
|
+
|
|
8031
|
+
/** Metadata for non-editable content between segments. */
|
|
8032
|
+
declare type SeparatorItem = {
|
|
8033
|
+
type: 'separator';
|
|
8034
|
+
id: string;
|
|
8035
|
+
content: ReactNode;
|
|
8036
|
+
gap?: SeparatorGap;
|
|
8037
|
+
};
|
|
8038
|
+
|
|
5662
8039
|
declare type ShadowToken = "zeroBase" | "raisedBase" | "elevatedBase" | "overlayBase" | "overflowBase" | "zero" | "raised" | "elevated" | "overlay" | "overflow"
|
|
5663
8040
|
|
|
5664
8041
|
declare type SimplePseudos =
|
|
@@ -5773,21 +8150,62 @@ declare type SimplePseudos =
|
|
|
5773
8150
|
| ":valid"
|
|
5774
8151
|
| ":visited";
|
|
5775
8152
|
|
|
8153
|
+
/** Props for a single-selection {@link Autocomplete}. */
|
|
8154
|
+
declare type SingleAutocompleteProps = AutocompleteBaseProps & {
|
|
8155
|
+
/** Selects at most one value. */
|
|
8156
|
+
multiple?: false;
|
|
8157
|
+
/** Controlled selected value. Pair with `onValueChange`. */
|
|
8158
|
+
value?: AutocompleteValue<false>;
|
|
8159
|
+
/** Initial selected value when `value` is not provided. */
|
|
8160
|
+
defaultValue?: AutocompleteValue<false>;
|
|
8161
|
+
/** Runs when selection, removal, clearing, or creation requests a new value. */
|
|
8162
|
+
onValueChange?: (value: AutocompleteValue<false>, reason: AutocompleteChangeReason) => void;
|
|
8163
|
+
/**
|
|
8164
|
+
* Runs when the selected value changes.
|
|
8165
|
+
*
|
|
8166
|
+
* @deprecated Use `onValueChange`.
|
|
8167
|
+
*/
|
|
8168
|
+
onChange?: (value: AutocompleteValue<false>, reason: AutocompleteChangeReason) => void;
|
|
8169
|
+
};
|
|
8170
|
+
|
|
5776
8171
|
declare type SizeToken = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "12" | "14" | "16" | "18" | "20" | "22" | "24" | "28" | "32" | "40" | "48" | "56" | "64" | "72" | "80" | "88" | "96" | "104" | "112" | "120" | "128" | "136" | "144" | "152" | "160" | "168" | "176" | "184" | "192" | "200" | "208" | "216" | "224" | "232" | "240" | "248" | "256" | "264" | "272" | "280" | "full" | "half" | "min" | "max" | "fit" | "prose" | "auto" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "breakpoint-xs" | "breakpoint-sm" | "breakpoint-md" | "breakpoint-lg" | "breakpoint-xl" | "breakpoint-2xl"
|
|
5777
8172
|
|
|
8173
|
+
/**
|
|
8174
|
+
* Reserves the shape of content while that content is loading.
|
|
8175
|
+
*
|
|
8176
|
+
* `Skeleton` is visual only and does not announce loading. Put it in a region
|
|
8177
|
+
* with an appropriate accessible loading state when users need that feedback.
|
|
8178
|
+
*
|
|
8179
|
+
* @example
|
|
8180
|
+
* ```tsx
|
|
8181
|
+
* <Skeleton width="full" height="40" aria-hidden />
|
|
8182
|
+
* ```
|
|
8183
|
+
*/
|
|
5778
8184
|
export declare const Skeleton: (props: SkeletonProps) => JSX.Element;
|
|
5779
8185
|
|
|
8186
|
+
/** Supported animation modes for {@link Skeleton}. */
|
|
5780
8187
|
declare type SkeletonAnimation = 'pulse' | 'wave' | false;
|
|
5781
8188
|
|
|
5782
|
-
|
|
8189
|
+
/** Props accepted by {@link Skeleton}. */
|
|
8190
|
+
export declare type SkeletonProps = Omit<BoxProps, 'as' | 'children' | 'width' | 'height'> & {
|
|
8191
|
+
/** Loading animation, or `false` for a static placeholder. */
|
|
8192
|
+
/** @default "pulse" */
|
|
5783
8193
|
animation?: SkeletonAnimation;
|
|
8194
|
+
/** Placeholder shape. */
|
|
8195
|
+
/** @default "text" */
|
|
5784
8196
|
variant?: SkeletonVariant;
|
|
8197
|
+
/** Element or component rendered as the placeholder root. */
|
|
8198
|
+
/** @default "span" */
|
|
5785
8199
|
component?: ElementType;
|
|
8200
|
+
/** Explicit placeholder width; content determines width when omitted. */
|
|
5786
8201
|
width?: string | number;
|
|
8202
|
+
/** Explicit placeholder height; content determines height when omitted. */
|
|
5787
8203
|
height?: string | number;
|
|
8204
|
+
/** Content whose dimensions the skeleton should match. */
|
|
5788
8205
|
children?: ReactNode;
|
|
5789
8206
|
};
|
|
5790
8207
|
|
|
8208
|
+
/** Supported placeholder shapes for {@link Skeleton}. */
|
|
5791
8209
|
declare type SkeletonVariant = 'text' | 'circular' | 'rounded' | 'rectangular';
|
|
5792
8210
|
|
|
5793
8211
|
export declare type SlotRecipeConfig<S extends string = string, V extends SlotRecipeVariantRecord<S> = SlotRecipeVariantRecord<S>> = BaseSlotRecipeConfig<S, V>;
|
|
@@ -5796,11 +8214,28 @@ export declare type SlotRecipeVariantRecord<S extends string = string> = Record<
|
|
|
5796
8214
|
|
|
5797
8215
|
declare type SpacingToken = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "12" | "14" | "16" | "18" | "20" | "22" | "24" | "28" | "32" | "40" | "48" | "56" | "64" | "72" | "80" | "88" | "96" | "104" | "112" | "120" | "128" | "136" | "144" | "152" | "160" | "168" | "176" | "184" | "192" | "200" | "208" | "216" | "224" | "232" | "240" | "248" | "256" | "264" | "272" | "280" | "full" | "half" | "min" | "max" | "fit" | "prose" | "auto" | "-0" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-12" | "-14" | "-16" | "-18" | "-20" | "-22" | "-24" | "-28" | "-32" | "-40" | "-48" | "-56" | "-64" | "-72" | "-80" | "-88" | "-96" | "-104" | "-112" | "-120" | "-128" | "-136" | "-144" | "-152" | "-160" | "-168" | "-176" | "-184" | "-192" | "-200" | "-208" | "-216" | "-224" | "-232" | "-240" | "-248" | "-256" | "-264" | "-272" | "-280" | "-full" | "-half" | "-min" | "-max" | "-fit" | "-prose" | "-auto"
|
|
5798
8216
|
|
|
8217
|
+
/**
|
|
8218
|
+
* Displays an indeterminate visual loading indicator.
|
|
8219
|
+
*
|
|
8220
|
+
* `Spinner` does not create a live region or loading label. Apply `aria-busy`
|
|
8221
|
+
* and visible or screen-reader text to the region whose state is changing.
|
|
8222
|
+
*
|
|
8223
|
+
* @example
|
|
8224
|
+
* ```tsx
|
|
8225
|
+
* <Box aria-busy="true" aria-label="Loading orders"><Spinner /></Box>
|
|
8226
|
+
* ```
|
|
8227
|
+
*/
|
|
5799
8228
|
export declare const Spinner: (props: SpinnerProps) => JSX.Element;
|
|
5800
8229
|
|
|
5801
|
-
|
|
8230
|
+
/** Props accepted by {@link Spinner}. */
|
|
8231
|
+
export declare type SpinnerProps = Omit<BoxProps, keyof SpinnerVariantProps> & SpinnerVariantProps & {
|
|
8232
|
+
/** Uses the inverse-color treatment for dark or bold surfaces. */
|
|
8233
|
+
/** @default false */
|
|
5802
8234
|
inverse?: boolean;
|
|
8235
|
+
/** Absolutely centers the spinner within its positioned container. */
|
|
8236
|
+
/** @default false */
|
|
5803
8237
|
centered?: boolean;
|
|
8238
|
+
/** Visual size. An explicit value takes precedence over slot context. */
|
|
5804
8239
|
size?: SpinnerVariantProps['size'];
|
|
5805
8240
|
};
|
|
5806
8241
|
|
|
@@ -5817,6 +8252,20 @@ declare type SpinnerVariantProps = {
|
|
|
5817
8252
|
[key in keyof SpinnerVariant]?: ConditionalValue<SpinnerVariant[key]> | undefined
|
|
5818
8253
|
}
|
|
5819
8254
|
|
|
8255
|
+
/**
|
|
8256
|
+
* Separates Panda CSS props from remaining element props and returns a merged
|
|
8257
|
+
* class name for the generated styles.
|
|
8258
|
+
*
|
|
8259
|
+
* The first tuple value combines an existing string `className` with styles
|
|
8260
|
+
* generated from Panda CSS props, including the `css` prop. The second value
|
|
8261
|
+
* excludes those styling props and `className`, so it can be spread onto an
|
|
8262
|
+
* element without leaking them to the DOM.
|
|
8263
|
+
*
|
|
8264
|
+
* @example
|
|
8265
|
+
* ```tsx
|
|
8266
|
+
* const [className, elementProps] = splitProps({ p: '4', id: 'profile' });
|
|
8267
|
+
* ```
|
|
8268
|
+
*/
|
|
5820
8269
|
export declare const splitProps: (props: PropsRecord) => [string, PropsRecord];
|
|
5821
8270
|
|
|
5822
8271
|
declare interface StandardLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> {
|
|
@@ -11931,19 +14380,47 @@ declare type String_2 = string & {}
|
|
|
11931
14380
|
|
|
11932
14381
|
declare type StringToMultiple<T extends string> = T | `${T}, ${T}`
|
|
11933
14382
|
|
|
14383
|
+
/**
|
|
14384
|
+
* Opens nested menu content from a row in a parent {@link Menu}.
|
|
14385
|
+
*
|
|
14386
|
+
* Hover submenus open as positioned flyouts; `interaction="digin"` replaces
|
|
14387
|
+
* the parent level in the same panel. Arrow Right opens a flyout and Arrow Left
|
|
14388
|
+
* returns focus to its trigger. Filtering also searches nested children.
|
|
14389
|
+
*
|
|
14390
|
+
* @example
|
|
14391
|
+
* ```tsx
|
|
14392
|
+
* <SubMenu label="More actions">
|
|
14393
|
+
* <MenuItem label="Duplicate" />
|
|
14394
|
+
* </SubMenu>
|
|
14395
|
+
* ```
|
|
14396
|
+
*/
|
|
11934
14397
|
export declare const SubMenu: (props: SubMenuProps) => JSX.Element | null;
|
|
11935
14398
|
|
|
14399
|
+
/** Opens a submenu as a positioned flyout or as an in-panel drill-in level. */
|
|
11936
14400
|
declare type SubMenuInteraction = 'hover' | 'digin';
|
|
11937
14401
|
|
|
14402
|
+
/** Props for {@link SubMenu}, a nested menu trigger and its child menu. */
|
|
11938
14403
|
export declare type SubMenuProps = Omit<BoxProps, 'as'> & Omit<MenuVariantProps, 'iconBefore' | 'iconAfter'> & {
|
|
14404
|
+
/** Visible submenu trigger text. */
|
|
11939
14405
|
label: string;
|
|
14406
|
+
/** Secondary visible text included in filtering by default. */
|
|
11940
14407
|
description?: string;
|
|
14408
|
+
/** Prevents opening the nested menu. */
|
|
11941
14409
|
disabled?: boolean;
|
|
14410
|
+
/** Applies selected styling to the nested-menu trigger. */
|
|
11942
14411
|
selected?: boolean;
|
|
14412
|
+
/** Icon displayed before the trigger text. */
|
|
11943
14413
|
iconBefore?: IconNamesList;
|
|
14414
|
+
/** Overrides the parent menu's submenu interaction mode. */
|
|
11944
14415
|
interaction?: SubMenuInteraction;
|
|
14416
|
+
/**
|
|
14417
|
+
* Floating placement for a hover submenu.
|
|
14418
|
+
* @default 'right-start'
|
|
14419
|
+
*/
|
|
11945
14420
|
placement?: Placement;
|
|
14421
|
+
/** `MenuItem`, `MenuGroup`, or nested `SubMenu` children. */
|
|
11946
14422
|
children: ReactNode;
|
|
14423
|
+
/** Explicit text used for typeahead and filtering instead of label and description. */
|
|
11947
14424
|
textValue?: string;
|
|
11948
14425
|
};
|
|
11949
14426
|
|
|
@@ -19495,13 +21972,32 @@ export declare type SystemStyleObject = Record<string, unknown>;
|
|
|
19495
21972
|
|
|
19496
21973
|
declare type SystemStyleObject_2 = Omit<Nested<SystemProperties & CssVarProperties>, 'base'>
|
|
19497
21974
|
|
|
21975
|
+
/**
|
|
21976
|
+
* Displays a compact, non-interactive category or status label.
|
|
21977
|
+
*
|
|
21978
|
+
* Use `Chip` when the item can be selected or dismissed. Icons are decorative,
|
|
21979
|
+
* so the text must communicate the tag's meaning.
|
|
21980
|
+
*
|
|
21981
|
+
* @example
|
|
21982
|
+
* ```tsx
|
|
21983
|
+
* <Tag hue="green">Approved</Tag>
|
|
21984
|
+
* ```
|
|
21985
|
+
*/
|
|
19498
21986
|
export declare const Tag: (props: TagProps) => JSX.Element;
|
|
19499
21987
|
|
|
19500
|
-
|
|
21988
|
+
/** Props accepted by {@link Tag}. */
|
|
21989
|
+
export declare type TagProps = Omit<BoxProps, keyof TagVariantProps> & Omit<TagVariantProps, 'iconBefore' | 'iconAfter'> & {
|
|
21990
|
+
/** Visible tag label. */
|
|
19501
21991
|
children: string;
|
|
21992
|
+
/** Decorative icon shown before the label. */
|
|
19502
21993
|
iconBefore?: IconNamesList;
|
|
21994
|
+
/** Decorative icon shown after the label. */
|
|
19503
21995
|
iconAfter?: IconNamesList;
|
|
21996
|
+
/** Visual emphasis treatment. */
|
|
21997
|
+
/** @default "default" */
|
|
19504
21998
|
variant?: TagVariantProps['variant'];
|
|
21999
|
+
/** Color family used by the tag treatment. */
|
|
22000
|
+
/** @default "slate" */
|
|
19505
22001
|
hue?: TagVariantProps['hue'];
|
|
19506
22002
|
};
|
|
19507
22003
|
|
|
@@ -19523,17 +22019,51 @@ declare type TagVariantProps = {
|
|
|
19523
22019
|
[key in keyof TagVariant]?: TagVariant[key] | undefined
|
|
19524
22020
|
}
|
|
19525
22021
|
|
|
22022
|
+
/**
|
|
22023
|
+
* Renders design-system typography without imposing document semantics.
|
|
22024
|
+
*
|
|
22025
|
+
* The component renders a `span` by default. Choose `as` based on the content's
|
|
22026
|
+
* semantic role; use `Heading` for document headings and `Label` for form
|
|
22027
|
+
* labels. Provide `definition` for a short explanation that appears on hover
|
|
22028
|
+
* and keyboard focus.
|
|
22029
|
+
*
|
|
22030
|
+
* @example
|
|
22031
|
+
* ```tsx
|
|
22032
|
+
* <Text definition="Application programming interface">API</Text>
|
|
22033
|
+
* ```
|
|
22034
|
+
*/
|
|
19526
22035
|
declare const Text_2: (props: TextProps) => JSX.Element;
|
|
19527
22036
|
export { Text_2 as Text }
|
|
19528
22037
|
|
|
22038
|
+
/**
|
|
22039
|
+
* Renders a multi-line native textarea.
|
|
22040
|
+
*
|
|
22041
|
+
* Use a `Label` or `FormField` to provide its accessible name. Local `size`,
|
|
22042
|
+
* error, invalid, and disabled values override matching field-context values.
|
|
22043
|
+
*
|
|
22044
|
+
* @example
|
|
22045
|
+
* ```tsx
|
|
22046
|
+
* <Textarea id="notes" name="notes" rows={4} />
|
|
22047
|
+
* ```
|
|
22048
|
+
*/
|
|
19529
22049
|
export declare const Textarea: (props: TextareaProps) => JSX.Element;
|
|
19530
22050
|
|
|
19531
|
-
|
|
22051
|
+
/** Props for {@link Textarea}, a multi-line native text input. */
|
|
22052
|
+
export declare type TextareaProps = Omit<BoxProps, keyof TextareaVariantProps> & TextareaVariantProps & {
|
|
22053
|
+
/** Form field name submitted with the textarea value. */
|
|
19532
22054
|
name: string;
|
|
22055
|
+
/**
|
|
22056
|
+
* Applies the recipe's content-sized visual treatment; it does not measure or resize the native element.
|
|
22057
|
+
* @default false
|
|
22058
|
+
*/
|
|
19533
22059
|
autoSize?: boolean;
|
|
22060
|
+
/** Applies error styling. The local value takes precedence over field context. */
|
|
19534
22061
|
error?: boolean;
|
|
22062
|
+
/** Marks the native textarea invalid with `aria-invalid` and applies invalid styling. */
|
|
19535
22063
|
invalid?: boolean;
|
|
22064
|
+
/** Disables the native textarea. The local value takes precedence over field context. */
|
|
19536
22065
|
disabled?: boolean;
|
|
22066
|
+
/** Identifier used to associate a visible `Label` with this textarea. */
|
|
19537
22067
|
id?: string;
|
|
19538
22068
|
};
|
|
19539
22069
|
|
|
@@ -19549,19 +22079,51 @@ declare type TextareaVariantProps = {
|
|
|
19549
22079
|
[key in keyof TextareaVariant]?: ConditionalValue<TextareaVariant[key]> | undefined
|
|
19550
22080
|
}
|
|
19551
22081
|
|
|
22082
|
+
/**
|
|
22083
|
+
* Renders a single-line native input with optional leading and trailing slots.
|
|
22084
|
+
*
|
|
22085
|
+
* Use a `Label` or `FormField` to provide an accessible name. `before` and
|
|
22086
|
+
* `after` can contain controls; they inherit size and state through slot
|
|
22087
|
+
* context. Explicit slots take precedence over `iconBefore` and `iconAfter`.
|
|
22088
|
+
*
|
|
22089
|
+
* @example
|
|
22090
|
+
* ```tsx
|
|
22091
|
+
* <TextInput id="email" name="email" type="email" iconBefore="mail" />
|
|
22092
|
+
* ```
|
|
22093
|
+
*/
|
|
19552
22094
|
export declare const TextInput: (props: TextInputProps) => JSX.Element;
|
|
19553
22095
|
|
|
19554
|
-
|
|
22096
|
+
/** Props for {@link TextInput}, a single-line native input with optional slots. */
|
|
22097
|
+
export declare type TextInputProps = Omit<BoxProps, keyof TextInputVariantProps> & Omit<TextInputVariantProps, 'before' | 'after' | 'iconBefore' | 'iconAfter'> & {
|
|
22098
|
+
/** Form field name submitted with the input value. */
|
|
19555
22099
|
name: string;
|
|
22100
|
+
/** Identifier used to associate a visible `Label` with this input. */
|
|
19556
22101
|
id?: string;
|
|
22102
|
+
/** Content rendered before the native input. Takes precedence over `iconBefore`. */
|
|
19557
22103
|
before?: ReactNode;
|
|
22104
|
+
/** Content rendered after the native input. Takes precedence over `iconAfter`. */
|
|
19558
22105
|
after?: ReactNode;
|
|
22106
|
+
/** Decorative icon rendered before the input when `before` is omitted. */
|
|
19559
22107
|
iconBefore?: IconNamesList;
|
|
22108
|
+
/** Decorative icon rendered after the input when `after` is omitted. */
|
|
19560
22109
|
iconAfter?: IconNamesList;
|
|
22110
|
+
/** Applies error styling. The local value takes precedence over field context. */
|
|
19561
22111
|
error?: boolean;
|
|
22112
|
+
/** Disables the native input. The local value takes precedence over slot and field context. */
|
|
19562
22113
|
disabled?: boolean;
|
|
22114
|
+
/** Applies valid styling without changing native constraint validation. */
|
|
19563
22115
|
valid?: boolean;
|
|
22116
|
+
/** Marks the native input invalid with `aria-invalid` and applies invalid styling. */
|
|
19564
22117
|
invalid?: boolean;
|
|
22118
|
+
/**
|
|
22119
|
+
* Native autocomplete hint for the input. This component disables browser autocomplete by default.
|
|
22120
|
+
* @default 'off'
|
|
22121
|
+
*/
|
|
22122
|
+
autoComplete?: string;
|
|
22123
|
+
/**
|
|
22124
|
+
* Native input type.
|
|
22125
|
+
* @default 'text'
|
|
22126
|
+
*/
|
|
19565
22127
|
type?: 'text' | 'number' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'time' | 'datetime-local' | 'month' | 'week';
|
|
19566
22128
|
};
|
|
19567
22129
|
|
|
@@ -19579,10 +22141,21 @@ declare type TextInputVariantProps = {
|
|
|
19579
22141
|
[key in keyof TextInputVariant]?: ConditionalValue<TextInputVariant[key]> | undefined
|
|
19580
22142
|
}
|
|
19581
22143
|
|
|
19582
|
-
|
|
22144
|
+
/** Props accepted by {@link Text}. */
|
|
22145
|
+
export declare type TextProps = Omit<BoxProps, keyof TextVariantProps> & TextVariantProps & {
|
|
22146
|
+
/** Text or inline content to render. */
|
|
19583
22147
|
children: string | ReactNode;
|
|
22148
|
+
/** Semantic element or component used for the text. */
|
|
22149
|
+
/** @default "span" */
|
|
19584
22150
|
as?: ElementType;
|
|
22151
|
+
/**
|
|
22152
|
+
* Short, nonessential explanation shown in a tooltip. Applies a dashed
|
|
22153
|
+
* underline and adds the text to sequential keyboard focus.
|
|
22154
|
+
*/
|
|
22155
|
+
definition?: string;
|
|
22156
|
+
/** Explicit ARIA role when the rendered element does not provide it. */
|
|
19585
22157
|
role?: string;
|
|
22158
|
+
/** Adds the text to sequential keyboard focus when a composite widget requires it. */
|
|
19586
22159
|
tabIndex?: number;
|
|
19587
22160
|
};
|
|
19588
22161
|
|
|
@@ -19591,6 +22164,7 @@ declare interface TextVariant {
|
|
|
19591
22164
|
bold: boolean
|
|
19592
22165
|
italic: boolean
|
|
19593
22166
|
underline: boolean
|
|
22167
|
+
dashedUnderline: boolean
|
|
19594
22168
|
truncate: boolean
|
|
19595
22169
|
allCaps: boolean
|
|
19596
22170
|
size: "10" | "12" | "14" | "16" | "20" | "24" | "32" | "40" | "48" | "64" | "72" | "80" | "96"
|
|
@@ -19601,122 +22175,382 @@ declare type TextVariantProps = {
|
|
|
19601
22175
|
[key in keyof TextVariant]?: ConditionalValue<TextVariant[key]> | undefined
|
|
19602
22176
|
}
|
|
19603
22177
|
|
|
22178
|
+
/** Supported document color modes. */
|
|
19604
22179
|
declare type Theme = 'light' | 'dark';
|
|
19605
22180
|
|
|
22181
|
+
/** Value returned by {@link useTheme} and provided by {@link ThemeProvider}. */
|
|
19606
22182
|
declare interface ThemeContextType {
|
|
22183
|
+
/** Currently active color mode. */
|
|
19607
22184
|
theme: Theme;
|
|
22185
|
+
/**
|
|
22186
|
+
* Sets the active color mode and persists it as the user's browser
|
|
22187
|
+
* preference.
|
|
22188
|
+
*/
|
|
19608
22189
|
setTheme: (theme: Theme) => void;
|
|
19609
22190
|
}
|
|
19610
22191
|
|
|
22192
|
+
/**
|
|
22193
|
+
* Provides the active color mode and persists explicit user choices in browser
|
|
22194
|
+
* storage.
|
|
22195
|
+
*
|
|
22196
|
+
* Without a saved preference, the initial mode follows
|
|
22197
|
+
* `prefers-color-scheme`; subsequent system changes are followed only until a
|
|
22198
|
+
* preference is saved through {@link useTheme}. This provider updates the
|
|
22199
|
+
* document's `data-color-mode` attribute and requires a browser environment.
|
|
22200
|
+
*
|
|
22201
|
+
* @example
|
|
22202
|
+
* ```tsx
|
|
22203
|
+
* <ThemeProvider>
|
|
22204
|
+
* <App />
|
|
22205
|
+
* </ThemeProvider>
|
|
22206
|
+
* ```
|
|
22207
|
+
*/
|
|
19611
22208
|
export declare function ThemeProvider({ children }: {
|
|
19612
22209
|
children: ReactNode;
|
|
19613
22210
|
}): JSX.Element;
|
|
19614
22211
|
|
|
22212
|
+
/**
|
|
22213
|
+
* Renders an icon-only control that toggles the nearest theme provider between
|
|
22214
|
+
* light and dark themes.
|
|
22215
|
+
*
|
|
22216
|
+
* It obtains state from `useTheme`, so it must be rendered below the design
|
|
22217
|
+
* system's theme provider. The accessible label always describes the theme that
|
|
22218
|
+
* will be selected next.
|
|
22219
|
+
*
|
|
22220
|
+
* @example
|
|
22221
|
+
* ```tsx
|
|
22222
|
+
* <ThemeSwitcher />
|
|
22223
|
+
* ```
|
|
22224
|
+
*/
|
|
19615
22225
|
export declare const ThemeSwitcher: () => JSX.Element;
|
|
19616
22226
|
|
|
19617
|
-
|
|
22227
|
+
/** Display cycle used for time input while values remain normalized to 24-hour time. */
|
|
22228
|
+
export declare type TimeFormat = '12' | '24';
|
|
22229
|
+
|
|
22230
|
+
/**
|
|
22231
|
+
* Renders a segmented time field with optional leading and trailing content.
|
|
22232
|
+
*
|
|
22233
|
+
* Display can use 12- or 24-hour time while values remain normalized to
|
|
22234
|
+
* 24-hour hours. Use `TimePicker` when a time-selection menu is also needed.
|
|
22235
|
+
*
|
|
22236
|
+
* @example
|
|
22237
|
+
* ```tsx
|
|
22238
|
+
* <TimeInput label="Start time" defaultValue={{ hour: 9, minute: 30 }} />
|
|
22239
|
+
* ```
|
|
22240
|
+
*/
|
|
22241
|
+
export declare const TimeInput: (props: TimeInputProps) => JSX.Element;
|
|
19618
22242
|
|
|
19619
|
-
|
|
19620
|
-
|
|
22243
|
+
/** Props for {@link TimeInput}, including segmented time state and field slots. */
|
|
22244
|
+
export declare type TimeInputProps = Omit<BoxProps, keyof SegmentedFieldsVariantProps | 'children'> & Omit<SegmentedFieldsVariantProps, 'field' | 'range' | 'before' | 'after'> & {
|
|
22245
|
+
/** Identifier forwarded to the segmented time group. */
|
|
22246
|
+
id?: string;
|
|
22247
|
+
/** Controlled 24-hour time value. Pair with `onChange`. */
|
|
19621
22248
|
value?: TimeValue | null;
|
|
19622
|
-
/** Initial
|
|
22249
|
+
/** Initial time when `value` is not provided. */
|
|
19623
22250
|
defaultValue?: TimeValue | null;
|
|
19624
|
-
/**
|
|
22251
|
+
/** Runs when the time segments form a complete value. */
|
|
19625
22252
|
onChange?: (value: TimeValue | null) => void;
|
|
19626
|
-
/**
|
|
19627
|
-
|
|
19628
|
-
/** Minute
|
|
22253
|
+
/** Display cycle; emitted values always use 24-hour hours. */
|
|
22254
|
+
timeFormat?: TimeFormat;
|
|
22255
|
+
/** Minute increment used by keyboard stepping. */
|
|
19629
22256
|
minuteStep?: number;
|
|
19630
|
-
/** Accessible
|
|
22257
|
+
/** Accessible name for the segmented time group. */
|
|
19631
22258
|
label?: string;
|
|
19632
|
-
|
|
22259
|
+
/** Content before the time field. Takes precedence over `iconBefore`. */
|
|
22260
|
+
before?: ReactNode;
|
|
22261
|
+
/** Content after the time field. Takes precedence over `iconAfter`. */
|
|
22262
|
+
after?: ReactNode;
|
|
22263
|
+
/** Legacy icon rendered before the field when `before` is absent. */
|
|
22264
|
+
iconBefore?: IconNamesList;
|
|
22265
|
+
/** Legacy icon rendered after the field when `after` is absent. */
|
|
22266
|
+
iconAfter?: IconNamesList;
|
|
22267
|
+
/** Applies error styling. Overrides field context when provided. */
|
|
19633
22268
|
error?: boolean;
|
|
22269
|
+
/** Prevents editing. Overrides field context when provided. */
|
|
22270
|
+
disabled?: boolean;
|
|
22271
|
+
/** Applies invalid styling. Overrides field context when provided. */
|
|
19634
22272
|
invalid?: boolean;
|
|
19635
|
-
|
|
19636
|
-
name?: string;
|
|
19637
|
-
/** Controlled popover open state */
|
|
22273
|
+
/** Reflected through to the segmented field — lets a wrapping Menu/Picker show "active anchor" styling */
|
|
19638
22274
|
open?: boolean;
|
|
19639
|
-
/**
|
|
19640
|
-
|
|
19641
|
-
|
|
19642
|
-
|
|
22275
|
+
/** Forwarded to the segmented field — see SegmentedTime's onFocusWithin */
|
|
22276
|
+
onFocusWithin?: () => void;
|
|
22277
|
+
/** Forwarded to the segmented field — see SegmentedTime's onBlurWithin */
|
|
22278
|
+
onBlurWithin?: (relatedTarget: Node | null) => void;
|
|
19643
22279
|
};
|
|
19644
22280
|
|
|
19645
|
-
|
|
22281
|
+
/**
|
|
22282
|
+
* Presents hour, minute, and optional meridiem selection columns in a Menu.
|
|
22283
|
+
*
|
|
22284
|
+
* Each selection commits immediately while the menu remains open. Supply a
|
|
22285
|
+
* `trigger`, or set inherited `inline` to render the columns in normal flow.
|
|
22286
|
+
*
|
|
22287
|
+
* @example
|
|
22288
|
+
* ```tsx
|
|
22289
|
+
* <TimeMenu trigger={<Button>Choose time</Button>} onChange={setTime} />
|
|
22290
|
+
* ```
|
|
22291
|
+
*/
|
|
22292
|
+
export declare const TimeMenu: (props: TimeMenuProps) => any;
|
|
22293
|
+
|
|
22294
|
+
/** Props for {@link TimeMenu}, including selected time and display cycle. */
|
|
22295
|
+
export declare type TimeMenuProps = Omit<MenuProps, 'children' | 'onChange' | 'value'> & {
|
|
22296
|
+
/** Selected 24-hour time reflected in the menu columns. */
|
|
22297
|
+
value?: TimeValue | null;
|
|
22298
|
+
/** Runs immediately when an hour, minute, or meridiem choice is selected. */
|
|
22299
|
+
onChange?: (value: TimeValue | null) => void;
|
|
19646
22300
|
/**
|
|
19647
|
-
*
|
|
22301
|
+
* Display cycle; emitted values always use 24-hour hours.
|
|
22302
|
+
*
|
|
22303
|
+
* @default '12'
|
|
19648
22304
|
*/
|
|
19649
|
-
|
|
19650
|
-
|
|
22305
|
+
timeFormat?: TimeFormat;
|
|
22306
|
+
/**
|
|
22307
|
+
* Interval used to generate minute choices.
|
|
22308
|
+
*
|
|
22309
|
+
* @default 1
|
|
22310
|
+
*/
|
|
22311
|
+
minuteStep?: number;
|
|
22312
|
+
/** Prevents opening or selection and returns only the trigger. */
|
|
22313
|
+
disabled?: boolean;
|
|
22314
|
+
};
|
|
19651
22315
|
|
|
19652
|
-
|
|
19653
|
-
|
|
19654
|
-
|
|
22316
|
+
/**
|
|
22317
|
+
* Combines keyboard time entry with hour and minute selection columns.
|
|
22318
|
+
*
|
|
22319
|
+
* Focusing the segmented input opens the menu. Input and menu interactions
|
|
22320
|
+
* update the same value, normalized to 24-hour hours.
|
|
22321
|
+
*
|
|
22322
|
+
* @example
|
|
22323
|
+
* ```tsx
|
|
22324
|
+
* <TimePicker label="Start time" value={time} onChange={setTime} />
|
|
22325
|
+
* ```
|
|
22326
|
+
*/
|
|
22327
|
+
export declare const TimePicker: (props: TimePickerProps) => JSX.Element;
|
|
19655
22328
|
|
|
19656
|
-
|
|
19657
|
-
|
|
19658
|
-
|
|
19659
|
-
|
|
19660
|
-
|
|
19661
|
-
|
|
19662
|
-
|
|
19663
|
-
|
|
19664
|
-
|
|
19665
|
-
/** Called when end time changes */
|
|
19666
|
-
onEndChange?: (value: TimeValue | null) => void;
|
|
19667
|
-
hourCycle?: HourCycle;
|
|
22329
|
+
/** Props for {@link TimePicker}, combining segmented entry and a time menu. */
|
|
22330
|
+
export declare type TimePickerProps = Pick<TimeInputProps, 'id' | 'label' | 'before' | 'after' | 'iconBefore' | 'iconAfter' | 'error' | 'disabled' | 'invalid' | 'timeFormat' | 'size'> & {
|
|
22331
|
+
/** Controlled 24-hour time value. Pair with `onChange`. */
|
|
22332
|
+
value?: TimeValue | null;
|
|
22333
|
+
/** Initial time when `value` is not provided. */
|
|
22334
|
+
defaultValue?: TimeValue | null;
|
|
22335
|
+
/** Runs when typing or menu selection commits a time. */
|
|
22336
|
+
onChange?: (value: TimeValue | null) => void;
|
|
22337
|
+
/** Minute interval used by segmented stepping and menu choices. */
|
|
19668
22338
|
minuteStep?: number;
|
|
19669
|
-
|
|
22339
|
+
/** Floating UI placement of the time menu. */
|
|
22340
|
+
placement?: Placement;
|
|
22341
|
+
/** Controlled menu visibility. Pair with `onOpenChange`. */
|
|
22342
|
+
open?: boolean;
|
|
22343
|
+
/**
|
|
22344
|
+
* Initial menu visibility when `open` is not provided.
|
|
22345
|
+
*
|
|
22346
|
+
* @default false
|
|
22347
|
+
*/
|
|
22348
|
+
defaultOpen?: boolean;
|
|
22349
|
+
/** Runs when interaction requests that the menu open or close. */
|
|
22350
|
+
onOpenChange?: (open: boolean) => void;
|
|
22351
|
+
};
|
|
22352
|
+
|
|
22353
|
+
/**
|
|
22354
|
+
* Renders start and end times as two coordinated segmented fields.
|
|
22355
|
+
*
|
|
22356
|
+
* Values remain normalized to 24-hour time regardless of display cycle. Use
|
|
22357
|
+
* `TimeRangePicker` when a menu and Apply/Cancel flow are also needed.
|
|
22358
|
+
*
|
|
22359
|
+
* @example
|
|
22360
|
+
* ```tsx
|
|
22361
|
+
* <TimeRangeInput startLabel="Opens" endLabel="Closes" />
|
|
22362
|
+
* ```
|
|
22363
|
+
*/
|
|
22364
|
+
export declare const TimeRangeInput: (props: TimeRangeInputProps) => JSX.Element;
|
|
22365
|
+
|
|
22366
|
+
/** Props for {@link TimeRangeInput}, including range state and field slots. */
|
|
22367
|
+
export declare type TimeRangeInputProps = Omit<BoxProps, keyof SegmentedFieldsVariantProps | 'children'> & Omit<SegmentedFieldsVariantProps, 'field' | 'range' | 'before' | 'after'> & {
|
|
22368
|
+
/** Identifier applied to the range container. */
|
|
22369
|
+
id?: string;
|
|
22370
|
+
/** Controlled start and end times. Pair with `onChange`. */
|
|
22371
|
+
value?: TimeRangeValue | null;
|
|
22372
|
+
/** Initial time range when `value` is not provided. */
|
|
22373
|
+
defaultValue?: TimeRangeValue | null;
|
|
22374
|
+
/** Runs whenever either endpoint becomes complete or is cleared. */
|
|
22375
|
+
onChange?: (value: TimeRangeValue | null) => void;
|
|
22376
|
+
/** Display cycle shared by both endpoints. */
|
|
22377
|
+
timeFormat?: TimeFormat;
|
|
22378
|
+
/** Minute increment used by keyboard stepping. */
|
|
22379
|
+
minuteStep?: number;
|
|
22380
|
+
/** Accessible name for the start-time segments. */
|
|
22381
|
+
startLabel?: string;
|
|
22382
|
+
/** Accessible name for the end-time segments. */
|
|
22383
|
+
endLabel?: string;
|
|
22384
|
+
/** Content before the range. Takes precedence over `iconBefore`. */
|
|
22385
|
+
before?: ReactNode;
|
|
22386
|
+
/** Content after the range. Takes precedence over `iconAfter`. */
|
|
22387
|
+
after?: ReactNode;
|
|
22388
|
+
/** Legacy icon rendered before the range when `before` is absent. */
|
|
22389
|
+
iconBefore?: IconNamesList;
|
|
22390
|
+
/** Legacy icon rendered after the range when `after` is absent. */
|
|
22391
|
+
iconAfter?: IconNamesList;
|
|
22392
|
+
/** Applies error styling. Overrides field context when provided. */
|
|
19670
22393
|
error?: boolean;
|
|
19671
|
-
/**
|
|
19672
|
-
|
|
19673
|
-
/**
|
|
19674
|
-
|
|
22394
|
+
/** Prevents editing both endpoints. Overrides field context when provided. */
|
|
22395
|
+
disabled?: boolean;
|
|
22396
|
+
/** Applies invalid styling. Overrides field context when provided. */
|
|
22397
|
+
invalid?: boolean;
|
|
22398
|
+
/** Reflected through to the segmented fields — lets a wrapping Menu/Picker show "active anchor" styling */
|
|
22399
|
+
open?: boolean;
|
|
22400
|
+
/** Forwarded to both segmented fields — see SegmentedTime's onFocusWithin */
|
|
22401
|
+
onFocusWithin?: () => void;
|
|
22402
|
+
/** Forwarded to both segmented fields — see SegmentedTime's onBlurWithin */
|
|
22403
|
+
onBlurWithin?: (relatedTarget: Node | null) => void;
|
|
22404
|
+
};
|
|
22405
|
+
|
|
22406
|
+
/**
|
|
22407
|
+
* Selects a start and end time from parallel selection columns.
|
|
22408
|
+
*
|
|
22409
|
+
* Changes remain a draft until Apply is pressed. Cancel restores the
|
|
22410
|
+
* committed `value`; Apply is unavailable until both endpoints are complete.
|
|
22411
|
+
*
|
|
22412
|
+
* @example
|
|
22413
|
+
* ```tsx
|
|
22414
|
+
* <TimeRangeMenu
|
|
22415
|
+
* trigger={<Button>Choose hours</Button>}
|
|
22416
|
+
* value={range}
|
|
22417
|
+
* onChange={setRange}
|
|
22418
|
+
* />
|
|
22419
|
+
* ```
|
|
22420
|
+
*/
|
|
22421
|
+
export declare const TimeRangeMenu: (props: TimeRangeMenuProps) => any;
|
|
22422
|
+
|
|
22423
|
+
/** Props for {@link TimeRangeMenu}, including committed range and display. */
|
|
22424
|
+
export declare type TimeRangeMenuProps = Omit<MenuProps, 'children' | 'onChange' | 'value'> & {
|
|
22425
|
+
/** Committed start and end times used to initialize the menu draft. */
|
|
22426
|
+
value?: TimeRangeValue | null;
|
|
22427
|
+
/** Commits the complete draft when Apply is pressed; Cancel discards it. */
|
|
22428
|
+
onChange?: (value: TimeRangeValue | null) => void;
|
|
22429
|
+
/** Display cycle shared by both endpoints. */
|
|
22430
|
+
timeFormat?: TimeFormat;
|
|
22431
|
+
/** Interval used to generate minute choices. */
|
|
22432
|
+
minuteStep?: number;
|
|
22433
|
+
/** Prevents opening or selection and returns only the trigger. */
|
|
22434
|
+
disabled?: boolean;
|
|
22435
|
+
/** Accessible prefix for the start-time columns. */
|
|
22436
|
+
startLabel?: string;
|
|
22437
|
+
/** Accessible prefix for the end-time columns. */
|
|
22438
|
+
endLabel?: string;
|
|
19675
22439
|
};
|
|
19676
22440
|
|
|
19677
|
-
|
|
22441
|
+
/**
|
|
22442
|
+
* Combines segmented range entry with start and end time-selection columns.
|
|
22443
|
+
*
|
|
22444
|
+
* Typed endpoints commit immediately. Menu choices remain a draft until Apply
|
|
22445
|
+
* is pressed; Cancel restores the currently committed range.
|
|
22446
|
+
*
|
|
22447
|
+
* @example
|
|
22448
|
+
* ```tsx
|
|
22449
|
+
* <TimeRangePicker startLabel="Opens" endLabel="Closes" />
|
|
22450
|
+
* ```
|
|
22451
|
+
*/
|
|
22452
|
+
export declare const TimeRangePicker: (props: TimeRangePickerProps) => JSX.Element;
|
|
22453
|
+
|
|
22454
|
+
/** Props for {@link TimeRangePicker}, combining range input and time menu. */
|
|
22455
|
+
export declare type TimeRangePickerProps = Pick<TimeRangeInputProps, 'id' | 'startLabel' | 'endLabel' | 'before' | 'after' | 'iconBefore' | 'iconAfter' | 'error' | 'disabled' | 'invalid' | 'timeFormat' | 'size'> & {
|
|
22456
|
+
/** Controlled start and end times. Pair with `onChange`. */
|
|
22457
|
+
value?: TimeRangeValue | null;
|
|
22458
|
+
/** Initial time range when `value` is not provided. */
|
|
22459
|
+
defaultValue?: TimeRangeValue | null;
|
|
22460
|
+
/** Runs for typed endpoint changes and applied menu drafts. */
|
|
22461
|
+
onChange?: (value: TimeRangeValue | null) => void;
|
|
22462
|
+
/** Minute interval used by segmented stepping and menu choices. */
|
|
22463
|
+
minuteStep?: number;
|
|
22464
|
+
/** Floating UI placement of the time menu. */
|
|
22465
|
+
placement?: Placement;
|
|
22466
|
+
/** Controlled menu visibility. Pair with `onOpenChange`. */
|
|
22467
|
+
open?: boolean;
|
|
22468
|
+
/**
|
|
22469
|
+
* Initial menu visibility when `open` is not provided.
|
|
22470
|
+
*
|
|
22471
|
+
* @default false
|
|
22472
|
+
*/
|
|
22473
|
+
defaultOpen?: boolean;
|
|
22474
|
+
/** Runs when interaction requests that the menu open or close. */
|
|
22475
|
+
onOpenChange?: (open: boolean) => void;
|
|
22476
|
+
};
|
|
22477
|
+
|
|
22478
|
+
/** A committed time range — either endpoint may be null while only partially filled in. */
|
|
22479
|
+
export declare interface TimeRangeValue {
|
|
22480
|
+
start: TimeValue | null;
|
|
22481
|
+
end: TimeValue | null;
|
|
22482
|
+
}
|
|
22483
|
+
|
|
22484
|
+
/** A time of day. Hour is always 24-hour (0-23) internally, regardless of display cycle. */
|
|
22485
|
+
export declare interface TimeValue {
|
|
19678
22486
|
hour: number;
|
|
19679
22487
|
minute: number;
|
|
19680
22488
|
}
|
|
19681
22489
|
|
|
19682
22490
|
/**
|
|
19683
|
-
*
|
|
22491
|
+
* A native checkbox styled as an on/off toggle, without a visible label.
|
|
22492
|
+
*
|
|
22493
|
+
* Use {@link ToggleInput} when a visible label is needed. `Toggle` renders an
|
|
22494
|
+
* `<input type="checkbox">`, not an ARIA `switch`; use `checked` with
|
|
22495
|
+
* `onChange` for controlled state or `defaultChecked` for uncontrolled state.
|
|
22496
|
+
* Provide `id` and an associated label so the control has an accessible name.
|
|
19684
22497
|
*
|
|
19685
22498
|
* @example
|
|
19686
|
-
*
|
|
22499
|
+
* ```tsx
|
|
22500
|
+
* <Toggle name="marketing" defaultChecked />
|
|
22501
|
+
* ```
|
|
19687
22502
|
*
|
|
19688
22503
|
* @example
|
|
22504
|
+
* ```tsx
|
|
19689
22505
|
* const [checked, setChecked] = useState(false);
|
|
19690
|
-
* <Toggle checked={checked} onChange={(
|
|
22506
|
+
* <Toggle name="marketing" checked={checked} onChange={(event) => setChecked(event.target.checked)} />
|
|
22507
|
+
* ```
|
|
19691
22508
|
*/
|
|
19692
22509
|
export declare const Toggle: (props: ToggleProps) => JSX.Element;
|
|
19693
22510
|
|
|
19694
22511
|
/**
|
|
19695
|
-
*
|
|
22512
|
+
* Native change event emitted by {@link Toggle}.
|
|
19696
22513
|
* @example
|
|
19697
22514
|
* const handleChange: ToggleChangeHandler = (e) => setChecked(e.target.checked);
|
|
19698
22515
|
*/
|
|
19699
|
-
declare type ToggleChangeEvent = ChangeEvent<HTMLInputElement>;
|
|
22516
|
+
export declare type ToggleChangeEvent = ChangeEvent<HTMLInputElement>;
|
|
19700
22517
|
|
|
19701
22518
|
/**
|
|
19702
|
-
*
|
|
22519
|
+
* Handler for a {@link Toggle} native change event.
|
|
19703
22520
|
* @example
|
|
19704
22521
|
* const handleChange: ToggleChangeHandler = (e) => setChecked(e.target.checked);
|
|
19705
22522
|
*/
|
|
19706
|
-
declare type ToggleChangeHandler = (e: ToggleChangeEvent) => void;
|
|
22523
|
+
export declare type ToggleChangeHandler = (e: ToggleChangeEvent) => void;
|
|
19707
22524
|
|
|
22525
|
+
/**
|
|
22526
|
+
* A toggle paired with a clickable label.
|
|
22527
|
+
*
|
|
22528
|
+
* Use it for binary settings with a visible text label. It generates an ID when
|
|
22529
|
+
* needed and associates that ID with the label. Its state and field-context
|
|
22530
|
+
* precedence match {@link Toggle}.
|
|
22531
|
+
*
|
|
22532
|
+
* @example
|
|
22533
|
+
* ```tsx
|
|
22534
|
+
* <ToggleInput name="emailUpdates" defaultChecked>
|
|
22535
|
+
* Email updates
|
|
22536
|
+
* </ToggleInput>
|
|
22537
|
+
* ```
|
|
22538
|
+
*/
|
|
19708
22539
|
export declare const ToggleInput: (props: ToggleInputProps) => JSX.Element;
|
|
19709
22540
|
|
|
19710
|
-
|
|
19711
|
-
|
|
19712
|
-
|
|
22541
|
+
/** Props for {@link ToggleInput}, a labelled {@link Toggle}. */
|
|
22542
|
+
export declare type ToggleInputProps = Omit<BoxProps, keyof ToggleInputVariantProps> & ToggleInputVariantProps & {
|
|
22543
|
+
/** Form field name submitted when the toggle is on. */ name: string;
|
|
22544
|
+
/** Controlled on/off state. Pair with `onChange`; do not combine with `defaultChecked`. */ checked?: boolean;
|
|
22545
|
+
/** Initial uncontrolled on/off state; later updates are ignored. */
|
|
22546
|
+
/** @default false */
|
|
19713
22547
|
defaultChecked?: boolean;
|
|
19714
|
-
onChange?: ToggleChangeHandler;
|
|
19715
|
-
id?: string;
|
|
19716
|
-
error?: boolean;
|
|
19717
|
-
invalid?: boolean;
|
|
19718
|
-
disabled?: boolean;
|
|
19719
|
-
children?: string | ReactNode;
|
|
22548
|
+
/** Runs when the contained native checkbox changes. */ onChange?: ToggleChangeHandler;
|
|
22549
|
+
/** Input ID. A stable ID is generated when omitted and associated with the label. */ id?: string;
|
|
22550
|
+
/** Applies error styling, overriding field context. */ error?: boolean;
|
|
22551
|
+
/** Marks the toggle invalid, overriding field context. */ invalid?: boolean;
|
|
22552
|
+
/** Disables the label and toggle, overriding field context. */ disabled?: boolean;
|
|
22553
|
+
/** Visible label content. */ children?: string | ReactNode;
|
|
19720
22554
|
};
|
|
19721
22555
|
|
|
19722
22556
|
declare interface ToggleInputVariant {
|
|
@@ -19727,15 +22561,18 @@ declare type ToggleInputVariantProps = {
|
|
|
19727
22561
|
[key in keyof ToggleInputVariant]?: ConditionalValue<ToggleInputVariant[key]> | undefined
|
|
19728
22562
|
}
|
|
19729
22563
|
|
|
19730
|
-
|
|
19731
|
-
|
|
19732
|
-
|
|
22564
|
+
/** Props for {@link Toggle}, the unlabelled native checkbox styled as a switch. */
|
|
22565
|
+
export declare type ToggleProps = Omit<BoxProps, 'checked' | 'defaultChecked' | 'onChange' | keyof ToggleVariantProps> & ToggleVariantProps & {
|
|
22566
|
+
/** Form field name submitted when the toggle is on. */ name: string;
|
|
22567
|
+
/** Controlled on/off state. Pair with `onChange`; do not combine with `defaultChecked`. */ checked?: boolean;
|
|
22568
|
+
/** Initial uncontrolled on/off state; later updates are ignored. */
|
|
22569
|
+
/** @default false */
|
|
19733
22570
|
defaultChecked?: boolean;
|
|
19734
|
-
onChange?: ToggleChangeHandler;
|
|
19735
|
-
id?: string;
|
|
19736
|
-
error?: boolean;
|
|
19737
|
-
invalid?: boolean;
|
|
19738
|
-
disabled?: boolean;
|
|
22571
|
+
/** Runs for the native checkbox change event; read the next state from `event.target.checked`. */ onChange?: ToggleChangeHandler;
|
|
22572
|
+
/** Native input ID used by an external label. */ id?: string;
|
|
22573
|
+
/** Applies error styling, overriding field context. */ error?: boolean;
|
|
22574
|
+
/** Marks the native checkbox invalid with `aria-invalid`, overriding field context. */ invalid?: boolean;
|
|
22575
|
+
/** Disables interaction, overriding field context. */ disabled?: boolean;
|
|
19739
22576
|
};
|
|
19740
22577
|
|
|
19741
22578
|
declare interface ToggleVariant {
|
|
@@ -19773,26 +22610,52 @@ declare type Tokens = {
|
|
|
19773
22610
|
breakpoints: BreakpointToken
|
|
19774
22611
|
} & { [token: string]: never }
|
|
19775
22612
|
|
|
22613
|
+
/**
|
|
22614
|
+
* Shows nonessential contextual text for a trigger on hover and keyboard focus.
|
|
22615
|
+
*
|
|
22616
|
+
* The trigger is wrapped in a span and linked with `aria-describedby`; Escape
|
|
22617
|
+
* dismisses the portalled tooltip. Do not use a tooltip as the only accessible
|
|
22618
|
+
* name or instruction for an interactive control.
|
|
22619
|
+
*
|
|
22620
|
+
* @example
|
|
22621
|
+
* ```tsx
|
|
22622
|
+
* <Tooltip text="Copies the link"><IconButton iconName="copy" altText="Copy link" /></Tooltip>
|
|
22623
|
+
* ```
|
|
22624
|
+
*/
|
|
19776
22625
|
export declare const Tooltip: (props: TooltipProps) => JSX.Element;
|
|
19777
22626
|
|
|
19778
|
-
|
|
19779
|
-
|
|
22627
|
+
/** Props for {@link Tooltip}, nonessential contextual text shown on hover or focus. */
|
|
22628
|
+
export declare type TooltipProps = Omit<BoxProps, keyof TooltipVariantProps | 'children'> & TooltipVariantProps & {
|
|
22629
|
+
/** Text displayed in the tooltip body. Use an accessible label instead when this is essential control information. */
|
|
19780
22630
|
text: string;
|
|
19781
|
-
/** Optional
|
|
22631
|
+
/** Optional title displayed above the tooltip body. */
|
|
19782
22632
|
title?: string;
|
|
19783
|
-
/**
|
|
22633
|
+
/**
|
|
22634
|
+
* Shows the arrow pointing at the trigger.
|
|
22635
|
+
* @default true
|
|
22636
|
+
*/
|
|
19784
22637
|
caret?: boolean;
|
|
19785
|
-
/**
|
|
22638
|
+
/**
|
|
22639
|
+
* Preferred placement relative to the trigger. The overlay can flip when it does not fit.
|
|
22640
|
+
* @default 'bottom'
|
|
22641
|
+
*/
|
|
19786
22642
|
placement?: Placement;
|
|
19787
|
-
/**
|
|
22643
|
+
/**
|
|
22644
|
+
* Gap between trigger and tooltip, in pixels.
|
|
22645
|
+
* @default 8
|
|
22646
|
+
*/
|
|
19788
22647
|
offset?: number;
|
|
19789
|
-
/** Hover open/close delay in
|
|
22648
|
+
/** Hover open/close delay in milliseconds, or separate `open` and `close` delays. */
|
|
19790
22649
|
delay?: number | {
|
|
19791
22650
|
open: number;
|
|
19792
22651
|
close: number;
|
|
19793
22652
|
};
|
|
19794
|
-
/** Trigger
|
|
22653
|
+
/** Trigger content, wrapped in an inline-flex span to receive floating interaction props. */
|
|
19795
22654
|
children?: ReactNode;
|
|
22655
|
+
/**
|
|
22656
|
+
* Tooltip recipe size.
|
|
22657
|
+
* @default 'md'
|
|
22658
|
+
*/
|
|
19796
22659
|
size?: TooltipVariantProps['size'];
|
|
19797
22660
|
};
|
|
19798
22661
|
|
|
@@ -19818,24 +22681,96 @@ declare interface UnstyledProps {
|
|
|
19818
22681
|
unstyled?: boolean | undefined
|
|
19819
22682
|
}
|
|
19820
22683
|
|
|
22684
|
+
/** Returns the nearest `ChipGroup` context, or `null` when a chip is not grouped. */
|
|
19821
22685
|
export declare const useChipGroup: () => ChipGroupContextValue | null;
|
|
19822
22686
|
|
|
22687
|
+
/**
|
|
22688
|
+
* Reports whether a referenced element meets a Cetec container-size threshold.
|
|
22689
|
+
*
|
|
22690
|
+
* The ref must point to a mounted `HTMLElement`. Returns `false` during server
|
|
22691
|
+
* rendering or until the element is available. It uses a container-query API
|
|
22692
|
+
* when the element supplies one, otherwise observes size changes with
|
|
22693
|
+
* `ResizeObserver`; sizes are compared in `rem` using the root font size.
|
|
22694
|
+
*
|
|
22695
|
+
* @param containerRef - Ref for the element whose width is measured.
|
|
22696
|
+
* @param size - Cetec container-size token such as `lg`.
|
|
22697
|
+
* @param direction - Whether the width must meet or remain below the threshold.
|
|
22698
|
+
* @default direction 'min'
|
|
22699
|
+
* @example
|
|
22700
|
+
* ```tsx
|
|
22701
|
+
* const panelRef = useRef<HTMLDivElement>(null);
|
|
22702
|
+
* const isWide = useContainerQuery(panelRef, 'lg');
|
|
22703
|
+
* ```
|
|
22704
|
+
*/
|
|
19823
22705
|
export declare function useContainerQuery(containerRef: RefObject<HTMLElement>, size: ContainerSizeKey, direction?: QueryDirection_2): boolean;
|
|
19824
22706
|
|
|
22707
|
+
export { useForm }
|
|
22708
|
+
|
|
22709
|
+
/**
|
|
22710
|
+
* Returns the sprite path supplied by the nearest {@link IconProvider}.
|
|
22711
|
+
* Falls back to `/sprite.svg` when no provider is present.
|
|
22712
|
+
*/
|
|
19825
22713
|
export declare const useIconConfig: () => IconConfigContextValue;
|
|
19826
22714
|
|
|
22715
|
+
/**
|
|
22716
|
+
* Returns configuration from the nearest {@link ListProvider}, or compact,
|
|
22717
|
+
* empty-query, no-highlighting defaults when no provider is present.
|
|
22718
|
+
*/
|
|
19827
22719
|
export declare const useListContext: () => ListContextValue;
|
|
19828
22720
|
|
|
22721
|
+
/**
|
|
22722
|
+
* Reports whether the viewport matches a Cetec breakpoint media query.
|
|
22723
|
+
*
|
|
22724
|
+
* Returns `false` during server rendering. The hook subscribes to browser
|
|
22725
|
+
* media-query changes after mounting. Use `min` for the breakpoint and wider,
|
|
22726
|
+
* or `max` for the generated maximum-width query.
|
|
22727
|
+
*
|
|
22728
|
+
* @param breakpoint - Cetec breakpoint token such as `md`.
|
|
22729
|
+
* @param direction - Whether to create a minimum- or maximum-width query.
|
|
22730
|
+
* @default direction 'min'
|
|
22731
|
+
* @example
|
|
22732
|
+
* ```tsx
|
|
22733
|
+
* const isDesktop = useMediaQuery('lg');
|
|
22734
|
+
* ```
|
|
22735
|
+
*/
|
|
19829
22736
|
export declare function useMediaQuery(breakpoint: BreakpointKey, direction?: QueryDirection): boolean;
|
|
19830
22737
|
|
|
22738
|
+
/** Returns the active menu filtering configuration, or the default configuration outside a `Menu`. */
|
|
19831
22739
|
export declare const useMenuFilterContext: () => MenuFilterContextValue;
|
|
19832
22740
|
|
|
22741
|
+
/** Returns roving-focus state for the current menu level, or `null` when none is provided. */
|
|
19833
22742
|
export declare const useMenuListContext: () => MenuListContextValue | null;
|
|
19834
22743
|
|
|
22744
|
+
/**
|
|
22745
|
+
* Returns the enclosing menu's shared behavior.
|
|
22746
|
+
*
|
|
22747
|
+
* Must be called below `Menu` or `MenuProvider`; otherwise it throws.
|
|
22748
|
+
*/
|
|
19835
22749
|
export declare const useMenuRootContext: () => MenuRootContextValue;
|
|
19836
22750
|
|
|
19837
|
-
|
|
22751
|
+
/**
|
|
22752
|
+
* Returns state and close behavior from the closest parent {@link ModalWrapper}.
|
|
22753
|
+
*
|
|
22754
|
+
* Call only in a modal descendant; it throws when no modal context is present.
|
|
22755
|
+
*
|
|
22756
|
+
* @example
|
|
22757
|
+
* ```tsx
|
|
22758
|
+
* const { onClose } = useModalWrapperContext();
|
|
22759
|
+
* ```
|
|
22760
|
+
*/
|
|
22761
|
+
export declare const useModalWrapperContext: () => ModalWrapperContextValue;
|
|
19838
22762
|
|
|
22763
|
+
/**
|
|
22764
|
+
* Returns the active color mode and a function to persist a new preference.
|
|
22765
|
+
*
|
|
22766
|
+
* Must be called beneath {@link ThemeProvider}; throws when no provider is
|
|
22767
|
+
* available.
|
|
22768
|
+
*
|
|
22769
|
+
* @example
|
|
22770
|
+
* ```tsx
|
|
22771
|
+
* const { theme, setTheme } = useTheme();
|
|
22772
|
+
* ```
|
|
22773
|
+
*/
|
|
19839
22774
|
export declare function useTheme(): ThemeContextType;
|
|
19840
22775
|
|
|
19841
22776
|
declare type UtilitySizeToken = "full" | "half" | "min" | "max" | "fit" | "prose" | "auto"
|
|
@@ -20052,7 +22987,7 @@ declare interface UtilityValues {
|
|
|
20052
22987
|
srOnly: boolean;
|
|
20053
22988
|
debug: boolean;
|
|
20054
22989
|
fontVariantsProperty: "body" | "body-italic" | "body-casual" | "body-casual-italic" | "mono" | "mono-italic" | "mono-casual" | "mono-casual-italic";
|
|
20055
|
-
colorPalette: "transparent" | "current" | "inherit" | "neutral" | "neutralA" | "darkNeutral" | "darkNeutralA" | "slate" | "slate_inverse" | "gold" | "blue" | "green" | "yellow" | "red" | "tomato" | "tan" | "orange" | "pear" | "grass" | "mint" | "cyan" | "indigo" | "purple" | "violet" | "pink" | "rose" | "magenta" | "shadow" | "bg" | "bg.neutral" | "bg.neutral.bold" | "bg.neutral.boldest" | "bg.neutral.subtle" | "bg.neutral.inverse" | "bg.neutral.inverse.subtle" | "bg.selected" | "bg.selected.bold" | "bg.success" | "bg.success.bold" | "bg.warning" | "bg.warning.bold" | "bg.danger" | "bg.danger.bold" | "bg.info" | "bg.info.bold" | "bg.cta" | "bg.cta.bold" | "bg.input" | "bg.accent.neutral" | "bg.accent" | "bg.accent.gold" | "bg.accent.blue" | "bg.accent.green" | "bg.accent.yellow" | "bg.accent.red" | "bg.accent.tomato" | "bg.accent.tan" | "bg.accent.orange" | "bg.accent.pear" | "bg.accent.grass" | "bg.accent.mint" | "bg.accent.cyan" | "bg.accent.indigo" | "bg.accent.purple" | "bg.accent.violet" | "bg.accent.pink" | "bg.accent.rose" | "bg.accent.magenta" | "bg.slate" | "blanket" | "border" | "border.inverse" | "border.focused" | "icon" | "icon.decorative" | "icon.decorative.inverse" | "icon.warning" | "icon.danger" | "icon.cta" | "link" | "surface" | "surface.raised" | "surface.overlay" | "surface.selected" | "text" | "text.inverse" | "text.success" | "text.warning" | "text.danger" | "text.info" | "text.cta" | "text.accent.neutral" | "text.accent" | "text.accent.gold" | "text.accent.blue" | "text.accent.green" | "text.accent.yellow" | "text.accent.red" | "text.accent.tomato" | "text.accent.tan" | "text.accent.orange" | "text.accent.pear" | "text.accent.grass" | "text.accent.mint" | "text.accent.cyan" | "text.accent.indigo" | "text.accent.purple" | "text.accent.violet" | "text.accent.pink" | "text.accent.rose" | "text.accent.magenta" | "brand" | "success" | "warning" | "error" | "info" | "shadow.raised" | "shadow.elevated" | "shadow.overlay" | "shadow.overflow" | "utility";
|
|
22990
|
+
colorPalette: "transparent" | "current" | "inherit" | "neutral" | "neutralA" | "darkNeutral" | "darkNeutralA" | "slate" | "slate_inverse" | "gold" | "blue" | "green" | "yellow" | "red" | "tomato" | "tan" | "orange" | "pear" | "grass" | "mint" | "cyan" | "indigo" | "purple" | "violet" | "pink" | "rose" | "magenta" | "shadow" | "bg" | "bg.neutral" | "bg.neutral.bold" | "bg.neutral.boldest" | "bg.neutral.subtle" | "bg.neutral.inverse" | "bg.neutral.inverse.subtle" | "bg.selected" | "bg.selected.bold" | "bg.success" | "bg.success.bold" | "bg.success.subtle" | "bg.warning" | "bg.warning.bold" | "bg.warning.subtle" | "bg.danger" | "bg.danger.bold" | "bg.danger.subtle" | "bg.info" | "bg.info.bold" | "bg.info.subtle" | "bg.cta" | "bg.cta.bold" | "bg.input" | "bg.accent.neutral" | "bg.accent" | "bg.accent.gold" | "bg.accent.blue" | "bg.accent.green" | "bg.accent.yellow" | "bg.accent.red" | "bg.accent.tomato" | "bg.accent.tan" | "bg.accent.orange" | "bg.accent.pear" | "bg.accent.grass" | "bg.accent.mint" | "bg.accent.cyan" | "bg.accent.indigo" | "bg.accent.purple" | "bg.accent.violet" | "bg.accent.pink" | "bg.accent.rose" | "bg.accent.magenta" | "bg.slate" | "blanket" | "border" | "border.inverse" | "border.focused" | "icon" | "icon.decorative" | "icon.decorative.inverse" | "icon.warning" | "icon.danger" | "icon.cta" | "link" | "surface" | "surface.raised" | "surface.overlay" | "surface.selected" | "text" | "text.inverse" | "text.success" | "text.warning" | "text.danger" | "text.info" | "text.cta" | "text.accent.neutral" | "text.accent" | "text.accent.gold" | "text.accent.blue" | "text.accent.green" | "text.accent.yellow" | "text.accent.red" | "text.accent.tomato" | "text.accent.tan" | "text.accent.orange" | "text.accent.pear" | "text.accent.grass" | "text.accent.mint" | "text.accent.cyan" | "text.accent.indigo" | "text.accent.purple" | "text.accent.violet" | "text.accent.pink" | "text.accent.rose" | "text.accent.magenta" | "brand" | "success" | "warning" | "error" | "info" | "shadow.raised" | "shadow.elevated" | "shadow.overlay" | "shadow.overflow" | "utility";
|
|
20056
22991
|
textStyle: "display.lg" | "display.md" | "display.sm" | "display.xs" | "display.size.lg" | "display.size.md" | "display.size.sm" | "display.size.xs" | "heading.lg" | "heading.md" | "heading.sm" | "heading.xs" | "heading.size.lg" | "heading.size.md" | "heading.size.sm" | "heading.size.xs" | "body.lg" | "body.md" | "body.sm" | "body.xs" | "body.size.lg" | "body.size.md" | "body.size.sm" | "body.size.xs" | "mono.lg" | "mono.md" | "mono.sm" | "mono.xs" | "mono.size.lg" | "mono.size.md" | "mono.size.sm" | "mono.size.xs";
|
|
20057
22992
|
layerStyle: "surface.raised" | "surface.overlay";
|
|
20058
22993
|
}
|
|
@@ -21973,6 +24908,31 @@ declare interface VendorShorthandProperties<TLength = (string & {}) | 0, TTime =
|
|
|
21973
24908
|
|
|
21974
24909
|
declare type VendorShorthandPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorShorthandProperties<TLength, TTime>>;
|
|
21975
24910
|
|
|
24911
|
+
declare type ViewDate = {
|
|
24912
|
+
year: number;
|
|
24913
|
+
month: number;
|
|
24914
|
+
};
|
|
24915
|
+
|
|
24916
|
+
declare type ViewDate_2 = {
|
|
24917
|
+
year: number;
|
|
24918
|
+
month: number;
|
|
24919
|
+
};
|
|
24920
|
+
|
|
24921
|
+
declare type ViewDate_3 = {
|
|
24922
|
+
year: number;
|
|
24923
|
+
month: number;
|
|
24924
|
+
};
|
|
24925
|
+
|
|
24926
|
+
declare type ViewDate_4 = {
|
|
24927
|
+
year: number;
|
|
24928
|
+
month: number;
|
|
24929
|
+
};
|
|
24930
|
+
|
|
24931
|
+
declare type ViewDate_5 = {
|
|
24932
|
+
year: number;
|
|
24933
|
+
month: number;
|
|
24934
|
+
};
|
|
24935
|
+
|
|
21976
24936
|
declare type WhitespaceImportant = ` ${ImportantMark}`
|
|
21977
24937
|
|
|
21978
24938
|
declare type WithColorOpacityModifier<T> = [T] extends [string] ? `${T}/${string}` & { __colorOpacityModifier?: true } : never
|
|
@@ -22013,7 +24973,7 @@ declare interface WrapProperties {
|
|
|
22013
24973
|
|
|
22014
24974
|
declare interface WrapProps extends WrapProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof WrapProperties > {}
|
|
22015
24975
|
|
|
22016
|
-
declare type ZIndexToken = "0" | "1" | "2" | "3" | "4" | "5" | "10" | "1000" | "1100" | "1101" | "1200" | "-1" | "base" | "raised" | "elevated" | "overlay" | "modal" | "tooltip"
|
|
24976
|
+
declare type ZIndexToken = "0" | "1" | "2" | "3" | "4" | "5" | "10" | "1000" | "1100" | "1101" | "1102" | "1200" | "-1" | "base" | "raised" | "elevated" | "overlay" | "modal" | "modalFloating" | "tooltip"
|
|
22017
24977
|
|
|
22018
24978
|
export { }
|
|
22019
24979
|
|