@cube-dev/ui-kit 0.0.0-canary-31b0e8c → 0.0.0-canary-3f57cd4
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/dist/CHANGELOG.md +28 -0
- package/dist/_internal/hooks/use-chained-callback.js +1 -1
- package/dist/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/Button.js +2 -2
- package/dist/components/actions/Button/Button.js.map +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +1 -1
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuSection.js +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/use-action.js +1 -1
- package/dist/components/actions/use-anchored-menu.js +1 -1
- package/dist/components/actions/use-context-menu.js +1 -1
- package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
- package/dist/components/content/Alert/Alert.js +1 -1
- package/dist/components/content/Alert/use-alert.js +1 -1
- package/dist/components/content/Avatar/Avatar.js +1 -1
- package/dist/components/content/Badge/Badge.js +1 -1
- package/dist/components/content/Card/Card.js +1 -1
- package/dist/components/content/Content.js +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +1 -1
- package/dist/components/content/Divider.js +1 -1
- package/dist/components/content/Footer.js +1 -1
- package/dist/components/content/Header.js +1 -1
- package/dist/components/content/HotKeys/HotKeys.js +1 -1
- package/dist/components/content/Item/Item.js +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +1 -1
- package/dist/components/content/Text.d.ts +28 -28
- package/dist/components/content/Text.js +1 -1
- package/dist/components/content/TextItem/TextItem.js +1 -1
- package/dist/components/content/Title.js +1 -1
- package/dist/components/content/Tree/Tree.js +1 -1
- package/dist/components/content/Tree/TreeNode.js +1 -1
- package/dist/components/content/Tree/styled.js +1 -1
- package/dist/components/content/Tree/tree-index.js +1 -1
- package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
- package/dist/components/content/Tree/use-load-data.js +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.js +1 -1
- package/dist/components/fields/Checkbox/Checkbox.js +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DatePicker.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/intl.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +5 -3
- package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +4 -2
- package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/DraggableListBox.js +24 -0
- package/dist/components/fields/ListBox/DraggableListBox.js.map +1 -0
- package/dist/components/fields/ListBox/ListBox.d.ts +11 -0
- package/dist/components/fields/ListBox/ListBox.js +247 -12
- package/dist/components/fields/ListBox/ListBox.js.map +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/fields/Picker/Picker.js +1 -1
- package/dist/components/fields/RadioGroup/Radio.js +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.js +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/TextArea/TextArea.js +1 -1
- package/dist/components/fields/TextInput/TextInput.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/FieldWrapper/extract-field-wrapper-props.js +1 -1
- package/dist/components/form/Form/Field.js +1 -1
- package/dist/components/form/Form/Form.js +1 -1
- package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
- package/dist/components/form/Form/SubmitError.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/use-field/use-field-props.js +1 -1
- package/dist/components/form/Form/use-field/use-field.js +1 -1
- package/dist/components/form/Form/use-form.js +1 -1
- package/dist/components/form/Form/validation.js +1 -1
- package/dist/components/form/Label.js +1 -1
- package/dist/components/form/wrapper.js +1 -1
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/layout/Flex.js +1 -1
- package/dist/components/layout/Flow.js +1 -1
- package/dist/components/layout/Grid.js +1 -1
- package/dist/components/layout/Panel.js +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +11 -60
- package/dist/components/navigation/Tabs/DraggableTabList.js.map +1 -1
- package/dist/components/navigation/Tabs/EditableTitle.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +4 -2
- package/dist/components/navigation/Tabs/TabPicker.js.map +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +4 -2
- package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +1 -1
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
- package/dist/components/organisms/FileTabs/FileTabs.js +1 -1
- package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
- package/dist/components/other/Calendar/Calendar.js +1 -1
- package/dist/components/other/Calendar/CalendarCell.js +1 -1
- package/dist/components/other/Calendar/CalendarGrid.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/CloudLogo/CloudLogo.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
- package/dist/components/overlays/Dialog/Dialog.js +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
- package/dist/components/overlays/Modal/Modal.js +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/Overlay.js +1 -1
- package/dist/components/overlays/Modal/Popover.js +1 -1
- package/dist/components/overlays/Modal/Tray.js +1 -1
- package/dist/components/overlays/Modal/Underlay.js +1 -1
- package/dist/components/overlays/Notifications/Notification.js +1 -1
- package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
- package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
- package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
- package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
- package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
- package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
- package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
- package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
- package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
- package/dist/components/overlays/Notifications/index.js +1 -1
- package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
- package/dist/components/overlays/Notifications/use-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
- package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
- package/dist/components/overlays/Toast/ToastItem.js +1 -1
- package/dist/components/overlays/Toast/index.js +1 -1
- package/dist/components/overlays/Toast/useProgressToast.js +1 -1
- package/dist/components/overlays/Toast/useToast.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
- package/dist/components/overlays/Tooltip/context.js +1 -1
- package/dist/components/portal/Portal.js +1 -1
- package/dist/components/portal/PortalProvider.js +1 -1
- package/dist/components/portal/usePortal.js +1 -1
- package/dist/components/shared/DraggableCollection.js +77 -0
- package/dist/components/shared/DraggableCollection.js.map +1 -0
- package/dist/components/shared/InvalidIcon.js +1 -1
- package/dist/components/shared/ValidIcon.js +1 -1
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- package/dist/components/status/Spin/Cube.js +1 -1
- package/dist/components/status/Spin/InternalSpinner.js +1 -1
- package/dist/components/status/Spin/Spin.js +1 -1
- package/dist/components/status/Spin/SpinsContainer.js +1 -1
- package/dist/data/item-themes.js +1 -1
- package/dist/data/themes.js +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
- package/dist/icons/AdjustmentsIcon.js +1 -1
- package/dist/icons/AiIcon.js +1 -1
- package/dist/icons/AreaChartIcon.js +1 -1
- package/dist/icons/BackwardIcon.js +1 -1
- package/dist/icons/BarChartIcon.js +1 -1
- package/dist/icons/BellFilledIcon.js +1 -1
- package/dist/icons/BellIcon.js +1 -1
- package/dist/icons/BooleanIcon.js +1 -1
- package/dist/icons/CalendarEditIcon.js +1 -1
- package/dist/icons/CalendarIcon.js +1 -1
- package/dist/icons/CaretDownIcon.js +1 -1
- package/dist/icons/CaretUpIcon.js +1 -1
- package/dist/icons/ChartAreaStackedIcon.js +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarGroupedIcon.js +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarLineIcon.js +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js +1 -1
- package/dist/icons/ChartBoxPlotIcon.js +1 -1
- package/dist/icons/ChartBubbleIcon.js +1 -1
- package/dist/icons/ChartDonut2Icon.js +1 -1
- package/dist/icons/ChartFunnelIcon.js +1 -1
- package/dist/icons/ChartHeatmapIcon.js +1 -1
- package/dist/icons/ChartKPIIcon.js +1 -1
- package/dist/icons/ChartPie2Icon.js +1 -1
- package/dist/icons/ChartScatterIcon.js +1 -1
- package/dist/icons/CheckCircleFilledIcon.js +1 -1
- package/dist/icons/CheckCircleIcon.js +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CircleFilledIcon.js +1 -1
- package/dist/icons/ClearIcon.js +1 -1
- package/dist/icons/CloseCircleFilledIcon.js +1 -1
- package/dist/icons/CloseCircleIcon.js +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/CodeIcon.js +1 -1
- package/dist/icons/ColumnTotalIcon.js +1 -1
- package/dist/icons/CopyIcon.js +1 -1
- package/dist/icons/CountIcon.js +1 -1
- package/dist/icons/CubeIcon.js +1 -1
- package/dist/icons/CubePauseIcon.js +1 -1
- package/dist/icons/CubePlayIcon.js +1 -1
- package/dist/icons/CurrencyDollarIcon.js +1 -1
- package/dist/icons/DangerIcon.js +1 -1
- package/dist/icons/DashboardIcon.js +1 -1
- package/dist/icons/DatabaseIcon.js +1 -1
- package/dist/icons/DecimalDecreaseIcon.js +1 -1
- package/dist/icons/DecimalIncreaseIcon.js +1 -1
- package/dist/icons/DirectionIcon.js +1 -1
- package/dist/icons/DonutIcon.js +1 -1
- package/dist/icons/DownIcon.js +1 -1
- package/dist/icons/EditIcon.js +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
- package/dist/icons/ExclamationCircleIcon.js +1 -1
- package/dist/icons/ExclamationIcon.js +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeInvisibleIcon.js +1 -1
- package/dist/icons/FilterIcon.js +1 -1
- package/dist/icons/FolderFilledIcon.js +1 -1
- package/dist/icons/FolderIcon.js +1 -1
- package/dist/icons/FolderOpenFilledIcon.js +1 -1
- package/dist/icons/FolderOpenIcon.js +1 -1
- package/dist/icons/ForwardIcon.js +1 -1
- package/dist/icons/GripVerticalIcon.d.ts +12 -0
- package/dist/icons/GripVerticalIcon.js +11 -0
- package/dist/icons/GripVerticalIcon.js.map +1 -0
- package/dist/icons/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/InfoCircleIcon.js +1 -1
- package/dist/icons/InfoIcon.js +1 -1
- package/dist/icons/KeyIcon.js +1 -1
- package/dist/icons/LeftIcon.js +1 -1
- package/dist/icons/LineChartIcon.js +1 -1
- package/dist/icons/LoadingIcon.js +1 -1
- package/dist/icons/LockFilledIcon.js +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/MoreIcon.js +1 -1
- package/dist/icons/NotAllowedIcon.js +1 -1
- package/dist/icons/Number123Icon.js +1 -1
- package/dist/icons/NumberIcon.js +1 -1
- package/dist/icons/PauseCircleFilledIcon.js +1 -1
- package/dist/icons/PauseCircleIcon.js +1 -1
- package/dist/icons/PauseIcon.js +1 -1
- package/dist/icons/PercentageIcon.js +1 -1
- package/dist/icons/PieChartIcon.js +1 -1
- package/dist/icons/PlayCircleIcon.js +1 -1
- package/dist/icons/PlayIcon.js +1 -1
- package/dist/icons/PlusIcon.js +1 -1
- package/dist/icons/ProgressBarIcon.js +1 -1
- package/dist/icons/ReloadIcon.js +1 -1
- package/dist/icons/ReportIcon.js +1 -1
- package/dist/icons/ReturnIcon.js +1 -1
- package/dist/icons/RightIcon.js +1 -1
- package/dist/icons/RowTotalsIcon.js +1 -1
- package/dist/icons/SchemeIcon.js +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/SemanticQueryIcon.js +1 -1
- package/dist/icons/SettingsIcon.js +1 -1
- package/dist/icons/ShieldFilledIcon.js +1 -1
- package/dist/icons/ShieldIcon.js +1 -1
- package/dist/icons/SlashIcon.js +1 -1
- package/dist/icons/SparklesIcon.js +1 -1
- package/dist/icons/SqlIcon.js +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/StopIcon.js +1 -1
- package/dist/icons/StringIcon.js +1 -1
- package/dist/icons/SubtotalsIcon.js +1 -1
- package/dist/icons/SwitchIcon.js +1 -1
- package/dist/icons/TableIcon.js +1 -1
- package/dist/icons/ThumbsDownIcon.js +1 -1
- package/dist/icons/ThumbsUpIcon.js +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js +1 -1
- package/dist/icons/ThunderboltFilledIcon.js +1 -1
- package/dist/icons/ThunderboltIcon.js +1 -1
- package/dist/icons/TimeIcon.js +1 -1
- package/dist/icons/TrashIcon.js +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UpIcon.js +1 -1
- package/dist/icons/UserGroupIcon.js +1 -1
- package/dist/icons/UserIcon.js +1 -1
- package/dist/icons/UserLockIcon.js +1 -1
- package/dist/icons/ViewIcon.js +1 -1
- package/dist/icons/WarningFilledIcon.js +1 -1
- package/dist/icons/WarningIcon.js +1 -1
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/wrap-icon.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/provider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/shadows.js +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/typography.js +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/useCombinedRefs.js +1 -1
- package/dist/utils/react/useControlledFocusVisible.js +1 -1
- package/dist/utils/react/useEventBus.js +1 -1
- package/dist/utils/react/useId.js +1 -1
- package/dist/utils/react/useIsDarwin.js +1 -1
- package/dist/utils/react/useKeySymbols.js +1 -1
- package/dist/utils/react/useLayoutEffect.js +1 -1
- package/dist/utils/react/useLocalStorage.js +1 -1
- package/dist/utils/react/useMergeStyles.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +2 -2
- package/docs/components/navigation/Tabs.md +125 -50
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DraggableListBox.js","names":[],"sources":["../../../../src/components/fields/ListBox/DraggableListBox.tsx"],"sourcesContent":["import { ReactNode, RefObject } from 'react';\nimport {\n DraggableCollectionState,\n DroppableCollectionState,\n ListState,\n} from 'react-stately';\n\nimport { DraggableCollection } from '../../shared/DraggableCollection';\n\n// =============================================================================\n// Types\n// =============================================================================\n\nexport interface DraggableListBoxProps {\n /** List state from React Stately (useListState) */\n state: Pick<\n ListState<any>,\n 'collection' | 'selectionManager' | 'disabledKeys'\n >;\n /** Ref to the list container element */\n listRef: RefObject<HTMLElement | null>;\n /** Current ordered keys */\n orderedKeys: string[];\n /** Callback when items are reordered */\n onReorder?: (newOrder: string[]) => void;\n /** Render function that receives drag/drop states */\n children: (\n dragState: DraggableCollectionState,\n dropState: DroppableCollectionState,\n collectionProps: Record<string, unknown>,\n ) => ReactNode;\n}\n\n// =============================================================================\n// Component\n// =============================================================================\n\n/**\n * Wrapper that enables drag-and-drop reordering for a vertical ListBox.\n *\n * Thin wrapper around DraggableCollection with vertical orientation.\n */\nexport function DraggableListBox({\n state,\n listRef,\n orderedKeys,\n onReorder,\n children,\n}: DraggableListBoxProps) {\n return (\n <DraggableCollection\n state={state}\n listRef={listRef}\n orderedKeys={orderedKeys}\n orientation=\"vertical\"\n onReorder={onReorder}\n >\n {children}\n </DraggableCollection>\n );\n}\n"],"mappings":";;;;;;;;;;AA0CA,SAAgB,iBAAiB,EAC/B,OACA,SACA,aACA,WACA,YACwB;AACxB,QACE,oBAAC;EACQ;EACE;EACI;EACb,aAAY;EACD;EAEV;GACmB"}
|
|
@@ -119,6 +119,17 @@ interface CubeListBoxProps<T> extends AriaListBoxProps<T>, CollectionBase<T>, Fi
|
|
|
119
119
|
* Defaults to 'card'.
|
|
120
120
|
*/
|
|
121
121
|
shape?: 'card' | 'plain' | 'popover';
|
|
122
|
+
/**
|
|
123
|
+
* Enable drag-and-drop reordering of list items.
|
|
124
|
+
* When enabled, virtualization is disabled and each item gets a drag handle.
|
|
125
|
+
* @default false
|
|
126
|
+
*/
|
|
127
|
+
isReorderable?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Callback when items are reordered via drag-and-drop.
|
|
130
|
+
* Called with the new array of item keys in their new order.
|
|
131
|
+
*/
|
|
132
|
+
onReorder?: (newOrder: string[]) => void;
|
|
122
133
|
}
|
|
123
134
|
declare const ListBox: (<T>(props: CubeListBoxProps<T> & {
|
|
124
135
|
ref?: ForwardedRef<HTMLDivElement>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-3f57cd4 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
@@ -9,15 +9,17 @@ import { useWarn } from "../../../_internal/hooks/use-warn.js";
|
|
|
9
9
|
import { useProviderProps } from "../../../provider.js";
|
|
10
10
|
import { _CollectionItem, filterCollectionItemProps } from "../../CollectionItem.js";
|
|
11
11
|
import { _Item } from "../../content/Item/Item.js";
|
|
12
|
+
import { GripVerticalIcon } from "../../../icons/GripVerticalIcon.js";
|
|
12
13
|
import { StyledDivider, StyledFooter, StyledHeader, StyledSectionHeading } from "../../actions/Menu/styled.js";
|
|
13
14
|
import { SIZES, SIZE_NAME_TO_KEY } from "../../../tokens/sizes.js";
|
|
14
15
|
import { useFormProps } from "../../form/Form/Form.js";
|
|
15
16
|
import { useFieldProps } from "../../form/Form/use-field/use-field-props.js";
|
|
16
17
|
import { wrapWithField } from "../../form/wrapper.js";
|
|
18
|
+
import { DraggableListBox } from "./DraggableListBox.js";
|
|
17
19
|
import { BASE_STYLES, COLOR_STYLES, OUTER_STYLES, mergeStyles, tasty } from "@tenphi/tasty";
|
|
18
20
|
import { forwardRef, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
19
21
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
-
import { useKeyboard, useListBox, useListBoxSection, useOption } from "react-aria";
|
|
22
|
+
import { useDraggableItem, useDropIndicator, useKeyboard, useListBox, useListBoxSection, useOption } from "react-aria";
|
|
21
23
|
import { Section, useListState } from "react-stately";
|
|
22
24
|
import { IconMinus } from "@tabler/icons-react";
|
|
23
25
|
import { useHover as useHover$1 } from "@react-aria/interactions";
|
|
@@ -82,11 +84,65 @@ const ListBoxScrollElement = tasty({
|
|
|
82
84
|
const ListBoxItem = tasty(_Item, {
|
|
83
85
|
as: "li",
|
|
84
86
|
disableActionsFocus: true,
|
|
85
|
-
styles: {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
styles: {
|
|
88
|
+
margin: {
|
|
89
|
+
"": "0 0 1bw 0",
|
|
90
|
+
":last-of-type": "0",
|
|
91
|
+
all: ".5x"
|
|
92
|
+
},
|
|
93
|
+
display: "grid",
|
|
94
|
+
position: "relative",
|
|
95
|
+
paddingLeft: {
|
|
96
|
+
"": false,
|
|
97
|
+
draggable: "(1x + 14px)"
|
|
98
|
+
},
|
|
99
|
+
opacity: {
|
|
100
|
+
"": false,
|
|
101
|
+
dragging: ".5"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
const DragHandleElement = tasty({
|
|
106
|
+
as: "div",
|
|
107
|
+
styles: {
|
|
108
|
+
position: "absolute",
|
|
109
|
+
left: "(.5x - 1bw)",
|
|
110
|
+
top: 0,
|
|
111
|
+
bottom: 0,
|
|
112
|
+
width: "(1x + 14px)",
|
|
113
|
+
display: "grid",
|
|
114
|
+
placeItems: "center",
|
|
115
|
+
color: "#dark-04",
|
|
116
|
+
opacity: {
|
|
117
|
+
"": ".4",
|
|
118
|
+
":hover": "1"
|
|
119
|
+
},
|
|
120
|
+
transition: "opacity .15s",
|
|
121
|
+
cursor: "grab"
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
const ListBoxDropIndicatorElement = tasty({
|
|
125
|
+
as: "li",
|
|
126
|
+
styles: {
|
|
127
|
+
zIndex: 10,
|
|
128
|
+
position: "relative",
|
|
129
|
+
pointerEvents: "none",
|
|
130
|
+
height: 0,
|
|
131
|
+
opacity: {
|
|
132
|
+
"": 0,
|
|
133
|
+
"drop-target": 1
|
|
134
|
+
},
|
|
135
|
+
Indicator: {
|
|
136
|
+
$: ">",
|
|
137
|
+
position: "absolute",
|
|
138
|
+
left: ".5x",
|
|
139
|
+
right: ".5x",
|
|
140
|
+
top: "-1px",
|
|
141
|
+
height: "2px",
|
|
142
|
+
fill: "#primary",
|
|
143
|
+
radius: "round"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
90
146
|
});
|
|
91
147
|
const SectionWrapperElement = tasty({
|
|
92
148
|
as: "li",
|
|
@@ -240,7 +296,7 @@ const ListBox = forwardRef(function ListBox(props, ref) {
|
|
|
240
296
|
};
|
|
241
297
|
return fieldProps;
|
|
242
298
|
} });
|
|
243
|
-
let { qa, label, extra, id, labelStyles, isRequired, necessityIndicator, validationState, isDisabled, listStyles, optionStyles, sectionStyles, headingStyles, listRef, message, description, styles, mods: externalMods, size = "medium", labelSuffix, selectedKey, defaultSelectedKey, selectedKeys, defaultSelectedKeys, shouldUseVirtualFocus, onSelectionChange, disableSelectionToggle = false, stateRef, focusOnHover, header, footer, headerStyles, footerStyles, onEscape, isCheckable, onOptionClick, showSelectAll, selectAllLabel, allValueProps, filter, emptyLabel = "No items", shape = "card", form, ...otherProps } = props;
|
|
299
|
+
let { qa, label, extra, id, labelStyles, isRequired, necessityIndicator, validationState, isDisabled, listStyles, optionStyles, sectionStyles, headingStyles, listRef, message, description, styles, mods: externalMods, size = "medium", labelSuffix, selectedKey, defaultSelectedKey, selectedKeys, defaultSelectedKeys, shouldUseVirtualFocus, onSelectionChange, disableSelectionToggle = false, stateRef, focusOnHover, header, footer, headerStyles, footerStyles, onEscape, isCheckable, onOptionClick, showSelectAll, selectAllLabel, allValueProps, filter, emptyLabel = "No items", shape = "card", isReorderable = false, onReorder, form, ...otherProps } = props;
|
|
244
300
|
const [, forceUpdate] = useState({});
|
|
245
301
|
const lastSelectedKeyRef = useRef(null);
|
|
246
302
|
const externalSelectionHandler = onSelectionChange || props.onChange;
|
|
@@ -352,20 +408,20 @@ const ListBox = forwardRef(function ListBox(props, ref) {
|
|
|
352
408
|
styles = extractStyles(otherProps, PROP_STYLES, styles);
|
|
353
409
|
ref = useCombinedRefs(ref);
|
|
354
410
|
listRef = useCombinedRefs(listRef);
|
|
411
|
+
const itemsArray = useMemo(() => [...listState.collection], [listState.collection]);
|
|
412
|
+
const hasSections = useMemo(() => itemsArray.some((i) => i.type === "section"), [itemsArray]);
|
|
413
|
+
const shouldVirtualize = !hasSections && !isReorderable;
|
|
355
414
|
const { listBoxProps } = useListBox({
|
|
356
415
|
...props,
|
|
357
416
|
id,
|
|
358
417
|
"aria-label": props["aria-label"] || label?.toString(),
|
|
359
418
|
isDisabled,
|
|
360
|
-
isVirtualized:
|
|
419
|
+
isVirtualized: shouldVirtualize,
|
|
361
420
|
shouldUseVirtualFocus: shouldUseVirtualFocus ?? false,
|
|
362
421
|
escapeKeyBehavior: onEscape ? "none" : "clearSelection"
|
|
363
422
|
}, listState, listRef);
|
|
364
423
|
const { isFocused, focusProps } = useFocus$1({ isDisabled });
|
|
365
424
|
const isInvalid = validationState === "invalid";
|
|
366
|
-
const itemsArray = useMemo(() => [...listState.collection], [listState.collection]);
|
|
367
|
-
const hasSections = useMemo(() => itemsArray.some((i) => i.type === "section"), [itemsArray]);
|
|
368
|
-
const shouldVirtualize = !hasSections;
|
|
369
425
|
const itemsArrayRef = useRef(itemsArray);
|
|
370
426
|
itemsArrayRef.current = itemsArray;
|
|
371
427
|
const scrollRef = useRef(null);
|
|
@@ -411,6 +467,10 @@ const ListBox = forwardRef(function ListBox(props, ref) {
|
|
|
411
467
|
});
|
|
412
468
|
}, [listState.selectionManager.focusedKey, itemsArray]);
|
|
413
469
|
const mergedListBoxProps = mergeProps$1(listBoxProps, keyboardProps);
|
|
470
|
+
const orderedKeys = useMemo(() => {
|
|
471
|
+
if (!isReorderable) return [];
|
|
472
|
+
return itemsArray.filter((i) => i.type === "item").map((i) => String(i.key));
|
|
473
|
+
}, [isReorderable, itemsArray]);
|
|
414
474
|
const mods = useMemo(() => ({
|
|
415
475
|
invalid: isInvalid,
|
|
416
476
|
valid: validationState === "valid",
|
|
@@ -465,6 +525,35 @@ const ListBox = forwardRef(function ListBox(props, ref) {
|
|
|
465
525
|
size,
|
|
466
526
|
padding: "(.5x - 1bw)",
|
|
467
527
|
children: emptyLabel
|
|
528
|
+
}) : isReorderable ? /* @__PURE__ */ jsx(DraggableListBox, {
|
|
529
|
+
state: listState,
|
|
530
|
+
listRef,
|
|
531
|
+
orderedKeys,
|
|
532
|
+
onReorder,
|
|
533
|
+
children: (dragState, dropState, collectionProps) => /* @__PURE__ */ jsx(ListElement, {
|
|
534
|
+
qa: qa || "ListBox",
|
|
535
|
+
...mergeProps$1(mergedListBoxProps, collectionProps),
|
|
536
|
+
ref: listRef,
|
|
537
|
+
styles: listStyles,
|
|
538
|
+
"aria-disabled": isDisabled || void 0,
|
|
539
|
+
mods: { sections: false },
|
|
540
|
+
"data-shape": shape,
|
|
541
|
+
"data-input-type": "listbox",
|
|
542
|
+
children: itemsArray.filter((item) => item.type === "item").map((item) => /* @__PURE__ */ jsx(DraggableOption, {
|
|
543
|
+
size,
|
|
544
|
+
item,
|
|
545
|
+
state: listState,
|
|
546
|
+
styles: optionStyles,
|
|
547
|
+
isParentDisabled: isDisabled,
|
|
548
|
+
validationState,
|
|
549
|
+
focusOnHover,
|
|
550
|
+
isCheckable,
|
|
551
|
+
lastFocusSourceRef,
|
|
552
|
+
dragState,
|
|
553
|
+
dropState,
|
|
554
|
+
onClick: onOptionClick
|
|
555
|
+
}, item.key))
|
|
556
|
+
})
|
|
468
557
|
}) : /* @__PURE__ */ jsx(ListElement, {
|
|
469
558
|
qa: qa || "ListBox",
|
|
470
559
|
...mergedListBoxProps,
|
|
@@ -661,6 +750,152 @@ function Option({ size = "medium", item, state, styles, isParentDisabled, valida
|
|
|
661
750
|
children: item.rendered
|
|
662
751
|
});
|
|
663
752
|
}
|
|
753
|
+
function DraggableOption({ size = "medium", item, state, styles, isParentDisabled, validationState, focusOnHover = false, isCheckable, onClick: onOptionClick, lastFocusSourceRef, dragState, dropState }) {
|
|
754
|
+
const localRef = useRef(null);
|
|
755
|
+
const isDisabled = isParentDisabled || state.disabledKeys.has(item.key);
|
|
756
|
+
const isSelected = state.selectionManager.isSelected(item.key);
|
|
757
|
+
const isFocused = state.selectionManager.focusedKey === item.key;
|
|
758
|
+
const { dragProps, isDragging } = useDraggableItem({ key: item.key }, dragState);
|
|
759
|
+
const { hoverProps, isHovered } = useHover$1({ isDisabled });
|
|
760
|
+
const { optionProps, isPressed, labelProps, descriptionProps } = useOption({
|
|
761
|
+
key: item.key,
|
|
762
|
+
isDisabled,
|
|
763
|
+
isSelected,
|
|
764
|
+
shouldSelectOnPressUp: true,
|
|
765
|
+
shouldFocusOnHover: focusOnHover
|
|
766
|
+
}, state, localRef);
|
|
767
|
+
const filteredItemProps = filterCollectionItemProps(item.props);
|
|
768
|
+
const effectiveIcon = useMemo(() => {
|
|
769
|
+
if (!isCheckable || state.selectionManager.selectionMode !== "multiple" || filteredItemProps.icon) return filteredItemProps.icon ?? (state.selectionManager.selectionMode !== "multiple" ? null : void 0);
|
|
770
|
+
return /* @__PURE__ */ jsx(ListBoxCheckboxWrapper, {
|
|
771
|
+
"data-element": "CheckboxWrapper",
|
|
772
|
+
mods: {
|
|
773
|
+
selected: isSelected,
|
|
774
|
+
disabled: isDisabled,
|
|
775
|
+
focused: isFocused,
|
|
776
|
+
hovered: isHovered,
|
|
777
|
+
invalid: validationState === "invalid"
|
|
778
|
+
},
|
|
779
|
+
children: /* @__PURE__ */ jsx(ListBoxCheckbox, {
|
|
780
|
+
"data-element": "Checkbox",
|
|
781
|
+
mods: {
|
|
782
|
+
selected: isSelected,
|
|
783
|
+
disabled: isDisabled,
|
|
784
|
+
focused: isFocused,
|
|
785
|
+
hovered: isHovered,
|
|
786
|
+
invalid: validationState === "invalid"
|
|
787
|
+
},
|
|
788
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {
|
|
789
|
+
size: 12,
|
|
790
|
+
stroke: 3
|
|
791
|
+
})
|
|
792
|
+
})
|
|
793
|
+
});
|
|
794
|
+
}, [
|
|
795
|
+
isCheckable,
|
|
796
|
+
state.selectionManager.selectionMode,
|
|
797
|
+
isSelected,
|
|
798
|
+
isDisabled,
|
|
799
|
+
isFocused,
|
|
800
|
+
isHovered,
|
|
801
|
+
validationState,
|
|
802
|
+
filteredItemProps.icon
|
|
803
|
+
]);
|
|
804
|
+
const handleOptionClick = (e) => {
|
|
805
|
+
if (lastFocusSourceRef) lastFocusSourceRef.current = "mouse";
|
|
806
|
+
if (onOptionClick && isCheckable && state.selectionManager.selectionMode === "multiple") {
|
|
807
|
+
const clickTarget = e.target;
|
|
808
|
+
const checkboxElement = localRef.current?.querySelector("[data-element=\"CheckboxWrapper\"]");
|
|
809
|
+
if (checkboxElement && (checkboxElement === clickTarget || checkboxElement.contains(clickTarget))) {
|
|
810
|
+
optionProps.onClick?.(e);
|
|
811
|
+
state.selectionManager.setFocusedKey(item.key);
|
|
812
|
+
} else {
|
|
813
|
+
optionProps.onClick?.(e);
|
|
814
|
+
state.selectionManager.setFocusedKey(item.key);
|
|
815
|
+
onOptionClick(item.key);
|
|
816
|
+
}
|
|
817
|
+
} else {
|
|
818
|
+
optionProps.onClick?.(e);
|
|
819
|
+
state.selectionManager.setFocusedKey(item.key);
|
|
820
|
+
if (onOptionClick) onOptionClick(item.key);
|
|
821
|
+
}
|
|
822
|
+
};
|
|
823
|
+
const { onKeyDown, onKeyUp, tabIndex, "aria-selected": ariaSelected, "aria-disabled": ariaDisabled, role, ...filteredOptionProps } = optionProps;
|
|
824
|
+
const theme = {
|
|
825
|
+
valid: "success",
|
|
826
|
+
invalid: "danger"
|
|
827
|
+
}[validationState] || "default";
|
|
828
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
829
|
+
/* @__PURE__ */ jsx(ListBoxDropIndicator, {
|
|
830
|
+
target: {
|
|
831
|
+
type: "item",
|
|
832
|
+
key: item.key,
|
|
833
|
+
dropPosition: "before"
|
|
834
|
+
},
|
|
835
|
+
dropState
|
|
836
|
+
}),
|
|
837
|
+
/* @__PURE__ */ jsxs(ListBoxItem, {
|
|
838
|
+
ref: localRef,
|
|
839
|
+
id: `ListBoxItem-${String(item.key)}`,
|
|
840
|
+
"data-key": String(item.key),
|
|
841
|
+
...mergeProps$1(filteredOptionProps, hoverProps, filteredItemProps, dragProps, {
|
|
842
|
+
onClick: handleOptionClick,
|
|
843
|
+
onKeyDown,
|
|
844
|
+
onKeyUp,
|
|
845
|
+
tabIndex,
|
|
846
|
+
"aria-selected": ariaSelected,
|
|
847
|
+
"aria-disabled": ariaDisabled,
|
|
848
|
+
role
|
|
849
|
+
}),
|
|
850
|
+
theme,
|
|
851
|
+
"data-size": size,
|
|
852
|
+
size,
|
|
853
|
+
isSelected,
|
|
854
|
+
isDisabled,
|
|
855
|
+
icon: effectiveIcon,
|
|
856
|
+
labelProps,
|
|
857
|
+
descriptionProps,
|
|
858
|
+
styles: mergeStyles(styles, filteredItemProps.styles),
|
|
859
|
+
defaultTooltipPlacement: "right",
|
|
860
|
+
mods: {
|
|
861
|
+
listboxitem: true,
|
|
862
|
+
focused: isFocused,
|
|
863
|
+
pressed: isPressed,
|
|
864
|
+
dragging: isDragging,
|
|
865
|
+
draggable: true,
|
|
866
|
+
valid: isSelected && validationState === "valid",
|
|
867
|
+
invalid: isSelected && validationState === "invalid",
|
|
868
|
+
checkable: isCheckable,
|
|
869
|
+
hovered: isHovered,
|
|
870
|
+
all: false
|
|
871
|
+
},
|
|
872
|
+
children: [/* @__PURE__ */ jsx(DragHandleElement, {
|
|
873
|
+
"aria-hidden": "true",
|
|
874
|
+
children: /* @__PURE__ */ jsx(GripVerticalIcon, { size: 14 })
|
|
875
|
+
}), item.rendered]
|
|
876
|
+
}),
|
|
877
|
+
/* @__PURE__ */ jsx(ListBoxDropIndicator, {
|
|
878
|
+
target: {
|
|
879
|
+
type: "item",
|
|
880
|
+
key: item.key,
|
|
881
|
+
dropPosition: "after"
|
|
882
|
+
},
|
|
883
|
+
dropState
|
|
884
|
+
})
|
|
885
|
+
] });
|
|
886
|
+
}
|
|
887
|
+
function ListBoxDropIndicator({ target, dropState }) {
|
|
888
|
+
const ref = useRef(null);
|
|
889
|
+
const { dropIndicatorProps, isHidden, isDropTarget } = useDropIndicator({ target }, dropState, ref);
|
|
890
|
+
if (isHidden) return null;
|
|
891
|
+
return /* @__PURE__ */ jsx(ListBoxDropIndicatorElement, {
|
|
892
|
+
ref,
|
|
893
|
+
role: "option",
|
|
894
|
+
...dropIndicatorProps,
|
|
895
|
+
mods: { "drop-target": isDropTarget },
|
|
896
|
+
children: /* @__PURE__ */ jsx("div", { "data-element": "Indicator" })
|
|
897
|
+
});
|
|
898
|
+
}
|
|
664
899
|
function ListBoxSection(props) {
|
|
665
900
|
const { item, state, optionStyles, headingStyles, sectionStyles, isParentDisabled, validationState, focusOnHover, isCheckable, onClick: onOptionClick, lastFocusSourceRef } = props;
|
|
666
901
|
const heading = item.rendered;
|