@baseline-ui/core 0.58.0 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Acknowledgements.md +6165 -13146
- package/dist/components/Accordion/Accordion.css.d.ts +44 -0
- package/dist/components/Accordion/Accordion.d.ts +11 -0
- package/dist/components/Accordion/Accordion.types.d.ts +70 -0
- package/dist/components/Accordion/AccordionBase.d.ts +5 -0
- package/dist/components/Accordion/AccordionHeader.d.ts +6 -0
- package/dist/components/Accordion/AccordionItem.d.ts +3 -0
- package/dist/components/Accordion/index.d.ts +3 -0
- package/dist/components/ActionButton/ActionButton.css.d.ts +216 -0
- package/dist/components/ActionButton/ActionButton.d.ts +4 -0
- package/dist/components/ActionButton/ActionButton.types.d.ts +44 -0
- package/dist/components/ActionButton/index.d.ts +2 -0
- package/dist/components/ActionGroup/ActionGroup.css.d.ts +2 -0
- package/dist/components/ActionGroup/ActionGroup.d.ts +11 -0
- package/dist/components/ActionGroup/ActionGroup.types.d.ts +43 -0
- package/dist/components/ActionGroup/index.d.ts +3 -0
- package/dist/components/ActionIconButton/ActionIconButton.css.d.ts +116 -0
- package/dist/components/ActionIconButton/ActionIconButton.d.ts +3 -0
- package/dist/components/ActionIconButton/ActionIconButton.types.d.ts +56 -0
- package/dist/components/ActionIconButton/index.d.ts +2 -0
- package/dist/components/Actionable/Actionable.css.d.ts +2 -0
- package/dist/components/Actionable/Actionable.d.ts +3 -0
- package/dist/components/Actionable/Actionable.types.d.ts +15 -0
- package/dist/components/Actionable/index.d.ts +3 -0
- package/dist/components/AlertDialog/AlertDialog.css.d.ts +26 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +3 -0
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +77 -0
- package/dist/components/AlertDialog/index.d.ts +3 -0
- package/dist/components/AudioPlayer/AudioPlayer.css.d.ts +3 -0
- package/dist/components/AudioPlayer/AudioPlayer.d.ts +3 -0
- package/dist/components/AudioPlayer/AudioPlayer.types.d.ts +27 -0
- package/dist/components/AudioPlayer/index.d.ts +3 -0
- package/dist/components/Avatar/Avatar.css.d.ts +19 -0
- package/dist/components/Avatar/Avatar.d.ts +3 -0
- package/dist/components/Avatar/Avatar.types.d.ts +31 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Box/Box.d.ts +3 -0
- package/dist/components/Box/Box.types.d.ts +12 -0
- package/dist/components/Box/index.d.ts +3 -0
- package/dist/components/ButtonSelect/ButtonSelect.css.d.ts +3 -0
- package/dist/components/ButtonSelect/ButtonSelect.d.ts +3 -0
- package/dist/components/ButtonSelect/ButtonSelect.types.d.ts +56 -0
- package/dist/components/ButtonSelect/index.d.ts +3 -0
- package/dist/components/Calendar/Calendar.css.d.ts +135 -0
- package/dist/components/Calendar/Calendar.d.ts +4 -0
- package/dist/components/Calendar/Calendar.types.d.ts +22 -0
- package/dist/components/Calendar/CalendarCell.d.ts +9 -0
- package/dist/components/Calendar/CalendarHeader.d.ts +6 -0
- package/dist/components/Calendar/RangeCalendar.d.ts +4 -0
- package/dist/components/Calendar/index.d.ts +3 -0
- package/dist/components/Calendar/intl/index.d.ts +267 -0
- package/dist/components/Checkbox/Checkbox.css.d.ts +103 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +17 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Code/Code.css.d.ts +2 -0
- package/dist/components/Code/Code.d.ts +3 -0
- package/dist/components/Code/Code.types.d.ts +6 -0
- package/dist/components/Code/index.d.ts +3 -0
- package/dist/components/ColorInput/ColorArea.d.ts +4 -0
- package/dist/components/ColorInput/ColorFieldInput.d.ts +13 -0
- package/dist/components/ColorInput/ColorInput.css.d.ts +165 -0
- package/dist/components/ColorInput/ColorInput.d.ts +3 -0
- package/dist/components/ColorInput/ColorInput.types.d.ts +137 -0
- package/dist/components/ColorInput/ColorInputButton.d.ts +21 -0
- package/dist/components/ColorInput/ColorPresetList.d.ts +16 -0
- package/dist/components/ColorInput/ColorSlider.d.ts +3 -0
- package/dist/components/ColorInput/CustomColors.d.ts +15 -0
- package/dist/components/ColorInput/IconColorInput.d.ts +3 -0
- package/dist/components/ColorInput/Picker.d.ts +8 -0
- package/dist/components/ColorInput/__tests__/data.d.ts +8 -0
- package/dist/components/ColorInput/hooks/useColorTrigger.d.ts +13 -0
- package/dist/components/ColorInput/index.d.ts +4 -0
- package/dist/components/ColorInput/intl/index.d.ts +399 -0
- package/dist/components/ColorInput/utils.d.ts +44 -0
- package/dist/components/ColorSwatch/ColorSwatch.css.d.ts +39 -0
- package/dist/components/ColorSwatch/ColorSwatch.d.ts +3 -0
- package/dist/components/ColorSwatch/ColorSwatch.types.d.ts +44 -0
- package/dist/components/ColorSwatch/index.d.ts +2 -0
- package/dist/components/ColorSwatchPicker/ColorSwatchPicker.css.d.ts +2 -0
- package/dist/components/ColorSwatchPicker/ColorSwatchPicker.d.ts +3 -0
- package/dist/components/ColorSwatchPicker/ColorSwatchPicker.types.d.ts +46 -0
- package/dist/components/ColorSwatchPicker/index.d.ts +3 -0
- package/dist/components/ComboBox/ComboBox.css.d.ts +203 -0
- package/dist/components/ComboBox/ComboBox.d.ts +3 -0
- package/dist/components/ComboBox/ComboBox.types.d.ts +96 -0
- package/dist/components/ComboBox/index.d.ts +3 -0
- package/dist/components/ComboBox/useOnValueChange.d.ts +6 -0
- package/dist/components/DateField/DateField.d.ts +6 -0
- package/dist/components/DateField/DateField.types.d.ts +17 -0
- package/dist/components/DateField/index.d.ts +3 -0
- package/dist/components/DateField/intl/index.d.ts +102 -0
- package/dist/components/DateFormat/DateFormat.d.ts +3 -0
- package/dist/components/DateFormat/DateFormat.types.d.ts +5 -0
- package/dist/components/DateFormat/index.d.ts +2 -0
- package/dist/components/DeviceProvider/DeviceProvider.d.ts +6 -0
- package/dist/components/DeviceProvider/DeviceProvider.types.d.ts +12 -0
- package/dist/components/DeviceProvider/index.d.ts +2 -0
- package/dist/components/Dialog/Dialog.css.d.ts +53 -0
- package/dist/components/Dialog/Dialog.d.ts +6 -0
- package/dist/components/Dialog/Dialog.types.d.ts +37 -0
- package/dist/components/Dialog/DialogTitle.d.ts +3 -0
- package/dist/components/Dialog/index.d.ts +3 -0
- package/dist/components/Dialog/useDeferredLabel.d.ts +7 -0
- package/dist/components/Disclosure/Disclosure.css.d.ts +116 -0
- package/dist/components/Disclosure/Disclosure.d.ts +3 -0
- package/dist/components/Disclosure/Disclosure.types.d.ts +30 -0
- package/dist/components/Disclosure/index.d.ts +3 -0
- package/dist/components/DomNodeRenderer/DomNodeRenderer.d.ts +3 -0
- package/dist/components/DomNodeRenderer/DomNodeRenderer.types.d.ts +11 -0
- package/dist/components/DomNodeRenderer/index.d.ts +2 -0
- package/dist/components/Drawer/Drawer.css.d.ts +31 -0
- package/dist/components/Drawer/Drawer.d.ts +3 -0
- package/dist/components/Drawer/Drawer.types.d.ts +24 -0
- package/dist/components/Drawer/index.d.ts +3 -0
- package/dist/components/Editor/Editor.css.d.ts +131 -0
- package/dist/components/Editor/Editor.d.ts +3 -0
- package/dist/components/Editor/Editor.types.d.ts +159 -0
- package/dist/components/Editor/EditorToolbar.d.ts +15 -0
- package/dist/components/Editor/HelpDialog.d.ts +5 -0
- package/dist/components/Editor/RichEditor.d.ts +24 -0
- package/dist/components/Editor/elements/AddLink.d.ts +10 -0
- package/dist/components/Editor/elements/Mention.d.ts +46 -0
- package/dist/components/Editor/elements/Paragraph.d.ts +2 -0
- package/dist/components/Editor/elements/PlainEditor.d.ts +11 -0
- package/dist/components/Editor/index.d.ts +2 -0
- package/dist/components/Editor/utils.d.ts +93 -0
- package/dist/components/FileUpload/FileUpload.css.d.ts +69 -0
- package/dist/components/FileUpload/FileUpload.d.ts +3 -0
- package/dist/components/FileUpload/FileUpload.types.d.ts +38 -0
- package/dist/components/FileUpload/hooks/useFileUpload.d.ts +22 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/FrameProvider/FrameProvider.d.ts +20 -0
- package/dist/components/FrameProvider/FrameProvider.types.d.ts +40 -0
- package/dist/components/FrameProvider/index.d.ts +2 -0
- package/dist/components/FreehandCanvas/FreehandCanvas.css.d.ts +78 -0
- package/dist/components/FreehandCanvas/FreehandCanvas.d.ts +4 -0
- package/dist/components/FreehandCanvas/FreehandCanvas.types.d.ts +116 -0
- package/dist/components/FreehandCanvas/hooks/usePathsData.d.ts +27 -0
- package/dist/components/FreehandCanvas/index.d.ts +2 -0
- package/dist/components/FreehandCanvas/intl/index.d.ts +135 -0
- package/dist/components/GridList/GridList.css.d.ts +22 -0
- package/dist/components/GridList/GridList.d.ts +3 -0
- package/dist/components/GridList/GridList.types.d.ts +84 -0
- package/dist/components/GridList/GridListItem.d.ts +20 -0
- package/dist/components/GridList/index.d.ts +3 -0
- package/dist/components/Group/Group.d.ts +3 -0
- package/dist/components/Group/Group.types.d.ts +19 -0
- package/dist/components/Group/index.d.ts +2 -0
- package/dist/components/I18nProvider/I18Provider.types.d.ts +11 -0
- package/dist/components/I18nProvider/I18nProvider.css.d.ts +1 -0
- package/dist/components/I18nProvider/I18nProvider.d.ts +10 -0
- package/dist/components/I18nProvider/index.d.ts +4 -0
- package/dist/components/Icon/Icon.d.ts +4 -0
- package/dist/components/Icon/Icon.types.d.ts +36 -0
- package/dist/components/Icon/index.d.ts +2 -0
- package/dist/components/ImageDropZone/ImageDropZone.css.d.ts +76 -0
- package/dist/components/ImageDropZone/ImageDropZone.d.ts +3 -0
- package/dist/components/ImageDropZone/ImageDropZone.types.d.ts +50 -0
- package/dist/components/ImageDropZone/index.d.ts +2 -0
- package/dist/components/ImageDropZone/intl/index.d.ts +135 -0
- package/dist/components/ImageGallery/AdaptiveText.d.ts +13 -0
- package/dist/components/ImageGallery/ImageGallery.css.d.ts +86 -0
- package/dist/components/ImageGallery/ImageGallery.d.ts +18 -0
- package/dist/components/ImageGallery/ImageGallery.types.d.ts +130 -0
- package/dist/components/ImageGallery/ImageGalleryDragPreview.d.ts +22 -0
- package/dist/components/ImageGallery/ImageGalleryItem.d.ts +3 -0
- package/dist/components/ImageGallery/index.d.ts +2 -0
- package/dist/components/ImageGallery/utils.d.ts +10 -0
- package/dist/components/InlineAlert/InlineAlert.css.d.ts +214 -0
- package/dist/components/InlineAlert/InlineAlert.d.ts +3 -0
- package/dist/components/InlineAlert/InlineAlert.types.d.ts +38 -0
- package/dist/components/InlineAlert/index.d.ts +2 -0
- package/dist/components/InlineAlert/intl/index.d.ts +102 -0
- package/dist/components/InlineToolbar/InlineToolbar.css.d.ts +50 -0
- package/dist/components/InlineToolbar/InlineToolbar.d.ts +3 -0
- package/dist/components/InlineToolbar/InlineToolbar.types.d.ts +63 -0
- package/dist/components/InlineToolbar/InlineToolbarButton.d.ts +3 -0
- package/dist/components/InlineToolbar/index.d.ts +2 -0
- package/dist/components/Kbd/Kbd.css.d.ts +1 -0
- package/dist/components/Kbd/Kbd.d.ts +3 -0
- package/dist/components/Kbd/Kbd.types.d.ts +21 -0
- package/dist/components/Kbd/index.d.ts +2 -0
- package/dist/components/Link/Link.css.d.ts +41 -0
- package/dist/components/Link/Link.d.ts +3 -0
- package/dist/components/Link/Link.types.d.ts +26 -0
- package/dist/components/Link/index.d.ts +2 -0
- package/dist/components/ListBox/DefaultListOption.d.ts +22 -0
- package/dist/components/ListBox/DropIndicator.d.ts +11 -0
- package/dist/components/ListBox/ListBox.css.d.ts +91 -0
- package/dist/components/ListBox/ListBox.d.ts +6 -0
- package/dist/components/ListBox/ListBox.types.d.ts +104 -0
- package/dist/components/ListBox/ListBoxSection.d.ts +14 -0
- package/dist/components/ListBox/ListOption.d.ts +17 -0
- package/dist/components/ListBox/hooks/useDragAndDrop.d.ts +3 -0
- package/dist/components/ListBox/hooks/useDragAutoScroll.d.ts +5 -0
- package/dist/components/ListBox/hooks/useDragDrop.d.ts +33 -0
- package/dist/components/ListBox/hooks/useSharedList.d.ts +8 -0
- package/dist/components/ListBox/index.d.ts +4 -0
- package/dist/components/Markdown/Markdown.css.d.ts +3 -0
- package/dist/components/Markdown/Markdown.d.ts +3 -0
- package/dist/components/Markdown/Markdown.types.d.ts +7 -0
- package/dist/components/Markdown/index.d.ts +3 -0
- package/dist/components/Menu/Menu.css.d.ts +2 -0
- package/dist/components/Menu/Menu.d.ts +3 -0
- package/dist/components/Menu/Menu.types.d.ts +63 -0
- package/dist/components/Menu/index.d.ts +2 -0
- package/dist/components/MessageFormat/MessageFormat.d.ts +3 -0
- package/dist/components/MessageFormat/MessageFormat.types.d.ts +14 -0
- package/dist/components/MessageFormat/index.d.ts +2 -0
- package/dist/components/Modal/Modal.css.d.ts +39 -0
- package/dist/components/Modal/Modal.d.ts +11 -0
- package/dist/components/Modal/Modal.types.d.ts +70 -0
- package/dist/components/Modal/ModalClose.d.ts +4 -0
- package/dist/components/Modal/ModalContent.d.ts +13 -0
- package/dist/components/Modal/ModalContentCore.d.ts +3 -0
- package/dist/components/Modal/ModalTrigger.d.ts +4 -0
- package/dist/components/Modal/hooks/useDialogPosition.d.ts +13 -0
- package/dist/components/Modal/index.d.ts +5 -0
- package/dist/components/NumberFormat/NumberFormat.d.ts +3 -0
- package/dist/components/NumberFormat/NumberFormat.types.d.ts +5 -0
- package/dist/components/NumberFormat/index.d.ts +2 -0
- package/dist/components/NumberInput/NumberInput.css.d.ts +9 -0
- package/dist/components/NumberInput/NumberInput.d.ts +3 -0
- package/dist/components/NumberInput/NumberInput.types.d.ts +26 -0
- package/dist/components/NumberInput/index.d.ts +2 -0
- package/dist/components/Pagination/Pagination.css.d.ts +84 -0
- package/dist/components/Pagination/Pagination.d.ts +3 -0
- package/dist/components/Pagination/Pagination.types.d.ts +25 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/intl/index.d.ts +201 -0
- package/dist/components/Panel/Panel.css.d.ts +1 -0
- package/dist/components/Panel/Panel.d.ts +2 -0
- package/dist/components/Panel/Panel.types.d.ts +72 -0
- package/dist/components/Panel/PanelContext.d.ts +6 -0
- package/dist/components/Panel/PanelGroup.d.ts +2 -0
- package/dist/components/Panel/PanelResizeHandle.d.ts +5 -0
- package/dist/components/Panel/index.d.ts +4 -0
- package/dist/components/PointPicker/Grid.d.ts +7 -0
- package/dist/components/PointPicker/PointPicker.css.d.ts +37 -0
- package/dist/components/PointPicker/PointPicker.d.ts +22 -0
- package/dist/components/PointPicker/PointPicker.types.d.ts +116 -0
- package/dist/components/PointPicker/PointPickerContent/PointPickerContent.d.ts +3 -0
- package/dist/components/PointPicker/PointPickerContent/PointPickerIndicator.d.ts +8 -0
- package/dist/components/PointPicker/PointPickerContent/hooks/useCoordinatesRelativeToWindow.d.ts +4 -0
- package/dist/components/PointPicker/PointPickerContent/hooks/usePointPickerKeyboard.d.ts +3 -0
- package/dist/components/PointPicker/PointPickerContent/index.d.ts +1 -0
- package/dist/components/PointPicker/PointPickerDisplay/Floater.d.ts +7 -0
- package/dist/components/PointPicker/PointPickerDisplay/MagnifierContent.d.ts +8 -0
- package/dist/components/PointPicker/PointPickerDisplay/PointPickerDisplay.d.ts +3 -0
- package/dist/components/PointPicker/PointPickerDisplay/hooks/useIndicatorWidthObserver.d.ts +1 -0
- package/dist/components/PointPicker/PointPickerDisplay/index.d.ts +1 -0
- package/dist/components/PointPicker/PointsVisualiser/PointsVisualiser.d.ts +11 -0
- package/dist/components/PointPicker/PointsVisualiser/canvasUtils.d.ts +20 -0
- package/dist/components/PointPicker/PointsVisualiser/hooks/usePointProximity.d.ts +12 -0
- package/dist/components/PointPicker/hooks/usePointPicker.d.ts +4 -0
- package/dist/components/PointPicker/index.d.ts +5 -0
- package/dist/components/PointPicker/workers/canvas.worker.d.ts +1 -0
- package/dist/components/PointPicker/workers/pointProximity.worker.d.ts +1 -0
- package/dist/components/Popover/Arrow.d.ts +7 -0
- package/dist/components/Popover/Popover.css.d.ts +55 -0
- package/dist/components/Popover/Popover.d.ts +10 -0
- package/dist/components/Popover/Popover.types.d.ts +133 -0
- package/dist/components/Popover/PopoverContent.d.ts +3 -0
- package/dist/components/Popover/PopoverContentCore.d.ts +7 -0
- package/dist/components/Popover/PopoverTrigger.d.ts +8 -0
- package/dist/components/Popover/hooks/usePopoverScrollReposition.d.ts +22 -0
- package/dist/components/Popover/hooks/usePopoverTransition.d.ts +23 -0
- package/dist/components/Popover/index.d.ts +4 -0
- package/dist/components/Portal/Portal.d.ts +3 -0
- package/dist/components/Portal/Portal.types.d.ts +4 -0
- package/dist/components/Portal/index.d.ts +2 -0
- package/dist/components/PortalContainerProvider/PortalContainerProvider.d.ts +4 -0
- package/dist/components/PortalContainerProvider/PortalContainerProvider.types.d.ts +12 -0
- package/dist/components/PortalContainerProvider/index.d.ts +1 -0
- package/dist/components/Preview/Preview.css.d.ts +50 -0
- package/dist/components/Preview/Preview.d.ts +3 -0
- package/dist/components/Preview/Preview.types.d.ts +59 -0
- package/dist/components/Preview/index.d.ts +2 -0
- package/dist/components/ProgressBar/ProgressBar.css.d.ts +48 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +20 -0
- package/dist/components/ProgressBar/index.d.ts +2 -0
- package/dist/components/ProgressSpinner/ProgressSpinner.css.d.ts +9 -0
- package/dist/components/ProgressSpinner/ProgressSpinner.d.ts +3 -0
- package/dist/components/ProgressSpinner/ProgressSpinner.types.d.ts +16 -0
- package/dist/components/ProgressSpinner/index.d.ts +2 -0
- package/dist/components/RadioGroup/RadioGroup.css.d.ts +26 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +3 -0
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +67 -0
- package/dist/components/RadioGroup/RadioItem.d.ts +11 -0
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/Reaction/Reaction.css.d.ts +74 -0
- package/dist/components/Reaction/Reaction.d.ts +3 -0
- package/dist/components/Reaction/Reaction.types.d.ts +13 -0
- package/dist/components/Reaction/index.d.ts +2 -0
- package/dist/components/ScrollControlButton/ScrollControlButton.css.d.ts +1 -0
- package/dist/components/ScrollControlButton/ScrollControlButton.d.ts +3 -0
- package/dist/components/ScrollControlButton/ScrollControlButton.types.d.ts +31 -0
- package/dist/components/ScrollControlButton/index.d.ts +3 -0
- package/dist/components/SearchInput/SearchInput.css.d.ts +64 -0
- package/dist/components/SearchInput/SearchInput.d.ts +3 -0
- package/dist/components/SearchInput/SearchInput.types.d.ts +27 -0
- package/dist/components/SearchInput/index.d.ts +2 -0
- package/dist/components/Select/IconSelect.d.ts +3 -0
- package/dist/components/Select/Select.css.d.ts +58 -0
- package/dist/components/Select/Select.d.ts +9 -0
- package/dist/components/Select/Select.types.d.ts +87 -0
- package/dist/components/Select/SelectButton.d.ts +3 -0
- package/dist/components/Select/index.d.ts +3 -0
- package/dist/components/Separator/Separator.css.d.ts +19 -0
- package/dist/components/Separator/Separator.d.ts +3 -0
- package/dist/components/Separator/Separator.types.d.ts +12 -0
- package/dist/components/Separator/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.css.d.ts +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +3 -0
- package/dist/components/Skeleton/Skeleton.types.d.ts +7 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Slider/IconSlider.d.ts +3 -0
- package/dist/components/Slider/Slider.css.d.ts +133 -0
- package/dist/components/Slider/Slider.d.ts +3 -0
- package/dist/components/Slider/Slider.types.d.ts +42 -0
- package/dist/components/Slider/index.d.ts +3 -0
- package/dist/components/StatusCard/StatusCard.css.d.ts +87 -0
- package/dist/components/StatusCard/StatusCard.d.ts +10 -0
- package/dist/components/StatusCard/StatusCard.types.d.ts +34 -0
- package/dist/components/StatusCard/index.d.ts +3 -0
- package/dist/components/Switch/Switch.css.d.ts +67 -0
- package/dist/components/Switch/Switch.d.ts +3 -0
- package/dist/components/Switch/Switch.types.d.ts +15 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Table/Table.css.d.ts +111 -0
- package/dist/components/Table/Table.d.ts +8 -0
- package/dist/components/Table/Table.types.d.ts +26 -0
- package/dist/components/Table/hooks/useTableDragAndDrop.d.ts +8 -0
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/Tabs/TabItem.d.ts +3 -0
- package/dist/components/Tabs/TabPanel.d.ts +9 -0
- package/dist/components/Tabs/Tabs.css.d.ts +122 -0
- package/dist/components/Tabs/Tabs.d.ts +3 -0
- package/dist/components/Tabs/Tabs.types.d.ts +66 -0
- package/dist/components/Tabs/TabsBase.d.ts +7 -0
- package/dist/components/Tabs/index.d.ts +3 -0
- package/dist/components/Tag/Tag.css.d.ts +215 -0
- package/dist/components/Tag/Tag.d.ts +3 -0
- package/dist/components/Tag/Tag.types.d.ts +43 -0
- package/dist/components/Tag/TagContext.d.ts +15 -0
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/TagGroup/TagGroup.css.d.ts +1 -0
- package/dist/components/TagGroup/TagGroup.d.ts +3 -0
- package/dist/components/TagGroup/TagGroup.types.d.ts +38 -0
- package/dist/components/TagGroup/index.d.ts +2 -0
- package/dist/components/TaggedPagination/TaggedPagination.css.d.ts +70 -0
- package/dist/components/TaggedPagination/TaggedPagination.d.ts +3 -0
- package/dist/components/TaggedPagination/TaggedPagination.types.d.ts +50 -0
- package/dist/components/TaggedPagination/index.d.ts +2 -0
- package/dist/components/Text/Text.css.d.ts +51 -0
- package/dist/components/Text/Text.d.ts +3 -0
- package/dist/components/Text/Text.types.d.ts +24 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/TextInput/TextInput.css.d.ts +183 -0
- package/dist/components/TextInput/TextInput.d.ts +3 -0
- package/dist/components/TextInput/TextInput.types.d.ts +18 -0
- package/dist/components/TextInput/index.d.ts +2 -0
- package/dist/components/TextInput/utils/getMessage.d.ts +12 -0
- package/dist/components/TextInput/utils/getStatusIcon.d.ts +6 -0
- package/dist/components/ThemeProvider/ThemeProvider.context.d.ts +6 -0
- package/dist/components/ThemeProvider/ThemeProvider.css.d.ts +1 -0
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +3 -0
- package/dist/components/ThemeProvider/ThemeProvider.types.d.ts +29 -0
- package/dist/components/ThemeProvider/hooks/useUserPreferences.d.ts +19 -0
- package/dist/components/ThemeProvider/index.d.ts +6 -0
- package/dist/components/TimeField/DateTimeSegment.d.ts +5 -0
- package/dist/components/TimeField/TimeField.css.d.ts +16 -0
- package/dist/components/TimeField/TimeField.d.ts +3 -0
- package/dist/components/TimeField/TimeField.types.d.ts +6 -0
- package/dist/components/TimeField/index.d.ts +3 -0
- package/dist/components/Toast/Toast.css.d.ts +34 -0
- package/dist/components/Toast/Toast.d.ts +3 -0
- package/dist/components/Toast/Toast.types.d.ts +14 -0
- package/dist/components/Toast/index.d.ts +4 -0
- package/dist/components/ToggleButton/ToggleButton.css.d.ts +74 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +3 -0
- package/dist/components/ToggleButton/ToggleButton.types.d.ts +27 -0
- package/dist/components/ToggleButton/index.d.ts +2 -0
- package/dist/components/ToggleIconButton/ToggleIconButton.css.d.ts +149 -0
- package/dist/components/ToggleIconButton/ToggleIconButton.d.ts +3 -0
- package/dist/components/ToggleIconButton/ToggleIconButton.types.d.ts +30 -0
- package/dist/components/ToggleIconButton/index.d.ts +2 -0
- package/dist/components/Toolbar/CollapsibleToolbar.d.ts +3 -0
- package/dist/components/Toolbar/Toolbar.css.d.ts +2 -0
- package/dist/components/Toolbar/Toolbar.d.ts +3 -0
- package/dist/components/Toolbar/Toolbar.types.d.ts +47 -0
- package/dist/components/Toolbar/WrappedToolbar.d.ts +3 -0
- package/dist/components/Toolbar/hooks/useFormattedList.d.ts +3 -0
- package/dist/components/Toolbar/hooks/useInputAwareToolbar.d.ts +6 -0
- package/dist/components/Toolbar/index.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.css.d.ts +44 -0
- package/dist/components/Tooltip/Tooltip.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.types.d.ts +55 -0
- package/dist/components/Tooltip/TooltipContent.d.ts +15 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/TreeView/TreeItem.d.ts +7 -0
- package/dist/components/TreeView/TreeView.css.d.ts +34 -0
- package/dist/components/TreeView/TreeView.d.ts +8 -0
- package/dist/components/TreeView/TreeView.types.d.ts +95 -0
- package/dist/components/TreeView/index.d.ts +2 -0
- package/dist/components/UNSAFE_ListBox/ListBox.css.d.ts +92 -0
- package/dist/components/UNSAFE_ListBox/ListBox.d.ts +13 -0
- package/dist/components/UNSAFE_ListBox/ListBox.types.d.ts +84 -0
- package/dist/components/UNSAFE_ListBox/ListBoxUI.d.ts +19 -0
- package/dist/components/UNSAFE_ListBox/hooks/useDragAndDrop.d.ts +3 -0
- package/dist/components/UNSAFE_ListBox/index.d.ts +3 -0
- package/dist/components/Virtualizer/LocaleAwareGridLayout.d.ts +17 -0
- package/dist/components/Virtualizer/Virtualizer.types.d.ts +6 -0
- package/dist/components/Virtualizer/index.d.ts +36 -0
- package/dist/components/index.d.ts +81 -0
- package/dist/components/shared/buttons.d.ts +30 -0
- package/dist/components/shared/collection.d.ts +3 -0
- package/dist/components/shared/components/DragPreviewContent.d.ts +12 -0
- package/dist/components/shared/components/IconWithTooltip.d.ts +8 -0
- package/dist/components/shared/components/ListCollectionBuilder.d.ts +9 -0
- package/dist/components/shared/components/OverlayEventLeakPreventionLayer.d.ts +8 -0
- package/dist/components/shared/components/SharedInput/SharedInput.d.ts +3 -0
- package/dist/components/shared/components/SharedInput/SharedInput.types.d.ts +34 -0
- package/dist/components/shared/components/SharedInput/index.d.ts +1 -0
- package/dist/components/shared/tooltips.d.ts +11 -0
- package/dist/components/shared/types/IconComponent.d.ts +21 -0
- package/dist/components/shared/types/List.d.ts +17 -0
- package/dist/hooks/index.d.ts +13 -0
- package/dist/hooks/useDevice.d.ts +20 -0
- package/dist/hooks/useI18n.d.ts +59 -0
- package/dist/hooks/useImage.d.ts +23 -0
- package/dist/hooks/useIntersectionObserver.d.ts +44 -0
- package/dist/hooks/useIsFirstRender.d.ts +21 -0
- package/dist/hooks/useIsTouchDevice.d.ts +7 -0
- package/dist/hooks/useLiveInteractionModality.d.ts +13 -0
- package/dist/hooks/useLocalStorage.d.ts +20 -0
- package/dist/hooks/useMedia.d.ts +13 -0
- package/dist/hooks/useMutationObserver.d.ts +20 -0
- package/dist/hooks/usePortalContainer.d.ts +11 -0
- package/dist/hooks/usePreventFocus.d.ts +23 -0
- package/dist/hooks/useResizeObserver.d.ts +38 -0
- package/dist/hooks/useTextSelection.d.ts +29 -0
- package/dist/hooks/useUndoRedo.d.ts +44 -0
- package/dist/index.d.ts +11 -10074
- package/dist/index.js +12 -12
- package/dist/index.mjs +12 -12
- package/dist/react-aria.d.ts +2 -0
- package/dist/react-stately.d.ts +2 -0
- package/dist/utils/a11y.d.ts +1 -0
- package/dist/utils/classNames.d.ts +17 -0
- package/dist/utils/colors.d.ts +11 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/devWarn.d.ts +1 -0
- package/dist/utils/dom.d.ts +130 -0
- package/dist/utils/index.d.ts +18 -0
- package/dist/utils/invariant.d.ts +18 -0
- package/dist/utils/isInIframe.d.ts +12 -0
- package/dist/utils/isInShadowDOM.d.ts +11 -0
- package/dist/utils/isRect.d.ts +7 -0
- package/dist/utils/keyboards.d.ts +13 -0
- package/dist/utils/math.d.ts +1 -0
- package/dist/utils/objects.d.ts +20 -0
- package/dist/utils/overlays.d.ts +6 -0
- package/dist/utils/reactAriaCompat.d.ts +22 -0
- package/dist/utils/reactAriaComponentsCompat.d.ts +4 -0
- package/dist/utils/resolveAriaLabelAttrs.d.ts +22 -0
- package/dist/utils/resolvePublicUrl.d.ts +1 -0
- package/dist/utils/strings.d.ts +6 -0
- package/dist/utils/style.d.ts +5 -0
- package/dist/utils/styleMixins.css.d.ts +16 -0
- package/dist/utils/svgs.d.ts +15 -0
- package/dist/utils/types/Shared.d.ts +34 -0
- package/dist/utils/validations.d.ts +13 -0
- package/package.json +7 -7
- package/sbom.json +1 -1
- package/dist/index.d.mts +0 -10074
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { StylingProps } from "../../utils";
|
|
2
|
+
import type { ListItem, ListOption, ListSection } from "../shared/types/List";
|
|
3
|
+
import type React from "react";
|
|
4
|
+
import type { AriaListBoxOptions, AriaListBoxProps } from "react-aria";
|
|
5
|
+
import type { ListBoxProps as ComponentListBoxProps, ListBoxItemRenderProps } from "react-aria-components";
|
|
6
|
+
export interface ListHandle {
|
|
7
|
+
/** Scrolls the listbox to the specified item. */
|
|
8
|
+
scrollIntoView: (id: string, options?: ScrollIntoViewOptions) => void;
|
|
9
|
+
/** Imperatively focuses the specified key */
|
|
10
|
+
setFocusedKey: (key: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface UIState {
|
|
13
|
+
isFocusVisible: boolean;
|
|
14
|
+
isSelected: boolean;
|
|
15
|
+
isFocused: boolean;
|
|
16
|
+
isDisabled: boolean;
|
|
17
|
+
isPressed: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface CollectionOptionRenderProps {
|
|
20
|
+
/**
|
|
21
|
+
* The custom render function for the listbox options.
|
|
22
|
+
*
|
|
23
|
+
* @param item ListOption
|
|
24
|
+
* @param options ListBoxItemRenderProps
|
|
25
|
+
*/
|
|
26
|
+
renderOption?: (item: ListOption, options: ListBoxItemRenderProps) => React.ReactNode;
|
|
27
|
+
/** The CSS class name for the option. */
|
|
28
|
+
optionClassName?: string | ((item: ListOption, renderProps: ListBoxItemRenderProps) => string | undefined);
|
|
29
|
+
/** The style of the option. */
|
|
30
|
+
optionStyle?: React.CSSProperties | ((item: ListOption, renderProps: ListBoxItemRenderProps) => React.CSSProperties | undefined);
|
|
31
|
+
}
|
|
32
|
+
export interface CollectionSectionRenderProps {
|
|
33
|
+
/**
|
|
34
|
+
* The custom render function for the listbox sections.
|
|
35
|
+
*
|
|
36
|
+
* @param section ListSection
|
|
37
|
+
*/
|
|
38
|
+
renderSectionHeader?: (section: ListSection) => React.ReactNode;
|
|
39
|
+
/** The CSS class name for the section. */
|
|
40
|
+
sectionClassName?: string | ((section: ListSection) => string | undefined);
|
|
41
|
+
/** The style of the section. */
|
|
42
|
+
sectionStyle?: React.CSSProperties | ((section: ListSection) => React.CSSProperties | undefined);
|
|
43
|
+
/**
|
|
44
|
+
* Whether to show each section title when provided.
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
showSectionHeader?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Wether to add initial padding to section titles if shown.
|
|
51
|
+
*
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
withSectionHeaderPadding?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export type CollectionRenderProps = CollectionOptionRenderProps & CollectionSectionRenderProps;
|
|
57
|
+
export interface UNSAFE_ListBoxProps extends StylingProps, Omit<AriaListBoxProps<ListItem> & AriaListBoxOptions<ListItem>, "children" | "linkBehavior" | "isVirtualized" | "keyboardDelegate" | "items">, Pick<ComponentListBoxProps<ListItem>, "dragAndDropHooks" | "orientation" | "layout">, CollectionRenderProps {
|
|
58
|
+
/**
|
|
59
|
+
* The items to render in the listbox. Items have the following shape:
|
|
60
|
+
*
|
|
61
|
+
* ```ts
|
|
62
|
+
* export type ListOption = {
|
|
63
|
+
* id: string;
|
|
64
|
+
* label: string;
|
|
65
|
+
* description?: string;
|
|
66
|
+
* icon?: React.FC<IconProps>;
|
|
67
|
+
* };
|
|
68
|
+
*
|
|
69
|
+
* export type ListSection = {
|
|
70
|
+
* id: string;
|
|
71
|
+
* title?: string;
|
|
72
|
+
* type: "section";
|
|
73
|
+
* children: ListOption[];
|
|
74
|
+
* };
|
|
75
|
+
*
|
|
76
|
+
* type ListItem = ListOption | ListSection;
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
items?: ListItem[];
|
|
80
|
+
/** The label for the listbox. */
|
|
81
|
+
label?: React.ReactNode;
|
|
82
|
+
/** Handle to access the listbox methods. */
|
|
83
|
+
listBoxHandle?: React.RefObject<ListHandle>;
|
|
84
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ListOption as ListOptionType, ListSection as ListSectionType } from "../shared/types/List";
|
|
3
|
+
import type { CollectionOptionRenderProps, CollectionSectionRenderProps } from "./ListBox.types";
|
|
4
|
+
import type { ListBoxItemRenderProps, MenuItemRenderProps } from "react-aria-components";
|
|
5
|
+
export declare const ListSection: React.ForwardRefExoticComponent<{
|
|
6
|
+
section: ListSectionType;
|
|
7
|
+
componentName?: "ListBox" | "Menu";
|
|
8
|
+
} & CollectionSectionRenderProps & CollectionOptionRenderProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
interface ListOptionProps extends CollectionOptionRenderProps {
|
|
10
|
+
item: ListOptionType;
|
|
11
|
+
componentName?: "ListBox" | "Menu";
|
|
12
|
+
}
|
|
13
|
+
export declare const ListOptionContent: React.FC<(ListBoxItemRenderProps | MenuItemRenderProps) & {
|
|
14
|
+
item: ListOptionType;
|
|
15
|
+
selectionIcon?: "checkmark" | "checkbox";
|
|
16
|
+
componentName?: "ListBox" | "Menu";
|
|
17
|
+
}>;
|
|
18
|
+
export declare const ListOption: React.ForwardRefExoticComponent<ListOptionProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GridLayout } from "react-aria-components";
|
|
2
|
+
import type { GridLayoutOptions } from "@react-stately/layout";
|
|
3
|
+
/**
|
|
4
|
+
* A thin GridLayout subclass that injects the locale direction into layout
|
|
5
|
+
* options via the Virtualizer's `useLayoutOptions` hook.
|
|
6
|
+
*
|
|
7
|
+
* All RTL-aware drop-target logic lives in the patched GridLayout itself — this
|
|
8
|
+
* subclass only bridges React context (useLocale) into the layout engine.
|
|
9
|
+
*
|
|
10
|
+
* TODO: Remove this subclass and the subtree GridLayout patch once the upstream
|
|
11
|
+
* PR is merged: https://github.com/adobe/react-spectrum/pull/9848
|
|
12
|
+
*/
|
|
13
|
+
export declare class LocaleAwareGridLayout extends GridLayout<unknown, GridLayoutOptions> {
|
|
14
|
+
useLayoutOptions(): {
|
|
15
|
+
direction: "ltr" | "rtl";
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ListLayout, Size, TableLayout } from "react-aria-components";
|
|
2
|
+
import { LocaleAwareGridLayout } from "./LocaleAwareGridLayout";
|
|
3
|
+
export { ListLayout, GridLayout, WaterfallLayout, TableLayout, Size, Virtualizer, Autocomplete, type VirtualizerProps, type AutocompleteProps, } from "react-aria-components";
|
|
4
|
+
export { LocaleAwareGridLayout } from "./LocaleAwareGridLayout";
|
|
5
|
+
export declare const VIRTUALIZER_LAYOUT_DEFAULT_OPTIONS: {
|
|
6
|
+
LIST_BOX: {
|
|
7
|
+
layout: typeof ListLayout;
|
|
8
|
+
layoutOptions: {
|
|
9
|
+
rowHeight: number;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
TREE_VIEW: {
|
|
13
|
+
layout: typeof ListLayout;
|
|
14
|
+
layoutOptions: {
|
|
15
|
+
rowHeight: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
IMAGE_GALLERY: {
|
|
19
|
+
layout: typeof LocaleAwareGridLayout;
|
|
20
|
+
layoutOptions: {
|
|
21
|
+
minItemSize: Size;
|
|
22
|
+
maxItemSize: Size;
|
|
23
|
+
dropIndicatorThickness: number;
|
|
24
|
+
maxHorizontalSpace: number;
|
|
25
|
+
minSpace: Size;
|
|
26
|
+
preserveAspectRatio: boolean;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
TABLE: {
|
|
30
|
+
layout: typeof TableLayout;
|
|
31
|
+
layoutOptions: {
|
|
32
|
+
rowHeight: number;
|
|
33
|
+
headingHeight: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export { Autocomplete, type AutocompleteProps } from "react-aria-components";
|
|
2
|
+
export * from "./ListBox";
|
|
3
|
+
export * from "./ActionButton";
|
|
4
|
+
export * from "./DomNodeRenderer";
|
|
5
|
+
export * from "./Slider";
|
|
6
|
+
export * from "./Switch";
|
|
7
|
+
export * from "./SearchInput";
|
|
8
|
+
export * from "./ThemeProvider";
|
|
9
|
+
export * from "./PortalContainerProvider";
|
|
10
|
+
export * from "./Menu";
|
|
11
|
+
export * from "./Link";
|
|
12
|
+
export * from "./FileUpload";
|
|
13
|
+
export * from "./Separator";
|
|
14
|
+
export * from "./ProgressBar";
|
|
15
|
+
export * from "./TextInput";
|
|
16
|
+
export * from "./Reaction";
|
|
17
|
+
export * from "./Tooltip";
|
|
18
|
+
export * from "./Portal";
|
|
19
|
+
export * from "./ProgressSpinner";
|
|
20
|
+
export * from "./ActionIconButton";
|
|
21
|
+
export * from "./ToggleButton";
|
|
22
|
+
export * from "./Calendar";
|
|
23
|
+
export * from "./Checkbox";
|
|
24
|
+
export * from "./Pagination";
|
|
25
|
+
export * from "./I18nProvider";
|
|
26
|
+
export * from "./NumberFormat";
|
|
27
|
+
export * from "./DateFormat";
|
|
28
|
+
export * from "./Tag";
|
|
29
|
+
export * from "./TagGroup";
|
|
30
|
+
export * from "./Accordion";
|
|
31
|
+
export * from "./Select";
|
|
32
|
+
export * from "./Avatar";
|
|
33
|
+
export * from "./Tabs";
|
|
34
|
+
export * from "./InlineAlert";
|
|
35
|
+
export * from "./NumberInput";
|
|
36
|
+
export * from "./Dialog";
|
|
37
|
+
export * from "./ColorInput";
|
|
38
|
+
export * from "./FreehandCanvas";
|
|
39
|
+
export * from "./Text";
|
|
40
|
+
export * from "./ImageDropZone";
|
|
41
|
+
export * from "./Preview";
|
|
42
|
+
export * from "./RadioGroup";
|
|
43
|
+
export * from "./Modal";
|
|
44
|
+
export * from "./MessageFormat";
|
|
45
|
+
export * from "./Group";
|
|
46
|
+
export * from "./Box";
|
|
47
|
+
export * from "./Popover";
|
|
48
|
+
export * from "./Toolbar";
|
|
49
|
+
export * from "./ToggleIconButton";
|
|
50
|
+
export * from "./Editor";
|
|
51
|
+
export * from "./ScrollControlButton";
|
|
52
|
+
export * from "./AlertDialog";
|
|
53
|
+
export * from "./Markdown";
|
|
54
|
+
export * from "./Drawer";
|
|
55
|
+
export * from "./AudioPlayer";
|
|
56
|
+
export * from "./ImageGallery";
|
|
57
|
+
export * from "./ButtonSelect";
|
|
58
|
+
export * from "./ComboBox";
|
|
59
|
+
export * from "./ColorSwatch";
|
|
60
|
+
export * from "./GridList";
|
|
61
|
+
export * from "./ActionGroup";
|
|
62
|
+
export * from "./ColorSwatchPicker";
|
|
63
|
+
export * from "./TimeField";
|
|
64
|
+
export * from "./TreeView";
|
|
65
|
+
export * from "./Panel";
|
|
66
|
+
export * from "./Toast";
|
|
67
|
+
export * from "./FrameProvider";
|
|
68
|
+
export * from "./DateField";
|
|
69
|
+
export * from "./DeviceProvider";
|
|
70
|
+
export * from "./Icon";
|
|
71
|
+
export * from "./TaggedPagination";
|
|
72
|
+
export * from "./PointPicker";
|
|
73
|
+
export * from "./UNSAFE_ListBox";
|
|
74
|
+
export * from "./Virtualizer";
|
|
75
|
+
export * from "./Code";
|
|
76
|
+
export * from "./Disclosure";
|
|
77
|
+
export * from "./StatusCard";
|
|
78
|
+
export * from "./Actionable";
|
|
79
|
+
export * from "./Kbd";
|
|
80
|
+
export * from "./Table";
|
|
81
|
+
export * from "./Skeleton";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { UIStateOptions } from "../ActionButton/ActionButton.types";
|
|
3
|
+
import type { ActionIconButtonProps } from "../ActionIconButton";
|
|
4
|
+
import type { TooltipProps } from "../Tooltip";
|
|
5
|
+
import type { AriaButtonProps, AriaToggleButtonProps } from "react-aria";
|
|
6
|
+
import type { ToggleState } from "react-stately";
|
|
7
|
+
export declare function useButtonTooltipProps({ tooltip, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, }: Pick<ActionIconButtonProps, "tooltip" | "aria-label" | "aria-labelledby">, buttonRef: React.RefObject<HTMLButtonElement>): {
|
|
8
|
+
tooltipProps: TooltipProps | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare const useCustomButton: (props: AriaButtonProps<"button" | "div"> & Pick<ActionIconButtonProps, "tooltip">) => {
|
|
11
|
+
buttonProps: React.ComponentProps<"button" | "div">;
|
|
12
|
+
isPressed: boolean;
|
|
13
|
+
ref: React.RefObject<HTMLButtonElement>;
|
|
14
|
+
tooltipProps?: TooltipProps;
|
|
15
|
+
isFocusVisible: boolean;
|
|
16
|
+
isFocused: boolean;
|
|
17
|
+
isHovered: boolean;
|
|
18
|
+
uiStateOptions: UIStateOptions;
|
|
19
|
+
};
|
|
20
|
+
export declare const useCustomToggleButton: (props: AriaToggleButtonProps<"button" | "div">, state: ToggleState) => {
|
|
21
|
+
buttonProps: React.ComponentProps<"button" | "div">;
|
|
22
|
+
isPressed: boolean;
|
|
23
|
+
ref: React.RefObject<HTMLButtonElement>;
|
|
24
|
+
isFocusVisible: boolean;
|
|
25
|
+
isFocused: boolean;
|
|
26
|
+
isHovered: boolean;
|
|
27
|
+
uiStateOptions: UIStateOptions<{
|
|
28
|
+
isSelected?: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ListItem } from "./types/List";
|
|
2
|
+
export declare function getCollectionChildren<T extends ListItem>(item: T): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function useCollectionChildren<T extends ListItem>(): (item: T) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { DragItem } from "@react-types/shared";
|
|
3
|
+
interface DragPreviewContentProps {
|
|
4
|
+
items: DragItem[];
|
|
5
|
+
containerClassName: string;
|
|
6
|
+
previewClassName: string;
|
|
7
|
+
itemDataAttribute: string;
|
|
8
|
+
showCount?: boolean;
|
|
9
|
+
renderFallback?: (item: DragItem) => React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const DragPreviewContent: React.FC<DragPreviewContentProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ActionIconButtonProps } from "../../ActionIconButton";
|
|
3
|
+
import type { IconProps } from "../../Icon";
|
|
4
|
+
export declare const IconWithTooltip: React.FC<{
|
|
5
|
+
icon: React.FC<IconProps>;
|
|
6
|
+
label: string;
|
|
7
|
+
isFocusable?: boolean;
|
|
8
|
+
} & Pick<ActionIconButtonProps, "tooltip"> & IconProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CollectionRenderProps } from "../../UNSAFE_ListBox/ListBox.types";
|
|
3
|
+
import type { ListItem } from "../types/List";
|
|
4
|
+
import type { BaseCollection } from "@react-aria/collections";
|
|
5
|
+
export declare const ListCollectionBuilder: React.FC<{
|
|
6
|
+
items?: ListItem[];
|
|
7
|
+
children: (collection: BaseCollection<ListItem>) => React.ReactNode;
|
|
8
|
+
listBoxProps?: CollectionRenderProps;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
export declare const OverlayEventLeakPreventionLayer: React.FC<{
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
popoverContentRef: React.RefObject<HTMLDivElement>;
|
|
6
|
+
portalContainer?: HTMLElement;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { StylingProps } from "../../../../utils";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { AriaTextFieldProps } from "react-aria";
|
|
4
|
+
export interface SharedInputProps extends StylingProps, Pick<AriaTextFieldProps, "isReadOnly" | "isDisabled"> {
|
|
5
|
+
/** The state of the input. */
|
|
6
|
+
validationState?: "valid" | "error" | "warning";
|
|
7
|
+
/**
|
|
8
|
+
* The variant of the text input.
|
|
9
|
+
*
|
|
10
|
+
* @default primary
|
|
11
|
+
*/
|
|
12
|
+
variant?: "primary" | "ghost";
|
|
13
|
+
/**
|
|
14
|
+
* The position of the label relative to the input.
|
|
15
|
+
*
|
|
16
|
+
* @default top
|
|
17
|
+
*/
|
|
18
|
+
labelPosition?: "top" | "start";
|
|
19
|
+
/** The props to apply to the label element. */
|
|
20
|
+
labelProps?: React.HTMLAttributes<HTMLLabelElement>;
|
|
21
|
+
/** The props to apply to the input element. */
|
|
22
|
+
fieldProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
23
|
+
/** The message to display below the input. */
|
|
24
|
+
message?: React.ReactNode;
|
|
25
|
+
/** The content to display inside the input wrapper. */
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
/** Whether the input is focused. */
|
|
28
|
+
isFocused?: boolean;
|
|
29
|
+
/** The label to display above the input. */
|
|
30
|
+
label?: React.ReactNode;
|
|
31
|
+
wrapperRef?: React.Ref<HTMLDivElement>;
|
|
32
|
+
wrapperClassName?: string;
|
|
33
|
+
isInvalid?: boolean;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SharedInput";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TooltipProps } from "../Tooltip";
|
|
2
|
+
interface UseSharedTooltipPropsParams extends Partial<TooltipProps> {
|
|
3
|
+
/** The label to display in the tooltip. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Whether to show a tooltip. Accepts a boolean or partial tooltip props. */
|
|
6
|
+
tooltip?: boolean | Partial<Omit<TooltipProps, "children">>;
|
|
7
|
+
}
|
|
8
|
+
export declare const useSharedTooltipProps: ({ label, tooltip, ...rest }: UseSharedTooltipPropsParams) => {
|
|
9
|
+
tooltipProps: TooltipProps | undefined;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ActionIconButtonProps } from "../../ActionIconButton";
|
|
2
|
+
import type { IconProps } from "../../Icon";
|
|
3
|
+
import type React from "react";
|
|
4
|
+
export interface IconComponentProps {
|
|
5
|
+
/** The icon to show at the start of the color input. */
|
|
6
|
+
icon?: React.FC<IconProps>;
|
|
7
|
+
/** The aria label for the color input button. */
|
|
8
|
+
"aria-label": string;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to show the tooltip on the main element.
|
|
11
|
+
*
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
14
|
+
tooltip?: ActionIconButtonProps["tooltip"];
|
|
15
|
+
/**
|
|
16
|
+
* Whether to show the tooltip on the icon.
|
|
17
|
+
*
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
iconTooltip?: ActionIconButtonProps["tooltip"];
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IconProps } from "../../Icon";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
export interface ListOption<T = Record<string, any>> {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: React.FC<IconProps>;
|
|
8
|
+
data?: T;
|
|
9
|
+
}
|
|
10
|
+
export interface ListSection<T = Record<string, any>> {
|
|
11
|
+
id: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
children: ListOption<T>[];
|
|
14
|
+
}
|
|
15
|
+
export type ListItem = ListOption | ListSection;
|
|
16
|
+
export declare function isListOption(item?: ListItem | null): item is ListOption;
|
|
17
|
+
export declare function isListSection(item?: ListItem): item is ListSection;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./useIntersectionObserver";
|
|
2
|
+
export * from "./useResizeObserver";
|
|
3
|
+
export * from "./useImage";
|
|
4
|
+
export * from "./useUndoRedo";
|
|
5
|
+
export * from "./useIsFirstRender";
|
|
6
|
+
export * from "./useI18n";
|
|
7
|
+
export * from "./useMutationObserver";
|
|
8
|
+
export * from "./useLocalStorage";
|
|
9
|
+
export * from "./useTextSelection";
|
|
10
|
+
export * from "./useDevice";
|
|
11
|
+
export * from "./usePortalContainer";
|
|
12
|
+
export * from "./useLiveInteractionModality";
|
|
13
|
+
export * from "./usePreventFocus";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the current device type based on the window width.
|
|
3
|
+
*
|
|
4
|
+
* ```jsx
|
|
5
|
+
* const device = useDevice();
|
|
6
|
+
*
|
|
7
|
+
* if (device === "mobile") {
|
|
8
|
+
* return <MobileComponent />;
|
|
9
|
+
* } else if (device === "tablet") {
|
|
10
|
+
* return <TabletComponent />;
|
|
11
|
+
* } else {
|
|
12
|
+
* return <DesktopComponent />;
|
|
13
|
+
* }
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @param element - The element to use to get the owner window. Defaults to
|
|
17
|
+
* `document.body`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useDevice(element?: Element | null): "mobile" | "tablet" | "desktop";
|
|
20
|
+
export type Device = ReturnType<typeof useDevice>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Locale, LocalizedStrings } from "react-aria";
|
|
2
|
+
/**
|
|
3
|
+
* A hook that provides internationalization functionality. It returns a
|
|
4
|
+
* function to format messages and the current locale.
|
|
5
|
+
*
|
|
6
|
+
* When both a local `messages` object and provider messages (from
|
|
7
|
+
* `I18nProvider`) are present, they are merged per locale: provider messages
|
|
8
|
+
* win on key conflicts, while unmatched local keys are preserved. When only one
|
|
9
|
+
* source is present the behavior is unchanged (backwards compatible).
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { useI18n } from "@baseline-ui/core";
|
|
14
|
+
*
|
|
15
|
+
* const messages = {
|
|
16
|
+
* en: { hello: "Hello" },
|
|
17
|
+
* fr: { hello: "Bonjour" },
|
|
18
|
+
* };
|
|
19
|
+
*
|
|
20
|
+
* const MyComponent = () => {
|
|
21
|
+
* const { formatMessage, locale } = useI18n(messages);
|
|
22
|
+
*
|
|
23
|
+
* return (
|
|
24
|
+
* <div>
|
|
25
|
+
* <p>{formatMessage("hello")}</p>
|
|
26
|
+
* <p>{locale}</p>
|
|
27
|
+
* </div>
|
|
28
|
+
* )};
|
|
29
|
+
* ```;
|
|
30
|
+
*
|
|
31
|
+
* @template T - A type that represents the shape of the translation messages.
|
|
32
|
+
* @param messages - An optional object containing translation messages for
|
|
33
|
+
* different locales. When provider messages (from `I18nProvider`) are also
|
|
34
|
+
* present, local and provider messages are merged per locale — provider
|
|
35
|
+
* values take precedence on key conflicts. If omitted, the hook reads
|
|
36
|
+
* entirely from the provider.
|
|
37
|
+
* @returns {I18nResult<T>} An object containing a function to format messages
|
|
38
|
+
* and the current locale.
|
|
39
|
+
*/
|
|
40
|
+
export declare function useI18n<T extends Record<string, string>>(messages?: Record<string, T>): I18nResult<T>;
|
|
41
|
+
export type MessageFormatter<T> = (id: keyof T | MessageDescriptor, values?: Record<string, any>) => string;
|
|
42
|
+
export interface I18nResult<T extends LocalizedStrings[keyof LocalizedStrings]> {
|
|
43
|
+
formatMessage: MessageFormatter<T>;
|
|
44
|
+
locale: Locale;
|
|
45
|
+
}
|
|
46
|
+
export interface MessageDescriptor {
|
|
47
|
+
id: string;
|
|
48
|
+
defaultMessage?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Defines a set of messages for use with the `useI18n` hook.
|
|
52
|
+
*
|
|
53
|
+
* @param messages An object containing message descriptors.
|
|
54
|
+
* @returns An object containing the message descriptors with their keys as
|
|
55
|
+
* property names.
|
|
56
|
+
*/
|
|
57
|
+
export declare const defineMessages: <T extends Record<string, {
|
|
58
|
+
id: string;
|
|
59
|
+
}>>(messages: T) => T;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A custom hook that loads an image and returns its loading state and props.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```tsx
|
|
6
|
+
* const { isLoaded, hasError, isLoading, imgProps } = useImage({
|
|
7
|
+
* src: "https://via.placeholder.com/150",
|
|
8
|
+
* alt: "Placeholder image",
|
|
9
|
+
* });
|
|
10
|
+
* ```;
|
|
11
|
+
*/
|
|
12
|
+
export declare function useImage({ src, alt }: {
|
|
13
|
+
src?: string;
|
|
14
|
+
alt: string;
|
|
15
|
+
}): {
|
|
16
|
+
isLoaded: boolean;
|
|
17
|
+
hasError: boolean;
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
imgProps: {
|
|
20
|
+
src?: string;
|
|
21
|
+
alt: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A hook that creates an IntersectionObserver and observes a target element.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* import { useIntersectionObserver } from "@baseline-ui/core";
|
|
8
|
+
*
|
|
9
|
+
* const MyComponent = () => {
|
|
10
|
+
* const ref = useRef(null);
|
|
11
|
+
*
|
|
12
|
+
* const onIntersect = (entry) => {
|
|
13
|
+
* console.log(entry);
|
|
14
|
+
* };
|
|
15
|
+
*
|
|
16
|
+
* useIntersectionObserver({ ref, onIntersect });
|
|
17
|
+
*
|
|
18
|
+
* return <div ref={ref}>Hello world</div>;
|
|
19
|
+
* };
|
|
20
|
+
* ```;
|
|
21
|
+
*
|
|
22
|
+
* @param {IntersectionObserverOptions} options - The options for the
|
|
23
|
+
* IntersectionObserver.
|
|
24
|
+
* @param {React.RefObject<HTMLElement>} options.ref - The ref of the target
|
|
25
|
+
* element to observe.
|
|
26
|
+
* @param {(entry: IntersectionObserverEntry) => void} options.onIntersect - The
|
|
27
|
+
* function to call when the target element intersects the root element.
|
|
28
|
+
* @param {boolean} options.isDisabled - Whether the IntersectionObserver should
|
|
29
|
+
* be disabled.
|
|
30
|
+
* @param {number | number[]} options.threshold - The threshold(s) at which to
|
|
31
|
+
* trigger the onIntersect function.
|
|
32
|
+
* @param {string} options.rootMargin - The margin around the root element.
|
|
33
|
+
* @param {React.RefObject<HTMLElement>} options.root - The ref of the root
|
|
34
|
+
* element to observe.
|
|
35
|
+
*/
|
|
36
|
+
export declare function useIntersectionObserver({ ref, onIntersect, isDisabled, threshold, rootMargin, root, }: IntersectionObserverOptions): void;
|
|
37
|
+
export interface IntersectionObserverOptions {
|
|
38
|
+
ref: React.RefObject<HTMLElement>;
|
|
39
|
+
onIntersect: (entry: IntersectionObserverEntry) => void;
|
|
40
|
+
root?: React.RefObject<HTMLElement>;
|
|
41
|
+
rootMargin?: string;
|
|
42
|
+
threshold?: number;
|
|
43
|
+
isDisabled?: boolean;
|
|
44
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This hook returns true if the component is being rendered for the first time.
|
|
3
|
+
* This is useful for avoiding side effects on the first render inside of
|
|
4
|
+
* useEffect.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const isFirstRender = useIsFirstRender();
|
|
9
|
+
*
|
|
10
|
+
* useEffect(() => {
|
|
11
|
+
* if (isFirstRender) return;
|
|
12
|
+
* // do something
|
|
13
|
+
* return () => {
|
|
14
|
+
* // do something on unmount
|
|
15
|
+
* };
|
|
16
|
+
* }, [isFirstRender]);
|
|
17
|
+
* ```;
|
|
18
|
+
*
|
|
19
|
+
* @returns Whether or not the component is being rendered for the first time
|
|
20
|
+
*/
|
|
21
|
+
export declare function useIsFirstRender(): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This hook is used to get the live interaction modality of the user. It is
|
|
3
|
+
* useful for components that need to know the interaction modality of the user
|
|
4
|
+
* in real time. This is different from the `useInteractionModality` hook, which
|
|
5
|
+
* changes modality when a significant event occurs, such as clicking or
|
|
6
|
+
* pressing a key. It does not change when the user is moving the mouse.
|
|
7
|
+
*
|
|
8
|
+
* @param ownerDocument - The owner document to listen to.
|
|
9
|
+
* @returns The live interaction modality of the user.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useLiveInteractionModality({ ownerDocument, }: {
|
|
12
|
+
ownerDocument?: Document;
|
|
13
|
+
}): "pointer" | "keyboard";
|