@webiny/admin-ui 6.4.11 → 6.6.0-alpha.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/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/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/DataList/DataListModal.d.ts +6 -3
- package/DataTable/DataTable.d.ts +23 -12
- package/DataTable/DataTable.js +12 -4
- package/DataTable/DataTable.js.map +1 -1
- package/DataTable/components/ColumnsVisibility.d.ts +5 -4
- package/DataTable/components/ColumnsVisibility.js +6 -3
- package/DataTable/components/ColumnsVisibility.js.map +1 -1
- package/DatePicker/DatePicker.d.ts +7 -6
- package/DatePicker/primitives/DatePickerPrimitive.d.ts +7 -6
- package/DatePicker/primitives/DateTimePicker.d.ts +1 -1
- package/DatePicker/primitives/DateTimePicker.js +15 -3
- 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/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 +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/RichItemPreview.d.ts +12 -6
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js +13 -52
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js.map +1 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.d.ts +8 -4
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js +66 -8
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js.map +1 -1
- package/FilePicker/primitives/components/previews/TextOnlyPreview/TextOnlyPreview.d.ts +7 -6
- package/FilePicker/primitives/components/previews/index.d.ts +0 -1
- package/FilePicker/primitives/components/previews/index.js +0 -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/primitives/IconPickerPrimitive.d.ts +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 +3 -3
- package/Link/Link.js +1 -1
- package/Link/Link.js.map +1 -1
- 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/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/primitives/MultiAutoCompletePrimitive.d.ts +7 -6
- 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/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 +1 -1
- package/MultiSelect/primitives/MultiSelectPrimitive.js.map +1 -1
- package/Popover/Popover.d.ts +7 -6
- package/Popover/primitives/PopoverPrimitive.d.ts +7 -7
- 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/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 +1 -1
- 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/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 +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/Sidebar/components/items/SidebarMenuSubButton.js +5 -8
- 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/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/Tree/useTree.js +2 -6
- package/Tree/useTree.js.map +1 -1
- 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/index.d.ts +5 -0
- package/index.js +5 -0
- package/package.json +29 -29
- package/theme.css +22 -1
- package/utils.js +52 -34
- package/utils.js.map +1 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/FileType.d.ts +0 -9
- package/FilePicker/primitives/components/previews/RichItemPreview/FileType.js +0 -45
- package/FilePicker/primitives/components/previews/RichItemPreview/FileType.js.map +0 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.d.ts +0 -8
- package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.js +0 -14
- package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.js.map +0 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.d.ts +0 -11
- package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js +0 -20
- package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js.map +0 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.d.ts +0 -15
- package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.js +0 -46
- package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.js.map +0 -1
- package/FilePicker/primitives/components/previews/TruncatedFileName.d.ts +0 -11
- package/FilePicker/primitives/components/previews/TruncatedFileName.js +0 -20
- package/FilePicker/primitives/components/previews/TruncatedFileName.js.map +0 -1
- package/FilePicker/primitives/components/previews/fileName.d.ts +0 -12
- package/FilePicker/primitives/components/previews/fileName.js +0 -26
- package/FilePicker/primitives/components/previews/fileName.js.map +0 -1
|
@@ -4,21 +4,22 @@ interface ItemIconProps extends Omit<IconProps, "icon"> {
|
|
|
4
4
|
element?: React.ReactNode;
|
|
5
5
|
active?: boolean;
|
|
6
6
|
}
|
|
7
|
-
declare const
|
|
8
|
-
|
|
7
|
+
declare const BaseItemIcon: ({ element, active, ...props }: ItemIconProps) => React.JSX.Element;
|
|
8
|
+
declare const ItemIcon: typeof BaseItemIcon & {
|
|
9
|
+
original: typeof BaseItemIcon;
|
|
9
10
|
originalName: string;
|
|
10
11
|
displayName: string;
|
|
11
12
|
} & {
|
|
12
|
-
original:
|
|
13
|
-
original:
|
|
13
|
+
original: typeof BaseItemIcon & {
|
|
14
|
+
original: typeof BaseItemIcon;
|
|
14
15
|
originalName: string;
|
|
15
16
|
displayName: string;
|
|
16
17
|
};
|
|
17
18
|
originalName: string;
|
|
18
19
|
displayName: string;
|
|
19
20
|
} & {
|
|
20
|
-
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<
|
|
21
|
-
original:
|
|
21
|
+
createDecorator: (decorator: import("@webiny/react-composition/types").ComponentDecorator<typeof BaseItemIcon & {
|
|
22
|
+
original: typeof BaseItemIcon;
|
|
22
23
|
originalName: string;
|
|
23
24
|
displayName: string;
|
|
24
25
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -2,21 +2,22 @@ import React from "react";
|
|
|
2
2
|
interface ItemPlaceholderProps {
|
|
3
3
|
depth: number;
|
|
4
4
|
}
|
|
5
|
-
declare const
|
|
6
|
-
|
|
5
|
+
declare const BaseItemPlaceholder: ({ depth }: ItemPlaceholderProps) => React.JSX.Element;
|
|
6
|
+
declare const ItemPlaceholder: typeof BaseItemPlaceholder & {
|
|
7
|
+
original: typeof BaseItemPlaceholder;
|
|
7
8
|
originalName: string;
|
|
8
9
|
displayName: string;
|
|
9
10
|
} & {
|
|
10
|
-
original:
|
|
11
|
-
original:
|
|
11
|
+
original: typeof BaseItemPlaceholder & {
|
|
12
|
+
original: typeof BaseItemPlaceholder;
|
|
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 BaseItemPlaceholder & {
|
|
20
|
+
original: typeof BaseItemPlaceholder;
|
|
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
|
interface ItemSubIndentationProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "content"> {
|
|
3
3
|
level: number;
|
|
4
4
|
}
|
|
5
|
-
declare const
|
|
6
|
-
|
|
5
|
+
declare const BaseItemSubIndentation: ({ level }: ItemSubIndentationProps) => React.JSX.Element;
|
|
6
|
+
declare const ItemSubIndentation: typeof BaseItemSubIndentation & {
|
|
7
|
+
original: typeof BaseItemSubIndentation;
|
|
7
8
|
originalName: string;
|
|
8
9
|
displayName: string;
|
|
9
10
|
} & {
|
|
10
|
-
original:
|
|
11
|
-
original:
|
|
11
|
+
original: typeof BaseItemSubIndentation & {
|
|
12
|
+
original: typeof BaseItemSubIndentation;
|
|
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 BaseItemSubIndentation & {
|
|
20
|
+
original: typeof BaseItemSubIndentation;
|
|
20
21
|
originalName: string;
|
|
21
22
|
displayName: string;
|
|
22
23
|
}>) => (props: unknown) => React.JSX.Element;
|
package/Tree/useTree.js
CHANGED
|
@@ -41,6 +41,7 @@ const useTree = (props)=>{
|
|
|
41
41
|
droppable: node.droppable,
|
|
42
42
|
data: node.data
|
|
43
43
|
}));
|
|
44
|
+
await presenter.handleDrop(newNodeTree);
|
|
44
45
|
if (props.onDrop) {
|
|
45
46
|
const { dragSourceId, dropTargetId } = options;
|
|
46
47
|
const newTreeDto = newNodeTree.map((node)=>NodeFormatter.toDto(node));
|
|
@@ -50,13 +51,8 @@ const useTree = (props)=>{
|
|
|
50
51
|
dragSource: newTreeDto.find((node)=>node.id === String(options.dragSourceId)),
|
|
51
52
|
dropTarget: newTreeDto.find((node)=>node.id === String(options.dropTargetId))
|
|
52
53
|
};
|
|
53
|
-
|
|
54
|
-
await props.onDrop(newTreeDto, dropOptions);
|
|
55
|
-
} catch {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
54
|
+
await props.onDrop(newTreeDto, dropOptions);
|
|
58
55
|
}
|
|
59
|
-
await presenter.handleDrop(newNodeTree);
|
|
60
56
|
};
|
|
61
57
|
const changeOpen = (newOpenIds)=>{
|
|
62
58
|
if (props.onChangeOpen) {
|
package/Tree/useTree.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree/useTree.js","sources":["../../src/Tree/useTree.ts"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\nimport type { DropOptions as DndDropOptions, NodeModel } from \"@minoru/react-dnd-treeview\";\nimport { autorun } from \"mobx\";\nimport { TreePresenter, type TreePresenterInitParams } from \"./presenters/index.js\";\nimport type { TreeProps, DropOptions } from \"./Tree.js\";\nimport { Node, NodeFormatter } from \"./domains/index.js\";\n\nexport const useTree = <TData = Record<string, any>>(props: TreeProps<TData>) => {\n const params: TreePresenterInitParams = useMemo(() => {\n return {\n rootId: props.rootId,\n defaultOpenNodeIds: props.defaultOpenNodeIds,\n defaultLockedOpenNodeIds: props.defaultLockedOpenNodeIds,\n loadingNodeIds: props.loadingNodeIds\n };\n }, [\n props.rootId,\n props.defaultOpenNodeIds,\n props.defaultLockedOpenNodeIds,\n props.loadingNodeIds\n ]);\n\n const presenter = useMemo(() => {\n return new TreePresenter<TData>();\n }, []);\n\n const [vm, setVm] = useState(presenter.vm);\n\n useEffect(() => {\n presenter.init(params);\n }, [params, presenter]);\n\n useEffect(() => {\n presenter.initNodes(props.nodes);\n }, [props.nodes]);\n\n useEffect(() => {\n return autorun(() => {\n setVm(presenter.vm);\n });\n }, [presenter]);\n\n const handleDrop = async (newTree: NodeModel<TData>[], options: DndDropOptions) => {\n if (options.dragSourceId === options.dropTargetId) {\n // Drag source and drop target are the same, no action taken.\n return;\n }\n\n const newNodeTree = newTree.map(node => {\n return Node.create<TData>({\n id: String(node.id),\n label: node.text,\n parentId: String(node.parent),\n droppable: node.droppable,\n data: node.data as TData\n });\n });\n\n if (props.onDrop) {\n const { dragSourceId, dropTargetId } = options;\n\n const newTreeDto = newNodeTree.map(node => NodeFormatter.toDto<TData>(node));\n\n const dropOptions: DropOptions<TData> = {\n dragSourceId: String(dragSourceId),\n dropTargetId: String(dropTargetId),\n dragSource: newTreeDto.find(node => node.id === String(options.dragSourceId)),\n dropTarget: newTreeDto.find(node => node.id === String(options.dropTargetId))\n };\n\n
|
|
1
|
+
{"version":3,"file":"Tree/useTree.js","sources":["../../src/Tree/useTree.ts"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\nimport type { DropOptions as DndDropOptions, NodeModel } from \"@minoru/react-dnd-treeview\";\nimport { autorun } from \"mobx\";\nimport { TreePresenter, type TreePresenterInitParams } from \"./presenters/index.js\";\nimport type { TreeProps, DropOptions } from \"./Tree.js\";\nimport { Node, NodeFormatter } from \"./domains/index.js\";\n\nexport const useTree = <TData = Record<string, any>>(props: TreeProps<TData>) => {\n const params: TreePresenterInitParams = useMemo(() => {\n return {\n rootId: props.rootId,\n defaultOpenNodeIds: props.defaultOpenNodeIds,\n defaultLockedOpenNodeIds: props.defaultLockedOpenNodeIds,\n loadingNodeIds: props.loadingNodeIds\n };\n }, [\n props.rootId,\n props.defaultOpenNodeIds,\n props.defaultLockedOpenNodeIds,\n props.loadingNodeIds\n ]);\n\n const presenter = useMemo(() => {\n return new TreePresenter<TData>();\n }, []);\n\n const [vm, setVm] = useState(presenter.vm);\n\n useEffect(() => {\n presenter.init(params);\n }, [params, presenter]);\n\n useEffect(() => {\n presenter.initNodes(props.nodes);\n }, [props.nodes]);\n\n useEffect(() => {\n return autorun(() => {\n setVm(presenter.vm);\n });\n }, [presenter]);\n\n const handleDrop = async (newTree: NodeModel<TData>[], options: DndDropOptions) => {\n if (options.dragSourceId === options.dropTargetId) {\n // Drag source and drop target are the same, no action taken.\n return;\n }\n\n const newNodeTree = newTree.map(node => {\n return Node.create<TData>({\n id: String(node.id),\n label: node.text,\n parentId: String(node.parent),\n droppable: node.droppable,\n data: node.data as TData\n });\n });\n\n await presenter.handleDrop(newNodeTree);\n\n if (props.onDrop) {\n const { dragSourceId, dropTargetId } = options;\n\n const newTreeDto = newNodeTree.map(node => NodeFormatter.toDto<TData>(node));\n\n const dropOptions: DropOptions<TData> = {\n dragSourceId: String(dragSourceId),\n dropTargetId: String(dropTargetId),\n dragSource: newTreeDto.find(node => node.id === String(options.dragSourceId)),\n dropTarget: newTreeDto.find(node => node.id === String(options.dropTargetId))\n };\n\n await props.onDrop(newTreeDto, dropOptions);\n }\n };\n\n const changeOpen = (newOpenIds: NodeModel<TData>[\"id\"][]) => {\n if (props.onChangeOpen) {\n const newOpenNodes = vm.nodes\n .filter(node => newOpenIds.includes(node.id))\n .map(node =>\n NodeFormatter.toDto<TData>(\n Node.create<TData>({\n id: String(node.id),\n label: node.text,\n parentId: String(node.parent),\n droppable: node.droppable,\n data: node.data as TData\n })\n )\n );\n\n props.onChangeOpen(newOpenNodes);\n }\n };\n\n const canDrag = (node: NodeModel<TData> | undefined) => {\n if (!node) {\n return false;\n }\n\n const nodeDto = NodeFormatter.toDto<TData>(\n Node.create<TData>({\n id: String(node.id),\n parentId: String(node.parent),\n droppable: node.droppable,\n label: node.text,\n data: node.data as TData\n })\n );\n\n return props.canDrag ? props.canDrag(nodeDto) : true;\n };\n\n const canDrop = (tree: NodeModel<TData>[], options: DndDropOptions) => {\n if (props.canDrop) {\n const { dragSourceId, dropTargetId } = options;\n\n const nodeTree = tree.map(node => {\n return Node.create<TData>({\n id: String(node.id),\n label: node.text,\n parentId: String(node.parent),\n droppable: node.droppable,\n data: node.data as TData\n });\n });\n\n const nodeTreeDto = nodeTree.map(node => NodeFormatter.toDto<TData>(node));\n\n const dropOptions: DropOptions<TData> = {\n dragSourceId: String(dragSourceId),\n dropTargetId: String(dropTargetId),\n dragSource: nodeTreeDto.find(node => node.id === String(options.dragSourceId)),\n dropTarget: nodeTreeDto.find(node => node.id === String(options.dropTargetId))\n };\n\n return props.canDrop(nodeTreeDto, dropOptions);\n }\n\n return true;\n };\n\n const sort = (a: NodeModel<TData>, b: NodeModel<TData>): number => {\n if (typeof props.sort === \"function\") {\n const nodeTreeA = Node.create<TData>({\n id: String(a.id),\n label: a.text,\n parentId: String(a.parent),\n droppable: a.droppable,\n data: a.data\n });\n\n const nodeTreeB = Node.create<TData>({\n id: String(b.id),\n label: b.text,\n parentId: String(b.parent),\n droppable: b.droppable,\n data: b.data\n });\n\n return props.sort(\n NodeFormatter.toDto<TData>(nodeTreeA),\n NodeFormatter.toDto<TData>(nodeTreeB)\n );\n }\n\n return 0;\n };\n\n return { vm, handleDrop, changeOpen, canDrag, canDrop, sort };\n};\n"],"names":["useTree","props","params","useMemo","presenter","TreePresenter","vm","setVm","useState","useEffect","autorun","handleDrop","newTree","options","newNodeTree","node","Node","String","dragSourceId","dropTargetId","newTreeDto","NodeFormatter","dropOptions","changeOpen","newOpenIds","newOpenNodes","canDrag","nodeDto","canDrop","tree","nodeTree","nodeTreeDto","sort","a","b","nodeTreeA","nodeTreeB"],"mappings":"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"}
|
package/Widget/Widget.d.ts
CHANGED
|
@@ -14,39 +14,25 @@ interface WidgetProps extends Omit<React.ComponentPropsWithoutRef<typeof WidgetC
|
|
|
14
14
|
outline?: boolean;
|
|
15
15
|
children: React.ReactNode;
|
|
16
16
|
}
|
|
17
|
-
declare const
|
|
17
|
+
declare const WidgetBase: {
|
|
18
18
|
(props: WidgetProps): React.JSX.Element;
|
|
19
19
|
displayName: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
displayName: string;
|
|
24
|
-
};
|
|
20
|
+
};
|
|
21
|
+
declare const Widget: typeof WidgetBase & {
|
|
22
|
+
original: typeof WidgetBase;
|
|
25
23
|
originalName: string;
|
|
26
24
|
displayName: string;
|
|
27
25
|
} & {
|
|
28
|
-
original: {
|
|
29
|
-
|
|
30
|
-
displayName: string;
|
|
31
|
-
} & {
|
|
32
|
-
original: {
|
|
33
|
-
(props: WidgetProps): React.JSX.Element;
|
|
34
|
-
displayName: string;
|
|
35
|
-
};
|
|
26
|
+
original: typeof WidgetBase & {
|
|
27
|
+
original: typeof WidgetBase;
|
|
36
28
|
originalName: string;
|
|
37
29
|
displayName: string;
|
|
38
30
|
};
|
|
39
31
|
originalName: string;
|
|
40
32
|
displayName: string;
|
|
41
33
|
} & {
|
|
42
|
-
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<{
|
|
43
|
-
|
|
44
|
-
displayName: string;
|
|
45
|
-
} & {
|
|
46
|
-
original: {
|
|
47
|
-
(props: WidgetProps): React.JSX.Element;
|
|
48
|
-
displayName: string;
|
|
49
|
-
};
|
|
34
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<typeof WidgetBase & {
|
|
35
|
+
original: typeof WidgetBase;
|
|
50
36
|
originalName: string;
|
|
51
37
|
displayName: string;
|
|
52
38
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { IconProps as IconComponentProps } from "../../Icon/index.js";
|
|
3
3
|
type 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;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { ButtonProps } from "../../Button/index.js";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
declare const WidgetActionBase: (props: ButtonProps) => React.JSX.Element;
|
|
4
|
+
export declare const WidgetAction: typeof WidgetActionBase & {
|
|
5
|
+
original: typeof WidgetActionBase;
|
|
5
6
|
originalName: string;
|
|
6
7
|
displayName: string;
|
|
7
8
|
} & {
|
|
8
|
-
original:
|
|
9
|
-
original:
|
|
9
|
+
original: typeof WidgetActionBase & {
|
|
10
|
+
original: typeof WidgetActionBase;
|
|
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 WidgetActionBase & {
|
|
18
|
+
original: typeof WidgetActionBase;
|
|
18
19
|
originalName: string;
|
|
19
20
|
displayName: string;
|
|
20
21
|
}>) => (props: unknown) => React.JSX.Element;
|
|
21
22
|
};
|
|
23
|
+
export {};
|
|
@@ -2,15 +2,15 @@ import * as React from "react";
|
|
|
2
2
|
import { type VariantProps } from "../../utils.js";
|
|
3
3
|
declare const widgetContentVariants: (props?: ({
|
|
4
4
|
variant?: "accent" | "base" | "light" | null | undefined;
|
|
5
|
-
elevation?: "
|
|
5
|
+
elevation?: "lg" | "md" | "none" | "sm" | null | undefined;
|
|
6
6
|
outline?: boolean | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface WidgetContentProps extends VariantProps<typeof widgetContentVariants> {
|
|
9
9
|
className?: string;
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
}
|
|
12
|
-
declare
|
|
13
|
-
|
|
14
|
-
displayName: string;
|
|
15
|
-
}
|
|
12
|
+
declare function WidgetContent({ children }: WidgetContentProps): React.JSX.Element;
|
|
13
|
+
declare namespace WidgetContent {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
16
|
export { WidgetContent };
|
package/exports/admin/ui.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { Accordion } from "../../Accordion/index.js";
|
|
|
3
3
|
export { Alert } from "../../Alert/index.js";
|
|
4
4
|
export { AutoComplete } from "../../AutoComplete/index.js";
|
|
5
5
|
export { Avatar } from "../../Avatar/index.js";
|
|
6
|
+
export { BetaBadge } from "../../BetaBadge/BetaBadge.js";
|
|
6
7
|
export { Button, CopyButton, IconButton } from "../../Button/index.js";
|
|
7
8
|
export { Card } from "../../Card/index.js";
|
|
8
9
|
export { Checkbox } from "../../Checkbox/index.js";
|
|
@@ -16,6 +17,7 @@ export { Dialog } from "../../Dialog/index.js";
|
|
|
16
17
|
export { Drawer } from "../../Drawer/index.js";
|
|
17
18
|
export { DropdownMenu } from "../../DropdownMenu/index.js";
|
|
18
19
|
export { DynamicFieldset } from "../../DynamicFieldset/index.js";
|
|
20
|
+
export { EmptyState } from "../../EmptyState/index.js";
|
|
19
21
|
export { FilePicker } from "../../FilePicker/index.js";
|
|
20
22
|
export { FillViewportHeight, FillViewportWidth, FillViewport } from "../../FillViewport/index.js";
|
|
21
23
|
export { Grid } from "../../Grid/index.js";
|
package/exports/admin/ui.js
CHANGED
|
@@ -3,6 +3,7 @@ export { Accordion } from "../../Accordion/index.js";
|
|
|
3
3
|
export { Alert } from "../../Alert/index.js";
|
|
4
4
|
export { AutoComplete } from "../../AutoComplete/index.js";
|
|
5
5
|
export { Avatar } from "../../Avatar/index.js";
|
|
6
|
+
export { BetaBadge } from "../../BetaBadge/BetaBadge.js";
|
|
6
7
|
export { Button, CopyButton, IconButton } from "../../Button/index.js";
|
|
7
8
|
export { Card } from "../../Card/index.js";
|
|
8
9
|
export { Checkbox } from "../../Checkbox/index.js";
|
|
@@ -16,6 +17,7 @@ export { Dialog } from "../../Dialog/index.js";
|
|
|
16
17
|
export { Drawer } from "../../Drawer/index.js";
|
|
17
18
|
export { DropdownMenu } from "../../DropdownMenu/index.js";
|
|
18
19
|
export { DynamicFieldset } from "../../DynamicFieldset/index.js";
|
|
20
|
+
export { EmptyState } from "../../EmptyState/index.js";
|
|
19
21
|
export { FilePicker } from "../../FilePicker/index.js";
|
|
20
22
|
export { FillViewport, FillViewportHeight, FillViewportWidth } from "../../FillViewport/index.js";
|
|
21
23
|
export { Grid } from "../../Grid/index.js";
|
package/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export * from "./Accordion/index.js";
|
|
|
2
2
|
export * from "./Alert/index.js";
|
|
3
3
|
export * from "./AutoComplete/index.js";
|
|
4
4
|
export * from "./Avatar/index.js";
|
|
5
|
+
export * from "./BetaBadge/BetaBadge.js";
|
|
6
|
+
export * from "./Breadcrumbs/index.js";
|
|
5
7
|
export * from "./Button/index.js";
|
|
6
8
|
export * from "./Card/index.js";
|
|
7
9
|
export * from "./Checkbox/index.js";
|
|
@@ -19,6 +21,7 @@ export * from "./Drawer/index.js";
|
|
|
19
21
|
export * from "./DropdownMenu/index.js";
|
|
20
22
|
export * from "./DynamicFieldset/index.js";
|
|
21
23
|
export * from "./EditableTitle/index.js";
|
|
24
|
+
export * from "./EmptyState/index.js";
|
|
22
25
|
export * from "./FilePicker/index.js";
|
|
23
26
|
export * from "./FillViewport/index.js";
|
|
24
27
|
export * from "./FormComponent/index.js";
|
|
@@ -29,6 +32,7 @@ export * from "./Heading/index.js";
|
|
|
29
32
|
export * from "./Icon/index.js";
|
|
30
33
|
export * from "./IconPicker/index.js";
|
|
31
34
|
export * from "./Image/index.js";
|
|
35
|
+
export * from "./ImageEditor/index.js";
|
|
32
36
|
export * from "./Input/index.js";
|
|
33
37
|
export * from "./Label/index.js";
|
|
34
38
|
export * from "./Link/index.js";
|
|
@@ -57,6 +61,7 @@ export * from "./Table/index.js";
|
|
|
57
61
|
export * from "./Tabs/index.js";
|
|
58
62
|
export * from "./Tag/index.js";
|
|
59
63
|
export * from "./Tags/index.js";
|
|
64
|
+
export * from "./Markdown/index.js";
|
|
60
65
|
export * from "./Text/index.js";
|
|
61
66
|
export * from "./Textarea/index.js";
|
|
62
67
|
export * from "./Toggle/index.js";
|
package/index.js
CHANGED
|
@@ -2,6 +2,8 @@ export * from "./Accordion/index.js";
|
|
|
2
2
|
export * from "./Alert/index.js";
|
|
3
3
|
export * from "./AutoComplete/index.js";
|
|
4
4
|
export * from "./Avatar/index.js";
|
|
5
|
+
export * from "./BetaBadge/BetaBadge.js";
|
|
6
|
+
export * from "./Breadcrumbs/index.js";
|
|
5
7
|
export * from "./Button/index.js";
|
|
6
8
|
export * from "./Card/index.js";
|
|
7
9
|
export * from "./Checkbox/index.js";
|
|
@@ -19,6 +21,7 @@ export * from "./Drawer/index.js";
|
|
|
19
21
|
export * from "./DropdownMenu/index.js";
|
|
20
22
|
export * from "./DynamicFieldset/index.js";
|
|
21
23
|
export * from "./EditableTitle/index.js";
|
|
24
|
+
export * from "./EmptyState/index.js";
|
|
22
25
|
export * from "./FilePicker/index.js";
|
|
23
26
|
export * from "./FillViewport/index.js";
|
|
24
27
|
export * from "./FormComponent/index.js";
|
|
@@ -28,6 +31,7 @@ export * from "./Heading/index.js";
|
|
|
28
31
|
export * from "./Icon/index.js";
|
|
29
32
|
export * from "./IconPicker/index.js";
|
|
30
33
|
export * from "./Image/index.js";
|
|
34
|
+
export * from "./ImageEditor/index.js";
|
|
31
35
|
export * from "./Input/index.js";
|
|
32
36
|
export * from "./Label/index.js";
|
|
33
37
|
export * from "./Link/index.js";
|
|
@@ -56,6 +60,7 @@ export * from "./Table/index.js";
|
|
|
56
60
|
export * from "./Tabs/index.js";
|
|
57
61
|
export * from "./Tag/index.js";
|
|
58
62
|
export * from "./Tags/index.js";
|
|
63
|
+
export * from "./Markdown/index.js";
|
|
59
64
|
export * from "./Text/index.js";
|
|
60
65
|
export * from "./Textarea/index.js";
|
|
61
66
|
export * from "./Toggle/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/admin-ui",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0-alpha.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -13,59 +13,59 @@
|
|
|
13
13
|
"description": "The UI component library for Webiny's Admin app.",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@fortawesome/fontawesome-svg-core": "7.3.
|
|
17
|
-
"@fortawesome/react-fontawesome": "3.
|
|
16
|
+
"@fortawesome/fontawesome-svg-core": "7.3.1",
|
|
17
|
+
"@fortawesome/react-fontawesome": "3.5.0",
|
|
18
18
|
"@minoru/react-dnd-treeview": "3.5.4",
|
|
19
19
|
"@monaco-editor/react": "4.7.0",
|
|
20
|
-
"@radix-ui/react-scroll-area": "1.2.
|
|
21
|
-
"@tanstack/react-table": "
|
|
22
|
-
"@webiny/icons": "6.
|
|
23
|
-
"@webiny/react-composition": "6.
|
|
24
|
-
"@webiny/utils": "6.
|
|
20
|
+
"@radix-ui/react-scroll-area": "1.2.18",
|
|
21
|
+
"@tanstack/react-table": "9.1.2",
|
|
22
|
+
"@webiny/icons": "6.6.0-alpha.1",
|
|
23
|
+
"@webiny/react-composition": "6.6.0-alpha.1",
|
|
24
|
+
"@webiny/utils": "6.6.0-alpha.1",
|
|
25
25
|
"bytes": "3.1.2",
|
|
26
26
|
"class-variance-authority": "0.7.1",
|
|
27
27
|
"clsx": "2.1.1",
|
|
28
28
|
"cmdk": "1.1.1",
|
|
29
29
|
"date-fns": "4.4.0",
|
|
30
30
|
"lodash": "4.18.1",
|
|
31
|
-
"minimatch": "10.2.
|
|
32
|
-
"mobx": "
|
|
31
|
+
"minimatch": "10.2.6",
|
|
32
|
+
"mobx": "7.0.3",
|
|
33
33
|
"monaco-editor": "0.53.0",
|
|
34
|
-
"radix-ui": "1.6.
|
|
34
|
+
"radix-ui": "1.6.7",
|
|
35
35
|
"react": "18.3.1",
|
|
36
36
|
"react-color": "2.19.3",
|
|
37
37
|
"react-custom-scrollbars": "4.2.1",
|
|
38
38
|
"react-day-picker": "10.0.1",
|
|
39
39
|
"react-dnd": "16.0.1",
|
|
40
40
|
"react-virtualized": "9.22.6",
|
|
41
|
-
"sonner": "2.0.
|
|
42
|
-
"tailwind-merge": "
|
|
43
|
-
"tailwindcss": "4.3.
|
|
41
|
+
"sonner": "2.0.8",
|
|
42
|
+
"tailwind-merge": "3.6.0",
|
|
43
|
+
"tailwindcss": "4.3.3",
|
|
44
44
|
"tw-animate-css": "1.4.0",
|
|
45
45
|
"type-fest": "5.8.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@fortawesome/free-solid-svg-icons": "7.3.
|
|
49
|
-
"@rsbuild/core": "2.1.
|
|
48
|
+
"@fortawesome/free-solid-svg-icons": "7.3.1",
|
|
49
|
+
"@rsbuild/core": "2.1.13",
|
|
50
50
|
"@rsbuild/plugin-svgr": "2.0.5",
|
|
51
|
-
"@storybook/addon-a11y": "10.
|
|
52
|
-
"@storybook/addon-docs": "10.
|
|
53
|
-
"@storybook/react": "10.
|
|
54
|
-
"@tailwindcss/postcss": "4.3.
|
|
51
|
+
"@storybook/addon-a11y": "10.5.10",
|
|
52
|
+
"@storybook/addon-docs": "10.5.10",
|
|
53
|
+
"@storybook/react": "10.5.10",
|
|
54
|
+
"@tailwindcss/postcss": "4.3.3",
|
|
55
55
|
"@types/react": "18.3.31",
|
|
56
56
|
"@types/react-color": "3.0.13",
|
|
57
57
|
"@types/react-custom-scrollbars": "4.0.13",
|
|
58
58
|
"@types/react-virtualized": "9.22.3",
|
|
59
|
-
"@webiny/build-tools": "6.
|
|
60
|
-
"@webiny/project": "6.
|
|
61
|
-
"chalk": "
|
|
62
|
-
"oxfmt": "0.
|
|
59
|
+
"@webiny/build-tools": "6.6.0-alpha.1",
|
|
60
|
+
"@webiny/project": "6.6.0-alpha.1",
|
|
61
|
+
"chalk": "6.0.0",
|
|
62
|
+
"oxfmt": "0.64.0",
|
|
63
63
|
"rimraf": "6.1.3",
|
|
64
|
-
"sass": "1.
|
|
65
|
-
"storybook": "10.
|
|
66
|
-
"storybook-react-rsbuild": "3.
|
|
67
|
-
"typescript": "
|
|
68
|
-
"vitest": "4.1.
|
|
64
|
+
"sass": "1.103.1",
|
|
65
|
+
"storybook": "10.5.10",
|
|
66
|
+
"storybook-react-rsbuild": "3.4.2",
|
|
67
|
+
"typescript": "7.0.2",
|
|
68
|
+
"vitest": "4.1.11"
|
|
69
69
|
},
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
package/theme.css
CHANGED
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
--color-primary-strong: var(--color-primary-700);
|
|
87
87
|
--color-primary-subtle: var(--color-primary-100);
|
|
88
88
|
--color-primary-xstrong: var(--color-primary-900);
|
|
89
|
+
--color-primary-light: var(--color-primary-200);
|
|
89
90
|
|
|
90
91
|
--color-secondary: var(--color-success-500);
|
|
91
92
|
--color-secondary-disabled: var(--color-success-400);
|
|
@@ -342,6 +343,17 @@
|
|
|
342
343
|
background-color: var(--color-neutral-muted);
|
|
343
344
|
}
|
|
344
345
|
}
|
|
346
|
+
|
|
347
|
+
--animate-skeleton-pulse-light: skeleton-pulse-light 1400ms ease-in-out infinite;
|
|
348
|
+
@keyframes skeleton-pulse-light {
|
|
349
|
+
0%,
|
|
350
|
+
100% {
|
|
351
|
+
background-color: var(--color-neutral-subtle);
|
|
352
|
+
}
|
|
353
|
+
50% {
|
|
354
|
+
background-color: var(--color-neutral-disabled);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
345
357
|
}
|
|
346
358
|
|
|
347
359
|
@utility container {
|
|
@@ -351,7 +363,16 @@
|
|
|
351
363
|
@utility fill-grid {
|
|
352
364
|
background-image: radial-gradient(var(--color-neutral-strong) 1px, transparent 0px);
|
|
353
365
|
background-size: 15px 15px;
|
|
354
|
-
@apply bg-neutral-
|
|
366
|
+
@apply bg-neutral-light;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
@utility fill-checker {
|
|
370
|
+
background-image: repeating-conic-gradient(
|
|
371
|
+
var(--color-neutral-dimmed) 0% 25%,
|
|
372
|
+
transparent 0% 50%
|
|
373
|
+
);
|
|
374
|
+
background-size: 16px 16px;
|
|
375
|
+
@apply bg-white;
|
|
355
376
|
}
|
|
356
377
|
|
|
357
378
|
@layer base {
|
package/utils.js
CHANGED
|
@@ -2,15 +2,13 @@ import react from "react";
|
|
|
2
2
|
import { clsx } from "clsx";
|
|
3
3
|
import { generateId } from "@webiny/utils/generateId.js";
|
|
4
4
|
import { extendTailwindMerge } from "tailwind-merge";
|
|
5
|
+
const BORDER_WIDTHS = [
|
|
6
|
+
"sm",
|
|
7
|
+
"md",
|
|
8
|
+
"none"
|
|
9
|
+
];
|
|
5
10
|
const twMerge = extendTailwindMerge({
|
|
6
11
|
override: {
|
|
7
|
-
theme: {
|
|
8
|
-
borderWidth: [
|
|
9
|
-
"sm",
|
|
10
|
-
"md",
|
|
11
|
-
"none"
|
|
12
|
-
]
|
|
13
|
-
},
|
|
14
12
|
classGroups: {
|
|
15
13
|
"border-color": [
|
|
16
14
|
"border-transparent",
|
|
@@ -73,39 +71,59 @@ const twMerge = extendTailwindMerge({
|
|
|
73
71
|
}
|
|
74
72
|
},
|
|
75
73
|
extend: {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"none",
|
|
82
|
-
"sm",
|
|
83
|
-
"sm-extra",
|
|
84
|
-
"sm-plus",
|
|
85
|
-
"xl",
|
|
86
|
-
"xs",
|
|
87
|
-
"xs-plus",
|
|
88
|
-
"xxl",
|
|
89
|
-
"xxs"
|
|
74
|
+
classGroups: {
|
|
75
|
+
"border-w": [
|
|
76
|
+
{
|
|
77
|
+
border: BORDER_WIDTHS
|
|
78
|
+
}
|
|
90
79
|
],
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"xs",
|
|
101
|
-
"xs-plus",
|
|
102
|
-
"xxl",
|
|
103
|
-
"xxs"
|
|
80
|
+
"border-w-x": [
|
|
81
|
+
{
|
|
82
|
+
"border-x": BORDER_WIDTHS
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"border-w-y": [
|
|
86
|
+
{
|
|
87
|
+
"border-y": BORDER_WIDTHS
|
|
88
|
+
}
|
|
104
89
|
],
|
|
90
|
+
"border-w-t": [
|
|
91
|
+
{
|
|
92
|
+
"border-t": BORDER_WIDTHS
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"border-w-r": [
|
|
96
|
+
{
|
|
97
|
+
"border-r": BORDER_WIDTHS
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"border-w-b": [
|
|
101
|
+
{
|
|
102
|
+
"border-b": BORDER_WIDTHS
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"border-w-l": [
|
|
106
|
+
{
|
|
107
|
+
"border-l": BORDER_WIDTHS
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"border-w-s": [
|
|
111
|
+
{
|
|
112
|
+
"border-s": BORDER_WIDTHS
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"border-w-e": [
|
|
116
|
+
{
|
|
117
|
+
"border-e": BORDER_WIDTHS
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
theme: {
|
|
105
122
|
spacing: [
|
|
106
123
|
"3xl",
|
|
107
124
|
"lg",
|
|
108
125
|
"md",
|
|
126
|
+
"md-extra",
|
|
109
127
|
"md-plus",
|
|
110
128
|
"none",
|
|
111
129
|
"sm",
|