@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
|
@@ -33,9 +33,9 @@ const Component = (props) => {
|
|
|
33
33
|
const ref = useRef(null);
|
|
34
34
|
const [isOpen, setIsOpen] = useState(false);
|
|
35
35
|
return (_jsxs("div", { ref: ref, className: "n-flex n-flex-col n-items-center n-justify-center n-relative n-h-[500px]", children: [_jsx(FilledButton, { size: "medium", onClick: () => setIsOpen(true), children: "Open Dialog" }), _jsxs(Dialog, { container: (ref === null || ref === void 0 ? void 0 : ref.current) || undefined, isOpen: isOpen, onClose: () => setIsOpen(false), "aria-label": "Dialog", children: [_jsx(Dialog.Header, { children: "Using Select inside a dialog" }), _jsxs(Dialog.Description, { className: "n-flex n-flex-col n-gap-token-32", children: [_jsxs(Typography, { variant: "body-medium", children: ["To use select inside a dialog and avoid the cut-off, you need to use the property ", _jsx("code", { children: "menuPosition: \"fixed\"" }), " inside the", ' ', _jsx("code", { children: "selectProps" }), ". This is done automatically if used in a Needle Dialog, but can always be overridden manually."] }), _jsx(Select, { label: "Inside a dialog", type: "select", selectProps: {
|
|
36
|
+
defaultValue: EXAMPLE_OPTIONS[1],
|
|
36
37
|
menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
|
|
37
38
|
options: EXAMPLE_OPTIONS,
|
|
38
|
-
defaultValue: EXAMPLE_OPTIONS[1],
|
|
39
39
|
} })] })] })] }));
|
|
40
40
|
};
|
|
41
41
|
export default Component;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-inside-dialog.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-inside-dialog.story.tsx"],"names":[],"mappings":";AAAA;;;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AY,GAAG,EACxE,yCAAwB,uGAEb,EACb,KAAC,MAAM,IACL,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oCACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oCACzC,OAAO,EAAE,eAAe;
|
|
1
|
+
{"version":3,"file":"select-inside-dialog.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-inside-dialog.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,MAAM,GAAG,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAErD,OAAO,CACL,eACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAC,0EAA0E,aAEpF,KAAC,YAAY,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,4BAE3C,EACf,MAAC,MAAM,IACL,SAAS,EAAE,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,KAAI,SAAS,EACpC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,gBACpB,QAAQ,aAEnB,KAAC,MAAM,CAAC,MAAM,+CAA6C,EAC3D,MAAC,MAAM,CAAC,WAAW,IAAC,SAAS,EAAC,kCAAkC,aAC9D,MAAC,UAAU,IAAC,OAAO,EAAC,aAAa,mGAElB,qDAA4C,iBAAY,GAAG,EACxE,yCAAwB,uGAEb,EACb,KAAC,MAAM,IACL,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oCACX,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;oCAChC,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oCACzC,OAAO,EAAE,eAAe;iCACzB,GACD,IACiB,IACd,IACL,CACP,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 */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Dialog, FilledButton, Select, Typography } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n const ref = useRef<HTMLDivElement | null>(null);\n const [isOpen, setIsOpen] = useState<boolean>(false);\n\n return (\n <div\n ref={ref}\n className=\"n-flex n-flex-col n-items-center n-justify-center n-relative n-h-[500px]\"\n >\n <FilledButton size=\"medium\" onClick={() => setIsOpen(true)}>\n Open Dialog\n </FilledButton>\n <Dialog\n container={ref?.current || undefined}\n isOpen={isOpen}\n onClose={() => setIsOpen(false)}\n aria-label=\"Dialog\"\n >\n <Dialog.Header>Using Select inside a dialog</Dialog.Header>\n <Dialog.Description className=\"n-flex n-flex-col n-gap-token-32\">\n <Typography variant=\"body-medium\">\n To use select inside a dialog and avoid the cut-off, you need to use\n the property <code>menuPosition: "fixed"</code> inside the{' '}\n <code>selectProps</code>. This is done automatically if used in a\n Needle Dialog, but can always be overridden manually.\n </Typography>\n <Select\n label=\"Inside a dialog\"\n type=\"select\"\n selectProps={{\n defaultValue: EXAMPLE_OPTIONS[1],\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n </Dialog.Description>\n </Dialog>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -112,7 +112,7 @@ const SideNavComponent = (_a) => {
|
|
|
112
112
|
setHasFocusVisible(false);
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
|
-
} }, restProps, htmlAttributes, { children: _jsxs("div",
|
|
115
|
+
} }, restProps, htmlAttributes, { children: _jsxs("div", { className: innerClasses, children: [_jsx("nav", { className: "ndl-side-nav-nav", "aria-label": ariaLabel, children: _jsx(Composite, { as: "ul", "aria-label": ariaLabel, role: "menubar", orientation: "vertical", "aria-orientation": "vertical", className: "ndl-side-nav-list", loop: true, children: children }) }), shouldOverlayOnInteraction === true && (_jsx("div", { className: "ndl-side-nav-footer", children: _jsx(PinButton, {}) }))] }) })) }));
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
118
118
|
* SideNavListItem
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNavigation.js","sourceRoot":"","sources":["../../../src/side-navigation/SideNavigation.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,UAAU,EACV,SAAS,EACT,aAAa,EACb,IAAI,EACJ,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,MAAM,EACN,WAAW,EACX,KAAK,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAKvE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,yBAAyB,EACzB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAUnC;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,EAYS,EAAE,EAAE;QAZb,EACxB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,cAAc,EACd,UAAU,GAAG,KAAK,EAClB,0BAA0B,GAAG,IAAI,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SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,eAAe;IACzB,OAAO;CACR,CAAC,CAAC;AAEH,OAAO,EAAE,cAAc,EAAE,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 {\n autoUpdate,\n Composite,\n CompositeItem,\n flip,\n FloatingFocusManager,\n FloatingList,\n FloatingPortal,\n offset,\n safePolygon,\n shift,\n useDismiss,\n useFloating,\n useFocus,\n useHover,\n useInteractions,\n useListItem,\n useListNavigation,\n useMergeRefs,\n useTransitionStyles,\n} from '@floating-ui/react';\nimport { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { useEffect, useId, useRef, useState } from 'react';\n\nimport { IconIndicatorWrapper } from '../_common/IconIndicatorWrapper';\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { Divider } from '../divider';\nimport { ChevronRightIconOutline, PinIcon } from '../icons';\nimport { Tooltip } from '../tooltip';\nimport { Typography } from '../typography';\nimport {\n SideNavCategoryContext,\n SideNavContext,\n useSideNavCategoryContext,\n useSideNavContext,\n} from './side-navigation-context';\nimport {\n type CategoryHeaderProps,\n type CategoryItemProps,\n type ItemBadgeProps,\n type NavItemProps,\n type SideNavListItemProps,\n type SideNavProps,\n} from './side-navigation-types';\n\n/**\n * SideNav\n */\nconst SideNavComponent = ({\n children,\n className,\n style,\n htmlAttributes,\n isExpanded = false,\n shouldOverlayOnInteraction = true,\n ariaLabel,\n onPinButtonClick,\n expandedWidth,\n ref,\n ...restProps\n}: CommonProps<'div', SideNavProps>) => {\n const [isHovered, setIsHovered] = useState(false);\n const [hasFocusVisible, setHasFocusVisible] = useState(false);\n\n const rootRef = useRef<HTMLDivElement>(null);\n\n const isFloatingExpanded =\n shouldOverlayOnInteraction && (!isHovered ? hasFocusVisible : true);\n\n const classes = classNames('ndl-side-nav', 'ndl-side-nav-root', className, {\n 'ndl-side-nav-collapsed':\n isExpanded !== true && shouldOverlayOnInteraction !== true,\n 'ndl-side-nav-expanded': isExpanded,\n });\n\n const innerClasses = classNames('ndl-side-nav-inner', {\n 'ndl-side-nav-hover':\n shouldOverlayOnInteraction === true &&\n isFloatingExpanded === true &&\n isExpanded !== true,\n });\n\n const customStyle = {\n ...style,\n ...(Boolean(expandedWidth) && {\n '--side-nav-width-expanded':\n typeof expandedWidth === 'string'\n ? expandedWidth\n : `${expandedWidth}px`,\n }),\n };\n\n const mergedRef = useMergeRefs([ref, rootRef]);\n\n return (\n <SideNavContext.Provider\n value={{\n isExpanded,\n isHovered: isFloatingExpanded, // needs refactoring\n onPinButtonClick,\n shouldOverlayOnInteraction,\n }}\n >\n <div\n className={classes}\n ref={mergedRef}\n style={customStyle}\n onMouseEnter={() => {\n setIsHovered(true);\n }}\n onMouseLeave={() => {\n setIsHovered(false);\n }}\n onFocusCapture={() => {\n // Delay slightly to let Composite's focus management settle\n requestAnimationFrame(() => {\n const activeElement = document.activeElement;\n // Check if focus is inside and visible (using :focus-visible on the active element)\n if (\n activeElement instanceof HTMLElement &&\n rootRef.current !== null &&\n rootRef.current.contains(activeElement) &&\n activeElement.matches(':focus-visible')\n ) {\n // Update state after another frame to let focus fully settle\n // This updates the context for consumers without disrupting focus\n requestAnimationFrame(() => {\n setHasFocusVisible(true);\n });\n }\n });\n }}\n onBlurCapture={() => {\n // Small delay to check if focus moved to another element inside\n requestAnimationFrame(() => {\n const activeElement = document.activeElement;\n const isInsideNav =\n activeElement instanceof HTMLElement &&\n rootRef.current !== null &&\n rootRef.current.contains(activeElement);\n // Check if focus is in a portaled floating menu\n const isInsideFloatingMenu =\n activeElement instanceof HTMLElement &&\n activeElement.closest('.ndl-side-nav-popover') !== null;\n\n if (\n (isInsideNav || isInsideFloatingMenu) &&\n activeElement instanceof HTMLElement &&\n activeElement.matches(':focus-visible')\n ) {\n // Focus stayed inside with focus-visible\n setHasFocusVisible(true);\n } else {\n // Focus left - collapse\n setHasFocusVisible(false);\n }\n });\n }}\n {...restProps}\n {...htmlAttributes}\n >\n <div className={innerClasses} style={customStyle} {...htmlAttributes}>\n <nav className=\"ndl-side-nav-nav\">\n <Composite\n as=\"ul\"\n aria-label={ariaLabel}\n role=\"menubar\"\n orientation=\"vertical\"\n aria-orientation=\"vertical\"\n className=\"ndl-side-nav-list\"\n loop={true}\n >\n {children}\n </Composite>\n </nav>\n {shouldOverlayOnInteraction === true && (\n <div className=\"ndl-side-nav-footer\">\n <PinButton />\n </div>\n )}\n </div>\n </div>\n </SideNavContext.Provider>\n );\n};\n\n/**\n * SideNavListItem\n */\nconst SideNavListItem = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'li', SideNavListItemProps>) => {\n const classes = classNames('ndl-side-nav-list-item', className, {});\n\n return (\n <li\n role=\"none\"\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <SelectedIndicator />\n {children}\n </li>\n );\n};\n\n/**\n * NavItem\n */\nconst NavItem = <T extends React.ElementType = 'button'>({\n icon,\n label,\n trailingElement,\n isActive,\n className,\n style,\n htmlAttributes,\n as,\n badge,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, NavItemProps>) => {\n const { isExpanded, isHovered, shouldOverlayOnInteraction } =\n useSideNavContext();\n const categoryContext = useSideNavCategoryContext();\n const isInCategory = categoryContext !== null;\n\n const item = useListItem();\n const mergedRef = useMergeRefs([item.ref, ref]);\n\n const isActiveIndex = item.index === categoryContext?.activeIndex;\n\n const Component: React.ElementType = as ?? 'button';\n const classes = classNames('ndl-side-nav-nav-item', className, {\n 'ndl-active': isActive === true,\n });\n\n const Wrapper = isInCategory ? Component : CompositeItem;\n const componentProps = {\n className: classes,\n ref: mergedRef,\n role: 'menuitem',\n style: style,\n ...(isInCategory && {\n ...categoryContext?.getItemProps(),\n tabIndex: isActiveIndex ? 0 : -1,\n }),\n ...restProps,\n ...htmlAttributes,\n };\n const wrapperProps = isInCategory\n ? componentProps\n : {\n render: <Component {...componentProps} />,\n };\n\n return (\n <ConditionalWrap\n shouldWrap={\n isExpanded === false &&\n !shouldOverlayOnInteraction &&\n !isInCategory &&\n Boolean(label)\n }\n wrap={(children) => (\n <Tooltip\n type=\"simple\"\n placement=\"right\"\n hoverDelay={{ close: 0, open: shouldOverlayOnInteraction ? 100 : 0 }}\n >\n <Tooltip.Trigger hasButtonWrapper={true}>{children}</Tooltip.Trigger>\n <Tooltip.Content>{label}</Tooltip.Content>\n </Tooltip>\n )}\n >\n <Wrapper {...wrapperProps}>\n <div className=\"ndl-side-nav-item-inner\">\n {Boolean(icon) && (\n <div className=\"ndl-side-nav-item-leading-element\">\n <ConditionalWrap\n shouldWrap={Boolean(badge) && !isHovered && !isExpanded}\n wrap={(children) => (\n <IconIndicatorWrapper type={badge?.type ?? 'info'}>\n {children}\n </IconIndicatorWrapper>\n )}\n >\n {icon}\n </ConditionalWrap>\n </div>\n )}\n {Boolean(label) && (\n <Typography\n variant=\"body-medium\"\n as=\"div\"\n className=\"ndl-side-nav-item-label\"\n >\n {label}\n </Typography>\n )}\n {(Boolean(trailingElement) || Boolean(badge)) && (\n <div className=\"ndl-side-nav-item-trailing-element\">\n {trailingElement}\n {badge !== undefined && (\n <ItemBadge type={badge.type} number={badge.number} />\n )}\n </div>\n )}\n </div>\n </Wrapper>\n </ConditionalWrap>\n );\n};\n\n/**\n * CategoryItem\n */\nconst CategoryItem = ({\n children,\n icon,\n label,\n isActive,\n className,\n style,\n htmlAttributes,\n badge,\n isMenuOpen = false,\n ref,\n ...restProps\n}: CommonProps<'button', CategoryItemProps>) => {\n const floatingId = useId();\n const { isExpanded, isHovered, shouldOverlayOnInteraction } =\n useSideNavContext();\n const anchorRef = useRef<HTMLLIElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n const [activeIndex, setActiveIndex] = useState<number | null>(null);\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n const elementsRef = useRef<\n Array<HTMLButtonElement | HTMLAnchorElement | null>\n >([]);\n\n const classes = classNames('ndl-side-nav-category-item', className, {\n 'ndl-active': isActive === true,\n });\n\n // Floating UI setup\n const { refs, context } = useFloating({\n elements: {\n reference: anchorRef.current,\n },\n middleware: [\n offset(5),\n flip({ crossAxis: true, fallbackAxisSideDirection: 'end', padding: 5 }),\n shift({ padding: 5 }),\n ],\n onOpenChange: setIsOpen,\n open: isOpen || isMenuOpen,\n placement: 'right-start',\n strategy: 'fixed',\n whileElementsMounted: autoUpdate,\n });\n\n const dismiss = useDismiss(context, {\n referencePress: false,\n });\n const hover = useHover(context, {\n delay: { close: 130, open: 130 },\n handleClose: safePolygon({\n blockPointerEvents: false,\n requireIntent: false,\n }),\n });\n const focus = useFocus(context);\n const listNavigation = useListNavigation(context, {\n activeIndex: activeIndex,\n focusItemOnHover: false,\n focusItemOnOpen: false,\n listRef: elementsRef,\n loop: true,\n nested: true,\n onNavigate: setActiveIndex,\n openOnArrowKeyDown: false,\n });\n\n // Separate interactions: reference (no listNavigation), floating (with listNavigation)\n const refInteractions = useInteractions([dismiss, hover, focus]);\n const floatInteractions = useInteractions([dismiss, hover, listNavigation]);\n const { styles: transitionStyles } = useTransitionStyles(context, {\n duration: Number.parseInt(tokens.motion.duration.quick) ?? 0,\n });\n\n // Reset activeIndex when menu closes\n useEffect(() => {\n if (!context.open) {\n setActiveIndex(null);\n }\n }, [context.open]);\n\n const mergedRef = useMergeRefs([refs.setReference, ref]);\n\n return (\n <SideNavCategoryContext.Provider\n value={{\n activeIndex,\n getItemProps: floatInteractions.getItemProps,\n }}\n >\n <ConditionalWrap\n shouldWrap={\n isExpanded === false && !shouldOverlayOnInteraction && Boolean(label)\n }\n wrap={(children) => (\n <Tooltip\n type=\"simple\"\n placement=\"top\"\n hoverDelay={{\n close: 0,\n open: shouldOverlayOnInteraction ? 100 : 0,\n }}\n isOpen={isTooltipOpen}\n onOpenChange={setIsTooltipOpen}\n >\n <Tooltip.Trigger hasButtonWrapper={true}>\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content className=\"ndl-side-nav ndl-side-nav-category-menu-tooltip-content\">\n {label}\n </Tooltip.Content>\n </Tooltip>\n )}\n >\n <CompositeItem\n render={\n <button\n {...refInteractions.getReferenceProps({\n className: classes,\n ref: mergedRef,\n style,\n ...restProps,\n ...htmlAttributes,\n })}\n // {...restProps}\n // {...htmlAttributes}\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n aria-expanded={context.open}\n aria-controls={floatingId}\n onFocus={(e) => {\n // Only show tooltip on focus-visible (keyboard navigation)\n if (\n e.target instanceof HTMLElement &&\n e.target.matches(':focus-visible')\n ) {\n setIsTooltipOpen(true);\n }\n // Call original handler if exists\n const originalOnFocus = refInteractions.getReferenceProps({})\n .onFocus as\n | ((e: React.FocusEvent<HTMLButtonElement>) => void)\n | undefined;\n originalOnFocus?.(e);\n }}\n onBlur={(e) => {\n setIsTooltipOpen(false);\n // Call original handler if exists\n const originalOnBlur = refInteractions.getReferenceProps({})\n .onBlur as\n | ((e: React.FocusEvent<HTMLButtonElement>) => void)\n | undefined;\n originalOnBlur?.(e);\n }}\n onKeyDown={(e) => {\n if (e.key === 'ArrowRight') {\n // open and move focus into submenu\n setIsOpen(true);\n setActiveIndex(0);\n // Defer focusing first item (if needed) to next tick\n requestAnimationFrame(() => {\n const el = elementsRef.current[0];\n el?.focus();\n });\n e.preventDefault();\n }\n // ArrowDown/ArrowUp: let Composite handle top-level roving focus.\n }}\n />\n }\n >\n <div className=\"ndl-side-nav-item-inner\">\n {Boolean(icon) && (\n <div className=\"ndl-side-nav-item-leading-element\">\n <ConditionalWrap\n shouldWrap={Boolean(badge) && !isHovered && !isExpanded}\n wrap={(children) => (\n <IconIndicatorWrapper type={badge?.type ?? 'info'}>\n {children}\n </IconIndicatorWrapper>\n )}\n >\n {icon}\n </ConditionalWrap>\n </div>\n )}\n {Boolean(label) && (\n <Typography\n variant=\"body-medium\"\n as=\"div\"\n className=\"ndl-side-nav-item-label\"\n >\n {label}\n </Typography>\n )}\n <div className=\"ndl-side-nav-item-trailing-element\">\n {badge && <ItemBadge type={badge.type} number={badge.number} />}\n <ChevronRightIconOutline className=\"n-size-4 n-text-neutral-icon\" />\n </div>\n </div>\n {context.open && (\n <FloatingList elementsRef={elementsRef}>\n <FloatingPortal>\n <FloatingFocusManager\n context={context}\n modal={false}\n initialFocus={-1}\n returnFocus={true}\n closeOnFocusOut={true}\n guards={true}\n >\n <ul\n id={floatingId}\n ref={refs.setFloating}\n className=\"ndl-side-nav ndl-side-nav-popover ndl-side-nav-popover-list\"\n style={{\n ...context.floatingStyles,\n ...transitionStyles,\n }}\n {...floatInteractions.getFloatingProps()}\n role=\"menu\"\n >\n {children}\n </ul>\n </FloatingFocusManager>\n </FloatingPortal>\n </FloatingList>\n )}\n </CompositeItem>\n </ConditionalWrap>\n </SideNavCategoryContext.Provider>\n );\n};\n\n/**\n * CategoryHeader\n */\nconst CategoryHeader = ({\n children,\n className,\n ref,\n style,\n htmlAttributes,\n ...restProps\n}: CommonProps<'li', CategoryHeaderProps>) => {\n const { isExpanded, isHovered } = useSideNavContext();\n\n const classes = classNames('ndl-side-nav-category-header', className, {\n 'ndl-side-nav-category-header-expanded': isExpanded || isHovered,\n });\n\n return (\n <Typography\n ref={ref}\n variant=\"label\"\n as=\"li\"\n className={classes}\n htmlAttributes={{\n ...htmlAttributes,\n role: 'separator',\n }}\n style={style}\n {...restProps}\n >\n {isExpanded || isHovered ? children : <Divider />}\n </Typography>\n );\n};\n\n/**\n * SelectedIndicator\n */\nconst SelectedIndicator = () => {\n return <div className=\"ndl-side-nav-selected-indicator\" />;\n};\n\n/**\n * SideNavDivider\n */\nconst SideNavDivider = () => {\n return (\n <Divider\n orientation=\"horizontal\"\n className=\"ndl-side-nav-divider\"\n as=\"li\"\n />\n );\n};\n\n/**\n * ItemBadge\n */\nconst ItemBadge = ({\n number,\n type,\n ref,\n htmlAttributes,\n style,\n className,\n ...restProps\n}: CommonProps<'span', ItemBadgeProps>) => {\n useSideNavContext();\n\n const badgeClasses = classNames('ndl-side-nav-item-badge', className, {\n 'ndl-danger': type === 'danger',\n 'ndl-info': type === 'info',\n 'ndl-warning': type === 'warning',\n });\n\n return (\n <Typography\n as=\"span\"\n className={badgeClasses}\n variant=\"subheading-small\"\n htmlAttributes={{\n 'aria-label': `${number} notifications of type ${type}`,\n ...htmlAttributes,\n }}\n style={style}\n ref={ref}\n {...restProps}\n >\n {number}\n </Typography>\n );\n};\n\n/**\n * PinButton\n */\nconst PinButton = () => {\n const { isExpanded, shouldOverlayOnInteraction, onPinButtonClick } =\n useSideNavContext();\n\n const classes = classNames('ndl-side-nav-pin-button');\n\n if (!shouldOverlayOnInteraction) {\n return null;\n }\n\n return (\n <CleanIconButton\n onClick={onPinButtonClick}\n className={classes}\n description=\"Pin\"\n size=\"medium\"\n isActive={isExpanded}\n tooltipProps={{\n root: {\n autoUpdateOptions: {\n animationFrame: true,\n },\n placement: 'right',\n },\n }}\n >\n <PinIcon />\n </CleanIconButton>\n );\n};\n\nconst SideNavigation = Object.assign(SideNavComponent, {\n CategoryHeader: CategoryHeader,\n CategoryItem: CategoryItem,\n Divider: SideNavDivider,\n ItemBadge: ItemBadge,\n ListItem: SideNavListItem,\n NavItem,\n});\n\nexport { SideNavigation };\n"]}
|
|
1
|
+
{"version":3,"file":"SideNavigation.js","sourceRoot":"","sources":["../../../src/side-navigation/SideNavigation.tsx"],"names":[],"mapp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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 {\n autoUpdate,\n Composite,\n CompositeItem,\n flip,\n FloatingFocusManager,\n FloatingList,\n FloatingPortal,\n offset,\n safePolygon,\n shift,\n useDismiss,\n useFloating,\n useFocus,\n useHover,\n useInteractions,\n useListItem,\n useListNavigation,\n useMergeRefs,\n useTransitionStyles,\n} from '@floating-ui/react';\nimport { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { useEffect, useId, useRef, useState } from 'react';\n\nimport { IconIndicatorWrapper } from '../_common/IconIndicatorWrapper';\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { Divider } from '../divider';\nimport { ChevronRightIconOutline, PinIcon } from '../icons';\nimport { Tooltip } from '../tooltip';\nimport { Typography } from '../typography';\nimport {\n SideNavCategoryContext,\n SideNavContext,\n useSideNavCategoryContext,\n useSideNavContext,\n} from './side-navigation-context';\nimport {\n type CategoryHeaderProps,\n type CategoryItemProps,\n type ItemBadgeProps,\n type NavItemProps,\n type SideNavListItemProps,\n type SideNavProps,\n} from './side-navigation-types';\n\n/**\n * SideNav\n */\nconst SideNavComponent = ({\n children,\n className,\n style,\n htmlAttributes,\n isExpanded = false,\n shouldOverlayOnInteraction = true,\n ariaLabel,\n onPinButtonClick,\n expandedWidth,\n ref,\n ...restProps\n}: CommonProps<'div', SideNavProps>) => {\n const [isHovered, setIsHovered] = useState(false);\n const [hasFocusVisible, setHasFocusVisible] = useState(false);\n\n const rootRef = useRef<HTMLDivElement>(null);\n\n const isFloatingExpanded =\n shouldOverlayOnInteraction && (!isHovered ? hasFocusVisible : true);\n\n const classes = classNames('ndl-side-nav', 'ndl-side-nav-root', className, {\n 'ndl-side-nav-collapsed':\n isExpanded !== true && shouldOverlayOnInteraction !== true,\n 'ndl-side-nav-expanded': isExpanded,\n });\n\n const innerClasses = classNames('ndl-side-nav-inner', {\n 'ndl-side-nav-hover':\n shouldOverlayOnInteraction === true &&\n isFloatingExpanded === true &&\n isExpanded !== true,\n });\n\n const customStyle = {\n ...style,\n ...(Boolean(expandedWidth) && {\n '--side-nav-width-expanded':\n typeof expandedWidth === 'string'\n ? expandedWidth\n : `${expandedWidth}px`,\n }),\n };\n\n const mergedRef = useMergeRefs([ref, rootRef]);\n\n return (\n <SideNavContext.Provider\n value={{\n isExpanded,\n isHovered: isFloatingExpanded, // needs refactoring\n onPinButtonClick,\n shouldOverlayOnInteraction,\n }}\n >\n <div\n className={classes}\n ref={mergedRef}\n style={customStyle}\n onMouseEnter={() => {\n setIsHovered(true);\n }}\n onMouseLeave={() => {\n setIsHovered(false);\n }}\n onFocusCapture={() => {\n // Delay slightly to let Composite's focus management settle\n requestAnimationFrame(() => {\n const activeElement = document.activeElement;\n // Check if focus is inside and visible (using :focus-visible on the active element)\n if (\n activeElement instanceof HTMLElement &&\n rootRef.current !== null &&\n rootRef.current.contains(activeElement) &&\n activeElement.matches(':focus-visible')\n ) {\n // Update state after another frame to let focus fully settle\n // This updates the context for consumers without disrupting focus\n requestAnimationFrame(() => {\n setHasFocusVisible(true);\n });\n }\n });\n }}\n onBlurCapture={() => {\n // Small delay to check if focus moved to another element inside\n requestAnimationFrame(() => {\n const activeElement = document.activeElement;\n const isInsideNav =\n activeElement instanceof HTMLElement &&\n rootRef.current !== null &&\n rootRef.current.contains(activeElement);\n // Check if focus is in a portaled floating menu\n const isInsideFloatingMenu =\n activeElement instanceof HTMLElement &&\n activeElement.closest('.ndl-side-nav-popover') !== null;\n\n if (\n (isInsideNav || isInsideFloatingMenu) &&\n activeElement instanceof HTMLElement &&\n activeElement.matches(':focus-visible')\n ) {\n // Focus stayed inside with focus-visible\n setHasFocusVisible(true);\n } else {\n // Focus left - collapse\n setHasFocusVisible(false);\n }\n });\n }}\n {...restProps}\n {...htmlAttributes}\n >\n <div className={innerClasses}>\n {/** TODO v5: should the nav be the one that gets all the stuff spread on it? */}\n <nav className=\"ndl-side-nav-nav\" aria-label={ariaLabel}>\n <Composite\n as=\"ul\"\n aria-label={ariaLabel}\n role=\"menubar\"\n orientation=\"vertical\"\n aria-orientation=\"vertical\"\n className=\"ndl-side-nav-list\"\n loop={true}\n >\n {children}\n </Composite>\n </nav>\n {shouldOverlayOnInteraction === true && (\n <div className=\"ndl-side-nav-footer\">\n <PinButton />\n </div>\n )}\n </div>\n </div>\n </SideNavContext.Provider>\n );\n};\n\n/**\n * SideNavListItem\n */\nconst SideNavListItem = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'li', SideNavListItemProps>) => {\n const classes = classNames('ndl-side-nav-list-item', className, {});\n\n return (\n <li\n role=\"none\"\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <SelectedIndicator />\n {children}\n </li>\n );\n};\n\n/**\n * NavItem\n */\nconst NavItem = <T extends React.ElementType = 'button'>({\n icon,\n label,\n trailingElement,\n isActive,\n className,\n style,\n htmlAttributes,\n as,\n badge,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, NavItemProps>) => {\n const { isExpanded, isHovered, shouldOverlayOnInteraction } =\n useSideNavContext();\n const categoryContext = useSideNavCategoryContext();\n const isInCategory = categoryContext !== null;\n\n const item = useListItem();\n const mergedRef = useMergeRefs([item.ref, ref]);\n\n const isActiveIndex = item.index === categoryContext?.activeIndex;\n\n const Component: React.ElementType = as ?? 'button';\n const classes = classNames('ndl-side-nav-nav-item', className, {\n 'ndl-active': isActive === true,\n });\n\n const Wrapper = isInCategory ? Component : CompositeItem;\n const componentProps = {\n className: classes,\n ref: mergedRef,\n role: 'menuitem',\n style: style,\n ...(isInCategory && {\n ...categoryContext?.getItemProps(),\n tabIndex: isActiveIndex ? 0 : -1,\n }),\n ...restProps,\n ...htmlAttributes,\n };\n const wrapperProps = isInCategory\n ? componentProps\n : {\n render: <Component {...componentProps} />,\n };\n\n return (\n <ConditionalWrap\n shouldWrap={\n isExpanded === false &&\n !shouldOverlayOnInteraction &&\n !isInCategory &&\n Boolean(label)\n }\n wrap={(children) => (\n <Tooltip\n type=\"simple\"\n placement=\"right\"\n hoverDelay={{ close: 0, open: shouldOverlayOnInteraction ? 100 : 0 }}\n >\n <Tooltip.Trigger hasButtonWrapper={true}>{children}</Tooltip.Trigger>\n <Tooltip.Content>{label}</Tooltip.Content>\n </Tooltip>\n )}\n >\n <Wrapper {...wrapperProps}>\n <div className=\"ndl-side-nav-item-inner\">\n {Boolean(icon) && (\n <div className=\"ndl-side-nav-item-leading-element\">\n <ConditionalWrap\n shouldWrap={Boolean(badge) && !isHovered && !isExpanded}\n wrap={(children) => (\n <IconIndicatorWrapper type={badge?.type ?? 'info'}>\n {children}\n </IconIndicatorWrapper>\n )}\n >\n {icon}\n </ConditionalWrap>\n </div>\n )}\n {Boolean(label) && (\n <Typography\n variant=\"body-medium\"\n as=\"div\"\n className=\"ndl-side-nav-item-label\"\n >\n {label}\n </Typography>\n )}\n {(Boolean(trailingElement) || Boolean(badge)) && (\n <div className=\"ndl-side-nav-item-trailing-element\">\n {trailingElement}\n {badge !== undefined && (\n <ItemBadge type={badge.type} number={badge.number} />\n )}\n </div>\n )}\n </div>\n </Wrapper>\n </ConditionalWrap>\n );\n};\n\n/**\n * CategoryItem\n */\nconst CategoryItem = ({\n children,\n icon,\n label,\n isActive,\n className,\n style,\n htmlAttributes,\n badge,\n isMenuOpen = false,\n ref,\n ...restProps\n}: CommonProps<'button', CategoryItemProps>) => {\n const floatingId = useId();\n const { isExpanded, isHovered, shouldOverlayOnInteraction } =\n useSideNavContext();\n const anchorRef = useRef<HTMLLIElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n const [activeIndex, setActiveIndex] = useState<number | null>(null);\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n const elementsRef = useRef<\n Array<HTMLButtonElement | HTMLAnchorElement | null>\n >([]);\n\n const classes = classNames('ndl-side-nav-category-item', className, {\n 'ndl-active': isActive === true,\n });\n\n // Floating UI setup\n const { refs, context } = useFloating({\n elements: {\n reference: anchorRef.current,\n },\n middleware: [\n offset(5),\n flip({ crossAxis: true, fallbackAxisSideDirection: 'end', padding: 5 }),\n shift({ padding: 5 }),\n ],\n onOpenChange: setIsOpen,\n open: isOpen || isMenuOpen,\n placement: 'right-start',\n strategy: 'fixed',\n whileElementsMounted: autoUpdate,\n });\n\n const dismiss = useDismiss(context, {\n referencePress: false,\n });\n const hover = useHover(context, {\n delay: { close: 130, open: 130 },\n handleClose: safePolygon({\n blockPointerEvents: false,\n requireIntent: false,\n }),\n });\n const focus = useFocus(context);\n const listNavigation = useListNavigation(context, {\n activeIndex: activeIndex,\n focusItemOnHover: false,\n focusItemOnOpen: false,\n listRef: elementsRef,\n loop: true,\n nested: true,\n onNavigate: setActiveIndex,\n openOnArrowKeyDown: false,\n });\n\n // Separate interactions: reference (no listNavigation), floating (with listNavigation)\n const refInteractions = useInteractions([dismiss, hover, focus]);\n const floatInteractions = useInteractions([dismiss, hover, listNavigation]);\n const { styles: transitionStyles } = useTransitionStyles(context, {\n duration: Number.parseInt(tokens.motion.duration.quick) ?? 0,\n });\n\n // Reset activeIndex when menu closes\n useEffect(() => {\n if (!context.open) {\n setActiveIndex(null);\n }\n }, [context.open]);\n\n const mergedRef = useMergeRefs([refs.setReference, ref]);\n\n return (\n <SideNavCategoryContext.Provider\n value={{\n activeIndex,\n getItemProps: floatInteractions.getItemProps,\n }}\n >\n <ConditionalWrap\n shouldWrap={\n isExpanded === false && !shouldOverlayOnInteraction && Boolean(label)\n }\n wrap={(children) => (\n <Tooltip\n type=\"simple\"\n placement=\"top\"\n hoverDelay={{\n close: 0,\n open: shouldOverlayOnInteraction ? 100 : 0,\n }}\n isOpen={isTooltipOpen}\n onOpenChange={setIsTooltipOpen}\n >\n <Tooltip.Trigger hasButtonWrapper={true}>\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content className=\"ndl-side-nav ndl-side-nav-category-menu-tooltip-content\">\n {label}\n </Tooltip.Content>\n </Tooltip>\n )}\n >\n <CompositeItem\n render={\n <button\n {...refInteractions.getReferenceProps({\n className: classes,\n ref: mergedRef,\n style,\n ...restProps,\n ...htmlAttributes,\n })}\n // {...restProps}\n // {...htmlAttributes}\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n aria-expanded={context.open}\n aria-controls={floatingId}\n onFocus={(e) => {\n // Only show tooltip on focus-visible (keyboard navigation)\n if (\n e.target instanceof HTMLElement &&\n e.target.matches(':focus-visible')\n ) {\n setIsTooltipOpen(true);\n }\n // Call original handler if exists\n const originalOnFocus = refInteractions.getReferenceProps({})\n .onFocus as\n | ((e: React.FocusEvent<HTMLButtonElement>) => void)\n | undefined;\n originalOnFocus?.(e);\n }}\n onBlur={(e) => {\n setIsTooltipOpen(false);\n // Call original handler if exists\n const originalOnBlur = refInteractions.getReferenceProps({})\n .onBlur as\n | ((e: React.FocusEvent<HTMLButtonElement>) => void)\n | undefined;\n originalOnBlur?.(e);\n }}\n onKeyDown={(e) => {\n if (e.key === 'ArrowRight') {\n // open and move focus into submenu\n setIsOpen(true);\n setActiveIndex(0);\n // Defer focusing first item (if needed) to next tick\n requestAnimationFrame(() => {\n const el = elementsRef.current[0];\n el?.focus();\n });\n e.preventDefault();\n }\n // ArrowDown/ArrowUp: let Composite handle top-level roving focus.\n }}\n />\n }\n >\n <div className=\"ndl-side-nav-item-inner\">\n {Boolean(icon) && (\n <div className=\"ndl-side-nav-item-leading-element\">\n <ConditionalWrap\n shouldWrap={Boolean(badge) && !isHovered && !isExpanded}\n wrap={(children) => (\n <IconIndicatorWrapper type={badge?.type ?? 'info'}>\n {children}\n </IconIndicatorWrapper>\n )}\n >\n {icon}\n </ConditionalWrap>\n </div>\n )}\n {Boolean(label) && (\n <Typography\n variant=\"body-medium\"\n as=\"div\"\n className=\"ndl-side-nav-item-label\"\n >\n {label}\n </Typography>\n )}\n <div className=\"ndl-side-nav-item-trailing-element\">\n {badge && <ItemBadge type={badge.type} number={badge.number} />}\n <ChevronRightIconOutline className=\"n-size-4 n-text-neutral-icon\" />\n </div>\n </div>\n {context.open && (\n <FloatingList elementsRef={elementsRef}>\n <FloatingPortal>\n <FloatingFocusManager\n context={context}\n modal={false}\n initialFocus={-1}\n returnFocus={true}\n closeOnFocusOut={true}\n guards={true}\n >\n <ul\n id={floatingId}\n ref={refs.setFloating}\n className=\"ndl-side-nav ndl-side-nav-popover ndl-side-nav-popover-list\"\n style={{\n ...context.floatingStyles,\n ...transitionStyles,\n }}\n {...floatInteractions.getFloatingProps()}\n role=\"menu\"\n >\n {children}\n </ul>\n </FloatingFocusManager>\n </FloatingPortal>\n </FloatingList>\n )}\n </CompositeItem>\n </ConditionalWrap>\n </SideNavCategoryContext.Provider>\n );\n};\n\n/**\n * CategoryHeader\n */\nconst CategoryHeader = ({\n children,\n className,\n ref,\n style,\n htmlAttributes,\n ...restProps\n}: CommonProps<'li', CategoryHeaderProps>) => {\n const { isExpanded, isHovered } = useSideNavContext();\n\n const classes = classNames('ndl-side-nav-category-header', className, {\n 'ndl-side-nav-category-header-expanded': isExpanded || isHovered,\n });\n\n return (\n <Typography\n ref={ref}\n variant=\"label\"\n as=\"li\"\n className={classes}\n htmlAttributes={{\n ...htmlAttributes,\n role: 'separator',\n }}\n style={style}\n {...restProps}\n >\n {isExpanded || isHovered ? children : <Divider />}\n </Typography>\n );\n};\n\n/**\n * SelectedIndicator\n */\nconst SelectedIndicator = () => {\n return <div className=\"ndl-side-nav-selected-indicator\" />;\n};\n\n/**\n * SideNavDivider\n */\nconst SideNavDivider = () => {\n return (\n <Divider\n orientation=\"horizontal\"\n className=\"ndl-side-nav-divider\"\n as=\"li\"\n />\n );\n};\n\n/**\n * ItemBadge\n */\nconst ItemBadge = ({\n number,\n type,\n ref,\n htmlAttributes,\n style,\n className,\n ...restProps\n}: CommonProps<'span', ItemBadgeProps>) => {\n useSideNavContext();\n\n const badgeClasses = classNames('ndl-side-nav-item-badge', className, {\n 'ndl-danger': type === 'danger',\n 'ndl-info': type === 'info',\n 'ndl-warning': type === 'warning',\n });\n\n return (\n <Typography\n as=\"span\"\n className={badgeClasses}\n variant=\"subheading-small\"\n htmlAttributes={{\n 'aria-label': `${number} notifications of type ${type}`,\n ...htmlAttributes,\n }}\n style={style}\n ref={ref}\n {...restProps}\n >\n {number}\n </Typography>\n );\n};\n\n/**\n * PinButton\n */\nconst PinButton = () => {\n const { isExpanded, shouldOverlayOnInteraction, onPinButtonClick } =\n useSideNavContext();\n\n const classes = classNames('ndl-side-nav-pin-button');\n\n if (!shouldOverlayOnInteraction) {\n return null;\n }\n\n return (\n <CleanIconButton\n onClick={onPinButtonClick}\n className={classes}\n description=\"Pin\"\n size=\"medium\"\n isActive={isExpanded}\n tooltipProps={{\n root: {\n autoUpdateOptions: {\n animationFrame: true,\n },\n placement: 'right',\n },\n }}\n >\n <PinIcon />\n </CleanIconButton>\n );\n};\n\nconst SideNavigation = Object.assign(SideNavComponent, {\n CategoryHeader: CategoryHeader,\n CategoryItem: CategoryItem,\n Divider: SideNavDivider,\n ItemBadge: ItemBadge,\n ListItem: SideNavListItem,\n NavItem,\n});\n\nexport { SideNavigation };\n"]}
|
|
@@ -22,12 +22,12 @@ import { SideNavigation } from '../index';
|
|
|
22
22
|
import { SideNavBadges, SideNavBadgesSrc, SideNavCompact, SideNavCompactSrc, SideNavDefault, SideNavDefaultSrc, SideNavSecondary, SideNavSecondarySrc, } from '.';
|
|
23
23
|
const componentMeta = {
|
|
24
24
|
component: SideNavigation,
|
|
25
|
+
id: 'components-side-navigation',
|
|
25
26
|
parameters: {
|
|
26
27
|
controls: { disable: true },
|
|
27
28
|
},
|
|
28
29
|
tags: ['docsPage'],
|
|
29
30
|
title: 'Components/SideNavigation',
|
|
30
|
-
id: 'components-side-navigation',
|
|
31
31
|
};
|
|
32
32
|
export default componentMeta;
|
|
33
33
|
export const Default = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side-nav.stories.js","sourceRoot":"","sources":["../../../../src/side-navigation/stories/side-nav.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,cAAc;IACzB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,2BAA2B;
|
|
1
|
+
{"version":3,"file":"side-nav.stories.js","sourceRoot":"","sources":["../../../../src/side-navigation/stories/side-nav.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,cAAc;IACzB,EAAE,EAAE,4BAA4B;IAChC,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,2BAA2B;CACG,CAAC;AAExC,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,uCAAuC;IACvC,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,cAAc;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,uCAAuC;IACvC,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,cAAc;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACrC,uCAAuC;IACvC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,mBAAmB;gBACzB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,gBAAgB;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,uCAAuC;IACvC,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,aAAa;CACtB,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 { SideNavigation } from '../index';\nimport {\n SideNavBadges,\n SideNavBadgesSrc,\n SideNavCompact,\n SideNavCompactSrc,\n SideNavDefault,\n SideNavDefaultSrc,\n SideNavSecondary,\n SideNavSecondarySrc,\n} from '.';\n\nconst componentMeta = {\n component: SideNavigation,\n id: 'components-side-navigation',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/SideNavigation',\n} satisfies Meta<typeof SideNavigation>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n // @ts-expect-error - we don't use args\n args: {},\n parameters: {\n docs: {\n source: {\n code: SideNavDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SideNavDefault,\n};\n\nexport const Compact: Story = {\n // @ts-expect-error - we don't use args\n args: {},\n parameters: {\n docs: {\n source: {\n code: SideNavCompactSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SideNavCompact,\n};\n\nexport const WithSecondaryNav: Story = {\n // @ts-expect-error - we don't use args\n args: {},\n parameters: {\n docs: {\n source: {\n code: SideNavSecondarySrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SideNavSecondary,\n};\n\nexport const WithBadges: Story = {\n // @ts-expect-error - we don't use args\n args: {},\n parameters: {\n docs: {\n source: {\n code: SideNavBadgesSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SideNavBadges,\n};\n"]}
|
|
@@ -22,113 +22,113 @@
|
|
|
22
22
|
import { Skeleton } from '../../index';
|
|
23
23
|
import { SkeletonCircular, SkeletonCircularSrc, SkeletonDefault, SkeletonDefaultSrc, SkeletonFullExample, SkeletonFullExampleSrc, SkeletonInheritHeight, SkeletonInheritHeightSrc, SkeletonInheritWidth, SkeletonInheritWidthSrc, } from '.';
|
|
24
24
|
const componentMeta = {
|
|
25
|
-
title: 'Components/Skeleton',
|
|
26
|
-
id: 'components-skeleton',
|
|
27
25
|
component: Skeleton,
|
|
28
|
-
|
|
26
|
+
id: 'components-skeleton',
|
|
29
27
|
parameters: {
|
|
30
28
|
controls: { disable: true },
|
|
31
29
|
},
|
|
30
|
+
tags: ['docsPage'],
|
|
31
|
+
title: 'Components/Skeleton',
|
|
32
32
|
};
|
|
33
33
|
export default componentMeta;
|
|
34
34
|
export const Default = {
|
|
35
35
|
args: {
|
|
36
36
|
children: undefined,
|
|
37
|
-
shape: 'rectangular',
|
|
38
37
|
height: undefined,
|
|
39
|
-
width: undefined,
|
|
40
|
-
onBackground: 'default',
|
|
41
38
|
isLoading: true,
|
|
39
|
+
onBackground: 'default',
|
|
40
|
+
shape: 'rectangular',
|
|
41
|
+
width: undefined,
|
|
42
42
|
},
|
|
43
|
-
render: SkeletonDefault,
|
|
44
43
|
parameters: {
|
|
45
44
|
docs: {
|
|
46
45
|
source: {
|
|
46
|
+
code: SkeletonDefaultSrc,
|
|
47
47
|
language: 'tsx',
|
|
48
48
|
type: 'code',
|
|
49
|
-
code: SkeletonDefaultSrc,
|
|
50
49
|
},
|
|
51
50
|
},
|
|
52
51
|
},
|
|
52
|
+
render: SkeletonDefault,
|
|
53
53
|
};
|
|
54
54
|
export const Circular = {
|
|
55
55
|
args: {
|
|
56
56
|
children: undefined,
|
|
57
|
-
shape: 'circular',
|
|
58
57
|
height: undefined,
|
|
59
|
-
width: undefined,
|
|
60
|
-
onBackground: 'default',
|
|
61
58
|
isLoading: true,
|
|
59
|
+
onBackground: 'default',
|
|
60
|
+
shape: 'circular',
|
|
61
|
+
width: undefined,
|
|
62
62
|
},
|
|
63
|
-
render: SkeletonCircular,
|
|
64
63
|
parameters: {
|
|
65
64
|
docs: {
|
|
66
65
|
source: {
|
|
66
|
+
code: SkeletonCircularSrc,
|
|
67
67
|
language: 'tsx',
|
|
68
68
|
type: 'code',
|
|
69
|
-
code: SkeletonCircularSrc,
|
|
70
69
|
},
|
|
71
70
|
},
|
|
72
71
|
},
|
|
72
|
+
render: SkeletonCircular,
|
|
73
73
|
};
|
|
74
74
|
export const InheritWidth = {
|
|
75
75
|
args: {
|
|
76
76
|
children: undefined,
|
|
77
|
-
shape: 'rectangular',
|
|
78
77
|
height: undefined,
|
|
79
|
-
width: undefined,
|
|
80
|
-
onBackground: 'default',
|
|
81
78
|
isLoading: true,
|
|
79
|
+
onBackground: 'default',
|
|
80
|
+
shape: 'rectangular',
|
|
81
|
+
width: undefined,
|
|
82
82
|
},
|
|
83
|
-
render: SkeletonInheritWidth,
|
|
84
83
|
parameters: {
|
|
85
84
|
docs: {
|
|
86
85
|
source: {
|
|
86
|
+
code: SkeletonInheritWidthSrc,
|
|
87
87
|
language: 'tsx',
|
|
88
88
|
type: 'code',
|
|
89
|
-
code: SkeletonInheritWidthSrc,
|
|
90
89
|
},
|
|
91
90
|
},
|
|
92
91
|
},
|
|
92
|
+
render: SkeletonInheritWidth,
|
|
93
93
|
};
|
|
94
94
|
export const InheritHeight = {
|
|
95
95
|
args: {
|
|
96
96
|
children: undefined,
|
|
97
|
-
shape: 'rectangular',
|
|
98
97
|
height: undefined,
|
|
99
|
-
width: undefined,
|
|
100
|
-
onBackground: 'default',
|
|
101
98
|
isLoading: true,
|
|
99
|
+
onBackground: 'default',
|
|
100
|
+
shape: 'rectangular',
|
|
101
|
+
width: undefined,
|
|
102
102
|
},
|
|
103
|
-
render: SkeletonInheritHeight,
|
|
104
103
|
parameters: {
|
|
105
104
|
docs: {
|
|
106
105
|
source: {
|
|
106
|
+
code: SkeletonInheritHeightSrc,
|
|
107
107
|
language: 'tsx',
|
|
108
108
|
type: 'code',
|
|
109
|
-
code: SkeletonInheritHeightSrc,
|
|
110
109
|
},
|
|
111
110
|
},
|
|
112
111
|
},
|
|
112
|
+
render: SkeletonInheritHeight,
|
|
113
113
|
};
|
|
114
114
|
export const FullExample = {
|
|
115
115
|
args: {
|
|
116
116
|
children: undefined,
|
|
117
|
-
shape: 'rectangular',
|
|
118
117
|
height: undefined,
|
|
119
|
-
width: undefined,
|
|
120
|
-
onBackground: 'default',
|
|
121
118
|
isLoading: true,
|
|
119
|
+
onBackground: 'default',
|
|
120
|
+
shape: 'rectangular',
|
|
121
|
+
width: undefined,
|
|
122
122
|
},
|
|
123
|
-
render: SkeletonFullExample,
|
|
124
123
|
parameters: {
|
|
125
124
|
docs: {
|
|
126
125
|
source: {
|
|
126
|
+
code: SkeletonFullExampleSrc,
|
|
127
127
|
language: 'tsx',
|
|
128
128
|
type: 'code',
|
|
129
|
-
code: SkeletonFullExampleSrc,
|
|
130
129
|
},
|
|
131
130
|
},
|
|
132
131
|
},
|
|
132
|
+
render: SkeletonFullExample,
|
|
133
133
|
};
|
|
134
134
|
//# sourceMappingURL=skeleton.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.stories.js","sourceRoot":"","sources":["../../../../src/skeleton/stories/skeleton.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,
|
|
1
|
+
{"version":3,"file":"skeleton.stories.js","sourceRoot":"","sources":["../../../../src/skeleton/stories/skeleton.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAA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IACjC,IAAI,EAAE;QACJ,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,SAAS;QACvB,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,SAAS;KACjB;IACD,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,uBAAuB;gBAC7B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,oBAAoB;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,IAAI,EAAE;QACJ,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,SAAS;QACvB,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,SAAS;KACjB;IACD,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,wBAAwB;gBAC9B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,qBAAqB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAU;IAChC,IAAI,EAAE;QACJ,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,SAAS;QACvB,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,SAAS;KACjB;IACD,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,sBAAsB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,mBAAmB;CAC5B,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 { Skeleton } from '../../index';\nimport {\n SkeletonCircular,\n SkeletonCircularSrc,\n SkeletonDefault,\n SkeletonDefaultSrc,\n SkeletonFullExample,\n SkeletonFullExampleSrc,\n SkeletonInheritHeight,\n SkeletonInheritHeightSrc,\n SkeletonInheritWidth,\n SkeletonInheritWidthSrc,\n} from '.';\n\nconst componentMeta = {\n component: Skeleton,\n id: 'components-skeleton',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/Skeleton',\n} satisfies Meta<typeof Skeleton>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {\n children: undefined,\n height: undefined,\n isLoading: true,\n onBackground: 'default',\n shape: 'rectangular',\n width: undefined,\n },\n parameters: {\n docs: {\n source: {\n code: SkeletonDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SkeletonDefault,\n};\n\nexport const Circular: Story = {\n args: {\n children: undefined,\n height: undefined,\n isLoading: true,\n onBackground: 'default',\n shape: 'circular',\n width: undefined,\n },\n parameters: {\n docs: {\n source: {\n code: SkeletonCircularSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SkeletonCircular,\n};\n\nexport const InheritWidth: Story = {\n args: {\n children: undefined,\n height: undefined,\n isLoading: true,\n onBackground: 'default',\n shape: 'rectangular',\n width: undefined,\n },\n parameters: {\n docs: {\n source: {\n code: SkeletonInheritWidthSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SkeletonInheritWidth,\n};\n\nexport const InheritHeight: Story = {\n args: {\n children: undefined,\n height: undefined,\n isLoading: true,\n onBackground: 'default',\n shape: 'rectangular',\n width: undefined,\n },\n parameters: {\n docs: {\n source: {\n code: SkeletonInheritHeightSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SkeletonInheritHeight,\n};\n\nexport const FullExample: Story = {\n args: {\n children: undefined,\n height: undefined,\n isLoading: true,\n onBackground: 'default',\n shape: 'rectangular',\n width: undefined,\n },\n parameters: {\n docs: {\n source: {\n code: SkeletonFullExampleSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SkeletonFullExample,\n};\n"]}
|
package/lib/esm/slider/Slider.js
CHANGED
|
@@ -50,7 +50,8 @@ export const Slider = (_a) => {
|
|
|
50
50
|
maxValue,
|
|
51
51
|
minValue,
|
|
52
52
|
numberFormatter: new Intl.NumberFormat('en-US'),
|
|
53
|
-
|
|
53
|
+
// oxlint-disable-next-line no-explicit-any
|
|
54
|
+
onChange: castedOnChange,
|
|
54
55
|
step,
|
|
55
56
|
});
|
|
56
57
|
const { setThumbValue } = state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../src/slider/Slider.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EACL,UAAU,EACV,YAAY,EACZ,SAAS,EACT,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAoB,cAAc,EAAE,MAAM,eAAe,CAAC;AAMjE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAuCrC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAsC,EAgBnB,EAAE,EAAE;QAhBe,EAC1D,E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AAQ;KACT,EACD,KAAK,CACN,CAAC;IAEF,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,YAAY,EAAE,CAAC;IAEtD;;;;;;OAMG;IACH,MAAM,WAAW,GAAG,UAAU,CAC5B,UAAU,EACV,UAAU;IACV,2EAA2E;IAC3E,EAAE,gBAAgB,EAAE,EAAE,EAAE,EACxB,mBAAmB,CACpB,CAAC;IACF,MAAM,KAAK,GACT,WAAW,CAAC,KAAK,KAAK,SAAS,IAAI,WAAW,CAAC,KAAK,KAAK,CAAC;QACxD,CAAC,CAAC,WAAW,CAAC,KAAK;QACnB,CAAC,CAAC,EAAE,CAAC;IAET,OAAO,CACL,MAAC,OAAO,IACN,UAAU,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,EACrC,MAAM,EAAE,UAAU,IAAI,SAAS,EAC/B,SAAS,EAAC,KAAK,EACf,IAAI,EAAC,QAAQ,aAEb,KAAC,OAAO,CAAC,OAAO,IAAC,gBAAgB,kBAC/B,8BACM,UAAU,IACd,SAAS,EAAE,UAAU,CAAC,WAAW,EAAE;wBACjC,WAAW,EAAE,cAAc;wBAC3B,iBAAiB,EAAE,UAAU;qBAC9B,CAAC,YAEF,KAAC,cAAc,cACb,8BAAO,GAAG,EAAE,QAAQ,IAAM,WAAW,EAAI,GAC1B,IACb,GACU,EAClB,KAAC,OAAO,CAAC,OAAO,cAAE,KAAK,GAAmB,IAClC,CACX,CAAC;AACJ,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 React, { useCallback, useEffect } from 'react';\nimport {\n mergeProps,\n useFocusRing,\n useSlider,\n useSliderThumb,\n VisuallyHidden,\n} from 'react-aria';\nimport { type SliderState, useSliderState } from 'react-stately';\n\nimport {\n type HtmlAttributes,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { Tooltip } from '../tooltip';\n\ntype SliderPropsBase = {\n /** Input props of the underlying input element */\n inputProps?: HtmlAttributes<'input'>;\n /** Determines the step size that will be added or removed from the current value when moving the slider button */\n step?: number;\n /** Whether the slider is disabled */\n isDisabled?: boolean;\n /** The minimum value possible to choose */\n minValue?: number;\n /** The maximum value possible to choose */\n maxValue?: number;\n /** Whether to display a tooltip with the current value when the slider is being dragged */\n showValues?: boolean;\n /** Whether to display visual indicators for each step in the slider */\n showSteps?: boolean;\n};\n\ntype SingleSlider = SliderPropsBase & {\n /** Type of the slider */\n type?: 'single';\n /** Current value of the single slider. **Only required when the type is 'single'**. */\n value: number;\n /** Callback function triggered when the slider value(s) changes. The function parameter varies depending on the slider type, for single slider, it is a number and for range slider, it is an array of two numbers. */\n onChange: (value: number) => void;\n};\n\ntype RangeSlider = SliderPropsBase & {\n /** Type of the slider */\n type: 'range';\n /** Current values of the range slider as an array of two numbers `[min, max]`. **Only required when the type is 'range'**.*/\n values: [number, number];\n /** Callback function triggered when the slider value(s) changes. The function parameter varies depending on the slider type, for single slider, it is a number and for range slider, it is an array of two numbers. */\n onChange: (value: [number, number]) => void;\n};\n\ntype SliderProps = SingleSlider | RangeSlider;\n\nexport const Slider = <T extends React.ElementType = 'div'>({\n as,\n inputProps = {},\n className,\n style,\n minValue = 0,\n maxValue = 100,\n isDisabled = false,\n showSteps = false,\n showValues = false,\n step = 1,\n type = 'single',\n onChange,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, SliderProps>) => {\n const trackRef = React.useRef<HTMLDivElement | null>(null);\n\n const castedValue =\n type === 'range'\n ? (restProps as RangeSlider).values\n : (restProps as SingleSlider).value;\n\n const castedOnChange =\n type === 'range'\n ? (onChange as RangeSlider['onChange'])\n : (onChange as SingleSlider['onChange']);\n\n const state = useSliderState<typeof castedValue>({\n defaultValue: castedValue,\n isDisabled,\n maxValue,\n minValue,\n numberFormatter: new Intl.NumberFormat('en-US'),\n onChange: castedOnChange as any, // eslint-disable-line @typescript-eslint/no-explicit-any\n step,\n });\n\n const { setThumbValue } = state;\n\n const { groupProps, trackProps } = useSlider(\n { 'aria-label': 'slider' },\n state,\n trackRef,\n );\n\n const updatesSliderValue = useCallback(\n (newValue: number | [number, number]) => {\n if (type === 'single' && typeof newValue === 'number') {\n setThumbValue(0, newValue);\n } else if (type === 'range' && Array.isArray(newValue)) {\n setThumbValue(0, newValue[0]);\n setThumbValue(1, newValue[1]);\n }\n },\n [type, setThumbValue],\n );\n\n useEffect(() => {\n updatesSliderValue(castedValue);\n // Needed to make the slider work with controlled values\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [castedValue]);\n\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component\n className={classNames('ndl-slider', className)}\n style={style}\n role=\"presentation\"\n ref={ref}\n {...groupProps}\n {...restProps}\n {...htmlAttributes}\n >\n {/* The track element holds the visible track line, the filled track line and the thumb. */}\n <div\n {...trackProps}\n ref={trackRef as React.RefObject<HTMLDivElement>}\n className={classNames('ndl-track', {\n 'ndl-is-disabled': state.isDisabled,\n })}\n >\n {/* Circular marks, acting as indicators for the steps */}\n {showSteps && (\n <TrackMarks state={state} min={minValue} max={maxValue} />\n )}\n <FilledTrack state={state} />\n <Thumb\n index={0}\n state={state}\n trackRef={trackRef as React.RefObject<HTMLDivElement>}\n showValues={showValues}\n inputForwardedProps={inputProps}\n />\n {type === 'range' && (\n <Thumb\n index={1}\n state={state}\n trackRef={trackRef as React.RefObject<HTMLDivElement>}\n showValues={showValues}\n inputForwardedProps={inputProps}\n />\n )}\n </div>\n </Component>\n );\n};\n\nSlider.displayName = 'Slider';\n\nfunction FilledTrack({ state }: { state: SliderState }) {\n let width: number;\n let left: number;\n if (state.values.length === 1) {\n width = state.getValuePercent(state.values[0]) * 100;\n left = 0;\n } else {\n width =\n state.getValuePercent(state.values[1]) * 100 -\n state.getValuePercent(state.values[0]) * 100;\n left = state.getValuePercent(state.values[0]) * 100;\n }\n\n return (\n <div\n className=\"ndl-filled-track\"\n style={{\n left: `${left}%`,\n width: `${width}%`,\n }}\n />\n );\n}\n\nfunction TrackMarks({\n state,\n max,\n min,\n}: {\n state: SliderState;\n max: number;\n min: number;\n}) {\n const markNo = Math.round((max - min) / state.step);\n\n return (\n <div role=\"presentation\" className=\"ndl-track-marks\">\n {Array.from({ length: markNo - 1 }).map((_, index) => {\n const percent = (index / markNo) * 100;\n\n let isFilled;\n if (state.values.length === 1) {\n isFilled = state.getValuePercent(state.values[0]) * 100 > percent;\n } else {\n isFilled =\n state.getValuePercent(state.values[0]) * 100 < percent &&\n state.getValuePercent(state.values[1]) * 100 > percent;\n }\n\n return (\n <div\n key={`track-mark-${index}`}\n className={classNames('ndl-track-mark', {\n 'ndl-on-active-track': isFilled,\n })}\n style={{\n left: `${((index + 1) / markNo) * 100}%`,\n }}\n />\n );\n })}\n </div>\n );\n}\n\nfunction Thumb(props: {\n index: number;\n state: SliderState;\n showValues?: boolean;\n trackRef: React.RefObject<HTMLDivElement>;\n inputForwardedProps: HtmlAttributes<'input'>;\n}) {\n const { state, trackRef, index, inputForwardedProps } = props;\n const inputRef = React.useRef(null);\n const { thumbProps, inputProps, isDragging } = useSliderThumb(\n {\n index,\n inputRef,\n name: 'slider-thumb',\n trackRef,\n },\n state,\n );\n\n const { focusProps, isFocusVisible } = useFocusRing();\n\n /**\n * Solve issue with:\n * Warning: Received NaN for the `value` attribute. If this is expected, cast the value to a string.\n * Receiving NaN for other attributes also, like `max`. Waiting for a fix in react-aria.\n * @see https://github.com/adobe/react-spectrum/issues/5859\n * @see https://github.com/adobe/react-spectrum/pull/5861\n */\n const mergedProps = mergeProps(\n inputProps,\n focusProps,\n // Omitting aria-valuetext double announcements, unless explicitly provided\n { 'aria-valuetext': '' },\n inputForwardedProps,\n );\n const value =\n mergedProps.value !== undefined || mergedProps.value === 0\n ? mergedProps.value\n : '';\n\n return (\n <Tooltip\n isDisabled={props.showValues !== true}\n isOpen={isDragging || undefined}\n placement=\"top\"\n type=\"simple\"\n >\n <Tooltip.Trigger hasButtonWrapper>\n <div\n {...thumbProps}\n className={classNames('ndl-thumb', {\n 'ndl-focus': isFocusVisible,\n 'ndl-is-dragging': isDragging,\n })}\n >\n <VisuallyHidden>\n <input ref={inputRef} {...mergedProps} />\n </VisuallyHidden>\n </div>\n </Tooltip.Trigger>\n <Tooltip.Content>{value}</Tooltip.Content>\n </Tooltip>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../src/slider/Slider.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EACL,UAAU,EACV,YAAY,EACZ,SAAS,EACT,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAoB,cAAc,EAAE,MAAM,eAAe,CAAC;AAMjE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAuCrC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAsC,EAgBnB,EAAE,EAAE;QAhBe,EAC1D,EAAE,EACF,UAAU,GAAG,EAAE,EACf,SAAS,EACT,KAAK,EACL,QAAQ,GAAG,CAAC,EACZ,QAAQ,GAAG,GAAG,EACd,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,IAAI,GAAG,CAAC,EACR,IAAI,GAAG,Q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,EAAE,EAAE,EACxB,mBAAmB,CACpB,CAAC;IACF,MAAM,KAAK,GACT,WAAW,CAAC,KAAK,KAAK,SAAS,IAAI,WAAW,CAAC,KAAK,KAAK,CAAC;QACxD,CAAC,CAAC,WAAW,CAAC,KAAK;QACnB,CAAC,CAAC,EAAE,CAAC;IAET,OAAO,CACL,MAAC,OAAO,IACN,UAAU,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,EACrC,MAAM,EAAE,UAAU,IAAI,SAAS,EAC/B,SAAS,EAAC,KAAK,EACf,IAAI,EAAC,QAAQ,aAEb,KAAC,OAAO,CAAC,OAAO,IAAC,gBAAgB,kBAC/B,8BACM,UAAU,IACd,SAAS,EAAE,UAAU,CAAC,WAAW,EAAE;wBACjC,WAAW,EAAE,cAAc;wBAC3B,iBAAiB,EAAE,UAAU;qBAC9B,CAAC,YAEF,KAAC,cAAc,cACb,8BAAO,GAAG,EAAE,QAAQ,IAAM,WAAW,EAAI,GAC1B,IACb,GACU,EAClB,KAAC,OAAO,CAAC,OAAO,cAAE,KAAK,GAAmB,IAClC,CACX,CAAC;AACJ,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 React, { useCallback, useEffect } from 'react';\nimport {\n mergeProps,\n useFocusRing,\n useSlider,\n useSliderThumb,\n VisuallyHidden,\n} from 'react-aria';\nimport { type SliderState, useSliderState } from 'react-stately';\n\nimport {\n type HtmlAttributes,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { Tooltip } from '../tooltip';\n\ntype SliderPropsBase = {\n /** Input props of the underlying input element */\n inputProps?: HtmlAttributes<'input'>;\n /** Determines the step size that will be added or removed from the current value when moving the slider button */\n step?: number;\n /** Whether the slider is disabled */\n isDisabled?: boolean;\n /** The minimum value possible to choose */\n minValue?: number;\n /** The maximum value possible to choose */\n maxValue?: number;\n /** Whether to display a tooltip with the current value when the slider is being dragged */\n showValues?: boolean;\n /** Whether to display visual indicators for each step in the slider */\n showSteps?: boolean;\n};\n\ntype SingleSlider = SliderPropsBase & {\n /** Type of the slider */\n type?: 'single';\n /** Current value of the single slider. **Only required when the type is 'single'**. */\n value: number;\n /** Callback function triggered when the slider value(s) changes. The function parameter varies depending on the slider type, for single slider, it is a number and for range slider, it is an array of two numbers. */\n onChange: (value: number) => void;\n};\n\ntype RangeSlider = SliderPropsBase & {\n /** Type of the slider */\n type: 'range';\n /** Current values of the range slider as an array of two numbers `[min, max]`. **Only required when the type is 'range'**.*/\n values: [number, number];\n /** Callback function triggered when the slider value(s) changes. The function parameter varies depending on the slider type, for single slider, it is a number and for range slider, it is an array of two numbers. */\n onChange: (value: [number, number]) => void;\n};\n\ntype SliderProps = SingleSlider | RangeSlider;\n\nexport const Slider = <T extends React.ElementType = 'div'>({\n as,\n inputProps = {},\n className,\n style,\n minValue = 0,\n maxValue = 100,\n isDisabled = false,\n showSteps = false,\n showValues = false,\n step = 1,\n type = 'single',\n onChange,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, SliderProps>) => {\n const trackRef = React.useRef<HTMLDivElement | null>(null);\n\n const castedValue =\n type === 'range'\n ? (restProps as RangeSlider).values\n : (restProps as SingleSlider).value;\n\n const castedOnChange =\n type === 'range'\n ? (onChange as RangeSlider['onChange'])\n : (onChange as SingleSlider['onChange']);\n\n const state = useSliderState<typeof castedValue>({\n defaultValue: castedValue,\n isDisabled,\n maxValue,\n minValue,\n numberFormatter: new Intl.NumberFormat('en-US'),\n // oxlint-disable-next-line no-explicit-any\n onChange: castedOnChange as any,\n step,\n });\n\n const { setThumbValue } = state;\n\n const { groupProps, trackProps } = useSlider(\n { 'aria-label': 'slider' },\n state,\n trackRef,\n );\n\n const updatesSliderValue = useCallback(\n (newValue: number | [number, number]) => {\n if (type === 'single' && typeof newValue === 'number') {\n setThumbValue(0, newValue);\n } else if (type === 'range' && Array.isArray(newValue)) {\n setThumbValue(0, newValue[0]);\n setThumbValue(1, newValue[1]);\n }\n },\n [type, setThumbValue],\n );\n\n useEffect(() => {\n updatesSliderValue(castedValue);\n // Needed to make the slider work with controlled values\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [castedValue]);\n\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component\n className={classNames('ndl-slider', className)}\n style={style}\n role=\"presentation\"\n ref={ref}\n {...groupProps}\n {...restProps}\n {...htmlAttributes}\n >\n {/* The track element holds the visible track line, the filled track line and the thumb. */}\n <div\n {...trackProps}\n ref={trackRef as React.RefObject<HTMLDivElement>}\n className={classNames('ndl-track', {\n 'ndl-is-disabled': state.isDisabled,\n })}\n >\n {/* Circular marks, acting as indicators for the steps */}\n {showSteps && (\n <TrackMarks state={state} min={minValue} max={maxValue} />\n )}\n <FilledTrack state={state} />\n <Thumb\n index={0}\n state={state}\n trackRef={trackRef as React.RefObject<HTMLDivElement>}\n showValues={showValues}\n inputForwardedProps={inputProps}\n />\n {type === 'range' && (\n <Thumb\n index={1}\n state={state}\n trackRef={trackRef as React.RefObject<HTMLDivElement>}\n showValues={showValues}\n inputForwardedProps={inputProps}\n />\n )}\n </div>\n </Component>\n );\n};\n\nSlider.displayName = 'Slider';\n\nfunction FilledTrack({ state }: { state: SliderState }) {\n let width: number;\n let left: number;\n if (state.values.length === 1) {\n width = state.getValuePercent(state.values[0]) * 100;\n left = 0;\n } else {\n width =\n state.getValuePercent(state.values[1]) * 100 -\n state.getValuePercent(state.values[0]) * 100;\n left = state.getValuePercent(state.values[0]) * 100;\n }\n\n return (\n <div\n className=\"ndl-filled-track\"\n style={{\n left: `${left}%`,\n width: `${width}%`,\n }}\n />\n );\n}\n\nfunction TrackMarks({\n state,\n max,\n min,\n}: {\n state: SliderState;\n max: number;\n min: number;\n}) {\n const markNo = Math.round((max - min) / state.step);\n\n return (\n <div role=\"presentation\" className=\"ndl-track-marks\">\n {Array.from({ length: markNo - 1 }).map((_, index) => {\n const percent = (index / markNo) * 100;\n\n let isFilled;\n if (state.values.length === 1) {\n isFilled = state.getValuePercent(state.values[0]) * 100 > percent;\n } else {\n isFilled =\n state.getValuePercent(state.values[0]) * 100 < percent &&\n state.getValuePercent(state.values[1]) * 100 > percent;\n }\n\n return (\n <div\n key={`track-mark-${index}`}\n className={classNames('ndl-track-mark', {\n 'ndl-on-active-track': isFilled,\n })}\n style={{\n left: `${((index + 1) / markNo) * 100}%`,\n }}\n />\n );\n })}\n </div>\n );\n}\n\nfunction Thumb(props: {\n index: number;\n state: SliderState;\n showValues?: boolean;\n trackRef: React.RefObject<HTMLDivElement>;\n inputForwardedProps: HtmlAttributes<'input'>;\n}) {\n const { state, trackRef, index, inputForwardedProps } = props;\n const inputRef = React.useRef(null);\n const { thumbProps, inputProps, isDragging } = useSliderThumb(\n {\n index,\n inputRef,\n name: 'slider-thumb',\n trackRef,\n },\n state,\n );\n\n const { focusProps, isFocusVisible } = useFocusRing();\n\n /**\n * Solve issue with:\n * Warning: Received NaN for the `value` attribute. If this is expected, cast the value to a string.\n * Receiving NaN for other attributes also, like `max`. Waiting for a fix in react-aria.\n * @see https://github.com/adobe/react-spectrum/issues/5859\n * @see https://github.com/adobe/react-spectrum/pull/5861\n */\n const mergedProps = mergeProps(\n inputProps,\n focusProps,\n // Omitting aria-valuetext double announcements, unless explicitly provided\n { 'aria-valuetext': '' },\n inputForwardedProps,\n );\n const value =\n mergedProps.value !== undefined || mergedProps.value === 0\n ? mergedProps.value\n : '';\n\n return (\n <Tooltip\n isDisabled={props.showValues !== true}\n isOpen={isDragging || undefined}\n placement=\"top\"\n type=\"simple\"\n >\n <Tooltip.Trigger hasButtonWrapper>\n <div\n {...thumbProps}\n className={classNames('ndl-thumb', {\n 'ndl-focus': isFocusVisible,\n 'ndl-is-dragging': isDragging,\n })}\n >\n <VisuallyHidden>\n <input ref={inputRef} {...mergedProps} />\n </VisuallyHidden>\n </div>\n </Tooltip.Trigger>\n <Tooltip.Content>{value}</Tooltip.Content>\n </Tooltip>\n );\n}\n"]}
|
|
@@ -37,15 +37,15 @@ const componentMeta = {
|
|
|
37
37
|
export default componentMeta;
|
|
38
38
|
export const Variants = {
|
|
39
39
|
args: {},
|
|
40
|
-
render: StatusIndicatorVariants,
|
|
41
40
|
parameters: {
|
|
42
41
|
docs: {
|
|
43
42
|
source: {
|
|
43
|
+
code: StatusIndicatorVariantsSource,
|
|
44
44
|
language: 'tsx',
|
|
45
45
|
type: 'code',
|
|
46
|
-
code: StatusIndicatorVariantsSource,
|
|
47
46
|
},
|
|
48
47
|
},
|
|
49
48
|
},
|
|
49
|
+
render: StatusIndicatorVariants,
|
|
50
50
|
};
|
|
51
51
|
//# sourceMappingURL=status-indicator.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-indicator.stories.js","sourceRoot":"","sources":["../../../../src/status-indicator/stories/status-indicator.stories.tsx"],"names":[],"mappings":";AAuBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,GAAG,CAAC;AAE3E,MAAM,aAAa,GAAiC;IAClD,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,EAAE,EAAE,6BAA6B;IACjC,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,4BAA4B;CACpC,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,
|
|
1
|
+
{"version":3,"file":"status-indicator.stories.js","sourceRoot":"","sources":["../../../../src/status-indicator/stories/status-indicator.stories.tsx"],"names":[],"mappings":";AAuBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,GAAG,CAAC;AAE3E,MAAM,aAAa,GAAiC;IAClD,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,EAAE,EAAE,6BAA6B;IACjC,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,4BAA4B;CACpC,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,6BAA6B;gBACnC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,uBAAuB;CAChC,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 { StatusIndicator } from '../../index';\nimport { StatusIndicatorVariants, StatusIndicatorVariantsSource } from '.';\n\nconst componentMeta: Meta<typeof StatusIndicator> = {\n component: StatusIndicator,\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n id: 'components-status-indicator',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/StatusIndicator',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Variants: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: StatusIndicatorVariantsSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: StatusIndicatorVariants,\n};\n"]}
|
|
@@ -23,21 +23,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
23
23
|
import { Switch } from '../../index';
|
|
24
24
|
import { SwitchControlled, SwitchControlledSrc, SwitchDefault, SwitchDefaultSrc, SwitchDisabled, SwitchDisabledSrc, SwitchFull, SwitchFullSrc, SwitchHasLabelBefore, SwitchHasLabelBeforeSrc, SwitchIndeterminate, SwitchIndeterminateSrc, SwitchNoLabel, SwitchNoLabelSrc, } from '.';
|
|
25
25
|
const componentMeta = {
|
|
26
|
-
title: 'Components/Switch',
|
|
27
|
-
id: 'components-switch',
|
|
28
|
-
component: Switch,
|
|
29
|
-
tags: ['docsPage'],
|
|
30
26
|
argTypes: {
|
|
31
27
|
ref: {
|
|
32
28
|
description: 'Ref to the `input` element',
|
|
33
29
|
},
|
|
34
30
|
},
|
|
35
|
-
|
|
36
|
-
controls: { disable: true },
|
|
37
|
-
},
|
|
31
|
+
component: Switch,
|
|
38
32
|
decorators: [
|
|
39
33
|
(Story) => (_jsx("div", { className: "n-flex n-justify-center", children: _jsx(Story, {}) })),
|
|
40
34
|
],
|
|
35
|
+
id: 'components-switch',
|
|
36
|
+
parameters: {
|
|
37
|
+
controls: { disable: true },
|
|
38
|
+
},
|
|
39
|
+
tags: ['docsPage'],
|
|
40
|
+
title: 'Components/Switch',
|
|
41
41
|
};
|
|
42
42
|
export default componentMeta;
|
|
43
43
|
export const Default = {
|