@cube-dev/ui-kit 0.0.0-canary-dfe927c → 0.0.0-canary-b302979
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/AutoCollapseObserver.js +1 -1
- package/dist/components/actions/Button/Button.js +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.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemActionsWrapper.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +1 -1
- package/dist/components/actions/Menu/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 +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/use-action.js +1 -1
- package/dist/components/actions/use-anchored-menu.js +1 -1
- package/dist/components/actions/use-context-menu.js +1 -1
- package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
- package/dist/components/content/Alert/Alert.js +1 -1
- package/dist/components/content/Alert/use-alert.js +1 -1
- package/dist/components/content/Avatar/Avatar.js +1 -1
- package/dist/components/content/Badge/Badge.js +1 -1
- package/dist/components/content/Card/Card.js +1 -1
- package/dist/components/content/Content.js +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +1 -1
- package/dist/components/content/Divider/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 +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.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +29 -55
- package/dist/components/content/Tag/Tag.js.map +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/use-checkbox-tree.js +1 -1
- package/dist/components/content/Tree/use-load-data.js +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.js +1 -1
- package/dist/components/data/DataTable/DataTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
- package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
- package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
- package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
- package/dist/components/data/ItemTable/item-table-sections.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-column-widths.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-drag-drop.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-pagination.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-selection.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-sort.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-tree-model.js +1 -1
- package/dist/components/data/TableBase/ColumnResizer.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableRowLink.js +1 -1
- package/dist/components/data/TableBase/TableView.js +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 +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.js +1 -1
- package/dist/components/fields/FilterListBox/styled.js +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
- package/dist/components/fields/FilterPicker/FilterTree.js +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
- package/dist/components/fields/ListBox/ListBox.js +1 -1
- package/dist/components/fields/ListBox/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.js +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/fields/Picker/Picker.js +1 -1
- package/dist/components/fields/RadioGroup/Radio.js +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/RadioGroup/joined-styles.js +1 -1
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.js +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/TagInput/TagInput.d.ts +3 -26
- package/dist/components/fields/TagInput/TagInput.js +202 -337
- package/dist/components/fields/TagInput/TagInput.js.map +1 -1
- package/dist/components/fields/TagInput/TagList.js +34 -59
- package/dist/components/fields/TagInput/TagList.js.map +1 -1
- package/dist/components/fields/TagInput/useActiveOption.js +1 -1
- package/dist/components/fields/TagInput/useTagError.js +1 -1
- package/dist/components/fields/TextArea/TextArea.js +1 -1
- package/dist/components/fields/TextInput/TextInput.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js +1 -1
- package/dist/components/fields/TextInput/displayed-validation.js +1 -1
- package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/fields/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/option-origin-press.js +1 -1
- 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 +1 -1
- package/dist/components/form/Form/use-field/use-field-props.js +1 -1
- package/dist/components/form/Form/use-field/use-field.js +1 -1
- package/dist/components/form/Form/use-form.js +1 -1
- package/dist/components/form/Form/validation.js +1 -1
- package/dist/components/form/Label.js +1 -1
- package/dist/components/form/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/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 +5 -7
- package/dist/components/navigation/Tabs/TabButton.js.map +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/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 +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/dist/components/overlays/Dialog/ModernDialogForm.js +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/default-button-text.js +1 -1
- package/dist/components/overlays/Dialog/use-content-overflow.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
- package/dist/components/overlays/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 +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 +1 -9
- 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 -5
- package/dist/i18n/locales/en-US/uikit.js +3 -5
- package/dist/i18n/locales/en-US/uikit.json.d.ts +4 -8
- package/dist/i18n/locales/es-ES/uikit.js +3 -5
- package/dist/i18n/locales/es-MX/uikit.js +3 -5
- package/dist/i18n/locales/fr-FR/uikit.js +3 -5
- package/dist/i18n/locales/it-IT/uikit.js +3 -5
- package/dist/i18n/locales/ja-JP/uikit.js +3 -5
- package/dist/i18n/locales/nb-NO/uikit.js +3 -5
- package/dist/i18n/locales/pt-BR/uikit.js +3 -5
- package/dist/i18n/locales/pt-PT/uikit.js +3 -5
- package/dist/i18n/locales/sv-SE/uikit.js +3 -5
- package/dist/i18n/locales/vi-VN/uikit.js +3 -5
- 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.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.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/overlayKeyPropagation.js +1 -1
- package/dist/utils/react/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/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 +2 -2
- package/package.json +1 -1
- package/src/components/content/Tag/Tag.docs.mdx +0 -2
- package/src/components/fields/TagInput/TagInput.docs.mdx +9 -61
- package/dist/components/fields/TagInput/useSuffixSpace.js +0 -62
- package/dist/components/fields/TagInput/useSuffixSpace.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b302979 | 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";
|
|
@@ -23,13 +23,12 @@ import { ListBoxPopover } from "../ListBoxPopover/ListBoxPopover.js";
|
|
|
23
23
|
import { useCompositeFocus } from "../ListBoxPopover/useCompositeFocus.js";
|
|
24
24
|
import { TagList } from "./TagList.js";
|
|
25
25
|
import { useActiveOption } from "./useActiveOption.js";
|
|
26
|
-
import { useSuffixSpace } from "./useSuffixSpace.js";
|
|
27
26
|
import { useTagError } from "./useTagError.js";
|
|
28
27
|
import { c } from "react/compiler-runtime";
|
|
29
|
-
import {
|
|
28
|
+
import { tasty } from "@tenphi/tasty";
|
|
30
29
|
import { cloneElement, forwardRef, isValidElement, useEffect, useRef, useState } from "react";
|
|
31
30
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
32
|
-
import { VisuallyHidden, useFilter, useId as useId$1,
|
|
31
|
+
import { VisuallyHidden, useFilter, useId as useId$1, useTextField } from "react-aria";
|
|
33
32
|
import { Section, useListState } from "react-stately";
|
|
34
33
|
import { useControlledState } from "@react-stately/utils";
|
|
35
34
|
//#region src/components/fields/TagInput/TagInput.tsx
|
|
@@ -39,7 +38,6 @@ import { useControlledState } from "@react-stately/utils";
|
|
|
39
38
|
* function in a ternary branch to every later line of the component.
|
|
40
39
|
*/
|
|
41
40
|
const showEveryOption = () => true;
|
|
42
|
-
const INTERACTIVE_ELEMENTS = "a[href], button, input, select, textarea, [tabindex], [contenteditable]";
|
|
43
41
|
const TagInputElement = tasty({
|
|
44
42
|
qa: "TagInputContainer",
|
|
45
43
|
styles: {
|
|
@@ -53,94 +51,6 @@ const TAG_SIZES = {
|
|
|
53
51
|
medium: "xsmall",
|
|
54
52
|
large: "small"
|
|
55
53
|
};
|
|
56
|
-
const INSIDE_WRAPPER_STYLES = {
|
|
57
|
-
display: "flex",
|
|
58
|
-
flow: "row wrap",
|
|
59
|
-
placeItems: "center start",
|
|
60
|
-
gap: ".5x",
|
|
61
|
-
height: "min $size",
|
|
62
|
-
padding: "$tag-inset",
|
|
63
|
-
backgroundClip: "padding-box",
|
|
64
|
-
"$tag-size": {
|
|
65
|
-
"": "$size-xs",
|
|
66
|
-
"size=small": "2.5x",
|
|
67
|
-
"size=large": "$size-sm"
|
|
68
|
-
},
|
|
69
|
-
"$tag-inset": "(($size - $tag-size - 2bw) / 2)",
|
|
70
|
-
"$suffix-space": "0px",
|
|
71
|
-
Prefix: { display: "contents" },
|
|
72
|
-
Suffix: {
|
|
73
|
-
position: "relative",
|
|
74
|
-
alignSelf: "stretch",
|
|
75
|
-
margin: "(-1 * $tag-inset)",
|
|
76
|
-
marginLeft: "(-1 * $suffix-space)"
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
const INSIDE_INPUT_STYLES = {
|
|
80
|
-
flexGrow: 1,
|
|
81
|
-
flexBasis: {
|
|
82
|
-
"": 0,
|
|
83
|
-
"@supports(field-sizing: content) & !:placeholder-shown": "auto"
|
|
84
|
-
},
|
|
85
|
-
fieldSizing: {
|
|
86
|
-
"": "content",
|
|
87
|
-
":placeholder-shown": "fixed"
|
|
88
|
-
},
|
|
89
|
-
textOverflow: "ellipsis",
|
|
90
|
-
width: "(6x + $suffix-space) auto 100%",
|
|
91
|
-
height: "$tag-size",
|
|
92
|
-
padding: "0 (1x - 1bw - $tag-inset + $suffix-space) 0 (1x - 1bw - $tag-inset)"
|
|
93
|
-
};
|
|
94
|
-
const INSIDE_TAG_LIST_STYLES = {
|
|
95
|
-
display: "contents",
|
|
96
|
-
gap: 0
|
|
97
|
-
};
|
|
98
|
-
const INSIDE_TAG_STYLES = {
|
|
99
|
-
$size: "$tag-size",
|
|
100
|
-
"$block-padding": 0
|
|
101
|
-
};
|
|
102
|
-
/** What each part is styled with for a placement. The consumer's own win. */
|
|
103
|
-
function getPlacementStyles(placement, own) {
|
|
104
|
-
if (placement !== "inside") return own;
|
|
105
|
-
return {
|
|
106
|
-
wrapper: mergeStyles(INSIDE_WRAPPER_STYLES, own.wrapper),
|
|
107
|
-
input: mergeStyles(INSIDE_INPUT_STYLES, own.input),
|
|
108
|
-
tagList: mergeStyles(INSIDE_TAG_LIST_STYLES, own.tagList),
|
|
109
|
-
tag: mergeStyles(INSIDE_TAG_STYLES, own.tag)
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
/** The placeholder, unless it hides once there is a tag. */
|
|
113
|
-
function shownPlaceholder(placeholder, hideWithTags, tagCount) {
|
|
114
|
-
return hideWithTags && tagCount > 0 ? void 0 : placeholder;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Whether the popover shows: with an option to list, or to say there is none
|
|
118
|
-
* for the typed text, or none yet while loading (`emptyLabel`), rather than
|
|
119
|
-
* disappear under the user. With no options at all and nothing typed, it
|
|
120
|
-
* hides but stays open, so it comes back as soon as there is something.
|
|
121
|
-
*/
|
|
122
|
-
function isListShown({ isOpen, hasResults, term, isLoading }) {
|
|
123
|
-
return isOpen && (hasResults || term !== "" || !!isLoading);
|
|
124
|
-
}
|
|
125
|
-
/** What the popover says when it has no option to list. */
|
|
126
|
-
function resolveEmptyLabel(emptyLabel, isLoading, t) {
|
|
127
|
-
if (emptyLabel !== void 0) return emptyLabel;
|
|
128
|
-
return isLoading ? t("tagInput.loading", "Loading…") : t("tagInput.noResults", "No results found");
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Where the list of chips renders: inside, after the icon and the prefix and
|
|
132
|
-
* before the text; below, under the box.
|
|
133
|
-
*/
|
|
134
|
-
function placeTagList(placement, prefix, tagList) {
|
|
135
|
-
if (placement !== "inside" || !tagList) return {
|
|
136
|
-
prefix,
|
|
137
|
-
below: tagList
|
|
138
|
-
};
|
|
139
|
-
return {
|
|
140
|
-
prefix: /* @__PURE__ */ jsxs(Fragment$1, { children: [prefix, tagList] }),
|
|
141
|
-
below: null
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
54
|
const DEFAULT_DELIMITERS = [","];
|
|
145
55
|
const LINE_BREAK = /\r\n|\r|\n/;
|
|
146
56
|
function escapeRegExp(text) {
|
|
@@ -266,15 +176,6 @@ function isComposingKey(e) {
|
|
|
266
176
|
return e.nativeEvent.isComposing || e.keyCode === 229;
|
|
267
177
|
}
|
|
268
178
|
/**
|
|
269
|
-
* The arrow toward the start of the line, with the caret already there and
|
|
270
|
-
* nothing selected: the caret has nowhere to go, so it steps out to the chip
|
|
271
|
-
* before it. Modified arrows stay text editing.
|
|
272
|
-
*/
|
|
273
|
-
function isArrowPastStart(e, direction) {
|
|
274
|
-
const { selectionStart, selectionEnd } = e.currentTarget;
|
|
275
|
-
return e.key === (direction === "rtl" ? "ArrowRight" : "ArrowLeft") && !(e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) && selectionStart === 0 && selectionEnd === 0;
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
179
|
* Why a value is refused, or `null` when it may be added. `optionKey` is the
|
|
279
180
|
* option the part resolved to, if any: an option is not validated. `present`
|
|
280
181
|
* holds the values already there, the ones this commit accepted so far among
|
|
@@ -307,8 +208,8 @@ function getComboboxProps(listBoxId, isOpen, activeKey) {
|
|
|
307
208
|
}
|
|
308
209
|
/** The button in the input that toggles the suggestions popover. */
|
|
309
210
|
function TagInputTrigger(t0) {
|
|
310
|
-
const $ = c(
|
|
311
|
-
const { id, size, ariaLabel, fieldLabelledby, onPress, isOpen, isDisabled,
|
|
211
|
+
const $ = c(18);
|
|
212
|
+
const { id, size, ariaLabel, fieldLabelledby, onPress, isOpen, isDisabled, styles } = t0;
|
|
312
213
|
const { t } = useI18n();
|
|
313
214
|
const t1 = isOpen ? "up" : "down";
|
|
314
215
|
let t2;
|
|
@@ -317,28 +218,23 @@ function TagInputTrigger(t0) {
|
|
|
317
218
|
$[0] = t1;
|
|
318
219
|
$[1] = t2;
|
|
319
220
|
} else t2 = $[1];
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
t4 = {
|
|
324
|
-
pressed: isOpen,
|
|
325
|
-
loading: t3
|
|
326
|
-
};
|
|
221
|
+
let t3;
|
|
222
|
+
if ($[2] !== isOpen) {
|
|
223
|
+
t3 = { pressed: isOpen };
|
|
327
224
|
$[2] = isOpen;
|
|
328
225
|
$[3] = t3;
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
$[5] =
|
|
335
|
-
$[6] =
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
t7 = /* @__PURE__ */ jsx(ItemAction, {
|
|
226
|
+
} else t3 = $[3];
|
|
227
|
+
let t4;
|
|
228
|
+
if ($[4] !== ariaLabel || $[5] !== t) {
|
|
229
|
+
t4 = ariaLabel ? t("tagInput.showOptionsFor", "Show options, {{label}}", { label: ariaLabel }) : t("tagInput.showOptions", "Show options");
|
|
230
|
+
$[4] = ariaLabel;
|
|
231
|
+
$[5] = t;
|
|
232
|
+
$[6] = t4;
|
|
233
|
+
} else t4 = $[6];
|
|
234
|
+
const t5 = fieldLabelledby ? `${id} ${fieldLabelledby}` : void 0;
|
|
235
|
+
let t6;
|
|
236
|
+
if ($[7] !== id || $[8] !== isDisabled || $[9] !== isOpen || $[10] !== onPress || $[11] !== size || $[12] !== styles || $[13] !== t2 || $[14] !== t3 || $[15] !== t4 || $[16] !== t5) {
|
|
237
|
+
t6 = /* @__PURE__ */ jsx(ItemAction, {
|
|
342
238
|
"data-popover-trigger": true,
|
|
343
239
|
id,
|
|
344
240
|
qa: "TagInputTrigger",
|
|
@@ -346,29 +242,29 @@ function TagInputTrigger(t0) {
|
|
|
346
242
|
size,
|
|
347
243
|
isDisabled,
|
|
348
244
|
styles,
|
|
349
|
-
mods:
|
|
245
|
+
mods: t3,
|
|
350
246
|
tabIndex: -1,
|
|
351
247
|
"aria-expanded": isOpen,
|
|
352
248
|
"aria-haspopup": "listbox",
|
|
353
|
-
"aria-label":
|
|
354
|
-
"aria-labelledby":
|
|
249
|
+
"aria-label": t4,
|
|
250
|
+
"aria-labelledby": t5,
|
|
355
251
|
onPress
|
|
356
252
|
});
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
253
|
+
$[7] = id;
|
|
254
|
+
$[8] = isDisabled;
|
|
255
|
+
$[9] = isOpen;
|
|
256
|
+
$[10] = onPress;
|
|
257
|
+
$[11] = size;
|
|
258
|
+
$[12] = styles;
|
|
259
|
+
$[13] = t2;
|
|
260
|
+
$[14] = t3;
|
|
364
261
|
$[15] = t4;
|
|
365
262
|
$[16] = t5;
|
|
366
263
|
$[17] = t6;
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
return t7;
|
|
264
|
+
} else t6 = $[17];
|
|
265
|
+
return t6;
|
|
370
266
|
}
|
|
371
|
-
/** The button in the input that clears the typed text
|
|
267
|
+
/** The button in the input that clears the typed text. */
|
|
372
268
|
function TagInputClearButton(t0) {
|
|
373
269
|
const $ = c(10);
|
|
374
270
|
const { id, size, ariaLabel, fieldLabelledby, onPress } = t0;
|
|
@@ -380,7 +276,7 @@ function TagInputClearButton(t0) {
|
|
|
380
276
|
} else t1 = $[0];
|
|
381
277
|
let t2;
|
|
382
278
|
if ($[1] !== ariaLabel || $[2] !== t) {
|
|
383
|
-
t2 = ariaLabel ? t("tagInput.
|
|
279
|
+
t2 = ariaLabel ? t("tagInput.clearTextFor", "Clear text, {{label}}", { label: ariaLabel }) : t("tagInput.clearText", "Clear text");
|
|
384
280
|
$[1] = ariaLabel;
|
|
385
281
|
$[2] = t;
|
|
386
282
|
$[3] = t2;
|
|
@@ -408,7 +304,7 @@ function TagInputClearButton(t0) {
|
|
|
408
304
|
return t4;
|
|
409
305
|
}
|
|
410
306
|
function TagInput(props, ref) {
|
|
411
|
-
const $ = c(
|
|
307
|
+
const $ = c(50);
|
|
412
308
|
let t0;
|
|
413
309
|
if ($[0] !== props) {
|
|
414
310
|
t0 = castNullableArrayValue(props);
|
|
@@ -428,8 +324,7 @@ function TagInput(props, ref) {
|
|
|
428
324
|
props = withFieldChrome(props);
|
|
429
325
|
const { t } = useI18n();
|
|
430
326
|
const { formatList } = useFormatter();
|
|
431
|
-
const { direction:
|
|
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;
|
|
327
|
+
const { qa, id, label, value: valueProp, defaultValue, onChange: onChange_0, inputValue: inputValueProp, defaultInputValue, onInputChange, placeholder, autoFocus, autoComplete: t2, onFocus, onBlur, onKeyDown, delimiters: t3, validateTag, normalizeTag, maxTags, shouldCommitOnBlur: t4, isClearable, onClear, items, children: renderChildren, allowsCustomValue, filter, disabledKeys, popoverTrigger: t5, onOpenChange, hideTrigger, direction: t6, shouldFlip: t7, overlayOffset: t8, containerPadding: t9, tagProps, icon, prefix, suffix, suffixPosition, size: t10, 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
328
|
const autoComplete = t2 === void 0 ? "off" : t2;
|
|
434
329
|
const delimiters = t3 === void 0 ? DEFAULT_DELIMITERS : t3;
|
|
435
330
|
const shouldCommitOnBlur = t4 === void 0 ? true : t4;
|
|
@@ -439,7 +334,6 @@ function TagInput(props, ref) {
|
|
|
439
334
|
const overlayOffset = t8 === void 0 ? 8 : t8;
|
|
440
335
|
const containerPadding = t9 === void 0 ? 8 : t9;
|
|
441
336
|
const size = t10 === void 0 ? "medium" : t10;
|
|
442
|
-
const tagPlacement = t11 === void 0 ? "below" : t11;
|
|
443
337
|
const { styles, field } = splitFieldLayout(props);
|
|
444
338
|
const rootRef = useCombinedRefs(ref);
|
|
445
339
|
const inputRef = useCombinedRefs(inputRefProp);
|
|
@@ -448,12 +342,12 @@ function TagInput(props, ref) {
|
|
|
448
342
|
const listBoxRef = useCombinedRefs(listBoxRefProp);
|
|
449
343
|
const tagListRef = useRef(null);
|
|
450
344
|
const listStateRef = useRef(null);
|
|
451
|
-
let
|
|
345
|
+
let t11;
|
|
452
346
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
453
|
-
|
|
454
|
-
$[3] =
|
|
455
|
-
} else
|
|
456
|
-
const listBoxId = `TagInputListBox-${
|
|
347
|
+
t11 = generateRandomId();
|
|
348
|
+
$[3] = t11;
|
|
349
|
+
} else t11 = $[3];
|
|
350
|
+
const listBoxId = `TagInputListBox-${t11}`;
|
|
457
351
|
const tagListId = useId$1();
|
|
458
352
|
const summaryId = useId$1();
|
|
459
353
|
const hintId = useId$1();
|
|
@@ -463,15 +357,15 @@ function TagInput(props, ref) {
|
|
|
463
357
|
const uniqueValues = [...new Set((values ?? []).map(String))];
|
|
464
358
|
const [draft, setDraftState] = useControlledState(inputValueProp, defaultInputValue ?? "", onInputChange);
|
|
465
359
|
const { tagError, setTagError, clearTagErrorAfterPress, cancelPendingClear } = useTagError();
|
|
466
|
-
let
|
|
360
|
+
let t12;
|
|
467
361
|
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
468
|
-
|
|
362
|
+
t12 = {
|
|
469
363
|
id: 0,
|
|
470
364
|
text: ""
|
|
471
365
|
};
|
|
472
|
-
$[4] =
|
|
473
|
-
} else
|
|
474
|
-
const [announcement, setAnnouncement] = useState(
|
|
366
|
+
$[4] = t12;
|
|
367
|
+
} else t12 = $[4];
|
|
368
|
+
const [announcement, setAnnouncement] = useState(t12);
|
|
475
369
|
let children = renderChildren;
|
|
476
370
|
if (items && typeof renderChildren === "function") children = Array.from(items).map((item, index) => {
|
|
477
371
|
const rendered = renderChildren(item);
|
|
@@ -483,40 +377,40 @@ function TagInput(props, ref) {
|
|
|
483
377
|
children,
|
|
484
378
|
selectionMode: "none"
|
|
485
379
|
}).collection;
|
|
486
|
-
let
|
|
380
|
+
let t13;
|
|
487
381
|
if ($[5] !== collection) {
|
|
488
|
-
|
|
382
|
+
t13 = (key) => {
|
|
489
383
|
const node = collection.getItem(key);
|
|
490
384
|
return node?.type === "item" ? node : null;
|
|
491
385
|
};
|
|
492
386
|
$[5] = collection;
|
|
493
|
-
$[6] =
|
|
494
|
-
} else
|
|
495
|
-
const getOption =
|
|
496
|
-
let
|
|
387
|
+
$[6] = t13;
|
|
388
|
+
} else t13 = $[6];
|
|
389
|
+
const getOption = t13;
|
|
390
|
+
let t14;
|
|
497
391
|
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
498
|
-
|
|
499
|
-
$[7] =
|
|
500
|
-
} else
|
|
501
|
-
const { contains } = useFilter(
|
|
392
|
+
t14 = { sensitivity: "base" };
|
|
393
|
+
$[7] = t14;
|
|
394
|
+
} else t14 = $[7];
|
|
395
|
+
const { contains } = useFilter(t14);
|
|
502
396
|
const textFilterFn = filter === false ? showEveryOption : filter || contains;
|
|
503
397
|
const [isFilterActive, setIsFilterActive] = useState(false);
|
|
504
398
|
const term = draft.trim();
|
|
505
399
|
const [knownLabels, setKnownLabels] = useState(_temp2);
|
|
506
|
-
let
|
|
400
|
+
let t15;
|
|
507
401
|
if ($[8] !== getOption || $[9] !== knownLabels) {
|
|
508
|
-
|
|
402
|
+
t15 = (key_0) => getOption(key_0)?.textValue || knownLabels.get(key_0) || key_0;
|
|
509
403
|
$[8] = getOption;
|
|
510
404
|
$[9] = knownLabels;
|
|
511
|
-
$[10] =
|
|
512
|
-
} else
|
|
513
|
-
const getOptionLabel =
|
|
405
|
+
$[10] = t15;
|
|
406
|
+
} else t15 = $[10];
|
|
407
|
+
const getOptionLabel = t15;
|
|
514
408
|
const getTagLabel = (key_1) => textLabel(tagProps?.(key_1)?.children) ?? getOptionLabel(key_1);
|
|
515
409
|
const isTagLocked = (key_2) => !!tagProps?.(key_2)?.isDisabled;
|
|
516
410
|
const disabledKeySet = new Set([...disabledKeys ?? []].map(String));
|
|
517
|
-
let
|
|
411
|
+
let t16;
|
|
518
412
|
if ($[11] !== getOption || $[12] !== knownLabels) {
|
|
519
|
-
|
|
413
|
+
t16 = (keys) => {
|
|
520
414
|
let next = null;
|
|
521
415
|
for (const key_3 of keys) {
|
|
522
416
|
const label_0 = getOption(key_3)?.textValue;
|
|
@@ -529,9 +423,9 @@ function TagInput(props, ref) {
|
|
|
529
423
|
};
|
|
530
424
|
$[11] = getOption;
|
|
531
425
|
$[12] = knownLabels;
|
|
532
|
-
$[13] =
|
|
533
|
-
} else
|
|
534
|
-
const rememberLabels = useEvent(
|
|
426
|
+
$[13] = t16;
|
|
427
|
+
} else t16 = $[13];
|
|
428
|
+
const rememberLabels = useEvent(t16);
|
|
535
429
|
const findOptionKey = (text) => {
|
|
536
430
|
if (!hasOptions) return null;
|
|
537
431
|
const match = matchOptionText(collection, text);
|
|
@@ -549,8 +443,8 @@ function TagInput(props, ref) {
|
|
|
549
443
|
typed
|
|
550
444
|
};
|
|
551
445
|
};
|
|
552
|
-
const resolvePart = (part,
|
|
553
|
-
const source =
|
|
446
|
+
const resolvePart = (part, t17) => {
|
|
447
|
+
const source = t17 === void 0 ? "text" : t17;
|
|
554
448
|
if (source === "text") return resolveTypedText(part);
|
|
555
449
|
if (source === "option") return {
|
|
556
450
|
optionKey: part,
|
|
@@ -568,12 +462,12 @@ function TagInput(props, ref) {
|
|
|
568
462
|
};
|
|
569
463
|
const visibleOptionKeys = [];
|
|
570
464
|
if (hasOptions) collectVisibleKeys(optionFilterFn(collection), visibleOptionKeys, disabledKeys ? new Set(disabledKeys) : void 0);
|
|
571
|
-
let
|
|
465
|
+
let t18;
|
|
572
466
|
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
573
|
-
|
|
574
|
-
$[14] =
|
|
575
|
-
} else
|
|
576
|
-
const [unpickedCustomValues, setUnpickedCustomValues] = useState(
|
|
467
|
+
t18 = [];
|
|
468
|
+
$[14] = t18;
|
|
469
|
+
} else t18 = $[14];
|
|
470
|
+
const [unpickedCustomValues, setUnpickedCustomValues] = useState(t18);
|
|
577
471
|
const { keys: customValueKeys, visibleKeys: visibleCustomKeys, typedKey: customTerm } = hasOptions && allowsCustomValue ? getCustomRows({
|
|
578
472
|
values: uniqueValues,
|
|
579
473
|
unpicked: unpickedCustomValues,
|
|
@@ -595,12 +489,7 @@ function TagInput(props, ref) {
|
|
|
595
489
|
const visibleOptionsSignature = [...visibleOptionKeys, ...visibleCustomKeys].join("\0");
|
|
596
490
|
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
|
597
491
|
const isInteractive = !isDisabled && !isReadOnly;
|
|
598
|
-
const shouldShowPopover = hasOptions && isInteractive &&
|
|
599
|
-
isOpen: isPopoverOpen,
|
|
600
|
-
hasResults,
|
|
601
|
-
term,
|
|
602
|
-
isLoading
|
|
603
|
-
});
|
|
492
|
+
const shouldShowPopover = hasOptions && isInteractive && isPopoverOpen && hasResults;
|
|
604
493
|
const notifiedOpenRef = useRef(false);
|
|
605
494
|
useEffect(() => {
|
|
606
495
|
if (notifiedOpenRef.current === shouldShowPopover) return;
|
|
@@ -625,27 +514,27 @@ function TagInput(props, ref) {
|
|
|
625
514
|
preferredOptionKey
|
|
626
515
|
});
|
|
627
516
|
const activeOptionKey = activeOption?.key ?? null;
|
|
628
|
-
let
|
|
517
|
+
let t19;
|
|
629
518
|
if ($[15] !== setDraftState) {
|
|
630
|
-
|
|
519
|
+
t19 = (next_0) => {
|
|
631
520
|
setDraftState(next_0);
|
|
632
521
|
setIsFilterActive(!!next_0.trim());
|
|
633
522
|
};
|
|
634
523
|
$[15] = setDraftState;
|
|
635
|
-
$[16] =
|
|
636
|
-
} else
|
|
637
|
-
const setDraft = useEvent(
|
|
638
|
-
let
|
|
524
|
+
$[16] = t19;
|
|
525
|
+
} else t19 = $[16];
|
|
526
|
+
const setDraft = useEvent(t19);
|
|
527
|
+
let t20;
|
|
639
528
|
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
640
|
-
|
|
529
|
+
t20 = (text_1) => {
|
|
641
530
|
setAnnouncement((prev) => ({
|
|
642
531
|
id: prev.id + 1,
|
|
643
532
|
text: text_1
|
|
644
533
|
}));
|
|
645
534
|
};
|
|
646
|
-
$[17] =
|
|
647
|
-
} else
|
|
648
|
-
const announce = useEvent(
|
|
535
|
+
$[17] = t20;
|
|
536
|
+
} else t20 = $[17];
|
|
537
|
+
const announce = useEvent(t20);
|
|
649
538
|
const rejectionMessage = useEvent((rejection) => {
|
|
650
539
|
if (rejection.message) return rejection.message;
|
|
651
540
|
switch (rejection.reason) {
|
|
@@ -705,15 +594,15 @@ function TagInput(props, ref) {
|
|
|
705
594
|
setDraft(rest);
|
|
706
595
|
return rest;
|
|
707
596
|
});
|
|
708
|
-
let
|
|
597
|
+
let t21;
|
|
709
598
|
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
710
|
-
|
|
599
|
+
t21 = () => {
|
|
711
600
|
const rows = tagListRef.current?.querySelectorAll("[role=\"row\"]:not([aria-disabled=\"true\"])");
|
|
712
601
|
rows?.[rows.length - 1]?.focus();
|
|
713
602
|
};
|
|
714
|
-
$[18] =
|
|
715
|
-
} else
|
|
716
|
-
const focusLastTag = useEvent(
|
|
603
|
+
$[18] = t21;
|
|
604
|
+
} else t21 = $[18];
|
|
605
|
+
const focusLastTag = useEvent(t21);
|
|
717
606
|
const removeValues = useEvent((requested) => {
|
|
718
607
|
const keys_0 = requested.filter((key_4) => !isTagLocked(key_4));
|
|
719
608
|
if (!keys_0.length) return;
|
|
@@ -754,7 +643,7 @@ function TagInput(props, ref) {
|
|
|
754
643
|
const handleArrowKey = useEvent((e) => {
|
|
755
644
|
if (!hasOptions) return;
|
|
756
645
|
e.preventDefault();
|
|
757
|
-
if (!shouldShowPopover
|
|
646
|
+
if (!shouldShowPopover) {
|
|
758
647
|
if (!hasResults) setIsFilterActive(false);
|
|
759
648
|
setIsPopoverOpen(true);
|
|
760
649
|
return;
|
|
@@ -767,9 +656,9 @@ function TagInput(props, ref) {
|
|
|
767
656
|
const listState_0 = listStateRef.current;
|
|
768
657
|
if (listState_0) moveVirtualFocus(getEdgeVisibleKey(listState_0, e_0.key === "Home" ? "first" : "last"), "user", term);
|
|
769
658
|
});
|
|
770
|
-
let
|
|
659
|
+
let t22;
|
|
771
660
|
if ($[19] !== focusLastTag) {
|
|
772
|
-
|
|
661
|
+
t22 = (e_1) => {
|
|
773
662
|
if (isComposingKey(e_1)) return;
|
|
774
663
|
e_1.preventDefault();
|
|
775
664
|
if (e_1.repeat) return;
|
|
@@ -777,9 +666,9 @@ function TagInput(props, ref) {
|
|
|
777
666
|
focusLastTag();
|
|
778
667
|
};
|
|
779
668
|
$[19] = focusLastTag;
|
|
780
|
-
$[20] =
|
|
781
|
-
} else
|
|
782
|
-
const
|
|
669
|
+
$[20] = t22;
|
|
670
|
+
} else t22 = $[20];
|
|
671
|
+
const handleBackspaceKey = useEvent(t22);
|
|
783
672
|
const handleEnterKey = useEvent((e_2) => {
|
|
784
673
|
if (isComposingKey(e_2)) return;
|
|
785
674
|
const isCurrent = activeOption != null && activeOption.term === term;
|
|
@@ -810,26 +699,36 @@ function TagInput(props, ref) {
|
|
|
810
699
|
const rejected_0 = commitParts(splitTagText(draft.slice(0, start), delimiters));
|
|
811
700
|
setDraft([rejected_0, draft.slice(end).trimStart()].filter(Boolean).join(joiner));
|
|
812
701
|
});
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
702
|
+
let t23;
|
|
703
|
+
if ($[21] !== draft || $[22] !== setDraft || $[23] !== setTagError || $[24] !== shouldShowPopover || $[25] !== tagError) {
|
|
704
|
+
t23 = (e_4) => {
|
|
705
|
+
if (shouldShowPopover) {
|
|
706
|
+
e_4.preventDefault();
|
|
707
|
+
e_4.stopPropagation();
|
|
708
|
+
setIsPopoverOpen(false);
|
|
709
|
+
setTagError(null);
|
|
710
|
+
} else if (draft || tagError) {
|
|
711
|
+
e_4.preventDefault();
|
|
712
|
+
e_4.stopPropagation();
|
|
713
|
+
setDraft("");
|
|
714
|
+
setTagError(null);
|
|
715
|
+
setIsPopoverOpen(false);
|
|
716
|
+
}
|
|
717
|
+
};
|
|
718
|
+
$[21] = draft;
|
|
719
|
+
$[22] = setDraft;
|
|
720
|
+
$[23] = setTagError;
|
|
721
|
+
$[24] = shouldShowPopover;
|
|
722
|
+
$[25] = tagError;
|
|
723
|
+
$[26] = t23;
|
|
724
|
+
} else t23 = $[26];
|
|
725
|
+
const handleEscapeKey = useEvent(t23);
|
|
827
726
|
const handleKeyDown = useEvent((e_5) => {
|
|
828
727
|
onKeyDown?.(e_5);
|
|
829
728
|
if (!e_5.defaultPrevented && isInteractive) {
|
|
830
729
|
if (e_5.key === "ArrowDown" || e_5.key === "ArrowUp") handleArrowKey(e_5);
|
|
831
730
|
else if ((e_5.key === "Home" || e_5.key === "End") && shouldShowPopover) handleEdgeKey(e_5);
|
|
832
|
-
else if (
|
|
731
|
+
else if (e_5.key === "Backspace" && !draft && uniqueValues.some((value_4) => !isTagLocked(value_4))) handleBackspaceKey(e_5);
|
|
833
732
|
else if (e_5.key === "Enter") handleEnterKey(e_5);
|
|
834
733
|
else if (delimiters.includes(e_5.key)) handleDelimiterKey(e_5);
|
|
835
734
|
else if (e_5.key === "Escape") handleEscapeKey(e_5);
|
|
@@ -894,7 +793,7 @@ function TagInput(props, ref) {
|
|
|
894
793
|
isDisabled
|
|
895
794
|
});
|
|
896
795
|
let t25;
|
|
897
|
-
if ($[
|
|
796
|
+
if ($[27] !== rootRef || $[28] !== settleDraft) {
|
|
898
797
|
t25 = (e_7) => {
|
|
899
798
|
const isTabbing = isTabbingRef.current;
|
|
900
799
|
const next_4 = e_7.relatedTarget;
|
|
@@ -903,33 +802,14 @@ function TagInput(props, ref) {
|
|
|
903
802
|
setIsPopoverOpen(false);
|
|
904
803
|
settleDraft();
|
|
905
804
|
};
|
|
906
|
-
$[
|
|
907
|
-
$[
|
|
908
|
-
$[
|
|
909
|
-
} else t25 = $[
|
|
805
|
+
$[27] = rootRef;
|
|
806
|
+
$[28] = settleDraft;
|
|
807
|
+
$[29] = t25;
|
|
808
|
+
} else t25 = $[29];
|
|
910
809
|
const handleInputBlur = useEvent(t25);
|
|
911
810
|
const handleInputFocus = useEvent(() => {
|
|
912
811
|
if (hasOptions && popoverTrigger === "focus" && isInteractive) setIsPopoverOpen(true);
|
|
913
812
|
});
|
|
914
|
-
const pressStartedInBoxRef = useRef(false);
|
|
915
|
-
let t26;
|
|
916
|
-
if ($[24] !== inputRef) {
|
|
917
|
-
t26 = (e_8) => {
|
|
918
|
-
const box = e_8.currentTarget;
|
|
919
|
-
const target = e_8.target;
|
|
920
|
-
const interactive = target.closest(INTERACTIVE_ELEMENTS);
|
|
921
|
-
pressStartedInBoxRef.current = box.contains(target) && (!interactive || interactive === inputRef.current || !box.contains(interactive));
|
|
922
|
-
};
|
|
923
|
-
$[24] = inputRef;
|
|
924
|
-
$[25] = t26;
|
|
925
|
-
} else t26 = $[25];
|
|
926
|
-
const handleBoxPointerDown = t26;
|
|
927
|
-
const handleBoxClick = () => {
|
|
928
|
-
const isBoxPress = pressStartedInBoxRef.current;
|
|
929
|
-
pressStartedInBoxRef.current = false;
|
|
930
|
-
if (!isBoxPress || popoverTrigger === "manual") return;
|
|
931
|
-
if (hasOptions && isInteractive && !shouldShowPopover && hasResults) setIsPopoverOpen(true);
|
|
932
|
-
};
|
|
933
813
|
const tags = uniqueValues.map((value_5) => {
|
|
934
814
|
const ownProps = tagProps?.(value_5);
|
|
935
815
|
const result = !(getOption(value_5) != null || knownLabels.has(value_5)) && validateTag ? validateTag(value_5) : true;
|
|
@@ -952,7 +832,7 @@ function TagInput(props, ref) {
|
|
|
952
832
|
id,
|
|
953
833
|
label,
|
|
954
834
|
value: draft,
|
|
955
|
-
placeholder
|
|
835
|
+
placeholder,
|
|
956
836
|
isDisabled,
|
|
957
837
|
isReadOnly,
|
|
958
838
|
isRequired,
|
|
@@ -976,12 +856,20 @@ function TagInput(props, ref) {
|
|
|
976
856
|
"data-input-type": "taginput",
|
|
977
857
|
"aria-describedby": describedBy.join(" ") || void 0
|
|
978
858
|
}, hasOptions ? getComboboxProps(listBoxId, shouldShowPopover, activeOptionKey) : void 0);
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
859
|
+
let t26;
|
|
860
|
+
if ($[30] !== hasResults || $[31] !== inputRef || $[32] !== shouldShowPopover) {
|
|
861
|
+
t26 = () => {
|
|
862
|
+
const willOpen = !shouldShowPopover;
|
|
863
|
+
if (willOpen && !hasResults) setIsFilterActive(false);
|
|
864
|
+
setIsPopoverOpen(willOpen);
|
|
865
|
+
inputRef.current?.focus();
|
|
866
|
+
};
|
|
867
|
+
$[30] = hasResults;
|
|
868
|
+
$[31] = inputRef;
|
|
869
|
+
$[32] = shouldShowPopover;
|
|
870
|
+
$[33] = t26;
|
|
871
|
+
} else t26 = $[33];
|
|
872
|
+
const handleTriggerPress = useEvent(t26);
|
|
985
873
|
const trigger = hasOptions && !hideTrigger ? /* @__PURE__ */ jsx(TagInputTrigger, {
|
|
986
874
|
id: triggerId,
|
|
987
875
|
size,
|
|
@@ -989,108 +877,74 @@ function TagInput(props, ref) {
|
|
|
989
877
|
fieldLabelledby,
|
|
990
878
|
isOpen: shouldShowPopover,
|
|
991
879
|
isDisabled: !isInteractive,
|
|
992
|
-
isLoading,
|
|
993
880
|
styles: triggerStyles,
|
|
994
881
|
onPress: handleTriggerPress
|
|
995
882
|
}) : null;
|
|
996
|
-
const
|
|
883
|
+
const clearText = useEvent(() => {
|
|
997
884
|
inputRef.current?.focus();
|
|
998
885
|
setDraft("");
|
|
999
|
-
setIsPopoverOpen(false);
|
|
1000
|
-
removeValues(uniqueValues);
|
|
1001
886
|
setTagError(null);
|
|
887
|
+
setIsPopoverOpen(false);
|
|
1002
888
|
onClear?.();
|
|
1003
889
|
});
|
|
1004
|
-
const clearButton = !!isClearable && isInteractive &&
|
|
890
|
+
const clearButton = !!isClearable && isInteractive && draft !== "" ? /* @__PURE__ */ jsx(TagInputClearButton, {
|
|
1005
891
|
id: clearId,
|
|
1006
892
|
size,
|
|
1007
893
|
ariaLabel,
|
|
1008
894
|
fieldLabelledby,
|
|
1009
|
-
onPress:
|
|
895
|
+
onPress: clearText
|
|
1010
896
|
}) : null;
|
|
1011
897
|
const hasActions = clearButton != null || trigger != null;
|
|
1012
|
-
useSuffixSpace(wrapperRef, tagPlacement === "inside");
|
|
1013
|
-
const partStyles = getPlacementStyles(tagPlacement, {
|
|
1014
|
-
wrapper: wrapperStyles,
|
|
1015
|
-
input: inputStyles,
|
|
1016
|
-
tagList: tagListStyles,
|
|
1017
|
-
tag: tagStyles
|
|
1018
|
-
});
|
|
1019
|
-
const placed = placeTagList(tagPlacement, prefix, tags.length ? /* @__PURE__ */ jsx(TagList, {
|
|
1020
|
-
id: tagListId,
|
|
1021
|
-
listRef: tagListRef,
|
|
1022
|
-
inputRef,
|
|
1023
|
-
"aria-label": ariaLabel ? t("tagInput.selectedValuesFor", "Selected values, {{label}}", { label: ariaLabel }) : t("tagInput.selectedValues", "Selected values"),
|
|
1024
|
-
"aria-labelledby": fieldLabelledby,
|
|
1025
|
-
tags,
|
|
1026
|
-
size: TAG_SIZES[size] ?? "xsmall",
|
|
1027
|
-
isDisabled,
|
|
1028
|
-
isReadOnly,
|
|
1029
|
-
isInline: tagPlacement === "inside",
|
|
1030
|
-
styles: partStyles.tagList,
|
|
1031
|
-
tagStyles: partStyles.tag,
|
|
1032
|
-
onRemove: removeValues
|
|
1033
|
-
}) : null);
|
|
1034
898
|
let t27;
|
|
1035
|
-
if ($[
|
|
1036
|
-
t27 = {
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
$[
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
t28 = hasActions ? /* @__PURE__ */ jsxs(Fragment$1, { children: [clearButton, trigger] }) : null;
|
|
1047
|
-
$[29] = clearButton;
|
|
1048
|
-
$[30] = hasActions;
|
|
1049
|
-
$[31] = trigger;
|
|
1050
|
-
$[32] = t28;
|
|
1051
|
-
} else t28 = $[32];
|
|
1052
|
-
const t29 = tags.length ? t("tagInput.summary", "Selected: {{values}}.", { values: formatList(tags.map(_temp1)) }) : null;
|
|
1053
|
-
let t30;
|
|
1054
|
-
if ($[33] !== summaryId || $[34] !== t29) {
|
|
1055
|
-
t30 = /* @__PURE__ */ jsx("span", {
|
|
899
|
+
if ($[34] !== clearButton || $[35] !== hasActions || $[36] !== trigger) {
|
|
900
|
+
t27 = hasActions ? /* @__PURE__ */ jsxs(Fragment$1, { children: [clearButton, trigger] }) : null;
|
|
901
|
+
$[34] = clearButton;
|
|
902
|
+
$[35] = hasActions;
|
|
903
|
+
$[36] = trigger;
|
|
904
|
+
$[37] = t27;
|
|
905
|
+
} else t27 = $[37];
|
|
906
|
+
const t28 = tags.length ? t("tagInput.summary", "Selected: {{values}}.", { values: formatList(tags.map(_temp1)) }) : null;
|
|
907
|
+
let t29;
|
|
908
|
+
if ($[38] !== summaryId || $[39] !== t28) {
|
|
909
|
+
t29 = /* @__PURE__ */ jsx("span", {
|
|
1056
910
|
hidden: true,
|
|
1057
911
|
id: summaryId,
|
|
1058
|
-
children:
|
|
912
|
+
children: t28
|
|
1059
913
|
});
|
|
1060
|
-
$[
|
|
1061
|
-
$[
|
|
1062
|
-
$[
|
|
1063
|
-
} else
|
|
914
|
+
$[38] = summaryId;
|
|
915
|
+
$[39] = t28;
|
|
916
|
+
$[40] = t29;
|
|
917
|
+
} else t29 = $[40];
|
|
918
|
+
let t30;
|
|
919
|
+
if ($[41] !== hasBackspaceHint || $[42] !== t) {
|
|
920
|
+
t30 = hasBackspaceHint ? t("tagInput.backspaceHint", "Press Backspace to go to the selected values.") : null;
|
|
921
|
+
$[41] = hasBackspaceHint;
|
|
922
|
+
$[42] = t;
|
|
923
|
+
$[43] = t30;
|
|
924
|
+
} else t30 = $[43];
|
|
1064
925
|
let t31;
|
|
1065
|
-
if ($[
|
|
1066
|
-
t31 =
|
|
1067
|
-
$[36] = hasBackspaceHint;
|
|
1068
|
-
$[37] = t;
|
|
1069
|
-
$[38] = t31;
|
|
1070
|
-
} else t31 = $[38];
|
|
1071
|
-
let t32;
|
|
1072
|
-
if ($[39] !== hintId || $[40] !== t31) {
|
|
1073
|
-
t32 = /* @__PURE__ */ jsx("span", {
|
|
926
|
+
if ($[44] !== hintId || $[45] !== t30) {
|
|
927
|
+
t31 = /* @__PURE__ */ jsx("span", {
|
|
1074
928
|
hidden: true,
|
|
1075
929
|
id: hintId,
|
|
1076
|
-
children:
|
|
930
|
+
children: t30
|
|
1077
931
|
});
|
|
1078
|
-
$[
|
|
1079
|
-
$[
|
|
1080
|
-
$[
|
|
1081
|
-
} else
|
|
1082
|
-
let
|
|
1083
|
-
if ($[
|
|
1084
|
-
|
|
932
|
+
$[44] = hintId;
|
|
933
|
+
$[45] = t30;
|
|
934
|
+
$[46] = t31;
|
|
935
|
+
} else t31 = $[46];
|
|
936
|
+
let t32;
|
|
937
|
+
if ($[47] !== announcement.id || $[48] !== announcement.text) {
|
|
938
|
+
t32 = /* @__PURE__ */ jsx(VisuallyHidden, {
|
|
1085
939
|
role: "status",
|
|
1086
940
|
"aria-live": "polite",
|
|
1087
941
|
"aria-atomic": "true",
|
|
1088
942
|
children: /* @__PURE__ */ jsx("span", { children: announcement.text }, announcement.id)
|
|
1089
943
|
});
|
|
1090
|
-
$[
|
|
1091
|
-
$[
|
|
1092
|
-
$[
|
|
1093
|
-
} else
|
|
944
|
+
$[47] = announcement.id;
|
|
945
|
+
$[48] = announcement.text;
|
|
946
|
+
$[49] = t32;
|
|
947
|
+
} else t32 = $[49];
|
|
1094
948
|
const tagInputField = /* @__PURE__ */ jsxs(TagInputElement, {
|
|
1095
949
|
ref: rootRef,
|
|
1096
950
|
...pickBaseCustomizationProps(props),
|
|
@@ -1103,14 +957,13 @@ function TagInput(props, ref) {
|
|
|
1103
957
|
qa: qa || "TagInput",
|
|
1104
958
|
inputRef,
|
|
1105
959
|
wrapperRef,
|
|
1106
|
-
wrapperProps: t27,
|
|
1107
960
|
inputProps: tagInputProps,
|
|
1108
961
|
mods,
|
|
1109
962
|
icon,
|
|
1110
|
-
prefix
|
|
963
|
+
prefix,
|
|
1111
964
|
suffix,
|
|
1112
965
|
suffixPosition,
|
|
1113
|
-
actions:
|
|
966
|
+
actions: t27,
|
|
1114
967
|
size,
|
|
1115
968
|
autoFocus,
|
|
1116
969
|
isDisabled,
|
|
@@ -1118,13 +971,26 @@ function TagInput(props, ref) {
|
|
|
1118
971
|
isLoading,
|
|
1119
972
|
isInvalid: effectiveIsInvalid,
|
|
1120
973
|
isValid,
|
|
1121
|
-
styles:
|
|
1122
|
-
inputStyles
|
|
974
|
+
styles: wrapperStyles,
|
|
975
|
+
inputStyles
|
|
1123
976
|
}),
|
|
1124
|
-
|
|
1125
|
-
|
|
977
|
+
tags.length ? /* @__PURE__ */ jsx(TagList, {
|
|
978
|
+
id: tagListId,
|
|
979
|
+
listRef: tagListRef,
|
|
980
|
+
inputRef,
|
|
981
|
+
"aria-label": ariaLabel ? t("tagInput.selectedValuesFor", "Selected values, {{label}}", { label: ariaLabel }) : t("tagInput.selectedValues", "Selected values"),
|
|
982
|
+
"aria-labelledby": fieldLabelledby,
|
|
983
|
+
tags,
|
|
984
|
+
size: TAG_SIZES[size] ?? "xsmall",
|
|
985
|
+
isDisabled,
|
|
986
|
+
isReadOnly,
|
|
987
|
+
styles: tagListStyles,
|
|
988
|
+
tagStyles,
|
|
989
|
+
onRemove: removeValues
|
|
990
|
+
}) : null,
|
|
991
|
+
t29,
|
|
992
|
+
t31,
|
|
1126
993
|
t32,
|
|
1127
|
-
t33,
|
|
1128
994
|
hasOptions ? /* @__PURE__ */ jsx(ListBoxPopover, {
|
|
1129
995
|
isOpen: shouldShowPopover,
|
|
1130
996
|
triggerRef: wrapperRef,
|
|
@@ -1140,7 +1006,6 @@ function TagInput(props, ref) {
|
|
|
1140
1006
|
listBoxStyles,
|
|
1141
1007
|
optionStyles,
|
|
1142
1008
|
optionHighlight: isFilterActive ? term : void 0,
|
|
1143
|
-
emptyLabel: resolveEmptyLabel(emptyLabel, isLoading, t),
|
|
1144
1009
|
sectionStyles,
|
|
1145
1010
|
headingStyles,
|
|
1146
1011
|
listGap,
|