@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/Button/IconButton.d.ts
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type VariantProps } from "../utils.js";
|
|
3
3
|
declare const iconButtonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
5
|
-
size?: "
|
|
6
|
-
iconSize?: "
|
|
4
|
+
variant?: "ghost" | "ghost-negative" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
5
|
+
size?: "lg" | "md" | "sm" | "xl" | "xs" | "xxs" | null | undefined;
|
|
6
|
+
iconSize?: "default" | "lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">, VariantProps<typeof iconButtonVariants> {
|
|
9
9
|
icon?: React.ReactNode;
|
|
10
10
|
asChild?: boolean;
|
|
11
11
|
}
|
|
12
|
-
declare const
|
|
13
|
-
|
|
12
|
+
declare const DecoratableIconButton: ({ className, variant, size, icon, iconSize, asChild, disabled, ...props }: IconButtonProps) => React.JSX.Element;
|
|
13
|
+
declare const IconButton: typeof DecoratableIconButton & {
|
|
14
|
+
original: typeof DecoratableIconButton;
|
|
14
15
|
originalName: string;
|
|
15
16
|
displayName: string;
|
|
16
17
|
} & {
|
|
17
|
-
original:
|
|
18
|
-
original:
|
|
18
|
+
original: typeof DecoratableIconButton & {
|
|
19
|
+
original: typeof DecoratableIconButton;
|
|
19
20
|
originalName: string;
|
|
20
21
|
displayName: string;
|
|
21
22
|
};
|
|
22
23
|
originalName: string;
|
|
23
24
|
displayName: string;
|
|
24
25
|
} & {
|
|
25
|
-
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<
|
|
26
|
-
original:
|
|
26
|
+
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableIconButton & {
|
|
27
|
+
original: typeof DecoratableIconButton;
|
|
27
28
|
originalName: string;
|
|
28
29
|
displayName: string;
|
|
29
30
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button/IconButton.stories.js","sources":["../../src/Button/IconButton.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react
|
|
1
|
+
{"version":3,"file":"Button/IconButton.stories.js","sources":["../../src/Button/IconButton.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { ReactComponent as AddIcon } from \"@webiny/icons/add.svg\";\nimport { IconButton } from \"./IconButton.js\";\n\nconst meta: Meta<typeof IconButton> = {\n title: \"Components/Icon Button\",\n component: IconButton,\n tags: [\"!autodocs\"],\n argTypes: {\n variant: {\n description: \"Type\",\n control: \"select\",\n options: [\"primary\", \"secondary\", \"tertiary\", \"ghost\", \"ghost-negative\"],\n defaultValue: \"primary\"\n },\n size: {\n description: \"Size\",\n control: \"select\",\n options: [\"xxs\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"],\n defaultValue: \"md\"\n },\n iconSize: {\n description: \"Icon Size\",\n control: \"select\",\n options: [\"default\", \"lg\"],\n defaultValue: \"default\"\n },\n disabled: {\n description: \"State\",\n control: \"boolean\",\n defaultValue: false\n },\n icon: {\n description: \"Please refer to the example above for usage information.\"\n },\n onClick: { action: \"onClick\" }\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof IconButton>;\n\nexport const Primary: Story = {\n args: {\n variant: \"primary\",\n icon: <AddIcon />\n }\n};\n\nexport const Secondary: Story = {\n args: {\n ...Primary.args,\n variant: \"secondary\"\n }\n};\n\nexport const Tertiary: Story = {\n args: {\n ...Primary.args,\n variant: \"tertiary\"\n }\n};\n\nexport const Ghost: Story = {\n args: {\n ...Primary.args,\n variant: \"ghost\"\n }\n};\n\nexport const GhostNegative: Story = {\n decorators: [\n Story => (\n <div className=\"bg-[#25292e] p-[300px] rounded-[5px]\">\n <Story />\n </div>\n )\n ],\n args: {\n ...Primary.args,\n variant: \"ghost-negative\"\n }\n};\n\nexport const DoubleExtraSmall: Story = {\n args: {\n ...Primary.args,\n size: \"xxs\"\n }\n};\n\nexport const ExtraSmall: Story = {\n args: {\n ...Primary.args,\n size: \"xs\"\n }\n};\n\nexport const Small: Story = {\n args: {\n ...Primary.args,\n size: \"sm\"\n }\n};\n\nexport const SmallWithLargeIcon: Story = {\n args: {\n ...Primary.args,\n size: \"sm\",\n iconSize: \"lg\"\n }\n};\n\nexport const Medium: Story = {\n args: {\n ...Primary.args,\n size: \"md\"\n }\n};\n\nexport const MediumWithLargeIcon: Story = {\n args: {\n ...Primary.args,\n size: \"md\",\n iconSize: \"lg\"\n }\n};\n\nexport const Large: Story = {\n args: {\n ...Primary.args,\n size: \"lg\"\n }\n};\n\nexport const LargeWithLargeIcon: Story = {\n args: {\n ...Primary.args,\n size: \"lg\",\n iconSize: \"lg\"\n }\n};\n\nexport const ExtraLarge: Story = {\n args: {\n ...Primary.args,\n size: \"xl\"\n }\n};\n\nexport const WithAsChild: Story = {\n args: {\n ...Primary.args,\n asChild: true,\n icon: (\n <span>\n <AddIcon />\n </span>\n )\n }\n};\n\nexport const Documentation: Story = {\n args: {\n variant: \"primary\",\n size: \"md\",\n disabled: false,\n icon: <AddIcon />,\n iconSize: \"default\"\n }\n};\n"],"names":["meta","IconButton","Primary","AddIcon","Secondary","Tertiary","Ghost","GhostNegative","Story","DoubleExtraSmall","ExtraSmall","Small","SmallWithLargeIcon","Medium","MediumWithLargeIcon","Large","LargeWithLargeIcon","ExtraLarge","WithAsChild","Documentation"],"mappings":";;;AAKA,MAAMA,OAAgC;IAClC,OAAO;IACP,WAAWC;IACX,MAAM;QAAC;KAAY;IACnB,UAAU;QACN,SAAS;YACL,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAW;gBAAa;gBAAY;gBAAS;aAAiB;YACxE,cAAc;QAClB;QACA,MAAM;YACF,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAO;gBAAM;gBAAM;gBAAM;gBAAM;aAAK;YAC9C,cAAc;QAClB;QACA,UAAU;YACN,aAAa;YACb,SAAS;YACT,SAAS;gBAAC;gBAAW;aAAK;YAC1B,cAAc;QAClB;QACA,UAAU;YACN,aAAa;YACb,SAAS;YACT,cAAc;QAClB;QACA,MAAM;YACF,aAAa;QACjB;QACA,SAAS;YAAE,QAAQ;QAAU;IACjC;AACJ;AAEA,2BAAeD;AAGR,MAAME,UAAiB;IAC1B,MAAM;QACF,SAAS;QACT,MAAM,WAAN,GAAM,oBAACC,gBAAOA;IAClB;AACJ;AAEO,MAAMC,YAAmB;IAC5B,MAAM;QACF,GAAGF,QAAQ,IAAI;QACf,SAAS;IACb;AACJ;AAEO,MAAMG,WAAkB;IAC3B,MAAM;QACF,GAAGH,QAAQ,IAAI;QACf,SAAS;IACb;AACJ;AAEO,MAAMI,QAAe;IACxB,MAAM;QACF,GAAGJ,QAAQ,IAAI;QACf,SAAS;IACb;AACJ;AAEO,MAAMK,gBAAuB;IAChC,YAAY;QACRC,CAAAA,QAAAA,WAAAA,GACI,oBAAC;gBAAI,WAAU;6BACX,oBAACA,OAAAA;KAGZ;IACD,MAAM;QACF,GAAGN,QAAQ,IAAI;QACf,SAAS;IACb;AACJ;AAEO,MAAMO,mBAA0B;IACnC,MAAM;QACF,GAAGP,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMQ,aAAoB;IAC7B,MAAM;QACF,GAAGR,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMS,QAAe;IACxB,MAAM;QACF,GAAGT,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMU,qBAA4B;IACrC,MAAM;QACF,GAAGV,QAAQ,IAAI;QACf,MAAM;QACN,UAAU;IACd;AACJ;AAEO,MAAMW,SAAgB;IACzB,MAAM;QACF,GAAGX,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMY,sBAA6B;IACtC,MAAM;QACF,GAAGZ,QAAQ,IAAI;QACf,MAAM;QACN,UAAU;IACd;AACJ;AAEO,MAAMa,QAAe;IACxB,MAAM;QACF,GAAGb,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMc,qBAA4B;IACrC,MAAM;QACF,GAAGd,QAAQ,IAAI;QACf,MAAM;QACN,UAAU;IACd;AACJ;AAEO,MAAMe,aAAoB;IAC7B,MAAM;QACF,GAAGf,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMgB,cAAqB;IAC9B,MAAM;QACF,GAAGhB,QAAQ,IAAI;QACf,SAAS;QACT,MAAM,WAAN,GACI,oBAAC,4BACG,oBAACC,gBAAOA;IAGpB;AACJ;AAEO,MAAMgB,gBAAuB;IAChC,MAAM;QACF,SAAS;QACT,MAAM;QACN,UAAU;QACV,MAAM,WAAN,GAAM,oBAAChB,gBAAOA;QACd,UAAU;IACd;AACJ"}
|
package/Calendar/Calendar.d.ts
CHANGED
|
@@ -3,21 +3,22 @@ import { type DayPickerProps } from "react-day-picker";
|
|
|
3
3
|
type CalendarProps = DayPickerProps & {
|
|
4
4
|
className?: string;
|
|
5
5
|
};
|
|
6
|
-
declare const
|
|
7
|
-
|
|
6
|
+
declare const DecoratableCalendar: ({ className, classNames, components, ...props }: CalendarProps) => React.JSX.Element;
|
|
7
|
+
declare const Calendar: typeof DecoratableCalendar & {
|
|
8
|
+
original: typeof DecoratableCalendar;
|
|
8
9
|
originalName: string;
|
|
9
10
|
displayName: string;
|
|
10
11
|
} & {
|
|
11
|
-
original:
|
|
12
|
-
original:
|
|
12
|
+
original: typeof DecoratableCalendar & {
|
|
13
|
+
original: typeof DecoratableCalendar;
|
|
13
14
|
originalName: string;
|
|
14
15
|
displayName: string;
|
|
15
16
|
};
|
|
16
17
|
originalName: string;
|
|
17
18
|
displayName: string;
|
|
18
19
|
} & {
|
|
19
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
20
|
-
original:
|
|
20
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableCalendar & {
|
|
21
|
+
original: typeof DecoratableCalendar;
|
|
21
22
|
originalName: string;
|
|
22
23
|
displayName: string;
|
|
23
24
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -4,7 +4,7 @@ const calendarClassNames = {
|
|
|
4
4
|
month: "flex flex-col gap-sm",
|
|
5
5
|
month_caption: "flex items-center justify-center h-8 relative",
|
|
6
6
|
caption_label: "text-md font-semibold text-neutral-strong",
|
|
7
|
-
nav: "absolute inset-x-0 flex items-center justify-between",
|
|
7
|
+
nav: "absolute inset-x-0 z-10 flex items-center justify-between",
|
|
8
8
|
button_previous: "inline-flex items-center justify-center size-8 rounded-sm cursor-pointer text-neutral-strong hover:bg-neutral-light",
|
|
9
9
|
button_next: "inline-flex items-center justify-center size-8 rounded-sm cursor-pointer text-neutral-strong hover:bg-neutral-light",
|
|
10
10
|
month_grid: "border-collapse",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar/calendarClassNames.js","sources":["../../src/Calendar/calendarClassNames.ts"],"sourcesContent":["import type { ClassNames } from \"react-day-picker\";\n\nexport const calendarClassNames: Partial<ClassNames> = {\n root: \"p-md\",\n months: \"relative flex gap-md\",\n month: \"flex flex-col gap-sm\",\n month_caption: \"flex items-center justify-center h-8 relative\",\n caption_label: \"text-md font-semibold text-neutral-strong\",\n nav: \"absolute inset-x-0 flex items-center justify-between\",\n button_previous:\n \"inline-flex items-center justify-center size-8 rounded-sm cursor-pointer text-neutral-strong hover:bg-neutral-light\",\n button_next:\n \"inline-flex items-center justify-center size-8 rounded-sm cursor-pointer text-neutral-strong hover:bg-neutral-light\",\n month_grid: \"border-collapse\",\n weekdays: \"\",\n weekday: \"text-xs font-medium text-neutral-dimmed size-9 text-center\",\n weeks: \"\",\n week: \"\",\n day: \"size-9 text-center text-sm p-0 relative\",\n day_button:\n \"inline-flex items-center justify-center size-9 rounded-sm font-normal cursor-pointer hover:bg-neutral-light transition-colors\",\n selected:\n \"[&>button]:bg-primary [&>button]:text-neutral-base [&>button]:hover:bg-primary-strong [&>button]:font-medium\",\n today: \"[&>button]:border-sm [&>button]:border-primary\",\n outside: \"[&>button]:text-neutral-dimmed [&>button]:opacity-50\",\n disabled: \"[&>button]:text-neutral-disabled [&>button]:cursor-not-allowed\",\n hidden: \"invisible\",\n range_start:\n \"[&>button]:bg-primary [&>button]:text-neutral-base [&>button]:hover:bg-primary-strong [&>button]:rounded-r-none\",\n range_end:\n \"[&>button]:bg-primary [&>button]:text-neutral-base [&>button]:hover:bg-primary-strong [&>button]:rounded-l-none\",\n range_middle:\n \"bg-primary-subtle [&>button]:bg-transparent [&>button]:text-primary-strong [&>button]:rounded-none [&>button]:hover:bg-primary-subtle/70\",\n focused: \"[&>button]:ring-2 [&>button]:ring-primary-dimmed\",\n dropdowns: \"flex items-center gap-sm\",\n dropdown:\n \"appearance-none border-sm border-neutral-muted rounded-sm px-sm py-xs text-sm cursor-pointer bg-neutral-base\",\n dropdown_root: \"relative\",\n chevron: \"size-md fill-current\",\n footer: \"pt-sm text-sm text-neutral-dimmed\"\n};\n"],"names":["calendarClassNames"],"mappings":"AAEO,MAAMA,qBAA0C;IACnD,MAAM;IACN,QAAQ;IACR,OAAO;IACP,eAAe;IACf,eAAe;IACf,KAAK;IACL,iBACI;IACJ,aACI;IACJ,YAAY;IACZ,UAAU;IACV,SAAS;IACT,OAAO;IACP,MAAM;IACN,KAAK;IACL,YACI;IACJ,UACI;IACJ,OAAO;IACP,SAAS;IACT,UAAU;IACV,QAAQ;IACR,aACI;IACJ,WACI;IACJ,cACI;IACJ,SAAS;IACT,WAAW;IACX,UACI;IACJ,eAAe;IACf,SAAS;IACT,QAAQ;AACZ"}
|
|
1
|
+
{"version":3,"file":"Calendar/calendarClassNames.js","sources":["../../src/Calendar/calendarClassNames.ts"],"sourcesContent":["import type { ClassNames } from \"react-day-picker\";\n\nexport const calendarClassNames: Partial<ClassNames> = {\n root: \"p-md\",\n months: \"relative flex gap-md\",\n month: \"flex flex-col gap-sm\",\n month_caption: \"flex items-center justify-center h-8 relative\",\n caption_label: \"text-md font-semibold text-neutral-strong\",\n nav: \"absolute inset-x-0 z-10 flex items-center justify-between\",\n button_previous:\n \"inline-flex items-center justify-center size-8 rounded-sm cursor-pointer text-neutral-strong hover:bg-neutral-light\",\n button_next:\n \"inline-flex items-center justify-center size-8 rounded-sm cursor-pointer text-neutral-strong hover:bg-neutral-light\",\n month_grid: \"border-collapse\",\n weekdays: \"\",\n weekday: \"text-xs font-medium text-neutral-dimmed size-9 text-center\",\n weeks: \"\",\n week: \"\",\n day: \"size-9 text-center text-sm p-0 relative\",\n day_button:\n \"inline-flex items-center justify-center size-9 rounded-sm font-normal cursor-pointer hover:bg-neutral-light transition-colors\",\n selected:\n \"[&>button]:bg-primary [&>button]:text-neutral-base [&>button]:hover:bg-primary-strong [&>button]:font-medium\",\n today: \"[&>button]:border-sm [&>button]:border-primary\",\n outside: \"[&>button]:text-neutral-dimmed [&>button]:opacity-50\",\n disabled: \"[&>button]:text-neutral-disabled [&>button]:cursor-not-allowed\",\n hidden: \"invisible\",\n range_start:\n \"[&>button]:bg-primary [&>button]:text-neutral-base [&>button]:hover:bg-primary-strong [&>button]:rounded-r-none\",\n range_end:\n \"[&>button]:bg-primary [&>button]:text-neutral-base [&>button]:hover:bg-primary-strong [&>button]:rounded-l-none\",\n range_middle:\n \"bg-primary-subtle [&>button]:bg-transparent [&>button]:text-primary-strong [&>button]:rounded-none [&>button]:hover:bg-primary-subtle/70\",\n focused: \"[&>button]:ring-2 [&>button]:ring-primary-dimmed\",\n dropdowns: \"flex items-center gap-sm\",\n dropdown:\n \"appearance-none border-sm border-neutral-muted rounded-sm px-sm py-xs text-sm cursor-pointer bg-neutral-base\",\n dropdown_root: \"relative\",\n chevron: \"size-md fill-current\",\n footer: \"pt-sm text-sm text-neutral-dimmed\"\n};\n"],"names":["calendarClassNames"],"mappings":"AAEO,MAAMA,qBAA0C;IACnD,MAAM;IACN,QAAQ;IACR,OAAO;IACP,eAAe;IACf,eAAe;IACf,KAAK;IACL,iBACI;IACJ,aACI;IACJ,YAAY;IACZ,UAAU;IACV,SAAS;IACT,OAAO;IACP,MAAM;IACN,KAAK;IACL,YACI;IACJ,UACI;IACJ,OAAO;IACP,SAAS;IACT,UAAU;IACV,QAAQ;IACR,aACI;IACJ,WACI;IACJ,cACI;IACJ,SAAS;IACT,WAAW;IACX,UACI;IACJ,eAAe;IACf,SAAS;IACT,QAAQ;AACZ"}
|
package/Card/Card.d.ts
CHANGED
|
@@ -16,39 +16,25 @@ interface CardProps extends Omit<React.ComponentPropsWithoutRef<typeof CardConte
|
|
|
16
16
|
info?: React.ReactNode;
|
|
17
17
|
children: React.ReactNode;
|
|
18
18
|
}
|
|
19
|
-
declare const
|
|
19
|
+
declare const CardBase: {
|
|
20
20
|
(props: CardProps): React.JSX.Element;
|
|
21
21
|
displayName: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
displayName: string;
|
|
26
|
-
};
|
|
22
|
+
};
|
|
23
|
+
declare const Card: typeof CardBase & {
|
|
24
|
+
original: typeof CardBase;
|
|
27
25
|
originalName: string;
|
|
28
26
|
displayName: string;
|
|
29
27
|
} & {
|
|
30
|
-
original: {
|
|
31
|
-
|
|
32
|
-
displayName: string;
|
|
33
|
-
} & {
|
|
34
|
-
original: {
|
|
35
|
-
(props: CardProps): React.JSX.Element;
|
|
36
|
-
displayName: string;
|
|
37
|
-
};
|
|
28
|
+
original: typeof CardBase & {
|
|
29
|
+
original: typeof CardBase;
|
|
38
30
|
originalName: string;
|
|
39
31
|
displayName: string;
|
|
40
32
|
};
|
|
41
33
|
originalName: string;
|
|
42
34
|
displayName: string;
|
|
43
35
|
} & {
|
|
44
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<{
|
|
45
|
-
|
|
46
|
-
displayName: string;
|
|
47
|
-
} & {
|
|
48
|
-
original: {
|
|
49
|
-
(props: CardProps): React.JSX.Element;
|
|
50
|
-
displayName: string;
|
|
51
|
-
};
|
|
36
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof CardBase & {
|
|
37
|
+
original: typeof CardBase;
|
|
52
38
|
originalName: string;
|
|
53
39
|
displayName: string;
|
|
54
40
|
}>) => (props: unknown) => React.JSX.Element;
|
package/Card/Card.stories.d.ts
CHANGED
package/Card/Card.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card/Card.stories.js","sources":["../../src/Card/Card.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react-webpack5\";\nimport { Card } from \"./Card.js\";\nimport { Button } from \"~/Button/index.js\";\nimport { DropdownMenu } from \"~/DropdownMenu/index.js\";\nimport { ReactComponent as NotificationIcon } from \"@webiny/icons/notifications_active.svg\";\nimport { Tabs } from \"~/Tabs/index.js\";\n\nconst meta: Meta<typeof Card> = {\n title: \"Components/Card\",\n component: Card,\n argTypes: {},\n decorators: [\n Story => (\n <div className=\"bg-[#f9fafa] p-[50px] rounded-[5px] max-w-[800px] text-neutral-dimmed\">\n <Story />\n </div>\n )\n ]\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof Card>;\n\nexport const Default: Story = {\n args: {\n padding: \"md\",\n title: \"Card Title\",\n description: \"A short card description.\",\n info: (\n <>\n Learn more about this <a href={\"#\"}>here</a>.\n </>\n ),\n children: (\n <>\n The amazing, splendid, and most useful umbrella, resistant to rain and friendly to\n winds, is something that deserves all admiration. Crafted with perfect textures, it\n bravely withstands storms and gently shades the rays of the sun. A remarkable\n innovation, with an ergonomically designed grip most suited to the hand, it remains\n stable even in the fiercest weather.\n </>\n ),\n actions: (\n <>\n <Card.CancelAction />\n <Card.ConfirmAction />\n </>\n )\n },\n argTypes: {}\n};\n\nexport const SmallSize: Story = {\n args: {\n ...Default.args,\n size: \"sm\"\n }\n};\n\nexport const PaddingSmall: Story = {\n args: {\n ...Default.args,\n padding: \"sm\"\n }\n};\n\nexport const PaddingMedium: Story = {\n args: {\n ...Default.args,\n padding: \"md\"\n }\n};\n\nexport const PaddingLarge: Story = {\n args: {\n ...Default.args,\n padding: \"lg\"\n }\n};\n\nexport const WithActions: Story = {\n args: {\n ...Default.args\n }\n};\nexport const WithHeaderActions: Story = {\n args: {\n ...Default.args,\n actionsPosition: \"header\"\n }\n};\n\nexport const WithSmallHeaderActions: Story = {\n args: {\n ...Default.args,\n actionsPosition: \"header\",\n actionsSize: \"sm\"\n }\n};\n\nexport const WithLargeCorners: Story = {\n args: {\n ...Default.args,\n cornerSize: \"lg\"\n }\n};\n\nexport const AccentVariant: Story = {\n args: {\n ...Default.args,\n variant: \"accent\"\n }\n};\n\nexport const DropdownMenuInCard: Story = {\n args: {\n ...Default.args,\n children: (\n <>\n <DropdownMenu trigger={<Button variant=\"primary\" text={\"Open\"} />}>\n <DropdownMenu.Item text={\"Billing\"} />\n <DropdownMenu.Item text={\"Settings\"} />\n <DropdownMenu.Item text={\"Keyboard shortcuts\"} />\n </DropdownMenu>\n </>\n )\n }\n};\nexport const WithSmallElevation: Story = {\n args: {\n ...Default.args,\n elevation: \"small\"\n }\n};\n\nexport const WithMediumElevation: Story = {\n args: {\n ...Default.args,\n elevation: \"medium\"\n }\n};\n\nexport const WithLargeElevation: Story = {\n args: {\n ...Default.args,\n elevation: \"large\"\n }\n};\n\nexport const WithIcon: Story = {\n args: {\n ...Default.args,\n icon: <Card.Icon icon={<NotificationIcon />} label={\"Title icon\"} />\n }\n};\n\nexport const WithTabs: Story = {\n args: {\n ...Default.args,\n bodyPadding: false,\n icon: <Card.Icon icon={<NotificationIcon />} label={\"Title icon\"} />,\n children: (\n <>\n <Tabs\n className={\"w-[500px]\"}\n separator={true}\n spacing={\"lg\"}\n tabs={[\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\"Make changes to your account here.\"}\n />,\n <Tabs.Tab\n key={\"company\"}\n value={\"company\"}\n trigger={\"Company\"}\n content={\"Make changes to your company info here.\"}\n />,\n <Tabs.Tab\n key={\"security\"}\n value={\"security\"}\n trigger={\"Security\"}\n content={\"Make changes to your security settings here.\"}\n />,\n <Tabs.Tab\n key={\"development\"}\n value={\"development\"}\n trigger={\"Development\"}\n content={\"Make changes to your development settings here.\"}\n />\n ]}\n />\n </>\n )\n }\n};\n\nexport const Documentation: Story = {\n render: args => {\n return <Card {...args} />;\n },\n args: {\n title: \"Card title goes here\",\n description: \"Card description goes here\",\n children: <>This is card content. Anything can go in here.</>,\n actions: (\n <>\n <Button variant={\"secondary\"} text={\"Cancel\"} />\n <Button variant={\"primary\"} text={\"Confirm\"} />\n </>\n ),\n padding: \"sm\",\n elevation: \"small\"\n },\n argTypes: {\n title: {\n description: \"The title displayed at the top of the card\",\n control: \"text\"\n },\n description: {\n description: \"A description displayed below the title\",\n control: \"text\"\n },\n children: {\n description:\n \"The main content of the card. Please refer to the example code for details on usage.\"\n },\n actions: {\n description:\n \"Buttons or other interactive elements displayed at the bottom of the card. Please refer to the example code for details on usage.\"\n },\n padding: {\n description: \"Controls the amount of padding inside the card\",\n control: \"select\",\n options: [\"none\", \"standard\", \"comfortable\"]\n },\n elevation: {\n description: \"Controls the shadow depth of the card\",\n control: \"select\",\n options: [\"none\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"]\n }\n }\n};\n"],"names":["meta","Card","Story","Default","SmallSize","PaddingSmall","PaddingMedium","PaddingLarge","WithActions","WithHeaderActions","WithSmallHeaderActions","WithLargeCorners","AccentVariant","DropdownMenuInCard","DropdownMenu","Button","WithSmallElevation","WithMediumElevation","WithLargeElevation","WithIcon","NotificationIcon","WithTabs","Tabs","Documentation","args"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Card/Card.stories.js","sources":["../../src/Card/Card.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Card } from \"./Card.js\";\nimport { Button } from \"~/Button/index.js\";\nimport { DropdownMenu } from \"~/DropdownMenu/index.js\";\nimport { ReactComponent as NotificationIcon } from \"@webiny/icons/notifications_active.svg\";\nimport { Tabs } from \"~/Tabs/index.js\";\n\nconst meta: Meta<typeof Card> = {\n title: \"Components/Card\",\n component: Card,\n argTypes: {},\n decorators: [\n Story => (\n <div className=\"bg-[#f9fafa] p-[50px] rounded-[5px] max-w-[800px] text-neutral-dimmed\">\n <Story />\n </div>\n )\n ]\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof Card>;\n\nexport const Default: Story = {\n args: {\n padding: \"md\",\n title: \"Card Title\",\n description: \"A short card description.\",\n info: (\n <>\n Learn more about this <a href={\"#\"}>here</a>.\n </>\n ),\n children: (\n <>\n The amazing, splendid, and most useful umbrella, resistant to rain and friendly to\n winds, is something that deserves all admiration. Crafted with perfect textures, it\n bravely withstands storms and gently shades the rays of the sun. A remarkable\n innovation, with an ergonomically designed grip most suited to the hand, it remains\n stable even in the fiercest weather.\n </>\n ),\n actions: (\n <>\n <Card.CancelAction />\n <Card.ConfirmAction />\n </>\n )\n },\n argTypes: {}\n};\n\nexport const SmallSize: Story = {\n args: {\n ...Default.args,\n size: \"sm\"\n }\n};\n\nexport const PaddingSmall: Story = {\n args: {\n ...Default.args,\n padding: \"sm\"\n }\n};\n\nexport const PaddingMedium: Story = {\n args: {\n ...Default.args,\n padding: \"md\"\n }\n};\n\nexport const PaddingLarge: Story = {\n args: {\n ...Default.args,\n padding: \"lg\"\n }\n};\n\nexport const WithActions: Story = {\n args: {\n ...Default.args\n }\n};\nexport const WithHeaderActions: Story = {\n args: {\n ...Default.args,\n actionsPosition: \"header\"\n }\n};\n\nexport const WithSmallHeaderActions: Story = {\n args: {\n ...Default.args,\n actionsPosition: \"header\",\n actionsSize: \"sm\"\n }\n};\n\nexport const WithLargeCorners: Story = {\n args: {\n ...Default.args,\n cornerSize: \"lg\"\n }\n};\n\nexport const AccentVariant: Story = {\n args: {\n ...Default.args,\n variant: \"accent\"\n }\n};\n\nexport const DropdownMenuInCard: Story = {\n args: {\n ...Default.args,\n children: (\n <>\n <DropdownMenu trigger={<Button variant=\"primary\" text={\"Open\"} />}>\n <DropdownMenu.Item text={\"Billing\"} />\n <DropdownMenu.Item text={\"Settings\"} />\n <DropdownMenu.Item text={\"Keyboard shortcuts\"} />\n </DropdownMenu>\n </>\n )\n }\n};\nexport const WithSmallElevation: Story = {\n args: {\n ...Default.args,\n elevation: \"small\"\n }\n};\n\nexport const WithMediumElevation: Story = {\n args: {\n ...Default.args,\n elevation: \"medium\"\n }\n};\n\nexport const WithLargeElevation: Story = {\n args: {\n ...Default.args,\n elevation: \"large\"\n }\n};\n\nexport const WithIcon: Story = {\n args: {\n ...Default.args,\n icon: <Card.Icon icon={<NotificationIcon />} label={\"Title icon\"} />\n }\n};\n\nexport const WithTabs: Story = {\n args: {\n ...Default.args,\n bodyPadding: false,\n icon: <Card.Icon icon={<NotificationIcon />} label={\"Title icon\"} />,\n children: (\n <>\n <Tabs\n className={\"w-[500px]\"}\n separator={true}\n spacing={\"lg\"}\n tabs={[\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\"Make changes to your account here.\"}\n />,\n <Tabs.Tab\n key={\"company\"}\n value={\"company\"}\n trigger={\"Company\"}\n content={\"Make changes to your company info here.\"}\n />,\n <Tabs.Tab\n key={\"security\"}\n value={\"security\"}\n trigger={\"Security\"}\n content={\"Make changes to your security settings here.\"}\n />,\n <Tabs.Tab\n key={\"development\"}\n value={\"development\"}\n trigger={\"Development\"}\n content={\"Make changes to your development settings here.\"}\n />\n ]}\n />\n </>\n )\n }\n};\n\nexport const Documentation: Story = {\n render: args => {\n return <Card {...args} />;\n },\n args: {\n title: \"Card title goes here\",\n description: \"Card description goes here\",\n children: <>This is card content. Anything can go in here.</>,\n actions: (\n <>\n <Button variant={\"secondary\"} text={\"Cancel\"} />\n <Button variant={\"primary\"} text={\"Confirm\"} />\n </>\n ),\n padding: \"sm\",\n elevation: \"small\"\n },\n argTypes: {\n title: {\n description: \"The title displayed at the top of the card\",\n control: \"text\"\n },\n description: {\n description: \"A description displayed below the title\",\n control: \"text\"\n },\n children: {\n description:\n \"The main content of the card. Please refer to the example code for details on usage.\"\n },\n actions: {\n description:\n \"Buttons or other interactive elements displayed at the bottom of the card. Please refer to the example code for details on usage.\"\n },\n padding: {\n description: \"Controls the amount of padding inside the card\",\n control: \"select\",\n options: [\"none\", \"standard\", \"comfortable\"]\n },\n elevation: {\n description: \"Controls the shadow depth of the card\",\n control: \"select\",\n options: [\"none\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"]\n }\n }\n};\n"],"names":["meta","Card","Story","Default","SmallSize","PaddingSmall","PaddingMedium","PaddingLarge","WithActions","WithHeaderActions","WithSmallHeaderActions","WithLargeCorners","AccentVariant","DropdownMenuInCard","DropdownMenu","Button","WithSmallElevation","WithMediumElevation","WithLargeElevation","WithIcon","NotificationIcon","WithTabs","Tabs","Documentation","args"],"mappings":"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"}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { ButtonProps } from "../../Button/index.js";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
declare const CancelActionBase: (props: ButtonProps) => React.JSX.Element;
|
|
4
|
+
export declare const CancelAction: typeof CancelActionBase & {
|
|
5
|
+
original: typeof CancelActionBase;
|
|
5
6
|
originalName: string;
|
|
6
7
|
displayName: string;
|
|
7
8
|
} & {
|
|
8
|
-
original:
|
|
9
|
-
original:
|
|
9
|
+
original: typeof CancelActionBase & {
|
|
10
|
+
original: typeof CancelActionBase;
|
|
10
11
|
originalName: string;
|
|
11
12
|
displayName: string;
|
|
12
13
|
};
|
|
13
14
|
originalName: string;
|
|
14
15
|
displayName: string;
|
|
15
16
|
} & {
|
|
16
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
17
|
-
original:
|
|
17
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof CancelActionBase & {
|
|
18
|
+
original: typeof CancelActionBase;
|
|
18
19
|
originalName: string;
|
|
19
20
|
displayName: string;
|
|
20
21
|
}>) => (props: unknown) => React.JSX.Element;
|
|
21
22
|
};
|
|
23
|
+
export {};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "../../utils.js";
|
|
3
3
|
declare const cardContentVariants: (props?: ({
|
|
4
|
-
cornerSize?: "
|
|
4
|
+
cornerSize?: "lg" | "md" | null | undefined;
|
|
5
5
|
variant?: "accent" | "default" | null | undefined;
|
|
6
|
-
elevation?: "
|
|
6
|
+
elevation?: "large" | "medium" | "none" | "small" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface CardContentProps extends VariantProps<typeof cardContentVariants> {
|
|
9
9
|
className?: string;
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
}
|
|
12
|
-
declare
|
|
13
|
-
|
|
14
|
-
displayName: string;
|
|
15
|
-
}
|
|
12
|
+
declare function CardContent({ children }: CardContentProps): React.JSX.Element;
|
|
13
|
+
declare namespace CardContent {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
16
|
export { CardContent };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "../../utils.js";
|
|
3
3
|
declare const cardTitleVariants: (props?: ({
|
|
4
|
-
padding?: "
|
|
5
|
-
size?: "
|
|
4
|
+
padding?: "lg" | "md" | "sm" | null | undefined;
|
|
5
|
+
size?: "md" | "sm" | null | undefined;
|
|
6
6
|
variant?: "accent" | "default" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export type CardTitleProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof cardTitleVariants>;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { ButtonProps } from "../../Button/index.js";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
declare const ConfirmActionBase: (props: ButtonProps) => React.JSX.Element;
|
|
4
|
+
export declare const ConfirmAction: typeof ConfirmActionBase & {
|
|
5
|
+
original: typeof ConfirmActionBase;
|
|
5
6
|
originalName: string;
|
|
6
7
|
displayName: string;
|
|
7
8
|
} & {
|
|
8
|
-
original:
|
|
9
|
-
original:
|
|
9
|
+
original: typeof ConfirmActionBase & {
|
|
10
|
+
original: typeof ConfirmActionBase;
|
|
10
11
|
originalName: string;
|
|
11
12
|
displayName: string;
|
|
12
13
|
};
|
|
13
14
|
originalName: string;
|
|
14
15
|
displayName: string;
|
|
15
16
|
} & {
|
|
16
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
17
|
-
original:
|
|
17
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof ConfirmActionBase & {
|
|
18
|
+
original: typeof ConfirmActionBase;
|
|
18
19
|
originalName: string;
|
|
19
20
|
displayName: string;
|
|
20
21
|
}>) => (props: unknown) => React.JSX.Element;
|
|
21
22
|
};
|
|
23
|
+
export {};
|
|
@@ -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 IconProps = IconComponentProps;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
declare const IconBase: (props: IconProps) => React.JSX.Element;
|
|
5
|
+
export declare const Icon: typeof IconBase & {
|
|
6
|
+
original: typeof IconBase;
|
|
6
7
|
originalName: string;
|
|
7
8
|
displayName: string;
|
|
8
9
|
} & {
|
|
9
|
-
original:
|
|
10
|
-
original:
|
|
10
|
+
original: typeof IconBase & {
|
|
11
|
+
original: typeof IconBase;
|
|
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 IconBase & {
|
|
19
|
+
original: typeof IconBase;
|
|
19
20
|
originalName: string;
|
|
20
21
|
displayName: string;
|
|
21
22
|
}>) => (props: unknown) => React.JSX.Element;
|
package/Checkbox/Checkbox.d.ts
CHANGED
|
@@ -2,21 +2,22 @@ import React from "react";
|
|
|
2
2
|
import type { CheckboxPrimitiveProps } from "./primitives/index.js";
|
|
3
3
|
import type { FormComponentProps } from "../FormComponent/index.js";
|
|
4
4
|
type CheckboxProps = CheckboxPrimitiveProps & FormComponentProps;
|
|
5
|
-
declare const
|
|
6
|
-
|
|
5
|
+
declare const DecoratableCheckbox: ({ description, note, validation, ...props }: CheckboxProps) => React.JSX.Element;
|
|
6
|
+
declare const Checkbox: typeof DecoratableCheckbox & {
|
|
7
|
+
original: typeof DecoratableCheckbox;
|
|
7
8
|
originalName: string;
|
|
8
9
|
displayName: string;
|
|
9
10
|
} & {
|
|
10
|
-
original:
|
|
11
|
-
original:
|
|
11
|
+
original: typeof DecoratableCheckbox & {
|
|
12
|
+
original: typeof DecoratableCheckbox;
|
|
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 DecoratableCheckbox & {
|
|
20
|
+
original: typeof DecoratableCheckbox;
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox/Checkbox.stories.js","sources":["../../src/Checkbox/Checkbox.stories.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react
|
|
1
|
+
{"version":3,"file":"Checkbox/Checkbox.stories.js","sources":["../../src/Checkbox/Checkbox.stories.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Checkbox } from \"~/Checkbox/index.js\";\n\nconst meta: Meta<typeof Checkbox> = {\n title: \"Components/Form/Checkbox\",\n component: Checkbox,\n argTypes: {\n disabled: {\n control: \"boolean\",\n defaultValue: false\n }\n },\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [checked, setChecked] = useState(args.checked);\n return <Checkbox {...args} checked={checked} onChange={checked => setChecked(checked)} />;\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Checkbox>;\n\nexport const Default: Story = {\n args: {\n label: \"Any field label\"\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 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 [checked, setChecked] = useState(args.checked || false);\n const [validation, setValidation] = useState({ isValid: true, message: \"\" });\n\n // Update checked state when args.checked changes\n useEffect(() => {\n setChecked(args.checked || false);\n }, [args.checked]);\n\n const handleChange = (isChecked: boolean) => {\n setChecked(isChecked);\n\n // Simple required validation\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 // Validate on required change\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 <Checkbox {...args} checked={checked} onChange={handleChange} validation={validation} />\n );\n },\n args: {\n label: \"Any field label\",\n checked: false,\n disabled: false,\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 argTypes: {\n label: {\n description: \"Label text for the checkbox\",\n control: \"text\",\n defaultValue: \"Any field label\"\n },\n checked: {\n description: \"Determines if the checkbox is checked\",\n control: \"boolean\",\n defaultValue: false\n },\n disabled: {\n description: \"Disables the checkbox when set to true\",\n control: \"boolean\",\n defaultValue: false\n },\n required: {\n description: \"Makes the checkbox required when set to true\",\n control: \"boolean\",\n defaultValue: false\n },\n description: {\n description: \"Additional description text below the checkbox\",\n control: \"text\"\n },\n note: {\n description: \"Additional note text below the checkbox\",\n control: \"text\"\n },\n validation: {\n description: \"Validation state and message\",\n control: \"object\"\n },\n onChange: {\n description: \"Callback function triggered when checkbox state changes\"\n }\n }\n};\n"],"names":["meta","Checkbox","args","checked","setChecked","useState","Default","WithDescription","WithNotes","WithErrors","Disabled","FullExample","Documentation","validation","setValidation","useEffect","handleChange","isChecked"],"mappings":";;AAIA,MAAMA,OAA8B;IAChC,OAAO;IACP,WAAWC;IACX,UAAU;QACN,UAAU;YACN,SAAS;YACT,cAAc;QAClB;IACJ;IACA,YAAY;QACR,QAAQ;IACZ;IACA,QAAQC,CAAAA;QACJ,MAAM,CAACC,SAASC,WAAW,GAAGC,SAASH,KAAK,OAAO;QACnD,OAAO,WAAP,GAAO,oBAACD,UAAQA;YAAE,GAAGC,IAAI;YAAE,SAASC;YAAS,UAAUA,CAAAA,UAAWC,WAAWD;;IACjF;AACJ;AAEA,yBAAeH;AAGR,MAAMM,UAAiB;IAC1B,MAAM;QACF,OAAO;IACX;AACJ;AAEO,MAAMC,kBAAyB;IAClC,MAAM;QACF,GAAGD,QAAQ,IAAI;QACf,aAAa;IACjB;AACJ;AAEO,MAAME,YAAmB;IAC5B,MAAM;QACF,GAAGF,QAAQ,IAAI;QACf,MAAM;IACV;AACJ;AAEO,MAAMG,aAAoB;IAC7B,MAAM;QACF,GAAGH,QAAQ,IAAI;QACf,YAAY;YACR,SAAS;YACT,SAAS;QACb;IACJ;AACJ;AAEO,MAAMI,WAAkB;IAC3B,MAAM;QACF,GAAGJ,QAAQ,IAAI;QACf,UAAU;IACd;AACJ;AAEO,MAAMK,cAAqB;IAC9B,MAAM;QACF,GAAGL,QAAQ,IAAI;QACf,OAAO;QACP,UAAU;QACV,aAAa;QACb,MAAM;QACN,YAAY;YACR,SAAS;YACT,SAAS;QACb;IACJ;AACJ;AAEO,MAAMM,gBAAuB;IAChC,QAAQV,CAAAA;QACJ,MAAM,CAACC,SAASC,WAAW,GAAGC,SAASH,KAAK,OAAO,IAAI;QACvD,MAAM,CAACW,YAAYC,cAAc,GAAGT,SAAS;YAAE,SAAS;YAAM,SAAS;QAAG;QAG1EU,UAAU;YACNX,WAAWF,KAAK,OAAO,IAAI;QAC/B,GAAG;YAACA,KAAK,OAAO;SAAC;QAEjB,MAAMc,eAAe,CAACC;YAClBb,WAAWa;YAGPf,KAAK,QAAQ,IAAI,CAACe,YAClBH,cAAc;gBAAE,SAAS;gBAAO,SAAS;YAAyB,KAElEA,cAAc;gBAAE,SAAS;gBAAM,SAAS;YAAG;QAEnD;QAGAC,UAAU;YACFb,KAAK,QAAQ,IAAI,CAACC,UAClBW,cAAc;gBAAE,SAAS;gBAAO,SAAS;YAAyB,KAElEA,cAAc;gBAAE,SAAS;gBAAM,SAAS;YAAG;QAEnD,GAAG;YAACZ,KAAK,QAAQ;YAAEC;SAAQ;QAE3B,OAAO,WAAP,GACI,oBAACF,UAAQA;YAAE,GAAGC,IAAI;YAAE,SAASC;YAAS,UAAUa;YAAc,YAAYH;;IAElF;IACA,MAAM;QACF,OAAO;QACP,SAAS;QACT,UAAU;QACV,UAAU;QACV,aAAa;QACb,MAAM;QACN,YAAY;YACR,SAAS;YACT,SAAS;QACb;IACJ;IACA,UAAU;QACN,OAAO;YACH,aAAa;YACb,SAAS;YACT,cAAc;QAClB;QACA,SAAS;YACL,aAAa;YACb,SAAS;YACT,cAAc;QAClB;QACA,UAAU;YACN,aAAa;YACb,SAAS;YACT,cAAc;QAClB;QACA,UAAU;YACN,aAAa;YACb,SAAS;YACT,cAAc;QAClB;QACA,aAAa;YACT,aAAa;YACb,SAAS;QACb;QACA,MAAM;YACF,aAAa;YACb,SAAS;QACb;QACA,YAAY;YACR,aAAa;YACb,SAAS;QACb;QACA,UAAU;YACN,aAAa;QACjB;IACJ;AACJ"}
|
|
@@ -19,40 +19,45 @@ type CheckboxPrimitiveRendererProps = Omit<CheckboxPrimitiveProps, "onCheckedCha
|
|
|
19
19
|
changeChecked: (checked: boolean) => void;
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
};
|
|
22
|
-
declare const
|
|
23
|
-
|
|
22
|
+
declare const DecoratableCheckboxPrimitiveRenderer: ({ label, id, hasLabel, indeterminate, changeChecked, checked, className, disabled, ...props }: CheckboxPrimitiveRendererProps) => React.JSX.Element;
|
|
23
|
+
declare const CheckboxPrimitiveRenderer: typeof DecoratableCheckboxPrimitiveRenderer & {
|
|
24
|
+
original: typeof DecoratableCheckboxPrimitiveRenderer;
|
|
24
25
|
originalName: string;
|
|
25
26
|
displayName: string;
|
|
26
27
|
} & {
|
|
27
|
-
original:
|
|
28
|
-
original:
|
|
28
|
+
original: typeof DecoratableCheckboxPrimitiveRenderer & {
|
|
29
|
+
original: typeof DecoratableCheckboxPrimitiveRenderer;
|
|
29
30
|
originalName: string;
|
|
30
31
|
displayName: string;
|
|
31
32
|
};
|
|
32
33
|
originalName: string;
|
|
33
34
|
displayName: string;
|
|
34
35
|
} & {
|
|
35
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
36
|
-
original:
|
|
36
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableCheckboxPrimitiveRenderer & {
|
|
37
|
+
original: typeof DecoratableCheckboxPrimitiveRenderer;
|
|
37
38
|
originalName: string;
|
|
38
39
|
displayName: string;
|
|
39
40
|
}>) => (props: unknown) => React.JSX.Element;
|
|
40
41
|
};
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Checkbox
|
|
44
|
+
*/
|
|
45
|
+
declare const DecoratableCheckboxPrimitive: (props: CheckboxPrimitiveProps) => React.JSX.Element | null;
|
|
46
|
+
declare const CheckboxPrimitive: typeof DecoratableCheckboxPrimitive & {
|
|
47
|
+
original: typeof DecoratableCheckboxPrimitive;
|
|
43
48
|
originalName: string;
|
|
44
49
|
displayName: string;
|
|
45
50
|
} & {
|
|
46
|
-
original:
|
|
47
|
-
original:
|
|
51
|
+
original: typeof DecoratableCheckboxPrimitive & {
|
|
52
|
+
original: typeof DecoratableCheckboxPrimitive;
|
|
48
53
|
originalName: string;
|
|
49
54
|
displayName: string;
|
|
50
55
|
};
|
|
51
56
|
originalName: string;
|
|
52
57
|
displayName: string;
|
|
53
58
|
} & {
|
|
54
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
55
|
-
original:
|
|
59
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableCheckboxPrimitive & {
|
|
60
|
+
original: typeof DecoratableCheckboxPrimitive;
|
|
56
61
|
originalName: string;
|
|
57
62
|
displayName: string;
|
|
58
63
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox/primitives/CheckboxPrimitive.stories.js","sources":["../../../src/Checkbox/primitives/CheckboxPrimitive.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react
|
|
1
|
+
{"version":3,"file":"Checkbox/primitives/CheckboxPrimitive.stories.js","sources":["../../../src/Checkbox/primitives/CheckboxPrimitive.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { CheckboxPrimitive } from \"./CheckboxPrimitive.js\";\n\nconst meta: Meta<typeof CheckboxPrimitive> = {\n title: \"Components/Form Primitives/Checkbox\",\n component: CheckboxPrimitive,\n parameters: {\n layout: \"padded\"\n },\n render: args => {\n const [checked, setChecked] = useState(args.checked);\n return (\n <CheckboxPrimitive\n {...args}\n checked={checked}\n onChange={checked => setChecked(checked)}\n />\n );\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof CheckboxPrimitive>;\n\nexport const Default: Story = {\n args: {\n label: \"Any field label\"\n }\n};\n\nexport const LongLabel: Story = {\n args: {\n label: \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu aliquam lacus. Morbi eleifend, eros et vestibulum lobortis, mi elit scelerisque neque, sit amet dictum orci sem ac ante. In hac habitasse platea dictumst. Pellentesque molestie nisl tortor, eu dictum velit mollis vitae. Maecenas nec risus sit amet ante efficitur venenatis id eget eros. Aenean mollis vel dolor vitae vestibulum. Integer consectetur id diam eget iaculis. Praesent egestas ullamcorper libero vel eleifend. \"\n }\n};\n\nexport const Checked: Story = {\n args: {\n ...Default.args,\n checked: true\n }\n};\n\nexport const Indeterminate: Story = {\n args: {\n ...Default.args,\n indeterminate: true\n }\n};\n\nexport const Disabled: Story = {\n args: {\n ...Default.args,\n disabled: true\n }\n};\n"],"names":["meta","CheckboxPrimitive","args","checked","setChecked","useState","Default","LongLabel","Checked","Indeterminate","Disabled"],"mappings":";;AAIA,MAAMA,OAAuC;IACzC,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,mBAAiBA;YACb,GAAGC,IAAI;YACR,SAASC;YACT,UAAUA,CAAAA,UAAWC,WAAWD;;IAG5C;AACJ;AAEA,kCAAeH;AAGR,MAAMM,UAAiB;IAC1B,MAAM;QACF,OAAO;IACX;AACJ;AAEO,MAAMC,YAAmB;IAC5B,MAAM;QACF,OAAO;IACX;AACJ;AAEO,MAAMC,UAAiB;IAC1B,MAAM;QACF,GAAGF,QAAQ,IAAI;QACf,SAAS;IACb;AACJ;AAEO,MAAMG,gBAAuB;IAChC,MAAM;QACF,GAAGH,QAAQ,IAAI;QACf,eAAe;IACnB;AACJ;AAEO,MAAMI,WAAkB;IAC3B,MAAM;QACF,GAAGJ,QAAQ,IAAI;QACf,UAAU;IACd;AACJ"}
|
|
@@ -2,21 +2,22 @@ import React from "react";
|
|
|
2
2
|
import type { CheckboxGroupPrimitiveProps } from "./primitives/CheckboxGroupPrimitive.js";
|
|
3
3
|
import type { FormComponentProps } from "../FormComponent/index.js";
|
|
4
4
|
type CheckboxGroupProps = CheckboxGroupPrimitiveProps & FormComponentProps;
|
|
5
|
-
declare const
|
|
6
|
-
|
|
5
|
+
declare const DecoratableCheckboxGroup: ({ label, description, note, required, disabled, hint, validation, ...props }: CheckboxGroupProps) => React.JSX.Element;
|
|
6
|
+
declare const CheckboxGroup: typeof DecoratableCheckboxGroup & {
|
|
7
|
+
original: typeof DecoratableCheckboxGroup;
|
|
7
8
|
originalName: string;
|
|
8
9
|
displayName: string;
|
|
9
10
|
} & {
|
|
10
|
-
original:
|
|
11
|
-
original:
|
|
11
|
+
original: typeof DecoratableCheckboxGroup & {
|
|
12
|
+
original: typeof DecoratableCheckboxGroup;
|
|
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 DecoratableCheckboxGroup & {
|
|
20
|
+
original: typeof DecoratableCheckboxGroup;
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
}>) => (props: unknown) => React.JSX.Element;
|