@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
package/Toggle/Toggle.d.ts
CHANGED
|
@@ -2,21 +2,22 @@ import React from "react";
|
|
|
2
2
|
import type { TogglePrimitiveProps } from "./primitives/index.js";
|
|
3
3
|
import type { FormComponentProps } from "../FormComponent/index.js";
|
|
4
4
|
type ToggleProps = TogglePrimitiveProps & FormComponentProps;
|
|
5
|
-
declare const
|
|
6
|
-
|
|
5
|
+
declare const DecoratableToggle: ({ note, validation, ...props }: ToggleProps) => React.JSX.Element;
|
|
6
|
+
declare const Toggle: typeof DecoratableToggle & {
|
|
7
|
+
original: typeof DecoratableToggle;
|
|
7
8
|
originalName: string;
|
|
8
9
|
displayName: string;
|
|
9
10
|
} & {
|
|
10
|
-
original:
|
|
11
|
-
original:
|
|
11
|
+
original: typeof DecoratableToggle & {
|
|
12
|
+
original: typeof DecoratableToggle;
|
|
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 DecoratableToggle & {
|
|
20
|
+
original: typeof DecoratableToggle;
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle/Toggle.stories.js","sources":["../../src/Toggle/Toggle.stories.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react
|
|
1
|
+
{"version":3,"file":"Toggle/Toggle.stories.js","sources":["../../src/Toggle/Toggle.stories.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { ReactComponent as BoldIcon } from \"@webiny/icons/format_bold.svg\";\nimport { Tooltip } from \"~/Tooltip/index.js\";\nimport { Toggle } from \"~/Toggle/index.js\";\n\nconst meta: Meta<typeof Toggle> = {\n title: \"Components/Form/Toggle\",\n component: Toggle,\n parameters: {\n layout: \"padded\"\n },\n argTypes: {\n disabled: {\n control: \"boolean\",\n defaultValue: false\n }\n },\n decorators: [\n Story => (\n <Tooltip.Provider>\n <Story />\n </Tooltip.Provider>\n )\n ],\n render: args => {\n const [checked, setChecked] = useState(args.checked);\n return <Toggle {...args} checked={checked} onChange={value => setChecked(value)} />;\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Toggle>;\n\nexport const Default: Story = {\n args: {\n label: \"Toggle\"\n }\n};\n\nexport const Checked: Story = {\n args: {\n label: \"Toggle\",\n checked: true\n }\n};\n\nexport const WithIcon: Story = {\n args: {\n label: \"Bold\",\n icon: <BoldIcon />\n }\n};\n\nexport const WithIconChecked: Story = {\n args: {\n label: \"Bold\",\n icon: <BoldIcon />,\n checked: true\n }\n};\n\nexport const IconOnly: Story = {\n args: {\n icon: <BoldIcon />\n }\n};\n\nexport const IconOnlyChecked: Story = {\n args: {\n icon: <BoldIcon />,\n checked: true\n }\n};\n\nexport const Outline: Story = {\n args: {\n label: \"Toggle\",\n variant: \"outline\"\n }\n};\n\nexport const Ghost: Story = {\n args: {\n label: \"Toggle\",\n variant: \"ghost\"\n }\n};\n\nexport const WithNotes: Story = {\n args: {\n label: \"Toggle\",\n note: \"Note: Ensure your selection or input is accurate before proceeding.\"\n }\n};\n\nexport const WithErrors: Story = {\n args: {\n label: \"Toggle\",\n validation: {\n isValid: false,\n message: \"This field is required.\"\n }\n }\n};\n\nexport const Disabled: Story = {\n args: {\n label: \"Toggle\",\n disabled: true\n }\n};\n\nexport const Documentation: Story = {\n render: args => {\n const [checked, setChecked] = useState(args.checked || false);\n const [validation, setValidation] = useState({ isValid: true, message: \"\" });\n\n useEffect(() => {\n setChecked(args.checked || false);\n }, [args.checked]);\n\n const handleChange = (isChecked: boolean) => {\n setChecked(isChecked);\n\n if (args.required && !isChecked) {\n setValidation({ isValid: false, message: \"This field is required\" });\n } else {\n setValidation({ isValid: true, message: \"\" });\n }\n };\n\n useEffect(() => {\n if (args.required && !checked) {\n setValidation({ isValid: false, message: \"This field is required\" });\n } else {\n setValidation({ isValid: true, message: \"\" });\n }\n }, [args.required, checked]);\n\n return (\n <Toggle\n {...args}\n checked={checked}\n onChange={handleChange}\n validation={validation}\n required={args.required}\n />\n );\n },\n args: {\n label: \"Enable feature\",\n checked: false,\n disabled: false,\n required: true,\n note: \"Note: This setting can be changed at any time.\",\n validation: undefined\n },\n argTypes: {\n label: {\n description: \"Label text displayed inside the toggle button\",\n control: \"text\"\n },\n checked: {\n description: \"Determines if the toggle is active\",\n control: \"boolean\"\n },\n disabled: {\n description: \"Disables the toggle when set to true\",\n control: \"boolean\"\n },\n required: {\n description: \"Makes the toggle required when set to true\",\n control: \"boolean\"\n },\n variant: {\n description: \"Visual style: primary (default), outline, ghost, ghost-negative\",\n control: \"select\",\n options: [\"primary\", \"outline\", \"ghost\", \"ghost-negative\"]\n },\n size: {\n description: \"Size of the toggle button\",\n control: \"select\",\n options: [\"sm\", \"md\", \"lg\", \"xl\"]\n },\n note: {\n description: \"Additional note text below the toggle\",\n control: \"text\"\n },\n validation: {\n description:\n \"Object containing validation state and message. Please refer to the example code for details on usage.\"\n },\n onChange: {\n description: \"Function called when the toggle state changes\"\n }\n }\n};\n"],"names":["meta","Toggle","Story","Tooltip","args","checked","setChecked","useState","value","Default","Checked","WithIcon","BoldIcon","WithIconChecked","IconOnly","IconOnlyChecked","Outline","Ghost","WithNotes","WithErrors","Disabled","Documentation","validation","setValidation","useEffect","handleChange","isChecked","undefined"],"mappings":"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"}
|
|
@@ -6,9 +6,9 @@ import type { ToggleItemDto, ToggleItemFormatted } from "../domains/index.js";
|
|
|
6
6
|
* Toggle Renderer
|
|
7
7
|
*/
|
|
8
8
|
declare const toggleVariants: (props?: ({
|
|
9
|
-
variant?: "
|
|
10
|
-
size?: "
|
|
11
|
-
contentLayout?: "
|
|
9
|
+
variant?: "ghost" | "ghost-negative" | "outline" | "primary" | null | undefined;
|
|
10
|
+
size?: "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
11
|
+
contentLayout?: "icon" | "text" | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
13
|
type TogglePrimitiveProps = Omit<TogglePrimitives.ToggleProps, "defaultPressed" | "onPressedChange" | "onChange" | "pressed"> & VariantProps<typeof toggleVariants> & ToggleItemDto & {
|
|
14
14
|
onChange?: (checked: boolean) => void;
|
|
@@ -16,21 +16,25 @@ type TogglePrimitiveProps = Omit<TogglePrimitives.ToggleProps, "defaultPressed"
|
|
|
16
16
|
type TogglePrimitivVm = {
|
|
17
17
|
item?: ToggleItemFormatted;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Toggle
|
|
21
|
+
*/
|
|
22
|
+
declare const DecoratableTogglePrimitive: (props: TogglePrimitiveProps) => React.JSX.Element | null;
|
|
23
|
+
declare const TogglePrimitive: typeof DecoratableTogglePrimitive & {
|
|
24
|
+
original: typeof DecoratableTogglePrimitive;
|
|
21
25
|
originalName: string;
|
|
22
26
|
displayName: string;
|
|
23
27
|
} & {
|
|
24
|
-
original:
|
|
25
|
-
original:
|
|
28
|
+
original: typeof DecoratableTogglePrimitive & {
|
|
29
|
+
original: typeof DecoratableTogglePrimitive;
|
|
26
30
|
originalName: string;
|
|
27
31
|
displayName: string;
|
|
28
32
|
};
|
|
29
33
|
originalName: string;
|
|
30
34
|
displayName: string;
|
|
31
35
|
} & {
|
|
32
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
33
|
-
original:
|
|
36
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableTogglePrimitive & {
|
|
37
|
+
original: typeof DecoratableTogglePrimitive;
|
|
34
38
|
originalName: string;
|
|
35
39
|
displayName: string;
|
|
36
40
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle/primitives/TogglePrimitive.stories.js","sources":["../../../src/Toggle/primitives/TogglePrimitive.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react
|
|
1
|
+
{"version":3,"file":"Toggle/primitives/TogglePrimitive.stories.js","sources":["../../../src/Toggle/primitives/TogglePrimitive.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { ReactComponent as BoldIcon } from \"@webiny/icons/format_bold.svg\";\nimport { TogglePrimitive } from \"./TogglePrimitive.js\";\n\nconst meta: Meta<typeof TogglePrimitive> = {\n title: \"Components/Form Primitives/Toggle\",\n component: TogglePrimitive,\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [checked, setChecked] = useState(args.checked);\n return (\n <TogglePrimitive {...args} checked={checked} onChange={value => setChecked(value)} />\n );\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof TogglePrimitive>;\n\nexport const Default: Story = {\n args: {\n label: \"Toggle\"\n }\n};\n\nexport const Checked: Story = {\n args: {\n label: \"Toggle\",\n checked: true\n }\n};\n\nexport const WithIcon: Story = {\n args: {\n label: \"Bold\",\n icon: <BoldIcon />\n }\n};\n\nexport const WithIconChecked: Story = {\n args: {\n label: \"Bold\",\n icon: <BoldIcon />,\n checked: true\n }\n};\n\nexport const WithIconTrailing: Story = {\n args: {\n label: \"Bold\",\n icon: <BoldIcon />,\n iconPosition: \"end\"\n }\n};\n\nexport const IconOnly: Story = {\n args: {\n icon: <BoldIcon />\n }\n};\n\nexport const IconOnlyChecked: Story = {\n args: {\n icon: <BoldIcon />,\n checked: true\n }\n};\n\nexport const Outline: Story = {\n args: {\n label: \"Toggle\",\n variant: \"outline\"\n }\n};\n\nexport const OutlineChecked: Story = {\n args: {\n label: \"Toggle\",\n variant: \"outline\",\n checked: true\n }\n};\n\nexport const Ghost: Story = {\n args: {\n label: \"Toggle\",\n variant: \"ghost\"\n }\n};\n\nexport const GhostChecked: Story = {\n args: {\n label: \"Toggle\",\n variant: \"ghost\",\n checked: true\n }\n};\n\nexport const SizeSmall: Story = {\n args: {\n label: \"Toggle\",\n size: \"sm\"\n }\n};\n\nexport const SizeLarge: Story = {\n args: {\n label: \"Toggle\",\n size: \"lg\"\n }\n};\n\nexport const SizeXL: Story = {\n args: {\n label: \"Toggle\",\n size: \"xl\"\n }\n};\n\nexport const Disabled: Story = {\n args: {\n label: \"Toggle\",\n disabled: true\n }\n};\n\nexport const DisabledChecked: Story = {\n args: {\n label: \"Toggle\",\n checked: true,\n disabled: true\n }\n};\n"],"names":["meta","TogglePrimitive","args","checked","setChecked","useState","value","Default","Checked","WithIcon","BoldIcon","WithIconChecked","WithIconTrailing","IconOnly","IconOnlyChecked","Outline","OutlineChecked","Ghost","GhostChecked","SizeSmall","SizeLarge","SizeXL","Disabled","DisabledChecked"],"mappings":";;;AAKA,MAAMA,OAAqC;IACvC,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;IACA,QAAQC,CAAAA;QACJ,MAAM,CAACC,SAASC,WAAW,GAAGC,SAASH,KAAK,OAAO;QACnD,OAAO,WAAP,GACI,oBAACD,iBAAeA;YAAE,GAAGC,IAAI;YAAE,SAASC;YAAS,UAAUG,CAAAA,QAASF,WAAWE;;IAEnF;AACJ;AAEA,gCAAeN;AAGR,MAAMO,UAAiB;IAC1B,MAAM;QACF,OAAO;IACX;AACJ;AAEO,MAAMC,UAAiB;IAC1B,MAAM;QACF,OAAO;QACP,SAAS;IACb;AACJ;AAEO,MAAMC,WAAkB;IAC3B,MAAM;QACF,OAAO;QACP,MAAM,WAAN,GAAM,oBAACC,gBAAQA;IACnB;AACJ;AAEO,MAAMC,kBAAyB;IAClC,MAAM;QACF,OAAO;QACP,MAAM,WAAN,GAAM,oBAACD,gBAAQA;QACf,SAAS;IACb;AACJ;AAEO,MAAME,mBAA0B;IACnC,MAAM;QACF,OAAO;QACP,MAAM,WAAN,GAAM,oBAACF,gBAAQA;QACf,cAAc;IAClB;AACJ;AAEO,MAAMG,WAAkB;IAC3B,MAAM;QACF,MAAM,WAAN,GAAM,oBAACH,gBAAQA;IACnB;AACJ;AAEO,MAAMI,kBAAyB;IAClC,MAAM;QACF,MAAM,WAAN,GAAM,oBAACJ,gBAAQA;QACf,SAAS;IACb;AACJ;AAEO,MAAMK,UAAiB;IAC1B,MAAM;QACF,OAAO;QACP,SAAS;IACb;AACJ;AAEO,MAAMC,iBAAwB;IACjC,MAAM;QACF,OAAO;QACP,SAAS;QACT,SAAS;IACb;AACJ;AAEO,MAAMC,QAAe;IACxB,MAAM;QACF,OAAO;QACP,SAAS;IACb;AACJ;AAEO,MAAMC,eAAsB;IAC/B,MAAM;QACF,OAAO;QACP,SAAS;QACT,SAAS;IACb;AACJ;AAEO,MAAMC,YAAmB;IAC5B,MAAM;QACF,OAAO;QACP,MAAM;IACV;AACJ;AAEO,MAAMC,YAAmB;IAC5B,MAAM;QACF,OAAO;QACP,MAAM;IACV;AACJ;AAEO,MAAMC,SAAgB;IACzB,MAAM;QACF,OAAO;QACP,MAAM;IACV;AACJ;AAEO,MAAMC,WAAkB;IAC3B,MAAM;QACF,OAAO;QACP,UAAU;IACd;AACJ;AAEO,MAAMC,kBAAyB;IAClC,MAAM;QACF,OAAO;QACP,SAAS;QACT,UAAU;IACd;AACJ"}
|
|
@@ -2,21 +2,22 @@ import React from "react";
|
|
|
2
2
|
import type { ToggleGroupPrimitiveProps } from "./primitives/index.js";
|
|
3
3
|
import type { FormComponentProps } from "../FormComponent/index.js";
|
|
4
4
|
type ToggleGroupProps = ToggleGroupPrimitiveProps & FormComponentProps;
|
|
5
|
-
declare const
|
|
6
|
-
|
|
5
|
+
declare const DecoratableToggleGroup: ({ label, description, note, hint, required, disabled, validation, ...props }: ToggleGroupProps) => React.JSX.Element;
|
|
6
|
+
declare const ToggleGroup: typeof DecoratableToggleGroup & {
|
|
7
|
+
original: typeof DecoratableToggleGroup;
|
|
7
8
|
originalName: string;
|
|
8
9
|
displayName: string;
|
|
9
10
|
} & {
|
|
10
|
-
original:
|
|
11
|
-
original:
|
|
11
|
+
original: typeof DecoratableToggleGroup & {
|
|
12
|
+
original: typeof DecoratableToggleGroup;
|
|
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 DecoratableToggleGroup & {
|
|
20
|
+
original: typeof DecoratableToggleGroup;
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleGroup/ToggleGroup.stories.js","sources":["../../src/ToggleGroup/ToggleGroup.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react
|
|
1
|
+
{"version":3,"file":"ToggleGroup/ToggleGroup.stories.js","sources":["../../src/ToggleGroup/ToggleGroup.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { ReactComponent as BoldIcon } from \"@webiny/icons/format_bold.svg\";\nimport { ReactComponent as ItalicIcon } from \"@webiny/icons/format_italic.svg\";\nimport { ReactComponent as UnderlineIcon } from \"@webiny/icons/format_underlined.svg\";\nimport { ReactComponent as AlignLeftIcon } from \"@webiny/icons/format_align_left.svg\";\nimport { ReactComponent as AlignCenterIcon } from \"@webiny/icons/format_align_center.svg\";\nimport { ReactComponent as AlignRightIcon } from \"@webiny/icons/format_align_right.svg\";\nimport { Tooltip } from \"~/Tooltip/index.js\";\nimport { ToggleGroup } from \"~/ToggleGroup/index.js\";\n\nconst textItems = [\n { value: \"bold\", label: \"Bold\" },\n { value: \"italic\", label: \"Italic\" },\n { value: \"underline\", label: \"Underline\" }\n];\n\nconst iconItems = [\n { value: \"left\", icon: <AlignLeftIcon /> },\n { value: \"center\", icon: <AlignCenterIcon /> },\n { value: \"right\", icon: <AlignRightIcon /> }\n];\n\nconst iconTextItems = [\n { value: \"bold\", label: \"Bold\", icon: <BoldIcon /> },\n { value: \"italic\", label: \"Italic\", icon: <ItalicIcon /> },\n { value: \"underline\", label: \"Underline\", icon: <UnderlineIcon /> }\n];\n\nconst meta: Meta<typeof ToggleGroup> = {\n title: \"Components/Form/ToggleGroup\",\n component: ToggleGroup,\n parameters: {\n layout: \"padded\"\n },\n decorators: [\n Story => (\n <Tooltip.Provider>\n <Story />\n </Tooltip.Provider>\n )\n ],\n render: args => {\n const [value, setValue] = useState<string>(\"\");\n return (\n <ToggleGroup\n {...args}\n type=\"single\"\n value={value}\n onChange={v => setValue(v as string)}\n />\n );\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof ToggleGroup>;\n\nexport const Default: Story = {\n args: { items: textItems, label: \"Text formatting\", bordered: true }\n};\n\nexport const IconOnly: Story = {\n args: { items: iconItems, label: \"Alignment\", bordered: true }\n};\n\nexport const IconOnlyGhost: Story = {\n args: { items: iconItems, label: \"Alignment\", variant: \"ghost\", bordered: true }\n};\n\nexport const WithIconAndText: Story = {\n args: { items: iconTextItems, label: \"Text formatting\", bordered: true }\n};\n\nexport const Outline: Story = {\n args: { items: textItems, label: \"Text formatting\", variant: \"outline\", bordered: true }\n};\n\nexport const Ghost: Story = {\n args: { items: textItems, label: \"Text formatting\", variant: \"ghost\", bordered: true }\n};\n\nexport const WithDescription: Story = {\n args: {\n items: iconTextItems,\n label: \"Text formatting\",\n description: \"Choose one or more formatting options.\",\n bordered: true\n }\n};\n\nexport const WithNotes: Story = {\n args: {\n items: iconItems,\n label: \"Alignment\",\n note: \"Note: Formatting applies to selected text only.\",\n bordered: true\n }\n};\n\nexport const WithErrors: Story = {\n args: {\n items: textItems,\n label: \"Text formatting\",\n bordered: true,\n validation: { isValid: false, message: \"Please select a formatting option.\" }\n }\n};\n\nexport const Multiple: Story = {\n render: args => {\n const [value, setValue] = useState<string[]>([]);\n return (\n <ToggleGroup\n {...args}\n type=\"multiple\"\n value={value}\n onChange={v => setValue(v as string[])}\n />\n );\n },\n args: { items: iconTextItems, label: \"Text formatting\", bordered: true }\n};\n\nexport const Disabled: Story = {\n args: { items: iconItems, label: \"Alignment\", bordered: true, disabled: true }\n};\n\nexport const Documentation: Story = {\n render: args => {\n const [value, setValue] = useState<string>(\"\");\n return (\n <ToggleGroup\n {...args}\n type=\"single\"\n value={value}\n onChange={v => setValue(v as string)}\n />\n );\n },\n args: {\n items: iconItems,\n label: \"Alignment\",\n bordered: true,\n description: \"Choose a text alignment option.\",\n note: \"Note: Alignment applies to the selected paragraph.\"\n },\n argTypes: {\n label: { description: \"Label above the group\", control: \"text\" },\n description: { description: \"Description below the label\", control: \"text\" },\n note: { description: \"Note below the group\", control: \"text\" },\n bordered: { description: \"Show a border around the group container\", control: \"boolean\" },\n disabled: { description: \"Disables all items\", control: \"boolean\" },\n variant: {\n description: \"Visual style of items\",\n control: \"select\",\n options: [\"primary\", \"outline\", \"ghost\", \"ghost-negative\"]\n },\n size: {\n description: \"Size of items\",\n control: \"select\",\n options: [\"sm\", \"md\"]\n },\n onChange: { description: \"Called with the new value when selection changes\" }\n }\n};\n"],"names":["textItems","iconItems","AlignLeftIcon","AlignCenterIcon","AlignRightIcon","iconTextItems","BoldIcon","ItalicIcon","UnderlineIcon","meta","ToggleGroup","Story","Tooltip","args","value","setValue","useState","v","Default","IconOnly","IconOnlyGhost","WithIconAndText","Outline","Ghost","WithDescription","WithNotes","WithErrors","Multiple","Disabled","Documentation"],"mappings":"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"}
|
|
@@ -6,6 +6,7 @@ export declare class ToggleGroupItem {
|
|
|
6
6
|
private readonly _disabled;
|
|
7
7
|
private readonly _icon;
|
|
8
8
|
private readonly _iconPosition;
|
|
9
|
+
private readonly _tooltip?;
|
|
9
10
|
protected constructor(data: {
|
|
10
11
|
id: string;
|
|
11
12
|
label: any;
|
|
@@ -13,6 +14,7 @@ export declare class ToggleGroupItem {
|
|
|
13
14
|
disabled: boolean;
|
|
14
15
|
icon: any;
|
|
15
16
|
iconPosition: "start" | "end";
|
|
17
|
+
tooltip?: any;
|
|
16
18
|
});
|
|
17
19
|
static create(data: ToggleGroupItemParams): ToggleGroupItem;
|
|
18
20
|
get id(): string;
|
|
@@ -21,4 +23,5 @@ export declare class ToggleGroupItem {
|
|
|
21
23
|
get disabled(): boolean;
|
|
22
24
|
get icon(): any;
|
|
23
25
|
get iconPosition(): "end" | "start";
|
|
26
|
+
get tooltip(): any;
|
|
24
27
|
}
|
|
@@ -7,6 +7,7 @@ class ToggleGroupItem {
|
|
|
7
7
|
this._disabled = data.disabled;
|
|
8
8
|
this._icon = data.icon;
|
|
9
9
|
this._iconPosition = data.iconPosition;
|
|
10
|
+
this._tooltip = data.tooltip;
|
|
10
11
|
}
|
|
11
12
|
static create(data) {
|
|
12
13
|
return new ToggleGroupItem({
|
|
@@ -15,7 +16,8 @@ class ToggleGroupItem {
|
|
|
15
16
|
value: data.value,
|
|
16
17
|
disabled: data.disabled ?? false,
|
|
17
18
|
icon: data.icon,
|
|
18
|
-
iconPosition: data.iconPosition ?? "start"
|
|
19
|
+
iconPosition: data.iconPosition ?? "start",
|
|
20
|
+
tooltip: data.tooltip
|
|
19
21
|
});
|
|
20
22
|
}
|
|
21
23
|
get id() {
|
|
@@ -36,6 +38,9 @@ class ToggleGroupItem {
|
|
|
36
38
|
get iconPosition() {
|
|
37
39
|
return this._iconPosition;
|
|
38
40
|
}
|
|
41
|
+
get tooltip() {
|
|
42
|
+
return this._tooltip;
|
|
43
|
+
}
|
|
39
44
|
}
|
|
40
45
|
export { ToggleGroupItem };
|
|
41
46
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleGroup/domains/ToggleGroupItem.js","sources":["../../../src/ToggleGroup/domains/ToggleGroupItem.ts"],"sourcesContent":["import type { ToggleGroupItemParams } from \"./ToggleGroupItemParams.js\";\nimport { generateId } from \"~/utils.js\";\n\nexport class ToggleGroupItem {\n private readonly _id: string;\n private readonly _label: any;\n private readonly _value: string;\n private readonly _disabled: boolean;\n private readonly _icon: any;\n private readonly _iconPosition: \"start\" | \"end\";\n\n protected constructor(data: {\n id: string;\n label: any;\n value: string;\n disabled: boolean;\n icon: any;\n iconPosition: \"start\" | \"end\";\n }) {\n this._id = data.id;\n this._label = data.label;\n this._value = data.value;\n this._disabled = data.disabled;\n this._icon = data.icon;\n this._iconPosition = data.iconPosition;\n }\n\n static create(data: ToggleGroupItemParams): ToggleGroupItem {\n return new ToggleGroupItem({\n id: generateId(data.id),\n label: data.label,\n value: data.value,\n disabled: data.disabled ?? false,\n icon: data.icon,\n iconPosition: data.iconPosition ?? \"start\"\n });\n }\n\n get id() {\n return this._id;\n }\n\n get label() {\n return this._label;\n }\n\n get value() {\n return this._value;\n }\n\n get disabled() {\n return this._disabled;\n }\n\n get icon() {\n return this._icon;\n }\n\n get iconPosition() {\n return this._iconPosition;\n }\n}\n"],"names":["ToggleGroupItem","data","generateId"],"mappings":";AAGO,MAAMA;
|
|
1
|
+
{"version":3,"file":"ToggleGroup/domains/ToggleGroupItem.js","sources":["../../../src/ToggleGroup/domains/ToggleGroupItem.ts"],"sourcesContent":["import type { ToggleGroupItemParams } from \"./ToggleGroupItemParams.js\";\nimport { generateId } from \"~/utils.js\";\n\nexport class ToggleGroupItem {\n private readonly _id: string;\n private readonly _label: any;\n private readonly _value: string;\n private readonly _disabled: boolean;\n private readonly _icon: any;\n private readonly _iconPosition: \"start\" | \"end\";\n private readonly _tooltip?: any;\n\n protected constructor(data: {\n id: string;\n label: any;\n value: string;\n disabled: boolean;\n icon: any;\n iconPosition: \"start\" | \"end\";\n tooltip?: any;\n }) {\n this._id = data.id;\n this._label = data.label;\n this._value = data.value;\n this._disabled = data.disabled;\n this._icon = data.icon;\n this._iconPosition = data.iconPosition;\n this._tooltip = data.tooltip;\n }\n\n static create(data: ToggleGroupItemParams): ToggleGroupItem {\n return new ToggleGroupItem({\n id: generateId(data.id),\n label: data.label,\n value: data.value,\n disabled: data.disabled ?? false,\n icon: data.icon,\n iconPosition: data.iconPosition ?? \"start\",\n tooltip: data.tooltip\n });\n }\n\n get id() {\n return this._id;\n }\n\n get label() {\n return this._label;\n }\n\n get value() {\n return this._value;\n }\n\n get disabled() {\n return this._disabled;\n }\n\n get icon() {\n return this._icon;\n }\n\n get iconPosition() {\n return this._iconPosition;\n }\n\n get tooltip() {\n return this._tooltip;\n }\n}\n"],"names":["ToggleGroupItem","data","generateId"],"mappings":";AAGO,MAAMA;IAST,YAAsBC,IAQrB,CAAE;QACC,IAAI,CAAC,GAAG,GAAGA,KAAK,EAAE;QAClB,IAAI,CAAC,MAAM,GAAGA,KAAK,KAAK;QACxB,IAAI,CAAC,MAAM,GAAGA,KAAK,KAAK;QACxB,IAAI,CAAC,SAAS,GAAGA,KAAK,QAAQ;QAC9B,IAAI,CAAC,KAAK,GAAGA,KAAK,IAAI;QACtB,IAAI,CAAC,aAAa,GAAGA,KAAK,YAAY;QACtC,IAAI,CAAC,QAAQ,GAAGA,KAAK,OAAO;IAChC;IAEA,OAAO,OAAOA,IAA2B,EAAmB;QACxD,OAAO,IAAID,gBAAgB;YACvB,IAAIE,WAAWD,KAAK,EAAE;YACtB,OAAOA,KAAK,KAAK;YACjB,OAAOA,KAAK,KAAK;YACjB,UAAUA,KAAK,QAAQ,IAAI;YAC3B,MAAMA,KAAK,IAAI;YACf,cAAcA,KAAK,YAAY,IAAI;YACnC,SAASA,KAAK,OAAO;QACzB;IACJ;IAEA,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,GAAG;IACnB;IAEA,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,MAAM;IACtB;IAEA,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,MAAM;IACtB;IAEA,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,SAAS;IACzB;IAEA,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,KAAK;IACrB;IAEA,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,aAAa;IAC7B;IAEA,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,QAAQ;IACxB;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleGroup/domains/ToggleGroupItemFormatter.js","sources":["../../../src/ToggleGroup/domains/ToggleGroupItemFormatter.ts"],"sourcesContent":["import type { ToggleGroupItemFormatted } from \"./ToggleGroupItemFormatted.js\";\nimport type { ToggleGroupItem } from \"./ToggleGroupItem.js\";\n\nexport class ToggleGroupItemFormatter {\n static format(item: ToggleGroupItem): ToggleGroupItemFormatted {\n return {\n id: item.id,\n label: item.label,\n value: item.value,\n disabled: item.disabled,\n icon: item.icon,\n iconPosition: item.iconPosition\n };\n }\n}\n"],"names":["ToggleGroupItemFormatter","item"],"mappings":"AAGO,MAAMA;IACT,OAAO,OAAOC,IAAqB,EAA4B;QAC3D,OAAO;YACH,IAAIA,KAAK,EAAE;YACX,OAAOA,KAAK,KAAK;YACjB,OAAOA,KAAK,KAAK;YACjB,UAAUA,KAAK,QAAQ;YACvB,MAAMA,KAAK,IAAI;YACf,cAAcA,KAAK,YAAY;
|
|
1
|
+
{"version":3,"file":"ToggleGroup/domains/ToggleGroupItemFormatter.js","sources":["../../../src/ToggleGroup/domains/ToggleGroupItemFormatter.ts"],"sourcesContent":["import type { ToggleGroupItemFormatted } from \"./ToggleGroupItemFormatted.js\";\nimport type { ToggleGroupItem } from \"./ToggleGroupItem.js\";\n\nexport class ToggleGroupItemFormatter {\n static format(item: ToggleGroupItem): ToggleGroupItemFormatted {\n return {\n id: item.id,\n label: item.label,\n value: item.value,\n disabled: item.disabled,\n icon: item.icon,\n iconPosition: item.iconPosition,\n tooltip: item.tooltip\n };\n }\n}\n"],"names":["ToggleGroupItemFormatter","item"],"mappings":"AAGO,MAAMA;IACT,OAAO,OAAOC,IAAqB,EAA4B;QAC3D,OAAO;YACH,IAAIA,KAAK,EAAE;YACX,OAAOA,KAAK,KAAK;YACjB,OAAOA,KAAK,KAAK;YACjB,UAAUA,KAAK,QAAQ;YACvB,MAAMA,KAAK,IAAI;YACf,cAAcA,KAAK,YAAY;YAC/B,SAASA,KAAK,OAAO;QACzB;IACJ;AACJ"}
|
|
@@ -5,9 +5,9 @@ import type { ToggleGroupItemFormatted, ToggleGroupItemParams } from "../domains
|
|
|
5
5
|
* Toggle Group Item
|
|
6
6
|
*/
|
|
7
7
|
declare const toggleGroupItemVariants: (props?: ({
|
|
8
|
-
variant?: "
|
|
9
|
-
size?: "
|
|
10
|
-
contentLayout?: "
|
|
8
|
+
variant?: "ghost" | "ghost-negative" | "outline" | "primary" | null | undefined;
|
|
9
|
+
size?: "md" | "sm" | null | undefined;
|
|
10
|
+
contentLayout?: "icon" | "text" | null | undefined;
|
|
11
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
12
|
type ToggleGroupVariant = VariantProps<typeof toggleGroupItemVariants>["variant"];
|
|
13
13
|
type ToggleGroupSize = VariantProps<typeof toggleGroupItemVariants>["size"];
|
|
@@ -33,21 +33,25 @@ type ToggleGroupPrimitiveProps = ToggleGroupPrimitiveBaseProps & (ToggleGroupSin
|
|
|
33
33
|
type ToggleGroupVm = {
|
|
34
34
|
items: ToggleGroupItemFormatted[];
|
|
35
35
|
};
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Toggle Group Primitive
|
|
38
|
+
*/
|
|
39
|
+
declare const DecoratableToggleGroupPrimitive: (props: ToggleGroupPrimitiveProps) => React.JSX.Element;
|
|
40
|
+
declare const ToggleGroupPrimitive: typeof DecoratableToggleGroupPrimitive & {
|
|
41
|
+
original: typeof DecoratableToggleGroupPrimitive;
|
|
38
42
|
originalName: string;
|
|
39
43
|
displayName: string;
|
|
40
44
|
} & {
|
|
41
|
-
original:
|
|
42
|
-
original:
|
|
45
|
+
original: typeof DecoratableToggleGroupPrimitive & {
|
|
46
|
+
original: typeof DecoratableToggleGroupPrimitive;
|
|
43
47
|
originalName: string;
|
|
44
48
|
displayName: string;
|
|
45
49
|
};
|
|
46
50
|
originalName: string;
|
|
47
51
|
displayName: string;
|
|
48
52
|
} & {
|
|
49
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
50
|
-
original:
|
|
53
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableToggleGroupPrimitive & {
|
|
54
|
+
original: typeof DecoratableToggleGroupPrimitive;
|
|
51
55
|
originalName: string;
|
|
52
56
|
displayName: string;
|
|
53
57
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ToggleGroup } from "radix-ui";
|
|
2
2
|
import { cn, cva, makeDecoratable } from "../../utils.js";
|
|
3
|
+
import { Tooltip } from "../../Tooltip/index.js";
|
|
3
4
|
import { useToggleGroup } from "./useToggleGroup.js";
|
|
4
5
|
import * as __rspack_external_react from "react";
|
|
5
6
|
const toggleGroupItemVariants = cva([
|
|
@@ -65,7 +66,7 @@ const toggleGroupItemVariants = cva([
|
|
|
65
66
|
const toggleGroupVariants = cva("inline-flex items-center", {
|
|
66
67
|
variants: {
|
|
67
68
|
bordered: {
|
|
68
|
-
true: "rounded-md border-sm border-neutral-
|
|
69
|
+
true: "rounded-md border-sm border-neutral-muted p-[calc(var(--padding-xs)-(var(--border-width-sm)))]",
|
|
69
70
|
false: ""
|
|
70
71
|
},
|
|
71
72
|
variant: {
|
|
@@ -107,8 +108,7 @@ const ToggleGroupRenderer = ({ items, changeValue, value, type = "single", varia
|
|
|
107
108
|
className: containerClass
|
|
108
109
|
}, items.map((item)=>{
|
|
109
110
|
const contentLayout = !item.label && item.icon ? "icon" : "text";
|
|
110
|
-
|
|
111
|
-
key: item.id,
|
|
111
|
+
const trigger = /*#__PURE__*/ __rspack_external_react.createElement(ToggleGroup.Item, {
|
|
112
112
|
value: item.value,
|
|
113
113
|
disabled: item.disabled,
|
|
114
114
|
className: cn(toggleGroupItemVariants({
|
|
@@ -117,6 +117,15 @@ const ToggleGroupRenderer = ({ items, changeValue, value, type = "single", varia
|
|
|
117
117
|
contentLayout
|
|
118
118
|
}))
|
|
119
119
|
}, "end" !== item.iconPosition && item.icon, item.label, "end" === item.iconPosition && item.icon);
|
|
120
|
+
if (item.tooltip) return /*#__PURE__*/ __rspack_external_react.createElement(Tooltip, {
|
|
121
|
+
key: item.id,
|
|
122
|
+
content: item.tooltip,
|
|
123
|
+
side: "bottom",
|
|
124
|
+
trigger: trigger
|
|
125
|
+
});
|
|
126
|
+
return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external_react.Fragment, {
|
|
127
|
+
key: item.id
|
|
128
|
+
}, trigger);
|
|
120
129
|
}));
|
|
121
130
|
};
|
|
122
131
|
const DecoratableToggleGroupPrimitive = (props)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleGroup/primitives/ToggleGroupPrimitive.js","sources":["../../../src/ToggleGroup/primitives/ToggleGroupPrimitive.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { useMemo } from \"react\";\nimport { ToggleGroup as ToggleGroupPrimitives } from \"radix-ui\";\nimport { cn, cva, makeDecoratable, type VariantProps } from \"~/utils.js\";\nimport { useToggleGroup } from \"./useToggleGroup.js\";\nimport type { ToggleGroupItemFormatted, ToggleGroupItemParams } from \"../domains/index.js\";\n\n/**\n * Toggle Group Item\n */\n\nconst toggleGroupItemVariants = cva(\n [\n \"border-sm inline-flex items-center justify-center gap-xs whitespace-nowrap font-sans cursor-pointer transition-colors rounded-sm\",\n \"focus-visible:outline-none focus-visible:border-accent-default focus-visible:ring-lg focus-visible:ring-primary-dimmed\",\n \"disabled:pointer-events-none disabled:opacity-50\"\n ],\n {\n variants: {\n variant: {\n primary: [\n \"border-transparent bg-neutral-dimmed text-neutral-strong fill-neutral-strong\",\n \"hover:bg-neutral-muted\",\n \"data-[state=on]:bg-neutral-xstrong data-[state=on]:text-neutral-light data-[state=on]:fill-neutral-light\"\n ],\n outline: [\n \"border-neutral-dimmed-darker bg-neutral-base text-neutral-strong fill-neutral-strong\",\n \"hover:bg-neutral-light\",\n \"data-[state=on]:bg-neutral-dimmed\"\n ],\n ghost: [\n \"border-transparent bg-transparent text-neutral-strong fill-neutral-strong\",\n \"hover:bg-neutral-dark/5\",\n \"data-[state=on]:bg-neutral-dark/5 data-[state=on]:fill-neutral-xstrong\"\n ],\n \"ghost-negative\": [\n \"border-transparent bg-transparent text-neutral-light fill-neutral-light\",\n \"hover:bg-neutral-base/20\",\n \"data-[state=on]:bg-neutral-base/30\"\n ]\n },\n size: {\n sm: [\n \"text-sm [&>svg]:size-md\",\n \"py-[calc(var(--padding-xs)-(var(--border-width-sm)))] px-[calc(var(--padding-sm)-(var(--border-width-sm)))]\"\n ],\n md: [\n \"text-md [&>svg]:size-md\",\n \"py-[calc(var(--padding-xs-plus)-(var(--border-width-sm)))] px-[calc(var(--padding-sm-extra)-(var(--border-width-sm)))]\"\n ]\n },\n contentLayout: {\n text: \"\",\n icon: \"\"\n }\n },\n compoundVariants: [\n {\n size: \"sm\",\n contentLayout: \"icon\",\n className: \"p-[calc(var(--padding-xs)-(var(--border-width-sm)))]\"\n },\n {\n size: \"md\",\n contentLayout: \"icon\",\n className: \"p-[calc(var(--padding-sm)-(var(--border-width-sm)))]\"\n }\n ],\n defaultVariants: {\n variant: \"primary\",\n size: \"md\"\n }\n }\n);\n\n/**\n * Toggle Group Container\n */\n\nconst toggleGroupVariants = cva(\"inline-flex items-center\", {\n variants: {\n bordered: {\n true: \"rounded-md border-sm border-neutral-dimmed-darker p-[calc(var(--padding-xs)-(var(--border-width-sm)))]\",\n false: \"\"\n },\n variant: {\n primary: \"gap-xs\",\n outline: \"gap-xs\",\n ghost: \"\",\n \"ghost-negative\": \"\"\n }\n },\n defaultVariants: {\n bordered: false,\n variant: \"primary\"\n }\n});\n\ntype ToggleGroupVariant = VariantProps<typeof toggleGroupItemVariants>[\"variant\"];\ntype ToggleGroupSize = VariantProps<typeof toggleGroupItemVariants>[\"size\"];\n\ntype ToggleGroupSingleProps = {\n type?: \"single\";\n value?: string;\n onChange?: (value: string) => void;\n};\n\ntype ToggleGroupMultipleProps = {\n type: \"multiple\";\n value?: string[];\n onChange?: (value: string[]) => void;\n};\n\ntype ToggleGroupPrimitiveBaseProps = {\n items: ToggleGroupItemParams[];\n variant?: ToggleGroupVariant;\n size?: ToggleGroupSize;\n bordered?: boolean;\n disabled?: boolean;\n className?: string;\n};\n\ntype ToggleGroupPrimitiveProps = ToggleGroupPrimitiveBaseProps &\n (ToggleGroupSingleProps | ToggleGroupMultipleProps);\n\ntype ToggleGroupVm = {\n items: ToggleGroupItemFormatted[];\n};\n\n/**\n * Toggle Group Renderer\n */\n\ntype ToggleGroupRendererProps = ToggleGroupPrimitiveProps & {\n items: ToggleGroupItemFormatted[];\n changeValue: (value: string | string[]) => void;\n};\n\nconst ToggleGroupRenderer = ({\n items,\n changeValue,\n value,\n type = \"single\",\n variant = \"primary\",\n size = \"md\",\n bordered = false,\n disabled,\n className\n}: ToggleGroupRendererProps) => {\n const containerClass = cn(toggleGroupVariants({ bordered, variant }), className);\n\n const radixProps = useMemo(() => {\n if (type === \"multiple\") {\n return {\n type: \"multiple\" as const,\n value: (value as string[] | undefined) ?? [],\n onValueChange: changeValue as (value: string[]) => void\n };\n }\n return {\n type: \"single\" as const,\n value: (value as string | undefined) ?? \"\",\n onValueChange: changeValue as (value: string) => void\n };\n }, [type, value, changeValue]);\n\n return (\n <ToggleGroupPrimitives.Root {...radixProps} disabled={disabled} className={containerClass}>\n {items.map(item => {\n const contentLayout = !item.label && item.icon ? \"icon\" : \"text\";\n return (\n <ToggleGroupPrimitives.Item\n key={item.id}\n value={item.value}\n disabled={item.disabled}\n className={cn(toggleGroupItemVariants({ variant, size, contentLayout }))}\n >\n {item.iconPosition !== \"end\" && item.icon}\n {item.label}\n {item.iconPosition === \"end\" && item.icon}\n </ToggleGroupPrimitives.Item>\n );\n })}\n </ToggleGroupPrimitives.Root>\n );\n};\n\n/**\n * Toggle Group Primitive\n */\n\nconst DecoratableToggleGroupPrimitive = (props: ToggleGroupPrimitiveProps) => {\n const { vm, changeValue } = useToggleGroup(props);\n return <ToggleGroupRenderer {...props} items={vm.items} changeValue={changeValue} />;\n};\n\nconst ToggleGroupPrimitive = makeDecoratable(\n \"ToggleGroupPrimitive\",\n DecoratableToggleGroupPrimitive\n);\n\nexport {\n ToggleGroupPrimitive,\n type ToggleGroupPrimitiveProps,\n type ToggleGroupVm,\n type ToggleGroupVariant,\n type ToggleGroupSize\n};\n"],"names":["toggleGroupItemVariants","cva","toggleGroupVariants","ToggleGroupRenderer","items","changeValue","value","type","variant","size","bordered","disabled","className","containerClass","cn","radixProps","useMemo","ToggleGroupPrimitives","item","contentLayout","DecoratableToggleGroupPrimitive","props","vm","useToggleGroup","ToggleGroupPrimitive","makeDecoratable"],"mappings":";;;;AAWA,MAAMA,0BAA0BC,IAC5B;IACI;IACA;IACA;CACH,EACD;IACI,UAAU;QACN,SAAS;YACL,SAAS;gBACL;gBACA;gBACA;aACH;YACD,SAAS;gBACL;gBACA;gBACA;aACH;YACD,OAAO;gBACH;gBACA;gBACA;aACH;YACD,kBAAkB;gBACd;gBACA;gBACA;aACH;QACL;QACA,MAAM;YACF,IAAI;gBACA;gBACA;aACH;YACD,IAAI;gBACA;gBACA;aACH;QACL;QACA,eAAe;YACX,MAAM;YACN,MAAM;QACV;IACJ;IACA,kBAAkB;QACd;YACI,MAAM;YACN,eAAe;YACf,WAAW;QACf;QACA;YACI,MAAM;YACN,eAAe;YACf,WAAW;QACf;KACH;IACD,iBAAiB;QACb,SAAS;QACT,MAAM;IACV;AACJ;AAOJ,MAAMC,sBAAsBD,IAAI,4BAA4B;IACxD,UAAU;QACN,UAAU;YACN,MAAM;YACN,OAAO;QACX;QACA,SAAS;YACL,SAAS;YACT,SAAS;YACT,OAAO;YACP,kBAAkB;QACtB;IACJ;IACA,iBAAiB;QACb,UAAU;QACV,SAAS;IACb;AACJ;AA0CA,MAAME,sBAAsB,CAAC,EACzBC,KAAK,EACLC,WAAW,EACXC,KAAK,EACLC,OAAO,QAAQ,EACfC,UAAU,SAAS,EACnBC,OAAO,IAAI,EACXC,WAAW,KAAK,EAChBC,QAAQ,EACRC,SAAS,EACc;IACvB,MAAMC,iBAAiBC,GAAGZ,oBAAoB;QAAEQ;QAAUF;IAAQ,IAAII;IAEtE,MAAMG,aAAaC,AAAAA,IAAAA,wBAAAA,OAAAA,AAAAA,EAAQ;QACvB,IAAIT,AAAS,eAATA,MACA,OAAO;YACH,MAAM;YACN,OAAQD,SAAkC,EAAE;YAC5C,eAAeD;QACnB;QAEJ,OAAO;YACH,MAAM;YACN,OAAQC,SAAgC;YACxC,eAAeD;QACnB;IACJ,GAAG;QAACE;QAAMD;QAAOD;KAAY;IAE7B,OAAO,WAAP,GACI,sCAACY,YAAAA,IAA0B;QAAE,GAAGF,UAAU;QAAE,UAAUJ;QAAU,WAAWE;OACtET,MAAM,GAAG,CAACc,CAAAA;QACP,MAAMC,gBAAgB,CAACD,KAAK,KAAK,IAAIA,KAAK,IAAI,GAAG,SAAS;QAC1D,OAAO,WAAP,GACI,sCAACD,YAAAA,IAA0B;YACvB,KAAKC,KAAK,EAAE;YACZ,OAAOA,KAAK,KAAK;YACjB,UAAUA,KAAK,QAAQ;YACvB,WAAWJ,GAAGd,wBAAwB;gBAAEQ;gBAASC;gBAAMU;YAAc;WAEpED,AAAsB,UAAtBA,KAAK,YAAY,IAAcA,KAAK,IAAI,EACxCA,KAAK,KAAK,EACVA,AAAsB,UAAtBA,KAAK,YAAY,IAAcA,KAAK,IAAI;IAGrD;AAGZ;AAMA,MAAME,kCAAkC,CAACC;IACrC,MAAM,EAAEC,EAAE,EAAEjB,WAAW,EAAE,GAAGkB,eAAeF;IAC3C,OAAO,WAAP,GAAO,sCAAClB,qBAAmBA;QAAE,GAAGkB,KAAK;QAAE,OAAOC,GAAG,KAAK;QAAE,aAAajB;;AACzE;AAEA,MAAMmB,uBAAuBC,gBACzB,wBACAL"}
|
|
1
|
+
{"version":3,"file":"ToggleGroup/primitives/ToggleGroupPrimitive.js","sources":["../../../src/ToggleGroup/primitives/ToggleGroupPrimitive.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { useMemo } from \"react\";\nimport { ToggleGroup as ToggleGroupPrimitives } from \"radix-ui\";\nimport { cn, cva, makeDecoratable, type VariantProps } from \"~/utils.js\";\nimport { Tooltip } from \"~/Tooltip/index.js\";\nimport { useToggleGroup } from \"./useToggleGroup.js\";\nimport type { ToggleGroupItemFormatted, ToggleGroupItemParams } from \"../domains/index.js\";\n\n/**\n * Toggle Group Item\n */\n\nconst toggleGroupItemVariants = cva(\n [\n \"border-sm inline-flex items-center justify-center gap-xs whitespace-nowrap font-sans cursor-pointer transition-colors rounded-sm\",\n \"focus-visible:outline-none focus-visible:border-accent-default focus-visible:ring-lg focus-visible:ring-primary-dimmed\",\n \"disabled:pointer-events-none disabled:opacity-50\"\n ],\n {\n variants: {\n variant: {\n primary: [\n \"border-transparent bg-neutral-dimmed text-neutral-strong fill-neutral-strong\",\n \"hover:bg-neutral-muted\",\n \"data-[state=on]:bg-neutral-xstrong data-[state=on]:text-neutral-light data-[state=on]:fill-neutral-light\"\n ],\n outline: [\n \"border-neutral-dimmed-darker bg-neutral-base text-neutral-strong fill-neutral-strong\",\n \"hover:bg-neutral-light\",\n \"data-[state=on]:bg-neutral-dimmed\"\n ],\n ghost: [\n \"border-transparent bg-transparent text-neutral-strong fill-neutral-strong\",\n \"hover:bg-neutral-dark/5\",\n \"data-[state=on]:bg-neutral-dark/5 data-[state=on]:fill-neutral-xstrong\"\n ],\n \"ghost-negative\": [\n \"border-transparent bg-transparent text-neutral-light fill-neutral-light\",\n \"hover:bg-neutral-base/20\",\n \"data-[state=on]:bg-neutral-base/30\"\n ]\n },\n size: {\n sm: [\n \"text-sm [&>svg]:size-md\",\n \"py-[calc(var(--padding-xs)-(var(--border-width-sm)))] px-[calc(var(--padding-sm)-(var(--border-width-sm)))]\"\n ],\n md: [\n \"text-md [&>svg]:size-md\",\n \"py-[calc(var(--padding-xs-plus)-(var(--border-width-sm)))] px-[calc(var(--padding-sm-extra)-(var(--border-width-sm)))]\"\n ]\n },\n contentLayout: {\n text: \"\",\n icon: \"\"\n }\n },\n compoundVariants: [\n {\n size: \"sm\",\n contentLayout: \"icon\",\n className: \"p-[calc(var(--padding-xs)-(var(--border-width-sm)))]\"\n },\n {\n size: \"md\",\n contentLayout: \"icon\",\n className: \"p-[calc(var(--padding-sm)-(var(--border-width-sm)))]\"\n }\n ],\n defaultVariants: {\n variant: \"primary\",\n size: \"md\"\n }\n }\n);\n\n/**\n * Toggle Group Container\n */\n\nconst toggleGroupVariants = cva(\"inline-flex items-center\", {\n variants: {\n bordered: {\n // Same border as outlined buttons (e.g. tertiary), so a toggle group sits evenly next to them.\n true: \"rounded-md border-sm border-neutral-muted p-[calc(var(--padding-xs)-(var(--border-width-sm)))]\",\n false: \"\"\n },\n variant: {\n primary: \"gap-xs\",\n outline: \"gap-xs\",\n ghost: \"\",\n \"ghost-negative\": \"\"\n }\n },\n defaultVariants: {\n bordered: false,\n variant: \"primary\"\n }\n});\n\ntype ToggleGroupVariant = VariantProps<typeof toggleGroupItemVariants>[\"variant\"];\ntype ToggleGroupSize = VariantProps<typeof toggleGroupItemVariants>[\"size\"];\n\ntype ToggleGroupSingleProps = {\n type?: \"single\";\n value?: string;\n onChange?: (value: string) => void;\n};\n\ntype ToggleGroupMultipleProps = {\n type: \"multiple\";\n value?: string[];\n onChange?: (value: string[]) => void;\n};\n\ntype ToggleGroupPrimitiveBaseProps = {\n items: ToggleGroupItemParams[];\n variant?: ToggleGroupVariant;\n size?: ToggleGroupSize;\n bordered?: boolean;\n disabled?: boolean;\n className?: string;\n};\n\ntype ToggleGroupPrimitiveProps = ToggleGroupPrimitiveBaseProps &\n (ToggleGroupSingleProps | ToggleGroupMultipleProps);\n\ntype ToggleGroupVm = {\n items: ToggleGroupItemFormatted[];\n};\n\n/**\n * Toggle Group Renderer\n */\n\ntype ToggleGroupRendererProps = ToggleGroupPrimitiveProps & {\n items: ToggleGroupItemFormatted[];\n changeValue: (value: string | string[]) => void;\n};\n\nconst ToggleGroupRenderer = ({\n items,\n changeValue,\n value,\n type = \"single\",\n variant = \"primary\",\n size = \"md\",\n bordered = false,\n disabled,\n className\n}: ToggleGroupRendererProps) => {\n const containerClass = cn(toggleGroupVariants({ bordered, variant }), className);\n\n const radixProps = useMemo(() => {\n if (type === \"multiple\") {\n return {\n type: \"multiple\" as const,\n value: (value as string[] | undefined) ?? [],\n onValueChange: changeValue as (value: string[]) => void\n };\n }\n return {\n type: \"single\" as const,\n value: (value as string | undefined) ?? \"\",\n onValueChange: changeValue as (value: string) => void\n };\n }, [type, value, changeValue]);\n\n return (\n <ToggleGroupPrimitives.Root {...radixProps} disabled={disabled} className={containerClass}>\n {items.map(item => {\n const contentLayout = !item.label && item.icon ? \"icon\" : \"text\";\n const trigger = (\n <ToggleGroupPrimitives.Item\n value={item.value}\n disabled={item.disabled}\n className={cn(toggleGroupItemVariants({ variant, size, contentLayout }))}\n >\n {item.iconPosition !== \"end\" && item.icon}\n {item.label}\n {item.iconPosition === \"end\" && item.icon}\n </ToggleGroupPrimitives.Item>\n );\n if (item.tooltip) {\n return (\n <Tooltip\n key={item.id}\n content={item.tooltip}\n side=\"bottom\"\n trigger={trigger}\n />\n );\n }\n return <React.Fragment key={item.id}>{trigger}</React.Fragment>;\n })}\n </ToggleGroupPrimitives.Root>\n );\n};\n\n/**\n * Toggle Group Primitive\n */\n\nconst DecoratableToggleGroupPrimitive = (props: ToggleGroupPrimitiveProps) => {\n const { vm, changeValue } = useToggleGroup(props);\n return <ToggleGroupRenderer {...props} items={vm.items} changeValue={changeValue} />;\n};\n\nconst ToggleGroupPrimitive = makeDecoratable(\n \"ToggleGroupPrimitive\",\n DecoratableToggleGroupPrimitive\n);\n\nexport {\n ToggleGroupPrimitive,\n type ToggleGroupPrimitiveProps,\n type ToggleGroupVm,\n type ToggleGroupVariant,\n type ToggleGroupSize\n};\n"],"names":["toggleGroupItemVariants","cva","toggleGroupVariants","ToggleGroupRenderer","items","changeValue","value","type","variant","size","bordered","disabled","className","containerClass","cn","radixProps","useMemo","ToggleGroupPrimitives","item","contentLayout","trigger","Tooltip","React","DecoratableToggleGroupPrimitive","props","vm","useToggleGroup","ToggleGroupPrimitive","makeDecoratable"],"mappings":";;;;;AAYA,MAAMA,0BAA0BC,IAC5B;IACI;IACA;IACA;CACH,EACD;IACI,UAAU;QACN,SAAS;YACL,SAAS;gBACL;gBACA;gBACA;aACH;YACD,SAAS;gBACL;gBACA;gBACA;aACH;YACD,OAAO;gBACH;gBACA;gBACA;aACH;YACD,kBAAkB;gBACd;gBACA;gBACA;aACH;QACL;QACA,MAAM;YACF,IAAI;gBACA;gBACA;aACH;YACD,IAAI;gBACA;gBACA;aACH;QACL;QACA,eAAe;YACX,MAAM;YACN,MAAM;QACV;IACJ;IACA,kBAAkB;QACd;YACI,MAAM;YACN,eAAe;YACf,WAAW;QACf;QACA;YACI,MAAM;YACN,eAAe;YACf,WAAW;QACf;KACH;IACD,iBAAiB;QACb,SAAS;QACT,MAAM;IACV;AACJ;AAOJ,MAAMC,sBAAsBD,IAAI,4BAA4B;IACxD,UAAU;QACN,UAAU;YAEN,MAAM;YACN,OAAO;QACX;QACA,SAAS;YACL,SAAS;YACT,SAAS;YACT,OAAO;YACP,kBAAkB;QACtB;IACJ;IACA,iBAAiB;QACb,UAAU;QACV,SAAS;IACb;AACJ;AA0CA,MAAME,sBAAsB,CAAC,EACzBC,KAAK,EACLC,WAAW,EACXC,KAAK,EACLC,OAAO,QAAQ,EACfC,UAAU,SAAS,EACnBC,OAAO,IAAI,EACXC,WAAW,KAAK,EAChBC,QAAQ,EACRC,SAAS,EACc;IACvB,MAAMC,iBAAiBC,GAAGZ,oBAAoB;QAAEQ;QAAUF;IAAQ,IAAII;IAEtE,MAAMG,aAAaC,AAAAA,IAAAA,wBAAAA,OAAAA,AAAAA,EAAQ;QACvB,IAAIT,AAAS,eAATA,MACA,OAAO;YACH,MAAM;YACN,OAAQD,SAAkC,EAAE;YAC5C,eAAeD;QACnB;QAEJ,OAAO;YACH,MAAM;YACN,OAAQC,SAAgC;YACxC,eAAeD;QACnB;IACJ,GAAG;QAACE;QAAMD;QAAOD;KAAY;IAE7B,OAAO,WAAP,GACI,sCAACY,YAAAA,IAA0B;QAAE,GAAGF,UAAU;QAAE,UAAUJ;QAAU,WAAWE;OACtET,MAAM,GAAG,CAACc,CAAAA;QACP,MAAMC,gBAAgB,CAACD,KAAK,KAAK,IAAIA,KAAK,IAAI,GAAG,SAAS;QAC1D,MAAME,UAAU,WAAVA,GACF,sCAACH,YAAAA,IAA0B;YACvB,OAAOC,KAAK,KAAK;YACjB,UAAUA,KAAK,QAAQ;YACvB,WAAWJ,GAAGd,wBAAwB;gBAAEQ;gBAASC;gBAAMU;YAAc;WAEpED,AAAsB,UAAtBA,KAAK,YAAY,IAAcA,KAAK,IAAI,EACxCA,KAAK,KAAK,EACVA,AAAsB,UAAtBA,KAAK,YAAY,IAAcA,KAAK,IAAI;QAGjD,IAAIA,KAAK,OAAO,EACZ,OAAO,WAAP,GACI,sCAACG,SAAOA;YACJ,KAAKH,KAAK,EAAE;YACZ,SAASA,KAAK,OAAO;YACrB,MAAK;YACL,SAASE;;QAIrB,OAAO,WAAP,GAAO,sCAACE,wBAAAA,QAAc;YAAC,KAAKJ,KAAK,EAAE;WAAGE;IAC1C;AAGZ;AAMA,MAAMG,kCAAkC,CAACC;IACrC,MAAM,EAAEC,EAAE,EAAEpB,WAAW,EAAE,GAAGqB,eAAeF;IAC3C,OAAO,WAAP,GAAO,sCAACrB,qBAAmBA;QAAE,GAAGqB,KAAK;QAAE,OAAOC,GAAG,KAAK;QAAE,aAAapB;;AACzE;AAEA,MAAMsB,uBAAuBC,gBACzB,wBACAL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleGroup/primitives/ToggleGroupPrimitive.stories.js","sources":["../../../src/ToggleGroup/primitives/ToggleGroupPrimitive.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react
|
|
1
|
+
{"version":3,"file":"ToggleGroup/primitives/ToggleGroupPrimitive.stories.js","sources":["../../../src/ToggleGroup/primitives/ToggleGroupPrimitive.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { ReactComponent as BoldIcon } from \"@webiny/icons/format_bold.svg\";\nimport { ReactComponent as ItalicIcon } from \"@webiny/icons/format_italic.svg\";\nimport { ReactComponent as UnderlineIcon } from \"@webiny/icons/format_underlined.svg\";\nimport { ReactComponent as AlignLeftIcon } from \"@webiny/icons/format_align_left.svg\";\nimport { ReactComponent as AlignCenterIcon } from \"@webiny/icons/format_align_center.svg\";\nimport { ReactComponent as AlignRightIcon } from \"@webiny/icons/format_align_right.svg\";\nimport { ToggleGroupPrimitive } from \"./ToggleGroupPrimitive.js\";\n\nconst textItems = [\n { value: \"bold\", label: \"Bold\" },\n { value: \"italic\", label: \"Italic\" },\n { value: \"underline\", label: \"Underline\" }\n];\n\nconst iconItems = [\n { value: \"left\", icon: <AlignLeftIcon /> },\n { value: \"center\", icon: <AlignCenterIcon /> },\n { value: \"right\", icon: <AlignRightIcon /> }\n];\n\nconst iconTextItems = [\n { value: \"bold\", label: \"Bold\", icon: <BoldIcon /> },\n { value: \"italic\", label: \"Italic\", icon: <ItalicIcon /> },\n { value: \"underline\", label: \"Underline\", icon: <UnderlineIcon /> }\n];\n\nconst meta: Meta<typeof ToggleGroupPrimitive> = {\n title: \"Components/Form Primitives/ToggleGroup\",\n component: ToggleGroupPrimitive,\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [value, setValue] = useState<string>(\"\");\n return (\n <ToggleGroupPrimitive\n {...args}\n type=\"single\"\n value={value}\n onChange={v => setValue(v as string)}\n />\n );\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof ToggleGroupPrimitive>;\n\nexport const Default: Story = {\n args: { items: textItems }\n};\n\nexport const Bordered: Story = {\n args: { items: textItems, bordered: true }\n};\n\nexport const IconOnly: Story = {\n args: { items: iconItems, bordered: true }\n};\n\nexport const IconOnlyGhost: Story = {\n args: { items: iconItems, variant: \"ghost\", bordered: true }\n};\n\nexport const WithIconAndText: Story = {\n args: { items: iconTextItems, bordered: true }\n};\n\nexport const WithIconAndTextOutline: Story = {\n args: { items: iconTextItems, variant: \"outline\", bordered: true }\n};\n\nexport const Outline: Story = {\n args: { items: textItems, variant: \"outline\", bordered: true }\n};\n\nexport const Ghost: Story = {\n args: { items: textItems, variant: \"ghost\", bordered: true }\n};\n\nexport const SizeSmall: Story = {\n args: { items: iconItems, size: \"sm\", bordered: true }\n};\n\nexport const SizeMedium: Story = {\n args: { items: iconItems, size: \"md\", bordered: true }\n};\n\nexport const Multiple: Story = {\n render: args => {\n const [value, setValue] = useState<string[]>([]);\n return (\n <ToggleGroupPrimitive\n {...args}\n type=\"multiple\"\n value={value}\n onChange={v => setValue(v as string[])}\n />\n );\n },\n args: { items: iconTextItems, bordered: true }\n};\n\nexport const Disabled: Story = {\n args: { items: iconItems, bordered: true, disabled: true }\n};\n"],"names":["textItems","iconItems","AlignLeftIcon","AlignCenterIcon","AlignRightIcon","iconTextItems","BoldIcon","ItalicIcon","UnderlineIcon","meta","ToggleGroupPrimitive","args","value","setValue","useState","v","Default","Bordered","IconOnly","IconOnlyGhost","WithIconAndText","WithIconAndTextOutline","Outline","Ghost","SizeSmall","SizeMedium","Multiple","Disabled"],"mappings":";;;;;;;;AAUA,MAAMA,YAAY;IACd;QAAE,OAAO;QAAQ,OAAO;IAAO;IAC/B;QAAE,OAAO;QAAU,OAAO;IAAS;IACnC;QAAE,OAAO;QAAa,OAAO;IAAY;CAC5C;AAED,MAAMC,YAAY;IACd;QAAE,OAAO;QAAQ,MAAM,WAAN,GAAM,oBAACC,sCAAaA;IAAI;IACzC;QAAE,OAAO;QAAU,MAAM,WAAN,GAAM,oBAACC,wCAAeA;IAAI;IAC7C;QAAE,OAAO;QAAS,MAAM,WAAN,GAAM,oBAACC,uCAAcA;IAAI;CAC9C;AAED,MAAMC,gBAAgB;IAClB;QAAE,OAAO;QAAQ,OAAO;QAAQ,MAAM,WAAN,GAAM,oBAACC,gBAAQA;IAAI;IACnD;QAAE,OAAO;QAAU,OAAO;QAAU,MAAM,WAAN,GAAM,oBAACC,kCAAUA;IAAI;IACzD;QAAE,OAAO;QAAa,OAAO;QAAa,MAAM,WAAN,GAAM,oBAACC,sCAAaA;IAAI;CACrE;AAED,MAAMC,OAA0C;IAC5C,OAAO;IACP,WAAWC;IACX,YAAY;QACR,QAAQ;IACZ;IACA,QAAQC,CAAAA;QACJ,MAAM,CAACC,OAAOC,SAAS,GAAGC,SAAiB;QAC3C,OAAO,WAAP,GACI,oBAACJ,sBAAoBA;YAChB,GAAGC,IAAI;YACR,MAAK;YACL,OAAOC;YACP,UAAUG,CAAAA,IAAKF,SAASE;;IAGpC;AACJ;AAEA,qCAAeN;AAGR,MAAMO,UAAiB;IAC1B,MAAM;QAAE,OAAOhB;IAAU;AAC7B;AAEO,MAAMiB,WAAkB;IAC3B,MAAM;QAAE,OAAOjB;QAAW,UAAU;IAAK;AAC7C;AAEO,MAAMkB,WAAkB;IAC3B,MAAM;QAAE,OAAOjB;QAAW,UAAU;IAAK;AAC7C;AAEO,MAAMkB,gBAAuB;IAChC,MAAM;QAAE,OAAOlB;QAAW,SAAS;QAAS,UAAU;IAAK;AAC/D;AAEO,MAAMmB,kBAAyB;IAClC,MAAM;QAAE,OAAOf;QAAe,UAAU;IAAK;AACjD;AAEO,MAAMgB,yBAAgC;IACzC,MAAM;QAAE,OAAOhB;QAAe,SAAS;QAAW,UAAU;IAAK;AACrE;AAEO,MAAMiB,UAAiB;IAC1B,MAAM;QAAE,OAAOtB;QAAW,SAAS;QAAW,UAAU;IAAK;AACjE;AAEO,MAAMuB,QAAe;IACxB,MAAM;QAAE,OAAOvB;QAAW,SAAS;QAAS,UAAU;IAAK;AAC/D;AAEO,MAAMwB,YAAmB;IAC5B,MAAM;QAAE,OAAOvB;QAAW,MAAM;QAAM,UAAU;IAAK;AACzD;AAEO,MAAMwB,aAAoB;IAC7B,MAAM;QAAE,OAAOxB;QAAW,MAAM;QAAM,UAAU;IAAK;AACzD;AAEO,MAAMyB,WAAkB;IAC3B,QAAQf,CAAAA;QACJ,MAAM,CAACC,OAAOC,SAAS,GAAGC,SAAmB,EAAE;QAC/C,OAAO,WAAP,GACI,oBAACJ,sBAAoBA;YAChB,GAAGC,IAAI;YACR,MAAK;YACL,OAAOC;YACP,UAAUG,CAAAA,IAAKF,SAASE;;IAGpC;IACA,MAAM;QAAE,OAAOV;QAAe,UAAU;IAAK;AACjD;AAEO,MAAMsB,WAAkB;IAC3B,MAAM;QAAE,OAAO1B;QAAW,UAAU;QAAM,UAAU;IAAK;AAC7D"}
|
package/Tooltip/Tooltip.d.ts
CHANGED
|
@@ -12,21 +12,22 @@ interface TooltipProps extends Omit<TooltipPrimitive.TooltipContentProps, "conte
|
|
|
12
12
|
trigger: React.ReactNode;
|
|
13
13
|
rawTrigger?: boolean;
|
|
14
14
|
}
|
|
15
|
-
declare const
|
|
16
|
-
|
|
15
|
+
declare const DecoratableTooltip: ({ align, content, onOpenChange, showArrow, side, variant, trigger, delay, ...props }: TooltipProps) => React.JSX.Element;
|
|
16
|
+
declare const Tooltip: typeof DecoratableTooltip & {
|
|
17
|
+
original: typeof DecoratableTooltip;
|
|
17
18
|
originalName: string;
|
|
18
19
|
displayName: string;
|
|
19
20
|
} & {
|
|
20
|
-
original:
|
|
21
|
-
original:
|
|
21
|
+
original: typeof DecoratableTooltip & {
|
|
22
|
+
original: typeof DecoratableTooltip;
|
|
22
23
|
originalName: string;
|
|
23
24
|
displayName: string;
|
|
24
25
|
};
|
|
25
26
|
originalName: string;
|
|
26
27
|
displayName: string;
|
|
27
28
|
} & {
|
|
28
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
29
|
-
original:
|
|
29
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableTooltip & {
|
|
30
|
+
original: typeof DecoratableTooltip;
|
|
30
31
|
originalName: string;
|
|
31
32
|
displayName: string;
|
|
32
33
|
}>) => (props: unknown) => React.JSX.Element;
|