@baseline-ui/core 0.13.0 → 0.15.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/index.css +1 -1
- package/dist/index.d.mts +110 -61
- package/dist/index.d.ts +110 -61
- package/dist/index.js +79 -74
- package/dist/index.mjs +7 -5
- package/package.json +10 -9
package/dist/index.d.ts
CHANGED
|
@@ -10,8 +10,9 @@ import { AriaTabListProps } from '@react-types/tabs';
|
|
|
10
10
|
import { ColorFieldProps, Color } from '@react-stately/color';
|
|
11
11
|
import { OnRender, OnRenderStart, OnDragStart, OnDrag, OnDragEnd, OnResizeStart, OnResize, OnResizeEnd, OnRotateStart, OnRotate, OnRotateEnd, OnSnap, RotationPosition } from 'react-moveable';
|
|
12
12
|
import { AriaToolbarProps } from '@react-aria/toolbar';
|
|
13
|
+
import { UseTransitionProps } from '@react-spring/core';
|
|
13
14
|
|
|
14
|
-
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">> & {
|
|
15
|
+
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">> & {
|
|
15
16
|
/**
|
|
16
17
|
* Indicates whether reordering is enabled.
|
|
17
18
|
*
|
|
@@ -34,24 +35,22 @@ type DragAndDropProps = Omit<DraggableCollectionStateOptions & DraggableCollecti
|
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
interface BlockProps {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
/**
|
|
39
|
+
* The unique identifier for the block. This is used to identify the block in
|
|
40
|
+
* the DOM and in the block map. It is added as a data attribute
|
|
41
|
+
* `data-block-id` to the root element of the block if a DOM node is
|
|
42
|
+
* rendered.
|
|
43
|
+
*/
|
|
44
|
+
"data-block-id"?: Key;
|
|
44
45
|
}
|
|
45
|
-
|
|
46
46
|
interface StylingProps extends BlockProps {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
style?: React.CSSProperties;
|
|
47
|
+
/** The className applied to the root element of the component. */
|
|
48
|
+
className?: string;
|
|
49
|
+
/** The style applied to the root element of the component. */
|
|
50
|
+
style?: React.CSSProperties;
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
|
|
53
|
+
interface ListOption {
|
|
55
54
|
id: string;
|
|
56
55
|
label: string;
|
|
57
56
|
description?: string;
|
|
@@ -63,14 +62,14 @@ type ListOption = {
|
|
|
63
62
|
* @default item
|
|
64
63
|
*/
|
|
65
64
|
type?: "option";
|
|
66
|
-
}
|
|
67
|
-
|
|
65
|
+
}
|
|
66
|
+
interface ListSection {
|
|
68
67
|
id: string;
|
|
69
68
|
title?: string;
|
|
70
69
|
type: "section";
|
|
71
70
|
children: ListOption[];
|
|
72
|
-
}
|
|
73
|
-
type ListItem = ListOption | ListSection;
|
|
71
|
+
}
|
|
72
|
+
declare type ListItem = ListOption | ListSection;
|
|
74
73
|
interface ListBoxProps extends StylingProps, Omit<AriaListBoxProps<ListItem> & AriaListBoxOptions<ListItem>, "children" | "linkBehavior" | "isVirtualized" | "keyboardDelegate">, Omit<DragAndDropProps, "preview" | "enableReorder" | "orientation" | "layout">, Partial<Pick<DragAndDropProps, "enableReorder" | "orientation" | "layout">> {
|
|
75
74
|
/**
|
|
76
75
|
* The items to render in the listbox. Items have the following shape:
|
|
@@ -264,7 +263,7 @@ declare function useUserPreferences(ownerWindow?: Window & typeof globalThis): {
|
|
|
264
263
|
transparency: boolean;
|
|
265
264
|
};
|
|
266
265
|
|
|
267
|
-
type OverlayTriggerProps_ = Parameters<typeof useOverlayTrigger>[0];
|
|
266
|
+
declare type OverlayTriggerProps_ = Parameters<typeof useOverlayTrigger>[0];
|
|
268
267
|
interface PopoverProps extends OverlayTriggerProps, OverlayTriggerProps_ {
|
|
269
268
|
/** The children of the popover. */
|
|
270
269
|
children: React.ReactNode | ((state: OverlayTriggerState) => React.ReactNode);
|
|
@@ -279,6 +278,19 @@ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "tri
|
|
|
279
278
|
underlayClassName?: string;
|
|
280
279
|
/** The contents of the popover. */
|
|
281
280
|
children: React.ReactNode;
|
|
281
|
+
/**
|
|
282
|
+
* The container element for the modal. By default, the modal is rendered as a
|
|
283
|
+
* child of the body element.
|
|
284
|
+
*
|
|
285
|
+
* @default document.body
|
|
286
|
+
*/
|
|
287
|
+
portalContainer?: HTMLElement;
|
|
288
|
+
/**
|
|
289
|
+
* Whether to include an arrow on the popover.
|
|
290
|
+
*
|
|
291
|
+
* @default false
|
|
292
|
+
*/
|
|
293
|
+
includeArrow?: boolean;
|
|
282
294
|
}
|
|
283
295
|
interface PopoverTriggerProps {
|
|
284
296
|
/** The contents of the popover trigger. */
|
|
@@ -295,14 +307,14 @@ declare const PopoverTrigger: React.FC;
|
|
|
295
307
|
|
|
296
308
|
declare const Popover: React.FC<PopoverProps>;
|
|
297
309
|
|
|
298
|
-
type MenuOption = Omit<ListOption, "description"> & {
|
|
310
|
+
declare type MenuOption = Omit<ListOption, "description"> & {
|
|
299
311
|
keyboardShortcut?: string;
|
|
300
312
|
};
|
|
301
|
-
type MenuSection = Omit<ListSection, "children"> & {
|
|
313
|
+
declare type MenuSection = Omit<ListSection, "children"> & {
|
|
302
314
|
children: MenuOption[];
|
|
303
315
|
};
|
|
304
|
-
type MenuItem = MenuOption | MenuSection;
|
|
305
|
-
type MenuPopoverProps = Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset">;
|
|
316
|
+
declare type MenuItem = MenuOption | MenuSection;
|
|
317
|
+
declare type MenuPopoverProps = Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "crossOffset" | "offset">;
|
|
306
318
|
interface MenuProps extends MenuPopoverProps, MenuTriggerProps, Omit<AriaMenuProps<MenuItem>, "children">, Omit<AriaMenuTriggerProps, "type"> {
|
|
307
319
|
/** The `className` property assigned to the root element of the component. */
|
|
308
320
|
className?: string;
|
|
@@ -515,6 +527,13 @@ interface TooltipProps extends TooltipTriggerProps, AriaTooltipProps, Omit<AriaP
|
|
|
515
527
|
* @default true
|
|
516
528
|
*/
|
|
517
529
|
includeArrow?: boolean;
|
|
530
|
+
/**
|
|
531
|
+
* The container element for the modal. By default, the modal is rendered as a
|
|
532
|
+
* child of the body element.
|
|
533
|
+
*
|
|
534
|
+
* @default document.body
|
|
535
|
+
*/
|
|
536
|
+
portalContainer?: HTMLElement;
|
|
518
537
|
}
|
|
519
538
|
|
|
520
539
|
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -590,7 +609,7 @@ interface CheckboxProps extends Omit<AriaCheckboxProps, "children" | "validation
|
|
|
590
609
|
|
|
591
610
|
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLLabelElement>>;
|
|
592
611
|
|
|
593
|
-
type Excluded = "isDisabled" | "isReadOnly" | "isRequired" | "locale" | "validationState" | "label" | "formatOptions" | "isInvalid" | "validationBehaviour" | "validate" | "description" | "errorMessage";
|
|
612
|
+
declare type Excluded = "isDisabled" | "isReadOnly" | "isRequired" | "locale" | "validationState" | "label" | "formatOptions" | "isInvalid" | "validationBehaviour" | "validate" | "description" | "errorMessage";
|
|
594
613
|
interface PaginationProps extends Omit<AriaNumberFieldProps, Excluded>, Omit<NumberFieldStateOptions, Excluded>, StylingProps {
|
|
595
614
|
/** The largest value allowed for the input. */
|
|
596
615
|
maxValue: number;
|
|
@@ -619,26 +638,26 @@ interface I18nProviderProps extends I18nProviderProps$1 {
|
|
|
619
638
|
|
|
620
639
|
declare const I18nProvider: React.FC<I18nProviderProps>;
|
|
621
640
|
|
|
622
|
-
type NumberFormatProps = Parameters<typeof useNumberFormatter>[0] & {
|
|
641
|
+
declare type NumberFormatProps = Parameters<typeof useNumberFormatter>[0] & {
|
|
623
642
|
/** The number to format. */
|
|
624
643
|
value: number;
|
|
625
644
|
};
|
|
626
645
|
|
|
627
646
|
declare const NumberFormat: React.FC<NumberFormatProps>;
|
|
628
647
|
|
|
629
|
-
type DateFormatProps = Parameters<typeof useDateFormatter>[0] & {
|
|
648
|
+
declare type DateFormatProps = Parameters<typeof useDateFormatter>[0] & {
|
|
630
649
|
/** The date to format. */
|
|
631
650
|
date: Date;
|
|
632
651
|
};
|
|
633
652
|
|
|
634
653
|
declare const DateFormat: React.FC<DateFormatProps>;
|
|
635
654
|
|
|
636
|
-
|
|
655
|
+
interface Item {
|
|
637
656
|
id: string;
|
|
638
657
|
label: string;
|
|
639
658
|
variant?: "neutral" | "red" | "green" | "blue" | "high-contrast";
|
|
640
659
|
icon?: React.FC<SVGRProps>;
|
|
641
|
-
}
|
|
660
|
+
}
|
|
642
661
|
interface TagGroupProps extends StylingProps, Omit<AriaTagGroupProps<Item>, "children" | "errorMessage" | "description">, Omit<ListProps<Item>, "children" | "collection" | "filter"> {
|
|
643
662
|
/**
|
|
644
663
|
* The items to display in the tag group.
|
|
@@ -786,7 +805,7 @@ interface AvatarProps extends StylingProps {
|
|
|
786
805
|
|
|
787
806
|
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
788
807
|
|
|
789
|
-
type ItemProps = React.ComponentProps<typeof Item$1> & StylingProps & {
|
|
808
|
+
declare type ItemProps = React.ComponentProps<typeof Item$1> & StylingProps & {
|
|
790
809
|
key?: Key;
|
|
791
810
|
icon?: React.FC<SVGRProps>;
|
|
792
811
|
value?: string;
|
|
@@ -794,7 +813,7 @@ type ItemProps = React.ComponentProps<typeof Item$1> & StylingProps & {
|
|
|
794
813
|
titleClassName?: string;
|
|
795
814
|
titleStyle?: React.CSSProperties;
|
|
796
815
|
};
|
|
797
|
-
type TabsProps = Omit<StylingProps & AriaTabListProps<ItemProps>, "orientation" | "children" | "items" | "selectedKey" | "defaultSelectedKey" | "disabledKeys"> & {
|
|
816
|
+
declare type TabsProps = Omit<StylingProps & AriaTabListProps<ItemProps>, "orientation" | "children" | "items" | "selectedKey" | "defaultSelectedKey" | "disabledKeys"> & {
|
|
798
817
|
/**
|
|
799
818
|
* The `TabItem` components to render inside the `Tabs` component.
|
|
800
819
|
*
|
|
@@ -831,7 +850,7 @@ type TabsProps = Omit<StylingProps & AriaTabListProps<ItemProps>, "orientation"
|
|
|
831
850
|
/** The style to apply to the tab header container. */
|
|
832
851
|
tabHeaderStyle?: React.CSSProperties;
|
|
833
852
|
};
|
|
834
|
-
type TabItemProps = StylingProps & {
|
|
853
|
+
declare type TabItemProps = StylingProps & {
|
|
835
854
|
/** The title of the tab. This will be displayed in the tab button. */
|
|
836
855
|
title: string;
|
|
837
856
|
/** The icon to display in front of the title. */
|
|
@@ -1185,7 +1204,7 @@ interface FreehandCanvasProps extends StylingProps, AriaLabelingProps {
|
|
|
1185
1204
|
|
|
1186
1205
|
declare const FreehandCanvas: React.ForwardRefExoticComponent<FreehandCanvasProps & React.RefAttributes<HTMLDivElement>>;
|
|
1187
1206
|
|
|
1188
|
-
type TextProps<T extends keyof React.JSX.IntrinsicElements = "span"> = StylingProps & React.ComponentProps<T> & {
|
|
1207
|
+
declare type TextProps<T extends keyof React.JSX.IntrinsicElements = "span"> = StylingProps & React.ComponentProps<T> & {
|
|
1189
1208
|
/**
|
|
1190
1209
|
* The type of text to render.
|
|
1191
1210
|
*
|
|
@@ -1208,9 +1227,9 @@ type TextProps<T extends keyof React.JSX.IntrinsicElements = "span"> = StylingPr
|
|
|
1208
1227
|
elementType?: React.ElementType;
|
|
1209
1228
|
};
|
|
1210
1229
|
|
|
1211
|
-
declare const Text: React.ForwardRefExoticComponent<Pick<TextProps
|
|
1230
|
+
declare const Text: React.ForwardRefExoticComponent<Pick<TextProps<"span">, "className" | "style" | "children" | "autoFocus" | "onFocus" | "onBlur" | "id" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-details" | "onDrop" | "onDragStart" | "onDragEnd" | "data-block-id" | "type" | "color" | "size" | "content" | "translate" | "hidden" | "elementType" | "role" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
1212
1231
|
|
|
1213
|
-
|
|
1232
|
+
interface TransformProps {
|
|
1214
1233
|
/** The `className` property assigned to the root element of the component. */
|
|
1215
1234
|
className?: string;
|
|
1216
1235
|
/** The `style` property assigned to the root element of the component. */
|
|
@@ -1309,8 +1328,8 @@ type TransformProps = {
|
|
|
1309
1328
|
*
|
|
1310
1329
|
* @default ""
|
|
1311
1330
|
*/
|
|
1312
|
-
transformOrigin?:
|
|
1313
|
-
}
|
|
1331
|
+
transformOrigin?: (string | number)[] | string;
|
|
1332
|
+
}
|
|
1314
1333
|
|
|
1315
1334
|
declare const Transform: React.ForwardRefExoticComponent<TransformProps & React.RefAttributes<HTMLDivElement>>;
|
|
1316
1335
|
|
|
@@ -1572,7 +1591,7 @@ interface GroupProps extends StylingProps, AriaLabelingProps {
|
|
|
1572
1591
|
|
|
1573
1592
|
declare const Group: React.ForwardRefExoticComponent<GroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
1574
1593
|
|
|
1575
|
-
type SprinkleProps = Parameters<Sprinkles>[0];
|
|
1594
|
+
declare type SprinkleProps = Parameters<Sprinkles>[0];
|
|
1576
1595
|
interface BoxProps extends Pick<StylingProps, "data-block-id">, Omit<React.ComponentPropsWithoutRef<"div">, "color">, SprinkleProps {
|
|
1577
1596
|
/**
|
|
1578
1597
|
* The HTML element to use for the box.
|
|
@@ -1623,16 +1642,16 @@ interface ToggleIconButtonProps extends StylingProps, Omit<ToggleProps, "childre
|
|
|
1623
1642
|
|
|
1624
1643
|
declare const ToggleIconButton: React.ForwardRefExoticComponent<ToggleIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1625
1644
|
|
|
1626
|
-
|
|
1645
|
+
interface MentionableUser {
|
|
1627
1646
|
id: string;
|
|
1628
1647
|
name: string;
|
|
1629
1648
|
displayName: string;
|
|
1630
1649
|
avatar?: AvatarProps;
|
|
1631
1650
|
description?: string;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1651
|
+
}
|
|
1652
|
+
interface EditorHandle {
|
|
1634
1653
|
setCaretPosition: (index: number) => void;
|
|
1635
|
-
}
|
|
1654
|
+
}
|
|
1636
1655
|
interface EditorProps extends StylingProps, AriaLabelingProps {
|
|
1637
1656
|
/**
|
|
1638
1657
|
* The function to be called when `Enter` key is pressed or Save button is
|
|
@@ -1819,6 +1838,8 @@ declare const AlertDialog: React.ForwardRefExoticComponent<AlertDialogProps & Re
|
|
|
1819
1838
|
interface MarkdownProps extends StylingProps {
|
|
1820
1839
|
/** The markdown to render. */
|
|
1821
1840
|
children: string;
|
|
1841
|
+
/** The flag to show the caret at the end */
|
|
1842
|
+
showCaret?: boolean;
|
|
1822
1843
|
}
|
|
1823
1844
|
|
|
1824
1845
|
declare const Markdown: React.ForwardRefExoticComponent<MarkdownProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1842,6 +1863,43 @@ interface DrawerProps extends StylingProps, AriaDialogProps {
|
|
|
1842
1863
|
|
|
1843
1864
|
declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
|
|
1844
1865
|
|
|
1866
|
+
interface AudioPlayerProps extends StylingProps, AriaLabelingProps {
|
|
1867
|
+
/**
|
|
1868
|
+
* The sources of the audio file. The `url` is the URL of the audio file, and
|
|
1869
|
+
* the `type` is the MIME type of the audio file.
|
|
1870
|
+
*
|
|
1871
|
+
* ```tsx
|
|
1872
|
+
* <AudioPlayer
|
|
1873
|
+
* sources={[
|
|
1874
|
+
* { url: "/sound.mp3", type: "audio/mpeg" },
|
|
1875
|
+
* { url: "/sound.ogg", type: "audio/ogg" },
|
|
1876
|
+
* ]}
|
|
1877
|
+
* />
|
|
1878
|
+
* ```
|
|
1879
|
+
*/
|
|
1880
|
+
sources: {
|
|
1881
|
+
url: string;
|
|
1882
|
+
type: string;
|
|
1883
|
+
}[];
|
|
1884
|
+
/**
|
|
1885
|
+
* The size of the audio player.
|
|
1886
|
+
*
|
|
1887
|
+
* @default "lg"
|
|
1888
|
+
*/
|
|
1889
|
+
size?: "sm" | "lg";
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
declare const AudioPlayer: React.ForwardRefExoticComponent<AudioPlayerProps & React.RefAttributes<HTMLDivElement>>;
|
|
1893
|
+
|
|
1894
|
+
interface TransitionProps extends StylingProps {
|
|
1895
|
+
isMounted: boolean;
|
|
1896
|
+
transitions: UseTransitionProps;
|
|
1897
|
+
elementType?: keyof React.ReactHTML;
|
|
1898
|
+
children: React.ReactNode;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
declare const Transition: React.ForwardRefExoticComponent<TransitionProps & React.RefAttributes<HTMLElement>>;
|
|
1902
|
+
|
|
1845
1903
|
/**
|
|
1846
1904
|
* A hook that creates an IntersectionObserver and observes a target element.
|
|
1847
1905
|
*
|
|
@@ -2062,22 +2120,15 @@ declare function useIsFirstRender(): boolean;
|
|
|
2062
2120
|
* @returns {I18nResult<T>} An object containing a function to format messages
|
|
2063
2121
|
* and the current locale.
|
|
2064
2122
|
*/
|
|
2065
|
-
declare function useI18n<T extends Record<string, string>>(messages?:
|
|
2066
|
-
[lang: string]: T;
|
|
2067
|
-
}): I18nResult<T>;
|
|
2123
|
+
declare function useI18n<T extends Record<string, string>>(messages?: Record<string, T>): I18nResult<T>;
|
|
2068
2124
|
interface I18nResult<T extends LocalizedStrings[keyof LocalizedStrings]> {
|
|
2069
|
-
formatMessage: (id: keyof T | MessageDescriptor
|
|
2070
|
-
[p: string]: any;
|
|
2071
|
-
}) => string;
|
|
2125
|
+
formatMessage: (id: keyof T | MessageDescriptor, values?: Record<string, any>) => string;
|
|
2072
2126
|
locale: Locale;
|
|
2073
2127
|
}
|
|
2074
|
-
interface MessageDescriptor
|
|
2075
|
-
id:
|
|
2128
|
+
interface MessageDescriptor {
|
|
2129
|
+
id: string;
|
|
2076
2130
|
defaultMessage?: string;
|
|
2077
2131
|
}
|
|
2078
|
-
type Message<T extends object> = {
|
|
2079
|
-
[U in keyof T]: U;
|
|
2080
|
-
};
|
|
2081
2132
|
/**
|
|
2082
2133
|
* Defines a set of messages for use with the `useI18n` hook.
|
|
2083
2134
|
*
|
|
@@ -2085,11 +2136,9 @@ type Message<T extends object> = {
|
|
|
2085
2136
|
* @returns An object containing the message descriptors with their keys as
|
|
2086
2137
|
* property names.
|
|
2087
2138
|
*/
|
|
2088
|
-
declare
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
};
|
|
2092
|
-
}>(messages: T): Message<T>;
|
|
2139
|
+
declare const defineMessages: <T extends Record<string, {
|
|
2140
|
+
id: string;
|
|
2141
|
+
}>>(messages: T) => T;
|
|
2093
2142
|
|
|
2094
2143
|
/**
|
|
2095
2144
|
* A hook that uses a MutationObserver to watch for changes to the DOM.
|
|
@@ -2112,7 +2161,7 @@ declare function defineMessages<T extends {
|
|
|
2112
2161
|
*/
|
|
2113
2162
|
declare function useMutationObserver(target: Element | null, options: MutationObserverInit, callback: MutationCallback): MutationObserver | null;
|
|
2114
2163
|
|
|
2115
|
-
type SetValue<T> = Dispatch<SetStateAction<T>>;
|
|
2164
|
+
declare type SetValue<T> = Dispatch<SetStateAction<T>>;
|
|
2116
2165
|
/**
|
|
2117
2166
|
* A hook to persist a value to localStorage.
|
|
2118
2167
|
*
|
|
@@ -2179,6 +2228,6 @@ interface TextSelectionProps {
|
|
|
2179
2228
|
* @param element - The element to use to get the owner window. Defaults to
|
|
2180
2229
|
* `document.body`.
|
|
2181
2230
|
*/
|
|
2182
|
-
declare function useDevice(element?:
|
|
2231
|
+
declare function useDevice(element?: Element | null | undefined): "tablet" | "desktop" | "mobile";
|
|
2183
2232
|
|
|
2184
|
-
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionIconButton, type ActionIconButtonProps, AlertDialog, type AlertDialogProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorPresetInlineInput, type ColorPresetInlineInputProps, ColorSwatch, type ColorSwatchProps, DateFormat, type DateFormatProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorProps, FileUpload, type FileUploadProps, FreehandCanvas, type FreehandCanvasProps, Group, type GroupProps, I18nProvider, type I18nResult, IconColorInputButton, ImageDropZone, type ImageDropZoneProps, 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, type PortalProps, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, Reaction, type ReactionProps, 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, defineMessages, useDevice, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
|
|
2233
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionIconButton, type ActionIconButtonProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorPresetInlineInput, type ColorPresetInlineInputProps, ColorSwatch, type ColorSwatchProps, 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, Group, type GroupProps, I18nProvider, type I18nResult, IconColorInputButton, ImageDropZone, type ImageDropZoneProps, 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, type PortalProps, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, Reaction, type ReactionProps, 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, useDevice, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
|