@neo4j-ndl/react 4.1.5 → 4.1.7
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/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/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/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 +2 -2
- 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
|
@@ -38,6 +38,7 @@ const animateLayoutChanges = ({ isSorting, isDragging, }) => (isSorting || isDra
|
|
|
38
38
|
const SortableTreeViewItemNotMemoized = function SortableTreeViewItem(_a) {
|
|
39
39
|
var { id, depth, isLast, TreeItemComponent, parent, shouldDisableSorting,
|
|
40
40
|
// need to destruct to avoid passing it to the component
|
|
41
|
+
// oxlint-disable-next-line no-unused-vars
|
|
41
42
|
sortableProps, keepGhostInPlace, item, onCollapse, trails, onItemsChanged, items, tabIndex, onFocus } = _a, restProps = __rest(_a, ["id", "depth", "isLast", "TreeItemComponent", "parent", "shouldDisableSorting", "sortableProps", "keepGhostInPlace", "item", "onCollapse", "trails", "onItemsChanged", "items", "tabIndex", "onFocus"]);
|
|
42
43
|
const { attributes, listeners, setNodeRef, transform, setActivatorNodeRef, transition, isDragging, isSorting, isOver, } = useSortable({
|
|
43
44
|
id: id,
|
|
@@ -52,8 +53,9 @@ const SortableTreeViewItemNotMemoized = function SortableTreeViewItem(_a) {
|
|
|
52
53
|
transition: transition !== null && transition !== void 0 ? transition : undefined,
|
|
53
54
|
};
|
|
54
55
|
const localCollapse = useMemo(() => {
|
|
55
|
-
if (!onCollapse)
|
|
56
|
+
if (!onCollapse) {
|
|
56
57
|
return undefined;
|
|
58
|
+
}
|
|
57
59
|
return () => onCollapse === null || onCollapse === void 0 ? void 0 : onCollapse(item.id);
|
|
58
60
|
}, [item.id, onCollapse]);
|
|
59
61
|
return (_jsx(TreeItemComponent, Object.assign({ item: item, isOverParent: false }, restProps, { setActivatorNodeRef: setActivatorNodeRef, setNodeRef: setNodeRef, style: style, depth: depth, isGhost: keepGhostInPlace, shouldDisableInteraction: isSorting, isLastInParent: isLast, parent: parent, dragHandleProps: Object.assign(Object.assign({}, attributes), listeners), isIndicator: isDragging, onCollapse: localCollapse, onItemsChanged: onItemsChanged, items: items, shouldDisableSorting: shouldDisableSorting, isOver: isOver, trails: trails, tabIndex: tabIndex, onFocus: onFocus })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeViewItem.js","sourceRoot":"","sources":["../../../src/tree-view/TreeViewItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,OAAO,EAEL,WAAW,GAEZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,EAAsB,OAAO,EAAE,MAAM,OAAO,CAAC;AAO3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AA+BtD,MAAM,oBAAoB,GAAyB,CAAC,EAClD,SAAS,EACT,UAAU,GACX,EAAE,EAAE,CAAC,CAAC,SAAS,IAAI,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AA6B/C,MAAM,+BAA+B,GAAG,SAAS,oBAAoB,CAGnE,EAmB4B;QAnB5B,EACA,EAAE,EACF,KAAK,EACL,MAAM,EACN,iBAAiB,EACjB,MAAM,EACN,oBAAoB;IACpB,wDAAwD;
|
|
1
|
+
{"version":3,"file":"TreeViewItem.js","sourceRoot":"","sources":["../../../src/tree-view/TreeViewItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,OAAO,EAEL,WAAW,GAEZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,EAAsB,OAAO,EAAE,MAAM,OAAO,CAAC;AAO3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AA+BtD,MAAM,oBAAoB,GAAyB,CAAC,EAClD,SAAS,EACT,UAAU,GACX,EAAE,EAAE,CAAC,CAAC,SAAS,IAAI,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AA6B/C,MAAM,+BAA+B,GAAG,SAAS,oBAAoB,CAGnE,EAmB4B;QAnB5B,EACA,EAAE,EACF,KAAK,EACL,MAAM,EACN,iBAAiB,EACjB,MAAM,EACN,oBAAoB;IACpB,wDAAwD;IACxD,0CAA0C;IAC1C,aAAa,EACb,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,MAAM,EACN,cAAc,EACd,KA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KAAK,EAAE,KAAK,EACZ,oBAAoB,EAAE,oBAAoB,EAC1C,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,IAChB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,IAAI,CAC5C,+BAA+B,CACU,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 UniqueIdentifier } from '@dnd-kit/core';\nimport {\n type AnimateLayoutChanges,\n useSortable,\n type UseSortableArguments,\n} from '@dnd-kit/sortable';\nimport React, { type CSSProperties, useMemo } from 'react';\n\nimport {\n type FlattenedTreeItem,\n type ItemChangedReason,\n type TreeItemComponent,\n} from './tree-view-types';\nimport { transformToString } from './tree-view-utils';\n\nexport interface TreeItemProps<T> {\n /** Number of child items */\n childCount?: number;\n /** Whether this is a clone item */\n clone?: boolean;\n /** Whether the item is collapsed */\n collapsed?: boolean;\n /** Depth of the item in the tree */\n depth: number;\n /** Whether interaction should be disabled */\n shouldDisableInteraction?: boolean;\n /** Whether this is an indicator item */\n indicator?: boolean;\n /** Width of the indentation */\n indentationWidth: number;\n /** The tree item data */\n item: FlattenedTreeItem<T>;\n /** Whether this is the last item in its parent */\n isLast: boolean;\n /** Parent item of this item */\n parent: FlattenedTreeItem<T> | null;\n /** Function to call when item is collapsed */\n onCollapse?(id: UniqueIdentifier): void;\n /** Function to call when item is removed */\n onRemove?(id: UniqueIdentifier): void;\n /** Function to set the wrapper ref */\n wrapperRef?(node: HTMLLIElement): void;\n}\n\nconst animateLayoutChanges: AnimateLayoutChanges = ({\n isSorting,\n isDragging,\n}) => (isSorting || isDragging ? false : true);\n\ntype SortableTreeItemProps<\n T extends Record<string, unknown>,\n E extends HTMLElement,\n> = TreeItemProps<T> & {\n id: UniqueIdentifier;\n /** The component to use for rendering the tree item */\n TreeItemComponent: TreeItemComponent<T, E>;\n /** Whether sorting should be disabled for this item */\n shouldDisableSorting?: boolean;\n /** Props for the sortable functionality */\n sortableProps?: Omit<UseSortableArguments, 'id'>;\n /** Whether to keep the ghost item in place while dragging */\n keepGhostInPlace?: boolean;\n /** A list of trails to render before the item */\n trails: ('none' | 'straight' | 'straight-curved' | 'curved')[];\n /** Function to call when the item has changed */\n onItemsChanged: (\n newItems: FlattenedTreeItem<T>[],\n itemChangedReason: ItemChangedReason<T>,\n ) => void;\n /** All items in the tree */\n items: FlattenedTreeItem<T>[];\n tabIndex?: number;\n /** Function to call when the item receives focus */\n onFocus?: () => void;\n};\n\nconst SortableTreeViewItemNotMemoized = function SortableTreeViewItem<\n T extends Record<string, unknown>,\n E extends HTMLElement,\n>({\n id,\n depth,\n isLast,\n TreeItemComponent,\n parent,\n shouldDisableSorting,\n // need to destruct to avoid passing it to the component\n // oxlint-disable-next-line no-unused-vars\n sortableProps,\n keepGhostInPlace,\n item,\n onCollapse,\n trails,\n onItemsChanged,\n items,\n tabIndex,\n onFocus,\n ...restProps\n}: SortableTreeItemProps<T, E>) {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n setActivatorNodeRef,\n transition,\n isDragging,\n isSorting,\n isOver,\n } = useSortable({\n id: id,\n animateLayoutChanges,\n transition: {\n duration: 150, // milliseconds\n easing: 'cubic-bezier(0.25, 1, 0.5, 1)',\n },\n });\n\n const style: CSSProperties = {\n transform: transform ? transformToString(transform) : undefined,\n transition: transition ?? undefined,\n };\n const localCollapse = useMemo(() => {\n if (!onCollapse) {\n return undefined;\n }\n return () => onCollapse?.(item.id);\n }, [item.id, onCollapse]);\n\n return (\n <TreeItemComponent\n item={item}\n isOverParent={false}\n {...restProps}\n setActivatorNodeRef={setActivatorNodeRef}\n setNodeRef={setNodeRef}\n style={style}\n depth={depth}\n isGhost={keepGhostInPlace}\n shouldDisableInteraction={isSorting}\n isLastInParent={isLast}\n parent={parent}\n dragHandleProps={{\n ...attributes,\n ...listeners,\n }}\n isIndicator={isDragging}\n onCollapse={localCollapse}\n onItemsChanged={onItemsChanged}\n items={items}\n shouldDisableSorting={shouldDisableSorting}\n isOver={isOver}\n trails={trails}\n tabIndex={tabIndex}\n onFocus={onFocus}\n />\n );\n};\n\nexport const SortableTreeViewItem = React.memo(\n SortableTreeViewItemNotMemoized,\n) as typeof SortableTreeViewItemNotMemoized;\n"]}
|
|
@@ -30,7 +30,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
30
30
|
}
|
|
31
31
|
return t;
|
|
32
32
|
};
|
|
33
|
-
import { createElement as _createElement } from "react";
|
|
34
33
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
35
34
|
import { Checkbox } from '../checkbox';
|
|
36
35
|
import { CleanIconButton } from '../clean-icon-button';
|
|
@@ -142,7 +141,7 @@ export const TreeViewTextItem = (_a) => {
|
|
|
142
141
|
},
|
|
143
142
|
}, children: item.data.text }) }) })), _jsx("div", { className: "ndl-tree-view-actions", children: item.data.actions &&
|
|
144
143
|
item.data.actions.map((action, index) => {
|
|
145
|
-
return (
|
|
144
|
+
return (_jsx(CleanIconButton, Object.assign({ className: "ndl-tree-view-action", size: "small" }, action.buttonProps, { htmlAttributes: Object.assign({ tabIndex }, action.buttonProps.htmlAttributes), children: action.icon }), index));
|
|
146
145
|
}) })] })));
|
|
147
146
|
};
|
|
148
147
|
//# sourceMappingURL=TreeViewTextItem.js.map
|
|
@@ -1 +1 @@
|
|
|
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AC,CAAC,kBAAkB,CAAC,CAAC,CAAC,aAAa,EAClE,cAAc,EAAE;4BACd,KAAK,EAAE;gCACL,QAAQ,EAAE,QAAQ;gCAClB,YAAY,EAAE,UAAU;gCACxB,UAAU,EAAE,QAAQ;6BACrB;yBACF,YAEA,IAAI,CAAC,IAAI,CAAC,IAAI,GACJ,GACG,IACT,EACX,cAAK,SAAS,EAAC,uBAAuB,YACnC,IAAI,CAAC,IAAI,CAAC,OAAO;oBAChB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;wBACtC,OAAO,CACL,eAAC,eAAe,oBACV,MAAM,CAAC,WAAW,IACtB,GAAG,EAAE,KAAK,EACV,SAAS,EAAC,sBAAsB,EAChC,IAAI,EAAC,OAAO,EACZ,cAAc,kBACZ,QAAQ,IACL,MAAM,CAAC,WAAW,CAAC,cAAc,MAGrC,MAAM,CAAC,IAAI,CACI,CACnB,CAAC;oBACJ,CAAC,CAAC,GACA,KACU,CACnB,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 type React from 'react';\n\nimport { Checkbox } from '../checkbox';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { ChevronDownIconOutline, ChevronRightIconOutline } from '../icons';\nimport { Skeleton } from '../skeleton';\nimport { Typography } from '../typography';\nimport {\n type FlattenedTreeItem,\n type TextItemData,\n type TreeItemComponentProps,\n} from './tree-view-types';\nimport { TreeItemWrapper } from './TreeItemWrapper';\n\n/**\n * checks if any parent is checked\n * @param item\n * @param items\n * @returns\n */\nconst parentIsCheckedRecursively = (\n item: FlattenedTreeItem<TextItemData>,\n items: FlattenedTreeItem<TextItemData>[],\n): boolean => {\n const parent = items.find((i) => i.id === item.parentId);\n if (parent) {\n if (parent.isSelected) {\n return true;\n }\n return parentIsCheckedRecursively(parent, items);\n }\n return false;\n};\n\n/**\n * checks if any children are checked\n * @param item\n * @param items\n * @returns\n */\nconst childrenCheckedRecursively = (\n item: FlattenedTreeItem<TextItemData>,\n items: FlattenedTreeItem<TextItemData>[],\n): boolean => {\n const children = items.filter((i) => i.parentId === item.id);\n if (children.length === 0) {\n return false;\n }\n return children.some(\n (i) => i.isSelected || childrenCheckedRecursively(i, items),\n );\n};\n\nexport const TreeViewTextItem = <T extends TextItemData>({\n depth,\n shouldDisableInteraction,\n shouldDisableSorting,\n isGhost,\n indentationWidth,\n isIndicator,\n isCollapsed,\n onCollapse,\n item,\n parent,\n isOver,\n isOverParent,\n setNodeRef,\n setActivatorNodeRef,\n dragHandleProps,\n style,\n trails,\n onItemsChanged,\n items,\n tabIndex,\n ref,\n ...restProps\n}: TreeItemComponentProps<T> & { ref?: React.Ref<HTMLElement> }) => {\n const isAnyParentChecked = parentIsCheckedRecursively(item, items);\n const isAnyChildChecked = childrenCheckedRecursively(item, items);\n\n const isIndeterminate =\n isAnyChildChecked === true &&\n isAnyParentChecked === false &&\n item.isSelected === false\n ? true\n : false;\n\n return (\n <TreeItemWrapper\n depth={depth}\n shouldDisableInteraction={shouldDisableInteraction}\n shouldDisableSorting={shouldDisableSorting}\n isGhost={isGhost}\n indentationWidth={indentationWidth}\n isIndicator={isIndicator}\n isCollapsed={isCollapsed}\n onCollapse={onCollapse}\n item={item}\n parent={parent}\n isOver={isOver}\n isOverParent={isOverParent}\n setNodeRef={setNodeRef}\n setActivatorNodeRef={setActivatorNodeRef}\n dragHandleProps={dragHandleProps}\n style={style}\n trails={trails}\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onItemsChanged={() => {}}\n ref={ref}\n items={items}\n tabIndex={tabIndex}\n {...restProps}\n >\n {item.canHaveSubItems && onCollapse && (\n <button\n className=\"ndl-tree-view-collapse-button\"\n onClick={() => onCollapse()}\n aria-label={item.isCollapsed ? 'Expand' : 'Collapse'}\n aria-expanded={item.isCollapsed ? 'false' : 'true'}\n aria-pressed={!item.isCollapsed}\n /**\n * Tab index is set to -1 to prevent the item from being focused when the tree is navigated with tab\n * since we use the arrow keys instead\n */\n tabIndex={tabIndex}\n >\n {item.isCollapsed && <ChevronRightIconOutline className=\"ndl-icon\" />}\n {!item.isCollapsed && <ChevronDownIconOutline className=\"ndl-icon\" />}\n </button>\n )}\n {item.isSelected !== undefined && (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...item.skeletonProps}\n isLoading={item.isSkeletonLoading}\n >\n <Checkbox\n isIndeterminate={isIndeterminate}\n isChecked={item.isSelected}\n ariaLabel={item.data.text}\n htmlAttributes={{\n tabIndex,\n }}\n onChange={(event) => {\n const newItems = items.map((i) => {\n if (i.id === item.id) {\n return {\n ...i,\n isSelected: event.target.checked,\n };\n }\n return i;\n });\n\n // Uncheck parents if a child is unchecked\n if (!event.target.checked) {\n let parentId = item.parentId;\n while (parentId !== null) {\n const parent = newItems.find(\n (newItem) => newItem.id === parentId,\n );\n if (parent) {\n newItems.forEach((newItem) => {\n if (newItem.id === parent.id) {\n newItem.isSelected = false;\n }\n });\n parentId = parent.parentId;\n } else {\n parentId = null;\n }\n }\n }\n // Check children if a parent is checked\n if (item.canHaveSubItems) {\n const childIdsToUncheck = items\n .filter((i) => i.parentId === item.id)\n .map((i) => i.id);\n while (childIdsToUncheck.length > 0) {\n const childId = childIdsToUncheck.pop();\n const child = items.find((i) => i.id === childId);\n if (child) {\n newItems.forEach((newItem) => {\n if (newItem.id === child.id) {\n newItem.isSelected = event.target.checked;\n }\n });\n newItems\n .filter((i) => i.parentId === child.id)\n .forEach((i) => {\n childIdsToUncheck.push(i.id);\n });\n }\n }\n }\n onItemsChanged(newItems, { item, reason: 'selected' });\n }}\n aria-label={item.data.text}\n />\n </Skeleton>\n )}\n\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n height=\"20px\"\n {...item.skeletonProps}\n isLoading={item.isSkeletonLoading}\n >\n <ConditionalWrap\n shouldWrap={item.data.onTextClick !== undefined}\n wrap={(children) => (\n <button\n onClick={item.data.onTextClick}\n className=\"ndl-tree-view-text-clickable\"\n tabIndex={tabIndex}\n >\n {children}\n </button>\n )}\n >\n <Typography\n variant={item.canHaveSubItems ? 'subheading-small' : 'body-medium'}\n htmlAttributes={{\n style: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n }}\n >\n {item.data.text}\n </Typography>\n </ConditionalWrap>\n </Skeleton>\n <div className=\"ndl-tree-view-actions\">\n {item.data.actions &&\n item.data.actions.map((action, index) => {\n return (\n <CleanIconButton\n {...action.buttonProps}\n key={index}\n className=\"ndl-tree-view-action\"\n size=\"small\"\n htmlAttributes={{\n tabIndex,\n ...action.buttonProps.htmlAttributes,\n }}\n >\n {action.icon}\n </CleanIconButton>\n );\n })}\n </div>\n </TreeItemWrapper>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"TreeViewTextItem.js","sourceRoot":"","sources":["../../../src/tree-view/TreeViewTextItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,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EAAE,EAAE;wBACtC,OAAO,CACL,KAAC,eAAe,kBAEd,SAAS,EAAC,sBAAsB,EAChC,IAAI,EAAC,OAAO,IACR,MAAM,CAAC,WAAW,IACtB,cAAc,kBACZ,QAAQ,IACL,MAAM,CAAC,WAAW,CAAC,cAAc,aAGrC,MAAM,CAAC,IAAI,KATP,KAAK,CAUM,CACnB,CAAC;oBACJ,CAAC,CAAC,GACA,KACU,CACnB,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 type React from 'react';\n\nimport { Checkbox } from '../checkbox';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { ChevronDownIconOutline, ChevronRightIconOutline } from '../icons';\nimport { Skeleton } from '../skeleton';\nimport { Typography } from '../typography';\nimport {\n type FlattenedTreeItem,\n type TextItemData,\n type TreeItemComponentProps,\n} from './tree-view-types';\nimport { TreeItemWrapper } from './TreeItemWrapper';\n\n/**\n * checks if any parent is checked\n * @param item\n * @param items\n * @returns\n */\nconst parentIsCheckedRecursively = (\n item: FlattenedTreeItem<TextItemData>,\n items: FlattenedTreeItem<TextItemData>[],\n): boolean => {\n const parent = items.find((i) => i.id === item.parentId);\n if (parent) {\n if (parent.isSelected) {\n return true;\n }\n return parentIsCheckedRecursively(parent, items);\n }\n return false;\n};\n\n/**\n * checks if any children are checked\n * @param item\n * @param items\n * @returns\n */\nconst childrenCheckedRecursively = (\n item: FlattenedTreeItem<TextItemData>,\n items: FlattenedTreeItem<TextItemData>[],\n): boolean => {\n const children = items.filter((i) => i.parentId === item.id);\n if (children.length === 0) {\n return false;\n }\n return children.some(\n (i) => i.isSelected || childrenCheckedRecursively(i, items),\n );\n};\n\nexport const TreeViewTextItem = <T extends TextItemData>({\n depth,\n shouldDisableInteraction,\n shouldDisableSorting,\n isGhost,\n indentationWidth,\n isIndicator,\n isCollapsed,\n onCollapse,\n item,\n parent,\n isOver,\n isOverParent,\n setNodeRef,\n setActivatorNodeRef,\n dragHandleProps,\n style,\n trails,\n onItemsChanged,\n items,\n tabIndex,\n ref,\n ...restProps\n}: TreeItemComponentProps<T> & { ref?: React.Ref<HTMLElement> }) => {\n const isAnyParentChecked = parentIsCheckedRecursively(item, items);\n const isAnyChildChecked = childrenCheckedRecursively(item, items);\n\n const isIndeterminate =\n isAnyChildChecked === true &&\n isAnyParentChecked === false &&\n item.isSelected === false\n ? true\n : false;\n\n return (\n <TreeItemWrapper\n depth={depth}\n shouldDisableInteraction={shouldDisableInteraction}\n shouldDisableSorting={shouldDisableSorting}\n isGhost={isGhost}\n indentationWidth={indentationWidth}\n isIndicator={isIndicator}\n isCollapsed={isCollapsed}\n onCollapse={onCollapse}\n item={item}\n parent={parent}\n isOver={isOver}\n isOverParent={isOverParent}\n setNodeRef={setNodeRef}\n setActivatorNodeRef={setActivatorNodeRef}\n dragHandleProps={dragHandleProps}\n style={style}\n trails={trails}\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onItemsChanged={() => {}}\n ref={ref}\n items={items}\n tabIndex={tabIndex}\n {...restProps}\n >\n {item.canHaveSubItems && onCollapse && (\n <button\n className=\"ndl-tree-view-collapse-button\"\n onClick={() => onCollapse()}\n aria-label={item.isCollapsed ? 'Expand' : 'Collapse'}\n aria-expanded={item.isCollapsed ? 'false' : 'true'}\n aria-pressed={!item.isCollapsed}\n /**\n * Tab index is set to -1 to prevent the item from being focused when the tree is navigated with tab\n * since we use the arrow keys instead\n */\n tabIndex={tabIndex}\n >\n {item.isCollapsed && <ChevronRightIconOutline className=\"ndl-icon\" />}\n {!item.isCollapsed && <ChevronDownIconOutline className=\"ndl-icon\" />}\n </button>\n )}\n {item.isSelected !== undefined && (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...item.skeletonProps}\n isLoading={item.isSkeletonLoading}\n >\n <Checkbox\n isIndeterminate={isIndeterminate}\n isChecked={item.isSelected}\n ariaLabel={item.data.text}\n htmlAttributes={{\n tabIndex,\n }}\n onChange={(event) => {\n const newItems = items.map((i) => {\n if (i.id === item.id) {\n return {\n ...i,\n isSelected: event.target.checked,\n };\n }\n return i;\n });\n\n // Uncheck parents if a child is unchecked\n if (!event.target.checked) {\n let parentId = item.parentId;\n while (parentId !== null) {\n const parent = newItems.find(\n (newItem) => newItem.id === parentId,\n );\n if (parent) {\n newItems.forEach((newItem) => {\n if (newItem.id === parent.id) {\n newItem.isSelected = false;\n }\n });\n parentId = parent.parentId;\n } else {\n parentId = null;\n }\n }\n }\n // Check children if a parent is checked\n if (item.canHaveSubItems) {\n const childIdsToUncheck = items\n .filter((i) => i.parentId === item.id)\n .map((i) => i.id);\n while (childIdsToUncheck.length > 0) {\n const childId = childIdsToUncheck.pop();\n const child = items.find((i) => i.id === childId);\n if (child) {\n newItems.forEach((newItem) => {\n if (newItem.id === child.id) {\n newItem.isSelected = event.target.checked;\n }\n });\n newItems\n .filter((i) => i.parentId === child.id)\n .forEach((i) => {\n childIdsToUncheck.push(i.id);\n });\n }\n }\n }\n onItemsChanged(newItems, { item, reason: 'selected' });\n }}\n aria-label={item.data.text}\n />\n </Skeleton>\n )}\n\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n height=\"20px\"\n {...item.skeletonProps}\n isLoading={item.isSkeletonLoading}\n >\n <ConditionalWrap\n shouldWrap={item.data.onTextClick !== undefined}\n wrap={(children) => (\n <button\n onClick={item.data.onTextClick}\n className=\"ndl-tree-view-text-clickable\"\n tabIndex={tabIndex}\n >\n {children}\n </button>\n )}\n >\n <Typography\n variant={item.canHaveSubItems ? 'subheading-small' : 'body-medium'}\n htmlAttributes={{\n style: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n }}\n >\n {item.data.text}\n </Typography>\n </ConditionalWrap>\n </Skeleton>\n <div className=\"ndl-tree-view-actions\">\n {item.data.actions &&\n item.data.actions.map((action, index) => {\n return (\n <CleanIconButton\n key={index}\n className=\"ndl-tree-view-action\"\n size=\"small\"\n {...action.buttonProps}\n htmlAttributes={{\n tabIndex,\n ...action.buttonProps.htmlAttributes,\n }}\n >\n {action.icon}\n </CleanIconButton>\n );\n })}\n </div>\n </TreeItemWrapper>\n );\n};\n"]}
|
|
@@ -19,8 +19,20 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
23
|
+
var t = {};
|
|
24
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
25
|
+
t[p] = s[p];
|
|
26
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
27
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
28
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
29
|
+
t[p[i]] = s[p[i]];
|
|
30
|
+
}
|
|
31
|
+
return t;
|
|
32
|
+
};
|
|
22
33
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
-
export const Trail = (
|
|
24
|
-
|
|
34
|
+
export const Trail = (_a) => {
|
|
35
|
+
var { variant, htmlAttributes } = _a, restProps = __rest(_a, ["variant", "htmlAttributes"]);
|
|
36
|
+
return (_jsxs("div", Object.assign({ className: "ndl-trail" }, restProps, htmlAttributes, { children: [variant === 'straight' && (_jsx("svg", { className: "ndl-trail-straight", width: "2", height: "24", viewBox: "0 0 2 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M1.00001 16.0005L1 -4.00049L1 28.0004", stroke: "#BBBEC3" }) })), variant === 'curved' && (_jsx("svg", { className: "ndl-trail-curved", width: "9", height: "13", viewBox: "0 0 9 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M1 -4L1 3.99988C1 8.41816 4.58172 11.9999 9 11.9999V11.9999", stroke: "#BBBEC3" }) })), variant === 'straight-curved' && (_jsxs("svg", { className: "ndl-trail-straight-curved", width: "16", height: "24", viewBox: "0 0 16 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("g", { clipPath: "url(#clip0_16990_133)", children: _jsx("path", { d: "M16 12V12C11.5817 12 8.00001 8.41828 8.00001 4L8.00001 -4L8 28", stroke: "#BBBEC3" }) }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_16990_133", children: _jsx("rect", { width: "16", height: "24", fill: "white" }) }) })] }))] })));
|
|
25
37
|
};
|
|
26
38
|
//# sourceMappingURL=TreeViewTrail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeViewTrail.js","sourceRoot":"","sources":["../../../src/tree-view/TreeViewTrail.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TreeViewTrail.js","sourceRoot":"","sources":["../../../src/tree-view/TreeViewTrail.tsx"],"names":[],"mappings":";;;;;;;;;;;;AA0BA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAIW,EAAE,EAAE;QAJf,EACpB,OAAO,EACP,cAAc,OAEiB,EAD5B,SAAS,cAHQ,6BAIrB,CADa;IAEZ,OAAO,CACL,6BAAK,SAAS,EAAC,WAAW,IAAK,SAAS,EAAM,cAAc,eACzD,OAAO,KAAK,UAAU,IAAI,CACzB,cACE,SAAS,EAAC,oBAAoB,EAC9B,KAAK,EAAC,GAAG,EACT,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,YAElC,eAAM,CAAC,EAAC,uCAAuC,EAAC,MAAM,EAAC,SAAS,GAAG,GAC/D,CACP,EACA,OAAO,KAAK,QAAQ,IAAI,CACvB,cACE,SAAS,EAAC,kBAAkB,EAC5B,KAAK,EAAC,GAAG,EACT,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,YAElC,eACE,CAAC,EAAC,6DAA6D,EAC/D,MAAM,EAAC,SAAS,GAChB,GACE,CACP,EACA,OAAO,KAAK,iBAAiB,IAAI,CAChC,eACE,SAAS,EAAC,2BAA2B,EACrC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,aAElC,YAAG,QAAQ,EAAC,uBAAuB,YACjC,eACE,CAAC,EAAC,gEAAgE,EAClE,MAAM,EAAC,SAAS,GAChB,GACA,EACJ,yBACE,mBAAU,EAAE,EAAC,iBAAiB,YAC5B,eAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,GAAG,GACnC,GACN,IACH,CACP,KACG,CACP,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 */\n\nimport { type CommonProps } from '../_common/types';\n\nexport type TrailProps = {\n variant: 'straight' | 'curved' | 'straight-curved' | 'none';\n};\nexport const Trail = ({\n variant,\n htmlAttributes,\n ...restProps\n}: CommonProps<'div', TrailProps>) => {\n return (\n <div className=\"ndl-trail\" {...restProps} {...htmlAttributes}>\n {variant === 'straight' && (\n <svg\n className=\"ndl-trail-straight\"\n width=\"2\"\n height=\"24\"\n viewBox=\"0 0 2 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M1.00001 16.0005L1 -4.00049L1 28.0004\" stroke=\"#BBBEC3\" />\n </svg>\n )}\n {variant === 'curved' && (\n <svg\n className=\"ndl-trail-curved\"\n width=\"9\"\n height=\"13\"\n viewBox=\"0 0 9 13\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M1 -4L1 3.99988C1 8.41816 4.58172 11.9999 9 11.9999V11.9999\"\n stroke=\"#BBBEC3\"\n />\n </svg>\n )}\n {variant === 'straight-curved' && (\n <svg\n className=\"ndl-trail-straight-curved\"\n width=\"16\"\n height=\"24\"\n viewBox=\"0 0 16 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_16990_133)\">\n <path\n d=\"M16 12V12C11.5817 12 8.00001 8.41828 8.00001 4L8.00001 -4L8 28\"\n stroke=\"#BBBEC3\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_16990_133\">\n <rect width=\"16\" height=\"24\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n )}\n </div>\n );\n};\n"]}
|
package/lib/esm/wizard/Wizard.js
CHANGED
|
@@ -99,7 +99,8 @@ const WizardLarge = (_a) => {
|
|
|
99
99
|
: getStatus(activeStepIndex, index), number: index + 1, text: step.content, alignment: alignment }) }, index));
|
|
100
100
|
})] })));
|
|
101
101
|
};
|
|
102
|
-
export const WizardSmall = (
|
|
102
|
+
export const WizardSmall = (_a) => {
|
|
103
|
+
var { orientation = 'horizontal', activeStepIndex, steps, as, className, htmlAttributes, style, alignment = 'middle', ref } = _a, restProps = __rest(_a, ["orientation", "activeStepIndex", "steps", "as", "className", "htmlAttributes", "style", "alignment", "ref"]);
|
|
103
104
|
const Component = as !== null && as !== void 0 ? as : 'div';
|
|
104
105
|
const wizardClasses = classNames('ndl-wizard', 'ndl-wizard-small', {
|
|
105
106
|
'ndl-horizontal': orientation === 'horizontal',
|
|
@@ -113,7 +114,7 @@ export const WizardSmall = ({ orientation = 'horizontal', activeStepIndex, steps
|
|
|
113
114
|
'ndl-wizard-step-complete': getStatus(activeStepIndex, index) === 'complete',
|
|
114
115
|
[`ndl-wizard-align-${alignment}`]: alignment,
|
|
115
116
|
});
|
|
116
|
-
return (_jsxs(Component, Object.assign({ className: wizardClasses, style: style, ref: ref }, htmlAttributes, { children: [_jsx("div", { className: "ndl-wizard-steps-line" }), steps.map((step, index) => {
|
|
117
|
+
return (_jsxs(Component, Object.assign({ className: wizardClasses, style: style, ref: ref }, restProps, htmlAttributes, { children: [_jsx("div", { className: "ndl-wizard-steps-line" }), steps.map((step, index) => {
|
|
117
118
|
return (_jsx("div", { className: stepClasses(index), children: _jsx("div", { className: "ndl-wizard-circle" }) }, index));
|
|
118
119
|
}), _jsx("div", { className: "ndl-wizard-steps-line" })] })));
|
|
119
120
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../src/wizard/Wizard.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AA+C3C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAsC,EAC1D,EA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AE,EAAE,EACZ,SAAS,EAAC,wBAAwB,EAClC,UAAU,EAAC,QAAQ,EACnB,gBAAgB,EAAC,QAAQ,EACzB,EAAE,EAAC,OAAO,YAET,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAC7B,IACH,GACF,CACP,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 React, { useEffect } from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { Typography } from '../typography';\n\ninterface Step {\n /** Content displayed as the step label */\n content: React.ReactNode;\n /** Explicit status for the step. When set to `error`, the step is rendered in an error state */\n status?: 'default' | 'error';\n}\n\ninterface BaseWizardProps {\n /** Layout orientation of the wizard */\n orientation?: 'horizontal' | 'vertical';\n /** Visual size of the wizard */\n size?: 'small' | 'large';\n /** Additional style */\n style?: React.CSSProperties;\n /** Additional class name */\n className?: string;\n /** Zero-based index of the active step */\n activeStepIndex: number;\n /** Steps to display in the wizard */\n steps: Step[];\n}\n\ntype HorizontalWizardProps = BaseWizardProps & {\n orientation: 'horizontal';\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: 'middle';\n};\n\ntype VerticalWizardProps = BaseWizardProps & {\n orientation: 'vertical';\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: 'top' | 'middle';\n};\n\ntype NonOrientationWizardProps = BaseWizardProps & {\n orientation: undefined;\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: never;\n};\n\ntype WizardProps =\n | HorizontalWizardProps\n | VerticalWizardProps\n | NonOrientationWizardProps;\n\nexport const Wizard = <T extends React.ElementType = 'div'>({\n as,\n className,\n style,\n size = 'large',\n steps,\n activeStepIndex,\n orientation,\n htmlAttributes,\n alignment = orientation === 'vertical' ? 'top' : 'middle',\n ref,\n}: PolymorphicCommonProps<T, WizardProps>) => {\n useEffect(() => {\n if (activeStepIndex > steps.length - 1 || activeStepIndex < 0) {\n console.warn(\n `[🪡 Needle]: The activeStepIndex in Wizard is out of bounds. The activeStepIndex is ${activeStepIndex} and the number of steps is ${steps.length}.`,\n );\n }\n }, [activeStepIndex, steps.length]);\n\n switch (size) {\n case 'small':\n return (\n <WizardSmall\n as={as}\n orientation={orientation}\n style={style}\n className={className}\n steps={steps}\n activeStepIndex={activeStepIndex}\n ref={ref}\n htmlAttributes={htmlAttributes}\n alignment={alignment}\n />\n );\n case 'large':\n return (\n <WizardLarge\n as={as}\n orientation={orientation}\n style={style}\n className={className}\n steps={steps}\n activeStepIndex={activeStepIndex}\n ref={ref}\n htmlAttributes={htmlAttributes}\n alignment={alignment}\n />\n );\n }\n};\n\nconst getStatus = (activeStepIndex: number, stepIndex: number) =>\n stepIndex === activeStepIndex\n ? 'active'\n : activeStepIndex < stepIndex\n ? 'incomplete'\n : 'complete';\n\nconst WizardLarge = <T extends React.ElementType = 'div'>({\n orientation = 'horizontal',\n activeStepIndex,\n steps,\n as,\n style,\n className,\n htmlAttributes,\n alignment,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, Omit<WizardProps, 'size'>>) => {\n const Component: React.ElementType = as || 'div';\n\n const wizardClasses = classNames(\n 'ndl-wizard',\n 'ndl-wizard-large',\n {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n [`ndl-wizard-align-${alignment}`]: alignment,\n },\n className,\n );\n\n const componentStyle = {\n gridTemplateColumns:\n orientation === 'horizontal'\n ? `repeat(${steps.length}, 1fr)`\n : `32px 1fr`,\n\n gridTemplateRows:\n orientation === 'vertical' && `repeat(${steps.length}, 1fr)`,\n };\n\n const stepClasses = (index: number, step: Step) => {\n const status = getStatus(activeStepIndex, index);\n\n return classNames('ndl-wizard-step', {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-wizard-step-line-right': index < steps.length - 1,\n 'ndl-wizard-step-line-left': index > 0,\n 'ndl-wizard-step-complete': status === 'complete',\n 'ndl-wizard-step-active': status === 'active',\n 'ndl-wizard-step-error': step.status === 'error',\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n };\n\n return (\n <Component\n className={wizardClasses}\n style={{ ...style, ...componentStyle }}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {/* iterate over the steps to render the text content (the first row of the component)*/}\n {steps.map((step, index) => {\n if (typeof step.content === 'string') {\n const wizardStepClasses = classNames('ndl-wizard-step-text', {\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-horizontal': orientation === 'horizontal',\n [`ndl-wizard-align-${alignment}`]: alignment,\n 'ndl-wizard-step-incomplete':\n getStatus(activeStepIndex, index) === 'incomplete',\n });\n\n return (\n <div key={index} className={wizardStepClasses}>\n <Typography variant=\"body-large\">{step.content}</Typography>\n </div>\n );\n } else {\n return <React.Fragment key={index}>{step.content}</React.Fragment>;\n }\n })}\n {/* iterate over the steps to render the circles (iterates again to render the second row of the component) */}\n {steps.map((step, index) => {\n return (\n <div\n className={stepClasses(index, step)}\n key={index}\n style={{\n gridRow: orientation === 'vertical' ? index + 1 : '',\n }}\n >\n <Circle\n status={\n step.status === 'error'\n ? 'error'\n : getStatus(activeStepIndex, index)\n }\n number={index + 1}\n text={step.content}\n alignment={alignment}\n />\n </div>\n );\n })}\n </Component>\n );\n};\n\nexport const WizardSmall = <T extends React.ElementType = 'div'>({\n orientation = 'horizontal',\n activeStepIndex,\n steps,\n as,\n className,\n htmlAttributes,\n style,\n alignment = 'middle',\n ref,\n}: PolymorphicCommonProps<T, Omit<WizardProps, 'size'>>) => {\n const Component = as ?? 'div';\n\n const wizardClasses = classNames(\n 'ndl-wizard',\n 'ndl-wizard-small',\n {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n [`ndl-wizard-align-${alignment}`]: alignment,\n },\n className,\n );\n\n const stepClasses = (index: number) =>\n classNames('ndl-wizard-step', {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-wizard-step-active': getStatus(activeStepIndex, index) === 'active',\n 'ndl-wizard-step-complete':\n getStatus(activeStepIndex, index) === 'complete',\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n\n return (\n <Component\n className={wizardClasses}\n style={style}\n ref={ref}\n {...htmlAttributes}\n >\n <div className=\"ndl-wizard-steps-line\" />\n {steps.map((step, index) => {\n return (\n <div key={index} className={stepClasses(index)}>\n <div className=\"ndl-wizard-circle\"></div>\n </div>\n );\n })}\n <div className=\"ndl-wizard-steps-line\" />\n </Component>\n );\n};\n\nconst Circle = ({\n status,\n number,\n alignment = 'middle',\n}: {\n status: 'active' | 'complete' | 'incomplete' | 'error';\n number: number;\n text: React.ReactNode;\n alignment?: 'top' | 'middle';\n}) => {\n const innerCircleClasses = classNames({\n 'n-fill-primary-bg-strong': status === 'complete' || status === 'active',\n 'n-fill-neutral-bg-stronger': status === 'incomplete',\n 'n-fill-danger-bg-strong': status === 'error',\n });\n const outerCircleClasses = classNames('ndl-wizard-circle', {\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n\n return (\n <div className={outerCircleClasses}>\n <svg>\n {status === 'active' && (\n <g>\n <circle\n className=\"n-stroke-primary-bg-strong\"\n style={{ fill: 'transparent', strokeWidth: 2 }}\n cx=\"16\"\n cy=\"16\"\n r=\"14\"\n />\n </g>\n )}\n\n <circle className={innerCircleClasses} cx=\"16\" cy=\"16\" r=\"12\" />\n <text\n x=\"50%\"\n y=\"50%\"\n fontSize={14}\n className=\"n-fill-neutral-bg-weak\"\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n dy=\"0.1em\"\n >\n {status === 'error' ? '!' : number}\n </text>\n </svg>\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../src/wizard/Wizard.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AA+C3C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAsC,EAC1D,EAAE,EACF,SAAS,EACT,KAAK,EACL,IAAI,GAAG,OAAO,EACd,KAAK,EACL,eAAe,EACf,WAAW,EACX,cAAc,EACd,SAAS,GAAG,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,EACzD,GAAG,GACoC,EAAE,EAAE;IAC3C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,eAAe,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,eAAe,GAAG,CAAC,EAAE,CAAC;YAC9D,OAAO,CAAC,IAAI,CACV,uFAAuF,eAAe,+BAA+B,KAAK,CAAC,MAAM,GAAG,CACrJ,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAEpC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,OAAO;YACV,OAAO,CACL,KAAC,WAA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MAAM,KAAK,UAAU,IAAI,MAAM,KAAK,QAAQ;QACxE,4BAA4B,EAAE,MAAM,KAAK,YAAY;QACrD,yBAAyB,EAAE,MAAM,KAAK,OAAO;KAC9C,CAAC,CAAC;IACH,MAAM,kBAAkB,GAAG,UAAU,CAAC,mBAAmB,EAAE;QACzD,CAAC,oBAAoB,SAAS,EAAE,CAAC,EAAE,SAAS;KAC7C,CAAC,CAAC;IAEH,OAAO,CACL,cAAK,SAAS,EAAE,kBAAkB,YAChC,0BACG,MAAM,KAAK,QAAQ,IAAI,CACtB,sBACE,iBACE,SAAS,EAAC,4BAA4B,EACtC,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,EAAE,EAC9C,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,CAAC,EAAC,IAAI,GACN,GACA,CACL,EAED,iBAAQ,SAAS,EAAE,kBAAkB,EAAE,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,GAAG,EAChE,eACE,CAAC,EAAC,KAAK,EACP,CAAC,EAAC,KAAK,EACP,QAAQ,EAAE,EAAE,EACZ,SAAS,EAAC,wBAAwB,EAClC,UAAU,EAAC,QAAQ,EACnB,gBAAgB,EAAC,QAAQ,EACzB,EAAE,EAAC,OAAO,YAET,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAC7B,IACH,GACF,CACP,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 React, { useEffect } from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { Typography } from '../typography';\n\ninterface Step {\n /** Content displayed as the step label */\n content: React.ReactNode;\n /** Explicit status for the step. When set to `error`, the step is rendered in an error state */\n status?: 'default' | 'error';\n}\n\ninterface BaseWizardProps {\n /** Layout orientation of the wizard */\n orientation?: 'horizontal' | 'vertical';\n /** Visual size of the wizard */\n size?: 'small' | 'large';\n /** Additional style */\n style?: React.CSSProperties;\n /** Additional class name */\n className?: string;\n /** Zero-based index of the active step */\n activeStepIndex: number;\n /** Steps to display in the wizard */\n steps: Step[];\n}\n\ntype HorizontalWizardProps = BaseWizardProps & {\n orientation: 'horizontal';\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: 'middle';\n};\n\ntype VerticalWizardProps = BaseWizardProps & {\n orientation: 'vertical';\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: 'top' | 'middle';\n};\n\ntype NonOrientationWizardProps = BaseWizardProps & {\n orientation: undefined;\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: never;\n};\n\ntype WizardProps =\n | HorizontalWizardProps\n | VerticalWizardProps\n | NonOrientationWizardProps;\n\nexport const Wizard = <T extends React.ElementType = 'div'>({\n as,\n className,\n style,\n size = 'large',\n steps,\n activeStepIndex,\n orientation,\n htmlAttributes,\n alignment = orientation === 'vertical' ? 'top' : 'middle',\n ref,\n}: PolymorphicCommonProps<T, WizardProps>) => {\n useEffect(() => {\n if (activeStepIndex > steps.length - 1 || activeStepIndex < 0) {\n console.warn(\n `[🪡 Needle]: The activeStepIndex in Wizard is out of bounds. The activeStepIndex is ${activeStepIndex} and the number of steps is ${steps.length}.`,\n );\n }\n }, [activeStepIndex, steps.length]);\n\n switch (size) {\n case 'small':\n return (\n <WizardSmall\n as={as}\n orientation={orientation}\n style={style}\n className={className}\n steps={steps}\n activeStepIndex={activeStepIndex}\n ref={ref}\n htmlAttributes={htmlAttributes}\n alignment={alignment}\n />\n );\n case 'large':\n return (\n <WizardLarge\n as={as}\n orientation={orientation}\n style={style}\n className={className}\n steps={steps}\n activeStepIndex={activeStepIndex}\n ref={ref}\n htmlAttributes={htmlAttributes}\n alignment={alignment}\n />\n );\n }\n};\n\nconst getStatus = (activeStepIndex: number, stepIndex: number) =>\n stepIndex === activeStepIndex\n ? 'active'\n : activeStepIndex < stepIndex\n ? 'incomplete'\n : 'complete';\n\nconst WizardLarge = <T extends React.ElementType = 'div'>({\n orientation = 'horizontal',\n activeStepIndex,\n steps,\n as,\n style,\n className,\n htmlAttributes,\n alignment,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, Omit<WizardProps, 'size'>>) => {\n const Component: React.ElementType = as || 'div';\n\n const wizardClasses = classNames(\n 'ndl-wizard',\n 'ndl-wizard-large',\n {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n [`ndl-wizard-align-${alignment}`]: alignment,\n },\n className,\n );\n\n const componentStyle = {\n gridTemplateColumns:\n orientation === 'horizontal'\n ? `repeat(${steps.length}, 1fr)`\n : `32px 1fr`,\n\n gridTemplateRows:\n orientation === 'vertical' && `repeat(${steps.length}, 1fr)`,\n };\n\n const stepClasses = (index: number, step: Step) => {\n const status = getStatus(activeStepIndex, index);\n\n return classNames('ndl-wizard-step', {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-wizard-step-line-right': index < steps.length - 1,\n 'ndl-wizard-step-line-left': index > 0,\n 'ndl-wizard-step-complete': status === 'complete',\n 'ndl-wizard-step-active': status === 'active',\n 'ndl-wizard-step-error': step.status === 'error',\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n };\n\n return (\n <Component\n className={wizardClasses}\n style={{ ...style, ...componentStyle }}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {/* iterate over the steps to render the text content (the first row of the component)*/}\n {steps.map((step, index) => {\n if (typeof step.content === 'string') {\n const wizardStepClasses = classNames('ndl-wizard-step-text', {\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-horizontal': orientation === 'horizontal',\n [`ndl-wizard-align-${alignment}`]: alignment,\n 'ndl-wizard-step-incomplete':\n getStatus(activeStepIndex, index) === 'incomplete',\n });\n\n return (\n <div key={index} className={wizardStepClasses}>\n <Typography variant=\"body-large\">{step.content}</Typography>\n </div>\n );\n } else {\n return <React.Fragment key={index}>{step.content}</React.Fragment>;\n }\n })}\n {/* iterate over the steps to render the circles (iterates again to render the second row of the component) */}\n {steps.map((step, index) => {\n return (\n <div\n className={stepClasses(index, step)}\n key={index}\n style={{\n gridRow: orientation === 'vertical' ? index + 1 : '',\n }}\n >\n <Circle\n status={\n step.status === 'error'\n ? 'error'\n : getStatus(activeStepIndex, index)\n }\n number={index + 1}\n text={step.content}\n alignment={alignment}\n />\n </div>\n );\n })}\n </Component>\n );\n};\n\nexport const WizardSmall = <T extends React.ElementType = 'div'>({\n orientation = 'horizontal',\n activeStepIndex,\n steps,\n as,\n className,\n htmlAttributes,\n style,\n alignment = 'middle',\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, Omit<WizardProps, 'size'>>) => {\n const Component = as ?? 'div';\n\n const wizardClasses = classNames(\n 'ndl-wizard',\n 'ndl-wizard-small',\n {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n [`ndl-wizard-align-${alignment}`]: alignment,\n },\n className,\n );\n\n const stepClasses = (index: number) =>\n classNames('ndl-wizard-step', {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-wizard-step-active': getStatus(activeStepIndex, index) === 'active',\n 'ndl-wizard-step-complete':\n getStatus(activeStepIndex, index) === 'complete',\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n\n return (\n <Component\n className={wizardClasses}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-wizard-steps-line\" />\n {steps.map((step, index) => {\n return (\n <div key={index} className={stepClasses(index)}>\n <div className=\"ndl-wizard-circle\"></div>\n </div>\n );\n })}\n <div className=\"ndl-wizard-steps-line\" />\n </Component>\n );\n};\n\nconst Circle = ({\n status,\n number,\n alignment = 'middle',\n}: {\n status: 'active' | 'complete' | 'incomplete' | 'error';\n number: number;\n text: React.ReactNode;\n alignment?: 'top' | 'middle';\n}) => {\n const innerCircleClasses = classNames({\n 'n-fill-primary-bg-strong': status === 'complete' || status === 'active',\n 'n-fill-neutral-bg-stronger': status === 'incomplete',\n 'n-fill-danger-bg-strong': status === 'error',\n });\n const outerCircleClasses = classNames('ndl-wizard-circle', {\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n\n return (\n <div className={outerCircleClasses}>\n <svg>\n {status === 'active' && (\n <g>\n <circle\n className=\"n-stroke-primary-bg-strong\"\n style={{ fill: 'transparent', strokeWidth: 2 }}\n cx=\"16\"\n cy=\"16\"\n r=\"14\"\n />\n </g>\n )}\n\n <circle className={innerCircleClasses} cx=\"16\" cy=\"16\" r=\"12\" />\n <text\n x=\"50%\"\n y=\"50%\"\n fontSize={14}\n className=\"n-fill-neutral-bg-weak\"\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n dy=\"0.1em\"\n >\n {status === 'error' ? '!' : number}\n </text>\n </svg>\n </div>\n );\n};\n"]}
|
|
@@ -35,6 +35,6 @@ export interface CodeBlockWrapperProps {
|
|
|
35
35
|
style?: React.CSSProperties;
|
|
36
36
|
}
|
|
37
37
|
declare const defaultElement = "div";
|
|
38
|
-
export declare const CodeBlockWrapper: <T extends React.ElementType = typeof defaultElement>({ as, maxHeight, code, heading, children, isDisabled, actions, shouldShowExpandButton, setShouldShowExpandButton, className, style, ref, htmlAttributes, }: PolymorphicCommonProps<T, CodeBlockWrapperProps>) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare const CodeBlockWrapper: <T extends React.ElementType = typeof defaultElement>({ as, maxHeight, code, heading, children, isDisabled, actions, shouldShowExpandButton, setShouldShowExpandButton, className, style, ref, htmlAttributes, ...restProps }: PolymorphicCommonProps<T, CodeBlockWrapperProps>) => import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
export {};
|
|
40
40
|
//# sourceMappingURL=CodeBlockWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlockWrapper.d.ts","sourceRoot":"","sources":["../../../src/_common/CodeBlockWrapper.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;IAC7E,sBAAsB,EAAE,OAAO,CAAC;IAChC,yBAAyB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,QAAA,MAAM,cAAc,QAAQ,CAAC;AAE7B,eAAO,MAAM,gBAAgB,GAC3B,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,OAAO,cAAc,EACnD,
|
|
1
|
+
{"version":3,"file":"CodeBlockWrapper.d.ts","sourceRoot":"","sources":["../../../src/_common/CodeBlockWrapper.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;IAC7E,sBAAsB,EAAE,OAAO,CAAC;IAChC,yBAAyB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,QAAA,MAAM,cAAc,QAAQ,CAAC;AAE7B,eAAO,MAAM,gBAAgB,GAC3B,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,OAAO,cAAc,EACnD,yKAeC,sBAAsB,CAAC,CAAC,EAAE,qBAAqB,CAAC,4CA6HlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/_common/utils.ts"],"names":[],"mappings":"AAqBA,OAA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,SAAS,EAC5B,UAAU,MAAM,OAAO,eAAe,uBAKvC,CAAC;AAEF,eAAO,MAAM,cAAc;;CAE1B,CAAC;AAEF,eAAO,MAAM,SAAS,GACpB,SAAS,MAAM,GAAG,SAAS,EAC3B,UAAU,MAAM,OAAO,cAAc,uBAKtC,CAAC"}
|
|
@@ -24,14 +24,14 @@ import { type PolymorphicCommonProps } from '../_common/types';
|
|
|
24
24
|
import { type AccordionItemId, type AccordionItemProps, type AccordionProps, type ClassicItemProps } from './accordion-types';
|
|
25
25
|
type CleanItemProps<T extends AccordionItemId> = Omit<AccordionItemProps<T>, 'hasDivider'>;
|
|
26
26
|
declare const Accordion: (<T extends AccordionItemId, U extends React.ElementType = "div">({ children, as, isMultiple, onChange, className, style, htmlAttributes, ref, ...restProps }: PolymorphicCommonProps<U, AccordionProps<T>>) => import("react/jsx-runtime").JSX.Element) & {
|
|
27
|
-
Item: {
|
|
28
|
-
<T extends AccordionItemId, U extends React.ElementType = "div">({ className, ...restProps }: PolymorphicCommonProps<U, ClassicItemProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
displayName: string;
|
|
30
|
-
};
|
|
31
27
|
CleanItem: {
|
|
32
28
|
<T extends AccordionItemId, U extends React.ElementType = "div">({ className, ...restProps }: PolymorphicCommonProps<U, CleanItemProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
33
29
|
displayName: string;
|
|
34
30
|
};
|
|
31
|
+
Item: {
|
|
32
|
+
<T extends AccordionItemId, U extends React.ElementType = "div">({ className, ...restProps }: PolymorphicCommonProps<U, ClassicItemProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
displayName: string;
|
|
34
|
+
};
|
|
35
35
|
};
|
|
36
36
|
export { Accordion };
|
|
37
37
|
//# sourceMappingURL=Accordion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/accordion/Accordion.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAM/D,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAGtB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/accordion/Accordion.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAM/D,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAGtB,MAAM,mBAAmB,CAAC;AA6T3B,KAAK,cAAc,CAAC,CAAC,SAAS,eAAe,IAAI,IAAI,CACnD,kBAAkB,CAAC,CAAC,CAAC,EACrB,YAAY,CACb,CAAC;AAkBF,QAAA,MAAM,SAAS,IA7Tb,CAAC,SAAS,eAAe,EACzB,CAAC,SAAS,KAAK,CAAC,WAAW,uGAW1B,sBAAsB,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;;SAkS7C,CAAC,SAAS,eAAe,EACzB,CAAC,SAAS,KAAK,CAAC,WAAW,uCAI1B,sBAAsB,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;;;;SAvB7C,CAAC,SAAS,eAAe,EACzB,CAAC,SAAS,KAAK,CAAC,WAAW,uCAI1B,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;;;CA+B/C,CAAC;AAEH,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -18,7 +18,7 @@
|
|
|
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
|
-
import type
|
|
21
|
+
import { type HtmlAttributes } from '../_common/types';
|
|
22
22
|
import { type TypographyVariants } from '../typography';
|
|
23
23
|
export type AccordionItemId = string | number | undefined;
|
|
24
24
|
interface AccordionBase {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-types.d.ts","sourceRoot":"","sources":["../../../src/accordion/accordion-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"accordion-types.d.ts","sourceRoot":"","sources":["../../../src/accordion/accordion-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAE1D,UAAU,aAAa;IACrB,iHAAiH;IACjH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,eAAe;IACtD,qEAAqE;IACrE,UAAU,EAAE,KAAK,GAAG,SAAS,CAAC;IAC9B,yFAAyF;IACzF,cAAc,EAAE,CAAC,GAAG,IAAI,CAAC;IACzB,kEAAkE;IAClE,QAAQ,EAAE,CAAC,cAAc,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;CAC9C;AAED,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,eAAe;IACnD,qEAAqE;IACrE,UAAU,EAAE,IAAI,CAAC;IACjB,0FAA0F;IAC1F,eAAe,EAAE,CAAC,EAAE,CAAC;IACrB,kEAAkE;IAClE,QAAQ,EAAE,CAAC,eAAe,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;CAC1C;AAED,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,eAAe,IAAI,aAAa,GACxE,UAAU,CAAC,CAAC,CAAC,CAAC;AAChB,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,eAAe,IAAI,aAAa,GAC3E,aAAa,CAAC,CAAC,CAAC,CAAC;AAEnB,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,eAAe,IAChD,mBAAmB,CAAC,CAAC,CAAC,GACtB,sBAAsB,CAAC,CAAC,CAAC,CAAC;AAE9B,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,eAAe;IAC3D,oCAAoC;IACpC,MAAM,EAAE,CAAC,CAAC;IACV,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,iCAAiC;IACjC,aAAa,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IACvC,8CAA8C;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IACvC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,sBAAsB,CAAC,EAAE,kBAAkB,CAAC;IAC5C,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qEAAqE;IACrE,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACnC;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,eAAe,IAAI,IAAI,CAC5D,kBAAkB,CAAC,CAAC,CAAC,EACrB,YAAY,GAAG,iBAAiB,GAAG,wBAAwB,CAC5D,CAAC"}
|
|
@@ -23,10 +23,6 @@ declare const componentMeta: {
|
|
|
23
23
|
title: string;
|
|
24
24
|
id: string;
|
|
25
25
|
component: (<T extends import("../accordion-types").AccordionItemId, U extends React.ElementType = "div">({ children, as, isMultiple, onChange, className, style, htmlAttributes, ref, ...restProps }: import("../../_common/types").PolymorphicCommonProps<U, import("../accordion-types").AccordionProps<T>>) => import("react/jsx-runtime").JSX.Element) & {
|
|
26
|
-
Item: {
|
|
27
|
-
<T extends import("../accordion-types").AccordionItemId, U extends React.ElementType = "div">({ className, ...restProps }: import("../../_common/types").PolymorphicCommonProps<U, import("../accordion-types").ClassicItemProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
displayName: string;
|
|
29
|
-
};
|
|
30
26
|
CleanItem: {
|
|
31
27
|
<T extends import("../accordion-types").AccordionItemId, U extends React.ElementType = "div">({ className, ...restProps }: import("../../_common/types").PolymorphicCommonProps<U, {
|
|
32
28
|
children?: import("react").ReactNode;
|
|
@@ -42,6 +38,10 @@ declare const componentMeta: {
|
|
|
42
38
|
}>): import("react/jsx-runtime").JSX.Element;
|
|
43
39
|
displayName: string;
|
|
44
40
|
};
|
|
41
|
+
Item: {
|
|
42
|
+
<T extends import("../accordion-types").AccordionItemId, U extends React.ElementType = "div">({ className, ...restProps }: import("../../_common/types").PolymorphicCommonProps<U, import("../accordion-types").ClassicItemProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
displayName: string;
|
|
44
|
+
};
|
|
45
45
|
};
|
|
46
46
|
tags: string[];
|
|
47
47
|
parameters: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/avatar/Avatar.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAiF/D,KAAK,WAAW,GAAG;IACjB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4IAA4I;IAC5I,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sHAAsH;IACtH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,KAAK,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IACjG,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC1C,kHAAkH;IAClH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACrC,GAAG,CACA;IACE,EAAE,EAAE,QAAQ,CAAC;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,GACD;IACE,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CACxB,CACJ,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EAAE,0IAezD,sBAAsB,CAAC,CAAC,EAAE,WAAW,CAAC,4CAyExC,CAAC"}
|
|
@@ -53,7 +53,7 @@ type NonCloseableBannerProps = {
|
|
|
53
53
|
type BannerCloseProps = CloseableBannerProps | NonCloseableBannerProps;
|
|
54
54
|
type BannerProps = BannerCommonProps & BannerCloseProps;
|
|
55
55
|
type BannerVariant = 'info' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
56
|
-
declare const Banner: (<T extends React.ElementType = "section">({ as, variant, hasIcon, onClose, className, children, isCloseable, usage, htmlAttributes, isAlert, ref, }: PolymorphicCommonProps<T, BannerProps>) => import("react/jsx-runtime").JSX.Element) & {
|
|
56
|
+
declare const Banner: (<T extends React.ElementType = "section">({ as, variant, hasIcon, onClose, className, children, isCloseable, usage, htmlAttributes, isAlert, ref, ...restProps }: PolymorphicCommonProps<T, BannerProps>) => import("react/jsx-runtime").JSX.Element) & {
|
|
57
57
|
Actions: ({ children, className, style, htmlAttributes, ref, ...restProps }: CommonProps<"div", {
|
|
58
58
|
children: React.ReactNode;
|
|
59
59
|
}>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../src/banner/Banner.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,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|
package/lib/types/box/Box.d.ts
CHANGED
|
@@ -52,6 +52,6 @@ type BaseBoxProps = {
|
|
|
52
52
|
children?: React.ReactNode;
|
|
53
53
|
style?: React.CSSProperties;
|
|
54
54
|
};
|
|
55
|
-
export declare const Box: <T extends React.ElementType = "div">({ as, padding, paddingInline, paddingInlineStart, paddingInlineEnd, paddingBlockEnd, paddingBlockStart, borderRadius, children, style, htmlAttributes, ref, }: PolymorphicCommonProps<T, BaseBoxProps>) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare const Box: <T extends React.ElementType = "div">({ as, padding, paddingInline, paddingInlineStart, paddingInlineEnd, paddingBlockEnd, paddingBlockStart, borderRadius, children, style, htmlAttributes, ref, ...restProps }: PolymorphicCommonProps<T, BaseBoxProps>) => import("react/jsx-runtime").JSX.Element;
|
|
56
56
|
export {};
|
|
57
57
|
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../src/box/Box.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,MAAM,EACX,KAAK,OAAO,EACb,MAAM,kBAAkB,CAAC;AAG1B,KAAK,YAAY,GAAG;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EAAE
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../src/box/Box.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,MAAM,EACX,KAAK,OAAO,EACb,MAAM,kBAAkB,CAAC;AAG1B,KAAK,YAAY,GAAG;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EAAE,4KActD,sBAAsB,CAAC,CAAC,EAAE,YAAY,CAAC,4CAuBzC,CAAC"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { type StoryObj } from '@storybook/react-vite';
|
|
22
22
|
declare const componentMeta: {
|
|
23
|
-
component: <T extends React.ElementType = "div">({ as, padding, paddingInline, paddingInlineStart, paddingInlineEnd, paddingBlockEnd, paddingBlockStart, borderRadius, children, style, htmlAttributes, ref, }: import("../../_common/types").PolymorphicCommonProps<T, {
|
|
23
|
+
component: <T extends React.ElementType = "div">({ as, padding, paddingInline, paddingInlineStart, paddingInlineEnd, paddingBlockEnd, paddingBlockStart, borderRadius, children, style, htmlAttributes, ref, ...restProps }: import("../../_common/types").PolymorphicCommonProps<T, {
|
|
24
24
|
padding?: import("../../_common/types").Spacing;
|
|
25
25
|
paddingBlockStart?: import("../../_common/types").Spacing;
|
|
26
26
|
paddingBlockEnd?: import("../../_common/types").Spacing;
|
|
@@ -86,11 +86,11 @@ type BreadcrumbsLinkProps = InteractiveBreadcrumbProps & {
|
|
|
86
86
|
*/
|
|
87
87
|
ariaCurrent?: React.AriaAttributes['aria-current'];
|
|
88
88
|
};
|
|
89
|
-
declare const Breadcrumbs: (({ children, className, htmlAttributes, style, ref, shouldWrap, }: CommonProps<"nav", BreadcrumbsProps>) => import("react/jsx-runtime").JSX.Element) & {
|
|
89
|
+
declare const Breadcrumbs: (({ children, className, htmlAttributes, style, ref, shouldWrap, ...restProps }: CommonProps<"nav", BreadcrumbsProps>) => import("react/jsx-runtime").JSX.Element) & {
|
|
90
90
|
Button: <T extends React.ElementType = "button">({ children, as, className, style, htmlAttributes, ref, leadingElement, trailingElement, ...restProps }: PolymorphicCommonProps<T, BreadcrumbsButtonProps>) => import("react/jsx-runtime").JSX.Element;
|
|
91
|
-
Item: ({ children, className, style, htmlAttributes, ref, }: CommonProps<"li", BreadcrumbsItemProps>) => import("react/jsx-runtime").JSX.Element;
|
|
91
|
+
Item: ({ children, className, style, htmlAttributes, ref, ...restProps }: CommonProps<"li", BreadcrumbsItemProps>) => import("react/jsx-runtime").JSX.Element;
|
|
92
92
|
Link: <T extends React.ElementType = "a">({ children, as, className, style, htmlAttributes, ariaCurrent, ref, ...restProps }: PolymorphicCommonProps<T, BreadcrumbsLinkProps>) => import("react/jsx-runtime").JSX.Element;
|
|
93
|
-
SelectButton: ({ onClick, children, className, style, htmlAttributes, ariaLabel, ref, }: CommonProps<"button", BreadcrumbsSelectButtonProps>) => import("react/jsx-runtime").JSX.Element;
|
|
93
|
+
SelectButton: ({ onClick, children, className, style, htmlAttributes, ariaLabel, ref, ...restProps }: CommonProps<"button", BreadcrumbsSelectButtonProps>) => import("react/jsx-runtime").JSX.Element;
|
|
94
94
|
};
|
|
95
95
|
export { Breadcrumbs };
|
|
96
96
|
//# sourceMappingURL=Breadcrumbs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAC;AAE1B,KAAK,gBAAgB,GAAG;IACtB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,6BAA6B;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAC;AAE1B,KAAK,gBAAgB,GAAG;IACtB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,6BAA6B;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AA6BF,KAAK,0BAA0B,GAAG;IAChC,mBAAmB,EAAE,OAAO,CAAC;CAC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E,KAAK,CAAC,aAAa,CAAC;IAC5B,uBAAuB;IACvB,cAAc,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;CAC3C,CAAC;AAmCF,KAAK,oBAAoB,GAAG,0BAA0B,GAAG;IACvD;;;OAGG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;CACpD,CAAC;AAsCF,QAAA,MAAM,WAAW,mFAhPd,WAAW,CAAC,KAAK,EAAE,gBAAgB,CAAC;aAyGZ,CAAC,SAAS,KAAK,CAAC,WAAW,qHAUnD,sBAAsB,CAAC,CAAC,EAAE,sBAAsB,CAAC;8EAnEjD,WAAW,CAAC,IAAI,EAAE,oBAAoB,CAAC;WA4JjB,CAAC,SAAS,KAAK,CAAC,WAAW,4FASjD,sBAAsB,CAAC,CAAC,EAAE,oBAAoB,CAAC;0GAzC/C,WAAW,CAAC,QAAQ,EAAE,4BAA4B,CAAC;CAyEpD,CAAC;AAEH,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { type StoryObj } from '@storybook/react-vite';
|
|
22
22
|
declare const componentMeta: {
|
|
23
|
-
component: (({ children, className, htmlAttributes, style, ref, shouldWrap, }: import("../../_common/types").CommonProps<"nav", {
|
|
23
|
+
component: (({ children, className, htmlAttributes, style, ref, shouldWrap, ...restProps }: import("../../_common/types").CommonProps<"nav", {
|
|
24
24
|
children?: React.ReactNode;
|
|
25
25
|
shouldWrap?: boolean;
|
|
26
26
|
}>) => import("react/jsx-runtime").JSX.Element) & {
|
|
@@ -39,7 +39,7 @@ declare const componentMeta: {
|
|
|
39
39
|
leadingElement?: React.ReactNode;
|
|
40
40
|
trailingElement?: React.ReactNode;
|
|
41
41
|
}>) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
-
Item: ({ children, className, style, htmlAttributes, ref, }: import("../../_common/types").CommonProps<"li", {
|
|
42
|
+
Item: ({ children, className, style, htmlAttributes, ref, ...restProps }: import("../../_common/types").CommonProps<"li", {
|
|
43
43
|
children?: React.ReactNode;
|
|
44
44
|
}>) => import("react/jsx-runtime").JSX.Element;
|
|
45
45
|
Link: <T extends React.ElementType = "a">({ children, as, className, style, htmlAttributes, ariaCurrent, ref, ...restProps }: import("../../_common/types").PolymorphicCommonProps<T, ({
|
|
@@ -56,7 +56,7 @@ declare const componentMeta: {
|
|
|
56
56
|
})) & {
|
|
57
57
|
ariaCurrent?: React.AriaAttributes["aria-current"];
|
|
58
58
|
}>) => import("react/jsx-runtime").JSX.Element;
|
|
59
|
-
SelectButton: ({ onClick, children, className, style, htmlAttributes, ariaLabel, ref, }: import("../../_common/types").CommonProps<"button", {
|
|
59
|
+
SelectButton: ({ onClick, children, className, style, htmlAttributes, ariaLabel, ref, ...restProps }: import("../../_common/types").CommonProps<"button", {
|
|
60
60
|
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
61
61
|
ariaLabel: string;
|
|
62
62
|
children?: React.ReactNode;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
22
|
-
import { ButtonBase } from '
|
|
22
|
+
import { ButtonBase } from '..';
|
|
23
23
|
declare const componentMeta: Meta<typeof ButtonBase>;
|
|
24
24
|
export default componentMeta;
|
|
25
25
|
type Story = StoryObj<typeof componentMeta>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.stories.d.ts","sourceRoot":"","sources":["../../../../src/button/stories/button.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"button.stories.d.ts","sourceRoot":"","sources":["../../../../src/button/stories/button.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAkBhC,QAAA,MAAM,aAAa,EAAE,IAAI,CAAC,OAAO,UAAU,CAcR,CAAC;AAEpC,eAAe,aAAa,CAAC;AAC7B,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5C,eAAO,MAAM,KAAK,EAAE,KAYnB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAY/B,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAYnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAYtB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAYtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAYtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIzE,KAAK,aAAa,GAAG;IACnB,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4CAA4C;IAC5C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yFAAyF;IACzF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gCAAgC;IAChC,KAAK,CAAC,EAAE,cAAc,CAA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AAC;IAC1B,sEAAsE;IACtE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,mEAAmE;IACnE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC/D,GAAG,CACA;IACE,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,kGAAkG;IAClG,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,GACD;IACE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB,CACJ,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,yLAiBtB,WAAW,CAAC,OAAO,EAAE,aAAa,CAAC,4CAsErC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClipboardButton.d.ts","sourceRoot":"","sources":["../../../src/clipboard-button/ClipboardButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAM7C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ClipboardButton.d.ts","sourceRoot":"","sources":["../../../src/clipboard-button/ClipboardButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAM7C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAgMrC,UAAU,oBAAoB;IAC5B,qDAAqD;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC;IACtE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,cAAc,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC;IAC1D,IAAI,CAAC,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,aAAa,CAAC;CAChE;AAED,eAAO,MAAM,eAAe,GAAI,uEAO7B,oBAAoB,4CA8CtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../src/color-picker/ColorPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,QAAQ,EAEb,KAAK,SAAS,EAKd,KAAK,SAAS,EAKf,MAAM,kBAAkB,CAAC;AAS1B,KAAK,gBAAgB,GAAG;IACtB,iJAAiJ;IACjJ,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACxC,wHAAwH;IACxH,QAAQ,CAAC,EAAE,CAAC,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC,EAAE,CAAC;IAChD,8GAA8G;IAC9G,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mKAAmK;IACnK,QAAQ,EAAE,CAAC,QAAQ,EAAE;QACnB,GAAG,EAAE,QAAQ,CAAC;QACd,GAAG,EAAE,SAAS,CAAC;QACf,IAAI,EAAE,SAAS,CAAC;KACjB,KAAK,IAAI,CAAC;IACX,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../src/color-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