@baseline-ui/core 0.25.0 → 0.26.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/Acknowledgements.md +45071 -21080
- package/dist/index.css +1 -1
- package/dist/index.d.mts +110 -53
- package/dist/index.d.ts +110 -53
- package/dist/index.js +87 -89
- package/dist/index.mjs +9 -10
- package/package.json +5 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { Key, Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { IconProps, SVGRProps } from '@baseline-ui/icons';
|
|
3
|
+
import * as react_stately from 'react-stately';
|
|
2
4
|
import { DraggableCollectionStateOptions, DroppableCollectionStateOptions, Orientation, ListState, TooltipTriggerProps, SliderStateOptions, ToggleProps, OverlayTriggerProps, OverlayTriggerState, MenuTriggerProps, NumberFieldStateOptions, ListProps, SelectStateOptions, Item as Item$2, Selection as Selection$1, ComboBoxStateOptions, Node as Node$2 } from 'react-stately';
|
|
3
5
|
import * as react_aria from 'react-aria';
|
|
4
|
-
import { DraggableCollectionOptions, DroppableCollectionOptions, AriaListBoxProps, AriaListBoxOptions, OptionAria, AriaButtonProps, AriaTooltipProps, AriaPositionProps, AriaSliderProps, AriaSwitchProps, AriaSearchFieldProps, AriaPopoverProps, useOverlayTrigger, AriaMenuProps, AriaMenuTriggerProps, AriaLinkOptions, SeparatorProps as SeparatorProps$1, AriaProgressBarProps, AriaTextFieldProps, OverlayProps, AriaToggleButtonProps, AriaCheckboxProps, AriaNumberFieldProps, I18nProviderProps as I18nProviderProps$1, LocalizedStrings, useNumberFormatter, useDateFormatter, AriaTagGroupProps, AriaSelectOptions, AriaDialogProps, DropOptions, ClipboardProps, PressProps, AriaRadioGroupProps, AriaModalOverlayProps, AriaComboBoxOptions, AriaComboBoxProps, AriaGridListOptions, GridListItemAria, Locale } from 'react-aria';
|
|
6
|
+
import { DraggableCollectionOptions, DroppableCollectionOptions, AriaListBoxProps, AriaListBoxOptions, OptionAria, AriaButtonProps, AriaTooltipProps, AriaPositionProps, AriaSliderProps, AriaSwitchProps, AriaSearchFieldProps, AriaPopoverProps, useOverlayTrigger, AriaMenuProps, AriaMenuTriggerProps, AriaLinkOptions, SeparatorProps as SeparatorProps$1, AriaProgressBarProps, AriaTextFieldProps, OverlayProps, AriaToggleButtonProps, AriaCheckboxProps, AriaNumberFieldProps, I18nProviderProps as I18nProviderProps$1, LocalizedStrings, useNumberFormatter, useDateFormatter, AriaTagGroupProps, AriaSelectOptions, Key as Key$1, AriaDialogProps, DropOptions, ClipboardProps, PressProps, AriaRadioGroupProps, AriaModalOverlayProps, AriaComboBoxOptions, AriaComboBoxProps, AriaGridListOptions, GridListItemAria, Locale } from 'react-aria';
|
|
5
7
|
export { I18nProviderProps, useCollator, useDateFormatter, useNumberFormatter } from 'react-aria';
|
|
6
8
|
import { Node as Node$1, DragItem, DOMAttributes, AriaLabelingProps, AriaValidationProps, DOMProps } from '@react-types/shared';
|
|
7
|
-
import { IconProps, SVGRProps } from '@baseline-ui/icons';
|
|
8
9
|
import { Theme, Sprinkles } from '@baseline-ui/tokens';
|
|
9
10
|
import { AriaTabListProps } from '@react-types/tabs';
|
|
10
11
|
import { ColorFieldProps, Color } from '@react-stately/color';
|
|
@@ -14,6 +15,20 @@ import { UseTransitionProps } from '@react-spring/core';
|
|
|
14
15
|
import { AriaColorSwatchProps } from '@react-aria/color';
|
|
15
16
|
import { AriaActionGroupProps } from '@react-aria/actiongroup';
|
|
16
17
|
|
|
18
|
+
interface ListOption<T = Record<string, any>> {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
icon?: React.FC<IconProps>;
|
|
23
|
+
data?: T;
|
|
24
|
+
}
|
|
25
|
+
interface ListSection {
|
|
26
|
+
id: string;
|
|
27
|
+
title?: string;
|
|
28
|
+
children: ListOption[];
|
|
29
|
+
}
|
|
30
|
+
declare type ListItem = ListOption | ListSection;
|
|
31
|
+
|
|
17
32
|
declare type DragAndDropProps = Omit<DraggableCollectionStateOptions & DraggableCollectionOptions & DroppableCollectionOptions & DroppableCollectionStateOptions, "keyboardDelegate" | "dropTargetDelegate" | "shouldAcceptItemDrop" | "onDropEnter" | "onDropActivate" | "onDropExit" | "getDropOperation" | "collection" | "selectionManager" | "onRootDrop" | "onInsert" | "getAllowedDropOperations" | "getItems" | "onItemDrop"> & Partial<Pick<DraggableCollectionStateOptions, "getItems">> & {
|
|
18
33
|
/**
|
|
19
34
|
* Indicates whether reordering is enabled.
|
|
@@ -84,21 +99,6 @@ declare function isInsideOverlayContent(selector: HTMLElement): Element | null;
|
|
|
84
99
|
*/
|
|
85
100
|
declare function isRect(rect: Rect): rect is Rect;
|
|
86
101
|
|
|
87
|
-
interface ListOption<T = Record<string, any>> {
|
|
88
|
-
id: string;
|
|
89
|
-
label: string;
|
|
90
|
-
description?: string;
|
|
91
|
-
icon?: React.FC<IconProps>;
|
|
92
|
-
data?: T;
|
|
93
|
-
type?: "option";
|
|
94
|
-
}
|
|
95
|
-
interface ListSection {
|
|
96
|
-
id: string;
|
|
97
|
-
title?: string;
|
|
98
|
-
type: "section";
|
|
99
|
-
children: ListOption[];
|
|
100
|
-
}
|
|
101
|
-
declare type ListItem = ListOption | ListSection;
|
|
102
102
|
interface ListBoxHandle {
|
|
103
103
|
scrollIntoView: (id: string, options: ScrollIntoViewOptions) => void;
|
|
104
104
|
}
|
|
@@ -408,7 +408,7 @@ declare const PortalContainerProvider: React.FC<PortalContainerProviderProps>;
|
|
|
408
408
|
declare type OverlayTriggerProps_ = Parameters<typeof useOverlayTrigger>[0];
|
|
409
409
|
interface PopoverProps extends OverlayTriggerProps, OverlayTriggerProps_ {
|
|
410
410
|
/** The children of the popover. */
|
|
411
|
-
children: React.ReactNode
|
|
411
|
+
children: React.ReactNode;
|
|
412
412
|
}
|
|
413
413
|
interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "triggerRef" | "arrowSize" | "arrowBoundaryOffset">, StylingProps {
|
|
414
414
|
/**
|
|
@@ -419,7 +419,7 @@ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "tri
|
|
|
419
419
|
/** The class name for the underlay element. */
|
|
420
420
|
underlayClassName?: string;
|
|
421
421
|
/** The contents of the popover. */
|
|
422
|
-
children: React.ReactNode;
|
|
422
|
+
children: React.ReactNode | ((state: OverlayTriggerState) => React.ReactNode);
|
|
423
423
|
/**
|
|
424
424
|
* The container element for the popover. By default, the modal is rendered as
|
|
425
425
|
* a child of the body element.
|
|
@@ -747,6 +747,8 @@ declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & Reac
|
|
|
747
747
|
interface I18nProviderProps extends I18nProviderProps$1 {
|
|
748
748
|
/** The messages to use for internationalization. */
|
|
749
749
|
messages?: LocalizedStrings;
|
|
750
|
+
/** The children to render. */
|
|
751
|
+
children: React.ReactNode;
|
|
750
752
|
}
|
|
751
753
|
|
|
752
754
|
declare const I18nProvider: React.FC<I18nProviderProps>;
|
|
@@ -935,7 +937,7 @@ interface AvatarProps extends StylingProps {
|
|
|
935
937
|
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
936
938
|
|
|
937
939
|
declare type ItemProps = React.ComponentProps<typeof Item$2> & StylingProps & {
|
|
938
|
-
key?: Key;
|
|
940
|
+
key?: Key$1;
|
|
939
941
|
icon?: React.FC<SVGRProps>;
|
|
940
942
|
value?: string;
|
|
941
943
|
title?: string;
|
|
@@ -963,13 +965,13 @@ declare type TabsProps = Omit<StylingProps & AriaTabListProps<ItemProps>, "orien
|
|
|
963
965
|
*
|
|
964
966
|
* @param key
|
|
965
967
|
*/
|
|
966
|
-
onRemove?: (key: Key) => void;
|
|
968
|
+
onRemove?: (key: Key$1) => void;
|
|
967
969
|
/** The value of the tab that needs to be selected. */
|
|
968
970
|
selectedValue?: string;
|
|
969
971
|
/** The default value of the tab that needs to be selected. */
|
|
970
972
|
defaultSelectedValue?: string;
|
|
971
973
|
/** The values of the tabs that need to be disabled. */
|
|
972
|
-
disabledValues?: Set<Key>;
|
|
974
|
+
disabledValues?: Set<Key$1>;
|
|
973
975
|
/** A list of action buttons to render beside the tab items. */
|
|
974
976
|
actions?: Omit<ActionIconButtonProps, "variant" | "size">[];
|
|
975
977
|
/** The variant of the tabs */
|
|
@@ -990,14 +992,16 @@ declare type TabItemProps = StylingProps & {
|
|
|
990
992
|
titleClassName?: string;
|
|
991
993
|
/** The style to apply to the tab item. */
|
|
992
994
|
titleStyle?: React.CSSProperties;
|
|
995
|
+
/** The contents of the tab item. */
|
|
996
|
+
children: React.ReactNode;
|
|
993
997
|
};
|
|
994
998
|
|
|
995
|
-
declare const Tabs: React.ForwardRefExoticComponent<Omit<StylingProps & react_aria.AriaTabListProps<ItemProps>, "children" | "items" | "
|
|
999
|
+
declare const Tabs: React.ForwardRefExoticComponent<Omit<StylingProps & react_aria.AriaTabListProps<ItemProps>, "children" | "items" | "orientation" | "disabledKeys" | "selectedKey" | "defaultSelectedKey"> & {
|
|
996
1000
|
children: React.ReactNode;
|
|
997
|
-
onRemove?: ((key:
|
|
1001
|
+
onRemove?: ((key: react_stately.Key) => void) | undefined;
|
|
998
1002
|
selectedValue?: string | undefined;
|
|
999
1003
|
defaultSelectedValue?: string | undefined;
|
|
1000
|
-
disabledValues?: Set<
|
|
1004
|
+
disabledValues?: Set<react_stately.Key> | undefined;
|
|
1001
1005
|
actions?: Omit<ActionIconButtonProps, "size" | "variant">[] | undefined;
|
|
1002
1006
|
variant?: "primary" | "ghost" | undefined;
|
|
1003
1007
|
tabHeaderClassName?: string | undefined;
|
|
@@ -1391,7 +1395,7 @@ declare type TextProps<T extends keyof React.JSX.IntrinsicElements = "span"> = S
|
|
|
1391
1395
|
elementType?: React.ElementType;
|
|
1392
1396
|
};
|
|
1393
1397
|
|
|
1394
|
-
declare const Text: React.ForwardRefExoticComponent<
|
|
1398
|
+
declare const Text: React.ForwardRefExoticComponent<Omit<TextProps<"span">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1395
1399
|
|
|
1396
1400
|
interface TransformProps {
|
|
1397
1401
|
/** The `className` property assigned to the root element of the component. */
|
|
@@ -1662,15 +1666,15 @@ interface RadioGroupProps extends StylingProps, Omit<AriaRadioGroupProps, "descr
|
|
|
1662
1666
|
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
1663
1667
|
|
|
1664
1668
|
interface ModalProps extends OverlayTriggerProps {
|
|
1669
|
+
/** The contents of the modal. */
|
|
1670
|
+
children: React.ReactNode;
|
|
1665
1671
|
}
|
|
1666
1672
|
interface ModalContentProps extends Omit<AriaModalOverlayProps, "isDismissable" | "isKeyboardDismissDisabled">, StylingProps {
|
|
1667
1673
|
/**
|
|
1668
1674
|
* The contents of the modal. Can be a React node or a function that returns a
|
|
1669
1675
|
* React node.
|
|
1670
1676
|
*/
|
|
1671
|
-
children: React.ReactNode | ((props:
|
|
1672
|
-
close: () => void;
|
|
1673
|
-
}) => React.ReactNode);
|
|
1677
|
+
children: React.ReactNode | ((props: OverlayTriggerState) => React.ReactNode);
|
|
1674
1678
|
/**
|
|
1675
1679
|
* The container element for the modal. By default, the modal is rendered as a
|
|
1676
1680
|
* child of the body element.
|
|
@@ -1716,9 +1720,13 @@ declare const Modal: React.FC<ModalProps>;
|
|
|
1716
1720
|
|
|
1717
1721
|
declare const ModalContent: React.FC<ModalContentProps>;
|
|
1718
1722
|
|
|
1719
|
-
declare const ModalTrigger: React.FC
|
|
1723
|
+
declare const ModalTrigger: React.FC<{
|
|
1724
|
+
children: React.ReactNode;
|
|
1725
|
+
}>;
|
|
1720
1726
|
|
|
1721
|
-
declare const ModalClose: React.FC
|
|
1727
|
+
declare const ModalClose: React.FC<{
|
|
1728
|
+
children: React.ReactNode;
|
|
1729
|
+
}>;
|
|
1722
1730
|
|
|
1723
1731
|
interface MessageFormatProps {
|
|
1724
1732
|
/**
|
|
@@ -1767,17 +1775,6 @@ interface BoxProps extends Pick<StylingProps, "data-block-id">, Omit<React.Compo
|
|
|
1767
1775
|
|
|
1768
1776
|
declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
|
|
1769
1777
|
|
|
1770
|
-
interface ColorPresetInlineInputProps extends Omit<RadioGroupProps, "items" | "disabledValues"> {
|
|
1771
|
-
items: ColorPreset[];
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
/**
|
|
1775
|
-
* @deprecated Please use `ColorSwatchPicker` instead.
|
|
1776
|
-
*
|
|
1777
|
-
* TODO [>=0.26.0] Remove this component.
|
|
1778
|
-
*/
|
|
1779
|
-
declare const ColorPresetInlineInput: React.ForwardRefExoticComponent<ColorPresetInlineInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
1780
|
-
|
|
1781
1778
|
interface ToolbarProps extends StylingProps, AriaToolbarProps {
|
|
1782
1779
|
/** The children of the toolbar. */
|
|
1783
1780
|
children: React.ReactNode;
|
|
@@ -1804,7 +1801,7 @@ interface ToolbarProps extends StylingProps, AriaToolbarProps {
|
|
|
1804
1801
|
* the toolbar buttons and the menu trigger. This prop is only relevant when
|
|
1805
1802
|
* `isCollapsible` is true.
|
|
1806
1803
|
*/
|
|
1807
|
-
renderSpacer?:
|
|
1804
|
+
renderSpacer?: boolean;
|
|
1808
1805
|
}
|
|
1809
1806
|
|
|
1810
1807
|
declare const Toolbar: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1842,6 +1839,7 @@ interface MentionableUser {
|
|
|
1842
1839
|
}
|
|
1843
1840
|
interface EditorHandle {
|
|
1844
1841
|
setCaretPosition: (index: number) => void;
|
|
1842
|
+
focus: () => void;
|
|
1845
1843
|
}
|
|
1846
1844
|
interface EditorProps extends StylingProps, AriaLabelingProps {
|
|
1847
1845
|
/**
|
|
@@ -2119,9 +2117,9 @@ declare const AudioPlayer: React.ForwardRefExoticComponent<AudioPlayerProps & Re
|
|
|
2119
2117
|
|
|
2120
2118
|
interface Item {
|
|
2121
2119
|
id: string;
|
|
2120
|
+
label: string;
|
|
2122
2121
|
src?: string;
|
|
2123
2122
|
alt?: string;
|
|
2124
|
-
label: string;
|
|
2125
2123
|
}
|
|
2126
2124
|
interface ImageGalleryProps extends StylingProps, Omit<ListBoxProps, "items" | "layout" | "grid" | "renderOption" | "renderDropIndicator" | "renderDragPreview" | "showSelectedIcon" | "orientation" | "shouldSelectOnPressUp" | "shouldFocusOnHover" | "dropIndicatorClassName" | "dropIndicatorStyle" | "shouldUseVirtualFocus" | "getItems" | "acceptedDragTypes" | "sectionClassName" | "sectionStyle"> {
|
|
2127
2125
|
/**
|
|
@@ -2198,11 +2196,16 @@ interface ImageGalleryProps extends StylingProps, Omit<ListBoxProps, "items" | "
|
|
|
2198
2196
|
imageClassName?: string;
|
|
2199
2197
|
/** ClassName for each item image label */
|
|
2200
2198
|
labelClassName?: string;
|
|
2199
|
+
/** A callback that is called to render the image. */
|
|
2200
|
+
renderImage?: (item: ListOption<Pick<Item, "alt" | "src">>, options: {
|
|
2201
|
+
deleteElement?: React.ReactElement;
|
|
2202
|
+
onDelete?: (id: string) => void;
|
|
2203
|
+
}) => React.ReactElement;
|
|
2201
2204
|
}
|
|
2202
2205
|
|
|
2203
2206
|
declare const ImageGallery: React.ForwardRefExoticComponent<ImageGalleryProps & React.RefAttributes<HTMLDivElement>>;
|
|
2204
2207
|
|
|
2205
|
-
interface ButtonSelectProps extends StylingProps, Pick<SelectProps, "isDisabled" | "validationState" | "onSelectionChange" | "selectedKey" | "defaultSelectedKey" | "items" | "showSelectedIcon" | "isOpen" | "defaultOpen">, Pick<
|
|
2208
|
+
interface ButtonSelectProps extends StylingProps, Pick<SelectProps, "isDisabled" | "validationState" | "onSelectionChange" | "selectedKey" | "defaultSelectedKey" | "items" | "showSelectedIcon" | "isOpen" | "defaultOpen">, Pick<ToggleButtonProps, "onPress" | "isSelected" | "defaultSelected" | "excludeFromTabOrder">, AriaLabelingProps {
|
|
2206
2209
|
/**
|
|
2207
2210
|
* The size of the button.
|
|
2208
2211
|
*
|
|
@@ -2215,6 +2218,11 @@ interface ButtonSelectProps extends StylingProps, Pick<SelectProps, "isDisabled"
|
|
|
2215
2218
|
* @default false
|
|
2216
2219
|
*/
|
|
2217
2220
|
hideLabel?: boolean;
|
|
2221
|
+
/** A callback that is called when the button selection changes. */
|
|
2222
|
+
onButtonSelectionChange?: (options: {
|
|
2223
|
+
isSelected: boolean;
|
|
2224
|
+
selectedKey: string;
|
|
2225
|
+
}) => void;
|
|
2218
2226
|
}
|
|
2219
2227
|
|
|
2220
2228
|
declare const ButtonSelect: React.ForwardRefExoticComponent<ButtonSelectProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -2292,6 +2300,22 @@ interface ComboBoxProps extends StylingProps, Omit<AriaComboBoxOptions<ListItem>
|
|
|
2292
2300
|
menuTrigger?: "manual" | "input" | "focus";
|
|
2293
2301
|
/** Custom filter function to use when filtering items. */
|
|
2294
2302
|
filter?: ComboBoxStateOptions<ListItem>["defaultFilter"];
|
|
2303
|
+
/**
|
|
2304
|
+
* The type of the input field
|
|
2305
|
+
*
|
|
2306
|
+
* @default text
|
|
2307
|
+
*/
|
|
2308
|
+
inputType?: "text" | "number";
|
|
2309
|
+
/**
|
|
2310
|
+
* The minimum value for the input field. This is only valid when `inputType`
|
|
2311
|
+
* is set to `number`.
|
|
2312
|
+
*/
|
|
2313
|
+
minValue?: number;
|
|
2314
|
+
/**
|
|
2315
|
+
* The maximum value for the input field. This is only valid when `inputType`
|
|
2316
|
+
* is set to `number`.
|
|
2317
|
+
*/
|
|
2318
|
+
maxValue?: number;
|
|
2295
2319
|
}
|
|
2296
2320
|
|
|
2297
2321
|
declare const ComboBox: React.ForwardRefExoticComponent<ComboBoxProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -2384,18 +2408,51 @@ interface ActionGroupProps extends StylingProps, Omit<AriaActionGroupProps<ListI
|
|
|
2384
2408
|
selectionMode?: "single" | "multiple";
|
|
2385
2409
|
/** The props to be passed to the tooltip component. */
|
|
2386
2410
|
tooltipProps?: IconComponentProps["tooltipProps"] | ((item: ListItem) => IconComponentProps["tooltipProps"]);
|
|
2411
|
+
/**
|
|
2412
|
+
* A function that renders an action item. This function is called for each
|
|
2413
|
+
* item in the action group. By default, an `ActionIconButton` is rendered.
|
|
2414
|
+
*
|
|
2415
|
+
* @default
|
|
2416
|
+
*
|
|
2417
|
+
* ```jsx
|
|
2418
|
+
* <ActionIconButton
|
|
2419
|
+
* variant="tertiary"
|
|
2420
|
+
* icon={icon}
|
|
2421
|
+
* aria-label={item.textValue}
|
|
2422
|
+
* size="sm"
|
|
2423
|
+
* isDisabled={_isDisabled}
|
|
2424
|
+
* className={"BaselineUI-ActionGroup-Item"}
|
|
2425
|
+
* />;
|
|
2426
|
+
* ```
|
|
2427
|
+
*/
|
|
2428
|
+
renderActionItem?: (item: Node$2<ListItem>, options: {
|
|
2429
|
+
isSelected?: boolean;
|
|
2430
|
+
isDisabled?: boolean;
|
|
2431
|
+
}) => React.ReactNode;
|
|
2387
2432
|
}
|
|
2388
2433
|
|
|
2389
2434
|
declare const ActionGroup: React.ForwardRefExoticComponent<ActionGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
2390
|
-
declare const ActionGroupItem: React.FC<
|
|
2435
|
+
declare const ActionGroupItem: React.FC<ActionGroupItemProps>;
|
|
2436
|
+
interface ActionGroupItemProps extends Pick<ActionGroupProps, "tooltipProps" | "renderActionItem" | "onAction" | "isDisabled"> {
|
|
2391
2437
|
item: Node$2<ListItem>;
|
|
2392
2438
|
state: ListState<ListItem>;
|
|
2393
|
-
|
|
2394
|
-
isDisabled?: boolean;
|
|
2395
|
-
tooltipProps?: IconComponentProps["tooltipProps"];
|
|
2396
|
-
}>;
|
|
2439
|
+
}
|
|
2397
2440
|
|
|
2398
|
-
interface ColorSwatchPickerProps extends StylingProps, Pick<
|
|
2441
|
+
interface ColorSwatchPickerProps extends StylingProps, Pick<RadioGroupProps, "optionsContainerClassName" | "labelPosition">, Pick<ListBoxProps, "optionClassName" | "optionStyle">, AriaLabelingProps {
|
|
2442
|
+
/**
|
|
2443
|
+
* The items to display in the picker. Each item should have a `color` and a
|
|
2444
|
+
* `label`.
|
|
2445
|
+
*
|
|
2446
|
+
* ```js
|
|
2447
|
+
* const items = [
|
|
2448
|
+
* { color: "#FF0000", label: "Red" },
|
|
2449
|
+
* { color: "#00FF00", label: "Green" },
|
|
2450
|
+
* { color: "#0000FF", label: "Blue" },
|
|
2451
|
+
* { color: "#FFFF00", label: "Yellow" },
|
|
2452
|
+
* ];
|
|
2453
|
+
* ```
|
|
2454
|
+
*/
|
|
2455
|
+
items: ColorPreset[];
|
|
2399
2456
|
/** The icon visible at the start of the picker. */
|
|
2400
2457
|
icon?: React.FC<IconProps>;
|
|
2401
2458
|
/**
|
|
@@ -2730,7 +2787,7 @@ interface TextSelectionProps {
|
|
|
2730
2787
|
* @param element - The element to use to get the owner window. Defaults to
|
|
2731
2788
|
* `document.body`.
|
|
2732
2789
|
*/
|
|
2733
|
-
declare function useDevice(element?: Element | null | undefined): "
|
|
2790
|
+
declare function useDevice(element?: Element | null | undefined): "mobile" | "tablet" | "desktop";
|
|
2734
2791
|
|
|
2735
2792
|
/**
|
|
2736
2793
|
* Custom hook for accessing PortalContainerProviderContext. This hook allows
|
|
@@ -2744,4 +2801,4 @@ declare function useDevice(element?: Element | null | undefined): "desktop" | "t
|
|
|
2744
2801
|
*/
|
|
2745
2802
|
declare function usePortalContainer(_portalContainer?: HTMLElement): HTMLElement | undefined;
|
|
2746
2803
|
|
|
2747
|
-
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionGroup, ActionGroupItem, type ActionGroupProps, ActionIconButton, type ActionIconButtonProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, ButtonSelect, type ButtonSelectProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset,
|
|
2804
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionGroup, ActionGroupItem, type ActionGroupProps, ActionIconButton, type ActionIconButtonProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, ButtonSelect, type ButtonSelectProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorSwatch, ColorSwatchPicker, type ColorSwatchPickerProps, type ColorSwatchProps, ComboBox, type ComboBoxProps, DateFormat, type DateFormatProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorHandle, type EditorProps, FileUpload, type FileUploadProps, FreehandCanvas, type FreehandCanvasProps, GridList, type GridListProps, Group, type GroupProps, I18nProvider, type I18nResult, IconColorInput, IconColorInputButton, type IconColorInputProps, IconSelect, type IconSelectProps, IconSlider, type IconSliderProps, ImageDropZone, type ImageDropZoneProps, ImageGallery, type ImageGalleryProps, InlineAlert, type InlineAlertProps, Link, type LinkProps, ListBox, type ListBoxProps, type ListOption, Markdown, type MarkdownProps, Menu, type MenuItem, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, Reaction, type ReactionProps, type Rect, ScrollControlButton, type ScrollControlButtonProps, SearchInput, type SearchInputProps, Select, type SelectProps, Separator, type SeparatorProps, Slider, type SliderProps, type StylingProps, Switch, type SwitchProps, TabItem, type TabItemProps, Tabs, type TabsProps, TagGroup, type TagGroupProps, Text, TextInput, type TextInputProps, type TextProps, ThemeProvider, type ThemeProviderProps, ToggleButton, type ToggleButtonProps, ToggleIconButton, type ToggleIconButtonProps, Toolbar, type ToolbarProps, Tooltip, type TooltipProps, Transform, type TransformProps, Transition, type TransitionProps, defineMessages, isInsideOverlayContent, isRect, useDevice, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, usePortalContainer, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
|