@cube-dev/ui-kit 0.120.0 → 0.121.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 +20 -0
- package/dist/_internal/hooks/use-chained-callback.js +1 -1
- 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.d.ts +1 -0
- package/dist/components/actions/Button/Button.js +34 -14
- package/dist/components/actions/Button/Button.js.map +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.d.ts +47 -0
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +105 -0
- package/dist/components/actions/ButtonSplit/ButtonSplit.js.map +1 -0
- package/dist/components/actions/ButtonSplit/context.d.ts +18 -0
- package/dist/components/actions/ButtonSplit/context.js +12 -0
- package/dist/components/actions/ButtonSplit/context.js.map +1 -0
- package/dist/components/actions/ButtonSplit/index.d.ts +3 -0
- 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.d.ts +2 -2
- 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.d.ts +8 -3
- package/dist/components/actions/index.js +10 -5
- package/dist/components/actions/index.js.map +1 -1
- package/dist/components/actions/use-action.d.ts +1 -0
- package/dist/components/actions/use-action.js +21 -18
- package/dist/components/actions/use-action.js.map +1 -1
- package/dist/components/actions/use-anchored-menu.js +1 -1
- package/dist/components/actions/use-context-menu.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 +2 -1
- package/dist/components/content/Badge/Badge.js.map +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 +5 -2
- package/dist/components/content/Disclosure/Disclosure.js.map +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/Item/Item.js +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +3 -2
- package/dist/components/content/ItemBadge/ItemBadge.js.map +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +2 -1
- package/dist/components/content/Tag/Tag.js.map +1 -1
- package/dist/components/content/Text.js +1 -1
- package/dist/components/content/TextItem/TextItem.js +1 -1
- package/dist/components/content/Title.js +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.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/ComboBox/ComboBox.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/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/intl.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +2 -2
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/ListBox.js +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/fields/Picker/Picker.js +2 -2
- package/dist/components/fields/RadioGroup/Radio.js +3 -1
- package/dist/components/fields/RadioGroup/Radio.js.map +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.js +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/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/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/FieldWrapper/extract-field-wrapper-props.js +1 -1
- package/dist/components/form/Form/Field.js +1 -1
- package/dist/components/form/Form/Form.js +1 -1
- package/dist/components/form/Form/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.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/wrapper.js +1 -1
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/layout/Flex.js +1 -1
- package/dist/components/layout/Flow.js +1 -1
- package/dist/components/layout/Grid.js +1 -1
- package/dist/components/layout/Panel.js +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/EditableTitle.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 +2 -1
- package/dist/components/navigation/Tabs/TabPicker.js.map +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +3 -1
- package/dist/components/navigation/Tabs/styled.js.map +1 -1
- package/dist/components/navigation/Tabs/types.d.ts +2 -2
- 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 +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
- package/dist/components/organisms/FileTabs/FileTabs.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/RangeCalendar.js +1 -1
- package/dist/components/other/CloudLogo/CloudLogo.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 +2 -2
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/dist/components/overlays/Dialog/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/OpenTransition.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 +2 -2
- package/dist/components/overlays/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
- package/dist/components/overlays/Tooltip/context.js +1 -1
- package/dist/components/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/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 +6 -6
- package/dist/data/item-themes.js.map +1 -1
- package/dist/data/themes.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/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/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/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 +6 -4
- package/dist/index.js +7 -5
- package/dist/index.js.map +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/base.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/layout.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/utils/ResizeSensor.js +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/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 +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.d.ts +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/useQaProps.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +2 -2
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
+
import { CubeMenuProps } from "../../actions/Menu/Menu.js";
|
|
2
3
|
import "../../content/Item/index.js";
|
|
3
4
|
import { CubeItemProps } from "../../content/Item/Item.js";
|
|
4
5
|
import { CubeItemActionProps } from "../../actions/ItemAction/ItemAction.js";
|
|
5
6
|
import "../../actions/ItemAction/index.js";
|
|
6
|
-
import { CubeMenuProps } from "../../actions/Menu/Menu.js";
|
|
7
7
|
import "../../actions/Menu/index.js";
|
|
8
8
|
import { BaseProps, OuterStyleProps, Styles } from "@tenphi/tasty";
|
|
9
9
|
import { ReactNode } from "react";
|
|
@@ -33,7 +33,7 @@ interface QAProps {
|
|
|
33
33
|
qaVal?: string;
|
|
34
34
|
}
|
|
35
35
|
/** Props from CubeItemProps that don't apply to Tab */
|
|
36
|
-
type OmittedItemProps = 'id' | 'type' | 'size' | 'theme' | 'shape' | '
|
|
36
|
+
type OmittedItemProps = 'id' | 'type' | 'size' | 'theme' | 'shape' | 'description' | 'descriptionPlacement' | 'descriptionProps' | 'hotkeys' | 'keyboardShortcutProps' | 'labelProps' | 'labelRef' | 'level' | 'highlight' | 'highlightCaseSensitive' | 'highlightStyles' | 'variant' | 'htmlType' | 'isSelected' | 'preserveActionsSpace' | 'disableActionsFocus' | 'actions' | 'autoHideActions' | 'insideWrapper' | 'showActions';
|
|
37
37
|
/** Common styling props for tabs - inherits style props from CubeItemProps */
|
|
38
38
|
interface TabStyleProps extends Omit<CubeItemProps, OmittedItemProps> {
|
|
39
39
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/components/navigation/Tabs/types.ts"],"sourcesContent":["import type { BaseProps, OuterStyleProps, Styles } from '@tenphi/tasty';\nimport type { ReactNode } from 'react';\nimport type { CubeItemActionProps } from '../../actions/ItemAction';\nimport type { CubeMenuProps } from '../../actions/Menu';\nimport type { CubeItemProps } from '../../content/Item';\n\n// =============================================================================\n// Core Types\n// =============================================================================\n\n/** Visual appearance type for tabs */\nexport type TabType = 'default' | 'narrow' | 'file' | 'radio';\n\n/** Position for TabPicker and scroll arrows */\nexport type TabsActionPosition = 'prefix' | 'suffix';\n\n/**\n * Tab size options.\n * Radio type only supports 'medium' | 'large' (mapped to smaller Item sizes).\n */\nexport type TabSize = 'xsmall' | 'small' | 'medium' | 'large';\n\n/**\n * Size mapping for radio type tabs.\n * Radio type uses smaller sizes similar to RadioGroup tabs mode.\n */\nexport const RADIO_SIZE_MAP: Record<'medium' | 'large', TabSize> = {\n medium: 'xsmall',\n large: 'medium',\n};\n\n// =============================================================================\n// Shared Props Interfaces\n// =============================================================================\n\n/** Common props for panel rendering behavior */\nexport interface PanelBehaviorProps {\n /** If true, panel is rendered but hidden when not active. */\n prerender?: boolean;\n /** If true, once visited the panel stays in DOM. */\n keepMounted?: boolean;\n}\n\n/** Common props for QA attributes */\nexport interface QAProps {\n /** QA selector attribute. */\n qa?: string;\n /** Additional QA value attribute. */\n qaVal?: string;\n}\n\n// =============================================================================\n// Tab Style Props\n// =============================================================================\n\n/** Props from CubeItemProps that don't apply to Tab */\ntype OmittedItemProps =\n | 'id' // Tab has its own id as Key type\n | 'type' // Tab has its own TabType\n | 'size' // Tab has its own TabSize\n | 'theme' // Tabs have internal theming\n | 'shape' // Tabs have internal shape logic\n | 'icon' // Tabs don't support icons\n | 'rightIcon'\n | 'prefix' // Tabs don't support prefix/suffix\n | 'suffix'\n | 'description' // Tabs don't have descriptions\n | 'descriptionPlacement'\n | 'descriptionProps'\n | 'tooltip' // Tabs don't typically use tooltips\n | 'defaultTooltipPlacement'\n | 'hotkeys' // Tabs don't use hotkeys\n | 'keyboardShortcutProps'\n | 'loadingSlot' // Tabs don't use loading state\n | 'isLoading'\n | 'labelProps' // Tabs use title prop instead\n | 'labelRef'\n | 'level' // Tabs don't use heading levels\n | 'highlight' // Tabs don't use highlighting\n | 'highlightCaseSensitive'\n | 'highlightStyles'\n | 'variant' // Tabs have internal variant logic\n | 'htmlType' // Tab is always a button\n | 'isSelected' // Handled internally by state\n | 'preserveActionsSpace' // Set internally in TabButton\n | 'disableActionsFocus' // Not used in Tab\n | 'actions' // Tab has its own actions definition\n | 'autoHideActions'; // Tab has its own autoHideActions\n\n/** Common styling props for tabs - inherits style props from CubeItemProps */\nexport interface TabStyleProps extends Omit<CubeItemProps, OmittedItemProps> {\n /**\n * Tab size. Supports 'xsmall', 'small', 'medium', 'large'.\n * Radio type only supports 'medium' | 'large' (mapped to smaller Item sizes).\n */\n size?: TabSize;\n /** Visual appearance type. */\n type?: TabType;\n /** Whether to show actions only on hover. */\n autoHideActions?: boolean;\n}\n\n// =============================================================================\n// Component Props\n// =============================================================================\n\n/** Cache key type - primitives only for reliable comparison */\nexport type CacheKeyValue = string | number | boolean | null | undefined;\n\nexport interface CubeTabsProps\n extends BaseProps,\n OuterStyleProps,\n PanelBehaviorProps {\n /** Controlled active tab key. When provided, component is controlled. */\n activeKey?: string;\n /** Initial active tab key for uncontrolled mode. */\n defaultActiveKey?: string;\n /**\n * Visual appearance type for tabs.\n * - `default` - Standard tabs with selection indicator below (default)\n * - `narrow` - Same as default but with collapsed vertical padding on labels\n * - `file` - File-style tabs with border bottom highlight on selection, delimiter between tabs\n * - `radio` - Radio button style for tab selection\n * @default 'default'\n */\n type?: TabType;\n /**\n * Tab size. Supports 'xsmall', 'small', 'medium', 'large'.\n * Radio type only supports 'medium' | 'large' (mapped to smaller Item sizes).\n * @default 'medium'\n */\n size?: TabSize;\n /** Accessible label for the tab list. */\n label?: string;\n /** Content rendered before the tab list. */\n prefix?: ReactNode;\n /** Content rendered after the tab list. */\n suffix?: ReactNode;\n /** Callback when active tab changes. */\n onChange?: (key: string) => void;\n /** Callback when tab delete button is clicked. Presence enables delete buttons. */\n onDelete?: (key: string) => void;\n /** Callback when a tab title is changed. Enables title editing on tabs with isEditable. */\n onTitleChange?: (key: string, newTitle: string) => void;\n /** Whether to show tab actions only on hover. Can be overridden per-tab. */\n autoHideActions?: boolean;\n /**\n * Whether tabs are editable by default.\n * Can be overridden per-tab via Tab's isEditable prop.\n * @default false\n */\n isEditable?: boolean;\n /**\n * Default menu items for all tabs.\n * Can be overridden per-tab via Tab's menu prop.\n * Set to `null` on individual Tab to disable menu for that tab.\n */\n menu?: ReactNode;\n /**\n * Default props for the menu trigger button.\n * Can be overridden per-tab via Tab's menuTriggerProps prop.\n * @default { icon: <MoreIcon /> }\n */\n menuTriggerProps?: Partial<CubeItemActionProps>;\n /**\n * Default props passed to the Menu component.\n * Can be overridden per-tab via Tab's menuProps prop.\n */\n menuProps?: Partial<CubeMenuProps<object>>;\n /**\n * Whether to show context menu on right-click for all tabs.\n * Can be overridden per-tab via Tab's contextMenu prop.\n * @default false\n */\n contextMenu?: boolean;\n /**\n * Callback when a menu action is triggered on any tab.\n * Called with the action key and the tab key.\n * Tab-level onAction is called first, then this.\n */\n onAction?: (action: string, tabKey: string) => void;\n /** Custom tasty styles for the tab bar container. */\n styles?: Styles;\n /** QA selector attribute. */\n qa?: string;\n /** Tab components or Tabs.List with Tabs.Panel. */\n children?: ReactNode;\n /**\n * Functional content renderer for optimized lazy evaluation.\n * When provided, panel content is only evaluated for the active tab,\n * while inactive tabs use cached content.\n */\n renderPanel?: (key: string) => ReactNode;\n /**\n * Cache keys for individual panels. Enables caching for specified panels.\n */\n panelCacheKeys?: Record<string | number, CacheKeyValue>;\n /**\n * Enable drag-and-drop tab reordering.\n * @default false\n */\n isReorderable?: boolean;\n /**\n * Controlled order of tab keys.\n * When provided, tabs are displayed in this order.\n */\n keyOrder?: string[];\n /**\n * Callback when tabs are reordered via drag-and-drop.\n */\n onReorder?: (newOrder: string[]) => void;\n /**\n * Whether to show a tab picker dropdown in the suffix area.\n * - `true` - always show the tab picker\n * - `false` - never show the tab picker (default)\n * - `'auto'` - show only when tabs overflow (has horizontal scroll)\n * @default false\n */\n showTabPicker?: boolean | 'auto';\n /**\n * Whether to show scroll arrow buttons in the suffix area.\n * - `true` - always show scroll arrows\n * - `false` - never show scroll arrows (default)\n * - `'auto'` - show only when tabs overflow (has horizontal scroll)\n * @default false\n */\n showScrollArrows?: boolean | 'auto';\n /**\n * Position of the tab picker dropdown.\n * - `'prefix'` - render in the prefix slot (before tab list)\n * - `'suffix'` - render in the suffix slot (after tab list)\n * @default 'suffix'\n */\n tabPickerPosition?: TabsActionPosition;\n /**\n * Position of the scroll arrow buttons.\n * - `'prefix'` - render in the prefix slot (before tab list)\n * - `'suffix'` - render in the suffix slot (after tab list)\n * @default 'suffix'\n */\n scrollArrowsPosition?: TabsActionPosition;\n /**\n * Inline padding for the tab list container.\n * Sets horizontal padding only (e.g., \"2x\" → padding: \"0 2x\").\n */\n tabListPadding?: string;\n /** Custom tasty styles for the TabList sub-element. */\n tabListStyles?: Styles;\n /** Custom tasty styles for the Prefix sub-element. */\n prefixStyles?: Styles;\n /** Custom tasty styles for the Suffix sub-element. */\n suffixStyles?: Styles;\n}\n\nexport interface CubeTabProps extends TabStyleProps, PanelBehaviorProps {\n /**\n * Unique identifier for the tab.\n * Auto-injected from the React `key` prop (converted to string).\n */\n id?: string;\n /** Content displayed in the tab button. */\n title: ReactNode;\n /** Panel content rendered when tab is active. */\n children?: ReactNode;\n /** Disables the tab (cannot be selected). */\n isDisabled?: boolean;\n /** Actions to render in the tab. Rendered before menu trigger if tab has menu. */\n actions?: ReactNode;\n /** Whether the tab title can be edited. Overrides the Tabs-level isEditable default. */\n isEditable?: boolean;\n /** Callback when this tab's title is changed. Overrides parent's onTitleChange. */\n onTitleChange?: (newTitle: string) => void;\n /**\n * Menu items to display in a dropdown menu on the tab.\n * Pass Menu.Item elements directly - they will be wrapped in a Menu internally.\n * Overrides the Tabs-level menu default. Set to `null` to disable menu.\n */\n menu?: ReactNode | null;\n /**\n * Props to customize the menu trigger button.\n * Overrides the Tabs-level menuTriggerProps default.\n */\n menuTriggerProps?: Partial<CubeItemActionProps>;\n /**\n * Props passed to the Menu component.\n * Overrides the Tabs-level menuProps default.\n */\n menuProps?: Partial<CubeMenuProps<object>>;\n /**\n * Whether to show context menu on right-click.\n * Uses the same menu items as `menu` prop.\n * @default false\n */\n contextMenu?: boolean;\n /**\n * Callback when a menu action is triggered.\n * Called with the action key from Menu.Item.\n */\n onAction?: (action: string) => void;\n}\n\nexport interface CubeTabPanelProps extends PanelBehaviorProps, QAProps {\n /**\n * Panel identifier. Must match a Tab's id.\n * Auto-injected from the React `key` prop (converted to string).\n */\n id?: string;\n /** Panel content. */\n children?: ReactNode;\n /** Custom tasty styles for the panel container. */\n styles?: Styles;\n}\n\nexport interface CubeTabListProps {\n /** Tab components. */\n children?: ReactNode;\n}\n\n// =============================================================================\n// Internal Types\n// =============================================================================\n\n/**\n * Internal representation of a parsed Tab.\n * Uses `content` instead of `children` to distinguish panel content.\n */\nexport interface ParsedTab extends Omit<CubeTabProps, 'id' | 'children'> {\n /** Tab key (always a string internally for React Aria compatibility) */\n key: string;\n /** Panel content extracted from Tab's children prop */\n content: ReactNode;\n}\n\n/**\n * Internal representation of a parsed TabPanel.\n */\nexport interface ParsedPanel\n extends Omit<CubeTabPanelProps, 'id' | 'children'> {\n /** Panel key (always a string internally for React Aria compatibility) */\n key: string;\n /** Panel content extracted from TabPanel's children prop */\n content: ReactNode;\n}\n"],"mappings":";;;;;;AA0BA,MAAa,iBAAsD;CACjE,QAAQ;CACR,OAAO;CACR"}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/components/navigation/Tabs/types.ts"],"sourcesContent":["import type { BaseProps, OuterStyleProps, Styles } from '@tenphi/tasty';\nimport type { ReactNode } from 'react';\nimport type { CubeItemActionProps } from '../../actions/ItemAction';\nimport type { CubeMenuProps } from '../../actions/Menu';\nimport type { CubeItemProps } from '../../content/Item';\n\n// =============================================================================\n// Core Types\n// =============================================================================\n\n/** Visual appearance type for tabs */\nexport type TabType = 'default' | 'narrow' | 'file' | 'radio';\n\n/** Position for TabPicker and scroll arrows */\nexport type TabsActionPosition = 'prefix' | 'suffix';\n\n/**\n * Tab size options.\n * Radio type only supports 'medium' | 'large' (mapped to smaller Item sizes).\n */\nexport type TabSize = 'xsmall' | 'small' | 'medium' | 'large';\n\n/**\n * Size mapping for radio type tabs.\n * Radio type uses smaller sizes similar to RadioGroup tabs mode.\n */\nexport const RADIO_SIZE_MAP: Record<'medium' | 'large', TabSize> = {\n medium: 'xsmall',\n large: 'medium',\n};\n\n// =============================================================================\n// Shared Props Interfaces\n// =============================================================================\n\n/** Common props for panel rendering behavior */\nexport interface PanelBehaviorProps {\n /** If true, panel is rendered but hidden when not active. */\n prerender?: boolean;\n /** If true, once visited the panel stays in DOM. */\n keepMounted?: boolean;\n}\n\n/** Common props for QA attributes */\nexport interface QAProps {\n /** QA selector attribute. */\n qa?: string;\n /** Additional QA value attribute. */\n qaVal?: string;\n}\n\n// =============================================================================\n// Tab Style Props\n// =============================================================================\n\n/** Props from CubeItemProps that don't apply to Tab */\ntype OmittedItemProps =\n | 'id' // Tab has its own id as Key type\n | 'type' // Tab has its own TabType\n | 'size' // Tab has its own TabSize\n | 'theme' // Tabs have internal theming\n | 'shape' // Tabs have internal shape logic\n | 'description' // Tabs don't have descriptions\n | 'descriptionPlacement'\n | 'descriptionProps'\n | 'hotkeys' // Tabs have their own keyboard navigation\n | 'keyboardShortcutProps'\n | 'labelProps' // Tabs use title prop instead\n | 'labelRef'\n | 'level' // Tabs don't use heading levels\n | 'highlight' // Tabs don't use highlighting\n | 'highlightCaseSensitive'\n | 'highlightStyles'\n | 'variant' // Tabs have internal variant logic\n | 'htmlType' // Tab is always a button\n | 'isSelected' // Handled internally by state\n | 'preserveActionsSpace' // Set internally in TabButton\n | 'disableActionsFocus' // Not used in Tab\n | 'actions' // Tab has its own actions definition\n | 'autoHideActions' // Tab has its own autoHideActions\n | 'insideWrapper' // Internal Item wrapper prop\n | 'showActions'; // Internal Item wrapper prop\n\n/** Common styling props for tabs - inherits style props from CubeItemProps */\nexport interface TabStyleProps extends Omit<CubeItemProps, OmittedItemProps> {\n /**\n * Tab size. Supports 'xsmall', 'small', 'medium', 'large'.\n * Radio type only supports 'medium' | 'large' (mapped to smaller Item sizes).\n */\n size?: TabSize;\n /** Visual appearance type. */\n type?: TabType;\n /** Whether to show actions only on hover. */\n autoHideActions?: boolean;\n}\n\n// =============================================================================\n// Component Props\n// =============================================================================\n\n/** Cache key type - primitives only for reliable comparison */\nexport type CacheKeyValue = string | number | boolean | null | undefined;\n\nexport interface CubeTabsProps\n extends BaseProps,\n OuterStyleProps,\n PanelBehaviorProps {\n /** Controlled active tab key. When provided, component is controlled. */\n activeKey?: string;\n /** Initial active tab key for uncontrolled mode. */\n defaultActiveKey?: string;\n /**\n * Visual appearance type for tabs.\n * - `default` - Standard tabs with selection indicator below (default)\n * - `narrow` - Same as default but with collapsed vertical padding on labels\n * - `file` - File-style tabs with border bottom highlight on selection, delimiter between tabs\n * - `radio` - Radio button style for tab selection\n * @default 'default'\n */\n type?: TabType;\n /**\n * Tab size. Supports 'xsmall', 'small', 'medium', 'large'.\n * Radio type only supports 'medium' | 'large' (mapped to smaller Item sizes).\n * @default 'medium'\n */\n size?: TabSize;\n /** Accessible label for the tab list. */\n label?: string;\n /** Content rendered before the tab list. */\n prefix?: ReactNode;\n /** Content rendered after the tab list. */\n suffix?: ReactNode;\n /** Callback when active tab changes. */\n onChange?: (key: string) => void;\n /** Callback when tab delete button is clicked. Presence enables delete buttons. */\n onDelete?: (key: string) => void;\n /** Callback when a tab title is changed. Enables title editing on tabs with isEditable. */\n onTitleChange?: (key: string, newTitle: string) => void;\n /** Whether to show tab actions only on hover. Can be overridden per-tab. */\n autoHideActions?: boolean;\n /**\n * Whether tabs are editable by default.\n * Can be overridden per-tab via Tab's isEditable prop.\n * @default false\n */\n isEditable?: boolean;\n /**\n * Default menu items for all tabs.\n * Can be overridden per-tab via Tab's menu prop.\n * Set to `null` on individual Tab to disable menu for that tab.\n */\n menu?: ReactNode;\n /**\n * Default props for the menu trigger button.\n * Can be overridden per-tab via Tab's menuTriggerProps prop.\n * @default { icon: <MoreIcon /> }\n */\n menuTriggerProps?: Partial<CubeItemActionProps>;\n /**\n * Default props passed to the Menu component.\n * Can be overridden per-tab via Tab's menuProps prop.\n */\n menuProps?: Partial<CubeMenuProps<object>>;\n /**\n * Whether to show context menu on right-click for all tabs.\n * Can be overridden per-tab via Tab's contextMenu prop.\n * @default false\n */\n contextMenu?: boolean;\n /**\n * Callback when a menu action is triggered on any tab.\n * Called with the action key and the tab key.\n * Tab-level onAction is called first, then this.\n */\n onAction?: (action: string, tabKey: string) => void;\n /** Custom tasty styles for the tab bar container. */\n styles?: Styles;\n /** QA selector attribute. */\n qa?: string;\n /** Tab components or Tabs.List with Tabs.Panel. */\n children?: ReactNode;\n /**\n * Functional content renderer for optimized lazy evaluation.\n * When provided, panel content is only evaluated for the active tab,\n * while inactive tabs use cached content.\n */\n renderPanel?: (key: string) => ReactNode;\n /**\n * Cache keys for individual panels. Enables caching for specified panels.\n */\n panelCacheKeys?: Record<string | number, CacheKeyValue>;\n /**\n * Enable drag-and-drop tab reordering.\n * @default false\n */\n isReorderable?: boolean;\n /**\n * Controlled order of tab keys.\n * When provided, tabs are displayed in this order.\n */\n keyOrder?: string[];\n /**\n * Callback when tabs are reordered via drag-and-drop.\n */\n onReorder?: (newOrder: string[]) => void;\n /**\n * Whether to show a tab picker dropdown in the suffix area.\n * - `true` - always show the tab picker\n * - `false` - never show the tab picker (default)\n * - `'auto'` - show only when tabs overflow (has horizontal scroll)\n * @default false\n */\n showTabPicker?: boolean | 'auto';\n /**\n * Whether to show scroll arrow buttons in the suffix area.\n * - `true` - always show scroll arrows\n * - `false` - never show scroll arrows (default)\n * - `'auto'` - show only when tabs overflow (has horizontal scroll)\n * @default false\n */\n showScrollArrows?: boolean | 'auto';\n /**\n * Position of the tab picker dropdown.\n * - `'prefix'` - render in the prefix slot (before tab list)\n * - `'suffix'` - render in the suffix slot (after tab list)\n * @default 'suffix'\n */\n tabPickerPosition?: TabsActionPosition;\n /**\n * Position of the scroll arrow buttons.\n * - `'prefix'` - render in the prefix slot (before tab list)\n * - `'suffix'` - render in the suffix slot (after tab list)\n * @default 'suffix'\n */\n scrollArrowsPosition?: TabsActionPosition;\n /**\n * Inline padding for the tab list container.\n * Sets horizontal padding only (e.g., \"2x\" → padding: \"0 2x\").\n */\n tabListPadding?: string;\n /** Custom tasty styles for the TabList sub-element. */\n tabListStyles?: Styles;\n /** Custom tasty styles for the Prefix sub-element. */\n prefixStyles?: Styles;\n /** Custom tasty styles for the Suffix sub-element. */\n suffixStyles?: Styles;\n}\n\nexport interface CubeTabProps extends TabStyleProps, PanelBehaviorProps {\n /**\n * Unique identifier for the tab.\n * Auto-injected from the React `key` prop (converted to string).\n */\n id?: string;\n /** Content displayed in the tab button. */\n title: ReactNode;\n /** Panel content rendered when tab is active. */\n children?: ReactNode;\n /** Disables the tab (cannot be selected). */\n isDisabled?: boolean;\n /** Actions to render in the tab. Rendered before menu trigger if tab has menu. */\n actions?: ReactNode;\n /** Whether the tab title can be edited. Overrides the Tabs-level isEditable default. */\n isEditable?: boolean;\n /** Callback when this tab's title is changed. Overrides parent's onTitleChange. */\n onTitleChange?: (newTitle: string) => void;\n /**\n * Menu items to display in a dropdown menu on the tab.\n * Pass Menu.Item elements directly - they will be wrapped in a Menu internally.\n * Overrides the Tabs-level menu default. Set to `null` to disable menu.\n */\n menu?: ReactNode | null;\n /**\n * Props to customize the menu trigger button.\n * Overrides the Tabs-level menuTriggerProps default.\n */\n menuTriggerProps?: Partial<CubeItemActionProps>;\n /**\n * Props passed to the Menu component.\n * Overrides the Tabs-level menuProps default.\n */\n menuProps?: Partial<CubeMenuProps<object>>;\n /**\n * Whether to show context menu on right-click.\n * Uses the same menu items as `menu` prop.\n * @default false\n */\n contextMenu?: boolean;\n /**\n * Callback when a menu action is triggered.\n * Called with the action key from Menu.Item.\n */\n onAction?: (action: string) => void;\n}\n\nexport interface CubeTabPanelProps extends PanelBehaviorProps, QAProps {\n /**\n * Panel identifier. Must match a Tab's id.\n * Auto-injected from the React `key` prop (converted to string).\n */\n id?: string;\n /** Panel content. */\n children?: ReactNode;\n /** Custom tasty styles for the panel container. */\n styles?: Styles;\n}\n\nexport interface CubeTabListProps {\n /** Tab components. */\n children?: ReactNode;\n}\n\n// =============================================================================\n// Internal Types\n// =============================================================================\n\n/**\n * Internal representation of a parsed Tab.\n * Uses `content` instead of `children` to distinguish panel content.\n */\nexport interface ParsedTab extends Omit<CubeTabProps, 'id' | 'children'> {\n /** Tab key (always a string internally for React Aria compatibility) */\n key: string;\n /** Panel content extracted from Tab's children prop */\n content: ReactNode;\n}\n\n/**\n * Internal representation of a parsed TabPanel.\n */\nexport interface ParsedPanel\n extends Omit<CubeTabPanelProps, 'id' | 'children'> {\n /** Panel key (always a string internally for React Aria compatibility) */\n key: string;\n /** Panel content extracted from TabPanel's children prop */\n content: ReactNode;\n}\n"],"mappings":";;;;;;AA0BA,MAAa,iBAAsD;CACjE,QAAQ;CACR,OAAO;CACR"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from "../../../utils/react/useLayoutEffect.js";
|
|
3
3
|
import { Block } from "../../Block.js";
|
|
4
4
|
import { Space } from "../../layout/Space.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { _Text } from "../../content/Text.js";
|
|
3
3
|
import { _Title } from "../../content/Title.js";
|
|
4
4
|
import { Card } from "../../content/Card/Card.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { _Title } from "../../content/Title.js";
|
|
3
3
|
import { useProviderProps } from "../../../provider.js";
|
|
4
4
|
import { Space } from "../../layout/Space.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { _Title } from "../../content/Title.js";
|
|
3
3
|
import { useProviderProps } from "../../../provider.js";
|
|
4
4
|
import { Space } from "../../layout/Space.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { chain } from "../../../utils/react/chain.js";
|
|
3
3
|
import { Paragraph } from "../../content/Paragraph.js";
|
|
4
4
|
import { _Title } from "../../content/Title.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { AlertDialogZone } from "./AlertDialogZone.js";
|
|
3
3
|
import { createContext, useContext, useMemo, 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.121.0 | Cube Dev Team */
|
|
2
2
|
import { Portal } from "../../portal/Portal.js";
|
|
3
3
|
import { DialogContainer } from "../Dialog/DialogContainer.js";
|
|
4
4
|
import { _AlertDialog } from "./AlertDialog.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { SlotProvider } from "../../../utils/react/Slots.js";
|
|
4
4
|
import { CloseIcon } from "../../../icons/CloseIcon.js";
|
|
5
|
-
import { _ItemButton } from "../../actions/ItemButton/ItemButton.js";
|
|
6
5
|
import { useOpenTransitionContext } from "../Modal/OpenTransition.js";
|
|
6
|
+
import { _ItemButton } from "../../actions/ItemButton/ItemButton.js";
|
|
7
7
|
import { useDialogContext } from "./context.js";
|
|
8
8
|
import { BASE_STYLES, BLOCK_STYLES, DIMENSION_STYLES, FLOW_STYLES, extractStyles, tasty } from "@tenphi/tasty";
|
|
9
9
|
import { forwardRef, useEffect, useMemo, useRef } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { _Modal } from "../Modal/Modal.js";
|
|
3
3
|
import { DialogContext } from "./context.js";
|
|
4
4
|
import { Children, isValidElement, useRef } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { _Title } from "../../content/Title.js";
|
|
3
3
|
import { ButtonGroup } from "../../actions/ButtonGroup/ButtonGroup.js";
|
|
4
4
|
import { Button } from "../../actions/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
3
3
|
import { _Modal } from "../Modal/Modal.js";
|
|
4
4
|
import { _Tray } from "../Modal/Tray.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { DialogContainer } from "./DialogContainer.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { _Overlay } from "./Overlay.js";
|
|
4
4
|
import { _Underlay } from "./Underlay.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { Children, cloneElement, createContext, useContext, useRef } from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Transition } from "react-transition-group";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { Provider, useProviderProps } from "../../../provider.js";
|
|
3
3
|
import { OpenTransition } from "./OpenTransition.js";
|
|
4
4
|
import { forwardRef, useCallback, useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { _Overlay } from "./Overlay.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.121.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { _Overlay } from "./Overlay.js";
|
|
4
4
|
import { _Underlay } from "./Underlay.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
|
|
4
4
|
import { createContext, useContext, useMemo } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { Block } from "../../Block.js";
|
|
3
3
|
import { ItemActionProvider } from "../../actions/ItemActionContext.js";
|
|
4
4
|
import { Space } from "../../layout/Space.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { NotificationCard } from "./NotificationCard.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.121.0 | Cube Dev Team */
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from "../../../utils/react/useLayoutEffect.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { DisplayTransition } from "../../helpers/DisplayTransition/DisplayTransition.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { NotificationContext, PersistentNotificationsContext, ToastContext, useNotificationContext, useToastContext } from "./NotificationContext.js";
|
|
3
3
|
import { OverlayContainer } from "./OverlayContainer.js";
|
|
4
4
|
import { useNotificationState } from "./use-notification-state.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.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 { NotificationActionInterceptorContext } from "./NotificationAction.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
//#region src/components/overlays/Notifications/dismissed-storage.ts
|
|
3
3
|
const STORAGE_KEY = "cube-ui-dismissed-notifications";
|
|
4
4
|
const TTL_MS = 864e5;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { useToastContext } from "./NotificationContext.js";
|
|
3
3
|
import { NotificationAction } from "./NotificationAction.js";
|
|
4
4
|
import { NotificationCard } from "./NotificationCard.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { useWarn } from "../../../_internal/hooks/use-warn.js";
|
|
4
4
|
import { useNotificationContext } from "./NotificationContext.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { cleanupAndGetValidIds, saveDismissedId } from "./dismissed-storage.js";
|
|
4
4
|
import { useRef, useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { _Item } from "../../content/Item/Item.js";
|
|
3
3
|
import { getThemeIcon } from "./useToast.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.121.0 | Cube Dev Team */
|
|
2
2
|
import { useToastContext } from "../Notifications/NotificationContext.js";
|
|
3
3
|
import { useProgressToast } from "./useProgressToast.js";
|
|
4
4
|
import { getThemeIcon, useToast } from "./useToast.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
|
|
4
4
|
import { useToastContext } from "../Notifications/NotificationContext.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { CheckIcon } from "../../../icons/CheckIcon.js";
|
|
3
3
|
import { DangerIcon } from "../../../icons/DangerIcon.js";
|
|
4
4
|
import { InfoCircleIcon } from "../../../icons/InfoCircleIcon.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from "../../../utils/react/useLayoutEffect.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { mergeRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
@@ -20,7 +20,7 @@ const TooltipElement = tasty({ styles: {
|
|
|
20
20
|
"": "#white",
|
|
21
21
|
light: "#dark-02"
|
|
22
22
|
},
|
|
23
|
-
width: "initial 36x max-content",
|
|
23
|
+
width: "initial min(36x, (100dvw - 4x)) max-content",
|
|
24
24
|
radius: true,
|
|
25
25
|
padding: ".75x 1x",
|
|
26
26
|
preset: "t4",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","names":["mergeProps"],"sources":["../../../../src/components/overlays/Tooltip/Tooltip.tsx"],"sourcesContent":["import { createDOMRef } from '@react-spectrum/utils';\nimport { DOMRefValue } from '@react-types/shared';\nimport {\n BaseProps,\n CONTAINER_STYLES,\n ContainerStyleProps,\n extractStyles,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n ForwardedRef,\n forwardRef,\n useContext,\n useImperativeHandle,\n useMemo,\n useRef,\n} from 'react';\nimport { AriaTooltipProps, useTooltip } from 'react-aria';\n\nimport { PlacementAxis } from '../../../shared';\nimport { mergeProps, mergeRefs, useLayoutEffect } from '../../../utils/react';\n\nimport { TooltipContext } from './context';\n\nexport type { AriaTooltipProps };\n\nconst TooltipElement = tasty({\n styles: {\n display: 'block',\n fill: {\n '': '#dark.85',\n light: '#white',\n },\n color: {\n '': '#white',\n light: '#dark-02',\n },\n width: 'initial 36x max-content',\n radius: true,\n padding: '.75x 1x',\n preset: 't4',\n backdropFilter: 'blur(.5x)',\n whiteSpace: 'pre-line',\n pointerEvents: {\n '': 'none',\n material: 'auto',\n },\n filter: {\n '': false,\n light: 'drop-shadow(0 0 1px #dark.2)',\n },\n transition:\n 'translate $transition ease-out, scale $transition ease-out, theme $transition ease-out',\n translate: {\n '': '0 0',\n 'open & [data-placement=\"top\"]': '0 0',\n '!open & [data-placement=\"top\"]': '0 1x',\n 'open & [data-placement=\"bottom\"]': '0 0',\n '!open & [data-placement=\"bottom\"]': '0 -1x',\n 'open & [data-placement=\"left\"]': '0 0',\n '!open & [data-placement=\"left\"]': '1x 0',\n 'open & [data-placement=\"right\"]': '0 0',\n '!open & [data-placement=\"right\"]': '-1x 0',\n },\n transformOrigin: {\n '': 'top center',\n '[data-placement=\"top\"]': 'bottom center',\n '[data-placement=\"left\"]': 'right center',\n '[data-placement=\"right\"]': 'left center',\n },\n scale: {\n '': '1 1',\n '!open': '1 .8',\n '!open & ([data-placement=\"left\"] | [data-placement=\"right\"])': '.8 1',\n },\n opacity: {\n '': 1,\n '!open': 0.001,\n },\n },\n});\n\nconst TooltipTipElement = tasty({\n styles: {\n position: 'absolute',\n width: '1px',\n height: '1px',\n border: '.5x #clear',\n borderTop: {\n '': '.5x solid #dark.85',\n light: '.5x solid #white',\n },\n borderBottom: '0',\n top: {\n '': 'initial',\n '[data-placement=\"left\"] | [data-placement=\"right\"]': '50%',\n '[data-placement=\"top\"]': '100%',\n },\n left: {\n '': 'initial',\n '[data-placement=\"top\"] | [data-placement=\"bottom\"]': '50%',\n '[data-placement=\"left\"]': '100%',\n },\n right: {\n '': 'initial',\n '[data-placement=\"right\"]': '100%',\n },\n bottom: {\n '': 'initial',\n '[data-placement=\"bottom\"]': '100%',\n },\n transform: {\n '': 'translate((-.375x - 1px), 0)',\n '[data-placement=\"bottom\"]':\n 'translate((-.375x - 1px), 0) rotate(180deg)',\n '[data-placement=\"left\"]': 'translate(-.25x, -.25x) rotate(270deg)',\n '[data-placement=\"right\"]': 'translate(.25x, -.25x) rotate(90deg)',\n },\n transition: 'theme',\n },\n});\n\nexport interface CubeTooltipProps\n extends BaseProps,\n ContainerStyleProps,\n AriaTooltipProps {\n tipStyles?: Styles;\n showIcon?: boolean;\n placement?: PlacementAxis;\n isMaterial?: boolean;\n isOpen?: boolean;\n isLight?: boolean;\n onOpenChange?: (isOpen: boolean) => void;\n defaultOpen?: boolean;\n shouldFlip?: boolean;\n}\n\nfunction Tooltip(\n props: CubeTooltipProps,\n ref: ForwardedRef<DOMRefValue<HTMLDivElement>>,\n) {\n let {\n ref: overlayRef,\n transitionRef,\n arrowProps,\n state,\n overlayProps,\n minOffset,\n minScale,\n isMaterial: isMaterialContext,\n isLight: isLightContext,\n phase,\n isShown,\n updatePosition,\n ...tooltipProviderProps\n } = useContext(TooltipContext);\n\n const defaultRef = useRef<HTMLDivElement>(null);\n const combinedRef = mergeRefs(transitionRef, overlayRef ?? defaultRef);\n const finalOverlayRef = overlayRef ?? defaultRef;\n\n props = mergeProps(props, tooltipProviderProps);\n\n let {\n placement = 'top',\n isOpen,\n tipStyles,\n showIcon,\n isMaterial = isMaterialContext,\n isLight = isLightContext,\n ...otherProps\n } = props;\n\n const styles = extractStyles(otherProps, CONTAINER_STYLES);\n\n let { tooltipProps } = useTooltip({ ...props, isDismissable: false }, state);\n\n // Sync ref with overlayRef from context.\n useImperativeHandle(ref, () => createDOMRef(finalOverlayRef));\n\n if (typeof minOffset === 'number') {\n minOffset = `${minOffset}px`;\n }\n\n if (typeof minScale === 'number') {\n minScale = String(minScale);\n }\n\n // Extract primary placement direction for consistent styling\n const placementDirection = placement?.split(' ')[0] || placement || 'top';\n\n const mods = useMemo(() => {\n return {\n material: isMaterial,\n light: isLight,\n open: isShown ?? isOpen,\n };\n }, [isMaterial, isShown, isOpen, isLight]);\n\n // Update position when tooltip becomes visible\n useLayoutEffect(() => {\n updatePosition?.();\n }, []);\n\n return (\n <TooltipElement\n {...tooltipProps}\n {...overlayProps}\n ref={combinedRef}\n styles={styles}\n mods={mods}\n data-min-offset={minOffset}\n data-min-scale={minScale}\n data-placement={placementDirection}\n data-phase={phase}\n >\n {props.children}\n <TooltipTipElement\n data-placement={placementDirection}\n styles={tipStyles}\n mods={mods}\n {...arrowProps}\n />\n </TooltipElement>\n );\n}\n\n/**\n * Display container for Tooltip content. Has a directional arrow dependent on its placement.\n */\nlet _Tooltip = forwardRef(Tooltip);\n\n_Tooltip.displayName = 'Tooltip';\n\nexport { _Tooltip as Tooltip };\n"],"mappings":";;;;;;;;;;;;AA2BA,MAAM,iBAAiB,MAAM,EAC3B,QAAQ;CACN,SAAS;CACT,MAAM;EACJ,IAAI;EACJ,OAAO;EACR;CACD,OAAO;EACL,IAAI;EACJ,OAAO;EACR;CACD,OAAO;CACP,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,gBAAgB;CAChB,YAAY;CACZ,eAAe;EACb,IAAI;EACJ,UAAU;EACX;CACD,QAAQ;EACN,IAAI;EACJ,OAAO;EACR;CACD,YACE;CACF,WAAW;EACT,IAAI;EACJ,mCAAiC;EACjC,oCAAkC;EAClC,sCAAoC;EACpC,uCAAqC;EACrC,oCAAkC;EAClC,qCAAmC;EACnC,qCAAmC;EACnC,sCAAoC;EACrC;CACD,iBAAiB;EACf,IAAI;EACJ,4BAA0B;EAC1B,6BAA2B;EAC3B,8BAA4B;EAC7B;CACD,OAAO;EACL,IAAI;EACJ,SAAS;EACT,oEAAgE;EACjE;CACD,SAAS;EACP,IAAI;EACJ,SAAS;EACV;CACF,EACF,CAAC;AAEF,MAAM,oBAAoB,MAAM,EAC9B,QAAQ;CACN,UAAU;CACV,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,WAAW;EACT,IAAI;EACJ,OAAO;EACR;CACD,cAAc;CACd,KAAK;EACH,IAAI;EACJ,0DAAsD;EACtD,4BAA0B;EAC3B;CACD,MAAM;EACJ,IAAI;EACJ,0DAAsD;EACtD,6BAA2B;EAC5B;CACD,OAAO;EACL,IAAI;EACJ,8BAA4B;EAC7B;CACD,QAAQ;EACN,IAAI;EACJ,+BAA6B;EAC9B;CACD,WAAW;EACT,IAAI;EACJ,+BACE;EACF,6BAA2B;EAC3B,8BAA4B;EAC7B;CACD,YAAY;CACb,EACF,CAAC;AAiBF,SAAS,QACP,OACA,KACA;CACA,IAAI,EACF,KAAK,YACL,eACA,YACA,OACA,cACA,WACA,UACA,YAAY,mBACZ,SAAS,gBACT,OACA,SACA,gBACA,GAAG,yBACD,WAAW,eAAe;CAE9B,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,cAAc,UAAU,eAAe,cAAc,WAAW;CACtE,MAAM,kBAAkB,cAAc;AAEtC,SAAQA,aAAW,OAAO,qBAAqB;CAE/C,IAAI,EACF,YAAY,OACZ,QACA,WACA,UACA,aAAa,mBACb,UAAU,gBACV,GAAG,eACD;CAEJ,MAAM,SAAS,cAAc,YAAY,iBAAiB;CAE1D,IAAI,EAAE,iBAAiB,WAAW;EAAE,GAAG;EAAO,eAAe;EAAO,EAAE,MAAM;AAG5E,qBAAoB,WAAW,aAAa,gBAAgB,CAAC;AAE7D,KAAI,OAAO,cAAc,SACvB,aAAY,GAAG,UAAU;AAG3B,KAAI,OAAO,aAAa,SACtB,YAAW,OAAO,SAAS;CAI7B,MAAM,qBAAqB,WAAW,MAAM,IAAI,CAAC,MAAM,aAAa;CAEpE,MAAM,OAAO,cAAc;AACzB,SAAO;GACL,UAAU;GACV,OAAO;GACP,MAAM,WAAW;GAClB;IACA;EAAC;EAAY;EAAS;EAAQ;EAAQ,CAAC;AAG1C,yBAAsB;AACpB,oBAAkB;IACjB,EAAE,CAAC;AAEN,QACE,qBAAC;EACC,GAAI;EACJ,GAAI;EACJ,KAAK;EACG;EACF;EACN,mBAAiB;EACjB,kBAAgB;EAChB,kBAAgB;EAChB,cAAY;aAEX,MAAM,UACP,oBAAC;GACC,kBAAgB;GAChB,QAAQ;GACF;GACN,GAAI;IACJ;GACa;;;;;AAOrB,IAAI,WAAW,WAAW,QAAQ;AAElC,SAAS,cAAc"}
|
|
1
|
+
{"version":3,"file":"Tooltip.js","names":["mergeProps"],"sources":["../../../../src/components/overlays/Tooltip/Tooltip.tsx"],"sourcesContent":["import { createDOMRef } from '@react-spectrum/utils';\nimport { DOMRefValue } from '@react-types/shared';\nimport {\n BaseProps,\n CONTAINER_STYLES,\n ContainerStyleProps,\n extractStyles,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n ForwardedRef,\n forwardRef,\n useContext,\n useImperativeHandle,\n useMemo,\n useRef,\n} from 'react';\nimport { AriaTooltipProps, useTooltip } from 'react-aria';\n\nimport { PlacementAxis } from '../../../shared';\nimport { mergeProps, mergeRefs, useLayoutEffect } from '../../../utils/react';\n\nimport { TooltipContext } from './context';\n\nexport type { AriaTooltipProps };\n\nconst TooltipElement = tasty({\n styles: {\n display: 'block',\n fill: {\n '': '#dark.85',\n light: '#white',\n },\n color: {\n '': '#white',\n light: '#dark-02',\n },\n width: 'initial min(36x, (100dvw - 4x)) max-content',\n radius: true,\n padding: '.75x 1x',\n preset: 't4',\n backdropFilter: 'blur(.5x)',\n whiteSpace: 'pre-line',\n pointerEvents: {\n '': 'none',\n material: 'auto',\n },\n filter: {\n '': false,\n light: 'drop-shadow(0 0 1px #dark.2)',\n },\n transition:\n 'translate $transition ease-out, scale $transition ease-out, theme $transition ease-out',\n translate: {\n '': '0 0',\n 'open & [data-placement=\"top\"]': '0 0',\n '!open & [data-placement=\"top\"]': '0 1x',\n 'open & [data-placement=\"bottom\"]': '0 0',\n '!open & [data-placement=\"bottom\"]': '0 -1x',\n 'open & [data-placement=\"left\"]': '0 0',\n '!open & [data-placement=\"left\"]': '1x 0',\n 'open & [data-placement=\"right\"]': '0 0',\n '!open & [data-placement=\"right\"]': '-1x 0',\n },\n transformOrigin: {\n '': 'top center',\n '[data-placement=\"top\"]': 'bottom center',\n '[data-placement=\"left\"]': 'right center',\n '[data-placement=\"right\"]': 'left center',\n },\n scale: {\n '': '1 1',\n '!open': '1 .8',\n '!open & ([data-placement=\"left\"] | [data-placement=\"right\"])': '.8 1',\n },\n opacity: {\n '': 1,\n '!open': 0.001,\n },\n },\n});\n\nconst TooltipTipElement = tasty({\n styles: {\n position: 'absolute',\n width: '1px',\n height: '1px',\n border: '.5x #clear',\n borderTop: {\n '': '.5x solid #dark.85',\n light: '.5x solid #white',\n },\n borderBottom: '0',\n top: {\n '': 'initial',\n '[data-placement=\"left\"] | [data-placement=\"right\"]': '50%',\n '[data-placement=\"top\"]': '100%',\n },\n left: {\n '': 'initial',\n '[data-placement=\"top\"] | [data-placement=\"bottom\"]': '50%',\n '[data-placement=\"left\"]': '100%',\n },\n right: {\n '': 'initial',\n '[data-placement=\"right\"]': '100%',\n },\n bottom: {\n '': 'initial',\n '[data-placement=\"bottom\"]': '100%',\n },\n transform: {\n '': 'translate((-.375x - 1px), 0)',\n '[data-placement=\"bottom\"]':\n 'translate((-.375x - 1px), 0) rotate(180deg)',\n '[data-placement=\"left\"]': 'translate(-.25x, -.25x) rotate(270deg)',\n '[data-placement=\"right\"]': 'translate(.25x, -.25x) rotate(90deg)',\n },\n transition: 'theme',\n },\n});\n\nexport interface CubeTooltipProps\n extends BaseProps,\n ContainerStyleProps,\n AriaTooltipProps {\n tipStyles?: Styles;\n showIcon?: boolean;\n placement?: PlacementAxis;\n isMaterial?: boolean;\n isOpen?: boolean;\n isLight?: boolean;\n onOpenChange?: (isOpen: boolean) => void;\n defaultOpen?: boolean;\n shouldFlip?: boolean;\n}\n\nfunction Tooltip(\n props: CubeTooltipProps,\n ref: ForwardedRef<DOMRefValue<HTMLDivElement>>,\n) {\n let {\n ref: overlayRef,\n transitionRef,\n arrowProps,\n state,\n overlayProps,\n minOffset,\n minScale,\n isMaterial: isMaterialContext,\n isLight: isLightContext,\n phase,\n isShown,\n updatePosition,\n ...tooltipProviderProps\n } = useContext(TooltipContext);\n\n const defaultRef = useRef<HTMLDivElement>(null);\n const combinedRef = mergeRefs(transitionRef, overlayRef ?? defaultRef);\n const finalOverlayRef = overlayRef ?? defaultRef;\n\n props = mergeProps(props, tooltipProviderProps);\n\n let {\n placement = 'top',\n isOpen,\n tipStyles,\n showIcon,\n isMaterial = isMaterialContext,\n isLight = isLightContext,\n ...otherProps\n } = props;\n\n const styles = extractStyles(otherProps, CONTAINER_STYLES);\n\n let { tooltipProps } = useTooltip({ ...props, isDismissable: false }, state);\n\n // Sync ref with overlayRef from context.\n useImperativeHandle(ref, () => createDOMRef(finalOverlayRef));\n\n if (typeof minOffset === 'number') {\n minOffset = `${minOffset}px`;\n }\n\n if (typeof minScale === 'number') {\n minScale = String(minScale);\n }\n\n // Extract primary placement direction for consistent styling\n const placementDirection = placement?.split(' ')[0] || placement || 'top';\n\n const mods = useMemo(() => {\n return {\n material: isMaterial,\n light: isLight,\n open: isShown ?? isOpen,\n };\n }, [isMaterial, isShown, isOpen, isLight]);\n\n // Update position when tooltip becomes visible\n useLayoutEffect(() => {\n updatePosition?.();\n }, []);\n\n return (\n <TooltipElement\n {...tooltipProps}\n {...overlayProps}\n ref={combinedRef}\n styles={styles}\n mods={mods}\n data-min-offset={minOffset}\n data-min-scale={minScale}\n data-placement={placementDirection}\n data-phase={phase}\n >\n {props.children}\n <TooltipTipElement\n data-placement={placementDirection}\n styles={tipStyles}\n mods={mods}\n {...arrowProps}\n />\n </TooltipElement>\n );\n}\n\n/**\n * Display container for Tooltip content. Has a directional arrow dependent on its placement.\n */\nlet _Tooltip = forwardRef(Tooltip);\n\n_Tooltip.displayName = 'Tooltip';\n\nexport { _Tooltip as Tooltip };\n"],"mappings":";;;;;;;;;;;;AA2BA,MAAM,iBAAiB,MAAM,EAC3B,QAAQ;CACN,SAAS;CACT,MAAM;EACJ,IAAI;EACJ,OAAO;EACR;CACD,OAAO;EACL,IAAI;EACJ,OAAO;EACR;CACD,OAAO;CACP,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,gBAAgB;CAChB,YAAY;CACZ,eAAe;EACb,IAAI;EACJ,UAAU;EACX;CACD,QAAQ;EACN,IAAI;EACJ,OAAO;EACR;CACD,YACE;CACF,WAAW;EACT,IAAI;EACJ,mCAAiC;EACjC,oCAAkC;EAClC,sCAAoC;EACpC,uCAAqC;EACrC,oCAAkC;EAClC,qCAAmC;EACnC,qCAAmC;EACnC,sCAAoC;EACrC;CACD,iBAAiB;EACf,IAAI;EACJ,4BAA0B;EAC1B,6BAA2B;EAC3B,8BAA4B;EAC7B;CACD,OAAO;EACL,IAAI;EACJ,SAAS;EACT,oEAAgE;EACjE;CACD,SAAS;EACP,IAAI;EACJ,SAAS;EACV;CACF,EACF,CAAC;AAEF,MAAM,oBAAoB,MAAM,EAC9B,QAAQ;CACN,UAAU;CACV,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,WAAW;EACT,IAAI;EACJ,OAAO;EACR;CACD,cAAc;CACd,KAAK;EACH,IAAI;EACJ,0DAAsD;EACtD,4BAA0B;EAC3B;CACD,MAAM;EACJ,IAAI;EACJ,0DAAsD;EACtD,6BAA2B;EAC5B;CACD,OAAO;EACL,IAAI;EACJ,8BAA4B;EAC7B;CACD,QAAQ;EACN,IAAI;EACJ,+BAA6B;EAC9B;CACD,WAAW;EACT,IAAI;EACJ,+BACE;EACF,6BAA2B;EAC3B,8BAA4B;EAC7B;CACD,YAAY;CACb,EACF,CAAC;AAiBF,SAAS,QACP,OACA,KACA;CACA,IAAI,EACF,KAAK,YACL,eACA,YACA,OACA,cACA,WACA,UACA,YAAY,mBACZ,SAAS,gBACT,OACA,SACA,gBACA,GAAG,yBACD,WAAW,eAAe;CAE9B,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,cAAc,UAAU,eAAe,cAAc,WAAW;CACtE,MAAM,kBAAkB,cAAc;AAEtC,SAAQA,aAAW,OAAO,qBAAqB;CAE/C,IAAI,EACF,YAAY,OACZ,QACA,WACA,UACA,aAAa,mBACb,UAAU,gBACV,GAAG,eACD;CAEJ,MAAM,SAAS,cAAc,YAAY,iBAAiB;CAE1D,IAAI,EAAE,iBAAiB,WAAW;EAAE,GAAG;EAAO,eAAe;EAAO,EAAE,MAAM;AAG5E,qBAAoB,WAAW,aAAa,gBAAgB,CAAC;AAE7D,KAAI,OAAO,cAAc,SACvB,aAAY,GAAG,UAAU;AAG3B,KAAI,OAAO,aAAa,SACtB,YAAW,OAAO,SAAS;CAI7B,MAAM,qBAAqB,WAAW,MAAM,IAAI,CAAC,MAAM,aAAa;CAEpE,MAAM,OAAO,cAAc;AACzB,SAAO;GACL,UAAU;GACV,OAAO;GACP,MAAM,WAAW;GAClB;IACA;EAAC;EAAY;EAAS;EAAQ;EAAQ,CAAC;AAG1C,yBAAsB;AACpB,oBAAkB;IACjB,EAAE,CAAC;AAEN,QACE,qBAAC;EACC,GAAI;EACJ,GAAI;EACJ,KAAK;EACG;EACF;EACN,mBAAiB;EACjB,kBAAgB;EAChB,kBAAgB;EAChB,cAAY;aAEX,MAAM,UACP,oBAAC;GACC,kBAAgB;GAChB,QAAQ;GACF;GACN,GAAI;IACJ;GACa;;;;;AAOrB,IAAI,WAAW,WAAW,QAAQ;AAElC,SAAS,cAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { _Tooltip } from "./Tooltip.js";
|
|
3
3
|
import { TooltipTrigger } from "./TooltipTrigger.js";
|
|
4
4
|
import { isValidElement, useEffect, useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { TooltipContext } from "./context.js";
|
|
3
3
|
import { Block } from "../../Block.js";
|
|
4
4
|
import { _ActiveZone } from "../../content/ActiveZone/ActiveZone.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { usePortal } from "./usePortal.js";
|
|
3
3
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
4
|
import { createPortal } from "react-dom";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.121.0 | Cube Dev Team */
|
|
2
2
|
import { usePortalContext } from "./PortalProvider.js";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import invariant from "tiny-invariant";
|