@webiny/admin-ui 6.4.12-beta.5 → 6.5.0-beta.1
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/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/AutoComplete/AutoComplete.d.ts +7 -6
- package/AutoComplete/primitives/AutoCompletePrimitive.d.ts +7 -6
- package/Avatar/Avatar.d.ts +9 -8
- 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/Button/Button.d.ts +10 -9
- package/Button/CopyButton.d.ts +7 -6
- package/Button/IconButton.d.ts +10 -9
- 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/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/primitives/CheckboxPrimitive.d.ts +17 -12
- package/CheckboxGroup/CheckboxGroup.d.ts +7 -6
- package/CheckboxGroup/primitives/CheckboxGroupPrimitive.d.ts +20 -12
- package/CodeEditor/CodeEditor.d.ts +7 -6
- package/CodeEditor/CodeEditorPrimitive.d.ts +7 -6
- package/CodeEditor/CodeEditorPrimitive.js +3 -1
- package/CodeEditor/CodeEditorPrimitive.js.map +1 -1
- package/ColorPicker/ColorPicker.d.ts +7 -6
- package/ColorPicker/primitives/ColorPickerPrimitive.d.ts +7 -6
- 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 +13 -22
- package/DataTable/DataTable.js +6 -14
- package/DataTable/DataTable.js.map +1 -1
- package/DataTable/components/ColumnsVisibility.d.ts +4 -5
- package/DataTable/components/ColumnsVisibility.js +3 -6
- 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/primitives/DatePickerPrimitive.d.ts +7 -6
- package/DatePicker/primitives/DateTimePicker.d.ts +1 -1
- package/DatePicker/primitives/DateTimePicker.js +23 -16
- package/DatePicker/primitives/DateTimePicker.js.map +1 -1
- package/DatePicker/primitives/components/DatePickerTrigger.js +1 -1
- package/DatePicker/primitives/components/DatePickerTrigger.js.map +1 -1
- package/DatePicker/utils/dateHelpers.d.ts +1 -1
- package/DatePicker/utils/dateHelpers.js +2 -1
- package/DatePicker/utils/dateHelpers.js.map +1 -1
- 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 +2 -0
- package/Dialog/Dialog.d.ts +8 -22
- 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/Drawer/Drawer.d.ts +8 -22
- package/Drawer/Drawer.stories.js +1 -0
- 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/Icon.d.ts +7 -6
- package/DropdownMenu/components/DropdownMenuItem.d.ts +3 -2
- package/DropdownMenu/components/DropdownMenuItem.js +9 -2
- 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 +7 -6
- 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 +0 -6
- package/FilePicker/FilePicker.stories.js +1 -24
- package/FilePicker/FilePicker.stories.js.map +1 -1
- package/FilePicker/primitives/FilePickerPrimitive.d.ts +20 -19
- 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.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 +0 -4
- package/FilePicker/primitives/components/previews/RichItemPreview/FileType.js.map +1 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.d.ts +0 -3
- package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.js.map +1 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.d.ts +12 -6
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js +6 -4
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js.map +1 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.d.ts +6 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js +3 -2
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js.map +1 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.d.ts +5 -5
- package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js +7 -3
- package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js.map +1 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.d.ts +0 -5
- package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.js.map +1 -1
- package/FilePicker/primitives/components/previews/TextOnlyPreview/TextOnlyPreview.d.ts +7 -6
- package/FilePicker/primitives/components/previews/TruncatedFileName.d.ts +0 -4
- package/FilePicker/primitives/components/previews/TruncatedFileName.js.map +1 -1
- package/FilePicker/primitives/components/previews/fileName.d.ts +0 -8
- package/FilePicker/primitives/components/previews/fileName.js.map +1 -1
- package/FilePicker/primitives/components/previews/variants.d.ts +1 -1
- package/FillViewport/FillViewport.d.ts +21 -18
- 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 +24 -22
- package/HeaderBar/HeaderBar.d.ts +7 -6
- package/Heading/Heading.d.ts +8 -7
- package/Icon/Icon.d.ts +9 -8
- package/IconPicker/IconPicker.d.ts +7 -6
- package/IconPicker/domains/IconPickerIcon.js +1 -1
- package/IconPicker/domains/IconPickerIcon.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/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/InputPrimitive.d.ts +9 -8
- package/Label/Label.d.ts +8 -7
- package/Label/components/LabelValue.d.ts +1 -1
- package/Link/Link.d.ts +2 -2
- package/List/List.d.ts +8 -7
- 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/OverlayLoader.d.ts +7 -6
- package/MultiAutoComplete/MultiAutoComplete.d.ts +7 -6
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.d.ts +7 -6
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenter.test.js +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenter.test.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenterWithFreeInput.d.ts +3 -3
- package/MultiAutoComplete/primitives/useMultiAutoComplete.d.ts +3 -3
- package/MultiAutoComplete/primitives/useMultiAutoComplete.js +2 -3
- package/MultiAutoComplete/primitives/useMultiAutoComplete.js.map +1 -1
- package/MultiFilePicker/MultiFilePicker.d.ts +19 -18
- package/MultiFilePicker/primitives/MultiFilePickerPrimitive.d.ts +19 -18
- package/MultiSelect/MultiSelect.d.ts +7 -6
- 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 +7 -0
- 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/RadioGroup/RadioGroup.d.ts +7 -6
- package/RadioGroup/primitives/Radio.d.ts +7 -6
- package/RadioGroup/primitives/RadioGroupPrimitive.d.ts +5 -1
- package/RangeSlider/RangeSlider.d.ts +7 -6
- package/ScrollArea/ScrollArea.d.ts +12 -2
- package/ScrollArea/ScrollArea.js +11 -4
- package/ScrollArea/ScrollArea.js.map +1 -1
- package/SegmentedControl/SegmentedControl.d.ts +8 -7
- package/SegmentedControl/SegmentedControlTabs.d.ts +5 -2
- package/SegmentedControl/primitives/SegmentedControlPrimitive.d.ts +1 -1
- package/Select/Select.d.ts +7 -6
- 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/Sidebar/Sidebar.d.ts +7 -6
- package/Sidebar/components/SidebarIcon.d.ts +7 -6
- package/Sidebar/components/SidebarProvider.d.ts +4 -4
- package/Sidebar/components/items/SidebarMenuGroup.d.ts +9 -8
- package/Sidebar/components/items/SidebarMenuItem.d.ts +11 -10
- package/Sidebar/components/items/SidebarMenuItemIcon.d.ts +7 -6
- package/Sidebar/components/items/SidebarMenuLink.d.ts +11 -10
- package/Sidebar/components/items/SidebarMenuProvider.d.ts +4 -4
- package/Sidebar/components/items/SidebarMenuRootItem.d.ts +9 -7
- 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 +2 -0
- package/Skeleton/Skeleton.stories.js +28 -2
- package/Skeleton/Skeleton.stories.js.map +1 -1
- package/Slider/Slider.d.ts +7 -6
- package/SteppedProgress/SteppedProgress.d.ts +7 -6
- package/SteppedProgress/SteppedProgressItem.d.ts +7 -6
- package/Switch/Switch.d.ts +7 -6
- package/Switch/primitives/SwitchPrimitive.d.ts +10 -6
- package/Table/Table.d.ts +12 -10
- package/Table/components/Direction.d.ts +1 -1
- package/Tabs/Tabs.d.ts +8 -6
- package/Tabs/Tabs.js +5 -2
- package/Tabs/Tabs.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/Tags/Tags.d.ts +7 -6
- package/Tags/primitives/TagsPrimitive.d.ts +7 -6
- package/Text/Text.d.ts +8 -7
- package/Textarea/Textarea.d.ts +7 -6
- package/Textarea/TextareaPrimitive.d.ts +9 -8
- 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.js.map +1 -1
- package/Toggle/Toggle.d.ts +7 -6
- package/Toggle/primitives/TogglePrimitive.d.ts +13 -9
- package/ToggleGroup/ToggleGroup.d.ts +7 -6
- package/ToggleGroup/primitives/ToggleGroupPrimitive.d.ts +13 -9
- package/Tooltip/Tooltip.d.ts +7 -6
- package/Tree/Tree.d.ts +7 -6
- 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/Widget/Widget.d.ts +8 -22
- 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 +2 -0
- package/exports/admin/ui.js +2 -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 +3 -0
- package/index.js +3 -0
- package/package.json +25 -25
- package/theme.css +41 -1
- package/utils.js +52 -34
- package/utils.js.map +1 -1
|
@@ -2,8 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
3
3
|
import { type VariantProps } from "../../utils.js";
|
|
4
4
|
declare const tabListVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
6
|
-
spacing?: "
|
|
5
|
+
size?: "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
6
|
+
spacing?: "lg" | "md" | "sm" | "xl" | "xs" | "xxl" | null | undefined;
|
|
7
7
|
separator?: boolean | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
type ListProps = TabsPrimitive.TabsListProps & VariantProps<typeof tabListVariants>;
|
package/Tabs/components/Tab.d.ts
CHANGED
|
@@ -14,21 +14,22 @@ interface TabProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"
|
|
|
14
14
|
interface TabItem extends TabProps {
|
|
15
15
|
id: string;
|
|
16
16
|
}
|
|
17
|
-
declare const
|
|
18
|
-
|
|
17
|
+
declare const DecoratableTab: (props: TabProps) => null;
|
|
18
|
+
declare const Tab: typeof DecoratableTab & {
|
|
19
|
+
original: typeof DecoratableTab;
|
|
19
20
|
originalName: string;
|
|
20
21
|
displayName: string;
|
|
21
22
|
} & {
|
|
22
|
-
original:
|
|
23
|
-
original:
|
|
23
|
+
original: typeof DecoratableTab & {
|
|
24
|
+
original: typeof DecoratableTab;
|
|
24
25
|
originalName: string;
|
|
25
26
|
displayName: string;
|
|
26
27
|
};
|
|
27
28
|
originalName: string;
|
|
28
29
|
displayName: string;
|
|
29
30
|
} & {
|
|
30
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
31
|
-
original:
|
|
31
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableTab & {
|
|
32
|
+
original: typeof DecoratableTab;
|
|
32
33
|
originalName: string;
|
|
33
34
|
displayName: string;
|
|
34
35
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -2,13 +2,14 @@ import * as React from "react";
|
|
|
2
2
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
3
3
|
import { type VariantProps } from "../../utils.js";
|
|
4
4
|
declare const tabTriggerVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
6
6
|
visible?: boolean | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
type TriggerProps = Omit<TabsPrimitive.TabsTriggerProps, "children"> & VariantProps<typeof tabTriggerVariants> & {
|
|
9
9
|
text: React.ReactNode;
|
|
10
10
|
icon?: React.ReactElement;
|
|
11
|
+
loading?: boolean;
|
|
11
12
|
"data-testid"?: string;
|
|
12
13
|
};
|
|
13
|
-
declare const Trigger: ({ className, size, icon, text, visible, ...props }: TriggerProps) => React.JSX.Element;
|
|
14
|
+
declare const Trigger: ({ className, size, icon, text, visible, loading, ...props }: TriggerProps) => React.JSX.Element;
|
|
14
15
|
export { Trigger, type TriggerProps };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Tabs } from "radix-ui";
|
|
2
2
|
import { cn, cva } from "../../utils.js";
|
|
3
3
|
import { Icon } from "../../Icon/index.js";
|
|
4
|
+
import { Skeleton } from "../../Skeleton/index.js";
|
|
4
5
|
import * as __rspack_external_react from "react";
|
|
5
6
|
const tabTriggerVariants = cva([
|
|
6
7
|
"group inline-flex items-center justify-center whitespace-nowrap outline-none transition-all",
|
|
@@ -41,7 +42,7 @@ const innerTabTriggerVariants = cva([
|
|
|
41
42
|
size: "sm"
|
|
42
43
|
}
|
|
43
44
|
});
|
|
44
|
-
const Trigger = ({ className, size, icon, text, visible, ...props })=>/*#__PURE__*/ __rspack_external_react.createElement(Tabs.Trigger, {
|
|
45
|
+
const Trigger = ({ className, size, icon, text, visible, loading, ...props })=>/*#__PURE__*/ __rspack_external_react.createElement(Tabs.Trigger, {
|
|
45
46
|
className: cn(tabTriggerVariants({
|
|
46
47
|
size,
|
|
47
48
|
visible
|
|
@@ -51,12 +52,16 @@ const Trigger = ({ className, size, icon, text, visible, ...props })=>/*#__PURE_
|
|
|
51
52
|
className: cn(innerTabTriggerVariants({
|
|
52
53
|
size
|
|
53
54
|
}))
|
|
54
|
-
},
|
|
55
|
+
}, loading ? /*#__PURE__*/ __rspack_external_react.createElement(Skeleton, {
|
|
56
|
+
type: "text",
|
|
57
|
+
size: "md",
|
|
58
|
+
className: "w-[64px]"
|
|
59
|
+
}) : /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external_react.Fragment, null, icon && /*#__PURE__*/ __rspack_external_react.createElement(Icon, {
|
|
55
60
|
icon: icon,
|
|
56
61
|
size: "sm",
|
|
57
62
|
label: String(text),
|
|
58
63
|
color: "neutral-light"
|
|
59
|
-
}), text));
|
|
64
|
+
}), text)));
|
|
60
65
|
export { Trigger };
|
|
61
66
|
|
|
62
67
|
//# sourceMappingURL=Trigger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs/components/Trigger.js","sources":["../../../src/Tabs/components/Trigger.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\nimport { Icon } from \"~/Icon/index.js\";\n\nconst tabTriggerVariants = cva(\n [\n \"group inline-flex items-center justify-center whitespace-nowrap outline-none transition-all\",\n \"text-neutral-strong hover:text-neutral-primary\",\n \"border-b-md border-transparent border-solid\",\n \"data-[state=active]:border-accent-default data-[state=active]:text-neutral-primary\",\n \"disabled:pointer-events-none disabled:text-neutral-disabled! disabled:fill-neutral-disabled! disabled:border-transparent!\"\n ],\n {\n variants: {\n size: {\n sm: \"text-sm h-[40px]\",\n md: \"text-md h-xxl\",\n lg: \"text-lg h-[56px]\",\n xl: \"text-xl h-3xl\"\n },\n visible: {\n false: \"hidden\"\n }\n },\n defaultVariants: {\n size: \"sm\"\n }\n }\n);\n\nconst innerTabTriggerVariants = cva(\n [\n \"inline-flex items-center justify-start gap-xs\",\n \"group-hover:bg-neutral-dimmed\",\n \"group-focus-visible:ring-lg group-focus-visible:ring-primary-dimmed\"\n ],\n {\n variants: {\n size: {\n sm: \"rounded-sm p-xs\",\n md: \"rounded-sm px-xs py-xs-plus\",\n lg: \"rounded-sm px-xs-plus py-sm-plus\",\n xl: \"rounded-lg px-sm py-sm-plus\"\n }\n },\n defaultVariants: {\n size: \"sm\"\n }\n }\n);\n\ntype TriggerProps = Omit<TabsPrimitive.TabsTriggerProps, \"children\"> &\n VariantProps<typeof tabTriggerVariants> & {\n text: React.ReactNode;\n icon?: React.ReactElement;\n \"data-testid\"?: string;\n };\n\nconst Trigger = ({ className, size, icon, text, visible, ...props }: TriggerProps) => (\n <TabsPrimitive.Trigger\n className={cn(tabTriggerVariants({ size, visible }), className)}\n {...props}\n >\n <div className={cn(innerTabTriggerVariants({ size }))}>\n {icon && <Icon
|
|
1
|
+
{"version":3,"file":"Tabs/components/Trigger.js","sources":["../../../src/Tabs/components/Trigger.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\nimport { Icon } from \"~/Icon/index.js\";\nimport { Skeleton } from \"~/Skeleton/index.js\";\n\nconst tabTriggerVariants = cva(\n [\n \"group inline-flex items-center justify-center whitespace-nowrap outline-none transition-all\",\n \"text-neutral-strong hover:text-neutral-primary\",\n \"border-b-md border-transparent border-solid\",\n \"data-[state=active]:border-accent-default data-[state=active]:text-neutral-primary\",\n \"disabled:pointer-events-none disabled:text-neutral-disabled! disabled:fill-neutral-disabled! disabled:border-transparent!\"\n ],\n {\n variants: {\n size: {\n sm: \"text-sm h-[40px]\",\n md: \"text-md h-xxl\",\n lg: \"text-lg h-[56px]\",\n xl: \"text-xl h-3xl\"\n },\n visible: {\n false: \"hidden\"\n }\n },\n defaultVariants: {\n size: \"sm\"\n }\n }\n);\n\nconst innerTabTriggerVariants = cva(\n [\n \"inline-flex items-center justify-start gap-xs\",\n \"group-hover:bg-neutral-dimmed\",\n \"group-focus-visible:ring-lg group-focus-visible:ring-primary-dimmed\"\n ],\n {\n variants: {\n size: {\n sm: \"rounded-sm p-xs\",\n md: \"rounded-sm px-xs py-xs-plus\",\n lg: \"rounded-sm px-xs-plus py-sm-plus\",\n xl: \"rounded-lg px-sm py-sm-plus\"\n }\n },\n defaultVariants: {\n size: \"sm\"\n }\n }\n);\n\ntype TriggerProps = Omit<TabsPrimitive.TabsTriggerProps, \"children\"> &\n VariantProps<typeof tabTriggerVariants> & {\n text: React.ReactNode;\n icon?: React.ReactElement;\n loading?: boolean;\n \"data-testid\"?: string;\n };\n\nconst Trigger = ({ className, size, icon, text, visible, loading, ...props }: TriggerProps) => (\n <TabsPrimitive.Trigger\n className={cn(tabTriggerVariants({ size, visible }), className)}\n {...props}\n >\n <div className={cn(innerTabTriggerVariants({ size }))}>\n {loading ? (\n <Skeleton type={\"text\"} size={\"md\"} className={\"w-[64px]\"} />\n ) : (\n <>\n {icon && (\n <Icon\n icon={icon}\n size={\"sm\"}\n label={String(text)}\n color={\"neutral-light\"}\n />\n )}\n {text}\n </>\n )}\n </div>\n </TabsPrimitive.Trigger>\n);\n\nexport { Trigger, type TriggerProps };\n"],"names":["tabTriggerVariants","cva","innerTabTriggerVariants","Trigger","className","size","icon","text","visible","loading","props","TabsPrimitive","cn","Skeleton","Icon","String"],"mappings":";;;;;AAMA,MAAMA,qBAAqBC,IACvB;IACI;IACA;IACA;IACA;IACA;CACH,EACD;IACI,UAAU;QACN,MAAM;YACF,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,IAAI;QACR;QACA,SAAS;YACL,OAAO;QACX;IACJ;IACA,iBAAiB;QACb,MAAM;IACV;AACJ;AAGJ,MAAMC,0BAA0BD,IAC5B;IACI;IACA;IACA;CACH,EACD;IACI,UAAU;QACN,MAAM;YACF,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,IAAI;QACR;IACJ;IACA,iBAAiB;QACb,MAAM;IACV;AACJ;AAWJ,MAAME,UAAU,CAAC,EAAEC,SAAS,EAAEC,IAAI,EAAEC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAE,GAAGC,OAAqB,iBACtF,sCAACC,KAAAA,OAAqB;QAClB,WAAWC,GAAGZ,mBAAmB;YAAEK;YAAMG;QAAQ,IAAIJ;QACpD,GAAGM,KAAK;qBAET,sCAAC;QAAI,WAAWE,GAAGV,wBAAwB;YAAEG;QAAK;OAC7CI,UAAU,WAAVA,GACG,sCAACI,UAAQA;QAAC,MAAM;QAAQ,MAAM;QAAM,WAAW;uBAE/C,8EACKP,QAAQ,WAARA,GACG,sCAACQ,MAAIA;QACD,MAAMR;QACN,MAAM;QACN,OAAOS,OAAOR;QACd,OAAO;QAGdA"}
|
package/Tag/Tag.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ declare const tagVariants: (props?: ({
|
|
|
4
4
|
isInteractive?: boolean | null | undefined;
|
|
5
5
|
isDismissible?: boolean | null | undefined;
|
|
6
6
|
isDisabled?: boolean | null | undefined;
|
|
7
|
-
variant?: "accent" | "
|
|
7
|
+
variant?: "accent" | "accent-light" | "destructive" | "neutral-base" | "neutral-base-outline" | "neutral-dark" | "neutral-light" | "neutral-muted" | "neutral-strong" | "neutral-xstrong" | "success" | "success-light" | "warning" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
export interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children" | "content">, VariantProps<typeof tagVariants> {
|
|
10
10
|
content: React.ReactNode;
|
|
@@ -16,21 +16,22 @@ export interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "c
|
|
|
16
16
|
icon?: React.ReactElement | null;
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
}
|
|
19
|
-
declare const
|
|
20
|
-
|
|
19
|
+
declare const DecoratableTag: (props: TagProps) => React.JSX.Element;
|
|
20
|
+
declare const Tag: typeof DecoratableTag & {
|
|
21
|
+
original: typeof DecoratableTag;
|
|
21
22
|
originalName: string;
|
|
22
23
|
displayName: string;
|
|
23
24
|
} & {
|
|
24
|
-
original:
|
|
25
|
-
original:
|
|
25
|
+
original: typeof DecoratableTag & {
|
|
26
|
+
original: typeof DecoratableTag;
|
|
26
27
|
originalName: string;
|
|
27
28
|
displayName: string;
|
|
28
29
|
};
|
|
29
30
|
originalName: string;
|
|
30
31
|
displayName: string;
|
|
31
32
|
} & {
|
|
32
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
33
|
-
original:
|
|
33
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableTag & {
|
|
34
|
+
original: typeof DecoratableTag;
|
|
34
35
|
originalName: string;
|
|
35
36
|
displayName: string;
|
|
36
37
|
}>) => (props: unknown) => React.JSX.Element;
|
package/Tags/Tags.d.ts
CHANGED
|
@@ -2,21 +2,22 @@ import React from "react";
|
|
|
2
2
|
import { type TagsPrimitiveProps } from "./primitives/index.js";
|
|
3
3
|
import { type FormComponentProps } from "../FormComponent/index.js";
|
|
4
4
|
type TagsProps = TagsPrimitiveProps & FormComponentProps;
|
|
5
|
-
declare const
|
|
6
|
-
|
|
5
|
+
declare const DecoratableTags: ({ label, description, note, hint, required, disabled, validation, validate, onBlur: originalOnBlur, ...props }: TagsProps) => React.JSX.Element;
|
|
6
|
+
declare const Tags: typeof DecoratableTags & {
|
|
7
|
+
original: typeof DecoratableTags;
|
|
7
8
|
originalName: string;
|
|
8
9
|
displayName: string;
|
|
9
10
|
} & {
|
|
10
|
-
original:
|
|
11
|
-
original:
|
|
11
|
+
original: typeof DecoratableTags & {
|
|
12
|
+
original: typeof DecoratableTags;
|
|
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 DecoratableTags & {
|
|
20
|
+
original: typeof DecoratableTags;
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -57,21 +57,22 @@ interface TagsPrimitiveProps extends Omit<React.InputHTMLAttributes<HTMLInputEle
|
|
|
57
57
|
*/
|
|
58
58
|
protectedValues?: string[];
|
|
59
59
|
}
|
|
60
|
-
declare const
|
|
61
|
-
|
|
60
|
+
declare const DecoratableTagsPrimitive: (props: TagsPrimitiveProps) => React.JSX.Element;
|
|
61
|
+
declare const TagsPrimitive: typeof DecoratableTagsPrimitive & {
|
|
62
|
+
original: typeof DecoratableTagsPrimitive;
|
|
62
63
|
originalName: string;
|
|
63
64
|
displayName: string;
|
|
64
65
|
} & {
|
|
65
|
-
original:
|
|
66
|
-
original:
|
|
66
|
+
original: typeof DecoratableTagsPrimitive & {
|
|
67
|
+
original: typeof DecoratableTagsPrimitive;
|
|
67
68
|
originalName: string;
|
|
68
69
|
displayName: string;
|
|
69
70
|
};
|
|
70
71
|
originalName: string;
|
|
71
72
|
displayName: string;
|
|
72
73
|
} & {
|
|
73
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
74
|
-
original:
|
|
74
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableTagsPrimitive & {
|
|
75
|
+
original: typeof DecoratableTagsPrimitive;
|
|
75
76
|
originalName: string;
|
|
76
77
|
displayName: string;
|
|
77
78
|
}>) => (props: unknown) => React.JSX.Element;
|
package/Text/Text.d.ts
CHANGED
|
@@ -2,26 +2,27 @@ import React from "react";
|
|
|
2
2
|
import { type VariantProps } from "../utils.js";
|
|
3
3
|
type TextTags = "span" | "div";
|
|
4
4
|
declare const textVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
interface TextProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof textVariants> {
|
|
8
8
|
as?: TextTags;
|
|
9
9
|
}
|
|
10
|
-
declare const
|
|
11
|
-
|
|
10
|
+
declare const TextBase: ({ children, size, className, as: Tag, ...props }: TextProps) => React.JSX.Element;
|
|
11
|
+
declare const Text: typeof TextBase & {
|
|
12
|
+
original: typeof TextBase;
|
|
12
13
|
originalName: string;
|
|
13
14
|
displayName: string;
|
|
14
15
|
} & {
|
|
15
|
-
original:
|
|
16
|
-
original:
|
|
16
|
+
original: typeof TextBase & {
|
|
17
|
+
original: typeof TextBase;
|
|
17
18
|
originalName: string;
|
|
18
19
|
displayName: string;
|
|
19
20
|
};
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
} & {
|
|
23
|
-
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<
|
|
24
|
-
original:
|
|
24
|
+
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof TextBase & {
|
|
25
|
+
original: typeof TextBase;
|
|
25
26
|
originalName: string;
|
|
26
27
|
displayName: string;
|
|
27
28
|
}>) => (props: unknown) => React.JSX.Element;
|
package/Textarea/Textarea.d.ts
CHANGED
|
@@ -2,21 +2,22 @@ import React from "react";
|
|
|
2
2
|
import type { TextareaPrimitiveProps } from "./TextareaPrimitive.js";
|
|
3
3
|
import type { FormComponentProps } from "../FormComponent/index.js";
|
|
4
4
|
type TextareaGroupProps = Omit<TextareaPrimitiveProps, "onChange"> & FormComponentProps;
|
|
5
|
-
declare const
|
|
6
|
-
|
|
5
|
+
declare const DecoratableTextarea: ({ label, description, note, hint, required, disabled, validation, validate, onBlur: originalOnBlur, ...props }: TextareaGroupProps) => React.JSX.Element;
|
|
6
|
+
declare const Textarea: typeof DecoratableTextarea & {
|
|
7
|
+
original: typeof DecoratableTextarea;
|
|
7
8
|
originalName: string;
|
|
8
9
|
displayName: string;
|
|
9
10
|
} & {
|
|
10
|
-
original:
|
|
11
|
-
original:
|
|
11
|
+
original: typeof DecoratableTextarea & {
|
|
12
|
+
original: typeof DecoratableTextarea;
|
|
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 DecoratableTextarea & {
|
|
20
|
+
original: typeof DecoratableTextarea;
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "../utils.js";
|
|
3
3
|
declare const textareaVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
5
|
-
size?: "
|
|
4
|
+
variant?: "ghost" | "ghost-negative" | "primary" | "secondary" | null | undefined;
|
|
5
|
+
size?: "lg" | "md" | "xl" | null | undefined;
|
|
6
6
|
invalid?: boolean | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
interface TextareaPrimitiveProps extends React.ComponentProps<"textarea">, VariantProps<typeof textareaVariants> {
|
|
@@ -19,21 +19,22 @@ interface TextareaPrimitiveProps extends React.ComponentProps<"textarea">, Varia
|
|
|
19
19
|
*/
|
|
20
20
|
onEnter?: () => void;
|
|
21
21
|
}
|
|
22
|
-
declare const
|
|
23
|
-
|
|
22
|
+
declare const DecoratableTextareaPrimitive: ({ className, variant, invalid, size, textareaRef, forwardEventOnChange, onChange: originalOnChange, onEnter, onKeyDown: originalOnKeyDown, value, ...props }: TextareaPrimitiveProps) => React.JSX.Element;
|
|
23
|
+
declare const TextareaPrimitive: typeof DecoratableTextareaPrimitive & {
|
|
24
|
+
original: typeof DecoratableTextareaPrimitive;
|
|
24
25
|
originalName: string;
|
|
25
26
|
displayName: string;
|
|
26
27
|
} & {
|
|
27
|
-
original:
|
|
28
|
-
original:
|
|
28
|
+
original: typeof DecoratableTextareaPrimitive & {
|
|
29
|
+
original: typeof DecoratableTextareaPrimitive;
|
|
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").ComponentDecorator<
|
|
36
|
-
original:
|
|
36
|
+
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableTextareaPrimitive & {
|
|
37
|
+
original: typeof DecoratableTextareaPrimitive;
|
|
37
38
|
originalName: string;
|
|
38
39
|
displayName: string;
|
|
39
40
|
}>) => (props: unknown) => React.JSX.Element;
|
package/Toast/Toast.d.ts
CHANGED
|
@@ -10,21 +10,22 @@ interface ToastProps extends Omit<ToastRootProps, "title" | "content" | "childre
|
|
|
10
10
|
onCloseClick: () => void;
|
|
11
11
|
dismissible?: boolean;
|
|
12
12
|
}
|
|
13
|
-
declare const
|
|
14
|
-
|
|
13
|
+
declare const DecoratableToast: ({ title, description, icon, actions, onCloseClick, dismissible, ...props }: ToastProps) => React.JSX.Element;
|
|
14
|
+
declare const Toast: typeof DecoratableToast & {
|
|
15
|
+
original: typeof DecoratableToast;
|
|
15
16
|
originalName: string;
|
|
16
17
|
displayName: string;
|
|
17
18
|
} & {
|
|
18
|
-
original:
|
|
19
|
-
original:
|
|
19
|
+
original: typeof DecoratableToast & {
|
|
20
|
+
original: typeof DecoratableToast;
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
};
|
|
23
24
|
originalName: string;
|
|
24
25
|
displayName: string;
|
|
25
26
|
} & {
|
|
26
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<
|
|
27
|
-
original:
|
|
27
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof DecoratableToast & {
|
|
28
|
+
original: typeof DecoratableToast;
|
|
28
29
|
originalName: string;
|
|
29
30
|
displayName: string;
|
|
30
31
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const
|
|
3
|
-
|
|
2
|
+
declare const DecoratableToastActions: ({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
3
|
+
declare const ToastActions: typeof DecoratableToastActions & {
|
|
4
|
+
original: typeof DecoratableToastActions;
|
|
4
5
|
originalName: string;
|
|
5
6
|
displayName: string;
|
|
6
7
|
} & {
|
|
7
|
-
original:
|
|
8
|
-
original:
|
|
8
|
+
original: typeof DecoratableToastActions & {
|
|
9
|
+
original: typeof DecoratableToastActions;
|
|
9
10
|
originalName: string;
|
|
10
11
|
displayName: string;
|
|
11
12
|
};
|
|
12
13
|
originalName: string;
|
|
13
14
|
displayName: string;
|
|
14
15
|
} & {
|
|
15
|
-
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<
|
|
16
|
-
original:
|
|
16
|
+
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableToastActions & {
|
|
17
|
+
original: typeof DecoratableToastActions;
|
|
17
18
|
originalName: string;
|
|
18
19
|
displayName: string;
|
|
19
20
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -2,21 +2,22 @@ import React from "react";
|
|
|
2
2
|
type DescriptionProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
3
3
|
text: React.ReactNode;
|
|
4
4
|
};
|
|
5
|
-
declare const
|
|
6
|
-
|
|
5
|
+
declare const DecoratableToastDescription: ({ text, className, ...props }: DescriptionProps) => React.JSX.Element;
|
|
6
|
+
declare const ToastDescription: typeof DecoratableToastDescription & {
|
|
7
|
+
original: typeof DecoratableToastDescription;
|
|
7
8
|
originalName: string;
|
|
8
9
|
displayName: string;
|
|
9
10
|
} & {
|
|
10
|
-
original:
|
|
11
|
-
original:
|
|
11
|
+
original: typeof DecoratableToastDescription & {
|
|
12
|
+
original: typeof DecoratableToastDescription;
|
|
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").ComponentDecorator<
|
|
19
|
-
original:
|
|
19
|
+
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableToastDescription & {
|
|
20
|
+
original: typeof DecoratableToastDescription;
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -2,21 +2,22 @@ import React from "react";
|
|
|
2
2
|
type ToastTitleProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
3
3
|
text: React.ReactNode;
|
|
4
4
|
};
|
|
5
|
-
declare const
|
|
6
|
-
|
|
5
|
+
declare const DecoratableToastTitle: ({ text, className, ...props }: ToastTitleProps) => React.JSX.Element;
|
|
6
|
+
declare const ToastTitle: typeof DecoratableToastTitle & {
|
|
7
|
+
original: typeof DecoratableToastTitle;
|
|
7
8
|
originalName: string;
|
|
8
9
|
displayName: string;
|
|
9
10
|
} & {
|
|
10
|
-
original:
|
|
11
|
-
original:
|
|
11
|
+
original: typeof DecoratableToastTitle & {
|
|
12
|
+
original: typeof DecoratableToastTitle;
|
|
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").ComponentDecorator<
|
|
19
|
-
original:
|
|
19
|
+
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof DecoratableToastTitle & {
|
|
20
|
+
original: typeof DecoratableToastTitle;
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast/useToast.stories.js","sources":["../../src/Toast/useToast.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { ReactComponent as SettingsIcon } from \"@webiny/icons/settings.svg\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Toast } from \"./Toast.js\";\nimport { useToast, type ShowToastParams } from \"./useToast.js\";\nimport { Button } from \"~/Button/index.js\";\nimport { Icon } from \"~/Icon/index.js\";\n\nconst ToastComponent = (props: ShowToastParams) => {\n const [lastToast, setLastToast] = useState<string | number>(\"\");\n const { showToast, hideToast, hideAllToasts } = useToast();\n return (\n <>\n <Button\n text={\"Show Toast\"}\n onClick={() => {\n const toast = showToast(props);\n setLastToast(toast);\n }}\n />\n <Button text={\"Hide latest toast\"} onClick={() => hideToast(lastToast)} />\n <Button text={\"Hide all toasts\"} onClick={() => hideAllToasts()} />\n </>\n );\n};\n\nconst meta: Meta<ShowToastParams> = {\n title: \"Components/Toast\",\n component: ToastComponent,\n parameters: {\n layout: \"fullscreen\"\n },\n argTypes: {\n variant: { control: \"select\", options: [\"default\", \"subtle\"] }\n },\n decorators: [\n Story => (\n <div className=\"w-full h-64 flex justify-center items-center gap-sm\">\n <Story />\n <Toast.Provider />\n </div>\n )\n ]\n};\n\nexport default meta;\n\ntype Story = StoryObj<ShowToastParams>;\n\nexport const Default: Story = {\n args: {\n title: \"New entry created\"\n }\n};\n\nexport const SubtleVariant: Story = {\n args: {\n ...Default.args,\n variant: \"subtle\"\n }\n};\n\nexport const WithTitleComponent: Story = {\n args: {\n title: <Toast.Title text={\"New entry created\"} />\n }\n};\n\nexport const WithDescription: Story = {\n args: {\n ...Default.args,\n description: 'Entry \"Article One\" has been successfully created'\n }\n};\n\nexport const WithDescriptionComponent: Story = {\n args: {\n ...Default.args,\n description: (\n <Toast.Description text={'Entry \"Article One\" has been successfully created'} />\n )\n }\n};\n\nexport const WithActions: Story = {\n args: {\n ...Default.args,\n actions: (\n <Toast.Actions>\n <Button\n key={\"action-1\"}\n text={\"Do the action\"}\n onClick={() => console.log(\"doTheAction\")}\n />\n <Button\n key={\"action-2\"}\n text={\"Dismiss\"}\n onClick={() => console.log(\"dismiss\")}\n variant={\"secondary\"}\n />\n </Toast.Actions>\n )\n }\n};\n\nexport const WithDescriptionAndActions: Story = {\n args: {\n ...Default.args,\n description: (\n <Toast.Description text={'Entry \"Article One\" has been successfully created'} />\n ),\n actions: (\n <Toast.Actions>\n <Button\n key={\"action-1\"}\n text={\"Do the action\"}\n onClick={() => console.log(\"doTheAction\")}\n />\n <Button\n key={\"action-2\"}\n text={\"Dismiss\"}\n onClick={() => console.log(\"dismiss\")}\n variant={\"secondary\"}\n />\n </Toast.Actions>\n )\n }\n};\n\nexport const WithCustomIcon: Story = {\n args: {\n ...Default.args,\n icon: <Icon icon={<SettingsIcon />} label={\"Settings\"} />\n }\n};\n\nexport const WithInfiniteDuration: Story = {\n args: {\n ...Default.args,\n duration: Infinity\n }\n};\n\nexport const NotDismissible: Story = {\n args: {\n ...Default.args,\n dismissible: false\n }\n};\n\nexport const withCustomPosition: Story = {\n args: {\n ...Default.args,\n position: \"bottom-right\"\n }\n};\n\nexport const Documentation: Story = {\n args: {\n title: \"New entry created\",\n description: \"Entry has been successfully created\",\n variant: \"default\",\n position: \"top-right\",\n duration: 6000,\n dismissible: true,\n actions: undefined,\n icon: undefined\n },\n argTypes: {\n title: {\n description: \"Please refer to the 'With Title Component' example below for details.\"\n },\n description: {\n description:\n \"Please refer to the 'With Description' and 'With Description Component' examples below for details.\"\n },\n variant: {\n description: \"Variant of the toast.\"\n },\n actions: {\n description: \"Please refer to the 'With Actions' example below for details.\"\n },\n icon: {\n description: \"Please refer to the 'With Custom Icon' example below for details.\"\n },\n duration: {\n description:\n \"Duration in milliseconds before the toast auto-dismisses. Please refer to the 'With Infinite Duration' example below for details.\",\n control: \"number\"\n },\n dismissible: {\n description: \"Please refer to the 'Not Dismissible' example below for details.\"\n },\n position: {\n description: \"Please refer to the 'With Custom Position' example below for details.\",\n control: \"select\",\n options: [\n \"top-left\",\n \"top-right\",\n \"bottom-left\",\n \"bottom-right\",\n \"top-center\",\n \"bottom-center\"\n ]\n }\n }\n};\n"],"names":["ToastComponent","props","lastToast","setLastToast","useState","showToast","hideToast","hideAllToasts","useToast","Button","toast","meta","Story","Toast","Default","SubtleVariant","WithTitleComponent","WithDescription","WithDescriptionComponent","WithActions","console","WithDescriptionAndActions","WithCustomIcon","Icon","SettingsIcon","WithInfiniteDuration","Infinity","NotDismissible","withCustomPosition","Documentation","undefined"],"mappings":";;;;;;AAQA,MAAMA,iBAAiB,CAACC;IACpB,MAAM,CAACC,WAAWC,aAAa,GAAGC,SAA0B;IAC5D,MAAM,EAAEC,SAAS,EAAEC,SAAS,EAAEC,aAAa,EAAE,GAAGC;IAChD,OAAO,WAAP,GACI,wDACI,oBAACC,QAAMA;QACH,MAAM;QACN,SAAS;YACL,MAAMC,QAAQL,UAAUJ;YACxBE,aAAaO;QACjB;sBAEJ,oBAACD,QAAMA;QAAC,MAAM;QAAqB,SAAS,IAAMH,UAAUJ;sBAC5D,oBAACO,QAAMA;QAAC,MAAM;QAAmB,SAAS,IAAMF;;AAG5D;AAEA,MAAMI,OAA8B;IAChC,OAAO;IACP,WAAWX;IACX,YAAY;QACR,QAAQ;IACZ;IACA,UAAU;QACN,SAAS;YAAE,SAAS;YAAU,SAAS;gBAAC;gBAAW;aAAS;QAAC;IACjE;IACA,YAAY;QACRY,CAAAA,QAAAA,WAAAA,GACI,oBAAC;gBAAI,WAAU;6BACX,oBAACA,OAAAA,OAAAA,WAAAA,GACD,oBAACC,MAAM,QAAQ;KAG1B;AACL;AAEA,yBAAeF;AAIR,MAAMG,UAAiB;IAC1B,MAAM;QACF,OAAO;IACX;AACJ;AAEO,MAAMC,gBAAuB;IAChC,MAAM;QACF,GAAGD,QAAQ,IAAI;QACf,SAAS;IACb;AACJ;AAEO,MAAME,qBAA4B;IACrC,MAAM;QACF,OAAO,WAAP,GAAO,oBAACH,MAAM,KAAK;YAAC,MAAM;;IAC9B;AACJ;AAEO,MAAMI,kBAAyB;IAClC,MAAM;QACF,GAAGH,QAAQ,IAAI;QACf,aAAa;IACjB;AACJ;AAEO,MAAMI,2BAAkC;IAC3C,MAAM;QACF,GAAGJ,QAAQ,IAAI;QACf,aAAa,WAAb,GACI,oBAACD,MAAM,WAAW;YAAC,MAAM;;IAEjC;AACJ;AAEO,MAAMM,cAAqB;IAC9B,MAAM;QACF,GAAGL,QAAQ,IAAI;QACf,SAAS,WAAT,GACI,oBAACD,MAAM,OAAO,sBACV,oBAACJ,QAAMA;YACH,KAAK;YACL,MAAM;YACN,SAAS,IAAMW,QAAQ,GAAG,CAAC;0BAE/B,oBAACX,QAAMA;YACH,KAAK;YACL,MAAM;YACN,SAAS,IAAMW,QAAQ,GAAG,CAAC;YAC3B,SAAS;;IAIzB;AACJ;AAEO,MAAMC,4BAAmC;IAC5C,MAAM;QACF,GAAGP,QAAQ,IAAI;QACf,aAAa,WAAb,GACI,oBAACD,MAAM,WAAW;YAAC,MAAM;;QAE7B,SAAS,WAAT,GACI,oBAACA,MAAM,OAAO,sBACV,oBAACJ,QAAMA;YACH,KAAK;YACL,MAAM;YACN,SAAS,IAAMW,QAAQ,GAAG,CAAC;0BAE/B,oBAACX,QAAMA;YACH,KAAK;YACL,MAAM;YACN,SAAS,IAAMW,QAAQ,GAAG,CAAC;YAC3B,SAAS;;IAIzB;AACJ;AAEO,MAAME,iBAAwB;IACjC,MAAM;QACF,GAAGR,QAAQ,IAAI;QACf,MAAM,WAAN,GAAM,oBAACS,MAAIA;YAAC,oBAAM,oBAACC,gBAAYA;YAAK,OAAO;;IAC/C;AACJ;AAEO,MAAMC,uBAA8B;IACvC,MAAM;QACF,GAAGX,QAAQ,IAAI;QACf,UAAUY
|
|
1
|
+
{"version":3,"file":"Toast/useToast.stories.js","sources":["../../src/Toast/useToast.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { ReactComponent as SettingsIcon } from \"@webiny/icons/settings.svg\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { Toast } from \"./Toast.js\";\nimport { useToast, type ShowToastParams } from \"./useToast.js\";\nimport { Button } from \"~/Button/index.js\";\nimport { Icon } from \"~/Icon/index.js\";\n\nconst ToastComponent = (props: ShowToastParams) => {\n const [lastToast, setLastToast] = useState<string | number>(\"\");\n const { showToast, hideToast, hideAllToasts } = useToast();\n return (\n <>\n <Button\n text={\"Show Toast\"}\n onClick={() => {\n const toast = showToast(props);\n setLastToast(toast);\n }}\n />\n <Button text={\"Hide latest toast\"} onClick={() => hideToast(lastToast)} />\n <Button text={\"Hide all toasts\"} onClick={() => hideAllToasts()} />\n </>\n );\n};\n\nconst meta: Meta<ShowToastParams> = {\n title: \"Components/Toast\",\n component: ToastComponent,\n parameters: {\n layout: \"fullscreen\"\n },\n argTypes: {\n variant: { control: \"select\", options: [\"default\", \"subtle\"] }\n },\n decorators: [\n Story => (\n <div className=\"w-full h-64 flex justify-center items-center gap-sm\">\n <Story />\n <Toast.Provider />\n </div>\n )\n ]\n};\n\nexport default meta;\n\ntype Story = StoryObj<ShowToastParams>;\n\nexport const Default: Story = {\n args: {\n title: \"New entry created\"\n }\n};\n\nexport const SubtleVariant: Story = {\n args: {\n ...Default.args,\n variant: \"subtle\"\n }\n};\n\nexport const WithTitleComponent: Story = {\n args: {\n title: <Toast.Title text={\"New entry created\"} />\n }\n};\n\nexport const WithDescription: Story = {\n args: {\n ...Default.args,\n description: 'Entry \"Article One\" has been successfully created'\n }\n};\n\nexport const WithDescriptionComponent: Story = {\n args: {\n ...Default.args,\n description: (\n <Toast.Description text={'Entry \"Article One\" has been successfully created'} />\n )\n }\n};\n\nexport const WithActions: Story = {\n args: {\n ...Default.args,\n actions: (\n <Toast.Actions>\n <Button\n key={\"action-1\"}\n text={\"Do the action\"}\n onClick={() => console.log(\"doTheAction\")}\n />\n <Button\n key={\"action-2\"}\n text={\"Dismiss\"}\n onClick={() => console.log(\"dismiss\")}\n variant={\"secondary\"}\n />\n </Toast.Actions>\n )\n }\n};\n\nexport const WithDescriptionAndActions: Story = {\n args: {\n ...Default.args,\n description: (\n <Toast.Description text={'Entry \"Article One\" has been successfully created'} />\n ),\n actions: (\n <Toast.Actions>\n <Button\n key={\"action-1\"}\n text={\"Do the action\"}\n onClick={() => console.log(\"doTheAction\")}\n />\n <Button\n key={\"action-2\"}\n text={\"Dismiss\"}\n onClick={() => console.log(\"dismiss\")}\n variant={\"secondary\"}\n />\n </Toast.Actions>\n )\n }\n};\n\nexport const WithCustomIcon: Story = {\n args: {\n ...Default.args,\n icon: <Icon icon={<SettingsIcon />} label={\"Settings\"} />\n }\n};\n\nexport const WithInfiniteDuration: Story = {\n args: {\n ...Default.args,\n duration: Infinity\n }\n};\n\nexport const NotDismissible: Story = {\n args: {\n ...Default.args,\n dismissible: false\n }\n};\n\nexport const withCustomPosition: Story = {\n args: {\n ...Default.args,\n position: \"bottom-right\"\n }\n};\n\nexport const Documentation: Story = {\n args: {\n title: \"New entry created\",\n description: \"Entry has been successfully created\",\n variant: \"default\",\n position: \"top-right\",\n duration: 6000,\n dismissible: true,\n actions: undefined,\n icon: undefined\n },\n argTypes: {\n title: {\n description: \"Please refer to the 'With Title Component' example below for details.\"\n },\n description: {\n description:\n \"Please refer to the 'With Description' and 'With Description Component' examples below for details.\"\n },\n variant: {\n description: \"Variant of the toast.\"\n },\n actions: {\n description: \"Please refer to the 'With Actions' example below for details.\"\n },\n icon: {\n description: \"Please refer to the 'With Custom Icon' example below for details.\"\n },\n duration: {\n description:\n \"Duration in milliseconds before the toast auto-dismisses. Please refer to the 'With Infinite Duration' example below for details.\",\n control: \"number\"\n },\n dismissible: {\n description: \"Please refer to the 'Not Dismissible' example below for details.\"\n },\n position: {\n description: \"Please refer to the 'With Custom Position' example below for details.\",\n control: \"select\",\n options: [\n \"top-left\",\n \"top-right\",\n \"bottom-left\",\n \"bottom-right\",\n \"top-center\",\n \"bottom-center\"\n ]\n }\n }\n};\n"],"names":["ToastComponent","props","lastToast","setLastToast","useState","showToast","hideToast","hideAllToasts","useToast","Button","toast","meta","Story","Toast","Default","SubtleVariant","WithTitleComponent","WithDescription","WithDescriptionComponent","WithActions","console","WithDescriptionAndActions","WithCustomIcon","Icon","SettingsIcon","WithInfiniteDuration","Infinity","NotDismissible","withCustomPosition","Documentation","undefined"],"mappings":";;;;;;AAQA,MAAMA,iBAAiB,CAACC;IACpB,MAAM,CAACC,WAAWC,aAAa,GAAGC,SAA0B;IAC5D,MAAM,EAAEC,SAAS,EAAEC,SAAS,EAAEC,aAAa,EAAE,GAAGC;IAChD,OAAO,WAAP,GACI,wDACI,oBAACC,QAAMA;QACH,MAAM;QACN,SAAS;YACL,MAAMC,QAAQL,UAAUJ;YACxBE,aAAaO;QACjB;sBAEJ,oBAACD,QAAMA;QAAC,MAAM;QAAqB,SAAS,IAAMH,UAAUJ;sBAC5D,oBAACO,QAAMA;QAAC,MAAM;QAAmB,SAAS,IAAMF;;AAG5D;AAEA,MAAMI,OAA8B;IAChC,OAAO;IACP,WAAWX;IACX,YAAY;QACR,QAAQ;IACZ;IACA,UAAU;QACN,SAAS;YAAE,SAAS;YAAU,SAAS;gBAAC;gBAAW;aAAS;QAAC;IACjE;IACA,YAAY;QACRY,CAAAA,QAAAA,WAAAA,GACI,oBAAC;gBAAI,WAAU;6BACX,oBAACA,OAAAA,OAAAA,WAAAA,GACD,oBAACC,MAAM,QAAQ;KAG1B;AACL;AAEA,yBAAeF;AAIR,MAAMG,UAAiB;IAC1B,MAAM;QACF,OAAO;IACX;AACJ;AAEO,MAAMC,gBAAuB;IAChC,MAAM;QACF,GAAGD,QAAQ,IAAI;QACf,SAAS;IACb;AACJ;AAEO,MAAME,qBAA4B;IACrC,MAAM;QACF,OAAO,WAAP,GAAO,oBAACH,MAAM,KAAK;YAAC,MAAM;;IAC9B;AACJ;AAEO,MAAMI,kBAAyB;IAClC,MAAM;QACF,GAAGH,QAAQ,IAAI;QACf,aAAa;IACjB;AACJ;AAEO,MAAMI,2BAAkC;IAC3C,MAAM;QACF,GAAGJ,QAAQ,IAAI;QACf,aAAa,WAAb,GACI,oBAACD,MAAM,WAAW;YAAC,MAAM;;IAEjC;AACJ;AAEO,MAAMM,cAAqB;IAC9B,MAAM;QACF,GAAGL,QAAQ,IAAI;QACf,SAAS,WAAT,GACI,oBAACD,MAAM,OAAO,sBACV,oBAACJ,QAAMA;YACH,KAAK;YACL,MAAM;YACN,SAAS,IAAMW,QAAQ,GAAG,CAAC;0BAE/B,oBAACX,QAAMA;YACH,KAAK;YACL,MAAM;YACN,SAAS,IAAMW,QAAQ,GAAG,CAAC;YAC3B,SAAS;;IAIzB;AACJ;AAEO,MAAMC,4BAAmC;IAC5C,MAAM;QACF,GAAGP,QAAQ,IAAI;QACf,aAAa,WAAb,GACI,oBAACD,MAAM,WAAW;YAAC,MAAM;;QAE7B,SAAS,WAAT,GACI,oBAACA,MAAM,OAAO,sBACV,oBAACJ,QAAMA;YACH,KAAK;YACL,MAAM;YACN,SAAS,IAAMW,QAAQ,GAAG,CAAC;0BAE/B,oBAACX,QAAMA;YACH,KAAK;YACL,MAAM;YACN,SAAS,IAAMW,QAAQ,GAAG,CAAC;YAC3B,SAAS;;IAIzB;AACJ;AAEO,MAAME,iBAAwB;IACjC,MAAM;QACF,GAAGR,QAAQ,IAAI;QACf,MAAM,WAAN,GAAM,oBAACS,MAAIA;YAAC,oBAAM,oBAACC,gBAAYA;YAAK,OAAO;;IAC/C;AACJ;AAEO,MAAMC,uBAA8B;IACvC,MAAM;QACF,GAAGX,QAAQ,IAAI;QACf,UAAUY;IACd;AACJ;AAEO,MAAMC,iBAAwB;IACjC,MAAM;QACF,GAAGb,QAAQ,IAAI;QACf,aAAa;IACjB;AACJ;AAEO,MAAMc,qBAA4B;IACrC,MAAM;QACF,GAAGd,QAAQ,IAAI;QACf,UAAU;IACd;AACJ;AAEO,MAAMe,gBAAuB;IAChC,MAAM;QACF,OAAO;QACP,aAAa;QACb,SAAS;QACT,UAAU;QACV,UAAU;QACV,aAAa;QACb,SAASC;QACT,MAAMA;IACV;IACA,UAAU;QACN,OAAO;YACH,aAAa;QACjB;QACA,aAAa;YACT,aACI;QACR;QACA,SAAS;YACL,aAAa;QACjB;QACA,SAAS;YACL,aAAa;QACjB;QACA,MAAM;YACF,aAAa;QACjB;QACA,UAAU;YACN,aACI;YACJ,SAAS;QACb;QACA,aAAa;YACT,aAAa;QACjB;QACA,UAAU;YACN,aAAa;YACb,SAAS;YACT,SAAS;gBACL;gBACA;gBACA;gBACA;gBACA;gBACA;aACH;QACL;IACJ;AACJ"}
|
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;
|
|
@@ -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;
|
|
@@ -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;
|