@baseline-ui/core 0.12.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 +69 -31
- package/dist/index.d.ts +69 -31
- 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
|
|
|
@@ -1396,6 +1396,18 @@ interface PreviewProps extends StylingProps, AriaLabelingProps {
|
|
|
1396
1396
|
deleteAriaLabel?: string;
|
|
1397
1397
|
/** The callback to be called when the preview is clicked. */
|
|
1398
1398
|
addAriaLabel?: string;
|
|
1399
|
+
/**
|
|
1400
|
+
* The accent variable represents the type of accent color used in the
|
|
1401
|
+
* application. It can have one of the following values:
|
|
1402
|
+
*
|
|
1403
|
+
* - "theme": Represents the accent color defined by the current application
|
|
1404
|
+
* theme.
|
|
1405
|
+
* - "positive": Represents a positive accent color that doesn't change with
|
|
1406
|
+
* theme.
|
|
1407
|
+
*
|
|
1408
|
+
* @default "theme"
|
|
1409
|
+
*/
|
|
1410
|
+
accent?: "theme" | "positive";
|
|
1399
1411
|
}
|
|
1400
1412
|
|
|
1401
1413
|
declare const Preview: React.ForwardRefExoticComponent<PreviewProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1598,22 +1610,29 @@ interface ToggleIconButtonProps extends StylingProps, Omit<ToggleProps, "childre
|
|
|
1598
1610
|
size?: "xxs" | "xs" | "sm" | "md" | "lg";
|
|
1599
1611
|
/** Represents the variant of a component. */
|
|
1600
1612
|
variant?: "primary" | "secondary" | "tertiary" | "toolbar";
|
|
1601
|
-
/**
|
|
1602
|
-
|
|
1613
|
+
/**
|
|
1614
|
+
* The icon to be displayed on the button. You can pass an object with
|
|
1615
|
+
* `selected` and `unselected` keys to display different icons based on the
|
|
1616
|
+
* state of the button.
|
|
1617
|
+
*/
|
|
1618
|
+
icon: React.FC<IconProps> | {
|
|
1619
|
+
selected: React.FC<IconProps>;
|
|
1620
|
+
unselected: React.FC<IconProps>;
|
|
1621
|
+
};
|
|
1603
1622
|
}
|
|
1604
1623
|
|
|
1605
1624
|
declare const ToggleIconButton: React.ForwardRefExoticComponent<ToggleIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1606
1625
|
|
|
1607
|
-
|
|
1626
|
+
interface MentionableUser {
|
|
1608
1627
|
id: string;
|
|
1609
1628
|
name: string;
|
|
1610
1629
|
displayName: string;
|
|
1611
1630
|
avatar?: AvatarProps;
|
|
1612
1631
|
description?: string;
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1632
|
+
}
|
|
1633
|
+
interface EditorHandle {
|
|
1615
1634
|
setCaretPosition: (index: number) => void;
|
|
1616
|
-
}
|
|
1635
|
+
}
|
|
1617
1636
|
interface EditorProps extends StylingProps, AriaLabelingProps {
|
|
1618
1637
|
/**
|
|
1619
1638
|
* The function to be called when `Enter` key is pressed or Save button is
|
|
@@ -1823,6 +1842,34 @@ interface DrawerProps extends StylingProps, AriaDialogProps {
|
|
|
1823
1842
|
|
|
1824
1843
|
declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
|
|
1825
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
|
+
|
|
1826
1873
|
/**
|
|
1827
1874
|
* A hook that creates an IntersectionObserver and observes a target element.
|
|
1828
1875
|
*
|
|
@@ -2043,22 +2090,15 @@ declare function useIsFirstRender(): boolean;
|
|
|
2043
2090
|
* @returns {I18nResult<T>} An object containing a function to format messages
|
|
2044
2091
|
* and the current locale.
|
|
2045
2092
|
*/
|
|
2046
|
-
declare function useI18n<T extends Record<string, string>>(messages?:
|
|
2047
|
-
[lang: string]: T;
|
|
2048
|
-
}): I18nResult<T>;
|
|
2093
|
+
declare function useI18n<T extends Record<string, string>>(messages?: Record<string, T>): I18nResult<T>;
|
|
2049
2094
|
interface I18nResult<T extends LocalizedStrings[keyof LocalizedStrings]> {
|
|
2050
|
-
formatMessage: (id: keyof T | MessageDescriptor<T>, values?:
|
|
2051
|
-
[p: string]: any;
|
|
2052
|
-
}) => string;
|
|
2095
|
+
formatMessage: (id: keyof T | MessageDescriptor<T>, values?: Record<string, any>) => string;
|
|
2053
2096
|
locale: Locale;
|
|
2054
2097
|
}
|
|
2055
2098
|
interface MessageDescriptor<T extends LocalizedStrings[keyof LocalizedStrings]> {
|
|
2056
2099
|
id: keyof T;
|
|
2057
2100
|
defaultMessage?: string;
|
|
2058
2101
|
}
|
|
2059
|
-
type Message<T extends object> = {
|
|
2060
|
-
[U in keyof T]: U;
|
|
2061
|
-
};
|
|
2062
2102
|
/**
|
|
2063
2103
|
* Defines a set of messages for use with the `useI18n` hook.
|
|
2064
2104
|
*
|
|
@@ -2066,11 +2106,9 @@ type Message<T extends object> = {
|
|
|
2066
2106
|
* @returns An object containing the message descriptors with their keys as
|
|
2067
2107
|
* property names.
|
|
2068
2108
|
*/
|
|
2069
|
-
declare
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
};
|
|
2073
|
-
}>(messages: T): Message<T>;
|
|
2109
|
+
declare const defineMessages: <const T extends Record<string, {
|
|
2110
|
+
id: string;
|
|
2111
|
+
}>>(messages: T) => T;
|
|
2074
2112
|
|
|
2075
2113
|
/**
|
|
2076
2114
|
* A hook that uses a MutationObserver to watch for changes to the DOM.
|
|
@@ -2160,6 +2198,6 @@ interface TextSelectionProps {
|
|
|
2160
2198
|
* @param element - The element to use to get the owner window. Defaults to
|
|
2161
2199
|
* `document.body`.
|
|
2162
2200
|
*/
|
|
2163
|
-
declare function useDevice(element?:
|
|
2201
|
+
declare function useDevice(element?: Element | null | undefined): "tablet" | "desktop" | "mobile";
|
|
2164
2202
|
|
|
2165
|
-
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
|
|
|
@@ -1396,6 +1396,18 @@ interface PreviewProps extends StylingProps, AriaLabelingProps {
|
|
|
1396
1396
|
deleteAriaLabel?: string;
|
|
1397
1397
|
/** The callback to be called when the preview is clicked. */
|
|
1398
1398
|
addAriaLabel?: string;
|
|
1399
|
+
/**
|
|
1400
|
+
* The accent variable represents the type of accent color used in the
|
|
1401
|
+
* application. It can have one of the following values:
|
|
1402
|
+
*
|
|
1403
|
+
* - "theme": Represents the accent color defined by the current application
|
|
1404
|
+
* theme.
|
|
1405
|
+
* - "positive": Represents a positive accent color that doesn't change with
|
|
1406
|
+
* theme.
|
|
1407
|
+
*
|
|
1408
|
+
* @default "theme"
|
|
1409
|
+
*/
|
|
1410
|
+
accent?: "theme" | "positive";
|
|
1399
1411
|
}
|
|
1400
1412
|
|
|
1401
1413
|
declare const Preview: React.ForwardRefExoticComponent<PreviewProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1598,22 +1610,29 @@ interface ToggleIconButtonProps extends StylingProps, Omit<ToggleProps, "childre
|
|
|
1598
1610
|
size?: "xxs" | "xs" | "sm" | "md" | "lg";
|
|
1599
1611
|
/** Represents the variant of a component. */
|
|
1600
1612
|
variant?: "primary" | "secondary" | "tertiary" | "toolbar";
|
|
1601
|
-
/**
|
|
1602
|
-
|
|
1613
|
+
/**
|
|
1614
|
+
* The icon to be displayed on the button. You can pass an object with
|
|
1615
|
+
* `selected` and `unselected` keys to display different icons based on the
|
|
1616
|
+
* state of the button.
|
|
1617
|
+
*/
|
|
1618
|
+
icon: React.FC<IconProps> | {
|
|
1619
|
+
selected: React.FC<IconProps>;
|
|
1620
|
+
unselected: React.FC<IconProps>;
|
|
1621
|
+
};
|
|
1603
1622
|
}
|
|
1604
1623
|
|
|
1605
1624
|
declare const ToggleIconButton: React.ForwardRefExoticComponent<ToggleIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1606
1625
|
|
|
1607
|
-
|
|
1626
|
+
interface MentionableUser {
|
|
1608
1627
|
id: string;
|
|
1609
1628
|
name: string;
|
|
1610
1629
|
displayName: string;
|
|
1611
1630
|
avatar?: AvatarProps;
|
|
1612
1631
|
description?: string;
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1632
|
+
}
|
|
1633
|
+
interface EditorHandle {
|
|
1615
1634
|
setCaretPosition: (index: number) => void;
|
|
1616
|
-
}
|
|
1635
|
+
}
|
|
1617
1636
|
interface EditorProps extends StylingProps, AriaLabelingProps {
|
|
1618
1637
|
/**
|
|
1619
1638
|
* The function to be called when `Enter` key is pressed or Save button is
|
|
@@ -1823,6 +1842,34 @@ interface DrawerProps extends StylingProps, AriaDialogProps {
|
|
|
1823
1842
|
|
|
1824
1843
|
declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
|
|
1825
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
|
+
|
|
1826
1873
|
/**
|
|
1827
1874
|
* A hook that creates an IntersectionObserver and observes a target element.
|
|
1828
1875
|
*
|
|
@@ -2043,22 +2090,15 @@ declare function useIsFirstRender(): boolean;
|
|
|
2043
2090
|
* @returns {I18nResult<T>} An object containing a function to format messages
|
|
2044
2091
|
* and the current locale.
|
|
2045
2092
|
*/
|
|
2046
|
-
declare function useI18n<T extends Record<string, string>>(messages?:
|
|
2047
|
-
[lang: string]: T;
|
|
2048
|
-
}): I18nResult<T>;
|
|
2093
|
+
declare function useI18n<T extends Record<string, string>>(messages?: Record<string, T>): I18nResult<T>;
|
|
2049
2094
|
interface I18nResult<T extends LocalizedStrings[keyof LocalizedStrings]> {
|
|
2050
|
-
formatMessage: (id: keyof T | MessageDescriptor<T>, values?:
|
|
2051
|
-
[p: string]: any;
|
|
2052
|
-
}) => string;
|
|
2095
|
+
formatMessage: (id: keyof T | MessageDescriptor<T>, values?: Record<string, any>) => string;
|
|
2053
2096
|
locale: Locale;
|
|
2054
2097
|
}
|
|
2055
2098
|
interface MessageDescriptor<T extends LocalizedStrings[keyof LocalizedStrings]> {
|
|
2056
2099
|
id: keyof T;
|
|
2057
2100
|
defaultMessage?: string;
|
|
2058
2101
|
}
|
|
2059
|
-
type Message<T extends object> = {
|
|
2060
|
-
[U in keyof T]: U;
|
|
2061
|
-
};
|
|
2062
2102
|
/**
|
|
2063
2103
|
* Defines a set of messages for use with the `useI18n` hook.
|
|
2064
2104
|
*
|
|
@@ -2066,11 +2106,9 @@ type Message<T extends object> = {
|
|
|
2066
2106
|
* @returns An object containing the message descriptors with their keys as
|
|
2067
2107
|
* property names.
|
|
2068
2108
|
*/
|
|
2069
|
-
declare
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
};
|
|
2073
|
-
}>(messages: T): Message<T>;
|
|
2109
|
+
declare const defineMessages: <const T extends Record<string, {
|
|
2110
|
+
id: string;
|
|
2111
|
+
}>>(messages: T) => T;
|
|
2074
2112
|
|
|
2075
2113
|
/**
|
|
2076
2114
|
* A hook that uses a MutationObserver to watch for changes to the DOM.
|
|
@@ -2160,6 +2198,6 @@ interface TextSelectionProps {
|
|
|
2160
2198
|
* @param element - The element to use to get the owner window. Defaults to
|
|
2161
2199
|
* `document.body`.
|
|
2162
2200
|
*/
|
|
2163
|
-
declare function useDevice(element?:
|
|
2201
|
+
declare function useDevice(element?: Element | null | undefined): "tablet" | "desktop" | "mobile";
|
|
2164
2202
|
|
|
2165
|
-
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 };
|