@cube-dev/ui-kit 0.0.0-canary-69d3ce6 → 0.0.0-canary-30d7fcd
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/_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.d.ts +25 -12
- package/dist/components/CollectionItem.js +59 -4
- package/dist/components/CollectionItem.js.map +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 +2 -2
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.d.ts +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/Button.js +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.d.ts +7 -7
- package/dist/components/actions/CommandMenu/CommandMenu.js +212 -239
- package/dist/components/actions/CommandMenu/CommandMenu.js.map +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +26 -22
- package/dist/components/actions/ItemAction/ItemAction.js.map +1 -1
- package/dist/components/actions/ItemActionContext.d.ts +3 -0
- package/dist/components/actions/ItemActionContext.js +15 -13
- package/dist/components/actions/ItemActionContext.js.map +1 -1
- package/dist/components/actions/ItemActionsWrapper.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.d.ts +2 -2
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.d.ts +9 -9
- package/dist/components/actions/Menu/Menu.js +87 -64
- package/dist/components/actions/Menu/Menu.js.map +1 -1
- package/dist/components/actions/Menu/MenuCollectionItem.d.ts +18 -0
- package/dist/components/actions/Menu/MenuCollectionItem.js +36 -0
- package/dist/components/actions/Menu/MenuCollectionItem.js.map +1 -0
- package/dist/components/actions/Menu/MenuItem.d.ts +1 -0
- package/dist/components/actions/Menu/MenuItem.js +401 -115
- package/dist/components/actions/Menu/MenuItem.js.map +1 -1
- package/dist/components/actions/Menu/MenuSection.d.ts +2 -0
- package/dist/components/actions/Menu/MenuSection.js +31 -33
- package/dist/components/actions/Menu/MenuSection.js.map +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.d.ts +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +2 -2
- package/dist/components/actions/Menu/SubMenuTrigger.js.map +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/index.d.ts +1 -0
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/actions-run.js +1 -1
- package/dist/components/actions/index.d.ts +3 -2
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/use-action.js +60 -36
- package/dist/components/actions/use-action.js.map +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.d.ts +19 -19
- 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/InfoBadge/InfoBadge.js +1 -1
- package/dist/components/content/InlineInput/InlineInput.js +1 -1
- package/dist/components/content/Item/Item.d.ts +7 -7
- package/dist/components/content/Item/Item.js +205 -67
- package/dist/components/content/Item/Item.js.map +1 -1
- package/dist/components/content/Item/ItemWithNativeLinks.js +314 -0
- package/dist/components/content/Item/ItemWithNativeLinks.js.map +1 -0
- package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.d.ts +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/LayoutPanelTransition.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 +14 -14
- 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/types.d.ts +2 -2
- 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/data/DataTable/DataTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
- package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
- package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
- package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-column-widths.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-drag-drop.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-pagination.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-selection.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-sort.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-tree-model.js +1 -1
- package/dist/components/data/TableBase/ColumnResizer.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableView.js +3 -3
- package/dist/components/data/TableBase/TableView.js.map +1 -1
- package/dist/components/data/TableBase/TreeGridTable.js +1 -1
- package/dist/components/data/TableBase/column-header.js +1 -1
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-styles.js +1 -1
- package/dist/components/data/TableBase/column-tint.js +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/styled.d.ts +1 -1
- package/dist/components/data/TableBase/styled.js +1 -1
- package/dist/components/data/TableBase/table-tree.js +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- package/dist/components/data/TableBase/use-column-menu.js +1 -1
- package/dist/components/data/TableBase/use-column-order.js +1 -1
- package/dist/components/data/TableBase/use-column-window.js +57 -119
- package/dist/components/data/TableBase/use-column-window.js.map +1 -1
- package/dist/components/data/TableBase/use-container-width.js +1 -1
- package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
- package/dist/components/data/TableBase/use-scrollability.js +1 -1
- package/dist/components/data/TableBase/use-table-columns.js +1 -1
- package/dist/components/data/TableBase/use-table-search.js +1 -1
- package/dist/components/data/TableBase/use-table-selection.js +1 -1
- package/dist/components/data/TableBase/use-table-sort.js +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +1 -1
- package/dist/components/data/TableBase/use-table-tooltip-refresh.js +17 -19
- package/dist/components/data/TableBase/use-table-tooltip-refresh.js.map +1 -1
- package/dist/components/data/TableBase/use-table-tree-state.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/ColorInput/ColorInput.js +1 -1
- package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
- package/dist/components/fields/CommandTextArea/useCaretAnchor.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/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/period.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 +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.d.ts +2 -2
- package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
- package/dist/components/fields/ListBox/ListBox.js +5 -5
- package/dist/components/fields/ListBox/ListBox.js.map +1 -1
- package/dist/components/fields/ListBox/optionId.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
- package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +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.d.ts +2 -2
- package/dist/components/fields/Picker/Picker.js +1 -1
- package/dist/components/fields/RadioGroup/Radio.d.ts +48 -48
- 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/SearchComboBox/SearchComboBox.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.d.ts +4 -4
- package/dist/components/fields/Select/Select.js +6 -6
- package/dist/components/fields/Select/Select.js.map +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/TagInput/TagInput.js +1 -1
- package/dist/components/fields/TagInput/TagList.js +1 -1
- package/dist/components/fields/TagInput/useActiveOption.js +1 -1
- package/dist/components/fields/TagInput/useTagError.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/TextInput/useAutoSizeTextArea.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/fields/TriggerActions.js +1 -1
- package/dist/components/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/channels.js +1 -1
- package/dist/components/fields/color/color.js +1 -1
- package/dist/components/fields/color/context.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.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/ModernFormRoot.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/backend.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/modern/actions.js +1 -1
- package/dist/components/form/Form/modern/context.js +1 -1
- package/dist/components/form/Form/modern/controller.js +1 -1
- package/dist/components/form/Form/modern/field-binding.js +1 -1
- package/dist/components/form/Form/modern/field.js +1 -1
- package/dist/components/form/Form/modern/react.js +1 -1
- package/dist/components/form/Form/modern/store.js +1 -1
- package/dist/components/form/Form/modern/validation.js +1 -1
- package/dist/components/form/Form/modern/values.js +1 -1
- package/dist/components/form/Form/reset-unbound-controls.js +1 -1
- package/dist/components/form/Form/use-field/use-field-binding.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/legacy-tooltip.js +1 -1
- package/dist/components/form/validation/ValidationIndicator.js +1 -1
- package/dist/components/form/validation/resolve-validation-props.js +1 -1
- package/dist/components/form/validation/use-validation-props.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/Pagination/Pagination.js +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js +1 -1
- package/dist/components/navigation/Tabs/BoardDragActiveProvider.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.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 +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +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/popover-placement.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +1 -1
- package/dist/components/navigation/Tabs/types.d.ts +3 -3
- 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/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/CalendarHeader.js +1 -1
- package/dist/components/other/Calendar/CalendarPanel.js +1 -1
- package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
- package/dist/components/other/Calendar/PeriodGrid.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/Calendar/styled.js +1 -1
- package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
- package/dist/components/other/NoDataIcon/NoDataIcon.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/ModernDialogForm.js +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/default-button-text.js +1 -1
- package/dist/components/overlays/Dialog/use-content-overflow.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/overlays/Tooltip/split-trigger-props.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 +1 -1
- 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/eslint-plugin/defaults.generated.js +2 -2
- package/dist/eslint-plugin/defaults.generated.js.map +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/createFormatter.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +1 -1
- package/dist/i18n/locales/en-US/uikit.js +1 -1
- package/dist/i18n/locales/es-ES/uikit.js +1 -1
- package/dist/i18n/locales/es-MX/uikit.js +1 -1
- package/dist/i18n/locales/fr-FR/uikit.js +1 -1
- package/dist/i18n/locales/it-IT/uikit.js +1 -1
- package/dist/i18n/locales/ja-JP/uikit.js +1 -1
- package/dist/i18n/locales/nb-NO/uikit.js +1 -1
- package/dist/i18n/locales/pt-BR/uikit.js +1 -1
- package/dist/i18n/locales/pt-PT/uikit.js +1 -1
- package/dist/i18n/locales/sv-SE/uikit.js +1 -1
- package/dist/i18n/locales/vi-VN/uikit.js +1 -1
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/useFormatter.js +1 -1
- package/dist/i18n/useI18n.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/ArrowNarrowDownIcon.js +1 -1
- package/dist/icons/ArrowNarrowUpIcon.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.js +1 -1
- 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/PipetteIcon.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/wrap-icon.js +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/index.js +1 -1
- package/dist/probe/canonicalize.js +1 -1
- package/dist/probe/css.js +1 -1
- package/dist/probe/index.js +1 -1
- package/dist/provider.js +2 -2
- package/dist/provider.js.map +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigation-url.js +11 -0
- package/dist/providers/navigation-url.js.map +1 -0
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/providers/use-navigation.js +19 -0
- package/dist/providers/use-navigation.js.map +1 -0
- package/dist/tokens/all-tokens.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/legacy-color.js +1 -1
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +1 -1
- package/dist/tokens/resolve.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/colors.js +1 -1
- package/dist/utils/dotize.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/disabledProps.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/overlayKeyPropagation.js +1 -1
- package/dist/utils/react/programmaticFocus.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/useBufferedValue.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/useOverlayEscapeGuard.js +1 -1
- package/dist/utils/react/usePopoverSync.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useScheme.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/Usage.md +4 -0
- package/docs/components/CollectionItem.md +5 -1
- package/docs/components/actions/CommandMenu.md +46 -18
- package/docs/components/actions/Menu.md +124 -19
- package/docs/components/data/ItemTable.md +0 -2
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-30d7fcd | Cube Dev Team */
|
|
2
2
|
import { extractStyles, mergeStyleLayers } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { LoadingIcon } from "../../../icons/LoadingIcon.js";
|
|
5
|
-
import { _CollectionItem } from "../../CollectionItem.js";
|
|
6
5
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
7
6
|
import { useMenuContext } from "../Menu/context.js";
|
|
7
|
+
import { _MenuCollectionItem, getMenuItemReactKey } from "../Menu/MenuCollectionItem.js";
|
|
8
8
|
import { MenuItem } from "../Menu/MenuItem.js";
|
|
9
9
|
import { StyledDivider, StyledFooter, StyledHeader, StyledMenu } from "../Menu/styled.js";
|
|
10
10
|
import { MenuSection } from "../Menu/MenuSection.js";
|
|
@@ -12,7 +12,7 @@ import { _MenuTrigger } from "../Menu/MenuTrigger.js";
|
|
|
12
12
|
import { StyledCommandMenu, StyledEmptyState, StyledLoadingWrapper, StyledSearchInput } from "./styled.js";
|
|
13
13
|
import { c } from "react/compiler-runtime";
|
|
14
14
|
import { CONTAINER_STYLES, filterBaseProps } from "@tenphi/tasty";
|
|
15
|
-
import React, { useRef, useState } from "react";
|
|
15
|
+
import React, { useId, useRef, useState } from "react";
|
|
16
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { useFilter, useMenu } from "react-aria";
|
|
18
18
|
import { Section, useTreeState } from "react-stately";
|
|
@@ -39,7 +39,7 @@ function getNextEnabledKey(keys, currentKey, direction, isDisabled) {
|
|
|
39
39
|
return ahead.find(isEnabled) ?? ordered.find(isEnabled) ?? null;
|
|
40
40
|
}
|
|
41
41
|
function CommandMenu(props, ref) {
|
|
42
|
-
const $ = c(
|
|
42
|
+
const $ = c(73);
|
|
43
43
|
const { t } = useI18n();
|
|
44
44
|
const { searchPlaceholder: t0, searchValue: controlledSearchValue, onSearchChange, filter: customFilter, emptyLabel: t1, searchInputStyles, headerStyles, footerStyles, isLoading: t2, shouldFilter: t3, autoFocus: t4, size: t5, qa, styles, selectedKeys, defaultSelectedKeys, onSelectionChange, onAction, header, footer, ...restMenuProps } = props;
|
|
45
45
|
let t6;
|
|
@@ -64,6 +64,8 @@ function CommandMenu(props, ref) {
|
|
|
64
64
|
const size = t5 === void 0 ? "medium" : t5;
|
|
65
65
|
const domRef = useObjectRef(ref);
|
|
66
66
|
const searchInputRef = useRef(null);
|
|
67
|
+
const instanceId = useId();
|
|
68
|
+
const menuId = `${qa || "CommandMenu"}-${instanceId}-menu`;
|
|
67
69
|
const contextProps = useMenuContext();
|
|
68
70
|
const ariaSelectedKeys = selectedKeys ? new Set(selectedKeys) : void 0;
|
|
69
71
|
const ariaDefaultSelectedKeys = defaultSelectedKeys ? new Set(defaultSelectedKeys) : void 0;
|
|
@@ -149,48 +151,55 @@ function CommandMenu(props, ref) {
|
|
|
149
151
|
filter: collectionFilter,
|
|
150
152
|
shouldUseVirtualFocus: true
|
|
151
153
|
});
|
|
154
|
+
const itemId = (key_2) => {
|
|
155
|
+
const item_0 = treeState.collection.getItem(key_2);
|
|
156
|
+
const actions = item_0?.props.actions;
|
|
157
|
+
if (item_0?.props.id != null && item_0.props.href == null && (!actions || actions === true)) return String(item_0.props.id);
|
|
158
|
+
return `${menuId}-option-${typeof key_2}-${encodeURIComponent(String(key_2))}`;
|
|
159
|
+
};
|
|
152
160
|
const collectionItems = [...treeState.collection];
|
|
153
161
|
collectionItems.some(_temp6);
|
|
154
|
-
const
|
|
155
|
-
const focusedKeyRef = useRef(null);
|
|
162
|
+
const focusedKey = treeState.selectionManager.focusedKey;
|
|
156
163
|
const filteredCollectionItems = [...collectionFilter(collectionItems)];
|
|
157
164
|
const hasFilteredItems = filteredCollectionItems.length > 0;
|
|
158
165
|
const viewHasSections = filteredCollectionItems.some(_temp7);
|
|
159
|
-
const findFirstSelectableItem = () => collectItemKeys(filteredCollectionItems).find((
|
|
166
|
+
const findFirstSelectableItem = () => collectItemKeys(filteredCollectionItems).find((key_3) => !treeState.selectionManager.isDisabled(key_3)) ?? null;
|
|
160
167
|
const menuRef = useRef(null);
|
|
161
168
|
const { menuProps } = useMenu({
|
|
162
169
|
...completeProps,
|
|
163
|
-
"aria-label": "
|
|
170
|
+
"aria-label": completeProps["aria-label"] || searchPlaceholder,
|
|
164
171
|
shouldUseVirtualFocus: true
|
|
165
172
|
}, treeState, menuRef);
|
|
166
173
|
const renderedItems = [];
|
|
167
174
|
let isFirstSection = true;
|
|
168
|
-
filteredCollectionItems.forEach((
|
|
169
|
-
|
|
175
|
+
filteredCollectionItems.forEach((item_3) => {
|
|
176
|
+
const reactKey = getMenuItemReactKey(item_3.key);
|
|
177
|
+
if (item_3.type === "section") {
|
|
170
178
|
if (!isFirstSection) renderedItems.push(/* @__PURE__ */ jsx(StyledDivider, {
|
|
171
179
|
role: "separator",
|
|
172
180
|
"aria-orientation": "horizontal"
|
|
173
|
-
}, `divider-${
|
|
181
|
+
}, `divider-${reactKey}`));
|
|
174
182
|
renderedItems.push(/* @__PURE__ */ jsx(MenuSection, {
|
|
175
|
-
item:
|
|
183
|
+
item: item_3,
|
|
176
184
|
state: treeState,
|
|
177
185
|
styles: completeProps.sectionStyles,
|
|
178
186
|
itemStyles: completeProps.itemStyles,
|
|
179
187
|
headingStyles: completeProps.sectionHeadingStyles,
|
|
180
|
-
size
|
|
181
|
-
|
|
188
|
+
size,
|
|
189
|
+
itemId
|
|
190
|
+
}, reactKey));
|
|
182
191
|
isFirstSection = false;
|
|
183
192
|
return;
|
|
184
193
|
}
|
|
185
194
|
let menuItem = /* @__PURE__ */ jsx(MenuItem, {
|
|
186
|
-
item:
|
|
195
|
+
item: item_3,
|
|
187
196
|
state: treeState,
|
|
188
197
|
styles: completeProps.itemStyles,
|
|
189
198
|
size,
|
|
190
|
-
|
|
191
|
-
},
|
|
192
|
-
if (
|
|
193
|
-
renderedItems.push(React.cloneElement(menuItem, { key:
|
|
199
|
+
id: itemId(item_3.key)
|
|
200
|
+
}, reactKey);
|
|
201
|
+
if (item_3.props.wrapper) menuItem = item_3.props.wrapper(menuItem);
|
|
202
|
+
renderedItems.push(React.cloneElement(menuItem, { key: reactKey }));
|
|
194
203
|
});
|
|
195
204
|
let t13;
|
|
196
205
|
let t14;
|
|
@@ -234,207 +243,171 @@ function CommandMenu(props, ref) {
|
|
|
234
243
|
}
|
|
235
244
|
React.useEffect(t15, t16);
|
|
236
245
|
const prevSearchValueRef = useRef("");
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
const
|
|
241
|
-
if (
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
focusedKeyRef.current = null;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
prevSearchValueRef.current = currentSearchValue;
|
|
254
|
-
};
|
|
255
|
-
$[24] = findFirstSelectableItem;
|
|
256
|
-
$[25] = hasFilteredItems;
|
|
257
|
-
$[26] = searchValue;
|
|
258
|
-
$[27] = setFocusedKey;
|
|
259
|
-
$[28] = treeState.selectionManager;
|
|
260
|
-
$[29] = t17;
|
|
261
|
-
} else t17 = $[29];
|
|
262
|
-
let t18;
|
|
263
|
-
if ($[30] !== findFirstSelectableItem || $[31] !== hasFilteredItems || $[32] !== searchValue) {
|
|
264
|
-
t18 = [
|
|
265
|
-
searchValue,
|
|
266
|
-
findFirstSelectableItem,
|
|
267
|
-
hasFilteredItems
|
|
268
|
-
];
|
|
269
|
-
$[30] = findFirstSelectableItem;
|
|
270
|
-
$[31] = hasFilteredItems;
|
|
271
|
-
$[32] = searchValue;
|
|
272
|
-
$[33] = t18;
|
|
273
|
-
} else t18 = $[33];
|
|
274
|
-
React.useEffect(t17, t18);
|
|
246
|
+
React.useEffect(() => {
|
|
247
|
+
const currentSearchValue = searchValue.trim();
|
|
248
|
+
if (currentSearchValue !== prevSearchValueRef.current && currentSearchValue !== "") {
|
|
249
|
+
const firstSelectableKey = findFirstSelectableItem();
|
|
250
|
+
if (firstSelectableKey != null && hasFilteredItems) treeState.selectionManager.setFocusedKey(firstSelectableKey);
|
|
251
|
+
else treeState.selectionManager.setFocusedKey(null);
|
|
252
|
+
}
|
|
253
|
+
prevSearchValueRef.current = currentSearchValue;
|
|
254
|
+
}, [
|
|
255
|
+
searchValue,
|
|
256
|
+
findFirstSelectableItem,
|
|
257
|
+
hasFilteredItems
|
|
258
|
+
]);
|
|
275
259
|
const handleArrowKey = (e) => {
|
|
276
260
|
e.preventDefault();
|
|
277
261
|
const { selectionManager } = treeState;
|
|
278
|
-
const currentKey =
|
|
279
|
-
const nextKey = getNextEnabledKey(collectItemKeys(filteredCollectionItems), currentKey, e.key === "ArrowDown" ? 1 : -1, (
|
|
280
|
-
if (nextKey != null)
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
262
|
+
const currentKey = selectionManager.focusedKey;
|
|
263
|
+
const nextKey = getNextEnabledKey(collectItemKeys(filteredCollectionItems), currentKey, e.key === "ArrowDown" ? 1 : -1, (key_4) => selectionManager.isDisabled(key_4));
|
|
264
|
+
if (nextKey != null) selectionManager.setFocusedKey(nextKey);
|
|
265
|
+
};
|
|
266
|
+
const handleActionKey = (e_0) => {
|
|
267
|
+
e_0.preventDefault();
|
|
268
|
+
e_0.stopPropagation();
|
|
269
|
+
if (e_0.repeat || focusedKey == null || treeState.selectionManager.isDisabled(focusedKey)) return;
|
|
270
|
+
const item_4 = menuRef.current?.ownerDocument.getElementById(itemId(focusedKey));
|
|
271
|
+
if (!item_4 || !menuRef.current?.contains(item_4)) return;
|
|
272
|
+
if (item_4.dispatchEvent(new window.KeyboardEvent("keydown", {
|
|
273
|
+
key: e_0.key,
|
|
274
|
+
code: e_0.code,
|
|
275
|
+
ctrlKey: e_0.ctrlKey,
|
|
276
|
+
metaKey: e_0.metaKey,
|
|
277
|
+
altKey: e_0.altKey,
|
|
278
|
+
shiftKey: e_0.shiftKey,
|
|
279
|
+
bubbles: true,
|
|
280
|
+
cancelable: true
|
|
281
|
+
})) && e_0.key === "Enter") item_4.dispatchEvent(new window.MouseEvent("click", {
|
|
282
|
+
ctrlKey: e_0.ctrlKey,
|
|
283
|
+
metaKey: e_0.metaKey,
|
|
284
|
+
altKey: e_0.altKey,
|
|
285
|
+
shiftKey: e_0.shiftKey,
|
|
286
|
+
bubbles: true,
|
|
287
|
+
cancelable: true,
|
|
288
|
+
detail: 1
|
|
289
|
+
}));
|
|
290
|
+
item_4.dispatchEvent(new window.KeyboardEvent("keyup", {
|
|
291
|
+
key: e_0.key,
|
|
292
|
+
code: e_0.code,
|
|
293
|
+
ctrlKey: e_0.ctrlKey,
|
|
294
|
+
metaKey: e_0.metaKey,
|
|
295
|
+
altKey: e_0.altKey,
|
|
296
|
+
shiftKey: e_0.shiftKey,
|
|
297
|
+
bubbles: true,
|
|
298
|
+
cancelable: true
|
|
299
|
+
}));
|
|
300
|
+
};
|
|
301
|
+
const handleSearchKeyDown = (e_1) => {
|
|
302
|
+
if (e_1.nativeEvent.isComposing) return;
|
|
303
|
+
if (e_1.key === "ArrowDown" || e_1.key === "ArrowUp") handleArrowKey(e_1);
|
|
304
|
+
else if (e_1.key === "Enter" || e_1.key === " " && !searchValue.trim()) handleActionKey(e_1);
|
|
305
|
+
else if (e_1.key === "Escape" && searchValue) {
|
|
306
|
+
e_1.preventDefault();
|
|
307
|
+
handleSearchChange("");
|
|
284
308
|
}
|
|
285
309
|
};
|
|
286
|
-
let t19;
|
|
287
|
-
if ($[34] !== completeProps || $[35] !== treeState.collection) {
|
|
288
|
-
t19 = (key_4) => {
|
|
289
|
-
const node_0 = treeState.collection.getItem(key_4);
|
|
290
|
-
if (!node_0) return;
|
|
291
|
-
const onAction_0 = completeProps.onAction;
|
|
292
|
-
if (onAction_0) onAction_0(key_4);
|
|
293
|
-
if (node_0.props?.onAction) node_0.props.onAction(key_4);
|
|
294
|
-
};
|
|
295
|
-
$[34] = completeProps;
|
|
296
|
-
$[35] = treeState.collection;
|
|
297
|
-
$[36] = t19;
|
|
298
|
-
} else t19 = $[36];
|
|
299
|
-
const triggerAction = t19;
|
|
300
|
-
let t20;
|
|
301
|
-
if ($[37] !== contextProps || $[38] !== focusedKey || $[39] !== treeState.selectionManager || $[40] !== triggerAction) {
|
|
302
|
-
t20 = (e_0) => {
|
|
303
|
-
const currentFocusedKey = focusedKey || treeState.selectionManager.focusedKey;
|
|
304
|
-
if (currentFocusedKey == null) return;
|
|
305
|
-
e_0.preventDefault();
|
|
306
|
-
if (treeState.selectionManager.selectionMode !== "none") treeState.selectionManager.select(currentFocusedKey);
|
|
307
|
-
else triggerAction(currentFocusedKey);
|
|
308
|
-
const { onClose, closeOnSelect } = contextProps;
|
|
309
|
-
if (onClose && closeOnSelect !== false) onClose();
|
|
310
|
-
};
|
|
311
|
-
$[37] = contextProps;
|
|
312
|
-
$[38] = focusedKey;
|
|
313
|
-
$[39] = treeState.selectionManager;
|
|
314
|
-
$[40] = triggerAction;
|
|
315
|
-
$[41] = t20;
|
|
316
|
-
} else t20 = $[41];
|
|
317
|
-
const handleActionKey = t20;
|
|
318
|
-
let t21;
|
|
319
|
-
if ($[42] !== handleActionKey || $[43] !== handleArrowKey || $[44] !== handleSearchChange || $[45] !== searchValue) {
|
|
320
|
-
t21 = (e_1) => {
|
|
321
|
-
if (e_1.key === "ArrowDown" || e_1.key === "ArrowUp") handleArrowKey(e_1);
|
|
322
|
-
else if (e_1.key === "Enter" || e_1.key === " " && !searchValue.trim()) handleActionKey(e_1);
|
|
323
|
-
else if (e_1.key === "Escape" && searchValue) {
|
|
324
|
-
e_1.preventDefault();
|
|
325
|
-
handleSearchChange("");
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
|
-
$[42] = handleActionKey;
|
|
329
|
-
$[43] = handleArrowKey;
|
|
330
|
-
$[44] = handleSearchChange;
|
|
331
|
-
$[45] = searchValue;
|
|
332
|
-
$[46] = t21;
|
|
333
|
-
} else t21 = $[46];
|
|
334
|
-
const handleSearchKeyDown = t21;
|
|
335
310
|
const extractedStyles = extractStyles(props, CONTAINER_STYLES);
|
|
336
|
-
let
|
|
337
|
-
if ($[
|
|
338
|
-
|
|
339
|
-
$[
|
|
340
|
-
$[
|
|
341
|
-
} else
|
|
342
|
-
const showEmptyState =
|
|
311
|
+
let t17;
|
|
312
|
+
if ($[24] !== searchValue) {
|
|
313
|
+
t17 = searchValue.trim();
|
|
314
|
+
$[24] = searchValue;
|
|
315
|
+
$[25] = t17;
|
|
316
|
+
} else t17 = $[25];
|
|
317
|
+
const showEmptyState = t17.length > 0 && !hasFilteredItems && !isLoading;
|
|
318
|
+
const activeDescendant = !isLoading && !showEmptyState && focusedKey != null && collectItemKeys(filteredCollectionItems).includes(focusedKey) ? itemId(focusedKey) : void 0;
|
|
343
319
|
useSyncRef(contextProps, menuRef);
|
|
344
|
-
const
|
|
345
|
-
const
|
|
346
|
-
const
|
|
347
|
-
const
|
|
348
|
-
let
|
|
349
|
-
if ($[
|
|
350
|
-
|
|
320
|
+
const t18 = !!footer;
|
|
321
|
+
const t19 = !!header;
|
|
322
|
+
const t20 = completeProps.mods?.popover;
|
|
323
|
+
const t21 = completeProps.mods?.tray;
|
|
324
|
+
let t22;
|
|
325
|
+
if ($[26] !== t18 || $[27] !== t19 || $[28] !== t20 || $[29] !== t21 || $[30] !== viewHasSections) {
|
|
326
|
+
t22 = {
|
|
351
327
|
sections: viewHasSections,
|
|
352
|
-
footer:
|
|
353
|
-
header:
|
|
354
|
-
popover:
|
|
355
|
-
tray:
|
|
328
|
+
footer: t18,
|
|
329
|
+
header: t19,
|
|
330
|
+
popover: t20,
|
|
331
|
+
tray: t21
|
|
356
332
|
};
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
} else
|
|
364
|
-
const mods =
|
|
333
|
+
$[26] = t18;
|
|
334
|
+
$[27] = t19;
|
|
335
|
+
$[28] = t20;
|
|
336
|
+
$[29] = t21;
|
|
337
|
+
$[30] = viewHasSections;
|
|
338
|
+
$[31] = t22;
|
|
339
|
+
} else t22 = $[31];
|
|
340
|
+
const mods = t22;
|
|
365
341
|
const T0 = StyledCommandMenu;
|
|
366
|
-
let
|
|
367
|
-
if ($[
|
|
368
|
-
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
371
|
-
} else
|
|
372
|
-
const
|
|
373
|
-
const
|
|
374
|
-
const
|
|
375
|
-
let
|
|
376
|
-
if ($[
|
|
377
|
-
|
|
342
|
+
let t23;
|
|
343
|
+
if ($[32] !== props) {
|
|
344
|
+
t23 = filterBaseProps(props);
|
|
345
|
+
$[32] = props;
|
|
346
|
+
$[33] = t23;
|
|
347
|
+
} else t23 = $[33];
|
|
348
|
+
const t24 = t23;
|
|
349
|
+
const t25 = qa || "CommandMenu";
|
|
350
|
+
const t26 = mergeStyleLayers(extractedStyles, styles);
|
|
351
|
+
let t27;
|
|
352
|
+
if ($[34] !== header || $[35] !== headerStyles || $[36] !== size) {
|
|
353
|
+
t27 = header && /* @__PURE__ */ jsx(StyledHeader, {
|
|
378
354
|
role: "presentation",
|
|
379
355
|
"data-size": size,
|
|
380
356
|
styles: mergeStyleLayers({ border: "none" }, headerStyles),
|
|
381
357
|
children: header
|
|
382
358
|
});
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
} else
|
|
388
|
-
const
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
$[
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
t36 = /* @__PURE__ */ jsx(StyledSearchInput, {
|
|
359
|
+
$[34] = header;
|
|
360
|
+
$[35] = headerStyles;
|
|
361
|
+
$[36] = size;
|
|
362
|
+
$[37] = t27;
|
|
363
|
+
} else t27 = $[37];
|
|
364
|
+
const t28 = !isLoading && !showEmptyState ? menuId : void 0;
|
|
365
|
+
let t29;
|
|
366
|
+
if ($[38] !== handleSearchChange) {
|
|
367
|
+
t29 = (e_2) => handleSearchChange(e_2.target.value);
|
|
368
|
+
$[38] = handleSearchChange;
|
|
369
|
+
$[39] = t29;
|
|
370
|
+
} else t29 = $[39];
|
|
371
|
+
let t30;
|
|
372
|
+
if ($[40] !== activeDescendant || $[41] !== handleSearchKeyDown || $[42] !== searchInputStyles || $[43] !== searchPlaceholder || $[44] !== searchValue || $[45] !== size || $[46] !== t28 || $[47] !== t29) {
|
|
373
|
+
t30 = /* @__PURE__ */ jsx(StyledSearchInput, {
|
|
399
374
|
ref: searchInputRef,
|
|
400
375
|
type: "search",
|
|
401
376
|
placeholder: searchPlaceholder,
|
|
402
377
|
value: searchValue,
|
|
403
378
|
styles: searchInputStyles,
|
|
404
379
|
"data-size": size,
|
|
405
|
-
"aria-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
"aria-
|
|
409
|
-
|
|
410
|
-
onChange: t35,
|
|
380
|
+
"aria-label": searchPlaceholder,
|
|
381
|
+
"aria-controls": t28,
|
|
382
|
+
role: "searchbox",
|
|
383
|
+
"aria-activedescendant": activeDescendant,
|
|
384
|
+
onChange: t29,
|
|
411
385
|
onKeyDown: handleSearchKeyDown
|
|
412
386
|
});
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
$[
|
|
421
|
-
$[
|
|
422
|
-
} else
|
|
423
|
-
let
|
|
424
|
-
if ($[
|
|
425
|
-
|
|
387
|
+
$[40] = activeDescendant;
|
|
388
|
+
$[41] = handleSearchKeyDown;
|
|
389
|
+
$[42] = searchInputStyles;
|
|
390
|
+
$[43] = searchPlaceholder;
|
|
391
|
+
$[44] = searchValue;
|
|
392
|
+
$[45] = size;
|
|
393
|
+
$[46] = t28;
|
|
394
|
+
$[47] = t29;
|
|
395
|
+
$[48] = t30;
|
|
396
|
+
} else t30 = $[48];
|
|
397
|
+
let t31;
|
|
398
|
+
if ($[49] !== isLoading) {
|
|
399
|
+
t31 = isLoading && /* @__PURE__ */ jsx(StyledLoadingWrapper, { children: /* @__PURE__ */ jsx(LoadingIcon, {
|
|
426
400
|
role: "progressbar",
|
|
427
401
|
"aria-label": "Loading commands",
|
|
428
402
|
"aria-hidden": false
|
|
429
403
|
}) });
|
|
430
|
-
$[
|
|
431
|
-
$[
|
|
432
|
-
} else
|
|
433
|
-
const
|
|
404
|
+
$[49] = isLoading;
|
|
405
|
+
$[50] = t31;
|
|
406
|
+
} else t31 = $[50];
|
|
407
|
+
const t32 = !isLoading && !showEmptyState && /* @__PURE__ */ jsx(StyledMenu, {
|
|
434
408
|
...menuProps,
|
|
435
409
|
ref: menuRef,
|
|
436
|
-
id:
|
|
437
|
-
"aria-label": "Command menu",
|
|
410
|
+
id: menuId,
|
|
438
411
|
qa: "Menu",
|
|
439
412
|
"data-size": size,
|
|
440
413
|
mods,
|
|
@@ -446,67 +419,67 @@ function CommandMenu(props, ref) {
|
|
|
446
419
|
},
|
|
447
420
|
children: renderedItems
|
|
448
421
|
});
|
|
449
|
-
let
|
|
450
|
-
if ($[
|
|
451
|
-
|
|
452
|
-
$[
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
$[
|
|
456
|
-
} else
|
|
457
|
-
let
|
|
458
|
-
if ($[
|
|
459
|
-
|
|
422
|
+
let t33;
|
|
423
|
+
if ($[51] !== emptyLabel || $[52] !== isLoading || $[53] !== showEmptyState) {
|
|
424
|
+
t33 = !isLoading && showEmptyState && /* @__PURE__ */ jsx(StyledEmptyState, { children: emptyLabel });
|
|
425
|
+
$[51] = emptyLabel;
|
|
426
|
+
$[52] = isLoading;
|
|
427
|
+
$[53] = showEmptyState;
|
|
428
|
+
$[54] = t33;
|
|
429
|
+
} else t33 = $[54];
|
|
430
|
+
let t34;
|
|
431
|
+
if ($[55] !== footer || $[56] !== footerStyles || $[57] !== size) {
|
|
432
|
+
t34 = footer && /* @__PURE__ */ jsx(StyledFooter, {
|
|
460
433
|
role: "presentation",
|
|
461
434
|
"data-size": size,
|
|
462
435
|
styles: footerStyles,
|
|
463
436
|
children: footer
|
|
464
437
|
});
|
|
465
|
-
$[
|
|
466
|
-
$[
|
|
467
|
-
$[
|
|
468
|
-
$[
|
|
469
|
-
} else
|
|
470
|
-
let
|
|
471
|
-
if ($[
|
|
472
|
-
|
|
473
|
-
...
|
|
438
|
+
$[55] = footer;
|
|
439
|
+
$[56] = footerStyles;
|
|
440
|
+
$[57] = size;
|
|
441
|
+
$[58] = t34;
|
|
442
|
+
} else t34 = $[58];
|
|
443
|
+
let t35;
|
|
444
|
+
if ($[59] !== T0 || $[60] !== domRef || $[61] !== mods || $[62] !== size || $[63] !== t24 || $[64] !== t25 || $[65] !== t26 || $[66] !== t27 || $[67] !== t30 || $[68] !== t31 || $[69] !== t32 || $[70] !== t33 || $[71] !== t34) {
|
|
445
|
+
t35 = /* @__PURE__ */ jsxs(T0, {
|
|
446
|
+
...t24,
|
|
474
447
|
ref: domRef,
|
|
475
|
-
qa:
|
|
448
|
+
qa: t25,
|
|
476
449
|
"data-size": size,
|
|
477
450
|
mods,
|
|
478
|
-
styles:
|
|
451
|
+
styles: t26,
|
|
479
452
|
children: [
|
|
453
|
+
t27,
|
|
454
|
+
t30,
|
|
455
|
+
t31,
|
|
480
456
|
t32,
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
t38,
|
|
484
|
-
t39,
|
|
485
|
-
t40
|
|
457
|
+
t33,
|
|
458
|
+
t34
|
|
486
459
|
]
|
|
487
460
|
});
|
|
488
|
-
$[
|
|
489
|
-
$[
|
|
490
|
-
$[
|
|
491
|
-
$[
|
|
492
|
-
$[
|
|
493
|
-
$[
|
|
494
|
-
$[
|
|
495
|
-
$[
|
|
496
|
-
$[
|
|
497
|
-
$[
|
|
498
|
-
$[
|
|
499
|
-
$[
|
|
500
|
-
$[
|
|
501
|
-
$[
|
|
502
|
-
} else
|
|
503
|
-
return
|
|
461
|
+
$[59] = T0;
|
|
462
|
+
$[60] = domRef;
|
|
463
|
+
$[61] = mods;
|
|
464
|
+
$[62] = size;
|
|
465
|
+
$[63] = t24;
|
|
466
|
+
$[64] = t25;
|
|
467
|
+
$[65] = t26;
|
|
468
|
+
$[66] = t27;
|
|
469
|
+
$[67] = t30;
|
|
470
|
+
$[68] = t31;
|
|
471
|
+
$[69] = t32;
|
|
472
|
+
$[70] = t33;
|
|
473
|
+
$[71] = t34;
|
|
474
|
+
$[72] = t35;
|
|
475
|
+
} else t35 = $[72];
|
|
476
|
+
return t35;
|
|
504
477
|
}
|
|
505
|
-
function _temp7(
|
|
506
|
-
return
|
|
478
|
+
function _temp7(item_2) {
|
|
479
|
+
return item_2.type === "section";
|
|
507
480
|
}
|
|
508
|
-
function _temp6(
|
|
509
|
-
return
|
|
481
|
+
function _temp6(item_1) {
|
|
482
|
+
return item_1.type === "section";
|
|
510
483
|
}
|
|
511
484
|
function _temp5(word_0) {
|
|
512
485
|
return word_0.length > 0;
|
|
@@ -526,7 +499,7 @@ function _temp(key) {
|
|
|
526
499
|
const _CommandMenu = React.forwardRef(CommandMenu);
|
|
527
500
|
const __CommandMenu = Object.assign(_CommandMenu, {
|
|
528
501
|
Trigger: _MenuTrigger,
|
|
529
|
-
Item:
|
|
502
|
+
Item: _MenuCollectionItem,
|
|
530
503
|
Section,
|
|
531
504
|
displayName: "CommandMenu"
|
|
532
505
|
});
|