@neo4j-ndl/react 4.3.6 → 4.4.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/lib/cjs/_common/types.js.map +1 -1
- package/lib/cjs/_common/utils.js +4 -4
- package/lib/cjs/_common/utils.js.map +1 -1
- package/lib/cjs/accordion/Accordion.js +5 -5
- package/lib/cjs/accordion/Accordion.js.map +1 -1
- package/lib/cjs/accordion/accordion-context.js +1 -1
- package/lib/cjs/accordion/accordion-context.js.map +1 -1
- package/lib/cjs/accordion/stories/accordion.stories.js +20 -20
- package/lib/cjs/accordion/stories/accordion.stories.js.map +1 -1
- package/lib/cjs/ai/presence/Presence.js +1 -0
- package/lib/cjs/ai/presence/Presence.js.map +1 -1
- package/lib/cjs/avatar/stories/avatar.stories.js +18 -18
- package/lib/cjs/avatar/stories/avatar.stories.js.map +1 -1
- package/lib/cjs/banner/Banner.js +1 -1
- package/lib/cjs/banner/Banner.js.map +1 -1
- package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
- package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
- package/lib/cjs/checkbox/stories/checkbox-full.story.js +2 -2
- package/lib/cjs/checkbox/stories/checkbox-full.story.js.map +1 -1
- package/lib/cjs/checkbox/stories/checkbox.stories.js +19 -19
- package/lib/cjs/checkbox/stories/checkbox.stories.js.map +1 -1
- package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
- package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
- package/lib/cjs/code-block/stories/code-disabled.story.js +2 -2
- package/lib/cjs/code-block/stories/code-disabled.story.js.map +1 -1
- package/lib/cjs/code-block/stories/code-full.story.js +2 -2
- package/lib/cjs/code-block/stories/code-full.story.js.map +1 -1
- package/lib/cjs/code-block/stories/code-with-actions.story.js +2 -2
- package/lib/cjs/code-block/stories/code-with-actions.story.js.map +1 -1
- package/lib/cjs/code-block/themes/ndl-code-dark.js +64 -64
- package/lib/cjs/code-block/themes/ndl-code-dark.js.map +1 -1
- package/lib/cjs/code-block/themes/ndl-code-light.js +64 -64
- package/lib/cjs/code-block/themes/ndl-code-light.js.map +1 -1
- package/lib/cjs/color-picker/ColorPicker.js +1 -1
- package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
- package/lib/cjs/color-picker/stories/color-picker.stories.js +4 -4
- package/lib/cjs/color-picker/stories/color-picker.stories.js.map +1 -1
- package/lib/cjs/data-grid/Components.js +14 -12
- package/lib/cjs/data-grid/Components.js.map +1 -1
- package/lib/cjs/data-grid/DataGrid.js.map +1 -1
- package/lib/cjs/data-grid/data-grid-context.js +1 -1
- package/lib/cjs/data-grid/data-grid-context.js.map +1 -1
- package/lib/cjs/data-grid/data-grid-nav/index.js +1 -1
- package/lib/cjs/data-grid/data-grid-nav/index.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-single-selectable.story.js +0 -24
- package/lib/cjs/data-grid/stories/datagrid-single-selectable.story.js.map +1 -1
- package/lib/cjs/date-picker/DatePicker.js.map +1 -1
- package/lib/cjs/date-picker/stories/date-picker-full.story.js +9 -9
- package/lib/cjs/date-picker/stories/date-picker-full.story.js.map +1 -1
- package/lib/cjs/divider/stories/divider-horizontal.story.js +1 -1
- package/lib/cjs/divider/stories/divider-horizontal.story.js.map +1 -1
- package/lib/cjs/divider/stories/divider-vertical.story.js +1 -1
- package/lib/cjs/divider/stories/divider-vertical.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer.stories.js +19 -19
- package/lib/cjs/drawer/stories/drawer.stories.js.map +1 -1
- package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js +18 -18
- package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
- package/lib/cjs/dropzone/stories/dropzone-disabled.story.js +1 -1
- package/lib/cjs/dropzone/stories/dropzone-disabled.story.js.map +1 -1
- package/lib/cjs/dropzone/stories/dropzone-full.story.js +11 -11
- package/lib/cjs/dropzone/stories/dropzone-full.story.js.map +1 -1
- package/lib/cjs/dropzone/stories/dropzone.stories.js +10 -10
- package/lib/cjs/dropzone/stories/dropzone.stories.js.map +1 -1
- package/lib/cjs/flex/Flex.js +4 -4
- package/lib/cjs/flex/Flex.js.map +1 -1
- package/lib/cjs/graph-label/stories/graph-label.stories.js +20 -20
- package/lib/cjs/graph-label/stories/graph-label.stories.js.map +1 -1
- package/lib/cjs/hooks/index.js +3 -3
- package/lib/cjs/hooks/index.js.map +1 -1
- package/lib/cjs/icon-button/stories/icon-button.stories.js +12 -12
- package/lib/cjs/icon-button/stories/icon-button.stories.js.map +1 -1
- package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js +16 -16
- package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
- package/lib/cjs/icon-button-base/IconButtonBase.js +5 -3
- package/lib/cjs/icon-button-base/IconButtonBase.js.map +1 -1
- package/lib/cjs/icons/generated/custom/DatabaseCross.js +1 -1
- package/lib/cjs/icons/generated/custom/DatabaseCross.js.map +1 -1
- package/lib/cjs/icons/generated/custom/DatabasePlus.js +1 -1
- package/lib/cjs/icons/generated/custom/DatabasePlus.js.map +1 -1
- package/lib/cjs/icons/generated/custom/GlobePin.js +1 -1
- package/lib/cjs/icons/generated/custom/GlobePin.js.map +1 -1
- package/lib/cjs/icons/generated/custom/PanelBottom.js +1 -1
- package/lib/cjs/icons/generated/custom/PanelBottom.js.map +1 -1
- package/lib/cjs/icons/generated/custom/PanelLeftCollapsed.js +30 -0
- package/lib/cjs/icons/generated/custom/PanelLeftCollapsed.js.map +1 -0
- package/lib/cjs/icons/generated/custom/PanelLeftExpanded.js +30 -0
- package/lib/cjs/icons/generated/custom/PanelLeftExpanded.js.map +1 -0
- package/lib/cjs/icons/generated/custom/PanelRightCollapsed.js +30 -0
- package/lib/cjs/icons/generated/custom/PanelRightCollapsed.js.map +1 -0
- package/lib/cjs/icons/generated/custom/PanelRightExpanded.js +30 -0
- package/lib/cjs/icons/generated/custom/PanelRightExpanded.js.map +1 -0
- package/lib/cjs/icons/generated/custom/ThreePanel.js +1 -1
- package/lib/cjs/icons/generated/custom/ThreePanel.js.map +1 -1
- package/lib/cjs/icons/generated/custom/index.js +9 -1
- package/lib/cjs/icons/generated/custom/index.js.map +1 -1
- package/lib/cjs/icons/wrapIcon.js +2 -2
- package/lib/cjs/icons/wrapIcon.js.map +1 -1
- package/lib/cjs/kbd/stories/kbd.stories.js +7 -7
- package/lib/cjs/kbd/stories/kbd.stories.js.map +1 -1
- package/lib/cjs/loading-spinner/LoadingSpinner.js +2 -2
- package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js +10 -10
- package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
- package/lib/cjs/logo/Logo.js +6 -6
- package/lib/cjs/logo/Logo.js.map +1 -1
- package/lib/cjs/logo/stories/logo.stories.js +9 -9
- package/lib/cjs/logo/stories/logo.stories.js.map +1 -1
- package/lib/cjs/menu/Menu.js +3 -3
- package/lib/cjs/menu/Menu.js.map +1 -1
- package/lib/cjs/menu/stories/menu-custom-items.story.js +3 -1
- package/lib/cjs/menu/stories/menu-custom-items.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-default.story.js +3 -1
- package/lib/cjs/menu/stories/menu-default.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-in-dialog.story.js +5 -1
- package/lib/cjs/menu/stories/menu-in-dialog.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-in-popover.story.js +3 -1
- package/lib/cjs/menu/stories/menu-in-popover.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-nested.story.js +3 -1
- package/lib/cjs/menu/stories/menu-nested.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-placements.story.js +3 -1
- package/lib/cjs/menu/stories/menu-placements.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-category.story.js +1 -2
- package/lib/cjs/menu/stories/menu-with-category.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-disabled-item.story.js +1 -2
- package/lib/cjs/menu/stories/menu-with-disabled-item.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-divider.story.js +1 -2
- package/lib/cjs/menu/stories/menu-with-divider.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-icon.story.js +3 -1
- package/lib/cjs/menu/stories/menu-with-icon.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js +3 -1
- package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
- package/lib/cjs/popover/Popover.js +15 -15
- package/lib/cjs/popover/Popover.js.map +1 -1
- package/lib/cjs/popover/use-popover.js +9 -9
- package/lib/cjs/popover/use-popover.js.map +1 -1
- package/lib/cjs/progress-bar/stories/progress-bar.stories.js +3 -3
- package/lib/cjs/progress-bar/stories/progress-bar.stories.js.map +1 -1
- package/lib/cjs/segmented-control/SegmentedControl.js +1 -1
- package/lib/cjs/segmented-control/SegmentedControl.js.map +1 -1
- package/lib/cjs/select/Overrides.js +41 -41
- package/lib/cjs/select/Overrides.js.map +1 -1
- package/lib/cjs/select/Select.js +25 -3
- package/lib/cjs/select/Select.js.map +1 -1
- package/lib/cjs/select/stories/select-async.story.js +4 -4
- package/lib/cjs/select/stories/select-async.story.js.map +1 -1
- package/lib/cjs/select/stories/select-controlled.story.js +4 -4
- package/lib/cjs/select/stories/select-controlled.story.js.map +1 -1
- package/lib/cjs/select/stories/select-creatable.story.js +1 -1
- package/lib/cjs/select/stories/select-creatable.story.js.map +1 -1
- package/lib/cjs/select/stories/select-custom-label.story.js +1 -1
- package/lib/cjs/select/stories/select-custom-label.story.js.map +1 -1
- package/lib/cjs/select/stories/select-disabled.story.js +1 -1
- package/lib/cjs/select/stories/select-disabled.story.js.map +1 -1
- package/lib/cjs/select/stories/select-inside-dialog.story.js +1 -1
- package/lib/cjs/select/stories/select-inside-dialog.story.js.map +1 -1
- package/lib/cjs/side-navigation/SideNavigation.js +1 -1
- package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
- package/lib/cjs/side-navigation/stories/side-nav.stories.js +1 -1
- package/lib/cjs/side-navigation/stories/side-nav.stories.js.map +1 -1
- package/lib/cjs/skeleton/stories/skeleton.stories.js +28 -28
- package/lib/cjs/skeleton/stories/skeleton.stories.js.map +1 -1
- package/lib/cjs/slider/Slider.js +2 -1
- package/lib/cjs/slider/Slider.js.map +1 -1
- package/lib/cjs/status-indicator/stories/status-indicator.stories.js +2 -2
- package/lib/cjs/status-indicator/stories/status-indicator.stories.js.map +1 -1
- package/lib/cjs/switch/stories/switch.stories.js +7 -7
- package/lib/cjs/switch/stories/switch.stories.js.map +1 -1
- package/lib/cjs/tabs/Tabs.js +2 -2
- package/lib/cjs/tabs/Tabs.js.map +1 -1
- package/lib/cjs/tabs/stories/tabs-overflow.story.js +1 -1
- package/lib/cjs/tabs/stories/tabs-overflow.story.js.map +1 -1
- package/lib/cjs/tag/Tag.js +2 -2
- package/lib/cjs/tag/Tag.js.map +1 -1
- package/lib/cjs/tag/stories/tag.stories.js +10 -10
- package/lib/cjs/tag/stories/tag.stories.js.map +1 -1
- package/lib/cjs/text-area/TextArea.js +5 -5
- package/lib/cjs/text-area/TextArea.js.map +1 -1
- package/lib/cjs/text-area/stories/text-area.stories.js +25 -25
- package/lib/cjs/text-area/stories/text-area.stories.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-number.story.js +2 -2
- package/lib/cjs/text-input/stories/text-input-number.story.js.map +1 -1
- package/lib/cjs/text-link/stories/text-link.stories.js +11 -11
- package/lib/cjs/text-link/stories/text-link.stories.js.map +1 -1
- package/lib/cjs/text-overflow/stories/text-overflow.stories.js +1 -1
- package/lib/cjs/text-overflow/stories/text-overflow.stories.js.map +1 -1
- package/lib/cjs/theme/ThemeProvider.js.map +1 -1
- package/lib/cjs/theme/agnostic.js +1 -1
- package/lib/cjs/theme/agnostic.js.map +1 -1
- package/lib/cjs/time-picker/TimePicker.js +4 -4
- package/lib/cjs/time-picker/TimePicker.js.map +1 -1
- package/lib/cjs/time-picker/time-picker-hooks.js +1 -1
- package/lib/cjs/time-picker/time-picker-hooks.js.map +1 -1
- package/lib/cjs/timezone-picker/TimeZonePicker.js +5 -5
- package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
- package/lib/cjs/toast/Toast.js +12 -12
- package/lib/cjs/toast/Toast.js.map +1 -1
- package/lib/cjs/toast/stories/toast-action-story.js +1 -1
- package/lib/cjs/toast/stories/toast-action-story.js.map +1 -1
- package/lib/cjs/toast/stories/toast-controlled-story.js +2 -2
- package/lib/cjs/toast/stories/toast-controlled-story.js.map +1 -1
- package/lib/cjs/toast/stories/toast-progress-bar.js +1 -1
- package/lib/cjs/toast/stories/toast-progress-bar.js.map +1 -1
- package/lib/cjs/toast/stories/toast.stories.js +18 -18
- package/lib/cjs/toast/stories/toast.stories.js.map +1 -1
- package/lib/cjs/tooltip/Tooltip.js +1 -1
- package/lib/cjs/tooltip/Tooltip.js.map +1 -1
- package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js +1 -1
- package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
- package/lib/cjs/tooltip/stories/tooltip-placements.story.js +8 -8
- package/lib/cjs/tooltip/stories/tooltip-placements.story.js.map +1 -1
- package/lib/cjs/tooltip/stories/tooltip.stories.js +29 -29
- package/lib/cjs/tooltip/stories/tooltip.stories.js.map +1 -1
- package/lib/cjs/tooltip/use-tooltip.js +10 -10
- package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
- package/lib/cjs/tree-view/TreeItemWrapper.js +2 -2
- package/lib/cjs/tree-view/TreeItemWrapper.js.map +1 -1
- package/lib/cjs/tree-view/TreeView.js +12 -12
- package/lib/cjs/tree-view/TreeView.js.map +1 -1
- package/lib/cjs/tree-view/TreeViewItem.js +1 -1
- package/lib/cjs/tree-view/TreeViewItem.js.map +1 -1
- package/lib/cjs/tree-view/TreeViewTextItem.js +1 -1
- package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
- package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js +2 -2
- package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
- package/lib/cjs/wizard/Wizard.js +3 -3
- package/lib/cjs/wizard/Wizard.js.map +1 -1
- package/lib/cjs/wizard/stories/wizard.stories.js +14 -14
- package/lib/cjs/wizard/stories/wizard.stories.js.map +1 -1
- package/lib/esm/_common/types.js.map +1 -1
- package/lib/esm/_common/utils.js +4 -4
- package/lib/esm/_common/utils.js.map +1 -1
- package/lib/esm/accordion/Accordion.js +5 -5
- package/lib/esm/accordion/Accordion.js.map +1 -1
- package/lib/esm/accordion/accordion-context.js +1 -1
- package/lib/esm/accordion/accordion-context.js.map +1 -1
- package/lib/esm/accordion/stories/accordion.stories.js +20 -20
- package/lib/esm/accordion/stories/accordion.stories.js.map +1 -1
- package/lib/esm/ai/presence/Presence.js +1 -0
- package/lib/esm/ai/presence/Presence.js.map +1 -1
- package/lib/esm/avatar/stories/avatar.stories.js +18 -18
- package/lib/esm/avatar/stories/avatar.stories.js.map +1 -1
- package/lib/esm/banner/Banner.js +1 -1
- package/lib/esm/banner/Banner.js.map +1 -1
- package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
- package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
- package/lib/esm/checkbox/stories/checkbox-full.story.js +2 -2
- package/lib/esm/checkbox/stories/checkbox-full.story.js.map +1 -1
- package/lib/esm/checkbox/stories/checkbox.stories.js +19 -19
- package/lib/esm/checkbox/stories/checkbox.stories.js.map +1 -1
- package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
- package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
- package/lib/esm/code-block/stories/code-disabled.story.js +2 -2
- package/lib/esm/code-block/stories/code-disabled.story.js.map +1 -1
- package/lib/esm/code-block/stories/code-full.story.js +2 -2
- package/lib/esm/code-block/stories/code-full.story.js.map +1 -1
- package/lib/esm/code-block/stories/code-with-actions.story.js +2 -2
- package/lib/esm/code-block/stories/code-with-actions.story.js.map +1 -1
- package/lib/esm/code-block/themes/ndl-code-dark.js +64 -64
- package/lib/esm/code-block/themes/ndl-code-dark.js.map +1 -1
- package/lib/esm/code-block/themes/ndl-code-light.js +64 -64
- package/lib/esm/code-block/themes/ndl-code-light.js.map +1 -1
- package/lib/esm/color-picker/ColorPicker.js +1 -1
- package/lib/esm/color-picker/ColorPicker.js.map +1 -1
- package/lib/esm/color-picker/stories/color-picker.stories.js +4 -4
- package/lib/esm/color-picker/stories/color-picker.stories.js.map +1 -1
- package/lib/esm/data-grid/Components.js +14 -12
- package/lib/esm/data-grid/Components.js.map +1 -1
- package/lib/esm/data-grid/DataGrid.js.map +1 -1
- package/lib/esm/data-grid/data-grid-context.js +1 -1
- package/lib/esm/data-grid/data-grid-context.js.map +1 -1
- package/lib/esm/data-grid/data-grid-nav/index.js +1 -1
- package/lib/esm/data-grid/data-grid-nav/index.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-single-selectable.story.js +0 -24
- package/lib/esm/data-grid/stories/datagrid-single-selectable.story.js.map +1 -1
- package/lib/esm/date-picker/DatePicker.js.map +1 -1
- package/lib/esm/date-picker/stories/date-picker-full.story.js +9 -9
- package/lib/esm/date-picker/stories/date-picker-full.story.js.map +1 -1
- package/lib/esm/divider/stories/divider-horizontal.story.js +1 -1
- package/lib/esm/divider/stories/divider-horizontal.story.js.map +1 -1
- package/lib/esm/divider/stories/divider-vertical.story.js +1 -1
- package/lib/esm/divider/stories/divider-vertical.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer.stories.js +19 -19
- package/lib/esm/drawer/stories/drawer.stories.js.map +1 -1
- package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/esm/dropdown-button/stories/dropdown-button.stories.js +18 -18
- package/lib/esm/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
- package/lib/esm/dropzone/stories/dropzone-disabled.story.js +1 -1
- package/lib/esm/dropzone/stories/dropzone-disabled.story.js.map +1 -1
- package/lib/esm/dropzone/stories/dropzone-full.story.js +11 -11
- package/lib/esm/dropzone/stories/dropzone-full.story.js.map +1 -1
- package/lib/esm/dropzone/stories/dropzone.stories.js +10 -10
- package/lib/esm/dropzone/stories/dropzone.stories.js.map +1 -1
- package/lib/esm/flex/Flex.js +4 -4
- package/lib/esm/flex/Flex.js.map +1 -1
- package/lib/esm/graph-label/stories/graph-label.stories.js +20 -20
- package/lib/esm/graph-label/stories/graph-label.stories.js.map +1 -1
- package/lib/esm/hooks/index.js +3 -3
- package/lib/esm/hooks/index.js.map +1 -1
- package/lib/esm/icon-button/stories/icon-button.stories.js +12 -12
- package/lib/esm/icon-button/stories/icon-button.stories.js.map +1 -1
- package/lib/esm/icon-button-array/stories/icon-button-array.stories.js +16 -16
- package/lib/esm/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
- package/lib/esm/icon-button-base/IconButtonBase.js +5 -3
- package/lib/esm/icon-button-base/IconButtonBase.js.map +1 -1
- package/lib/esm/icons/generated/custom/DatabaseCross.js +2 -2
- package/lib/esm/icons/generated/custom/DatabaseCross.js.map +1 -1
- package/lib/esm/icons/generated/custom/DatabasePlus.js +1 -1
- package/lib/esm/icons/generated/custom/DatabasePlus.js.map +1 -1
- package/lib/esm/icons/generated/custom/GlobePin.js +1 -1
- package/lib/esm/icons/generated/custom/GlobePin.js.map +1 -1
- package/lib/esm/icons/generated/custom/PanelBottom.js +1 -1
- package/lib/esm/icons/generated/custom/PanelBottom.js.map +1 -1
- package/lib/esm/icons/generated/custom/PanelLeftCollapsed.js +28 -0
- package/lib/esm/icons/generated/custom/PanelLeftCollapsed.js.map +1 -0
- package/lib/esm/icons/generated/custom/PanelLeftExpanded.js +28 -0
- package/lib/esm/icons/generated/custom/PanelLeftExpanded.js.map +1 -0
- package/lib/esm/icons/generated/custom/PanelRightCollapsed.js +28 -0
- package/lib/esm/icons/generated/custom/PanelRightCollapsed.js.map +1 -0
- package/lib/esm/icons/generated/custom/PanelRightExpanded.js +28 -0
- package/lib/esm/icons/generated/custom/PanelRightExpanded.js.map +1 -0
- package/lib/esm/icons/generated/custom/ThreePanel.js +1 -1
- package/lib/esm/icons/generated/custom/ThreePanel.js.map +1 -1
- package/lib/esm/icons/generated/custom/index.js +4 -0
- package/lib/esm/icons/generated/custom/index.js.map +1 -1
- package/lib/esm/icons/wrapIcon.js +2 -2
- package/lib/esm/icons/wrapIcon.js.map +1 -1
- package/lib/esm/kbd/stories/kbd.stories.js +7 -7
- package/lib/esm/kbd/stories/kbd.stories.js.map +1 -1
- package/lib/esm/loading-spinner/LoadingSpinner.js +2 -2
- package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/esm/loading-spinner/stories/loading-spinner.stories.js +10 -10
- package/lib/esm/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
- package/lib/esm/logo/Logo.js +6 -6
- package/lib/esm/logo/Logo.js.map +1 -1
- package/lib/esm/logo/stories/logo.stories.js +9 -9
- package/lib/esm/logo/stories/logo.stories.js.map +1 -1
- package/lib/esm/menu/Menu.js +3 -3
- package/lib/esm/menu/Menu.js.map +1 -1
- package/lib/esm/menu/stories/menu-custom-items.story.js +3 -1
- package/lib/esm/menu/stories/menu-custom-items.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-default.story.js +3 -1
- package/lib/esm/menu/stories/menu-default.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-in-dialog.story.js +5 -1
- package/lib/esm/menu/stories/menu-in-dialog.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-in-popover.story.js +3 -1
- package/lib/esm/menu/stories/menu-in-popover.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-nested.story.js +3 -1
- package/lib/esm/menu/stories/menu-nested.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-placements.story.js +3 -1
- package/lib/esm/menu/stories/menu-placements.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-category.story.js +1 -2
- package/lib/esm/menu/stories/menu-with-category.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-disabled-item.story.js +1 -2
- package/lib/esm/menu/stories/menu-with-disabled-item.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-divider.story.js +1 -2
- package/lib/esm/menu/stories/menu-with-divider.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-icon.story.js +3 -1
- package/lib/esm/menu/stories/menu-with-icon.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js +3 -1
- package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
- package/lib/esm/popover/Popover.js +15 -15
- package/lib/esm/popover/Popover.js.map +1 -1
- package/lib/esm/popover/use-popover.js +9 -9
- package/lib/esm/popover/use-popover.js.map +1 -1
- package/lib/esm/progress-bar/stories/progress-bar.stories.js +3 -3
- package/lib/esm/progress-bar/stories/progress-bar.stories.js.map +1 -1
- package/lib/esm/segmented-control/SegmentedControl.js +1 -1
- package/lib/esm/segmented-control/SegmentedControl.js.map +1 -1
- package/lib/esm/select/Overrides.js +41 -41
- package/lib/esm/select/Overrides.js.map +1 -1
- package/lib/esm/select/Select.js +26 -4
- package/lib/esm/select/Select.js.map +1 -1
- package/lib/esm/select/stories/select-async.story.js +4 -4
- package/lib/esm/select/stories/select-async.story.js.map +1 -1
- package/lib/esm/select/stories/select-controlled.story.js +4 -4
- package/lib/esm/select/stories/select-controlled.story.js.map +1 -1
- package/lib/esm/select/stories/select-creatable.story.js +1 -1
- package/lib/esm/select/stories/select-creatable.story.js.map +1 -1
- package/lib/esm/select/stories/select-custom-label.story.js +1 -1
- package/lib/esm/select/stories/select-custom-label.story.js.map +1 -1
- package/lib/esm/select/stories/select-disabled.story.js +1 -1
- package/lib/esm/select/stories/select-disabled.story.js.map +1 -1
- package/lib/esm/select/stories/select-inside-dialog.story.js +1 -1
- package/lib/esm/select/stories/select-inside-dialog.story.js.map +1 -1
- package/lib/esm/side-navigation/SideNavigation.js +1 -1
- package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
- package/lib/esm/side-navigation/stories/side-nav.stories.js +1 -1
- package/lib/esm/side-navigation/stories/side-nav.stories.js.map +1 -1
- package/lib/esm/skeleton/stories/skeleton.stories.js +28 -28
- package/lib/esm/skeleton/stories/skeleton.stories.js.map +1 -1
- package/lib/esm/slider/Slider.js +2 -1
- package/lib/esm/slider/Slider.js.map +1 -1
- package/lib/esm/status-indicator/stories/status-indicator.stories.js +2 -2
- package/lib/esm/status-indicator/stories/status-indicator.stories.js.map +1 -1
- package/lib/esm/switch/stories/switch.stories.js +7 -7
- package/lib/esm/switch/stories/switch.stories.js.map +1 -1
- package/lib/esm/tabs/Tabs.js +2 -2
- package/lib/esm/tabs/Tabs.js.map +1 -1
- package/lib/esm/tabs/stories/tabs-overflow.story.js +1 -1
- package/lib/esm/tabs/stories/tabs-overflow.story.js.map +1 -1
- package/lib/esm/tag/Tag.js +2 -2
- package/lib/esm/tag/Tag.js.map +1 -1
- package/lib/esm/tag/stories/tag.stories.js +10 -10
- package/lib/esm/tag/stories/tag.stories.js.map +1 -1
- package/lib/esm/text-area/TextArea.js +5 -5
- package/lib/esm/text-area/TextArea.js.map +1 -1
- package/lib/esm/text-area/stories/text-area.stories.js +25 -25
- package/lib/esm/text-area/stories/text-area.stories.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-number.story.js +2 -2
- package/lib/esm/text-input/stories/text-input-number.story.js.map +1 -1
- package/lib/esm/text-link/stories/text-link.stories.js +11 -11
- package/lib/esm/text-link/stories/text-link.stories.js.map +1 -1
- package/lib/esm/text-overflow/stories/text-overflow.stories.js +1 -1
- package/lib/esm/text-overflow/stories/text-overflow.stories.js.map +1 -1
- package/lib/esm/theme/ThemeProvider.js.map +1 -1
- package/lib/esm/theme/agnostic.js +1 -1
- package/lib/esm/theme/agnostic.js.map +1 -1
- package/lib/esm/time-picker/TimePicker.js +4 -4
- package/lib/esm/time-picker/TimePicker.js.map +1 -1
- package/lib/esm/time-picker/time-picker-hooks.js +1 -1
- package/lib/esm/time-picker/time-picker-hooks.js.map +1 -1
- package/lib/esm/timezone-picker/TimeZonePicker.js +5 -5
- package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
- package/lib/esm/toast/Toast.js +12 -12
- package/lib/esm/toast/Toast.js.map +1 -1
- package/lib/esm/toast/stories/toast-action-story.js +1 -1
- package/lib/esm/toast/stories/toast-action-story.js.map +1 -1
- package/lib/esm/toast/stories/toast-controlled-story.js +2 -2
- package/lib/esm/toast/stories/toast-controlled-story.js.map +1 -1
- package/lib/esm/toast/stories/toast-progress-bar.js +1 -1
- package/lib/esm/toast/stories/toast-progress-bar.js.map +1 -1
- package/lib/esm/toast/stories/toast.stories.js +18 -18
- package/lib/esm/toast/stories/toast.stories.js.map +1 -1
- package/lib/esm/tooltip/Tooltip.js +1 -1
- package/lib/esm/tooltip/Tooltip.js.map +1 -1
- package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js +1 -1
- package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
- package/lib/esm/tooltip/stories/tooltip-placements.story.js +8 -8
- package/lib/esm/tooltip/stories/tooltip-placements.story.js.map +1 -1
- package/lib/esm/tooltip/stories/tooltip.stories.js +29 -29
- package/lib/esm/tooltip/stories/tooltip.stories.js.map +1 -1
- package/lib/esm/tooltip/use-tooltip.js +10 -10
- package/lib/esm/tooltip/use-tooltip.js.map +1 -1
- package/lib/esm/tree-view/TreeItemWrapper.js +2 -2
- package/lib/esm/tree-view/TreeItemWrapper.js.map +1 -1
- package/lib/esm/tree-view/TreeView.js +12 -12
- package/lib/esm/tree-view/TreeView.js.map +1 -1
- package/lib/esm/tree-view/TreeViewItem.js +1 -1
- package/lib/esm/tree-view/TreeViewItem.js.map +1 -1
- package/lib/esm/tree-view/TreeViewTextItem.js +1 -1
- package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
- package/lib/esm/tree-view/tree-view-keyboard-coordinates.js +2 -2
- package/lib/esm/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
- package/lib/esm/wizard/Wizard.js +3 -3
- package/lib/esm/wizard/Wizard.js.map +1 -1
- package/lib/esm/wizard/stories/wizard.stories.js +14 -14
- package/lib/esm/wizard/stories/wizard.stories.js.map +1 -1
- package/lib/types/accordion/stories/accordion.stories.d.ts +3 -3
- package/lib/types/ai/presence/Presence.d.ts.map +1 -1
- package/lib/types/breadcrumbs/stories/breadcrumbs.stories.d.ts +1 -1
- package/lib/types/data-grid/Components.d.ts.map +1 -1
- package/lib/types/data-grid/stories/datagrid-single-selectable.story.d.ts.map +1 -1
- package/lib/types/dropdown-button/DropdownButton.d.ts +1 -1
- package/lib/types/dropdown-button/DropdownButton.d.ts.map +1 -1
- package/lib/types/icon-button-base/IconButtonBase.d.ts.map +1 -1
- package/lib/types/icons/generated/custom/DatabaseCross.d.ts.map +1 -1
- package/lib/types/icons/generated/custom/DatabasePlus.d.ts.map +1 -1
- package/lib/types/icons/generated/custom/GlobePin.d.ts.map +1 -1
- package/lib/types/icons/generated/custom/PanelLeftCollapsed.d.ts +29 -0
- package/lib/types/icons/generated/custom/PanelLeftCollapsed.d.ts.map +1 -0
- package/lib/types/icons/generated/custom/PanelLeftExpanded.d.ts +29 -0
- package/lib/types/icons/generated/custom/PanelLeftExpanded.d.ts.map +1 -0
- package/lib/types/icons/generated/custom/PanelRightCollapsed.d.ts +29 -0
- package/lib/types/icons/generated/custom/PanelRightCollapsed.d.ts.map +1 -0
- package/lib/types/icons/generated/custom/PanelRightExpanded.d.ts +29 -0
- package/lib/types/icons/generated/custom/PanelRightExpanded.d.ts.map +1 -0
- package/lib/types/icons/generated/custom/index.d.ts +4 -0
- package/lib/types/icons/generated/custom/index.d.ts.map +1 -1
- package/lib/types/icons/wrapIcon.d.ts.map +1 -1
- package/lib/types/logo/stories/logo.stories.d.ts +3 -3
- package/lib/types/menu/stories/menu-custom-items.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-default.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-in-dialog.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-in-popover.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-nested.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-placements.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-category.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-disabled-item.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-divider.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-icon.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-keyboard-shortcuts.story.d.ts.map +1 -1
- package/lib/types/select/Select.d.ts.map +1 -1
- package/lib/types/side-navigation/SideNavigation.d.ts.map +1 -1
- package/lib/types/side-navigation/stories/side-nav.stories.d.ts +1 -1
- package/lib/types/skeleton/stories/skeleton.stories.d.ts +3 -3
- package/lib/types/slider/Slider.d.ts.map +1 -1
- package/lib/types/tabs/Tabs.d.ts.map +1 -1
- package/lib/types/tabs/stories/tabs-overflow.story.d.ts.map +1 -1
- package/lib/types/time-picker/time-picker-hooks.d.ts +1 -1
- package/lib/types/time-picker/time-picker-hooks.d.ts.map +1 -1
- package/lib/types/toast/stories/toast.stories.d.ts +2 -2
- package/package.json +2 -2
|
@@ -23,117 +23,117 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
23
23
|
import { Drawer } from '../../index';
|
|
24
24
|
import { DrawerFull, DrawerFullSrc, DrawerNotCloseable, DrawerNotCloseableSrc, DrawerOverlay, DrawerOverlaySrc, DrawerPortaled, DrawerPortaledSrc, DrawerPush, DrawerPushSrc, DrawerResizable, DrawerResizableSrc, DrawerRightSide, DrawerRightSideSrc, DrawerScrollable, DrawerScrollableSrc, } from './index';
|
|
25
25
|
const componentMeta = {
|
|
26
|
-
title: 'Components/Drawer',
|
|
27
|
-
id: 'components-drawer',
|
|
28
26
|
component: Drawer,
|
|
29
|
-
|
|
27
|
+
id: 'components-drawer',
|
|
30
28
|
parameters: {
|
|
31
29
|
controls: { disable: true },
|
|
32
30
|
},
|
|
31
|
+
tags: ['docsPage'],
|
|
32
|
+
title: 'Components/Drawer',
|
|
33
33
|
};
|
|
34
34
|
export default componentMeta;
|
|
35
35
|
export const Overlay = {
|
|
36
36
|
args: {},
|
|
37
|
-
render: () => _jsx(DrawerOverlay, {}),
|
|
38
37
|
parameters: {
|
|
39
38
|
docs: {
|
|
40
39
|
source: {
|
|
40
|
+
code: DrawerOverlaySrc,
|
|
41
41
|
language: 'tsx',
|
|
42
42
|
type: 'code',
|
|
43
|
-
code: DrawerOverlaySrc,
|
|
44
43
|
},
|
|
45
44
|
},
|
|
46
45
|
},
|
|
46
|
+
render: () => _jsx(DrawerOverlay, {}),
|
|
47
47
|
};
|
|
48
48
|
export const Push = {
|
|
49
49
|
args: {},
|
|
50
|
-
render: () => _jsx(DrawerPush, {}),
|
|
51
50
|
parameters: {
|
|
52
51
|
docs: {
|
|
53
52
|
source: {
|
|
53
|
+
code: DrawerPushSrc,
|
|
54
54
|
language: 'tsx',
|
|
55
55
|
type: 'code',
|
|
56
|
-
code: DrawerPushSrc,
|
|
57
56
|
},
|
|
58
57
|
},
|
|
59
58
|
},
|
|
59
|
+
render: () => _jsx(DrawerPush, {}),
|
|
60
60
|
};
|
|
61
61
|
export const RightSide = {
|
|
62
62
|
args: {},
|
|
63
|
-
render: () => _jsx(DrawerRightSide, {}),
|
|
64
63
|
parameters: {
|
|
65
64
|
docs: {
|
|
66
65
|
source: {
|
|
66
|
+
code: DrawerRightSideSrc,
|
|
67
67
|
language: 'tsx',
|
|
68
68
|
type: 'code',
|
|
69
|
-
code: DrawerRightSideSrc,
|
|
70
69
|
},
|
|
71
70
|
},
|
|
72
71
|
},
|
|
72
|
+
render: () => _jsx(DrawerRightSide, {}),
|
|
73
73
|
};
|
|
74
74
|
export const Resizable = {
|
|
75
75
|
args: {},
|
|
76
|
-
render: () => _jsx(DrawerResizable, {}),
|
|
77
76
|
parameters: {
|
|
78
77
|
docs: {
|
|
79
78
|
source: {
|
|
79
|
+
code: DrawerResizableSrc,
|
|
80
80
|
language: 'tsx',
|
|
81
81
|
type: 'code',
|
|
82
|
-
code: DrawerResizableSrc,
|
|
83
82
|
},
|
|
84
83
|
},
|
|
85
84
|
},
|
|
85
|
+
render: () => _jsx(DrawerResizable, {}),
|
|
86
86
|
};
|
|
87
87
|
export const NotCloseable = {
|
|
88
88
|
args: {},
|
|
89
|
-
render: () => _jsx(DrawerNotCloseable, {}),
|
|
90
89
|
parameters: {
|
|
91
90
|
docs: {
|
|
92
91
|
source: {
|
|
92
|
+
code: DrawerNotCloseableSrc,
|
|
93
93
|
language: 'tsx',
|
|
94
94
|
type: 'code',
|
|
95
|
-
code: DrawerNotCloseableSrc,
|
|
96
95
|
},
|
|
97
96
|
},
|
|
98
97
|
},
|
|
98
|
+
render: () => _jsx(DrawerNotCloseable, {}),
|
|
99
99
|
};
|
|
100
100
|
export const Scrollable = {
|
|
101
101
|
args: {},
|
|
102
|
-
render: () => _jsx(DrawerScrollable, {}),
|
|
103
102
|
parameters: {
|
|
104
103
|
docs: {
|
|
105
104
|
source: {
|
|
105
|
+
code: DrawerScrollableSrc,
|
|
106
106
|
language: 'tsx',
|
|
107
107
|
type: 'code',
|
|
108
|
-
code: DrawerScrollableSrc,
|
|
109
108
|
},
|
|
110
109
|
},
|
|
111
110
|
},
|
|
111
|
+
render: () => _jsx(DrawerScrollable, {}),
|
|
112
112
|
};
|
|
113
113
|
export const Portaled = {
|
|
114
114
|
args: {},
|
|
115
|
-
render: () => _jsx(DrawerPortaled, {}),
|
|
116
115
|
parameters: {
|
|
117
116
|
docs: {
|
|
118
117
|
source: {
|
|
118
|
+
code: DrawerPortaledSrc,
|
|
119
119
|
language: 'tsx',
|
|
120
120
|
type: 'code',
|
|
121
|
-
code: DrawerPortaledSrc,
|
|
122
121
|
},
|
|
123
122
|
},
|
|
124
123
|
},
|
|
124
|
+
render: () => _jsx(DrawerPortaled, {}),
|
|
125
125
|
};
|
|
126
126
|
export const Full = {
|
|
127
127
|
args: {},
|
|
128
|
-
render: () => _jsx(DrawerFull, {}),
|
|
129
128
|
parameters: {
|
|
130
129
|
docs: {
|
|
131
130
|
source: {
|
|
131
|
+
code: DrawerFullSrc,
|
|
132
132
|
language: 'tsx',
|
|
133
133
|
type: 'code',
|
|
134
|
-
code: DrawerFullSrc,
|
|
135
134
|
},
|
|
136
135
|
},
|
|
137
136
|
},
|
|
137
|
+
render: () => _jsx(DrawerFull, {}),
|
|
138
138
|
};
|
|
139
139
|
//# sourceMappingURL=drawer.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.stories.js","sourceRoot":"","sources":["../../../../src/drawer/stories/drawer.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAEjB,MAAM,aAAa,GAA8C;IAC/D,
|
|
1
|
+
{"version":3,"file":"drawer.stories.js","sourceRoot":"","sources":["../../../../src/drawer/stories/drawer.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAEjB,MAAM,aAAa,GAA8C;IAC/D,SAAS,EAAE,MAAM;IACjB,EAAE,EAAE,mBAAmB;IACvB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,mBAAmB;CAC3B,CAAC;AAEF,eAAe,aAAa,CAAC;AAI7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,gBAAgB;gBACtB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,aAAa,KAAG;CAChC,CAAC;AACF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAA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KAAC,gBAAgB,KAAG;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,iBAAiB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,cAAc,KAAG;CACjC,CAAC;AACF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,aAAa;gBACnB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,UAAU,KAAG;CAC7B,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { Drawer } from '../../index';\nimport {\n DrawerFull,\n DrawerFullSrc,\n DrawerNotCloseable,\n DrawerNotCloseableSrc,\n DrawerOverlay,\n DrawerOverlaySrc,\n DrawerPortaled,\n DrawerPortaledSrc,\n DrawerPush,\n DrawerPushSrc,\n DrawerResizable,\n DrawerResizableSrc,\n DrawerRightSide,\n DrawerRightSideSrc,\n DrawerScrollable,\n DrawerScrollableSrc,\n} from './index';\n\nconst componentMeta: Meta<React.ComponentProps<typeof Drawer>> = {\n component: Drawer,\n id: 'components-drawer',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/Drawer',\n};\n\nexport default componentMeta;\n\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Overlay: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerOverlaySrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerOverlay />,\n};\nexport const Push: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerPushSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerPush />,\n};\n\nexport const RightSide: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerRightSideSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerRightSide />,\n};\n\nexport const Resizable: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerResizableSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerResizable />,\n};\n\nexport const NotCloseable: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerNotCloseableSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerNotCloseable />,\n};\n\nexport const Scrollable: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerScrollableSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerScrollable />,\n};\n\nexport const Portaled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerPortaledSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerPortaled />,\n};\nexport const Full: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerFullSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerFull />,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownBut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0B,EAAE;wBAChD,+BAA+B,EAAE,MAAM;qBACxC,CAAC,GACF,IACE,IACI,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ChevronDownIconOutline } from '../icons';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype DropdownButtonProps = {\n /** Content displayed in the button */\n children
|
|
1
|
+
{"version":3,"file":"DropdownButton.js","sourceRoot":"","sources":["../../../src/dropdown-button/DropdownButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AA6BlD;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,cAAc,CAEnD,EAc+C;QAd/C,EACA,EAAE,EACF,QAAQ,EACR,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,cAAc,EACd,MAAM,GAAG,KAAK,EACd,OAAO,EACP,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAE4C,EAD5C,SAAS,cAbZ,4IAcD,CADa;IAEZ,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,EAAE;QACxD,cAAc,EAAE,UAAU;QAC1B,kBAAkB,EAAE,UAAU;QAC9B,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,UAAU,EAAE,MAAM;QAClB,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,QAAQ,CAAC;IAEpD,OAAO,CACL,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,OAAO,mBACD,MAAM,EACrB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,cAElB,eAAK,SAAS,EAAC,wBAAwB,aACrC,eAAK,SAAS,EAAC,kCAAkC,aAC9C,cAAc,EACf,eAAM,SAAS,EAAC,0BAA0B,YAAE,QAAQ,GAAQ,IACxD,EAEN,KAAC,sBAAsB,IACrB,SAAS,EAAE,UAAU,CAAC,0BAA0B,EAAE;wBAChD,+BAA+B,EAAE,MAAM;qBACxC,CAAC,GACF,IACE,IACI,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ChevronDownIconOutline } from '../icons';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype DropdownButtonProps = {\n /** Content displayed in the button */\n children?: React.ReactNode;\n /** Size of button */\n size?: 'small' | 'medium' | 'large';\n /** Whether the button is in floating state */\n isFloating?: boolean;\n /** Whether the button is in disabled state */\n isDisabled?: boolean;\n /** Element that is shown before the button content */\n leadingElement?: React.ReactNode;\n /** If the dropdown is activated */\n isOpen?: boolean;\n /** Callback function to be called when the button is clicked */\n onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /** Additional classnames */\n className?: string;\n};\n\n/**\n *\n *\n * DropdownButton Component\n *\n *\n */\n\nexport const DropdownButton = function DropdownButton<\n T extends React.ElementType = 'button',\n>({\n as,\n children,\n size = 'medium',\n isDisabled = false,\n isFloating = false,\n leadingElement,\n isOpen = false,\n onClick,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, DropdownButtonProps>) {\n const classes = classNames('ndl-dropdown-btn', className, {\n 'ndl-disabled': isDisabled,\n 'ndl-floating-btn': isFloating,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-open': isOpen,\n 'ndl-small': size === 'small',\n });\n\n const Component: React.ElementType = as ?? 'button';\n\n return (\n <Component\n className={classes}\n disabled={isDisabled}\n onClick={onClick}\n aria-expanded={isOpen}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-dropdown-btn-inner\">\n <div className=\"ndl-dropdown-btn-leading-wrapper\">\n {leadingElement}\n <span className=\"ndl-dropdown-btn-content\">{children}</span>\n </div>\n\n <ChevronDownIconOutline\n className={classNames('ndl-dropdown-button-icon', {\n 'ndl-dropdown-button-icon-open': isOpen,\n })}\n />\n </div>\n </Component>\n );\n};\n"]}
|
|
@@ -23,94 +23,94 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
23
23
|
import { DropdownButton } from '../../index';
|
|
24
24
|
import { DropdownButtonDefault, DropdownButtonDefaultSource, DropdownButtonDisabled, DropdownButtonDisabledSource, DropdownButtonFloating, DropdownButtonFloatingSource, DropdownButtonWithAvatar, DropdownButtonWithAvatarSource, DropdownButtonWithMenu, DropdownButtonWithMenuSource, DropdownButtonWithStatusIndicator, DropdownButtonWithStatusIndicatorSource, } from '.';
|
|
25
25
|
const componentMeta = {
|
|
26
|
-
title: 'Components/DropdownButton',
|
|
27
|
-
id: 'components-buttons-dropdown-button',
|
|
28
26
|
component: DropdownButton,
|
|
29
|
-
tags: ['docsPage'],
|
|
30
|
-
parameters: {
|
|
31
|
-
controls: { disable: true },
|
|
32
|
-
},
|
|
33
27
|
decorators: [
|
|
34
28
|
(Story) => (_jsx("div", { className: "n-flex n-justify-center", children: _jsx(Story, {}) })),
|
|
35
29
|
],
|
|
30
|
+
id: 'components-buttons-dropdown-button',
|
|
31
|
+
parameters: {
|
|
32
|
+
controls: { disable: true },
|
|
33
|
+
},
|
|
34
|
+
tags: ['docsPage'],
|
|
35
|
+
title: 'Components/DropdownButton',
|
|
36
36
|
};
|
|
37
37
|
export default componentMeta;
|
|
38
38
|
export const Default = {
|
|
39
39
|
args: {},
|
|
40
|
-
render: DropdownButtonDefault,
|
|
41
40
|
parameters: {
|
|
42
41
|
docs: {
|
|
43
42
|
source: {
|
|
43
|
+
code: DropdownButtonDefaultSource,
|
|
44
44
|
language: 'tsx',
|
|
45
45
|
type: 'code',
|
|
46
|
-
code: DropdownButtonDefaultSource,
|
|
47
46
|
},
|
|
48
47
|
},
|
|
49
48
|
},
|
|
49
|
+
render: DropdownButtonDefault,
|
|
50
50
|
};
|
|
51
51
|
export const WithAvatar = {
|
|
52
52
|
args: {},
|
|
53
|
-
render: DropdownButtonWithAvatar,
|
|
54
53
|
parameters: {
|
|
55
54
|
docs: {
|
|
56
55
|
source: {
|
|
56
|
+
code: DropdownButtonWithAvatarSource,
|
|
57
57
|
language: 'tsx',
|
|
58
58
|
type: 'code',
|
|
59
|
-
code: DropdownButtonWithAvatarSource,
|
|
60
59
|
},
|
|
61
60
|
},
|
|
62
61
|
},
|
|
62
|
+
render: DropdownButtonWithAvatar,
|
|
63
63
|
};
|
|
64
64
|
export const WithStatusIndicator = {
|
|
65
65
|
args: {},
|
|
66
|
-
render: DropdownButtonWithStatusIndicator,
|
|
67
66
|
parameters: {
|
|
68
67
|
docs: {
|
|
69
68
|
source: {
|
|
69
|
+
code: DropdownButtonWithStatusIndicatorSource,
|
|
70
70
|
language: 'tsx',
|
|
71
71
|
type: 'code',
|
|
72
|
-
code: DropdownButtonWithStatusIndicatorSource,
|
|
73
72
|
},
|
|
74
73
|
},
|
|
75
74
|
},
|
|
75
|
+
render: DropdownButtonWithStatusIndicator,
|
|
76
76
|
};
|
|
77
77
|
export const Disabled = {
|
|
78
78
|
args: {},
|
|
79
|
-
render: DropdownButtonDisabled,
|
|
80
79
|
parameters: {
|
|
81
80
|
docs: {
|
|
82
81
|
source: {
|
|
82
|
+
code: DropdownButtonDisabledSource,
|
|
83
83
|
language: 'tsx',
|
|
84
84
|
type: 'code',
|
|
85
|
-
code: DropdownButtonDisabledSource,
|
|
86
85
|
},
|
|
87
86
|
},
|
|
88
87
|
},
|
|
88
|
+
render: DropdownButtonDisabled,
|
|
89
89
|
};
|
|
90
90
|
export const Floating = {
|
|
91
91
|
args: {},
|
|
92
|
-
render: DropdownButtonFloating,
|
|
93
92
|
parameters: {
|
|
94
93
|
docs: {
|
|
95
94
|
source: {
|
|
95
|
+
code: DropdownButtonFloatingSource,
|
|
96
96
|
language: 'tsx',
|
|
97
97
|
type: 'code',
|
|
98
|
-
code: DropdownButtonFloatingSource,
|
|
99
98
|
},
|
|
100
99
|
},
|
|
101
100
|
},
|
|
101
|
+
render: DropdownButtonFloating,
|
|
102
102
|
};
|
|
103
103
|
export const WithMenu = {
|
|
104
104
|
args: {},
|
|
105
|
-
render: DropdownButtonWithMenu,
|
|
106
105
|
parameters: {
|
|
107
106
|
docs: {
|
|
108
107
|
source: {
|
|
108
|
+
code: DropdownButtonWithMenuSource,
|
|
109
109
|
language: 'tsx',
|
|
110
110
|
type: 'code',
|
|
111
|
-
code: DropdownButtonWithMenuSource,
|
|
112
111
|
},
|
|
113
112
|
},
|
|
114
113
|
},
|
|
114
|
+
render: DropdownButtonWithMenu,
|
|
115
115
|
};
|
|
116
116
|
//# sourceMappingURL=dropdown-button.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-button.stories.js","sourceRoot":"","sources":["../../../../src/dropdown-button/stories/dropdown-button.stories.tsx"],"names":[],"mappings":";AAuBA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACtB,4BAA4B,EAC5B,sBAAsB,EACtB,4BAA4B,EAC5B,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACtB,4BAA4B,EAC5B,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAgC;IACjD,
|
|
1
|
+
{"version":3,"file":"dropdown-button.stories.js","sourceRoot":"","sources":["../../../../src/dropdown-button/stories/dropdown-button.stories.tsx"],"names":[],"mappings":";AAuBA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACtB,4BAA4B,EAC5B,sBAAsB,EACtB,4BAA4B,EAC5B,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACtB,4BAA4B,EAC5B,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAgC;IACjD,SAAS,EAAE,cAAc;IACzB,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,EAAE,EAAE,oCAAoC;IACxC,UAAU,EAAE;QACV,QAAQ,E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N,IAAI,EAAE,4BAA4B;gBAClC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,sBAAsB;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,4BAA4B;gBAClC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,sBAAsB;CAC/B,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { DropdownButton } from '../../index';\nimport {\n DropdownButtonDefault,\n DropdownButtonDefaultSource,\n DropdownButtonDisabled,\n DropdownButtonDisabledSource,\n DropdownButtonFloating,\n DropdownButtonFloatingSource,\n DropdownButtonWithAvatar,\n DropdownButtonWithAvatarSource,\n DropdownButtonWithMenu,\n DropdownButtonWithMenuSource,\n DropdownButtonWithStatusIndicator,\n DropdownButtonWithStatusIndicatorSource,\n} from '.';\n\nconst componentMeta: Meta<typeof DropdownButton> = {\n component: DropdownButton,\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n id: 'components-buttons-dropdown-button',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/DropdownButton',\n} satisfies Meta<typeof DropdownButton>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DropdownButtonDefaultSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DropdownButtonDefault,\n};\n\nexport const WithAvatar: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DropdownButtonWithAvatarSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DropdownButtonWithAvatar,\n};\n\nexport const WithStatusIndicator: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DropdownButtonWithStatusIndicatorSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DropdownButtonWithStatusIndicator,\n};\n\nexport const Disabled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DropdownButtonDisabledSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DropdownButtonDisabled,\n};\n\nexport const Floating: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DropdownButtonFloatingSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DropdownButtonFloating,\n};\n\nexport const WithMenu: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DropdownButtonWithMenuSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: DropdownButtonWithMenu,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropzone-disabled.story.js","sourceRoot":"","sources":["../../../../src/dropzone/stories/dropzone-disabled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,MAAM,GAA8B,CAAC,KAAK,EAAE,EAAE;QAClD,KAAK,CACH,uBACE,KAAK,CAAC,MACR,4CAA4C,CAC7C,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,QAAQ,IACP,yBAAyB,EAAC,qBAAqB,EAC/C,eAAe,EAAE;YACf,MAAM,EAAE,EAAE,UAAU,EAAE,CAAC,MAAM,CAAC,EAAE;YAChC,
|
|
1
|
+
{"version":3,"file":"dropzone-disabled.story.js","sourceRoot":"","sources":["../../../../src/dropzone/stories/dropzone-disabled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,MAAM,GAA8B,CAAC,KAAK,EAAE,EAAE;QAClD,KAAK,CACH,uBACE,KAAK,CAAC,MACR,4CAA4C,CAC7C,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,QAAQ,IACP,yBAAyB,EAAC,qBAAqB,EAC/C,eAAe,EAAE;YACf,MAAM,EAAE,EAAE,UAAU,EAAE,CAAC,MAAM,CAAC,EAAE;YAChC,QAAQ,EAAE,IAAI;YACd,MAAM;SACP,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Dropzone } from '@neo4j-ndl/react';\nimport { type DropzoneOptions } from 'react-dropzone';\n\nconst Component = () => {\n const onDrop: DropzoneOptions['onDrop'] = (files) => {\n alert(\n `attempted to upload ${\n files.length\n } file(s). Check console logs for more info`,\n );\n };\n\n return (\n <Dropzone\n supportedFilesDescription=\"Supports: CSV Files\"\n dropZoneOptions={{\n accept: { 'text/csv': ['.csv'] },\n disabled: true,\n onDrop,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -39,17 +39,17 @@ var UploadState;
|
|
|
39
39
|
})(UploadState || (UploadState = {}));
|
|
40
40
|
const Component = () => {
|
|
41
41
|
const [uploadData, setUploadData] = useState({
|
|
42
|
-
state: UploadState.Idle,
|
|
43
|
-
progress: 0,
|
|
44
|
-
files: [],
|
|
45
42
|
errors: [],
|
|
43
|
+
files: [],
|
|
44
|
+
progress: 0,
|
|
45
|
+
state: UploadState.Idle,
|
|
46
46
|
});
|
|
47
47
|
const resetUpload = useCallback(() => {
|
|
48
48
|
setUploadData({
|
|
49
|
-
state: UploadState.Idle,
|
|
50
|
-
progress: 0,
|
|
51
|
-
files: [],
|
|
52
49
|
errors: [],
|
|
50
|
+
files: [],
|
|
51
|
+
progress: 0,
|
|
52
|
+
state: UploadState.Idle,
|
|
53
53
|
});
|
|
54
54
|
}, []);
|
|
55
55
|
const simulateUpload = useCallback((files) => {
|
|
@@ -67,7 +67,7 @@ const Component = () => {
|
|
|
67
67
|
}, CONFIG.UPDATE_INTERVAL);
|
|
68
68
|
}, []);
|
|
69
69
|
const handleDrop = useCallback((acceptedFiles, rejectedFiles, event) => {
|
|
70
|
-
console.info('Drop event:', { acceptedFiles,
|
|
70
|
+
console.info('Drop event:', { acceptedFiles, event, rejectedFiles });
|
|
71
71
|
if (acceptedFiles.length > 0) {
|
|
72
72
|
simulateUpload(acceptedFiles);
|
|
73
73
|
}
|
|
@@ -94,13 +94,13 @@ const Component = () => {
|
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
return (_jsx(Dropzone, { dropZoneOptions: {
|
|
97
|
+
disabled: uploadData.state === UploadState.Uploading,
|
|
98
|
+
maxFiles: CONFIG.MAX_FILES,
|
|
99
|
+
maxSize: CONFIG.MAX_FILE_SIZE,
|
|
100
|
+
multiple: true,
|
|
97
101
|
onDrop: handleDrop,
|
|
98
102
|
onDropRejected: handleDropRejected,
|
|
99
103
|
onError: handleError,
|
|
100
|
-
multiple: true,
|
|
101
|
-
maxFiles: CONFIG.MAX_FILES,
|
|
102
|
-
maxSize: CONFIG.MAX_FILE_SIZE,
|
|
103
|
-
disabled: uploadData.state === UploadState.Uploading,
|
|
104
104
|
}, supportedFilesDescription: _jsxs("div", { className: "n-text-center n-flex n-flex-col n-gap-y-token-2", children: [_jsx(Typography, { variant: "body-small", className: "n-text-neutral-text-weak", children: "Supports: Text files (.txt, .json) only" }), _jsxs(Typography, { variant: "body-small", className: "n-text-neutral-text-weak", children: ["Max ", CONFIG.MAX_FILES, " files \u2022", ' ', CONFIG.MAX_FILE_SIZE / (1024 * 1024), "MB per file"] })] }), acceptedFileExtensions: CONFIG.ACCEPTED_EXTENSIONS, loadingElement: renderStatusContent(), rejectedText: "Error: Please make sure to only upload .json or .txt files", heading: "Drag & Drop your files" }));
|
|
105
105
|
};
|
|
106
106
|
export default Component;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropzone-full.story.js","sourceRoot":"","sources":["../../../../src/dropzone/stories/dropzone-full.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAO9C,0BAA0B;AAC1B,MAAM,MAAM,GAAG;IACb,SAAS,EAAE,CAAC;IACZ,aAAa,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI,EAAE,MAAM;IACtC,kBAAkB,EAAE,CAAC;IACrB,eAAe,EAAE,GAAG;IACpB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E,OAAO,EAAE,YAEhC,OAAO,IALH,KAAK,CAMC,CACd,CAAC,GACE,EACN,KAAC,YAAY,IAAC,OAAO,EAAE,WAAW,0BAA0B,IACxD,CACP,CAAC;YAEJ;gBACE,OAAO,SAAS,CAAC;QACrB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,QAAQ,IACP,eAAe,EAAE;YACf,MAAM,EAAE,UAAU;YAClB,cAAc,EAAE,kBAAkB;YAClC,OAAO,EAAE,WAAW;YACpB,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,MAAM,CAAC,SAAS;YAC1B,OAAO,EAAE,MAAM,CAAC,aAAa;YAC7B,QAAQ,EAAE,UAAU,CAAC,KAAK,KAAK,WAAW,CAAC,SAAS;SACrD,EACD,yBAAyB,EACvB,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,UAAU,IAAC,OAAO,EAAC,YAAY,EAAC,SAAS,EAAC,0BAA0B,wDAExD,EACb,MAAC,UAAU,IAAC,OAAO,EAAC,YAAY,EAAC,SAAS,EAAC,0BAA0B,qBAC9D,MAAM,CAAC,SAAS,mBAAU,GAAG,EACjC,MAAM,CAAC,aAAa,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,mBAC1B,IACT,EAER,sBAAsB,EAAE,MAAM,CAAC,mBAAmB,EAClD,cAAc,EAAE,mBAAmB,EAAE,EACrC,YAAY,EAAC,4DAA4D,EACzE,OAAO,EAAC,wBAAwB,GAChC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { XMarkIcon } from '@heroicons/react/24/solid';\nimport { Dropzone, FilledButton, Typography } from '@neo4j-ndl/react';\nimport { useCallback, useState } from 'react';\nimport {\n type DropEvent,\n type DropzoneOptions,\n type FileRejection,\n} from 'react-dropzone';\n\n// Configuration constants\nconst CONFIG = {\n MAX_FILES: 3,\n MAX_FILE_SIZE: 5 * 1024 * 1024, // 5MB\n PROGRESS_INCREMENT: 5,\n UPDATE_INTERVAL: 100,\n ACCEPTED_EXTENSIONS: ['.txt', '.json'] as string[],\n} as const;\n\nenum UploadState {\n Idle = 'idle',\n Uploading = 'uploading',\n Success = 'success',\n Error = 'error',\n}\n\ninterface UploadData {\n state: UploadState;\n progress: number;\n files: File[];\n errors: string[];\n}\n\nconst Component = () => {\n const [uploadData, setUploadData] = useState<UploadData>({\n state: UploadState.Idle,\n progress: 0,\n files: [],\n errors: [],\n });\n\n const resetUpload = useCallback(() => {\n setUploadData({\n state: UploadState.Idle,\n progress: 0,\n files: [],\n errors: [],\n });\n }, []);\n\n const simulateUpload = useCallback((files: File[]) => {\n setUploadData((prev) => ({\n ...prev,\n state: UploadState.Uploading,\n files,\n progress: 0,\n }));\n\n const interval = setInterval(() => {\n setUploadData((prev) => {\n const newProgress = prev.progress + CONFIG.PROGRESS_INCREMENT;\n if (newProgress >= 100) {\n clearInterval(interval);\n setTimeout(\n () =>\n setUploadData((current) => ({\n ...current,\n state: UploadState.Success,\n })),\n 500,\n );\n return { ...prev, progress: 100 };\n }\n return { ...prev, progress: newProgress };\n });\n }, CONFIG.UPDATE_INTERVAL);\n }, []);\n\n const handleDrop: DropzoneOptions['onDrop'] = useCallback(\n (\n acceptedFiles: File[],\n rejectedFiles: FileRejection[],\n event: DropEvent,\n ) => {\n console.info('Drop event:', { acceptedFiles, rejectedFiles, event });\n\n if (acceptedFiles.length > 0) {\n simulateUpload(acceptedFiles);\n }\n },\n [simulateUpload],\n );\n\n const handleDropRejected: DropzoneOptions['onDropRejected'] = useCallback(\n (rejectedFiles: FileRejection[]) => {\n const errors = rejectedFiles.map(\n (file) =>\n `${file.file.name}: ${file.errors.map((e) => e.message).join(', ')}`,\n );\n setUploadData((prev) => ({ ...prev, state: UploadState.Error, errors }));\n },\n [],\n );\n\n const handleError = useCallback((error: Error) => {\n console.error('Dropzone error:', error);\n setUploadData((prev) => ({\n ...prev,\n state: UploadState.Error,\n errors: [error.message],\n }));\n }, []);\n\n const renderStatusContent = () => {\n const { state, progress, files, errors } = uploadData;\n\n switch (state) {\n case UploadState.Uploading:\n return (\n <Dropzone.LoadingProgressBar\n progressBarPrecentage={Math.round(progress)}\n />\n );\n\n case UploadState.Success:\n return (\n <div className=\"n-flex n-flex-col n-justify-center n-items-center n-gap-y-token-32\">\n <Typography\n variant=\"title-4\"\n className=\"n-text-success-text n-font-semibold\"\n >\n Upload Complete!\n </Typography>\n <Typography\n variant=\"body-small\"\n className=\"n-text-neutral-text-weak\"\n >\n Successfully uploaded: {files.map((file) => file.name).join(', ')}\n </Typography>\n <FilledButton onClick={resetUpload}>Upload More Files</FilledButton>\n </div>\n );\n\n case UploadState.Error:\n return (\n <div className=\"n-flex n-flex-col n-justify-center n-items-center n-gap-y-token-32\">\n <XMarkIcon className=\"n-w-token-32 n-h-token-32 n-text-danger-text\" />\n <div className=\"n-flex n-flex-col n-gap-y-token-2\">\n {errors.map((message, index) => (\n <Typography\n key={index}\n variant=\"label\"\n className=\"n-text-danger-text n-font-semibold\"\n htmlAttributes={{ role: 'alert' }}\n >\n {message}\n </Typography>\n ))}\n </div>\n <FilledButton onClick={resetUpload}>Try Again</FilledButton>\n </div>\n );\n\n default:\n return undefined;\n }\n };\n\n return (\n <Dropzone\n dropZoneOptions={{\n onDrop: handleDrop,\n onDropRejected: handleDropRejected,\n onError: handleError,\n multiple: true,\n maxFiles: CONFIG.MAX_FILES,\n maxSize: CONFIG.MAX_FILE_SIZE,\n disabled: uploadData.state === UploadState.Uploading,\n }}\n supportedFilesDescription={\n <div className=\"n-text-center n-flex n-flex-col n-gap-y-token-2\">\n <Typography variant=\"body-small\" className=\"n-text-neutral-text-weak\">\n Supports: Text files (.txt, .json) only\n </Typography>\n <Typography variant=\"body-small\" className=\"n-text-neutral-text-weak\">\n Max {CONFIG.MAX_FILES} files •{' '}\n {CONFIG.MAX_FILE_SIZE / (1024 * 1024)}MB per file\n </Typography>\n </div>\n }\n acceptedFileExtensions={CONFIG.ACCEPTED_EXTENSIONS}\n loadingElement={renderStatusContent()}\n rejectedText=\"Error: Please make sure to only upload .json or .txt files\"\n heading=\"Drag & Drop your files\"\n />\n );\n};\n\nexport default Component;\n"]}
|
|
1
|
+
{"version":3,"file":"dropzone-full.story.js","sourceRoot":"","sources":["../../../../src/dropzone/stories/dropzone-full.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAO9C,0BAA0B;AAC1B,MAAM,MAAM,GAAG;IACb,SAAS,EAAE,CAAC;IACZ,aAAa,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI,EAAE,MAAM;IACtC,kBAAkB,EAAE,CAAC;IACrB,eAAe,EAAE,GAAG;IACpB,mBAAmB,EAAE,CAAC,MAAM,EAAE,OAAO,CAAa;CAC1C,CAAC;AAEX,IAAK,WAKJ;AALD,WAAK,WAAW;IACd,4BAAa,CAAA;IACb,sCAAuB,CAAA;IACvB,kCAAmB,CAAA;IACnB,8BAAe,CAAA;AACjB,CAAC,EALI,WAAW,KAAX,WAAW,QAKf;AASD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM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AAC,KAAK,KAAK,WAAW,CAAC,SAAS;YACpD,QAAQ,EAAE,MAAM,CAAC,SAAS;YAC1B,OAAO,EAAE,MAAM,CAAC,aAAa;YAC7B,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,UAAU;YAClB,cAAc,EAAE,kBAAkB;YAClC,OAAO,EAAE,WAAW;SACrB,EACD,yBAAyB,EACvB,eAAK,SAAS,EAAC,iDAAiD,aAC9D,KAAC,UAAU,IAAC,OAAO,EAAC,YAAY,EAAC,SAAS,EAAC,0BAA0B,wDAExD,EACb,MAAC,UAAU,IAAC,OAAO,EAAC,YAAY,EAAC,SAAS,EAAC,0BAA0B,qBAC9D,MAAM,CAAC,SAAS,mBAAU,GAAG,EACjC,MAAM,CAAC,aAAa,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,mBAC1B,IACT,EAER,sBAAsB,EAAE,MAAM,CAAC,mBAAmB,EAClD,cAAc,EAAE,mBAAmB,EAAE,EACrC,YAAY,EAAC,4DAA4D,EACzE,OAAO,EAAC,wBAAwB,GAChC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { XMarkIcon } from '@heroicons/react/24/solid';\nimport { Dropzone, FilledButton, Typography } from '@neo4j-ndl/react';\nimport { useCallback, useState } from 'react';\nimport {\n type DropEvent,\n type DropzoneOptions,\n type FileRejection,\n} from 'react-dropzone';\n\n// Configuration constants\nconst CONFIG = {\n MAX_FILES: 3,\n MAX_FILE_SIZE: 5 * 1024 * 1024, // 5MB\n PROGRESS_INCREMENT: 5,\n UPDATE_INTERVAL: 100,\n ACCEPTED_EXTENSIONS: ['.txt', '.json'] as string[],\n} as const;\n\nenum UploadState {\n Idle = 'idle',\n Uploading = 'uploading',\n Success = 'success',\n Error = 'error',\n}\n\ninterface UploadData {\n state: UploadState;\n progress: number;\n files: File[];\n errors: string[];\n}\n\nconst Component = () => {\n const [uploadData, setUploadData] = useState<UploadData>({\n errors: [],\n files: [],\n progress: 0,\n state: UploadState.Idle,\n });\n\n const resetUpload = useCallback(() => {\n setUploadData({\n errors: [],\n files: [],\n progress: 0,\n state: UploadState.Idle,\n });\n }, []);\n\n const simulateUpload = useCallback((files: File[]) => {\n setUploadData((prev) => ({\n ...prev,\n state: UploadState.Uploading,\n files,\n progress: 0,\n }));\n\n const interval = setInterval(() => {\n setUploadData((prev) => {\n const newProgress = prev.progress + CONFIG.PROGRESS_INCREMENT;\n if (newProgress >= 100) {\n clearInterval(interval);\n setTimeout(\n () =>\n setUploadData((current) => ({\n ...current,\n state: UploadState.Success,\n })),\n 500,\n );\n return { ...prev, progress: 100 };\n }\n return { ...prev, progress: newProgress };\n });\n }, CONFIG.UPDATE_INTERVAL);\n }, []);\n\n const handleDrop: DropzoneOptions['onDrop'] = useCallback(\n (\n acceptedFiles: File[],\n rejectedFiles: FileRejection[],\n event: DropEvent,\n ) => {\n console.info('Drop event:', { acceptedFiles, event, rejectedFiles });\n\n if (acceptedFiles.length > 0) {\n simulateUpload(acceptedFiles);\n }\n },\n [simulateUpload],\n );\n\n const handleDropRejected: DropzoneOptions['onDropRejected'] = useCallback(\n (rejectedFiles: FileRejection[]) => {\n const errors = rejectedFiles.map(\n (file) =>\n `${file.file.name}: ${file.errors.map((e) => e.message).join(', ')}`,\n );\n setUploadData((prev) => ({ ...prev, state: UploadState.Error, errors }));\n },\n [],\n );\n\n const handleError = useCallback((error: Error) => {\n console.error('Dropzone error:', error);\n setUploadData((prev) => ({\n ...prev,\n state: UploadState.Error,\n errors: [error.message],\n }));\n }, []);\n\n const renderStatusContent = () => {\n const { state, progress, files, errors } = uploadData;\n\n switch (state) {\n case UploadState.Uploading:\n return (\n <Dropzone.LoadingProgressBar\n progressBarPrecentage={Math.round(progress)}\n />\n );\n\n case UploadState.Success:\n return (\n <div className=\"n-flex n-flex-col n-justify-center n-items-center n-gap-y-token-32\">\n <Typography\n variant=\"title-4\"\n className=\"n-text-success-text n-font-semibold\"\n >\n Upload Complete!\n </Typography>\n <Typography\n variant=\"body-small\"\n className=\"n-text-neutral-text-weak\"\n >\n Successfully uploaded: {files.map((file) => file.name).join(', ')}\n </Typography>\n <FilledButton onClick={resetUpload}>Upload More Files</FilledButton>\n </div>\n );\n\n case UploadState.Error:\n return (\n <div className=\"n-flex n-flex-col n-justify-center n-items-center n-gap-y-token-32\">\n <XMarkIcon className=\"n-w-token-32 n-h-token-32 n-text-danger-text\" />\n <div className=\"n-flex n-flex-col n-gap-y-token-2\">\n {errors.map((message, index) => (\n <Typography\n key={index}\n variant=\"label\"\n className=\"n-text-danger-text n-font-semibold\"\n htmlAttributes={{ role: 'alert' }}\n >\n {message}\n </Typography>\n ))}\n </div>\n <FilledButton onClick={resetUpload}>Try Again</FilledButton>\n </div>\n );\n\n default:\n return undefined;\n }\n };\n\n return (\n <Dropzone\n dropZoneOptions={{\n disabled: uploadData.state === UploadState.Uploading,\n maxFiles: CONFIG.MAX_FILES,\n maxSize: CONFIG.MAX_FILE_SIZE,\n multiple: true,\n onDrop: handleDrop,\n onDropRejected: handleDropRejected,\n onError: handleError,\n }}\n supportedFilesDescription={\n <div className=\"n-text-center n-flex n-flex-col n-gap-y-token-2\">\n <Typography variant=\"body-small\" className=\"n-text-neutral-text-weak\">\n Supports: Text files (.txt, .json) only\n </Typography>\n <Typography variant=\"body-small\" className=\"n-text-neutral-text-weak\">\n Max {CONFIG.MAX_FILES} files •{' '}\n {CONFIG.MAX_FILE_SIZE / (1024 * 1024)}MB per file\n </Typography>\n </div>\n }\n acceptedFileExtensions={CONFIG.ACCEPTED_EXTENSIONS}\n loadingElement={renderStatusContent()}\n rejectedText=\"Error: Please make sure to only upload .json or .txt files\"\n heading=\"Drag & Drop your files\"\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -23,20 +23,19 @@ import { Dropzone } from '@neo4j-ndl/react';
|
|
|
23
23
|
import { DropzoneCsvFiles, DropzoneCsvFilesSource, DropzoneCustomExtensions, DropzoneCustomExtensionsSource, DropzoneDefault, DropzoneDefaultSource, DropzoneDisabled, DropzoneDisabledSource, DropzoneFull, DropzoneFullSource, DropzoneLoadingProgress, DropzoneLoadingProgressSource, } from '.';
|
|
24
24
|
const componentMeta = {
|
|
25
25
|
component: Dropzone,
|
|
26
|
+
decorators: [
|
|
27
|
+
(Story) => (_jsx("div", { className: "n-mx-auto n-w-1/2", children: _jsx(Story, {}) })),
|
|
28
|
+
],
|
|
29
|
+
id: 'components-dropzone',
|
|
26
30
|
parameters: {
|
|
27
31
|
controls: { disable: true },
|
|
28
32
|
},
|
|
29
33
|
tags: ['docsPage'],
|
|
30
34
|
title: 'Components/Dropzone',
|
|
31
|
-
id: 'components-dropzone',
|
|
32
|
-
decorators: [
|
|
33
|
-
(Story) => (_jsx("div", { className: "n-mx-auto n-w-1/2", children: _jsx(Story, {}) })),
|
|
34
|
-
],
|
|
35
35
|
};
|
|
36
36
|
export default componentMeta;
|
|
37
37
|
export const Default = {
|
|
38
38
|
args: {},
|
|
39
|
-
render: () => _jsx(DropzoneDefault, {}),
|
|
40
39
|
parameters: {
|
|
41
40
|
docs: {
|
|
42
41
|
source: {
|
|
@@ -44,11 +43,11 @@ export const Default = {
|
|
|
44
43
|
},
|
|
45
44
|
},
|
|
46
45
|
},
|
|
46
|
+
render: () => _jsx(DropzoneDefault, {}),
|
|
47
47
|
};
|
|
48
48
|
export const CsvFiles = {
|
|
49
49
|
args: {},
|
|
50
50
|
name: 'CSV Files Only (MIME type)',
|
|
51
|
-
render: () => _jsx(DropzoneCsvFiles, {}),
|
|
52
51
|
parameters: {
|
|
53
52
|
docs: {
|
|
54
53
|
source: {
|
|
@@ -56,11 +55,11 @@ export const CsvFiles = {
|
|
|
56
55
|
},
|
|
57
56
|
},
|
|
58
57
|
},
|
|
58
|
+
render: () => _jsx(DropzoneCsvFiles, {}),
|
|
59
59
|
};
|
|
60
60
|
export const CustomExtensions = {
|
|
61
61
|
args: {},
|
|
62
62
|
name: 'Custom File Extensions (.dump)',
|
|
63
|
-
render: () => _jsx(DropzoneCustomExtensions, {}),
|
|
64
63
|
parameters: {
|
|
65
64
|
docs: {
|
|
66
65
|
source: {
|
|
@@ -68,11 +67,11 @@ export const CustomExtensions = {
|
|
|
68
67
|
},
|
|
69
68
|
},
|
|
70
69
|
},
|
|
70
|
+
render: () => _jsx(DropzoneCustomExtensions, {}),
|
|
71
71
|
};
|
|
72
72
|
export const LoadingProgress = {
|
|
73
73
|
args: {},
|
|
74
74
|
name: 'Loading with Progress Bar',
|
|
75
|
-
render: () => _jsx(DropzoneLoadingProgress, {}),
|
|
76
75
|
parameters: {
|
|
77
76
|
docs: {
|
|
78
77
|
source: {
|
|
@@ -80,10 +79,10 @@ export const LoadingProgress = {
|
|
|
80
79
|
},
|
|
81
80
|
},
|
|
82
81
|
},
|
|
82
|
+
render: () => _jsx(DropzoneLoadingProgress, {}),
|
|
83
83
|
};
|
|
84
84
|
export const Disabled = {
|
|
85
85
|
args: {},
|
|
86
|
-
render: () => _jsx(DropzoneDisabled, {}),
|
|
87
86
|
parameters: {
|
|
88
87
|
docs: {
|
|
89
88
|
source: {
|
|
@@ -91,10 +90,10 @@ export const Disabled = {
|
|
|
91
90
|
},
|
|
92
91
|
},
|
|
93
92
|
},
|
|
93
|
+
render: () => _jsx(DropzoneDisabled, {}),
|
|
94
94
|
};
|
|
95
95
|
export const Full = {
|
|
96
96
|
args: {},
|
|
97
|
-
render: () => _jsx(DropzoneFull, {}),
|
|
98
97
|
parameters: {
|
|
99
98
|
docs: {
|
|
100
99
|
source: {
|
|
@@ -102,5 +101,6 @@ export const Full = {
|
|
|
102
101
|
},
|
|
103
102
|
},
|
|
104
103
|
},
|
|
104
|
+
render: () => _jsx(DropzoneFull, {}),
|
|
105
105
|
};
|
|
106
106
|
//# sourceMappingURL=dropzone.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropzone.stories.js","sourceRoot":"","sources":["../../../../src/dropzone/stories/dropzone.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,wBAAwB,EACxB,8BAA8B,EAC9B,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAA0B;IAC3C,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE;QACV,
|
|
1
|
+
{"version":3,"file":"dropzone.stories.js","sourceRoot":"","sources":["../../../../src/dropzone/stories/dropzone.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,wBAAwB,EACxB,8BAA8B,EAC9B,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAA0B;IAC3C,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,E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,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,sBAAsB;aAC7B;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,gBAAgB,KAAG;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,kBAAkB;aACzB;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,YAAY,KAAG;CAC/B,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Dropzone } from '@neo4j-ndl/react';\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport {\n DropzoneCsvFiles,\n DropzoneCsvFilesSource,\n DropzoneCustomExtensions,\n DropzoneCustomExtensionsSource,\n DropzoneDefault,\n DropzoneDefaultSource,\n DropzoneDisabled,\n DropzoneDisabledSource,\n DropzoneFull,\n DropzoneFullSource,\n DropzoneLoadingProgress,\n DropzoneLoadingProgressSource,\n} from '.';\n\nconst componentMeta: Meta<typeof Dropzone> = {\n component: Dropzone,\n decorators: [\n (Story) => (\n <div className=\"n-mx-auto n-w-1/2\">\n <Story />\n </div>\n ),\n ],\n id: 'components-dropzone',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/Dropzone',\n} satisfies Meta<typeof Dropzone>;\n\nexport default componentMeta;\n\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DropzoneDefaultSource,\n },\n },\n },\n render: () => <DropzoneDefault />,\n};\n\nexport const CsvFiles: Story = {\n args: {},\n name: 'CSV Files Only (MIME type)',\n parameters: {\n docs: {\n source: {\n code: DropzoneCsvFilesSource,\n },\n },\n },\n render: () => <DropzoneCsvFiles />,\n};\n\nexport const CustomExtensions: Story = {\n args: {},\n name: 'Custom File Extensions (.dump)',\n parameters: {\n docs: {\n source: {\n code: DropzoneCustomExtensionsSource,\n },\n },\n },\n render: () => <DropzoneCustomExtensions />,\n};\n\nexport const LoadingProgress: Story = {\n args: {},\n name: 'Loading with Progress Bar',\n parameters: {\n docs: {\n source: {\n code: DropzoneLoadingProgressSource,\n },\n },\n },\n render: () => <DropzoneLoadingProgress />,\n};\n\nexport const Disabled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DropzoneDisabledSource,\n },\n },\n },\n render: () => <DropzoneDisabled />,\n};\n\nexport const Full: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DropzoneFullSource,\n },\n },\n },\n render: () => <DropzoneFull />,\n};\n"]}
|
package/lib/esm/flex/Flex.js
CHANGED
|
@@ -47,13 +47,13 @@ export const Flex = (_a) => {
|
|
|
47
47
|
const columnGapPx = columnGap ? tokens.space[columnGap] : undefined;
|
|
48
48
|
const gapFormatted = `${rowGapPx !== null && rowGapPx !== void 0 ? rowGapPx : gapPx} ${columnGapPx !== null && columnGapPx !== void 0 ? columnGapPx : gapPx}`;
|
|
49
49
|
const additionalStyle = {
|
|
50
|
-
flexDirection,
|
|
51
50
|
alignItems,
|
|
52
|
-
|
|
53
|
-
justifyContent,
|
|
51
|
+
borderRadius: getRadius(borderRadius, 'borderRadius'),
|
|
54
52
|
display: 'flex',
|
|
53
|
+
flexDirection,
|
|
54
|
+
flexWrap,
|
|
55
55
|
gap: gapFormatted,
|
|
56
|
-
|
|
56
|
+
justifyContent,
|
|
57
57
|
};
|
|
58
58
|
return (_jsx(Component, Object.assign({ ref: ref, className: className, style: Object.assign(Object.assign({}, additionalStyle), style) }, restProps, htmlAttributes, { children: children })));
|
|
59
59
|
};
|