@cube-dev/ui-kit 0.182.0 → 0.184.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/dist/CHANGELOG.md +40 -0
- package/dist/_internal/hooks/use-debounced-value.js +48 -31
- package/dist/_internal/hooks/use-debounced-value.js.map +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +22 -7
- package/dist/_internal/hooks/use-deprecation-warning.js.map +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-event.js.map +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js.map +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +12 -4
- package/dist/_internal/hooks/use-sync-ref.js.map +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js.map +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +90 -20
- package/dist/_internal/hooks/use-timer/use-timer.js.map +1 -1
- package/dist/_internal/hooks/use-warn.js +4 -4
- package/dist/_internal/hooks/use-warn.js.map +1 -1
- package/dist/components/Block.js +29 -7
- package/dist/components/Block.js.map +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/CollectionItem.js.map +1 -1
- package/dist/components/GlobalStyles.js +33 -9
- package/dist/components/GlobalStyles.js.map +1 -1
- package/dist/components/GridProvider.js +4 -4
- package/dist/components/GridProvider.js.map +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/HiddenInput.js.map +1 -1
- package/dist/components/Root.js +137 -42
- package/dist/components/Root.js.map +1 -1
- package/dist/components/actions/Action/Action.js +20 -8
- package/dist/components/actions/Action/Action.js.map +1 -1
- package/dist/components/actions/Banner/Banner.js +91 -22
- package/dist/components/actions/Banner/Banner.js.map +1 -1
- package/dist/components/actions/Button/Button.js +5 -5
- package/dist/components/actions/Button/Button.js.map +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +15 -5
- package/dist/components/actions/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +2 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js.map +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/ButtonSplit/context.js.map +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.js +73 -80
- package/dist/components/actions/CommandMenu/CommandMenu.js.map +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js.map +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +205 -68
- package/dist/components/actions/ItemAction/ItemAction.js.map +1 -1
- package/dist/components/actions/ItemActionContext.js +26 -7
- package/dist/components/actions/ItemActionContext.js.map +1 -1
- package/dist/components/actions/ItemActionsWrapper.js +215 -84
- package/dist/components/actions/ItemActionsWrapper.js.map +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +2 -2
- package/dist/components/actions/ItemButton/ItemButton.js.map +1 -1
- package/dist/components/actions/Link/Link.js +16 -7
- package/dist/components/actions/Link/Link.js.map +1 -1
- package/dist/components/actions/Menu/Menu.js +127 -72
- package/dist/components/actions/Menu/Menu.js.map +1 -1
- package/dist/components/actions/Menu/MenuItem.js +120 -43
- package/dist/components/actions/Menu/MenuItem.js.map +1 -1
- package/dist/components/actions/Menu/MenuSection.js +79 -31
- package/dist/components/actions/Menu/MenuSection.js.map +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +316 -112
- package/dist/components/actions/Menu/MenuTrigger.js.map +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +6 -12
- package/dist/components/actions/Menu/SubMenuTrigger.js.map +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js.map +1 -1
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/context.js.map +1 -1
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/Menu/styled.js.map +1 -1
- package/dist/components/actions/actions-run.js +1 -1
- package/dist/components/actions/actions-run.js.map +1 -1
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/index.js.map +1 -1
- package/dist/components/actions/use-action.js +3 -3
- package/dist/components/actions/use-action.js.map +1 -1
- package/dist/components/actions/use-anchored-menu.js +6 -6
- package/dist/components/actions/use-anchored-menu.js.map +1 -1
- package/dist/components/actions/use-context-menu.js +12 -12
- package/dist/components/actions/use-context-menu.js.map +1 -1
- package/dist/components/content/ActiveZone/ActiveZone.js +84 -18
- package/dist/components/content/ActiveZone/ActiveZone.js.map +1 -1
- package/dist/components/content/Alert/Alert.js +18 -7
- package/dist/components/content/Alert/Alert.js.map +1 -1
- package/dist/components/content/Alert/use-alert.js +53 -15
- package/dist/components/content/Alert/use-alert.js.map +1 -1
- package/dist/components/content/Avatar/Avatar.js +51 -13
- package/dist/components/content/Avatar/Avatar.js.map +1 -1
- package/dist/components/content/Badge/Badge.js +43 -10
- package/dist/components/content/Badge/Badge.js.map +1 -1
- package/dist/components/content/Card/Card.js +29 -7
- package/dist/components/content/Card/Card.js.map +1 -1
- package/dist/components/content/Content.js +30 -7
- package/dist/components/content/Content.js.map +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +2 -2
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js.map +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +220 -60
- package/dist/components/content/CopySnippet/CopySnippet.js.map +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +453 -194
- package/dist/components/content/Disclosure/Disclosure.js.map +1 -1
- package/dist/components/content/Divider.js +52 -14
- package/dist/components/content/Divider.js.map +1 -1
- package/dist/components/content/Footer.js +29 -7
- package/dist/components/content/Footer.js.map +1 -1
- package/dist/components/content/Header.js +29 -7
- package/dist/components/content/Header.js.map +1 -1
- package/dist/components/content/HotKeys/HotKeys.js +55 -27
- package/dist/components/content/HotKeys/HotKeys.js.map +1 -1
- package/dist/components/content/InfoBadge/InfoBadge.js +8 -8
- package/dist/components/content/InfoBadge/InfoBadge.js.map +1 -1
- package/dist/components/content/InlineInput/InlineInput.js +429 -188
- package/dist/components/content/InlineInput/InlineInput.js.map +1 -1
- package/dist/components/content/Item/Item.d.ts +27 -2
- package/dist/components/content/Item/Item.js +418 -152
- package/dist/components/content/Item/Item.js.map +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +173 -59
- package/dist/components/content/ItemBadge/ItemBadge.js.map +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +34 -9
- package/dist/components/content/ItemCard/ItemCard.js.map +1 -1
- package/dist/components/content/Layout/GridLayout.js +38 -10
- package/dist/components/content/Layout/GridLayout.js.map +1 -1
- package/dist/components/content/Layout/Layout.js +30 -13
- package/dist/components/content/Layout/Layout.js.map +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +33 -8
- package/dist/components/content/Layout/LayoutBlock.js.map +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +48 -11
- package/dist/components/content/Layout/LayoutCenter.js.map +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js.map +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js.map +1 -1
- package/dist/components/content/Layout/LayoutContext.js +30 -21
- package/dist/components/content/Layout/LayoutContext.js.map +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +33 -8
- package/dist/components/content/Layout/LayoutFlex.js.map +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +53 -14
- package/dist/components/content/Layout/LayoutFooter.js.map +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +48 -11
- package/dist/components/content/Layout/LayoutGrid.js.map +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +216 -57
- package/dist/components/content/Layout/LayoutHeader.js.map +1 -1
- package/dist/components/content/Layout/LayoutPane.js +60 -14
- package/dist/components/content/Layout/LayoutPane.js.map +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +59 -17
- package/dist/components/content/Layout/LayoutPanel.js.map +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +89 -27
- package/dist/components/content/Layout/LayoutPanelHeader.js.map +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +33 -8
- package/dist/components/content/Layout/LayoutToolbar.js.map +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +206 -119
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js.map +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/index.js.map +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Layout/utils.js.map +1 -1
- package/dist/components/content/Paragraph.js +25 -9
- package/dist/components/content/Paragraph.js.map +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +52 -14
- package/dist/components/content/Placeholder/Placeholder.js.map +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js.map +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js.map +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +52 -17
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js.map +1 -1
- package/dist/components/content/Result/Result.js +117 -38
- package/dist/components/content/Result/Result.js.map +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +26 -17
- package/dist/components/content/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/content/Tag/Tag.d.ts +6 -1
- package/dist/components/content/Tag/Tag.js +68 -13
- package/dist/components/content/Tag/Tag.js.map +1 -1
- package/dist/components/content/Text.js +61 -14
- package/dist/components/content/Text.js.map +1 -1
- package/dist/components/content/TextItem/TextItem.js +37 -16
- package/dist/components/content/TextItem/TextItem.js.map +1 -1
- package/dist/components/content/Title.js +98 -23
- package/dist/components/content/Title.js.map +1 -1
- package/dist/components/content/Tree/Tree.js +32 -32
- package/dist/components/content/Tree/Tree.js.map +1 -1
- package/dist/components/content/Tree/TreeNode.js +10 -10
- package/dist/components/content/Tree/TreeNode.js.map +1 -1
- package/dist/components/content/Tree/styled.js +1 -1
- package/dist/components/content/Tree/styled.js.map +1 -1
- package/dist/components/content/Tree/tree-index.js +1 -1
- package/dist/components/content/Tree/tree-index.js.map +1 -1
- package/dist/components/content/Tree/use-checkbox-tree.js +123 -89
- package/dist/components/content/Tree/use-checkbox-tree.js.map +1 -1
- package/dist/components/content/Tree/use-load-data.js +52 -21
- package/dist/components/content/Tree/use-load-data.js.map +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/highlightText.js.map +1 -1
- package/dist/components/content/use-auto-tooltip.d.ts +1 -1
- package/dist/components/content/use-auto-tooltip.js +231 -125
- package/dist/components/content/use-auto-tooltip.js.map +1 -1
- package/dist/components/data/DataTable/DataTable.js +31 -31
- package/dist/components/data/DataTable/DataTable.js.map +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +41 -41
- package/dist/components/data/ItemTable/ItemTable.js.map +1 -1
- package/dist/components/data/ItemTable/ItemTableBulkBar.js +11 -11
- package/dist/components/data/ItemTable/ItemTableBulkBar.js.map +1 -1
- package/dist/components/data/ItemTable/ItemTableDragPreview.js +41 -4
- package/dist/components/data/ItemTable/ItemTableDragPreview.js.map +1 -1
- package/dist/components/data/ItemTable/ItemTableFooter.js +67 -30
- package/dist/components/data/ItemTable/ItemTableFooter.js.map +1 -1
- package/dist/components/data/ItemTable/ItemTableToolbar.js +95 -28
- package/dist/components/data/ItemTable/ItemTableToolbar.js.map +1 -1
- package/dist/components/data/TableBase/ColumnResizer.js +90 -41
- package/dist/components/data/TableBase/ColumnResizer.js.map +1 -1
- package/dist/components/data/TableBase/RowCollection.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js.map +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +154 -64
- package/dist/components/data/TableBase/TableHeaderCell.js.map +1 -1
- package/dist/components/data/TableBase/TableRow.js +211 -69
- package/dist/components/data/TableBase/TableRow.js.map +1 -1
- package/dist/components/data/TableBase/TableView.js +119 -80
- package/dist/components/data/TableBase/TableView.js.map +1 -1
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-menu.js.map +1 -1
- package/dist/components/data/TableBase/column-tint.js +1 -1
- package/dist/components/data/TableBase/column-tint.js.map +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/row-menu.js.map +1 -1
- package/dist/components/data/TableBase/styled.d.ts +1 -0
- package/dist/components/data/TableBase/styled.js +1 -1
- package/dist/components/data/TableBase/styled.js.map +1 -1
- package/dist/components/data/TableBase/table-tree.js +1 -1
- package/dist/components/data/TableBase/table-tree.js.map +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/types.js.map +1 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- package/dist/components/data/TableBase/use-cell-selection.js.map +1 -1
- package/dist/components/data/TableBase/use-column-order.js +56 -12
- package/dist/components/data/TableBase/use-column-order.js.map +1 -1
- package/dist/components/data/TableBase/use-container-width.js +24 -10
- package/dist/components/data/TableBase/use-container-width.js.map +1 -1
- package/dist/components/data/TableBase/use-row-move-animation.js +68 -49
- package/dist/components/data/TableBase/use-row-move-animation.js.map +1 -1
- package/dist/components/data/TableBase/use-scrollability.js +32 -18
- package/dist/components/data/TableBase/use-scrollability.js.map +1 -1
- package/dist/components/data/TableBase/use-table-columns.js +130 -60
- package/dist/components/data/TableBase/use-table-columns.js.map +1 -1
- package/dist/components/data/TableBase/use-table-search.js +1 -1
- package/dist/components/data/TableBase/use-table-search.js.map +1 -1
- package/dist/components/data/TableBase/use-table-selection.js +39 -39
- package/dist/components/data/TableBase/use-table-selection.js.map +1 -1
- package/dist/components/data/TableBase/use-table-sort.js +132 -68
- package/dist/components/data/TableBase/use-table-sort.js.map +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +168 -101
- package/dist/components/data/TableBase/use-table-sorts.js.map +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +2 -2
- package/dist/components/data/TableBase/use-table-storage.js.map +1 -1
- package/dist/components/data/TableBase/use-table-tree-state.js +181 -86
- package/dist/components/data/TableBase/use-table-tree-state.js.map +1 -1
- package/dist/components/fields/Checkbox/Checkbox.d.ts +8 -0
- package/dist/components/fields/Checkbox/Checkbox.js +58 -39
- package/dist/components/fields/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.js +101 -33
- package/dist/components/fields/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/Checkbox/context.js.map +1 -1
- package/dist/components/fields/ColorInput/ColorInput.d.ts +17 -1
- package/dist/components/fields/ColorInput/ColorInput.js +334 -152
- package/dist/components/fields/ColorInput/ColorInput.js.map +1 -1
- package/dist/components/fields/ColorPicker/ColorPicker.d.ts +18 -2
- package/dist/components/fields/ColorPicker/ColorPicker.js +18 -17
- package/dist/components/fields/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/components/fields/ColorSwatch/ColorSwatch.js +52 -13
- package/dist/components/fields/ColorSwatch/ColorSwatch.js.map +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +90 -28
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js.map +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +216 -134
- package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js.map +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js.map +1 -1
- package/dist/components/fields/CommandTextArea/useCaretAnchor.js +88 -49
- package/dist/components/fields/CommandTextArea/useCaretAnchor.js.map +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +1 -1
- package/dist/components/fields/DatePicker/DateInput.js.map +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +129 -34
- package/dist/components/fields/DatePicker/DateInputBase.js.map +1 -1
- package/dist/components/fields/DatePicker/DatePicker.d.ts +17 -1
- package/dist/components/fields/DatePicker/DatePicker.js +200 -71
- package/dist/components/fields/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +39 -8
- package/dist/components/fields/DatePicker/DatePickerButton.js.map +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js.map +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js.map +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +109 -29
- package/dist/components/fields/DatePicker/DatePickerSegment.js.map +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.d.ts +17 -2
- package/dist/components/fields/DatePicker/DateRangePicker.js +230 -90
- package/dist/components/fields/DatePicker/DateRangePicker.js.map +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.d.ts +17 -2
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +481 -180
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js.map +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.js +15 -6
- package/dist/components/fields/DatePicker/MonthPicker.js.map +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.d.ts +17 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +294 -93
- package/dist/components/fields/DatePicker/PeriodPicker.js.map +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +15 -6
- package/dist/components/fields/DatePicker/QuarterPicker.js.map +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +15 -7
- package/dist/components/fields/DatePicker/TimeInput.js.map +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +15 -6
- package/dist/components/fields/DatePicker/WeekPicker.js.map +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +15 -6
- package/dist/components/fields/DatePicker/YearPicker.js.map +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js.map +1 -1
- package/dist/components/fields/DatePicker/period.js +1 -1
- package/dist/components/fields/DatePicker/period.js.map +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/props.js.map +1 -1
- package/dist/components/fields/DatePicker/utils.js +15 -8
- package/dist/components/fields/DatePicker/utils.js.map +1 -1
- package/dist/components/fields/FileInput/FileInput.js +3 -3
- package/dist/components/fields/FileInput/FileInput.js.map +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +87 -87
- package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.d.ts +11 -2
- package/dist/components/fields/FilterPicker/FilterPicker.js +24 -23
- package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/Input/Input.js.map +1 -1
- package/dist/components/fields/ListBox/DraggableListBox.js +23 -10
- package/dist/components/fields/ListBox/DraggableListBox.js.map +1 -1
- package/dist/components/fields/ListBox/ListBox.js +138 -53
- package/dist/components/fields/ListBox/ListBox.js.map +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +156 -37
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js.map +1 -1
- package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
- package/dist/components/fields/ListBoxPopover/listNavigation.js.map +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +61 -33
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.js.map +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +123 -33
- package/dist/components/fields/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +53 -15
- package/dist/components/fields/NumberInput/StepButton.js.map +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +149 -45
- package/dist/components/fields/PasswordInput/PasswordInput.js.map +1 -1
- package/dist/components/fields/Picker/Picker.d.ts +20 -3
- package/dist/components/fields/Picker/Picker.js +11 -10
- package/dist/components/fields/Picker/Picker.js.map +1 -1
- package/dist/components/fields/RadioGroup/Radio.d.ts +10 -2
- package/dist/components/fields/RadioGroup/Radio.js +275 -104
- package/dist/components/fields/RadioGroup/Radio.js.map +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +149 -48
- package/dist/components/fields/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/RadioGroup/context.js.map +1 -1
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +80 -65
- package/dist/components/fields/SearchComboBox/SearchComboBox.js.map +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +91 -28
- package/dist/components/fields/SearchInput/SearchInput.js.map +1 -1
- package/dist/components/fields/Select/Select.d.ts +24 -3
- package/dist/components/fields/Select/Select.js +376 -121
- package/dist/components/fields/Select/Select.js.map +1 -1
- package/dist/components/fields/Slider/Gradation.js +45 -10
- package/dist/components/fields/Slider/Gradation.js.map +1 -1
- package/dist/components/fields/Slider/HueSlider.js +121 -32
- package/dist/components/fields/Slider/HueSlider.js.map +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +46 -10
- package/dist/components/fields/Slider/RangeSlider.js.map +1 -1
- package/dist/components/fields/Slider/Slider.js +108 -23
- package/dist/components/fields/Slider/Slider.js.map +1 -1
- package/dist/components/fields/Slider/SliderBase.js +2 -2
- package/dist/components/fields/Slider/SliderBase.js.map +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +96 -37
- package/dist/components/fields/Slider/SliderThumb.js.map +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +64 -23
- package/dist/components/fields/Slider/SliderTrack.js.map +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/elements.js.map +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +190 -66
- package/dist/components/fields/Switch/Switch.js.map +1 -1
- package/dist/components/fields/TextArea/TextArea.js +137 -47
- package/dist/components/fields/TextArea/TextArea.js.map +1 -1
- package/dist/components/fields/TextInput/TextInput.js +80 -27
- package/dist/components/fields/TextInput/TextInput.js.map +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js +2 -2
- package/dist/components/fields/TextInput/TextInputBase.js.map +1 -1
- package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
- package/dist/components/fields/TextInput/useAutoSizeTextArea.js.map +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +156 -83
- package/dist/components/fields/TextInputMapper/TextInputMapper.js.map +1 -1
- package/dist/components/fields/TriggerActions.js +11 -2
- package/dist/components/fields/TriggerActions.js.map +1 -1
- package/dist/components/fields/color/ColorPanel.js +237 -59
- package/dist/components/fields/color/ColorPanel.js.map +1 -1
- package/dist/components/fields/color/channels.js +1 -1
- package/dist/components/fields/color/channels.js.map +1 -1
- package/dist/components/fields/color/color.js +1 -1
- package/dist/components/fields/color/color.js.map +1 -1
- package/dist/components/fields/color/context.js +1 -1
- package/dist/components/fields/color/context.js.map +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.d.ts +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +197 -72
- package/dist/components/form/FieldWrapper/FieldWrapper.js.map +1 -1
- package/dist/components/form/FieldWrapper/types.d.ts +1 -1
- package/dist/components/form/Form/Field.js +28 -12
- package/dist/components/form/Form/Field.js.map +1 -1
- package/dist/components/form/Form/Form.js +95 -34
- package/dist/components/form/Form/Form.js.map +1 -1
- package/dist/components/form/Form/ModernFormRoot.js +294 -81
- package/dist/components/form/Form/ModernFormRoot.js.map +1 -1
- package/dist/components/form/Form/ResetButton/ResetButton.js +32 -10
- package/dist/components/form/Form/ResetButton/ResetButton.js.map +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.js +32 -10
- package/dist/components/form/Form/SubmitButton/SubmitButton.js.map +1 -1
- package/dist/components/form/Form/SubmitError.js +130 -32
- package/dist/components/form/Form/SubmitError.js.map +1 -1
- package/dist/components/form/Form/backend.js +1 -1
- package/dist/components/form/Form/backend.js.map +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/index.js.map +1 -1
- package/dist/components/form/Form/modern/actions.js +140 -45
- package/dist/components/form/Form/modern/actions.js.map +1 -1
- package/dist/components/form/Form/modern/context.js +1 -1
- package/dist/components/form/Form/modern/context.js.map +1 -1
- package/dist/components/form/Form/modern/controller.js +1 -1
- package/dist/components/form/Form/modern/controller.js.map +1 -1
- package/dist/components/form/Form/modern/field-binding.js +1 -1
- package/dist/components/form/Form/modern/field-binding.js.map +1 -1
- package/dist/components/form/Form/modern/field.js +1 -1
- package/dist/components/form/Form/modern/field.js.map +1 -1
- package/dist/components/form/Form/modern/react.js +102 -19
- package/dist/components/form/Form/modern/react.js.map +1 -1
- package/dist/components/form/Form/modern/store.js +13 -3
- package/dist/components/form/Form/modern/store.js.map +1 -1
- package/dist/components/form/Form/modern/types.d.ts +3 -1
- package/dist/components/form/Form/modern/validation.js +1 -1
- package/dist/components/form/Form/modern/validation.js.map +1 -1
- package/dist/components/form/Form/modern/values.js +1 -1
- package/dist/components/form/Form/modern/values.js.map +1 -1
- package/dist/components/form/Form/use-field/use-field-binding.js +236 -63
- package/dist/components/form/Form/use-field/use-field-binding.js.map +1 -1
- package/dist/components/form/Form/use-field/use-field-props.js +106 -61
- package/dist/components/form/Form/use-field/use-field-props.js.map +1 -1
- package/dist/components/form/Form/use-field/use-field.js +5 -4
- package/dist/components/form/Form/use-field/use-field.js.map +1 -1
- package/dist/components/form/Form/use-form.js +2 -1
- package/dist/components/form/Form/use-form.js.map +1 -1
- package/dist/components/form/Form/validation.js +1 -1
- package/dist/components/form/Form/validation.js.map +1 -1
- package/dist/components/form/Label.js +127 -37
- package/dist/components/form/Label.js.map +1 -1
- package/dist/components/form/legacy-tooltip.js +28 -0
- package/dist/components/form/legacy-tooltip.js.map +1 -0
- package/dist/components/form/validation/ValidationIndicator.js +20 -5
- package/dist/components/form/validation/ValidationIndicator.js.map +1 -1
- package/dist/components/form/validation/resolve-validation-props.js +1 -1
- package/dist/components/form/validation/resolve-validation-props.js.map +1 -1
- package/dist/components/form/validation/use-validation-props.js +36 -10
- package/dist/components/form/validation/use-validation-props.js.map +1 -1
- package/dist/components/form/wrapper.js +5 -3
- package/dist/components/form/wrapper.js.map +1 -1
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js +49 -29
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js.map +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +8 -8
- package/dist/components/helpers/IconSwitch/IconSwitch.js.map +1 -1
- package/dist/components/layout/Board/Board.js +27 -9
- package/dist/components/layout/Board/Board.js.map +1 -1
- package/dist/components/layout/Board/BoardProvider.js +1 -1
- package/dist/components/layout/Board/BoardProvider.js.map +1 -1
- package/dist/components/layout/Board/BoardResponsive.js +1 -1
- package/dist/components/layout/Board/BoardResponsive.js.map +1 -1
- package/dist/components/layout/Board/Widget.js +1 -1
- package/dist/components/layout/Board/Widget.js.map +1 -1
- package/dist/components/layout/Board/WidgetHost.js +159 -121
- package/dist/components/layout/Board/WidgetHost.js.map +1 -1
- package/dist/components/layout/Board/board-context.js +14 -5
- package/dist/components/layout/Board/board-context.js.map +1 -1
- package/dist/components/layout/Board/board-store.js +1 -1
- package/dist/components/layout/Board/board-store.js.map +1 -1
- package/dist/components/layout/Board/grid-core/calculate.js +1 -1
- package/dist/components/layout/Board/grid-core/calculate.js.map +1 -1
- package/dist/components/layout/Board/grid-core/collision-modes.js +1 -1
- package/dist/components/layout/Board/grid-core/collision-modes.js.map +1 -1
- package/dist/components/layout/Board/grid-core/collision.js +1 -1
- package/dist/components/layout/Board/grid-core/collision.js.map +1 -1
- package/dist/components/layout/Board/grid-core/compactors.js +1 -1
- package/dist/components/layout/Board/grid-core/compactors.js.map +1 -1
- package/dist/components/layout/Board/grid-core/constraints.js +1 -1
- package/dist/components/layout/Board/grid-core/constraints.js.map +1 -1
- package/dist/components/layout/Board/grid-core/group-move.js +1 -1
- package/dist/components/layout/Board/grid-core/group-move.js.map +1 -1
- package/dist/components/layout/Board/grid-core/layout.js +1 -1
- package/dist/components/layout/Board/grid-core/layout.js.map +1 -1
- package/dist/components/layout/Board/grid-core/placement.js +1 -1
- package/dist/components/layout/Board/grid-core/placement.js.map +1 -1
- package/dist/components/layout/Board/grid-core/sort.js +1 -1
- package/dist/components/layout/Board/grid-core/sort.js.map +1 -1
- package/dist/components/layout/Board/index.js +1 -1
- package/dist/components/layout/Board/index.js.map +1 -1
- package/dist/components/layout/Board/responsive-utils.js +1 -1
- package/dist/components/layout/Board/responsive-utils.js.map +1 -1
- package/dist/components/layout/Board/use-board-layout.js +8 -8
- package/dist/components/layout/Board/use-board-layout.js.map +1 -1
- package/dist/components/layout/Board/use-board-registry.js +257 -257
- package/dist/components/layout/Board/use-board-registry.js.map +1 -1
- package/dist/components/layout/Board/use-board-select-modifier-key.js +1 -1
- package/dist/components/layout/Board/use-board-select-modifier-key.js.map +1 -1
- package/dist/components/layout/Board/use-board-selection.js +16 -16
- package/dist/components/layout/Board/use-board-selection.js.map +1 -1
- package/dist/components/layout/Flex.js +29 -7
- package/dist/components/layout/Flex.js.map +1 -1
- package/dist/components/layout/Flow.js +29 -7
- package/dist/components/layout/Flow.js.map +1 -1
- package/dist/components/layout/Grid.js +30 -7
- package/dist/components/layout/Grid.js.map +1 -1
- package/dist/components/layout/Panel.js +9 -9
- package/dist/components/layout/Panel.js.map +1 -1
- package/dist/components/layout/Prefix.js +59 -16
- package/dist/components/layout/Prefix.js.map +1 -1
- package/dist/components/layout/ResizablePanel.js +62 -32
- package/dist/components/layout/ResizablePanel.js.map +1 -1
- package/dist/components/layout/Space.js +55 -11
- package/dist/components/layout/Space.js.map +1 -1
- package/dist/components/layout/Suffix.js +59 -16
- package/dist/components/layout/Suffix.js.map +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +394 -164
- package/dist/components/navigation/Pagination/Pagination.js.map +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js +69 -26
- package/dist/components/navigation/Pagination/use-pagination.js.map +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +25 -10
- package/dist/components/navigation/Tabs/DraggableTabList.js.map +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +625 -235
- package/dist/components/navigation/Tabs/TabButton.js.map +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +65 -23
- package/dist/components/navigation/Tabs/TabDropIndicator.js.map +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +47 -19
- package/dist/components/navigation/Tabs/TabPanel.js.map +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +106 -33
- package/dist/components/navigation/Tabs/TabPicker.js.map +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +45 -45
- package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +53 -19
- package/dist/components/navigation/Tabs/TabsAction.js.map +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +16 -6
- package/dist/components/navigation/Tabs/TabsContext.js.map +1 -1
- package/dist/components/navigation/Tabs/popover-placement.js +1 -1
- package/dist/components/navigation/Tabs/popover-placement.js.map +1 -1
- package/dist/components/navigation/Tabs/styled.js +2 -2
- package/dist/components/navigation/Tabs/styled.js.map +1 -1
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/types.js.map +1 -1
- package/dist/components/navigation/Tabs/use-tab-editing.js +50 -13
- package/dist/components/navigation/Tabs/use-tab-editing.js.map +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +111 -63
- package/dist/components/navigation/Tabs/use-tab-indicator.js.map +1 -1
- package/dist/components/organisms/StatsCard/StatsCard.js +54 -14
- package/dist/components/organisms/StatsCard/StatsCard.js.map +1 -1
- package/dist/components/other/Calendar/Calendar.js +79 -31
- package/dist/components/other/Calendar/Calendar.js.map +1 -1
- package/dist/components/other/Calendar/CalendarCell.js +66 -20
- package/dist/components/other/Calendar/CalendarCell.js.map +1 -1
- package/dist/components/other/Calendar/CalendarGrid.js +90 -40
- package/dist/components/other/Calendar/CalendarGrid.js.map +1 -1
- package/dist/components/other/Calendar/CalendarHeader.js +80 -17
- package/dist/components/other/Calendar/CalendarHeader.js.map +1 -1
- package/dist/components/other/Calendar/CalendarPanel.js +568 -144
- package/dist/components/other/Calendar/CalendarPanel.js.map +1 -1
- package/dist/components/other/Calendar/PeriodCalendar.js +425 -134
- package/dist/components/other/Calendar/PeriodCalendar.js.map +1 -1
- package/dist/components/other/Calendar/PeriodGrid.js +6 -6
- package/dist/components/other/Calendar/PeriodGrid.js.map +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +50 -24
- package/dist/components/other/Calendar/RangeCalendar.js.map +1 -1
- package/dist/components/other/Calendar/styled.js +1 -1
- package/dist/components/other/Calendar/styled.js.map +1 -1
- package/dist/components/other/CubeLogo/CubeLogo.js +95 -34
- package/dist/components/other/CubeLogo/CubeLogo.js.map +1 -1
- package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
- package/dist/components/other/NoDataIcon/NoDataIcon.js.map +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialog.js +153 -42
- package/dist/components/overlays/AlertDialog/AlertDialog.js.map +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +76 -54
- package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js.map +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogZone.js +146 -39
- package/dist/components/overlays/AlertDialog/AlertDialogZone.js.map +1 -1
- package/dist/components/overlays/Dialog/Dialog.js +43 -18
- package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +13 -13
- package/dist/components/overlays/Dialog/DialogContainer.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogForm.d.ts +12 -7
- package/dist/components/overlays/Dialog/DialogForm.js +22 -10
- package/dist/components/overlays/Dialog/DialogForm.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.d.ts +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +214 -59
- package/dist/components/overlays/Dialog/DialogTrigger.js.map +1 -1
- package/dist/components/overlays/Dialog/ModernDialogForm.js +357 -0
- package/dist/components/overlays/Dialog/ModernDialogForm.js.map +1 -0
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/context.js.map +1 -1
- package/dist/components/overlays/Dialog/index.d.ts +1 -1
- package/dist/components/overlays/Dialog/use-content-overflow.js +68 -0
- package/dist/components/overlays/Dialog/use-content-overflow.js.map +1 -0
- package/dist/components/overlays/Dialog/use-dialog-container.js +6 -6
- package/dist/components/overlays/Dialog/use-dialog-container.js.map +1 -1
- package/dist/components/overlays/Modal/Modal.js +140 -27
- package/dist/components/overlays/Modal/Modal.js.map +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js.map +1 -1
- package/dist/components/overlays/Modal/Overlay.js +4 -4
- package/dist/components/overlays/Modal/Overlay.js.map +1 -1
- package/dist/components/overlays/Modal/Popover.js +131 -29
- package/dist/components/overlays/Modal/Popover.js.map +1 -1
- package/dist/components/overlays/Modal/Tray.js +142 -30
- package/dist/components/overlays/Modal/Tray.js.map +1 -1
- package/dist/components/overlays/Modal/Underlay.js +36 -7
- package/dist/components/overlays/Modal/Underlay.js.map +1 -1
- package/dist/components/overlays/Notifications/Notification.js +69 -32
- package/dist/components/overlays/Notifications/Notification.js.map +1 -1
- package/dist/components/overlays/Notifications/NotificationAction.js +79 -26
- package/dist/components/overlays/Notifications/NotificationAction.js.map +1 -1
- package/dist/components/overlays/Notifications/NotificationCard.js +138 -33
- package/dist/components/overlays/Notifications/NotificationCard.js.map +1 -1
- package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
- package/dist/components/overlays/Notifications/NotificationContext.js.map +1 -1
- package/dist/components/overlays/Notifications/NotificationItem.js +63 -16
- package/dist/components/overlays/Notifications/NotificationItem.js.map +1 -1
- package/dist/components/overlays/Notifications/OverlayContainer.js +312 -151
- package/dist/components/overlays/Notifications/OverlayContainer.js.map +1 -1
- package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
- package/dist/components/overlays/Notifications/OverlayProvider.js.map +1 -1
- package/dist/components/overlays/Notifications/PersistentNotificationsList.js +210 -58
- package/dist/components/overlays/Notifications/PersistentNotificationsList.js.map +1 -1
- package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
- package/dist/components/overlays/Notifications/dismissed-storage.js.map +1 -1
- package/dist/components/overlays/Notifications/format-relative-time.d.ts +1 -1
- package/dist/components/overlays/Notifications/format-relative-time.js +3 -3
- package/dist/components/overlays/Notifications/format-relative-time.js.map +1 -1
- package/dist/components/overlays/Notifications/index.js +1 -1
- package/dist/components/overlays/Notifications/index.js.map +1 -1
- package/dist/components/overlays/Notifications/use-notification-state.js +51 -51
- package/dist/components/overlays/Notifications/use-notification-state.js.map +1 -1
- package/dist/components/overlays/Notifications/use-notifications.js +12 -12
- package/dist/components/overlays/Notifications/use-notifications.js.map +1 -1
- package/dist/components/overlays/Notifications/use-overlay-timers.js +10 -10
- package/dist/components/overlays/Notifications/use-overlay-timers.js.map +1 -1
- package/dist/components/overlays/Notifications/use-persistent-notifications.js +24 -5
- package/dist/components/overlays/Notifications/use-persistent-notifications.js.map +1 -1
- package/dist/components/overlays/Notifications/use-persistent-state.js +145 -43
- package/dist/components/overlays/Notifications/use-persistent-state.js.map +1 -1
- package/dist/components/overlays/Notifications/use-toast-state.js +25 -25
- package/dist/components/overlays/Notifications/use-toast-state.js.map +1 -1
- package/dist/components/overlays/Toast/ToastItem.js +68 -15
- package/dist/components/overlays/Toast/ToastItem.js.map +1 -1
- package/dist/components/overlays/Toast/index.js +100 -34
- package/dist/components/overlays/Toast/index.js.map +1 -1
- package/dist/components/overlays/Toast/useProgressToast.js +1 -1
- package/dist/components/overlays/Toast/useProgressToast.js.map +1 -1
- package/dist/components/overlays/Toast/useToast.js +9 -9
- package/dist/components/overlays/Toast/useToast.js.map +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +88 -31
- package/dist/components/overlays/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/overlays/Tooltip/TooltipProvider.js +75 -10
- package/dist/components/overlays/Tooltip/TooltipProvider.js.map +1 -1
- package/dist/components/overlays/Tooltip/TooltipTrigger.js +189 -77
- package/dist/components/overlays/Tooltip/TooltipTrigger.js.map +1 -1
- package/dist/components/overlays/Tooltip/context.js +1 -1
- package/dist/components/overlays/Tooltip/context.js.map +1 -1
- package/dist/components/overlays/Tooltip/split-trigger-props.d.ts +16 -0
- package/dist/components/overlays/Tooltip/split-trigger-props.js +54 -0
- package/dist/components/overlays/Tooltip/split-trigger-props.js.map +1 -0
- package/dist/components/portal/Portal.js +18 -3
- package/dist/components/portal/Portal.js.map +1 -1
- package/dist/components/portal/PortalProvider.js +11 -2
- package/dist/components/portal/PortalProvider.js.map +1 -1
- package/dist/components/portal/usePortal.js +1 -1
- package/dist/components/portal/usePortal.js.map +1 -1
- package/dist/components/shared/DraggableCollection.js +23 -23
- package/dist/components/shared/DraggableCollection.js.map +1 -1
- package/dist/components/shared/InvalidIcon.js +1 -1
- package/dist/components/shared/InvalidIcon.js.map +1 -1
- package/dist/components/shared/ValidIcon.js +1 -1
- package/dist/components/shared/ValidIcon.js.map +1 -1
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js +156 -48
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js.map +1 -1
- package/dist/components/status/Spin/Cube.js +12 -3
- package/dist/components/status/Spin/Cube.js.map +1 -1
- package/dist/components/status/Spin/InternalSpinner.js +21 -6
- package/dist/components/status/Spin/InternalSpinner.js.map +1 -1
- package/dist/components/status/Spin/Spin.js +31 -7
- package/dist/components/status/Spin/Spin.js.map +1 -1
- package/dist/components/status/Spin/SpinsContainer.js +23 -6
- package/dist/components/status/Spin/SpinsContainer.js.map +1 -1
- package/dist/data/item-themes.d.ts +1 -1
- package/dist/data/item-themes.js +7 -1
- package/dist/data/item-themes.js.map +1 -1
- package/dist/data/themes.js +1 -1
- package/dist/data/themes.js.map +1 -1
- package/dist/eslint-plugin/defaults.generated.js +15 -5
- package/dist/eslint-plugin/defaults.generated.js.map +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/index.js.map +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js.map +1 -1
- package/dist/i18n/I18nProvider.js +54 -13
- package/dist/i18n/I18nProvider.js.map +1 -1
- package/dist/i18n/createFormatter.js +1 -1
- package/dist/i18n/createFormatter.js.map +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/instance.js.map +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +1 -1
- package/dist/i18n/locales/en-US/uikit.js +1 -1
- package/dist/i18n/locales/es-ES/uikit.js +1 -1
- package/dist/i18n/locales/es-MX/uikit.js +1 -1
- package/dist/i18n/locales/fr-FR/uikit.js +1 -1
- package/dist/i18n/locales/it-IT/uikit.js +1 -1
- package/dist/i18n/locales/ja-JP/uikit.js +1 -1
- package/dist/i18n/locales/nb-NO/uikit.js +1 -1
- package/dist/i18n/locales/pt-BR/uikit.js +1 -1
- package/dist/i18n/locales/pt-PT/uikit.js +1 -1
- package/dist/i18n/locales/sv-SE/uikit.js +1 -1
- package/dist/i18n/locales/vi-VN/uikit.js +1 -1
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/locales.js.map +1 -1
- package/dist/i18n/useFormatter.js +10 -3
- package/dist/i18n/useFormatter.js.map +1 -1
- package/dist/i18n/useI18n.js +1 -1
- package/dist/i18n/useI18n.js.map +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js.map +1 -1
- package/dist/icons/AdjustmentsIcon.js +1 -1
- package/dist/icons/AdjustmentsIcon.js.map +1 -1
- package/dist/icons/AiIcon.js +1 -1
- package/dist/icons/AiIcon.js.map +1 -1
- package/dist/icons/AreaChartIcon.js +1 -1
- package/dist/icons/AreaChartIcon.js.map +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js.map +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js.map +1 -1
- package/dist/icons/BackwardIcon.js +1 -1
- package/dist/icons/BackwardIcon.js.map +1 -1
- package/dist/icons/BarChartIcon.js +1 -1
- package/dist/icons/BarChartIcon.js.map +1 -1
- package/dist/icons/BellFilledIcon.js +1 -1
- package/dist/icons/BellFilledIcon.js.map +1 -1
- package/dist/icons/BellIcon.js +1 -1
- package/dist/icons/BellIcon.js.map +1 -1
- package/dist/icons/BooleanIcon.js +1 -1
- package/dist/icons/BooleanIcon.js.map +1 -1
- package/dist/icons/CalendarEditIcon.js +1 -1
- package/dist/icons/CalendarEditIcon.js.map +1 -1
- package/dist/icons/CalendarIcon.js +1 -1
- package/dist/icons/CalendarIcon.js.map +1 -1
- package/dist/icons/CaretDownIcon.js +1 -1
- package/dist/icons/CaretDownIcon.js.map +1 -1
- package/dist/icons/CaretUpIcon.js +1 -1
- package/dist/icons/CaretUpIcon.js.map +1 -1
- package/dist/icons/ChartAreaStackedIcon.js +1 -1
- package/dist/icons/ChartAreaStackedIcon.js.map +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js.map +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js.map +1 -1
- package/dist/icons/ChartBarGroupedIcon.js +1 -1
- package/dist/icons/ChartBarGroupedIcon.js.map +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js.map +1 -1
- package/dist/icons/ChartBarLineIcon.js +1 -1
- package/dist/icons/ChartBarLineIcon.js.map +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js.map +1 -1
- package/dist/icons/ChartBarStackedIcon.js +1 -1
- package/dist/icons/ChartBarStackedIcon.js.map +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js.map +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js.map +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js.map +1 -1
- package/dist/icons/ChartBoxPlotIcon.js +1 -1
- package/dist/icons/ChartBoxPlotIcon.js.map +1 -1
- package/dist/icons/ChartBubbleIcon.js +1 -1
- package/dist/icons/ChartBubbleIcon.js.map +1 -1
- package/dist/icons/ChartDonut2Icon.js +1 -1
- package/dist/icons/ChartDonut2Icon.js.map +1 -1
- package/dist/icons/ChartFunnelIcon.js +1 -1
- package/dist/icons/ChartFunnelIcon.js.map +1 -1
- package/dist/icons/ChartHeatmapIcon.js +1 -1
- package/dist/icons/ChartHeatmapIcon.js.map +1 -1
- package/dist/icons/ChartKPIIcon.js +1 -1
- package/dist/icons/ChartKPIIcon.js.map +1 -1
- package/dist/icons/ChartPie2Icon.js +1 -1
- package/dist/icons/ChartPie2Icon.js.map +1 -1
- package/dist/icons/ChartScatterIcon.js +1 -1
- package/dist/icons/ChartScatterIcon.js.map +1 -1
- package/dist/icons/CheckCircleFilledIcon.js +1 -1
- package/dist/icons/CheckCircleFilledIcon.js.map +1 -1
- package/dist/icons/CheckCircleIcon.js +1 -1
- package/dist/icons/CheckCircleIcon.js.map +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CheckIcon.js.map +1 -1
- package/dist/icons/CircleFilledIcon.js +1 -1
- package/dist/icons/CircleFilledIcon.js.map +1 -1
- package/dist/icons/ClearIcon.js +1 -1
- package/dist/icons/ClearIcon.js.map +1 -1
- package/dist/icons/CloseCircleFilledIcon.js +1 -1
- package/dist/icons/CloseCircleFilledIcon.js.map +1 -1
- package/dist/icons/CloseCircleIcon.js +1 -1
- package/dist/icons/CloseCircleIcon.js.map +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/CloseIcon.js.map +1 -1
- package/dist/icons/CodeIcon.js +1 -1
- package/dist/icons/CodeIcon.js.map +1 -1
- package/dist/icons/ColumnTotalIcon.js +1 -1
- package/dist/icons/ColumnTotalIcon.js.map +1 -1
- package/dist/icons/CopyIcon.js +1 -1
- package/dist/icons/CopyIcon.js.map +1 -1
- package/dist/icons/CountIcon.js +1 -1
- package/dist/icons/CountIcon.js.map +1 -1
- package/dist/icons/CubeIcon.js +1 -1
- package/dist/icons/CubeIcon.js.map +1 -1
- package/dist/icons/CubePauseIcon.js +1 -1
- package/dist/icons/CubePauseIcon.js.map +1 -1
- package/dist/icons/CubePlayIcon.js +1 -1
- package/dist/icons/CubePlayIcon.js.map +1 -1
- package/dist/icons/CurrencyDollarIcon.js +1 -1
- package/dist/icons/CurrencyDollarIcon.js.map +1 -1
- package/dist/icons/DangerIcon.js +1 -1
- package/dist/icons/DangerIcon.js.map +1 -1
- package/dist/icons/DashboardIcon.js +1 -1
- package/dist/icons/DashboardIcon.js.map +1 -1
- package/dist/icons/DatabaseIcon.js +1 -1
- package/dist/icons/DatabaseIcon.js.map +1 -1
- package/dist/icons/DecimalDecreaseIcon.js +1 -1
- package/dist/icons/DecimalDecreaseIcon.js.map +1 -1
- package/dist/icons/DecimalIncreaseIcon.js +1 -1
- package/dist/icons/DecimalIncreaseIcon.js.map +1 -1
- package/dist/icons/DirectionIcon.js +67 -22
- package/dist/icons/DirectionIcon.js.map +1 -1
- package/dist/icons/DonutIcon.js +1 -1
- package/dist/icons/DonutIcon.js.map +1 -1
- package/dist/icons/DownIcon.js +1 -1
- package/dist/icons/DownIcon.js.map +1 -1
- package/dist/icons/EditIcon.js +1 -1
- package/dist/icons/EditIcon.js.map +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js.map +1 -1
- package/dist/icons/ExclamationCircleIcon.js +1 -1
- package/dist/icons/ExclamationCircleIcon.js.map +1 -1
- package/dist/icons/ExclamationIcon.js +1 -1
- package/dist/icons/ExclamationIcon.js.map +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeIcon.js.map +1 -1
- package/dist/icons/EyeInvisibleIcon.js +1 -1
- package/dist/icons/EyeInvisibleIcon.js.map +1 -1
- package/dist/icons/FilterIcon.js +1 -1
- package/dist/icons/FilterIcon.js.map +1 -1
- package/dist/icons/FolderFilledIcon.js +1 -1
- package/dist/icons/FolderFilledIcon.js.map +1 -1
- package/dist/icons/FolderIcon.js +1 -1
- package/dist/icons/FolderIcon.js.map +1 -1
- package/dist/icons/FolderOpenFilledIcon.js +1 -1
- package/dist/icons/FolderOpenFilledIcon.js.map +1 -1
- package/dist/icons/FolderOpenIcon.js +1 -1
- package/dist/icons/FolderOpenIcon.js.map +1 -1
- package/dist/icons/ForwardIcon.js +1 -1
- package/dist/icons/ForwardIcon.js.map +1 -1
- package/dist/icons/GripVerticalIcon.js +1 -1
- package/dist/icons/GripVerticalIcon.js.map +1 -1
- package/dist/icons/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyIcon.js.map +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js.map +1 -1
- package/dist/icons/Icon.js +60 -16
- package/dist/icons/Icon.js.map +1 -1
- package/dist/icons/InfoCircleIcon.js +1 -1
- package/dist/icons/InfoCircleIcon.js.map +1 -1
- package/dist/icons/InfoIcon.js +1 -1
- package/dist/icons/InfoIcon.js.map +1 -1
- package/dist/icons/KeyIcon.js +1 -1
- package/dist/icons/KeyIcon.js.map +1 -1
- package/dist/icons/LeftIcon.js +1 -1
- package/dist/icons/LeftIcon.js.map +1 -1
- package/dist/icons/LineChartIcon.js +1 -1
- package/dist/icons/LineChartIcon.js.map +1 -1
- package/dist/icons/LoadingIcon.js +1 -1
- package/dist/icons/LoadingIcon.js.map +1 -1
- package/dist/icons/LockFilledIcon.js +1 -1
- package/dist/icons/LockFilledIcon.js.map +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/LockIcon.js.map +1 -1
- package/dist/icons/MoreIcon.js +1 -1
- package/dist/icons/MoreIcon.js.map +1 -1
- package/dist/icons/NotAllowedIcon.js +1 -1
- package/dist/icons/NotAllowedIcon.js.map +1 -1
- package/dist/icons/Number123Icon.js +1 -1
- package/dist/icons/Number123Icon.js.map +1 -1
- package/dist/icons/NumberIcon.js +1 -1
- package/dist/icons/NumberIcon.js.map +1 -1
- package/dist/icons/PauseCircleFilledIcon.js +1 -1
- package/dist/icons/PauseCircleFilledIcon.js.map +1 -1
- package/dist/icons/PauseCircleIcon.js +1 -1
- package/dist/icons/PauseCircleIcon.js.map +1 -1
- package/dist/icons/PauseIcon.js +1 -1
- package/dist/icons/PauseIcon.js.map +1 -1
- package/dist/icons/PercentageIcon.js +1 -1
- package/dist/icons/PercentageIcon.js.map +1 -1
- package/dist/icons/PieChartIcon.js +1 -1
- package/dist/icons/PieChartIcon.js.map +1 -1
- package/dist/icons/PipetteIcon.js +1 -1
- package/dist/icons/PipetteIcon.js.map +1 -1
- package/dist/icons/PlayCircleIcon.js +1 -1
- package/dist/icons/PlayCircleIcon.js.map +1 -1
- package/dist/icons/PlayIcon.js +1 -1
- package/dist/icons/PlayIcon.js.map +1 -1
- package/dist/icons/PlusIcon.js +1 -1
- package/dist/icons/PlusIcon.js.map +1 -1
- package/dist/icons/ProgressBarIcon.js +1 -1
- package/dist/icons/ProgressBarIcon.js.map +1 -1
- package/dist/icons/ReloadIcon.js +1 -1
- package/dist/icons/ReloadIcon.js.map +1 -1
- package/dist/icons/ReportIcon.js +1 -1
- package/dist/icons/ReportIcon.js.map +1 -1
- package/dist/icons/ReturnIcon.js +1 -1
- package/dist/icons/ReturnIcon.js.map +1 -1
- package/dist/icons/RightIcon.js +1 -1
- package/dist/icons/RightIcon.js.map +1 -1
- package/dist/icons/RowTotalsIcon.js +1 -1
- package/dist/icons/RowTotalsIcon.js.map +1 -1
- package/dist/icons/SchemeIcon.js +1 -1
- package/dist/icons/SchemeIcon.js.map +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/SearchIcon.js.map +1 -1
- package/dist/icons/SemanticQueryIcon.js +1 -1
- package/dist/icons/SemanticQueryIcon.js.map +1 -1
- package/dist/icons/SettingsIcon.js +1 -1
- package/dist/icons/SettingsIcon.js.map +1 -1
- package/dist/icons/ShieldFilledIcon.js +1 -1
- package/dist/icons/ShieldFilledIcon.js.map +1 -1
- package/dist/icons/ShieldIcon.js +1 -1
- package/dist/icons/ShieldIcon.js.map +1 -1
- package/dist/icons/SlashIcon.js +1 -1
- package/dist/icons/SlashIcon.js.map +1 -1
- package/dist/icons/SparklesIcon.js +1 -1
- package/dist/icons/SparklesIcon.js.map +1 -1
- package/dist/icons/SqlIcon.js +1 -1
- package/dist/icons/SqlIcon.js.map +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/StatsIcon.js.map +1 -1
- package/dist/icons/StopIcon.js +1 -1
- package/dist/icons/StopIcon.js.map +1 -1
- package/dist/icons/StringIcon.js +1 -1
- package/dist/icons/StringIcon.js.map +1 -1
- package/dist/icons/SubtotalsIcon.js +1 -1
- package/dist/icons/SubtotalsIcon.js.map +1 -1
- package/dist/icons/SwitchIcon.js +1 -1
- package/dist/icons/SwitchIcon.js.map +1 -1
- package/dist/icons/TableIcon.js +1 -1
- package/dist/icons/TableIcon.js.map +1 -1
- package/dist/icons/ThumbsDownIcon.js +1 -1
- package/dist/icons/ThumbsDownIcon.js.map +1 -1
- package/dist/icons/ThumbsUpIcon.js +1 -1
- package/dist/icons/ThumbsUpIcon.js.map +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js.map +1 -1
- package/dist/icons/ThunderboltFilledIcon.js +1 -1
- package/dist/icons/ThunderboltFilledIcon.js.map +1 -1
- package/dist/icons/ThunderboltIcon.js +1 -1
- package/dist/icons/ThunderboltIcon.js.map +1 -1
- package/dist/icons/TimeIcon.js +1 -1
- package/dist/icons/TimeIcon.js.map +1 -1
- package/dist/icons/TrashIcon.js +1 -1
- package/dist/icons/TrashIcon.js.map +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UnlockIcon.js.map +1 -1
- package/dist/icons/UpIcon.js +1 -1
- package/dist/icons/UpIcon.js.map +1 -1
- package/dist/icons/UserGroupIcon.js +1 -1
- package/dist/icons/UserGroupIcon.js.map +1 -1
- package/dist/icons/UserIcon.js +1 -1
- package/dist/icons/UserIcon.js.map +1 -1
- package/dist/icons/UserLockIcon.js +1 -1
- package/dist/icons/UserLockIcon.js.map +1 -1
- package/dist/icons/ViewIcon.js +1 -1
- package/dist/icons/ViewIcon.js.map +1 -1
- package/dist/icons/WarningFilledIcon.js +1 -1
- package/dist/icons/WarningFilledIcon.js.map +1 -1
- package/dist/icons/WarningIcon.js +1 -1
- package/dist/icons/WarningIcon.js.map +1 -1
- package/dist/icons/wrap-icon.js +15 -7
- package/dist/icons/wrap-icon.js.map +1 -1
- package/dist/index.d.ts +22 -22
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/probe/canonicalize.js +2 -2
- package/dist/probe/canonicalize.js.map +1 -1
- package/dist/probe/css.js +1 -1
- package/dist/probe/css.js.map +1 -1
- package/dist/probe/index.js +1 -1
- package/dist/provider.js +17 -7
- package/dist/provider.js.map +1 -1
- package/dist/providers/TrackingProvider.js +33 -9
- package/dist/providers/TrackingProvider.js.map +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/providers/navigationAdapter.default.js.map +1 -1
- package/dist/shared/form.d.ts +9 -2
- package/dist/tokens/all-tokens.js +1 -1
- package/dist/tokens/all-tokens.js.map +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/base.js.map +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-seed.js.map +1 -1
- package/dist/tokens/color-theme.js +18 -3
- package/dist/tokens/color-theme.js.map +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/colors.js.map +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/layout.js.map +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/lazy-styles.js.map +1 -1
- package/dist/tokens/legacy-color.js +1 -1
- package/dist/tokens/legacy-color.js.map +1 -1
- package/dist/tokens/palette-config.js +9 -2
- package/dist/tokens/palette-config.js.map +1 -1
- package/dist/tokens/palette.js +1 -1
- package/dist/tokens/palette.js.map +1 -1
- package/dist/tokens/resolve.js +85 -21
- package/dist/tokens/resolve.js.map +1 -1
- package/dist/tokens/shadows.js +1 -1
- package/dist/tokens/shadows.js.map +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/sizes.js.map +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/spacing.js.map +1 -1
- package/dist/tokens/typography.js +1 -1
- package/dist/tokens/typography.js.map +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/ResizeSensor.js.map +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/colors.js.map +1 -1
- package/dist/utils/dotize.js +1 -1
- package/dist/utils/dotize.js.map +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/is-dev-env.js.map +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/modules.js.map +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/promise.js.map +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/raf.js.map +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/random.js.map +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/range.js.map +1 -1
- package/dist/utils/react/RenderCache.js +2 -2
- package/dist/utils/react/RenderCache.js.map +1 -1
- package/dist/utils/react/Slots.js +67 -24
- package/dist/utils/react/Slots.js.map +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/chain.js.map +1 -1
- package/dist/utils/react/disabledProps.js +1 -1
- package/dist/utils/react/disabledProps.js.map +1 -1
- package/dist/utils/react/escapePropagation.js +1 -1
- package/dist/utils/react/escapePropagation.js.map +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js.map +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +35 -12
- package/dist/utils/react/interactions.js.map +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/isTextOnly.js.map +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mapProps.js.map +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/mergeProps.js.map +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/nullableValue.js.map +1 -1
- package/dist/utils/react/programmaticFocus.js +1 -1
- package/dist/utils/react/programmaticFocus.js.map +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/resolveIcon.js.map +1 -1
- package/dist/utils/react/sharedStore.js +13 -2
- package/dist/utils/react/sharedStore.js.map +1 -1
- package/dist/utils/react/useBufferedValue.js +5 -5
- package/dist/utils/react/useBufferedValue.js.map +1 -1
- package/dist/utils/react/useCombinedRefs.js +20 -5
- package/dist/utils/react/useCombinedRefs.js.map +1 -1
- package/dist/utils/react/useControlledFocusVisible.js +53 -17
- package/dist/utils/react/useControlledFocusVisible.js.map +1 -1
- package/dist/utils/react/useEventBus.js +43 -18
- package/dist/utils/react/useEventBus.js.map +1 -1
- package/dist/utils/react/useId.js +2 -1
- package/dist/utils/react/useId.js.map +1 -1
- package/dist/utils/react/useIsDarwin.js +29 -16
- package/dist/utils/react/useIsDarwin.js.map +1 -1
- package/dist/utils/react/useKeySymbols.js +23 -9
- package/dist/utils/react/useKeySymbols.js.map +1 -1
- package/dist/utils/react/useLayoutEffect.js +1 -1
- package/dist/utils/react/useLayoutEffect.js.map +1 -1
- package/dist/utils/react/useLocalStorage.js +75 -30
- package/dist/utils/react/useLocalStorage.js.map +1 -1
- package/dist/utils/react/useMergeStyles.js +1 -1
- package/dist/utils/react/useMergeStyles.js.map +1 -1
- package/dist/utils/react/useOverlayEscapeGuard.js +25 -9
- package/dist/utils/react/useOverlayEscapeGuard.js.map +1 -1
- package/dist/utils/react/usePopoverSync.js +175 -73
- package/dist/utils/react/usePopoverSync.js.map +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useQaProps.js.map +1 -1
- package/dist/utils/react/useScheme.js +1 -1
- package/dist/utils/react/useScheme.js.map +1 -1
- package/dist/utils/react/useViewportSize.js +43 -19
- package/dist/utils/react/useViewportSize.js.map +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js.map +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/selection.js.map +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/styles.js.map +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/tree.js.map +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/utils/warnings.js.map +1 -1
- package/dist/version.js +2 -2
- package/dist/version.js.map +1 -1
- package/docs/FieldProperties.md +2 -2
- package/docs/Usage.md +9 -1
- package/docs/components/actions/ButtonSplit.md +2 -0
- package/docs/components/content/InfoBadge.md +1 -1
- package/docs/components/content/InlineInput.md +1 -1
- package/docs/components/content/Layout.md +1 -1
- package/docs/components/content/Tag.md +10 -2
- package/docs/components/fields/Checkbox.md +11 -0
- package/docs/components/fields/ColorInput.md +15 -8
- package/docs/components/fields/ColorPicker.md +16 -9
- package/docs/components/fields/ComboBox.md +16 -12
- package/docs/components/fields/DatePicker.md +2 -0
- package/docs/components/fields/FilterListBox.md +24 -19
- package/docs/components/fields/FilterPicker.md +27 -20
- package/docs/components/fields/ListBox.md +36 -26
- package/docs/components/fields/PeriodPicker.md +2 -0
- package/docs/components/fields/Picker.md +30 -22
- package/docs/components/fields/RadioGroup.md +2 -2
- package/docs/components/fields/Select.md +21 -12
- package/docs/components/form/Field.md +4 -4
- package/docs/components/form/Form.md +61 -578
- package/docs/components/form/ModernForm.md +22 -1
- package/docs/components/navigation/Tabs.md +3 -3
- package/docs/components/overlays/Dialog.md +30 -3
- package/docs/components/overlays/DialogForm.md +122 -263
- package/docs/components/overlays/DialogTrigger.md +1 -1
- package/docs/components/overlays/UseDialogContainer.md +11 -13
- package/docs/modern-form-guide.md +22 -1
- package/docs/modern-form-migration.md +1 -1
- package/package.json +7 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.184.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
@@ -109,7 +109,7 @@ const FilterListBox = forwardRef(function FilterListBox(props, ref) {
|
|
|
109
109
|
});
|
|
110
110
|
const originalKeys = useMemo(() => {
|
|
111
111
|
const keys = /* @__PURE__ */ new Set();
|
|
112
|
-
for (const
|
|
112
|
+
for (const item_0 of localCollectionState.collection) if (item_0.type === "item") keys.add(String(item_0.key));
|
|
113
113
|
return keys;
|
|
114
114
|
}, [localCollectionState.collection]);
|
|
115
115
|
const [customKeys, setCustomKeys] = useState(/* @__PURE__ */ new Set());
|
|
@@ -133,19 +133,19 @@ const FilterListBox = forwardRef(function FilterListBox(props, ref) {
|
|
|
133
133
|
if (!children && customKeys.size === 0) return children;
|
|
134
134
|
const term = searchValue.trim();
|
|
135
135
|
const localFilter = typeof filter === "function" ? filter : contains;
|
|
136
|
-
const customArray = Array.from(customKeys).filter((
|
|
137
|
-
textValue:
|
|
136
|
+
const customArray = Array.from(customKeys).filter((key_0) => !term || localFilter(key_0, term)).map((key_1) => /* @__PURE__ */ jsx(_CollectionItem, {
|
|
137
|
+
textValue: key_1,
|
|
138
138
|
...customValueProps,
|
|
139
|
-
children:
|
|
140
|
-
},
|
|
139
|
+
children: key_1
|
|
140
|
+
}, key_1));
|
|
141
141
|
const selectedKeysSet = /* @__PURE__ */ new Set();
|
|
142
|
-
if (selectionMode === "multiple") if (selectedKeys === "all") {} else Array.from(selectedKeys ?? []).forEach((
|
|
142
|
+
if (selectionMode === "multiple") if (selectedKeys === "all") {} else Array.from(selectedKeys ?? []).forEach((k_0) => selectedKeysSet.add(String(k_0)));
|
|
143
143
|
else if (selectedKey != null) selectedKeysSet.add(String(selectedKey));
|
|
144
144
|
const selectedCustom = [];
|
|
145
145
|
const unselectedCustom = [];
|
|
146
|
-
customArray.forEach((
|
|
147
|
-
if (selectedKeysSet.has(String(
|
|
148
|
-
else unselectedCustom.push(
|
|
146
|
+
customArray.forEach((item_1) => {
|
|
147
|
+
if (selectedKeysSet.has(String(item_1.key))) selectedCustom.push(item_1);
|
|
148
|
+
else unselectedCustom.push(item_1);
|
|
149
149
|
});
|
|
150
150
|
if (!children) return [...selectedCustom, ...unselectedCustom];
|
|
151
151
|
const originalArray = Array.isArray(children) ? children : [children];
|
|
@@ -166,9 +166,9 @@ const FilterListBox = forwardRef(function FilterListBox(props, ref) {
|
|
|
166
166
|
customValueProps
|
|
167
167
|
]);
|
|
168
168
|
const innerAriaLabel = props["aria-label"] || (typeof label === "string" ? label : void 0);
|
|
169
|
-
const handleSearchChange = useCallback((
|
|
170
|
-
if (!isSearchControlled) setInternalSearchValue(
|
|
171
|
-
onSearchChange?.(
|
|
169
|
+
const handleSearchChange = useCallback((value_0) => {
|
|
170
|
+
if (!isSearchControlled) setInternalSearchValue(value_0);
|
|
171
|
+
onSearchChange?.(value_0);
|
|
172
172
|
}, [isSearchControlled, onSearchChange]);
|
|
173
173
|
const textFilterFn = useMemo(() => {
|
|
174
174
|
if (filter === false) return isLoadingItems ? contains : () => true;
|
|
@@ -180,11 +180,11 @@ const FilterListBox = forwardRef(function FilterListBox(props, ref) {
|
|
|
180
180
|
]);
|
|
181
181
|
const filterFn = useCallback((nodes) => {
|
|
182
182
|
if (filter === false && !isLoadingItems) return nodes;
|
|
183
|
-
const
|
|
184
|
-
if (!
|
|
183
|
+
const term_0 = searchValue.trim();
|
|
184
|
+
if (!term_0) return nodes;
|
|
185
185
|
return [...nodes].map((node) => {
|
|
186
186
|
if (node.type === "section" && node.childNodes) {
|
|
187
|
-
const filteredNodes = [...node.childNodes].filter((child) => textFilterFn(child.textValue || "",
|
|
187
|
+
const filteredNodes = [...node.childNodes].filter((child) => textFilterFn(child.textValue || "", term_0));
|
|
188
188
|
if (filteredNodes.length === 0) return null;
|
|
189
189
|
return {
|
|
190
190
|
...node,
|
|
@@ -192,7 +192,7 @@ const FilterListBox = forwardRef(function FilterListBox(props, ref) {
|
|
|
192
192
|
hasChildNodes: true
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
return textFilterFn(node.textValue || "",
|
|
195
|
+
return textFilterFn(node.textValue || "", term_0) ? node : null;
|
|
196
196
|
}).filter(Boolean);
|
|
197
197
|
}, [
|
|
198
198
|
filter,
|
|
@@ -203,33 +203,33 @@ const FilterListBox = forwardRef(function FilterListBox(props, ref) {
|
|
|
203
203
|
const enhancedChildren = useMemo(() => {
|
|
204
204
|
let childrenToProcess = mergedChildren;
|
|
205
205
|
if (!allowsCustomValue) return childrenToProcess;
|
|
206
|
-
const
|
|
207
|
-
if (!
|
|
208
|
-
const doesTermExist = (
|
|
209
|
-
if (customKeys.has(
|
|
210
|
-
for (const
|
|
211
|
-
if (
|
|
206
|
+
const term_1 = searchValue.trim();
|
|
207
|
+
if (!term_1) return childrenToProcess;
|
|
208
|
+
const doesTermExist = (term_2) => {
|
|
209
|
+
if (customKeys.has(term_2)) return true;
|
|
210
|
+
for (const item_2 of localCollectionState.collection) if (item_2.type === "item") {
|
|
211
|
+
if (term_2 === (item_2.textValue || String(item_2.rendered || "")) || String(item_2.key) === term_2) return true;
|
|
212
212
|
}
|
|
213
213
|
return false;
|
|
214
214
|
};
|
|
215
|
-
if (doesTermExist(
|
|
216
|
-
const
|
|
215
|
+
if (doesTermExist(term_1)) return childrenToProcess;
|
|
216
|
+
const localFilter_0 = typeof filter === "function" ? filter : contains;
|
|
217
217
|
const hasVisibleFilteredItems = (() => {
|
|
218
|
-
for (const
|
|
219
|
-
if (textFilterFn(
|
|
220
|
-
} else if (
|
|
221
|
-
for (const
|
|
218
|
+
for (const item_3 of localCollectionState.collection) if (item_3.type === "item") {
|
|
219
|
+
if (textFilterFn(item_3.textValue || String(item_3.rendered || ""), term_1)) return true;
|
|
220
|
+
} else if (item_3.type === "section" && item_3.childNodes) {
|
|
221
|
+
for (const child_0 of item_3.childNodes) if (textFilterFn(child_0.textValue || String(child_0.rendered || ""), term_1)) return true;
|
|
222
222
|
}
|
|
223
|
-
for (const customKey of customKeys) if (
|
|
223
|
+
for (const customKey of customKeys) if (localFilter_0(customKey, term_1)) return true;
|
|
224
224
|
return false;
|
|
225
225
|
})();
|
|
226
226
|
const customOption = /* @__PURE__ */ jsx(_CollectionItem, {
|
|
227
|
-
textValue:
|
|
227
|
+
textValue: term_1,
|
|
228
228
|
...mergeProps$1(customValueProps ?? {}, newCustomValueProps ?? {}),
|
|
229
|
-
children:
|
|
230
|
-
},
|
|
229
|
+
children: term_1
|
|
230
|
+
}, term_1);
|
|
231
231
|
if (hasVisibleFilteredItems && childrenToProcess) {
|
|
232
|
-
const hasSections = [...localCollectionState.collection].some((
|
|
232
|
+
const hasSections = [...localCollectionState.collection].some((item_4) => item_4.type === "section");
|
|
233
233
|
const customValueSection = /* @__PURE__ */ jsx(Section, {
|
|
234
234
|
"aria-label": t("filterListBox.customValue", "Custom value"),
|
|
235
235
|
children: customOption
|
|
@@ -270,26 +270,26 @@ const FilterListBox = forwardRef(function FilterListBox(props, ref) {
|
|
|
270
270
|
const listState = listStateRef.current;
|
|
271
271
|
if (!listState) return;
|
|
272
272
|
const { selectionManager, collection } = listState;
|
|
273
|
-
const
|
|
273
|
+
const term_3 = searchValue.trim();
|
|
274
274
|
let newCustomValueKey = null;
|
|
275
275
|
let customValueHasMatches = false;
|
|
276
|
-
const collectVisibleKeys = (
|
|
277
|
-
for (const
|
|
278
|
-
out.push(
|
|
276
|
+
const collectVisibleKeys = (nodes_0, out, inCustomSection = false) => {
|
|
277
|
+
for (const node_0 of nodes_0) if (node_0.type === "item") {
|
|
278
|
+
out.push(node_0.key);
|
|
279
279
|
if (inCustomSection) {
|
|
280
|
-
newCustomValueKey =
|
|
280
|
+
newCustomValueKey = node_0.key;
|
|
281
281
|
customValueHasMatches = true;
|
|
282
282
|
}
|
|
283
|
-
} else if (
|
|
284
|
-
const isCustomSection = inCustomSection ||
|
|
285
|
-
collectVisibleKeys(
|
|
283
|
+
} else if (node_0.childNodes) {
|
|
284
|
+
const isCustomSection = inCustomSection || node_0.key === "__custom_value__";
|
|
285
|
+
collectVisibleKeys(node_0.childNodes, out, isCustomSection);
|
|
286
286
|
}
|
|
287
287
|
};
|
|
288
288
|
const visibleKeys = [];
|
|
289
289
|
collectVisibleKeys(collection, visibleKeys);
|
|
290
|
-
if (newCustomValueKey == null && allowsCustomValue &&
|
|
291
|
-
for (const
|
|
292
|
-
newCustomValueKey =
|
|
290
|
+
if (newCustomValueKey == null && allowsCustomValue && term_3) {
|
|
291
|
+
for (const node_1 of collection) if (node_1.type === "item" && String(node_1.key) === term_3) {
|
|
292
|
+
newCustomValueKey = node_1.key;
|
|
293
293
|
customValueHasMatches = false;
|
|
294
294
|
break;
|
|
295
295
|
}
|
|
@@ -312,12 +312,12 @@ const FilterListBox = forwardRef(function FilterListBox(props, ref) {
|
|
|
312
312
|
if (selectionMode === "single") {
|
|
313
313
|
if (selectedKey != null) {
|
|
314
314
|
const selectedKeyStr = String(selectedKey);
|
|
315
|
-
if (visibleKeys.some((
|
|
315
|
+
if (visibleKeys.some((k_1) => String(k_1) === selectedKeyStr)) return selectedKey;
|
|
316
316
|
}
|
|
317
317
|
} else if (selectionMode === "multiple") {
|
|
318
|
-
if (selectedKeys && selectedKeys !== "all") for (const
|
|
319
|
-
const keyStr = String(
|
|
320
|
-
if (visibleKeys.some((
|
|
318
|
+
if (selectedKeys && selectedKeys !== "all") for (const key_2 of selectedKeys) {
|
|
319
|
+
const keyStr = String(key_2);
|
|
320
|
+
if (visibleKeys.some((k_2) => String(k_2) === keyStr)) return key_2;
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
return null;
|
|
@@ -326,7 +326,7 @@ const FilterListBox = forwardRef(function FilterListBox(props, ref) {
|
|
|
326
326
|
if (customValueShouldBeFocused) keyToFocus = newCustomValueKey;
|
|
327
327
|
else {
|
|
328
328
|
keyToFocus = findFirstVisibleSelectedKey();
|
|
329
|
-
if (keyToFocus == null) keyToFocus = visibleKeys.find((
|
|
329
|
+
if (keyToFocus == null) keyToFocus = visibleKeys.find((k_3) => k_3 !== newCustomValueKey) ?? visibleKeys[0];
|
|
330
330
|
}
|
|
331
331
|
if (listState.lastFocusSourceRef) listState.lastFocusSourceRef.current = "keyboard";
|
|
332
332
|
selectionManager.setFocusedKey(keyToFocus);
|
|
@@ -341,55 +341,55 @@ const FilterListBox = forwardRef(function FilterListBox(props, ref) {
|
|
|
341
341
|
const { keyboardProps } = useKeyboard({ onKeyDown: (e) => {
|
|
342
342
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
343
343
|
e.preventDefault();
|
|
344
|
-
const
|
|
345
|
-
if (!
|
|
346
|
-
const { selectionManager, collection } =
|
|
347
|
-
const
|
|
348
|
-
for (const
|
|
349
|
-
else if (
|
|
344
|
+
const listState_0 = listStateRef.current;
|
|
345
|
+
if (!listState_0) return;
|
|
346
|
+
const { selectionManager: selectionManager_0, collection: collection_0 } = listState_0;
|
|
347
|
+
const collectVisibleKeys_0 = (nodes_1, out_0) => {
|
|
348
|
+
for (const node_2 of nodes_1) if (node_2.type === "item") out_0.push(node_2.key);
|
|
349
|
+
else if (node_2.childNodes) collectVisibleKeys_0(node_2.childNodes, out_0);
|
|
350
350
|
};
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
if (
|
|
351
|
+
const visibleKeys_0 = [];
|
|
352
|
+
collectVisibleKeys_0(collection_0, visibleKeys_0);
|
|
353
|
+
if (visibleKeys_0.length === 0) return;
|
|
354
354
|
const isArrowDown = e.key === "ArrowDown";
|
|
355
355
|
const direction = isArrowDown ? 1 : -1;
|
|
356
|
-
const currentKey =
|
|
356
|
+
const currentKey = selectionManager_0.focusedKey;
|
|
357
357
|
let nextKey = null;
|
|
358
|
-
if (currentKey == null) nextKey = isArrowDown ?
|
|
358
|
+
if (currentKey == null) nextKey = isArrowDown ? visibleKeys_0[0] : visibleKeys_0[visibleKeys_0.length - 1];
|
|
359
359
|
else {
|
|
360
|
-
const currentIndex =
|
|
360
|
+
const currentIndex = visibleKeys_0.indexOf(currentKey);
|
|
361
361
|
if (currentIndex !== -1) {
|
|
362
362
|
const newIndex = currentIndex + direction;
|
|
363
|
-
if (newIndex >= 0 && newIndex <
|
|
364
|
-
else if (shouldFocusWrap) nextKey = isArrowDown ?
|
|
365
|
-
} else nextKey = isArrowDown ?
|
|
363
|
+
if (newIndex >= 0 && newIndex < visibleKeys_0.length) nextKey = visibleKeys_0[newIndex];
|
|
364
|
+
else if (shouldFocusWrap) nextKey = isArrowDown ? visibleKeys_0[0] : visibleKeys_0[visibleKeys_0.length - 1];
|
|
365
|
+
} else nextKey = isArrowDown ? visibleKeys_0[0] : visibleKeys_0[visibleKeys_0.length - 1];
|
|
366
366
|
}
|
|
367
367
|
if (nextKey != null) {
|
|
368
|
-
if (
|
|
369
|
-
|
|
368
|
+
if (listState_0.lastFocusSourceRef) listState_0.lastFocusSourceRef.current = "keyboard";
|
|
369
|
+
selectionManager_0.setFocusedKey(nextKey);
|
|
370
370
|
}
|
|
371
371
|
} else if (e.key === "Home" || e.key === "End" || e.key === "PageUp" || e.key === "PageDown") {
|
|
372
372
|
e.preventDefault();
|
|
373
|
-
const
|
|
374
|
-
if (!
|
|
375
|
-
const { selectionManager, collection } =
|
|
376
|
-
const
|
|
377
|
-
for (const
|
|
378
|
-
else if (
|
|
373
|
+
const listState_1 = listStateRef.current;
|
|
374
|
+
if (!listState_1) return;
|
|
375
|
+
const { selectionManager: selectionManager_1, collection: collection_1 } = listState_1;
|
|
376
|
+
const collectVisibleKeys_1 = (nodes_2, out_1) => {
|
|
377
|
+
for (const node_3 of nodes_2) if (node_3.type === "item") out_1.push(node_3.key);
|
|
378
|
+
else if (node_3.childNodes) collectVisibleKeys_1(node_3.childNodes, out_1);
|
|
379
379
|
};
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
if (
|
|
383
|
-
const targetKey = e.key === "Home" || e.key === "PageUp" ?
|
|
384
|
-
if (
|
|
385
|
-
|
|
380
|
+
const visibleKeys_1 = [];
|
|
381
|
+
collectVisibleKeys_1(collection_1, visibleKeys_1);
|
|
382
|
+
if (visibleKeys_1.length === 0) return;
|
|
383
|
+
const targetKey = e.key === "Home" || e.key === "PageUp" ? visibleKeys_1[0] : visibleKeys_1[visibleKeys_1.length - 1];
|
|
384
|
+
if (listState_1.lastFocusSourceRef) listState_1.lastFocusSourceRef.current = "keyboard";
|
|
385
|
+
selectionManager_1.setFocusedKey(targetKey);
|
|
386
386
|
} else if (e.key === "Enter" || e.key === " " && !searchValue) {
|
|
387
|
-
const
|
|
388
|
-
if (!
|
|
389
|
-
const keyToSelect =
|
|
387
|
+
const listState_2 = listStateRef.current;
|
|
388
|
+
if (!listState_2) return;
|
|
389
|
+
const keyToSelect = listState_2.selectionManager.focusedKey;
|
|
390
390
|
if (keyToSelect != null) {
|
|
391
391
|
e.preventDefault();
|
|
392
|
-
|
|
392
|
+
listState_2.selectionManager.select(keyToSelect, e);
|
|
393
393
|
if (e.key === "Enter" && isCheckable && onEscape && selectionMode === "multiple") onEscape();
|
|
394
394
|
}
|
|
395
395
|
} else if (e.key === "Escape") {
|
|
@@ -438,11 +438,11 @@ const FilterListBox = forwardRef(function FilterListBox(props, ref) {
|
|
|
438
438
|
}
|
|
439
439
|
if (externalOnSelectionChange) externalOnSelectionChange(selection);
|
|
440
440
|
};
|
|
441
|
-
const handleOptionClick = (
|
|
441
|
+
const handleOptionClick = (key_3) => {
|
|
442
442
|
setTimeout(() => {
|
|
443
443
|
if (searchInputRef.current) searchInputRef.current.focus();
|
|
444
444
|
}, 0);
|
|
445
|
-
if (onOptionClick) onOptionClick(
|
|
445
|
+
if (onOptionClick) onOptionClick(key_3);
|
|
446
446
|
};
|
|
447
447
|
const searchInput = /* @__PURE__ */ jsxs(SearchWrapperElement, {
|
|
448
448
|
mods,
|
|
@@ -474,8 +474,8 @@ const FilterListBox = forwardRef(function FilterListBox(props, ref) {
|
|
|
474
474
|
"aria-expanded": "true",
|
|
475
475
|
"aria-haspopup": "listbox",
|
|
476
476
|
"aria-activedescendant": listStateRef.current?.selectionManager.focusedKey != null ? `ListBoxItem-${listStateRef.current?.selectionManager.focusedKey}` : void 0,
|
|
477
|
-
onChange: (
|
|
478
|
-
handleSearchChange(
|
|
477
|
+
onChange: (e_0) => {
|
|
478
|
+
handleSearchChange(e_0.target.value);
|
|
479
479
|
},
|
|
480
480
|
...keyboardProps,
|
|
481
481
|
...modAttrs(mods)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterListBox.js","names":["Item","mergeProps","BaseSection","useFocus"],"sources":["../../../../src/components/fields/FilterListBox/FilterListBox.tsx"],"sourcesContent":["import { Key } from '@react-types/shared';\nimport {\n BASE_STYLES,\n COLOR_STYLES,\n OUTER_STYLES,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n cloneElement,\n ForwardedRef,\n forwardRef,\n isValidElement,\n ReactElement,\n ReactNode,\n RefObject,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useFilter, useKeyboard } from 'react-aria';\nimport { Section as BaseSection, useListState } from 'react-stately';\n\nimport { useI18n } from '../../../i18n';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { mergeProps, modAttrs, useCombinedRefs } from '../../../utils/react';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { extractStyles } from '../../../utils/styles';\nimport { StyledHeader } from '../../actions/Menu/styled';\nimport {\n CubeCollectionItemProps,\n CollectionItem as Item,\n} from '../../CollectionItem';\nimport { getValidationMods, useFieldProps, wrapWithField } from '../../form';\nimport { CubeListBoxProps, ListBox } from '../ListBox/ListBox';\nimport {\n DEFAULT_INPUT_STYLES,\n INPUT_WRAPPER_STYLES,\n} from '../TextInput/TextInputBase';\n\nimport type { Collection, Node } from '@react-types/shared';\nimport type { FieldBaseProps } from '../../../shared';\n\ntype FilterFn = (textValue: string, inputValue: string) => boolean;\n\nconst FilterListBoxWrapperElement = tasty({\n styles: {\n display: 'grid',\n flow: 'column',\n gridColumns: '1sf',\n gridRows: 'max-content max-content 1sf',\n gap: 0,\n position: 'relative',\n radius: true,\n color: '#dark-02',\n transition: 'theme',\n outline: {\n '': '#purple-03.0',\n 'invalid & focused': '#danger.50',\n focused: '#purple-03',\n },\n border: {\n '': true,\n focused: '#primary-text',\n valid: '#success-text.50',\n invalid: '#danger-text.50',\n disabled: true,\n popover: false,\n },\n },\n});\n\nconst SearchWrapperElement = tasty({\n qa: 'FilterListBoxSearchWrapper',\n styles: {\n ...INPUT_WRAPPER_STYLES,\n border: 'bottom',\n radius: '1r top',\n fill: '#clear',\n height: '($size + 1x)',\n $size: {\n '': '$size-md',\n 'size=small': '$size-sm',\n 'size=medium': '$size-md',\n 'size=large': '$size-lg',\n },\n },\n});\n\nconst SearchInputElement = tasty({\n as: 'input',\n styles: {\n ...DEFAULT_INPUT_STYLES,\n fill: '#clear',\n padding: {\n '': '.5x 1.5x',\n prefix: '0 1.5x 0 .5x',\n suffix: '.5x .5x .5x 1.5x',\n 'prefix & suffix': '0 .5x 0 .5x',\n },\n },\n});\n\nconst StyledHeaderWithoutBorder = tasty(StyledHeader, {\n styles: {\n border: false,\n },\n});\n\nexport interface CubeFilterListBoxProps<T>\n extends Omit<CubeListBoxProps<T>, 'filter'>,\n FieldBaseProps<\n string | number | readonly (string | number)[] | null | undefined\n > {\n /** Placeholder text for the search input */\n searchPlaceholder?: string;\n /** Whether the search input should have autofocus */\n autoFocus?: boolean;\n /**\n * Custom filter function for determining if an option should be included in search results.\n * Pass `false` to disable internal filtering completely (useful for external filtering).\n */\n filter?: FilterFn | false;\n /** Label shown when the list is empty. When provided, overrides both the \"No results found\" and \"No items\" defaults. */\n emptyLabel?: ReactNode;\n /** Custom styles for the search input */\n searchInputStyles?: Styles;\n /** Whether the FilterListBox is in loading state (shows loading icon in search input) */\n isLoading?: boolean;\n /** Whether items are currently loading. Shows a loading icon in the search input suffix. */\n isLoadingItems?: boolean;\n /** Ref for accessing the search input element */\n searchInputRef?: RefObject<HTMLInputElement | null>;\n /** Whether to allow entering custom values that are not present in the predefined options */\n allowsCustomValue?: boolean;\n /** Additional modifiers for styling the FilterListBox */\n mods?: Record<string, boolean>;\n /** Custom styles for the list box */\n listBoxStyles?: Styles;\n\n /**\n * Callback fired when the user presses Escape key while the search input is empty.\n * Can be used by parent components (e.g. FilterPicker) to close an enclosing Dialog.\n */\n onEscape?: () => void;\n\n /**\n * Whether to show checkboxes for multiple selection mode.\n * This adds a checkbox icon to the left of each option.\n */\n isCheckable?: boolean;\n\n /**\n * Callback fired when an option is clicked but not on the checkbox area.\n * Used by FilterPicker to close the popover on non-checkbox clicks.\n */\n onOptionClick?: (key: Key) => void;\n\n /**\n * Props to apply to existing custom values (values that are already selected but not in the predefined options).\n */\n customValueProps?: Partial<CubeCollectionItemProps<T>>;\n\n /**\n * Props to apply to new custom values (values typed in the search input that are about to be added).\n * These are merged with customValueProps for new custom values.\n */\n newCustomValueProps?: Partial<CubeCollectionItemProps<T>>;\n\n /**\n * Controlled search value. When provided, the search input becomes controlled.\n * Use with `onSearchChange` to manage the search state externally.\n */\n searchValue?: string;\n\n /**\n * Callback fired when the search input value changes.\n * Use with `searchValue` for controlled search input.\n */\n onSearchChange?: (value: string) => void;\n\n /**\n * Pre-built collection to use instead of creating a new one.\n * Used internally by FilterPicker to avoid duplicate collection creation.\n * @internal\n */\n _internalCollection?: Collection<Node<any>>;\n}\n\nconst PROP_STYLES = [...BASE_STYLES, ...OUTER_STYLES, ...COLOR_STYLES];\n\nexport const FilterListBox = forwardRef(function FilterListBox<\n T extends object,\n>(props: CubeFilterListBoxProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n props = useFieldProps(props, {\n valuePropsMapper: ({ value, onChange }) => {\n const fieldProps: any = {};\n\n if (props.selectionMode === 'multiple') {\n fieldProps.selectedKeys = value || [];\n } else {\n fieldProps.selectedKey = value ?? null;\n }\n\n fieldProps.onSelectionChange = (key: any) => {\n if (props.selectionMode === 'multiple') {\n // Handle \"all\" selection and array selections\n if (key === 'all') {\n onChange('all');\n } else {\n onChange(key ? (Array.isArray(key) ? key : [key]) : []);\n }\n } else {\n onChange(Array.isArray(key) ? key[0] : key);\n }\n };\n\n return fieldProps;\n },\n });\n\n const { t } = useI18n();\n\n let {\n qa,\n label,\n extra,\n id,\n labelStyles,\n isRequired,\n necessityIndicator,\n isInvalid,\n isValid,\n isDisabled,\n isLoading,\n isLoadingItems,\n searchPlaceholder = t('filterListBox.searchPlaceholder', 'Search...'),\n autoFocus,\n filter,\n mods: externalMods,\n emptyLabel,\n searchInputStyles,\n listStyles,\n optionStyles,\n sectionStyles,\n headingStyles,\n searchInputRef,\n listRef,\n message,\n description,\n styles,\n focusOnHover,\n shouldFocusWrap,\n labelSuffix,\n selectedKey,\n defaultSelectedKey,\n selectedKeys,\n defaultSelectedKeys,\n onSelectionChange: externalOnSelectionChange,\n allowsCustomValue = false,\n showSelectAll,\n selectAllLabel,\n header,\n footer,\n size = 'medium',\n headerStyles,\n footerStyles,\n listBoxStyles,\n items,\n children: renderChildren,\n onEscape,\n isCheckable,\n onOptionClick,\n selectionMode = 'single',\n allValueProps,\n customValueProps,\n newCustomValueProps,\n searchValue: controlledSearchValue,\n onSearchChange,\n _internalCollection,\n isReorderable = false,\n onReorder,\n form,\n ...otherProps\n } = props;\n\n // Preserve the original `children` (may be a render function) before we\n // potentially overwrite it.\n let children: ReactNode = renderChildren as ReactNode;\n\n const renderFn = renderChildren as unknown;\n\n if (items && typeof renderFn === 'function') {\n try {\n const itemsArray = Array.from(items as Iterable<any>);\n // Execute the render function for each item to obtain <Item/> / <Section/> nodes.\n children = itemsArray.map((item, idx) => {\n const rendered = (renderFn as (it: any) => ReactNode)(item);\n // Ensure every element has a stable key: rely on the user-provided key\n // inside the render function, otherwise fall back to the item itself or\n // the index. This mirrors React Aria examples where the render function\n // is expected to set keys, but we add a fallback for robustness.\n if (\n isValidElement(rendered) &&\n (rendered as ReactElement).key == null\n ) {\n return cloneElement(rendered as ReactElement, {\n key: (rendered as any)?.key ?? item?.key ?? idx,\n });\n }\n\n return rendered as ReactNode;\n });\n } catch {\n // If conversion fails for some reason, we silently ignore and proceed\n // with the original children value so we don't break runtime.\n }\n }\n\n // Use provided collection from FilterPicker or create our own\n // Hook call order is stable: _internalCollection is consistent per component instance\n const localCollectionState = _internalCollection\n ? { collection: _internalCollection }\n : useListState({\n children: children as any,\n items: items as any,\n selectionMode: 'none' as any,\n });\n\n // Collect original option keys to avoid duplicating them as custom values.\n const originalKeys = useMemo(() => {\n const keys = new Set<string>();\n for (const item of localCollectionState.collection) {\n if (item.type === 'item') {\n keys.add(String(item.key));\n }\n }\n return keys;\n }, [localCollectionState.collection]);\n\n // State to keep track of custom (user-entered) items that were selected.\n const [customKeys, setCustomKeys] = useState<Set<string>>(new Set());\n\n // Controlled/uncontrolled search value pattern\n const [internalSearchValue, setInternalSearchValue] = useState('');\n const isSearchControlled = controlledSearchValue !== undefined;\n const searchValue = isSearchControlled\n ? controlledSearchValue\n : internalSearchValue;\n\n const { contains } = useFilter({ sensitivity: 'base' });\n\n // Initialize custom keys from current selection\n useEffect(() => {\n if (!allowsCustomValue) return;\n\n const currentSelectedKeys = selectedKeys\n ? selectedKeys === 'all'\n ? [] // Skip custom key detection when 'all' is selected\n : Array.from(selectedKeys).map(String)\n : selectedKey != null\n ? [String(selectedKey)]\n : [];\n\n if (currentSelectedKeys.length === 0) return;\n\n const keysToAdd = currentSelectedKeys.filter((k) => !originalKeys.has(k));\n\n if (keysToAdd.length) {\n setCustomKeys((prev) => new Set([...Array.from(prev), ...keysToAdd]));\n }\n }, [allowsCustomValue, selectedKeys, selectedKey, originalKeys]);\n\n // Merge original children with any custom items so they persist in the list.\n // If there are selected custom values, they should appear on top with other\n // selected items (which are already sorted by the parent component, e.g. FilterPicker).\n const mergedChildren: ReactNode = useMemo(() => {\n if (!children && customKeys.size === 0) return children;\n\n // Selected custom values are injected by FilterListBox itself, not by the\n // parent. They must respect the search input regardless of the `filter`\n // prop — `filter={false}` only describes the parent's authority over its\n // own items. Filter them with the user-provided filter (if any) or the\n // default `contains`.\n const term = searchValue.trim();\n const localFilter: FilterFn =\n typeof filter === 'function' ? filter : contains;\n\n // Build React elements for custom values (kept stable via their key).\n const customArray = Array.from(customKeys)\n .filter((key) => !term || localFilter(key, term))\n .map((key) => (\n <Item key={key} textValue={key} {...customValueProps}>\n {key}\n </Item>\n ));\n\n // Identify which custom keys are currently selected so we can promote them.\n const selectedKeysSet = new Set<string>();\n\n if (selectionMode === 'multiple') {\n if (selectedKeys === 'all') {\n // When 'all' is selected, no custom items should be treated as selected\n // since 'all' means all available items, not custom ones\n } else {\n Array.from(selectedKeys ?? []).forEach((k) =>\n selectedKeysSet.add(String(k)),\n );\n }\n } else {\n if (selectedKey != null) selectedKeysSet.add(String(selectedKey));\n }\n\n const selectedCustom: ReactNode[] = [];\n const unselectedCustom: ReactNode[] = [];\n\n customArray.forEach((item: any) => {\n if (selectedKeysSet.has(String(item.key))) {\n selectedCustom.push(item);\n } else {\n unselectedCustom.push(item);\n }\n });\n\n if (!children) {\n // No original items – just return selected custom followed by the rest.\n return [...selectedCustom, ...unselectedCustom];\n }\n\n const originalArray = Array.isArray(children) ? children : [children];\n\n // Final order: selected custom items -> original array (already possibly\n // sorted by parent) -> unselected custom items.\n return [...selectedCustom, ...originalArray, ...unselectedCustom];\n }, [\n children,\n customKeys,\n selectionMode,\n selectedKey,\n selectedKeys,\n searchValue,\n filter,\n contains,\n customValueProps,\n ]);\n\n // Determine an aria-label for the internal ListBox to avoid React Aria warnings.\n const innerAriaLabel =\n (props as any)['aria-label'] ||\n (typeof label === 'string' ? label : undefined);\n\n const handleSearchChange = useCallback(\n (value: string) => {\n if (!isSearchControlled) {\n setInternalSearchValue(value);\n }\n onSearchChange?.(value);\n },\n [isSearchControlled, onSearchChange],\n );\n\n // Choose the text filter function: user-provided `filter` prop (if any),\n // or the default `contains` helper from `useFilter`.\n // When `filter={false}`, the parent owns filtering — we normally pass items\n // through unchanged. The exception is when `isLoadingItems` is `true`: a\n // server fetch is in flight and currently visible items are stale, so we\n // fall back to client-side `contains` to hide non-matching stale items\n // until the new items arrive.\n const textFilterFn = useMemo<FilterFn>(() => {\n if (filter === false) {\n return isLoadingItems ? contains : () => true;\n }\n return filter || contains;\n }, [filter, contains, isLoadingItems]);\n\n // Create a filter function for collection nodes (similar to ComboBox pattern)\n const filterFn = useCallback(\n (nodes: Iterable<any>) => {\n // Server-side filtering with no fetch in flight — items are\n // authoritative and shown as-is.\n if (filter === false && !isLoadingItems) return nodes;\n\n const term = searchValue.trim();\n\n if (!term) {\n return nodes;\n }\n\n // Filter nodes based on their textValue and preserve section structure\n return [...nodes]\n .map((node: any) => {\n if (node.type === 'section' && node.childNodes) {\n const filteredNodes = [...node.childNodes].filter((child: any) =>\n textFilterFn(child.textValue || '', term),\n );\n\n if (filteredNodes.length === 0) {\n return null;\n }\n\n return {\n ...node,\n childNodes: filteredNodes,\n hasChildNodes: true,\n };\n }\n\n return textFilterFn(node.textValue || '', term) ? node : null;\n })\n .filter(Boolean);\n },\n [filter, searchValue, textFilterFn, isLoadingItems],\n );\n\n // Handle custom values if allowed\n const enhancedChildren = useMemo(() => {\n let childrenToProcess = mergedChildren;\n\n // Handle custom values if allowed\n if (!allowsCustomValue) return childrenToProcess;\n\n const term = searchValue.trim();\n if (!term) return childrenToProcess;\n\n // Helper to determine if the term is already present (exact match on rendered textValue or the key).\n const doesTermExist = (term: string): boolean => {\n // Check if term exists in custom keys\n if (customKeys.has(term)) {\n return true;\n }\n\n // Check if term exists in original collection\n for (const item of localCollectionState.collection) {\n if (item.type === 'item') {\n const textValue = item.textValue || String(item.rendered || '');\n if (term === textValue || String(item.key) === term) {\n return true;\n }\n }\n }\n return false;\n };\n\n if (doesTermExist(term)) {\n return childrenToProcess;\n }\n\n // Check if there are any items that will match the filter.\n // This determines whether we need to visually separate the custom value\n // from real items (i.e. render a divider between sections). When there\n // are no visible items, we skip the section wrapper so no divider is\n // drawn above a lone custom-value option.\n //\n // Selected custom values (from `customKeys`) are filtered by `localFilter`\n // in `mergedChildren` regardless of `filter={false}`, so this check must\n // use the same logic — otherwise we'd report \"items visible\" and draw a\n // divider while the actual collection only contains the custom value.\n const localFilter: FilterFn =\n typeof filter === 'function' ? filter : contains;\n\n const hasVisibleFilteredItems = (() => {\n for (const item of localCollectionState.collection) {\n if (item.type === 'item') {\n const textValue = item.textValue || String(item.rendered || '');\n if (textFilterFn(textValue, term)) {\n return true;\n }\n } else if (item.type === 'section' && item.childNodes) {\n for (const child of item.childNodes) {\n const textValue = child.textValue || String(child.rendered || '');\n if (textFilterFn(textValue, term)) {\n return true;\n }\n }\n }\n }\n\n for (const customKey of customKeys) {\n if (localFilter(customKey, term)) {\n return true;\n }\n }\n\n return false;\n })();\n\n // Create the custom option\n const customOption = (\n <Item\n key={term}\n textValue={term}\n {...mergeProps(customValueProps ?? {}, newCustomValueProps ?? {})}\n >\n {term}\n </Item>\n );\n\n // If there are visible filtered items, add visual separation for custom value\n if (hasVisibleFilteredItems && childrenToProcess) {\n // Check if the collection contains any sections\n // If it does, we can't wrap childrenToProcess in another section (would create nested sections)\n const hasSections = [...localCollectionState.collection].some(\n (item) => item.type === 'section',\n );\n\n const customValueSection = (\n <BaseSection\n key=\"__custom_value__\"\n aria-label={t('filterListBox.customValue', 'Custom value')}\n >\n {customOption}\n </BaseSection>\n );\n\n if (hasSections) {\n // Collection has sections - just append the custom value section without wrapping\n if (Array.isArray(childrenToProcess)) {\n return [...childrenToProcess, customValueSection];\n }\n return [childrenToProcess, customValueSection];\n }\n\n // No sections in collection - wrap items in a section for visual separation\n const filteredItemsSection = (\n <BaseSection\n key=\"__filtered_items__\"\n aria-label={t('filterListBox.filteredItems', 'Filtered items')}\n >\n {childrenToProcess}\n </BaseSection>\n );\n\n return [filteredItemsSection, customValueSection];\n }\n\n // No visible filtered items, just return the custom option without sections\n if (Array.isArray(childrenToProcess)) {\n return [...childrenToProcess, customOption];\n }\n\n if (childrenToProcess) {\n return [childrenToProcess, customOption];\n }\n\n return customOption;\n }, [\n allowsCustomValue,\n mergedChildren,\n searchValue,\n customKeys,\n localCollectionState.collection,\n customValueProps,\n newCustomValueProps,\n textFilterFn,\n filter,\n contains,\n t,\n ]);\n\n styles = extractStyles(otherProps, PROP_STYLES, styles);\n\n ref = useCombinedRefs(ref);\n searchInputRef = useCombinedRefs(searchInputRef);\n listRef = useCombinedRefs(listRef);\n\n const { isFocused, focusProps } = useFocus({ isDisabled });\n\n const listBoxRef = useRef<HTMLDivElement>(null);\n\n // Ref to access internal ListBox state (selection manager, etc.)\n const listStateRef = useRef<any>(null);\n\n // No separate focusedKey state needed; rely directly on selectionManager.focusedKey.\n\n // When the search value changes, the visible collection of items may change as well.\n // If the currently focused item is no longer visible, move virtual focus to the first\n // available item so that arrow navigation and Enter behaviour continue to work.\n // If there are no available items, reset the selection so Enter won't select anything.\n // Priority: focus on selected items first, then fall back to first visible item.\n useLayoutEffect(() => {\n const listState = listStateRef.current;\n\n if (!listState) return;\n\n const { selectionManager, collection } = listState;\n\n // Walk the collection and:\n // 1. Collect visible item keys (supports sections).\n // 2. Detect the synthetic \"new custom value\" option — the one generated\n // from the current search term when `allowsCustomValue` is true.\n //\n // The custom value is rendered in one of two layouts depending on whether\n // any real item text-matches the search term (`hasVisibleFilteredItems`\n // in `enhancedChildren`):\n // • Some items match → wrapped in a `__custom_value__` section\n // (`customValueHasMatches = true`)\n // • No items match → appended at the top level with key === term\n // (`customValueHasMatches = false`)\n //\n // The layout itself is the signal we use to decide whether the custom\n // value should be the focus target (no matches) or whether focus should\n // move to a real item (matches present).\n const term = searchValue.trim();\n let newCustomValueKey: Key | null = null;\n let customValueHasMatches = false;\n\n const collectVisibleKeys = (\n nodes: Iterable<any>,\n out: Key[],\n inCustomSection = false,\n ) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n out.push(node.key);\n if (inCustomSection) {\n newCustomValueKey = node.key;\n customValueHasMatches = true;\n }\n } else if (node.childNodes) {\n const isCustomSection =\n inCustomSection || node.key === '__custom_value__';\n collectVisibleKeys(node.childNodes, out, isCustomSection);\n }\n }\n };\n\n const visibleKeys: Key[] = [];\n collectVisibleKeys(collection, visibleKeys);\n\n // Detect the appended-at-top-level case (no items text-match). The custom\n // option is added with key === trimmed search term and lives directly in\n // the top-level collection (not nested in any section).\n if (newCustomValueKey == null && allowsCustomValue && term) {\n for (const node of collection) {\n if (node.type === 'item' && String(node.key) === term) {\n newCustomValueKey = node.key;\n customValueHasMatches = false;\n break;\n }\n }\n }\n\n // If there are no visible items, reset the focused key so Enter won't select anything\n if (visibleKeys.length === 0) {\n selectionManager.setFocusedKey(null);\n return;\n }\n\n // The custom value should be the focus target when it exists and there\n // are no real text-matches — the user's typed value is then the only\n // actionable option. During an in-flight server fetch (`filter === false`\n // + `isLoadingItems`) `textFilterFn` falls back to client-side `contains`\n // so non-matching stale items are hidden, which keeps this signal honest.\n const customValueShouldBeFocused =\n newCustomValueKey != null && !customValueHasMatches;\n\n // Decide whether the current focus is already on the right thing. If yes,\n // don't disturb it. Otherwise fall through and re-pick a focus target.\n const currentFocused = selectionManager.focusedKey;\n if (currentFocused != null && visibleKeys.includes(currentFocused)) {\n const currentIsNewCustomValue =\n newCustomValueKey != null && currentFocused === newCustomValueKey;\n if (customValueShouldBeFocused) {\n if (currentIsNewCustomValue) return;\n } else if (newCustomValueKey != null) {\n // Custom value exists but isn't the priority (matches available) —\n // any non-custom focus is fine.\n if (!currentIsNewCustomValue) return;\n } else {\n // No custom value involved at all.\n return;\n }\n }\n\n // Helper to find the first selected item that's visible\n const findFirstVisibleSelectedKey = (): Key | null => {\n if (selectionMode === 'single') {\n // Single selection: check if selectedKey is visible\n if (selectedKey != null) {\n const selectedKeyStr = String(selectedKey);\n if (visibleKeys.some((k) => String(k) === selectedKeyStr)) {\n return selectedKey;\n }\n }\n } else if (selectionMode === 'multiple') {\n // Multiple selection: find first selected key that's visible\n if (selectedKeys && selectedKeys !== 'all') {\n for (const key of selectedKeys) {\n const keyStr = String(key);\n if (visibleKeys.some((k) => String(k) === keyStr)) {\n return key;\n }\n }\n }\n }\n return null;\n };\n\n // Determine which key to focus\n let keyToFocus: Key | null = null;\n\n if (customValueShouldBeFocused) {\n // No real matches — promote the custom value over any selected/stale\n // item so the user can press Enter to add the value they just typed.\n keyToFocus = newCustomValueKey;\n } else {\n keyToFocus = findFirstVisibleSelectedKey();\n\n // Fallback to first visible item if no selected item found. Prefer the\n // first real (non-custom-value) item so focus doesn't land on the\n // bottom-of-list custom-value suggestion when real items are available.\n if (keyToFocus == null) {\n const firstRealKey = visibleKeys.find((k) => k !== newCustomValueKey);\n keyToFocus = firstRealKey ?? visibleKeys[0];\n }\n }\n\n // Mark this focus change as keyboard navigation so ListBox will scroll to it\n if (listState.lastFocusSourceRef) {\n listState.lastFocusSourceRef.current = 'keyboard';\n }\n\n // Set focus to the determined key\n selectionManager.setFocusedKey(keyToFocus);\n }, [\n searchValue,\n enhancedChildren,\n selectionMode,\n selectedKey,\n selectedKeys,\n allowsCustomValue,\n ]);\n\n // Keyboard navigation handler for search input\n const { keyboardProps } = useKeyboard({\n onKeyDown: (e) => {\n if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\n e.preventDefault();\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n const { selectionManager, collection } = listState;\n\n // Helper to collect visible item keys (supports sections)\n // Collection is already filtered by React Stately via filterFn\n const collectVisibleKeys = (nodes: Iterable<any>, out: Key[]) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n out.push(node.key);\n } else if (node.childNodes) {\n collectVisibleKeys(node.childNodes, out);\n }\n }\n };\n\n const visibleKeys: Key[] = [];\n collectVisibleKeys(collection, visibleKeys);\n\n if (visibleKeys.length === 0) return;\n\n const isArrowDown = e.key === 'ArrowDown';\n const direction = isArrowDown ? 1 : -1;\n\n const currentKey = selectionManager.focusedKey;\n\n let nextKey: Key | null = null;\n\n if (currentKey == null) {\n // If nothing focused yet, pick first/last depending on direction\n nextKey = isArrowDown\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n } else {\n const currentIndex = visibleKeys.indexOf(currentKey);\n if (currentIndex !== -1) {\n const newIndex = currentIndex + direction;\n if (newIndex >= 0 && newIndex < visibleKeys.length) {\n nextKey = visibleKeys[newIndex];\n } else if (shouldFocusWrap) {\n // Wrap around\n nextKey = isArrowDown\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n }\n } else {\n // Fallback\n nextKey = isArrowDown\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n }\n }\n\n if (nextKey != null) {\n // Mark this focus change as keyboard navigation\n if (listState.lastFocusSourceRef) {\n listState.lastFocusSourceRef.current = 'keyboard';\n }\n selectionManager.setFocusedKey(nextKey);\n }\n } else if (\n e.key === 'Home' ||\n e.key === 'End' ||\n e.key === 'PageUp' ||\n e.key === 'PageDown'\n ) {\n e.preventDefault();\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n const { selectionManager, collection } = listState;\n\n // Helper to collect visible item keys (supports sections)\n // Collection is already filtered by React Stately via filterFn\n const collectVisibleKeys = (nodes: Iterable<any>, out: Key[]) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n out.push(node.key);\n } else if (node.childNodes) {\n collectVisibleKeys(node.childNodes, out);\n }\n }\n };\n\n const visibleKeys: Key[] = [];\n collectVisibleKeys(collection, visibleKeys);\n\n if (visibleKeys.length === 0) return;\n\n const targetKey =\n e.key === 'Home' || e.key === 'PageUp'\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n\n // Mark this focus change as keyboard navigation\n if (listState.lastFocusSourceRef) {\n listState.lastFocusSourceRef.current = 'keyboard';\n }\n selectionManager.setFocusedKey(targetKey);\n } else if (e.key === 'Enter' || (e.key === ' ' && !searchValue)) {\n const listState = listStateRef.current;\n\n if (!listState) return;\n\n const keyToSelect = listState.selectionManager.focusedKey;\n\n if (keyToSelect != null) {\n e.preventDefault();\n listState.selectionManager.select(keyToSelect, e);\n\n if (\n e.key === 'Enter' &&\n isCheckable &&\n onEscape &&\n selectionMode === 'multiple'\n ) {\n onEscape();\n }\n }\n } else if (e.key === 'Escape') {\n if (searchValue) {\n // Clear the current search if any text is present.\n e.preventDefault();\n handleSearchChange('');\n } else {\n // Notify parent that Escape was pressed on an empty input.\n if (onEscape) {\n e.preventDefault();\n onEscape();\n }\n }\n }\n },\n });\n\n const mods = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: !!isDisabled,\n focused: isFocused,\n loading: !!isLoading,\n 'loading-items': !!isLoadingItems,\n searchable: true,\n prefix: !!isLoading,\n suffix: !!isLoadingItems,\n ...externalMods,\n }),\n [\n isInvalid,\n isInvalid,\n isValid,\n isDisabled,\n isFocused,\n isLoading,\n isLoadingItems,\n externalMods,\n ],\n );\n\n // Handler must be defined before we render ListBox so we can pass it.\n const handleSelectionChange = (selection: any) => {\n if (allowsCustomValue) {\n // Normalize current selection into an array of string keys\n let selectedValues: string[] = [];\n\n if (selection != null) {\n if (Array.isArray(selection)) {\n selectedValues = selection.map(String);\n } else {\n selectedValues = [String(selection)];\n }\n }\n\n // Build next custom keys set based on selected values\n const nextSet = new Set<string>();\n\n selectedValues.forEach((val) => {\n if (!originalKeys.has(val)) {\n nextSet.add(val);\n }\n });\n\n // Update internal custom keys state\n setCustomKeys(nextSet);\n }\n\n if (externalOnSelectionChange) {\n (externalOnSelectionChange as any)(selection);\n }\n };\n\n // Custom option click handler that ensures search input receives focus\n const handleOptionClick = (key: Key) => {\n // Focus the search input to enable keyboard navigation\n // Use setTimeout to ensure this happens after React state updates\n setTimeout(() => {\n if (searchInputRef.current) {\n searchInputRef.current.focus();\n }\n }, 0);\n\n // Call the original onOptionClick if provided\n if (onOptionClick) {\n onOptionClick(key);\n }\n };\n\n const searchInput = (\n <SearchWrapperElement mods={mods} data-size={size}>\n {isLoading && (\n <div data-element=\"Prefix\">\n <div data-element=\"InputIcon\">\n {isLoading ? <LoadingIcon /> : null}\n </div>\n </div>\n )}\n <SearchInputElement\n ref={searchInputRef}\n qa={qa || 'FilterListBox'}\n id={id}\n data-prefix={isLoading ? '' : undefined}\n data-suffix={isLoadingItems ? '' : undefined}\n type=\"search\"\n placeholder={searchPlaceholder}\n value={searchValue}\n disabled={isDisabled}\n autoFocus={autoFocus}\n data-autofocus={autoFocus ? '' : undefined}\n styles={searchInputStyles}\n data-size={size}\n data-input-type=\"filterlistbox\"\n role=\"combobox\"\n aria-expanded=\"true\"\n aria-haspopup=\"listbox\"\n aria-activedescendant={\n listStateRef.current?.selectionManager.focusedKey != null\n ? `ListBoxItem-${listStateRef.current?.selectionManager.focusedKey}`\n : undefined\n }\n onChange={(e) => {\n handleSearchChange(e.target.value);\n }}\n {...keyboardProps}\n {...modAttrs(mods)}\n />\n {isLoadingItems && (\n <div data-element=\"Suffix\">\n <LoadingIcon data-element=\"InputIcon\" />\n </div>\n )}\n </SearchWrapperElement>\n );\n\n const filterListBoxField = (\n <FilterListBoxWrapperElement\n ref={ref}\n qa=\"FilterListBoxWrapper\"\n {...modAttrs(mods)}\n styles={styles}\n {...focusProps}\n >\n {header ? (\n <StyledHeaderWithoutBorder data-size={size} styles={headerStyles}>\n {header}\n </StyledHeaderWithoutBorder>\n ) : (\n <div role=\"presentation\" />\n )}\n {searchInput}\n <ListBox\n ref={listBoxRef}\n aria-label={innerAriaLabel}\n selectedKey={selectedKey}\n defaultSelectedKey={defaultSelectedKey}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n selectionMode={selectionMode}\n isDisabled={isDisabled}\n listRef={listRef}\n stateRef={listStateRef}\n listStyles={listStyles}\n shouldFocusWrap={shouldFocusWrap}\n optionStyles={optionStyles}\n sectionStyles={sectionStyles}\n headingStyles={headingStyles}\n isInvalid={isInvalid}\n isValid={isValid}\n disallowEmptySelection={props.disallowEmptySelection}\n allowDuplicateSelectionEvents={props.allowDuplicateSelectionEvents}\n disabledKeys={props.disabledKeys}\n focusOnHover={focusOnHover}\n shouldUseVirtualFocus={!(isReorderable && !searchValue.trim())}\n showSelectAll={showSelectAll}\n selectAllLabel={selectAllLabel}\n footer={footer}\n footerStyles={footerStyles}\n mods={mods}\n styles={listBoxStyles}\n isCheckable={isCheckable}\n items={items as any}\n allValueProps={allValueProps}\n filter={filterFn}\n emptyLabel={\n emptyLabel !== undefined\n ? emptyLabel\n : searchValue.trim()\n ? t('filterListBox.noResults', 'No results found')\n : t('filterListBox.noItems', 'No items')\n }\n isReorderable={isReorderable && !searchValue.trim()}\n onReorder={onReorder}\n onSelectionChange={handleSelectionChange}\n onEscape={onEscape}\n onOptionClick={handleOptionClick}\n >\n {enhancedChildren as any}\n </ListBox>\n </FilterListBoxWrapperElement>\n );\n\n return wrapWithField<Omit<CubeFilterListBoxProps<T>, 'children'>>(\n filterListBoxField,\n ref,\n props,\n );\n}) as unknown as (<T>(\n props: CubeFilterListBoxProps<T> & { ref?: ForwardedRef<HTMLDivElement> },\n) => ReactElement) & { Item: typeof Item; Section: typeof BaseSection };\n\nFilterListBox.Item = Item;\n\nFilterListBox.Section = BaseSection;\n\nObject.defineProperty(FilterListBox, 'cubeInputType', {\n value: 'FilterListBox',\n enumerable: false,\n configurable: false,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAM,8BAA8B,MAAM,EACxC,QAAQ;CACN,SAAS;CACT,MAAM;CACN,aAAa;CACb,UAAU;CACV,KAAK;CACL,UAAU;CACV,QAAQ;CACR,OAAO;CACP,YAAY;CACZ,SAAS;EACP,IAAI;EACJ,qBAAqB;EACrB,SAAS;EACV;CACD,QAAQ;EACN,IAAI;EACJ,SAAS;EACT,OAAO;EACP,SAAS;EACT,UAAU;EACV,SAAS;EACV;CACF,EACF,CAAC;AAEF,MAAM,uBAAuB,MAAM;CACjC,IAAI;CACJ,QAAQ;EACN,GAAG;EACH,QAAQ;EACR,QAAQ;EACR,MAAM;EACN,QAAQ;EACR,OAAO;GACL,IAAI;GACJ,cAAc;GACd,eAAe;GACf,cAAc;GACf;EACF;CACF,CAAC;AAEF,MAAM,qBAAqB,MAAM;CAC/B,IAAI;CACJ,QAAQ;EACN,GAAG;EACH,MAAM;EACN,SAAS;GACP,IAAI;GACJ,QAAQ;GACR,QAAQ;GACR,mBAAmB;GACpB;EACF;CACF,CAAC;AAEF,MAAM,4BAA4B,MAAM,cAAc,EACpD,QAAQ,EACN,QAAQ,OACT,EACF,CAAC;AAkFF,MAAM,cAAc;CAAC,GAAG;CAAa,GAAG;CAAc,GAAG;CAAa;AAEtE,MAAa,gBAAgB,W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GAE5B;GACD,oBAAC;IACC,KAAK;IACL,cAAY;IACC;IACO;IACN;IACO;IACN;IACH;IACH;IACT,UAAU;IACE;IACK;IACH;IACC;IACA;IACJ;IACF;IACT,wBAAwB,MAAM;IAC9B,+BAA+B,MAAM;IACrC,cAAc,MAAM;IACN;IACd,uBAAuB,EAAE,iBAAiB,CAAC,YAAY,MAAM;IAC9C;IACC;IACR;IACM;IACR;IACN,QAAQ;IACK;IACN;IACQ;IACf,QAAQ;IACR,YACE,eAAe,SACX,aACA,YAAY,MAAM,GAChB,EAAE,2BAA2B,mBAAmB,GAChD,EAAE,yBAAyB,WAAW;IAE9C,eAAe,iBAAiB,CAAC,YAAY,MAAM;IACxC;IACX,mBAAmB;IACT;IACV,eAAe;cAEd;KACO;;GACkB,EAK9B,KACA,MACD;EACD;AAIF,cAAc,OAAOH;AAErB,cAAc,UAAUE;AAExB,OAAO,eAAe,eAAe,iBAAiB;CACpD,OAAO;CACP,YAAY;CACZ,cAAc;CACf,CAAC"}
|
|
1
|
+
{"version":3,"file":"FilterListBox.js","names":["Key","BASE_STYLES","COLOR_STYLES","OUTER_STYLES","Styles","tasty","cloneElement","ForwardedRef","forwardRef","isValidElement","ReactElement","ReactNode","RefObject","useCallback","useEffect","useLayoutEffect","useMemo","useRef","useState","useFilter","useKeyboard","Section","BaseSection","useListState","useI18n","LoadingIcon","mergeProps","modAttrs","useCombinedRefs","useFocus","extractStyles","StyledHeader","CubeCollectionItemProps","CollectionItem","Item","getValidationMods","useFieldProps","wrapWithField","CubeListBoxProps","ListBox","DEFAULT_INPUT_STYLES","INPUT_WRAPPER_STYLES","Collection","Node","FieldBaseProps","FilterFn","textValue","inputValue","FilterListBoxWrapperElement","styles","display","flow","gridColumns","gridRows","gap","position","radius","color","transition","outline","focused","border","valid","invalid","disabled","popover","SearchWrapperElement","qa","fill","height","$size","SearchInputElement","as","padding","prefix","suffix","StyledHeaderWithoutBorder","CubeFilterListBoxProps","Omit","T","searchPlaceholder","autoFocus","filter","emptyLabel","searchInputStyles","isLoading","isLoadingItems","searchInputRef","HTMLInputElement","allowsCustomValue","mods","Record","listBoxStyles","onEscape","isCheckable","onOptionClick","key","customValueProps","Partial","newCustomValueProps","searchValue","onSearchChange","value","_internalCollection","PROP_STYLES","FilterListBox","props","ref","HTMLDivElement","valuePropsMapper","onChange","fieldProps","selectionMode","selectedKeys","selectedKey","onSelectionChange","Array","isArray","t","label","extra","id","labelStyles","isRequired","necessityIndicator","isInvalid","isValid","isDisabled","externalMods","listStyles","optionStyles","sectionStyles","headingStyles","listRef","message","description","focusOnHover","shouldFocusWrap","labelSuffix","defaultSelectedKey","defaultSelectedKeys","externalOnSelectionChange","showSelectAll","selectAllLabel","header","footer","size","headerStyles","footerStyles","items","children","renderChildren","allValueProps","controlledSearchValue","isReorderable","onReorder","form","otherProps","renderFn","itemsArray","from","Iterable","map","item","idx","rendered","it","localCollectionState","collection","originalKeys","keys","Set","type","add","String","customKeys","setCustomKeys","internalSearchValue","setInternalSearchValue","isSearchControlled","undefined","contains","sensitivity","currentSelectedKeys","length","keysToAdd","k","has","prev","mergedChildren","term","trim","localFilter","customArray","selectedKeysSet","forEach","selectedCustom","unselectedCustom","push","originalArray","innerAriaLabel","handleSearchChange","textFilterFn","filterFn","nodes","node","childNodes","filteredNodes","child","hasChildNodes","Boolean","enhancedChildren","childrenToProcess","doesTermExist","hasVisibleFilteredItems","customKey","customOption","hasSections","some","customValueSection","filteredItemsSection","isFocused","focusProps","listBoxRef","listStateRef","listState","current","selectionManager","newCustomValueKey","customValueHasMatches","collectVisibleKeys","out","inCustomSection","isCustomSection","visibleKeys","setFocusedKey","customValueShouldBeFocused","currentFocused","focusedKey","includes","currentIsNewCustomValue","findFirstVisibleSelectedKey","selectedKeyStr","keyStr","keyToFocus","firstRealKey","find","lastFocusSourceRef","keyboardProps","onKeyDown","e","preventDefault","isArrowDown","direction","currentKey","nextKey","currentIndex","indexOf","newIndex","targetKey","keyToSelect","select","loading","searchable","handleSelectionChange","selection","selectedValues","nextSet","val","handleOptionClick","setTimeout","focus","searchInput","target","filterListBoxField","disallowEmptySelection","allowDuplicateSelectionEvents","disabledKeys","Object","defineProperty","enumerable","configurable"],"sources":["../../../../src/components/fields/FilterListBox/FilterListBox.tsx"],"sourcesContent":["import { Key } from '@react-types/shared';\nimport {\n BASE_STYLES,\n COLOR_STYLES,\n OUTER_STYLES,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n cloneElement,\n ForwardedRef,\n forwardRef,\n isValidElement,\n ReactElement,\n ReactNode,\n RefObject,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useFilter, useKeyboard } from 'react-aria';\nimport { Section as BaseSection, useListState } from 'react-stately';\n\nimport { useI18n } from '../../../i18n';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { mergeProps, modAttrs, useCombinedRefs } from '../../../utils/react';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { extractStyles } from '../../../utils/styles';\nimport { StyledHeader } from '../../actions/Menu/styled';\nimport {\n CubeCollectionItemProps,\n CollectionItem as Item,\n} from '../../CollectionItem';\nimport { getValidationMods, useFieldProps, wrapWithField } from '../../form';\nimport { CubeListBoxProps, ListBox } from '../ListBox/ListBox';\nimport {\n DEFAULT_INPUT_STYLES,\n INPUT_WRAPPER_STYLES,\n} from '../TextInput/TextInputBase';\n\nimport type { Collection, Node } from '@react-types/shared';\nimport type { FieldBaseProps } from '../../../shared';\n\ntype FilterFn = (textValue: string, inputValue: string) => boolean;\n\nconst FilterListBoxWrapperElement = tasty({\n styles: {\n display: 'grid',\n flow: 'column',\n gridColumns: '1sf',\n gridRows: 'max-content max-content 1sf',\n gap: 0,\n position: 'relative',\n radius: true,\n color: '#dark-02',\n transition: 'theme',\n outline: {\n '': '#purple-03.0',\n 'invalid & focused': '#danger.50',\n focused: '#purple-03',\n },\n border: {\n '': true,\n focused: '#primary-text',\n valid: '#success-text.50',\n invalid: '#danger-text.50',\n disabled: true,\n popover: false,\n },\n },\n});\n\nconst SearchWrapperElement = tasty({\n qa: 'FilterListBoxSearchWrapper',\n styles: {\n ...INPUT_WRAPPER_STYLES,\n border: 'bottom',\n radius: '1r top',\n fill: '#clear',\n height: '($size + 1x)',\n $size: {\n '': '$size-md',\n 'size=small': '$size-sm',\n 'size=medium': '$size-md',\n 'size=large': '$size-lg',\n },\n },\n});\n\nconst SearchInputElement = tasty({\n as: 'input',\n styles: {\n ...DEFAULT_INPUT_STYLES,\n fill: '#clear',\n padding: {\n '': '.5x 1.5x',\n prefix: '0 1.5x 0 .5x',\n suffix: '.5x .5x .5x 1.5x',\n 'prefix & suffix': '0 .5x 0 .5x',\n },\n },\n});\n\nconst StyledHeaderWithoutBorder = tasty(StyledHeader, {\n styles: {\n border: false,\n },\n});\n\nexport interface CubeFilterListBoxProps<T>\n extends Omit<CubeListBoxProps<T>, 'filter'>,\n FieldBaseProps<\n string | number | readonly (string | number)[] | null | undefined\n > {\n /** Placeholder text for the search input */\n searchPlaceholder?: string;\n /** Whether the search input should have autofocus */\n autoFocus?: boolean;\n /**\n * Custom filter function for determining if an option should be included in search results.\n * Pass `false` to disable internal filtering completely (useful for external filtering).\n */\n filter?: FilterFn | false;\n /** Label shown when the list is empty. When provided, overrides both the \"No results found\" and \"No items\" defaults. */\n emptyLabel?: ReactNode;\n /** Custom styles for the search input */\n searchInputStyles?: Styles;\n /** Whether the FilterListBox is in loading state (shows loading icon in search input) */\n isLoading?: boolean;\n /** Whether items are currently loading. Shows a loading icon in the search input suffix. */\n isLoadingItems?: boolean;\n /** Ref for accessing the search input element */\n searchInputRef?: RefObject<HTMLInputElement | null>;\n /** Whether to allow entering custom values that are not present in the predefined options */\n allowsCustomValue?: boolean;\n /** Additional modifiers for styling the FilterListBox */\n mods?: Record<string, boolean>;\n /** Custom styles for the list box */\n listBoxStyles?: Styles;\n\n /**\n * Callback fired when the user presses Escape key while the search input is empty.\n * Can be used by parent components (e.g. FilterPicker) to close an enclosing Dialog.\n */\n onEscape?: () => void;\n\n /**\n * Whether to show checkboxes for multiple selection mode.\n * This adds a checkbox icon to the left of each option.\n */\n isCheckable?: boolean;\n\n /**\n * Callback fired when an option is clicked but not on the checkbox area.\n * Used by FilterPicker to close the popover on non-checkbox clicks.\n */\n onOptionClick?: (key: Key) => void;\n\n /**\n * Props to apply to existing custom values (values that are already selected but not in the predefined options).\n */\n customValueProps?: Partial<CubeCollectionItemProps<T>>;\n\n /**\n * Props to apply to new custom values (values typed in the search input that are about to be added).\n * These are merged with customValueProps for new custom values.\n */\n newCustomValueProps?: Partial<CubeCollectionItemProps<T>>;\n\n /**\n * Controlled search value. When provided, the search input becomes controlled.\n * Use with `onSearchChange` to manage the search state externally.\n */\n searchValue?: string;\n\n /**\n * Callback fired when the search input value changes.\n * Use with `searchValue` for controlled search input.\n */\n onSearchChange?: (value: string) => void;\n\n /**\n * Pre-built collection to use instead of creating a new one.\n * Used internally by FilterPicker to avoid duplicate collection creation.\n * @internal\n */\n _internalCollection?: Collection<Node<any>>;\n}\n\nconst PROP_STYLES = [...BASE_STYLES, ...OUTER_STYLES, ...COLOR_STYLES];\n\nexport const FilterListBox = forwardRef(function FilterListBox<\n T extends object,\n>(props: CubeFilterListBoxProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n props = useFieldProps(props, {\n valuePropsMapper: ({ value, onChange }) => {\n const fieldProps: any = {};\n\n if (props.selectionMode === 'multiple') {\n fieldProps.selectedKeys = value || [];\n } else {\n fieldProps.selectedKey = value ?? null;\n }\n\n fieldProps.onSelectionChange = (key: any) => {\n if (props.selectionMode === 'multiple') {\n // Handle \"all\" selection and array selections\n if (key === 'all') {\n onChange('all');\n } else {\n onChange(key ? (Array.isArray(key) ? key : [key]) : []);\n }\n } else {\n onChange(Array.isArray(key) ? key[0] : key);\n }\n };\n\n return fieldProps;\n },\n });\n\n const { t } = useI18n();\n\n let {\n qa,\n label,\n extra,\n id,\n labelStyles,\n isRequired,\n necessityIndicator,\n isInvalid,\n isValid,\n isDisabled,\n isLoading,\n isLoadingItems,\n searchPlaceholder = t('filterListBox.searchPlaceholder', 'Search...'),\n autoFocus,\n filter,\n mods: externalMods,\n emptyLabel,\n searchInputStyles,\n listStyles,\n optionStyles,\n sectionStyles,\n headingStyles,\n searchInputRef,\n listRef,\n message,\n description,\n styles,\n focusOnHover,\n shouldFocusWrap,\n labelSuffix,\n selectedKey,\n defaultSelectedKey,\n selectedKeys,\n defaultSelectedKeys,\n onSelectionChange: externalOnSelectionChange,\n allowsCustomValue = false,\n showSelectAll,\n selectAllLabel,\n header,\n footer,\n size = 'medium',\n headerStyles,\n footerStyles,\n listBoxStyles,\n items,\n children: renderChildren,\n onEscape,\n isCheckable,\n onOptionClick,\n selectionMode = 'single',\n allValueProps,\n customValueProps,\n newCustomValueProps,\n searchValue: controlledSearchValue,\n onSearchChange,\n _internalCollection,\n isReorderable = false,\n onReorder,\n form,\n ...otherProps\n } = props;\n\n // Preserve the original `children` (may be a render function) before we\n // potentially overwrite it.\n let children: ReactNode = renderChildren as ReactNode;\n\n const renderFn = renderChildren as unknown;\n\n if (items && typeof renderFn === 'function') {\n try {\n const itemsArray = Array.from(items as Iterable<any>);\n // Execute the render function for each item to obtain <Item/> / <Section/> nodes.\n children = itemsArray.map((item, idx) => {\n const rendered = (renderFn as (it: any) => ReactNode)(item);\n // Ensure every element has a stable key: rely on the user-provided key\n // inside the render function, otherwise fall back to the item itself or\n // the index. This mirrors React Aria examples where the render function\n // is expected to set keys, but we add a fallback for robustness.\n if (\n isValidElement(rendered) &&\n (rendered as ReactElement).key == null\n ) {\n return cloneElement(rendered as ReactElement, {\n key: (rendered as any)?.key ?? item?.key ?? idx,\n });\n }\n\n return rendered as ReactNode;\n });\n } catch {\n // If conversion fails for some reason, we silently ignore and proceed\n // with the original children value so we don't break runtime.\n }\n }\n\n // Use provided collection from FilterPicker or create our own\n // Hook call order is stable: _internalCollection is consistent per component instance\n const localCollectionState = _internalCollection\n ? { collection: _internalCollection }\n : useListState({\n children: children as any,\n items: items as any,\n selectionMode: 'none' as any,\n });\n\n // Collect original option keys to avoid duplicating them as custom values.\n const originalKeys = useMemo(() => {\n const keys = new Set<string>();\n for (const item of localCollectionState.collection) {\n if (item.type === 'item') {\n keys.add(String(item.key));\n }\n }\n return keys;\n }, [localCollectionState.collection]);\n\n // State to keep track of custom (user-entered) items that were selected.\n const [customKeys, setCustomKeys] = useState<Set<string>>(new Set());\n\n // Controlled/uncontrolled search value pattern\n const [internalSearchValue, setInternalSearchValue] = useState('');\n const isSearchControlled = controlledSearchValue !== undefined;\n const searchValue = isSearchControlled\n ? controlledSearchValue\n : internalSearchValue;\n\n const { contains } = useFilter({ sensitivity: 'base' });\n\n // Initialize custom keys from current selection\n useEffect(() => {\n if (!allowsCustomValue) return;\n\n const currentSelectedKeys = selectedKeys\n ? selectedKeys === 'all'\n ? [] // Skip custom key detection when 'all' is selected\n : Array.from(selectedKeys).map(String)\n : selectedKey != null\n ? [String(selectedKey)]\n : [];\n\n if (currentSelectedKeys.length === 0) return;\n\n const keysToAdd = currentSelectedKeys.filter((k) => !originalKeys.has(k));\n\n if (keysToAdd.length) {\n setCustomKeys((prev) => new Set([...Array.from(prev), ...keysToAdd]));\n }\n }, [allowsCustomValue, selectedKeys, selectedKey, originalKeys]);\n\n // Merge original children with any custom items so they persist in the list.\n // If there are selected custom values, they should appear on top with other\n // selected items (which are already sorted by the parent component, e.g. FilterPicker).\n const mergedChildren: ReactNode = useMemo(() => {\n if (!children && customKeys.size === 0) return children;\n\n // Selected custom values are injected by FilterListBox itself, not by the\n // parent. They must respect the search input regardless of the `filter`\n // prop — `filter={false}` only describes the parent's authority over its\n // own items. Filter them with the user-provided filter (if any) or the\n // default `contains`.\n const term = searchValue.trim();\n const localFilter: FilterFn =\n typeof filter === 'function' ? filter : contains;\n\n // Build React elements for custom values (kept stable via their key).\n const customArray = Array.from(customKeys)\n .filter((key) => !term || localFilter(key, term))\n .map((key) => (\n <Item key={key} textValue={key} {...customValueProps}>\n {key}\n </Item>\n ));\n\n // Identify which custom keys are currently selected so we can promote them.\n const selectedKeysSet = new Set<string>();\n\n if (selectionMode === 'multiple') {\n if (selectedKeys === 'all') {\n // When 'all' is selected, no custom items should be treated as selected\n // since 'all' means all available items, not custom ones\n } else {\n Array.from(selectedKeys ?? []).forEach((k) =>\n selectedKeysSet.add(String(k)),\n );\n }\n } else {\n if (selectedKey != null) selectedKeysSet.add(String(selectedKey));\n }\n\n const selectedCustom: ReactNode[] = [];\n const unselectedCustom: ReactNode[] = [];\n\n customArray.forEach((item: any) => {\n if (selectedKeysSet.has(String(item.key))) {\n selectedCustom.push(item);\n } else {\n unselectedCustom.push(item);\n }\n });\n\n if (!children) {\n // No original items – just return selected custom followed by the rest.\n return [...selectedCustom, ...unselectedCustom];\n }\n\n const originalArray = Array.isArray(children) ? children : [children];\n\n // Final order: selected custom items -> original array (already possibly\n // sorted by parent) -> unselected custom items.\n return [...selectedCustom, ...originalArray, ...unselectedCustom];\n }, [\n children,\n customKeys,\n selectionMode,\n selectedKey,\n selectedKeys,\n searchValue,\n filter,\n contains,\n customValueProps,\n ]);\n\n // Determine an aria-label for the internal ListBox to avoid React Aria warnings.\n const innerAriaLabel =\n (props as any)['aria-label'] ||\n (typeof label === 'string' ? label : undefined);\n\n const handleSearchChange = useCallback(\n (value: string) => {\n if (!isSearchControlled) {\n setInternalSearchValue(value);\n }\n onSearchChange?.(value);\n },\n [isSearchControlled, onSearchChange],\n );\n\n // Choose the text filter function: user-provided `filter` prop (if any),\n // or the default `contains` helper from `useFilter`.\n // When `filter={false}`, the parent owns filtering — we normally pass items\n // through unchanged. The exception is when `isLoadingItems` is `true`: a\n // server fetch is in flight and currently visible items are stale, so we\n // fall back to client-side `contains` to hide non-matching stale items\n // until the new items arrive.\n const textFilterFn = useMemo<FilterFn>(() => {\n if (filter === false) {\n return isLoadingItems ? contains : () => true;\n }\n return filter || contains;\n }, [filter, contains, isLoadingItems]);\n\n // Create a filter function for collection nodes (similar to ComboBox pattern)\n const filterFn = useCallback(\n (nodes: Iterable<any>) => {\n // Server-side filtering with no fetch in flight — items are\n // authoritative and shown as-is.\n if (filter === false && !isLoadingItems) return nodes;\n\n const term = searchValue.trim();\n\n if (!term) {\n return nodes;\n }\n\n // Filter nodes based on their textValue and preserve section structure\n return [...nodes]\n .map((node: any) => {\n if (node.type === 'section' && node.childNodes) {\n const filteredNodes = [...node.childNodes].filter((child: any) =>\n textFilterFn(child.textValue || '', term),\n );\n\n if (filteredNodes.length === 0) {\n return null;\n }\n\n return {\n ...node,\n childNodes: filteredNodes,\n hasChildNodes: true,\n };\n }\n\n return textFilterFn(node.textValue || '', term) ? node : null;\n })\n .filter(Boolean);\n },\n [filter, searchValue, textFilterFn, isLoadingItems],\n );\n\n // Handle custom values if allowed\n const enhancedChildren = useMemo(() => {\n let childrenToProcess = mergedChildren;\n\n // Handle custom values if allowed\n if (!allowsCustomValue) return childrenToProcess;\n\n const term = searchValue.trim();\n if (!term) return childrenToProcess;\n\n // Helper to determine if the term is already present (exact match on rendered textValue or the key).\n const doesTermExist = (term: string): boolean => {\n // Check if term exists in custom keys\n if (customKeys.has(term)) {\n return true;\n }\n\n // Check if term exists in original collection\n for (const item of localCollectionState.collection) {\n if (item.type === 'item') {\n const textValue = item.textValue || String(item.rendered || '');\n if (term === textValue || String(item.key) === term) {\n return true;\n }\n }\n }\n return false;\n };\n\n if (doesTermExist(term)) {\n return childrenToProcess;\n }\n\n // Check if there are any items that will match the filter.\n // This determines whether we need to visually separate the custom value\n // from real items (i.e. render a divider between sections). When there\n // are no visible items, we skip the section wrapper so no divider is\n // drawn above a lone custom-value option.\n //\n // Selected custom values (from `customKeys`) are filtered by `localFilter`\n // in `mergedChildren` regardless of `filter={false}`, so this check must\n // use the same logic — otherwise we'd report \"items visible\" and draw a\n // divider while the actual collection only contains the custom value.\n const localFilter: FilterFn =\n typeof filter === 'function' ? filter : contains;\n\n const hasVisibleFilteredItems = (() => {\n for (const item of localCollectionState.collection) {\n if (item.type === 'item') {\n const textValue = item.textValue || String(item.rendered || '');\n if (textFilterFn(textValue, term)) {\n return true;\n }\n } else if (item.type === 'section' && item.childNodes) {\n for (const child of item.childNodes) {\n const textValue = child.textValue || String(child.rendered || '');\n if (textFilterFn(textValue, term)) {\n return true;\n }\n }\n }\n }\n\n for (const customKey of customKeys) {\n if (localFilter(customKey, term)) {\n return true;\n }\n }\n\n return false;\n })();\n\n // Create the custom option\n const customOption = (\n <Item\n key={term}\n textValue={term}\n {...mergeProps(customValueProps ?? {}, newCustomValueProps ?? {})}\n >\n {term}\n </Item>\n );\n\n // If there are visible filtered items, add visual separation for custom value\n if (hasVisibleFilteredItems && childrenToProcess) {\n // Check if the collection contains any sections\n // If it does, we can't wrap childrenToProcess in another section (would create nested sections)\n const hasSections = [...localCollectionState.collection].some(\n (item) => item.type === 'section',\n );\n\n const customValueSection = (\n <BaseSection\n key=\"__custom_value__\"\n aria-label={t('filterListBox.customValue', 'Custom value')}\n >\n {customOption}\n </BaseSection>\n );\n\n if (hasSections) {\n // Collection has sections - just append the custom value section without wrapping\n if (Array.isArray(childrenToProcess)) {\n return [...childrenToProcess, customValueSection];\n }\n return [childrenToProcess, customValueSection];\n }\n\n // No sections in collection - wrap items in a section for visual separation\n const filteredItemsSection = (\n <BaseSection\n key=\"__filtered_items__\"\n aria-label={t('filterListBox.filteredItems', 'Filtered items')}\n >\n {childrenToProcess}\n </BaseSection>\n );\n\n return [filteredItemsSection, customValueSection];\n }\n\n // No visible filtered items, just return the custom option without sections\n if (Array.isArray(childrenToProcess)) {\n return [...childrenToProcess, customOption];\n }\n\n if (childrenToProcess) {\n return [childrenToProcess, customOption];\n }\n\n return customOption;\n }, [\n allowsCustomValue,\n mergedChildren,\n searchValue,\n customKeys,\n localCollectionState.collection,\n customValueProps,\n newCustomValueProps,\n textFilterFn,\n filter,\n contains,\n t,\n ]);\n\n styles = extractStyles(otherProps, PROP_STYLES, styles);\n\n ref = useCombinedRefs(ref);\n searchInputRef = useCombinedRefs(searchInputRef);\n listRef = useCombinedRefs(listRef);\n\n const { isFocused, focusProps } = useFocus({ isDisabled });\n\n const listBoxRef = useRef<HTMLDivElement>(null);\n\n // Ref to access internal ListBox state (selection manager, etc.)\n const listStateRef = useRef<any>(null);\n\n // No separate focusedKey state needed; rely directly on selectionManager.focusedKey.\n\n // When the search value changes, the visible collection of items may change as well.\n // If the currently focused item is no longer visible, move virtual focus to the first\n // available item so that arrow navigation and Enter behaviour continue to work.\n // If there are no available items, reset the selection so Enter won't select anything.\n // Priority: focus on selected items first, then fall back to first visible item.\n useLayoutEffect(() => {\n const listState = listStateRef.current;\n\n if (!listState) return;\n\n const { selectionManager, collection } = listState;\n\n // Walk the collection and:\n // 1. Collect visible item keys (supports sections).\n // 2. Detect the synthetic \"new custom value\" option — the one generated\n // from the current search term when `allowsCustomValue` is true.\n //\n // The custom value is rendered in one of two layouts depending on whether\n // any real item text-matches the search term (`hasVisibleFilteredItems`\n // in `enhancedChildren`):\n // • Some items match → wrapped in a `__custom_value__` section\n // (`customValueHasMatches = true`)\n // • No items match → appended at the top level with key === term\n // (`customValueHasMatches = false`)\n //\n // The layout itself is the signal we use to decide whether the custom\n // value should be the focus target (no matches) or whether focus should\n // move to a real item (matches present).\n const term = searchValue.trim();\n let newCustomValueKey: Key | null = null;\n let customValueHasMatches = false;\n\n const collectVisibleKeys = (\n nodes: Iterable<any>,\n out: Key[],\n inCustomSection = false,\n ) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n out.push(node.key);\n if (inCustomSection) {\n newCustomValueKey = node.key;\n customValueHasMatches = true;\n }\n } else if (node.childNodes) {\n const isCustomSection =\n inCustomSection || node.key === '__custom_value__';\n collectVisibleKeys(node.childNodes, out, isCustomSection);\n }\n }\n };\n\n const visibleKeys: Key[] = [];\n collectVisibleKeys(collection, visibleKeys);\n\n // Detect the appended-at-top-level case (no items text-match). The custom\n // option is added with key === trimmed search term and lives directly in\n // the top-level collection (not nested in any section).\n if (newCustomValueKey == null && allowsCustomValue && term) {\n for (const node of collection) {\n if (node.type === 'item' && String(node.key) === term) {\n newCustomValueKey = node.key;\n customValueHasMatches = false;\n break;\n }\n }\n }\n\n // If there are no visible items, reset the focused key so Enter won't select anything\n if (visibleKeys.length === 0) {\n selectionManager.setFocusedKey(null);\n return;\n }\n\n // The custom value should be the focus target when it exists and there\n // are no real text-matches — the user's typed value is then the only\n // actionable option. During an in-flight server fetch (`filter === false`\n // + `isLoadingItems`) `textFilterFn` falls back to client-side `contains`\n // so non-matching stale items are hidden, which keeps this signal honest.\n const customValueShouldBeFocused =\n newCustomValueKey != null && !customValueHasMatches;\n\n // Decide whether the current focus is already on the right thing. If yes,\n // don't disturb it. Otherwise fall through and re-pick a focus target.\n const currentFocused = selectionManager.focusedKey;\n if (currentFocused != null && visibleKeys.includes(currentFocused)) {\n const currentIsNewCustomValue =\n newCustomValueKey != null && currentFocused === newCustomValueKey;\n if (customValueShouldBeFocused) {\n if (currentIsNewCustomValue) return;\n } else if (newCustomValueKey != null) {\n // Custom value exists but isn't the priority (matches available) —\n // any non-custom focus is fine.\n if (!currentIsNewCustomValue) return;\n } else {\n // No custom value involved at all.\n return;\n }\n }\n\n // Helper to find the first selected item that's visible\n const findFirstVisibleSelectedKey = (): Key | null => {\n if (selectionMode === 'single') {\n // Single selection: check if selectedKey is visible\n if (selectedKey != null) {\n const selectedKeyStr = String(selectedKey);\n if (visibleKeys.some((k) => String(k) === selectedKeyStr)) {\n return selectedKey;\n }\n }\n } else if (selectionMode === 'multiple') {\n // Multiple selection: find first selected key that's visible\n if (selectedKeys && selectedKeys !== 'all') {\n for (const key of selectedKeys) {\n const keyStr = String(key);\n if (visibleKeys.some((k) => String(k) === keyStr)) {\n return key;\n }\n }\n }\n }\n return null;\n };\n\n // Determine which key to focus\n let keyToFocus: Key | null = null;\n\n if (customValueShouldBeFocused) {\n // No real matches — promote the custom value over any selected/stale\n // item so the user can press Enter to add the value they just typed.\n keyToFocus = newCustomValueKey;\n } else {\n keyToFocus = findFirstVisibleSelectedKey();\n\n // Fallback to first visible item if no selected item found. Prefer the\n // first real (non-custom-value) item so focus doesn't land on the\n // bottom-of-list custom-value suggestion when real items are available.\n if (keyToFocus == null) {\n const firstRealKey = visibleKeys.find((k) => k !== newCustomValueKey);\n keyToFocus = firstRealKey ?? visibleKeys[0];\n }\n }\n\n // Mark this focus change as keyboard navigation so ListBox will scroll to it\n if (listState.lastFocusSourceRef) {\n listState.lastFocusSourceRef.current = 'keyboard';\n }\n\n // Set focus to the determined key\n selectionManager.setFocusedKey(keyToFocus);\n }, [\n searchValue,\n enhancedChildren,\n selectionMode,\n selectedKey,\n selectedKeys,\n allowsCustomValue,\n ]);\n\n // Keyboard navigation handler for search input\n const { keyboardProps } = useKeyboard({\n onKeyDown: (e) => {\n if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\n e.preventDefault();\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n const { selectionManager, collection } = listState;\n\n // Helper to collect visible item keys (supports sections)\n // Collection is already filtered by React Stately via filterFn\n const collectVisibleKeys = (nodes: Iterable<any>, out: Key[]) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n out.push(node.key);\n } else if (node.childNodes) {\n collectVisibleKeys(node.childNodes, out);\n }\n }\n };\n\n const visibleKeys: Key[] = [];\n collectVisibleKeys(collection, visibleKeys);\n\n if (visibleKeys.length === 0) return;\n\n const isArrowDown = e.key === 'ArrowDown';\n const direction = isArrowDown ? 1 : -1;\n\n const currentKey = selectionManager.focusedKey;\n\n let nextKey: Key | null = null;\n\n if (currentKey == null) {\n // If nothing focused yet, pick first/last depending on direction\n nextKey = isArrowDown\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n } else {\n const currentIndex = visibleKeys.indexOf(currentKey);\n if (currentIndex !== -1) {\n const newIndex = currentIndex + direction;\n if (newIndex >= 0 && newIndex < visibleKeys.length) {\n nextKey = visibleKeys[newIndex];\n } else if (shouldFocusWrap) {\n // Wrap around\n nextKey = isArrowDown\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n }\n } else {\n // Fallback\n nextKey = isArrowDown\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n }\n }\n\n if (nextKey != null) {\n // Mark this focus change as keyboard navigation\n if (listState.lastFocusSourceRef) {\n listState.lastFocusSourceRef.current = 'keyboard';\n }\n selectionManager.setFocusedKey(nextKey);\n }\n } else if (\n e.key === 'Home' ||\n e.key === 'End' ||\n e.key === 'PageUp' ||\n e.key === 'PageDown'\n ) {\n e.preventDefault();\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n const { selectionManager, collection } = listState;\n\n // Helper to collect visible item keys (supports sections)\n // Collection is already filtered by React Stately via filterFn\n const collectVisibleKeys = (nodes: Iterable<any>, out: Key[]) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n out.push(node.key);\n } else if (node.childNodes) {\n collectVisibleKeys(node.childNodes, out);\n }\n }\n };\n\n const visibleKeys: Key[] = [];\n collectVisibleKeys(collection, visibleKeys);\n\n if (visibleKeys.length === 0) return;\n\n const targetKey =\n e.key === 'Home' || e.key === 'PageUp'\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n\n // Mark this focus change as keyboard navigation\n if (listState.lastFocusSourceRef) {\n listState.lastFocusSourceRef.current = 'keyboard';\n }\n selectionManager.setFocusedKey(targetKey);\n } else if (e.key === 'Enter' || (e.key === ' ' && !searchValue)) {\n const listState = listStateRef.current;\n\n if (!listState) return;\n\n const keyToSelect = listState.selectionManager.focusedKey;\n\n if (keyToSelect != null) {\n e.preventDefault();\n listState.selectionManager.select(keyToSelect, e);\n\n if (\n e.key === 'Enter' &&\n isCheckable &&\n onEscape &&\n selectionMode === 'multiple'\n ) {\n onEscape();\n }\n }\n } else if (e.key === 'Escape') {\n if (searchValue) {\n // Clear the current search if any text is present.\n e.preventDefault();\n handleSearchChange('');\n } else {\n // Notify parent that Escape was pressed on an empty input.\n if (onEscape) {\n e.preventDefault();\n onEscape();\n }\n }\n }\n },\n });\n\n const mods = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: !!isDisabled,\n focused: isFocused,\n loading: !!isLoading,\n 'loading-items': !!isLoadingItems,\n searchable: true,\n prefix: !!isLoading,\n suffix: !!isLoadingItems,\n ...externalMods,\n }),\n [\n isInvalid,\n isInvalid,\n isValid,\n isDisabled,\n isFocused,\n isLoading,\n isLoadingItems,\n externalMods,\n ],\n );\n\n // Handler must be defined before we render ListBox so we can pass it.\n const handleSelectionChange = (selection: any) => {\n if (allowsCustomValue) {\n // Normalize current selection into an array of string keys\n let selectedValues: string[] = [];\n\n if (selection != null) {\n if (Array.isArray(selection)) {\n selectedValues = selection.map(String);\n } else {\n selectedValues = [String(selection)];\n }\n }\n\n // Build next custom keys set based on selected values\n const nextSet = new Set<string>();\n\n selectedValues.forEach((val) => {\n if (!originalKeys.has(val)) {\n nextSet.add(val);\n }\n });\n\n // Update internal custom keys state\n setCustomKeys(nextSet);\n }\n\n if (externalOnSelectionChange) {\n (externalOnSelectionChange as any)(selection);\n }\n };\n\n // Custom option click handler that ensures search input receives focus\n const handleOptionClick = (key: Key) => {\n // Focus the search input to enable keyboard navigation\n // Use setTimeout to ensure this happens after React state updates\n setTimeout(() => {\n if (searchInputRef.current) {\n searchInputRef.current.focus();\n }\n }, 0);\n\n // Call the original onOptionClick if provided\n if (onOptionClick) {\n onOptionClick(key);\n }\n };\n\n const searchInput = (\n <SearchWrapperElement mods={mods} data-size={size}>\n {isLoading && (\n <div data-element=\"Prefix\">\n <div data-element=\"InputIcon\">\n {isLoading ? <LoadingIcon /> : null}\n </div>\n </div>\n )}\n <SearchInputElement\n ref={searchInputRef}\n qa={qa || 'FilterListBox'}\n id={id}\n data-prefix={isLoading ? '' : undefined}\n data-suffix={isLoadingItems ? '' : undefined}\n type=\"search\"\n placeholder={searchPlaceholder}\n value={searchValue}\n disabled={isDisabled}\n autoFocus={autoFocus}\n data-autofocus={autoFocus ? '' : undefined}\n styles={searchInputStyles}\n data-size={size}\n data-input-type=\"filterlistbox\"\n role=\"combobox\"\n aria-expanded=\"true\"\n aria-haspopup=\"listbox\"\n aria-activedescendant={\n listStateRef.current?.selectionManager.focusedKey != null\n ? `ListBoxItem-${listStateRef.current?.selectionManager.focusedKey}`\n : undefined\n }\n onChange={(e) => {\n handleSearchChange(e.target.value);\n }}\n {...keyboardProps}\n {...modAttrs(mods)}\n />\n {isLoadingItems && (\n <div data-element=\"Suffix\">\n <LoadingIcon data-element=\"InputIcon\" />\n </div>\n )}\n </SearchWrapperElement>\n );\n\n const filterListBoxField = (\n <FilterListBoxWrapperElement\n ref={ref}\n qa=\"FilterListBoxWrapper\"\n {...modAttrs(mods)}\n styles={styles}\n {...focusProps}\n >\n {header ? (\n <StyledHeaderWithoutBorder data-size={size} styles={headerStyles}>\n {header}\n </StyledHeaderWithoutBorder>\n ) : (\n <div role=\"presentation\" />\n )}\n {searchInput}\n <ListBox\n ref={listBoxRef}\n aria-label={innerAriaLabel}\n selectedKey={selectedKey}\n defaultSelectedKey={defaultSelectedKey}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n selectionMode={selectionMode}\n isDisabled={isDisabled}\n listRef={listRef}\n stateRef={listStateRef}\n listStyles={listStyles}\n shouldFocusWrap={shouldFocusWrap}\n optionStyles={optionStyles}\n sectionStyles={sectionStyles}\n headingStyles={headingStyles}\n isInvalid={isInvalid}\n isValid={isValid}\n disallowEmptySelection={props.disallowEmptySelection}\n allowDuplicateSelectionEvents={props.allowDuplicateSelectionEvents}\n disabledKeys={props.disabledKeys}\n focusOnHover={focusOnHover}\n shouldUseVirtualFocus={!(isReorderable && !searchValue.trim())}\n showSelectAll={showSelectAll}\n selectAllLabel={selectAllLabel}\n footer={footer}\n footerStyles={footerStyles}\n mods={mods}\n styles={listBoxStyles}\n isCheckable={isCheckable}\n items={items as any}\n allValueProps={allValueProps}\n filter={filterFn}\n emptyLabel={\n emptyLabel !== undefined\n ? emptyLabel\n : searchValue.trim()\n ? t('filterListBox.noResults', 'No results found')\n : t('filterListBox.noItems', 'No items')\n }\n isReorderable={isReorderable && !searchValue.trim()}\n onReorder={onReorder}\n onSelectionChange={handleSelectionChange}\n onEscape={onEscape}\n onOptionClick={handleOptionClick}\n >\n {enhancedChildren as any}\n </ListBox>\n </FilterListBoxWrapperElement>\n );\n\n return wrapWithField<Omit<CubeFilterListBoxProps<T>, 'children'>>(\n filterListBoxField,\n ref,\n props,\n );\n}) as unknown as (<T>(\n props: CubeFilterListBoxProps<T> & { ref?: ForwardedRef<HTMLDivElement> },\n) => ReactElement) & { Item: typeof Item; Section: typeof BaseSection };\n\nFilterListBox.Item = Item;\n\nFilterListBox.Section = BaseSection;\n\nObject.defineProperty(FilterListBox, 'cubeInputType', {\n value: 'FilterListBox',\n enumerable: false,\n configurable: false,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAMgD,8BAA8B3C,MAAM,EACxC4C,QAAQ;CACNC,SAAS;CACTC,MAAM;CACNC,aAAa;CACbC,UAAU;CACVC,KAAK;CACLC,UAAU;CACVC,QAAQ;CACRC,OAAO;CACPC,YAAY;CACZC,SAAS;EACP,IAAI;EACJ,qBAAqB;EACrBC,SAAS;EACV;CACDC,QAAQ;EACN,IAAI;EACJD,SAAS;EACTE,OAAO;EACPC,SAAS;EACTC,UAAU;EACVC,SAAS;EACX;CACF,EACD,CAAC;AAEF,MAAMC,uBAAuB7D,MAAM;CACjC8D,IAAI;CACJlB,QAAQ;EACN,GAAGR;EACHoB,QAAQ;EACRL,QAAQ;EACRY,MAAM;EACNC,QAAQ;EACRC,OAAO;GACL,IAAI;GACJ,cAAc;GACd,eAAe;GACf,cAAc;GAChB;EACF;CACD,CAAC;AAEF,MAAMC,qBAAqBlE,MAAM;CAC/BmE,IAAI;CACJvB,QAAQ;EACN,GAAGT;EACH4B,MAAM;EACNK,SAAS;GACP,IAAI;GACJC,QAAQ;GACRC,QAAQ;GACR,mBAAmB;GACrB;EAC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;IACV,eAAegL;cAEd1D;KACM;;GAEZ,EAICxG,KACAD,MACD;EACD;AAIFD,cAAcvE,OAAOA;AAErBuE,cAAcpF,UAAUC;AAExBgQ,OAAOC,eAAe9K,eAAe,iBAAiB;CACpDH,OAAO;CACPkL,YAAY;CACZC,cAAc;CACf,CAAC"}
|
|
@@ -15,7 +15,7 @@ import { Placement } from "react-aria";
|
|
|
15
15
|
import { ListState, Section } from "react-stately";
|
|
16
16
|
|
|
17
17
|
//#region src/components/fields/FilterPicker/FilterPicker.d.ts
|
|
18
|
-
interface CubeFilterPickerProps<T> extends Omit<CubeFilterListBoxProps<T>, 'size' | '
|
|
18
|
+
interface CubeFilterPickerProps<T> extends Omit<CubeFilterListBoxProps<T>, 'size' | 'shape'>, Omit<CubeItemProps, 'children' | 'size' | 'tooltip'>, BasePropsWithoutChildren, BaseStyleProps, OuterStyleProps, ColorStyleProps, FieldBaseProps<string | number | readonly (string | number)[] | null | undefined>, Pick<CubeItemButtonProps, 'type' | 'theme' | 'icon' | 'rightIcon' | 'prefix' | 'suffix' | 'hotkeys' | 'shape'> {
|
|
19
19
|
/** Placeholder text when no selection is made */
|
|
20
20
|
placeholder?: string;
|
|
21
21
|
/** Size of the picker component */
|
|
@@ -37,9 +37,18 @@ interface CubeFilterPickerProps<T> extends Omit<CubeFilterListBoxProps<T>, 'size
|
|
|
37
37
|
* @default 'bottom start'
|
|
38
38
|
*/
|
|
39
39
|
placement?: Placement;
|
|
40
|
+
/**
|
|
41
|
+
* The ref of the element the popover should visually attach itself to.
|
|
42
|
+
* Defaults to the trigger button.
|
|
43
|
+
*
|
|
44
|
+
* Forwarded to `DialogTrigger`, so the anchor also becomes what outside-click
|
|
45
|
+
* dismissal treats as the trigger. The popover's `minWidth` stays tied to the
|
|
46
|
+
* trigger button, not to this element.
|
|
47
|
+
*/
|
|
48
|
+
targetRef?: RefObject<HTMLElement | null>;
|
|
40
49
|
/** Minimum padding in pixels between the popover and viewport edges */
|
|
41
50
|
containerPadding?: number;
|
|
42
|
-
/** Tooltip for the trigger button (separate from
|
|
51
|
+
/** Tooltip for the trigger button (separate from `labelTooltip`) */
|
|
43
52
|
triggerTooltip?: CubeItemProps['tooltip'];
|
|
44
53
|
/** Description for the trigger button (separate from field description) */
|
|
45
54
|
triggerDescription?: CubeItemProps['description'];
|