@cube-dev/ui-kit 0.190.1 → 0.190.3
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 +12 -0
- 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 +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/ItemActionsWrapper.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/actions-run.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/InfoBadge/InfoBadge.js +1 -1
- package/dist/components/content/InlineInput/InlineInput.js +1 -1
- package/dist/components/content/Item/Item.d.ts +2 -1
- package/dist/components/content/Item/Item.js +393 -334
- package/dist/components/content/Item/Item.js.map +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.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 +200 -133
- package/dist/components/content/use-auto-tooltip.js.map +1 -1
- package/dist/components/data/DataTable/DataTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +439 -352
- package/dist/components/data/ItemTable/ItemTable.js.map +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 +97 -0
- package/dist/components/data/ItemTable/use-item-table-column-widths.js.map +1 -0
- package/dist/components/data/ItemTable/use-item-table-drag-drop.js +144 -0
- package/dist/components/data/ItemTable/use-item-table-drag-drop.js.map +1 -0
- package/dist/components/data/ItemTable/use-item-table-pagination.js +143 -0
- package/dist/components/data/ItemTable/use-item-table-pagination.js.map +1 -0
- package/dist/components/data/ItemTable/use-item-table-selection.js +141 -0
- package/dist/components/data/ItemTable/use-item-table-selection.js.map +1 -0
- package/dist/components/data/ItemTable/use-item-table-sort.js +135 -0
- package/dist/components/data/ItemTable/use-item-table-sort.js.map +1 -0
- package/dist/components/data/ItemTable/use-item-table-tree-model.js +107 -0
- package/dist/components/data/ItemTable/use-item-table-tree-model.js.map +1 -0
- 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 +96 -297
- package/dist/components/data/TableBase/TableView.js.map +1 -1
- package/dist/components/data/TableBase/TreeGridTable.js +142 -0
- package/dist/components/data/TableBase/TreeGridTable.js.map +1 -0
- package/dist/components/data/TableBase/column-header.js +94 -0
- package/dist/components/data/TableBase/column-header.js.map +1 -0
- 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.js +3 -2
- package/dist/components/data/TableBase/styled.js.map +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 +166 -0
- package/dist/components/data/TableBase/use-column-menu.js.map +1 -0
- package/dist/components/data/TableBase/use-column-order.js +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-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.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 +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.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/SearchComboBox/SearchComboBox.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/TagInput/TagInput.js +768 -723
- package/dist/components/fields/TagInput/TagInput.js.map +1 -1
- package/dist/components/fields/TagInput/TagList.js +1 -1
- package/dist/components/fields/TagInput/useActiveOption.js +122 -0
- package/dist/components/fields/TagInput/useActiveOption.js.map +1 -0
- package/dist/components/fields/TagInput/useTagError.js +95 -0
- package/dist/components/fields/TagInput/useTagError.js.map +1 -0
- 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/Board/Board.js +1 -1
- package/dist/components/layout/Board/BoardProvider.js +1 -1
- package/dist/components/layout/Board/BoardResponsive.js +1 -1
- package/dist/components/layout/Board/Widget.js +1 -1
- package/dist/components/layout/Board/WidgetHost.js +1 -1
- package/dist/components/layout/Board/board-context.js +1 -1
- package/dist/components/layout/Board/board-store.js +1 -1
- package/dist/components/layout/Board/grid-core/calculate.js +1 -1
- package/dist/components/layout/Board/grid-core/collision-modes.js +1 -1
- package/dist/components/layout/Board/grid-core/collision.js +1 -1
- package/dist/components/layout/Board/grid-core/compactors.js +1 -1
- package/dist/components/layout/Board/grid-core/constraints.js +1 -1
- package/dist/components/layout/Board/grid-core/group-move.js +1 -1
- package/dist/components/layout/Board/grid-core/layout.js +1 -1
- package/dist/components/layout/Board/grid-core/placement.js +1 -1
- package/dist/components/layout/Board/grid-core/sort.js +1 -1
- package/dist/components/layout/Board/index.js +1 -1
- package/dist/components/layout/Board/responsive-utils.js +1 -1
- package/dist/components/layout/Board/use-board-layout.js +1 -1
- package/dist/components/layout/Board/use-board-registry.js +1 -1
- package/dist/components/layout/Board/use-board-select-modifier-key.js +1 -1
- package/dist/components/layout/Board/use-board-selection.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/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.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 +7 -1
- package/dist/components/overlays/Tooltip/Tooltip.js.map +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 +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.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 +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- 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/escapePropagation.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/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/components/content/Item.md +7 -2
- package/docs/components/overlays/Tooltip.md +1 -1
- package/package.json +3 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.190.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.190.3 | Cube Dev Team */
|
|
2
2
|
import { getDisabledElementProps, omitActivationEventProps } from "../../../utils/react/disabledProps.js";
|
|
3
3
|
import { mergeProps } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { resolveIcon } from "../../../utils/react/resolveIcon.js";
|
|
@@ -291,8 +291,215 @@ const ItemElement = tasty({
|
|
|
291
291
|
variants: ITEM_VARIANTS,
|
|
292
292
|
styleProps: CONTAINER_STYLES
|
|
293
293
|
});
|
|
294
|
+
const STANDARD_THEMES = [
|
|
295
|
+
"default",
|
|
296
|
+
"success",
|
|
297
|
+
"danger",
|
|
298
|
+
"warning",
|
|
299
|
+
"note",
|
|
300
|
+
"special",
|
|
301
|
+
"current"
|
|
302
|
+
];
|
|
303
|
+
const CARD_THEMES = [
|
|
304
|
+
"default",
|
|
305
|
+
"success",
|
|
306
|
+
"danger",
|
|
307
|
+
"warning",
|
|
308
|
+
"note",
|
|
309
|
+
"current"
|
|
310
|
+
];
|
|
311
|
+
const HEADER_THEMES = ["default"];
|
|
312
|
+
/**
|
|
313
|
+
* Warns about prop combinations the item does not support: a theme its type
|
|
314
|
+
* has no flavour for, and the icons or loading state the "link" type cannot
|
|
315
|
+
* show.
|
|
316
|
+
*/
|
|
317
|
+
function useItemPropWarnings(t0) {
|
|
318
|
+
const $ = c(17);
|
|
319
|
+
const { type, theme, icon, rightIcon, isLoading } = t0;
|
|
320
|
+
let t1;
|
|
321
|
+
if ($[0] !== theme || $[1] !== type) {
|
|
322
|
+
t1 = type === "header" && !HEADER_THEMES.includes(theme) || type === "card" && !CARD_THEMES.includes(theme) || !["header", "card"].includes(type) && !STANDARD_THEMES.includes(theme);
|
|
323
|
+
$[0] = theme;
|
|
324
|
+
$[1] = type;
|
|
325
|
+
$[2] = t1;
|
|
326
|
+
} else t1 = $[2];
|
|
327
|
+
const isInvalidCombination = t1;
|
|
328
|
+
let t2;
|
|
329
|
+
if ($[3] !== theme || $[4] !== type) {
|
|
330
|
+
t2 = [
|
|
331
|
+
"Item",
|
|
332
|
+
"invalid-type-theme",
|
|
333
|
+
type,
|
|
334
|
+
theme
|
|
335
|
+
];
|
|
336
|
+
$[3] = theme;
|
|
337
|
+
$[4] = type;
|
|
338
|
+
$[5] = t2;
|
|
339
|
+
} else t2 = $[5];
|
|
340
|
+
const t3 = `Item: Invalid type+theme combination. type="${type}" does not support theme="${theme}".` + (type === "header" ? " The \"header\" type only supports theme: default." : type === "card" ? " The \"card\" type only supports themes: default, success, danger, warning, note, current." : " Standard types support themes: default, success, danger, warning, note, special, current.");
|
|
341
|
+
let t4;
|
|
342
|
+
if ($[6] !== t3) {
|
|
343
|
+
t4 = [t3];
|
|
344
|
+
$[6] = t3;
|
|
345
|
+
$[7] = t4;
|
|
346
|
+
} else t4 = $[7];
|
|
347
|
+
let t5;
|
|
348
|
+
if ($[8] !== t2 || $[9] !== t4) {
|
|
349
|
+
t5 = {
|
|
350
|
+
key: t2,
|
|
351
|
+
args: t4
|
|
352
|
+
};
|
|
353
|
+
$[8] = t2;
|
|
354
|
+
$[9] = t4;
|
|
355
|
+
$[10] = t5;
|
|
356
|
+
} else t5 = $[10];
|
|
357
|
+
useWarn(isInvalidCombination, t5);
|
|
358
|
+
const hasLinkWithIcons = type === "link" && (icon || rightIcon);
|
|
359
|
+
const hasLinkWithLoading = type === "link" && isLoading;
|
|
360
|
+
const hasLinkRestrictions = hasLinkWithIcons || hasLinkWithLoading;
|
|
361
|
+
let linkRestrictionMessages;
|
|
362
|
+
if ($[11] !== hasLinkWithIcons || $[12] !== hasLinkWithLoading) {
|
|
363
|
+
linkRestrictionMessages = [];
|
|
364
|
+
if (hasLinkWithIcons) linkRestrictionMessages.push("icons (`icon` or `rightIcon` props)");
|
|
365
|
+
if (hasLinkWithLoading) linkRestrictionMessages.push("loading state (`isLoading` prop)");
|
|
366
|
+
$[11] = hasLinkWithIcons;
|
|
367
|
+
$[12] = hasLinkWithLoading;
|
|
368
|
+
$[13] = linkRestrictionMessages;
|
|
369
|
+
} else linkRestrictionMessages = $[13];
|
|
370
|
+
let t6;
|
|
371
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
372
|
+
t6 = ["Item", "link-restrictions"];
|
|
373
|
+
$[14] = t6;
|
|
374
|
+
} else t6 = $[14];
|
|
375
|
+
const t7 = `Item: The "link" type does not support ${linkRestrictionMessages.join(" or ")}. Remove these props when using type="link".`;
|
|
376
|
+
let t8;
|
|
377
|
+
if ($[15] !== t7) {
|
|
378
|
+
t8 = {
|
|
379
|
+
key: t6,
|
|
380
|
+
args: [t7]
|
|
381
|
+
};
|
|
382
|
+
$[15] = t7;
|
|
383
|
+
$[16] = t8;
|
|
384
|
+
} else t8 = $[16];
|
|
385
|
+
useWarn(hasLinkRestrictions, t8);
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Splits `size` between the two ways the element takes it. A named size sets
|
|
389
|
+
* the `size` mod, which picks the matching `$size` in the styles; any other
|
|
390
|
+
* value (a number of pixels or a custom length) sets the `$size` token itself.
|
|
391
|
+
*/
|
|
392
|
+
function resolveItemSize(size) {
|
|
393
|
+
if (typeof size === "number") return { sizeToken: `${size}px` };
|
|
394
|
+
if (ITEM_SIZE_VALUES.includes(size)) return { sizeMod: size };
|
|
395
|
+
return { sizeToken: size };
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* The slot the loading icon replaces, or `undefined` when the item is not
|
|
399
|
+
* loading. Auto logic: prefer icon if present, then rightIcon, fallback to
|
|
400
|
+
* icon.
|
|
401
|
+
*/
|
|
402
|
+
function resolveLoadingSlot(loadingSlot, isLoading, icon, rightIcon) {
|
|
403
|
+
if (!isLoading) return void 0;
|
|
404
|
+
if (loadingSlot !== "auto") return loadingSlot;
|
|
405
|
+
return rightIcon.hasSlot && !icon.hasSlot ? "rightIcon" : "icon";
|
|
406
|
+
}
|
|
407
|
+
/** A stable key for icon transitions, based on the icon type. */
|
|
408
|
+
function getIconKey(icon) {
|
|
409
|
+
if (isValidElement(icon)) return icon.type?.displayName || icon.type?.name || "icon";
|
|
410
|
+
return icon ? "icon" : "empty";
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Applies the loading state to an icon slot. The slot renders when it has an
|
|
414
|
+
* icon or an empty slot was asked for, or when the loading state targets it:
|
|
415
|
+
* the loading icon then replaces the icon.
|
|
416
|
+
*/
|
|
417
|
+
function resolveIconSlot(icon, isLoadingSlot) {
|
|
418
|
+
if (isLoadingSlot) return {
|
|
419
|
+
hasSlot: true,
|
|
420
|
+
content: /* @__PURE__ */ jsx(LoadingIcon, {}),
|
|
421
|
+
key: "loading"
|
|
422
|
+
};
|
|
423
|
+
return {
|
|
424
|
+
hasSlot: icon.hasSlot,
|
|
425
|
+
content: icon.content,
|
|
426
|
+
key: getIconKey(icon.content)
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Which HotKeys flavour the shortcut hint wears. `inherit` paints the hint's
|
|
431
|
+
* glyphs and rim from `currentcolor`, so it tracks whatever the row labels
|
|
432
|
+
* itself with; `primary` pins the hint to `#white`; `default` is a neutral
|
|
433
|
+
* `#dark.65` chip built for a page-colored row.
|
|
434
|
+
*
|
|
435
|
+
* The whole `current` theme wants `inherit`: every flavour there derives its
|
|
436
|
+
* label from the inherited color, and a fixed hint cannot follow that. The
|
|
437
|
+
* neutral `#dark.65`-on-`#dark.04` chip all but vanishes on a dark overlay,
|
|
438
|
+
* which is exactly where this theme is meant to be used.
|
|
439
|
+
*
|
|
440
|
+
* `current.primary` is included despite painting its label with
|
|
441
|
+
* `-webkit-text-fill-color` rather than `color`. The hint renders inside the
|
|
442
|
+
* `Suffix` slot, and `CURRENT_PRIMARY_STYLES` recolors that slot to the label
|
|
443
|
+
* color — so `currentcolor` there is the LABEL, not the fill. An earlier
|
|
444
|
+
* version of this comment claimed the opposite and sent it to `primary`, which
|
|
445
|
+
* put a `#white` hint on a light fill (measured cr 2.17 on a `#note` container
|
|
446
|
+
* in dark mode).
|
|
447
|
+
*/
|
|
448
|
+
function getHotkeysType(theme, type) {
|
|
449
|
+
if (theme === "current") return "inherit";
|
|
450
|
+
return type === "primary" ? "primary" : "default";
|
|
451
|
+
}
|
|
452
|
+
/** Registers `hotkeys` as a global shortcut that clicks the item. */
|
|
453
|
+
function useHotkeyClick(hotkeys, isDisabled, ref) {
|
|
454
|
+
const $ = c(11);
|
|
455
|
+
let t0;
|
|
456
|
+
if ($[0] !== hotkeys) {
|
|
457
|
+
t0 = typeof hotkeys === "string" ? hotkeys.toLowerCase() : "";
|
|
458
|
+
$[0] = hotkeys;
|
|
459
|
+
$[1] = t0;
|
|
460
|
+
} else t0 = $[1];
|
|
461
|
+
let t1;
|
|
462
|
+
if ($[2] !== hotkeys || $[3] !== isDisabled || $[4] !== ref) {
|
|
463
|
+
t1 = () => {
|
|
464
|
+
if (!hotkeys) return;
|
|
465
|
+
if (isDisabled) return;
|
|
466
|
+
if (ref && typeof ref === "object" && ref.current) ref.current.click();
|
|
467
|
+
};
|
|
468
|
+
$[2] = hotkeys;
|
|
469
|
+
$[3] = isDisabled;
|
|
470
|
+
$[4] = ref;
|
|
471
|
+
$[5] = t1;
|
|
472
|
+
} else t1 = $[5];
|
|
473
|
+
const t2 = !!hotkeys;
|
|
474
|
+
let t3;
|
|
475
|
+
if ($[6] !== t2) {
|
|
476
|
+
t3 = {
|
|
477
|
+
enableOnContentEditable: true,
|
|
478
|
+
enabled: t2,
|
|
479
|
+
preventDefault: true,
|
|
480
|
+
enableOnFormTags: true
|
|
481
|
+
};
|
|
482
|
+
$[6] = t2;
|
|
483
|
+
$[7] = t3;
|
|
484
|
+
} else t3 = $[7];
|
|
485
|
+
let t4;
|
|
486
|
+
if ($[8] !== hotkeys || $[9] !== isDisabled) {
|
|
487
|
+
t4 = [hotkeys, isDisabled];
|
|
488
|
+
$[8] = hotkeys;
|
|
489
|
+
$[9] = isDisabled;
|
|
490
|
+
$[10] = t4;
|
|
491
|
+
} else t4 = $[10];
|
|
492
|
+
useHotkeys(t0, t1, t3, t4);
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Highlights matches of `highlight` in a plain-string label or description.
|
|
496
|
+
* Any other content is returned as is.
|
|
497
|
+
*/
|
|
498
|
+
function highlightContent(content, highlight, caseSensitive, highlightStyles) {
|
|
499
|
+
return typeof content === "string" && highlight ? highlightText(content, highlight, caseSensitive, highlightStyles) : content;
|
|
500
|
+
}
|
|
294
501
|
const Item = (props, ref) => {
|
|
295
|
-
const $ = c(
|
|
502
|
+
const $ = c(75);
|
|
296
503
|
const { children, size: t0, type: t1, theme: t2, mods, icon: iconProp, rightIcon: rightIconProp, prefix, suffix, description, descriptionPlacement, labelProps, descriptionProps, keyboardShortcutProps, styles, htmlType, isSelected, hotkeys, tooltip: t3, isDisabled, disabled: nativeDisabledProp, style, loadingSlot: t4, isLoading: t5, actions, autoHideActions: t6, preserveActionsSpace: t7, disableActionsFocus: t8, shape, defaultTooltipPlacement: t9, level: t10, highlight, highlightCaseSensitive: t11, highlightStyles, insideWrapper: t12, showActions: t13, skipActionsWidthTransition: t14, hiddenContent, isDynamicLabel: t15, labelRef: labelRefProp, tokens, ...rest } = props;
|
|
297
504
|
const size = t0 === void 0 ? "medium" : t0;
|
|
298
505
|
const type = t1 === void 0 ? "item" : t1;
|
|
@@ -316,368 +523,222 @@ const Item = (props, ref) => {
|
|
|
316
523
|
const isDisabledProp = isDisabled ?? (nativeDisabledProp || void 0);
|
|
317
524
|
const finalIsDisabled = isDisabledProp === true || isLoading && isDisabledProp !== false;
|
|
318
525
|
let t16;
|
|
319
|
-
if ($[0]
|
|
320
|
-
t16 =
|
|
321
|
-
"default",
|
|
322
|
-
"success",
|
|
323
|
-
"danger",
|
|
324
|
-
"warning",
|
|
325
|
-
"note",
|
|
326
|
-
"special",
|
|
327
|
-
"current"
|
|
328
|
-
];
|
|
329
|
-
$[0] = t16;
|
|
330
|
-
} else t16 = $[0];
|
|
331
|
-
const STANDARD_THEMES = t16;
|
|
332
|
-
let t17;
|
|
333
|
-
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
334
|
-
t17 = [
|
|
335
|
-
"default",
|
|
336
|
-
"success",
|
|
337
|
-
"danger",
|
|
338
|
-
"warning",
|
|
339
|
-
"note",
|
|
340
|
-
"current"
|
|
341
|
-
];
|
|
342
|
-
$[1] = t17;
|
|
343
|
-
} else t17 = $[1];
|
|
344
|
-
const CARD_THEMES = t17;
|
|
345
|
-
let t18;
|
|
346
|
-
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
347
|
-
t18 = ["default"];
|
|
348
|
-
$[2] = t18;
|
|
349
|
-
} else t18 = $[2];
|
|
350
|
-
const HEADER_THEMES = t18;
|
|
351
|
-
let t19;
|
|
352
|
-
if ($[3] !== theme || $[4] !== type) {
|
|
353
|
-
t19 = type === "header" && !HEADER_THEMES.includes(theme) || type === "card" && !CARD_THEMES.includes(theme) || !["header", "card"].includes(type) && !STANDARD_THEMES.includes(theme);
|
|
354
|
-
$[3] = theme;
|
|
355
|
-
$[4] = type;
|
|
356
|
-
$[5] = t19;
|
|
357
|
-
} else t19 = $[5];
|
|
358
|
-
const isInvalidCombination = t19;
|
|
359
|
-
let t20;
|
|
360
|
-
if ($[6] !== theme || $[7] !== type) {
|
|
361
|
-
t20 = [
|
|
362
|
-
"Item",
|
|
363
|
-
"invalid-type-theme",
|
|
526
|
+
if ($[0] !== iconProp || $[1] !== isLoading || $[2] !== rightIconProp || $[3] !== theme || $[4] !== type) {
|
|
527
|
+
t16 = {
|
|
364
528
|
type,
|
|
365
|
-
theme
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
$[8] = t20;
|
|
370
|
-
} else t20 = $[8];
|
|
371
|
-
const t21 = `Item: Invalid type+theme combination. type="${type}" does not support theme="${theme}".` + (type === "header" ? " The \"header\" type only supports theme: default." : type === "card" ? " The \"card\" type only supports themes: default, success, danger, warning, note, current." : " Standard types support themes: default, success, danger, warning, note, special, current.");
|
|
372
|
-
let t22;
|
|
373
|
-
if ($[9] !== t21) {
|
|
374
|
-
t22 = [t21];
|
|
375
|
-
$[9] = t21;
|
|
376
|
-
$[10] = t22;
|
|
377
|
-
} else t22 = $[10];
|
|
378
|
-
let t23;
|
|
379
|
-
if ($[11] !== t20 || $[12] !== t22) {
|
|
380
|
-
t23 = {
|
|
381
|
-
key: t20,
|
|
382
|
-
args: t22
|
|
383
|
-
};
|
|
384
|
-
$[11] = t20;
|
|
385
|
-
$[12] = t22;
|
|
386
|
-
$[13] = t23;
|
|
387
|
-
} else t23 = $[13];
|
|
388
|
-
useWarn(isInvalidCombination, t23);
|
|
389
|
-
const hasLinkWithIcons = type === "link" && (iconProp || rightIconProp);
|
|
390
|
-
const hasLinkWithLoading = type === "link" && isLoading;
|
|
391
|
-
const hasLinkRestrictions = hasLinkWithIcons || hasLinkWithLoading;
|
|
392
|
-
let linkRestrictionMessages;
|
|
393
|
-
if ($[14] !== hasLinkWithIcons || $[15] !== hasLinkWithLoading) {
|
|
394
|
-
linkRestrictionMessages = [];
|
|
395
|
-
if (hasLinkWithIcons) linkRestrictionMessages.push("icons (`icon` or `rightIcon` props)");
|
|
396
|
-
if (hasLinkWithLoading) linkRestrictionMessages.push("loading state (`isLoading` prop)");
|
|
397
|
-
$[14] = hasLinkWithIcons;
|
|
398
|
-
$[15] = hasLinkWithLoading;
|
|
399
|
-
$[16] = linkRestrictionMessages;
|
|
400
|
-
} else linkRestrictionMessages = $[16];
|
|
401
|
-
let t24;
|
|
402
|
-
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
403
|
-
t24 = ["Item", "link-restrictions"];
|
|
404
|
-
$[17] = t24;
|
|
405
|
-
} else t24 = $[17];
|
|
406
|
-
const t25 = `Item: The "link" type does not support ${linkRestrictionMessages.join(" or ")}. Remove these props when using type="link".`;
|
|
407
|
-
let t26;
|
|
408
|
-
if ($[18] !== t25) {
|
|
409
|
-
t26 = {
|
|
410
|
-
key: t24,
|
|
411
|
-
args: [t25]
|
|
529
|
+
theme,
|
|
530
|
+
icon: iconProp,
|
|
531
|
+
rightIcon: rightIconProp,
|
|
532
|
+
isLoading
|
|
412
533
|
};
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
|
|
416
|
-
|
|
534
|
+
$[0] = iconProp;
|
|
535
|
+
$[1] = isLoading;
|
|
536
|
+
$[2] = rightIconProp;
|
|
537
|
+
$[3] = theme;
|
|
538
|
+
$[4] = type;
|
|
539
|
+
$[5] = t16;
|
|
540
|
+
} else t16 = $[5];
|
|
541
|
+
useItemPropWarnings(t16);
|
|
417
542
|
const hasCheckmark = iconProp === "checkmark";
|
|
418
|
-
let t27;
|
|
419
|
-
if ($[20] !== size) {
|
|
420
|
-
t27 = typeof size === "number" || !ITEM_SIZE_VALUES.includes(size);
|
|
421
|
-
$[20] = size;
|
|
422
|
-
$[21] = t27;
|
|
423
|
-
} else t27 = $[21];
|
|
424
|
-
const isCustomSize = t27;
|
|
425
|
-
const sizeTokenValue = typeof size === "number" ? `${size}px` : isCustomSize ? size : void 0;
|
|
426
|
-
const t28 = isSelected === true;
|
|
427
543
|
let baseMods;
|
|
428
|
-
let
|
|
429
|
-
let
|
|
430
|
-
|
|
544
|
+
let finalTokens;
|
|
545
|
+
let iconSlot;
|
|
546
|
+
let loadingTarget;
|
|
547
|
+
let t17;
|
|
548
|
+
if ($[6] !== finalIsDisabled || $[7] !== finalShape || $[8] !== hasCheckmark || $[9] !== iconProp || $[10] !== isLoading || $[11] !== isSelected || $[12] !== loadingSlot || $[13] !== mods || $[14] !== rightIconProp || $[15] !== size || $[16] !== theme || $[17] !== tokens || $[18] !== type) {
|
|
549
|
+
const { sizeMod, sizeToken } = resolveItemSize(size);
|
|
550
|
+
finalTokens = {
|
|
551
|
+
...tokens,
|
|
552
|
+
...sizeToken ? { $size: sizeToken } : {}
|
|
553
|
+
};
|
|
431
554
|
baseMods = {
|
|
432
555
|
disabled: finalIsDisabled,
|
|
433
|
-
selected:
|
|
556
|
+
selected: isSelected === true,
|
|
434
557
|
loading: isLoading,
|
|
435
|
-
|
|
558
|
+
...sizeMod !== void 0 && { size: sizeMod },
|
|
436
559
|
type,
|
|
437
560
|
theme,
|
|
438
561
|
shape: finalShape,
|
|
439
562
|
...mods
|
|
440
563
|
};
|
|
441
|
-
resolvedIcon = hasCheckmark ? {
|
|
564
|
+
const resolvedIcon = hasCheckmark ? {
|
|
442
565
|
content: null,
|
|
443
566
|
hasSlot: true
|
|
444
567
|
} : resolveIcon(iconProp, baseMods);
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
$[
|
|
456
|
-
$[
|
|
457
|
-
$[
|
|
458
|
-
$[
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
568
|
+
const resolvedRightIcon = resolveIcon(rightIconProp, baseMods);
|
|
569
|
+
loadingTarget = resolveLoadingSlot(loadingSlot, isLoading, resolvedIcon, resolvedRightIcon);
|
|
570
|
+
iconSlot = hasCheckmark ? {
|
|
571
|
+
hasSlot: true,
|
|
572
|
+
content: /* @__PURE__ */ jsx(CheckIcon, {}),
|
|
573
|
+
key: "checkmark"
|
|
574
|
+
} : resolveIconSlot(resolvedIcon, loadingTarget === "icon");
|
|
575
|
+
t17 = resolveIconSlot(resolvedRightIcon, loadingTarget === "rightIcon");
|
|
576
|
+
$[6] = finalIsDisabled;
|
|
577
|
+
$[7] = finalShape;
|
|
578
|
+
$[8] = hasCheckmark;
|
|
579
|
+
$[9] = iconProp;
|
|
580
|
+
$[10] = isLoading;
|
|
581
|
+
$[11] = isSelected;
|
|
582
|
+
$[12] = loadingSlot;
|
|
583
|
+
$[13] = mods;
|
|
584
|
+
$[14] = rightIconProp;
|
|
585
|
+
$[15] = size;
|
|
586
|
+
$[16] = theme;
|
|
587
|
+
$[17] = tokens;
|
|
588
|
+
$[18] = type;
|
|
589
|
+
$[19] = baseMods;
|
|
590
|
+
$[20] = finalTokens;
|
|
591
|
+
$[21] = iconSlot;
|
|
592
|
+
$[22] = loadingTarget;
|
|
593
|
+
$[23] = t17;
|
|
461
594
|
} else {
|
|
462
|
-
baseMods = $[
|
|
463
|
-
|
|
464
|
-
|
|
595
|
+
baseMods = $[19];
|
|
596
|
+
finalTokens = $[20];
|
|
597
|
+
iconSlot = $[21];
|
|
598
|
+
loadingTarget = $[22];
|
|
599
|
+
t17 = $[23];
|
|
465
600
|
}
|
|
466
|
-
const
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
const finalIcon = t31;
|
|
487
|
-
let t32;
|
|
488
|
-
if ($[44] !== isLoading || $[45] !== resolvedLoadingSlot || $[46] !== resolvedRightIcon.content) {
|
|
489
|
-
t32 = isLoading && resolvedLoadingSlot === "rightIcon" ? /* @__PURE__ */ jsx(LoadingIcon, {}) : resolvedRightIcon.content;
|
|
490
|
-
$[44] = isLoading;
|
|
491
|
-
$[45] = resolvedLoadingSlot;
|
|
492
|
-
$[46] = resolvedRightIcon.content;
|
|
493
|
-
$[47] = t32;
|
|
494
|
-
} else t32 = $[47];
|
|
495
|
-
const finalRightIcon = t32;
|
|
496
|
-
let t33;
|
|
497
|
-
if ($[48] !== finalIcon || $[49] !== hasCheckmark || $[50] !== isLoading || $[51] !== resolvedLoadingSlot) {
|
|
498
|
-
t33 = hasCheckmark ? "checkmark" : isLoading && resolvedLoadingSlot === "icon" ? "loading" : isValidElement(finalIcon) ? finalIcon.type?.displayName || finalIcon.type?.name || "icon" : finalIcon ? "icon" : "empty";
|
|
499
|
-
$[48] = finalIcon;
|
|
500
|
-
$[49] = hasCheckmark;
|
|
501
|
-
$[50] = isLoading;
|
|
502
|
-
$[51] = resolvedLoadingSlot;
|
|
503
|
-
$[52] = t33;
|
|
504
|
-
} else t33 = $[52];
|
|
505
|
-
const iconKey = t33;
|
|
506
|
-
let t34;
|
|
507
|
-
if ($[53] !== finalRightIcon || $[54] !== isLoading || $[55] !== resolvedLoadingSlot) {
|
|
508
|
-
t34 = isLoading && resolvedLoadingSlot === "rightIcon" ? "loading" : isValidElement(finalRightIcon) ? finalRightIcon.type?.displayName || finalRightIcon.type?.name || "icon" : finalRightIcon ? "icon" : "empty";
|
|
509
|
-
$[53] = finalRightIcon;
|
|
510
|
-
$[54] = isLoading;
|
|
511
|
-
$[55] = resolvedLoadingSlot;
|
|
512
|
-
$[56] = t34;
|
|
513
|
-
} else t34 = $[56];
|
|
514
|
-
const rightIconKey = t34;
|
|
515
|
-
let t35;
|
|
516
|
-
if ($[57] !== isLoading || $[58] !== prefix || $[59] !== resolvedLoadingSlot) {
|
|
517
|
-
t35 = isLoading && resolvedLoadingSlot === "prefix" ? /* @__PURE__ */ jsx(LoadingIcon, {}) : prefix;
|
|
518
|
-
$[57] = isLoading;
|
|
519
|
-
$[58] = prefix;
|
|
520
|
-
$[59] = resolvedLoadingSlot;
|
|
521
|
-
$[60] = t35;
|
|
522
|
-
} else t35 = $[60];
|
|
523
|
-
const finalPrefix = t35;
|
|
524
|
-
const hotkeysType = theme === "current" ? "inherit" : type === "primary" ? "primary" : "default";
|
|
525
|
-
let t36;
|
|
526
|
-
if ($[61] !== finalIsDisabled || $[62] !== hotkeys || $[63] !== hotkeysType || $[64] !== isLoading || $[65] !== keyboardShortcutProps || $[66] !== resolvedLoadingSlot || $[67] !== suffix) {
|
|
527
|
-
t36 = isLoading && resolvedLoadingSlot === "suffix" ? /* @__PURE__ */ jsx(LoadingIcon, {}) : suffix ?? (hotkeys ? /* @__PURE__ */ jsx(_HotKeys, {
|
|
601
|
+
const rightIconSlot = t17;
|
|
602
|
+
let t18;
|
|
603
|
+
if ($[24] !== description || $[25] !== descriptionProps) {
|
|
604
|
+
t18 = !!description || Object.keys(descriptionProps ?? {}).some(_temp);
|
|
605
|
+
$[24] = description;
|
|
606
|
+
$[25] = descriptionProps;
|
|
607
|
+
$[26] = t18;
|
|
608
|
+
} else t18 = $[26];
|
|
609
|
+
const showDescription = t18;
|
|
610
|
+
let t19;
|
|
611
|
+
if ($[27] !== loadingTarget || $[28] !== prefix) {
|
|
612
|
+
t19 = loadingTarget === "prefix" ? /* @__PURE__ */ jsx(LoadingIcon, {}) : prefix;
|
|
613
|
+
$[27] = loadingTarget;
|
|
614
|
+
$[28] = prefix;
|
|
615
|
+
$[29] = t19;
|
|
616
|
+
} else t19 = $[29];
|
|
617
|
+
const finalPrefix = t19;
|
|
618
|
+
let t20;
|
|
619
|
+
if ($[30] !== finalIsDisabled || $[31] !== hotkeys || $[32] !== keyboardShortcutProps || $[33] !== loadingTarget || $[34] !== suffix || $[35] !== theme || $[36] !== type) {
|
|
620
|
+
t20 = loadingTarget === "suffix" ? /* @__PURE__ */ jsx(LoadingIcon, {}) : suffix ?? (hotkeys ? /* @__PURE__ */ jsx(_HotKeys, {
|
|
528
621
|
...keyboardShortcutProps,
|
|
529
|
-
type:
|
|
622
|
+
type: getHotkeysType(theme, type),
|
|
530
623
|
styles: {
|
|
531
624
|
padding: "1x left",
|
|
532
625
|
opacity: finalIsDisabled ? .5 : 1
|
|
533
626
|
},
|
|
534
627
|
children: hotkeys
|
|
535
628
|
}) : void 0);
|
|
536
|
-
$[
|
|
537
|
-
$[
|
|
538
|
-
$[
|
|
539
|
-
$[
|
|
540
|
-
$[
|
|
541
|
-
$[
|
|
542
|
-
$[
|
|
543
|
-
$[
|
|
544
|
-
} else
|
|
545
|
-
const finalSuffix =
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
$[73] = ref;
|
|
562
|
-
$[74] = t38;
|
|
563
|
-
} else t38 = $[74];
|
|
564
|
-
const t39 = !!hotkeys;
|
|
565
|
-
let t40;
|
|
566
|
-
if ($[75] !== t39) {
|
|
567
|
-
t40 = {
|
|
568
|
-
enableOnContentEditable: true,
|
|
569
|
-
enabled: t39,
|
|
570
|
-
preventDefault: true,
|
|
571
|
-
enableOnFormTags: true
|
|
572
|
-
};
|
|
573
|
-
$[75] = t39;
|
|
574
|
-
$[76] = t40;
|
|
575
|
-
} else t40 = $[76];
|
|
576
|
-
let t41;
|
|
577
|
-
if ($[77] !== finalIsDisabled || $[78] !== hotkeys) {
|
|
578
|
-
t41 = [hotkeys, finalIsDisabled];
|
|
579
|
-
$[77] = finalIsDisabled;
|
|
580
|
-
$[78] = hotkeys;
|
|
581
|
-
$[79] = t41;
|
|
582
|
-
} else t41 = $[79];
|
|
583
|
-
useHotkeys(t37, t38, t40, t41);
|
|
584
|
-
const t42 = !!(hasIconSlot || finalPrefix);
|
|
585
|
-
const t43 = !!(hasRightIconSlot || finalSuffix || actions);
|
|
586
|
-
const t44 = !!finalPrefix;
|
|
587
|
-
const t45 = !!finalSuffix;
|
|
588
|
-
const t46 = !!actions;
|
|
589
|
-
const t47 = !!(actions && actions !== true);
|
|
590
|
-
const t48 = autoHideActions === true;
|
|
591
|
-
const t49 = preserveActionsSpace === true;
|
|
592
|
-
const t50 = showActions && insideWrapper;
|
|
593
|
-
const t51 = skipActionsWidthTransition && insideWrapper;
|
|
594
|
-
const t52 = showDescription ? finalDescriptionPlacement : "none";
|
|
595
|
-
let t53;
|
|
596
|
-
if ($[80] !== baseMods || $[81] !== hasCheckmark || $[82] !== hasIconSlot || $[83] !== hasLabel || $[84] !== hasRightIconSlot || $[85] !== insideWrapper || $[86] !== showDescription || $[87] !== t42 || $[88] !== t43 || $[89] !== t44 || $[90] !== t45 || $[91] !== t46 || $[92] !== t47 || $[93] !== t48 || $[94] !== t49 || $[95] !== t50 || $[96] !== t51 || $[97] !== t52) {
|
|
597
|
-
t53 = {
|
|
629
|
+
$[30] = finalIsDisabled;
|
|
630
|
+
$[31] = hotkeys;
|
|
631
|
+
$[32] = keyboardShortcutProps;
|
|
632
|
+
$[33] = loadingTarget;
|
|
633
|
+
$[34] = suffix;
|
|
634
|
+
$[35] = theme;
|
|
635
|
+
$[36] = type;
|
|
636
|
+
$[37] = t20;
|
|
637
|
+
} else t20 = $[37];
|
|
638
|
+
const finalSuffix = t20;
|
|
639
|
+
useHotkeyClick(hotkeys, finalIsDisabled, ref);
|
|
640
|
+
const t21 = !!(iconSlot.hasSlot || finalPrefix);
|
|
641
|
+
const t22 = !!(rightIconSlot.hasSlot || finalSuffix || actions);
|
|
642
|
+
const t23 = !!finalPrefix;
|
|
643
|
+
const t24 = !!finalSuffix;
|
|
644
|
+
const t25 = !!actions;
|
|
645
|
+
const t26 = !!(actions && actions !== true);
|
|
646
|
+
const t27 = autoHideActions === true;
|
|
647
|
+
const t28 = preserveActionsSpace === true;
|
|
648
|
+
const t29 = showActions && insideWrapper;
|
|
649
|
+
const t30 = skipActionsWidthTransition && insideWrapper;
|
|
650
|
+
const t31 = showDescription ? finalDescriptionPlacement : "none";
|
|
651
|
+
let t32;
|
|
652
|
+
if ($[38] !== baseMods || $[39] !== hasCheckmark || $[40] !== hasLabel || $[41] !== iconSlot.hasSlot || $[42] !== insideWrapper || $[43] !== rightIconSlot.hasSlot || $[44] !== showDescription || $[45] !== t21 || $[46] !== t22 || $[47] !== t23 || $[48] !== t24 || $[49] !== t25 || $[50] !== t26 || $[51] !== t27 || $[52] !== t28 || $[53] !== t29 || $[54] !== t30 || $[55] !== t31) {
|
|
653
|
+
t32 = {
|
|
598
654
|
...baseMods,
|
|
599
|
-
"has-icon":
|
|
600
|
-
"has-start-content":
|
|
601
|
-
"has-end-content":
|
|
602
|
-
"has-right-icon":
|
|
655
|
+
"has-icon": iconSlot.hasSlot,
|
|
656
|
+
"has-start-content": t21,
|
|
657
|
+
"has-end-content": t22,
|
|
658
|
+
"has-right-icon": rightIconSlot.hasSlot,
|
|
603
659
|
"has-label": hasLabel,
|
|
604
|
-
"has-prefix":
|
|
605
|
-
"has-suffix":
|
|
660
|
+
"has-prefix": t23,
|
|
661
|
+
"has-suffix": t24,
|
|
606
662
|
"has-description": showDescription,
|
|
607
|
-
"has-actions":
|
|
608
|
-
"has-actions-content":
|
|
609
|
-
"auto-hide-actions":
|
|
610
|
-
"preserve-actions-space":
|
|
663
|
+
"has-actions": t25,
|
|
664
|
+
"has-actions-content": t26,
|
|
665
|
+
"auto-hide-actions": t27,
|
|
666
|
+
"preserve-actions-space": t28,
|
|
611
667
|
"inside-wrapper": insideWrapper,
|
|
612
|
-
"actions-shown":
|
|
613
|
-
"skip-actions-width-transition":
|
|
668
|
+
"actions-shown": t29,
|
|
669
|
+
"skip-actions-width-transition": t30,
|
|
614
670
|
checkmark: hasCheckmark,
|
|
615
|
-
description:
|
|
671
|
+
description: t31
|
|
616
672
|
};
|
|
617
|
-
$[
|
|
618
|
-
$[
|
|
619
|
-
$[
|
|
620
|
-
$[
|
|
621
|
-
$[
|
|
622
|
-
$[
|
|
623
|
-
$[
|
|
624
|
-
$[
|
|
625
|
-
$[
|
|
626
|
-
$[
|
|
627
|
-
$[
|
|
628
|
-
$[
|
|
629
|
-
$[
|
|
630
|
-
$[
|
|
631
|
-
$[
|
|
632
|
-
$[
|
|
633
|
-
$[
|
|
634
|
-
$[
|
|
635
|
-
$[
|
|
636
|
-
} else
|
|
637
|
-
const finalMods =
|
|
638
|
-
const
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
673
|
+
$[38] = baseMods;
|
|
674
|
+
$[39] = hasCheckmark;
|
|
675
|
+
$[40] = hasLabel;
|
|
676
|
+
$[41] = iconSlot.hasSlot;
|
|
677
|
+
$[42] = insideWrapper;
|
|
678
|
+
$[43] = rightIconSlot.hasSlot;
|
|
679
|
+
$[44] = showDescription;
|
|
680
|
+
$[45] = t21;
|
|
681
|
+
$[46] = t22;
|
|
682
|
+
$[47] = t23;
|
|
683
|
+
$[48] = t24;
|
|
684
|
+
$[49] = t25;
|
|
685
|
+
$[50] = t26;
|
|
686
|
+
$[51] = t27;
|
|
687
|
+
$[52] = t28;
|
|
688
|
+
$[53] = t29;
|
|
689
|
+
$[54] = t30;
|
|
690
|
+
$[55] = t31;
|
|
691
|
+
$[56] = t32;
|
|
692
|
+
} else t32 = $[56];
|
|
693
|
+
const finalMods = t32;
|
|
694
|
+
const t33 = descriptionProps?.ref;
|
|
695
|
+
const t34 = isDynamicLabel || !!actions || insideWrapper;
|
|
696
|
+
let t35;
|
|
697
|
+
if ($[57] !== children || $[58] !== description || $[59] !== labelProps || $[60] !== labelRefProp || $[61] !== t33 || $[62] !== t34 || $[63] !== tooltip) {
|
|
698
|
+
t35 = {
|
|
642
699
|
tooltip,
|
|
643
700
|
children,
|
|
701
|
+
description,
|
|
644
702
|
labelProps,
|
|
645
703
|
labelRef: labelRefProp,
|
|
646
|
-
|
|
704
|
+
descriptionRef: t33,
|
|
705
|
+
isDynamicLabel: t34
|
|
647
706
|
};
|
|
648
|
-
$[
|
|
649
|
-
$[
|
|
650
|
-
$[
|
|
651
|
-
$[
|
|
652
|
-
$[
|
|
653
|
-
$[
|
|
654
|
-
|
|
655
|
-
|
|
707
|
+
$[57] = children;
|
|
708
|
+
$[58] = description;
|
|
709
|
+
$[59] = labelProps;
|
|
710
|
+
$[60] = labelRefProp;
|
|
711
|
+
$[61] = t33;
|
|
712
|
+
$[62] = t34;
|
|
713
|
+
$[63] = tooltip;
|
|
714
|
+
$[64] = t35;
|
|
715
|
+
} else t35 = $[64];
|
|
716
|
+
const { labelProps: finalLabelProps, labelRef, descriptionRef, renderWithTooltip, isTooltipActive } = useAutoTooltip(t35);
|
|
656
717
|
const { isNativelyDisabled, isInert, inertProps } = getDisabledElementProps({
|
|
657
718
|
isDisabled: finalIsDisabled,
|
|
658
719
|
keepEvents: isTooltipActive,
|
|
659
720
|
as: rest.as
|
|
660
721
|
});
|
|
661
|
-
let
|
|
662
|
-
if ($[
|
|
663
|
-
|
|
664
|
-
$[
|
|
665
|
-
$[
|
|
666
|
-
$[
|
|
667
|
-
$[
|
|
668
|
-
$[
|
|
669
|
-
} else
|
|
670
|
-
const processedChildren =
|
|
671
|
-
let
|
|
672
|
-
if ($[
|
|
673
|
-
|
|
674
|
-
$[
|
|
675
|
-
$[
|
|
676
|
-
$[
|
|
677
|
-
$[
|
|
678
|
-
$[
|
|
679
|
-
} else
|
|
680
|
-
const processedDescription =
|
|
722
|
+
let t36;
|
|
723
|
+
if ($[65] !== children || $[66] !== highlight || $[67] !== highlightCaseSensitive || $[68] !== highlightStyles) {
|
|
724
|
+
t36 = highlightContent(children, highlight, highlightCaseSensitive, highlightStyles);
|
|
725
|
+
$[65] = children;
|
|
726
|
+
$[66] = highlight;
|
|
727
|
+
$[67] = highlightCaseSensitive;
|
|
728
|
+
$[68] = highlightStyles;
|
|
729
|
+
$[69] = t36;
|
|
730
|
+
} else t36 = $[69];
|
|
731
|
+
const processedChildren = t36;
|
|
732
|
+
let t37;
|
|
733
|
+
if ($[70] !== description || $[71] !== highlight || $[72] !== highlightCaseSensitive || $[73] !== highlightStyles) {
|
|
734
|
+
t37 = highlightContent(description, highlight, highlightCaseSensitive, highlightStyles);
|
|
735
|
+
$[70] = description;
|
|
736
|
+
$[71] = highlight;
|
|
737
|
+
$[72] = highlightCaseSensitive;
|
|
738
|
+
$[73] = highlightStyles;
|
|
739
|
+
$[74] = t37;
|
|
740
|
+
} else t37 = $[74];
|
|
741
|
+
const processedDescription = t37;
|
|
681
742
|
const renderItemElement = (tooltipTriggerProps, tooltipRef) => {
|
|
682
743
|
const { pointerProps: elementTooltipProps, focusProps: tooltipFocusProps } = typeof hiddenContent === "function" ? splitTooltipTriggerProps(tooltipTriggerProps) : {
|
|
683
744
|
pointerProps: tooltipTriggerProps,
|
|
@@ -696,21 +757,18 @@ const Item = (props, ref) => {
|
|
|
696
757
|
"aria-selected": rest["aria-pressed"] != null ? void 0 : isSelected,
|
|
697
758
|
mods: finalMods,
|
|
698
759
|
styles,
|
|
699
|
-
tokens:
|
|
700
|
-
...tokens,
|
|
701
|
-
...sizeTokenValue ? { $size: sizeTokenValue } : {}
|
|
702
|
-
},
|
|
760
|
+
tokens: finalTokens,
|
|
703
761
|
type: htmlType,
|
|
704
762
|
...mergeProps(isInert ? omitActivationEventProps(rest) : rest, elementTooltipProps || {}, inertProps),
|
|
705
763
|
style,
|
|
706
764
|
children: [
|
|
707
765
|
typeof hiddenContent === "function" ? hiddenContent(tooltipFocusProps ?? {}) : hiddenContent,
|
|
708
|
-
|
|
766
|
+
iconSlot.hasSlot && /* @__PURE__ */ jsx("div", {
|
|
709
767
|
"data-element": "Icon",
|
|
710
768
|
children: /* @__PURE__ */ jsx(IconSwitch, {
|
|
711
769
|
noWrapper: true,
|
|
712
|
-
contentKey:
|
|
713
|
-
children:
|
|
770
|
+
contentKey: iconSlot.key,
|
|
771
|
+
children: iconSlot.content
|
|
714
772
|
})
|
|
715
773
|
}),
|
|
716
774
|
finalPrefix && /* @__PURE__ */ jsx("div", {
|
|
@@ -726,18 +784,19 @@ const Item = (props, ref) => {
|
|
|
726
784
|
showDescription ? /* @__PURE__ */ jsx("div", {
|
|
727
785
|
"data-element": "Description",
|
|
728
786
|
...descriptionProps,
|
|
787
|
+
ref: descriptionRef,
|
|
729
788
|
children: processedDescription
|
|
730
789
|
}) : null,
|
|
731
790
|
finalSuffix && /* @__PURE__ */ jsx("div", {
|
|
732
791
|
"data-element": "Suffix",
|
|
733
792
|
children: finalSuffix
|
|
734
793
|
}),
|
|
735
|
-
|
|
794
|
+
rightIconSlot.hasSlot && /* @__PURE__ */ jsx("div", {
|
|
736
795
|
"data-element": "RightIcon",
|
|
737
796
|
children: /* @__PURE__ */ jsx(IconSwitch, {
|
|
738
797
|
noWrapper: true,
|
|
739
|
-
contentKey:
|
|
740
|
-
children:
|
|
798
|
+
contentKey: rightIconSlot.key,
|
|
799
|
+
children: rightIconSlot.content
|
|
741
800
|
})
|
|
742
801
|
}),
|
|
743
802
|
actions && /* @__PURE__ */ jsx("div", {
|