@neo4j-ndl/react 4.1.4 → 4.1.6
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/CodeBlockWrapper.js +5 -4
- package/lib/cjs/_common/CodeBlockWrapper.js.map +1 -1
- package/lib/cjs/_common/utils.js +4 -2
- package/lib/cjs/_common/utils.js.map +1 -1
- package/lib/cjs/accordion/Accordion.js +9 -6
- package/lib/cjs/accordion/Accordion.js.map +1 -1
- package/lib/cjs/accordion/accordion-types.js.map +1 -1
- package/lib/cjs/accordion/stories/accordion.stories.js +1 -1
- package/lib/cjs/accordion/stories/accordion.stories.js.map +1 -1
- package/lib/cjs/avatar/Avatar.js +1 -1
- package/lib/cjs/avatar/Avatar.js.map +1 -1
- package/lib/cjs/banner/Banner.js +3 -2
- package/lib/cjs/banner/Banner.js.map +1 -1
- package/lib/cjs/banner/stories/banner.stories.js +1 -1
- package/lib/cjs/banner/stories/banner.stories.js.map +1 -1
- package/lib/cjs/box/Box.js +14 -2
- package/lib/cjs/box/Box.js.map +1 -1
- package/lib/cjs/box/stories/box.stories.js +2 -2
- package/lib/cjs/box/stories/box.stories.js.map +1 -1
- package/lib/cjs/breadcrumbs/Breadcrumbs.js +10 -7
- package/lib/cjs/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/cjs/button/stories/button.stories.js +2 -2
- package/lib/cjs/button/stories/button.stories.js.map +1 -1
- package/lib/cjs/checkbox/Checkbox.js +2 -1
- package/lib/cjs/checkbox/Checkbox.js.map +1 -1
- package/lib/cjs/checkbox/stories/checkbox.stories.js +1 -1
- package/lib/cjs/checkbox/stories/checkbox.stories.js.map +1 -1
- package/lib/cjs/clipboard-button/ClipboardButton.js +6 -3
- package/lib/cjs/clipboard-button/ClipboardButton.js.map +1 -1
- package/lib/cjs/color-picker/ColorPicker.js +2 -1
- package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
- package/lib/cjs/data-grid/Components.js +9 -6
- package/lib/cjs/data-grid/Components.js.map +1 -1
- package/lib/cjs/data-grid/DataGrid.js +16 -4
- package/lib/cjs/data-grid/DataGrid.js.map +1 -1
- package/lib/cjs/data-grid/data-grid-nav/data-grid-nav.js +28 -14
- package/lib/cjs/data-grid/data-grid-nav/data-grid-nav.js.map +1 -1
- package/lib/cjs/data-grid/data-grid-nav/helpers.js +2 -1
- package/lib/cjs/data-grid/data-grid-nav/helpers.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-component-overriding.story.js +1 -3
- package/lib/cjs/data-grid/stories/datagrid-component-overriding.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-in-dialog.story.js +2 -1
- package/lib/cjs/data-grid/stories/datagrid-in-dialog.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-keyboard-navigation.story.js +2 -1
- package/lib/cjs/data-grid/stories/datagrid-keyboard-navigation.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js +1 -2
- package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js +13 -10
- package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
- package/lib/cjs/date-picker/DatePicker.js +2 -1
- package/lib/cjs/date-picker/DatePicker.js.map +1 -1
- package/lib/cjs/date-picker/stories/date-picker-range.story.js +1 -1
- package/lib/cjs/date-picker/stories/date-picker-range.story.js.map +1 -1
- package/lib/cjs/date-picker/stories/date-picker.stories.js +1 -1
- package/lib/cjs/date-picker/stories/date-picker.stories.js.map +1 -1
- package/lib/cjs/dialog/Dialog.js +20 -13
- package/lib/cjs/dialog/Dialog.js.map +1 -1
- package/lib/cjs/dialog/dialog-context.js +35 -6
- package/lib/cjs/dialog/dialog-context.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog.stories.js +1 -1
- package/lib/cjs/dialog/stories/dialog.stories.js.map +1 -1
- package/lib/cjs/divider/stories/divider.stories.js +1 -1
- package/lib/cjs/divider/stories/divider.stories.js.map +1 -1
- package/lib/cjs/drawer/Drawer.js +9 -8
- package/lib/cjs/drawer/Drawer.js.map +1 -1
- package/lib/cjs/dropdown-button/DropdownButton.js +14 -2
- package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/cjs/dropzone/Dropzone.js +3 -2
- package/lib/cjs/dropzone/Dropzone.js.map +1 -1
- package/lib/cjs/dropzone/stories/dropzone-csv-files.story.js +1 -3
- package/lib/cjs/dropzone/stories/dropzone-csv-files.story.js.map +1 -1
- package/lib/cjs/dropzone/stories/dropzone-custom-extensions.story.js +1 -3
- package/lib/cjs/dropzone/stories/dropzone-custom-extensions.story.js.map +1 -1
- package/lib/cjs/dropzone/stories/dropzone-default.story.js +1 -3
- package/lib/cjs/dropzone/stories/dropzone-default.story.js.map +1 -1
- package/lib/cjs/dropzone/stories/dropzone-disabled.story.js +1 -3
- package/lib/cjs/dropzone/stories/dropzone-disabled.story.js.map +1 -1
- package/lib/cjs/flex/Flex.js +14 -2
- package/lib/cjs/flex/Flex.js.map +1 -1
- package/lib/cjs/graph-label/GraphLabel.js +18 -4
- package/lib/cjs/graph-label/GraphLabel.js.map +1 -1
- package/lib/cjs/icon-button/stories/icon-button.stories.js +1 -1
- package/lib/cjs/icon-button/stories/icon-button.stories.js.map +1 -1
- package/lib/cjs/icon-button-array/IconButtonArray.js +14 -2
- package/lib/cjs/icon-button-array/IconButtonArray.js.map +1 -1
- package/lib/cjs/icon-button-array/index.js +1 -1
- package/lib/cjs/icon-button-array/index.js.map +1 -1
- package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js +1 -1
- package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
- package/lib/cjs/icons/generated/custom/index.js +4 -2
- package/lib/cjs/icons/generated/custom/index.js.map +1 -1
- package/lib/cjs/icons/wrapIcon.js +1 -1
- package/lib/cjs/icons/wrapIcon.js.map +1 -1
- package/lib/cjs/inline-edit/InlineEdit.js +18 -6
- package/lib/cjs/inline-edit/InlineEdit.js.map +1 -1
- package/lib/cjs/kbd/Kbd.js +5 -3
- package/lib/cjs/kbd/Kbd.js.map +1 -1
- package/lib/cjs/kbd/stories/kbd.stories.js +1 -1
- package/lib/cjs/kbd/stories/kbd.stories.js.map +1 -1
- package/lib/cjs/loading-bar/LoadingBar.js +14 -2
- package/lib/cjs/loading-bar/LoadingBar.js.map +1 -1
- package/lib/cjs/loading-spinner/LoadingSpinner.js +1 -1
- package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/cjs/logo/stories/logo.stories.js +1 -1
- package/lib/cjs/logo/stories/logo.stories.js.map +1 -1
- package/lib/cjs/menu/Menu.js +9 -6
- package/lib/cjs/menu/Menu.js.map +1 -1
- package/lib/cjs/popover/Popover.js +6 -4
- package/lib/cjs/popover/Popover.js.map +1 -1
- package/lib/cjs/popover/stories/popover-custom-offset.story.js +2 -1
- package/lib/cjs/popover/stories/popover-custom-offset.story.js.map +1 -1
- package/lib/cjs/popover/stories/popover-separate-anchor.story.js +1 -1
- package/lib/cjs/popover/stories/popover-separate-anchor.story.js.map +1 -1
- package/lib/cjs/progress-bar/ProgressBar.js +1 -1
- package/lib/cjs/progress-bar/ProgressBar.js.map +1 -1
- package/lib/cjs/radio/Radio.js +2 -1
- package/lib/cjs/radio/Radio.js.map +1 -1
- package/lib/cjs/radio/stories/radio.stories.js +1 -1
- package/lib/cjs/radio/stories/radio.stories.js.map +1 -1
- package/lib/cjs/select/Overrides.js +1 -1
- package/lib/cjs/select/Overrides.js.map +1 -1
- package/lib/cjs/select/Select.js +18 -6
- package/lib/cjs/select/Select.js.map +1 -1
- package/lib/cjs/side-navigation/SideNavigation.js +5 -4
- package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
- package/lib/cjs/skeleton/Skeleton.js +14 -2
- package/lib/cjs/skeleton/Skeleton.js.map +1 -1
- package/lib/cjs/skeleton/stories/skeleton.stories.js +1 -1
- package/lib/cjs/skeleton/stories/skeleton.stories.js.map +1 -1
- package/lib/cjs/spotlight/Spotlight.js +33 -14
- package/lib/cjs/spotlight/Spotlight.js.map +1 -1
- package/lib/cjs/spotlight/SpotlightProvider.js +6 -3
- package/lib/cjs/spotlight/SpotlightProvider.js.map +1 -1
- package/lib/cjs/spotlight/SpotlightTarget.js +14 -2
- package/lib/cjs/spotlight/SpotlightTarget.js.map +1 -1
- package/lib/cjs/spotlight/SpotlightTour.js +1 -1
- package/lib/cjs/spotlight/SpotlightTour.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight.stories.js +1 -1
- package/lib/cjs/spotlight/stories/spotlight.stories.js.map +1 -1
- package/lib/cjs/spotlight/use-indicator.js +2 -1
- package/lib/cjs/spotlight/use-indicator.js.map +1 -1
- package/lib/cjs/status-label/StatusLabel.js +1 -1
- package/lib/cjs/status-label/StatusLabel.js.map +1 -1
- package/lib/cjs/switch/Switch.js +2 -1
- package/lib/cjs/switch/Switch.js.map +1 -1
- package/lib/cjs/switch/stories/switch.stories.js +1 -1
- package/lib/cjs/switch/stories/switch.stories.js.map +1 -1
- package/lib/cjs/tabs/stories/tabs-disabled.story.js +1 -1
- package/lib/cjs/tabs/stories/tabs-disabled.story.js.map +1 -1
- package/lib/cjs/tabs/stories/tabs-fill-variants.story.js +1 -1
- package/lib/cjs/tabs/stories/tabs-fill-variants.story.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/tabs/stories/tabs-sizes.story.js +1 -1
- package/lib/cjs/tabs/stories/tabs-sizes.story.js.map +1 -1
- package/lib/cjs/tabs/use-tabs-scroll-overflow.js +8 -4
- package/lib/cjs/tabs/use-tabs-scroll-overflow.js.map +1 -1
- package/lib/cjs/tag/Tag.js +14 -2
- package/lib/cjs/tag/Tag.js.map +1 -1
- package/lib/cjs/text-area/TextArea.js +14 -2
- package/lib/cjs/text-area/TextArea.js.map +1 -1
- package/lib/cjs/text-area/stories/text-area.stories.js +1 -1
- package/lib/cjs/text-area/stories/text-area.stories.js.map +1 -1
- package/lib/cjs/text-input/TextInput.js +14 -2
- package/lib/cjs/text-input/TextInput.js.map +1 -1
- package/lib/cjs/text-link/TextLink.js +14 -2
- package/lib/cjs/text-link/TextLink.js.map +1 -1
- package/lib/cjs/text-overflow/TextOverflow.js +2 -1
- package/lib/cjs/text-overflow/TextOverflow.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/text-overflow/text-overflow-utils.js +12 -6
- package/lib/cjs/text-overflow/text-overflow-utils.js.map +1 -1
- package/lib/cjs/text-overflow/use-ellipsis-observer.js +2 -1
- package/lib/cjs/text-overflow/use-ellipsis-observer.js.map +1 -1
- package/lib/cjs/text-overflow/use-truncate-with-button.js +4 -2
- package/lib/cjs/text-overflow/use-truncate-with-button.js.map +1 -1
- package/lib/cjs/theme/ThemeProvider.js +2 -1
- package/lib/cjs/theme/ThemeProvider.js.map +1 -1
- package/lib/cjs/time-picker/TimePicker.js +22 -8
- package/lib/cjs/time-picker/TimePicker.js.map +1 -1
- package/lib/cjs/time-picker/stories/time-picker.stories.js +1 -1
- package/lib/cjs/time-picker/stories/time-picker.stories.js.map +1 -1
- package/lib/cjs/timezone-picker/TimeZonePicker.js +8 -4
- package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/cjs/timezone-picker/generate-timezone-options.js +15 -9
- package/lib/cjs/timezone-picker/generate-timezone-options.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker.stories.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker.stories.js.map +1 -1
- package/lib/cjs/toast/Toast.js +11 -6
- package/lib/cjs/toast/Toast.js.map +1 -1
- package/lib/cjs/tooltip/Tooltip.js +35 -15
- package/lib/cjs/tooltip/Tooltip.js.map +1 -1
- package/lib/cjs/tree-view/TreeItemWrapper.js +3 -1
- package/lib/cjs/tree-view/TreeItemWrapper.js.map +1 -1
- package/lib/cjs/tree-view/TreeView.js +2 -1
- package/lib/cjs/tree-view/TreeView.js.map +1 -1
- package/lib/cjs/tree-view/TreeViewItem.js +3 -1
- package/lib/cjs/tree-view/TreeViewItem.js.map +1 -1
- package/lib/cjs/tree-view/TreeViewTextItem.js +1 -2
- package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
- package/lib/cjs/tree-view/TreeViewTrail.js +14 -2
- package/lib/cjs/tree-view/TreeViewTrail.js.map +1 -1
- package/lib/cjs/wizard/Wizard.js +3 -2
- package/lib/cjs/wizard/Wizard.js.map +1 -1
- package/lib/esm/_common/CodeBlockWrapper.js +5 -4
- package/lib/esm/_common/CodeBlockWrapper.js.map +1 -1
- package/lib/esm/_common/utils.js +4 -2
- package/lib/esm/_common/utils.js.map +1 -1
- package/lib/esm/accordion/Accordion.js +9 -6
- package/lib/esm/accordion/Accordion.js.map +1 -1
- package/lib/esm/accordion/accordion-types.js.map +1 -1
- package/lib/esm/accordion/stories/accordion.stories.js +1 -1
- package/lib/esm/accordion/stories/accordion.stories.js.map +1 -1
- package/lib/esm/avatar/Avatar.js +1 -1
- package/lib/esm/avatar/Avatar.js.map +1 -1
- package/lib/esm/banner/Banner.js +3 -2
- package/lib/esm/banner/Banner.js.map +1 -1
- package/lib/esm/banner/stories/banner.stories.js +1 -1
- package/lib/esm/banner/stories/banner.stories.js.map +1 -1
- package/lib/esm/box/Box.js +14 -2
- package/lib/esm/box/Box.js.map +1 -1
- package/lib/esm/box/stories/box.stories.js +2 -2
- package/lib/esm/box/stories/box.stories.js.map +1 -1
- package/lib/esm/breadcrumbs/Breadcrumbs.js +10 -7
- package/lib/esm/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/esm/button/stories/button.stories.js +1 -1
- package/lib/esm/button/stories/button.stories.js.map +1 -1
- package/lib/esm/checkbox/Checkbox.js +2 -1
- package/lib/esm/checkbox/Checkbox.js.map +1 -1
- package/lib/esm/checkbox/stories/checkbox.stories.js +1 -1
- package/lib/esm/checkbox/stories/checkbox.stories.js.map +1 -1
- package/lib/esm/clipboard-button/ClipboardButton.js +6 -3
- package/lib/esm/clipboard-button/ClipboardButton.js.map +1 -1
- package/lib/esm/color-picker/ColorPicker.js +2 -1
- package/lib/esm/color-picker/ColorPicker.js.map +1 -1
- package/lib/esm/data-grid/Components.js +9 -6
- package/lib/esm/data-grid/Components.js.map +1 -1
- package/lib/esm/data-grid/DataGrid.js +16 -4
- package/lib/esm/data-grid/DataGrid.js.map +1 -1
- package/lib/esm/data-grid/data-grid-nav/data-grid-nav.js +28 -14
- package/lib/esm/data-grid/data-grid-nav/data-grid-nav.js.map +1 -1
- package/lib/esm/data-grid/data-grid-nav/helpers.js +2 -1
- package/lib/esm/data-grid/data-grid-nav/helpers.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-component-overriding.story.js +1 -3
- package/lib/esm/data-grid/stories/datagrid-component-overriding.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-in-dialog.story.js +2 -1
- package/lib/esm/data-grid/stories/datagrid-in-dialog.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-keyboard-navigation.story.js +2 -1
- package/lib/esm/data-grid/stories/datagrid-keyboard-navigation.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js +1 -2
- package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js +9 -6
- package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
- package/lib/esm/date-picker/DatePicker.js +2 -1
- package/lib/esm/date-picker/DatePicker.js.map +1 -1
- package/lib/esm/date-picker/stories/date-picker-range.story.js +1 -1
- package/lib/esm/date-picker/stories/date-picker-range.story.js.map +1 -1
- package/lib/esm/date-picker/stories/date-picker.stories.js +1 -1
- package/lib/esm/date-picker/stories/date-picker.stories.js.map +1 -1
- package/lib/esm/dialog/Dialog.js +20 -13
- package/lib/esm/dialog/Dialog.js.map +1 -1
- package/lib/esm/dialog/dialog-context.js +1 -2
- package/lib/esm/dialog/dialog-context.js.map +1 -1
- package/lib/esm/dialog/stories/dialog.stories.js +1 -1
- package/lib/esm/dialog/stories/dialog.stories.js.map +1 -1
- package/lib/esm/divider/stories/divider.stories.js +1 -1
- package/lib/esm/divider/stories/divider.stories.js.map +1 -1
- package/lib/esm/drawer/Drawer.js +9 -8
- package/lib/esm/drawer/Drawer.js.map +1 -1
- package/lib/esm/dropdown-button/DropdownButton.js +14 -2
- package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/esm/dropzone/Dropzone.js +3 -2
- package/lib/esm/dropzone/Dropzone.js.map +1 -1
- package/lib/esm/dropzone/stories/dropzone-csv-files.story.js +1 -3
- package/lib/esm/dropzone/stories/dropzone-csv-files.story.js.map +1 -1
- package/lib/esm/dropzone/stories/dropzone-custom-extensions.story.js +1 -3
- package/lib/esm/dropzone/stories/dropzone-custom-extensions.story.js.map +1 -1
- package/lib/esm/dropzone/stories/dropzone-default.story.js +1 -3
- package/lib/esm/dropzone/stories/dropzone-default.story.js.map +1 -1
- package/lib/esm/dropzone/stories/dropzone-disabled.story.js +1 -3
- package/lib/esm/dropzone/stories/dropzone-disabled.story.js.map +1 -1
- package/lib/esm/flex/Flex.js +14 -2
- package/lib/esm/flex/Flex.js.map +1 -1
- package/lib/esm/graph-label/GraphLabel.js +18 -4
- package/lib/esm/graph-label/GraphLabel.js.map +1 -1
- package/lib/esm/icon-button/stories/icon-button.stories.js +1 -1
- package/lib/esm/icon-button/stories/icon-button.stories.js.map +1 -1
- package/lib/esm/icon-button-array/IconButtonArray.js +14 -2
- package/lib/esm/icon-button-array/IconButtonArray.js.map +1 -1
- package/lib/esm/icon-button-array/index.js +1 -1
- package/lib/esm/icon-button-array/index.js.map +1 -1
- package/lib/esm/icon-button-array/stories/icon-button-array.stories.js +1 -1
- package/lib/esm/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
- package/lib/esm/icons/generated/custom/index.js +1 -0
- package/lib/esm/icons/generated/custom/index.js.map +1 -1
- package/lib/esm/icons/wrapIcon.js +1 -1
- package/lib/esm/icons/wrapIcon.js.map +1 -1
- package/lib/esm/inline-edit/InlineEdit.js +18 -6
- package/lib/esm/inline-edit/InlineEdit.js.map +1 -1
- package/lib/esm/kbd/Kbd.js +5 -3
- package/lib/esm/kbd/Kbd.js.map +1 -1
- package/lib/esm/kbd/stories/kbd.stories.js +1 -1
- package/lib/esm/kbd/stories/kbd.stories.js.map +1 -1
- package/lib/esm/loading-bar/LoadingBar.js +14 -2
- package/lib/esm/loading-bar/LoadingBar.js.map +1 -1
- package/lib/esm/loading-spinner/LoadingSpinner.js +1 -1
- package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/esm/logo/stories/logo.stories.js +1 -1
- package/lib/esm/logo/stories/logo.stories.js.map +1 -1
- package/lib/esm/menu/Menu.js +9 -6
- package/lib/esm/menu/Menu.js.map +1 -1
- package/lib/esm/popover/Popover.js +6 -4
- package/lib/esm/popover/Popover.js.map +1 -1
- package/lib/esm/popover/stories/popover-custom-offset.story.js +2 -1
- package/lib/esm/popover/stories/popover-custom-offset.story.js.map +1 -1
- package/lib/esm/popover/stories/popover-separate-anchor.story.js +1 -1
- package/lib/esm/popover/stories/popover-separate-anchor.story.js.map +1 -1
- package/lib/esm/progress-bar/ProgressBar.js +1 -1
- package/lib/esm/progress-bar/ProgressBar.js.map +1 -1
- package/lib/esm/radio/Radio.js +2 -1
- package/lib/esm/radio/Radio.js.map +1 -1
- package/lib/esm/radio/stories/radio.stories.js +1 -1
- package/lib/esm/radio/stories/radio.stories.js.map +1 -1
- package/lib/esm/select/Overrides.js +1 -1
- package/lib/esm/select/Overrides.js.map +1 -1
- package/lib/esm/select/Select.js +18 -6
- package/lib/esm/select/Select.js.map +1 -1
- package/lib/esm/side-navigation/SideNavigation.js +5 -4
- package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
- package/lib/esm/skeleton/Skeleton.js +14 -2
- package/lib/esm/skeleton/Skeleton.js.map +1 -1
- package/lib/esm/skeleton/stories/skeleton.stories.js +1 -1
- package/lib/esm/skeleton/stories/skeleton.stories.js.map +1 -1
- package/lib/esm/spotlight/Spotlight.js +33 -14
- package/lib/esm/spotlight/Spotlight.js.map +1 -1
- package/lib/esm/spotlight/SpotlightProvider.js +6 -3
- package/lib/esm/spotlight/SpotlightProvider.js.map +1 -1
- package/lib/esm/spotlight/SpotlightTarget.js +14 -2
- package/lib/esm/spotlight/SpotlightTarget.js.map +1 -1
- package/lib/esm/spotlight/SpotlightTour.js +1 -1
- package/lib/esm/spotlight/SpotlightTour.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight.stories.js +1 -1
- package/lib/esm/spotlight/stories/spotlight.stories.js.map +1 -1
- package/lib/esm/spotlight/use-indicator.js +2 -1
- package/lib/esm/spotlight/use-indicator.js.map +1 -1
- package/lib/esm/status-label/StatusLabel.js +1 -1
- package/lib/esm/status-label/StatusLabel.js.map +1 -1
- package/lib/esm/switch/Switch.js +2 -1
- package/lib/esm/switch/Switch.js.map +1 -1
- package/lib/esm/switch/stories/switch.stories.js +1 -1
- package/lib/esm/switch/stories/switch.stories.js.map +1 -1
- package/lib/esm/tabs/stories/tabs-disabled.story.js +1 -1
- package/lib/esm/tabs/stories/tabs-disabled.story.js.map +1 -1
- package/lib/esm/tabs/stories/tabs-fill-variants.story.js +1 -1
- package/lib/esm/tabs/stories/tabs-fill-variants.story.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/tabs/stories/tabs-sizes.story.js +1 -1
- package/lib/esm/tabs/stories/tabs-sizes.story.js.map +1 -1
- package/lib/esm/tabs/use-tabs-scroll-overflow.js +8 -4
- package/lib/esm/tabs/use-tabs-scroll-overflow.js.map +1 -1
- package/lib/esm/tag/Tag.js +14 -2
- package/lib/esm/tag/Tag.js.map +1 -1
- package/lib/esm/text-area/TextArea.js +14 -2
- package/lib/esm/text-area/TextArea.js.map +1 -1
- package/lib/esm/text-area/stories/text-area.stories.js +1 -1
- package/lib/esm/text-area/stories/text-area.stories.js.map +1 -1
- package/lib/esm/text-input/TextInput.js +14 -2
- package/lib/esm/text-input/TextInput.js.map +1 -1
- package/lib/esm/text-link/TextLink.js +14 -2
- package/lib/esm/text-link/TextLink.js.map +1 -1
- package/lib/esm/text-overflow/TextOverflow.js +2 -1
- package/lib/esm/text-overflow/TextOverflow.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/text-overflow/text-overflow-utils.js +12 -6
- package/lib/esm/text-overflow/text-overflow-utils.js.map +1 -1
- package/lib/esm/text-overflow/use-ellipsis-observer.js +2 -1
- package/lib/esm/text-overflow/use-ellipsis-observer.js.map +1 -1
- package/lib/esm/text-overflow/use-truncate-with-button.js +4 -2
- package/lib/esm/text-overflow/use-truncate-with-button.js.map +1 -1
- package/lib/esm/theme/ThemeProvider.js +2 -1
- package/lib/esm/theme/ThemeProvider.js.map +1 -1
- package/lib/esm/time-picker/TimePicker.js +22 -8
- package/lib/esm/time-picker/TimePicker.js.map +1 -1
- package/lib/esm/time-picker/stories/time-picker.stories.js +1 -1
- package/lib/esm/time-picker/stories/time-picker.stories.js.map +1 -1
- package/lib/esm/timezone-picker/TimeZonePicker.js +8 -4
- package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/esm/timezone-picker/generate-timezone-options.js +15 -9
- package/lib/esm/timezone-picker/generate-timezone-options.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker.stories.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker.stories.js.map +1 -1
- package/lib/esm/toast/Toast.js +11 -6
- package/lib/esm/toast/Toast.js.map +1 -1
- package/lib/esm/tooltip/Tooltip.js +35 -15
- package/lib/esm/tooltip/Tooltip.js.map +1 -1
- package/lib/esm/tree-view/TreeItemWrapper.js +3 -1
- package/lib/esm/tree-view/TreeItemWrapper.js.map +1 -1
- package/lib/esm/tree-view/TreeView.js +2 -1
- package/lib/esm/tree-view/TreeView.js.map +1 -1
- package/lib/esm/tree-view/TreeViewItem.js +3 -1
- package/lib/esm/tree-view/TreeViewItem.js.map +1 -1
- package/lib/esm/tree-view/TreeViewTextItem.js +1 -2
- package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
- package/lib/esm/tree-view/TreeViewTrail.js +14 -2
- package/lib/esm/tree-view/TreeViewTrail.js.map +1 -1
- package/lib/esm/wizard/Wizard.js +3 -2
- package/lib/esm/wizard/Wizard.js.map +1 -1
- package/lib/types/_common/CodeBlockWrapper.d.ts +1 -1
- package/lib/types/_common/CodeBlockWrapper.d.ts.map +1 -1
- package/lib/types/_common/utils.d.ts.map +1 -1
- package/lib/types/accordion/Accordion.d.ts +4 -4
- package/lib/types/accordion/Accordion.d.ts.map +1 -1
- package/lib/types/accordion/accordion-types.d.ts +1 -1
- package/lib/types/accordion/accordion-types.d.ts.map +1 -1
- package/lib/types/accordion/stories/accordion.stories.d.ts +4 -4
- package/lib/types/avatar/Avatar.d.ts.map +1 -1
- package/lib/types/banner/Banner.d.ts +1 -1
- package/lib/types/banner/Banner.d.ts.map +1 -1
- package/lib/types/box/Box.d.ts +1 -1
- package/lib/types/box/Box.d.ts.map +1 -1
- package/lib/types/box/stories/box.stories.d.ts +1 -1
- package/lib/types/breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/lib/types/breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/lib/types/breadcrumbs/stories/breadcrumbs.stories.d.ts +3 -3
- package/lib/types/button/stories/button.stories.d.ts +1 -1
- package/lib/types/button/stories/button.stories.d.ts.map +1 -1
- package/lib/types/checkbox/Checkbox.d.ts.map +1 -1
- package/lib/types/clipboard-button/ClipboardButton.d.ts.map +1 -1
- package/lib/types/color-picker/ColorPicker.d.ts.map +1 -1
- package/lib/types/data-grid/Components.d.ts.map +1 -1
- package/lib/types/data-grid/DataGrid.d.ts +23 -23
- package/lib/types/data-grid/DataGrid.d.ts.map +1 -1
- package/lib/types/data-grid/data-grid-nav/data-grid-nav.d.ts.map +1 -1
- package/lib/types/data-grid/data-grid-nav/helpers.d.ts.map +1 -1
- package/lib/types/data-grid/stories/datagrid-component-overriding.story.d.ts.map +1 -1
- package/lib/types/data-grid/stories/datagrid-in-dialog.story.d.ts.map +1 -1
- package/lib/types/data-grid/stories/datagrid-keyboard-navigation.story.d.ts.map +1 -1
- package/lib/types/data-grid/stories/datagrid-kitchen-sink.story.d.ts.map +1 -1
- package/lib/types/data-grid/stories/datagrid-pinned-columns.stories.d.ts +1 -1
- package/lib/types/data-grid/stories/datagrid-placeholder-states.stories.d.ts +1 -1
- package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts +1 -1
- package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts.map +1 -1
- package/lib/types/date-picker/DatePicker.d.ts.map +1 -1
- package/lib/types/date-picker/stories/date-picker-range.story.d.ts.map +1 -1
- package/lib/types/dialog/Dialog.d.ts +6 -6
- package/lib/types/dialog/Dialog.d.ts.map +1 -1
- package/lib/types/dialog/dialog-context.d.ts.map +1 -1
- package/lib/types/drawer/Drawer.d.ts +3 -3
- package/lib/types/drawer/Drawer.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/dropzone/Dropzone.d.ts.map +1 -1
- package/lib/types/flex/Flex.d.ts +1 -1
- package/lib/types/flex/Flex.d.ts.map +1 -1
- package/lib/types/flex/stories/flex.stories.d.ts +1 -1
- package/lib/types/graph-label/GraphLabel.d.ts +1 -1
- package/lib/types/graph-label/GraphLabel.d.ts.map +1 -1
- package/lib/types/icon-button-array/IconButtonArray.d.ts +2 -2
- package/lib/types/icon-button-array/IconButtonArray.d.ts.map +1 -1
- package/lib/types/icon-button-array/index.d.ts +1 -1
- package/lib/types/icon-button-array/index.d.ts.map +1 -1
- package/lib/types/icons/generated/custom/index.d.ts +1 -0
- package/lib/types/icons/generated/custom/index.d.ts.map +1 -1
- package/lib/types/inline-edit/InlineEdit.d.ts +1 -1
- package/lib/types/inline-edit/InlineEdit.d.ts.map +1 -1
- package/lib/types/kbd/Kbd.d.ts.map +1 -1
- package/lib/types/loading-bar/LoadingBar.d.ts +1 -1
- package/lib/types/loading-bar/LoadingBar.d.ts.map +1 -1
- package/lib/types/menu/Menu.d.ts +2 -2
- package/lib/types/menu/Menu.d.ts.map +1 -1
- package/lib/types/popover/Popover.d.ts +1 -1
- package/lib/types/popover/Popover.d.ts.map +1 -1
- package/lib/types/popover/stories/popover-custom-offset.story.d.ts.map +1 -1
- package/lib/types/radio/Radio.d.ts.map +1 -1
- package/lib/types/select/Overrides.d.ts +1 -2
- package/lib/types/select/Overrides.d.ts.map +1 -1
- package/lib/types/select/Select.d.ts +1 -1
- package/lib/types/select/Select.d.ts.map +1 -1
- package/lib/types/side-navigation/SideNavigation.d.ts +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/Skeleton.d.ts +1 -1
- package/lib/types/skeleton/Skeleton.d.ts.map +1 -1
- package/lib/types/skeleton/stories/skeleton.stories.d.ts +1 -1
- package/lib/types/spotlight/Spotlight.d.ts +6 -6
- package/lib/types/spotlight/Spotlight.d.ts.map +1 -1
- package/lib/types/spotlight/SpotlightProvider.d.ts.map +1 -1
- package/lib/types/spotlight/SpotlightTarget.d.ts +1 -1
- package/lib/types/spotlight/SpotlightTarget.d.ts.map +1 -1
- package/lib/types/spotlight/use-indicator.d.ts.map +1 -1
- package/lib/types/switch/Switch.d.ts.map +1 -1
- package/lib/types/tabs/use-tabs-scroll-overflow.d.ts.map +1 -1
- package/lib/types/tag/Tag.d.ts +1 -1
- package/lib/types/tag/Tag.d.ts.map +1 -1
- package/lib/types/text-area/TextArea.d.ts +1 -1
- package/lib/types/text-area/TextArea.d.ts.map +1 -1
- package/lib/types/text-input/TextInput.d.ts +1 -1
- package/lib/types/text-input/TextInput.d.ts.map +1 -1
- package/lib/types/text-link/TextLink.d.ts +1 -1
- package/lib/types/text-link/TextLink.d.ts.map +1 -1
- package/lib/types/text-overflow/TextOverflow.d.ts.map +1 -1
- package/lib/types/text-overflow/text-overflow-utils.d.ts.map +1 -1
- package/lib/types/text-overflow/use-ellipsis-observer.d.ts.map +1 -1
- package/lib/types/text-overflow/use-truncate-with-button.d.ts.map +1 -1
- package/lib/types/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/types/time-picker/TimePicker.d.ts +1 -1
- package/lib/types/time-picker/TimePicker.d.ts.map +1 -1
- package/lib/types/time-picker/stories/time-picker.stories.d.ts +1 -1
- package/lib/types/timezone-picker/TimeZonePicker.d.ts.map +1 -1
- package/lib/types/timezone-picker/generate-timezone-options.d.ts.map +1 -1
- package/lib/types/toast/Toast.d.ts +1 -1
- package/lib/types/toast/Toast.d.ts.map +1 -1
- package/lib/types/tooltip/Tooltip.d.ts +8 -7
- package/lib/types/tooltip/Tooltip.d.ts.map +1 -1
- package/lib/types/tree-view/TreeItemWrapper.d.ts.map +1 -1
- package/lib/types/tree-view/TreeView.d.ts.map +1 -1
- package/lib/types/tree-view/TreeViewItem.d.ts.map +1 -1
- package/lib/types/tree-view/TreeViewTrail.d.ts +2 -1
- package/lib/types/tree-view/TreeViewTrail.d.ts.map +1 -1
- package/lib/types/wizard/Wizard.d.ts +1 -1
- package/lib/types/wizard/Wizard.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/cjs/dropdown-button/avatar-test.stories.tsx.js +0 -31
- package/lib/cjs/dropdown-button/avatar-test.stories.tsx.js.map +0 -1
- package/lib/esm/dropdown-button/avatar-test.stories.tsx.js +0 -27
- package/lib/esm/dropdown-button/avatar-test.stories.tsx.js.map +0 -1
- package/lib/types/dropdown-button/avatar-test.stories.tsx.d.ts +0 -24
- package/lib/types/dropdown-button/avatar-test.stories.tsx.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.stories.js","sourceRoot":"","sources":["../../../../src/icon-button/stories/icon-button.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"icon-button.stories.js","sourceRoot":"","sources":["../../../../src/icon-button/stories/icon-button.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,iBAAiB,GAClB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,UAAU;IACrB,EAAE,EAAE,wBAAwB;IAC5B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,uBAAuB;CACG,CAAC;AAEpC,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,0CAA0C;IAC1C,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,oBAAoB;gBAC1B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,iBAAiB;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAU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BAAkB;aACzB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,0CAA0C;IAC1C,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,cAAc;IACtB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,iBAAiB;aACxB;SACF;KACF;CACF,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 { IconButton } from '..';\nimport {\n IconButtonActive,\n IconButtonActiveSrc,\n IconButtonDefault,\n IconButtonDefaultSrc,\n IconButtonDisabled,\n IconButtonDisabledSrc,\n IconButtonFloating,\n IconButtonFloatingSrc,\n IconButtonLoading,\n IconButtonLoadingSrc,\n IconButtonSizes,\n IconButtonSizesSrc,\n IconButtonTone,\n IconButtonToneSrc,\n} from '.';\n\nconst componentMeta = {\n component: IconButton,\n id: 'components-icon-button',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/IconButton',\n} satisfies Meta<typeof IconButton>;\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n parameters: {\n docs: {\n source: {\n code: IconButtonDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: IconButtonDefault,\n};\n\nexport const Active: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonActive,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonActiveSrc,\n },\n },\n },\n};\n\nexport const Disabled: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonDisabled,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonDisabledSrc,\n },\n },\n },\n};\n\nexport const Floating: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonFloating,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonFloatingSrc,\n },\n },\n },\n};\n\nexport const Loading: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonLoading,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonLoadingSrc,\n },\n },\n },\n};\n\nexport const Sizes: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonSizes,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonSizesSrc,\n },\n },\n },\n};\n\nexport const Tone: Story = {\n // @ts-expect-error - args are not needed.\n args: {},\n render: IconButtonTone,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonToneSrc,\n },\n },\n },\n};\n"]}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
13
|
/**
|
|
3
14
|
*
|
|
@@ -27,7 +38,8 @@ const CollapsibleButtonWrapper = ({ children, }) => {
|
|
|
27
38
|
return _jsx(_Fragment, { children: children });
|
|
28
39
|
};
|
|
29
40
|
CollapsibleButtonWrapper.displayName = 'CollapsibleButtonWrapper';
|
|
30
|
-
export const IconButtonArrayComponent = (
|
|
41
|
+
export const IconButtonArrayComponent = (_a) => {
|
|
42
|
+
var { children, as, isFloating = false, orientation = 'horizontal', size = 'medium', className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "as", "isFloating", "orientation", "size", "className", "style", "htmlAttributes", "ref"]);
|
|
31
43
|
const [isCollapsed, setIsCollapsed] = React.useState(true);
|
|
32
44
|
const classes = classNames('ndl-icon-btn-array', {
|
|
33
45
|
'n-flex-row': orientation === 'horizontal',
|
|
@@ -64,7 +76,7 @@ export const IconButtonArrayComponent = ({ children, as, isFloating = false, ori
|
|
|
64
76
|
}
|
|
65
77
|
return isCollapsed ? _jsx(ChevronDownIconOutline, {}) : _jsx(ChevronUpIconOutline, {});
|
|
66
78
|
};
|
|
67
|
-
return (_jsxs(Component, Object.assign({ role: "group", className: classes, ref: ref, style: style }, htmlAttributes, { children: [fixedButtonsWithProps, collapsibleButtonsWithProps && (_jsxs(_Fragment, { children: [!isCollapsed && collapsibleButtonsWithProps, _jsx(CleanIconButton, { className: "ndl-grouped", onClick: () => {
|
|
79
|
+
return (_jsxs(Component, Object.assign({ role: "group", className: classes, ref: ref, style: style }, restProps, htmlAttributes, { children: [fixedButtonsWithProps, collapsibleButtonsWithProps && (_jsxs(_Fragment, { children: [!isCollapsed && collapsibleButtonsWithProps, _jsx(CleanIconButton, { className: "ndl-grouped", onClick: () => {
|
|
68
80
|
setIsCollapsed((prev) => !prev);
|
|
69
81
|
}, size: size, description: isCollapsed ? 'Show more' : 'Show less', tooltipProps: {
|
|
70
82
|
root: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButtonArray.js","sourceRoot":"","sources":["../../../src/icon-button-array/IconButtonArray.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconButtonArray.js","sourceRoot":"","sources":["../../../src/icon-button-array/IconButtonArray.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAyBlB,MAAM,wBAAwB,GAA4C,CAAC,EACzE,QAAQ,GACT,EAAE,EAAE;IACH,OAAO,4BAAG,QAAQ,GAAI,CAAC;AACzB,CAAC,CAAC;AACF,wBAAwB,CAAC,WAAW,GAAG,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAsC,EAW5B,EAAE,EAAE;QAXwB,EAC5E,QAAQ,EACR,EAAE,EACF,UAAU,GAAG,KAAK,EAClB,WAAW,GAAG,YAAY,EAC1B,IAAI,GAAG,QAAQ,EACf,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAE6C,EAD7C,SAAS,cAVgE,sGAW7E,CADa;IAEZ,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE3D,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,EAAE;QAC/C,YAAY,EAAE,WAAW,KAAK,YAAY;QAC1C,YAAY,EAAE,WAAW,KAAK,UAAU;QACxC,oBAAoB,EAAE,UAAU;QAChC,CAAC,OA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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 from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport {\n ChevronDownIconOutline,\n ChevronLeftIconOutline,\n ChevronRightIconOutline,\n ChevronUpIconOutline,\n} from '../icons';\n\n/**\n * Types\n */\ntype IconButtonArrayProps = {\n /** Content displayed in the icon button array */\n children: React.ReactNode;\n /** Orientation of the icon button array */\n orientation?: 'vertical' | 'horizontal';\n /** Whether the icon button array is floating */\n isFloating?: boolean;\n /** Size of the icon button array */\n size?: 'small' | 'medium' | 'large';\n /** Additional class name*/\n className?: string;\n};\n\ntype CollapsibleButtonWrapperProps = {\n /** Icon buttons to be displayed in the collapsible button wrapper */\n children:\n | React.ReactElement<React.ComponentProps<typeof CleanIconButton>>\n | React.ReactElement<React.ComponentProps<typeof CleanIconButton>>[];\n};\n\nconst CollapsibleButtonWrapper: React.FC<CollapsibleButtonWrapperProps> = ({\n children,\n}) => {\n return <>{children}</>;\n};\nCollapsibleButtonWrapper.displayName = 'CollapsibleButtonWrapper';\n\nexport const IconButtonArrayComponent = <T extends React.ElementType = 'div'>({\n children,\n as,\n isFloating = false,\n orientation = 'horizontal',\n size = 'medium',\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, IconButtonArrayProps>) => {\n const [isCollapsed, setIsCollapsed] = React.useState(true);\n\n const classes = classNames('ndl-icon-btn-array', {\n 'n-flex-row': orientation === 'horizontal',\n 'n-flex-col': orientation === 'vertical',\n 'ndl-array-floating': isFloating,\n [`ndl-${size}`]: size,\n [className!]: className,\n });\n\n const Component: React.ElementType = as || 'div';\n\n const applySizeProp = (child: React.ReactElement) => {\n if (\n React.isValidElement<React.ComponentProps<typeof CleanIconButton>>(\n child,\n ) &&\n child.type === CleanIconButton\n ) {\n return React.cloneElement(child, {\n className: classNames(child.props.className, 'ndl-grouped'),\n size: child.props.size || size,\n });\n }\n return child;\n };\n\n const childrenArray = React.Children.toArray(\n children,\n ) as React.ReactElement[];\n\n const fixedButtons = childrenArray.filter(\n (child) =>\n !React.isValidElement(child) ||\n (child.type as React.ComponentType).displayName !==\n 'CollapsibleButtonWrapper',\n );\n\n const fixedButtonsWithProps = React.Children.map(fixedButtons, applySizeProp);\n\n const collapsibleButtonWrapper = childrenArray.find(\n (child) =>\n React.isValidElement(child) &&\n (child.type as React.ComponentType).displayName ===\n 'CollapsibleButtonWrapper',\n );\n\n const collapsibleButtonsWithProps = collapsibleButtonWrapper\n ? React.Children.map(\n (\n collapsibleButtonWrapper as React.ReactElement<CollapsibleButtonWrapperProps>\n ).props.children,\n applySizeProp,\n )\n : null;\n\n const renderChevronIcon = () => {\n if (orientation === 'horizontal') {\n return isCollapsed ? (\n <ChevronRightIconOutline />\n ) : (\n <ChevronLeftIconOutline />\n );\n }\n return isCollapsed ? <ChevronDownIconOutline /> : <ChevronUpIconOutline />;\n };\n\n return (\n <Component\n role=\"group\"\n className={classes}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n {fixedButtonsWithProps}\n {collapsibleButtonsWithProps && (\n <>\n {!isCollapsed && collapsibleButtonsWithProps}\n <CleanIconButton\n className=\"ndl-grouped\"\n onClick={() => {\n setIsCollapsed((prev) => !prev);\n }}\n size={size}\n description={isCollapsed ? 'Show more' : 'Show less'}\n tooltipProps={{\n root: {\n shouldCloseOnReferenceClick: true,\n },\n }}\n htmlAttributes={{\n 'aria-expanded': !isCollapsed,\n }}\n >\n {renderChevronIcon()}\n </CleanIconButton>\n </>\n )}\n </Component>\n );\n};\n\nconst IconButtonArray = Object.assign(IconButtonArrayComponent, {\n CollapsibleButtonWrapper: CollapsibleButtonWrapper,\n});\n\nexport { IconButtonArray };\n"]}
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
export * from '
|
|
21
|
+
export * from './IconButtonArray';
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icon-button-array/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icon-button-array/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,mBAAmB,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\nexport * from './IconButtonArray';\n"]}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
import { IconButtonArray } from '../../index';
|
|
24
|
-
import { IconButtonArrayCollapsible, IconButtonArrayCollapsibleSrc, IconButtonArrayFloating, IconButtonArrayFloatingSrc, IconButtonArrayHorizontal, IconButtonArrayHorizontalSrc, IconButtonArraySizes, IconButtonArraySizesSrc, IconButtonArrayVertical, IconButtonArrayVerticalSrc, } from '
|
|
24
|
+
import { IconButtonArrayCollapsible, IconButtonArrayCollapsibleSrc, IconButtonArrayFloating, IconButtonArrayFloatingSrc, IconButtonArrayHorizontal, IconButtonArrayHorizontalSrc, IconButtonArraySizes, IconButtonArraySizesSrc, IconButtonArrayVertical, IconButtonArrayVerticalSrc, } from '.';
|
|
25
25
|
const componentMeta = {
|
|
26
26
|
title: 'Components/IconButtonArray',
|
|
27
27
|
id: 'components-buttons-icon-array',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button-array.stories.js","sourceRoot":"","sources":["../../../../src/icon-button-array/stories/icon-button-array.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,0BAA0B,EAC1B,yBAAyB,EACzB,4BAA4B,EAC5B,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,
|
|
1
|
+
{"version":3,"file":"icon-button-array.stories.js","sourceRoot":"","sources":["../../../../src/icon-button-array/stories/icon-button-array.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,0BAA0B,EAC1B,yBAAyB,EACzB,4BAA4B,EAC5B,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAiC;IAClD,KAAK,EAAE,4BAA4B;IACnC,EAAE,EAAE,+BAA+B;IACnC,SAAS,EAAE,eAAe;IAC1B,IAAI,E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EF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,oBAAoB;IAC5B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,uBAAuB;aAC9B;SACF;KACF;CACF,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 { IconButtonArray } from '../../index';\nimport {\n IconButtonArrayCollapsible,\n IconButtonArrayCollapsibleSrc,\n IconButtonArrayFloating,\n IconButtonArrayFloatingSrc,\n IconButtonArrayHorizontal,\n IconButtonArrayHorizontalSrc,\n IconButtonArraySizes,\n IconButtonArraySizesSrc,\n IconButtonArrayVertical,\n IconButtonArrayVerticalSrc,\n} from '.';\n\nconst componentMeta: Meta<typeof IconButtonArray> = {\n title: 'Components/IconButtonArray',\n id: 'components-buttons-icon-array',\n component: IconButtonArray,\n tags: ['docsPage'],\n parameters: {\n controls: { disable: true },\n },\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Horizontal: Story = {\n args: {},\n render: IconButtonArrayHorizontal,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArrayHorizontalSrc,\n },\n },\n },\n};\n\nexport const Vertical: Story = {\n args: {},\n render: IconButtonArrayVertical,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArrayVerticalSrc,\n },\n },\n },\n};\n\nexport const Floating: Story = {\n args: {},\n render: IconButtonArrayFloating,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArrayFloatingSrc,\n },\n },\n },\n};\n\nexport const Collapsiable: Story = {\n args: {},\n render: IconButtonArrayCollapsible,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArrayCollapsibleSrc,\n },\n },\n },\n};\n\nexport const Sizes: Story = {\n args: {},\n render: IconButtonArraySizes,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: IconButtonArraySizesSrc,\n },\n },\n },\n};\n"]}
|
|
@@ -39,6 +39,7 @@ export { default as DatabasePlugIcon } from './DatabasePlug';
|
|
|
39
39
|
export { default as DatabasePlusIcon } from './DatabasePlus';
|
|
40
40
|
export { default as DatabaseSignalIcon } from './DatabaseSignal';
|
|
41
41
|
export { default as DeploymentsIcon } from './Deployments';
|
|
42
|
+
export { default as DesktopSave } from './DesktopSave';
|
|
42
43
|
export { default as DividerSquareDashIcon } from './DividerSquareDash';
|
|
43
44
|
export { default as DocumentRefreshIcon } from './DocumentRefresh';
|
|
44
45
|
export { default as DragIcon } from './Drag';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/icons/generated/custom/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,uCAAuC;AACvC,wBAAwB;AACxB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,eAAe,EA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,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kBAAkB,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\n// THIS FILE IS GENERATED BY BUILD TOOL\n// DO NOT EDIT IT MANUAL\nexport { default as AddNodeIcon } from './AddNode';\nexport { default as AlignBottomIcon } from './AlignBottom';\nexport { default as AlignCenterIcon } from './AlignCenter';\nexport { default as AlignTopIcon } from './AlignTop';\nexport { default as AppGalleryIcon } from './AppGallery';\nexport { default as BoldIcon } from './Bold';\nexport { default as BooleanIcon } from './Boolean';\nexport { default as CircleIcon } from './Circle';\nexport { default as CloudCheckIcon } from './CloudCheck';\nexport { default as CloudCrossIcon } from './CloudCross';\nexport { default as ConfigureIcon } from './Configure';\nexport { default as CurlyBracketsIcon } from './CurlyBrackets';\nexport { default as DataGridCrossIcon } from './DataGridCross';\nexport { default as DataScienceIcon } from './DataScience';\nexport { default as DatabaseCrossIcon } from './DatabaseCross';\nexport { default as DatabasePlugIcon } from './DatabasePlug';\nexport { default as DatabasePlusIcon } from './DatabasePlus';\nexport { default as DatabaseSignalIcon } from './DatabaseSignal';\nexport { default as DeploymentsIcon } from './Deployments';\nexport { default as DividerSquareDashIcon } from './DividerSquareDash';\nexport { default as DocumentRefreshIcon } from './DocumentRefresh';\nexport { default as DragIcon } from './Drag';\nexport { default as ExpandIcon } from './Expand';\nexport { default as ExploreIcon } from './Explore';\nexport { default as ExternalLinkIcon } from './ExternalLink';\nexport { default as FitToScreenIcon } from './FitToScreen';\nexport { default as FloppyDiskIcon } from './FloppyDisk';\nexport { default as FolderBookmarkIcon } from './FolderBookmark';\nexport { default as FontSizeIcon } from './FontSize';\nexport { default as GithubIcon } from './Github';\nexport { default as GlobePinIcon } from './GlobePin';\nexport { default as GraphCrossIcon } from './GraphCross';\nexport { default as HandIcon } from './Hand';\nexport { default as HeadsetIcon } from './Headset';\nexport { default as HeartbeatIcon } from './Heartbeat';\nexport { default as HierarchyOneIcon } from './HierarchyOne';\nexport { default as HierarchyTwoIcon } from './HierarchyTwo';\nexport { default as HorizontalBarIcon } from './HorizontalBar';\nexport { default as ItalicIcon } from './Italic';\nexport { default as LassoIcon } from './Lasso';\nexport { default as ListCheckIcon } from './ListCheck';\nexport { default as ListNumberIcon } from './ListNumber';\nexport { default as LocationTargetIcon } from './LocationTarget';\nexport { default as MagnifyingGlassResetIcon } from './MagnifyingGlassReset';\nexport { default as MarkdownIcon } from './Markdown';\nexport { default as MemoryCardIcon } from './MemoryCard';\nexport { default as MenuArrowLeftIcon } from './MenuArrowLeft';\nexport { default as MenuArrowRightIcon } from './MenuArrowRight';\nexport { default as Neo4JAiNeutralIcon } from './Neo4JAiNeutral';\nexport { default as Neo4JIconBlackIcon } from './Neo4JIconBlack';\nexport { default as Neo4JIconColorIcon } from './Neo4JIconColor';\nexport { default as Neo4JIconWhiteIcon } from './Neo4JIconWhite';\nexport { default as Neo4JLogoBlackIcon } from './Neo4JLogoBlack';\nexport { default as Neo4JLogoColorIcon } from './Neo4JLogoColor';\nexport { default as Neo4JLogoWhiteIcon } from './Neo4JLogoWhite';\nexport { default as NomLevelIcon } from './NomLevel';\nexport { default as PanelBottomIcon } from './PanelBottom';\nexport { default as PanelLeftIcon } from './PanelLeft';\nexport { default as PanelRightIcon } from './PanelRight';\nexport { default as PinIcon } from './Pin';\nexport { default as PlanViewIcon } from './PlanView';\nexport { default as PresentationIcon } from './Presentation';\nexport { default as QueryIcon } from './Query';\nexport { default as QuoteIcon } from './Quote';\nexport { default as ResizeCornerIcon } from './ResizeCorner';\nexport { default as RhombusIcon } from './Rhombus';\nexport { default as RotateIcon } from './Rotate';\nexport { default as SelectIcon } from './Select';\nexport { default as ShrinkIcon } from './Shrink';\nexport { default as SingleValueIcon } from './SingleValue';\nexport { default as SquareDashIcon } from './SquareDash';\nexport { default as SquareIcon } from './Square';\nexport { default as TextIcon } from './Text';\nexport { default as ThreePanelIcon } from './ThreePanel';\nexport { default as TriangleIcon } from './Triangle';\nexport { default as UnderlineIcon } from './Underline';\nexport { default as UserShieldIcon } from './UserShield';\nexport { default as VerticalBarIcon } from './VerticalBar';\nexport { default as VisualizeBloomIcon } from './VisualizeBloom';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/icons/generated/custom/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,uCAAuC;AACvC,wBAAwB;AACxB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM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,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kBAAkB,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\n// THIS FILE IS GENERATED BY BUILD TOOL\n// DO NOT EDIT IT MANUAL\nexport { default as AddNodeIcon } from './AddNode';\nexport { default as AlignBottomIcon } from './AlignBottom';\nexport { default as AlignCenterIcon } from './AlignCenter';\nexport { default as AlignTopIcon } from './AlignTop';\nexport { default as AppGalleryIcon } from './AppGallery';\nexport { default as BoldIcon } from './Bold';\nexport { default as BooleanIcon } from './Boolean';\nexport { default as CircleIcon } from './Circle';\nexport { default as CloudCheckIcon } from './CloudCheck';\nexport { default as CloudCrossIcon } from './CloudCross';\nexport { default as ConfigureIcon } from './Configure';\nexport { default as CurlyBracketsIcon } from './CurlyBrackets';\nexport { default as DataGridCrossIcon } from './DataGridCross';\nexport { default as DataScienceIcon } from './DataScience';\nexport { default as DatabaseCrossIcon } from './DatabaseCross';\nexport { default as DatabasePlugIcon } from './DatabasePlug';\nexport { default as DatabasePlusIcon } from './DatabasePlus';\nexport { default as DatabaseSignalIcon } from './DatabaseSignal';\nexport { default as DeploymentsIcon } from './Deployments';\nexport {default as DesktopSave} from './DesktopSave'\nexport { default as DividerSquareDashIcon } from './DividerSquareDash';\nexport { default as DocumentRefreshIcon } from './DocumentRefresh';\nexport { default as DragIcon } from './Drag';\nexport { default as ExpandIcon } from './Expand';\nexport { default as ExploreIcon } from './Explore';\nexport { default as ExternalLinkIcon } from './ExternalLink';\nexport { default as FitToScreenIcon } from './FitToScreen';\nexport { default as FloppyDiskIcon } from './FloppyDisk';\nexport { default as FolderBookmarkIcon } from './FolderBookmark';\nexport { default as FontSizeIcon } from './FontSize';\nexport { default as GithubIcon } from './Github';\nexport { default as GlobePinIcon } from './GlobePin';\nexport { default as GraphCrossIcon } from './GraphCross';\nexport { default as HandIcon } from './Hand';\nexport { default as HeadsetIcon } from './Headset';\nexport { default as HeartbeatIcon } from './Heartbeat';\nexport { default as HierarchyOneIcon } from './HierarchyOne';\nexport { default as HierarchyTwoIcon } from './HierarchyTwo';\nexport { default as HorizontalBarIcon } from './HorizontalBar';\nexport { default as ItalicIcon } from './Italic';\nexport { default as LassoIcon } from './Lasso';\nexport { default as ListCheckIcon } from './ListCheck';\nexport { default as ListNumberIcon } from './ListNumber';\nexport { default as LocationTargetIcon } from './LocationTarget';\nexport { default as MagnifyingGlassResetIcon } from './MagnifyingGlassReset';\nexport { default as MarkdownIcon } from './Markdown';\nexport { default as MemoryCardIcon } from './MemoryCard';\nexport { default as MenuArrowLeftIcon } from './MenuArrowLeft';\nexport { default as MenuArrowRightIcon } from './MenuArrowRight';\nexport { default as Neo4JAiNeutralIcon } from './Neo4JAiNeutral';\nexport { default as Neo4JIconBlackIcon } from './Neo4JIconBlack';\nexport { default as Neo4JIconColorIcon } from './Neo4JIconColor';\nexport { default as Neo4JIconWhiteIcon } from './Neo4JIconWhite';\nexport { default as Neo4JLogoBlackIcon } from './Neo4JLogoBlack';\nexport { default as Neo4JLogoColorIcon } from './Neo4JLogoColor';\nexport { default as Neo4JLogoWhiteIcon } from './Neo4JLogoWhite';\nexport { default as NomLevelIcon } from './NomLevel';\nexport { default as PanelBottomIcon } from './PanelBottom';\nexport { default as PanelLeftIcon } from './PanelLeft';\nexport { default as PanelRightIcon } from './PanelRight';\nexport { default as PinIcon } from './Pin';\nexport { default as PlanViewIcon } from './PlanView';\nexport { default as PresentationIcon } from './Presentation';\nexport { default as QueryIcon } from './Query';\nexport { default as QuoteIcon } from './Quote';\nexport { default as ResizeCornerIcon } from './ResizeCorner';\nexport { default as RhombusIcon } from './Rhombus';\nexport { default as RotateIcon } from './Rotate';\nexport { default as SelectIcon } from './Select';\nexport { default as ShrinkIcon } from './Shrink';\nexport { default as SingleValueIcon } from './SingleValue';\nexport { default as SquareDashIcon } from './SquareDash';\nexport { default as SquareIcon } from './Square';\nexport { default as TextIcon } from './Text';\nexport { default as ThreePanelIcon } from './ThreePanel';\nexport { default as TriangleIcon } from './Triangle';\nexport { default as UnderlineIcon } from './Underline';\nexport { default as UserShieldIcon } from './UserShield';\nexport { default as VerticalBarIcon } from './VerticalBar';\nexport { default as VisualizeBloomIcon } from './VisualizeBloom';\n"]}
|
|
@@ -45,7 +45,7 @@ export function wrapIcon(Original) {
|
|
|
45
45
|
;
|
|
46
46
|
return (
|
|
47
47
|
// @ts-expect-error – Original is of any type and we don't know what props it accepts
|
|
48
|
-
_jsx(Original, Object.assign({ strokeWidth: 1.5, style: style, className: `${ICON_CLASSNAME} ${className}`.trim() },
|
|
48
|
+
_jsx(Original, Object.assign({ strokeWidth: 1.5, style: style, className: `${ICON_CLASSNAME} ${className}`.trim() }, restProps, htmlAttributes, { ref: ref })));
|
|
49
49
|
};
|
|
50
50
|
return React.memo(Wrapped);
|
|
51
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapIcon.js","sourceRoot":"","sources":["../../../src/icons/wrapIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,cAAc,GAAG,cAAc,CAAC;AAEtC,MAAM,UAAU,QAAQ,CAA8B,QAAW;IAC/D,MAAM,OAAO,GAAG,CAAC,EAOI,EAAE,EAAE;YAPR,EACf,SAAS,GAAG,EAAE,EACd,KAAK,EACL,GAAG,EACH,cAAc,OAGK,EAFhB,SAAS,cALG,+CAOhB,CAFa;QACZ,mEAAmE;;QAC3C,OAAA;QACxB,qFAAqF;QACrF,KAAC,QAAQ,kBACP,WAAW,EAAE,GAAG,EAChB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,GAAG,cAAc,IAAI,SAAS,EAAE,CAAC,IAAI,EAAE,IAC9C,
|
|
1
|
+
{"version":3,"file":"wrapIcon.js","sourceRoot":"","sources":["../../../src/icons/wrapIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,cAAc,GAAG,cAAc,CAAC;AAEtC,MAAM,UAAU,QAAQ,CAA8B,QAAW;IAC/D,MAAM,OAAO,GAAG,CAAC,EAOI,EAAE,EAAE;YAPR,EACf,SAAS,GAAG,EAAE,EACd,KAAK,EACL,GAAG,EACH,cAAc,OAGK,EAFhB,SAAS,cALG,+CAOhB,CAFa;QACZ,mEAAmE;;QAC3C,OAAA;QACxB,qFAAqF;QACrF,KAAC,QAAQ,kBACP,WAAW,EAAE,GAAG,EAChB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,GAAG,cAAc,IAAI,SAAS,EAAE,CAAC,IAAI,EAAE,IAC9C,SAAS,EACT,cAAc,IAClB,GAAG,EAAE,GAAG,IACR,CACH,CAAA;KAAA,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC7B,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\n/**\n * Utility to add common Neo4j-Design styles / behaviour to any HeroIcon.\n *\n * This wrapper is kept in a single place so that the generated icon files\n * can stay **tiny** and tree-shakeable.\n */\nimport React from 'react';\n\nimport type { CommonProps } from '../_common/types';\n\nconst ICON_CLASSNAME = 'ndl-icon-svg';\n\nexport function wrapIcon<T extends React.ElementType>(Original: T) {\n const Wrapped = ({\n className = '',\n style,\n ref,\n htmlAttributes,\n ...restProps\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n }: CommonProps<T, {}>) => (\n // @ts-expect-error – Original is of any type and we don't know what props it accepts\n <Original\n strokeWidth={1.5}\n style={style}\n className={`${ICON_CLASSNAME} ${className}`.trim()}\n {...restProps}\n {...htmlAttributes}\n ref={ref}\n />\n );\n\n return React.memo(Wrapped);\n}\n"]}
|
|
@@ -7,6 +7,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
+
var t = {};
|
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
+
t[p] = s[p];
|
|
14
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
+
t[p[i]] = s[p[i]];
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
10
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
22
|
/**
|
|
12
23
|
*
|
|
@@ -39,13 +50,14 @@ import { Typography } from '../typography';
|
|
|
39
50
|
import { getIconStyle, getMinHeight } from './utils';
|
|
40
51
|
// The input should not be less than this (it does shrink if container is smaller though).
|
|
41
52
|
const MINIMUM_WIDTH = 320;
|
|
42
|
-
export const InlineEdit = (
|
|
43
|
-
var
|
|
53
|
+
export const InlineEdit = (_a) => {
|
|
54
|
+
var _b;
|
|
55
|
+
var { as, className, defaultValue, htmlAttributes, label, onChange, onCancel, onConfirm, ref, style, value, hasEditIcon = false, inputProps, isDisabled = false, isEditing, blurBehavior = 'confirm', isFluid = false, typographyVariant = 'subheading-medium', placeholder } = _a, restProps = __rest(_a, ["as", "className", "defaultValue", "htmlAttributes", "label", "onChange", "onCancel", "onConfirm", "ref", "style", "value", "hasEditIcon", "inputProps", "isDisabled", "isEditing", "blurBehavior", "isFluid", "typographyVariant", "placeholder"]);
|
|
44
56
|
const [hasEditMode, setEditMode] = useState(false);
|
|
45
57
|
const [currentValue, setCurrentValue] = useSemicontrolledState({
|
|
46
58
|
isControlled: value !== undefined,
|
|
47
59
|
onChange,
|
|
48
|
-
state: (
|
|
60
|
+
state: (_b = value !== null && value !== void 0 ? value : defaultValue) !== null && _b !== void 0 ? _b : '',
|
|
49
61
|
});
|
|
50
62
|
const [previousConfirmedValue, setPreviousConfirmedValue] = useState(currentValue);
|
|
51
63
|
const mirrorRef = useRef(null);
|
|
@@ -147,10 +159,10 @@ export const InlineEdit = ({ as, className, defaultValue, htmlAttributes, label,
|
|
|
147
159
|
updateInputWidth();
|
|
148
160
|
}, [updateInputWidth, isInEditMode, currentValue]);
|
|
149
161
|
const displayText = currentValue || placeholder;
|
|
150
|
-
return (_jsxs(Typography, { as: as !== null && as !== void 0 ? as : 'div', variant: typographyVariant, className: classNames('ndl-inline-edit', className, {
|
|
162
|
+
return (_jsxs(Typography, Object.assign({ as: as !== null && as !== void 0 ? as : 'div', variant: typographyVariant, className: classNames('ndl-inline-edit', className, {
|
|
151
163
|
'ndl-disabled': isDisabled,
|
|
152
164
|
'ndl-fluid': isFluid,
|
|
153
|
-
}), style: style, ref: ref, htmlAttributes: htmlAttributes, children: [Boolean(label) && _jsx("label", { htmlFor: inputID, children: label }), isInEditMode === true ? (_jsxs("div", Object.assign({ className: "ndl-inline-edit-container", ref: containerRef }, focusWithinProps, { children: [_jsx("span", { "aria-hidden": true, className: "ndl-inline-edit-mirror", ref: mirrorRef, children: displayText }), _jsx("input", Object.assign({}, inputProps, {
|
|
165
|
+
}), style: style, ref: ref, htmlAttributes: htmlAttributes }, restProps, { children: [Boolean(label) && _jsx("label", { htmlFor: inputID, children: label }), isInEditMode === true ? (_jsxs("div", Object.assign({ className: "ndl-inline-edit-container", ref: containerRef }, focusWithinProps, { children: [_jsx("span", { "aria-hidden": true, className: "ndl-inline-edit-mirror", ref: mirrorRef, children: displayText }), _jsx("input", Object.assign({}, inputProps, {
|
|
154
166
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
155
167
|
autoFocus: true, "aria-label": typeof label === 'string' ? label : 'Inline edit input', className: classNames('ndl-inline-edit-input', inputProps === null || inputProps === void 0 ? void 0 : inputProps.className), id: inputID, value: currentValue, onChange: handleInputChange, onKeyDown: handleKeyDown, placeholder: placeholder })), _jsxs("div", { className: "ndl-inline-edit-buttons", children: [_jsx(IconButton, { description: "Accept", tooltipProps: {
|
|
156
168
|
root: { placement: 'bottom' },
|
|
@@ -170,6 +182,6 @@ export const InlineEdit = ({ as, className, defaultValue, htmlAttributes, label,
|
|
|
170
182
|
'ndl-has-edit-icon': hasEditIcon,
|
|
171
183
|
}), "aria-disabled": isDisabled, disabled: isDisabled, onClick: handleEditClick, style: {
|
|
172
184
|
minHeight: getMinHeight(typographyVariant),
|
|
173
|
-
}, children: [_jsx("span", { className: "ndl-inline-edit-text", children: displayText }), hasEditIcon && (_jsx(PencilIconOutline, { className: "ndl-inline-edit-pencil-icon", style: getIconStyle(typographyVariant) }))] }))] }));
|
|
185
|
+
}, children: [_jsx("span", { className: "ndl-inline-edit-text", children: displayText }), hasEditIcon && (_jsx(PencilIconOutline, { className: "ndl-inline-edit-pencil-icon", style: getIconStyle(typographyVariant) }))] }))] })));
|
|
174
186
|
};
|
|
175
187
|
//# sourceMappingURL=InlineEdit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineEdit.js","sourceRoot":"","sources":["../../../src/inline-edit/InlineEdit.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAEL,WAAW,EACX,SAAS,EACT,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAM5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,YAAY,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EAChB,cAAc,EAAE;oCACd,WAAW,EAAE,GAAG,EAAE;wCAChB,aAAa,CAAC,OAAO,GAAG,IAAI,CAAC;oCAC/B,CAAC;iCACF,YAED,KAAC,gBAAgB,KAAG,GACT,IACT,KACF,CACP,CAAC,CAAC,CAAC,CACF,kBACE,SAAS,EAAE,UAAU,CAAC,2BAA2B,EAAE;oBACjD,4BAA4B,EAAE,WAAW,KAAK,WAAW;oBACzD,cAAc,EAAE,UAAU;oBAC1B,mBAAmB,EAAE,WAAW;iBACjC,CAAC,mBACa,UAAU,EACzB,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE;oBACL,SAAS,EAAE,YAAY,CAAC,iBAAiB,CAAC;iBAC3C,aAED,eAAM,SAAS,EAAC,sBAAsB,YAAE,WAAW,GAAQ,EAC1D,WAAW,IAAI,CACd,KAAC,iBAAiB,IAChB,SAAS,EAAC,6BAA6B,EACvC,KAAK,EAAE,YAAY,CAAC,iBAAiB,CAAC,GACtC,CACH,IACM,CACV,IACU,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\nimport {\n type ReactNode,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useFocusWithin } from 'react-aria';\n\nimport {\n type HtmlAttributes,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { useSemicontrolledState } from '../_common/use-semi-controlled-state';\nimport { needleWarningMessage, randomId } from '../_common/utils';\nimport { IconButton } from '../icon-button';\nimport {\n CheckIconOutline,\n PencilIconOutline,\n XMarkIconOutline,\n} from '../icons';\nimport { Typography } from '../typography';\nimport { type TypographyVariants } from '../typography';\nimport { getIconStyle, getMinHeight } from './utils';\n\ntype InlineEditProps = {\n /** Label text */\n label?: ReactNode;\n\n /**\n * The typographyVariant of the component applied to Typography as its variant.\n * @default subheading-medium\n */\n typographyVariant?: TypographyVariants;\n\n /**\n * The default input value. Use for an uncontrolled component.\n */\n defaultValue?: string;\n\n /**\n * The input value. Makes the component controlled.\n */\n value?: string;\n\n /**\n * Callback when the input value changes. Must be used when the component is controlled.\n */\n onChange?: (value: string) => void;\n\n /**\n * Placeholder text displayed when the input is empty.\n */\n placeholder: string;\n\n /**\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * If edit pencil icon should be visible on hover\n * @default false\n */\n hasEditIcon?: boolean;\n\n /**\n * If the input is in editing mode\n * Used in a stateless inline edit\n * @default undefined\n */\n isEditing?: boolean;\n\n /** Callback when confirm icon button is pressed */\n onConfirm?: (\n value: string,\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => void;\n\n /** Callback when cancel icon button is pressed */\n onCancel?: (\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => void;\n\n /**\n * What the input should do on blur\n * - \"confirm\" will confirm the value\n * - \"cancel\" will cancel the value\n * - \"none\" will do nothing\n * @default \"confirm\"\n */\n blurBehavior?: 'confirm' | 'cancel' | 'none';\n\n /** props applied to the internal input element */\n inputProps?: HtmlAttributes<'input'>;\n\n /**\n * If the input is fluid\n * @default false\n */\n isFluid?: boolean;\n};\n\n// The input should not be less than this (it does shrink if container is smaller though).\nconst MINIMUM_WIDTH = 320;\n\nexport const InlineEdit = <T extends React.ElementType = 'div'>({\n as,\n className,\n defaultValue,\n htmlAttributes,\n label,\n onChange,\n onCancel,\n onConfirm,\n ref,\n style,\n value,\n hasEditIcon = false,\n inputProps,\n isDisabled = false,\n isEditing,\n blurBehavior = 'confirm',\n isFluid = false,\n typographyVariant = 'subheading-medium',\n placeholder,\n}: PolymorphicCommonProps<T, InlineEditProps>) => {\n const [hasEditMode, setEditMode] = useState(false);\n\n const [currentValue, setCurrentValue] = useSemicontrolledState({\n isControlled: value !== undefined,\n onChange,\n state: value ?? defaultValue ?? '',\n });\n const [previousConfirmedValue, setPreviousConfirmedValue] =\n useState(currentValue);\n\n const mirrorRef = useRef<HTMLSpanElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n /**\n * This ref is used to prevent the blur behavior from being triggered on mouse down events\n * on the confirm and cancel buttons. So when true, the blur behavior is not triggered.\n * This is needed due to Webkit browsers (like Safari) triggering blur on mouse down events.\n *\n * It is also used to prevent the blur behavior from being triggered after the component exits edit mode without blur.\n * This bug caused the handler to be called when something was focused after confirming.\n */\n const blurWithinRef = useRef(false);\n\n // Validate controlled mode requirements\n useEffect(() => {\n if (value !== undefined && onChange === undefined) {\n needleWarningMessage(\n 'onChange prop should be supplied when using controlled mode (value prop is provided).',\n );\n }\n }, [value, onChange]);\n\n const { focusWithinProps } = useFocusWithin({\n onBlurWithin: () => {\n if (blurWithinRef.current) {\n return;\n }\n\n if (blurBehavior === 'confirm') {\n onConfirmHandler();\n return;\n }\n if (blurBehavior === 'cancel') {\n onCancelHandler();\n return;\n }\n },\n });\n\n const resetToDefaults = useCallback(() => {\n // In controlled mode, don't reset the value - let the parent manage it\n // In uncontrolled mode, reset to default value\n if (value === undefined) {\n setCurrentValue(previousConfirmedValue ?? '');\n }\n // Only reset edit mode if isEditing is not controlled (undefined)\n if (isEditing === undefined) {\n blurWithinRef.current = true;\n setEditMode(false);\n }\n }, [previousConfirmedValue, isEditing, setCurrentValue, value]);\n\n const resetEditState = useCallback(() => {\n // Only reset edit mode if isEditing is not controlled (undefined)\n if (isEditing === undefined) {\n blurWithinRef.current = true;\n setEditMode(false);\n }\n }, [isEditing]);\n\n const onConfirmHandler = useCallback(\n async (\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => {\n setPreviousConfirmedValue(currentValue);\n onConfirm?.(currentValue, event);\n resetEditState();\n },\n [onConfirm, currentValue, resetEditState],\n );\n\n const onCancelHandler = useCallback(\n (\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => {\n onCancel?.(event);\n resetToDefaults();\n },\n [onCancel, resetToDefaults],\n );\n\n const inputID = useMemo(() => {\n return inputProps?.id ?? randomId(12);\n }, [inputProps?.id]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (['Enter', 'Escape'].includes(e.key)) {\n if (e.key === 'Enter') {\n onConfirmHandler();\n }\n if (e.key === 'Escape') {\n onCancelHandler();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n },\n [onConfirmHandler, onCancelHandler],\n );\n\n const handleInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n setCurrentValue(newValue);\n },\n [setCurrentValue],\n );\n\n const isInEditMode = isEditing ?? hasEditMode;\n\n const handleEditClick = useCallback(() => {\n if (isDisabled === false) {\n setEditMode(true);\n blurWithinRef.current = false;\n }\n }, [isDisabled]);\n\n const updateInputWidth = useCallback(() => {\n if (mirrorRef.current && containerRef.current && !isFluid) {\n const mirrorWidth = mirrorRef.current.offsetWidth;\n const newWidth = Math.max(mirrorWidth, MINIMUM_WIDTH);\n containerRef.current.style.width = `${newWidth}px`;\n }\n }, [mirrorRef, containerRef, isFluid]);\n\n // Width calculation effect\n useLayoutEffect(() => {\n updateInputWidth();\n }, [updateInputWidth, isInEditMode, currentValue]);\n\n const displayText = currentValue || placeholder;\n\n return (\n <Typography\n as={as ?? 'div'}\n variant={typographyVariant}\n className={classNames('ndl-inline-edit', className, {\n 'ndl-disabled': isDisabled,\n 'ndl-fluid': isFluid,\n })}\n style={style}\n ref={ref}\n htmlAttributes={htmlAttributes}\n >\n {Boolean(label) && <label htmlFor={inputID}>{label}</label>}\n {isInEditMode === true ? (\n <div\n className=\"ndl-inline-edit-container\"\n ref={containerRef}\n {...focusWithinProps}\n >\n {/* Mirror span for measuring width */}\n <span\n aria-hidden={true}\n className=\"ndl-inline-edit-mirror\"\n ref={mirrorRef}\n >\n {displayText}\n </span>\n <input\n {...inputProps}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus\n aria-label={typeof label === 'string' ? label : 'Inline edit input'}\n className={classNames(\n 'ndl-inline-edit-input',\n inputProps?.className,\n )}\n id={inputID}\n value={currentValue}\n onChange={handleInputChange}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n />\n <div className=\"ndl-inline-edit-buttons\">\n <IconButton\n description=\"Accept\"\n tooltipProps={{\n root: { placement: 'bottom' },\n }}\n onClick={onConfirmHandler}\n size=\"small\"\n isFloating={true}\n htmlAttributes={{\n onMouseDown: () => {\n blurWithinRef.current = true;\n },\n }}\n >\n <CheckIconOutline />\n </IconButton>\n <IconButton\n description=\"Cancel\"\n tooltipProps={{\n root: { placement: 'bottom' },\n }}\n onClick={(event) => onCancelHandler(event)}\n size=\"small\"\n isFloating={true}\n htmlAttributes={{\n onMouseDown: () => {\n blurWithinRef.current = true;\n },\n }}\n >\n <XMarkIconOutline />\n </IconButton>\n </div>\n </div>\n ) : (\n <button\n className={classNames('ndl-inline-idle-container', {\n 'n-text-neutral-text-weaker': displayText === placeholder,\n 'ndl-disabled': isDisabled,\n 'ndl-has-edit-icon': hasEditIcon,\n })}\n aria-disabled={isDisabled}\n disabled={isDisabled}\n onClick={handleEditClick}\n style={{\n minHeight: getMinHeight(typographyVariant),\n }}\n >\n <span className=\"ndl-inline-edit-text\">{displayText}</span>\n {hasEditIcon && (\n <PencilIconOutline\n className=\"ndl-inline-edit-pencil-icon\"\n style={getIconStyle(typographyVariant)}\n />\n )}\n </button>\n )}\n </Typography>\n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C,sBAAsB,YAAE,WAAW,GAAQ,EAC1D,WAAW,IAAI,CACd,KAAC,iBAAiB,IAChB,SAAS,EAAC,6BAA6B,EACvC,KAAK,EAAE,YAAY,CAAC,iBAAiB,CAAC,GACtC,CACH,IACM,CACV,KACU,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\nimport {\n type ReactNode,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useFocusWithin } from 'react-aria';\n\nimport {\n type HtmlAttributes,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { useSemicontrolledState } from '../_common/use-semi-controlled-state';\nimport { needleWarningMessage, randomId } from '../_common/utils';\nimport { IconButton } from '../icon-button';\nimport {\n CheckIconOutline,\n PencilIconOutline,\n XMarkIconOutline,\n} from '../icons';\nimport { Typography } from '../typography';\nimport { type TypographyVariants } from '../typography';\nimport { getIconStyle, getMinHeight } from './utils';\n\ntype InlineEditProps = {\n /** Label text */\n label?: ReactNode;\n\n /**\n * The typographyVariant of the component applied to Typography as its variant.\n * @default subheading-medium\n */\n typographyVariant?: TypographyVariants;\n\n /**\n * The default input value. Use for an uncontrolled component.\n */\n defaultValue?: string;\n\n /**\n * The input value. Makes the component controlled.\n */\n value?: string;\n\n /**\n * Callback when the input value changes. Must be used when the component is controlled.\n */\n onChange?: (value: string) => void;\n\n /**\n * Placeholder text displayed when the input is empty.\n */\n placeholder: string;\n\n /**\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * If edit pencil icon should be visible on hover\n * @default false\n */\n hasEditIcon?: boolean;\n\n /**\n * If the input is in editing mode\n * Used in a stateless inline edit\n * @default undefined\n */\n isEditing?: boolean;\n\n /** Callback when confirm icon button is pressed */\n onConfirm?: (\n value: string,\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => void;\n\n /** Callback when cancel icon button is pressed */\n onCancel?: (\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => void;\n\n /**\n * What the input should do on blur\n * - \"confirm\" will confirm the value\n * - \"cancel\" will cancel the value\n * - \"none\" will do nothing\n * @default \"confirm\"\n */\n blurBehavior?: 'confirm' | 'cancel' | 'none';\n\n /** props applied to the internal input element */\n inputProps?: HtmlAttributes<'input'>;\n\n /**\n * If the input is fluid\n * @default false\n */\n isFluid?: boolean;\n};\n\n// The input should not be less than this (it does shrink if container is smaller though).\nconst MINIMUM_WIDTH = 320;\n\nexport const InlineEdit = <T extends React.ElementType = 'div'>({\n as,\n className,\n defaultValue,\n htmlAttributes,\n label,\n onChange,\n onCancel,\n onConfirm,\n ref,\n style,\n value,\n hasEditIcon = false,\n inputProps,\n isDisabled = false,\n isEditing,\n blurBehavior = 'confirm',\n isFluid = false,\n typographyVariant = 'subheading-medium',\n placeholder,\n ...restProps\n}: PolymorphicCommonProps<T, InlineEditProps>) => {\n const [hasEditMode, setEditMode] = useState(false);\n\n const [currentValue, setCurrentValue] = useSemicontrolledState({\n isControlled: value !== undefined,\n onChange,\n state: value ?? defaultValue ?? '',\n });\n const [previousConfirmedValue, setPreviousConfirmedValue] =\n useState(currentValue);\n\n const mirrorRef = useRef<HTMLSpanElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n /**\n * This ref is used to prevent the blur behavior from being triggered on mouse down events\n * on the confirm and cancel buttons. So when true, the blur behavior is not triggered.\n * This is needed due to Webkit browsers (like Safari) triggering blur on mouse down events.\n *\n * It is also used to prevent the blur behavior from being triggered after the component exits edit mode without blur.\n * This bug caused the handler to be called when something was focused after confirming.\n */\n const blurWithinRef = useRef(false);\n\n // Validate controlled mode requirements\n useEffect(() => {\n if (value !== undefined && onChange === undefined) {\n needleWarningMessage(\n 'onChange prop should be supplied when using controlled mode (value prop is provided).',\n );\n }\n }, [value, onChange]);\n\n const { focusWithinProps } = useFocusWithin({\n onBlurWithin: () => {\n if (blurWithinRef.current) {\n return;\n }\n\n if (blurBehavior === 'confirm') {\n onConfirmHandler();\n return;\n }\n if (blurBehavior === 'cancel') {\n onCancelHandler();\n return;\n }\n },\n });\n\n const resetToDefaults = useCallback(() => {\n // In controlled mode, don't reset the value - let the parent manage it\n // In uncontrolled mode, reset to default value\n if (value === undefined) {\n setCurrentValue(previousConfirmedValue ?? '');\n }\n // Only reset edit mode if isEditing is not controlled (undefined)\n if (isEditing === undefined) {\n blurWithinRef.current = true;\n setEditMode(false);\n }\n }, [previousConfirmedValue, isEditing, setCurrentValue, value]);\n\n const resetEditState = useCallback(() => {\n // Only reset edit mode if isEditing is not controlled (undefined)\n if (isEditing === undefined) {\n blurWithinRef.current = true;\n setEditMode(false);\n }\n }, [isEditing]);\n\n const onConfirmHandler = useCallback(\n async (\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => {\n setPreviousConfirmedValue(currentValue);\n onConfirm?.(currentValue, event);\n resetEditState();\n },\n [onConfirm, currentValue, resetEditState],\n );\n\n const onCancelHandler = useCallback(\n (\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => {\n onCancel?.(event);\n resetToDefaults();\n },\n [onCancel, resetToDefaults],\n );\n\n const inputID = useMemo(() => {\n return inputProps?.id ?? randomId(12);\n }, [inputProps?.id]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (['Enter', 'Escape'].includes(e.key)) {\n if (e.key === 'Enter') {\n onConfirmHandler();\n }\n if (e.key === 'Escape') {\n onCancelHandler();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n },\n [onConfirmHandler, onCancelHandler],\n );\n\n const handleInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n setCurrentValue(newValue);\n },\n [setCurrentValue],\n );\n\n const isInEditMode = isEditing ?? hasEditMode;\n\n const handleEditClick = useCallback(() => {\n if (isDisabled === false) {\n setEditMode(true);\n blurWithinRef.current = false;\n }\n }, [isDisabled]);\n\n const updateInputWidth = useCallback(() => {\n if (mirrorRef.current && containerRef.current && !isFluid) {\n const mirrorWidth = mirrorRef.current.offsetWidth;\n const newWidth = Math.max(mirrorWidth, MINIMUM_WIDTH);\n containerRef.current.style.width = `${newWidth}px`;\n }\n }, [mirrorRef, containerRef, isFluid]);\n\n // Width calculation effect\n useLayoutEffect(() => {\n updateInputWidth();\n }, [updateInputWidth, isInEditMode, currentValue]);\n\n const displayText = currentValue || placeholder;\n\n return (\n <Typography\n as={as ?? 'div'}\n variant={typographyVariant}\n className={classNames('ndl-inline-edit', className, {\n 'ndl-disabled': isDisabled,\n 'ndl-fluid': isFluid,\n })}\n style={style}\n ref={ref}\n htmlAttributes={htmlAttributes}\n {...restProps}\n >\n {Boolean(label) && <label htmlFor={inputID}>{label}</label>}\n {isInEditMode === true ? (\n <div\n className=\"ndl-inline-edit-container\"\n ref={containerRef}\n {...focusWithinProps}\n >\n {/* Mirror span for measuring width */}\n <span\n aria-hidden={true}\n className=\"ndl-inline-edit-mirror\"\n ref={mirrorRef}\n >\n {displayText}\n </span>\n <input\n {...inputProps}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus\n aria-label={typeof label === 'string' ? label : 'Inline edit input'}\n className={classNames(\n 'ndl-inline-edit-input',\n inputProps?.className,\n )}\n id={inputID}\n value={currentValue}\n onChange={handleInputChange}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n />\n <div className=\"ndl-inline-edit-buttons\">\n <IconButton\n description=\"Accept\"\n tooltipProps={{\n root: { placement: 'bottom' },\n }}\n onClick={onConfirmHandler}\n size=\"small\"\n isFloating={true}\n htmlAttributes={{\n onMouseDown: () => {\n blurWithinRef.current = true;\n },\n }}\n >\n <CheckIconOutline />\n </IconButton>\n <IconButton\n description=\"Cancel\"\n tooltipProps={{\n root: { placement: 'bottom' },\n }}\n onClick={(event) => onCancelHandler(event)}\n size=\"small\"\n isFloating={true}\n htmlAttributes={{\n onMouseDown: () => {\n blurWithinRef.current = true;\n },\n }}\n >\n <XMarkIconOutline />\n </IconButton>\n </div>\n </div>\n ) : (\n <button\n className={classNames('ndl-inline-idle-container', {\n 'n-text-neutral-text-weaker': displayText === placeholder,\n 'ndl-disabled': isDisabled,\n 'ndl-has-edit-icon': hasEditIcon,\n })}\n aria-disabled={isDisabled}\n disabled={isDisabled}\n onClick={handleEditClick}\n style={{\n minHeight: getMinHeight(typographyVariant),\n }}\n >\n <span className=\"ndl-inline-edit-text\">{displayText}</span>\n {hasEditIcon && (\n <PencilIconOutline\n className=\"ndl-inline-edit-pencil-icon\"\n style={getIconStyle(typographyVariant)}\n />\n )}\n </button>\n )}\n </Typography>\n );\n};\n"]}
|
package/lib/esm/kbd/Kbd.js
CHANGED
|
@@ -37,15 +37,17 @@ export const Kbd = (_a) => {
|
|
|
37
37
|
var { modifierKeys, keys, os, as, className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["modifierKeys", "keys", "os", "as", "className", "style", "htmlAttributes", "ref"]);
|
|
38
38
|
const Component = as !== null && as !== void 0 ? as : 'span';
|
|
39
39
|
const modifierKeysContent = useMemo(() => {
|
|
40
|
-
if (modifierKeys === undefined)
|
|
40
|
+
if (modifierKeys === undefined) {
|
|
41
41
|
return null;
|
|
42
|
+
}
|
|
42
43
|
const keyMap = getKbdKeysMap(os);
|
|
43
44
|
const labelMap = getKbdKeysLabelMap(os);
|
|
44
45
|
return modifierKeys === null || modifierKeys === void 0 ? void 0 : modifierKeys.map((key) => (_jsx("abbr", { className: "ndl-kbd-key", title: labelMap[key], children: keyMap[key] }, key)));
|
|
45
46
|
}, [modifierKeys, os]);
|
|
46
47
|
const keysContent = useMemo(() => {
|
|
47
|
-
if (keys === undefined)
|
|
48
|
+
if (keys === undefined) {
|
|
48
49
|
return null;
|
|
50
|
+
}
|
|
49
51
|
return keys === null || keys === void 0 ? void 0 : keys.map((key, index) => {
|
|
50
52
|
if (index === 0) {
|
|
51
53
|
return (_jsx("span", { className: "ndl-kbd-key", children: key }, key === null || key === void 0 ? void 0 : key.toString()));
|
|
@@ -54,6 +56,6 @@ export const Kbd = (_a) => {
|
|
|
54
56
|
});
|
|
55
57
|
}, [keys]);
|
|
56
58
|
const classes = classNames('ndl-kbd', className);
|
|
57
|
-
return (_jsxs(Component, Object.assign({ className: classes, style: style, ref: ref },
|
|
59
|
+
return (_jsxs(Component, Object.assign({ className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: [modifierKeysContent, keysContent] })));
|
|
58
60
|
};
|
|
59
61
|
//# sourceMappingURL=Kbd.js.map
|
package/lib/esm/kbd/Kbd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Kbd.js","sourceRoot":"","sources":["../../../src/kbd/Kbd.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EACL,kBAAkB,EAClB,aAAa,GAGd,MAAM,aAAa,CAAC;AAiBrB,MAAM,CAAC,MAAM,GAAG,GAAG,CAAuC,EAUpB,EAAE,EAAE;QAVgB,EACxD,YAAY,EACZ,IAAI,EACJ,EAAE,EACF,EAAE,EACF,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAEiC,EADjC,SAAS,cAT4C,mFAUzD,CADa;IAEZ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CAAC;IAEvB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE;QAC/B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YAC9B,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;gBAChB,OAAO,CACL,eAAM,SAAS,EAAC,aAAa,YAC1B,GAAG,IAD6B,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,QAAQ,EAAE,CAE3C,CACR,CAAC;YACJ,CAAC;YACD,OAAO,CACL,8BACE,eAAM,SAAS,EAAC,cAAc,qBAAY,EAC1C,eAAM,SAAS,EAAC,aAAa,YAC1B,GAAG,IAD6B,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,QAAQ,EAAE,CAE3C,IACN,CACJ,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACjD,OAAO,CACL,MAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,eAEjB,mBAAmB,EACnB,WAAW,KACF,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport { useMemo } from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport {\n getKbdKeysLabelMap,\n getKbdKeysMap,\n type KbdKey,\n type OperatingSystem,\n} from './kbd-utils';\n\ntype KbdProps = {\n /**\n * The modifier keys to display in the keyboard shortcut.\n */\n modifierKeys?: KbdKey[];\n /**\n * The main keys to display in the keyboard shortcut.\n */\n keys?: React.ReactNode[];\n /**\n * Override the operating system detection for key symbols\n */\n os?: OperatingSystem;\n};\n\nexport const Kbd = <T extends React.ElementType = 'span'>({\n modifierKeys,\n keys,\n os,\n as,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, KbdProps>) => {\n const Component: React.ElementType = as ?? 'span';\n\n const modifierKeysContent = useMemo(() => {\n if (modifierKeys === undefined) {\n return null;\n }\n\n const keyMap = getKbdKeysMap(os);\n const labelMap = getKbdKeysLabelMap(os);\n\n return modifierKeys?.map((key) => (\n <abbr className=\"ndl-kbd-key\" key={key} title={labelMap[key]}>\n {keyMap[key]}\n </abbr>\n ));\n }, [modifierKeys, os]);\n\n const keysContent = useMemo(() => {\n if (keys === undefined) {\n return null;\n }\n\n return keys?.map((key, index) => {\n if (index === 0) {\n return (\n <span className=\"ndl-kbd-key\" key={key?.toString()}>\n {key}\n </span>\n );\n }\n return (\n <>\n <span className=\"ndl-kbd-then\">Then</span>\n <span className=\"ndl-kbd-key\" key={key?.toString()}>\n {key}\n </span>\n </>\n );\n });\n }, [keys]);\n\n const classes = classNames('ndl-kbd', className);\n return (\n <Component\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {modifierKeysContent}\n {keysContent}\n </Component>\n );\n};\n"]}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
import { Kbd } from '../../index';
|
|
23
|
-
import { KbdDefault, KbdDefaultSrc, KbdSequence, KbdSequenceSrc } from '
|
|
23
|
+
import { KbdDefault, KbdDefaultSrc, KbdSequence, KbdSequenceSrc } from '.';
|
|
24
24
|
const componentMeta = {
|
|
25
25
|
title: 'Components/Kbd',
|
|
26
26
|
id: 'components-kbd',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kbd.stories.js","sourceRoot":"","sources":["../../../../src/kbd/stories/kbd.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"kbd.stories.js","sourceRoot":"","sources":["../../../../src/kbd/stories/kbd.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,GAAG,CAAC;AAE3E,MAAM,aAAa,GAAqB;IACtC,KAAK,EAAE,gBAAgB;IACvB,EAAE,EAAE,gBAAgB;IACpB,SAAS,EAAE,GAAG;IACd,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE;KACb;CACF,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,UAAU;IAClB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa;aACpB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,WAAW;IACnB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,cAAc;aACrB;SACF;KACF;CACF,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 { Kbd } from '../../index';\nimport { KbdDefault, KbdDefaultSrc, KbdSequence, KbdSequenceSrc } from '.';\n\nconst componentMeta: Meta<typeof Kbd> = {\n title: 'Components/Kbd',\n id: 'components-kbd',\n component: Kbd,\n tags: ['docsPage'],\n parameters: {\n controls: {},\n },\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n render: KbdDefault,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: KbdDefaultSrc,\n },\n },\n },\n};\n\nexport const Sequence: Story = {\n args: {},\n render: KbdSequence,\n parameters: {\n docs: {\n source: {\n language: 'tsx',\n type: 'code',\n code: KbdSequenceSrc,\n },\n },\n },\n};\n"]}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
13
|
/**
|
|
3
14
|
*
|
|
@@ -20,11 +31,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
20
31
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
32
|
*/
|
|
22
33
|
import classNames from 'classnames';
|
|
23
|
-
export const LoadingBar = (
|
|
34
|
+
export const LoadingBar = (_a) => {
|
|
35
|
+
var { as, hasRail = false, className, htmlAttributes, style, ref } = _a, restProps = __rest(_a, ["as", "hasRail", "className", "htmlAttributes", "style", "ref"]);
|
|
24
36
|
const Component = as !== null && as !== void 0 ? as : 'div';
|
|
25
37
|
const classes = classNames('ndl-loading-bar', className, {
|
|
26
38
|
'ndl-loading-bar-rail': hasRail,
|
|
27
39
|
});
|
|
28
|
-
return (_jsx(Component, Object.assign({ className: classes, ref: ref, role: "status", style: style }, htmlAttributes)));
|
|
40
|
+
return (_jsx(Component, Object.assign({ className: classes, ref: ref, role: "status", style: style }, restProps, htmlAttributes)));
|
|
29
41
|
};
|
|
30
42
|
//# sourceMappingURL=LoadingBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingBar.js","sourceRoot":"","sources":["../../../src/loading-bar/LoadingBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoadingBar.js","sourceRoot":"","sources":["../../../src/loading-bar/LoadingBar.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AASpC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAsC,EAQnB,EAAE,EAAE;QARe,EAC9D,EAAE,EACF,OAAO,GAAG,KAAK,EACf,SAAS,EACT,cAAc,EACd,KAAK,EACL,GAAG,OAEwC,EADxC,SAAS,cAPkD,gEAQ/D,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,EAAE,SAAS,EAAE;QACvD,sBAAsB,EAAE,OAAO;KAChC,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,EAClB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\n\ntype LoadingBarProps = {\n hasRail?: boolean;\n};\n\nexport const LoadingBar = <T extends React.ElementType = 'div'>({\n as,\n hasRail = false,\n className,\n htmlAttributes,\n style,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, LoadingBarProps>) => {\n const Component: React.ElementType = as ?? 'div';\n const classes = classNames('ndl-loading-bar', className, {\n 'ndl-loading-bar-rail': hasRail,\n });\n\n return (\n <Component\n className={classes}\n ref={ref}\n role=\"status\"\n style={style}\n {...restProps}\n {...htmlAttributes}\n />\n );\n};\n"]}
|
|
@@ -46,6 +46,6 @@ export const LoadingSpinner = (_a) => {
|
|
|
46
46
|
'ndl-medium': size === 'medium',
|
|
47
47
|
'ndl-large': size === 'large',
|
|
48
48
|
});
|
|
49
|
-
return (_jsx(Component, Object.assign({ className: classes, role: "status", "aria-label": "Loading content", "aria-live": "polite", ref: ref },
|
|
49
|
+
return (_jsx(Component, Object.assign({ className: classes, role: "status", "aria-label": "Loading content", "aria-live": "polite", ref: ref }, restProps, htmlAttributes, { children: _jsx("div", { className: "ndl-spin" }) })));
|
|
50
50
|
};
|
|
51
51
|
//# sourceMappingURL=LoadingSpinner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../src/loading-spinner/LoadingSpinner.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAiBpC;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAsC,EAOnB,EAAE,EAAE;QAPe,EAClE,EAAE,EACF,IAAI,GAAG,OAAO,EACd,SAAS,EACT,cAAc,EACd,GAAG,OAE4C,EAD5C,SAAS,cANsD,oDAOnE,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,IAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,EAAE;QACxD,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,QAAQ,gBACF,iBAAiB,eAClB,QAAQ,EAClB,GAAG,EAAE,GAAG,IACJ,
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../src/loading-spinner/LoadingSpinner.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAiBpC;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAsC,EAOnB,EAAE,EAAE;QAPe,EAClE,EAAE,EACF,IAAI,GAAG,OAAO,EACd,SAAS,EACT,cAAc,EACd,GAAG,OAE4C,EAD5C,SAAS,cANsD,oDAOnE,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,IAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,EAAE;QACxD,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,QAAQ,gBACF,iBAAiB,eAClB,QAAQ,EAClB,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,cAAK,SAAS,EAAC,UAAU,GAAG,IAClB,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype LoadingSpinnerProps = {\n size?: 'small' | 'medium' | 'large';\n};\n\n/**\n *\n *\n * LoadingSpinner Component\n *\n *\n */\n\nexport const LoadingSpinner = <T extends React.ElementType = 'div'>({\n as,\n size = 'small',\n className,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, LoadingSpinnerProps>) => {\n const Component: React.ElementType = as || 'div';\n const classes = classNames('ndl-spin-wrapper', className, {\n 'ndl-small': size === 'small',\n 'ndl-medium': size === 'medium',\n 'ndl-large': size === 'large',\n });\n\n return (\n <Component\n className={classes}\n role=\"status\"\n aria-label=\"Loading content\"\n aria-live=\"polite\"\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-spin\" />\n </Component>\n );\n};\n"]}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
import { Logo } from '../../index';
|
|
23
|
-
import { LogoBlack, LogoBlackSrc, LogoDefault, LogoDefaultSrc, LogoIcon, LogoIconSrc, } from '
|
|
23
|
+
import { LogoBlack, LogoBlackSrc, LogoDefault, LogoDefaultSrc, LogoIcon, LogoIconSrc, } from '.';
|
|
24
24
|
const componentMeta = {
|
|
25
25
|
title: 'Components/Logo',
|
|
26
26
|
id: 'components-logo',
|