@cube-dev/ui-kit 0.216.3 → 0.218.0
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/README.md +2 -0
- package/dist/CHANGELOG.md +54 -0
- package/dist/README.md +2 -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 +10 -1
- package/dist/components/GlobalStyles.js.map +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 +2 -1
- package/dist/components/actions/Banner/Banner.js.map +1 -1
- package/dist/components/actions/Button/AutoCollapseObserver.js +1 -1
- package/dist/components/actions/Button/Button.js +4 -5
- package/dist/components/actions/Button/Button.js.map +1 -1
- package/dist/components/actions/Button/index.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 -0
- package/dist/components/actions/CommandMenu/CommandMenu.js +94 -85
- 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 +5 -6
- package/dist/components/actions/ItemAction/ItemAction.js.map +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 +4 -2
- package/dist/components/actions/ItemButton/ItemButton.js.map +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/MenuCollectionItem.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 +63 -59
- package/dist/components/actions/Menu/MenuTrigger.js.map +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/touch-context-menu.js +145 -0
- package/dist/components/actions/touch-context-menu.js.map +1 -0
- package/dist/components/actions/use-action.js +4 -2
- 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.d.ts +4 -1
- package/dist/components/actions/use-context-menu.js +6 -1
- package/dist/components/actions/use-context-menu.js.map +1 -1
- package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
- package/dist/components/content/Alert/Alert.js +14 -5
- package/dist/components/content/Alert/Alert.js.map +1 -1
- package/dist/components/content/Alert/types.d.ts +9 -2
- package/dist/components/content/Alert/use-alert.js +37 -33
- package/dist/components/content/Alert/use-alert.js.map +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/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.js +9 -6
- package/dist/components/content/Item/Item.js.map +1 -1
- package/dist/components/content/Item/ItemWithNativeLinks.js +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/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.d.ts +3 -1
- package/dist/components/content/Result/Result.js +9 -7
- package/dist/components/content/Result/Result.js.map +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/checked-keys.js +1 -1
- package/dist/components/content/Tree/rowId.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 +6 -4
- 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/DataTable/types.d.ts +4 -2
- 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/item-table-sections.js +1 -1
- package/dist/components/data/ItemTable/types.d.ts +8 -4
- 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/TableRowLink.js +1 -1
- package/dist/components/data/TableBase/TableView.js +13 -2
- 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.js +1 -1
- package/dist/components/data/TableBase/table-body-sections.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 +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 +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 +3 -1
- package/dist/components/fields/ColorInput/ColorInput.js.map +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/ComboBox/comboBoxOptions.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/CalendarPopover.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.d.ts +17 -0
- package/dist/components/fields/FilterListBox/FilterListBox.js +7 -4
- package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
- package/dist/components/fields/FilterListBox/styled.js +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.d.ts +12 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +5 -2
- package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
- package/dist/components/fields/FilterPicker/FilterTree.js +52 -43
- package/dist/components/fields/FilterPicker/FilterTree.js.map +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/empty-row.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.d.ts +8 -0
- package/dist/components/fields/NumberInput/NumberInput.js +204 -131
- package/dist/components/fields/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.d.ts +2 -2
- package/dist/components/fields/PasswordInput/PasswordInput.js +14 -12
- package/dist/components/fields/PasswordInput/PasswordInput.js.map +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/RadioGroup/joined-styles.js +1 -1
- package/dist/components/fields/SearchComboBox/SearchComboBox.d.ts +7 -0
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +7 -3
- package/dist/components/fields/SearchComboBox/SearchComboBox.js.map +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +3 -2
- package/dist/components/fields/SearchInput/SearchInput.js.map +1 -1
- package/dist/components/fields/Select/Select.js +36 -33
- 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.d.ts +2 -1
- package/dist/components/fields/TagInput/TagInput.js +7 -2
- 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 +1 -1
- package/dist/components/fields/TagInput/useSuffixSpace.js +1 -1
- package/dist/components/fields/TagInput/useTagError.js +1 -1
- package/dist/components/fields/TextArea/TextArea.d.ts +2 -2
- package/dist/components/fields/TextArea/TextArea.js +27 -23
- package/dist/components/fields/TextArea/TextArea.js.map +1 -1
- package/dist/components/fields/TextInput/TextInput.d.ts +3 -3
- package/dist/components/fields/TextInput/TextInput.js +23 -19
- package/dist/components/fields/TextInput/TextInput.js.map +1 -1
- package/dist/components/fields/TextInput/TextInputBase.d.ts +31 -0
- package/dist/components/fields/TextInput/TextInputBase.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js.map +1 -1
- package/dist/components/fields/TextInput/displayed-validation.js +1 -1
- package/dist/components/fields/TextInput/identifier-text-services.js +20 -0
- package/dist/components/fields/TextInput/identifier-text-services.js.map +1 -0
- package/dist/components/fields/TextInput/index.d.ts +2 -2
- package/dist/components/fields/TextInput/password-manager-ignore.js +21 -0
- package/dist/components/fields/TextInput/password-manager-ignore.js.map +1 -0
- package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.d.ts +7 -0
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +14 -12
- package/dist/components/fields/TextInputMapper/TextInputMapper.js.map +1 -1
- package/dist/components/fields/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/fields/ToggleGroup/ToggleGroupItem.js +1 -1
- package/dist/components/fields/ToggleGroup/context.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/fields/index.d.ts +3 -2
- package/dist/components/fields/option-origin-press.js +1 -1
- package/dist/components/fields/search-text-services.d.ts +14 -0
- package/dist/components/fields/search-text-services.js +18 -0
- package/dist/components/fields/search-text-services.js.map +1 -0
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/FieldWrapper/field-description.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/FormContext.js +1 -1
- package/dist/components/form/Form/FormElement.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 +3 -2
- package/dist/components/form/Form/use-field/use-field-binding.js.map +1 -1
- package/dist/components/form/Form/use-field/use-field-props.d.ts +8 -1
- package/dist/components/form/Form/use-field/use-field-props.js +67 -57
- package/dist/components/form/Form/use-field/use-field-props.js.map +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/field-chrome.js +1 -1
- package/dist/components/form/field-layout.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/NavTabs/NavTabs.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/scroll-tab-into-strip.js +1 -1
- package/dist/components/navigation/Tabs/segmented-styles.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 +16 -14
- package/dist/components/overlays/Dialog/Dialog.js.map +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 +107 -46
- package/dist/components/overlays/Dialog/DialogTrigger.js.map +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/context.js.map +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/Dialog/use-dialog-open-sync.js +1 -1
- package/dist/components/overlays/Dialog/use-dismiss-confirmation.js +1 -1
- package/dist/components/overlays/Dialog/use-retained-dialog-focus.js +2 -2
- package/dist/components/overlays/Dialog/use-retained-dialog-focus.js.map +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/Modal/modal-containment.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 +33 -5
- 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 +3 -2
- package/dist/i18n/locales/en-US/uikit.js +3 -2
- package/dist/i18n/locales/en-US/uikit.json.d.ts +1 -0
- package/dist/i18n/locales/es-ES/uikit.js +3 -2
- package/dist/i18n/locales/es-MX/uikit.js +3 -2
- package/dist/i18n/locales/fr-FR/uikit.js +3 -2
- package/dist/i18n/locales/it-IT/uikit.js +3 -2
- package/dist/i18n/locales/ja-JP/uikit.js +3 -2
- package/dist/i18n/locales/nb-NO/uikit.js +3 -2
- package/dist/i18n/locales/pt-BR/uikit.js +3 -2
- package/dist/i18n/locales/pt-PT/uikit.js +3 -2
- package/dist/i18n/locales/sv-SE/uikit.js +3 -2
- package/dist/i18n/locales/vi-VN/uikit.js +3 -2
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/namespace.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 +3 -2
- 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/navigation-url.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/providers/use-navigation.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/layout-scale.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/componentBaseProps.js +1 -1
- package/dist/utils/react/disabledProps.d.ts +9 -3
- package/dist/utils/react/disabledProps.js +9 -5
- package/dist/utils/react/disabledProps.js.map +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/pickBaseCustomizationProps.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/useOpenKey.js +52 -0
- package/dist/utils/react/useOpenKey.js.map +1 -0
- package/dist/utils/react/useOverlayEscapeGuard.js +1 -1
- package/dist/utils/react/useOverlayPosition.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 +3 -3
- package/{src/stories/BaseProperties.docs.mdx → docs/BaseProperties.md} +1 -5
- package/{src/stories/Colors.docs.mdx → docs/Colors.md} +1 -23
- package/{src/stories/ComplexLayout.docs.mdx → docs/ComplexLayout.md} +1 -34
- package/{src/stories/CreateComponent.docs.mdx → docs/CreateComponent.md} +13 -8
- package/{src/stories/FieldProperties.docs.mdx → docs/FieldProperties.md} +6 -10
- package/{src/stories/Introduction.docs.mdx → docs/Introduction.md} +7 -11
- package/{src/stories/RenderCache.docs.mdx → docs/RenderCache.md} +0 -7
- package/{src/stories/SimpleLayout.docs.mdx → docs/SimpleLayout.md} +0 -27
- package/{src/stories/Theming.docs.mdx → docs/Theming.md} +3 -17
- package/{src/stories/Typography.docs.mdx → docs/Typography.md} +0 -20
- package/{src/stories/Usage.docs.mdx → docs/Usage.md} +8 -12
- package/{src/stories/Utilities.docs.mdx → docs/Utilities.md} +0 -4
- package/{src/components/Block.docs.mdx → docs/components/Block.md} +1 -7
- package/{src/components/CollectionItem.docs.mdx → docs/components/CollectionItem.md} +8 -12
- package/{src/components/GridProvider.docs.mdx → docs/components/GridProvider.md} +0 -4
- package/{src/components/Root.docs.mdx → docs/components/Root.md} +2 -6
- package/{src/components/actions/Action/Action.docs.mdx → docs/components/actions/Action.md} +1 -7
- package/{src/components/actions/Banner/Banner.docs.mdx → docs/components/actions/Banner.md} +4 -18
- package/{src/components/actions/Button/Button.docs.mdx → docs/components/actions/Button.md} +4 -21
- package/{src/components/actions/ButtonGroup/ButtonGroup.docs.mdx → docs/components/actions/ButtonGroup.md} +2 -6
- package/{src/components/actions/ButtonSplit/ButtonSplit.docs.mdx → docs/components/actions/ButtonSplit.md} +3 -20
- package/{src/components/actions/CommandMenu/CommandMenu.docs.mdx → docs/components/actions/CommandMenu.md} +18 -33
- package/{src/components/actions/ItemAction/ItemAction.docs.mdx → docs/components/actions/ItemAction.md} +1 -10
- package/{src/components/actions/ItemButton/ItemButton.docs.mdx → docs/components/actions/ItemButton.md} +9 -18
- package/{src/components/actions/Link/Link.docs.mdx → docs/components/actions/Link.md} +3 -13
- package/{src/components/actions/Menu/Menu.docs.mdx → docs/components/actions/Menu.md} +15 -27
- package/{src/components/actions/Menu/MenuTrigger.docs.mdx → docs/components/actions/MenuTrigger.md} +1 -5
- package/{src/components/actions/Menu/SubMenuTrigger.docs.mdx → docs/components/actions/SubMenuTrigger.md} +1 -5
- package/{src/components/actions/use-anchored-menu.docs.mdx → docs/components/actions/use-anchored-menu.md} +5 -9
- package/{src/components/actions/use-context-menu.docs.mdx → docs/components/actions/use-context-menu.md} +21 -12
- package/{src/components/content/ActiveZone/ActiveZone.docs.mdx → docs/components/content/ActiveZone.md} +1 -7
- package/{src/components/content/Alert/Alert.docs.mdx → docs/components/content/Alert.md} +12 -21
- package/{src/components/content/Avatar/Avatar.docs.mdx → docs/components/content/Avatar.md} +1 -7
- package/{src/components/content/Badge/Badge.docs.mdx → docs/components/content/Badge.md} +2 -23
- package/{src/components/content/Card/Card.docs.mdx → docs/components/content/Card.md} +1 -7
- package/{src/components/content/Content.docs.mdx → docs/components/content/Content.md} +1 -5
- package/{src/components/content/CopyPasteBlock/CopyPasteBlock.docs.mdx → docs/components/content/CopyPasteBlock.md} +1 -7
- package/{src/components/content/CopySnippet/CopySnippet.docs.mdx → docs/components/content/CopySnippet.md} +1 -7
- package/{src/components/content/Disclosure/Disclosure.docs.mdx → docs/components/content/Disclosure.md} +3 -34
- package/{src/components/content/Divider/Divider.docs.mdx → docs/components/content/Divider.md} +2 -12
- package/{src/components/content/Footer.docs.mdx → docs/components/content/Footer.md} +1 -5
- package/{src/components/content/Header.docs.mdx → docs/components/content/Header.md} +1 -5
- package/{src/components/content/HotKeys/HotKeys.docs.mdx → docs/components/content/HotKeys.md} +5 -41
- package/{src/components/content/InfoBadge/InfoBadge.docs.mdx → docs/components/content/InfoBadge.md} +1 -7
- package/{src/components/content/InlineInput/InlineInput.docs.mdx → docs/components/content/InlineInput.md} +3 -36
- package/{src/components/content/Item/Item.docs.mdx → docs/components/content/Item.md} +16 -36
- package/{src/components/content/ItemBadge/ItemBadge.docs.mdx → docs/components/content/ItemBadge.md} +1 -7
- package/{src/components/content/ItemCard/ItemCard.docs.mdx → docs/components/content/ItemCard.md} +6 -21
- package/{src/components/content/Layout/Layout.docs.mdx → docs/components/content/Layout.md} +6 -40
- package/{src/components/content/Paragraph.docs.mdx → docs/components/content/Paragraph.md} +2 -8
- package/{src/components/content/Placeholder/Placeholder.docs.mdx → docs/components/content/Placeholder.md} +1 -7
- package/{src/components/content/PrismCode/PrismCode.docs.mdx → docs/components/content/PrismCode.md} +1 -7
- package/{src/components/content/PrismDiffCode/PrismDiffCode.docs.mdx → docs/components/content/PrismDiffCode.md} +1 -7
- package/{src/components/content/Result/Result.docs.mdx → docs/components/content/Result.md} +25 -51
- package/{src/components/content/Skeleton/Skeleton.docs.mdx → docs/components/content/Skeleton.md} +2 -8
- package/{src/components/content/Tag/Tag.docs.mdx → docs/components/content/Tag.md} +2 -21
- package/{src/components/content/Text.docs.mdx → docs/components/content/Text.md} +1 -7
- package/{src/components/content/TextItem/TextItem.docs.mdx → docs/components/content/TextItem.md} +4 -30
- package/{src/components/content/Title.docs.mdx → docs/components/content/Title.md} +1 -5
- package/{src/components/content/Tree/Tree.docs.mdx → docs/components/content/Tree.md} +8 -35
- package/{src/components/data/DataTable/DataTable.docs.mdx → docs/components/data/DataTable.md} +7 -43
- package/{src/components/data/ItemTable/ItemTable.docs.mdx → docs/components/data/ItemTable.md} +14 -73
- package/{src/components/fields/Checkbox/Checkbox.docs.mdx → docs/components/fields/Checkbox.md} +6 -14
- package/{src/components/fields/ColorInput/ColorInput.docs.mdx → docs/components/fields/ColorInput.md} +7 -19
- package/{src/components/fields/ColorPicker/ColorPicker.docs.mdx → docs/components/fields/ColorPicker.md} +10 -24
- package/{src/components/fields/ColorSwatch/ColorSwatch.docs.mdx → docs/components/fields/ColorSwatch.md} +5 -17
- package/{src/components/fields/ColorSwatchGroup/ColorSwatchGroup.docs.mdx → docs/components/fields/ColorSwatchGroup.md} +7 -25
- package/{src/components/fields/ComboBox/ComboBox.docs.mdx → docs/components/fields/ComboBox.md} +7 -66
- package/{src/components/fields/CommandTextArea/CommandTextArea.docs.mdx → docs/components/fields/CommandTextArea.md} +13 -21
- package/{src/components/fields/DatePicker/DatePicker.docs.mdx → docs/components/fields/DatePicker.md} +5 -13
- package/{src/components/fields/FileInput/FileInput.docs.mdx → docs/components/fields/FileInput.md} +6 -16
- package/{src/components/fields/FilterListBox/FilterListBox.docs.mdx → docs/components/fields/FilterListBox.md} +53 -48
- package/{src/components/fields/FilterPicker/FilterPicker.docs.mdx → docs/components/fields/FilterPicker.md} +64 -62
- package/{src/components/fields/Slider/HueSlider.docs.mdx → docs/components/fields/HueSlider.md} +6 -26
- package/{src/components/fields/ListBox/ListBox.docs.mdx → docs/components/fields/ListBox.md} +12 -64
- package/{src/components/fields/NumberInput/NumberInput.docs.mdx → docs/components/fields/NumberInput.md} +40 -18
- package/{src/components/fields/PasswordInput/PasswordInput.docs.mdx → docs/components/fields/PasswordInput.md} +19 -15
- package/{src/components/fields/DatePicker/PeriodPicker.docs.mdx → docs/components/fields/PeriodPicker.md} +5 -32
- package/{src/components/fields/Picker/Picker.docs.mdx → docs/components/fields/Picker.md} +21 -53
- package/{src/components/fields/RadioGroup/RadioGroup.docs.mdx → docs/components/fields/RadioGroup.md} +15 -25
- package/{src/components/fields/SearchComboBox/SearchComboBox.docs.mdx → docs/components/fields/SearchComboBox.md} +15 -39
- package/{src/components/fields/SearchInput/SearchInput.docs.mdx → docs/components/fields/SearchInput.md} +8 -18
- package/{src/components/fields/Select/Select.docs.mdx → docs/components/fields/Select.md} +20 -55
- package/{src/components/fields/Slider/Slider.docs.mdx → docs/components/fields/Slider.md} +2 -34
- package/{src/components/fields/Switch/Switch.docs.mdx → docs/components/fields/Switch.md} +6 -38
- package/{src/components/fields/TagInput/TagInput.docs.mdx → docs/components/fields/TagInput.md} +19 -45
- package/{src/components/fields/TextArea/TextArea.docs.mdx → docs/components/fields/TextArea.md} +10 -26
- package/{src/components/fields/TextInput/TextInput.docs.mdx → docs/components/fields/TextInput.md} +18 -18
- package/{src/components/fields/TextInputMapper/TextInputMapper.docs.mdx → docs/components/fields/TextInputMapper.md} +9 -10
- package/{src/components/fields/ToggleGroup/ToggleGroup.docs.mdx → docs/components/fields/ToggleGroup.md} +12 -33
- package/{src/components/form/Form/Field.docs.mdx → docs/components/form/Field.md} +6 -16
- package/{src/components/form/Form/Form.docs.mdx → docs/components/form/Form.md} +6 -21
- package/{src/components/form/Form/FormInstance.docs.mdx → docs/components/form/FormInstance.md} +1 -9
- package/{src/components/form/Form/modern-form-guide.md → docs/components/form/ModernForm.md} +6 -6
- package/{src/components/form/Form → docs/components/form}/modern-form-migration.md +2 -2
- package/{src/components/helpers/DisplayTransition/DisplayTransition.docs.mdx → docs/components/helpers/DisplayTransition.md} +3 -18
- package/{src/components/helpers/IconSwitch/IconSwitch.docs.mdx → docs/components/helpers/IconSwitch.md} +4 -19
- package/{src/components/layout/Flex.docs.mdx → docs/components/layout/Flex.md} +1 -5
- package/{src/components/layout/Flow.docs.mdx → docs/components/layout/Flow.md} +1 -5
- package/{src/components/layout/Grid.docs.mdx → docs/components/layout/Grid.md} +1 -5
- package/{src/components/layout/Panel.docs.mdx → docs/components/layout/Panel.md} +2 -6
- package/{src/components/layout/Prefix.docs.mdx → docs/components/layout/Prefix.md} +1 -5
- package/{src/components/layout/ResizablePanel.docs.mdx → docs/components/layout/ResizablePanel.md} +2 -11
- package/{src/components/layout/Space.docs.mdx → docs/components/layout/Space.md} +1 -5
- package/{src/components/layout/Suffix.docs.mdx → docs/components/layout/Suffix.md} +1 -5
- package/{src/components/navigation/NavTabs/NavTabs.docs.mdx → docs/components/navigation/NavTabs.md} +6 -16
- package/{src/components/navigation/Pagination/Pagination.docs.mdx → docs/components/navigation/Pagination.md} +4 -25
- package/{src/components/navigation/Tabs/Tabs.docs.mdx → docs/components/navigation/Tabs.md} +13 -94
- package/{src/components/organisms/StatsCard/StatsCard.docs.mdx → docs/components/organisms/StatsCard.md} +2 -6
- package/{src/components/other/Calendar/Calendar.docs.mdx → docs/components/other/Calendar.md} +5 -23
- package/{src/components/other/CubeLogo/CubeLogo.docs.mdx → docs/components/other/CubeLogo.md} +1 -7
- package/{src/components/other/NoDataIcon/NoDataIcon.docs.mdx → docs/components/other/NoDataIcon.md} +3 -9
- package/{src/components/overlays/AlertDialog/AlertDialog.docs.mdx → docs/components/overlays/AlertDialog.md} +26 -10
- package/{src/components/overlays/Dialog/Dialog.docs.mdx → docs/components/overlays/Dialog.md} +9 -13
- package/{src/components/overlays/Dialog/DialogContainer.docs.mdx → docs/components/overlays/DialogContainer.md} +5 -12
- package/{src/components/overlays/Dialog/DialogForm.docs.mdx → docs/components/overlays/DialogForm.md} +14 -23
- package/{src/components/overlays/Dialog/DialogTrigger.docs.mdx → docs/components/overlays/DialogTrigger.md} +6 -11
- package/{src/components/overlays/Notifications/Notifications.docs.mdx → docs/components/overlays/Notifications.md} +6 -29
- package/{src/components/overlays/Toast/Toast.docs.mdx → docs/components/overlays/Toast.md} +11 -30
- package/{src/components/overlays/Tooltip/Tooltip.docs.mdx → docs/components/overlays/Tooltip.md} +5 -22
- package/{src/components/overlays/Tooltip/TooltipProvider.docs.mdx → docs/components/overlays/TooltipProvider.md} +1 -5
- package/{src/components/overlays/Tooltip/TooltipTrigger.docs.mdx → docs/components/overlays/TooltipTrigger.md} +1 -5
- package/{src/components/overlays/Dialog/UseDialogContainer.docs.mdx → docs/components/overlays/UseDialogContainer.md} +3 -7
- package/{src/components/portal/Portal.docs.mdx → docs/components/portal/Portal.md} +1 -7
- package/{src/components/status/LoadingAnimation/LoadingAnimation.docs.mdx → docs/components/status/LoadingAnimation.md} +2 -8
- package/{src/components/status/Spin/Spin.docs.mdx → docs/components/status/Spin.md} +1 -7
- package/docs/llms.txt +174 -0
- package/harness/plugin.json +1 -1
- package/package.json +9 -8
- package/src/components/form/Form/ModernForm.docs.mdx +0 -6
- package/src/components/form/Form/modern-form-typecheck.md +0 -35
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.218.0 | Cube Dev Team */
|
|
2
2
|
import { mergeStyleLayers } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { Text as _Text } from "../../content/Text.js";
|
|
@@ -21,6 +21,7 @@ import { ItemActionIcon, ItemActionsWrapper } from "../../actions/ItemActionsWra
|
|
|
21
21
|
import { DirectionIcon } from "../../../icons/DirectionIcon.js";
|
|
22
22
|
import { StyledDivider, StyledSection, StyledSectionHeading } from "../../actions/Menu/styled.js";
|
|
23
23
|
import { generateRandomId } from "../../../utils/random.js";
|
|
24
|
+
import { useOpenKey } from "../../../utils/react/useOpenKey.js";
|
|
24
25
|
import { useOverlayPosition as useOverlayPosition$1 } from "../../../utils/react/useOverlayPosition.js";
|
|
25
26
|
import { isOwnActionsPress } from "../../actions/actions-run.js";
|
|
26
27
|
import { getValidationMods } from "../../form/validation/resolve-validation-props.js";
|
|
@@ -356,7 +357,7 @@ function Select(rawProps, ref) {
|
|
|
356
357
|
}, { labelProps }));
|
|
357
358
|
}
|
|
358
359
|
function ListBoxPopup(t0) {
|
|
359
|
-
const $ = c(
|
|
360
|
+
const $ = c(49);
|
|
360
361
|
let isDisabled;
|
|
361
362
|
let listBoxRef;
|
|
362
363
|
let listBoxStyles;
|
|
@@ -463,11 +464,12 @@ function ListBoxPopup(t0) {
|
|
|
463
464
|
$[27] = t7;
|
|
464
465
|
} else t7 = $[27];
|
|
465
466
|
const placementDirection = t7;
|
|
466
|
-
const
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
467
|
+
const isListShown = state.isOpen && !isDisabled;
|
|
468
|
+
const openKey = useOpenKey(isListShown);
|
|
469
|
+
let t8;
|
|
470
|
+
if ($[28] !== containerPadding || $[29] !== layerRef || $[30] !== listBoxRef || $[31] !== listBoxStyles || $[32] !== listGap || $[33] !== minWidth || $[34] !== openKey || $[35] !== optionStyles || $[36] !== otherProps || $[37] !== overlayProps || $[38] !== overlayStyles || $[39] !== parentOverlayProps || $[40] !== placementDirection || $[41] !== popoverRef || $[42] !== shouldUseVirtualFocus || $[43] !== size || $[44] !== state) {
|
|
471
|
+
t8 = (t9) => {
|
|
472
|
+
const { phase, isShown, isExiting, ref: transitionRef } = t9;
|
|
471
473
|
return /* @__PURE__ */ jsx(SelectOverlayWrapper, {
|
|
472
474
|
...overlayProps,
|
|
473
475
|
...parentOverlayProps,
|
|
@@ -500,7 +502,7 @@ function ListBoxPopup(t0) {
|
|
|
500
502
|
}),
|
|
501
503
|
/* @__PURE__ */ jsx(DismissButton, { onDismiss: () => state.close() })
|
|
502
504
|
]
|
|
503
|
-
})
|
|
505
|
+
}, openKey)
|
|
504
506
|
})
|
|
505
507
|
});
|
|
506
508
|
};
|
|
@@ -510,29 +512,30 @@ function ListBoxPopup(t0) {
|
|
|
510
512
|
$[31] = listBoxStyles;
|
|
511
513
|
$[32] = listGap;
|
|
512
514
|
$[33] = minWidth;
|
|
513
|
-
$[34] =
|
|
514
|
-
$[35] =
|
|
515
|
-
$[36] =
|
|
516
|
-
$[37] =
|
|
517
|
-
$[38] =
|
|
518
|
-
$[39] =
|
|
519
|
-
$[40] =
|
|
520
|
-
$[41] =
|
|
521
|
-
$[42] =
|
|
522
|
-
$[43] =
|
|
523
|
-
$[44] =
|
|
524
|
-
} else t9 = $[44];
|
|
525
|
-
let t10;
|
|
526
|
-
if ($[45] !== t8 || $[46] !== t9) {
|
|
527
|
-
t10 = /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(DisplayTransition, {
|
|
528
|
-
isShown: t8,
|
|
529
|
-
children: t9
|
|
530
|
-
}) });
|
|
515
|
+
$[34] = openKey;
|
|
516
|
+
$[35] = optionStyles;
|
|
517
|
+
$[36] = otherProps;
|
|
518
|
+
$[37] = overlayProps;
|
|
519
|
+
$[38] = overlayStyles;
|
|
520
|
+
$[39] = parentOverlayProps;
|
|
521
|
+
$[40] = placementDirection;
|
|
522
|
+
$[41] = popoverRef;
|
|
523
|
+
$[42] = shouldUseVirtualFocus;
|
|
524
|
+
$[43] = size;
|
|
525
|
+
$[44] = state;
|
|
531
526
|
$[45] = t8;
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
527
|
+
} else t8 = $[45];
|
|
528
|
+
let t9;
|
|
529
|
+
if ($[46] !== isListShown || $[47] !== t8) {
|
|
530
|
+
t9 = /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(DisplayTransition, {
|
|
531
|
+
isShown: isListShown,
|
|
532
|
+
children: t8
|
|
533
|
+
}) });
|
|
534
|
+
$[46] = isListShown;
|
|
535
|
+
$[47] = t8;
|
|
536
|
+
$[48] = t9;
|
|
537
|
+
} else t9 = $[48];
|
|
538
|
+
return t9;
|
|
536
539
|
}
|
|
537
540
|
/** The first or last option that can take focus. */
|
|
538
541
|
function getEdgeOptionKey(state, edge) {
|
|
@@ -581,9 +584,9 @@ function focusOpeningOption(state, list, shouldUseVirtualFocus) {
|
|
|
581
584
|
}
|
|
582
585
|
/**
|
|
583
586
|
* The list inside the popup. It decides where focus lands when it mounts,
|
|
584
|
-
* rather than inheriting the last opening.
|
|
585
|
-
*
|
|
586
|
-
* transition
|
|
587
|
+
* rather than inheriting the last opening. It mounts on every opening: the
|
|
588
|
+
* popup unmounts it once it has closed, and a reopen during the exit
|
|
589
|
+
* transition remounts it through the popup's per-opening key.
|
|
587
590
|
*/
|
|
588
591
|
function SelectListBox(t0) {
|
|
589
592
|
const $ = c(36);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","names":["AriaLabelingProps","CollectionBase","Key","Styles","tasty","React","cloneElement","ForwardedRef","forwardRef","ForwardRefRenderFunction","KeyboardEvent","ReactElement","ReactNode","RefObject","useEffect","useEffectEvent","useLayoutEffect","useMemo","useRef","useState","AriaSelectProps","DismissButton","FocusScope","HiddenSelect","useButton","useHover","useListBox","useListBoxSection","useOption","useOverlay","useSelect","Section","BaseSection","SelectState","useSelectState","useI18n","CloseIcon","DirectionIcon","LoadingIcon","FieldBaseProps","generateRandomId","useFocus","mergeProps","pickBaseCustomizationProps","focusProgrammatically","mergeRefs","useCombinedRefs","useOverlayEscapeGuard","useOverlayPosition","usePopoverSync","mergeStyleLayers","isOwnActionsPress","ItemAction","ItemActionsWrapper","StyledDivider","ListDivider","StyledSectionHeading","ListSectionHeading","StyledSection","ListSectionWrapper","CollectionItem","filterCollectionItemProps","filterSelectionItemProps","getValueSelectionState","CubeItemProps","Item","Text","FieldLayoutStyleProps","splitFieldLayout","useFieldProps","getValidationMods","getValidationIcon","wrapWithField","DisplayTransition","useModalLayerRef","CubeTooltipProviderProps","Portal","useOptionOriginPress","TriggerActions","TriggerIcon","Placement","Props","ComponentBasePropsWithoutChildren","SelectWrapperElement","qa","styles","display","position","radius","fill","disabled","color","focused","invalid","ListBoxElement","as","section","gap","sections","flow","margin","padding","listStyle","overflow","scrollbar","outline","OptionItem","disableActionsFocus","SelectOverlayWrapper","zIndex","width","side","OverlayElement","gridRows","height","shadow","border","boxSizing","transition","translate","transformOrigin","scale","opacity","CubeSelectBaseProps","T","Omit","selectedKey","defaultSelectedKey","onSelectionChange","key","icon","rightIcon","prefix","suffix","triggerDescription","descriptionPlacement","hotkeys","tooltip","auto","triggerRef","HTMLButtonElement","isLoading","loadingIndicator","overlayOffset","hideTrigger","inputStyles","optionStyles","triggerStyles","listBoxStyles","listGap","overlayStyles","direction","targetRef","HTMLElement","placement","shouldFlip","containerPadding","inputProps","type","shape","suffixPosition","theme","isClearable","clearLabel","onClear","actions","onOpenChange","isOpen","CubeSelectProps","popoverRef","listBoxRef","size","placeholder","ignore","lockSelectState","state","S","open","toggle","setSelectedKey","setValue","Select","rawProps","ref","HTMLDivElement","props","defaultValidationTrigger","valuePropsMapper","value","onChange","label","extra","labelStyles","isRequired","necessityIndicator","isInvalid","isValid","isDisabled","autoFocus","triggerRefProp","message","placementProp","labelSuffix","form","t","isLocked","isReadOnly","selectId","isInert","closeList","close","fieldLayout","menuId","onClose","containerRef","popover","current","active","document","activeElement","contains","preventScroll","labelProps","triggerProps","valueProps","menuProps","undefined","overlayProps","overlayRef","scrollRef","offset","isFocused","focusProps","hoverProps","isHovered","buttonProps","validationIcon","hasSelection","selectedItem","showClearButton","clearValue","triggerWidth","setTriggerWidth","offsetWidth","loadingIcon","showPlaceholder","trim","modifiers","loading","hovered","hasCustomRightIcon","triggerRightIcon","hasTriggerActions","triggerActions","pressed","selectField","name","showActions","skipActionsWidthTransition","mods","rendered","field","ListBoxPopup","t0","$","_c","minWidth","otherProps","parentOverlayProps","t1","t2","t3","shouldUseVirtualFocus","t4","t5","el","menuTriggerEl","closest","setTimeout","t6","shouldCloseOnBlur","isDismissable","shouldCloseOnInteractOutside","rawOverlayProps","layerRef","t7","split","placementDirection","t8","t9","t10","phase","isShown","isExiting","transitionRef","style","getEdgeOptionKey","edge","keys","collection","getKeys","reverse","find","getItem","selectionManager","canSelectItem","getOpeningFocusKey","focusStrategy","scrollIntoList","list","option","top","node","offsetParent","offsetTop","bottom","offsetHeight","scrollTop","clientHeight","focusOpeningOption","manager","setFocused","setFocusedKey","Array","from","querySelectorAll","element","dataset","String","focus","SelectListBox","listItemSize","listGapTokens","listBoxProps","focusOnOpen","Symbol","for","hasSections","renderedItems","item","push","Option","disabledKeys","has","isSelected","isVirtualFocused","focusedKey","shouldSelectOnPressUp","shouldFocusOnHover","optionProps","isPressed","descriptionProps","originPress","onPointerUp","ariaOptionProps","filteredItemProps","keyboardProps","onKeyDown","event","ctrlKey","target","currentTarget","preventDefault","T0","onPointerDown","wrapPointerUp","listboxitem","selected","SelectSectionProps","headingStyles","sectionStyles","SelectSection","heading","itemProps","headingProps","groupProps","childNodes","filter","map","node_0","_Select","cubeInputType","SectionComponent","SelectSectionComponent","Object","assign","displayName","__Select","Action","Item","useOverlayPosition","useFocus","TriggerIcon","mergeProps","Text","_c","ListDivider","ListSectionHeading","ListSectionWrapper","BaseSection","CollectionItem"],"sources":["../../../../src/components/fields/Select/Select.tsx"],"sourcesContent":["import { AriaLabelingProps, CollectionBase, Key } from '@react-types/shared';\nimport { Styles, tasty } from '@tenphi/tasty';\nimport React, {\n cloneElement,\n ForwardedRef,\n forwardRef,\n ForwardRefRenderFunction,\n KeyboardEvent,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useEffectEvent,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n AriaSelectProps,\n DismissButton,\n FocusScope,\n HiddenSelect,\n useButton,\n useHover,\n useListBox,\n useListBoxSection,\n useOption,\n useOverlay,\n useSelect,\n} from 'react-aria';\nimport {\n Section as BaseSection,\n SelectState,\n useSelectState,\n} from 'react-stately';\n\nimport { useI18n } from '../../../i18n/useI18n';\nimport { CloseIcon } from '../../../icons/CloseIcon';\nimport { DirectionIcon } from '../../../icons/DirectionIcon';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { FieldBaseProps } from '../../../shared/form';\nimport { generateRandomId } from '../../../utils/random';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { mergeProps } from '../../../utils/react/mergeProps';\nimport { pickBaseCustomizationProps } from '../../../utils/react/pickBaseCustomizationProps';\nimport { focusProgrammatically } from '../../../utils/react/programmaticFocus';\nimport {\n mergeRefs,\n useCombinedRefs,\n} from '../../../utils/react/useCombinedRefs';\nimport { useOverlayEscapeGuard } from '../../../utils/react/useOverlayEscapeGuard';\nimport { useOverlayPosition } from '../../../utils/react/useOverlayPosition';\nimport { usePopoverSync } from '../../../utils/react/usePopoverSync';\nimport { mergeStyleLayers } from '../../../utils/styles';\nimport { isOwnActionsPress } from '../../actions/actions-run';\nimport { ItemAction } from '../../actions/ItemAction/ItemAction';\nimport { ItemActionsWrapper } from '../../actions/ItemActionsWrapper';\nimport {\n StyledDivider as ListDivider,\n StyledSectionHeading as ListSectionHeading,\n StyledSection as ListSectionWrapper,\n} from '../../actions/Menu/styled';\nimport {\n CollectionItem,\n filterCollectionItemProps,\n filterSelectionItemProps,\n getValueSelectionState,\n} from '../../CollectionItem';\nimport { CubeItemProps, Item } from '../../content/Item/Item';\nimport { Text } from '../../content/Text';\nimport {\n FieldLayoutStyleProps,\n splitFieldLayout,\n} from '../../form/field-layout';\nimport { useFieldProps } from '../../form/Form/use-field/use-field-props';\nimport { getValidationMods } from '../../form/validation/resolve-validation-props';\nimport { getValidationIcon } from '../../form/validation/ValidationIndicator';\nimport { wrapWithField } from '../../form/wrapper';\nimport { DisplayTransition } from '../../helpers/DisplayTransition/DisplayTransition';\nimport { useModalLayerRef } from '../../overlays/Modal/modal-containment';\nimport { CubeTooltipProviderProps } from '../../overlays/Tooltip/TooltipProvider';\nimport { Portal } from '../../portal/Portal';\nimport { useOptionOriginPress } from '../option-origin-press';\nimport { TriggerActions, TriggerIcon } from '../TriggerActions';\n\nimport type { Placement } from 'react-aria';\nimport type { Props } from '../../../props';\nimport type { ComponentBasePropsWithoutChildren } from '../../../utils/react/componentBaseProps';\n\nconst SelectWrapperElement = tasty({\n qa: 'SelectWrapper',\n styles: {\n display: 'grid',\n position: 'relative',\n radius: true,\n fill: {\n '': '#surface',\n disabled: '#disabled-surface',\n 'theme=special': '#clear',\n },\n color: {\n '': '#dark.85',\n focused: '#dark.85',\n invalid: '#danger-text',\n disabled: '#disabled-surface-text',\n },\n },\n});\n\nexport const ListBoxElement = tasty({\n qa: 'ListBox',\n as: 'ul',\n styles: {\n // Set from `listGap`. A section's list inherits it from the popup's.\n '$list-gap': { '': '$item-gap', section: false },\n display: 'flex',\n // It spaces options: sections and dividers keep a hairline.\n gap: { '': '$list-gap', sections: '$item-gap' },\n flow: 'column',\n margin: '0',\n padding: '0',\n listStyle: 'none',\n // The popup's list is the scroll container and the element its height\n // limit lands on, so React Aria's page navigation measures what is\n // actually visible. A section's list grows with its options.\n overflow: { '': 'auto', section: false },\n // Options measure their scroll offset against the list.\n position: 'relative',\n scrollbar: 'styled',\n // The listbox is programmatically focused when the popover opens\n // (so keyboard nav works immediately) but it should never display a\n // focus ring — only the focused option does. Without this, the\n // browser draws its native outline around the whole listbox when\n // it receives focus.\n outline: 0,\n },\n});\n\n// Use Item for options to unify item visuals and reduce custom styling\nconst OptionItem = tasty(Item, {\n as: 'li',\n disableActionsFocus: true,\n qa: 'Option',\n styles: {\n '$inline-compensation': '0px',\n },\n});\n\nconst SelectOverlayWrapper = tasty({\n qa: 'SelectOverlayWrapper',\n styles: {\n position: 'absolute',\n zIndex: 1000,\n // Above or below its trigger, as wide as the popup wherever React Aria\n // puts it. Left to shrink, the width ends at the screen edge, and React\n // Aria measures that squeezed width: a list that grows while open then\n // crept a few pixels per frame instead of moving once. The cap is the room\n // React Aria leaves inside the viewport (`%`, unlike `vw`, leaves out a\n // page scrollbar). Beside its trigger, React Aria never moves the list\n // along the edge it would cross, so the list keeps shrinking to the room\n // there and stays on screen.\n width: {\n '': 'initial max-content (100% - 2 * $select-overlay-padding)',\n side: false,\n },\n // React Aria writes the room left in the viewport as this element's\n // `max-height`; a flex column lets the popup shrink to it.\n display: 'flex',\n flow: 'column',\n },\n});\n\nconst OverlayElement = tasty({\n qa: 'SelectOverlay',\n styles: {\n width: 'min $overlay-min-width',\n display: 'grid',\n gridRows: '1sf',\n height: 'initial max-content (50vh - 5x)',\n overflow: 'auto',\n fill: '#surface',\n radius: '1cr',\n shadow: true,\n padding: '.5x',\n border: true,\n boxSizing: 'border-box',\n transition:\n 'translate $transition ease-out, scale $transition ease-out, theme $transition ease-out',\n translate: {\n '': '0 0',\n 'open & [data-placement=\"top\"]': '0 0',\n '!open & [data-placement=\"top\"]': '0 1x',\n 'open & ([data-placement=\"bottom\"] | ![data-placement])': '0 0',\n '!open & ([data-placement=\"bottom\"] | ![data-placement])': '0 -1x',\n },\n transformOrigin: {\n '': 'top center',\n '[data-placement=\"top\"]': 'bottom center',\n },\n scale: {\n '': '1 1',\n '!open': '1 .9',\n },\n opacity: {\n '': 1,\n '!open': 0.001,\n },\n },\n});\n\nexport interface CubeSelectBaseProps<T>\n extends\n ComponentBasePropsWithoutChildren,\n AriaLabelingProps,\n FieldLayoutStyleProps,\n FieldBaseProps<Key | null | undefined>,\n CollectionBase<T>,\n Omit<\n AriaSelectProps<T>,\n | 'errorMessage'\n | 'form'\n | 'name'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'onSelectionChange'\n > {\n /** The currently selected key in the collection (controlled). */\n selectedKey?: Key | null;\n /** The initial selected key in the collection (uncontrolled). */\n defaultSelectedKey?: Key;\n /** Handler that is called when the selection changes. */\n onSelectionChange?: (key: Key | null) => void;\n icon?: ReactElement;\n rightIcon?: ReactNode;\n prefix?: ReactNode;\n suffix?: ReactNode;\n /** Description text for the trigger. Note: Different from field-level description. */\n triggerDescription?: ReactNode;\n descriptionPlacement?: 'inline' | 'block';\n /** Keyboard shortcut that triggers the select when pressed */\n hotkeys?: string;\n /**\n * Tooltip content and configuration for the trigger. The info badge next to\n * the field's label is `labelTooltip`.\n * - string: simple tooltip text\n * - true: auto tooltip on overflow (shows selected value as tooltip when truncated)\n * - object: advanced configuration with optional auto property\n */\n tooltip?:\n | string\n | boolean\n | (Omit<CubeTooltipProviderProps, 'children'> & { auto?: boolean });\n triggerRef?: RefObject<HTMLButtonElement>;\n /**\n * Shows a loading indicator in the trigger. The value can't change while\n * loading: the list doesn't open and typeahead is ignored.\n */\n isLoading?: boolean;\n /** Replaces the default loading icon shown while `isLoading` is set. */\n loadingIndicator?: ReactNode;\n overlayOffset?: number;\n /**\n * @deprecated Has no effect: the whole Select is its trigger. To hide the\n * dropdown caret, pass `rightIcon={null}`.\n */\n hideTrigger?: boolean;\n /**\n * @deprecated Use `triggerStyles` instead\n */\n inputStyles?: Styles;\n optionStyles?: Styles;\n triggerStyles?: Styles;\n listBoxStyles?: Styles;\n /** Space between options, in pixels. Defaults to a hairline (`$item-gap`, `1px`). */\n listGap?: number;\n overlayStyles?: Styles;\n direction?: 'top' | 'bottom';\n /**\n * The ref of the element the popover should visually attach itself to.\n * Defaults to the trigger button.\n *\n * Only the popover's POSITION follows this ref. The trigger keeps its own\n * ref for focus, outside-click and dismiss logic, so anchoring to a wider\n * container does not make clicks inside that container count as trigger\n * presses. The popover's `minWidth` also stays tied to the trigger, not to\n * this element.\n */\n targetRef?: RefObject<HTMLElement | null>;\n /**\n * Placement of the popover relative to the anchor.\n * Accepts React Aria's `Placement` strings (e.g. `'bottom start'`,\n * `'top start'`, `'right top'`, `'left top'`).\n *\n * Overrides `direction` when both are given.\n * @default `${direction} end`\n */\n placement?: Placement;\n shouldFlip?: boolean;\n /** Minimum padding in pixels between the popover and viewport edges */\n containerPadding?: number;\n /** Additional props for the trigger button element. */\n inputProps?: Props;\n type?: 'outline' | 'outline-2' | 'clear' | 'primary' | (string & {});\n /**\n * Shape of the trigger's border radius.\n * - `card` - Card shape with larger border radius (`1cr`)\n * - `button` - Button shape with default border radius (default)\n * - `sharp` - Sharp corners with no border radius (`0`)\n * - `pill` - Pill shape with fully rounded ends (`round`)\n * @default \"button\"\n */\n shape?: 'card' | 'button' | 'sharp' | 'pill';\n suffixPosition?: 'before' | 'after';\n theme?: 'default' | 'special';\n /** Whether the select is clearable using a clear button in the rightIcon slot */\n isClearable?: boolean;\n /** Accessible name for the built-in clear button. Defaults to a localized \"Clear value\". */\n clearLabel?: string;\n /** Callback called when the clear button is pressed */\n onClear?: () => void;\n /**\n * Custom actions rendered inside the trigger, to the left of the built-in\n * clear button and dropdown caret. Use `Select.Action` so they match the\n * trigger's size and theme.\n *\n * Pressing one runs its handler without opening or closing the popover —\n * including while the popover is open. Actions follow the trigger's disabled\n * state but NOT `isReadOnly`, since a read-only field can still host an\n * action that does not change the value; pass `isDisabled` yourself for one\n * that does.\n */\n actions?: ReactNode;\n /** Callback called when the popover open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\nexport interface CubeSelectProps<T> extends CubeSelectBaseProps<T> {\n /** The ref for the popover element. */\n popoverRef?: RefObject<HTMLElement | null>;\n /** The ref for the list box. */\n listBoxRef?: RefObject<HTMLElement>;\n size?: 'small' | 'medium' | 'large' | (string & {});\n placeholder?: string;\n}\n\nconst ignore = () => {};\n\n/**\n * A state whose value can't change. React Aria's trigger opens the list,\n * steps with `ArrowLeft`/`ArrowRight` and typeaheads through these methods,\n * so ignoring them fixes the value while the trigger stays focusable.\n */\nfunction lockSelectState<S extends SelectState<object>>(state: S): S {\n return {\n ...state,\n open: ignore,\n toggle: ignore,\n setSelectedKey: ignore,\n setValue: ignore,\n };\n}\n\nfunction Select<T extends object>(\n rawProps: CubeSelectProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n let props = useFieldProps(rawProps, {\n defaultValidationTrigger: 'onChange',\n valuePropsMapper: ({ value, onChange }) => ({\n selectedKey: value ?? null,\n onSelectionChange: onChange,\n }),\n });\n\n let {\n qa,\n label,\n extra,\n icon,\n rightIcon,\n labelStyles,\n isRequired,\n necessityIndicator,\n isInvalid,\n isValid,\n prefix,\n isDisabled = props.isLoading || false,\n autoFocus,\n inputProps,\n triggerRef: triggerRefProp,\n popoverRef,\n listBoxRef,\n isLoading,\n loadingIndicator,\n overlayOffset = 8,\n inputStyles,\n triggerStyles,\n optionStyles,\n listBoxStyles,\n listGap,\n overlayStyles,\n suffix,\n actions,\n message,\n triggerDescription,\n descriptionPlacement,\n hotkeys,\n direction = 'bottom',\n targetRef,\n placement: placementProp,\n shouldFlip = true,\n containerPadding = 8,\n placeholder,\n tooltip,\n size = 'medium',\n shape,\n styles,\n type = 'outline',\n theme = 'default',\n labelSuffix,\n suffixPosition = 'before',\n isClearable,\n clearLabel,\n onOpenChange,\n form,\n } = props;\n const { t } = useI18n();\n // `useSelectState` reports `onOpenChange` itself, once per transition.\n let state = getValueSelectionState(useSelectState(props));\n // Read-only and loading keep the trigger focusable, but its value is fixed.\n const isLocked = !!props.isReadOnly || !!isLoading;\n\n if (isLocked) state = lockSelectState(state);\n\n // Generate a unique ID for this select instance\n const selectId = useMemo(() => generateRandomId(), []);\n\n // A list that can no longer change the value closes rather than staying open\n // behind a hidden popup, so `aria-expanded` follows and enabling the field\n // again doesn't bring the list back.\n const isInert = isLocked || isDisabled;\n const closeList = useEffectEvent(() => state.close());\n\n useEffect(() => {\n if (isInert && state.isOpen) closeList();\n }, [isInert, state.isOpen]);\n\n const fieldLayout = splitFieldLayout(props);\n\n styles = fieldLayout.styles;\n\n ref = useCombinedRefs(ref);\n const triggerRef = useCombinedRefs(triggerRefProp);\n popoverRef = useCombinedRefs(popoverRef);\n listBoxRef = useCombinedRefs(listBoxRef);\n\n usePopoverSync({\n menuId: selectId,\n isOpen: state.isOpen,\n onClose: () => state.close(),\n triggerRef: triggerRef as RefObject<HTMLElement | null>,\n containerRef: popoverRef as RefObject<HTMLElement | null>,\n });\n\n // Hand focus back to the trigger the moment the list closes, rather than\n // leaving it to the popup's `FocusScope`, which only restores when it\n // UNMOUNTS — at the end of the exit transition (CUB-4839).\n //\n // For the length of that transition focus would otherwise sit on an option\n // inside a popup that is going away, and the key a user presses next can\n // land nowhere at all: once the option is detached focus drops to `<body>`,\n // which takes the event out of the React tree entirely.\n //\n // `focusProgrammatically` so the trigger's tooltip does not read this as the\n // user arriving and pop up — it would then swallow that next `Escape`.\n //\n // Guarded on focus still being INSIDE the popup, so this only finishes a\n // hand-off the popup had already started: closing by clicking elsewhere\n // leaves focus wherever the user put it.\n useEffect(() => {\n if (state.isOpen) return;\n\n const popover = popoverRef.current;\n const active = document.activeElement;\n\n if (!popover || !active || !popover.contains(active)) return;\n\n focusProgrammatically(triggerRef.current, { preventScroll: true });\n // Both refs come from `useCombinedRefs`, so their identity never changes;\n // listing them satisfies the rule without re-running this.\n }, [state.isOpen, popoverRef, triggerRef]);\n\n // React Aria hands `form` to `HiddenSelect` as the id of its `<form>`, so the\n // form instance would render as `form=\"[object Object]\"` on the `<select>`.\n let { labelProps, triggerProps, valueProps, menuProps } = useSelect(\n { ...props, form: undefined },\n state,\n triggerRef,\n );\n\n let { overlayProps, placement } = useOverlayPosition({\n // Position only. `triggerRef` stays the dismiss/focus anchor below, so a\n // consumer can line this popover up with a row without that row's clicks\n // reading as presses on the trigger.\n targetRef: (targetRef ?? triggerRef) as RefObject<HTMLElement>,\n overlayRef: popoverRef,\n scrollRef: listBoxRef,\n placement: placementProp ?? (`${direction} end` as Placement),\n shouldFlip: shouldFlip,\n isOpen: state.isOpen,\n onClose: state.close,\n offset: overlayOffset,\n containerPadding: containerPadding,\n });\n\n let { isFocused, focusProps } = useFocus(true);\n let { hoverProps, isHovered } = useHover({ isDisabled });\n\n // Get props for the button based on the trigger props from useSelect\n let { buttonProps } = useButton({ ...triggerProps, autoFocus }, triggerRef);\n\n let validationIcon = getValidationIcon({ isInvalid, isValid });\n\n // Clear button logic\n let hasSelection = state.selectedItem != null;\n let showClearButton = isClearable && hasSelection && !isInert;\n\n function clearValue() {\n // Reports the change through `onSelectionChange`.\n state.setSelectedKey(null);\n\n if (state.isOpen) {\n state.close();\n }\n\n // Back to the trigger, without its tooltip reading this as the user\n // arriving there and then swallowing the next `Escape`.\n focusProgrammatically(triggerRef.current);\n\n props.onClear?.();\n }\n\n // The popup is at least as wide as the trigger. Measured as the list opens,\n // before the popup mounts and is positioned, rather than during render, so a\n // trigger resized while the list was closed is read fresh.\n const [triggerWidth, setTriggerWidth] = useState<number>();\n\n useLayoutEffect(() => {\n if (state.isOpen) setTriggerWidth(triggerRef.current?.offsetWidth);\n }, [state.isOpen, triggerRef]);\n\n const loadingIcon = loadingIndicator ?? <LoadingIcon />;\n\n const showPlaceholder = !!placeholder?.trim() && !state.selectedItem;\n\n const modifiers = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n loading: isLoading,\n hovered: isHovered,\n focused: isFocused,\n placeholder: showPlaceholder,\n prefix: !!prefix,\n suffix: true,\n }),\n [\n isInvalid,\n isValid,\n isDisabled,\n isLoading,\n isHovered,\n isFocused,\n showPlaceholder,\n prefix,\n ],\n );\n\n suffix = useMemo(() => {\n if (!suffix && !validationIcon) {\n return null;\n }\n\n return (\n <>\n {suffix}\n {validationIcon}\n </>\n );\n }, [suffix, validationIcon]);\n\n // A caller's `rightIcon` keeps the `rightIcon` slot: it accepts a render\n // function resolved against the trigger's mods, which only that slot does, and\n // it is also what a caller's `RightIcon` styles target. It replaces the\n // built-in control, exactly as before.\n const hasCustomRightIcon = rightIcon !== undefined;\n const triggerRightIcon = hasCustomRightIcon\n ? isLoading\n ? loadingIcon\n : rightIcon\n : undefined;\n\n // With a caller's own `rightIcon` the built-in control moves into that slot,\n // leaving the run with whatever the caller passed — possibly nothing. The run\n // is still rendered, so the trigger does not restructure if actions arrive\n // later, but the row stops counting it as end content — which is what keeps an\n // icon-only trigger with `rightIcon={null}` square.\n const hasTriggerActions = !hasCustomRightIcon || !!actions;\n\n // Everything trailing that is NOT the caller's own icon goes into the actions\n // run — a sibling of the `<button>`, so the clear button is no longer nested\n // inside one. See `TriggerActions`.\n const triggerActions = (\n <TriggerActions\n actions={actions}\n builtIn={\n hasCustomRightIcon ? null : showClearButton ? (\n <ItemAction\n icon={<CloseIcon />}\n size={size}\n qa=\"SelectClearButton\"\n // `ItemAction` derives its accessible name from `aria-label` or a\n // string `tooltip` and warns for neither, so an icon-only clear\n // button without this reaches a screen reader unnamed.\n aria-label={clearLabel ?? t('select.clearValue', 'Clear value')}\n // No explicit `type`/`theme`: the default `current` type paints\n // from the trigger's own inherited text color, so the button\n // matches whatever the field is showing instead of one palette.\n //\n // NOTE: this trigger keeps NEUTRAL label text when invalid, so\n // the button reads neutral there too. `Picker` and `FilterPicker`\n // are also `Item`-based but do tint theirs, which is the actual\n // inconsistency to fix — in `Select`, not here.\n mods={{ pressed: false }}\n onPress={clearValue}\n />\n ) : isLoading ? (\n <TriggerIcon>{loadingIcon}</TriggerIcon>\n ) : (\n <TriggerIcon>\n <DirectionIcon to={state.isOpen ? 'up' : 'down'} />\n </TriggerIcon>\n )\n }\n />\n );\n\n let selectField = (\n <SelectWrapperElement\n ref={ref}\n mods={modifiers}\n styles={styles}\n data-size={size}\n data-type={type}\n data-theme={theme}\n >\n <HiddenSelect\n state={state}\n triggerRef={triggerRef}\n label={props.label}\n name={props.name}\n />\n {/*\n The trigger's trailing controls are rendered as a SIBLING of the\n `<button>` — the same layout `ItemButton` uses for its actions, shared\n through `ItemActionsWrapper`. `Select` builds its trigger from `Item`\n rather than `ItemButton` because `useSelect`/`useButton` already own the\n button props, so it reaches for the wrapper directly.\n\n The RAW theme, unlike `Picker` / `FilterPicker` which forward\n `getValidationTheme(...)`: this trigger is painted with the raw theme too\n and surfaces validation through `SelectWrapperElement` rather than by\n switching theme. What the wrapper hands its actions must always match\n what the trigger paints with.\n */}\n <ItemActionsWrapper\n type={type}\n theme={theme}\n size={size}\n isDisabled={isDisabled || isLoading}\n mods={modifiers}\n actions={triggerActions}\n >\n {({ showActions, skipActionsWidthTransition }) => (\n <Item\n actions={hasTriggerActions || undefined}\n insideWrapper\n as=\"button\"\n {...pickBaseCustomizationProps(props)}\n qa={qa || 'Select'}\n data-input-type=\"select\"\n {...mergeProps(buttonProps, hoverProps, focusProps, inputProps)}\n // For a dialog kept mounted while closed, as on `Button`.\n {...(autoFocus ? { 'data-autofocus': '' } : undefined)}\n ref={triggerRef}\n data-popover-trigger\n showActions={showActions}\n skipActionsWidthTransition={skipActionsWidthTransition}\n styles={mergeStyleLayers(inputStyles, triggerStyles)}\n theme={theme}\n size={size}\n shape={shape}\n // Ensure this button never submits a surrounding form in tests or runtime\n htmlType=\"button\"\n // Preserve visual variant via data attribute instead of conflicting with HTML attribute\n type={type}\n mods={{ ...modifiers, ...props.mods }}\n prefix={prefix}\n suffix={suffix}\n icon={icon}\n rightIcon={triggerRightIcon}\n description={triggerDescription}\n descriptionPlacement={descriptionPlacement}\n hotkeys={hotkeys}\n tooltip={tooltip}\n labelProps={valueProps}\n >\n {state.selectedItem ? (\n state.selectedItem.rendered\n ) : placeholder ? (\n <Text.Placeholder>{placeholder}</Text.Placeholder>\n ) : null}\n </Item>\n )}\n </ItemActionsWrapper>\n <ListBoxPopup\n {...menuProps}\n popoverRef={popoverRef}\n listBoxRef={listBoxRef}\n overlayProps={overlayProps}\n placement={placement}\n state={state}\n listBoxStyles={listBoxStyles}\n listGap={listGap}\n overlayStyles={overlayStyles}\n optionStyles={optionStyles}\n minWidth={triggerWidth}\n containerPadding={containerPadding}\n size={size}\n triggerRef={triggerRef}\n isDisabled={isDisabled}\n />\n </SelectWrapperElement>\n );\n\n return wrapWithField<Omit<CubeSelectProps<T>, 'children' | 'tooltip'>>(\n selectField,\n mergeProps(\n {\n ...props,\n ...fieldLayout.field,\n // The trigger's own. Handed on, it read as the legacy field `tooltip`.\n tooltip: undefined,\n },\n { labelProps },\n ),\n );\n}\n\nexport function ListBoxPopup({\n state,\n popoverRef,\n listBoxRef,\n listBoxStyles,\n listGap,\n overlayStyles,\n optionStyles,\n overlayProps: parentOverlayProps,\n shouldUseVirtualFocus = false,\n placement,\n minWidth,\n containerPadding = 8,\n size = 'small',\n triggerRef,\n isDisabled,\n ...otherProps\n}) {\n // Handle events that should cause the popup to close,\n // e.g. blur, clicking outside, or pressing the escape key.\n let { overlayProps: rawOverlayProps } = useOverlay(\n {\n onClose: () => state.close(),\n shouldCloseOnBlur: true,\n isOpen: state.isOpen,\n isDismissable: true,\n shouldCloseOnInteractOutside: (el) => {\n // The trigger owns interactive controls of its own — the clear button\n // and any custom `actions`. They sit in the actions run, a SIBLING of\n // the trigger, so the lookup below would read them as a press outside\n // and dismiss, swallowing the press: the first press on `Reset` while\n // the list was open only closed the list and the action never ran. Same\n // guard as `DialogTrigger`, which `Picker` / `FilterPicker` go through.\n if (isOwnActionsPress(el, triggerRef?.current)) return false;\n\n const menuTriggerEl = el.closest('[data-popover-trigger]');\n if (!menuTriggerEl) {\n if (el.closest('[data-popover-keep]')) return false;\n // Plain interactive controls (Button, ItemButton) opt in via\n // `data-popover-dismiss` to dismiss us without losing their click\n // to useOverlay's stopPropagation. Schedule the close after the\n // click finishes so the button's onPress runs first.\n if (el.closest('[data-popover-dismiss]')) {\n setTimeout(() => state.close(), 0);\n return false;\n }\n return true;\n }\n // If the same trigger that opened this select was clicked, allow closing\n if (menuTriggerEl === triggerRef?.current) return true;\n // Otherwise, don't close (let event mechanism handle it)\n return false;\n },\n },\n popoverRef,\n );\n\n // A list that has already closed must not swallow the `Escape` meant for\n // whatever surrounds it — see `useOverlayEscapeGuard`.\n const overlayProps = useOverlayEscapeGuard(rawOverlayProps, state.isOpen);\n\n // Opened inside a modal, the list stays readable while the modal hides the\n // page.\n const layerRef = useModalLayerRef();\n\n // Extract primary placement direction for consistent styling\n const placementDirection = placement?.split(' ')[0] || 'bottom';\n\n // Wrap in <FocusScope> so that focus is restored back to the\n // trigger when the popup is closed. In addition, add hidden\n // <DismissButton> components at the start and end of the list\n // to allow screen reader users to dismiss the popup easily.\n //\n // `SelectListBox` puts focus in the list as it mounts, which happens on\n // every open. `autoFocus` on the scope then finds focus already inside and\n // only registers the scope as the active one, so an outer contained Dialog\n // FocusScope (e.g. a popover Dialog wrapping the Select) recognises focus\n // moving into the Select popover and doesn't yank it back to the trigger.\n return (\n <Portal>\n <DisplayTransition isShown={state.isOpen && !isDisabled}>\n {({ phase, isShown, isExiting, ref: transitionRef }) => (\n <SelectOverlayWrapper\n {...overlayProps}\n {...parentOverlayProps}\n ref={mergeRefs(popoverRef, layerRef)}\n tokens={{ '$select-overlay-padding': `${containerPadding}px` }}\n mods={{\n side:\n placementDirection === 'left' || placementDirection === 'right',\n }}\n // oxlint-disable-next-line tasty/no-style-prop -- React Aria's overlay positioning computes these coordinates\n style={parentOverlayProps?.style}\n // A press on the list while it fades out must not close the\n // overlay under it (CUB-5293) — see `Overlay`.\n data-react-aria-top-layer={isExiting || undefined}\n >\n <OverlayElement\n ref={transitionRef}\n data-placement={placementDirection}\n data-phase={phase}\n mods={{\n open: isShown,\n }}\n styles={overlayStyles}\n tokens={{\n '$overlay-min-width': minWidth ? `${minWidth}px` : 'initial',\n }}\n >\n <FocusScope autoFocus restoreFocus>\n <DismissButton onDismiss={() => state.close()} />\n <SelectListBox\n {...otherProps}\n state={state}\n listBoxRef={listBoxRef}\n listBoxStyles={listBoxStyles}\n listGap={listGap}\n optionStyles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={size}\n />\n <DismissButton onDismiss={() => state.close()} />\n </FocusScope>\n </OverlayElement>\n </SelectOverlayWrapper>\n )}\n </DisplayTransition>\n </Portal>\n );\n}\n\n/** The first or last option that can take focus. */\nfunction getEdgeOptionKey(\n state: SelectState<object>,\n edge: 'first' | 'last',\n): Key | null {\n const keys = [...state.collection.getKeys()];\n\n if (edge === 'last') keys.reverse();\n\n return (\n keys.find(\n (key) =>\n state.collection.getItem(key)?.type === 'item' &&\n state.selectionManager.canSelectItem(key),\n ) ?? null\n );\n}\n\n/**\n * Where focus lands as the list opens. `ArrowUp` opens on the last option;\n * `ArrowDown`, `Enter` and `Space` on the selected option, or else the first.\n * A pointer opens on the selected option, or else on the list itself, as in\n * React Aria, so a click highlights nothing the user didn't pick.\n */\nfunction getOpeningFocusKey(state: SelectState<object>): Key | null {\n const { focusStrategy, selectedKey, selectionManager } = state;\n\n if (focusStrategy === 'last') return getEdgeOptionKey(state, 'last');\n\n if (selectedKey != null && selectionManager.canSelectItem(selectedKey)) {\n return selectedKey;\n }\n\n return focusStrategy === 'first' ? getEdgeOptionKey(state, 'first') : null;\n}\n\n/**\n * Scrolls `list` so `option` is in view. Layout offsets rather than client\n * rects: on its first frames the popup is scaled by its enter transition,\n * which would skew a rect-based scroll. The list is positioned, so the offset\n * chain ends at it.\n */\nfunction scrollIntoList(list: HTMLElement, option: HTMLElement) {\n let top = 0;\n\n for (\n let node: HTMLElement | null = option;\n node && node !== list;\n node = node.offsetParent as HTMLElement | null\n ) {\n top += node.offsetTop;\n }\n\n const bottom = top + option.offsetHeight;\n\n if (top < list.scrollTop) {\n list.scrollTop = top;\n } else if (bottom > list.scrollTop + list.clientHeight) {\n list.scrollTop = bottom - list.clientHeight;\n }\n}\n\nfunction focusOpeningOption(\n state: SelectState<object>,\n list: HTMLElement | null,\n shouldUseVirtualFocus: boolean,\n) {\n const key = getOpeningFocusKey(state);\n const manager = state.selectionManager;\n\n manager.setFocused(true);\n manager.setFocusedKey(key);\n\n if (!list || shouldUseVirtualFocus) return;\n\n const option =\n key == null\n ? undefined\n : Array.from(list.querySelectorAll<HTMLElement>('[role=\"option\"]')).find(\n (element) => element.dataset.key === String(key),\n );\n\n if (!option) {\n list.focus({ preventScroll: true });\n\n return;\n }\n\n scrollIntoList(list, option);\n // Focused here rather than left to the option, which would only follow on\n // the next render: the scope's `autoFocus` runs first and would otherwise\n // focus whichever option was tabbable from the last opening.\n option.focus({ preventScroll: true });\n}\n\n/**\n * The list inside the popup. It decides where focus lands when it mounts,\n * rather than inheriting the last opening. The popup unmounts it once it has\n * closed, so that is every opening except a reopen during the exit\n * transition, which keeps the list mounted.\n */\nfunction SelectListBox({\n state,\n listBoxRef,\n listBoxStyles,\n listGap,\n optionStyles,\n shouldUseVirtualFocus,\n size,\n ...otherProps\n}) {\n // For trigger+popover components, map 'small' size to 'medium' for list items\n // while preserving 'medium' and 'large' sizes\n const listItemSize = size === 'small' ? 'medium' : size;\n const listGapTokens =\n listGap == null ? undefined : { '$list-gap': `${listGap}px` };\n\n let { listBoxProps } = useListBox(\n // Opening focus is `focusOpeningOption`'s: React Aria's own `autoFocus`\n // lets a selection win over the last option `ArrowUp` asks for.\n { ...otherProps, shouldUseVirtualFocus, autoFocus: false },\n state,\n listBoxRef,\n );\n\n const focusOnOpen = useEffectEvent(() =>\n focusOpeningOption(state, listBoxRef.current, shouldUseVirtualFocus),\n );\n\n useEffect(() => {\n focusOnOpen();\n }, []);\n\n const renderedItems: React.ReactNode[] = [];\n let hasSections = false;\n\n for (const item of state.collection) {\n if (item.type === 'section') {\n if (hasSections) {\n // A listbox may only own options and groups, so the divider between\n // sections is presentation only.\n renderedItems.push(\n <ListDivider\n key={`divider-${String(item.key)}`}\n as=\"li\"\n role=\"presentation\"\n />,\n );\n }\n\n renderedItems.push(\n <SelectSection\n key={item.key}\n item={item}\n state={state}\n optionStyles={optionStyles}\n sectionStyles={undefined}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={listItemSize}\n />,\n );\n\n hasSections = true;\n } else {\n renderedItems.push(\n <Option\n key={item.key}\n item={item}\n state={state}\n styles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={listItemSize}\n />,\n );\n }\n }\n\n return (\n <ListBoxElement\n styles={listBoxStyles}\n tokens={listGapTokens}\n mods={{ sections: hasSections }}\n {...listBoxProps}\n ref={listBoxRef}\n >\n {renderedItems}\n </ListBoxElement>\n );\n}\n\nfunction Option({ item, state, styles, shouldUseVirtualFocus, size }) {\n let ref = useRef<HTMLLIElement>(null);\n let isDisabled = state.disabledKeys.has(item.key);\n let isSelected = state.selectionManager.isSelected(item.key);\n let isVirtualFocused = state.selectionManager.focusedKey === item.key;\n\n let { optionProps, isPressed, labelProps, descriptionProps } = useOption(\n {\n key: item.key,\n isDisabled,\n isSelected,\n shouldSelectOnPressUp: true,\n shouldFocusOnHover: true,\n shouldUseVirtualFocus,\n },\n state,\n ref,\n );\n\n // A mouse press picks the option it started on, even if the list moved\n // under the pointer before the release.\n const originPress = useOptionOriginPress({\n key: item.key,\n ref,\n manager: state.selectionManager,\n isDisabled,\n });\n const { onPointerUp, ...ariaOptionProps } =\n filterSelectionItemProps(optionProps);\n\n // Handle focus events, so we can apply highlighted\n // style to the focused option\n let { isFocused, focusProps } = useFocus();\n\n // Filter out service props - all remaining props can be passed to Item\n const filteredItemProps = filterSelectionItemProps(\n filterCollectionItemProps(item.props),\n );\n\n const keyboardProps = {\n onKeyDown(event: KeyboardEvent<HTMLLIElement>) {\n // Committing an option refocuses the trigger during keydown. Cancel\n // Enter's native activation there, preserving Control+Enter context\n // menus and activation of links or controls inside the option.\n if (\n event.key === 'Enter' &&\n !event.ctrlKey &&\n event.target === event.currentTarget\n ) {\n event.preventDefault();\n }\n },\n };\n\n return (\n <OptionItem\n {...mergeProps(\n ariaOptionProps,\n {\n onPointerDown: originPress.onPointerDown,\n onPointerUp: originPress.wrapPointerUp(onPointerUp),\n },\n focusProps,\n filteredItemProps,\n keyboardProps,\n )}\n ref={ref}\n mods={{\n listboxitem: true,\n selected: isSelected,\n focused: shouldUseVirtualFocus ? isVirtualFocused : isFocused,\n disabled: isDisabled,\n pressed: isPressed,\n }}\n data-size={size}\n styles={mergeStyleLayers(\n styles as Styles,\n filteredItemProps.styles as Styles,\n )}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n defaultTooltipPlacement=\"right\"\n >\n {item.rendered}\n </OptionItem>\n );\n}\n\ninterface SelectSectionProps<T> {\n item: any; // react-stately Node<T>\n state: any; // TreeState<T>\n optionStyles?: Styles;\n headingStyles?: Styles;\n sectionStyles?: Styles;\n shouldUseVirtualFocus?: boolean;\n size?: string;\n}\n\nfunction SelectSection<T>(props: SelectSectionProps<T>) {\n const {\n item,\n state,\n optionStyles,\n headingStyles,\n sectionStyles,\n shouldUseVirtualFocus,\n size,\n } = props;\n\n const heading = item.rendered;\n\n const { itemProps, headingProps, groupProps } = useListBoxSection({\n heading,\n 'aria-label': item['aria-label'],\n });\n\n return (\n <ListSectionWrapper {...itemProps} styles={sectionStyles}>\n {heading && (\n <ListSectionHeading\n {...headingProps}\n size={size}\n styles={mergeStyleLayers(headingStyles, {\n '$inline-compensation': '0px',\n })}\n >\n {heading}\n </ListSectionHeading>\n )}\n <ListBoxElement {...groupProps} mods={{ section: true }}>\n {[...item.childNodes]\n .filter((node: any) => state.collection.getItem(node.key))\n .map((node: any) => (\n <Option\n key={node.key}\n item={node}\n state={state}\n styles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={size}\n />\n ))}\n </ListBoxElement>\n </ListSectionWrapper>\n );\n}\n\n// `forwardRef` can't carry the item generic, so the cast restores it, as in\n// ComboBox and Picker.\nconst _Select = forwardRef(\n Select as ForwardRefRenderFunction<HTMLDivElement, any>,\n) as unknown as <T>(\n props: CubeSelectProps<T> & { ref?: ForwardedRef<HTMLDivElement> },\n) => ReactElement;\n\n(_Select as any).cubeInputType = 'Select';\n\ntype SectionComponent = typeof BaseSection;\n\nconst SelectSectionComponent = Object.assign(BaseSection, {\n displayName: 'Section',\n}) as SectionComponent;\n\nconst __Select = Object.assign(\n _Select as typeof _Select & {\n Item: typeof CollectionItem;\n Section: typeof SelectSectionComponent;\n Action: typeof ItemAction;\n },\n {\n Item: CollectionItem,\n Section: SelectSectionComponent,\n Action: ItemAction,\n },\n);\n\n(__Select as any).displayName = 'Select';\n\nexport { __Select as Select };\n\nexport type { AriaSelectProps };\nexport { useSelectState };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FA,MAAMmF,uBAAuB/E,MAAM;CACjCgF,IAAI;CACJC,QAAQ;EACNC,SAAS;EACTC,UAAU;EACVC,QAAQ;EACRC,MAAM;GACJ,IAAI;GACJC,UAAU;GACV,iBAAiB;EACnB;EACAC,OAAO;GACL,IAAI;GACJC,SAAS;GACTC,SAAS;GACTH,UAAU;EACZ;CACF;AACF,CAAC;AAED,MAAaI,iBAAiB1F,MAAM;CAClCgF,IAAI;CACJW,IAAI;CACJV,QAAQ;EAEN,aAAa;GAAE,IAAI;GAAaW,SAAS;EAAM;EAC/CV,SAAS;EAETW,KAAK;GAAE,IAAI;GAAaC,UAAU;EAAY;EAC9CC,MAAM;EACNC,QAAQ;EACRC,SAAS;EACTC,WAAW;EAIXC,UAAU;GAAE,IAAI;GAAQP,SAAS;EAAM;EAEvCT,UAAU;EACViB,WAAW;EAMXC,SAAS;CACX;AACF,CAAC;AAGD,MAAMC,aAAatG,MAAM6D,OAA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AAAe;EAAAf,EAAA,MAAAqB;CAAA,OAAAA,KAAArB,EAAA;CAAA,OA1BrBqB;AA0BqB;AAMzB,MAAM+F,UAAUpX,WACd6K,MACF;AAIA,QAAiBwM,gBAAgB;AAIjC,MAAME,yBAAyBC,OAAOC,OAAOjW,SAAa,EACxDkW,aAAa,UACf,CAAC;AAED,MAAMC,WAAWH,OAAOC,OACtBL,SAKA;CACE3T,MAAML;CACN7B,SAASgW;CACTK,QAAQhV;AACV,CACF;AAEA,SAAkB8U,cAAc"}
|
|
1
|
+
{"version":3,"file":"Select.js","names":["AriaLabelingProps","CollectionBase","Key","Styles","tasty","React","cloneElement","ForwardedRef","forwardRef","ForwardRefRenderFunction","KeyboardEvent","ReactElement","ReactNode","RefObject","useEffect","useEffectEvent","useLayoutEffect","useMemo","useRef","useState","AriaSelectProps","DismissButton","FocusScope","HiddenSelect","useButton","useHover","useListBox","useListBoxSection","useOption","useOverlay","useSelect","Section","BaseSection","SelectState","useSelectState","useI18n","CloseIcon","DirectionIcon","LoadingIcon","FieldBaseProps","generateRandomId","useFocus","mergeProps","pickBaseCustomizationProps","focusProgrammatically","mergeRefs","useCombinedRefs","useOpenKey","useOverlayEscapeGuard","useOverlayPosition","usePopoverSync","mergeStyleLayers","isOwnActionsPress","ItemAction","ItemActionsWrapper","StyledDivider","ListDivider","StyledSectionHeading","ListSectionHeading","StyledSection","ListSectionWrapper","CollectionItem","filterCollectionItemProps","filterSelectionItemProps","getValueSelectionState","CubeItemProps","Item","Text","FieldLayoutStyleProps","splitFieldLayout","useFieldProps","getValidationMods","getValidationIcon","wrapWithField","DisplayTransition","useModalLayerRef","CubeTooltipProviderProps","Portal","useOptionOriginPress","TriggerActions","TriggerIcon","Placement","Props","ComponentBasePropsWithoutChildren","SelectWrapperElement","qa","styles","display","position","radius","fill","disabled","color","focused","invalid","ListBoxElement","as","section","gap","sections","flow","margin","padding","listStyle","overflow","scrollbar","outline","OptionItem","disableActionsFocus","SelectOverlayWrapper","zIndex","width","side","OverlayElement","gridRows","height","shadow","border","boxSizing","transition","translate","transformOrigin","scale","opacity","CubeSelectBaseProps","T","Omit","selectedKey","defaultSelectedKey","onSelectionChange","key","icon","rightIcon","prefix","suffix","triggerDescription","descriptionPlacement","hotkeys","tooltip","auto","triggerRef","HTMLButtonElement","isLoading","loadingIndicator","overlayOffset","hideTrigger","inputStyles","optionStyles","triggerStyles","listBoxStyles","listGap","overlayStyles","direction","targetRef","HTMLElement","placement","shouldFlip","containerPadding","inputProps","type","shape","suffixPosition","theme","isClearable","clearLabel","onClear","actions","onOpenChange","isOpen","CubeSelectProps","popoverRef","listBoxRef","size","placeholder","ignore","lockSelectState","state","S","open","toggle","setSelectedKey","setValue","Select","rawProps","ref","HTMLDivElement","props","defaultValidationTrigger","valuePropsMapper","value","onChange","label","extra","labelStyles","isRequired","necessityIndicator","isInvalid","isValid","isDisabled","autoFocus","triggerRefProp","message","placementProp","labelSuffix","form","t","isLocked","isReadOnly","selectId","isInert","closeList","close","fieldLayout","menuId","onClose","containerRef","popover","current","active","document","activeElement","contains","preventScroll","labelProps","triggerProps","valueProps","menuProps","undefined","overlayProps","overlayRef","scrollRef","offset","isFocused","focusProps","hoverProps","isHovered","buttonProps","validationIcon","hasSelection","selectedItem","showClearButton","clearValue","triggerWidth","setTriggerWidth","offsetWidth","loadingIcon","showPlaceholder","trim","modifiers","loading","hovered","hasCustomRightIcon","triggerRightIcon","hasTriggerActions","triggerActions","pressed","selectField","name","showActions","skipActionsWidthTransition","mods","rendered","field","ListBoxPopup","t0","$","_c","minWidth","otherProps","parentOverlayProps","t1","t2","t3","shouldUseVirtualFocus","t4","t5","el","menuTriggerEl","closest","setTimeout","t6","shouldCloseOnBlur","isDismissable","shouldCloseOnInteractOutside","rawOverlayProps","layerRef","t7","split","placementDirection","isListShown","openKey","t8","t9","phase","isShown","isExiting","transitionRef","style","getEdgeOptionKey","edge","keys","collection","getKeys","reverse","find","getItem","selectionManager","canSelectItem","getOpeningFocusKey","focusStrategy","scrollIntoList","list","option","top","node","offsetParent","offsetTop","bottom","offsetHeight","scrollTop","clientHeight","focusOpeningOption","manager","setFocused","setFocusedKey","Array","from","querySelectorAll","element","dataset","String","focus","SelectListBox","listItemSize","listGapTokens","listBoxProps","focusOnOpen","Symbol","for","hasSections","renderedItems","item","push","Option","disabledKeys","has","isSelected","isVirtualFocused","focusedKey","shouldSelectOnPressUp","shouldFocusOnHover","optionProps","isPressed","descriptionProps","originPress","onPointerUp","ariaOptionProps","filteredItemProps","keyboardProps","onKeyDown","event","ctrlKey","target","currentTarget","preventDefault","T0","onPointerDown","wrapPointerUp","listboxitem","selected","SelectSectionProps","headingStyles","sectionStyles","SelectSection","heading","itemProps","headingProps","groupProps","childNodes","filter","map","node_0","_Select","cubeInputType","SectionComponent","SelectSectionComponent","Object","assign","displayName","__Select","Action","Item","useOverlayPosition","useFocus","TriggerIcon","mergeProps","Text","_c","ListDivider","ListSectionHeading","ListSectionWrapper","BaseSection","CollectionItem"],"sources":["../../../../src/components/fields/Select/Select.tsx"],"sourcesContent":["import { AriaLabelingProps, CollectionBase, Key } from '@react-types/shared';\nimport { Styles, tasty } from '@tenphi/tasty';\nimport React, {\n cloneElement,\n ForwardedRef,\n forwardRef,\n ForwardRefRenderFunction,\n KeyboardEvent,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useEffectEvent,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n AriaSelectProps,\n DismissButton,\n FocusScope,\n HiddenSelect,\n useButton,\n useHover,\n useListBox,\n useListBoxSection,\n useOption,\n useOverlay,\n useSelect,\n} from 'react-aria';\nimport {\n Section as BaseSection,\n SelectState,\n useSelectState,\n} from 'react-stately';\n\nimport { useI18n } from '../../../i18n/useI18n';\nimport { CloseIcon } from '../../../icons/CloseIcon';\nimport { DirectionIcon } from '../../../icons/DirectionIcon';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { FieldBaseProps } from '../../../shared/form';\nimport { generateRandomId } from '../../../utils/random';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { mergeProps } from '../../../utils/react/mergeProps';\nimport { pickBaseCustomizationProps } from '../../../utils/react/pickBaseCustomizationProps';\nimport { focusProgrammatically } from '../../../utils/react/programmaticFocus';\nimport {\n mergeRefs,\n useCombinedRefs,\n} from '../../../utils/react/useCombinedRefs';\nimport { useOpenKey } from '../../../utils/react/useOpenKey';\nimport { useOverlayEscapeGuard } from '../../../utils/react/useOverlayEscapeGuard';\nimport { useOverlayPosition } from '../../../utils/react/useOverlayPosition';\nimport { usePopoverSync } from '../../../utils/react/usePopoverSync';\nimport { mergeStyleLayers } from '../../../utils/styles';\nimport { isOwnActionsPress } from '../../actions/actions-run';\nimport { ItemAction } from '../../actions/ItemAction/ItemAction';\nimport { ItemActionsWrapper } from '../../actions/ItemActionsWrapper';\nimport {\n StyledDivider as ListDivider,\n StyledSectionHeading as ListSectionHeading,\n StyledSection as ListSectionWrapper,\n} from '../../actions/Menu/styled';\nimport {\n CollectionItem,\n filterCollectionItemProps,\n filterSelectionItemProps,\n getValueSelectionState,\n} from '../../CollectionItem';\nimport { CubeItemProps, Item } from '../../content/Item/Item';\nimport { Text } from '../../content/Text';\nimport {\n FieldLayoutStyleProps,\n splitFieldLayout,\n} from '../../form/field-layout';\nimport { useFieldProps } from '../../form/Form/use-field/use-field-props';\nimport { getValidationMods } from '../../form/validation/resolve-validation-props';\nimport { getValidationIcon } from '../../form/validation/ValidationIndicator';\nimport { wrapWithField } from '../../form/wrapper';\nimport { DisplayTransition } from '../../helpers/DisplayTransition/DisplayTransition';\nimport { useModalLayerRef } from '../../overlays/Modal/modal-containment';\nimport { CubeTooltipProviderProps } from '../../overlays/Tooltip/TooltipProvider';\nimport { Portal } from '../../portal/Portal';\nimport { useOptionOriginPress } from '../option-origin-press';\nimport { TriggerActions, TriggerIcon } from '../TriggerActions';\n\nimport type { Placement } from 'react-aria';\nimport type { Props } from '../../../props';\nimport type { ComponentBasePropsWithoutChildren } from '../../../utils/react/componentBaseProps';\n\nconst SelectWrapperElement = tasty({\n qa: 'SelectWrapper',\n styles: {\n display: 'grid',\n position: 'relative',\n radius: true,\n fill: {\n '': '#surface',\n disabled: '#disabled-surface',\n 'theme=special': '#clear',\n },\n color: {\n '': '#dark.85',\n focused: '#dark.85',\n invalid: '#danger-text',\n disabled: '#disabled-surface-text',\n },\n },\n});\n\nexport const ListBoxElement = tasty({\n qa: 'ListBox',\n as: 'ul',\n styles: {\n // Set from `listGap`. A section's list inherits it from the popup's.\n '$list-gap': { '': '$item-gap', section: false },\n display: 'flex',\n // It spaces options: sections and dividers keep a hairline.\n gap: { '': '$list-gap', sections: '$item-gap' },\n flow: 'column',\n margin: '0',\n padding: '0',\n listStyle: 'none',\n // The popup's list is the scroll container and the element its height\n // limit lands on, so React Aria's page navigation measures what is\n // actually visible. A section's list grows with its options.\n overflow: { '': 'auto', section: false },\n // Options measure their scroll offset against the list.\n position: 'relative',\n scrollbar: 'styled',\n // The listbox is programmatically focused when the popover opens\n // (so keyboard nav works immediately) but it should never display a\n // focus ring — only the focused option does. Without this, the\n // browser draws its native outline around the whole listbox when\n // it receives focus.\n outline: 0,\n },\n});\n\n// Use Item for options to unify item visuals and reduce custom styling\nconst OptionItem = tasty(Item, {\n as: 'li',\n disableActionsFocus: true,\n qa: 'Option',\n styles: {\n '$inline-compensation': '0px',\n },\n});\n\nconst SelectOverlayWrapper = tasty({\n qa: 'SelectOverlayWrapper',\n styles: {\n position: 'absolute',\n zIndex: 1000,\n // Above or below its trigger, as wide as the popup wherever React Aria\n // puts it. Left to shrink, the width ends at the screen edge, and React\n // Aria measures that squeezed width: a list that grows while open then\n // crept a few pixels per frame instead of moving once. The cap is the room\n // React Aria leaves inside the viewport (`%`, unlike `vw`, leaves out a\n // page scrollbar). Beside its trigger, React Aria never moves the list\n // along the edge it would cross, so the list keeps shrinking to the room\n // there and stays on screen.\n width: {\n '': 'initial max-content (100% - 2 * $select-overlay-padding)',\n side: false,\n },\n // React Aria writes the room left in the viewport as this element's\n // `max-height`; a flex column lets the popup shrink to it.\n display: 'flex',\n flow: 'column',\n },\n});\n\nconst OverlayElement = tasty({\n qa: 'SelectOverlay',\n styles: {\n width: 'min $overlay-min-width',\n display: 'grid',\n gridRows: '1sf',\n height: 'initial max-content (50vh - 5x)',\n overflow: 'auto',\n fill: '#surface',\n radius: '1cr',\n shadow: true,\n padding: '.5x',\n border: true,\n boxSizing: 'border-box',\n transition:\n 'translate $transition ease-out, scale $transition ease-out, theme $transition ease-out',\n translate: {\n '': '0 0',\n 'open & [data-placement=\"top\"]': '0 0',\n '!open & [data-placement=\"top\"]': '0 1x',\n 'open & ([data-placement=\"bottom\"] | ![data-placement])': '0 0',\n '!open & ([data-placement=\"bottom\"] | ![data-placement])': '0 -1x',\n },\n transformOrigin: {\n '': 'top center',\n '[data-placement=\"top\"]': 'bottom center',\n },\n scale: {\n '': '1 1',\n '!open': '1 .9',\n },\n opacity: {\n '': 1,\n '!open': 0.001,\n },\n },\n});\n\nexport interface CubeSelectBaseProps<T>\n extends\n ComponentBasePropsWithoutChildren,\n AriaLabelingProps,\n FieldLayoutStyleProps,\n FieldBaseProps<Key | null | undefined>,\n CollectionBase<T>,\n Omit<\n AriaSelectProps<T>,\n | 'errorMessage'\n | 'form'\n | 'name'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'onSelectionChange'\n > {\n /** The currently selected key in the collection (controlled). */\n selectedKey?: Key | null;\n /** The initial selected key in the collection (uncontrolled). */\n defaultSelectedKey?: Key;\n /** Handler that is called when the selection changes. */\n onSelectionChange?: (key: Key | null) => void;\n icon?: ReactElement;\n rightIcon?: ReactNode;\n prefix?: ReactNode;\n suffix?: ReactNode;\n /** Description text for the trigger. Note: Different from field-level description. */\n triggerDescription?: ReactNode;\n descriptionPlacement?: 'inline' | 'block';\n /** Keyboard shortcut that triggers the select when pressed */\n hotkeys?: string;\n /**\n * Tooltip content and configuration for the trigger. The info badge next to\n * the field's label is `labelTooltip`.\n * - string: simple tooltip text\n * - true: auto tooltip on overflow (shows selected value as tooltip when truncated)\n * - object: advanced configuration with optional auto property\n */\n tooltip?:\n | string\n | boolean\n | (Omit<CubeTooltipProviderProps, 'children'> & { auto?: boolean });\n triggerRef?: RefObject<HTMLButtonElement>;\n /**\n * Shows a loading indicator in the trigger. The value can't change while\n * loading: the list doesn't open and typeahead is ignored.\n */\n isLoading?: boolean;\n /** Replaces the default loading icon shown while `isLoading` is set. */\n loadingIndicator?: ReactNode;\n overlayOffset?: number;\n /**\n * @deprecated Has no effect: the whole Select is its trigger. To hide the\n * dropdown caret, pass `rightIcon={null}`.\n */\n hideTrigger?: boolean;\n /**\n * @deprecated Use `triggerStyles` instead\n */\n inputStyles?: Styles;\n optionStyles?: Styles;\n triggerStyles?: Styles;\n listBoxStyles?: Styles;\n /** Space between options, in pixels. Defaults to a hairline (`$item-gap`, `1px`). */\n listGap?: number;\n overlayStyles?: Styles;\n direction?: 'top' | 'bottom';\n /**\n * The ref of the element the popover should visually attach itself to.\n * Defaults to the trigger button.\n *\n * Only the popover's POSITION follows this ref. The trigger keeps its own\n * ref for focus, outside-click and dismiss logic, so anchoring to a wider\n * container does not make clicks inside that container count as trigger\n * presses. The popover's `minWidth` also stays tied to the trigger, not to\n * this element.\n */\n targetRef?: RefObject<HTMLElement | null>;\n /**\n * Placement of the popover relative to the anchor.\n * Accepts React Aria's `Placement` strings (e.g. `'bottom start'`,\n * `'top start'`, `'right top'`, `'left top'`).\n *\n * Overrides `direction` when both are given.\n * @default `${direction} end`\n */\n placement?: Placement;\n shouldFlip?: boolean;\n /** Minimum padding in pixels between the popover and viewport edges */\n containerPadding?: number;\n /** Additional props for the trigger button element. */\n inputProps?: Props;\n type?: 'outline' | 'outline-2' | 'clear' | 'primary' | (string & {});\n /**\n * Shape of the trigger's border radius.\n * - `card` - Card shape with larger border radius (`1cr`)\n * - `button` - Button shape with default border radius (default)\n * - `sharp` - Sharp corners with no border radius (`0`)\n * - `pill` - Pill shape with fully rounded ends (`round`)\n * @default \"button\"\n */\n shape?: 'card' | 'button' | 'sharp' | 'pill';\n suffixPosition?: 'before' | 'after';\n theme?: 'default' | 'special';\n /** Whether the select is clearable using a clear button in the rightIcon slot */\n isClearable?: boolean;\n /** Accessible name for the built-in clear button. Defaults to a localized \"Clear value\". */\n clearLabel?: string;\n /** Callback called when the clear button is pressed */\n onClear?: () => void;\n /**\n * Custom actions rendered inside the trigger, to the left of the built-in\n * clear button and dropdown caret. Use `Select.Action` so they match the\n * trigger's size and theme.\n *\n * Pressing one runs its handler without opening or closing the popover —\n * including while the popover is open. Actions follow the trigger's disabled\n * state but NOT `isReadOnly`, since a read-only field can still host an\n * action that does not change the value; pass `isDisabled` yourself for one\n * that does.\n */\n actions?: ReactNode;\n /** Callback called when the popover open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\nexport interface CubeSelectProps<T> extends CubeSelectBaseProps<T> {\n /** The ref for the popover element. */\n popoverRef?: RefObject<HTMLElement | null>;\n /** The ref for the list box. */\n listBoxRef?: RefObject<HTMLElement>;\n size?: 'small' | 'medium' | 'large' | (string & {});\n placeholder?: string;\n}\n\nconst ignore = () => {};\n\n/**\n * A state whose value can't change. React Aria's trigger opens the list,\n * steps with `ArrowLeft`/`ArrowRight` and typeaheads through these methods,\n * so ignoring them fixes the value while the trigger stays focusable.\n */\nfunction lockSelectState<S extends SelectState<object>>(state: S): S {\n return {\n ...state,\n open: ignore,\n toggle: ignore,\n setSelectedKey: ignore,\n setValue: ignore,\n };\n}\n\nfunction Select<T extends object>(\n rawProps: CubeSelectProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n let props = useFieldProps(rawProps, {\n defaultValidationTrigger: 'onChange',\n valuePropsMapper: ({ value, onChange }) => ({\n selectedKey: value ?? null,\n onSelectionChange: onChange,\n }),\n });\n\n let {\n qa,\n label,\n extra,\n icon,\n rightIcon,\n labelStyles,\n isRequired,\n necessityIndicator,\n isInvalid,\n isValid,\n prefix,\n isDisabled = props.isLoading || false,\n autoFocus,\n inputProps,\n triggerRef: triggerRefProp,\n popoverRef,\n listBoxRef,\n isLoading,\n loadingIndicator,\n overlayOffset = 8,\n inputStyles,\n triggerStyles,\n optionStyles,\n listBoxStyles,\n listGap,\n overlayStyles,\n suffix,\n actions,\n message,\n triggerDescription,\n descriptionPlacement,\n hotkeys,\n direction = 'bottom',\n targetRef,\n placement: placementProp,\n shouldFlip = true,\n containerPadding = 8,\n placeholder,\n tooltip,\n size = 'medium',\n shape,\n styles,\n type = 'outline',\n theme = 'default',\n labelSuffix,\n suffixPosition = 'before',\n isClearable,\n clearLabel,\n onOpenChange,\n form,\n } = props;\n const { t } = useI18n();\n // `useSelectState` reports `onOpenChange` itself, once per transition.\n let state = getValueSelectionState(useSelectState(props));\n // Read-only and loading keep the trigger focusable, but its value is fixed.\n const isLocked = !!props.isReadOnly || !!isLoading;\n\n if (isLocked) state = lockSelectState(state);\n\n // Generate a unique ID for this select instance\n const selectId = useMemo(() => generateRandomId(), []);\n\n // A list that can no longer change the value closes rather than staying open\n // behind a hidden popup, so `aria-expanded` follows and enabling the field\n // again doesn't bring the list back.\n const isInert = isLocked || isDisabled;\n const closeList = useEffectEvent(() => state.close());\n\n useEffect(() => {\n if (isInert && state.isOpen) closeList();\n }, [isInert, state.isOpen]);\n\n const fieldLayout = splitFieldLayout(props);\n\n styles = fieldLayout.styles;\n\n ref = useCombinedRefs(ref);\n const triggerRef = useCombinedRefs(triggerRefProp);\n popoverRef = useCombinedRefs(popoverRef);\n listBoxRef = useCombinedRefs(listBoxRef);\n\n usePopoverSync({\n menuId: selectId,\n isOpen: state.isOpen,\n onClose: () => state.close(),\n triggerRef: triggerRef as RefObject<HTMLElement | null>,\n containerRef: popoverRef as RefObject<HTMLElement | null>,\n });\n\n // Hand focus back to the trigger the moment the list closes, rather than\n // leaving it to the popup's `FocusScope`, which only restores when it\n // UNMOUNTS — at the end of the exit transition (CUB-4839).\n //\n // For the length of that transition focus would otherwise sit on an option\n // inside a popup that is going away, and the key a user presses next can\n // land nowhere at all: once the option is detached focus drops to `<body>`,\n // which takes the event out of the React tree entirely.\n //\n // `focusProgrammatically` so the trigger's tooltip does not read this as the\n // user arriving and pop up — it would then swallow that next `Escape`.\n //\n // Guarded on focus still being INSIDE the popup, so this only finishes a\n // hand-off the popup had already started: closing by clicking elsewhere\n // leaves focus wherever the user put it.\n useEffect(() => {\n if (state.isOpen) return;\n\n const popover = popoverRef.current;\n const active = document.activeElement;\n\n if (!popover || !active || !popover.contains(active)) return;\n\n focusProgrammatically(triggerRef.current, { preventScroll: true });\n // Both refs come from `useCombinedRefs`, so their identity never changes;\n // listing them satisfies the rule without re-running this.\n }, [state.isOpen, popoverRef, triggerRef]);\n\n // React Aria hands `form` to `HiddenSelect` as the id of its `<form>`, so the\n // form instance would render as `form=\"[object Object]\"` on the `<select>`.\n let { labelProps, triggerProps, valueProps, menuProps } = useSelect(\n { ...props, form: undefined },\n state,\n triggerRef,\n );\n\n let { overlayProps, placement } = useOverlayPosition({\n // Position only. `triggerRef` stays the dismiss/focus anchor below, so a\n // consumer can line this popover up with a row without that row's clicks\n // reading as presses on the trigger.\n targetRef: (targetRef ?? triggerRef) as RefObject<HTMLElement>,\n overlayRef: popoverRef,\n scrollRef: listBoxRef,\n placement: placementProp ?? (`${direction} end` as Placement),\n shouldFlip: shouldFlip,\n isOpen: state.isOpen,\n onClose: state.close,\n offset: overlayOffset,\n containerPadding: containerPadding,\n });\n\n let { isFocused, focusProps } = useFocus(true);\n let { hoverProps, isHovered } = useHover({ isDisabled });\n\n // Get props for the button based on the trigger props from useSelect\n let { buttonProps } = useButton({ ...triggerProps, autoFocus }, triggerRef);\n\n let validationIcon = getValidationIcon({ isInvalid, isValid });\n\n // Clear button logic\n let hasSelection = state.selectedItem != null;\n let showClearButton = isClearable && hasSelection && !isInert;\n\n function clearValue() {\n // Reports the change through `onSelectionChange`.\n state.setSelectedKey(null);\n\n if (state.isOpen) {\n state.close();\n }\n\n // Back to the trigger, without its tooltip reading this as the user\n // arriving there and then swallowing the next `Escape`.\n focusProgrammatically(triggerRef.current);\n\n props.onClear?.();\n }\n\n // The popup is at least as wide as the trigger. Measured as the list opens,\n // before the popup mounts and is positioned, rather than during render, so a\n // trigger resized while the list was closed is read fresh.\n const [triggerWidth, setTriggerWidth] = useState<number>();\n\n useLayoutEffect(() => {\n if (state.isOpen) setTriggerWidth(triggerRef.current?.offsetWidth);\n }, [state.isOpen, triggerRef]);\n\n const loadingIcon = loadingIndicator ?? <LoadingIcon />;\n\n const showPlaceholder = !!placeholder?.trim() && !state.selectedItem;\n\n const modifiers = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n loading: isLoading,\n hovered: isHovered,\n focused: isFocused,\n placeholder: showPlaceholder,\n prefix: !!prefix,\n suffix: true,\n }),\n [\n isInvalid,\n isValid,\n isDisabled,\n isLoading,\n isHovered,\n isFocused,\n showPlaceholder,\n prefix,\n ],\n );\n\n suffix = useMemo(() => {\n if (!suffix && !validationIcon) {\n return null;\n }\n\n return (\n <>\n {suffix}\n {validationIcon}\n </>\n );\n }, [suffix, validationIcon]);\n\n // A caller's `rightIcon` keeps the `rightIcon` slot: it accepts a render\n // function resolved against the trigger's mods, which only that slot does, and\n // it is also what a caller's `RightIcon` styles target. It replaces the\n // built-in control, exactly as before.\n const hasCustomRightIcon = rightIcon !== undefined;\n const triggerRightIcon = hasCustomRightIcon\n ? isLoading\n ? loadingIcon\n : rightIcon\n : undefined;\n\n // With a caller's own `rightIcon` the built-in control moves into that slot,\n // leaving the run with whatever the caller passed — possibly nothing. The run\n // is still rendered, so the trigger does not restructure if actions arrive\n // later, but the row stops counting it as end content — which is what keeps an\n // icon-only trigger with `rightIcon={null}` square.\n const hasTriggerActions = !hasCustomRightIcon || !!actions;\n\n // Everything trailing that is NOT the caller's own icon goes into the actions\n // run — a sibling of the `<button>`, so the clear button is no longer nested\n // inside one. See `TriggerActions`.\n const triggerActions = (\n <TriggerActions\n actions={actions}\n builtIn={\n hasCustomRightIcon ? null : showClearButton ? (\n <ItemAction\n icon={<CloseIcon />}\n size={size}\n qa=\"SelectClearButton\"\n // `ItemAction` derives its accessible name from `aria-label` or a\n // string `tooltip` and warns for neither, so an icon-only clear\n // button without this reaches a screen reader unnamed.\n aria-label={clearLabel ?? t('select.clearValue', 'Clear value')}\n // No explicit `type`/`theme`: the default `current` type paints\n // from the trigger's own inherited text color, so the button\n // matches whatever the field is showing instead of one palette.\n //\n // NOTE: this trigger keeps NEUTRAL label text when invalid, so\n // the button reads neutral there too. `Picker` and `FilterPicker`\n // are also `Item`-based but do tint theirs, which is the actual\n // inconsistency to fix — in `Select`, not here.\n mods={{ pressed: false }}\n onPress={clearValue}\n />\n ) : isLoading ? (\n <TriggerIcon>{loadingIcon}</TriggerIcon>\n ) : (\n <TriggerIcon>\n <DirectionIcon to={state.isOpen ? 'up' : 'down'} />\n </TriggerIcon>\n )\n }\n />\n );\n\n let selectField = (\n <SelectWrapperElement\n ref={ref}\n mods={modifiers}\n styles={styles}\n data-size={size}\n data-type={type}\n data-theme={theme}\n >\n <HiddenSelect\n state={state}\n triggerRef={triggerRef}\n label={props.label}\n name={props.name}\n />\n {/*\n The trigger's trailing controls are rendered as a SIBLING of the\n `<button>` — the same layout `ItemButton` uses for its actions, shared\n through `ItemActionsWrapper`. `Select` builds its trigger from `Item`\n rather than `ItemButton` because `useSelect`/`useButton` already own the\n button props, so it reaches for the wrapper directly.\n\n The RAW theme, unlike `Picker` / `FilterPicker` which forward\n `getValidationTheme(...)`: this trigger is painted with the raw theme too\n and surfaces validation through `SelectWrapperElement` rather than by\n switching theme. What the wrapper hands its actions must always match\n what the trigger paints with.\n */}\n <ItemActionsWrapper\n type={type}\n theme={theme}\n size={size}\n isDisabled={isDisabled || isLoading}\n mods={modifiers}\n actions={triggerActions}\n >\n {({ showActions, skipActionsWidthTransition }) => (\n <Item\n actions={hasTriggerActions || undefined}\n insideWrapper\n as=\"button\"\n {...pickBaseCustomizationProps(props)}\n qa={qa || 'Select'}\n data-input-type=\"select\"\n {...mergeProps(buttonProps, hoverProps, focusProps, inputProps)}\n // For a dialog kept mounted while closed, as on `Button`.\n {...(autoFocus ? { 'data-autofocus': '' } : undefined)}\n ref={triggerRef}\n data-popover-trigger\n showActions={showActions}\n skipActionsWidthTransition={skipActionsWidthTransition}\n styles={mergeStyleLayers(inputStyles, triggerStyles)}\n theme={theme}\n size={size}\n shape={shape}\n // Ensure this button never submits a surrounding form in tests or runtime\n htmlType=\"button\"\n // Preserve visual variant via data attribute instead of conflicting with HTML attribute\n type={type}\n mods={{ ...modifiers, ...props.mods }}\n prefix={prefix}\n suffix={suffix}\n icon={icon}\n rightIcon={triggerRightIcon}\n description={triggerDescription}\n descriptionPlacement={descriptionPlacement}\n hotkeys={hotkeys}\n tooltip={tooltip}\n labelProps={valueProps}\n >\n {state.selectedItem ? (\n state.selectedItem.rendered\n ) : placeholder ? (\n <Text.Placeholder>{placeholder}</Text.Placeholder>\n ) : null}\n </Item>\n )}\n </ItemActionsWrapper>\n <ListBoxPopup\n {...menuProps}\n popoverRef={popoverRef}\n listBoxRef={listBoxRef}\n overlayProps={overlayProps}\n placement={placement}\n state={state}\n listBoxStyles={listBoxStyles}\n listGap={listGap}\n overlayStyles={overlayStyles}\n optionStyles={optionStyles}\n minWidth={triggerWidth}\n containerPadding={containerPadding}\n size={size}\n triggerRef={triggerRef}\n isDisabled={isDisabled}\n />\n </SelectWrapperElement>\n );\n\n return wrapWithField<Omit<CubeSelectProps<T>, 'children' | 'tooltip'>>(\n selectField,\n mergeProps(\n {\n ...props,\n ...fieldLayout.field,\n // The trigger's own. Handed on, it read as the legacy field `tooltip`.\n tooltip: undefined,\n },\n { labelProps },\n ),\n );\n}\n\nexport function ListBoxPopup({\n state,\n popoverRef,\n listBoxRef,\n listBoxStyles,\n listGap,\n overlayStyles,\n optionStyles,\n overlayProps: parentOverlayProps,\n shouldUseVirtualFocus = false,\n placement,\n minWidth,\n containerPadding = 8,\n size = 'small',\n triggerRef,\n isDisabled,\n ...otherProps\n}) {\n // Handle events that should cause the popup to close,\n // e.g. blur, clicking outside, or pressing the escape key.\n let { overlayProps: rawOverlayProps } = useOverlay(\n {\n onClose: () => state.close(),\n shouldCloseOnBlur: true,\n isOpen: state.isOpen,\n isDismissable: true,\n shouldCloseOnInteractOutside: (el) => {\n // The trigger owns interactive controls of its own — the clear button\n // and any custom `actions`. They sit in the actions run, a SIBLING of\n // the trigger, so the lookup below would read them as a press outside\n // and dismiss, swallowing the press: the first press on `Reset` while\n // the list was open only closed the list and the action never ran. Same\n // guard as `DialogTrigger`, which `Picker` / `FilterPicker` go through.\n if (isOwnActionsPress(el, triggerRef?.current)) return false;\n\n const menuTriggerEl = el.closest('[data-popover-trigger]');\n if (!menuTriggerEl) {\n if (el.closest('[data-popover-keep]')) return false;\n // Plain interactive controls (Button, ItemButton) opt in via\n // `data-popover-dismiss` to dismiss us without losing their click\n // to useOverlay's stopPropagation. Schedule the close after the\n // click finishes so the button's onPress runs first.\n if (el.closest('[data-popover-dismiss]')) {\n setTimeout(() => state.close(), 0);\n return false;\n }\n return true;\n }\n // If the same trigger that opened this select was clicked, allow closing\n if (menuTriggerEl === triggerRef?.current) return true;\n // Otherwise, don't close (let event mechanism handle it)\n return false;\n },\n },\n popoverRef,\n );\n\n // A list that has already closed must not swallow the `Escape` meant for\n // whatever surrounds it — see `useOverlayEscapeGuard`.\n const overlayProps = useOverlayEscapeGuard(rawOverlayProps, state.isOpen);\n\n // Opened inside a modal, the list stays readable while the modal hides the\n // page.\n const layerRef = useModalLayerRef();\n\n // Extract primary placement direction for consistent styling\n const placementDirection = placement?.split(' ')[0] || 'bottom';\n\n // Wrap in <FocusScope> so that focus is restored back to the\n // trigger when the popup is closed. In addition, add hidden\n // <DismissButton> components at the start and end of the list\n // to allow screen reader users to dismiss the popup easily.\n //\n // `SelectListBox` puts focus in the list as it mounts, which happens on\n // every open: the scope is keyed per opening, so a list reopened while it\n // still plays its exit mounts afresh too — see `useOpenKey`. `autoFocus` on\n // the scope then finds focus already inside and only registers the scope as\n // the active one, so an outer contained Dialog FocusScope (e.g. a popover\n // Dialog wrapping the Select) recognises focus moving into the Select\n // popover and doesn't yank it back to the trigger.\n const isListShown = state.isOpen && !isDisabled;\n const openKey = useOpenKey(isListShown);\n\n return (\n <Portal>\n <DisplayTransition isShown={isListShown}>\n {({ phase, isShown, isExiting, ref: transitionRef }) => (\n <SelectOverlayWrapper\n {...overlayProps}\n {...parentOverlayProps}\n ref={mergeRefs(popoverRef, layerRef)}\n tokens={{ '$select-overlay-padding': `${containerPadding}px` }}\n mods={{\n side:\n placementDirection === 'left' || placementDirection === 'right',\n }}\n // oxlint-disable-next-line tasty/no-style-prop -- React Aria's overlay positioning computes these coordinates\n style={parentOverlayProps?.style}\n // A press on the list while it fades out must not close the\n // overlay under it (CUB-5293) — see `Overlay`.\n data-react-aria-top-layer={isExiting || undefined}\n >\n <OverlayElement\n ref={transitionRef}\n data-placement={placementDirection}\n data-phase={phase}\n mods={{\n open: isShown,\n }}\n styles={overlayStyles}\n tokens={{\n '$overlay-min-width': minWidth ? `${minWidth}px` : 'initial',\n }}\n >\n <FocusScope key={openKey} autoFocus restoreFocus>\n <DismissButton onDismiss={() => state.close()} />\n <SelectListBox\n {...otherProps}\n state={state}\n listBoxRef={listBoxRef}\n listBoxStyles={listBoxStyles}\n listGap={listGap}\n optionStyles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={size}\n />\n <DismissButton onDismiss={() => state.close()} />\n </FocusScope>\n </OverlayElement>\n </SelectOverlayWrapper>\n )}\n </DisplayTransition>\n </Portal>\n );\n}\n\n/** The first or last option that can take focus. */\nfunction getEdgeOptionKey(\n state: SelectState<object>,\n edge: 'first' | 'last',\n): Key | null {\n const keys = [...state.collection.getKeys()];\n\n if (edge === 'last') keys.reverse();\n\n return (\n keys.find(\n (key) =>\n state.collection.getItem(key)?.type === 'item' &&\n state.selectionManager.canSelectItem(key),\n ) ?? null\n );\n}\n\n/**\n * Where focus lands as the list opens. `ArrowUp` opens on the last option;\n * `ArrowDown`, `Enter` and `Space` on the selected option, or else the first.\n * A pointer opens on the selected option, or else on the list itself, as in\n * React Aria, so a click highlights nothing the user didn't pick.\n */\nfunction getOpeningFocusKey(state: SelectState<object>): Key | null {\n const { focusStrategy, selectedKey, selectionManager } = state;\n\n if (focusStrategy === 'last') return getEdgeOptionKey(state, 'last');\n\n if (selectedKey != null && selectionManager.canSelectItem(selectedKey)) {\n return selectedKey;\n }\n\n return focusStrategy === 'first' ? getEdgeOptionKey(state, 'first') : null;\n}\n\n/**\n * Scrolls `list` so `option` is in view. Layout offsets rather than client\n * rects: on its first frames the popup is scaled by its enter transition,\n * which would skew a rect-based scroll. The list is positioned, so the offset\n * chain ends at it.\n */\nfunction scrollIntoList(list: HTMLElement, option: HTMLElement) {\n let top = 0;\n\n for (\n let node: HTMLElement | null = option;\n node && node !== list;\n node = node.offsetParent as HTMLElement | null\n ) {\n top += node.offsetTop;\n }\n\n const bottom = top + option.offsetHeight;\n\n if (top < list.scrollTop) {\n list.scrollTop = top;\n } else if (bottom > list.scrollTop + list.clientHeight) {\n list.scrollTop = bottom - list.clientHeight;\n }\n}\n\nfunction focusOpeningOption(\n state: SelectState<object>,\n list: HTMLElement | null,\n shouldUseVirtualFocus: boolean,\n) {\n const key = getOpeningFocusKey(state);\n const manager = state.selectionManager;\n\n manager.setFocused(true);\n manager.setFocusedKey(key);\n\n if (!list || shouldUseVirtualFocus) return;\n\n const option =\n key == null\n ? undefined\n : Array.from(list.querySelectorAll<HTMLElement>('[role=\"option\"]')).find(\n (element) => element.dataset.key === String(key),\n );\n\n if (!option) {\n list.focus({ preventScroll: true });\n\n return;\n }\n\n scrollIntoList(list, option);\n // Focused here rather than left to the option, which would only follow on\n // the next render: the scope's `autoFocus` runs first and would otherwise\n // focus whichever option was tabbable from the last opening.\n option.focus({ preventScroll: true });\n}\n\n/**\n * The list inside the popup. It decides where focus lands when it mounts,\n * rather than inheriting the last opening. It mounts on every opening: the\n * popup unmounts it once it has closed, and a reopen during the exit\n * transition remounts it through the popup's per-opening key.\n */\nfunction SelectListBox({\n state,\n listBoxRef,\n listBoxStyles,\n listGap,\n optionStyles,\n shouldUseVirtualFocus,\n size,\n ...otherProps\n}) {\n // For trigger+popover components, map 'small' size to 'medium' for list items\n // while preserving 'medium' and 'large' sizes\n const listItemSize = size === 'small' ? 'medium' : size;\n const listGapTokens =\n listGap == null ? undefined : { '$list-gap': `${listGap}px` };\n\n let { listBoxProps } = useListBox(\n // Opening focus is `focusOpeningOption`'s: React Aria's own `autoFocus`\n // lets a selection win over the last option `ArrowUp` asks for.\n { ...otherProps, shouldUseVirtualFocus, autoFocus: false },\n state,\n listBoxRef,\n );\n\n const focusOnOpen = useEffectEvent(() =>\n focusOpeningOption(state, listBoxRef.current, shouldUseVirtualFocus),\n );\n\n useEffect(() => {\n focusOnOpen();\n }, []);\n\n const renderedItems: React.ReactNode[] = [];\n let hasSections = false;\n\n for (const item of state.collection) {\n if (item.type === 'section') {\n if (hasSections) {\n // A listbox may only own options and groups, so the divider between\n // sections is presentation only.\n renderedItems.push(\n <ListDivider\n key={`divider-${String(item.key)}`}\n as=\"li\"\n role=\"presentation\"\n />,\n );\n }\n\n renderedItems.push(\n <SelectSection\n key={item.key}\n item={item}\n state={state}\n optionStyles={optionStyles}\n sectionStyles={undefined}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={listItemSize}\n />,\n );\n\n hasSections = true;\n } else {\n renderedItems.push(\n <Option\n key={item.key}\n item={item}\n state={state}\n styles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={listItemSize}\n />,\n );\n }\n }\n\n return (\n <ListBoxElement\n styles={listBoxStyles}\n tokens={listGapTokens}\n mods={{ sections: hasSections }}\n {...listBoxProps}\n ref={listBoxRef}\n >\n {renderedItems}\n </ListBoxElement>\n );\n}\n\nfunction Option({ item, state, styles, shouldUseVirtualFocus, size }) {\n let ref = useRef<HTMLLIElement>(null);\n let isDisabled = state.disabledKeys.has(item.key);\n let isSelected = state.selectionManager.isSelected(item.key);\n let isVirtualFocused = state.selectionManager.focusedKey === item.key;\n\n let { optionProps, isPressed, labelProps, descriptionProps } = useOption(\n {\n key: item.key,\n isDisabled,\n isSelected,\n shouldSelectOnPressUp: true,\n shouldFocusOnHover: true,\n shouldUseVirtualFocus,\n },\n state,\n ref,\n );\n\n // A mouse press picks the option it started on, even if the list moved\n // under the pointer before the release.\n const originPress = useOptionOriginPress({\n key: item.key,\n ref,\n manager: state.selectionManager,\n isDisabled,\n });\n const { onPointerUp, ...ariaOptionProps } =\n filterSelectionItemProps(optionProps);\n\n // Handle focus events, so we can apply highlighted\n // style to the focused option\n let { isFocused, focusProps } = useFocus();\n\n // Filter out service props - all remaining props can be passed to Item\n const filteredItemProps = filterSelectionItemProps(\n filterCollectionItemProps(item.props),\n );\n\n const keyboardProps = {\n onKeyDown(event: KeyboardEvent<HTMLLIElement>) {\n // Committing an option refocuses the trigger during keydown. Cancel\n // Enter's native activation there, preserving Control+Enter context\n // menus and activation of links or controls inside the option.\n if (\n event.key === 'Enter' &&\n !event.ctrlKey &&\n event.target === event.currentTarget\n ) {\n event.preventDefault();\n }\n },\n };\n\n return (\n <OptionItem\n {...mergeProps(\n ariaOptionProps,\n {\n onPointerDown: originPress.onPointerDown,\n onPointerUp: originPress.wrapPointerUp(onPointerUp),\n },\n focusProps,\n filteredItemProps,\n keyboardProps,\n )}\n ref={ref}\n mods={{\n listboxitem: true,\n selected: isSelected,\n focused: shouldUseVirtualFocus ? isVirtualFocused : isFocused,\n disabled: isDisabled,\n pressed: isPressed,\n }}\n data-size={size}\n styles={mergeStyleLayers(\n styles as Styles,\n filteredItemProps.styles as Styles,\n )}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n defaultTooltipPlacement=\"right\"\n >\n {item.rendered}\n </OptionItem>\n );\n}\n\ninterface SelectSectionProps<T> {\n item: any; // react-stately Node<T>\n state: any; // TreeState<T>\n optionStyles?: Styles;\n headingStyles?: Styles;\n sectionStyles?: Styles;\n shouldUseVirtualFocus?: boolean;\n size?: string;\n}\n\nfunction SelectSection<T>(props: SelectSectionProps<T>) {\n const {\n item,\n state,\n optionStyles,\n headingStyles,\n sectionStyles,\n shouldUseVirtualFocus,\n size,\n } = props;\n\n const heading = item.rendered;\n\n const { itemProps, headingProps, groupProps } = useListBoxSection({\n heading,\n 'aria-label': item['aria-label'],\n });\n\n return (\n <ListSectionWrapper {...itemProps} styles={sectionStyles}>\n {heading && (\n <ListSectionHeading\n {...headingProps}\n size={size}\n styles={mergeStyleLayers(headingStyles, {\n '$inline-compensation': '0px',\n })}\n >\n {heading}\n </ListSectionHeading>\n )}\n <ListBoxElement {...groupProps} mods={{ section: true }}>\n {[...item.childNodes]\n .filter((node: any) => state.collection.getItem(node.key))\n .map((node: any) => (\n <Option\n key={node.key}\n item={node}\n state={state}\n styles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={size}\n />\n ))}\n </ListBoxElement>\n </ListSectionWrapper>\n );\n}\n\n// `forwardRef` can't carry the item generic, so the cast restores it, as in\n// ComboBox and Picker.\nconst _Select = forwardRef(\n Select as ForwardRefRenderFunction<HTMLDivElement, any>,\n) as unknown as <T>(\n props: CubeSelectProps<T> & { ref?: ForwardedRef<HTMLDivElement> },\n) => ReactElement;\n\n(_Select as any).cubeInputType = 'Select';\n\ntype SectionComponent = typeof BaseSection;\n\nconst SelectSectionComponent = Object.assign(BaseSection, {\n displayName: 'Section',\n}) as SectionComponent;\n\nconst __Select = Object.assign(\n _Select as typeof _Select & {\n Item: typeof CollectionItem;\n Section: typeof SelectSectionComponent;\n Action: typeof ItemAction;\n },\n {\n Item: CollectionItem,\n Section: SelectSectionComponent,\n Action: ItemAction,\n },\n);\n\n(__Select as any).displayName = 'Select';\n\nexport { __Select as Select };\n\nexport type { AriaSelectProps };\nexport { useSelectState };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAEb;EAACuI,EAAA,MAAAtH;EAAAsH,EAAA,MAAAQ;EAAAR,EAAA,MAAA7F;EAAA6F,EAAA,MAAAzF;EAAAyF,EAAA,MAAAS;EAAAT,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,IAAAe;CAAA,IAAAf,EAAA,QAAAgH,cAAAhH,EAAA,QAAAU,IAAA;EAZNK,KAAA,oBAAC,gBAAD;GAAe,GAAKiG;GAAkB,MAAAzG;GACnCG,UAAAA;EADY,CAAA;EAaEV,EAAA,MAAAgH;EAAAhH,EAAA,MAAAU;EAAAV,EAAA,MAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,IAAAqB;CAAA,IAAArB,EAAA,QAAA8G,aAAA9G,EAAA,QAAA2G,iBAAA3G,EAAA,QAAAM,MAAAN,EAAA,QAAAe,IAAA;EAzBnBM,KAAA,qBAACkH,eAAD;GAAmB,GAAKzB;GAAmBH,QAAAA;GAA3C,UAAA,CACGrG,IAWDS,EAZiB;;EA0BEf,EAAA,MAAA8G;EAAA9G,EAAA,MAAA2G;EAAA3G,EAAA,MAAAM;EAAAN,EAAA,MAAAe;EAAAf,EAAA,MAAAqB;CAAA,OAAAA,KAAArB,EAAA;CAAA,OA1BrBqB;AA0BqB;AAMzB,MAAMgG,UAAUtX,WACd8K,MACF;AAIA,QAAiByM,gBAAgB;AAIjC,MAAME,yBAAyBC,OAAOC,OAAOnW,SAAa,EACxDoW,aAAa,UACf,CAAC;AAED,MAAMC,WAAWH,OAAOC,OACtBL,SAKA;CACE5T,MAAML;CACN9B,SAASkW;CACTK,QAAQjV;AACV,CACF;AAEA,SAAkB+U,cAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.218.0 | Cube Dev Team */
|
|
2
2
|
import { SliderGradationElement, SliderGradeElement } from "./elements.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.218.0 | Cube Dev Team */
|
|
2
2
|
import { mergeStyleLayers } from "../../../utils/styles.js";
|
|
3
3
|
import { Slider as __Slider } from "./Slider.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.218.0 | Cube Dev Team */
|
|
2
2
|
import { Gradation } from "./Gradation.js";
|
|
3
3
|
import { SliderBase as _SliderBase } from "./SliderBase.js";
|
|
4
4
|
import { SliderThumb } from "./SliderThumb.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.218.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { Gradation } from "./Gradation.js";
|
|
4
4
|
import { SliderBase as _SliderBase } from "./SliderBase.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.218.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { Text as _Text } from "../../content/Text.js";
|
|
4
4
|
import { pickBaseCustomizationProps } from "../../../utils/react/pickBaseCustomizationProps.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.218.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { getValidationMods } from "../../form/validation/resolve-validation-props.js";
|
|
4
4
|
import { SliderThumbElement } from "./elements.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.218.0 | Cube Dev Team */
|
|
2
2
|
import { getValidationMods } from "../../form/validation/resolve-validation-props.js";
|
|
3
3
|
import { SliderTrackContainerElement } from "./elements.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.218.0 | Cube Dev Team */
|
|
2
2
|
import { Slider as __Slider } from "./Slider.js";
|
|
3
3
|
import { RangeSlider as __RangeSlider } from "./RangeSlider.js";
|
|
4
4
|
import { HueSlider as __HueSlider } from "./HueSlider.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.218.0 | Cube Dev Team */
|
|
2
2
|
import { useId as useId$2 } from "../../../utils/react/useId.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { Text as _Text } from "../../content/Text.js";
|
|
@@ -5,6 +5,7 @@ import { ComponentBasePropsWithoutChildren } from "../../../utils/react/componen
|
|
|
5
5
|
import { CollectionItem as _CollectionItem } from "../../CollectionItem.js";
|
|
6
6
|
import { CubeTagProps } from "../../content/Tag/Tag.js";
|
|
7
7
|
import { FieldLayoutStyleProps } from "../../form/field-layout.js";
|
|
8
|
+
import { CubeIdentifierInputProps } from "../TextInput/TextInputBase.js";
|
|
8
9
|
import { WithNullableValue } from "../../../utils/react/nullableValue.js";
|
|
9
10
|
import { Styles } from "@tenphi/tasty";
|
|
10
11
|
import { ForwardedRef, KeyboardEvent, ReactElement, ReactNode, RefObject } from "react";
|
|
@@ -19,7 +20,7 @@ export type TagInputPopoverTrigger = 'focus' | 'input' | 'manual';
|
|
|
19
20
|
* message.
|
|
20
21
|
*/
|
|
21
22
|
export type TagValidationResult = boolean | string | null | undefined;
|
|
22
|
-
export interface CubeTagInputProps<T = object> extends ComponentBasePropsWithoutChildren, FieldLayoutStyleProps, FieldBaseProps<readonly string[] | null | undefined
|
|
23
|
+
export interface CubeTagInputProps<T = object> extends ComponentBasePropsWithoutChildren, FieldLayoutStyleProps, FieldBaseProps<readonly string[] | null | undefined>, CubeIdentifierInputProps {
|
|
23
24
|
/** The values in controlled mode. */
|
|
24
25
|
value?: readonly string[];
|
|
25
26
|
/** The initial values in uncontrolled mode. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.218.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { pickBaseCustomizationProps } from "../../../utils/react/pickBaseCustomizationProps.js";
|
|
4
4
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
@@ -19,6 +19,7 @@ import { getListBoxOptionId } from "../ListBox/optionId.js";
|
|
|
19
19
|
import { collectVisibleKeys, filterCollectionNodes, getEdgeVisibleKey, getNextVisibleKey } from "../ListBoxPopover/listNavigation.js";
|
|
20
20
|
import { TextInputBase as _TextInputBase } from "../TextInput/TextInputBase.js";
|
|
21
21
|
import { useFormatter } from "../../../i18n/useFormatter.js";
|
|
22
|
+
import { getIdentifierTextServices } from "../TextInput/identifier-text-services.js";
|
|
22
23
|
import { ListBoxPopover } from "../ListBoxPopover/ListBoxPopover.js";
|
|
23
24
|
import { useCompositeFocus } from "../ListBoxPopover/useCompositeFocus.js";
|
|
24
25
|
import { TagList } from "./TagList.js";
|
|
@@ -429,7 +430,7 @@ function TagInput(props, ref) {
|
|
|
429
430
|
const { t } = useI18n();
|
|
430
431
|
const { formatList } = useFormatter();
|
|
431
432
|
const { direction: textDirection } = useLocale();
|
|
432
|
-
const { qa, id, label, value: valueProp, defaultValue, onChange: onChange_0, inputValue: inputValueProp, defaultInputValue, onInputChange, placeholder, hidePlaceholderWithTags, autoFocus, autoComplete: t2, onFocus, onBlur, onKeyDown, delimiters: t3, validateTag, normalizeTag, maxTags, shouldCommitOnBlur: t4, isClearable, onClear, items, children: renderChildren, allowsCustomValue, filter, disabledKeys, popoverTrigger: t5, emptyLabel, onOpenChange, hideTrigger, direction: t6, shouldFlip: t7, overlayOffset: t8, containerPadding: t9, tagProps, icon, prefix, suffix, suffixPosition, size: t10, tagPlacement: t11, isDisabled, isReadOnly, isRequired, isLoading, isInvalid, isValid, message, errorMessage, inputRef: inputRefProp, wrapperRef: wrapperRefProp, popoverRef: popoverRefProp, listBoxRef: listBoxRefProp, wrapperStyles, inputStyles, tagListStyles, tagStyles, triggerStyles, overlayStyles, listBoxStyles, optionStyles, sectionStyles, headingStyles, listGap, labelProps: userLabelProps, mods, name, form, ...otherProps } = props;
|
|
433
|
+
const { qa, id, label, value: valueProp, defaultValue, onChange: onChange_0, inputValue: inputValueProp, defaultInputValue, onInputChange, placeholder, hidePlaceholderWithTags, autoFocus, autoComplete: t2, isIdentifier, onFocus, onBlur, onKeyDown, delimiters: t3, validateTag, normalizeTag, maxTags, shouldCommitOnBlur: t4, isClearable, onClear, items, children: renderChildren, allowsCustomValue, filter, disabledKeys, popoverTrigger: t5, emptyLabel, onOpenChange, hideTrigger, direction: t6, shouldFlip: t7, overlayOffset: t8, containerPadding: t9, tagProps, icon, prefix, suffix, suffixPosition, size: t10, tagPlacement: t11, isDisabled, isReadOnly, isRequired, isLoading, isInvalid, isValid, message, errorMessage, inputRef: inputRefProp, wrapperRef: wrapperRefProp, popoverRef: popoverRefProp, listBoxRef: listBoxRefProp, wrapperStyles, inputStyles, tagListStyles, tagStyles, triggerStyles, overlayStyles, listBoxStyles, optionStyles, sectionStyles, headingStyles, listGap, labelProps: userLabelProps, mods, name, form, ...otherProps } = props;
|
|
433
434
|
const autoComplete = t2 === void 0 ? "off" : t2;
|
|
434
435
|
const delimiters = t3 === void 0 ? DEFAULT_DELIMITERS : t3;
|
|
435
436
|
const shouldCommitOnBlur = t4 === void 0 ? true : t4;
|
|
@@ -950,6 +951,10 @@ function TagInput(props, ref) {
|
|
|
950
951
|
const optionDisabledKeys = lockedKeys.length ? [...disabledKeySet, ...lockedKeys] : disabledKeys;
|
|
951
952
|
const { labelProps, inputProps } = useTextField({
|
|
952
953
|
...otherProps,
|
|
954
|
+
...getIdentifierTextServices(isIdentifier, {
|
|
955
|
+
...otherProps,
|
|
956
|
+
autoComplete
|
|
957
|
+
}),
|
|
953
958
|
id,
|
|
954
959
|
label,
|
|
955
960
|
value: draft,
|