@webiny/admin-ui 0.0.0-unstable.7be00a75a9 → 0.0.0-unstable.7c2def32a7
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/Accordion/Accordion.d.ts +7 -6
- package/Accordion/Accordion.stories.d.ts +1 -1
- package/Accordion/Accordion.stories.js.map +1 -1
- package/Accordion/components/AccordionContent.js +4 -1
- package/Accordion/components/AccordionContent.js.map +1 -1
- package/Accordion/components/AccordionItem.d.ts +8 -6
- package/Accordion/components/AccordionItem.js.map +1 -1
- package/Accordion/components/AccordionItemAction.d.ts +7 -6
- package/Accordion/components/AccordionItemDragHandle.d.ts +2 -1
- package/Accordion/components/AccordionItemDragHandle.js +2 -1
- package/Accordion/components/AccordionItemDragHandle.js.map +1 -1
- package/Accordion/components/AccordionItemIcon.d.ts +7 -6
- package/Accordion/components/AccordionItemSeparator.d.ts +7 -6
- package/Accordion/components/AccordionTrigger.js +4 -2
- package/Accordion/components/AccordionTrigger.js.map +1 -1
- package/Alert/Alert.d.ts +21 -19
- package/Alert/Alert.stories.d.ts +1 -1
- package/Alert/Alert.stories.js.map +1 -1
- package/AutoComplete/AutoComplete.d.ts +7 -6
- package/AutoComplete/AutoComplete.stories.d.ts +1 -1
- package/AutoComplete/AutoComplete.stories.js.map +1 -1
- package/AutoComplete/primitives/AutoCompletePrimitive.d.ts +13 -6
- package/AutoComplete/primitives/AutoCompletePrimitive.js +1 -0
- package/AutoComplete/primitives/AutoCompletePrimitive.js.map +1 -1
- package/AutoComplete/primitives/AutoCompletePrimitive.stories.d.ts +1 -1
- package/AutoComplete/primitives/AutoCompletePrimitive.stories.js.map +1 -1
- package/Avatar/Avatar.d.ts +9 -8
- package/Avatar/Avatar.stories.d.ts +1 -1
- package/Avatar/Avatar.stories.js.map +1 -1
- package/Avatar/components/AvatarFallback.d.ts +7 -6
- package/Avatar/components/AvatarImage.d.ts +7 -6
- package/BetaBadge/BetaBadge.d.ts +6 -0
- package/BetaBadge/BetaBadge.js +7 -0
- package/BetaBadge/BetaBadge.js.map +1 -0
- package/Breadcrumbs/Breadcrumbs.d.ts +54 -0
- package/Breadcrumbs/Breadcrumbs.js +66 -0
- package/Breadcrumbs/Breadcrumbs.js.map +1 -0
- package/Breadcrumbs/Breadcrumbs.stories.d.ts +9 -0
- package/Breadcrumbs/Breadcrumbs.stories.js +71 -0
- package/Breadcrumbs/Breadcrumbs.stories.js.map +1 -0
- package/Breadcrumbs/index.d.ts +1 -0
- package/Breadcrumbs/index.js +1 -0
- package/Button/Button.d.ts +10 -9
- package/Button/Button.js +7 -0
- package/Button/Button.js.map +1 -1
- package/Button/Button.mdx +13 -0
- package/Button/Button.stories.d.ts +2 -1
- package/Button/Button.stories.js +9 -2
- package/Button/Button.stories.js.map +1 -1
- package/Button/CopyButton.d.ts +7 -6
- package/Button/IconButton.d.ts +10 -9
- package/Button/IconButton.stories.d.ts +1 -1
- package/Button/IconButton.stories.js.map +1 -1
- package/Calendar/Calendar.d.ts +7 -6
- package/Calendar/calendarClassNames.js +1 -1
- package/Calendar/calendarClassNames.js.map +1 -1
- package/Card/Card.d.ts +8 -22
- package/Card/Card.stories.d.ts +1 -1
- package/Card/Card.stories.js.map +1 -1
- package/Card/components/CancelAction.d.ts +8 -6
- package/Card/components/CardContent.d.ts +6 -6
- package/Card/components/CardTitle.d.ts +2 -2
- package/Card/components/ConfirmAction.d.ts +8 -6
- package/Card/components/Icon.d.ts +7 -6
- package/Checkbox/Checkbox.d.ts +7 -6
- package/Checkbox/Checkbox.stories.d.ts +1 -1
- package/Checkbox/Checkbox.stories.js.map +1 -1
- package/Checkbox/primitives/CheckboxPrimitive.d.ts +17 -12
- package/Checkbox/primitives/CheckboxPrimitive.stories.d.ts +1 -1
- package/Checkbox/primitives/CheckboxPrimitive.stories.js.map +1 -1
- package/CheckboxGroup/CheckboxGroup.d.ts +7 -6
- package/CheckboxGroup/CheckboxGroup.stories.d.ts +1 -1
- package/CheckboxGroup/CheckboxGroup.stories.js.map +1 -1
- package/CheckboxGroup/primitives/CheckboxGroupPrimitive.d.ts +20 -12
- package/CheckboxGroup/primitives/CheckboxGroupPrimitive.stories.d.ts +1 -1
- package/CheckboxGroup/primitives/CheckboxGroupPrimitive.stories.js.map +1 -1
- package/CodeEditor/CodeEditor.d.ts +7 -6
- package/CodeEditor/CodeEditor.stories.d.ts +1 -1
- package/CodeEditor/CodeEditor.stories.js.map +1 -1
- package/CodeEditor/CodeEditorPrimitive.d.ts +7 -6
- package/CodeEditor/CodeEditorPrimitive.js +3 -1
- package/CodeEditor/CodeEditorPrimitive.js.map +1 -1
- package/CodeEditor/CodeEditorPrimitive.stories.d.ts +1 -1
- package/CodeEditor/CodeEditorPrimitive.stories.js.map +1 -1
- package/ColorPicker/ColorPicker.d.ts +7 -6
- package/ColorPicker/ColorPicker.stories.d.ts +1 -1
- package/ColorPicker/ColorPicker.stories.js.map +1 -1
- package/ColorPicker/primitives/ColorPickerPrimitive.d.ts +7 -6
- package/ColorPicker/primitives/ColorPickerPrimitive.stories.d.ts +1 -1
- package/ColorPicker/primitives/ColorPickerPrimitive.stories.js.map +1 -1
- package/Command/Command.d.ts +10 -8
- package/Command/components/List.d.ts +1 -1
- package/Command/components/List.js +9 -5
- package/Command/components/List.js.map +1 -1
- package/DataList/DataListModal.d.ts +6 -3
- package/DataTable/DataTable.d.ts +23 -12
- package/DataTable/DataTable.js +18 -7
- package/DataTable/DataTable.js.map +1 -1
- package/DataTable/DataTable.stories.d.ts +1 -1
- package/DataTable/DataTable.stories.js.map +1 -1
- package/DataTable/components/ColumnsVisibility.d.ts +5 -4
- package/DataTable/components/ColumnsVisibility.js +7 -3
- package/DataTable/components/ColumnsVisibility.js.map +1 -1
- package/DatePicker/DatePicker.d.ts +11 -7
- package/DatePicker/DatePicker.js +10 -2
- package/DatePicker/DatePicker.js.map +1 -1
- package/DatePicker/DatePicker.stories.d.ts +11 -1
- package/DatePicker/DatePicker.stories.js +44 -1
- package/DatePicker/DatePicker.stories.js.map +1 -1
- package/DatePicker/primitives/BirthdayPicker.d.ts +13 -0
- package/DatePicker/primitives/BirthdayPicker.js +355 -0
- package/DatePicker/primitives/BirthdayPicker.js.map +1 -0
- package/DatePicker/primitives/BirthdayPickerCell.d.ts +14 -0
- package/DatePicker/primitives/BirthdayPickerCell.js +19 -0
- package/DatePicker/primitives/BirthdayPickerCell.js.map +1 -0
- package/DatePicker/primitives/BirthdayPickerSegments.d.ts +9 -0
- package/DatePicker/primitives/BirthdayPickerSegments.js +43 -0
- package/DatePicker/primitives/BirthdayPickerSegments.js.map +1 -0
- package/DatePicker/primitives/DateOnlyPicker.js +2 -2
- package/DatePicker/primitives/DateOnlyPicker.js.map +1 -1
- package/DatePicker/primitives/DatePickerPrimitive.d.ts +7 -6
- package/DatePicker/primitives/DatePickerPrimitive.js +3 -0
- package/DatePicker/primitives/DatePickerPrimitive.js.map +1 -1
- package/DatePicker/primitives/DateRangePicker.js +3 -3
- package/DatePicker/primitives/DateRangePicker.js.map +1 -1
- package/DatePicker/primitives/DateTimePicker.d.ts +1 -1
- package/DatePicker/primitives/DateTimePicker.js +26 -18
- package/DatePicker/primitives/DateTimePicker.js.map +1 -1
- package/DatePicker/primitives/MultipleDatesPicker.js +3 -3
- package/DatePicker/primitives/MultipleDatesPicker.js.map +1 -1
- package/DatePicker/primitives/components/DatePickerTrigger.js +2 -2
- package/DatePicker/primitives/components/DatePickerTrigger.js.map +1 -1
- package/DatePicker/utils/birthdayHelpers.d.ts +77 -0
- package/DatePicker/utils/birthdayHelpers.js +145 -0
- package/DatePicker/utils/birthdayHelpers.js.map +1 -0
- package/DatePicker/utils/birthdayHelpers.test.d.ts +1 -0
- package/DatePicker/utils/birthdayHelpers.test.js +394 -0
- package/DatePicker/utils/birthdayHelpers.test.js.map +1 -0
- package/DatePicker/utils/dateHelpers.d.ts +6 -1
- package/DatePicker/utils/dateHelpers.js +13 -5
- package/DatePicker/utils/dateHelpers.js.map +1 -1
- package/DatePicker/utils/dateHelpers.test.d.ts +1 -0
- package/DatePicker/utils/dateHelpers.test.js +32 -0
- package/DatePicker/utils/dateHelpers.test.js.map +1 -0
- package/DatePicker/utils/index.d.ts +1 -0
- package/DatePicker/utils/index.js +1 -0
- package/DatePicker/utils/timezoneHelpers.d.ts +3 -0
- package/DatePicker/utils/timezoneHelpers.js +32 -0
- package/DatePicker/utils/timezoneHelpers.js.map +1 -0
- package/DatePicker/utils/types.d.ts +15 -2
- package/Dialog/Dialog.d.ts +8 -22
- package/Dialog/Dialog.stories.d.ts +1 -1
- package/Dialog/Dialog.stories.js.map +1 -1
- package/Dialog/components/CancelAction.d.ts +8 -6
- package/Dialog/components/ConfirmAction.d.ts +8 -6
- package/Dialog/components/DialogContent.d.ts +1 -1
- package/Dialog/components/DialogFooter.d.ts +1 -1
- package/Dialog/components/DialogTitle.d.ts +1 -1
- package/Dialog/components/Icon.d.ts +7 -6
- package/DragCursor/DragCursor.d.ts +7 -0
- package/DragCursor/DragCursor.js +21 -0
- package/DragCursor/DragCursor.js.map +1 -0
- package/DragCursor/DragCursor.stories.d.ts +10 -0
- package/DragCursor/DragCursor.stories.js +97 -0
- package/DragCursor/DragCursor.stories.js.map +1 -0
- package/DragCursor/index.d.ts +1 -0
- package/DragCursor/index.js +1 -0
- package/Drawer/Drawer.d.ts +18 -28
- package/Drawer/Drawer.js +2 -1
- package/Drawer/Drawer.js.map +1 -1
- package/Drawer/Drawer.stories.d.ts +2 -1
- package/Drawer/Drawer.stories.js +21 -2
- package/Drawer/Drawer.stories.js.map +1 -1
- package/Drawer/components/CancelButton.d.ts +8 -6
- package/Drawer/components/ConfirmButton.d.ts +8 -6
- package/Drawer/components/DrawerContent.d.ts +1 -1
- package/Drawer/components/DrawerHeader.d.ts +2 -2
- package/Drawer/components/DrawerHeader.js +11 -8
- package/Drawer/components/DrawerHeader.js.map +1 -1
- package/Drawer/components/Icon.d.ts +7 -6
- package/Drawer/components/Icon.js +3 -4
- package/Drawer/components/Icon.js.map +1 -1
- package/DropdownMenu/DropdownMenu.stories.d.ts +1 -1
- package/DropdownMenu/DropdownMenu.stories.js.map +1 -1
- package/DropdownMenu/components/DropdownMenuItem.d.ts +8 -2
- package/DropdownMenu/components/DropdownMenuItem.js +11 -3
- package/DropdownMenu/components/DropdownMenuItem.js.map +1 -1
- package/DropdownMenu/components/DropdownMenuLink.d.ts +9 -8
- package/DropdownMenu/components/DropdownMenuSeparator.d.ts +7 -6
- package/EditableTitle/EditableTitle.d.ts +67 -0
- package/EditableTitle/EditableTitle.js +73 -0
- package/EditableTitle/EditableTitle.js.map +1 -0
- package/EditableTitle/index.d.ts +1 -0
- package/EditableTitle/index.js +1 -0
- package/EmptyState/EmptyState.d.ts +43 -0
- package/EmptyState/EmptyState.js +93 -0
- package/EmptyState/EmptyState.js.map +1 -0
- package/EmptyState/EmptyState.stories.d.ts +13 -0
- package/EmptyState/EmptyState.stories.js +136 -0
- package/EmptyState/EmptyState.stories.js.map +1 -0
- package/EmptyState/illustrations/ContentIllustration.d.ts +2 -0
- package/EmptyState/illustrations/ContentIllustration.js +100 -0
- package/EmptyState/illustrations/ContentIllustration.js.map +1 -0
- package/EmptyState/illustrations/LayoutIllustration.d.ts +2 -0
- package/EmptyState/illustrations/LayoutIllustration.js +93 -0
- package/EmptyState/illustrations/LayoutIllustration.js.map +1 -0
- package/EmptyState/illustrations/ListingIllustration.d.ts +2 -0
- package/EmptyState/illustrations/ListingIllustration.js +92 -0
- package/EmptyState/illustrations/ListingIllustration.js.map +1 -0
- package/EmptyState/illustrations/SelectIllustration.d.ts +2 -0
- package/EmptyState/illustrations/SelectIllustration.js +100 -0
- package/EmptyState/illustrations/SelectIllustration.js.map +1 -0
- package/EmptyState/illustrations/TableIllustration.d.ts +2 -0
- package/EmptyState/illustrations/TableIllustration.js +233 -0
- package/EmptyState/illustrations/TableIllustration.js.map +1 -0
- package/EmptyState/illustrations/UploadIllustration.d.ts +2 -0
- package/EmptyState/illustrations/UploadIllustration.js +77 -0
- package/EmptyState/illustrations/UploadIllustration.js.map +1 -0
- package/EmptyState/illustrations/index.d.ts +6 -0
- package/EmptyState/illustrations/index.js +6 -0
- package/EmptyState/index.d.ts +1 -0
- package/EmptyState/index.js +1 -0
- package/FilePicker/FilePicker.d.ts +19 -18
- package/FilePicker/FilePicker.stories.d.ts +7 -1
- package/FilePicker/FilePicker.stories.js +24 -1
- package/FilePicker/FilePicker.stories.js.map +1 -1
- package/FilePicker/primitives/FilePickerPrimitive.d.ts +20 -19
- package/FilePicker/primitives/FilePickerPrimitive.stories.d.ts +1 -1
- package/FilePicker/primitives/FilePickerPrimitive.stories.js.map +1 -1
- package/FilePicker/primitives/components/Trigger.d.ts +1 -1
- package/FilePicker/primitives/components/previews/ImagePreview/ImagePreview.d.ts +19 -7
- package/FilePicker/primitives/components/previews/ImagePreview/ImagePreview.js +15 -6
- package/FilePicker/primitives/components/previews/ImagePreview/ImagePreview.js.map +1 -1
- package/FilePicker/primitives/components/previews/ItemActions.js +1 -1
- package/FilePicker/primitives/components/previews/ItemActions.js.map +1 -1
- package/FilePicker/primitives/components/previews/ItemDescription.js +1 -1
- package/FilePicker/primitives/components/previews/ItemDescription.js.map +1 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/FileType.d.ts +5 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/FileType.js +45 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/FileType.js.map +1 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.d.ts +5 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.js +14 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.js.map +1 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.d.ts +12 -6
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js +54 -12
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js.map +1 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.d.ts +11 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js +8 -61
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js.map +1 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.d.ts +11 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js +24 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js.map +1 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.d.ts +10 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.js +46 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.js.map +1 -0
- package/FilePicker/primitives/components/previews/TextOnlyPreview/TextOnlyPreview.d.ts +7 -6
- package/FilePicker/primitives/components/previews/TruncatedFileName.d.ts +7 -0
- package/FilePicker/primitives/components/previews/TruncatedFileName.js +20 -0
- package/FilePicker/primitives/components/previews/TruncatedFileName.js.map +1 -0
- package/FilePicker/primitives/components/previews/fileName.d.ts +4 -0
- package/FilePicker/primitives/components/previews/fileName.js +26 -0
- package/FilePicker/primitives/components/previews/fileName.js.map +1 -0
- package/FilePicker/primitives/components/previews/index.d.ts +1 -0
- package/FilePicker/primitives/components/previews/index.js +1 -0
- package/FilePicker/primitives/components/previews/variants.d.ts +1 -1
- package/FillViewport/FillViewport.d.ts +63 -0
- package/FillViewport/FillViewport.js +67 -0
- package/FillViewport/FillViewport.js.map +1 -0
- package/FillViewport/index.d.ts +1 -0
- package/FillViewport/index.js +1 -0
- package/FormComponent/Description.d.ts +7 -6
- package/FormComponent/ErrorMessage.d.ts +7 -6
- package/FormComponent/Label.d.ts +7 -6
- package/FormComponent/Note.d.ts +7 -6
- package/Grid/Grid.d.ts +25 -23
- package/Grid/Grid.js.map +1 -1
- package/Grid/Grid.stories.d.ts +1 -1
- package/Grid/Grid.stories.js.map +1 -1
- package/HeaderBar/HeaderBar.d.ts +7 -6
- package/HeaderBar/HeaderBar.stories.d.ts +1 -1
- package/HeaderBar/HeaderBar.stories.js.map +1 -1
- package/Heading/Heading.d.ts +8 -7
- package/Heading/Heading.stories.d.ts +1 -1
- package/Heading/Heading.stories.js.map +1 -1
- package/Icon/Icon.d.ts +9 -8
- package/Icon/Icon.stories.d.ts +1 -1
- package/Icon/Icon.stories.js.map +1 -1
- package/IconPicker/IconPicker.d.ts +7 -6
- package/IconPicker/IconPicker.stories.d.ts +1 -1
- package/IconPicker/IconPicker.stories.js.map +1 -1
- package/IconPicker/primitives/IconPickerPrimitive.d.ts +1 -1
- package/IconPicker/primitives/IconPickerPrimitive.js +1 -2
- package/IconPicker/primitives/IconPickerPrimitive.js.map +1 -1
- package/IconPicker/primitives/IconPickerPrimitive.stories.d.ts +1 -1
- package/IconPicker/primitives/IconPickerPrimitive.stories.js.map +1 -1
- package/IconPicker/primitives/components/IconPickerTrigger.d.ts +1 -1
- package/ImageEditor/AspectRatioPreview.d.ts +16 -0
- package/ImageEditor/AspectRatioPreview.js +26 -0
- package/ImageEditor/AspectRatioPreview.js.map +1 -0
- package/ImageEditor/CropHotspotEditor.d.ts +22 -0
- package/ImageEditor/CropHotspotEditor.js +402 -0
- package/ImageEditor/CropHotspotEditor.js.map +1 -0
- package/ImageEditor/ImageEditor.d.ts +18 -0
- package/ImageEditor/ImageEditor.js +151 -0
- package/ImageEditor/ImageEditor.js.map +1 -0
- package/ImageEditor/ImageEditor.stories.d.ts +6 -0
- package/ImageEditor/ImageEditor.stories.js +42 -0
- package/ImageEditor/ImageEditor.stories.js.map +1 -0
- package/ImageEditor/MetaFields.d.ts +12 -0
- package/ImageEditor/MetaFields.js +20 -0
- package/ImageEditor/MetaFields.js.map +1 -0
- package/ImageEditor/SectionLabel.d.ts +8 -0
- package/ImageEditor/SectionLabel.js +7 -0
- package/ImageEditor/SectionLabel.js.map +1 -0
- package/ImageEditor/geometry.d.ts +46 -0
- package/ImageEditor/geometry.js +126 -0
- package/ImageEditor/geometry.js.map +1 -0
- package/ImageEditor/index.d.ts +3 -0
- package/ImageEditor/index.js +3 -0
- package/ImageEditor/types.d.ts +52 -0
- package/ImageEditor/types.js +35 -0
- package/ImageEditor/types.js.map +1 -0
- package/Input/Input.d.ts +7 -6
- package/Input/Input.stories.d.ts +1 -1
- package/Input/Input.stories.js.map +1 -1
- package/Input/InputPrimitive.d.ts +9 -8
- package/Input/InputPrimitive.stories.d.ts +1 -1
- package/Input/InputPrimitive.stories.js.map +1 -1
- package/Label/Label.d.ts +8 -7
- package/Label/Label.stories.d.ts +1 -1
- package/Label/Label.stories.js.map +1 -1
- package/Label/components/LabelValue.d.ts +1 -1
- package/Link/Link.d.ts +3 -3
- package/Link/Link.js +1 -1
- package/Link/Link.js.map +1 -1
- package/Link/Link.stories.d.ts +1 -1
- package/Link/Link.stories.js.map +1 -1
- package/List/List.d.ts +8 -7
- package/List/List.stories.d.ts +1 -1
- package/List/List.stories.js.map +1 -1
- package/List/components/ListItem.d.ts +7 -6
- package/List/components/ListItemAction.d.ts +7 -6
- package/List/components/ListItemHandle.d.ts +7 -6
- package/List/components/ListItemIcon.d.ts +7 -6
- package/List/components/ListItemSeparator.d.ts +7 -6
- package/Loader/Loader.d.ts +9 -8
- package/Loader/Loader.stories.d.ts +1 -1
- package/Loader/Loader.stories.js.map +1 -1
- package/Loader/OverlayLoader.d.ts +7 -6
- package/Loader/OverlayLoader.stories.d.ts +1 -1
- package/Loader/OverlayLoader.stories.js.map +1 -1
- package/Markdown/Markdown.d.ts +47 -0
- package/Markdown/Markdown.js +17 -0
- package/Markdown/Markdown.js.map +1 -0
- package/Markdown/index.d.ts +1 -0
- package/Markdown/index.js +1 -0
- package/MultiAutoComplete/MultiAutoComplete.d.ts +7 -6
- package/MultiAutoComplete/MultiAutoComplete.stories.d.ts +1 -1
- package/MultiAutoComplete/MultiAutoComplete.stories.js.map +1 -1
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.d.ts +13 -6
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.js +1 -0
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.js.map +1 -1
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.stories.d.ts +1 -1
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.stories.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenterWithFreeInput.d.ts +3 -3
- package/MultiAutoComplete/primitives/useMultiAutoComplete.d.ts +3 -3
- package/MultiFilePicker/MultiFilePicker.d.ts +19 -18
- package/MultiFilePicker/MultiFilePicker.stories.d.ts +1 -1
- package/MultiFilePicker/MultiFilePicker.stories.js.map +1 -1
- package/MultiFilePicker/primitives/MultiFilePickerPrimitive.d.ts +19 -18
- package/MultiFilePicker/primitives/MultiFilePickerPrimitive.stories.d.ts +1 -1
- package/MultiFilePicker/primitives/MultiFilePickerPrimitive.stories.js.map +1 -1
- package/MultiSelect/MultiSelect.d.ts +7 -6
- package/MultiSelect/MultiSelect.stories.d.ts +1 -1
- package/MultiSelect/MultiSelect.stories.js.map +1 -1
- package/MultiSelect/primitives/MultiSelectPrimitive.d.ts +10 -6
- package/MultiSelect/primitives/MultiSelectPrimitive.js +12 -5
- package/MultiSelect/primitives/MultiSelectPrimitive.js.map +1 -1
- package/Popover/Popover.d.ts +7 -6
- package/Popover/Popover.stories.d.ts +8 -1
- package/Popover/Popover.stories.js +24 -1
- package/Popover/Popover.stories.js.map +1 -1
- package/Popover/primitives/PopoverPrimitive.d.ts +7 -7
- package/Popover/primitives/components/PopoverContent.js +6 -1
- package/Popover/primitives/components/PopoverContent.js.map +1 -1
- package/ProgressBar/ProgressBar.d.ts +7 -6
- package/ProgressBar/ProgressBar.stories.d.ts +1 -1
- package/ProgressBar/ProgressBar.stories.js.map +1 -1
- package/RadioGroup/RadioGroup.d.ts +7 -6
- package/RadioGroup/RadioGroup.stories.d.ts +1 -1
- package/RadioGroup/RadioGroup.stories.js.map +1 -1
- package/RadioGroup/primitives/Radio.d.ts +7 -6
- package/RadioGroup/primitives/RadioGroupPrimitive.d.ts +5 -1
- package/RadioGroup/primitives/RadioGroupPrimitive.stories.d.ts +1 -1
- package/RadioGroup/primitives/RadioGroupPrimitive.stories.js.map +1 -1
- package/RangeSlider/RangeSlider.d.ts +7 -6
- package/RangeSlider/RangeSlider.stories.d.ts +1 -1
- package/RangeSlider/RangeSlider.stories.js.map +1 -1
- package/RangeSlider/primitives/RangeSliderPrimitive.stories.d.ts +1 -1
- package/RangeSlider/primitives/RangeSliderPrimitive.stories.js.map +1 -1
- package/ScrollArea/ScrollArea.d.ts +16 -2
- package/ScrollArea/ScrollArea.js +25 -11
- package/ScrollArea/ScrollArea.js.map +1 -1
- package/ScrollArea/ScrollArea.stories.d.ts +1 -1
- package/ScrollArea/ScrollArea.stories.js.map +1 -1
- package/SegmentedControl/SegmentedControl.d.ts +11 -6
- package/SegmentedControl/SegmentedControl.js +6 -2
- package/SegmentedControl/SegmentedControl.js.map +1 -1
- package/SegmentedControl/SegmentedControl.stories.d.ts +5 -1
- package/SegmentedControl/SegmentedControl.stories.js +100 -2
- package/SegmentedControl/SegmentedControl.stories.js.map +1 -1
- package/SegmentedControl/SegmentedControlTab.d.ts +10 -0
- package/SegmentedControl/SegmentedControlTab.js +21 -0
- package/SegmentedControl/SegmentedControlTab.js.map +1 -0
- package/SegmentedControl/SegmentedControlTabs.d.ts +14 -0
- package/SegmentedControl/SegmentedControlTabs.js +71 -0
- package/SegmentedControl/SegmentedControlTabs.js.map +1 -0
- package/SegmentedControl/SegmentedControlTabsContext.d.ts +19 -0
- package/SegmentedControl/SegmentedControlTabsContext.js +11 -0
- package/SegmentedControl/SegmentedControlTabsContext.js.map +1 -0
- package/SegmentedControl/index.d.ts +2 -0
- package/SegmentedControl/index.js +2 -0
- package/SegmentedControl/primitives/SegmentedControlPrimitive.d.ts +6 -2
- package/SegmentedControl/primitives/SegmentedControlPrimitive.js +4 -3
- package/SegmentedControl/primitives/SegmentedControlPrimitive.js.map +1 -1
- package/SegmentedControl/primitives/SegmentedControlPrimitive.stories.d.ts +2 -1
- package/SegmentedControl/primitives/SegmentedControlPrimitive.stories.js +8 -1
- package/SegmentedControl/primitives/SegmentedControlPrimitive.stories.js.map +1 -1
- package/Select/Select.d.ts +7 -6
- package/Select/Select.stories.d.ts +1 -1
- package/Select/Select.stories.js.map +1 -1
- package/Select/primitives/SelectPrimitive.stories.d.ts +1 -1
- package/Select/primitives/SelectPrimitive.stories.js.map +1 -1
- package/Select/primitives/components/SelectContent.js +4 -6
- package/Select/primitives/components/SelectContent.js.map +1 -1
- package/Select/primitives/components/SelectTrigger.d.ts +2 -2
- package/Separator/Separator.d.ts +9 -8
- package/Separator/Separator.stories.d.ts +1 -1
- package/Separator/Separator.stories.js.map +1 -1
- package/Sidebar/Sidebar.d.ts +9 -6
- package/Sidebar/Sidebar.stories.d.ts +1 -1
- package/Sidebar/Sidebar.stories.js.map +1 -1
- package/Sidebar/components/SidebarContent.js +1 -1
- package/Sidebar/components/SidebarContent.js.map +1 -1
- package/Sidebar/components/SidebarIcon.d.ts +7 -6
- package/Sidebar/components/SidebarProvider.d.ts +4 -4
- package/Sidebar/components/SidebarRoot.js +1 -1
- package/Sidebar/components/SidebarRoot.js.map +1 -1
- package/Sidebar/components/items/SidebarMenuGroup.d.ts +9 -8
- package/Sidebar/components/items/SidebarMenuItem.d.ts +13 -9
- package/Sidebar/components/items/SidebarMenuItem.js +3 -1
- package/Sidebar/components/items/SidebarMenuItem.js.map +1 -1
- package/Sidebar/components/items/SidebarMenuItemBadge.d.ts +6 -0
- package/Sidebar/components/items/SidebarMenuItemBadge.js +7 -0
- package/Sidebar/components/items/SidebarMenuItemBadge.js.map +1 -0
- package/Sidebar/components/items/SidebarMenuItemIcon.d.ts +7 -6
- package/Sidebar/components/items/SidebarMenuLink.d.ts +12 -9
- package/Sidebar/components/items/SidebarMenuLink.js +3 -1
- package/Sidebar/components/items/SidebarMenuLink.js.map +1 -1
- package/Sidebar/components/items/SidebarMenuProvider.d.ts +4 -4
- package/Sidebar/components/items/SidebarMenuRootButton.d.ts +1 -1
- package/Sidebar/components/items/SidebarMenuRootButton.js +8 -3
- package/Sidebar/components/items/SidebarMenuRootButton.js.map +1 -1
- package/Sidebar/components/items/SidebarMenuRootItem.d.ts +9 -7
- package/Sidebar/components/items/SidebarMenuSubButton.d.ts +1 -1
- package/Sidebar/components/items/SidebarMenuSubButton.js +14 -6
- package/Sidebar/components/items/SidebarMenuSubButton.js.map +1 -1
- package/Sidebar/components/items/SidebarMenuSubItem.js +3 -3
- package/Sidebar/components/items/SidebarMenuSubItem.js.map +1 -1
- package/Sidebar/components/items/SidebarMenuSubItemIndentation.js +2 -1
- package/Sidebar/components/items/SidebarMenuSubItemIndentation.js.map +1 -1
- package/Skeleton/Skeleton.d.ts +9 -7
- package/Skeleton/Skeleton.js +10 -4
- package/Skeleton/Skeleton.js.map +1 -1
- package/Skeleton/Skeleton.stories.d.ts +3 -1
- package/Skeleton/Skeleton.stories.js +28 -2
- package/Skeleton/Skeleton.stories.js.map +1 -1
- package/Slider/Slider.d.ts +7 -6
- package/Slider/Slider.stories.d.ts +1 -1
- package/Slider/Slider.stories.js.map +1 -1
- package/Slider/primitives/SliderPrimitive.stories.d.ts +1 -1
- package/Slider/primitives/SliderPrimitive.stories.js.map +1 -1
- package/SteppedProgress/SteppedProgress.d.ts +7 -6
- package/SteppedProgress/SteppedProgress.stories.d.ts +1 -1
- package/SteppedProgress/SteppedProgress.stories.js.map +1 -1
- package/SteppedProgress/SteppedProgressItem.d.ts +7 -6
- package/Switch/Switch.d.ts +10 -9
- package/Switch/Switch.js +21 -7
- package/Switch/Switch.js.map +1 -1
- package/Switch/Switch.stories.d.ts +1 -1
- package/Switch/Switch.stories.js.map +1 -1
- package/Switch/domains/SwitchItemDto.d.ts +1 -1
- package/Switch/primitives/SwitchPrimitive.d.ts +10 -6
- package/Switch/primitives/SwitchPrimitive.js +4 -3
- package/Switch/primitives/SwitchPrimitive.js.map +1 -1
- package/Switch/primitives/SwitchPrimitive.stories.d.ts +1 -1
- package/Switch/primitives/SwitchPrimitive.stories.js.map +1 -1
- package/Table/Table.d.ts +12 -10
- package/Table/components/Direction.d.ts +1 -1
- package/Tabs/Tabs.d.ts +14 -7
- package/Tabs/Tabs.js +32 -11
- package/Tabs/Tabs.js.map +1 -1
- package/Tabs/Tabs.mdx +27 -0
- package/Tabs/Tabs.stories.d.ts +2 -1
- package/Tabs/Tabs.stories.js +19 -1
- package/Tabs/Tabs.stories.js.map +1 -1
- package/Tabs/components/Content.d.ts +1 -1
- package/Tabs/components/List.d.ts +2 -2
- package/Tabs/components/Tab.d.ts +7 -6
- package/Tabs/components/Trigger.d.ts +3 -2
- package/Tabs/components/Trigger.js +8 -3
- package/Tabs/components/Trigger.js.map +1 -1
- package/Tag/Tag.d.ts +8 -7
- package/Tag/Tag.stories.d.ts +1 -1
- package/Tag/Tag.stories.js.map +1 -1
- package/Tags/Tags.d.ts +7 -6
- package/Tags/Tags.stories.d.ts +1 -1
- package/Tags/Tags.stories.js.map +1 -1
- package/Tags/primitives/TagsPrimitive.d.ts +7 -6
- package/Tags/primitives/TagsPrimitive.stories.d.ts +1 -1
- package/Tags/primitives/TagsPrimitive.stories.js.map +1 -1
- package/Text/Text.d.ts +8 -7
- package/Text/Text.stories.d.ts +1 -1
- package/Text/Text.stories.js.map +1 -1
- package/Textarea/Textarea.d.ts +7 -6
- package/Textarea/Textarea.stories.d.ts +1 -1
- package/Textarea/Textarea.stories.js.map +1 -1
- package/Textarea/TextareaPrimitive.d.ts +9 -8
- package/Textarea/TextareaPrimitive.stories.d.ts +1 -1
- package/Textarea/TextareaPrimitive.stories.js.map +1 -1
- package/TimeAgo/TimeAgo.stories.d.ts +1 -1
- package/TimeAgo/TimeAgo.stories.js.map +1 -1
- package/TimeAgo/getElapsedSeconds.js +3 -3
- package/TimeAgo/getElapsedSeconds.js.map +1 -1
- package/Toast/Toast.d.ts +7 -6
- package/Toast/components/ToastActions.d.ts +7 -6
- package/Toast/components/ToastDescription.d.ts +7 -6
- package/Toast/components/ToastTitle.d.ts +7 -6
- package/Toast/useToast.stories.d.ts +1 -1
- package/Toast/useToast.stories.js.map +1 -1
- package/Toggle/Toggle.d.ts +7 -6
- package/Toggle/Toggle.stories.d.ts +1 -1
- package/Toggle/Toggle.stories.js.map +1 -1
- package/Toggle/primitives/TogglePrimitive.d.ts +13 -9
- package/Toggle/primitives/TogglePrimitive.stories.d.ts +1 -1
- package/Toggle/primitives/TogglePrimitive.stories.js.map +1 -1
- package/ToggleGroup/ToggleGroup.d.ts +7 -6
- package/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
- package/ToggleGroup/ToggleGroup.stories.js.map +1 -1
- package/ToggleGroup/domains/ToggleGroupItem.d.ts +3 -0
- package/ToggleGroup/domains/ToggleGroupItem.js +6 -1
- package/ToggleGroup/domains/ToggleGroupItem.js.map +1 -1
- package/ToggleGroup/domains/ToggleGroupItemFormatted.d.ts +1 -0
- package/ToggleGroup/domains/ToggleGroupItemFormatter.js +2 -1
- package/ToggleGroup/domains/ToggleGroupItemFormatter.js.map +1 -1
- package/ToggleGroup/domains/ToggleGroupItemParams.d.ts +1 -0
- package/ToggleGroup/primitives/ToggleGroupPrimitive.d.ts +13 -9
- package/ToggleGroup/primitives/ToggleGroupPrimitive.js +12 -3
- package/ToggleGroup/primitives/ToggleGroupPrimitive.js.map +1 -1
- package/ToggleGroup/primitives/ToggleGroupPrimitive.stories.d.ts +1 -1
- package/ToggleGroup/primitives/ToggleGroupPrimitive.stories.js.map +1 -1
- package/Tooltip/Tooltip.d.ts +7 -6
- package/Tooltip/Tooltip.stories.d.ts +1 -1
- package/Tooltip/Tooltip.stories.js.map +1 -1
- package/Tree/Tree.d.ts +7 -6
- package/Tree/Tree.stories.d.ts +1 -1
- package/Tree/Tree.stories.js.map +1 -1
- package/Tree/components/Item.d.ts +7 -6
- package/Tree/components/ItemCollapseTrigger.d.ts +7 -6
- package/Tree/components/ItemContent.d.ts +8 -6
- package/Tree/components/ItemDragHandle.d.ts +7 -6
- package/Tree/components/ItemIcon.d.ts +7 -6
- package/Tree/components/ItemPlaceholder.d.ts +7 -6
- package/Tree/components/ItemSubIndentation.d.ts +7 -6
- package/Tree/useTree.js +6 -2
- package/Tree/useTree.js.map +1 -1
- package/Widget/Widget.d.ts +8 -22
- package/Widget/Widget.stories.d.ts +1 -1
- package/Widget/Widget.stories.js.map +1 -1
- package/Widget/components/Icon.d.ts +7 -6
- package/Widget/components/WidgetAction.d.ts +8 -6
- package/Widget/components/WidgetContent.d.ts +5 -5
- package/exports/admin/ui.d.ts +3 -0
- package/exports/admin/ui.js +3 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +1 -0
- package/hooks/useEscapeScrollLock.d.ts +13 -0
- package/hooks/useEscapeScrollLock.js +21 -0
- package/hooks/useEscapeScrollLock.js.map +1 -0
- package/index.d.ts +8 -0
- package/index.js +8 -0
- package/package.json +33 -35
- package/theme.css +52 -0
- package/utils.js +53 -34
- package/utils.js.map +1 -1
|
@@ -4,21 +4,22 @@ interface ListItemHandleProps extends Omit<IconProps, "icon" | "label"> {
|
|
|
4
4
|
icon?: React.ReactElement;
|
|
5
5
|
label?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const
|
|
8
|
-
|
|
7
|
+
declare const DecoratableListItemHandle: (props: ListItemHandleProps) => React.JSX.Element;
|
|
8
|
+
declare const ListItemHandle: typeof DecoratableListItemHandle & {
|
|
9
|
+
original: typeof DecoratableListItemHandle;
|
|
9
10
|
originalName: string;
|
|
10
11
|
displayName: string;
|
|
11
12
|
} & {
|
|
12
|
-
original:
|
|
13
|
-
original:
|
|
13
|
+
original: typeof DecoratableListItemHandle & {
|
|
14
|
+
original: typeof DecoratableListItemHandle;
|
|
14
15
|
originalName: string;
|
|
15
16
|
displayName: string;
|
|
16
17
|
};
|
|
17
18
|
originalName: string;
|
|
18
19
|
displayName: string;
|
|
19
20
|
} & {
|
|
20
|
-
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<
|
|
21
|
-
original:
|
|
21
|
+
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableListItemHandle & {
|
|
22
|
+
original: typeof DecoratableListItemHandle;
|
|
22
23
|
originalName: string;
|
|
23
24
|
displayName: string;
|
|
24
25
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { IconProps as IconComponentProps } from "../../Icon/index.js";
|
|
3
3
|
type ListItemIconProps = IconComponentProps;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
declare const DecoratableListItemIcon: (props: ListItemIconProps) => React.JSX.Element;
|
|
5
|
+
export declare const ListItemIcon: typeof DecoratableListItemIcon & {
|
|
6
|
+
original: typeof DecoratableListItemIcon;
|
|
6
7
|
originalName: string;
|
|
7
8
|
displayName: string;
|
|
8
9
|
} & {
|
|
9
|
-
original:
|
|
10
|
-
original:
|
|
10
|
+
original: typeof DecoratableListItemIcon & {
|
|
11
|
+
original: typeof DecoratableListItemIcon;
|
|
11
12
|
originalName: string;
|
|
12
13
|
displayName: string;
|
|
13
14
|
};
|
|
14
15
|
originalName: string;
|
|
15
16
|
displayName: string;
|
|
16
17
|
} & {
|
|
17
|
-
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<
|
|
18
|
-
original:
|
|
18
|
+
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableListItemIcon & {
|
|
19
|
+
original: typeof DecoratableListItemIcon;
|
|
19
20
|
originalName: string;
|
|
20
21
|
displayName: string;
|
|
21
22
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type SeparatorProps } from "../../Separator/index.js";
|
|
3
3
|
type ListItemSeparatorProps = SeparatorProps;
|
|
4
|
-
declare const
|
|
5
|
-
|
|
4
|
+
declare const DecoratableListItemSeparator: (props: ListItemSeparatorProps) => React.JSX.Element;
|
|
5
|
+
declare const ListItemSeparator: typeof DecoratableListItemSeparator & {
|
|
6
|
+
original: typeof DecoratableListItemSeparator;
|
|
6
7
|
originalName: string;
|
|
7
8
|
displayName: string;
|
|
8
9
|
} & {
|
|
9
|
-
original:
|
|
10
|
-
original:
|
|
10
|
+
original: typeof DecoratableListItemSeparator & {
|
|
11
|
+
original: typeof DecoratableListItemSeparator;
|
|
11
12
|
originalName: string;
|
|
12
13
|
displayName: string;
|
|
13
14
|
};
|
|
14
15
|
originalName: string;
|
|
15
16
|
displayName: string;
|
|
16
17
|
} & {
|
|
17
|
-
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<
|
|
18
|
-
original:
|
|
18
|
+
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableListItemSeparator & {
|
|
19
|
+
original: typeof DecoratableListItemSeparator;
|
|
19
20
|
originalName: string;
|
|
20
21
|
displayName: string;
|
|
21
22
|
}>) => (props: unknown) => React.JSX.Element;
|
package/Loader/Loader.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type VariantProps } from "../utils.js";
|
|
3
3
|
declare const loaderVariants: (props?: ({
|
|
4
|
-
size?: "
|
|
4
|
+
size?: "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare const loaderBaseVariant: (props?: ({
|
|
7
|
-
variant?: "accent" | "
|
|
7
|
+
variant?: "accent" | "negative" | "subtle" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
interface LoaderProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof loaderVariants>, VariantProps<typeof loaderBaseVariant> {
|
|
10
10
|
max?: number;
|
|
@@ -14,21 +14,22 @@ interface LoaderProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps
|
|
|
14
14
|
indeterminate?: boolean;
|
|
15
15
|
text?: React.ReactNode;
|
|
16
16
|
}
|
|
17
|
-
declare const
|
|
18
|
-
|
|
17
|
+
declare const DecoratableLoader: ({ max, min, value, indeterminate, className, size, variant, text, ...props }: LoaderProps) => React.JSX.Element;
|
|
18
|
+
declare const Loader: typeof DecoratableLoader & {
|
|
19
|
+
original: typeof DecoratableLoader;
|
|
19
20
|
originalName: string;
|
|
20
21
|
displayName: string;
|
|
21
22
|
} & {
|
|
22
|
-
original:
|
|
23
|
-
original:
|
|
23
|
+
original: typeof DecoratableLoader & {
|
|
24
|
+
original: typeof DecoratableLoader;
|
|
24
25
|
originalName: string;
|
|
25
26
|
displayName: string;
|
|
26
27
|
};
|
|
27
28
|
originalName: string;
|
|
28
29
|
displayName: string;
|
|
29
30
|
} & {
|
|
30
|
-
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<
|
|
31
|
-
original:
|
|
31
|
+
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableLoader & {
|
|
32
|
+
original: typeof DecoratableLoader;
|
|
32
33
|
originalName: string;
|
|
33
34
|
displayName: string;
|
|
34
35
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loader/Loader.stories.js","sources":["../../src/Loader/Loader.stories.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react
|
|
1
|
+
{"version":3,"file":"Loader/Loader.stories.js","sources":["../../src/Loader/Loader.stories.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Loader } from \"./Loader.js\";\n\nconst meta: Meta<typeof Loader> = {\n title: \"Components/Loader\",\n component: Loader,\n parameters: {\n layout: \"padded\"\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Loader>;\n\nexport const Documentation: Story = {\n args: {\n size: \"md\",\n variant: \"accent\",\n indeterminate: true,\n value: 66,\n min: 0,\n max: 100,\n text: \"Loading...\",\n className: undefined\n },\n argTypes: {\n size: {\n description: \"Size of the loader\",\n control: \"select\",\n options: [\"xs\", \"sm\", \"md\", \"lg\"]\n },\n variant: {\n description: \"Visual style variant of the loader\",\n control: \"select\",\n options: [\"accent\", \"subtle\", \"negative\"]\n },\n indeterminate: {\n description: \"Whether the loader should show indeterminate progress\",\n control: \"boolean\"\n },\n value: {\n description: \"Current progress value (when not indeterminate)\",\n control: { type: \"number\", min: 0, max: 100 }\n },\n min: {\n description: \"Minimum value for progress calculation\",\n control: \"number\"\n },\n max: {\n description: \"Maximum value for progress calculation\",\n control: \"number\"\n },\n text: {\n description: \"Optional text to display below the loader\",\n control: \"text\"\n },\n className: {\n description:\n \"Additional CSS class names. You can pass multiple class names, separated by commas or spaces.\"\n }\n }\n};\n\nexport const Default: Story = {};\n\nexport const ExtraSmall: Story = {\n args: {\n size: \"xs\"\n }\n};\n\nexport const Small: Story = {\n args: {\n size: \"sm\"\n }\n};\n\nexport const Medium: Story = {\n args: {\n size: \"md\"\n }\n};\n\nexport const Large: Story = {\n args: {\n size: \"lg\"\n }\n};\n\nexport const Accent: Story = {\n args: {\n variant: \"accent\"\n }\n};\n\nexport const Subtle: Story = {\n args: {\n variant: \"subtle\"\n }\n};\n\nexport const Negative: Story = {\n args: {\n variant: \"negative\"\n },\n decorators: [\n Story => (\n <div className=\"bg-primary p-md rounded-md\">\n <Story />\n </div>\n )\n ]\n};\n\nexport const WithControlledValue: Story = {\n args: {\n value: 0,\n indeterminate: false\n },\n render: args => {\n const [value, setValue] = useState(args.value);\n\n useEffect(() => {\n const interval = setInterval(() => {\n setValue((prevValue = 0) => {\n if (prevValue === 100) {\n return prevValue;\n }\n return prevValue + 5;\n });\n }, 50);\n\n return () => clearInterval(interval);\n }, []);\n\n return <Loader {...args} value={value} text={`Loading ${value}%`} />;\n }\n};\n\nexport const WithText: Story = {\n args: {\n text: \"Loading...\"\n }\n};\n"],"names":["meta","Loader","Documentation","undefined","Default","ExtraSmall","Small","Medium","Large","Accent","Subtle","Negative","Story","WithControlledValue","args","value","setValue","useState","useEffect","interval","setInterval","prevValue","clearInterval","WithText"],"mappings":";;AAIA,MAAMA,OAA4B;IAC9B,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;AACJ;AAEA,uBAAeD;AAGR,MAAME,gBAAuB;IAChC,MAAM;QACF,MAAM;QACN,SAAS;QACT,eAAe;QACf,OAAO;QACP,KAAK;QACL,KAAK;QACL,MAAM;QACN,WAAWC;IACf;IACA,UAAU;QACN,MAAM;YACF,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAM;gBAAM;gBAAM;aAAK;QACrC;QACA,SAAS;YACL,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAU;gBAAU;aAAW;QAC7C;QACA,eAAe;YACX,aAAa;YACb,SAAS;QACb;QACA,OAAO;YACH,aAAa;YACb,SAAS;gBAAE,MAAM;gBAAU,KAAK;gBAAG,KAAK;YAAI;QAChD;QACA,KAAK;YACD,aAAa;YACb,SAAS;QACb;QACA,KAAK;YACD,aAAa;YACb,SAAS;QACb;QACA,MAAM;YACF,aAAa;YACb,SAAS;QACb;QACA,WAAW;YACP,aACI;QACR;IACJ;AACJ;AAEO,MAAMC,UAAiB,CAAC;AAExB,MAAMC,aAAoB;IAC7B,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,QAAe;IACxB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,SAAgB;IACzB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,QAAe;IACxB,MAAM;QACF,MAAM;IACV;AACJ;AAEO,MAAMC,SAAgB;IACzB,MAAM;QACF,SAAS;IACb;AACJ;AAEO,MAAMC,SAAgB;IACzB,MAAM;QACF,SAAS;IACb;AACJ;AAEO,MAAMC,WAAkB;IAC3B,MAAM;QACF,SAAS;IACb;IACA,YAAY;QACRC,CAAAA,QAAAA,WAAAA,GACI,oBAAC;gBAAI,WAAU;6BACX,oBAACA,OAAAA;KAGZ;AACL;AAEO,MAAMC,sBAA6B;IACtC,MAAM;QACF,OAAO;QACP,eAAe;IACnB;IACA,QAAQC,CAAAA;QACJ,MAAM,CAACC,OAAOC,SAAS,GAAGC,SAASH,KAAK,KAAK;QAE7CI,UAAU;YACN,MAAMC,WAAWC,YAAY;gBACzBJ,SAAS,CAACK,YAAY,CAAC;oBACnB,IAAIA,AAAc,QAAdA,WACA,OAAOA;oBAEX,OAAOA,YAAY;gBACvB;YACJ,GAAG;YAEH,OAAO,IAAMC,cAAcH;QAC/B,GAAG,EAAE;QAEL,OAAO,WAAP,GAAO,oBAAClB,QAAMA;YAAE,GAAGa,IAAI;YAAE,OAAOC;YAAO,MAAM,CAAC,QAAQ,EAAEA,MAAM,CAAC,CAAC;;IACpE;AACJ;AAEO,MAAMQ,WAAkB;IAC3B,MAAM;QACF,MAAM;IACV;AACJ"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { LoaderProps } from "./Loader.js";
|
|
3
3
|
type OverlayLoaderProps = LoaderProps;
|
|
4
|
-
declare const
|
|
5
|
-
|
|
4
|
+
declare const DecoratableOverlayLoader: ({ className, size, ...props }: OverlayLoaderProps) => React.JSX.Element;
|
|
5
|
+
declare const OverlayLoader: typeof DecoratableOverlayLoader & {
|
|
6
|
+
original: typeof DecoratableOverlayLoader;
|
|
6
7
|
originalName: string;
|
|
7
8
|
displayName: string;
|
|
8
9
|
} & {
|
|
9
|
-
original:
|
|
10
|
-
original:
|
|
10
|
+
original: typeof DecoratableOverlayLoader & {
|
|
11
|
+
original: typeof DecoratableOverlayLoader;
|
|
11
12
|
originalName: string;
|
|
12
13
|
displayName: string;
|
|
13
14
|
};
|
|
14
15
|
originalName: string;
|
|
15
16
|
displayName: string;
|
|
16
17
|
} & {
|
|
17
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
18
|
-
original:
|
|
18
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableOverlayLoader & {
|
|
19
|
+
original: typeof DecoratableOverlayLoader;
|
|
19
20
|
originalName: string;
|
|
20
21
|
displayName: string;
|
|
21
22
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loader/OverlayLoader.stories.js","sources":["../../src/Loader/OverlayLoader.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react
|
|
1
|
+
{"version":3,"file":"Loader/OverlayLoader.stories.js","sources":["../../src/Loader/OverlayLoader.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { OverlayLoader } from \"./OverlayLoader.js\";\n\nconst meta: Meta<typeof OverlayLoader> = {\n title: \"Components/Overlay Loader\",\n component: OverlayLoader,\n parameters: {\n layout: \"padded\"\n },\n decorators: [\n Story => (\n <div>\n <Story />\n The OverlayLoader component covers its parent container with a semi-transparent\n overlay, typically used to indicate a loading state while keeping the background\n content visible but inactive.\n </div>\n )\n ]\n};\n\nexport default meta;\ntype Story = StoryObj<typeof OverlayLoader>;\n\nexport const Documentation: Story = {\n args: {\n size: \"lg\",\n variant: \"accent\",\n indeterminate: true,\n value: 66,\n min: 0,\n max: 100,\n text: \"Loading...\",\n className: undefined\n },\n argTypes: {\n size: {\n description: \"Size of the loader\",\n control: \"select\",\n options: [\"xs\", \"sm\", \"md\", \"lg\"]\n },\n variant: {\n description: \"Visual style variant of the loader\",\n control: \"select\",\n options: [\"accent\", \"subtle\", \"negative\"]\n },\n indeterminate: {\n description: \"Whether the loader should show indeterminate progress\",\n control: \"boolean\"\n },\n value: {\n description: \"Current progress value (when not indeterminate)\",\n control: { type: \"number\", min: 0, max: 100 }\n },\n min: {\n description: \"Minimum value for progress calculation\",\n control: \"number\"\n },\n max: {\n description: \"Maximum value for progress calculation\",\n control: \"number\"\n },\n text: {\n description: \"Optional text to display below the loader\",\n control: \"text\"\n },\n className: {\n description:\n \"Additional CSS class names. You can pass multiple class names, separated by commas or spaces.\"\n }\n }\n};\n\nexport const Default: Story = {};\n\nexport const CircularProgressWithText: Story = {\n name: \"With text\",\n args: {\n text: \"Loading...\"\n }\n};\n"],"names":["meta","OverlayLoader","Story","Documentation","undefined","Default","CircularProgressWithText"],"mappings":";;AAIA,MAAMA,OAAmC;IACrC,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;IACA,YAAY;QACRC,CAAAA,QAAAA,WAAAA,GACI,oBAAC,2BACG,oBAACA,OAAAA,OAAQ;KAMpB;AACL;AAEA,8BAAeF;AAGR,MAAMG,gBAAuB;IAChC,MAAM;QACF,MAAM;QACN,SAAS;QACT,eAAe;QACf,OAAO;QACP,KAAK;QACL,KAAK;QACL,MAAM;QACN,WAAWC;IACf;IACA,UAAU;QACN,MAAM;YACF,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAM;gBAAM;gBAAM;aAAK;QACrC;QACA,SAAS;YACL,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAU;gBAAU;aAAW;QAC7C;QACA,eAAe;YACX,aAAa;YACb,SAAS;QACb;QACA,OAAO;YACH,aAAa;YACb,SAAS;gBAAE,MAAM;gBAAU,KAAK;gBAAG,KAAK;YAAI;QAChD;QACA,KAAK;YACD,aAAa;YACb,SAAS;QACb;QACA,KAAK;YACD,aAAa;YACb,SAAS;QACb;QACA,MAAM;YACF,aAAa;YACb,SAAS;QACb;QACA,WAAW;YACP,aACI;QACR;IACJ;AACJ;AAEO,MAAMC,UAAiB,CAAC;AAExB,MAAMC,2BAAkC;IAC3C,MAAM;IACN,MAAM;QACF,MAAM;IACV;AACJ"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type TextProps } from "../Text/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Styling for compiled markdown BLOCKS.
|
|
5
|
+
*
|
|
6
|
+
* Tailwind's preflight strips list markers and paragraph margins, and the markdown compiler emits
|
|
7
|
+
* bare elements, so without this a list renders as unindented run-on text and a fenced code block as
|
|
8
|
+
* plain prose. Child selectors rather than a global stylesheet, so this reaches only markdown that
|
|
9
|
+
* was asked to be styled.
|
|
10
|
+
*
|
|
11
|
+
* Exported for a caller that needs the classes without this component, e.g. one already rendering
|
|
12
|
+
* compiled markdown inside its own element.
|
|
13
|
+
*/
|
|
14
|
+
export declare const markdownBlockClasses: string;
|
|
15
|
+
export interface MarkdownProps extends Pick<TextProps, "size" | "className"> {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Renders markdown that contains block content: paragraphs, lists, fenced code.
|
|
20
|
+
*
|
|
21
|
+
* `Alert`, `Label` and the form-field descriptions call `compileMarkdown` directly and need none of
|
|
22
|
+
* this, because they render a sentence with a bold word or a link. Reach for this component when the
|
|
23
|
+
* source is long-form and its structure has to survive.
|
|
24
|
+
*
|
|
25
|
+
* Renders a `div`, since `Text` is a span by default and block markdown nested in one is invalid.
|
|
26
|
+
*/
|
|
27
|
+
declare const MarkdownBase: ({ children, size, className }: MarkdownProps) => React.JSX.Element;
|
|
28
|
+
declare const Markdown: typeof MarkdownBase & {
|
|
29
|
+
original: typeof MarkdownBase;
|
|
30
|
+
originalName: string;
|
|
31
|
+
displayName: string;
|
|
32
|
+
} & {
|
|
33
|
+
original: typeof MarkdownBase & {
|
|
34
|
+
original: typeof MarkdownBase;
|
|
35
|
+
originalName: string;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
originalName: string;
|
|
39
|
+
displayName: string;
|
|
40
|
+
} & {
|
|
41
|
+
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof MarkdownBase & {
|
|
42
|
+
original: typeof MarkdownBase;
|
|
43
|
+
originalName: string;
|
|
44
|
+
displayName: string;
|
|
45
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
46
|
+
};
|
|
47
|
+
export { Markdown };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { cn, makeDecoratable } from "../utils.js";
|
|
3
|
+
import { Text } from "../Text/index.js";
|
|
4
|
+
import { useAdminUi } from "../AdminUiProvider/index.js";
|
|
5
|
+
const markdownBlockClasses = "[&_p]:mb-xs [&_p:last-child]:mb-0 [&_ul]:mb-xs [&_ul]:list-disc [&_ul]:pl-lg [&_ol]:mb-xs [&_ol]:list-decimal [&_ol]:pl-lg [&_li]:mt-xxs [&_strong]:font-semibold [&_a]:underline [&_code]:rounded [&_code]:bg-neutral-subtle [&_code]:px-xs [&_code]:font-mono [&_pre]:mb-xs [&_pre]:overflow-x-auto [&_pre]:rounded [&_pre]:bg-neutral-subtle [&_pre]:p-sm";
|
|
6
|
+
const MarkdownBase = ({ children, size = "sm", className })=>{
|
|
7
|
+
const { compileMarkdown } = useAdminUi();
|
|
8
|
+
return /*#__PURE__*/ react.createElement(Text, {
|
|
9
|
+
as: "div",
|
|
10
|
+
size: size,
|
|
11
|
+
className: cn(markdownBlockClasses, className)
|
|
12
|
+
}, compileMarkdown(children));
|
|
13
|
+
};
|
|
14
|
+
const Markdown = makeDecoratable("Markdown", MarkdownBase);
|
|
15
|
+
export { Markdown, markdownBlockClasses };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=Markdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdown/Markdown.js","sources":["../../src/Markdown/Markdown.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn, makeDecoratable } from \"~/utils.js\";\nimport { Text, type TextProps } from \"~/Text/index.js\";\nimport { useAdminUi } from \"~/AdminUiProvider/index.js\";\n\n/**\n * Styling for compiled markdown BLOCKS.\n *\n * Tailwind's preflight strips list markers and paragraph margins, and the markdown compiler emits\n * bare elements, so without this a list renders as unindented run-on text and a fenced code block as\n * plain prose. Child selectors rather than a global stylesheet, so this reaches only markdown that\n * was asked to be styled.\n *\n * Exported for a caller that needs the classes without this component, e.g. one already rendering\n * compiled markdown inside its own element.\n */\nexport const markdownBlockClasses = [\n \"[&_p]:mb-xs [&_p:last-child]:mb-0\",\n \"[&_ul]:mb-xs [&_ul]:list-disc [&_ul]:pl-lg\",\n \"[&_ol]:mb-xs [&_ol]:list-decimal [&_ol]:pl-lg\",\n \"[&_li]:mt-xxs\",\n \"[&_strong]:font-semibold\",\n \"[&_a]:underline\",\n \"[&_code]:rounded [&_code]:bg-neutral-subtle [&_code]:px-xs [&_code]:font-mono\",\n \"[&_pre]:mb-xs [&_pre]:overflow-x-auto [&_pre]:rounded [&_pre]:bg-neutral-subtle [&_pre]:p-sm\"\n].join(\" \");\n\nexport interface MarkdownProps extends Pick<TextProps, \"size\" | \"className\"> {\n children: React.ReactNode;\n}\n\n/**\n * Renders markdown that contains block content: paragraphs, lists, fenced code.\n *\n * `Alert`, `Label` and the form-field descriptions call `compileMarkdown` directly and need none of\n * this, because they render a sentence with a bold word or a link. Reach for this component when the\n * source is long-form and its structure has to survive.\n *\n * Renders a `div`, since `Text` is a span by default and block markdown nested in one is invalid.\n */\nconst MarkdownBase = ({ children, size = \"sm\", className }: MarkdownProps) => {\n const { compileMarkdown } = useAdminUi();\n\n return (\n <Text as=\"div\" size={size} className={cn(markdownBlockClasses, className)}>\n {compileMarkdown(children)}\n </Text>\n );\n};\n\nconst Markdown = makeDecoratable(\"Markdown\", MarkdownBase);\n\nexport { Markdown };\n"],"names":["markdownBlockClasses","MarkdownBase","children","size","className","compileMarkdown","useAdminUi","Text","cn","Markdown","makeDecoratable"],"mappings":";;;;AAgBO,MAAMA,uBAAuB;AAwBpC,MAAMC,eAAe,CAAC,EAAEC,QAAQ,EAAEC,OAAO,IAAI,EAAEC,SAAS,EAAiB;IACrE,MAAM,EAAEC,eAAe,EAAE,GAAGC;IAE5B,OAAO,WAAP,GACI,oBAACC,MAAIA;QAAC,IAAG;QAAM,MAAMJ;QAAM,WAAWK,GAAGR,sBAAsBI;OAC1DC,gBAAgBH;AAG7B;AAEA,MAAMO,WAAWC,gBAAgB,YAAYT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Markdown.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Markdown.js";
|
|
@@ -2,21 +2,22 @@ import React from "react";
|
|
|
2
2
|
import type { MultiAutoCompletePrimitiveProps } from "./primitives/index.js";
|
|
3
3
|
import type { FormComponentProps } from "../FormComponent/index.js";
|
|
4
4
|
type MultiAutoCompleteProps = MultiAutoCompletePrimitiveProps & FormComponentProps;
|
|
5
|
-
declare const
|
|
6
|
-
|
|
5
|
+
declare const DecoratableMultiAutoComplete: ({ label, description, note, hint, required, disabled, validation, ...props }: MultiAutoCompleteProps) => React.JSX.Element;
|
|
6
|
+
declare const MultiAutoComplete: typeof DecoratableMultiAutoComplete & {
|
|
7
|
+
original: typeof DecoratableMultiAutoComplete;
|
|
7
8
|
originalName: string;
|
|
8
9
|
displayName: string;
|
|
9
10
|
} & {
|
|
10
|
-
original:
|
|
11
|
-
original:
|
|
11
|
+
original: typeof DecoratableMultiAutoComplete & {
|
|
12
|
+
original: typeof DecoratableMultiAutoComplete;
|
|
12
13
|
originalName: string;
|
|
13
14
|
displayName: string;
|
|
14
15
|
};
|
|
15
16
|
originalName: string;
|
|
16
17
|
displayName: string;
|
|
17
18
|
} & {
|
|
18
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
19
|
-
original:
|
|
19
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableMultiAutoComplete & {
|
|
20
|
+
original: typeof DecoratableMultiAutoComplete;
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiAutoComplete/MultiAutoComplete.stories.js","sources":["../../src/MultiAutoComplete/MultiAutoComplete.stories.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react
|
|
1
|
+
{"version":3,"file":"MultiAutoComplete/MultiAutoComplete.stories.js","sources":["../../src/MultiAutoComplete/MultiAutoComplete.stories.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { MultiAutoComplete } from \"./MultiAutoComplete.js\";\n\nconst meta: Meta<typeof MultiAutoComplete> = {\n title: \"Components/Form/Multi AutoComplete\",\n component: MultiAutoComplete,\n argTypes: {\n onValuesChange: { action: \"onValuesChange\" },\n onOpenChange: { action: \"onOpenChange\" },\n disabled: {\n control: \"boolean\",\n defaultValue: false\n }\n },\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [values, setValues] = useState(args.values);\n return <MultiAutoComplete {...args} values={values} onValuesChange={setValues} />;\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof MultiAutoComplete>;\n\nexport const Default: Story = {\n args: {\n options: [\n \"Eastern Standard Time (EST)\",\n \"Central Standard Time (CST)\",\n \"Pacific Standard Time (PST)\",\n \"Greenwich Mean Time (GMT)\",\n \"Central European Time (CET)\",\n \"Central Africa Time (CAT)\",\n \"India Standard Time (IST)\",\n \"China Standard Time (CST)\",\n \"Japan Standard Time (JST)\",\n \"Australian Western Standard Time (AWST)\",\n \"New Zealand Standard Time (NZST)\",\n \"Fiji Time (FJT)\",\n \"Argentina Time (ART)\",\n \"Bolivia Time (BOT)\",\n \"Brasilia Time (BRT)\"\n ]\n }\n};\n\nexport const WithLabel: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\"\n }\n};\n\nexport const WithRequiredLabel: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n required: true\n }\n};\n\nexport const WithDescription: Story = {\n args: {\n ...Default.args,\n description: \"Provide the required information for processing your request.\"\n }\n};\n\nexport const WithNotes: Story = {\n args: {\n ...Default.args,\n note: \"Note: Ensure your selection or input is accurate before proceeding.\"\n }\n};\n\nexport const WithErrors: Story = {\n args: {\n ...Default.args,\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Disabled: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n disabled: true\n }\n};\n\nexport const FullExample: Story = {\n args: {\n ...Default.args,\n label: \"Any field label\",\n required: true,\n description: \"Provide the required information for processing your request.\",\n note: \"Note: Ensure your selection or input is accurate before proceeding.\",\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Documentation: Story = {\n render: args => {\n const [values, setValues] = useState(args.values || []);\n const [validation, setValidation] = useState({ isValid: true, message: \"\" });\n\n // Update validation when values change\n useEffect(() => {\n if (args.required && (!values || values.length === 0)) {\n setValidation({ isValid: false, message: \"Please select at least one option\" });\n } else {\n setValidation({ isValid: true, message: \"\" });\n }\n }, [values, args.required]);\n\n return (\n <MultiAutoComplete\n {...args}\n values={values}\n onValuesChange={setValues}\n validation={validation}\n />\n );\n },\n args: {\n label: \"Time Zones\",\n description: \"Select one or more time zones\",\n placeholder: \"Search or select time zones\",\n required: true,\n allowFreeInput: true,\n note: \"You can add custom time zones if needed\",\n options: [\n \"Eastern Standard Time (EST)\",\n \"Central Standard Time (CST)\",\n \"Pacific Standard Time (PST)\",\n \"Greenwich Mean Time (GMT)\"\n ],\n values: [],\n onValuesChange: undefined,\n disabled: false,\n validation: undefined,\n onOpenChange: undefined\n },\n argTypes: {\n label: {\n description: \"Label text for the component\",\n control: \"text\"\n },\n description: {\n description: \"Additional description text displayed below the label\",\n control: \"text\"\n },\n placeholder: {\n description: \"Placeholder text for the input\",\n control: \"text\"\n },\n required: {\n description: \"Marks the field as required when true\",\n control: \"boolean\"\n },\n disabled: {\n description: \"Disables the component when set to true\",\n control: \"boolean\"\n },\n allowFreeInput: {\n description: \"Allows users to add custom values not in the options list\",\n control: \"boolean\"\n },\n note: {\n description: \"Additional note text displayed below the component\",\n control: \"text\"\n },\n options: {\n description: \"Array of options to display in the dropdown\",\n control: \"object\"\n },\n values: {\n description: \"Array of currently selected values\",\n control: \"object\"\n },\n onValuesChange: {\n description: \"Callback fired when selected values change\"\n },\n validation: {\n description:\n \"Object containing validation state and message. Please refer to the example code for details on usage.\"\n },\n onOpenChange: {\n description:\n \"Callback triggered when the dropdown opens or closes, allowing you to respond to changes in its open state.\"\n }\n }\n};\n"],"names":["meta","MultiAutoComplete","args","values","setValues","useState","Default","WithLabel","WithRequiredLabel","WithDescription","WithNotes","WithErrors","Disabled","FullExample","Documentation","validation","setValidation","useEffect","undefined"],"mappings":";;AAIA,MAAMA,OAAuC;IACzC,OAAO;IACP,WAAWC;IACX,UAAU;QACN,gBAAgB;YAAE,QAAQ;QAAiB;QAC3C,cAAc;YAAE,QAAQ;QAAe;QACvC,UAAU;YACN,SAAS;YACT,cAAc;QAClB;IACJ;IACA,YAAY;QACR,QAAQ;IACZ;IACA,QAAQC,CAAAA;QACJ,MAAM,CAACC,QAAQC,UAAU,GAAGC,SAASH,KAAK,MAAM;QAChD,OAAO,WAAP,GAAO,oBAACD,mBAAiBA;YAAE,GAAGC,IAAI;YAAE,QAAQC;YAAQ,gBAAgBC;;IACxE;AACJ;AAEA,kCAAeJ;AAGR,MAAMM,UAAiB;IAC1B,MAAM;QACF,SAAS;YACL;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACH;IACL;AACJ;AAEO,MAAMC,YAAmB;IAC5B,MAAM;QACF,GAAGD,QAAQ,IAAI;QACf,OAAO;IACX;AACJ;AAEO,MAAME,oBAA2B;IACpC,MAAM;QACF,GAAGF,QAAQ,IAAI;QACf,OAAO;QACP,UAAU;IACd;AACJ;AAEO,MAAMG,kBAAyB;IAClC,MAAM;QACF,GAAGH,QAAQ,IAAI;QACf,aAAa;IACjB;AACJ;AAEO,MAAMI,YAAmB;IAC5B,MAAM;QACF,GAAGJ,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMK,aAAoB;IAC7B,MAAM;QACF,GAAGL,QAAQ,IAAI;QACf,YAAY;YACR,SAAS;YACT,SAAS;QACb;IACJ;AACJ;AAEO,MAAMM,WAAkB;IAC3B,MAAM;QACF,GAAGN,QAAQ,IAAI;QACf,OAAO;QACP,UAAU;IACd;AACJ;AAEO,MAAMO,cAAqB;IAC9B,MAAM;QACF,GAAGP,QAAQ,IAAI;QACf,OAAO;QACP,UAAU;QACV,aAAa;QACb,MAAM;QACN,YAAY;YACR,SAAS;YACT,SAAS;QACb;IACJ;AACJ;AAEO,MAAMQ,gBAAuB;IAChC,QAAQZ,CAAAA;QACJ,MAAM,CAACC,QAAQC,UAAU,GAAGC,SAASH,KAAK,MAAM,IAAI,EAAE;QACtD,MAAM,CAACa,YAAYC,cAAc,GAAGX,SAAS;YAAE,SAAS;YAAM,SAAS;QAAG;QAG1EY,UAAU;YACFf,KAAK,QAAQ,IAAK,EAACC,UAAUA,AAAkB,MAAlBA,OAAO,MAAM,AAAK,IAC/Ca,cAAc;gBAAE,SAAS;gBAAO,SAAS;YAAoC,KAE7EA,cAAc;gBAAE,SAAS;gBAAM,SAAS;YAAG;QAEnD,GAAG;YAACb;YAAQD,KAAK,QAAQ;SAAC;QAE1B,OAAO,WAAP,GACI,oBAACD,mBAAiBA;YACb,GAAGC,IAAI;YACR,QAAQC;YACR,gBAAgBC;YAChB,YAAYW;;IAGxB;IACA,MAAM;QACF,OAAO;QACP,aAAa;QACb,aAAa;QACb,UAAU;QACV,gBAAgB;QAChB,MAAM;QACN,SAAS;YACL;YACA;YACA;YACA;SACH;QACD,QAAQ,EAAE;QACV,gBAAgBG;QAChB,UAAU;QACV,YAAYA;QACZ,cAAcA;IAClB;IACA,UAAU;QACN,OAAO;YACH,aAAa;YACb,SAAS;QACb;QACA,aAAa;YACT,aAAa;YACb,SAAS;QACb;QACA,aAAa;YACT,aAAa;YACb,SAAS;QACb;QACA,UAAU;YACN,aAAa;YACb,SAAS;QACb;QACA,UAAU;YACN,aAAa;YACb,SAAS;QACb;QACA,gBAAgB;YACZ,aAAa;YACb,SAAS;QACb;QACA,MAAM;YACF,aAAa;YACb,SAAS;QACb;QACA,SAAS;YACL,aAAa;YACb,SAAS;QACb;QACA,QAAQ;YACJ,aAAa;YACb,SAAS;QACb;QACA,gBAAgB;YACZ,aAAa;QACjB;QACA,YAAY;YACR,aACI;QACR;QACA,cAAc;YACV,aACI;QACR;IACJ;AACJ"}
|
|
@@ -82,6 +82,12 @@ interface MultiAutoCompletePrimitiveProps {
|
|
|
82
82
|
* Custom renderer for the selected options.
|
|
83
83
|
*/
|
|
84
84
|
selectedOptionRenderer?: (item: any, index: number) => React.ReactNode;
|
|
85
|
+
/**
|
|
86
|
+
* Filter the options by the typed text on the client. Defaults to `true`.
|
|
87
|
+
* Set to `false` when `onValueSearch` already returns the matching options,
|
|
88
|
+
* so options matched on data other than their label are not dropped.
|
|
89
|
+
*/
|
|
90
|
+
shouldFilter?: boolean;
|
|
85
91
|
/**
|
|
86
92
|
* Icon to be displayed at the start of the input field.
|
|
87
93
|
*/
|
|
@@ -100,21 +106,22 @@ interface MultiAutoCompletePrimitiveProps {
|
|
|
100
106
|
*/
|
|
101
107
|
values?: string[];
|
|
102
108
|
}
|
|
103
|
-
declare const
|
|
104
|
-
|
|
109
|
+
declare const DecoratableMultiAutoCompletePrimitive: (props: MultiAutoCompletePrimitiveProps) => React.JSX.Element;
|
|
110
|
+
declare const MultiAutoCompletePrimitive: typeof DecoratableMultiAutoCompletePrimitive & {
|
|
111
|
+
original: typeof DecoratableMultiAutoCompletePrimitive;
|
|
105
112
|
originalName: string;
|
|
106
113
|
displayName: string;
|
|
107
114
|
} & {
|
|
108
|
-
original:
|
|
109
|
-
original:
|
|
115
|
+
original: typeof DecoratableMultiAutoCompletePrimitive & {
|
|
116
|
+
original: typeof DecoratableMultiAutoCompletePrimitive;
|
|
110
117
|
originalName: string;
|
|
111
118
|
displayName: string;
|
|
112
119
|
};
|
|
113
120
|
originalName: string;
|
|
114
121
|
displayName: string;
|
|
115
122
|
} & {
|
|
116
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
117
|
-
original:
|
|
123
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableMultiAutoCompletePrimitive & {
|
|
124
|
+
original: typeof DecoratableMultiAutoCompletePrimitive;
|
|
118
125
|
originalName: string;
|
|
119
126
|
displayName: string;
|
|
120
127
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -35,6 +35,7 @@ const DecoratableMultiAutoCompletePrimitive = (props)=>{
|
|
|
35
35
|
onOpenChange: ()=>setListOpenState(true)
|
|
36
36
|
}, /*#__PURE__*/ react.createElement(Command, {
|
|
37
37
|
label: String(props.label),
|
|
38
|
+
shouldFilter: props.shouldFilter,
|
|
38
39
|
onKeyDown: handleKeyDown
|
|
39
40
|
}, /*#__PURE__*/ react.createElement(PopoverPrimitive.Trigger, {
|
|
40
41
|
asChild: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiAutoComplete/primitives/MultiAutoCompletePrimitive.js","sources":["../../../src/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.tsx"],"sourcesContent":["import type { KeyboardEvent } from \"react\";\nimport React from \"react\";\nimport { Command } from \"~/Command/index.js\";\nimport { PopoverPrimitive } from \"~/Popover/index.js\";\nimport type { InputPrimitiveProps } from \"~/Input/index.js\";\nimport { makeDecoratable } from \"~/utils.js\";\nimport { useMultiAutoComplete } from \"./useMultiAutoComplete.js\";\nimport {\n MultiAutoCompleteInput,\n MultiAutoCompleteInputIcons,\n MultiAutoCompleteList\n} from \"./components/index.js\";\nimport type { MultiAutoCompleteOption } from \"../domains/index.js\";\nimport type { Icon } from \"~/Icon/index.js\";\n\ninterface MultiAutoCompletePrimitiveProps {\n /**\n * Allows free input of values not present in the options.\n */\n allowFreeInput?: boolean;\n /**\n * Indicates if the reset action should be displayed.\n */\n displayResetAction?: boolean;\n /**\n * Indicates if the field is disabled.\n */\n disabled?: boolean;\n /**\n * Message to display when there are no options.\n */\n emptyMessage?: React.ReactNode;\n /**\n * Indicates if the input field is invalid.\n * Refer to `InputPrimitiveProps[\"invalid\"]` for possible values.\n */\n invalid?: InputPrimitiveProps[\"invalid\"];\n /**\n * Message to display when there are no options loaded or selected.\n * Use it to invite the user to interact with the autocomplete by typing a value.\n */\n initialMessage?: React.ReactNode;\n /**\n * Reference to the input element.\n */\n inputRef?: React.Ref<HTMLInputElement>;\n /**\n * Accessible label for the command menu. Not shown visibly.\n */\n label?: React.ReactNode;\n /**\n * Indicates if the autocomplete is loading options.\n */\n loading?: boolean;\n /**\n * Message to display while loading options.\n */\n loadingMessage?: React.ReactNode;\n /**\n * Callback triggered when the open state changes.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Callback triggered when a value has been searched by the user.\n */\n onValueSearch?: (value: string) => void;\n /**\n * Callback triggered when the values change.\n */\n onValuesChange: (values: string[]) => void;\n /**\n * Callback triggered to reset the values.\n */\n onValuesReset?: () => void;\n /**\n * List of options for the autocomplete.\n */\n options?: MultiAutoCompleteOption[];\n /**\n * Custom renderer for the options.\n */\n optionRenderer?: (item: any, index: number) => React.ReactNode;\n /**\n * Placeholder text for the input field.\n */\n placeholder?: string;\n /**\n * Size of the input field.\n * Refer to `InputPrimitiveProps[\"size\"]` for possible values.\n */\n size?: InputPrimitiveProps[\"size\"];\n /**\n * Custom renderer for the selected options.\n */\n selectedOptionRenderer?: (item: any, index: number) => React.ReactNode;\n /**\n * Icon to be displayed at the start of the input field.\n */\n startIcon?: React.ReactElement<typeof Icon> | React.ReactElement;\n /**\n * Ensures that each value is unique.\n */\n uniqueValues?: boolean;\n /**\n * Variant of the input field.\n * Refer to `InputPrimitiveProps[\"variant\"]` for possible values.\n */\n variant?: InputPrimitiveProps[\"variant\"];\n /**\n * Optional selected items.\n */\n values?: string[];\n}\n\nconst DecoratableMultiAutoCompletePrimitive = (props: MultiAutoCompletePrimitiveProps) => {\n const {\n vm,\n setListOpenState,\n setSelectedOption,\n searchOption,\n removeSelectedOption,\n resetSelectedOptions,\n createOption\n } = useMultiAutoComplete(props);\n\n const handleKeyDown = React.useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (props.disabled) {\n return;\n }\n\n if (!vm.optionsListVm.open) {\n setListOpenState(true);\n }\n\n if (event.key.toLowerCase() === \"escape\") {\n setListOpenState(false);\n }\n },\n [props.disabled, setListOpenState, setSelectedOption, vm.optionsListVm.open]\n );\n\n const handleSelectOption = React.useCallback(\n (value: string) => {\n setSelectedOption(value);\n setListOpenState(false);\n },\n [setSelectedOption, setListOpenState]\n );\n\n const handleCreateOption = React.useCallback(\n (value: string) => {\n createOption(value);\n setListOpenState(false);\n },\n [createOption, setListOpenState]\n );\n\n return (\n <PopoverPrimitive open={vm.optionsListVm.open} onOpenChange={() => setListOpenState(true)}>\n <Command label={String(props.label)} onKeyDown={handleKeyDown}>\n <PopoverPrimitive.Trigger asChild>\n <span>\n <MultiAutoCompleteInput\n inputRef={props.inputRef}\n value={vm.inputVm.value}\n placeholder={vm.inputVm.placeholder}\n changeValue={searchOption}\n closeList={() => setListOpenState(false)}\n openList={() => setListOpenState(true)}\n variant={props.variant}\n size={props.size}\n invalid={props.invalid}\n removeSelectedOption={removeSelectedOption}\n selectedOptionRenderer={props.selectedOptionRenderer}\n selectedOptions={vm.selectedOptionsVm.options}\n disabled={props.disabled}\n startIcon={props.startIcon}\n endIcon={\n <MultiAutoCompleteInputIcons\n inputSize={props.size}\n inputVariant={props.variant}\n displayResetAction={\n !vm.selectedOptionsVm.empty && vm.inputVm.displayResetAction\n }\n disabled={props.disabled}\n loading={props.loading}\n onResetValue={resetSelectedOptions}\n onOpenChange={() => setListOpenState(!vm.optionsListVm.open)}\n />\n }\n />\n </span>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Content\n style={{ width: \"var(--radix-popover-trigger-width)\" }}\n onOpenAutoFocus={e => e.preventDefault()}\n >\n <MultiAutoCompleteList\n emptyMessage={vm.optionsListVm.emptyMessage}\n empty={vm.optionsListVm.empty}\n loading={props.loading}\n loadingMessage={vm.optionsListVm.loadingMessage}\n onOptionCreate={handleCreateOption}\n onOptionSelect={handleSelectOption}\n optionRenderer={props.optionRenderer}\n options={vm.optionsListVm.options}\n temporaryOption={vm.temporaryOptionVm.option}\n />\n </PopoverPrimitive.Content>\n </Command>\n </PopoverPrimitive>\n );\n};\n\nconst MultiAutoCompletePrimitive = makeDecoratable(\n \"MultiAutoCompletePrimitive\",\n DecoratableMultiAutoCompletePrimitive\n);\n\nexport { MultiAutoCompletePrimitive, type MultiAutoCompletePrimitiveProps };\n"],"names":["DecoratableMultiAutoCompletePrimitive","props","vm","setListOpenState","setSelectedOption","searchOption","removeSelectedOption","resetSelectedOptions","createOption","useMultiAutoComplete","handleKeyDown","React","event","handleSelectOption","value","handleCreateOption","PopoverPrimitive","Command","String","MultiAutoCompleteInput","MultiAutoCompleteInputIcons","e","MultiAutoCompleteList","MultiAutoCompletePrimitive","makeDecoratable"],"mappings":";;;;;;AAkHA,MAAMA,wCAAwC,CAACC;IAC3C,MAAM,EACFC,EAAE,EACFC,gBAAgB,EAChBC,iBAAiB,EACjBC,YAAY,EACZC,oBAAoB,EACpBC,oBAAoB,EACpBC,YAAY,EACf,GAAGC,qBAAqBR;IAEzB,MAAMS,gBAAgBC,MAAAA,WAAiB,CACnC,CAACC;QACG,IAAIX,MAAM,QAAQ,EACd;QAGJ,IAAI,CAACC,GAAG,aAAa,CAAC,IAAI,EACtBC,iBAAiB;QAGrB,IAAIS,AAA4B,aAA5BA,MAAM,GAAG,CAAC,WAAW,IACrBT,iBAAiB;IAEzB,GACA;QAACF,MAAM,QAAQ;QAAEE;QAAkBC;QAAmBF,GAAG,aAAa,CAAC,IAAI;KAAC;IAGhF,MAAMW,qBAAqBF,MAAAA,WAAiB,CACxC,CAACG;QACGV,kBAAkBU;QAClBX,iBAAiB;IACrB,GACA;QAACC;QAAmBD;KAAiB;IAGzC,MAAMY,qBAAqBJ,MAAAA,WAAiB,CACxC,CAACG;QACGN,aAAaM;QACbX,iBAAiB;IACrB,GACA;QAACK;QAAcL;KAAiB;IAGpC,OAAO,WAAP,GACI,oBAACa,kBAAgBA;QAAC,MAAMd,GAAG,aAAa,CAAC,IAAI;QAAE,cAAc,IAAMC,iBAAiB;qBAChF,oBAACc,SAAOA;QAAC,OAAOC,OAAOjB,MAAM,KAAK;QAAG,WAAWS;qBAC5C,oBAACM,iBAAiB,OAAO;QAAC;qBACtB,oBAAC,4BACG,oBAACG,wBAAsBA;QACnB,UAAUlB,MAAM,QAAQ;QACxB,OAAOC,GAAG,OAAO,CAAC,KAAK;QACvB,aAAaA,GAAG,OAAO,CAAC,WAAW;QACnC,aAAaG;QACb,WAAW,IAAMF,iBAAiB;QAClC,UAAU,IAAMA,iBAAiB;QACjC,SAASF,MAAM,OAAO;QACtB,MAAMA,MAAM,IAAI;QAChB,SAASA,MAAM,OAAO;QACtB,sBAAsBK;QACtB,wBAAwBL,MAAM,sBAAsB;QACpD,iBAAiBC,GAAG,iBAAiB,CAAC,OAAO;QAC7C,UAAUD,MAAM,QAAQ;QACxB,WAAWA,MAAM,SAAS;QAC1B,uBACI,oBAACmB,6BAA2BA;YACxB,WAAWnB,MAAM,IAAI;YACrB,cAAcA,MAAM,OAAO;YAC3B,oBACI,CAACC,GAAG,iBAAiB,CAAC,KAAK,IAAIA,GAAG,OAAO,CAAC,kBAAkB;YAEhE,UAAUD,MAAM,QAAQ;YACxB,SAASA,MAAM,OAAO;YACtB,cAAcM;YACd,cAAc,IAAMJ,iBAAiB,CAACD,GAAG,aAAa,CAAC,IAAI;;wBAM/E,oBAACc,iBAAiB,OAAO;QACrB,OAAO;YAAE,OAAO;QAAqC;QACrD,iBAAiBK,CAAAA,IAAKA,EAAE,cAAc;qBAEtC,oBAACC,uBAAqBA;QAClB,cAAcpB,GAAG,aAAa,CAAC,YAAY;QAC3C,OAAOA,GAAG,aAAa,CAAC,KAAK;QAC7B,SAASD,MAAM,OAAO;QACtB,gBAAgBC,GAAG,aAAa,CAAC,cAAc;QAC/C,gBAAgBa;QAChB,gBAAgBF;QAChB,gBAAgBZ,MAAM,cAAc;QACpC,SAASC,GAAG,aAAa,CAAC,OAAO;QACjC,iBAAiBA,GAAG,iBAAiB,CAAC,MAAM;;AAMpE;AAEA,MAAMqB,6BAA6BC,gBAC/B,8BACAxB"}
|
|
1
|
+
{"version":3,"file":"MultiAutoComplete/primitives/MultiAutoCompletePrimitive.js","sources":["../../../src/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.tsx"],"sourcesContent":["import type { KeyboardEvent } from \"react\";\nimport React from \"react\";\nimport { Command } from \"~/Command/index.js\";\nimport { PopoverPrimitive } from \"~/Popover/index.js\";\nimport type { InputPrimitiveProps } from \"~/Input/index.js\";\nimport { makeDecoratable } from \"~/utils.js\";\nimport { useMultiAutoComplete } from \"./useMultiAutoComplete.js\";\nimport {\n MultiAutoCompleteInput,\n MultiAutoCompleteInputIcons,\n MultiAutoCompleteList\n} from \"./components/index.js\";\nimport type { MultiAutoCompleteOption } from \"../domains/index.js\";\nimport type { Icon } from \"~/Icon/index.js\";\n\ninterface MultiAutoCompletePrimitiveProps {\n /**\n * Allows free input of values not present in the options.\n */\n allowFreeInput?: boolean;\n /**\n * Indicates if the reset action should be displayed.\n */\n displayResetAction?: boolean;\n /**\n * Indicates if the field is disabled.\n */\n disabled?: boolean;\n /**\n * Message to display when there are no options.\n */\n emptyMessage?: React.ReactNode;\n /**\n * Indicates if the input field is invalid.\n * Refer to `InputPrimitiveProps[\"invalid\"]` for possible values.\n */\n invalid?: InputPrimitiveProps[\"invalid\"];\n /**\n * Message to display when there are no options loaded or selected.\n * Use it to invite the user to interact with the autocomplete by typing a value.\n */\n initialMessage?: React.ReactNode;\n /**\n * Reference to the input element.\n */\n inputRef?: React.Ref<HTMLInputElement>;\n /**\n * Accessible label for the command menu. Not shown visibly.\n */\n label?: React.ReactNode;\n /**\n * Indicates if the autocomplete is loading options.\n */\n loading?: boolean;\n /**\n * Message to display while loading options.\n */\n loadingMessage?: React.ReactNode;\n /**\n * Callback triggered when the open state changes.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Callback triggered when a value has been searched by the user.\n */\n onValueSearch?: (value: string) => void;\n /**\n * Callback triggered when the values change.\n */\n onValuesChange: (values: string[]) => void;\n /**\n * Callback triggered to reset the values.\n */\n onValuesReset?: () => void;\n /**\n * List of options for the autocomplete.\n */\n options?: MultiAutoCompleteOption[];\n /**\n * Custom renderer for the options.\n */\n optionRenderer?: (item: any, index: number) => React.ReactNode;\n /**\n * Placeholder text for the input field.\n */\n placeholder?: string;\n /**\n * Size of the input field.\n * Refer to `InputPrimitiveProps[\"size\"]` for possible values.\n */\n size?: InputPrimitiveProps[\"size\"];\n /**\n * Custom renderer for the selected options.\n */\n selectedOptionRenderer?: (item: any, index: number) => React.ReactNode;\n /**\n * Filter the options by the typed text on the client. Defaults to `true`.\n * Set to `false` when `onValueSearch` already returns the matching options,\n * so options matched on data other than their label are not dropped.\n */\n shouldFilter?: boolean;\n /**\n * Icon to be displayed at the start of the input field.\n */\n startIcon?: React.ReactElement<typeof Icon> | React.ReactElement;\n /**\n * Ensures that each value is unique.\n */\n uniqueValues?: boolean;\n /**\n * Variant of the input field.\n * Refer to `InputPrimitiveProps[\"variant\"]` for possible values.\n */\n variant?: InputPrimitiveProps[\"variant\"];\n /**\n * Optional selected items.\n */\n values?: string[];\n}\n\nconst DecoratableMultiAutoCompletePrimitive = (props: MultiAutoCompletePrimitiveProps) => {\n const {\n vm,\n setListOpenState,\n setSelectedOption,\n searchOption,\n removeSelectedOption,\n resetSelectedOptions,\n createOption\n } = useMultiAutoComplete(props);\n\n const handleKeyDown = React.useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (props.disabled) {\n return;\n }\n\n if (!vm.optionsListVm.open) {\n setListOpenState(true);\n }\n\n if (event.key.toLowerCase() === \"escape\") {\n setListOpenState(false);\n }\n },\n [props.disabled, setListOpenState, setSelectedOption, vm.optionsListVm.open]\n );\n\n const handleSelectOption = React.useCallback(\n (value: string) => {\n setSelectedOption(value);\n setListOpenState(false);\n },\n [setSelectedOption, setListOpenState]\n );\n\n const handleCreateOption = React.useCallback(\n (value: string) => {\n createOption(value);\n setListOpenState(false);\n },\n [createOption, setListOpenState]\n );\n\n return (\n <PopoverPrimitive open={vm.optionsListVm.open} onOpenChange={() => setListOpenState(true)}>\n <Command\n label={String(props.label)}\n shouldFilter={props.shouldFilter}\n onKeyDown={handleKeyDown}\n >\n <PopoverPrimitive.Trigger asChild>\n <span>\n <MultiAutoCompleteInput\n inputRef={props.inputRef}\n value={vm.inputVm.value}\n placeholder={vm.inputVm.placeholder}\n changeValue={searchOption}\n closeList={() => setListOpenState(false)}\n openList={() => setListOpenState(true)}\n variant={props.variant}\n size={props.size}\n invalid={props.invalid}\n removeSelectedOption={removeSelectedOption}\n selectedOptionRenderer={props.selectedOptionRenderer}\n selectedOptions={vm.selectedOptionsVm.options}\n disabled={props.disabled}\n startIcon={props.startIcon}\n endIcon={\n <MultiAutoCompleteInputIcons\n inputSize={props.size}\n inputVariant={props.variant}\n displayResetAction={\n !vm.selectedOptionsVm.empty && vm.inputVm.displayResetAction\n }\n disabled={props.disabled}\n loading={props.loading}\n onResetValue={resetSelectedOptions}\n onOpenChange={() => setListOpenState(!vm.optionsListVm.open)}\n />\n }\n />\n </span>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Content\n style={{ width: \"var(--radix-popover-trigger-width)\" }}\n onOpenAutoFocus={e => e.preventDefault()}\n >\n <MultiAutoCompleteList\n emptyMessage={vm.optionsListVm.emptyMessage}\n empty={vm.optionsListVm.empty}\n loading={props.loading}\n loadingMessage={vm.optionsListVm.loadingMessage}\n onOptionCreate={handleCreateOption}\n onOptionSelect={handleSelectOption}\n optionRenderer={props.optionRenderer}\n options={vm.optionsListVm.options}\n temporaryOption={vm.temporaryOptionVm.option}\n />\n </PopoverPrimitive.Content>\n </Command>\n </PopoverPrimitive>\n );\n};\n\nconst MultiAutoCompletePrimitive = makeDecoratable(\n \"MultiAutoCompletePrimitive\",\n DecoratableMultiAutoCompletePrimitive\n);\n\nexport { MultiAutoCompletePrimitive, type MultiAutoCompletePrimitiveProps };\n"],"names":["DecoratableMultiAutoCompletePrimitive","props","vm","setListOpenState","setSelectedOption","searchOption","removeSelectedOption","resetSelectedOptions","createOption","useMultiAutoComplete","handleKeyDown","React","event","handleSelectOption","value","handleCreateOption","PopoverPrimitive","Command","String","MultiAutoCompleteInput","MultiAutoCompleteInputIcons","e","MultiAutoCompleteList","MultiAutoCompletePrimitive","makeDecoratable"],"mappings":";;;;;;AAwHA,MAAMA,wCAAwC,CAACC;IAC3C,MAAM,EACFC,EAAE,EACFC,gBAAgB,EAChBC,iBAAiB,EACjBC,YAAY,EACZC,oBAAoB,EACpBC,oBAAoB,EACpBC,YAAY,EACf,GAAGC,qBAAqBR;IAEzB,MAAMS,gBAAgBC,MAAAA,WAAiB,CACnC,CAACC;QACG,IAAIX,MAAM,QAAQ,EACd;QAGJ,IAAI,CAACC,GAAG,aAAa,CAAC,IAAI,EACtBC,iBAAiB;QAGrB,IAAIS,AAA4B,aAA5BA,MAAM,GAAG,CAAC,WAAW,IACrBT,iBAAiB;IAEzB,GACA;QAACF,MAAM,QAAQ;QAAEE;QAAkBC;QAAmBF,GAAG,aAAa,CAAC,IAAI;KAAC;IAGhF,MAAMW,qBAAqBF,MAAAA,WAAiB,CACxC,CAACG;QACGV,kBAAkBU;QAClBX,iBAAiB;IACrB,GACA;QAACC;QAAmBD;KAAiB;IAGzC,MAAMY,qBAAqBJ,MAAAA,WAAiB,CACxC,CAACG;QACGN,aAAaM;QACbX,iBAAiB;IACrB,GACA;QAACK;QAAcL;KAAiB;IAGpC,OAAO,WAAP,GACI,oBAACa,kBAAgBA;QAAC,MAAMd,GAAG,aAAa,CAAC,IAAI;QAAE,cAAc,IAAMC,iBAAiB;qBAChF,oBAACc,SAAOA;QACJ,OAAOC,OAAOjB,MAAM,KAAK;QACzB,cAAcA,MAAM,YAAY;QAChC,WAAWS;qBAEX,oBAACM,iBAAiB,OAAO;QAAC;qBACtB,oBAAC,4BACG,oBAACG,wBAAsBA;QACnB,UAAUlB,MAAM,QAAQ;QACxB,OAAOC,GAAG,OAAO,CAAC,KAAK;QACvB,aAAaA,GAAG,OAAO,CAAC,WAAW;QACnC,aAAaG;QACb,WAAW,IAAMF,iBAAiB;QAClC,UAAU,IAAMA,iBAAiB;QACjC,SAASF,MAAM,OAAO;QACtB,MAAMA,MAAM,IAAI;QAChB,SAASA,MAAM,OAAO;QACtB,sBAAsBK;QACtB,wBAAwBL,MAAM,sBAAsB;QACpD,iBAAiBC,GAAG,iBAAiB,CAAC,OAAO;QAC7C,UAAUD,MAAM,QAAQ;QACxB,WAAWA,MAAM,SAAS;QAC1B,uBACI,oBAACmB,6BAA2BA;YACxB,WAAWnB,MAAM,IAAI;YACrB,cAAcA,MAAM,OAAO;YAC3B,oBACI,CAACC,GAAG,iBAAiB,CAAC,KAAK,IAAIA,GAAG,OAAO,CAAC,kBAAkB;YAEhE,UAAUD,MAAM,QAAQ;YACxB,SAASA,MAAM,OAAO;YACtB,cAAcM;YACd,cAAc,IAAMJ,iBAAiB,CAACD,GAAG,aAAa,CAAC,IAAI;;wBAM/E,oBAACc,iBAAiB,OAAO;QACrB,OAAO;YAAE,OAAO;QAAqC;QACrD,iBAAiBK,CAAAA,IAAKA,EAAE,cAAc;qBAEtC,oBAACC,uBAAqBA;QAClB,cAAcpB,GAAG,aAAa,CAAC,YAAY;QAC3C,OAAOA,GAAG,aAAa,CAAC,KAAK;QAC7B,SAASD,MAAM,OAAO;QACtB,gBAAgBC,GAAG,aAAa,CAAC,cAAc;QAC/C,gBAAgBa;QAChB,gBAAgBF;QAChB,gBAAgBZ,MAAM,cAAc;QACpC,SAASC,GAAG,aAAa,CAAC,OAAO;QACjC,iBAAiBA,GAAG,iBAAiB,CAAC,MAAM;;AAMpE;AAEA,MAAMqB,6BAA6BC,gBAC/B,8BACAxB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { MultiAutoCompletePrimitive } from "./MultiAutoCompletePrimitive.js";
|
|
3
3
|
declare const meta: Meta<typeof MultiAutoCompletePrimitive>;
|
|
4
4
|
export default meta;
|