@react-spectrum/s2 3.0.0-nightly-4b8b33a02-250211 → 3.0.0-nightly-56da82e3e-250212
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/Accordion.cjs.map +1 -1
- package/dist/Accordion.css.map +1 -1
- package/dist/Accordion.mjs.map +1 -1
- package/dist/ActionButton.cjs.map +1 -1
- package/dist/ActionButton.css.map +1 -1
- package/dist/ActionButton.mjs.map +1 -1
- package/dist/ActionMenu.cjs.map +1 -1
- package/dist/ActionMenu.mjs.map +1 -1
- package/dist/Avatar.cjs.map +1 -1
- package/dist/Avatar.css.map +1 -1
- package/dist/Avatar.mjs.map +1 -1
- package/dist/AvatarGroup.cjs.map +1 -1
- package/dist/AvatarGroup.css.map +1 -1
- package/dist/AvatarGroup.mjs.map +1 -1
- package/dist/Breadcrumbs.cjs.map +1 -1
- package/dist/Breadcrumbs.css.map +1 -1
- package/dist/Breadcrumbs.mjs.map +1 -1
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs.map +1 -1
- package/dist/ButtonGroup.cjs.map +1 -1
- package/dist/ButtonGroup.css.map +1 -1
- package/dist/ButtonGroup.mjs.map +1 -1
- package/dist/CardView.cjs.map +1 -1
- package/dist/CardView.css.map +1 -1
- package/dist/CardView.mjs.map +1 -1
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs.map +1 -1
- package/dist/CheckboxGroup.css.map +1 -1
- package/dist/CheckboxGroup.mjs.map +1 -1
- package/dist/CloseButton.cjs.map +1 -1
- package/dist/CloseButton.css.map +1 -1
- package/dist/CloseButton.mjs.map +1 -1
- package/dist/ColorArea.cjs.map +1 -1
- package/dist/ColorArea.css.map +1 -1
- package/dist/ColorArea.mjs.map +1 -1
- package/dist/ColorField.cjs.map +1 -1
- package/dist/ColorField.css.map +1 -1
- package/dist/ColorField.mjs.map +1 -1
- package/dist/ColorSlider.cjs.map +1 -1
- package/dist/ColorSlider.css.map +1 -1
- package/dist/ColorSlider.mjs.map +1 -1
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorWheel.cjs.map +1 -1
- package/dist/ColorWheel.css.map +1 -1
- package/dist/ColorWheel.mjs.map +1 -1
- package/dist/Content.cjs.map +1 -1
- package/dist/Content.mjs.map +1 -1
- package/dist/ContextualHelp.cjs.map +1 -1
- package/dist/ContextualHelp.css.map +1 -1
- package/dist/ContextualHelp.mjs.map +1 -1
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/Divider.cjs.map +1 -1
- package/dist/Divider.css.map +1 -1
- package/dist/Divider.mjs.map +1 -1
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs.map +1 -1
- package/dist/Form.cjs.map +1 -1
- package/dist/Form.css.map +1 -1
- package/dist/Form.mjs.map +1 -1
- package/dist/IllustratedMessage.cjs.map +1 -1
- package/dist/IllustratedMessage.css.map +1 -1
- package/dist/IllustratedMessage.mjs.map +1 -1
- package/dist/Image.cjs.map +1 -1
- package/dist/Image.css.map +1 -1
- package/dist/Image.mjs.map +1 -1
- package/dist/Link.cjs.map +1 -1
- package/dist/Link.css.map +1 -1
- package/dist/Link.mjs.map +1 -1
- package/dist/Menu.cjs +1 -0
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +4 -0
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +1 -0
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs.map +1 -1
- package/dist/Meter.css.map +1 -1
- package/dist/Meter.mjs.map +1 -1
- package/dist/NumberField.cjs.map +1 -1
- package/dist/NumberField.css.map +1 -1
- package/dist/NumberField.mjs.map +1 -1
- package/dist/Picker.cjs +1 -0
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +4 -0
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +1 -0
- package/dist/Picker.mjs.map +1 -1
- package/dist/ProgressBar.cjs.map +1 -1
- package/dist/ProgressBar.css.map +1 -1
- package/dist/ProgressBar.mjs.map +1 -1
- package/dist/ProgressCircle.cjs.map +1 -1
- package/dist/ProgressCircle.css.map +1 -1
- package/dist/ProgressCircle.mjs.map +1 -1
- package/dist/RadioGroup.cjs.map +1 -1
- package/dist/RadioGroup.css.map +1 -1
- package/dist/RadioGroup.mjs.map +1 -1
- package/dist/RangeSlider.cjs.map +1 -1
- package/dist/RangeSlider.mjs.map +1 -1
- package/dist/SearchField.cjs.map +1 -1
- package/dist/SearchField.css.map +1 -1
- package/dist/SearchField.mjs.map +1 -1
- package/dist/SegmentedControl.cjs.map +1 -1
- package/dist/SegmentedControl.css.map +1 -1
- package/dist/SegmentedControl.mjs.map +1 -1
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs.map +1 -1
- package/dist/StatusLight.css.map +1 -1
- package/dist/StatusLight.mjs.map +1 -1
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +5 -17
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +4 -28
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +5 -17
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TagGroup.cjs.map +1 -1
- package/dist/TagGroup.css.map +1 -1
- package/dist/TagGroup.mjs.map +1 -1
- package/dist/TextField.cjs.map +1 -1
- package/dist/TextField.css.map +1 -1
- package/dist/TextField.mjs.map +1 -1
- package/dist/ToggleButton.cjs.map +1 -1
- package/dist/ToggleButton.css.map +1 -1
- package/dist/ToggleButton.mjs.map +1 -1
- package/dist/ToggleButtonGroup.cjs.map +1 -1
- package/dist/ToggleButtonGroup.mjs.map +1 -1
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/TreeView.cjs +32 -10
- package/dist/TreeView.cjs.map +1 -1
- package/dist/TreeView.css +46 -26
- package/dist/TreeView.css.map +1 -1
- package/dist/TreeView.mjs +32 -10
- package/dist/TreeView.mjs.map +1 -1
- package/dist/types.d.ts +73 -71
- package/dist/types.d.ts.map +1 -1
- package/icons/Icon.cjs.map +1 -1
- package/icons/Icon.mjs.map +1 -1
- package/icons/Skeleton.cjs.map +1 -1
- package/icons/Skeleton.css.map +1 -1
- package/icons/Skeleton.mjs.map +1 -1
- package/package.json +21 -21
- package/src/Accordion.tsx +1 -1
- package/src/ActionButton.tsx +2 -2
- package/src/ActionMenu.tsx +1 -1
- package/src/Avatar.tsx +1 -1
- package/src/AvatarGroup.tsx +1 -1
- package/src/Breadcrumbs.tsx +4 -4
- package/src/Button.tsx +4 -4
- package/src/ButtonGroup.tsx +1 -1
- package/src/CardView.tsx +1 -1
- package/src/Checkbox.tsx +1 -1
- package/src/CheckboxGroup.tsx +2 -2
- package/src/CloseButton.tsx +1 -1
- package/src/ColorArea.tsx +1 -1
- package/src/ColorField.tsx +1 -1
- package/src/ColorSlider.tsx +1 -1
- package/src/ColorSwatch.tsx +1 -1
- package/src/ColorWheel.tsx +1 -1
- package/src/Content.tsx +7 -7
- package/src/ContextualHelp.tsx +2 -2
- package/src/Disclosure.tsx +1 -1
- package/src/Divider.tsx +1 -1
- package/src/DropZone.tsx +2 -2
- package/src/Field.tsx +1 -1
- package/src/Form.tsx +2 -2
- package/src/Icon.tsx +2 -2
- package/src/IllustratedMessage.tsx +1 -1
- package/src/Image.tsx +1 -1
- package/src/Link.tsx +2 -2
- package/src/Menu.tsx +4 -3
- package/src/Meter.tsx +1 -1
- package/src/NumberField.tsx +1 -1
- package/src/Picker.tsx +2 -1
- package/src/ProgressBar.tsx +1 -1
- package/src/ProgressCircle.tsx +1 -1
- package/src/RadioGroup.tsx +2 -2
- package/src/RangeSlider.tsx +1 -1
- package/src/SearchField.tsx +1 -1
- package/src/SegmentedControl.tsx +2 -2
- package/src/Skeleton.tsx +1 -1
- package/src/Slider.tsx +1 -1
- package/src/StatusLight.tsx +2 -2
- package/src/Switch.tsx +1 -1
- package/src/TableView.tsx +1 -1
- package/src/Tabs.tsx +16 -16
- package/src/TagGroup.tsx +2 -2
- package/src/TextField.tsx +2 -2
- package/src/ToggleButton.tsx +2 -2
- package/src/ToggleButtonGroup.tsx +1 -1
- package/src/Tooltip.tsx +3 -3
- package/src/TreeView.tsx +33 -12
package/dist/types.d.ts
CHANGED
|
@@ -138,7 +138,7 @@ export interface ImageProps extends UnsafeStyles, SlotProps {
|
|
|
138
138
|
interface ImageContextValue extends ImageProps {
|
|
139
139
|
hidden?: boolean;
|
|
140
140
|
}
|
|
141
|
-
export const ImageContext: Context<ContextValue<ImageContextValue
|
|
141
|
+
export const ImageContext: Context<ContextValue<Partial<ImageContextValue>, HTMLDivElement>>;
|
|
142
142
|
export const Image: ForwardRefExoticComponent<ImageProps & RefAttributes<HTMLDivElement>>;
|
|
143
143
|
export interface AvatarProps extends UnsafeStyles, DOMProps, SlotProps {
|
|
144
144
|
/** Text description of the avatar. */
|
|
@@ -155,7 +155,7 @@ export interface AvatarProps extends UnsafeStyles, DOMProps, SlotProps {
|
|
|
155
155
|
/** Whether the avatar is over a color background. */
|
|
156
156
|
isOverBackground?: boolean;
|
|
157
157
|
}
|
|
158
|
-
export const AvatarContext: Context<ContextValue<AvatarProps
|
|
158
|
+
export const AvatarContext: Context<ContextValue<Partial<AvatarProps>, DOMRefValue<HTMLImageElement>>>;
|
|
159
159
|
/**
|
|
160
160
|
* An avatar is a thumbnail representation of an entity, such as a user or an organization.
|
|
161
161
|
*/
|
|
@@ -170,14 +170,14 @@ export interface IconContextValue extends UnsafeStyles, SlotProps {
|
|
|
170
170
|
interface IllustrationContextValue extends IconContextValue {
|
|
171
171
|
size?: 'S' | 'M' | 'L';
|
|
172
172
|
}
|
|
173
|
-
export const IconContext: Context<ContextValue<IconContextValue
|
|
174
|
-
export const IllustrationContext: Context<ContextValue<IllustrationContextValue
|
|
173
|
+
export const IconContext: Context<ContextValue<Partial<IconContextValue>, SVGElement>>;
|
|
174
|
+
export const IllustrationContext: Context<ContextValue<Partial<IllustrationContextValue>, SVGElement>>;
|
|
175
175
|
export function createIcon(Component: ComponentType<SVGProps<SVGSVGElement>>, context?: Context<ContextValue<IconContextValue, SVGElement>>): FunctionComponent<IconProps>;
|
|
176
176
|
export function pressScale<R extends {
|
|
177
177
|
isPressed: boolean;
|
|
178
178
|
}>(ref: RefObject<HTMLElement | null>, style?: CSSProperties | ((renderProps: R) => CSSProperties)): (renderProps: R) => CSSProperties;
|
|
179
179
|
interface ContentProps extends UnsafeStyles, SlotProps {
|
|
180
|
-
children
|
|
180
|
+
children: ReactNode;
|
|
181
181
|
styles?: StyleString;
|
|
182
182
|
isHidden?: boolean;
|
|
183
183
|
id?: string;
|
|
@@ -185,17 +185,17 @@ interface ContentProps extends UnsafeStyles, SlotProps {
|
|
|
185
185
|
interface HeadingProps extends ContentProps {
|
|
186
186
|
level?: number;
|
|
187
187
|
}
|
|
188
|
-
export const HeadingContext: Context<ContextValue<HeadingProps
|
|
188
|
+
export const HeadingContext: Context<ContextValue<Partial<HeadingProps>, DOMRefValue<HTMLHeadingElement>>>;
|
|
189
189
|
export const Heading: ForwardRefExoticComponent<HeadingProps & RefAttributes<DOMRefValue<HTMLHeadingElement>>>;
|
|
190
|
-
export const HeaderContext: Context<ContextValue<ContentProps
|
|
190
|
+
export const HeaderContext: Context<ContextValue<Partial<ContentProps>, DOMRefValue<HTMLElement>>>;
|
|
191
191
|
export const Header: ForwardRefExoticComponent<ContentProps & RefAttributes<DOMRefValue<HTMLElement>>>;
|
|
192
|
-
export const ContentContext: Context<ContextValue<ContentProps
|
|
192
|
+
export const ContentContext: Context<ContextValue<Partial<ContentProps>, DOMRefValue<HTMLDivElement>>>;
|
|
193
193
|
export const Content: ForwardRefExoticComponent<ContentProps & RefAttributes<DOMRefValue<HTMLDivElement>>>;
|
|
194
|
-
export const TextContext: Context<ContextValue<ContentProps
|
|
194
|
+
export const TextContext: Context<ContextValue<Partial<ContentProps>, DOMRefValue<HTMLElement>>>;
|
|
195
195
|
export const Text: ForwardRefExoticComponent<ContentProps & RefAttributes<DOMRefValue<HTMLElement>>>;
|
|
196
|
-
export const KeyboardContext: Context<ContextValue<ContentProps
|
|
196
|
+
export const KeyboardContext: Context<ContextValue<Partial<ContentProps>, DOMRefValue<HTMLElement>>>;
|
|
197
197
|
export const Keyboard: ForwardRefExoticComponent<ContentProps & RefAttributes<DOMRefValue<HTMLElement>>>;
|
|
198
|
-
export const FooterContext: Context<ContextValue<ContentProps
|
|
198
|
+
export const FooterContext: Context<ContextValue<Partial<ContentProps>, DOMRefValue<HTMLElement>>>;
|
|
199
199
|
export const Footer: ForwardRefExoticComponent<ContentProps & RefAttributes<DOMRefValue<HTMLElement>>>;
|
|
200
200
|
interface FormStyleProps extends Omit<SpectrumLabelableProps, 'label' | 'contextualHelp'> {
|
|
201
201
|
/**
|
|
@@ -209,7 +209,7 @@ interface FormStyleProps extends Omit<SpectrumLabelableProps, 'label' | 'context
|
|
|
209
209
|
isEmphasized?: boolean;
|
|
210
210
|
}
|
|
211
211
|
export interface FormProps extends FormStyleProps, Omit<_FormProps1, 'className' | 'style' | 'children'>, StyleProps {
|
|
212
|
-
children
|
|
212
|
+
children: ReactNode;
|
|
213
213
|
}
|
|
214
214
|
/**
|
|
215
215
|
* Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.
|
|
@@ -229,9 +229,9 @@ interface ActionButtonStyleProps {
|
|
|
229
229
|
}
|
|
230
230
|
export interface ActionButtonProps extends Omit<_ButtonProps1, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'isPending'>, StyleProps, ActionButtonStyleProps {
|
|
231
231
|
/** The content to display in the ActionButton. */
|
|
232
|
-
children
|
|
232
|
+
children: ReactNode;
|
|
233
233
|
}
|
|
234
|
-
export const ActionButtonContext: Context<ContextValue<ActionButtonProps
|
|
234
|
+
export const ActionButtonContext: Context<ContextValue<Partial<ActionButtonProps>, FocusableRefValue<HTMLButtonElement, HTMLButtonElement>>>;
|
|
235
235
|
/**
|
|
236
236
|
* ActionButtons allow users to perform an action.
|
|
237
237
|
* They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention.
|
|
@@ -253,7 +253,7 @@ export interface DisclosureProps extends Omit<_DisclosureProps1, 'className' | '
|
|
|
253
253
|
/** The contents of the disclosure, consisting of a DisclosureTitle and DisclosurePanel. */
|
|
254
254
|
children: ReactNode;
|
|
255
255
|
}
|
|
256
|
-
export const DisclosureContext: React.Context<ContextValue<
|
|
256
|
+
export const DisclosureContext: React.Context<ContextValue<Partial<DisclosureProps>, DOMRefValue<HTMLDivElement>>>;
|
|
257
257
|
/**
|
|
258
258
|
* A disclosure is a collapsible section of content. It is composed of a a header with a heading and trigger button, and a panel that contains the content.
|
|
259
259
|
*/
|
|
@@ -303,7 +303,7 @@ export interface AccordionProps extends Omit<DisclosureGroupProps, 'className' |
|
|
|
303
303
|
/** Whether the accordion should be displayed with a quiet style. */
|
|
304
304
|
isQuiet?: boolean;
|
|
305
305
|
}
|
|
306
|
-
export const AccordionContext: React.Context<ContextValue<AccordionProps
|
|
306
|
+
export const AccordionContext: React.Context<ContextValue<Partial<AccordionProps>, DOMRefValue<HTMLDivElement>>>;
|
|
307
307
|
/**
|
|
308
308
|
* An accordion is a container for multiple disclosures.
|
|
309
309
|
*/
|
|
@@ -350,7 +350,7 @@ export interface CheckboxProps extends Omit<_CheckboxProps1, 'className' | 'styl
|
|
|
350
350
|
/** The label for the element. */
|
|
351
351
|
children?: ReactNode;
|
|
352
352
|
}
|
|
353
|
-
export const CheckboxContext: Context<ContextValue<CheckboxProps
|
|
353
|
+
export const CheckboxContext: Context<ContextValue<Partial<CheckboxProps>, FocusableRefValue<HTMLLabelElement, HTMLLabelElement>>>;
|
|
354
354
|
/**
|
|
355
355
|
* Checkboxes allow users to select multiple items from a list of individual items,
|
|
356
356
|
* or to mark one individual item as selected.
|
|
@@ -372,7 +372,7 @@ interface DividerSpectrumProps {
|
|
|
372
372
|
}
|
|
373
373
|
export interface DividerProps extends DividerSpectrumProps, Omit<SeparatorProps, 'className' | 'style' | 'elementType'>, StyleProps {
|
|
374
374
|
}
|
|
375
|
-
export const DividerContext: Context<ContextValue<DividerProps
|
|
375
|
+
export const DividerContext: Context<ContextValue<Partial<DividerProps>, DOMRefValue<HTMLElement>>>;
|
|
376
376
|
/**
|
|
377
377
|
* Dividers bring clarity to a layout by grouping and dividing content in close proximity.
|
|
378
378
|
* They can also be used to establish rhythm and hierarchy.
|
|
@@ -456,11 +456,11 @@ export interface MenuProps<T> extends Omit<_MenuProps1<T>, 'children' | 'style'
|
|
|
456
456
|
/**
|
|
457
457
|
* The contents of the collection.
|
|
458
458
|
*/
|
|
459
|
-
children
|
|
459
|
+
children: ReactNode | ((item: T) => ReactNode);
|
|
460
460
|
/** Hides the default link out icons on menu items that open links in a new tab. */
|
|
461
461
|
hideLinkOutIcon?: boolean;
|
|
462
462
|
}
|
|
463
|
-
export const MenuContext: Context<ContextValue<MenuProps<any
|
|
463
|
+
export const MenuContext: Context<ContextValue<Partial<MenuProps<any>>, DOMRefValue<HTMLDivElement>>>;
|
|
464
464
|
/**
|
|
465
465
|
* Menus display a list of actions or options that a user can choose.
|
|
466
466
|
*/
|
|
@@ -486,7 +486,7 @@ export const SubmenuTrigger: (props: SubmenuTriggerProps) => JSX.Element | null;
|
|
|
486
486
|
export interface ActionMenuProps<T> extends Pick<MenuTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'align' | 'direction' | 'shouldFlip'>, Pick<MenuProps<T>, 'children' | 'items' | 'disabledKeys' | 'onAction'>, Pick<ActionButtonProps, 'isDisabled' | 'isQuiet' | 'autoFocus' | 'size'>, StyleProps, DOMProps, AriaLabelingProps {
|
|
487
487
|
menuSize?: 'S' | 'M' | 'L' | 'XL';
|
|
488
488
|
}
|
|
489
|
-
export const ActionMenuContext: Context<ContextValue<ActionMenuProps<any
|
|
489
|
+
export const ActionMenuContext: Context<ContextValue<Partial<ActionMenuProps<any>>, FocusableRefValue<HTMLButtonElement, HTMLButtonElement>>>;
|
|
490
490
|
/**
|
|
491
491
|
* ActionMenu combines an ActionButton with a Menu for simple "more actions" use cases.
|
|
492
492
|
*/
|
|
@@ -505,7 +505,7 @@ interface ProgressCircleStyleProps {
|
|
|
505
505
|
*/
|
|
506
506
|
isIndeterminate?: boolean;
|
|
507
507
|
}
|
|
508
|
-
export const ProgressCircleContext: Context<ContextValue<ProgressCircleProps
|
|
508
|
+
export const ProgressCircleContext: Context<ContextValue<Partial<ProgressCircleProps>, DOMRefValue<HTMLDivElement>>>;
|
|
509
509
|
export interface ProgressCircleProps extends Omit<_ProgressBarProps1, 'children' | 'style' | 'valueLabel' | 'formatOptions' | 'label' | 'className'>, ProgressCircleStyleProps, UnsafeStyles {
|
|
510
510
|
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
511
511
|
styles?: StylesPropWithHeight;
|
|
@@ -539,14 +539,14 @@ interface ButtonStyleProps {
|
|
|
539
539
|
}
|
|
540
540
|
export interface ButtonProps extends Omit<_ButtonProps1, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, ButtonStyleProps {
|
|
541
541
|
/** The content to display in the Button. */
|
|
542
|
-
children
|
|
542
|
+
children: ReactNode;
|
|
543
543
|
}
|
|
544
544
|
export interface LinkButtonProps extends Omit<_LinkProps1, 'className' | 'style' | 'children'>, StyleProps, ButtonStyleProps {
|
|
545
545
|
/** The content to display in the Button. */
|
|
546
|
-
children
|
|
546
|
+
children: ReactNode;
|
|
547
547
|
}
|
|
548
|
-
export const ButtonContext: Context<ContextValue<ButtonProps
|
|
549
|
-
export const LinkButtonContext: Context<ContextValue<ButtonProps
|
|
548
|
+
export const ButtonContext: Context<ContextValue<Partial<ButtonProps>, FocusableRefValue<HTMLButtonElement, HTMLButtonElement>>>;
|
|
549
|
+
export const LinkButtonContext: Context<ContextValue<Partial<ButtonProps>, FocusableRefValue<HTMLAnchorElement, HTMLAnchorElement>>>;
|
|
550
550
|
/**
|
|
551
551
|
* Buttons allow users to perform an action.
|
|
552
552
|
* They have multiple styles for various needs, and are ideal for calling attention to
|
|
@@ -588,7 +588,7 @@ interface ButtonGroupContextValue extends Partial<ButtonGroupProps> {
|
|
|
588
588
|
/** Whether the ButtonGroup shouldn't be rendered. */
|
|
589
589
|
isHidden?: boolean;
|
|
590
590
|
}
|
|
591
|
-
export const ButtonGroupContext: Context<ContextValue<ButtonGroupContextValue
|
|
591
|
+
export const ButtonGroupContext: Context<ContextValue<Partial<ButtonGroupContextValue>, DOMRefValue<HTMLDivElement>>>;
|
|
592
592
|
/**
|
|
593
593
|
* ButtonGroup handles overflow for a grouping of buttons whose actions are related to each other.
|
|
594
594
|
*/
|
|
@@ -661,7 +661,7 @@ export interface AvatarGroupProps extends UnsafeStyles, DOMProps, AriaLabelingPr
|
|
|
661
661
|
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
662
662
|
styles?: StylesPropWithoutWidth;
|
|
663
663
|
}
|
|
664
|
-
export const AvatarGroupContext: Context<ContextValue<AvatarGroupProps
|
|
664
|
+
export const AvatarGroupContext: Context<ContextValue<Partial<AvatarGroupProps>, DOMRefValue<HTMLDivElement>>>;
|
|
665
665
|
/**
|
|
666
666
|
* An avatar group is a grouping of avatars that are related to each other.
|
|
667
667
|
*/
|
|
@@ -713,14 +713,14 @@ interface BreadcrumbsStyleProps {
|
|
|
713
713
|
}
|
|
714
714
|
export interface BreadcrumbsProps<T> extends Omit<_BreadcrumbsProps1<T>, 'children' | 'items' | 'style' | 'className'>, BreadcrumbsStyleProps, StyleProps {
|
|
715
715
|
/** The children of the Breadcrumbs. */
|
|
716
|
-
children
|
|
716
|
+
children: ReactNode;
|
|
717
717
|
}
|
|
718
|
-
export const BreadcrumbsContext: Context<ContextValue<BreadcrumbsProps<any
|
|
718
|
+
export const BreadcrumbsContext: Context<ContextValue<Partial<BreadcrumbsProps<any>>, DOMRefValue<HTMLOListElement>>>;
|
|
719
719
|
/** Breadcrumbs show hierarchy and navigational context for a user’s location within an application. */
|
|
720
720
|
export const Breadcrumbs: <T extends object>(props: BreadcrumbsProps<T> & RefAttributes<DOMRefValue<HTMLOListElement>>) => ReactElement | null;
|
|
721
721
|
export interface BreadcrumbProps extends Omit<AriaBreadcrumbItemProps, 'children' | 'style' | 'className' | 'autoFocus'>, LinkDOMProps {
|
|
722
722
|
/** The children of the breadcrumb item. */
|
|
723
|
-
children
|
|
723
|
+
children: ReactNode;
|
|
724
724
|
}
|
|
725
725
|
/** An individual Breadcrumb for Breadcrumbs. */
|
|
726
726
|
export const Breadcrumb: (props: BreadcrumbProps & RefAttributes<DOMRefValue<HTMLLIElement>>) => ReactElement | null;
|
|
@@ -800,7 +800,7 @@ export interface CardViewProps<T> extends Omit<GridListProps<T>, 'layout' | 'key
|
|
|
800
800
|
/** Provides the ActionBar to render when cards are selected in the CardView. */
|
|
801
801
|
renderActionBar?: (selectedKeys: 'all' | Set<Key>) => ReactElement;
|
|
802
802
|
}
|
|
803
|
-
export const CardViewContext: Context<ContextValue<CardViewProps<any
|
|
803
|
+
export const CardViewContext: Context<ContextValue<Partial<CardViewProps<any>>, DOMRefValue<HTMLDivElement>>>;
|
|
804
804
|
export const CardView: <T extends object>(props: CardViewProps<T> & RefAttributes<DOMRefValue<HTMLDivElement>>) => ReactElement | null;
|
|
805
805
|
export interface DialogTriggerProps extends _DialogTriggerProps1 {
|
|
806
806
|
}
|
|
@@ -820,7 +820,7 @@ interface ContextualHelpStyleProps {
|
|
|
820
820
|
}
|
|
821
821
|
interface ContextualHelpProps extends Pick<DialogTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange'>, Pick<PopoverDialogProps, 'shouldFlip' | 'offset' | 'crossOffset' | 'placement' | 'containerPadding'>, ContextualHelpStyleProps, StyleProps, DOMProps, AriaLabelingProps {
|
|
822
822
|
/** Contents of the Contextual Help popover. */
|
|
823
|
-
children
|
|
823
|
+
children: ReactNode;
|
|
824
824
|
/**
|
|
825
825
|
* The size of the ActionButton.
|
|
826
826
|
*
|
|
@@ -828,7 +828,7 @@ interface ContextualHelpProps extends Pick<DialogTriggerProps, 'isOpen' | 'defau
|
|
|
828
828
|
*/
|
|
829
829
|
size?: 'XS' | 'S';
|
|
830
830
|
}
|
|
831
|
-
export const ContextualHelpContext: Context<ContextValue<ContextualHelpProps
|
|
831
|
+
export const ContextualHelpContext: Context<ContextValue<Partial<ContextualHelpProps>, FocusableRefValue<HTMLButtonElement, HTMLButtonElement>>>;
|
|
832
832
|
/**
|
|
833
833
|
* Contextual help shows a user extra information about the state of an adjacent component, or a total view.
|
|
834
834
|
*/
|
|
@@ -849,21 +849,21 @@ export interface CheckboxGroupProps extends Omit<_CheckboxGroupProps1, 'classNam
|
|
|
849
849
|
/**
|
|
850
850
|
* The Checkboxes contained within the CheckboxGroup.
|
|
851
851
|
*/
|
|
852
|
-
children
|
|
852
|
+
children: ReactNode;
|
|
853
853
|
/**
|
|
854
854
|
* By default, checkboxes are not emphasized (gray).
|
|
855
855
|
* The emphasized (blue) version provides visual prominence.
|
|
856
856
|
*/
|
|
857
857
|
isEmphasized?: boolean;
|
|
858
858
|
}
|
|
859
|
-
export const CheckboxGroupContext: Context<ContextValue<CheckboxGroupProps
|
|
859
|
+
export const CheckboxGroupContext: Context<ContextValue<Partial<CheckboxGroupProps>, DOMRefValue<HTMLDivElement>>>;
|
|
860
860
|
/**
|
|
861
861
|
* A CheckboxGroup allows users to select one or more items from a list of choices.
|
|
862
862
|
*/
|
|
863
863
|
export const CheckboxGroup: ForwardRefExoticComponent<CheckboxGroupProps & RefAttributes<DOMRefValue<HTMLDivElement>>>;
|
|
864
864
|
export interface ColorAreaProps extends Omit<_ColorAreaProps1, 'children' | 'className' | 'style'>, StyleProps {
|
|
865
865
|
}
|
|
866
|
-
export const ColorAreaContext: Context<ContextValue<ColorAreaProps
|
|
866
|
+
export const ColorAreaContext: Context<ContextValue<Partial<ColorAreaProps>, DOMRefValue<HTMLDivElement>>>;
|
|
867
867
|
/**
|
|
868
868
|
* A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.
|
|
869
869
|
*/
|
|
@@ -876,7 +876,7 @@ export interface ColorFieldProps extends Omit<_ColorFieldProps1, 'children' | 'c
|
|
|
876
876
|
*/
|
|
877
877
|
size?: 'S' | 'M' | 'L' | 'XL';
|
|
878
878
|
}
|
|
879
|
-
export const ColorFieldContext: Context<ContextValue<ColorFieldProps
|
|
879
|
+
export const ColorFieldContext: Context<ContextValue<Partial<ColorFieldProps>, TextFieldRef<HTMLInputElement>>>;
|
|
880
880
|
/**
|
|
881
881
|
* A color field allows users to edit a hex color or individual color channel value.
|
|
882
882
|
*/
|
|
@@ -884,7 +884,7 @@ export const ColorField: ForwardRefExoticComponent<ColorFieldProps & RefAttribut
|
|
|
884
884
|
export interface ColorSliderProps extends Omit<_ColorSliderProps1, 'children' | 'className' | 'style'>, Pick<SpectrumLabelableProps, 'contextualHelp'>, StyleProps {
|
|
885
885
|
label?: string;
|
|
886
886
|
}
|
|
887
|
-
export const ColorSliderContext: Context<ContextValue<ColorSliderProps
|
|
887
|
+
export const ColorSliderContext: Context<ContextValue<Partial<ColorSliderProps>, DOMRefValue<HTMLDivElement>>>;
|
|
888
888
|
/**
|
|
889
889
|
* A ColorSlider allows users to adjust an individual channel of a color value.
|
|
890
890
|
*/
|
|
@@ -903,7 +903,7 @@ export interface ColorSwatchProps extends Omit<_ColorSwatchProps1, 'className' |
|
|
|
903
903
|
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
904
904
|
styles?: StylesPropWithHeight;
|
|
905
905
|
}
|
|
906
|
-
export const ColorSwatchContext: Context<ContextValue<ColorSwatchProps
|
|
906
|
+
export const ColorSwatchContext: Context<ContextValue<Partial<ColorSwatchProps>, DOMRefValue<HTMLDivElement>>>;
|
|
907
907
|
/**
|
|
908
908
|
* A ColorSwatch displays a preview of a selected color.
|
|
909
909
|
*/
|
|
@@ -938,7 +938,7 @@ export interface ColorWheelProps extends Omit<_ColorWheelProps1, 'children' | 'c
|
|
|
938
938
|
*/
|
|
939
939
|
size?: number;
|
|
940
940
|
}
|
|
941
|
-
export const ColorWheelContext: Context<ContextValue<ColorWheelProps
|
|
941
|
+
export const ColorWheelContext: Context<ContextValue<Partial<ColorWheelProps>, DOMRefValue<HTMLDivElement>>>;
|
|
942
942
|
/**
|
|
943
943
|
* A ColorWheel allows users to adjust the hue of an HSL or HSB color value on a circular track.
|
|
944
944
|
*/
|
|
@@ -1097,7 +1097,7 @@ interface IllustratedMessageContextProps extends Partial<S2SpectrumIllustratedMe
|
|
|
1097
1097
|
isInDropZone?: boolean;
|
|
1098
1098
|
isDropTarget?: boolean;
|
|
1099
1099
|
}
|
|
1100
|
-
export const IllustratedMessageContext: Context<ContextValue<IllustratedMessageContextProps
|
|
1100
|
+
export const IllustratedMessageContext: Context<ContextValue<Partial<IllustratedMessageContextProps>, DOMRefValue<HTMLDivElement>>>;
|
|
1101
1101
|
/**
|
|
1102
1102
|
* An IllustratedMessage displays an illustration and a message, usually
|
|
1103
1103
|
* for an empty state or an error page.
|
|
@@ -1107,7 +1107,7 @@ export interface DropZoneProps extends Omit<_DropZoneProps1, 'className' | 'styl
|
|
|
1107
1107
|
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
1108
1108
|
styles?: StylesPropWithHeight;
|
|
1109
1109
|
/** The content to display in the drop zone. */
|
|
1110
|
-
children
|
|
1110
|
+
children: ReactNode;
|
|
1111
1111
|
/** Whether the drop zone has been filled. */
|
|
1112
1112
|
isFilled?: boolean;
|
|
1113
1113
|
/** The message to replace the default banner message that is shown when the drop zone is filled. */
|
|
@@ -1119,7 +1119,7 @@ export interface DropZoneProps extends Omit<_DropZoneProps1, 'className' | 'styl
|
|
|
1119
1119
|
*/
|
|
1120
1120
|
size?: 'S' | 'M' | 'L';
|
|
1121
1121
|
}
|
|
1122
|
-
export const DropZoneContext: Context<ContextValue<DropZoneProps
|
|
1122
|
+
export const DropZoneContext: Context<ContextValue<Partial<DropZoneProps>, DOMRefValue<HTMLDivElement>>>;
|
|
1123
1123
|
/**
|
|
1124
1124
|
* A drop zone is an area into which one or multiple objects can be dragged and dropped.
|
|
1125
1125
|
*/
|
|
@@ -1166,9 +1166,9 @@ interface LinkStyleProps {
|
|
|
1166
1166
|
isQuiet?: boolean;
|
|
1167
1167
|
}
|
|
1168
1168
|
export interface LinkProps extends Omit<_LinkProps1, 'isDisabled' | 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, LinkStyleProps {
|
|
1169
|
-
children
|
|
1169
|
+
children: ReactNode;
|
|
1170
1170
|
}
|
|
1171
|
-
export const LinkContext: Context<ContextValue<LinkProps
|
|
1171
|
+
export const LinkContext: Context<ContextValue<Partial<LinkProps>, FocusableRefValue<HTMLAnchorElement, HTMLAnchorElement>>>;
|
|
1172
1172
|
/**
|
|
1173
1173
|
* Links allow users to navigate to a different location.
|
|
1174
1174
|
* They can be presented inline inside a paragraph or as standalone text.
|
|
@@ -1199,7 +1199,7 @@ export interface MeterProps extends Omit<_MeterProps1, 'children' | 'className'
|
|
|
1199
1199
|
/** The content to display as the label. */
|
|
1200
1200
|
label?: ReactNode;
|
|
1201
1201
|
}
|
|
1202
|
-
export const MeterContext: Context<ContextValue<MeterProps
|
|
1202
|
+
export const MeterContext: Context<ContextValue<Partial<MeterProps>, DOMRefValue<HTMLDivElement>>>;
|
|
1203
1203
|
/**
|
|
1204
1204
|
* Meters are visual representations of a quantity or an achievement.
|
|
1205
1205
|
* Their progress is determined by user actions, rather than system actions.
|
|
@@ -1218,7 +1218,7 @@ interface NumberFieldProps extends Omit<_NumberFieldProps1, 'children' | 'classN
|
|
|
1218
1218
|
*/
|
|
1219
1219
|
size?: 'S' | 'M' | 'L' | 'XL';
|
|
1220
1220
|
}
|
|
1221
|
-
export const NumberFieldContext: Context<ContextValue<NumberFieldProps
|
|
1221
|
+
export const NumberFieldContext: Context<ContextValue<Partial<NumberFieldProps>, TextFieldRef<HTMLInputElement>>>;
|
|
1222
1222
|
/**
|
|
1223
1223
|
* NumberFields allow users to input number values with a keyboard or increment/decrement with step buttons.
|
|
1224
1224
|
*/
|
|
@@ -1248,7 +1248,7 @@ export interface ProgressBarProps extends Omit<_ProgressBarProps1, 'children' |
|
|
|
1248
1248
|
/** The content to display as the label. */
|
|
1249
1249
|
label?: ReactNode;
|
|
1250
1250
|
}
|
|
1251
|
-
export const ProgressBarContext: Context<ContextValue<ProgressBarProps
|
|
1251
|
+
export const ProgressBarContext: Context<ContextValue<Partial<ProgressBarProps>, DOMRefValue<HTMLDivElement>>>;
|
|
1252
1252
|
/**
|
|
1253
1253
|
* ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.
|
|
1254
1254
|
* They can represent either determinate or indeterminate progress.
|
|
@@ -1269,7 +1269,7 @@ export interface RadioGroupProps extends Omit<_RadioGroupProps1, 'className' | '
|
|
|
1269
1269
|
/**
|
|
1270
1270
|
* The Radios contained within the RadioGroup.
|
|
1271
1271
|
*/
|
|
1272
|
-
children
|
|
1272
|
+
children: ReactNode;
|
|
1273
1273
|
/**
|
|
1274
1274
|
* The size of the RadioGroup.
|
|
1275
1275
|
*
|
|
@@ -1287,7 +1287,7 @@ export interface RadioGroupProps extends Omit<_RadioGroupProps1, 'className' | '
|
|
|
1287
1287
|
*/
|
|
1288
1288
|
isEmphasized?: boolean;
|
|
1289
1289
|
}
|
|
1290
|
-
export const RadioGroupContext: React.Context<ContextValue<RadioGroupProps
|
|
1290
|
+
export const RadioGroupContext: React.Context<ContextValue<Partial<RadioGroupProps>, DOMRefValue<HTMLDivElement>>>;
|
|
1291
1291
|
/**
|
|
1292
1292
|
* Radio groups allow users to select a single option from a list of mutually exclusive options.
|
|
1293
1293
|
* All possible options are exposed up front for users to compare.
|
|
@@ -1324,7 +1324,7 @@ export interface SliderProps extends Omit<SliderBaseProps<number>, 'children'>,
|
|
|
1324
1324
|
*/
|
|
1325
1325
|
fillOffset?: number;
|
|
1326
1326
|
}
|
|
1327
|
-
export const SliderContext: Context<ContextValue<SliderProps
|
|
1327
|
+
export const SliderContext: Context<ContextValue<Partial<SliderProps>, FocusableRefValue<HTMLDivElement, HTMLDivElement>>>;
|
|
1328
1328
|
export const Slider: ForwardRefExoticComponent<SliderProps & RefAttributes<FocusableRefValue<HTMLDivElement, HTMLDivElement>>>;
|
|
1329
1329
|
export interface RangeSliderProps extends Omit<SliderBaseProps<RangeValue<number>>, 'children'> {
|
|
1330
1330
|
/**
|
|
@@ -1336,7 +1336,7 @@ export interface RangeSliderProps extends Omit<SliderBaseProps<RangeValue<number
|
|
|
1336
1336
|
*/
|
|
1337
1337
|
endName?: string;
|
|
1338
1338
|
}
|
|
1339
|
-
export const RangeSliderContext: Context<ContextValue<RangeSliderProps
|
|
1339
|
+
export const RangeSliderContext: Context<ContextValue<Partial<RangeSliderProps>, FocusableRefValue<HTMLDivElement, HTMLDivElement>>>;
|
|
1340
1340
|
export const RangeSlider: ForwardRefExoticComponent<RangeSliderProps & RefAttributes<FocusableRefValue<HTMLDivElement, HTMLDivElement>>>;
|
|
1341
1341
|
export interface SearchFieldProps extends Omit<_SearchFieldProps1, 'className' | 'style' | 'children'>, StyleProps, SpectrumLabelableProps, HelpTextProps {
|
|
1342
1342
|
/**
|
|
@@ -1346,7 +1346,7 @@ export interface SearchFieldProps extends Omit<_SearchFieldProps1, 'className' |
|
|
|
1346
1346
|
*/
|
|
1347
1347
|
size?: 'S' | 'M' | 'L' | 'XL';
|
|
1348
1348
|
}
|
|
1349
|
-
export const SearchFieldContext: Context<ContextValue<SearchFieldProps
|
|
1349
|
+
export const SearchFieldContext: Context<ContextValue<Partial<SearchFieldProps>, TextFieldRef<HTMLInputElement>>>;
|
|
1350
1350
|
/**
|
|
1351
1351
|
* A SearchField is a text field designed for searches.
|
|
1352
1352
|
*/
|
|
@@ -1379,7 +1379,7 @@ export interface SegmentedControlItemProps extends AriaLabelingProps, StyleProps
|
|
|
1379
1379
|
/** Whether the item is disabled or not. */
|
|
1380
1380
|
isDisabled?: boolean;
|
|
1381
1381
|
}
|
|
1382
|
-
export const SegmentedControlContext: Context<ContextValue<SegmentedControlProps
|
|
1382
|
+
export const SegmentedControlContext: Context<ContextValue<Partial<SegmentedControlProps>, DOMRefValue<HTMLDivElement>>>;
|
|
1383
1383
|
/**
|
|
1384
1384
|
* A SegmentedControl is a mutually exclusive group of buttons used for view switching.
|
|
1385
1385
|
*/
|
|
@@ -1412,7 +1412,7 @@ export interface StatusLightProps extends StatusLightStyleProps, DOMProps, AriaL
|
|
|
1412
1412
|
/**
|
|
1413
1413
|
* The content to display as the label.
|
|
1414
1414
|
*/
|
|
1415
|
-
children
|
|
1415
|
+
children: ReactNode;
|
|
1416
1416
|
/**
|
|
1417
1417
|
* An accessibility role for the status light. Should be set when the status
|
|
1418
1418
|
* can change at runtime, and no more than one status light will update simultaneously.
|
|
@@ -1420,7 +1420,7 @@ export interface StatusLightProps extends StatusLightStyleProps, DOMProps, AriaL
|
|
|
1420
1420
|
*/
|
|
1421
1421
|
role?: 'status';
|
|
1422
1422
|
}
|
|
1423
|
-
export const StatusLightContext: Context<ContextValue<StatusLightProps
|
|
1423
|
+
export const StatusLightContext: Context<ContextValue<Partial<StatusLightProps>, DOMRefValue<HTMLDivElement>>>;
|
|
1424
1424
|
/**
|
|
1425
1425
|
* Status lights are used to color code categories and labels commonly found in data visualization.
|
|
1426
1426
|
* When status lights have a semantic meaning, they should use semantic variant colors.
|
|
@@ -1441,7 +1441,7 @@ interface SwitchStyleProps {
|
|
|
1441
1441
|
export interface SwitchProps extends Omit<_SwitchProps1, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, SwitchStyleProps {
|
|
1442
1442
|
children?: ReactNode;
|
|
1443
1443
|
}
|
|
1444
|
-
export const SwitchContext: Context<ContextValue<SwitchProps
|
|
1444
|
+
export const SwitchContext: Context<ContextValue<Partial<SwitchProps>, FocusableRefValue<HTMLLabelElement, HTMLLabelElement>>>;
|
|
1445
1445
|
/**
|
|
1446
1446
|
* Switches allow users to turn an individual option on or off.
|
|
1447
1447
|
* They are usually used to activate or deactivate a specific setting.
|
|
@@ -1488,7 +1488,7 @@ export interface TableViewProps extends Omit<TableProps, 'style' | 'disabledBeha
|
|
|
1488
1488
|
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
1489
1489
|
styles?: StylesPropWithHeight;
|
|
1490
1490
|
}
|
|
1491
|
-
export const TableContext: React.Context<ContextValue<TableViewProps
|
|
1491
|
+
export const TableContext: React.Context<ContextValue<Partial<TableViewProps>, DOMRefValue<HTMLDivElement>>>;
|
|
1492
1492
|
/**
|
|
1493
1493
|
* Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
|
|
1494
1494
|
*/
|
|
@@ -1542,7 +1542,7 @@ export interface TabsProps extends Omit<_TabsProps1, 'className' | 'style' | 'ch
|
|
|
1542
1542
|
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
1543
1543
|
styles?: StylesPropWithHeight;
|
|
1544
1544
|
/** The content to display in the tabs. */
|
|
1545
|
-
children
|
|
1545
|
+
children: ReactNode;
|
|
1546
1546
|
/**
|
|
1547
1547
|
* The amount of space between the tabs.
|
|
1548
1548
|
* @default 'regular'
|
|
@@ -1560,14 +1560,16 @@ export interface TabProps extends Omit<_TabProps1, 'children' | 'style' | 'class
|
|
|
1560
1560
|
children: ReactNode;
|
|
1561
1561
|
}
|
|
1562
1562
|
export interface TabListProps<T> extends Omit<_TabListProps1<T>, 'style' | 'className' | 'aria-label' | 'aria-labelledby'>, StyleProps {
|
|
1563
|
+
/** The content to display in the tablist. */
|
|
1564
|
+
children: ReactNode | ((item: T) => ReactNode);
|
|
1563
1565
|
}
|
|
1564
1566
|
export interface TabPanelProps extends Omit<_TabPanelProps1, 'children' | 'style' | 'className'>, UnsafeStyles {
|
|
1565
1567
|
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
1566
1568
|
styles?: StylesPropWithHeight;
|
|
1567
1569
|
/** The content to display in the tab panels. */
|
|
1568
|
-
children
|
|
1570
|
+
children: ReactNode;
|
|
1569
1571
|
}
|
|
1570
|
-
export const TabsContext: Context<ContextValue<TabsProps
|
|
1572
|
+
export const TabsContext: Context<ContextValue<Partial<TabsProps>, DOMRefValue<HTMLDivElement>>>;
|
|
1571
1573
|
/**
|
|
1572
1574
|
* Tabs organize content into multiple sections and allow users to navigate between them. The content under the set of tabs should be related and form a coherent unit.
|
|
1573
1575
|
*/
|
|
@@ -1577,7 +1579,7 @@ export function Tab(props: TabProps): JSX.Element;
|
|
|
1577
1579
|
export function TabPanel(props: TabPanelProps): JSX.Element | null;
|
|
1578
1580
|
export interface TagProps extends Omit<_TagProps1, 'children' | 'style' | 'className'> {
|
|
1579
1581
|
/** The children of the tag. */
|
|
1580
|
-
children
|
|
1582
|
+
children: ReactNode;
|
|
1581
1583
|
}
|
|
1582
1584
|
export interface TagGroupProps<T> extends Omit<_TagGroupProps1, 'children' | 'style' | 'className'>, Pick<TagListProps<T>, 'items' | 'children' | 'renderEmptyState'>, Omit<SpectrumLabelableProps, 'isRequired' | 'necessityIndicator'>, StyleProps, Omit<HelpTextProps, 'errorMessage'> {
|
|
1583
1585
|
/** A description for the tag group. */
|
|
@@ -1603,7 +1605,7 @@ export interface TagGroupProps<T> extends Omit<_TagGroupProps1, 'children' | 'st
|
|
|
1603
1605
|
/** Handler that is called when the action button is pressed. */
|
|
1604
1606
|
onGroupAction?: () => void;
|
|
1605
1607
|
}
|
|
1606
|
-
export const TagGroupContext: Context<ContextValue<TagGroupProps<any
|
|
1608
|
+
export const TagGroupContext: Context<ContextValue<Partial<TagGroupProps<any>>, DOMRefValue<HTMLDivElement>>>;
|
|
1607
1609
|
/** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */
|
|
1608
1610
|
export const TagGroup: <T extends object>(props: TagGroupProps<T> & RefAttributes<DOMRefValue<HTMLDivElement>>) => ReactElement | null;
|
|
1609
1611
|
/** An individual Tag for TagGroups. */
|
|
@@ -1616,7 +1618,7 @@ export interface TextFieldProps extends Omit<_TextFieldProps1, 'children' | 'cla
|
|
|
1616
1618
|
*/
|
|
1617
1619
|
size?: 'S' | 'M' | 'L' | 'XL';
|
|
1618
1620
|
}
|
|
1619
|
-
export const TextFieldContext: Context<ContextValue<TextFieldProps
|
|
1621
|
+
export const TextFieldContext: Context<ContextValue<Partial<TextFieldProps>, TextFieldRef<HTMLInputElement>>>;
|
|
1620
1622
|
/**
|
|
1621
1623
|
* TextFields are text inputs that allow users to input custom text entries
|
|
1622
1624
|
* with a keyboard. Various decorations can be displayed around the field to
|
|
@@ -1625,7 +1627,7 @@ export const TextFieldContext: Context<ContextValue<TextFieldProps, TextFieldRef
|
|
|
1625
1627
|
export const TextField: ForwardRefExoticComponent<TextFieldProps & RefAttributes<TextFieldRef<HTMLInputElement>>>;
|
|
1626
1628
|
export interface TextAreaProps extends Omit<TextFieldProps, 'type' | 'pattern'> {
|
|
1627
1629
|
}
|
|
1628
|
-
export const TextAreaContext: Context<ContextValue<TextAreaProps
|
|
1630
|
+
export const TextAreaContext: Context<ContextValue<Partial<TextAreaProps>, TextFieldRef<HTMLTextAreaElement>>>;
|
|
1629
1631
|
/**
|
|
1630
1632
|
* TextAreas are multiline text inputs, useful for cases where users have
|
|
1631
1633
|
* a sizable amount of text to enter. They allow for all customizations that
|
|
@@ -1636,18 +1638,18 @@ export interface ToggleButtonGroupProps extends ActionButtonGroupProps, Omit<_To
|
|
|
1636
1638
|
/** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */
|
|
1637
1639
|
isEmphasized?: boolean;
|
|
1638
1640
|
}
|
|
1639
|
-
export const ToggleButtonGroupContext: Context<ContextValue<ToggleButtonGroupProps
|
|
1641
|
+
export const ToggleButtonGroupContext: Context<ContextValue<Partial<ToggleButtonGroupProps>, HTMLDivElement>>;
|
|
1640
1642
|
/**
|
|
1641
1643
|
* A ToggleButtonGroup is a grouping of related ToggleButtons, with single or multiple selection.
|
|
1642
1644
|
*/
|
|
1643
1645
|
export const ToggleButtonGroup: ForwardRefExoticComponent<ToggleButtonGroupProps & RefAttributes<HTMLDivElement>>;
|
|
1644
1646
|
export interface ToggleButtonProps extends Omit<_ToggleButtonProps1, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, ActionButtonStyleProps {
|
|
1645
1647
|
/** The content to display in the button. */
|
|
1646
|
-
children
|
|
1648
|
+
children: ReactNode;
|
|
1647
1649
|
/** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */
|
|
1648
1650
|
isEmphasized?: boolean;
|
|
1649
1651
|
}
|
|
1650
|
-
export const ToggleButtonContext: Context<ContextValue<ToggleButtonProps
|
|
1652
|
+
export const ToggleButtonContext: Context<ContextValue<Partial<ToggleButtonProps>, FocusableRefValue<HTMLButtonElement, HTMLButtonElement>>>;
|
|
1651
1653
|
/**
|
|
1652
1654
|
* ToggleButtons allow users to toggle a selection on or off, for example
|
|
1653
1655
|
* switching between two states or modes.
|
|
@@ -1655,7 +1657,7 @@ export const ToggleButtonContext: Context<ContextValue<ToggleButtonProps, Focusa
|
|
|
1655
1657
|
export const ToggleButton: ForwardRefExoticComponent<ToggleButtonProps & RefAttributes<FocusableRefValue<HTMLButtonElement, HTMLButtonElement>>>;
|
|
1656
1658
|
interface TooltipTriggerProps extends Omit<TooltipTriggerComponentProps, 'children' | 'closeDelay'>, Pick<_TooltipProps1, 'shouldFlip' | 'containerPadding' | 'offset' | 'crossOffset'> {
|
|
1657
1659
|
/** The content of the tooltip. */
|
|
1658
|
-
children
|
|
1660
|
+
children: ReactNode;
|
|
1659
1661
|
/**
|
|
1660
1662
|
* The placement of the element with respect to its anchor element.
|
|
1661
1663
|
*
|
|
@@ -1665,7 +1667,7 @@ interface TooltipTriggerProps extends Omit<TooltipTriggerComponentProps, 'childr
|
|
|
1665
1667
|
}
|
|
1666
1668
|
export interface TooltipProps extends Omit<_TooltipProps1, 'children' | 'className' | 'style' | 'triggerRef' | 'UNSTABLE_portalContainer' | 'isEntering' | 'isExiting' | 'placement' | 'containerPadding' | 'offset' | 'crossOffset' | 'shouldFlip' | 'arrowBoundaryOffset' | 'isOpen' | 'defaultOpen' | 'onOpenChange'>, UnsafeStyles {
|
|
1667
1669
|
/** The content of the tooltip. */
|
|
1668
|
-
children
|
|
1670
|
+
children: ReactNode;
|
|
1669
1671
|
}
|
|
1670
1672
|
/**
|
|
1671
1673
|
* Display container for Tooltip content. Has a directional arrow dependent on its placement.
|