@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,91 @@
|
|
|
1
|
+
export declare const listBoxSectionLiCn: string;
|
|
2
|
+
export declare const listBoxOptionCn: ((options?: {
|
|
3
|
+
isSelected?: undefined;
|
|
4
|
+
isFocused?: boolean | undefined;
|
|
5
|
+
isHovered?: boolean | undefined;
|
|
6
|
+
isFirstChild?: boolean | undefined;
|
|
7
|
+
isLastChild?: boolean | undefined;
|
|
8
|
+
isDisabled?: boolean | undefined;
|
|
9
|
+
} | undefined) => string) & {
|
|
10
|
+
variants: () => ("isSelected" | "isFocused" | "isHovered" | "isFirstChild" | "isLastChild" | "isDisabled")[];
|
|
11
|
+
classNames: import("@baseline-ui/css").RecipeClassNames<{
|
|
12
|
+
isSelected: {};
|
|
13
|
+
isFocused: {
|
|
14
|
+
true: {
|
|
15
|
+
"__@@Component_Sprinkles__": boolean;
|
|
16
|
+
baseSprinkles: string;
|
|
17
|
+
variantSprinkles: string;
|
|
18
|
+
compoundVariantSprinkles: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
isHovered: {
|
|
22
|
+
true: {
|
|
23
|
+
"__@@Component_Sprinkles__": boolean;
|
|
24
|
+
baseSprinkles: string;
|
|
25
|
+
variantSprinkles: string;
|
|
26
|
+
compoundVariantSprinkles: string;
|
|
27
|
+
};
|
|
28
|
+
false: {
|
|
29
|
+
"__@@Component_Sprinkles__": boolean;
|
|
30
|
+
baseSprinkles: string;
|
|
31
|
+
variantSprinkles: string;
|
|
32
|
+
compoundVariantSprinkles: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
isFirstChild: {
|
|
36
|
+
true: {
|
|
37
|
+
borderTopWidth: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
isLastChild: {
|
|
41
|
+
true: {
|
|
42
|
+
borderBottomWidth: number;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
isDisabled: {
|
|
46
|
+
true: (string | {
|
|
47
|
+
"__@@Component_Sprinkles__": boolean;
|
|
48
|
+
baseSprinkles: string;
|
|
49
|
+
variantSprinkles: string;
|
|
50
|
+
compoundVariantSprinkles: string;
|
|
51
|
+
})[];
|
|
52
|
+
};
|
|
53
|
+
}>;
|
|
54
|
+
};
|
|
55
|
+
export declare const listBoxCn: string;
|
|
56
|
+
export declare const listBoxHelperTextCn: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
57
|
+
isDisabled: {
|
|
58
|
+
true: string;
|
|
59
|
+
};
|
|
60
|
+
}>;
|
|
61
|
+
export declare const dropIndicatorCn: ((options?: {
|
|
62
|
+
isDropTarget?: boolean | undefined;
|
|
63
|
+
orientation?: "horizontal" | "vertical" | undefined;
|
|
64
|
+
} | undefined) => string) & {
|
|
65
|
+
variants: () => ("isDropTarget" | "orientation")[];
|
|
66
|
+
classNames: import("@baseline-ui/css").RecipeClassNames<{
|
|
67
|
+
isDropTarget: {
|
|
68
|
+
true: {
|
|
69
|
+
"__@@Component_Sprinkles__": boolean;
|
|
70
|
+
baseSprinkles: string;
|
|
71
|
+
variantSprinkles: string;
|
|
72
|
+
compoundVariantSprinkles: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
orientation: {
|
|
76
|
+
vertical: {
|
|
77
|
+
"__@@Component_Sprinkles__": boolean;
|
|
78
|
+
baseSprinkles: string;
|
|
79
|
+
variantSprinkles: string;
|
|
80
|
+
compoundVariantSprinkles: string;
|
|
81
|
+
};
|
|
82
|
+
horizontal: {
|
|
83
|
+
"__@@Component_Sprinkles__": boolean;
|
|
84
|
+
baseSprinkles: string;
|
|
85
|
+
variantSprinkles: string;
|
|
86
|
+
compoundVariantSprinkles: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
}>;
|
|
90
|
+
};
|
|
91
|
+
export declare const listBoxSectionHeaderCn: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ListItem } from "../shared/types/List";
|
|
3
|
+
import type { ListBoxProps } from "./ListBox.types";
|
|
4
|
+
import type { ComboBoxState, ListState } from "react-stately";
|
|
5
|
+
export declare const ListBoxContext: React.Context<ListState<ListItem> | ComboBoxState<ListItem, "single"> | null>;
|
|
6
|
+
export declare const ListBox: React.ForwardRefExoticComponent<ListBoxProps & React.RefAttributes<HTMLUListElement>>;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { StylingProps } from "../../utils";
|
|
2
|
+
import type { ListItem, ListOption, ListSection } from "../shared/types/List";
|
|
3
|
+
import type { DragAndDropProps } from "./hooks/useDragDrop";
|
|
4
|
+
import type { DragItem, Node } from "@react-types/shared";
|
|
5
|
+
import type React from "react";
|
|
6
|
+
import type { AriaListBoxOptions, AriaListBoxProps, OptionAria } from "react-aria";
|
|
7
|
+
import type { ListState, Orientation } from "react-stately";
|
|
8
|
+
export interface ListHandle {
|
|
9
|
+
/** Scrolls the listbox to the specified item. */
|
|
10
|
+
scrollIntoView: (id: string, options?: ScrollIntoViewOptions) => void;
|
|
11
|
+
/** Imperatively focuses the specified key */
|
|
12
|
+
setFocusedKey: (key: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface UIState {
|
|
15
|
+
isFocusVisible: boolean;
|
|
16
|
+
isSelected: boolean;
|
|
17
|
+
isFocused: boolean;
|
|
18
|
+
isDisabled: boolean;
|
|
19
|
+
isPressed: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface ListBoxProps extends StylingProps, Omit<AriaListBoxProps<ListItem> & AriaListBoxOptions<ListItem>, "children" | "linkBehavior" | "isVirtualized" | "keyboardDelegate" | "items">, Omit<DragAndDropProps, "preview" | "enableReorder" | "orientation" | "layout">, Partial<Pick<DragAndDropProps, "enableReorder" | "orientation" | "layout">> {
|
|
22
|
+
/**
|
|
23
|
+
* The items to render in the listbox. Items have the following shape:
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* export type ListOption = {
|
|
27
|
+
* id: string;
|
|
28
|
+
* label: string;
|
|
29
|
+
* description?: string;
|
|
30
|
+
* icon?: React.FC<IconProps>;
|
|
31
|
+
* };
|
|
32
|
+
*
|
|
33
|
+
* export type ListSection = {
|
|
34
|
+
* id: string;
|
|
35
|
+
* title?: string;
|
|
36
|
+
* type: "section";
|
|
37
|
+
* children: ListOption[];
|
|
38
|
+
* };
|
|
39
|
+
*
|
|
40
|
+
* type ListItem = ListOption | ListSection;
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
items?: ListItem[];
|
|
44
|
+
/**
|
|
45
|
+
* The custom render function for the listbox options.
|
|
46
|
+
*
|
|
47
|
+
* @param item Node<ListItem>
|
|
48
|
+
* @param options [OptionAria]()
|
|
49
|
+
* @param ref React.RefObject<HTMLLIElement>
|
|
50
|
+
*/
|
|
51
|
+
renderOption?: (item: Node<ListItem>, options: OptionAria & {
|
|
52
|
+
showSelectedIcon?: boolean;
|
|
53
|
+
_state: ListState<ListItem>;
|
|
54
|
+
}, ref: React.Ref<HTMLLIElement>) => React.ReactNode;
|
|
55
|
+
/** Renders the drop indicator component. */
|
|
56
|
+
renderDropIndicator?: (options: {
|
|
57
|
+
dropIndicatorProps: React.HTMLAttributes<HTMLLIElement>;
|
|
58
|
+
isDropTarget: boolean;
|
|
59
|
+
isHidden: boolean;
|
|
60
|
+
orientation: Orientation;
|
|
61
|
+
}, ref: React.RefObject<HTMLLIElement>) => React.ReactNode;
|
|
62
|
+
/**
|
|
63
|
+
* The custom render function for the drag preview. This can be used to render
|
|
64
|
+
* a custom drag preview when dragging items.
|
|
65
|
+
*/
|
|
66
|
+
renderDragPreview?: (items: DragItem[]) => React.JSX.Element;
|
|
67
|
+
/**
|
|
68
|
+
* The custom render function for the listbox sections.
|
|
69
|
+
*
|
|
70
|
+
* @param section ListSection
|
|
71
|
+
* @param ref React.RefObject<HTMLDivElement>
|
|
72
|
+
*/
|
|
73
|
+
renderSectionHeader?: (section: Node<ListItem>, ref: React.Ref<HTMLSpanElement>) => React.ReactNode;
|
|
74
|
+
/** Whether to show the selected checkmark icon. */
|
|
75
|
+
showSelectedIcon?: boolean;
|
|
76
|
+
/** The label for the listbox. */
|
|
77
|
+
label?: React.ReactNode;
|
|
78
|
+
/** The CSS class name for the drop indicator. */
|
|
79
|
+
dropIndicatorClassName?: string;
|
|
80
|
+
/** The style of the drop indicator used in a component. */
|
|
81
|
+
dropIndicatorStyle?: React.CSSProperties;
|
|
82
|
+
/** The CSS class name for the option. */
|
|
83
|
+
optionClassName?: string | ((item: ListOption, state: UIState) => string | undefined);
|
|
84
|
+
/** The CSS class name for the section. */
|
|
85
|
+
sectionClassName?: string | ((item: ListSection) => string | undefined);
|
|
86
|
+
/** The style of the option. */
|
|
87
|
+
optionStyle?: React.CSSProperties | ((item: ListOption, state: UIState) => React.CSSProperties | undefined);
|
|
88
|
+
/** The style of the section. */
|
|
89
|
+
sectionStyle?: React.CSSProperties | ((item: ListSection) => React.CSSProperties | undefined);
|
|
90
|
+
/**
|
|
91
|
+
* Whether to show each section title when provided.
|
|
92
|
+
*
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
95
|
+
showSectionHeader?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Wether to add initial padding to section titles if shown.
|
|
98
|
+
*
|
|
99
|
+
* @default false
|
|
100
|
+
*/
|
|
101
|
+
withSectionHeaderPadding?: boolean;
|
|
102
|
+
/** Handle to access the listbox methods. */
|
|
103
|
+
listBoxHandle?: React.RefObject<ListHandle>;
|
|
104
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ListItem } from "../shared/types/List";
|
|
3
|
+
import type { ListBoxProps } from "./ListBox.types";
|
|
4
|
+
import type { ListOptionProps } from "./ListOption";
|
|
5
|
+
import type { Node } from "@react-types/shared";
|
|
6
|
+
export declare const ListBoxSection: React.FC<ListBoxSectionProps>;
|
|
7
|
+
interface ListBoxSectionProps extends Pick<ListOptionProps, "state" | "dragState" | "dropState" | "renderOption" | "renderDropIndicator" | "dropIndicatorStyle" | "dropIndicatorClassName">, Pick<ListBoxProps, "sectionStyle" | "sectionClassName"> {
|
|
8
|
+
section: Node<ListItem>;
|
|
9
|
+
showSelectedIcon?: boolean;
|
|
10
|
+
showSectionHeader?: boolean;
|
|
11
|
+
renderSectionHeader?: (section: Node<ListItem>, ref: React.Ref<HTMLSpanElement>) => React.ReactNode;
|
|
12
|
+
withSectionHeaderPadding?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ListItem } from "../shared/types/List";
|
|
3
|
+
import type { ListBoxProps } from "./ListBox.types";
|
|
4
|
+
import type { Node } from "@react-types/shared";
|
|
5
|
+
import type { DraggableCollectionState, DroppableCollectionState, ListState } from "react-stately";
|
|
6
|
+
export declare const DraggableListOption: React.FC<DraggableListOptionProps>;
|
|
7
|
+
export declare const ListOption: React.ForwardRefExoticComponent<ListOptionProps & React.RefAttributes<HTMLLIElement>>;
|
|
8
|
+
export interface ListOptionProps extends Pick<ListBoxProps, "renderOption" | "renderDropIndicator" | "showSelectedIcon" | "orientation" | "dropIndicatorStyle" | "dropIndicatorClassName" | "optionClassName" | "optionStyle"> {
|
|
9
|
+
item: Node<ListItem>;
|
|
10
|
+
state: ListState<ListItem>;
|
|
11
|
+
dropState?: DroppableCollectionState;
|
|
12
|
+
dragState?: DraggableCollectionState;
|
|
13
|
+
}
|
|
14
|
+
type DraggableListOptionProps = ListOptionProps & {
|
|
15
|
+
children: (dragProps: React.HTMLAttributes<HTMLElement>) => React.ReactNode;
|
|
16
|
+
} & Required<Pick<ListOptionProps, "dropState" | "dragState">>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useDroppableCollection } from "react-aria";
|
|
2
|
+
import type { ListItem } from "../../shared/types/List";
|
|
3
|
+
import type React from "react";
|
|
4
|
+
import type { DroppableCollectionOptions } from "react-aria";
|
|
5
|
+
import type { DraggableCollectionState, DraggableCollectionStateOptions, DroppableCollectionState, DroppableCollectionStateOptions, ListState, Orientation } from "react-stately";
|
|
6
|
+
interface UseDragDropResult {
|
|
7
|
+
collectionProps: ReturnType<typeof useDroppableCollection>["collectionProps"];
|
|
8
|
+
dragState: DraggableCollectionState;
|
|
9
|
+
dropState: DroppableCollectionState;
|
|
10
|
+
}
|
|
11
|
+
export declare function useDragDrop(props: DragAndDropProps, state: ListState<ListItem>, ref: React.RefObject<HTMLUListElement>): UseDragDropResult;
|
|
12
|
+
export type DragAndDropProps = Omit<DraggableCollectionStateOptions & DroppableCollectionOptions & DroppableCollectionStateOptions, "keyboardDelegate" | "dropTargetDelegate" | "shouldAcceptItemDrop" | "onDropEnter" | "onDropActivate" | "onDropExit" | "getDropOperation" | "collection" | "selectionManager" | "onRootDrop" | "onInsert" | "getAllowedDropOperations" | "getItems" | "onItemDrop"> & Partial<Pick<DraggableCollectionStateOptions, "getItems">> & {
|
|
13
|
+
/**
|
|
14
|
+
* Indicates whether reordering is enabled.
|
|
15
|
+
*
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
enableReorder: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the items are arranged in a stack or grid.
|
|
21
|
+
*
|
|
22
|
+
* @default stack
|
|
23
|
+
*/
|
|
24
|
+
layout: "grid" | "stack";
|
|
25
|
+
/**
|
|
26
|
+
* The primary orientation of the items. Usually this is the direction that
|
|
27
|
+
* the collection scrolls.
|
|
28
|
+
*
|
|
29
|
+
* @default vertical
|
|
30
|
+
*/
|
|
31
|
+
orientation: Orientation;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ListItem } from "../../shared/types/List";
|
|
2
|
+
import type { ListHandle } from "../ListBox.types";
|
|
3
|
+
import type React from "react";
|
|
4
|
+
import type { ListState } from "react-stately";
|
|
5
|
+
export declare function useSharedList({ type, handle, }: {
|
|
6
|
+
type?: "listbox" | "gridlist";
|
|
7
|
+
handle?: React.RefObject<ListHandle>;
|
|
8
|
+
}, state: ListState<ListItem>, ref: React.RefObject<HTMLUListElement>): void;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ActionButtonProps } from "../ActionButton";
|
|
2
|
+
import type { PopoverContentProps } from "../Popover";
|
|
3
|
+
import type { ListOption, ListSection } from "../shared/types/List";
|
|
4
|
+
import type React from "react";
|
|
5
|
+
import type { AriaMenuProps, AriaMenuTriggerProps } from "react-aria";
|
|
6
|
+
import type { MenuTriggerProps } from "react-stately";
|
|
7
|
+
export type MenuOption = Omit<ListOption, "description"> & {
|
|
8
|
+
keyboardShortcut?: string;
|
|
9
|
+
};
|
|
10
|
+
export type MenuSection = Omit<ListSection, "children"> & {
|
|
11
|
+
children: MenuOption[];
|
|
12
|
+
};
|
|
13
|
+
export type MenuItem = MenuOption | MenuSection;
|
|
14
|
+
export type MenuPopoverProps = Pick<PopoverContentProps, "isNonModal" | "placement" | "shouldUpdatePosition" | "shouldFlip" | "boundaryElement" | "boundaryAxis" | "horizontalBoundaryBehavior" | "crossOffset" | "offset" | "portalContainer">;
|
|
15
|
+
export interface MenuProps extends MenuPopoverProps, MenuTriggerProps, Omit<AriaMenuProps<MenuItem>, "children">, Omit<AriaMenuTriggerProps, "type"> {
|
|
16
|
+
/** The `className` property assigned to the root element of the component. */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** The `className` property assigned to the content element of the component. */
|
|
19
|
+
contentClassName?: string;
|
|
20
|
+
/** The `className` property assigned to the item element of the component. */
|
|
21
|
+
itemClassName?: string;
|
|
22
|
+
/**
|
|
23
|
+
* A list of items to render in the menu. Items have the following shape:
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* export type MenuOption = {
|
|
27
|
+
* id: string;
|
|
28
|
+
* label: string;
|
|
29
|
+
* keyboardShortcut?: string;
|
|
30
|
+
* icon?: React.FC<IconProps>;
|
|
31
|
+
* };
|
|
32
|
+
*
|
|
33
|
+
* export type MenuSection = {
|
|
34
|
+
* id: string;
|
|
35
|
+
* title?: string;
|
|
36
|
+
* type: "section";
|
|
37
|
+
* children: MenuOption[];
|
|
38
|
+
* };
|
|
39
|
+
*
|
|
40
|
+
* export type MenuItem = MenuOption | MenuSection;
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
items: MenuItem[];
|
|
44
|
+
/**
|
|
45
|
+
* A function that renders the trigger element of the component. The default
|
|
46
|
+
* implementation renders an `ActionButton` component.
|
|
47
|
+
*
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <Menu renderTrigger={({ buttonProps, ref }) => <ActionButton {...buttonProps} label="Label" ref={ref} />
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
renderTrigger?: (options: {
|
|
53
|
+
buttonProps: ActionButtonProps & {
|
|
54
|
+
isOpen: boolean;
|
|
55
|
+
};
|
|
56
|
+
ref: React.RefObject<HTMLButtonElement>;
|
|
57
|
+
}) => React.ReactNode;
|
|
58
|
+
/**
|
|
59
|
+
* The label of the trigger element. This can be a string, a React node, or a
|
|
60
|
+
* function that accepts a boolean indicating whether the menu is open.
|
|
61
|
+
*/
|
|
62
|
+
triggerLabel?: React.ReactNode | ((isOpen: boolean) => React.ReactNode);
|
|
63
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
export interface MessageFormatProps {
|
|
3
|
+
/**
|
|
4
|
+
* By default `<MessageFormat>` will render the formatted string into a
|
|
5
|
+
* `<React.Fragment>`. If you need to customize rendering, you can either wrap
|
|
6
|
+
* it with another React element (recommended), specify a different tagName
|
|
7
|
+
* (e.g., 'div')
|
|
8
|
+
*/
|
|
9
|
+
elementType?: React.ElementType | "div" | "span";
|
|
10
|
+
/** The id of the message to format. */
|
|
11
|
+
id: string;
|
|
12
|
+
/** The default message to use if the message id is not found. */
|
|
13
|
+
defaultMessage?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const underlayCn: ((options?: {
|
|
2
|
+
shouldContainOverlays?: boolean | undefined;
|
|
3
|
+
} | undefined) => string) & {
|
|
4
|
+
variants: () => "shouldContainOverlays"[];
|
|
5
|
+
classNames: import("@baseline-ui/css").RecipeClassNames<{
|
|
6
|
+
shouldContainOverlays: {
|
|
7
|
+
true: {
|
|
8
|
+
position: "absolute";
|
|
9
|
+
};
|
|
10
|
+
false: {
|
|
11
|
+
position: "fixed";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
16
|
+
export declare const modalContentContainerCn: ((options?: {
|
|
17
|
+
enableDrawer?: boolean | undefined;
|
|
18
|
+
shouldContainOverlays?: boolean | undefined;
|
|
19
|
+
} | undefined) => string) & {
|
|
20
|
+
variants: () => ("shouldContainOverlays" | "enableDrawer")[];
|
|
21
|
+
classNames: import("@baseline-ui/css").RecipeClassNames<{
|
|
22
|
+
enableDrawer: {
|
|
23
|
+
false: string;
|
|
24
|
+
true: {
|
|
25
|
+
alignItems: "flex-end";
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
shouldContainOverlays: {
|
|
29
|
+
true: {
|
|
30
|
+
position: "absolute";
|
|
31
|
+
};
|
|
32
|
+
false: {
|
|
33
|
+
position: "fixed";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
export declare const modalContentCn: string;
|
|
39
|
+
export declare const drawerModalContentCn: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ModalProps } from "./Modal.types";
|
|
3
|
+
import type { DOMProps } from "@react-types/shared";
|
|
4
|
+
import type { AriaButtonProps } from "react-aria";
|
|
5
|
+
import type { OverlayTriggerState } from "react-stately";
|
|
6
|
+
export declare const ModalContext: React.Context<{
|
|
7
|
+
state: OverlayTriggerState | null;
|
|
8
|
+
triggerProps: AriaButtonProps<"button">;
|
|
9
|
+
overlayProps?: DOMProps;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const Modal: React.FC<ModalProps>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { StylingProps } from "../../utils";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { AriaModalOverlayProps, OverlayProps } from "react-aria";
|
|
4
|
+
import type { OverlayTriggerProps, OverlayTriggerState } from "react-stately";
|
|
5
|
+
export interface ModalProps extends OverlayTriggerProps {
|
|
6
|
+
/** The contents of the modal. */
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface ModalContentProps extends Omit<AriaModalOverlayProps, "isDismissable" | "isKeyboardDismissDisabled" | "root" | "shouldUseInert">, Pick<OverlayProps, "disableFocusManagement">, StylingProps {
|
|
10
|
+
/**
|
|
11
|
+
* The contents of the modal. Can be a React node or a function that returns a
|
|
12
|
+
* React node.
|
|
13
|
+
*/
|
|
14
|
+
children: React.ReactNode | ((props: OverlayTriggerState) => React.ReactNode);
|
|
15
|
+
/**
|
|
16
|
+
* The container element for the modal. By default, the modal is rendered as a
|
|
17
|
+
* child of the body element.
|
|
18
|
+
*
|
|
19
|
+
* @default document.body
|
|
20
|
+
*/
|
|
21
|
+
portalContainer?: HTMLElement;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to disable the animation for the modal. This is useful when you
|
|
24
|
+
* want to render one modal after another without the animation.
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
disableAnimation?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the modal should be rendered with the initial animation. If set to
|
|
31
|
+
* false, the modal will be rendered without the initial animation on mount.
|
|
32
|
+
* This doesn't affect the animation when the modal is is being opened or
|
|
33
|
+
* closed after it has been mounted. This prop is ignored if
|
|
34
|
+
* `disableAnimation` is set to `true`.
|
|
35
|
+
*
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
shouldAnimateOnMount?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the modal should be rendered as a drawer. This will render the
|
|
41
|
+
* modal with a transparent background and no border at the bottom. The `auto`
|
|
42
|
+
* value will render the modal as a drawer on mobile and as a dialog on
|
|
43
|
+
* desktop and tablet.
|
|
44
|
+
*
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
enableDrawer?: boolean | "auto";
|
|
48
|
+
/**
|
|
49
|
+
* Specifies if the component is dismissable or not. If the value is a
|
|
50
|
+
* function, it will be called with a boolean indicating if the modal is
|
|
51
|
+
* rendered as a drawer or not.
|
|
52
|
+
*
|
|
53
|
+
* @default true
|
|
54
|
+
*/
|
|
55
|
+
isDismissable?: boolean | ((isDrawer: boolean) => boolean);
|
|
56
|
+
/**
|
|
57
|
+
* Determines if keyboard dismissal is disabled. If the value is a function,
|
|
58
|
+
* it will be called with a boolean indicating if the modal is rendered as a
|
|
59
|
+
* drawer or not.
|
|
60
|
+
*
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
isKeyboardDismissDisabled?: boolean | ((isDrawer: boolean) => boolean);
|
|
64
|
+
/**
|
|
65
|
+
* Whether to enable inertia for the modal.
|
|
66
|
+
*
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
UNSAFE_enableInert?: boolean | ((isDrawer: boolean) => boolean);
|
|
70
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ModalContentProps } from "./Modal.types";
|
|
3
|
+
export declare const ModalDialogContext: React.Context<{
|
|
4
|
+
isDrawer: boolean;
|
|
5
|
+
closeDrawer: () => void;
|
|
6
|
+
dialogStyle: React.CSSProperties;
|
|
7
|
+
setDialogElement: (element: HTMLDivElement | null) => void;
|
|
8
|
+
isWithinModal: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const ModalContentContext: React.Context<{
|
|
11
|
+
setIsPopoverSafelyClosed: (value: boolean) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const ModalContent: React.ForwardRefExoticComponent<ModalContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This hook is used to get the position of the drawer when the keyboard is
|
|
4
|
+
* visible on mobile devices.
|
|
5
|
+
*
|
|
6
|
+
* @param element - The dialog container.
|
|
7
|
+
* @param shouldUseDrawer - Whether the drawer is enabled.
|
|
8
|
+
* @returns The position of the dialog.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useDialogPosition(element: HTMLDivElement | null, shouldUseDrawer: boolean, shouldHandleVirtualKeyboard: boolean): {
|
|
11
|
+
dialogStyle: React.CSSProperties;
|
|
12
|
+
containerStyle: React.CSSProperties;
|
|
13
|
+
};
|