@cube-dev/ui-kit 0.149.1 → 0.150.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-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 +7 -7
- package/dist/components/GlobalStyles.js.map +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +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-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 +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 +5 -1
- package/dist/components/content/CopySnippet/CopySnippet.js.map +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 +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 +6 -2
- package/dist/components/content/PrismCode/PrismCode.js.map +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.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 +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/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/TimeInput.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 -1
- 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.js +1 -1
- package/dist/components/fields/RadioGroup/Radio.js +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.js +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/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/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/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 +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.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/layout.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/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/TabButton.js +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/popover-placement.js +1 -1
- package/dist/components/navigation/Tabs/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/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 +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 +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 +5 -3
- package/dist/data/item-themes.js.map +1 -1
- package/dist/data/themes.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/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/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 +4 -3
- package/dist/index.js +5 -4
- 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.d.ts +2 -7
- package/dist/tokens/colors.js +16 -7
- package/dist/tokens/colors.js.map +1 -1
- package/dist/tokens/index.d.ts +5 -17
- package/dist/tokens/index.js +23 -13
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +33 -0
- package/dist/tokens/lazy-styles.js.map +1 -0
- package/dist/tokens/palette.d.ts +15 -0
- package/dist/tokens/palette.js +166 -123
- package/dist/tokens/palette.js.map +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.d.ts +1 -0
- package/dist/tokens/typography.js +29 -1
- package/dist/tokens/typography.js.map +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.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/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +2 -2
- package/docs/Colors.md +77 -0
- package/docs/Typography.md +1 -1
- package/docs/Usage.md +10 -0
- package/docs/components/content/CopySnippet.md +1 -1
- package/docs/components/content/PrismCode.md +1 -0
- package/docs/glaze/api.md +1033 -414
- package/docs/glaze/methodology.md +536 -208
- package/docs/glaze/migration.md +127 -49
- package/docs/glaze/okhst.md +190 -0
- package/package.json +2 -2
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @cube-dev/ui-kit
|
|
2
2
|
|
|
3
|
+
## 0.150.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1267](https://github.com/cube-js/cube-ui-kit/pull/1267) [`f9d7ebdc`](https://github.com/cube-js/cube-ui-kit/commit/f9d7ebdc1cb15df73eb3cbbd4fe1db45f2c1f319) Thanks [@tenphi](https://github.com/tenphi)! - Add `s2`, `s3`, and `s4` monospace typography presets for code and snippet text (sized to match `t2`–`t4`, using `--font-mono`). `PrismCode` and `CopySnippet` now use `s3` by default.
|
|
8
|
+
|
|
9
|
+
- [#1267](https://github.com/cube-js/cube-ui-kit/pull/1267) [`f9d7ebdc`](https://github.com/cube-js/cube-ui-kit/commit/f9d7ebdc1cb15df73eb3cbbd4fe1db45f2c1f319) Thanks [@tenphi](https://github.com/tenphi)! - Update `@tenphi/glaze` 0.13.0 → 1.2.0 and migrate the palette from the `lightness` axis to the contrast-shaped `tone` axis.
|
|
10
|
+
|
|
11
|
+
**This changes resolved colors.** Glaze 1.x removed `lightness` as a color-def input, so the upgrade and the axis migration are the same change — all 54 palette declarations are re-authored against `tone`. Because `tone` is contrast-shaped rather than lightness-shaped, tokens do not land on their previous values. Measured per-channel RGB delta against the previous release, across every token in all four scheme variants: core surfaces/text mean ~13 (max 51), accent mean ~13 (max 48). Seed hue and saturation are unchanged, so hue relationships and relative ramps are preserved — the shift is in tone placement, not in the palette's structure.
|
|
12
|
+
|
|
13
|
+
Also newly available from Glaze 1.2.0: `tone: 'max'` / `'min'` on colors that declare a `base` (the extreme is no longer re-mapped through the dark tone window, which used to compress the base-to-extreme span and lower contrast in dark), and `darkHue` / `darkSaturation` for seeding the dark schemes independently of the flat `darkDesaturation` haircut.
|
|
14
|
+
|
|
15
|
+
- [#1267](https://github.com/cube-js/cube-ui-kit/pull/1267) [`f9d7ebdc`](https://github.com/cube-js/cube-ui-kit/commit/f9d7ebdc1cb15df73eb3cbbd4fe1db45f2c1f319) Thanks [@tenphi](https://github.com/tenphi)! - Defer Glaze color token resolution until first access (`getPaletteTokens` / `getColorTokens` / `getTokens`) so host apps can call `glaze.configure(...)` after importing the kit and still affect UI Kit tokens. Existing `PALETTE_TOKENS` / `COLOR_TOKENS` / `TOKENS` exports remain as lazy proxies.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#1267](https://github.com/cube-js/cube-ui-kit/pull/1267) [`f9d7ebdc`](https://github.com/cube-js/cube-ui-kit/commit/f9d7ebdc1cb15df73eb3cbbd4fe1db45f2c1f319) Thanks [@tenphi](https://github.com/tenphi)! - Fix primary (and other solid accent) disabled button labels — `#*-accent-disabled-surface-text` rides the extreme away from its disabled chip (`tone: 'max'`), so the label stays deliberately faint (~cr 1.7, reading as disabled rather than as live text) while keeping a consistent separation from the chip in light, dark, and high-contrast schemes.
|
|
20
|
+
|
|
21
|
+
Previously this was a contrast-driven relative step (`lightness: '+1'` with `contrast: 1.51`). Authoring it as an extreme is only viable from `@tenphi/glaze` 1.2.0, which no longer re-maps a based extreme through the dark tone window — that compressed the base-to-extreme span and lowered the dark label's contrast.
|
|
22
|
+
|
|
23
|
+
- [#1267](https://github.com/cube-js/cube-ui-kit/pull/1267) [`f9d7ebdc`](https://github.com/cube-js/cube-ui-kit/commit/f9d7ebdc1cb15df73eb3cbbd4fe1db45f2c1f319) Thanks [@tenphi](https://github.com/tenphi)! - Keep `#pink` resolving. The legacy alias was dropped while `tasty.config.ts`, `Usage.docs.mdx` and the `pink` key in the Tasty token augmentation all still advertised it, so consumer styles using it would have silently stopped resolving with types still reporting the token as valid. Restored as the same scheme-static literal.
|
|
24
|
+
|
|
25
|
+
Fix `CopySnippet`'s `serif` variant rendering monospace. Moving the code element to the `s3` / `t3` presets lost the font family: `s3` carries `fontFamily: var(--font-mono)` but `t3` sets no family at all, so `serif` fell back to the `<code>` element's UA monospace default. The family is explicit again — monospace by default, the design system's default stack under `serif`.
|
|
26
|
+
|
|
27
|
+
- [#1267](https://github.com/cube-js/cube-ui-kit/pull/1267) [`f9d7ebdc`](https://github.com/cube-js/cube-ui-kit/commit/f9d7ebdc1cb15df73eb3cbbd4fe1db45f2c1f319) Thanks [@tenphi](https://github.com/tenphi)! - Ensure HTML syntax highlighting works in `PrismCode` and `CopySnippet`, including JavaScript inside `<script>` tags. Differentiate tag names, attributes, values, and punctuation so markup is not a single color wash.
|
|
28
|
+
|
|
29
|
+
- [#1267](https://github.com/cube-js/cube-ui-kit/pull/1267) [`f9d7ebdc`](https://github.com/cube-js/cube-ui-kit/commit/f9d7ebdc1cb15df73eb3cbbd4fe1db45f2c1f319) Thanks [@tenphi](https://github.com/tenphi)! - Selected outline/clear Item labels now use the softer `#primary-accent-text-soft` at rest and intensify to `#primary-accent-text` on hover (mirroring links). Both brand-text tokens are solved for AA against the selected fill, keeping labels readable and saturated.
|
|
30
|
+
|
|
31
|
+
## 0.149.2
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- [#1261](https://github.com/cube-js/cube-ui-kit/pull/1261) [`ce4664ac`](https://github.com/cube-js/cube-ui-kit/commit/ce4664ac7ed71c487cb1e89ab85ab00f26e5b24e) Thanks [@solarrust](https://github.com/solarrust)! - `DialogTrigger`'s `mobileType` now defaults to the same value as `type` instead of silently converting `type="popover"` to a full-screen modal under the 700px breakpoint. That auto-conversion was never an intentional per-consumer choice — `FilterPicker` and `Picker` both inherited it by omission, giving them an unrequested full-screen modal (with a close button) on narrow viewports like the Excel/Google Sheets add-in task pane. Consumers that want a different mobile presentation (e.g. `DatePicker`'s `mobileType="tray"`) are unaffected, since they already set it explicitly.
|
|
36
|
+
|
|
37
|
+
`FilterPicker` additionally no longer shows a close button in its popover at all (`isDismissable={false}` on its own Dialog) — it read as a duplicate of the existing "Clear" action in the header.
|
|
38
|
+
|
|
3
39
|
## 0.149.1
|
|
4
40
|
|
|
5
41
|
### Patch Changes
|
package/dist/components/Block.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../utils/styles.js";
|
|
3
3
|
import { CONTAINER_STYLES, filterBaseProps, 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.150.0 | Cube Dev Team */
|
|
2
2
|
import { ItemAction } from "./actions/ItemAction/ItemAction.js";
|
|
3
3
|
import { ItemBadge } from "./content/ItemBadge/ItemBadge.js";
|
|
4
4
|
import { Item } from "react-stately";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
2
|
-
import {
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
|
+
import { getTokens } from "../tokens/index.js";
|
|
3
3
|
import { useGlobalStyles, useRawCSS } from "@tenphi/tasty";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
|
|
@@ -89,11 +89,11 @@ const STATIC_CSS = `
|
|
|
89
89
|
pre[class*="language-"] {
|
|
90
90
|
color: var(--surface-text-color);
|
|
91
91
|
background: none;
|
|
92
|
-
font-family: var(--font-mono);
|
|
92
|
+
font-family: var(--s3-font-family, var(--font-mono));
|
|
93
93
|
text-align: left;
|
|
94
|
-
font-weight:
|
|
95
|
-
font-size: 14px;
|
|
96
|
-
line-height: 20px;
|
|
94
|
+
font-weight: var(--s3-font-weight, 400);
|
|
95
|
+
font-size: var(--s3-font-size, 14px);
|
|
96
|
+
line-height: var(--s3-line-height, 20px);
|
|
97
97
|
white-space: pre;
|
|
98
98
|
word-spacing: normal;
|
|
99
99
|
word-break: normal;
|
|
@@ -265,7 +265,7 @@ const STATIC_CSS = `
|
|
|
265
265
|
function GlobalStyles(props) {
|
|
266
266
|
const { bodyStyles, font, monospaceFont } = props;
|
|
267
267
|
useGlobalStyles("body", useMemo(() => {
|
|
268
|
-
const styles = { ...
|
|
268
|
+
const styles = { ...getTokens() };
|
|
269
269
|
Object.assign(styles, BODY_STYLES);
|
|
270
270
|
if (bodyStyles) Object.assign(styles, bodyStyles);
|
|
271
271
|
return styles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalStyles.js","names":[],"sources":["../../src/components/GlobalStyles.tsx"],"sourcesContent":["import { useGlobalStyles, useRawCSS } from '@tenphi/tasty';\nimport { useMemo } from 'react';\n\nimport { TOKENS } from '../tokens';\n\nimport type { Styles } from '@tenphi/tasty';\n\ninterface GlobalStylesProps {\n bodyStyles?: { [key: string]: string };\n fonts?: boolean;\n fontDisplay?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';\n publicUrl?: string;\n font?: string;\n monospaceFont?: string;\n /** @deprecated Tokens are now always applied via useGlobalStyles */\n applyLegacyTokens?: boolean;\n}\n\n/**\n * Body styles applied via useGlobalStyles.\n *\n * `fill` and `color` use scheme-aware Glaze tokens so the whole page flips\n * automatically when `<html data-schema=\"dark\">` (or `prefers-color-scheme: dark`)\n * is active — see `src/tokens/palette.ts` and `src/components/Root.tsx`.\n */\nconst BODY_STYLES: Styles = {\n overscrollBehaviorY: 'none',\n fill: '#surface',\n fontFamily: 'var(--font-sans)',\n '-webkit-font-smoothing': 'antialiased',\n '-moz-osx-font-smoothing': 'grayscale',\n margin: 0,\n padding: 0,\n color: '#surface-text-soft',\n preset: 't3',\n letterSpacing: '0.02em',\n};\n\n// Static CSS that doesn't depend on props\nconst STATIC_CSS = `\n @font-face {\n font-family: text-security-disc;\n src: url(data:font/woff2;base64,d09GMgABAAAAAAjoAAsAAAAAMGgAAAidAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGVgDWYgpQdQE2AiQDCAsGAAQgBYUOBy4bvi8lYxtWw7BxAPB87x5FmeAMlf3/96RzDN74RcXUcjTKmrJ3T2VDSShiPhfiIJxxS7DiLkHFfQV33CM4427mAred74pWur/J3dyVsKy7coREA8fzvPvpfUk+tB3R8YTCzE0SCLepejmJ2u1yqp+kC7W4Rc/tDTs3GpNJ8ttRPOSTPhsXlwbi4kVY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aE2DBiI4iNIjaG2DhiE4hNIjaF2DRiM4jNIjaH2DxiC4gtIraE2DJiK4itIraG2DpiG4htIraF2DZiO4jtIraH2D5iB4gdInaE2DFiJ4idInaG2DliF4hdInaF2DViN4jdInaH2D1iD4g9IvaE2DNiL4i9IvaG2DvE3iP2AbGPiH1C7DNiXxD7itg3xL4j9gOxn4j9Quw3Yn8Q+4vYP8T+M6cIDBz9EXfeUHR1JyygPL/++I3R1cRvdDr+E12Jfh3Q0EN/fHn2mXptpJxUkIqu/Cs2egM33OjSLcT33I82+B9nP37X/c0W52623s45CYCo03QIBCVrAFAycnSYSqvO4YJt/NP73YqA/giNZhJ6sBbmql+0SQZaxNOZudJbc2nqxNvpM+veq7Sz2LUgFEu+VLs+Ay3yp7MVertp6i23v2Rmv5gmHDhSQ6t5GmTaqTsqhpWwmbOk3uKJrNOmwSSMC17jghqygilDOUU3KlLmHHNrajw3DVNVGWytGZDisM/cbkdRnvfIUJkaGJlgAYcoQ5bGptTmGc1R7pBC3XhFsLXnXR54qrMc+dGNBkqE4laBi4KmZYGom8vIy0lTyBkppBjLoTndMmrofIRORirsNlCbXzCgulmo36KztS2iV8rrNoRUL5VdkMSGoSXroC1KOQAA) format('woff2');\n }\n\n kbd {\n font-family: var(--c2-font-family);\n font-weight: var(--c2-font-weight);\n font-size: var(--c2-font-size);\n border: var(--border-width) solid var(--dark-04-color);\n background-color: var(--surface-color);\n color: var(--dark-color);\n border-radius: var(--radius);\n padding: 0 var(--outline-width);\n }\n\n :not([data-qa$=\"Icon\"]) > .tabler-icon {\n font-size: var(--icon-size);\n width: 1em;\n height: 1em;\n min-width: 1em;\n min-height: 1em;\n max-height: 1em;\n stroke-width: var(--stroke-width);\n }\n\n .cube-animation-spin {\n animation: cube-animation-spin 1s linear infinite;\n }\n\n @keyframes cube-animation-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n b, strong {\n font-weight: var(--bold-font-weight, 700);\n }\n\n [type=reset], [type=submit], button, html [type=button] {\n -webkit-appearance: none;\n }\n\n code {\n font-family: var(--font-mono);\n }\n\n /*\n * Prism syntax highlighting.\n *\n * All token colors come from the scheme-aware Glaze \\`code-*\\` palette\n * (defined in src/tokens/palette.ts). Each \\`code-*\\` token has \\`mode: 'auto'\\`\n * with a numeric contrast floor of 4.5 against \\`#surface\\` so every token\n * reads at WCAG AA in light AND dark schemes (AAA in high-contrast).\n * Diff insertion / deletion re-use the adaptive \\`success-*\\` and \\`danger-*\\`\n * ramps for both the line bg and the token color.\n */\n code[class*=\"language-\"],\n pre[class*=\"language-\"] {\n color: var(--surface-text-color);\n background: none;\n font-family: var(--font-mono);\n text-align: left;\n font-weight: normal;\n font-size: 14px;\n line-height: 20px;\n white-space: pre;\n word-spacing: normal;\n word-break: normal;\n word-wrap: normal;\n border-radius: 6px;\n border: none;\n\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n\n -webkit-hyphens: none;\n -moz-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n }\n\n pre[class*=\"language-\"]::-moz-selection, pre[class*=\"language-\"] ::-moz-selection,\n code[class*=\"language-\"]::-moz-selection, code[class*=\"language-\"] ::-moz-selection {\n text-shadow: none;\n background: rgb(var(--primary-color-rgb) / .2);\n }\n\n pre[class*=\"language-\"]::selection, pre[class*=\"language-\"] ::selection,\n code[class*=\"language-\"]::selection, code[class*=\"language-\"] ::selection {\n text-shadow: none;\n background: rgb(var(--primary-color-rgb) / .2);\n }\n\n @media print {\n code[class*=\"language-\"],\n pre[class*=\"language-\"] {\n text-shadow: none;\n }\n }\n\n /* Code blocks */\n pre[class*=\"language-\"] {\n overflow: auto;\n }\n\n :not(pre) > code[class*=\"language-\"],\n pre[class*=\"language-\"] {\n background: transparent;\n }\n\n /* Inline code */\n :not(pre) > code[class*=\"language-\"] {\n border-radius: .3em;\n white-space: normal;\n }\n\n /* Diff (re-uses success/danger ramps; both bg and text adapt to scheme) */\n .token.inserted-sign {\n background-color: var(--success-bg-color);\n color: var(--success-text-color);\n }\n\n .token.inserted {\n color: var(--success-text-color);\n }\n\n .token.deleted-sign {\n background-color: var(--danger-bg-color);\n color: var(--danger-text-color);\n }\n\n .token.deleted {\n color: var(--danger-text-color);\n }\n\n /* Comments — subdued gray-ish, AA floor */\n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata {\n color: var(--code-comment-color);\n }\n\n /* Operators / punctuation — subdued purple, AA floor */\n .token.operator,\n .token.punctuation {\n color: var(--code-punctuation-color);\n }\n\n .namespace {\n opacity: .7;\n }\n\n /* Keywords / language constructs — violet */\n .token.boolean,\n .token.constant,\n .token.keyword,\n .token.atrule {\n color: var(--code-keyword-color);\n font-weight: 500;\n }\n\n /* Numbers / numeric entities — orange */\n .token.entity,\n .token.number {\n color: var(--code-number-color);\n }\n\n /* Strings / character literals / URLs — green */\n .token.string,\n .token.char,\n .token.attr-value,\n .token.url,\n .language-css .token.string,\n .style .token.string {\n color: var(--code-string-color);\n }\n\n /* Names: functions, class names, regex, variables — pink/coral */\n .token.function,\n .token.class-name,\n .token.regex,\n .token.important,\n .token.variable {\n color: var(--code-function-color);\n }\n\n /* HTML/XML tag names — same hue as keywords (see Colors / CodeSyntax) */\n .token.tag {\n color: var(--code-keyword-color);\n }\n\n /* Attributes / properties / selectors / built-ins — cyan */\n .token.attr-name,\n .token.property,\n .token.symbol,\n .token.key,\n .token.builtin,\n .token.selector {\n color: var(--code-attribute-color);\n }\n\n /*\n * prism-react-renderer flattens nested markup tokens and prefixes parent\n * types onto each leaf (e.g. \\`token tag attr-value\\`). Re-assert leaf\n * colors so the bare \\`.token.tag\\` rule does not wash the whole tag.\n */\n .token.tag.attr-name {\n color: var(--code-attribute-color);\n }\n\n .token.tag.attr-value {\n color: var(--code-string-color);\n }\n\n .token.tag.punctuation {\n color: var(--code-punctuation-color);\n }\n\n .token.important,\n .token.bold {\n font-weight: bold;\n }\n\n .token.italic {\n font-style: italic;\n }\n\n .token.entity {\n cursor: help;\n }\n`;\n\nexport function GlobalStyles(props: GlobalStylesProps) {\n const { bodyStyles, font, monospaceFont } = props;\n\n // Merge token styles with body styles\n const bodyTokenStyles = useMemo((): Styles => {\n // Start with design tokens\n const styles: Styles = { ...TOKENS };\n\n // Add base body styles\n Object.assign(styles, BODY_STYLES);\n\n // Override with custom body styles if provided\n // Keys are passed through as-is (tasty handles both camelCase and kebab-case)\n if (bodyStyles) {\n Object.assign(styles, bodyStyles);\n }\n\n return styles;\n }, [bodyStyles]);\n\n // Apply tokens and body styles via useGlobalStyles\n useGlobalStyles('body', bodyTokenStyles);\n\n // Apply static CSS and font definitions via useRawCSS\n useRawCSS(() => {\n const fontValue = font ? `${font}, ` : '';\n const monospaceFontValue = monospaceFont ? `${monospaceFont}, ` : '';\n\n return `\n html {\n overscroll-behavior-y: none;\n --font-sans: ${fontValue}system-ui, -apple-system, \"Segoe UI\", Roboto, Helvetica, Arial, \"Apple Color Emoji\", \"Segoe UI Emoji\", sans-serif;\n --font-mono: ${monospaceFontValue}ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n }\n${STATIC_CSS}`;\n }, [font, monospaceFont]);\n\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;AAyBA,MAAM,cAAsB;CAC1B,qBAAqB;CACrB,MAAM;CACN,YAAY;CACZ,0BAA0B;CAC1B,2BAA2B;CAC3B,QAAQ;CACR,SAAS;CACT,OAAO;CACP,QAAQ;CACR,eAAe;CAChB;AAGD,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgPnB,SAAgB,aAAa,OAA0B;CACrD,MAAM,EAAE,YAAY,MAAM,kBAAkB;AAoB5C,iBAAgB,QAjBQ,cAAsB;EAE5C,MAAM,SAAiB,EAAE,GAAG,QAAQ;AAGpC,SAAO,OAAO,QAAQ,YAAY;AAIlC,MAAI,WACF,QAAO,OAAO,QAAQ,WAAW;AAGnC,SAAO;IACN,CAAC,WAAW,CAAC,CAGwB;AAGxC,iBAAgB;AAId,SAAO;;;mBAHW,OAAO,GAAG,KAAK,MAAM,GAMd;mBALE,gBAAgB,GAAG,cAAc,MAAM,GAMhC;;EAEpC;IACG,CAAC,MAAM,cAAc,CAAC;AAEzB,QAAO"}
|
|
1
|
+
{"version":3,"file":"GlobalStyles.js","names":[],"sources":["../../src/components/GlobalStyles.tsx"],"sourcesContent":["import { useGlobalStyles, useRawCSS } from '@tenphi/tasty';\nimport { useMemo } from 'react';\n\nimport { getTokens } from '../tokens';\n\nimport type { Styles } from '@tenphi/tasty';\n\ninterface GlobalStylesProps {\n bodyStyles?: { [key: string]: string };\n fonts?: boolean;\n fontDisplay?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';\n publicUrl?: string;\n font?: string;\n monospaceFont?: string;\n /** @deprecated Tokens are now always applied via useGlobalStyles */\n applyLegacyTokens?: boolean;\n}\n\n/**\n * Body styles applied via useGlobalStyles.\n *\n * `fill` and `color` use scheme-aware Glaze tokens so the whole page flips\n * automatically when `<html data-schema=\"dark\">` (or `prefers-color-scheme: dark`)\n * is active — see `src/tokens/palette.ts` and `src/components/Root.tsx`.\n */\nconst BODY_STYLES: Styles = {\n overscrollBehaviorY: 'none',\n fill: '#surface',\n fontFamily: 'var(--font-sans)',\n '-webkit-font-smoothing': 'antialiased',\n '-moz-osx-font-smoothing': 'grayscale',\n margin: 0,\n padding: 0,\n color: '#surface-text-soft',\n preset: 't3',\n letterSpacing: '0.02em',\n};\n\n// Static CSS that doesn't depend on props\nconst STATIC_CSS = `\n @font-face {\n font-family: text-security-disc;\n src: url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KgkqBSoNKgMqCyoHKg8qAKoIqgSqDKoCqgqqBqoOqgGkE1gWoG1QKqFVQbqHZQHaA6QXWB6gbVA6oXVB+oflADoAZBDYH+uxaEWDBiIYiFIhaGWDhiEYhFIhaFWDRiMYjFIhaHWDxiCYglIpaEWDJiKYilIpaGWDpiGYhlIpaFWDZiOYjlIpaHWD5iBYgVIlaEWDFiJYiVIlaGWDliFYhVIlaFWDViNYjVIlaHWD1iDYg1ItaEWDNiLYi1ItaGWDtiHYh1ItaFWDdiPYj1ItaHWD9iA4gNIjaE2DBiI4iNIjaG2DhiE4hNIjaF2DRiM4jNIjaH2DxiC4gtIraE2DJiK4itIraG2DpiG4htIraF2DZiO4jtIraH2D5iB4gdInaE2DFiJ4idInaG2DliF4hdInaF2DViN4jdInaH2D1iD4g9IvaE2DNiL4i9IvaG2DvE3iP2AbGPiH1C7DNiXxD7itg3xL4j9gOxn4j9Quw3Yn8Q+4vYP8T+M6cIDBz9EXfeUHR1JyygPL/++I3R1cRvdDr+E12Jfh3Q0EN/fHn2mXptpJxUkIqu/Cs2egM33OjSLcT33I82+B9nP37X/c0W52623s45CYCo03QIBCVrAFAycnSYSqvO4YJt/NP73YqA/giNZhJ6sBbmql+0SQZaxNOZudJbc2nqxNvpM+veq7Sz2LUgFEu+VLs+Ay3yp7MVertp6i23v2Rmv5gmHDhSQ6t5GmTaqTsqhpWwmbOk3uKJrNOmwSSMC17jghqygilDOUU3KlLmHHNrajw3DVNVGWytGZDisM/cbkdRnvfIUJkaGJlgAYcoQ5bGptTmGc1R7pBC3XhFsLXnXR54qrMc+dGNBkqE4laBi4KmZYGom8vIy0lTyBkppBjLoTndMmrofIRORirsNlCbXzCgulmo36KztS2iV8rrNoRUL5VdkMSGoSXroC1KOQAA) format('woff2');\n }\n\n kbd {\n font-family: var(--c2-font-family);\n font-weight: var(--c2-font-weight);\n font-size: var(--c2-font-size);\n border: var(--border-width) solid var(--dark-04-color);\n background-color: var(--surface-color);\n color: var(--dark-color);\n border-radius: var(--radius);\n padding: 0 var(--outline-width);\n }\n\n :not([data-qa$=\"Icon\"]) > .tabler-icon {\n font-size: var(--icon-size);\n width: 1em;\n height: 1em;\n min-width: 1em;\n min-height: 1em;\n max-height: 1em;\n stroke-width: var(--stroke-width);\n }\n\n .cube-animation-spin {\n animation: cube-animation-spin 1s linear infinite;\n }\n\n @keyframes cube-animation-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n b, strong {\n font-weight: var(--bold-font-weight, 700);\n }\n\n [type=reset], [type=submit], button, html [type=button] {\n -webkit-appearance: none;\n }\n\n code {\n font-family: var(--font-mono);\n }\n\n /*\n * Prism syntax highlighting.\n *\n * All token colors come from the scheme-aware Glaze \\`code-*\\` palette\n * (defined in src/tokens/palette.ts). Each \\`code-*\\` token has \\`mode: 'auto'\\`\n * with a numeric contrast floor of 4.5 against \\`#surface\\` so every token\n * reads at WCAG AA in light AND dark schemes (AAA in high-contrast).\n * Diff insertion / deletion re-use the adaptive \\`success-*\\` and \\`danger-*\\`\n * ramps for both the line bg and the token color.\n */\n code[class*=\"language-\"],\n pre[class*=\"language-\"] {\n color: var(--surface-text-color);\n background: none;\n font-family: var(--s3-font-family, var(--font-mono));\n text-align: left;\n font-weight: var(--s3-font-weight, 400);\n font-size: var(--s3-font-size, 14px);\n line-height: var(--s3-line-height, 20px);\n white-space: pre;\n word-spacing: normal;\n word-break: normal;\n word-wrap: normal;\n border-radius: 6px;\n border: none;\n\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n\n -webkit-hyphens: none;\n -moz-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n }\n\n pre[class*=\"language-\"]::-moz-selection, pre[class*=\"language-\"] ::-moz-selection,\n code[class*=\"language-\"]::-moz-selection, code[class*=\"language-\"] ::-moz-selection {\n text-shadow: none;\n background: rgb(var(--primary-color-rgb) / .2);\n }\n\n pre[class*=\"language-\"]::selection, pre[class*=\"language-\"] ::selection,\n code[class*=\"language-\"]::selection, code[class*=\"language-\"] ::selection {\n text-shadow: none;\n background: rgb(var(--primary-color-rgb) / .2);\n }\n\n @media print {\n code[class*=\"language-\"],\n pre[class*=\"language-\"] {\n text-shadow: none;\n }\n }\n\n /* Code blocks */\n pre[class*=\"language-\"] {\n overflow: auto;\n }\n\n :not(pre) > code[class*=\"language-\"],\n pre[class*=\"language-\"] {\n background: transparent;\n }\n\n /* Inline code */\n :not(pre) > code[class*=\"language-\"] {\n border-radius: .3em;\n white-space: normal;\n }\n\n /* Diff (re-uses success/danger ramps; both bg and text adapt to scheme) */\n .token.inserted-sign {\n background-color: var(--success-bg-color);\n color: var(--success-text-color);\n }\n\n .token.inserted {\n color: var(--success-text-color);\n }\n\n .token.deleted-sign {\n background-color: var(--danger-bg-color);\n color: var(--danger-text-color);\n }\n\n .token.deleted {\n color: var(--danger-text-color);\n }\n\n /* Comments — subdued gray-ish, AA floor */\n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata {\n color: var(--code-comment-color);\n }\n\n /* Operators / punctuation — subdued purple, AA floor */\n .token.operator,\n .token.punctuation {\n color: var(--code-punctuation-color);\n }\n\n .namespace {\n opacity: .7;\n }\n\n /* Keywords / language constructs — violet */\n .token.boolean,\n .token.constant,\n .token.keyword,\n .token.atrule {\n color: var(--code-keyword-color);\n font-weight: 500;\n }\n\n /* Numbers / numeric entities — orange */\n .token.entity,\n .token.number {\n color: var(--code-number-color);\n }\n\n /* Strings / character literals / URLs — green */\n .token.string,\n .token.char,\n .token.attr-value,\n .token.url,\n .language-css .token.string,\n .style .token.string {\n color: var(--code-string-color);\n }\n\n /* Names: functions, class names, regex, variables — pink/coral */\n .token.function,\n .token.class-name,\n .token.regex,\n .token.important,\n .token.variable {\n color: var(--code-function-color);\n }\n\n /* HTML/XML tag names — same hue as keywords (see Colors / CodeSyntax) */\n .token.tag {\n color: var(--code-keyword-color);\n }\n\n /* Attributes / properties / selectors / built-ins — cyan */\n .token.attr-name,\n .token.property,\n .token.symbol,\n .token.key,\n .token.builtin,\n .token.selector {\n color: var(--code-attribute-color);\n }\n\n /*\n * prism-react-renderer flattens nested markup tokens and prefixes parent\n * types onto each leaf (e.g. \\`token tag attr-value\\`). Re-assert leaf\n * colors so the bare \\`.token.tag\\` rule does not wash the whole tag.\n */\n .token.tag.attr-name {\n color: var(--code-attribute-color);\n }\n\n .token.tag.attr-value {\n color: var(--code-string-color);\n }\n\n .token.tag.punctuation {\n color: var(--code-punctuation-color);\n }\n\n .token.important,\n .token.bold {\n font-weight: bold;\n }\n\n .token.italic {\n font-style: italic;\n }\n\n .token.entity {\n cursor: help;\n }\n`;\n\nexport function GlobalStyles(props: GlobalStylesProps) {\n const { bodyStyles, font, monospaceFont } = props;\n\n // Merge token styles with body styles. getTokens() resolves glaze colors\n // against the live config on first call (after host glaze.configure).\n const bodyTokenStyles = useMemo((): Styles => {\n const styles: Styles = { ...getTokens() };\n\n // Add base body styles\n Object.assign(styles, BODY_STYLES);\n\n // Override with custom body styles if provided\n // Keys are passed through as-is (tasty handles both camelCase and kebab-case)\n if (bodyStyles) {\n Object.assign(styles, bodyStyles);\n }\n\n return styles;\n }, [bodyStyles]);\n\n // Apply tokens and body styles via useGlobalStyles\n useGlobalStyles('body', bodyTokenStyles);\n\n // Apply static CSS and font definitions via useRawCSS\n useRawCSS(() => {\n const fontValue = font ? `${font}, ` : '';\n const monospaceFontValue = monospaceFont ? `${monospaceFont}, ` : '';\n\n return `\n html {\n overscroll-behavior-y: none;\n --font-sans: ${fontValue}system-ui, -apple-system, \"Segoe UI\", Roboto, Helvetica, Arial, \"Apple Color Emoji\", \"Segoe UI Emoji\", sans-serif;\n --font-mono: ${monospaceFontValue}ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n }\n${STATIC_CSS}`;\n }, [font, monospaceFont]);\n\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;AAyBA,MAAM,cAAsB;CAC1B,qBAAqB;CACrB,MAAM;CACN,YAAY;CACZ,0BAA0B;CAC1B,2BAA2B;CAC3B,QAAQ;CACR,SAAS;CACT,OAAO;CACP,QAAQ;CACR,eAAe;CAChB;AAGD,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgPnB,SAAgB,aAAa,OAA0B;CACrD,MAAM,EAAE,YAAY,MAAM,kBAAkB;AAoB5C,iBAAgB,QAhBQ,cAAsB;EAC5C,MAAM,SAAiB,EAAE,GAAG,WAAW,EAAE;AAGzC,SAAO,OAAO,QAAQ,YAAY;AAIlC,MAAI,WACF,QAAO,OAAO,QAAQ,WAAW;AAGnC,SAAO;IACN,CAAC,WAAW,CAAC,CAGwB;AAGxC,iBAAgB;AAId,SAAO;;;mBAHW,OAAO,GAAG,KAAK,MAAM,GAMd;mBALE,gBAAgB,GAAG,cAAc,MAAM,GAMhC;;EAEpC;IACG,CAAC,MAAM,cAAc,CAAC;AAEzB,QAAO"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { useCombinedRefs } from "../utils/react/useCombinedRefs.js";
|
|
3
3
|
import { filterBaseProps, tasty } from "@tenphi/tasty";
|
|
4
4
|
import { forwardRef, useCallback, useEffect, useState } from "react";
|
package/dist/components/Root.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../utils/styles.js";
|
|
3
3
|
import { EventBusProvider } from "../utils/react/useEventBus.js";
|
|
4
4
|
import { PortalProvider } from "./portal/PortalProvider.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useAction } from "../use-action.js";
|
|
4
4
|
import { CONTAINER_STYLES, TEXT_STYLES, tasty } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { _Item } from "../../content/Item/Item.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.150.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { useDismissParentPopover } from "../../../utils/react/usePopoverSync.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { useSlotProps } from "../../../utils/react/Slots.js";
|
|
3
3
|
import { Space } from "../../layout/Space.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.150.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { DirectionIcon } from "../../../icons/DirectionIcon.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.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 { 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.150.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { TooltipProvider } from "../../overlays/Tooltip/TooltipProvider.js";
|
|
4
4
|
import { DANGER_CLEAR_STYLES, DANGER_OUTLINE_STYLES, DANGER_PRIMARY_STYLES, DEFAULT_CLEAR_STYLES, DEFAULT_OUTLINE_STYLES, DEFAULT_PRIMARY_STYLES, ITEM_ACTION_BASE_STYLES, NOTE_CLEAR_STYLES, NOTE_OUTLINE_STYLES, NOTE_PRIMARY_STYLES, SPECIAL_CLEAR_STYLES, SPECIAL_OUTLINE_STYLES, SPECIAL_PRIMARY_STYLES, SUCCESS_CLEAR_STYLES, SUCCESS_OUTLINE_STYLES, SUCCESS_PRIMARY_STYLES, WARNING_CLEAR_STYLES, WARNING_OUTLINE_STYLES, WARNING_PRIMARY_STYLES } from "../../../data/item-themes.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.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 { useDismissParentPopover } from "../../../utils/react/usePopoverSync.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.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 { _CollectionItem } from "../../CollectionItem.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { filterCollectionItemProps } from "../../CollectionItem.js";
|
|
4
4
|
import { _Item } from "../../content/Item/Item.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { TooltipProvider } from "../../overlays/Tooltip/TooltipProvider.js";
|
|
3
3
|
import { MenuItem } from "./MenuItem.js";
|
|
4
4
|
import { StyledMenu, StyledSection, StyledSectionHeading } from "./styled.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { SlotProvider } from "../../../utils/react/Slots.js";
|
|
3
3
|
import { usePopoverSync } from "../../../utils/react/usePopoverSync.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.150.0 | Cube Dev Team */
|
|
2
2
|
import { usePopoverSync } from "../../../utils/react/usePopoverSync.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { MenuContext, useMenuContext } from "./context.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { DEFAULT_CLEAR_STYLES } from "../../../data/item-themes.js";
|
|
3
3
|
import { Space } from "../../layout/Space.js";
|
|
4
4
|
import { DEFAULT_BUTTON_STYLES } from "../Button/Button.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { ItemActionProvider, useItemActionContext } from "./ItemActionContext.js";
|
|
3
3
|
import { openLink, parseTo, performClickHandler, useAction } from "./use-action.js";
|
|
4
4
|
import { ItemAction } from "./ItemAction/ItemAction.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.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 { useFocus as useFocus$1 } from "../../utils/react/interactions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-action.js","names":["useFocus","mergeProps"],"sources":["../../../src/components/actions/use-action.ts"],"sourcesContent":["import { useFocusableRef } from '@react-spectrum/utils';\nimport { FocusableRef, PressEvent } from '@react-types/shared';\nimport { AllBaseProps, filterBaseProps, TagName } from '@tenphi/tasty';\nimport { useContext } from 'react';\nimport { AriaButtonProps, useButton, useHover } from 'react-aria';\n\nimport { useEvent } from '../../_internal';\nimport { UIKitContext } from '../../provider';\nimport { useTracking } from '../../providers/TrackingProvider';\nimport { mergeProps } from '../../utils/react';\nimport { useFocus } from '../../utils/react/interactions';\n\n// Import specific types for internal usage\nimport type {\n NavigateArg,\n NavigateOptions,\n Path,\n To,\n} from '../../providers/navigation.types';\n\nconst LINK_PRESS_EVENT = 'Link Press';\nconst BUTTON_PRESS_EVENT = 'Button Press';\n\n// Re-export types for convenience\nexport type {\n NavigateLike,\n Path,\n To,\n NavigateArg,\n NavigateOptions,\n RelativeRoutingType,\n} from '../../providers/navigation.types';\n\nexport interface CubeUseActionProps<\n T extends TagName = 'a' | 'button' | 'span' | 'div',\n> extends AllBaseProps<T>,\n Omit<AriaButtonProps, 'type'> {\n to?: NavigateArg;\n label?: string;\n htmlType?: 'button' | 'submit' | 'reset' | undefined;\n navigationOptions?: NavigateOptions;\n}\n\nconst FILTER_OPTIONS = { propNames: new Set(['onMouseEnter', 'onMouseLeave']) };\n\n/**\n * Helper to open link.\n * @param {String} href\n * @param {String|Boolean} [target]\n */\nexport function openLink(href, target?) {\n const link = document.createElement('a');\n\n link.href = href;\n\n if (target) {\n link.target = target === true ? '_blank' : target;\n // Prevent reverse tabnabbing when opening in a new tab\n link.rel = 'noopener noreferrer';\n }\n\n document.body.appendChild(link);\n\n link.click();\n\n document.body.removeChild(link);\n}\n\n/**\n * Checks if a URL is external (absolute HTTP(S), protocol-relative, or non-http protocols)\n */\nfunction isExternalUrl(url: string): boolean {\n return (\n url.startsWith('http://') ||\n url.startsWith('https://') ||\n url.startsWith('//') ||\n (url.includes(':') && !url.startsWith('#'))\n );\n}\n\nexport function parseTo(to: NavigateArg | undefined): {\n newTab: boolean;\n nativeRoute: boolean;\n cleanTo: To | undefined;\n isHistoryNavigation: boolean;\n historyDelta?: number;\n isHashNavigation: boolean;\n isExternal: boolean;\n} {\n // Handle number (history navigation)\n if (typeof to === 'number') {\n return {\n newTab: false,\n nativeRoute: false,\n cleanTo: undefined,\n isHistoryNavigation: true,\n historyDelta: to,\n isHashNavigation: false,\n isExternal: false,\n };\n }\n\n // Handle object path\n if (to && typeof to === 'object') {\n return {\n newTab: false,\n nativeRoute: false,\n cleanTo: to,\n isHistoryNavigation: false,\n isHashNavigation: false,\n isExternal: false,\n };\n }\n\n // Handle string\n if (!to || typeof to !== 'string') {\n return {\n newTab: false,\n nativeRoute: false,\n cleanTo: undefined,\n isHistoryNavigation: false,\n isHashNavigation: false,\n isExternal: false,\n };\n }\n\n const newTab = to.startsWith('!');\n const nativeRoute = to.startsWith('@');\n const isHashNavigation = to.startsWith('#');\n const cleanTo = newTab || nativeRoute ? to.slice(1) : to;\n const isExternal = typeof cleanTo === 'string' && isExternalUrl(cleanTo);\n\n return {\n newTab,\n nativeRoute,\n cleanTo,\n isHistoryNavigation: false,\n isHashNavigation,\n isExternal,\n };\n}\n\ninterface SanitizedPressEvent {\n type?: string;\n pointerType?: string;\n shiftKey: boolean;\n metaKey: boolean;\n ctrlKey: boolean;\n altKey: boolean;\n // target is defined as a non-enumerable property below\n [key: string]: unknown; // allow non-enumerable 'target'\n}\n\nfunction sanitizePressEvent(evt: PressEvent): SanitizedPressEvent {\n const safeEvt: SanitizedPressEvent = {\n type: 'type' in evt ? evt.type : undefined,\n pointerType:\n 'pointerType' in evt\n ? (evt as { pointerType?: string }).pointerType\n : undefined,\n shiftKey:\n 'shiftKey' in evt ? !!(evt as { shiftKey?: boolean }).shiftKey : false,\n metaKey:\n 'metaKey' in evt ? !!(evt as { metaKey?: boolean }).metaKey : false,\n ctrlKey:\n 'ctrlKey' in evt ? !!(evt as { ctrlKey?: boolean }).ctrlKey : false,\n altKey: 'altKey' in evt ? !!(evt as { altKey?: boolean }).altKey : false,\n };\n try {\n Object.defineProperty(safeEvt, 'target', {\n value: 'target' in evt ? (evt as { target?: unknown }).target : undefined,\n enumerable: false,\n configurable: true,\n });\n } catch (e) {\n // Failed to define target property - continue without it\n }\n return safeEvt;\n}\n\nexport function performClickHandler(\n evt,\n { navigate, resolvedHref, to, onPress, tracking, navigationOptions },\n) {\n const {\n newTab,\n nativeRoute,\n cleanTo,\n isHistoryNavigation,\n historyDelta,\n isHashNavigation,\n isExternal,\n } = parseTo(to);\n const element = evt.target;\n const qa = element?.getAttribute('data-qa');\n\n onPress?.(sanitizePressEvent(evt));\n\n if (to == null) {\n // Allow 0 as valid navigation (go to current page)\n tracking.event(BUTTON_PRESS_EVENT, { qa }, element);\n return;\n }\n\n // Handle history navigation (back/forward)\n if (isHistoryNavigation && typeof historyDelta === 'number') {\n tracking.event(\n LINK_PRESS_EVENT,\n { qa, delta: historyDelta, type: 'router-history' },\n element,\n );\n navigate(historyDelta);\n return;\n }\n\n // Handle hash navigation (smooth scroll)\n if (isHashNavigation && typeof to === 'string') {\n const id = to.slice(1);\n const targetElement = document.getElementById(id);\n\n tracking.event(\n LINK_PRESS_EVENT,\n { qa, href: to, type: 'hash', target: id },\n element,\n );\n\n if (targetElement) {\n targetElement.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest',\n });\n }\n return;\n }\n\n // Handle new tab (via ! prefix or user modifiers)\n if (evt.shiftKey || evt.metaKey || (evt as any).ctrlKey || newTab) {\n openLink(resolvedHref, true);\n tracking.event(\n LINK_PRESS_EVENT,\n { qa, href: resolvedHref, type: 'tab' },\n element,\n );\n return;\n }\n\n // Handle @ prefix (native navigation)\n if (nativeRoute) {\n if (cleanTo === '' || cleanTo === undefined) {\n // @'' or @ -> reload current page\n tracking.event(LINK_PRESS_EVENT, { qa, type: 'native' }, element);\n window.location.reload();\n } else {\n // @path -> navigate to resolved path natively\n tracking.event(\n LINK_PRESS_EVENT,\n { qa, href: resolvedHref, type: 'native' },\n element,\n );\n window.location.assign(resolvedHref);\n }\n return;\n }\n\n // Handle external URLs (always native)\n if (isExternal && typeof cleanTo === 'string') {\n tracking.event(\n LINK_PRESS_EVENT,\n { qa, href: cleanTo, type: 'native' },\n element,\n );\n window.location.assign(cleanTo);\n return;\n }\n\n // Handle router navigation\n if (cleanTo !== undefined) {\n tracking.event(\n LINK_PRESS_EVENT,\n { qa, href: resolvedHref, type: 'router' },\n element,\n );\n navigate(cleanTo, navigationOptions);\n }\n}\n\nexport const useAction = function useAction(\n {\n to,\n as,\n htmlType,\n label,\n mods,\n onPress,\n navigationOptions,\n ...props\n }: CubeUseActionProps,\n ref: FocusableRef<HTMLElement>,\n) {\n const tracking = useTracking();\n const navigation = useContext(UIKitContext).navigation;\n const isDisabled = props.isDisabled;\n\n const {\n newTab,\n nativeRoute,\n cleanTo,\n isHistoryNavigation,\n isHashNavigation,\n isExternal,\n } = parseTo(to);\n\n // Always call navigation hooks (using fallback when to is not provided)\n const fallbackTo = to || '.';\n const navigate = navigation.useNavigate();\n const resolvedHref = navigation.useHref(fallbackTo);\n // Always resolve cleanTo href to avoid conditional hook calls\n const cleanToHref = navigation.useHref(cleanTo || '.');\n\n // Determine element type: 'a' for navigation, 'button' for actions\n as = to && !isHistoryNavigation ? 'a' : as || 'button';\n\n // Compute target (prefixes override explicit target prop per spec)\n const target = newTab ? '_blank' : props.target;\n\n // Compute href for anchor elements\n let href: string | undefined;\n if (as === 'a' && cleanTo !== undefined) {\n if (newTab || nativeRoute) {\n // For ! and @ prefixes, resolve the clean path\n href =\n typeof cleanTo === 'string' && isExternal\n ? cleanTo // External URLs as-is\n : cleanToHref;\n } else {\n // Regular navigation\n href = resolvedHref;\n }\n }\n\n const domRef = useFocusableRef(ref);\n\n // Use navigation options directly\n const mergedNavigationOptions = navigationOptions;\n\n const customOnPress = useEvent((evt: PressEvent) => {\n performClickHandler(evt, {\n navigate,\n resolvedHref: href || resolvedHref,\n to,\n onPress,\n tracking,\n navigationOptions: mergedNavigationOptions,\n });\n });\n\n let { buttonProps, isPressed } = useButton(\n {\n 'aria-label': label,\n ...props,\n onPress: customOnPress,\n },\n domRef,\n );\n let { hoverProps, isHovered } = useHover({ isDisabled });\n let { focusProps, isFocused } = useFocus({ isDisabled }, true);\n\n const customProps =\n to && !isHistoryNavigation\n ? {\n onClick(evt) {\n evt.preventDefault();\n },\n }\n : {};\n\n return {\n isPressed,\n actionProps: {\n mods: {\n hovered: isHovered && !isDisabled,\n pressed: isPressed && !isDisabled,\n focused: isFocused && !isDisabled,\n disabled: isDisabled,\n ...mods,\n },\n ...(mergeProps(\n buttonProps,\n hoverProps,\n focusProps,\n customProps,\n filterBaseProps(props, FILTER_OPTIONS),\n ) as object),\n ref: domRef,\n type: htmlType || 'button',\n rel: as === 'a' && newTab ? 'noopener noreferrer' : undefined,\n as,\n isDisabled,\n target,\n href,\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;AAoBA,MAAM,mBAAmB;AACzB,MAAM,qBAAqB;AAsB3B,MAAM,iBAAiB,EAAE,WAAW,IAAI,IAAI,CAAC,gBAAgB,eAAe,CAAC,EAAE;;;;;;AAO/E,SAAgB,SAAS,MAAM,QAAS;CACtC,MAAM,OAAO,SAAS,cAAc,IAAI;AAExC,MAAK,OAAO;AAEZ,KAAI,QAAQ;AACV,OAAK,SAAS,WAAW,OAAO,WAAW;AAE3C,OAAK,MAAM;;AAGb,UAAS,KAAK,YAAY,KAAK;AAE/B,MAAK,OAAO;AAEZ,UAAS,KAAK,YAAY,KAAK;;;;;AAMjC,SAAS,cAAc,KAAsB;AAC3C,QACE,IAAI,WAAW,UAAU,IACzB,IAAI,WAAW,WAAW,IAC1B,IAAI,WAAW,KAAK,IACnB,IAAI,SAAS,IAAI,IAAI,CAAC,IAAI,WAAW,IAAI;;AAI9C,SAAgB,QAAQ,IAQtB;AAEA,KAAI,OAAO,OAAO,SAChB,QAAO;EACL,QAAQ;EACR,aAAa;EACb,SAAS;EACT,qBAAqB;EACrB,cAAc;EACd,kBAAkB;EAClB,YAAY;EACb;AAIH,KAAI,MAAM,OAAO,OAAO,SACtB,QAAO;EACL,QAAQ;EACR,aAAa;EACb,SAAS;E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"sources":["../../../src/components/actions/use-action.ts"],"sourcesContent":["import { useFocusableRef } from '@react-spectrum/utils';\nimport { FocusableRef, PressEvent } from '@react-types/shared';\nimport { AllBaseProps, filterBaseProps, TagName } from '@tenphi/tasty';\nimport { useContext } from 'react';\nimport { AriaButtonProps, useButton, useHover } from 'react-aria';\n\nimport { useEvent } from '../../_internal';\nimport { UIKitContext } from '../../provider';\nimport { useTracking } from '../../providers/TrackingProvider';\nimport { mergeProps } from '../../utils/react';\nimport { useFocus } from '../../utils/react/interactions';\n\n// Import specific types for internal usage\nimport type {\n NavigateArg,\n NavigateOptions,\n Path,\n To,\n} from '../../providers/navigation.types';\n\nconst LINK_PRESS_EVENT = 'Link Press';\nconst BUTTON_PRESS_EVENT = 'Button Press';\n\n// Re-export types for convenience\nexport type {\n NavigateLike,\n Path,\n To,\n NavigateArg,\n NavigateOptions,\n RelativeRoutingType,\n} from '../../providers/navigation.types';\n\nexport interface CubeUseActionProps<\n T extends TagName = 'a' | 'button' | 'span' | 'div',\n> extends AllBaseProps<T>,\n Omit<AriaButtonProps, 'type'> {\n to?: NavigateArg;\n label?: string;\n htmlType?: 'button' | 'submit' | 'reset' | undefined;\n navigationOptions?: NavigateOptions;\n}\n\nconst FILTER_OPTIONS = { propNames: new Set(['onMouseEnter', 'onMouseLeave']) };\n\n/**\n * Helper to open link.\n * @param {String} href\n * @param {String|Boolean} [target]\n */\nexport function openLink(href, target?) {\n const link = document.createElement('a');\n\n link.href = href;\n\n if (target) {\n link.target = target === true ? '_blank' : target;\n // Prevent reverse tabnabbing when opening in a new tab\n link.rel = 'noopener noreferrer';\n }\n\n document.body.appendChild(link);\n\n link.click();\n\n document.body.removeChild(link);\n}\n\n/**\n * Checks if a URL is external (absolute HTTP(S), protocol-relative, or non-http protocols)\n */\nfunction isExternalUrl(url: string): boolean {\n return (\n url.startsWith('http://') ||\n url.startsWith('https://') ||\n url.startsWith('//') ||\n (url.includes(':') && !url.startsWith('#'))\n );\n}\n\nexport function parseTo(to: NavigateArg | undefined): {\n newTab: boolean;\n nativeRoute: boolean;\n cleanTo: To | undefined;\n isHistoryNavigation: boolean;\n historyDelta?: number;\n isHashNavigation: boolean;\n isExternal: boolean;\n} {\n // Handle number (history navigation)\n if (typeof to === 'number') {\n return {\n newTab: false,\n nativeRoute: false,\n cleanTo: undefined,\n isHistoryNavigation: true,\n historyDelta: to,\n isHashNavigation: false,\n isExternal: false,\n };\n }\n\n // Handle object path\n if (to && typeof to === 'object') {\n return {\n newTab: false,\n nativeRoute: false,\n cleanTo: to,\n isHistoryNavigation: false,\n isHashNavigation: false,\n isExternal: false,\n };\n }\n\n // Handle string\n if (!to || typeof to !== 'string') {\n return {\n newTab: false,\n nativeRoute: false,\n cleanTo: undefined,\n isHistoryNavigation: false,\n isHashNavigation: false,\n isExternal: false,\n };\n }\n\n const newTab = to.startsWith('!');\n const nativeRoute = to.startsWith('@');\n const isHashNavigation = to.startsWith('#');\n const cleanTo = newTab || nativeRoute ? to.slice(1) : to;\n const isExternal = typeof cleanTo === 'string' && isExternalUrl(cleanTo);\n\n return {\n newTab,\n nativeRoute,\n cleanTo,\n isHistoryNavigation: false,\n isHashNavigation,\n isExternal,\n };\n}\n\ninterface SanitizedPressEvent {\n type?: string;\n pointerType?: string;\n shiftKey: boolean;\n metaKey: boolean;\n ctrlKey: boolean;\n altKey: boolean;\n // target is defined as a non-enumerable property below\n [key: string]: unknown; // allow non-enumerable 'target'\n}\n\nfunction sanitizePressEvent(evt: PressEvent): SanitizedPressEvent {\n const safeEvt: SanitizedPressEvent = {\n type: 'type' in evt ? evt.type : undefined,\n pointerType:\n 'pointerType' in evt\n ? (evt as { pointerType?: string }).pointerType\n : undefined,\n shiftKey:\n 'shiftKey' in evt ? !!(evt as { shiftKey?: boolean }).shiftKey : false,\n metaKey:\n 'metaKey' in evt ? !!(evt as { metaKey?: boolean }).metaKey : false,\n ctrlKey:\n 'ctrlKey' in evt ? !!(evt as { ctrlKey?: boolean }).ctrlKey : false,\n altKey: 'altKey' in evt ? !!(evt as { altKey?: boolean }).altKey : false,\n };\n try {\n Object.defineProperty(safeEvt, 'target', {\n value: 'target' in evt ? (evt as { target?: unknown }).target : undefined,\n enumerable: false,\n configurable: true,\n });\n } catch (e) {\n // Failed to define target property - continue without it\n }\n return safeEvt;\n}\n\nexport function performClickHandler(\n evt,\n { navigate, resolvedHref, to, onPress, tracking, navigationOptions },\n) {\n const {\n newTab,\n nativeRoute,\n cleanTo,\n isHistoryNavigation,\n historyDelta,\n isHashNavigation,\n isExternal,\n } = parseTo(to);\n const element = evt.target;\n const qa = element?.getAttribute('data-qa');\n\n onPress?.(sanitizePressEvent(evt));\n\n if (to == null) {\n // Allow 0 as valid navigation (go to current page)\n tracking.event(BUTTON_PRESS_EVENT, { qa }, element);\n return;\n }\n\n // Handle history navigation (back/forward)\n if (isHistoryNavigation && typeof historyDelta === 'number') {\n tracking.event(\n LINK_PRESS_EVENT,\n { qa, delta: historyDelta, type: 'router-history' },\n element,\n );\n navigate(historyDelta);\n return;\n }\n\n // Handle hash navigation (smooth scroll)\n if (isHashNavigation && typeof to === 'string') {\n const id = to.slice(1);\n const targetElement = document.getElementById(id);\n\n tracking.event(\n LINK_PRESS_EVENT,\n { qa, href: to, type: 'hash', target: id },\n element,\n );\n\n if (targetElement) {\n targetElement.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest',\n });\n }\n return;\n }\n\n // Handle new tab (via ! prefix or user modifiers)\n if (evt.shiftKey || evt.metaKey || (evt as any).ctrlKey || newTab) {\n openLink(resolvedHref, true);\n tracking.event(\n LINK_PRESS_EVENT,\n { qa, href: resolvedHref, type: 'tab' },\n element,\n );\n return;\n }\n\n // Handle @ prefix (native navigation)\n if (nativeRoute) {\n if (cleanTo === '' || cleanTo === undefined) {\n // @'' or @ -> reload current page\n tracking.event(LINK_PRESS_EVENT, { qa, type: 'native' }, element);\n window.location.reload();\n } else {\n // @path -> navigate to resolved path natively\n tracking.event(\n LINK_PRESS_EVENT,\n { qa, href: resolvedHref, type: 'native' },\n element,\n );\n window.location.assign(resolvedHref);\n }\n return;\n }\n\n // Handle external URLs (always native)\n if (isExternal && typeof cleanTo === 'string') {\n tracking.event(\n LINK_PRESS_EVENT,\n { qa, href: cleanTo, type: 'native' },\n element,\n );\n window.location.assign(cleanTo);\n return;\n }\n\n // Handle router navigation\n if (cleanTo !== undefined) {\n tracking.event(\n LINK_PRESS_EVENT,\n { qa, href: resolvedHref, type: 'router' },\n element,\n );\n navigate(cleanTo, navigationOptions);\n }\n}\n\nexport const useAction = function useAction(\n {\n to,\n as,\n htmlType,\n label,\n mods,\n onPress,\n navigationOptions,\n ...props\n }: CubeUseActionProps,\n ref: FocusableRef<HTMLElement>,\n) {\n const tracking = useTracking();\n const navigation = useContext(UIKitContext).navigation;\n const isDisabled = props.isDisabled;\n\n const {\n newTab,\n nativeRoute,\n cleanTo,\n isHistoryNavigation,\n isHashNavigation,\n isExternal,\n } = parseTo(to);\n\n // Always call navigation hooks (using fallback when to is not provided)\n const fallbackTo = to || '.';\n const navigate = navigation.useNavigate();\n const resolvedHref = navigation.useHref(fallbackTo);\n // Always resolve cleanTo href to avoid conditional hook calls\n const cleanToHref = navigation.useHref(cleanTo || '.');\n\n // Determine element type: 'a' for navigation, 'button' for actions\n as = to && !isHistoryNavigation ? 'a' : as || 'button';\n\n // Compute target (prefixes override explicit target prop per spec)\n const target = newTab ? '_blank' : props.target;\n\n // Compute href for anchor elements\n let href: string | undefined;\n if (as === 'a' && cleanTo !== undefined) {\n if (newTab || nativeRoute) {\n // For ! and @ prefixes, resolve the clean path\n href =\n typeof cleanTo === 'string' && isExternal\n ? cleanTo // External URLs as-is\n : cleanToHref;\n } else {\n // Regular navigation\n href = resolvedHref;\n }\n }\n\n const domRef = useFocusableRef(ref);\n\n // Use navigation options directly\n const mergedNavigationOptions = navigationOptions;\n\n const customOnPress = useEvent((evt: PressEvent) => {\n performClickHandler(evt, {\n navigate,\n resolvedHref: href || resolvedHref,\n to,\n onPress,\n tracking,\n navigationOptions: mergedNavigationOptions,\n });\n });\n\n let { buttonProps, isPressed } = useButton(\n {\n 'aria-label': label, // @TODO: remove label prop\n ...props,\n onPress: customOnPress,\n },\n domRef,\n );\n let { hoverProps, isHovered } = useHover({ isDisabled });\n let { focusProps, isFocused } = useFocus({ isDisabled }, true);\n\n const customProps =\n to && !isHistoryNavigation\n ? {\n onClick(evt) {\n evt.preventDefault();\n },\n }\n : {};\n\n return {\n isPressed,\n actionProps: {\n mods: {\n hovered: isHovered && !isDisabled,\n pressed: isPressed && !isDisabled,\n focused: isFocused && !isDisabled,\n disabled: isDisabled,\n ...mods,\n },\n ...(mergeProps(\n buttonProps,\n hoverProps,\n focusProps,\n customProps,\n filterBaseProps(props, FILTER_OPTIONS),\n ) as object),\n ref: domRef,\n type: htmlType || 'button',\n rel: as === 'a' && newTab ? 'noopener noreferrer' : undefined,\n as,\n isDisabled,\n target,\n href,\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;AAoBA,MAAM,mBAAmB;AACzB,MAAM,qBAAqB;AAsB3B,MAAM,iBAAiB,EAAE,WAAW,IAAI,IAAI,CAAC,gBAAgB,eAAe,CAAC,EAAE;;;;;;AAO/E,SAAgB,SAAS,MAAM,QAAS;CACtC,MAAM,OAAO,SAAS,cAAc,IAAI;AAExC,MAAK,OAAO;AAEZ,KAAI,QAAQ;AACV,OAAK,SAAS,WAAW,OAAO,WAAW;AAE3C,OAAK,MAAM;;AAGb,UAAS,KAAK,YAAY,KAAK;AAE/B,MAAK,OAAO;AAEZ,UAAS,KAAK,YAAY,KAAK;;;;;AAMjC,SAAS,cAAc,KAAsB;AAC3C,QACE,IAAI,WAAW,UAAU,IACzB,IAAI,WAAW,WAAW,IAC1B,IAAI,WAAW,KAAK,IACnB,IAAI,SAAS,IAAI,IAAI,CAAC,IAAI,WAAW,IAAI;;AAI9C,SAAgB,QAAQ,IAQtB;AAEA,KAAI,OAAO,OAAO,SAChB,QAAO;EACL,QAAQ;EACR,aAAa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,KAAK;GACL,MAAM,YAAY;GAClB,KAAK,OAAO,OAAO,SAAS,wBAAwB;GACpD;GACA;GACA;GACA;GACD;EACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../utils/react/mergeProps.js";
|
|
3
3
|
import { usePopoverSync } from "../../utils/react/usePopoverSync.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.150.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../utils/react/mergeProps.js";
|
|
3
3
|
import { usePopoverSync } from "../../utils/react/usePopoverSync.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.150.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 { useFocus as useFocus$1 } from "../../../utils/react/interactions.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useDeprecationWarning } from "../../../_internal/hooks/use-deprecation-warning.js";
|
|
4
4
|
import { CONTAINER_STYLES, TEXT_STYLES, filterBaseProps } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.150.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { CONTAINER_STYLES, Element, filterBaseProps } 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.150.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { CONTAINER_STYLES, filterBaseProps, 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.150.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { useSlotProps } from "../../utils/react/Slots.js";
|
|
4
4
|
import { CONTAINER_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.150.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useTimer } from "../../../_internal/hooks/use-timer/use-timer.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.150.0 | Cube Dev Team */
|
|
2
2
|
import { _Tooltip } from "../../overlays/Tooltip/Tooltip.js";
|
|
3
3
|
import { TooltipTrigger } from "../../overlays/Tooltip/TooltipTrigger.js";
|
|
4
4
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
@@ -45,6 +45,10 @@ const StyledBlock = tasty({ styles: {
|
|
|
45
45
|
},
|
|
46
46
|
Code: {
|
|
47
47
|
$: "code",
|
|
48
|
+
preset: {
|
|
49
|
+
"": "s3",
|
|
50
|
+
serif: "t3"
|
|
51
|
+
},
|
|
48
52
|
font: {
|
|
49
53
|
"": "monospace",
|
|
50
54
|
serif: true
|