@cube-dev/ui-kit 0.176.0 → 0.178.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 +36 -0
- package/dist/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/Button.js +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +1 -1
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuSection.js +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/use-action.js +1 -1
- package/dist/components/actions/use-anchored-menu.js +1 -1
- package/dist/components/actions/use-context-menu.js +1 -1
- package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
- package/dist/components/content/Alert/Alert.js +1 -1
- package/dist/components/content/Alert/use-alert.js +1 -1
- package/dist/components/content/Avatar/Avatar.js +1 -1
- package/dist/components/content/Badge/Badge.js +1 -1
- package/dist/components/content/Card/Card.js +1 -1
- package/dist/components/content/Content.js +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +1 -1
- package/dist/components/content/Divider.js +1 -1
- package/dist/components/content/Footer.js +1 -1
- package/dist/components/content/Header.js +1 -1
- package/dist/components/content/HotKeys/HotKeys.js +1 -1
- package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
- package/dist/components/content/InlineInput/InlineInput.js +1 -1
- package/dist/components/content/Item/Item.js +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +39 -28
- package/dist/components/content/Layout/Layout.js.map +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +1 -1
- package/dist/components/content/Text.d.ts +14 -14
- package/dist/components/content/Text.js +1 -1
- package/dist/components/content/TextItem/TextItem.js +1 -1
- package/dist/components/content/Title.js +1 -1
- package/dist/components/content/Tree/Tree.js +1 -1
- package/dist/components/content/Tree/TreeNode.js +1 -1
- package/dist/components/content/Tree/styled.js +1 -1
- package/dist/components/content/Tree/tree-index.js +1 -1
- package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
- package/dist/components/content/Tree/use-load-data.js +3 -2
- package/dist/components/content/Tree/use-load-data.js.map +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.js +1 -1
- package/dist/components/data/DataTable/DataTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
- package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
- package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
- package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
- package/dist/components/data/TableBase/ColumnResizer.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableView.js +1 -1
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-tint.js +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/styled.js +1 -1
- package/dist/components/data/TableBase/table-tree.js +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- package/dist/components/data/TableBase/use-column-order.js +1 -1
- package/dist/components/data/TableBase/use-container-width.js +1 -1
- package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
- package/dist/components/data/TableBase/use-scrollability.js +1 -1
- package/dist/components/data/TableBase/use-table-columns.js +1 -1
- package/dist/components/data/TableBase/use-table-search.js +1 -1
- package/dist/components/data/TableBase/use-table-selection.js +1 -1
- package/dist/components/data/TableBase/use-table-sort.js +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +1 -1
- package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
- package/dist/components/fields/Checkbox/Checkbox.js +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ColorInput/ColorInput.js +1 -1
- package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
- package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DatePicker.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/period.js +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.d.ts +14 -0
- package/dist/components/fields/FilterPicker/FilterPicker.js +26 -13
- package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
- package/dist/components/fields/ListBox/ListBox.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
- package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/fields/Picker/Picker.d.ts +14 -0
- package/dist/components/fields/Picker/Picker.js +26 -13
- package/dist/components/fields/Picker/Picker.js.map +1 -1
- package/dist/components/fields/RadioGroup/Radio.js +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.d.ts +15 -1
- package/dist/components/fields/Select/Select.js +27 -6
- package/dist/components/fields/Select/Select.js.map +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/TextArea/TextArea.js +1 -1
- package/dist/components/fields/TextInput/TextInput.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js +1 -1
- package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/fields/TriggerActions.js +64 -0
- package/dist/components/fields/TriggerActions.js.map +1 -0
- package/dist/components/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/channels.js +7 -6
- package/dist/components/fields/color/channels.js.map +1 -1
- package/dist/components/fields/color/color.d.ts +1 -0
- package/dist/components/fields/color/color.js +22 -100
- package/dist/components/fields/color/color.js.map +1 -1
- package/dist/components/fields/color/context.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +3 -2
- package/dist/components/form/FieldWrapper/FieldWrapper.js.map +1 -1
- package/dist/components/form/Form/Field.js +1 -1
- package/dist/components/form/Form/Form.js +1 -1
- package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
- package/dist/components/form/Form/SubmitError.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/use-field/use-field-props.js +1 -1
- package/dist/components/form/Form/use-field/use-field-props.js.map +1 -1
- package/dist/components/form/Form/use-field/use-field.js +1 -1
- package/dist/components/form/Form/use-form.js +1 -1
- package/dist/components/form/Form/validation.js +1 -1
- package/dist/components/form/Label.js +1 -1
- package/dist/components/form/validation/ValidationIndicator.js +1 -1
- package/dist/components/form/validation/resolve-validation-props.js +1 -1
- package/dist/components/form/validation/use-validation-props.js +1 -1
- package/dist/components/form/wrapper.js +1 -1
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/layout/Board/Board.js +1 -1
- package/dist/components/layout/Board/BoardProvider.js +1 -1
- package/dist/components/layout/Board/BoardResponsive.js +1 -1
- package/dist/components/layout/Board/Widget.js +1 -1
- package/dist/components/layout/Board/WidgetHost.js +2 -2
- package/dist/components/layout/Board/WidgetHost.js.map +1 -1
- package/dist/components/layout/Board/board-context.js +1 -1
- package/dist/components/layout/Board/board-store.js +1 -1
- package/dist/components/layout/Board/grid-core/calculate.js +1 -1
- package/dist/components/layout/Board/grid-core/collision-modes.js +1 -1
- package/dist/components/layout/Board/grid-core/collision.js +1 -1
- package/dist/components/layout/Board/grid-core/compactors.js +1 -1
- package/dist/components/layout/Board/grid-core/constraints.js +1 -1
- package/dist/components/layout/Board/grid-core/group-move.js +1 -1
- package/dist/components/layout/Board/grid-core/layout.js +1 -1
- package/dist/components/layout/Board/grid-core/placement.js +1 -1
- package/dist/components/layout/Board/grid-core/sort.js +1 -1
- package/dist/components/layout/Board/index.js +1 -1
- package/dist/components/layout/Board/responsive-utils.js +1 -1
- package/dist/components/layout/Board/use-board-layout.js +1 -1
- package/dist/components/layout/Board/use-board-registry.js +1 -1
- package/dist/components/layout/Board/use-board-select-modifier-key.js +1 -1
- package/dist/components/layout/Board/use-board-selection.js +1 -1
- package/dist/components/layout/Flex.js +1 -1
- package/dist/components/layout/Flow.js +1 -1
- package/dist/components/layout/Grid.js +1 -1
- package/dist/components/layout/Panel.js +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +1 -1
- package/dist/components/navigation/Tabs/Tabs.d.ts +3 -0
- package/dist/components/navigation/Tabs/Tabs.js +10 -1
- package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/popover-placement.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +1 -1
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
- package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
- package/dist/components/other/Calendar/Calendar.js +1 -1
- package/dist/components/other/Calendar/CalendarCell.js +1 -1
- package/dist/components/other/Calendar/CalendarGrid.js +1 -1
- package/dist/components/other/Calendar/CalendarHeader.js +1 -1
- package/dist/components/other/Calendar/CalendarPanel.js +1 -1
- package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
- package/dist/components/other/Calendar/PeriodGrid.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/Calendar/styled.js +1 -1
- package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
- package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
- package/dist/components/overlays/Dialog/Dialog.js +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +2 -2
- package/dist/components/overlays/Dialog/DialogTrigger.js.map +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
- package/dist/components/overlays/Modal/Modal.js +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/Overlay.js +1 -1
- package/dist/components/overlays/Modal/Popover.js +1 -1
- package/dist/components/overlays/Modal/Tray.js +1 -1
- package/dist/components/overlays/Modal/Underlay.js +1 -1
- package/dist/components/overlays/Notifications/Notification.js +1 -1
- package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
- package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
- package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
- package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
- package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
- package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
- package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
- package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
- package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
- package/dist/components/overlays/Notifications/index.js +1 -1
- package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
- package/dist/components/overlays/Notifications/use-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
- package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
- package/dist/components/overlays/Toast/ToastItem.js +1 -1
- package/dist/components/overlays/Toast/index.js +1 -1
- package/dist/components/overlays/Toast/useProgressToast.js +1 -1
- package/dist/components/overlays/Toast/useToast.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipTrigger.js +3 -2
- package/dist/components/overlays/Tooltip/TooltipTrigger.js.map +1 -1
- package/dist/components/overlays/Tooltip/context.js +1 -1
- package/dist/components/portal/Portal.js +1 -1
- package/dist/components/portal/PortalProvider.js +1 -1
- package/dist/components/portal/usePortal.js +1 -1
- package/dist/components/shared/DraggableCollection.js +1 -1
- package/dist/components/shared/InvalidIcon.js +1 -1
- package/dist/components/shared/ValidIcon.js +1 -1
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- package/dist/components/status/Spin/Cube.js +1 -1
- package/dist/components/status/Spin/InternalSpinner.js +1 -1
- package/dist/components/status/Spin/Spin.js +1 -1
- package/dist/components/status/Spin/SpinsContainer.js +1 -1
- package/dist/data/item-themes.js +1 -1
- package/dist/data/themes.js +1 -1
- package/dist/eslint-plugin/defaults.generated.js +5 -1
- package/dist/eslint-plugin/defaults.generated.js.map +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/createFormatter.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +1 -1
- package/dist/i18n/locales/en-US/uikit.js +1 -1
- package/dist/i18n/locales/es-ES/uikit.js +1 -1
- package/dist/i18n/locales/es-MX/uikit.js +1 -1
- package/dist/i18n/locales/fr-FR/uikit.js +1 -1
- package/dist/i18n/locales/it-IT/uikit.js +1 -1
- package/dist/i18n/locales/ja-JP/uikit.js +1 -1
- package/dist/i18n/locales/nb-NO/uikit.js +1 -1
- package/dist/i18n/locales/pt-BR/uikit.js +1 -1
- package/dist/i18n/locales/pt-PT/uikit.js +1 -1
- package/dist/i18n/locales/sv-SE/uikit.js +1 -1
- package/dist/i18n/locales/vi-VN/uikit.js +1 -1
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/useFormatter.js +1 -1
- package/dist/i18n/useI18n.js +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
- package/dist/icons/AdjustmentsIcon.js +1 -1
- package/dist/icons/AiIcon.js +1 -1
- package/dist/icons/AreaChartIcon.js +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js +1 -1
- package/dist/icons/BackwardIcon.js +1 -1
- package/dist/icons/BarChartIcon.js +1 -1
- package/dist/icons/BellFilledIcon.js +1 -1
- package/dist/icons/BellIcon.js +1 -1
- package/dist/icons/BooleanIcon.js +1 -1
- package/dist/icons/CalendarEditIcon.js +1 -1
- package/dist/icons/CalendarIcon.js +1 -1
- package/dist/icons/CaretDownIcon.js +1 -1
- package/dist/icons/CaretUpIcon.js +1 -1
- package/dist/icons/ChartAreaStackedIcon.js +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarGroupedIcon.js +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarLineIcon.js +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js +1 -1
- package/dist/icons/ChartBoxPlotIcon.js +1 -1
- package/dist/icons/ChartBubbleIcon.js +1 -1
- package/dist/icons/ChartDonut2Icon.js +1 -1
- package/dist/icons/ChartFunnelIcon.js +1 -1
- package/dist/icons/ChartHeatmapIcon.js +1 -1
- package/dist/icons/ChartKPIIcon.js +1 -1
- package/dist/icons/ChartPie2Icon.js +1 -1
- package/dist/icons/ChartScatterIcon.js +1 -1
- package/dist/icons/CheckCircleFilledIcon.js +1 -1
- package/dist/icons/CheckCircleIcon.js +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CircleFilledIcon.js +1 -1
- package/dist/icons/ClearIcon.js +1 -1
- package/dist/icons/CloseCircleFilledIcon.js +1 -1
- package/dist/icons/CloseCircleIcon.js +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/CodeIcon.js +1 -1
- package/dist/icons/ColumnTotalIcon.js +1 -1
- package/dist/icons/CopyIcon.js +1 -1
- package/dist/icons/CountIcon.js +1 -1
- package/dist/icons/CubeIcon.js +1 -1
- package/dist/icons/CubePauseIcon.js +1 -1
- package/dist/icons/CubePlayIcon.js +1 -1
- package/dist/icons/CurrencyDollarIcon.js +1 -1
- package/dist/icons/DangerIcon.js +1 -1
- package/dist/icons/DashboardIcon.js +1 -1
- package/dist/icons/DatabaseIcon.js +1 -1
- package/dist/icons/DecimalDecreaseIcon.js +1 -1
- package/dist/icons/DecimalIncreaseIcon.js +1 -1
- package/dist/icons/DirectionIcon.js +1 -1
- package/dist/icons/DonutIcon.js +1 -1
- package/dist/icons/DownIcon.js +1 -1
- package/dist/icons/EditIcon.js +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
- package/dist/icons/ExclamationCircleIcon.js +1 -1
- package/dist/icons/ExclamationIcon.js +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeInvisibleIcon.js +1 -1
- package/dist/icons/FilterIcon.js +1 -1
- package/dist/icons/FolderFilledIcon.js +1 -1
- package/dist/icons/FolderIcon.js +1 -1
- package/dist/icons/FolderOpenFilledIcon.js +1 -1
- package/dist/icons/FolderOpenIcon.js +1 -1
- package/dist/icons/ForwardIcon.js +1 -1
- package/dist/icons/GripVerticalIcon.js +1 -1
- package/dist/icons/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/InfoCircleIcon.js +1 -1
- package/dist/icons/InfoIcon.js +1 -1
- package/dist/icons/KeyIcon.js +1 -1
- package/dist/icons/LeftIcon.js +1 -1
- package/dist/icons/LineChartIcon.js +1 -1
- package/dist/icons/LoadingIcon.js +1 -1
- package/dist/icons/LockFilledIcon.js +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/MoreIcon.js +1 -1
- package/dist/icons/NotAllowedIcon.js +1 -1
- package/dist/icons/Number123Icon.js +1 -1
- package/dist/icons/NumberIcon.js +1 -1
- package/dist/icons/PauseCircleFilledIcon.js +1 -1
- package/dist/icons/PauseCircleIcon.js +1 -1
- package/dist/icons/PauseIcon.js +1 -1
- package/dist/icons/PercentageIcon.js +1 -1
- package/dist/icons/PieChartIcon.js +1 -1
- package/dist/icons/PipetteIcon.js +1 -1
- package/dist/icons/PlayCircleIcon.js +1 -1
- package/dist/icons/PlayIcon.js +1 -1
- package/dist/icons/PlusIcon.js +1 -1
- package/dist/icons/ProgressBarIcon.js +1 -1
- package/dist/icons/ReloadIcon.js +1 -1
- package/dist/icons/ReportIcon.js +1 -1
- package/dist/icons/ReturnIcon.js +1 -1
- package/dist/icons/RightIcon.js +1 -1
- package/dist/icons/RowTotalsIcon.js +1 -1
- package/dist/icons/SchemeIcon.js +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/SemanticQueryIcon.js +1 -1
- package/dist/icons/SettingsIcon.js +1 -1
- package/dist/icons/ShieldFilledIcon.js +1 -1
- package/dist/icons/ShieldIcon.js +1 -1
- package/dist/icons/SlashIcon.js +1 -1
- package/dist/icons/SparklesIcon.js +1 -1
- package/dist/icons/SqlIcon.js +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/StopIcon.js +1 -1
- package/dist/icons/StringIcon.js +1 -1
- package/dist/icons/SubtotalsIcon.js +1 -1
- package/dist/icons/SwitchIcon.js +1 -1
- package/dist/icons/TableIcon.js +1 -1
- package/dist/icons/ThumbsDownIcon.js +1 -1
- package/dist/icons/ThumbsUpIcon.js +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js +1 -1
- package/dist/icons/ThunderboltFilledIcon.js +1 -1
- package/dist/icons/ThunderboltIcon.js +1 -1
- package/dist/icons/TimeIcon.js +1 -1
- package/dist/icons/TrashIcon.js +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UpIcon.js +1 -1
- package/dist/icons/UserGroupIcon.js +1 -1
- package/dist/icons/UserIcon.js +1 -1
- package/dist/icons/UserLockIcon.js +1 -1
- package/dist/icons/ViewIcon.js +1 -1
- package/dist/icons/WarningFilledIcon.js +1 -1
- package/dist/icons/WarningIcon.js +1 -1
- package/dist/icons/wrap-icon.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/probe/canonicalize.js +1 -1
- package/dist/probe/css.js +1 -1
- package/dist/probe/index.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/tokens/all-tokens.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/legacy-color.d.ts +61 -0
- package/dist/tokens/legacy-color.js +58 -0
- package/dist/tokens/legacy-color.js.map +1 -0
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +1 -1
- package/dist/tokens/resolve.js +1 -1
- package/dist/tokens/shadows.js +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/typography.js +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/colors.d.ts +2 -0
- package/dist/utils/colors.js +257 -0
- package/dist/utils/colors.js.map +1 -0
- package/dist/utils/is-dev-env.js +66 -8
- package/dist/utils/is-dev-env.js.map +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/disabledProps.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +3 -2
- package/dist/utils/react/sharedStore.js.map +1 -1
- package/dist/utils/react/useBufferedValue.js +1 -1
- package/dist/utils/react/useCombinedRefs.js +1 -1
- package/dist/utils/react/useControlledFocusVisible.js +1 -1
- package/dist/utils/react/useEventBus.js +1 -1
- package/dist/utils/react/useId.js +1 -1
- package/dist/utils/react/useIsDarwin.js +1 -1
- package/dist/utils/react/useKeySymbols.js +1 -1
- package/dist/utils/react/useLayoutEffect.js +1 -1
- package/dist/utils/react/useLocalStorage.js +1 -1
- package/dist/utils/react/useMergeStyles.js +1 -1
- package/dist/utils/react/usePopoverSync.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useScheme.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +5 -2
- package/dist/utils/warnings.js.map +1 -1
- package/dist/version.js +2 -2
- package/docs/Usage.md +18 -0
- package/docs/components/fields/FilterPicker.md +45 -0
- package/docs/components/fields/Picker.md +47 -0
- package/docs/components/fields/Select.md +43 -0
- package/docs/components/navigation/Tabs.md +19 -1
- package/docs/components/overlays/DialogTrigger.md +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.js","names":[],"sources":["../../../../src/components/content/Layout/Layout.tsx"],"sourcesContent":["import { useResizeObserver } from '@react-aria/utils';\nimport {\n BaseProps,\n BlockStyleProps,\n ColorStyleProps,\n filterBaseProps,\n FlowStyleProps,\n INNER_STYLES,\n mergeStyles,\n OUTER_STYLES,\n OuterStyleProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n CSSProperties,\n FocusEvent,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n KeyboardEvent,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { isDevEnv } from '../../../utils/is-dev-env';\nimport { useCombinedRefs } from '../../../utils/react';\nimport { extractStyles } from '../../../utils/styles';\nimport { Alert } from '../Alert';\n\nimport {\n LayoutProvider,\n useLayoutActionsContext,\n useLayoutRefsContext,\n useLayoutStateContext,\n} from './LayoutContext';\n\nconst LayoutElement = tasty({\n as: 'div',\n qa: 'Layout',\n styles: {\n position: 'relative',\n display: 'block',\n overflow: {\n '': 'visible',\n 'do-not-overflow': 'hidden',\n },\n flexGrow: 1,\n placeSelf: 'stretch',\n height: {\n '': 'auto',\n 'auto-height': 'fixed 100%',\n collapsed: '6x',\n },\n\n '$content-padding': '1x',\n // Auto-border size for sub-components (set when layout is vertical)\n '$layout-border-size': {\n '': '0',\n vertical: '1bw',\n },\n\n Inner: {\n // .base-class[data-hover] > [data-element=\"Inner\"] { ...}\n // Direct child selector required for nested layouts\n $: '>',\n container: 'layout / inline-size',\n position: 'absolute',\n inset: '$inset-top $inset-right $inset-bottom $inset-left',\n display: 'flex',\n flow: 'column',\n placeContent: 'stretch',\n placeItems: 'stretch',\n // Disable transition during panel resize for snappy feedback\n // Also disable transition when not ready to prevent initial animation\n // Only animate when has-transition is enabled (and not dragging/not-ready)\n transition: {\n '': 'none',\n 'has-transition': 'inset $transition ease-out',\n 'dragging | not-ready': 'none',\n },\n },\n },\n});\n\nexport interface CubeLayoutProps\n extends BaseProps,\n OuterStyleProps,\n BlockStyleProps,\n ColorStyleProps,\n FlowStyleProps {\n /** Switch to grid display mode */\n isGrid?: boolean;\n /** Grid template columns (when isGrid=true) */\n columns?: Styles['gridColumns'];\n /** Grid template rows (when isGrid=true) */\n rows?: Styles['gridRows'];\n /** Grid template shorthand */\n template?: Styles['gridTemplate'];\n /** Padding for content areas (Layout.Content components). Default: '1x' */\n contentPadding?: Styles['padding'];\n /** Enable transition animation for Inner content when panels open/close */\n hasTransition?: boolean;\n /** Minimum size reserved for the content area between panels. Default: 320 */\n minContentSize?: number;\n /** Styles for wrapper and Inner sub-element */\n styles?: Styles;\n children?: ReactNode;\n /** Ref for the inner content element */\n innerRef?: ForwardedRef<HTMLDivElement>;\n /** Props to spread on the Inner sub-element */\n innerProps?: HTMLAttributes<HTMLDivElement>;\n /**\n * @internal Force show dev warning even in production (for storybook testing)\n */\n _forceShowDevWarning?: boolean;\n /**\n * When true, applies overflow: hidden to the root element.\n * By default, overflow is visible.\n */\n doNotOverflow?: boolean;\n}\n\nfunction LayoutInner(\n props: CubeLayoutProps & { forwardedRef?: ForwardedRef<HTMLDivElement> },\n) {\n const layoutActions = useLayoutActionsContext();\n const layoutState = useLayoutStateContext();\n const layoutRefs = useLayoutRefsContext();\n const localRef = useRef<HTMLDivElement>(null);\n const [isAutoHeight, setIsAutoHeight] = useState(false);\n const [isCollapsed, setIsCollapsed] = useState(false);\n\n const {\n isGrid,\n columns,\n rows,\n template,\n contentPadding,\n hasTransition = false,\n minContentSize,\n styles,\n children,\n style,\n forwardedRef,\n innerRef: innerRefProp,\n innerProps,\n _forceShowDevWarning,\n doNotOverflow,\n ...otherProps\n } = props;\n\n const combinedInnerRef = useCombinedRefs(innerRefProp);\n const updateContainerSize = layoutActions?.updateContainerSize;\n\n useResizeObserver({\n ref: localRef,\n onResize: useCallback(() => {\n if (localRef.current) {\n updateContainerSize?.(\n localRef.current.offsetWidth,\n localRef.current.offsetHeight,\n );\n }\n }, [updateContainerSize]),\n });\n\n // Extract outer wrapper styles and inner content styles\n const outerStyles = extractStyles(otherProps, OUTER_STYLES);\n const innerStyles = extractStyles(otherProps, INNER_STYLES);\n\n // Calculate if the layout flow is vertical (for auto-border feature)\n // Default flow is 'column' (vertical), only horizontal when explicitly set to 'row'\n const isVertical = useMemo(() => {\n const flowFromProp = innerStyles?.flow;\n const flowFromStyles = (styles?.Inner as Record<string, unknown>)?.flow;\n const flowValue = flowFromProp ?? flowFromStyles;\n\n return typeof flowValue !== 'string' || !flowValue.startsWith('row');\n }, [innerStyles?.flow, styles?.Inner]);\n\n // Merge styles using the same pattern as LayoutPane\n const finalStyles = useMemo(() => {\n // Handle grid mode and grid properties\n const gridStyles: Styles = {};\n\n if (isGrid) {\n gridStyles.display = 'grid';\n }\n\n if (columns) {\n gridStyles.gridColumns = columns;\n }\n\n if (rows) {\n gridStyles.gridRows = rows;\n }\n\n if (template) {\n gridStyles.gridTemplate = template;\n }\n\n return mergeStyles(\n outerStyles,\n contentPadding != null ? { '$content-padding': contentPadding } : null,\n styles,\n { Inner: mergeStyles(innerStyles, gridStyles, styles?.Inner as Styles) },\n );\n }, [\n outerStyles,\n innerStyles,\n contentPadding,\n styles,\n isGrid,\n columns,\n rows,\n template,\n ]);\n\n // Calculate inset values from panel sizes\n const panelSizes = layoutState?.panelSizes ?? {\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n };\n\n const isDragging = layoutState?.isDragging ?? false;\n const isReady = layoutState?.isReady ?? true;\n const markReady = layoutActions?.markReady;\n const dismissOverlayPanels = layoutActions?.dismissOverlayPanels;\n const hasOverlayPanels = layoutState?.hasOverlayPanels ?? false;\n\n // Mark layout as ready after first paint\n // Using useEffect + requestAnimationFrame ensures:\n // 1. Panels register in useLayoutEffect → correct insets before first paint\n // 2. First paint with not-ready=true (transition disabled)\n // 3. After paint completes → enables transitions for subsequent changes\n useEffect(() => {\n const frameId = requestAnimationFrame(() => {\n markReady?.();\n });\n\n return () => cancelAnimationFrame(frameId);\n }, [markReady]);\n\n // Auto-height detection: if layout collapses to 0 height after initialization,\n // automatically set height to 100% to prevent invisible layout\n useEffect(() => {\n if (isReady && localRef.current && localRef.current.offsetHeight === 0) {\n setIsAutoHeight(true);\n }\n }, [isReady]);\n\n // Second check: if still 0 height after auto-height was applied,\n // show collapsed state with warning\n useEffect(() => {\n if (isAutoHeight && localRef.current) {\n // Use requestAnimationFrame to check after styles have been applied\n const frameId = requestAnimationFrame(() => {\n if (localRef.current && localRef.current.offsetHeight === 0) {\n setIsCollapsed(true);\n }\n });\n\n return () => cancelAnimationFrame(frameId);\n }\n }, [isAutoHeight]);\n\n const insetStyle = useMemo(() => {\n const baseStyle: Record<string, string> = {\n '--inset-top': `${panelSizes.top}px`,\n '--inset-right': `${panelSizes.right}px`,\n '--inset-bottom': `${panelSizes.bottom}px`,\n '--inset-left': `${panelSizes.left}px`,\n };\n\n if (style) {\n return { ...baseStyle, ...style } as CSSProperties;\n }\n\n return baseStyle as CSSProperties;\n }, [panelSizes, style]);\n\n const mods = useMemo(\n () => ({\n dragging: isDragging,\n 'not-ready': !isReady,\n 'has-transition': hasTransition,\n 'auto-height': isAutoHeight && !isCollapsed,\n collapsed: isCollapsed,\n vertical: isVertical,\n 'do-not-overflow': doNotOverflow,\n }),\n [\n isDragging,\n isReady,\n hasTransition,\n isAutoHeight,\n isCollapsed,\n isVertical,\n doNotOverflow,\n ],\n );\n\n // Combine local ref with forwarded ref\n const setRefs = (element: HTMLDivElement | null) => {\n localRef.current = element;\n\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n };\n\n // Show dev warning when collapsed and in dev mode (or forced for stories)\n const showDevWarning = isCollapsed && (_forceShowDevWarning || isDevEnv());\n\n // Handle focus entering the Inner element - dismiss overlay panels\n const handleInnerFocus = useCallback(\n (e: FocusEvent<HTMLDivElement>) => {\n // Only dismiss if there are overlay panels\n if (!hasOverlayPanels) return;\n\n // Check if focus is coming from outside the Inner element\n const inner = e.currentTarget;\n const relatedTarget = e.relatedTarget as Node | null;\n\n // If relatedTarget is null or not inside the Inner element,\n // focus is entering from outside - dismiss overlay panels\n if (!relatedTarget || !inner.contains(relatedTarget)) {\n dismissOverlayPanels?.();\n }\n },\n [hasOverlayPanels, dismissOverlayPanels],\n );\n\n // Handle Escape key anywhere in the Layout - dismiss overlay panels\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n if (hasOverlayPanels && e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n dismissOverlayPanels?.();\n }\n },\n [hasOverlayPanels, dismissOverlayPanels],\n );\n\n return (\n <LayoutElement\n ref={setRefs}\n {...filterBaseProps(otherProps, { eventProps: true })}\n mods={mods}\n styles={finalStyles}\n style={insetStyle}\n onKeyDown={hasOverlayPanels ? handleKeyDown : undefined}\n >\n {showDevWarning ? (\n <Alert theme=\"danger\">\n <b>UIKit:</b> <b><Layout/></b> has collapsed to <b>0</b> height.\n Ensure the parent container has a defined height or use the{' '}\n <b>height</b> prop on <b><Layout/></b>.\n </Alert>\n ) : (\n <>\n {/* All children go inside the Inner element - panels will portal themselves out */}\n <div\n ref={combinedInnerRef}\n data-element=\"Inner\"\n onFocus={handleInnerFocus}\n {...innerProps}\n >\n {children}\n </div>\n {/* Container for panels to portal into - rendered after Inner so panels paint on top via DOM order */}\n <div\n ref={layoutRefs?.setPanelContainer}\n data-element=\"PanelContainer\"\n />\n </>\n )}\n </LayoutElement>\n );\n}\n\n/**\n * Layout component provides a vertical flex layout with overflow-safe content.\n * Uses a two-element architecture (wrapper + content) to ensure content never overflows.\n */\nfunction Layout(props: CubeLayoutProps, ref: ForwardedRef<HTMLDivElement>) {\n const { hasTransition, minContentSize } = props;\n\n return (\n <LayoutProvider\n hasTransition={hasTransition}\n minContentSize={minContentSize}\n >\n <LayoutInner {...props} forwardedRef={ref} />\n </LayoutProvider>\n );\n}\n\nconst _Layout = forwardRef(Layout);\n\n_Layout.displayName = 'Layout';\n\nexport { _Layout as Layout };\n"],"mappings":";;;;;;;;;;;;AAyCA,MAAM,gBAAgB,MAAM;CAC1B,IAAI;CACJ,IAAI;CACJ,QAAQ;EACN,UAAU;EACV,SAAS;EACT,UAAU;GACR,IAAI;GACJ,mBAAmB;GACpB;EACD,UAAU;EACV,WAAW;EACX,QAAQ;GACN,IAAI;GACJ,eAAe;GACf,WAAW;GACZ;EAED,oBAAoB;EAEpB,uBAAuB;GACrB,IAAI;GACJ,UAAU;GACX;EAED,OAAO;GAGL,GAAG;GACH,WAAW;GACX,UAAU;GACV,OAAO;GACP,SAAS;GACT,MAAM;GACN,cAAc;GACd,YAAY;GAIZ,YAAY;IACV,IAAI;IACJ,kBAAkB;IAClB,wBAAwB;IACzB;GACF;EACF;CACF,CAAC;AAwCF,SAAS,YACP,OACA;CACA,MAAM,gBAAgB,yBAAyB;CAC/C,MAAM,cAAc,uBAAuB;CAC3C,MAAM,aAAa,sBAAsB;CACzC,MAAM,WAAW,OAAuB,KAAK;CAC7C,MAAM,CAAC,cAAc,mBAAmB,SAAS,MAAM;CACvD,MAAM,CAAC,aAAa,kBAAkB,SAAS,MAAM;CAErD,MAAM,EACJ,QACA,SACA,MACA,UACA,gBACA,gBAAgB,OAChB,gBACA,QACA,UACA,OACA,cACA,UAAU,cACV,YACA,sBACA,eACA,GAAG,eACD;CAEJ,MAAM,mBAAmB,gBAAgB,aAAa;CACtD,MAAM,sBAAsB,eAAe;AAE3C,mBAAkB;EAChB,KAAK;EACL,UAAU,kBAAkB;AAC1B,OAAI,SAAS,QACX,uBACE,SAAS,QAAQ,aACjB,SA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,WAAW,mBAAmB,gBAAgB;YAE7C,iBACC,qBAAC;GAAM,OAAM;;IACX,oBAAC,iBAAE,WAAU;;IAAC,oBAAC,iBAAE,cAAmB;;IAAkB,oBAAC,iBAAE,MAAK;;IACF;IAC5D,oBAAC,iBAAE,WAAU;;IAAS,oBAAC,iBAAE,cAAmB;;;IACtC,GAER,8CAEE,oBAAC;GACC,KAAK;GACL,gBAAa;GACb,SAAS;GACT,GAAI;GAEH;IACG,EAEN,oBAAC;GACC,KAAK,YAAY;GACjB,gBAAa;IACb,IACD;GAES;;;;;;AAQpB,SAAS,OAAO,OAAwB,KAAmC;CACzE,MAAM,EAAE,eAAe,mBAAmB;AAE1C,QACE,oBAAC;EACgB;EACC;YAEhB,oBAAC;GAAY,GAAI;GAAO,cAAc;IAAO;GAC9B;;AAIrB,MAAM,UAAU,WAAW,OAAO;AAElC,QAAQ,cAAc"}
|
|
1
|
+
{"version":3,"file":"Layout.js","names":[],"sources":["../../../../src/components/content/Layout/Layout.tsx"],"sourcesContent":["import { useResizeObserver } from '@react-aria/utils';\nimport {\n BaseProps,\n BlockStyleProps,\n ColorStyleProps,\n filterBaseProps,\n FlowStyleProps,\n INNER_STYLES,\n mergeStyles,\n OUTER_STYLES,\n OuterStyleProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n CSSProperties,\n FocusEvent,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n KeyboardEvent,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { isDevEnv } from '../../../utils/is-dev-env';\nimport { useCombinedRefs } from '../../../utils/react';\nimport { extractStyles } from '../../../utils/styles';\nimport { Alert } from '../Alert';\n\nimport {\n LayoutProvider,\n useLayoutActionsContext,\n useLayoutRefsContext,\n useLayoutStateContext,\n} from './LayoutContext';\n\nconst LayoutElement = tasty({\n as: 'div',\n qa: 'Layout',\n styles: {\n position: 'relative',\n display: 'block',\n overflow: {\n '': 'visible',\n 'do-not-overflow': 'hidden',\n },\n flexGrow: 1,\n placeSelf: 'stretch',\n height: {\n '': 'auto',\n 'auto-height': 'fixed 100%',\n collapsed: '6x',\n },\n\n '$content-padding': '1x',\n // Auto-border size for sub-components (set when layout is vertical)\n '$layout-border-size': {\n '': '0',\n vertical: '1bw',\n },\n\n Inner: {\n // .base-class[data-hover] > [data-element=\"Inner\"] { ...}\n // Direct child selector required for nested layouts\n $: '>',\n container: 'layout / inline-size',\n position: 'absolute',\n inset: '$inset-top $inset-right $inset-bottom $inset-left',\n display: 'flex',\n flow: 'column',\n placeContent: 'stretch',\n placeItems: 'stretch',\n // Disable transition during panel resize for snappy feedback\n // Also disable transition when not ready to prevent initial animation\n // Only animate when has-transition is enabled (and not dragging/not-ready)\n transition: {\n '': 'none',\n 'has-transition': 'inset $transition ease-out',\n 'dragging | not-ready': 'none',\n },\n },\n },\n});\n\n// The collapse warning sits on top of `Inner` rather than in place of it.\n// `Inner` is absolutely positioned, so an in-flow sibling would paint beneath\n// it; match its box and take the layer above.\nconst DEV_WARNING_STYLES: Styles = {\n position: 'absolute',\n inset: '0',\n zIndex: 1,\n overflow: 'auto',\n};\n\nexport interface CubeLayoutProps\n extends BaseProps,\n OuterStyleProps,\n BlockStyleProps,\n ColorStyleProps,\n FlowStyleProps {\n /** Switch to grid display mode */\n isGrid?: boolean;\n /** Grid template columns (when isGrid=true) */\n columns?: Styles['gridColumns'];\n /** Grid template rows (when isGrid=true) */\n rows?: Styles['gridRows'];\n /** Grid template shorthand */\n template?: Styles['gridTemplate'];\n /** Padding for content areas (Layout.Content components). Default: '1x' */\n contentPadding?: Styles['padding'];\n /** Enable transition animation for Inner content when panels open/close */\n hasTransition?: boolean;\n /** Minimum size reserved for the content area between panels. Default: 320 */\n minContentSize?: number;\n /** Styles for wrapper and Inner sub-element */\n styles?: Styles;\n children?: ReactNode;\n /** Ref for the inner content element */\n innerRef?: ForwardedRef<HTMLDivElement>;\n /** Props to spread on the Inner sub-element */\n innerProps?: HTMLAttributes<HTMLDivElement>;\n /**\n * @internal Force show dev warning even in production (for storybook testing)\n */\n _forceShowDevWarning?: boolean;\n /**\n * When true, applies overflow: hidden to the root element.\n * By default, overflow is visible.\n */\n doNotOverflow?: boolean;\n}\n\nfunction LayoutInner(\n props: CubeLayoutProps & { forwardedRef?: ForwardedRef<HTMLDivElement> },\n) {\n const layoutActions = useLayoutActionsContext();\n const layoutState = useLayoutStateContext();\n const layoutRefs = useLayoutRefsContext();\n const localRef = useRef<HTMLDivElement>(null);\n const [isAutoHeight, setIsAutoHeight] = useState(false);\n const [isCollapsed, setIsCollapsed] = useState(false);\n\n const {\n isGrid,\n columns,\n rows,\n template,\n contentPadding,\n hasTransition = false,\n minContentSize,\n styles,\n children,\n style,\n forwardedRef,\n innerRef: innerRefProp,\n innerProps,\n _forceShowDevWarning,\n doNotOverflow,\n ...otherProps\n } = props;\n\n const combinedInnerRef = useCombinedRefs(innerRefProp);\n const updateContainerSize = layoutActions?.updateContainerSize;\n\n useResizeObserver({\n ref: localRef,\n onResize: useCallback(() => {\n if (localRef.current) {\n updateContainerSize?.(\n localRef.current.offsetWidth,\n localRef.current.offsetHeight,\n );\n }\n }, [updateContainerSize]),\n });\n\n // Extract outer wrapper styles and inner content styles\n const outerStyles = extractStyles(otherProps, OUTER_STYLES);\n const innerStyles = extractStyles(otherProps, INNER_STYLES);\n\n // Calculate if the layout flow is vertical (for auto-border feature)\n // Default flow is 'column' (vertical), only horizontal when explicitly set to 'row'\n const isVertical = useMemo(() => {\n const flowFromProp = innerStyles?.flow;\n const flowFromStyles = (styles?.Inner as Record<string, unknown>)?.flow;\n const flowValue = flowFromProp ?? flowFromStyles;\n\n return typeof flowValue !== 'string' || !flowValue.startsWith('row');\n }, [innerStyles?.flow, styles?.Inner]);\n\n // Merge styles using the same pattern as LayoutPane\n const finalStyles = useMemo(() => {\n // Handle grid mode and grid properties\n const gridStyles: Styles = {};\n\n if (isGrid) {\n gridStyles.display = 'grid';\n }\n\n if (columns) {\n gridStyles.gridColumns = columns;\n }\n\n if (rows) {\n gridStyles.gridRows = rows;\n }\n\n if (template) {\n gridStyles.gridTemplate = template;\n }\n\n return mergeStyles(\n outerStyles,\n contentPadding != null ? { '$content-padding': contentPadding } : null,\n styles,\n { Inner: mergeStyles(innerStyles, gridStyles, styles?.Inner as Styles) },\n );\n }, [\n outerStyles,\n innerStyles,\n contentPadding,\n styles,\n isGrid,\n columns,\n rows,\n template,\n ]);\n\n // Calculate inset values from panel sizes\n const panelSizes = layoutState?.panelSizes ?? {\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n };\n\n const isDragging = layoutState?.isDragging ?? false;\n const isReady = layoutState?.isReady ?? true;\n const markReady = layoutActions?.markReady;\n const dismissOverlayPanels = layoutActions?.dismissOverlayPanels;\n const hasOverlayPanels = layoutState?.hasOverlayPanels ?? false;\n\n // Mark layout as ready after first paint\n // Using useEffect + requestAnimationFrame ensures:\n // 1. Panels register in useLayoutEffect → correct insets before first paint\n // 2. First paint with not-ready=true (transition disabled)\n // 3. After paint completes → enables transitions for subsequent changes\n useEffect(() => {\n const frameId = requestAnimationFrame(() => {\n markReady?.();\n });\n\n return () => cancelAnimationFrame(frameId);\n }, [markReady]);\n\n // Auto-height detection: if layout collapses to 0 height after initialization,\n // automatically set height to 100% to prevent invisible layout\n useEffect(() => {\n if (isReady && localRef.current && localRef.current.offsetHeight === 0) {\n setIsAutoHeight(true);\n }\n }, [isReady]);\n\n // Second check: if still 0 height after auto-height was applied,\n // show collapsed state with warning\n useEffect(() => {\n if (isAutoHeight && localRef.current) {\n // Use requestAnimationFrame to check after styles have been applied\n const frameId = requestAnimationFrame(() => {\n if (localRef.current && localRef.current.offsetHeight === 0) {\n setIsCollapsed(true);\n }\n });\n\n return () => cancelAnimationFrame(frameId);\n }\n }, [isAutoHeight]);\n\n const insetStyle = useMemo(() => {\n const baseStyle: Record<string, string> = {\n '--inset-top': `${panelSizes.top}px`,\n '--inset-right': `${panelSizes.right}px`,\n '--inset-bottom': `${panelSizes.bottom}px`,\n '--inset-left': `${panelSizes.left}px`,\n };\n\n if (style) {\n return { ...baseStyle, ...style } as CSSProperties;\n }\n\n return baseStyle as CSSProperties;\n }, [panelSizes, style]);\n\n const mods = useMemo(\n () => ({\n dragging: isDragging,\n 'not-ready': !isReady,\n 'has-transition': hasTransition,\n 'auto-height': isAutoHeight && !isCollapsed,\n collapsed: isCollapsed,\n vertical: isVertical,\n 'do-not-overflow': doNotOverflow,\n }),\n [\n isDragging,\n isReady,\n hasTransition,\n isAutoHeight,\n isCollapsed,\n isVertical,\n doNotOverflow,\n ],\n );\n\n // Combine local ref with forwarded ref\n const setRefs = (element: HTMLDivElement | null) => {\n localRef.current = element;\n\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n };\n\n // Show dev warning when collapsed and in dev mode (or forced for stories)\n const showDevWarning = isCollapsed && (_forceShowDevWarning || isDevEnv());\n\n // Handle focus entering the Inner element - dismiss overlay panels\n const handleInnerFocus = useCallback(\n (e: FocusEvent<HTMLDivElement>) => {\n // Only dismiss if there are overlay panels\n if (!hasOverlayPanels) return;\n\n // Check if focus is coming from outside the Inner element\n const inner = e.currentTarget;\n const relatedTarget = e.relatedTarget as Node | null;\n\n // If relatedTarget is null or not inside the Inner element,\n // focus is entering from outside - dismiss overlay panels\n if (!relatedTarget || !inner.contains(relatedTarget)) {\n dismissOverlayPanels?.();\n }\n },\n [hasOverlayPanels, dismissOverlayPanels],\n );\n\n // Handle Escape key anywhere in the Layout - dismiss overlay panels\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n if (hasOverlayPanels && e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n dismissOverlayPanels?.();\n }\n },\n [hasOverlayPanels, dismissOverlayPanels],\n );\n\n return (\n <LayoutElement\n ref={setRefs}\n {...filterBaseProps(otherProps, { eventProps: true })}\n mods={mods}\n styles={finalStyles}\n style={insetStyle}\n onKeyDown={hasOverlayPanels ? handleKeyDown : undefined}\n >\n {/* All children go inside the Inner element - panels will portal themselves out */}\n <div\n ref={combinedInnerRef}\n data-element=\"Inner\"\n onFocus={handleInnerFocus}\n {...innerProps}\n >\n {children}\n </div>\n {/* Container for panels to portal into - rendered after Inner so panels paint on top via DOM order */}\n <div ref={layoutRefs?.setPanelContainer} data-element=\"PanelContainer\" />\n {/* Overlaid, never substituted for `children`. A zero-height measurement is\n not proof of a mistake - a hidden tab, a collapsed accordion and a\n container mid-animation all measure zero - so unmounting the subtree\n would turn a wrong guess into an outage, and remounting it on the way\n back would drop whatever state it held. */}\n {showDevWarning ? (\n <Alert theme=\"danger\" styles={DEV_WARNING_STYLES}>\n <b>UIKit:</b> <b><Layout/></b> has collapsed to <b>0</b> height.\n Ensure the parent container has a defined height or use the{' '}\n <b>height</b> prop on <b><Layout/></b>.\n </Alert>\n ) : null}\n </LayoutElement>\n );\n}\n\n/**\n * Layout component provides a vertical flex layout with overflow-safe content.\n * Uses a two-element architecture (wrapper + content) to ensure content never overflows.\n */\nfunction Layout(props: CubeLayoutProps, ref: ForwardedRef<HTMLDivElement>) {\n const { hasTransition, minContentSize } = props;\n\n return (\n <LayoutProvider\n hasTransition={hasTransition}\n minContentSize={minContentSize}\n >\n <LayoutInner {...props} forwardedRef={ref} />\n </LayoutProvider>\n );\n}\n\nconst _Layout = forwardRef(Layout);\n\n_Layout.displayName = 'Layout';\n\nexport { _Layout as Layout };\n"],"mappings":";;;;;;;;;;;;AAyCA,MAAM,gBAAgB,MAAM;CAC1B,IAAI;CACJ,IAAI;CACJ,QAAQ;EACN,UAAU;EACV,SAAS;EACT,UAAU;GACR,IAAI;GACJ,mBAAmB;GACpB;EACD,UAAU;EACV,WAAW;EACX,QAAQ;GACN,IAAI;GACJ,eAAe;GACf,WAAW;GACZ;EAED,oBAAoB;EAEpB,uBAAuB;GACrB,IAAI;GACJ,UAAU;GACX;EAED,OAAO;GAGL,GAAG;GACH,WAAW;GACX,UAAU;GACV,OAAO;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,UAAU,WAAW,OAAO;AAElC,QAAQ,cAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { LayoutContextReset } from "./LayoutContext.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { LayoutContextReset } from "./LayoutContext.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { createContext, useContext, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { _LayoutContent } from "./LayoutContent.js";
|
|
3
3
|
import { tasty } from "@tenphi/tasty";
|
|
4
4
|
import { forwardRef, useMemo } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { useAutoTooltip } from "../use-auto-tooltip.js";
|
|
3
3
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
4
4
|
import { Button } from "../../actions/Button/Button.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
|
|
4
4
|
import { _Item } from "../Item/Item.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { LayoutActionsContext, LayoutContextReset, LayoutPanelContext, LayoutRefsContext, LayoutStateContext, useLayoutActionsContext, useLayoutPanelContext, useLayoutRefsContext, useLayoutStateContext } from "./LayoutContext.js";
|
|
3
3
|
import { _Layout } from "./Layout.js";
|
|
4
4
|
import { _LayoutContent } from "./LayoutContent.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { _Text } from "./Text.js";
|
|
4
4
|
import { CONTAINER_STYLES, TEXT_STYLES } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
4
4
|
import { CONTAINER_STYLES, filterBaseProps, keyframes, tasty } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { RendererPrism, ensureYamlSqlExtensions } from "./prismSetup.js";
|
|
3
3
|
import { CONTAINER_STYLES, tasty } from "@tenphi/tasty";
|
|
4
4
|
import { forwardRef } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { wrapNodeIfPlain } from "../../../utils/react/wrapNodeIfPlain.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { Space } from "../../layout/Space.js";
|
|
3
3
|
import { Grid } from "../../layout/Grid.js";
|
|
4
4
|
import { Flow } from "../../layout/Flow.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { _Item } from "../Item/Item.js";
|
|
3
3
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
4
4
|
import { CloseIcon } from "../../../icons/CloseIcon.js";
|
|
@@ -140,7 +140,7 @@ declare const MinorText: react.ComponentType<{
|
|
|
140
140
|
accessKey?: string | undefined;
|
|
141
141
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
142
142
|
autoFocus?: boolean | undefined;
|
|
143
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
143
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
144
144
|
contextMenu?: string | undefined;
|
|
145
145
|
dir?: string | undefined;
|
|
146
146
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -179,7 +179,7 @@ declare const MinorText: react.ComponentType<{
|
|
|
179
179
|
part?: string | undefined;
|
|
180
180
|
"aria-activedescendant"?: string | undefined;
|
|
181
181
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
182
|
-
"aria-autocomplete"?: "list" | "
|
|
182
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
183
183
|
"aria-braillelabel"?: string | undefined;
|
|
184
184
|
"aria-brailleroledescription"?: string | undefined;
|
|
185
185
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -546,7 +546,7 @@ declare const DangerText: react.ComponentType<{
|
|
|
546
546
|
accessKey?: string | undefined;
|
|
547
547
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
548
548
|
autoFocus?: boolean | undefined;
|
|
549
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
549
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
550
550
|
contextMenu?: string | undefined;
|
|
551
551
|
dir?: string | undefined;
|
|
552
552
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -585,7 +585,7 @@ declare const DangerText: react.ComponentType<{
|
|
|
585
585
|
part?: string | undefined;
|
|
586
586
|
"aria-activedescendant"?: string | undefined;
|
|
587
587
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
588
|
-
"aria-autocomplete"?: "list" | "
|
|
588
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
589
589
|
"aria-braillelabel"?: string | undefined;
|
|
590
590
|
"aria-brailleroledescription"?: string | undefined;
|
|
591
591
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -952,7 +952,7 @@ declare const SuccessText: react.ComponentType<{
|
|
|
952
952
|
accessKey?: string | undefined;
|
|
953
953
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
954
954
|
autoFocus?: boolean | undefined;
|
|
955
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
955
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
956
956
|
contextMenu?: string | undefined;
|
|
957
957
|
dir?: string | undefined;
|
|
958
958
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -991,7 +991,7 @@ declare const SuccessText: react.ComponentType<{
|
|
|
991
991
|
part?: string | undefined;
|
|
992
992
|
"aria-activedescendant"?: string | undefined;
|
|
993
993
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
994
|
-
"aria-autocomplete"?: "list" | "
|
|
994
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
995
995
|
"aria-braillelabel"?: string | undefined;
|
|
996
996
|
"aria-brailleroledescription"?: string | undefined;
|
|
997
997
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -1358,7 +1358,7 @@ declare const StrongText: react.ComponentType<{
|
|
|
1358
1358
|
accessKey?: string | undefined;
|
|
1359
1359
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
1360
1360
|
autoFocus?: boolean | undefined;
|
|
1361
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
1361
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
1362
1362
|
contextMenu?: string | undefined;
|
|
1363
1363
|
dir?: string | undefined;
|
|
1364
1364
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -1397,7 +1397,7 @@ declare const StrongText: react.ComponentType<{
|
|
|
1397
1397
|
part?: string | undefined;
|
|
1398
1398
|
"aria-activedescendant"?: string | undefined;
|
|
1399
1399
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
1400
|
-
"aria-autocomplete"?: "list" | "
|
|
1400
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
1401
1401
|
"aria-braillelabel"?: string | undefined;
|
|
1402
1402
|
"aria-brailleroledescription"?: string | undefined;
|
|
1403
1403
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -1764,7 +1764,7 @@ declare const EmphasisText: react.ComponentType<{
|
|
|
1764
1764
|
accessKey?: string | undefined;
|
|
1765
1765
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
1766
1766
|
autoFocus?: boolean | undefined;
|
|
1767
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
1767
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
1768
1768
|
contextMenu?: string | undefined;
|
|
1769
1769
|
dir?: string | undefined;
|
|
1770
1770
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -1803,7 +1803,7 @@ declare const EmphasisText: react.ComponentType<{
|
|
|
1803
1803
|
part?: string | undefined;
|
|
1804
1804
|
"aria-activedescendant"?: string | undefined;
|
|
1805
1805
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
1806
|
-
"aria-autocomplete"?: "list" | "
|
|
1806
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
1807
1807
|
"aria-braillelabel"?: string | undefined;
|
|
1808
1808
|
"aria-brailleroledescription"?: string | undefined;
|
|
1809
1809
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -2170,7 +2170,7 @@ declare const PlaceholderText: react.ComponentType<{
|
|
|
2170
2170
|
accessKey?: string | undefined;
|
|
2171
2171
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
2172
2172
|
autoFocus?: boolean | undefined;
|
|
2173
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
2173
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
2174
2174
|
contextMenu?: string | undefined;
|
|
2175
2175
|
dir?: string | undefined;
|
|
2176
2176
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -2209,7 +2209,7 @@ declare const PlaceholderText: react.ComponentType<{
|
|
|
2209
2209
|
part?: string | undefined;
|
|
2210
2210
|
"aria-activedescendant"?: string | undefined;
|
|
2211
2211
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
2212
|
-
"aria-autocomplete"?: "list" | "
|
|
2212
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
2213
2213
|
"aria-braillelabel"?: string | undefined;
|
|
2214
2214
|
"aria-brailleroledescription"?: string | undefined;
|
|
2215
2215
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -2576,7 +2576,7 @@ declare const HighlightText: react.ComponentType<{
|
|
|
2576
2576
|
accessKey?: string | undefined;
|
|
2577
2577
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
2578
2578
|
autoFocus?: boolean | undefined;
|
|
2579
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
2579
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
2580
2580
|
contextMenu?: string | undefined;
|
|
2581
2581
|
dir?: string | undefined;
|
|
2582
2582
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -2615,7 +2615,7 @@ declare const HighlightText: react.ComponentType<{
|
|
|
2615
2615
|
part?: string | undefined;
|
|
2616
2616
|
"aria-activedescendant"?: string | undefined;
|
|
2617
2617
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
2618
|
-
"aria-autocomplete"?: "list" | "
|
|
2618
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
2619
2619
|
"aria-braillelabel"?: string | undefined;
|
|
2620
2620
|
"aria-brailleroledescription"?: string | undefined;
|
|
2621
2621
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { useSlotProps } from "../../utils/react/Slots.js";
|
|
4
4
|
import { BASE_STYLES, COLOR_STYLES, TEXT_STYLES, filterBaseProps, tasty } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { TEXT_PROP_MAP, _Text } from "../Text.js";
|
|
4
4
|
import { highlightText } from "../highlightText.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { useSlotProps } from "../../utils/react/Slots.js";
|
|
4
4
|
import { TEXT_PROP_MAP } from "./Text.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { mergeRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { _Item } from "../Item/Item.js";
|
|
3
3
|
import { Action } from "../../actions/Action/Action.js";
|
|
4
4
|
import { tasty } from "@tenphi/tasty";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
|
+
import { isDevEnvOrTest } from "../../../utils/is-dev-env.js";
|
|
3
4
|
import { useRef, useState } from "react";
|
|
4
5
|
|
|
5
6
|
//#region src/components/content/Tree/use-load-data.ts
|
|
@@ -55,7 +56,7 @@ function useLoadData(opts) {
|
|
|
55
56
|
key,
|
|
56
57
|
children: loadNode?.children
|
|
57
58
|
})).catch((err) => {
|
|
58
|
-
console.error(`[Tree] loadData failed for key "${key}":`, err);
|
|
59
|
+
if (isDevEnvOrTest()) console.error(`[Tree] loadData failed for key "${key}":`, err);
|
|
59
60
|
}).finally(() => {
|
|
60
61
|
inFlightRef.current.delete(key);
|
|
61
62
|
setLoadingKeys((current) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-load-data.js","names":[],"sources":["../../../../src/components/content/Tree/use-load-data.ts"],"sourcesContent":["import { useRef, useState } from 'react';\n\nimport { useEvent } from '../../../_internal/hooks';\n\nimport type { Key } from '@react-types/shared';\nimport type { CubeTreeNodeData, TreeLoadDataNode } from './types';\n\nexport interface UseLoadDataOptions {\n /**\n * Map of `key -> node` built from the consumer's `treeData`. Used to\n * find the node being expanded when `loadData` fires.\n */\n nodesByKey: Map<string, CubeTreeNodeData>;\n loadData?: (node: TreeLoadDataNode) => Promise<void>;\n /**\n * Keys that are expanded at mount time (controlled or default).\n * Seeds `previousExpandedRef` so the first `onExpandedChanged` call\n * doesn't misidentify them as user-triggered expansions.\n */\n initialExpandedKeys?: Iterable<string>;\n}\n\nexport interface LoadDataController {\n /** Set of keys that are currently waiting on `loadData`. */\n loadingKeys: Set<string>;\n /**\n * Called by `Tree.tsx` whenever the underlying React Stately state's\n * `expandedKeys` change. We diff against the previous set, and for\n * each newly-expanded key we trigger `loadData` if appropriate.\n */\n onExpandedChanged: (expandedKeys: Iterable<Key>) => void;\n}\n\n/**\n * Tracks which rows are currently fetching their children via `loadData`\n * and exposes a setter for the Tree to call after every expand change.\n *\n * `loadData` is fired exactly once per key per \"first expand\" event:\n *\n * - Skipped if there is no `loadData` callback.\n * - Skipped for leaf nodes (`isLeaf === true`).\n * - Skipped if the node already has `children` (already loaded).\n * - Skipped if a previous fetch for the same key is still in flight.\n *\n * The promise's resolution is awaited only to clear the `loading` mod;\n * the consumer is expected to commit the new children to the controlled\n * `treeData` themselves (matching AntD's pattern).\n */\nexport function useLoadData(opts: UseLoadDataOptions): LoadDataController {\n const { nodesByKey, loadData, initialExpandedKeys } = opts;\n const [loadingKeys, setLoadingKeys] = useState<Set<string>>(() => new Set());\n const previousExpandedRef = useRef<Set<string>>(new Set(initialExpandedKeys));\n const inFlightRef = useRef<Set<string>>(new Set());\n\n const onExpandedChanged = useEvent((expandedKeys: Iterable<Key>) => {\n const next = new Set<string>();\n for (const k of expandedKeys) next.add(String(k));\n\n const prev = previousExpandedRef.current;\n const newlyExpanded: string[] = [];\n for (const k of next) {\n if (!prev.has(k)) newlyExpanded.push(k);\n }\n previousExpandedRef.current = next;\n\n if (!loadData || newlyExpanded.length === 0) return;\n\n const toLoad: string[] = [];\n for (const key of newlyExpanded) {\n const node = nodesByKey.get(key);\n if (!node) continue;\n if (node.isLeaf) continue;\n if (node.children && node.children.length > 0) continue;\n if (inFlightRef.current.has(key)) continue;\n inFlightRef.current.add(key);\n toLoad.push(key);\n }\n\n if (toLoad.length === 0) return;\n\n setLoadingKeys((current) => {\n const updated = new Set(current);\n for (const k of toLoad) updated.add(k);\n return updated;\n });\n\n for (const key of toLoad) {\n const loadNode = nodesByKey.get(key);\n Promise.resolve(loadData({ key, children: loadNode?.children }))\n .catch((err) => {\n if (
|
|
1
|
+
{"version":3,"file":"use-load-data.js","names":[],"sources":["../../../../src/components/content/Tree/use-load-data.ts"],"sourcesContent":["import { useRef, useState } from 'react';\n\nimport { useEvent } from '../../../_internal/hooks';\nimport { isDevEnvOrTest } from '../../../utils/is-dev-env';\n\nimport type { Key } from '@react-types/shared';\nimport type { CubeTreeNodeData, TreeLoadDataNode } from './types';\n\nexport interface UseLoadDataOptions {\n /**\n * Map of `key -> node` built from the consumer's `treeData`. Used to\n * find the node being expanded when `loadData` fires.\n */\n nodesByKey: Map<string, CubeTreeNodeData>;\n loadData?: (node: TreeLoadDataNode) => Promise<void>;\n /**\n * Keys that are expanded at mount time (controlled or default).\n * Seeds `previousExpandedRef` so the first `onExpandedChanged` call\n * doesn't misidentify them as user-triggered expansions.\n */\n initialExpandedKeys?: Iterable<string>;\n}\n\nexport interface LoadDataController {\n /** Set of keys that are currently waiting on `loadData`. */\n loadingKeys: Set<string>;\n /**\n * Called by `Tree.tsx` whenever the underlying React Stately state's\n * `expandedKeys` change. We diff against the previous set, and for\n * each newly-expanded key we trigger `loadData` if appropriate.\n */\n onExpandedChanged: (expandedKeys: Iterable<Key>) => void;\n}\n\n/**\n * Tracks which rows are currently fetching their children via `loadData`\n * and exposes a setter for the Tree to call after every expand change.\n *\n * `loadData` is fired exactly once per key per \"first expand\" event:\n *\n * - Skipped if there is no `loadData` callback.\n * - Skipped for leaf nodes (`isLeaf === true`).\n * - Skipped if the node already has `children` (already loaded).\n * - Skipped if a previous fetch for the same key is still in flight.\n *\n * The promise's resolution is awaited only to clear the `loading` mod;\n * the consumer is expected to commit the new children to the controlled\n * `treeData` themselves (matching AntD's pattern).\n */\nexport function useLoadData(opts: UseLoadDataOptions): LoadDataController {\n const { nodesByKey, loadData, initialExpandedKeys } = opts;\n const [loadingKeys, setLoadingKeys] = useState<Set<string>>(() => new Set());\n const previousExpandedRef = useRef<Set<string>>(new Set(initialExpandedKeys));\n const inFlightRef = useRef<Set<string>>(new Set());\n\n const onExpandedChanged = useEvent((expandedKeys: Iterable<Key>) => {\n const next = new Set<string>();\n for (const k of expandedKeys) next.add(String(k));\n\n const prev = previousExpandedRef.current;\n const newlyExpanded: string[] = [];\n for (const k of next) {\n if (!prev.has(k)) newlyExpanded.push(k);\n }\n previousExpandedRef.current = next;\n\n if (!loadData || newlyExpanded.length === 0) return;\n\n const toLoad: string[] = [];\n for (const key of newlyExpanded) {\n const node = nodesByKey.get(key);\n if (!node) continue;\n if (node.isLeaf) continue;\n if (node.children && node.children.length > 0) continue;\n if (inFlightRef.current.has(key)) continue;\n inFlightRef.current.add(key);\n toLoad.push(key);\n }\n\n if (toLoad.length === 0) return;\n\n setLoadingKeys((current) => {\n const updated = new Set(current);\n for (const k of toLoad) updated.add(k);\n return updated;\n });\n\n for (const key of toLoad) {\n const loadNode = nodesByKey.get(key);\n Promise.resolve(loadData({ key, children: loadNode?.children }))\n .catch((err) => {\n if (isDevEnvOrTest()) {\n console.error(`[Tree] loadData failed for key \"${key}\":`, err);\n }\n })\n .finally(() => {\n inFlightRef.current.delete(key);\n setLoadingKeys((current) => {\n if (!current.has(key)) return current;\n const updated = new Set(current);\n updated.delete(key);\n return updated;\n });\n });\n }\n });\n\n return { loadingKeys, onExpandedChanged };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiDA,SAAgB,YAAY,MAA8C;CACxE,MAAM,EAAE,YAAY,UAAU,wBAAwB;CACtD,MAAM,CAAC,aAAa,kBAAkB,+BAA4B,IAAI,KAAK,CAAC;CAC5E,MAAM,sBAAsB,OAAoB,IAAI,IAAI,oBAAoB,CAAC;CAC7E,MAAM,cAAc,uBAAoB,IAAI,KAAK,CAAC;AAsDlD,QAAO;EAAE;EAAa,mBApDI,UAAU,iBAAgC;GAClE,MAAM,uBAAO,IAAI,KAAa;AAC9B,QAAK,MAAM,KAAK,aAAc,MAAK,IAAI,OAAO,EAAE,CAAC;GAEjD,MAAM,OAAO,oBAAoB;GACjC,MAAM,gBAA0B,EAAE;AAClC,QAAK,MAAM,KAAK,KACd,KAAI,CAAC,KAAK,IAAI,EAAE,CAAE,eAAc,KAAK,EAAE;AAEzC,uBAAoB,UAAU;AAE9B,OAAI,CAAC,YAAY,cAAc,WAAW,EAAG;GAE7C,MAAM,SAAmB,EAAE;AAC3B,QAAK,MAAM,OAAO,eAAe;IAC/B,MAAM,OAAO,WAAW,IAAI,IAAI;AAChC,QAAI,CAAC,KAAM;AACX,QAAI,KAAK,OAAQ;AACjB,QAAI,KAAK,YAAY,KAAK,SAAS,SAAS,EAAG;AAC/C,QAAI,YAAY,QAAQ,IAAI,IAAI,CAAE;AAClC,gBAAY,QAAQ,IAAI,IAAI;AAC5B,WAAO,KAAK,IAAI;;AAGlB,OAAI,OAAO,WAAW,EAAG;AAEzB,mBAAgB,YAAY;IAC1B,MAAM,UAAU,IAAI,IAAI,QAAQ;AAChC,SAAK,MAAM,KAAK,OAAQ,SAAQ,IAAI,EAAE;AACtC,WAAO;KACP;AAEF,QAAK,MAAM,OAAO,QAAQ;IACxB,MAAM,WAAW,WAAW,IAAI,IAAI;AACpC,YAAQ,QAAQ,SAAS;KAAE;KAAK,UAAU,UAAU;KAAU,CAAC,CAAC,CAC7D,OAAO,QAAQ;AACd,SAAI,gBAAgB,CAClB,SAAQ,MAAM,mCAAmC,IAAI,KAAK,IAAI;MAEhE,CACD,cAAc;AACb,iBAAY,QAAQ,OAAO,IAAI;AAC/B,qBAAgB,YAAY;AAC1B,UAAI,CAAC,QAAQ,IAAI,IAAI,CAAE,QAAO;MAC9B,MAAM,UAAU,IAAI,IAAI,QAAQ;AAChC,cAAQ,OAAO,IAAI;AACnB,aAAO;OACP;MACF;;IAEN;EAEuC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { TooltipProvider } from "../overlays/Tooltip/TooltipProvider.js";
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { _Text } from "../../content/Text.js";
|
|
4
4
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { _Text } from "../../content/Text.js";
|
|
3
3
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
4
4
|
import { tasty } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { _Pagination } from "../../navigation/Pagination/Pagination.js";
|
|
3
3
|
import { tasty } from "@tenphi/tasty";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
3
3
|
import { Button } from "../../actions/index.js";
|
|
4
4
|
import { ReloadIcon } from "../../../icons/ReloadIcon.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { useRef } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { mergeRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { useRef } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { TooltipProvider } from "../../overlays/Tooltip/TooltipProvider.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.178.0 | Cube Dev Team */
|
|
2
2
|
import { __Menu } from "../../actions/Menu/Menu.js";
|
|
3
3
|
import { normalizeMenuAction } from "./row-menu.js";
|
|
4
4
|
import { Children, cloneElement, isValidElement } from "react";
|