@baseline-ui/core 0.13.0 → 0.14.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 +48 -29
- package/dist/index.d.ts +48 -29
- package/dist/index.js +73 -69
- package/dist/index.mjs +7 -5
- package/package.json +7 -6
package/dist/index.d.mts
CHANGED
|
@@ -51,7 +51,7 @@ interface StylingProps extends BlockProps {
|
|
|
51
51
|
style?: React.CSSProperties;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
interface ListOption {
|
|
55
55
|
id: string;
|
|
56
56
|
label: string;
|
|
57
57
|
description?: string;
|
|
@@ -63,13 +63,13 @@ type ListOption = {
|
|
|
63
63
|
* @default item
|
|
64
64
|
*/
|
|
65
65
|
type?: "option";
|
|
66
|
-
}
|
|
67
|
-
|
|
66
|
+
}
|
|
67
|
+
interface ListSection {
|
|
68
68
|
id: string;
|
|
69
69
|
title?: string;
|
|
70
70
|
type: "section";
|
|
71
71
|
children: ListOption[];
|
|
72
|
-
}
|
|
72
|
+
}
|
|
73
73
|
type ListItem = ListOption | ListSection;
|
|
74
74
|
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
75
|
/**
|
|
@@ -633,12 +633,12 @@ type DateFormatProps = Parameters<typeof useDateFormatter>[0] & {
|
|
|
633
633
|
|
|
634
634
|
declare const DateFormat: React.FC<DateFormatProps>;
|
|
635
635
|
|
|
636
|
-
|
|
636
|
+
interface Item {
|
|
637
637
|
id: string;
|
|
638
638
|
label: string;
|
|
639
639
|
variant?: "neutral" | "red" | "green" | "blue" | "high-contrast";
|
|
640
640
|
icon?: React.FC<SVGRProps>;
|
|
641
|
-
}
|
|
641
|
+
}
|
|
642
642
|
interface TagGroupProps extends StylingProps, Omit<AriaTagGroupProps<Item>, "children" | "errorMessage" | "description">, Omit<ListProps<Item>, "children" | "collection" | "filter"> {
|
|
643
643
|
/**
|
|
644
644
|
* The items to display in the tag group.
|
|
@@ -1210,7 +1210,7 @@ type TextProps<T extends keyof React.JSX.IntrinsicElements = "span"> = StylingPr
|
|
|
1210
1210
|
|
|
1211
1211
|
declare const Text: React.ForwardRefExoticComponent<Pick<TextProps, "children" | "autoFocus" | "onFocus" | "onBlur" | "id" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-details" | "onDrop" | "onDragStart" | "onDragEnd" | "className" | "style" | "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
1212
|
|
|
1213
|
-
|
|
1213
|
+
interface TransformProps {
|
|
1214
1214
|
/** The `className` property assigned to the root element of the component. */
|
|
1215
1215
|
className?: string;
|
|
1216
1216
|
/** The `style` property assigned to the root element of the component. */
|
|
@@ -1309,8 +1309,8 @@ type TransformProps = {
|
|
|
1309
1309
|
*
|
|
1310
1310
|
* @default ""
|
|
1311
1311
|
*/
|
|
1312
|
-
transformOrigin?:
|
|
1313
|
-
}
|
|
1312
|
+
transformOrigin?: (string | number)[] | string;
|
|
1313
|
+
}
|
|
1314
1314
|
|
|
1315
1315
|
declare const Transform: React.ForwardRefExoticComponent<TransformProps & React.RefAttributes<HTMLDivElement>>;
|
|
1316
1316
|
|
|
@@ -1623,16 +1623,16 @@ interface ToggleIconButtonProps extends StylingProps, Omit<ToggleProps, "childre
|
|
|
1623
1623
|
|
|
1624
1624
|
declare const ToggleIconButton: React.ForwardRefExoticComponent<ToggleIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1625
1625
|
|
|
1626
|
-
|
|
1626
|
+
interface MentionableUser {
|
|
1627
1627
|
id: string;
|
|
1628
1628
|
name: string;
|
|
1629
1629
|
displayName: string;
|
|
1630
1630
|
avatar?: AvatarProps;
|
|
1631
1631
|
description?: string;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1632
|
+
}
|
|
1633
|
+
interface EditorHandle {
|
|
1634
1634
|
setCaretPosition: (index: number) => void;
|
|
1635
|
-
}
|
|
1635
|
+
}
|
|
1636
1636
|
interface EditorProps extends StylingProps, AriaLabelingProps {
|
|
1637
1637
|
/**
|
|
1638
1638
|
* The function to be called when `Enter` key is pressed or Save button is
|
|
@@ -1842,6 +1842,34 @@ interface DrawerProps extends StylingProps, AriaDialogProps {
|
|
|
1842
1842
|
|
|
1843
1843
|
declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
|
|
1844
1844
|
|
|
1845
|
+
interface AudioPlayerProps extends StylingProps, AriaLabelingProps {
|
|
1846
|
+
/**
|
|
1847
|
+
* The sources of the audio file. The `url` is the URL of the audio file, and
|
|
1848
|
+
* the `type` is the MIME type of the audio file.
|
|
1849
|
+
*
|
|
1850
|
+
* ```tsx
|
|
1851
|
+
* <AudioPlayer
|
|
1852
|
+
* sources={[
|
|
1853
|
+
* { url: "/sound.mp3", type: "audio/mpeg" },
|
|
1854
|
+
* { url: "/sound.ogg", type: "audio/ogg" },
|
|
1855
|
+
* ]}
|
|
1856
|
+
* />
|
|
1857
|
+
* ```
|
|
1858
|
+
*/
|
|
1859
|
+
sources: {
|
|
1860
|
+
url: string;
|
|
1861
|
+
type: string;
|
|
1862
|
+
}[];
|
|
1863
|
+
/**
|
|
1864
|
+
* The size of the audio player.
|
|
1865
|
+
*
|
|
1866
|
+
* @default "lg"
|
|
1867
|
+
*/
|
|
1868
|
+
size?: "sm" | "lg";
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
declare const AudioPlayer: React.ForwardRefExoticComponent<AudioPlayerProps & React.RefAttributes<HTMLDivElement>>;
|
|
1872
|
+
|
|
1845
1873
|
/**
|
|
1846
1874
|
* A hook that creates an IntersectionObserver and observes a target element.
|
|
1847
1875
|
*
|
|
@@ -2062,22 +2090,15 @@ declare function useIsFirstRender(): boolean;
|
|
|
2062
2090
|
* @returns {I18nResult<T>} An object containing a function to format messages
|
|
2063
2091
|
* and the current locale.
|
|
2064
2092
|
*/
|
|
2065
|
-
declare function useI18n<T extends Record<string, string>>(messages?:
|
|
2066
|
-
[lang: string]: T;
|
|
2067
|
-
}): I18nResult<T>;
|
|
2093
|
+
declare function useI18n<T extends Record<string, string>>(messages?: Record<string, T>): I18nResult<T>;
|
|
2068
2094
|
interface I18nResult<T extends LocalizedStrings[keyof LocalizedStrings]> {
|
|
2069
|
-
formatMessage: (id: keyof T | MessageDescriptor<T>, values?:
|
|
2070
|
-
[p: string]: any;
|
|
2071
|
-
}) => string;
|
|
2095
|
+
formatMessage: (id: keyof T | MessageDescriptor<T>, values?: Record<string, any>) => string;
|
|
2072
2096
|
locale: Locale;
|
|
2073
2097
|
}
|
|
2074
2098
|
interface MessageDescriptor<T extends LocalizedStrings[keyof LocalizedStrings]> {
|
|
2075
2099
|
id: keyof T;
|
|
2076
2100
|
defaultMessage?: string;
|
|
2077
2101
|
}
|
|
2078
|
-
type Message<T extends object> = {
|
|
2079
|
-
[U in keyof T]: U;
|
|
2080
|
-
};
|
|
2081
2102
|
/**
|
|
2082
2103
|
* Defines a set of messages for use with the `useI18n` hook.
|
|
2083
2104
|
*
|
|
@@ -2085,11 +2106,9 @@ type Message<T extends object> = {
|
|
|
2085
2106
|
* @returns An object containing the message descriptors with their keys as
|
|
2086
2107
|
* property names.
|
|
2087
2108
|
*/
|
|
2088
|
-
declare
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
};
|
|
2092
|
-
}>(messages: T): Message<T>;
|
|
2109
|
+
declare const defineMessages: <const T extends Record<string, {
|
|
2110
|
+
id: string;
|
|
2111
|
+
}>>(messages: T) => T;
|
|
2093
2112
|
|
|
2094
2113
|
/**
|
|
2095
2114
|
* A hook that uses a MutationObserver to watch for changes to the DOM.
|
|
@@ -2179,6 +2198,6 @@ interface TextSelectionProps {
|
|
|
2179
2198
|
* @param element - The element to use to get the owner window. Defaults to
|
|
2180
2199
|
* `document.body`.
|
|
2181
2200
|
*/
|
|
2182
|
-
declare function useDevice(element?:
|
|
2201
|
+
declare function useDevice(element?: Element | null | undefined): "tablet" | "desktop" | "mobile";
|
|
2183
2202
|
|
|
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 };
|
|
2203
|
+
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 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ interface StylingProps extends BlockProps {
|
|
|
51
51
|
style?: React.CSSProperties;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
interface ListOption {
|
|
55
55
|
id: string;
|
|
56
56
|
label: string;
|
|
57
57
|
description?: string;
|
|
@@ -63,13 +63,13 @@ type ListOption = {
|
|
|
63
63
|
* @default item
|
|
64
64
|
*/
|
|
65
65
|
type?: "option";
|
|
66
|
-
}
|
|
67
|
-
|
|
66
|
+
}
|
|
67
|
+
interface ListSection {
|
|
68
68
|
id: string;
|
|
69
69
|
title?: string;
|
|
70
70
|
type: "section";
|
|
71
71
|
children: ListOption[];
|
|
72
|
-
}
|
|
72
|
+
}
|
|
73
73
|
type ListItem = ListOption | ListSection;
|
|
74
74
|
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
75
|
/**
|
|
@@ -633,12 +633,12 @@ type DateFormatProps = Parameters<typeof useDateFormatter>[0] & {
|
|
|
633
633
|
|
|
634
634
|
declare const DateFormat: React.FC<DateFormatProps>;
|
|
635
635
|
|
|
636
|
-
|
|
636
|
+
interface Item {
|
|
637
637
|
id: string;
|
|
638
638
|
label: string;
|
|
639
639
|
variant?: "neutral" | "red" | "green" | "blue" | "high-contrast";
|
|
640
640
|
icon?: React.FC<SVGRProps>;
|
|
641
|
-
}
|
|
641
|
+
}
|
|
642
642
|
interface TagGroupProps extends StylingProps, Omit<AriaTagGroupProps<Item>, "children" | "errorMessage" | "description">, Omit<ListProps<Item>, "children" | "collection" | "filter"> {
|
|
643
643
|
/**
|
|
644
644
|
* The items to display in the tag group.
|
|
@@ -1210,7 +1210,7 @@ type TextProps<T extends keyof React.JSX.IntrinsicElements = "span"> = StylingPr
|
|
|
1210
1210
|
|
|
1211
1211
|
declare const Text: React.ForwardRefExoticComponent<Pick<TextProps, "children" | "autoFocus" | "onFocus" | "onBlur" | "id" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-details" | "onDrop" | "onDragStart" | "onDragEnd" | "className" | "style" | "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
1212
|
|
|
1213
|
-
|
|
1213
|
+
interface TransformProps {
|
|
1214
1214
|
/** The `className` property assigned to the root element of the component. */
|
|
1215
1215
|
className?: string;
|
|
1216
1216
|
/** The `style` property assigned to the root element of the component. */
|
|
@@ -1309,8 +1309,8 @@ type TransformProps = {
|
|
|
1309
1309
|
*
|
|
1310
1310
|
* @default ""
|
|
1311
1311
|
*/
|
|
1312
|
-
transformOrigin?:
|
|
1313
|
-
}
|
|
1312
|
+
transformOrigin?: (string | number)[] | string;
|
|
1313
|
+
}
|
|
1314
1314
|
|
|
1315
1315
|
declare const Transform: React.ForwardRefExoticComponent<TransformProps & React.RefAttributes<HTMLDivElement>>;
|
|
1316
1316
|
|
|
@@ -1623,16 +1623,16 @@ interface ToggleIconButtonProps extends StylingProps, Omit<ToggleProps, "childre
|
|
|
1623
1623
|
|
|
1624
1624
|
declare const ToggleIconButton: React.ForwardRefExoticComponent<ToggleIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1625
1625
|
|
|
1626
|
-
|
|
1626
|
+
interface MentionableUser {
|
|
1627
1627
|
id: string;
|
|
1628
1628
|
name: string;
|
|
1629
1629
|
displayName: string;
|
|
1630
1630
|
avatar?: AvatarProps;
|
|
1631
1631
|
description?: string;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1632
|
+
}
|
|
1633
|
+
interface EditorHandle {
|
|
1634
1634
|
setCaretPosition: (index: number) => void;
|
|
1635
|
-
}
|
|
1635
|
+
}
|
|
1636
1636
|
interface EditorProps extends StylingProps, AriaLabelingProps {
|
|
1637
1637
|
/**
|
|
1638
1638
|
* The function to be called when `Enter` key is pressed or Save button is
|
|
@@ -1842,6 +1842,34 @@ interface DrawerProps extends StylingProps, AriaDialogProps {
|
|
|
1842
1842
|
|
|
1843
1843
|
declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
|
|
1844
1844
|
|
|
1845
|
+
interface AudioPlayerProps extends StylingProps, AriaLabelingProps {
|
|
1846
|
+
/**
|
|
1847
|
+
* The sources of the audio file. The `url` is the URL of the audio file, and
|
|
1848
|
+
* the `type` is the MIME type of the audio file.
|
|
1849
|
+
*
|
|
1850
|
+
* ```tsx
|
|
1851
|
+
* <AudioPlayer
|
|
1852
|
+
* sources={[
|
|
1853
|
+
* { url: "/sound.mp3", type: "audio/mpeg" },
|
|
1854
|
+
* { url: "/sound.ogg", type: "audio/ogg" },
|
|
1855
|
+
* ]}
|
|
1856
|
+
* />
|
|
1857
|
+
* ```
|
|
1858
|
+
*/
|
|
1859
|
+
sources: {
|
|
1860
|
+
url: string;
|
|
1861
|
+
type: string;
|
|
1862
|
+
}[];
|
|
1863
|
+
/**
|
|
1864
|
+
* The size of the audio player.
|
|
1865
|
+
*
|
|
1866
|
+
* @default "lg"
|
|
1867
|
+
*/
|
|
1868
|
+
size?: "sm" | "lg";
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
declare const AudioPlayer: React.ForwardRefExoticComponent<AudioPlayerProps & React.RefAttributes<HTMLDivElement>>;
|
|
1872
|
+
|
|
1845
1873
|
/**
|
|
1846
1874
|
* A hook that creates an IntersectionObserver and observes a target element.
|
|
1847
1875
|
*
|
|
@@ -2062,22 +2090,15 @@ declare function useIsFirstRender(): boolean;
|
|
|
2062
2090
|
* @returns {I18nResult<T>} An object containing a function to format messages
|
|
2063
2091
|
* and the current locale.
|
|
2064
2092
|
*/
|
|
2065
|
-
declare function useI18n<T extends Record<string, string>>(messages?:
|
|
2066
|
-
[lang: string]: T;
|
|
2067
|
-
}): I18nResult<T>;
|
|
2093
|
+
declare function useI18n<T extends Record<string, string>>(messages?: Record<string, T>): I18nResult<T>;
|
|
2068
2094
|
interface I18nResult<T extends LocalizedStrings[keyof LocalizedStrings]> {
|
|
2069
|
-
formatMessage: (id: keyof T | MessageDescriptor<T>, values?:
|
|
2070
|
-
[p: string]: any;
|
|
2071
|
-
}) => string;
|
|
2095
|
+
formatMessage: (id: keyof T | MessageDescriptor<T>, values?: Record<string, any>) => string;
|
|
2072
2096
|
locale: Locale;
|
|
2073
2097
|
}
|
|
2074
2098
|
interface MessageDescriptor<T extends LocalizedStrings[keyof LocalizedStrings]> {
|
|
2075
2099
|
id: keyof T;
|
|
2076
2100
|
defaultMessage?: string;
|
|
2077
2101
|
}
|
|
2078
|
-
type Message<T extends object> = {
|
|
2079
|
-
[U in keyof T]: U;
|
|
2080
|
-
};
|
|
2081
2102
|
/**
|
|
2082
2103
|
* Defines a set of messages for use with the `useI18n` hook.
|
|
2083
2104
|
*
|
|
@@ -2085,11 +2106,9 @@ type Message<T extends object> = {
|
|
|
2085
2106
|
* @returns An object containing the message descriptors with their keys as
|
|
2086
2107
|
* property names.
|
|
2087
2108
|
*/
|
|
2088
|
-
declare
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
};
|
|
2092
|
-
}>(messages: T): Message<T>;
|
|
2109
|
+
declare const defineMessages: <const T extends Record<string, {
|
|
2110
|
+
id: string;
|
|
2111
|
+
}>>(messages: T) => T;
|
|
2093
2112
|
|
|
2094
2113
|
/**
|
|
2095
2114
|
* A hook that uses a MutationObserver to watch for changes to the DOM.
|
|
@@ -2179,6 +2198,6 @@ interface TextSelectionProps {
|
|
|
2179
2198
|
* @param element - The element to use to get the owner window. Defaults to
|
|
2180
2199
|
* `document.body`.
|
|
2181
2200
|
*/
|
|
2182
|
-
declare function useDevice(element?:
|
|
2201
|
+
declare function useDevice(element?: Element | null | undefined): "tablet" | "desktop" | "mobile";
|
|
2183
2202
|
|
|
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 };
|
|
2203
|
+
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 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 };
|