@cube-dev/ui-kit 0.0.0-canary-cfe0821 → 0.0.0-canary-2b2d784
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/hooks/use-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 +4 -4
- 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 +1 -3
- 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 +2 -3
- package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/dist/components/overlays/Dialog/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 -8
- 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 +170 -126
- 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 +951 -414
- package/docs/glaze/methodology.md +512 -212
- package/docs/glaze/migration.md +127 -49
- package/docs/glaze/okhst.md +170 -0
- package/package.json +2 -2
|
@@ -1,336 +1,636 @@
|
|
|
1
1
|
# Methodology
|
|
2
2
|
|
|
3
|
-
A practical
|
|
3
|
+
A practical way to design a Glaze palette without fighting dark mode. Start from
|
|
4
|
+
tone relationships, add contrast only where a role needs a readable floor, and
|
|
5
|
+
let `extend()` carry the same decisions across status hues.
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
The default theme is what most components consume — its tokens are emitted unprefixed (`#surface`, `#border`). Colored themes are scoped to status surfaces and accent variants, emitted with a theme-name prefix (`#success-surface`, `#danger-accent-surface`).
|
|
10
|
-
|
|
11
|
-
You design the default theme once, and `extend()` propagates that design across every status hue.
|
|
12
|
-
|
|
13
|
-
Every color definition has an **`inherit`** flag (default: `true`) controlling whether it flows into child themes via `extend()`. Set `inherit: false` to scope a color to its parent theme only — this is how sibling themes stay lean, carrying only the tokens they actually need.
|
|
7
|
+
For the full API surface, see [api.md](api.md). For the Glaze color-model
|
|
8
|
+
overview, see [okhst.md](okhst.md); the derivation lives in the
|
|
9
|
+
[canonical OKHST specification](https://github.com/tenphi/okhst).
|
|
14
10
|
|
|
15
|
-
##
|
|
11
|
+
## The mental model
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
Glaze palettes work best as one default neutral theme plus a few colored sibling
|
|
14
|
+
themes:
|
|
15
|
+
|
|
16
|
+
- `default` owns the neutral system most components consume: `#surface`,
|
|
17
|
+
`#surface-text`, `#border`, `#disabled-surface`, and so on.
|
|
18
|
+
- Status themes (`success`, `danger`, `warning`, `note`, ...) are created with
|
|
19
|
+
`extend()`. They swap the hue and keep only the inherited tokens that should
|
|
20
|
+
become status-aware.
|
|
21
|
+
- `inherit: false` keeps a token local to the parent theme. Use it for neutral
|
|
22
|
+
ladders, shadows, code colors, overlays, and anything that should not be
|
|
23
|
+
repeated for every status hue.
|
|
24
|
+
|
|
25
|
+
The main simplification is OKHST tone. Dark mode is a single inversion
|
|
26
|
+
(`100 - t`) plus a scheme tone window, so a relative **tone delta** stays
|
|
27
|
+
anchored to its base in every scheme. A token authored as `tone: '-4'` remains
|
|
28
|
+
the same kind of visual step in light and dark. The step is exactly
|
|
29
|
+
contrast-even for neutrals and approximate for chromatic colors; add a
|
|
30
|
+
`contrast` floor when the measured result matters.
|
|
31
|
+
|
|
32
|
+
Use `glaze.color()` instead of a theme when you need one standalone color or
|
|
33
|
+
one base/dependent pair and do not need a named palette. The same tone,
|
|
34
|
+
adaptation, and contrast rules apply; see
|
|
35
|
+
[Standalone color tokens](api.md#standalone-color-tokens).
|
|
36
|
+
|
|
37
|
+
## Implementation workflow
|
|
38
|
+
|
|
39
|
+
Build in dependency order so every decision has a clear base:
|
|
40
|
+
|
|
41
|
+
1. Configure the output schemes and application states once.
|
|
42
|
+
2. Choose the default theme's hue and saturation seed.
|
|
43
|
+
3. Define root surfaces with absolute tones.
|
|
44
|
+
4. Add dependent surfaces, text, borders, and icons with tone deltas.
|
|
45
|
+
5. Add contrast floors only to roles that need measured readability or
|
|
46
|
+
recognizability.
|
|
47
|
+
6. Choose adaptation per color: `auto`, `fixed`, or `static`.
|
|
48
|
+
7. Add explicit HC pairs where high contrast should increase separation.
|
|
49
|
+
8. Mark default-only tokens `inherit: false`, then extend the shared
|
|
50
|
+
definitions into status themes.
|
|
51
|
+
9. Compose and export the palette in the shape your application consumes.
|
|
52
|
+
10. Verify complete screens in all emitted scheme variants.
|
|
53
|
+
|
|
54
|
+
The sections below follow this order and build one palette incrementally.
|
|
55
|
+
|
|
56
|
+
## Authoring decisions
|
|
57
|
+
|
|
58
|
+
Use this order when defining a token:
|
|
59
|
+
|
|
60
|
+
1. Pick the base it visually belongs to.
|
|
61
|
+
2. Use an absolute numeric `tone` for independent placement. Use a signed
|
|
62
|
+
**tone delta** (`'+N'` / `'-N'`) for distance from a base: surface ladders,
|
|
63
|
+
soft chips, disabled states, hover ramps, and similar relationships.
|
|
64
|
+
3. Add `contrast` only when readability or recognizability needs a measured
|
|
65
|
+
floor.
|
|
66
|
+
4. Prefer APCA presets for content-like colors when perceptual readability is
|
|
67
|
+
the design goal:
|
|
68
|
+
`contrast: { apca: 'content' }` or
|
|
69
|
+
`contrast: { apca: ['content', 'body'] }`.
|
|
70
|
+
5. Use WCAG numbers or presets when compatibility, policy, or migration
|
|
71
|
+
requires a WCAG ratio:
|
|
72
|
+
`contrast: 4.5`, `contrast: 'AAA'`, or `contrast: { wcag: [4.5, 7] }`.
|
|
73
|
+
6. Let token names infer APCA roles. Names ending in `text`, `label`, `border`,
|
|
74
|
+
`surface`, `fill`, `bg`, and similar aliases already tell Glaze which side is
|
|
75
|
+
foreground or background. Set `role` only when a name is ambiguous.
|
|
76
|
+
7. Add high-contrast pairs only where HC should intentionally tighten:
|
|
77
|
+
text/content contrast, border tone, shadow intensity, mix value, or similar.
|
|
78
|
+
|
|
79
|
+
### Choosing adaptation mode
|
|
80
|
+
|
|
81
|
+
| Mode | Choose it when |
|
|
82
|
+
| ---------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
83
|
+
| `auto` (default) | The color should exchange light/dark positions through dark tone inversion. Typical for surfaces, text, borders, and icons. |
|
|
84
|
+
| `fixed` | A brand fill, status banner, or inverse surface should stay on the authored side of the tone scale. |
|
|
85
|
+
| `static` | The exact authored tone and saturation must render in every scheme, without tone-window mapping or dark desaturation. |
|
|
86
|
+
|
|
87
|
+
Dark tone inversion is controlled by `mode`; it is unrelated to `autoFlip`.
|
|
88
|
+
`autoFlip` only allows an overshooting tone delta or an unsuccessful contrast
|
|
89
|
+
direction to reverse around its base.
|
|
90
|
+
|
|
91
|
+
### Root or dependent?
|
|
92
|
+
|
|
93
|
+
- Use a root color when its tone has meaning on its own: the page surface, a
|
|
94
|
+
fixed brand anchor, or a scheme extreme.
|
|
95
|
+
- Use a dependent color when its purpose exists relative to another token:
|
|
96
|
+
text on a surface, a border around a fill, or a tint of an accent.
|
|
97
|
+
- Setting `base` with an absolute tone is valid when the color needs a contrast
|
|
98
|
+
relationship but not a tone delta. The absolute position is resolved
|
|
99
|
+
independently; `contrast` acts as a safety floor.
|
|
100
|
+
|
|
101
|
+
## Seed and configure
|
|
102
|
+
|
|
103
|
+
Keep hue decisions named and configure output modes once:
|
|
18
104
|
|
|
19
105
|
```ts
|
|
20
|
-
|
|
106
|
+
import { glaze } from '@tenphi/glaze';
|
|
107
|
+
|
|
108
|
+
const PURPLE_HUE = 280.3;
|
|
21
109
|
const SUCCESS_HUE = 156.9;
|
|
22
|
-
const DANGER_HUE
|
|
110
|
+
const DANGER_HUE = 23.1;
|
|
23
111
|
const WARNING_HUE = 84.3;
|
|
24
|
-
const NOTE_HUE
|
|
112
|
+
const NOTE_HUE = 302.3;
|
|
25
113
|
|
|
26
114
|
const SEED_SATURATION = 80;
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Hues are design tokens too — keeping them named in one place beats burying numbers in `extend()` calls. The shared `SEED_SATURATION` keeps every status theme on the same saturation budget; per-color `saturation` factors below are 0–1 *of this seed*, not absolute.
|
|
30
|
-
|
|
31
|
-
## Global `glaze.configure()`
|
|
32
115
|
|
|
33
|
-
Configure state aliases and output modes once at module load:
|
|
34
|
-
|
|
35
|
-
```ts
|
|
36
116
|
glaze.configure({
|
|
37
117
|
states: { dark: '@dark', highContrast: '@hc' },
|
|
38
|
-
modes:
|
|
118
|
+
modes: { dark: true, highContrast: true },
|
|
39
119
|
});
|
|
40
120
|
```
|
|
41
121
|
|
|
42
|
-
|
|
122
|
+
Per-color `saturation` is a factor of the theme seed, not an absolute
|
|
123
|
+
saturation. With `SEED_SATURATION = 80`, `saturation: 0.25` means one quarter of
|
|
124
|
+
that seed.
|
|
43
125
|
|
|
44
|
-
## Naming
|
|
126
|
+
## Naming
|
|
45
127
|
|
|
46
|
-
|
|
128
|
+
Prefer purpose first and variant last:
|
|
47
129
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
| Brand-tinted disabled | `accent-disabled-surface`, `accent-disabled-surface-text` |
|
|
59
|
-
| Code syntax highlighting | `code-comment`, `code-keyword`, `code-string`, `code-number`, … |
|
|
60
|
-
| Loading animation | `loading-face-1`, `loading-face-2`, `loading-face-3` |
|
|
61
|
-
| Shadows | `shadow-sm`, `shadow-md`, `shadow-lg` |
|
|
62
|
-
| Backdrop | `overlay` |
|
|
130
|
+
- Surfaces: `surface`, `surface-2`, `surface-3`.
|
|
131
|
+
- Foregrounds: `surface-text`, `surface-text-soft`, `surface-text-soft-2`.
|
|
132
|
+
- Structure: `border`, `divider`, `outline`, `placeholder`, `focus`.
|
|
133
|
+
- Fills: `accent-surface`, `accent-surface-2`,
|
|
134
|
+
`accent-surface-hover`.
|
|
135
|
+
- Foregrounds on neutral surfaces: `accent-text`, `accent-text-soft`,
|
|
136
|
+
`accent-icon`.
|
|
137
|
+
- Disabled states: `disabled-surface`, `disabled-surface-text`,
|
|
138
|
+
`accent-disabled-surface`, `accent-disabled-surface-text`.
|
|
139
|
+
- Effects: `shadow-sm`, `shadow-md`, `shadow-lg`, `overlay`, `hover`, `tint`.
|
|
63
140
|
|
|
64
|
-
|
|
141
|
+
These names are not only readable. They also help APCA role inference pick the
|
|
142
|
+
right polarity. For example, `button-text` is foreground, `input-bg` is a
|
|
143
|
+
surface, and `card-outline` is a border.
|
|
65
144
|
|
|
66
|
-
##
|
|
145
|
+
## Build the default theme
|
|
67
146
|
|
|
68
|
-
|
|
147
|
+
Start with the surface family. It is mostly tone, with small saturation changes
|
|
148
|
+
to keep the ladder visually coherent:
|
|
69
149
|
|
|
70
150
|
```ts
|
|
151
|
+
const defaultTheme = glaze(PURPLE_HUE, SEED_SATURATION);
|
|
152
|
+
|
|
71
153
|
defaultTheme.colors({
|
|
72
|
-
surface:
|
|
73
|
-
'surface-2': {
|
|
74
|
-
|
|
154
|
+
surface: { tone: 100, saturation: 0.11 },
|
|
155
|
+
'surface-2': {
|
|
156
|
+
base: 'surface',
|
|
157
|
+
tone: '-2',
|
|
158
|
+
saturation: 0.15,
|
|
159
|
+
inherit: false,
|
|
160
|
+
},
|
|
161
|
+
'surface-3': {
|
|
162
|
+
base: 'surface',
|
|
163
|
+
tone: '-4',
|
|
164
|
+
saturation: 0.19,
|
|
165
|
+
inherit: false,
|
|
166
|
+
},
|
|
75
167
|
});
|
|
76
168
|
```
|
|
77
169
|
|
|
78
|
-
|
|
170
|
+
Because each tone delta re-anchors to the resolved surface in every scheme,
|
|
171
|
+
these small relative offsets are enough to define the ladder. There is no
|
|
172
|
+
separate dark-mode curve to tune.
|
|
79
173
|
|
|
80
|
-
|
|
174
|
+
### Text and borders
|
|
81
175
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
The headline trick of the whole methodology. Strong text uses an **absolute `lightness` near the edge of the window**; soft variants use a **directional relative hint plus a numeric `contrast`**.
|
|
176
|
+
Use a hard edge tone for maximum-prominence text, and APCA floors for softer
|
|
177
|
+
content:
|
|
85
178
|
|
|
86
179
|
```ts
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
'surface
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
},
|
|
180
|
+
defaultTheme.colors({
|
|
181
|
+
'surface-text': {
|
|
182
|
+
base: 'surface',
|
|
183
|
+
tone: 2,
|
|
184
|
+
saturation: 0.475,
|
|
185
|
+
},
|
|
186
|
+
'surface-text-soft': {
|
|
187
|
+
base: 'surface',
|
|
188
|
+
tone: '-1',
|
|
189
|
+
saturation: 0.375,
|
|
190
|
+
contrast: { apca: ['content', 'body'] },
|
|
191
|
+
inherit: false,
|
|
192
|
+
},
|
|
193
|
+
'surface-text-soft-2': {
|
|
194
|
+
base: 'surface',
|
|
195
|
+
tone: '-1',
|
|
196
|
+
saturation: 0.24,
|
|
197
|
+
contrast: { apca: ['large', 'content'] },
|
|
198
|
+
inherit: false,
|
|
199
|
+
},
|
|
200
|
+
border: {
|
|
201
|
+
base: 'surface',
|
|
202
|
+
tone: ['-10', '-20'],
|
|
203
|
+
saturation: 0.175,
|
|
204
|
+
inherit: false,
|
|
205
|
+
},
|
|
206
|
+
});
|
|
98
207
|
```
|
|
99
208
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
209
|
+
`surface-text` uses an absolute `tone: 2` despite having a base: it is
|
|
210
|
+
intentionally edge-anchored, and the base records the relationship used by
|
|
211
|
+
role inference. The soft variants use a `-1` tone delta as the preferred
|
|
212
|
+
direction and APCA as the readable floor. `border` uses an HC tone-delta pair
|
|
213
|
+
because borders usually need a larger visible step in high contrast.
|
|
103
214
|
|
|
104
|
-
|
|
215
|
+
Repeat the same pattern for `surface-2` and `surface-3` only if components need
|
|
216
|
+
text directly on those surfaces.
|
|
105
217
|
|
|
106
|
-
|
|
218
|
+
### Neutral utility tokens
|
|
107
219
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
Borders, placeholders, focus rings, and the floating "muted text" lightness — all default-only:
|
|
220
|
+
Keep neutral-only primitives local to the default theme:
|
|
111
221
|
|
|
112
222
|
```ts
|
|
113
|
-
|
|
114
|
-
placeholder: {
|
|
115
|
-
|
|
116
|
-
|
|
223
|
+
defaultTheme.colors({
|
|
224
|
+
placeholder: {
|
|
225
|
+
base: 'surface',
|
|
226
|
+
tone: 67,
|
|
227
|
+
saturation: 0.175,
|
|
228
|
+
inherit: false,
|
|
229
|
+
},
|
|
230
|
+
focus: {
|
|
231
|
+
base: 'surface',
|
|
232
|
+
tone: 71,
|
|
233
|
+
saturation: 0.8625,
|
|
234
|
+
inherit: false,
|
|
235
|
+
},
|
|
236
|
+
disabled: {
|
|
237
|
+
tone: 80.8,
|
|
238
|
+
saturation: 0.4,
|
|
239
|
+
inherit: false,
|
|
240
|
+
},
|
|
241
|
+
});
|
|
117
242
|
```
|
|
118
243
|
|
|
119
|
-
|
|
244
|
+
Absolute tones are fine for primitives whose job is visual placement rather than
|
|
245
|
+
a strict relationship to a specific surface.
|
|
120
246
|
|
|
121
|
-
##
|
|
247
|
+
## Chips and disabled states
|
|
122
248
|
|
|
123
|
-
|
|
249
|
+
For subtle fills, tone is usually clearer than contrast:
|
|
124
250
|
|
|
125
251
|
```ts
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
252
|
+
defaultTheme.colors({
|
|
253
|
+
'disabled-surface': {
|
|
254
|
+
base: 'surface',
|
|
255
|
+
tone: '-3',
|
|
256
|
+
saturation: 0.2,
|
|
257
|
+
inherit: false,
|
|
258
|
+
},
|
|
259
|
+
'disabled-surface-text': {
|
|
260
|
+
base: 'disabled-surface',
|
|
261
|
+
tone: '+18',
|
|
262
|
+
saturation: 0.3,
|
|
263
|
+
autoFlip: false,
|
|
264
|
+
inherit: false,
|
|
265
|
+
},
|
|
266
|
+
});
|
|
134
267
|
```
|
|
135
268
|
|
|
136
|
-
|
|
269
|
+
This says exactly what the pair should do: the chip sits a small tone delta off
|
|
270
|
+
the page, and the label sits a muted delta from the chip. `autoFlip: false`
|
|
271
|
+
keeps the label on the authored side when the delta reaches the edge.
|
|
137
272
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
## `surface-inverse` (the fixed-mode escape hatch)
|
|
273
|
+
Use contrast instead when the chip must hit an explicit accessibility floor:
|
|
141
274
|
|
|
142
275
|
```ts
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
276
|
+
defaultTheme.colors({
|
|
277
|
+
'disabled-surface-text': {
|
|
278
|
+
base: 'disabled-surface',
|
|
279
|
+
tone: '+1',
|
|
280
|
+
saturation: 0.3,
|
|
281
|
+
contrast: { apca: 'non-text' },
|
|
282
|
+
inherit: false,
|
|
283
|
+
},
|
|
284
|
+
});
|
|
146
285
|
```
|
|
147
286
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
287
|
+
When a token needs the scheme extreme, use `tone: 'min'` or `tone: 'max'`
|
|
288
|
+
directly. Avoid large magic numbers or fake contrast floors just to push a color
|
|
289
|
+
to the edge.
|
|
151
290
|
|
|
152
|
-
|
|
291
|
+
## Fixed surfaces and accent fills
|
|
153
292
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
The load-bearing trick. Define a single fixed white anchor `accent-surface-text`, then derive every accent surface from it with a small relative lightness offset and a numeric contrast under `mode: 'fixed'`:
|
|
293
|
+
Use `mode: 'fixed'` when the authored color should stay recognizable across
|
|
294
|
+
schemes.
|
|
157
295
|
|
|
158
296
|
```ts
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
297
|
+
defaultTheme.colors({
|
|
298
|
+
'surface-inverse': {
|
|
299
|
+
tone: 12,
|
|
300
|
+
saturation: 0.475,
|
|
301
|
+
mode: 'fixed',
|
|
302
|
+
inherit: false,
|
|
303
|
+
},
|
|
304
|
+
|
|
305
|
+
'accent-surface-text': {
|
|
306
|
+
tone: 100,
|
|
307
|
+
mode: 'fixed',
|
|
308
|
+
},
|
|
309
|
+
'accent-surface': {
|
|
310
|
+
base: 'accent-surface-text',
|
|
311
|
+
tone: '-1',
|
|
312
|
+
contrast: { apca: ['content', 'body'] },
|
|
313
|
+
mode: 'fixed',
|
|
314
|
+
},
|
|
315
|
+
'accent-surface-2': {
|
|
316
|
+
base: 'accent-surface-text',
|
|
317
|
+
tone: '-1',
|
|
318
|
+
contrast: { apca: [65, 80] },
|
|
319
|
+
mode: 'fixed',
|
|
320
|
+
},
|
|
321
|
+
'accent-surface-hover': {
|
|
322
|
+
base: 'accent-surface-text',
|
|
323
|
+
tone: '-1',
|
|
324
|
+
contrast: { apca: ['body', 'preferred'] },
|
|
325
|
+
mode: 'fixed',
|
|
326
|
+
},
|
|
327
|
+
});
|
|
165
328
|
```
|
|
166
329
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
- **`mode: 'fixed'` keeps the brand recognizable.** Without it, the dark-scheme Möbius inversion would turn the brand fill into a lightness-inverted counterpart that may no longer read as the intended brand surface. Fixed maps lightness linearly into the dark window, so a `L=52` brand color resolves to ~L=51.6 in dark mode — still recognizably the same color.
|
|
171
|
-
- **Numeric contrasts, not presets.** `'AA'` / `'AAA'` would let the solver push the color far away from its anchor in dark schemes, breaking the relationship between `accent-surface` and its neighbors. Numeric ratios make the darkening between `accent-surface` (4.5/7), `-2` (4.8/7.5), `-3` (5.2/8), and `-hover` (6/8.5) a tight, designed sequence — a stepped gradient rather than four solver-generated outliers.
|
|
172
|
-
|
|
173
|
-
The hover variant is a dedicated *fixed* token. Reusing `accent-text` (which is `mode: 'auto'` and inverts direction in dark) would break the hover feel.
|
|
330
|
+
The accent fill family is a fixed chain against a fixed text anchor. The names
|
|
331
|
+
infer `surface` and `text` roles, so APCA gets the right polarity without extra
|
|
332
|
+
fields.
|
|
174
333
|
|
|
175
334
|
## Adaptive accent foregrounds
|
|
176
335
|
|
|
177
|
-
|
|
336
|
+
Brand foregrounds that sit on neutral surfaces should stay adaptive:
|
|
178
337
|
|
|
179
338
|
```ts
|
|
180
|
-
|
|
181
|
-
'accent-text
|
|
182
|
-
|
|
339
|
+
defaultTheme.colors({
|
|
340
|
+
'accent-text': {
|
|
341
|
+
base: 'surface',
|
|
342
|
+
tone: '-1',
|
|
343
|
+
saturation: 1,
|
|
344
|
+
contrast: { apca: ['content', 'body'] },
|
|
345
|
+
},
|
|
346
|
+
'accent-text-soft': {
|
|
347
|
+
base: 'surface',
|
|
348
|
+
tone: '-1',
|
|
349
|
+
saturation: 1,
|
|
350
|
+
contrast: { apca: ['large', 'content'] },
|
|
351
|
+
},
|
|
352
|
+
'accent-icon': {
|
|
353
|
+
base: 'surface',
|
|
354
|
+
tone: '-1',
|
|
355
|
+
saturation: 0.9375,
|
|
356
|
+
contrast: { apca: ['non-text', 'large'] },
|
|
357
|
+
},
|
|
358
|
+
});
|
|
183
359
|
```
|
|
184
360
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
361
|
+
Anchor these to `surface`, not to `accent-surface`. Their real job is to remain
|
|
362
|
+
readable on neutral UI, so `mode: 'auto'` and a surface base are the right
|
|
363
|
+
defaults.
|
|
188
364
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
Mirrors the neutral disabled pair from above but with higher saturation so the chip reads as a *muted brand color* rather than fully neutral grey:
|
|
365
|
+
Brand-tinted disabled states can usually be pure tone:
|
|
192
366
|
|
|
193
367
|
```ts
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
368
|
+
defaultTheme.colors({
|
|
369
|
+
'accent-disabled-surface': {
|
|
370
|
+
base: 'surface',
|
|
371
|
+
tone: '+3',
|
|
372
|
+
saturation: 0.5,
|
|
373
|
+
},
|
|
374
|
+
'accent-disabled-surface-text': {
|
|
375
|
+
base: 'accent-disabled-surface',
|
|
376
|
+
tone: '+18',
|
|
377
|
+
saturation: 0.4,
|
|
378
|
+
autoFlip: false,
|
|
379
|
+
},
|
|
380
|
+
});
|
|
202
381
|
```
|
|
203
382
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
383
|
+
These are inherited, so status themes automatically get
|
|
384
|
+
`success-accent-disabled-surface`, `danger-accent-disabled-surface`, and the
|
|
385
|
+
matching text tokens.
|
|
207
386
|
|
|
208
|
-
##
|
|
387
|
+
## Special-purpose colors
|
|
209
388
|
|
|
210
|
-
|
|
389
|
+
Use absolute `hue` overrides for tokens that should come from another hue family
|
|
390
|
+
but keep the same adaptation behavior:
|
|
211
391
|
|
|
212
392
|
```ts
|
|
213
|
-
|
|
214
|
-
'code-
|
|
215
|
-
|
|
216
|
-
|
|
393
|
+
defaultTheme.colors({
|
|
394
|
+
'code-comment': {
|
|
395
|
+
base: 'surface',
|
|
396
|
+
hue: 280,
|
|
397
|
+
saturation: 0.1,
|
|
398
|
+
tone: '-1',
|
|
399
|
+
contrast: { apca: ['large', 'content'] },
|
|
400
|
+
inherit: false,
|
|
401
|
+
},
|
|
402
|
+
'code-keyword': {
|
|
403
|
+
base: 'surface',
|
|
404
|
+
hue: 348,
|
|
405
|
+
saturation: 1,
|
|
406
|
+
tone: '-1',
|
|
407
|
+
contrast: { apca: ['content', 'body'] },
|
|
408
|
+
inherit: false,
|
|
409
|
+
},
|
|
410
|
+
'code-string': {
|
|
411
|
+
base: 'surface',
|
|
412
|
+
hue: SUCCESS_HUE,
|
|
413
|
+
saturation: 1,
|
|
414
|
+
tone: '-1',
|
|
415
|
+
contrast: { apca: ['large', 'content'] },
|
|
416
|
+
inherit: false,
|
|
417
|
+
},
|
|
418
|
+
});
|
|
217
419
|
```
|
|
218
420
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
## Loading-animation faces
|
|
222
|
-
|
|
223
|
-
A 3-step ramp using *absolute* lightnesses with high saturation factors and tight numeric contrasts:
|
|
421
|
+
Use small tone ramps for decorative motion:
|
|
224
422
|
|
|
225
423
|
```ts
|
|
226
|
-
|
|
227
|
-
'loading-face-
|
|
228
|
-
|
|
424
|
+
defaultTheme.colors({
|
|
425
|
+
'loading-face-1': {
|
|
426
|
+
base: 'surface',
|
|
427
|
+
tone: 98,
|
|
428
|
+
saturation: 0.3,
|
|
429
|
+
inherit: false,
|
|
430
|
+
},
|
|
431
|
+
'loading-face-2': {
|
|
432
|
+
base: 'surface',
|
|
433
|
+
tone: 91,
|
|
434
|
+
saturation: 0.62,
|
|
435
|
+
inherit: false,
|
|
436
|
+
},
|
|
437
|
+
'loading-face-3': {
|
|
438
|
+
base: 'surface',
|
|
439
|
+
tone: 79,
|
|
440
|
+
saturation: 0.66,
|
|
441
|
+
inherit: false,
|
|
442
|
+
},
|
|
443
|
+
});
|
|
229
444
|
```
|
|
230
445
|
|
|
231
|
-
|
|
446
|
+
Since tone steps now invert consistently across schemes, the same ramp keeps its
|
|
447
|
+
spacing in light and dark without involving the contrast solver. Use an HC tone
|
|
448
|
+
pair only when the animation should become more pronounced in high contrast.
|
|
232
449
|
|
|
233
|
-
##
|
|
450
|
+
## Effects
|
|
234
451
|
|
|
235
|
-
|
|
452
|
+
Define one neutral shadow system:
|
|
236
453
|
|
|
237
454
|
```ts
|
|
238
|
-
|
|
239
|
-
'shadow-
|
|
240
|
-
|
|
455
|
+
defaultTheme.colors({
|
|
456
|
+
'shadow-sm': {
|
|
457
|
+
type: 'shadow',
|
|
458
|
+
bg: 'surface',
|
|
459
|
+
fg: 'surface-text',
|
|
460
|
+
intensity: 5,
|
|
461
|
+
inherit: false,
|
|
462
|
+
},
|
|
463
|
+
'shadow-md': {
|
|
464
|
+
type: 'shadow',
|
|
465
|
+
bg: 'surface',
|
|
466
|
+
fg: 'surface-text',
|
|
467
|
+
intensity: [10, 20],
|
|
468
|
+
inherit: false,
|
|
469
|
+
},
|
|
470
|
+
'shadow-lg': {
|
|
471
|
+
type: 'shadow',
|
|
472
|
+
bg: 'surface',
|
|
473
|
+
fg: 'surface-text',
|
|
474
|
+
intensity: [15, 30],
|
|
475
|
+
inherit: false,
|
|
476
|
+
},
|
|
477
|
+
});
|
|
241
478
|
```
|
|
242
479
|
|
|
243
|
-
Including `fg`
|
|
244
|
-
|
|
245
|
-
For HC, pass `intensity: [normal, hc]` (e.g. `[10, 20]`) to deepen shadows in high-contrast mode. The full algorithm and tuning knobs are in [api.md → Shadows](api.md#shadows).
|
|
480
|
+
Including `fg` lets shadow strength follow the resolved foreground/background
|
|
481
|
+
gap. Use an HC pair for shadows that should deepen in high contrast.
|
|
246
482
|
|
|
247
|
-
|
|
483
|
+
Use `opacity` for one fixed-alpha color:
|
|
248
484
|
|
|
249
485
|
```ts
|
|
250
|
-
|
|
486
|
+
defaultTheme.colors({
|
|
487
|
+
overlay: { tone: 10, opacity: 0.5, inherit: false },
|
|
488
|
+
});
|
|
251
489
|
```
|
|
252
490
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
## Mixes for hover / tint
|
|
256
|
-
|
|
257
|
-
Reach for mix tokens when you want one color to "tint through" another:
|
|
491
|
+
Use mixes when one color should tint through another:
|
|
258
492
|
|
|
259
493
|
```ts
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
494
|
+
defaultTheme.colors({
|
|
495
|
+
hover: {
|
|
496
|
+
type: 'mix',
|
|
497
|
+
base: 'surface',
|
|
498
|
+
target: 'accent-surface',
|
|
499
|
+
value: 8,
|
|
500
|
+
blend: 'transparent',
|
|
501
|
+
},
|
|
502
|
+
tint: {
|
|
503
|
+
type: 'mix',
|
|
504
|
+
base: 'surface',
|
|
505
|
+
target: 'accent-surface',
|
|
506
|
+
value: 20,
|
|
507
|
+
},
|
|
508
|
+
});
|
|
270
509
|
```
|
|
271
510
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
511
|
+
Transparent mixes are good for hover overlays. Opaque mixes are good for solid
|
|
512
|
+
tints. Opaque mixes default to perceptual OKHSL interpolation; choose `srgb`
|
|
513
|
+
when matching channel compositing matters. Transparent mixes always composite
|
|
514
|
+
in linear sRGB. Mix colors can also use `contrast`; the solver adjusts the
|
|
515
|
+
value or opacity to hit the floor. See [Mix colors](api.md#mix-colors).
|
|
276
516
|
|
|
277
|
-
##
|
|
517
|
+
## Extend into status themes
|
|
278
518
|
|
|
279
|
-
|
|
519
|
+
Once the default theme is shaped, create colored siblings by replacing hue and
|
|
520
|
+
overriding only the root surface that should become visibly tinted:
|
|
280
521
|
|
|
281
522
|
```ts
|
|
282
|
-
const TINTED_SURFACE_OVERRIDE
|
|
283
|
-
surface: {
|
|
523
|
+
const TINTED_SURFACE_OVERRIDE = {
|
|
524
|
+
surface: { tone: 96, saturation: 0.8 },
|
|
284
525
|
};
|
|
285
526
|
|
|
286
|
-
const primaryTheme = defaultTheme.extend({
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
const
|
|
290
|
-
|
|
527
|
+
const primaryTheme = defaultTheme.extend({
|
|
528
|
+
colors: TINTED_SURFACE_OVERRIDE,
|
|
529
|
+
});
|
|
530
|
+
const successTheme = defaultTheme.extend({
|
|
531
|
+
hue: SUCCESS_HUE,
|
|
532
|
+
colors: TINTED_SURFACE_OVERRIDE,
|
|
533
|
+
});
|
|
534
|
+
const dangerTheme = defaultTheme.extend({
|
|
535
|
+
hue: DANGER_HUE,
|
|
536
|
+
colors: TINTED_SURFACE_OVERRIDE,
|
|
537
|
+
});
|
|
538
|
+
const warningTheme = defaultTheme.extend({
|
|
539
|
+
hue: WARNING_HUE,
|
|
540
|
+
colors: TINTED_SURFACE_OVERRIDE,
|
|
541
|
+
});
|
|
542
|
+
const noteTheme = defaultTheme.extend({
|
|
543
|
+
hue: NOTE_HUE,
|
|
544
|
+
colors: TINTED_SURFACE_OVERRIDE,
|
|
545
|
+
});
|
|
291
546
|
```
|
|
292
547
|
|
|
293
|
-
|
|
548
|
+
The inherited accent and disabled tokens now resolve in each status hue. Tokens
|
|
549
|
+
marked `inherit: false` stay default-only, so sibling themes remain small.
|
|
294
550
|
|
|
295
|
-
|
|
551
|
+
## Export the palette
|
|
296
552
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
Compose all themes into a palette so they can be exported as one token set:
|
|
553
|
+
Compose the themes once:
|
|
300
554
|
|
|
301
555
|
```ts
|
|
302
556
|
const palette = glaze.palette({
|
|
303
557
|
default: defaultTheme,
|
|
304
558
|
primary: primaryTheme,
|
|
305
559
|
success: successTheme,
|
|
306
|
-
danger:
|
|
560
|
+
danger: dangerTheme,
|
|
307
561
|
warning: warningTheme,
|
|
308
|
-
note:
|
|
562
|
+
note: noteTheme,
|
|
309
563
|
});
|
|
310
564
|
```
|
|
311
565
|
|
|
312
|
-
The
|
|
566
|
+
The usual export shape is default unprefixed and status themes prefixed:
|
|
567
|
+
|
|
568
|
+
```ts
|
|
569
|
+
const prefix = {
|
|
570
|
+
default: '',
|
|
571
|
+
primary: 'primary-',
|
|
572
|
+
success: 'success-',
|
|
573
|
+
danger: 'danger-',
|
|
574
|
+
warning: 'warning-',
|
|
575
|
+
note: 'note-',
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
palette.tasty({ prefix });
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
An explicit prefix map is the clearest choice when the palette has a neutral
|
|
582
|
+
`default` theme. The separate palette `primary` option serves another pattern:
|
|
583
|
+
it duplicates one named theme without a prefix while retaining its prefixed
|
|
584
|
+
tokens. Do not combine the two accidentally; choose the token namespace your
|
|
585
|
+
components expect.
|
|
586
|
+
|
|
587
|
+
The palette design is independent of the exporter:
|
|
588
|
+
|
|
589
|
+
```ts
|
|
590
|
+
palette.tokens({ prefix }); // JavaScript maps, native oklch by default
|
|
591
|
+
palette.css({ prefix }); // CSS custom-property declarations
|
|
592
|
+
palette.dtcg({ prefix }); // one design-token tree per scheme
|
|
593
|
+
palette.tailwind({ prefix }); // Tailwind CSS v4 theme
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
Use `palette.tasty({ prefix })` for [Tasty](https://tasty.style) state bindings. See
|
|
597
|
+
[migration.md](migration.md#choosing-an-export) for output shapes, application
|
|
598
|
+
wiring, and the `primary` alias pattern.
|
|
599
|
+
|
|
600
|
+
## High contrast
|
|
313
601
|
|
|
314
|
-
|
|
602
|
+
High contrast is not a separate palette. Any value that accepts an HC pair can
|
|
603
|
+
tighten the HC variant: `tone`, `contrast`, shadow `intensity`, and mix `value`.
|
|
315
604
|
|
|
316
|
-
|
|
605
|
+
Use HC pairs where users should actually get more separation:
|
|
317
606
|
|
|
318
|
-
- Text
|
|
319
|
-
-
|
|
320
|
-
-
|
|
321
|
-
-
|
|
322
|
-
-
|
|
607
|
+
- Text/content contrast: `{ apca: ['content', 'body'] }`.
|
|
608
|
+
- Accent fills: `{ apca: ['content', 'body'] }` or stronger.
|
|
609
|
+
- Borders: `tone: ['-10', '-20']`.
|
|
610
|
+
- Shadows: `intensity: [10, 20]`.
|
|
611
|
+
- Decorative ramps that must stay perceivable.
|
|
323
612
|
|
|
324
|
-
In HC
|
|
613
|
+
In HC variants, Glaze bypasses the normal tone window and uses the full
|
|
614
|
+
`[0, 100]` range. Edge tones can reach the edge; contrast floors have more room
|
|
615
|
+
to solve.
|
|
325
616
|
|
|
326
|
-
##
|
|
617
|
+
## Checklist
|
|
327
618
|
|
|
328
619
|
Before shipping a palette, verify:
|
|
329
620
|
|
|
330
|
-
-
|
|
331
|
-
-
|
|
332
|
-
-
|
|
333
|
-
|
|
334
|
-
-
|
|
335
|
-
-
|
|
336
|
-
|
|
621
|
+
- Text, icon, and content tokens either have APCA/WCAG contrast or are
|
|
622
|
+
deliberately edge-anchored.
|
|
623
|
+
- Accent fills use `mode: 'fixed'`; accent foregrounds on neutral UI stay
|
|
624
|
+
`mode: 'auto'` and are based on `surface`.
|
|
625
|
+
- Ambiguous APCA tokens have an explicit `role`; obvious names rely on inference.
|
|
626
|
+
- Low-stakes visual relationships use tone deltas instead of fake contrast
|
|
627
|
+
floors.
|
|
628
|
+
- `inherit: false` is set on default-only tokens so status themes stay focused.
|
|
629
|
+
- HC pairs exist where high contrast should visibly tighten.
|
|
630
|
+
- `glaze.configure({ states, modes })` matches the states registered in the app.
|
|
631
|
+
- Every emitted scheme (`light`, `dark`, `lightContrast`, `darkContrast`) has
|
|
632
|
+
been reviewed on complete screens, not only in a token grid.
|
|
633
|
+
- Rendered WCAG/APCA results have been checked for chromatic foreground/base
|
|
634
|
+
pairs that carry accessibility requirements.
|
|
635
|
+
- Resolution emits no unexplained unreachable-contrast or token-collision
|
|
636
|
+
warnings.
|