@cube-dev/ui-kit 0.0.0-canary-42b50b1 → 0.0.0-canary-0628aca
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +20 -0
- package/dist/_internal/hooks/use-chained-callback.js +1 -1
- package/dist/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.d.ts +4 -4
- package/dist/components/Root.js +1 -1
- package/dist/components/Root.js.map +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/Button.d.ts +0 -1
- package/dist/components/actions/Button/Button.js +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +1 -1
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuSection.js +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/use-action.js +1 -1
- package/dist/components/actions/use-anchored-menu.js +1 -1
- package/dist/components/actions/use-context-menu.js +1 -1
- package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
- package/dist/components/content/Alert/Alert.js +1 -1
- package/dist/components/content/Alert/use-alert.js +1 -1
- package/dist/components/content/Avatar/Avatar.js +1 -1
- package/dist/components/content/Badge/Badge.js +1 -1
- package/dist/components/content/Card/Card.js +1 -1
- package/dist/components/content/Content.js +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +1 -1
- package/dist/components/content/Divider.js +1 -1
- package/dist/components/content/Footer.js +1 -1
- package/dist/components/content/Header.js +1 -1
- package/dist/components/content/HotKeys/HotKeys.js +1 -1
- package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
- package/dist/components/content/InlineInput/InlineInput.js +1 -1
- package/dist/components/content/Item/Item.js +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +1 -1
- package/dist/components/content/Text.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/data/DataTable/DataTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
- package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
- package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
- package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
- package/dist/components/data/TableBase/ColumnResizer.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableView.js +1 -1
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-tint.js +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/styled.d.ts +1 -2
- package/dist/components/data/TableBase/styled.js +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/use-cell-selection.d.ts +0 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- package/dist/components/data/TableBase/use-column-order.js +1 -1
- package/dist/components/data/TableBase/use-container-width.js +1 -1
- package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
- package/dist/components/data/TableBase/use-scrollability.js +1 -1
- package/dist/components/data/TableBase/use-table-columns.js +1 -1
- package/dist/components/data/TableBase/use-table-search.js +1 -1
- package/dist/components/data/TableBase/use-table-selection.js +1 -1
- package/dist/components/data/TableBase/use-table-sort.js +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +1 -1
- package/dist/components/fields/Checkbox/Checkbox.js +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ColorInput/ColorInput.js +1 -1
- package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
- package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DatePicker.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/period.js +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +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/index.d.ts +0 -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/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/ColorSwatch.js +1 -1
- package/dist/components/fields/color/channels.js +1 -1
- package/dist/components/fields/color/color.js +1 -1
- package/dist/components/fields/color/context.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/group-move.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/Board/use-board-select-modifier-key.js +1 -1
- package/dist/components/layout/Board/use-board-selection.js +1 -1
- package/dist/components/layout/Flex.js +1 -1
- package/dist/components/layout/Flow.js +1 -1
- package/dist/components/layout/Grid.js +1 -1
- package/dist/components/layout/Panel.js +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +1 -1
- package/dist/components/navigation/Tabs/Tabs.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/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/PeriodCalendar.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/CubeLogo/CubeLogo.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 +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.d.ts +1 -2
- package/dist/components/overlays/Modal/Modal.js +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/Overlay.d.ts +0 -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/Modal/types.d.ts +0 -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.d.ts +0 -2
- 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/index.d.ts +0 -1
- package/dist/components/portal/usePortal.js +1 -1
- package/dist/components/shared/DraggableCollection.js +1 -1
- package/dist/components/shared/InvalidIcon.js +1 -1
- package/dist/components/shared/ValidIcon.js +1 -1
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- package/dist/components/status/Spin/Cube.js +1 -1
- package/dist/components/status/Spin/InternalSpinner.js +1 -1
- package/dist/components/status/Spin/Spin.js +1 -1
- package/dist/components/status/Spin/SpinsContainer.js +1 -1
- package/dist/data/item-themes.js +1 -1
- package/dist/data/themes.js +1 -1
- package/dist/eslint-plugin/defaults.generated.js +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/createFormatter.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +1 -1
- package/dist/i18n/locales/en-US/uikit.js +1 -1
- package/dist/i18n/locales/es-ES/uikit.js +1 -1
- package/dist/i18n/locales/es-MX/uikit.js +1 -1
- package/dist/i18n/locales/fr-FR/uikit.js +1 -1
- package/dist/i18n/locales/it-IT/uikit.js +1 -1
- package/dist/i18n/locales/ja-JP/uikit.js +1 -1
- package/dist/i18n/locales/nb-NO/uikit.js +1 -1
- package/dist/i18n/locales/pt-BR/uikit.js +1 -1
- package/dist/i18n/locales/pt-PT/uikit.js +1 -1
- package/dist/i18n/locales/sv-SE/uikit.js +1 -1
- package/dist/i18n/locales/vi-VN/uikit.js +1 -1
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/useFormatter.js +1 -1
- package/dist/i18n/useI18n.js +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
- package/dist/icons/AdjustmentsIcon.js +1 -1
- package/dist/icons/AiIcon.js +1 -1
- package/dist/icons/AreaChartIcon.js +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js +1 -1
- package/dist/icons/BackwardIcon.js +1 -1
- package/dist/icons/BarChartIcon.js +1 -1
- package/dist/icons/BellFilledIcon.js +1 -1
- package/dist/icons/BellIcon.js +1 -1
- package/dist/icons/BooleanIcon.js +1 -1
- package/dist/icons/CalendarEditIcon.js +1 -1
- package/dist/icons/CalendarIcon.js +1 -1
- package/dist/icons/CaretDownIcon.js +1 -1
- package/dist/icons/CaretUpIcon.js +1 -1
- package/dist/icons/ChartAreaStackedIcon.js +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarGroupedIcon.js +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarLineIcon.js +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js +1 -1
- package/dist/icons/ChartBoxPlotIcon.js +1 -1
- package/dist/icons/ChartBubbleIcon.js +1 -1
- package/dist/icons/ChartDonut2Icon.js +1 -1
- package/dist/icons/ChartFunnelIcon.js +1 -1
- package/dist/icons/ChartHeatmapIcon.js +1 -1
- package/dist/icons/ChartKPIIcon.js +1 -1
- package/dist/icons/ChartPie2Icon.js +1 -1
- package/dist/icons/ChartScatterIcon.js +1 -1
- package/dist/icons/CheckCircleFilledIcon.js +1 -1
- package/dist/icons/CheckCircleIcon.js +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CircleFilledIcon.js +1 -1
- package/dist/icons/ClearIcon.js +1 -1
- package/dist/icons/CloseCircleFilledIcon.js +1 -1
- package/dist/icons/CloseCircleIcon.js +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/CodeIcon.js +1 -1
- package/dist/icons/ColumnTotalIcon.js +1 -1
- package/dist/icons/CopyIcon.js +1 -1
- package/dist/icons/CountIcon.js +1 -1
- package/dist/icons/CubeIcon.js +1 -1
- package/dist/icons/CubePauseIcon.js +1 -1
- package/dist/icons/CubePlayIcon.js +1 -1
- package/dist/icons/CurrencyDollarIcon.js +1 -1
- package/dist/icons/DangerIcon.js +1 -1
- package/dist/icons/DashboardIcon.js +1 -1
- package/dist/icons/DatabaseIcon.js +1 -1
- package/dist/icons/DecimalDecreaseIcon.js +1 -1
- package/dist/icons/DecimalIncreaseIcon.js +1 -1
- package/dist/icons/DirectionIcon.js +1 -1
- package/dist/icons/DonutIcon.js +1 -1
- package/dist/icons/DownIcon.js +1 -1
- package/dist/icons/EditIcon.js +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
- package/dist/icons/ExclamationCircleIcon.js +1 -1
- package/dist/icons/ExclamationIcon.js +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeInvisibleIcon.js +1 -1
- package/dist/icons/FilterIcon.js +1 -1
- package/dist/icons/FolderFilledIcon.js +1 -1
- package/dist/icons/FolderIcon.js +1 -1
- package/dist/icons/FolderOpenFilledIcon.js +1 -1
- package/dist/icons/FolderOpenIcon.js +1 -1
- package/dist/icons/ForwardIcon.js +1 -1
- package/dist/icons/GripVerticalIcon.js +1 -1
- package/dist/icons/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/InfoCircleIcon.js +1 -1
- package/dist/icons/InfoIcon.js +1 -1
- package/dist/icons/KeyIcon.js +1 -1
- package/dist/icons/LeftIcon.js +1 -1
- package/dist/icons/LineChartIcon.js +1 -1
- package/dist/icons/LoadingIcon.js +1 -1
- package/dist/icons/LockFilledIcon.js +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/MoreIcon.js +1 -1
- package/dist/icons/NotAllowedIcon.js +1 -1
- package/dist/icons/Number123Icon.js +1 -1
- package/dist/icons/NumberIcon.js +1 -1
- package/dist/icons/PauseCircleFilledIcon.js +1 -1
- package/dist/icons/PauseCircleIcon.js +1 -1
- package/dist/icons/PauseIcon.js +1 -1
- package/dist/icons/PercentageIcon.js +1 -1
- package/dist/icons/PieChartIcon.js +1 -1
- package/dist/icons/PipetteIcon.js +1 -1
- package/dist/icons/PlayCircleIcon.js +1 -1
- package/dist/icons/PlayIcon.js +1 -1
- package/dist/icons/PlusIcon.js +1 -1
- package/dist/icons/ProgressBarIcon.js +1 -1
- package/dist/icons/ReloadIcon.js +1 -1
- package/dist/icons/ReportIcon.js +1 -1
- package/dist/icons/ReturnIcon.js +1 -1
- package/dist/icons/RightIcon.js +1 -1
- package/dist/icons/RowTotalsIcon.js +1 -1
- package/dist/icons/SchemeIcon.js +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/SemanticQueryIcon.js +1 -1
- package/dist/icons/SettingsIcon.js +1 -1
- package/dist/icons/ShieldFilledIcon.js +1 -1
- package/dist/icons/ShieldIcon.js +1 -1
- package/dist/icons/SlashIcon.js +1 -1
- package/dist/icons/SparklesIcon.js +1 -1
- package/dist/icons/SqlIcon.js +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/StopIcon.js +1 -1
- package/dist/icons/StringIcon.js +1 -1
- package/dist/icons/SubtotalsIcon.js +1 -1
- package/dist/icons/SwitchIcon.js +1 -1
- package/dist/icons/TableIcon.js +1 -1
- package/dist/icons/ThumbsDownIcon.js +1 -1
- package/dist/icons/ThumbsUpIcon.js +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js +1 -1
- package/dist/icons/ThunderboltFilledIcon.js +1 -1
- package/dist/icons/ThunderboltIcon.js +1 -1
- package/dist/icons/TimeIcon.js +1 -1
- package/dist/icons/TrashIcon.js +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UpIcon.js +1 -1
- package/dist/icons/UserGroupIcon.js +1 -1
- package/dist/icons/UserIcon.js +1 -1
- package/dist/icons/UserLockIcon.js +1 -1
- package/dist/icons/ViewIcon.js +1 -1
- package/dist/icons/WarningFilledIcon.js +1 -1
- package/dist/icons/WarningIcon.js +1 -1
- package/dist/icons/wrap-icon.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/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/color-seed.d.ts +44 -0
- package/dist/tokens/color-seed.js +48 -0
- package/dist/tokens/color-seed.js.map +1 -0
- package/dist/tokens/color-theme.d.ts +7 -0
- package/dist/tokens/color-theme.js +17 -5
- package/dist/tokens/color-theme.js.map +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.js +2 -1
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/palette-config.d.ts +64 -0
- package/dist/tokens/palette-config.js +30 -10
- package/dist/tokens/palette-config.js.map +1 -1
- package/dist/tokens/palette.js +249 -96
- 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.js +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/disabledProps.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/useBufferedValue.js +1 -1
- package/dist/utils/react/useCombinedRefs.js +1 -1
- package/dist/utils/react/useControlledFocusVisible.js +1 -1
- package/dist/utils/react/useEventBus.js +1 -1
- package/dist/utils/react/useId.js +1 -1
- package/dist/utils/react/useIsDarwin.js +1 -1
- package/dist/utils/react/useKeySymbols.js +1 -1
- package/dist/utils/react/useLayoutEffect.js +1 -1
- package/dist/utils/react/useLocalStorage.js +1 -1
- package/dist/utils/react/useMergeStyles.js +1 -1
- package/dist/utils/react/usePopoverSync.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/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/Theming.md +117 -6
- package/package.json +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.d.ts +0 -2
- package/dist/components/portal/PortalProvider.d.ts +0 -2
package/dist/tokens/palette.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-0628aca | Cube Dev Team */
|
|
2
2
|
import { getPaletteConfig, getPaletteVersion, resolvePaletteConfig } from "./palette-config.js";
|
|
3
3
|
import { lazyStyles } from "./lazy-styles.js";
|
|
4
4
|
import { glaze } from "@tenphi/glaze";
|
|
@@ -36,6 +36,84 @@ const SURFACE_SATURATION = .12;
|
|
|
36
36
|
const TINTED_SURFACE_SATURATION = .2;
|
|
37
37
|
const TINTED_SURFACE_TONE_OFFSET = 2;
|
|
38
38
|
/**
|
|
39
|
+
* Contrast floors for a pinned brand color: `[normal, highContrast]`.
|
|
40
|
+
*
|
|
41
|
+
* `3` is WCAG's non-text floor — enough that the button reads as a shape against the
|
|
42
|
+
* page, and low enough that most brands clear it untouched. It is a FLOOR and not a
|
|
43
|
+
* target: a brand already at 5:1 or 17:1 is emitted exactly as given. Lower would let a
|
|
44
|
+
* fill vanish into the page; the shipped `['AA','AAA']` is too high to survive a light
|
|
45
|
+
* brand at all (it crushes `#FFD400` from tone 88 to 50).
|
|
46
|
+
*
|
|
47
|
+
* The high-contrast entry stays at AAA regardless. Fidelity to a requested color is a
|
|
48
|
+
* preference; the high-contrast tier is not — it exists for users who cannot read the
|
|
49
|
+
* normal one, and it is selected by `prefers-contrast: more` or an explicit
|
|
50
|
+
* `data-contrast="high"`, so anyone seeing it has asked for separation over brand.
|
|
51
|
+
* Note the pair also means an unreachable HC target is a real possibility for a very
|
|
52
|
+
* light brand, and Glaze pins it to the nearest tone and warns rather than failing.
|
|
53
|
+
*/
|
|
54
|
+
const ACCENT_FILL_CONTRAST = [3, 7];
|
|
55
|
+
/**
|
|
56
|
+
* Floors for the two brand TEXT tokens: rest, then hover.
|
|
57
|
+
*
|
|
58
|
+
* The normal entries relax so a vivid brand can be the actual link color. The
|
|
59
|
+
* high-contrast entries do not — same reasoning as {@link ACCENT_FILL_CONTRAST} — and
|
|
60
|
+
* they stay one step apart so the rest→hover intensify survives the tier that needs it
|
|
61
|
+
* most. A single shared HC number would collapse the pair onto one color: both would
|
|
62
|
+
* simply solve to it.
|
|
63
|
+
*
|
|
64
|
+
* The hover's `9` is measured, not chosen for roundness. It is the highest target
|
|
65
|
+
* reachable across `#7A4DBF` `#EF4444` `#0EA5E9` `#22C55E` `#FFD400` `#111827` in both
|
|
66
|
+
* high-contrast schemes, and it holds a ~2.0 gap over the rest color in every one. The
|
|
67
|
+
* shipped `11` is not usable here: 11:1 from a fully saturated hue against a chromatic
|
|
68
|
+
* `accent-selected-fill` is unreachable, and `#FFD400` in dark high contrast pins to
|
|
69
|
+
* pure black — a hover link *less* readable than its rest state, at 2.23 against 7.07.
|
|
70
|
+
* The shipped palette can afford 11 because its fill is a desaturated mix; a pinned
|
|
71
|
+
* brand color is not.
|
|
72
|
+
*/
|
|
73
|
+
const ACCENT_TEXT_CONTRAST = [3, 7];
|
|
74
|
+
const ACCENT_TEXT_HOVER_CONTRAST = [4.5, 9];
|
|
75
|
+
/**
|
|
76
|
+
* Tone steps of the brand fill ramp, measured from `accent-surface`.
|
|
77
|
+
*
|
|
78
|
+
* They reproduce the white-anchored `-49 / -52 / -55 / -58` ladder exactly once the
|
|
79
|
+
* fill is pinned, because those four deltas share an anchor and differ by 3 / 6 / 9.
|
|
80
|
+
*/
|
|
81
|
+
const ACCENT_RAMP = {
|
|
82
|
+
surface2: "-3",
|
|
83
|
+
surface3: "-6",
|
|
84
|
+
hover: "-9"
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* How far the hover brand text sits past the rest one, in tone.
|
|
88
|
+
*
|
|
89
|
+
* Both are pinned to the caller's tone otherwise, and a pair at the same tone behind
|
|
90
|
+
* the same floor resolves to one color — which would silently delete the rest→hover
|
|
91
|
+
* intensify that `accent-text` exists for. Tone is contrast-uniform, so one step is
|
|
92
|
+
* one step in either scheme.
|
|
93
|
+
*/
|
|
94
|
+
const ACCENT_TEXT_HOVER_STEP = 6;
|
|
95
|
+
/**
|
|
96
|
+
* Opaque stand-in for the BASE selected fill used by outline / outline-2 / clear Item
|
|
97
|
+
* types (`#surface|#surface-2|#surface-3` + `#accent-surface.09`).
|
|
98
|
+
*
|
|
99
|
+
* Anchors the `accent-text*` contrast. `value: 9` matches the `.09` alpha overlay;
|
|
100
|
+
* `space: 'srgb'` approximates CSS two-layer compositing. Inherited so colored themes
|
|
101
|
+
* re-resolve against their own `surface` + `accent-surface` (default `surface-2` /
|
|
102
|
+
* `surface-3` are `inherit: false` and can't be the mix base). Primary's tinted
|
|
103
|
+
* `surface` makes this slightly harder than default clear-selected, covering
|
|
104
|
+
* outline / outline-2 selected fills as well.
|
|
105
|
+
*
|
|
106
|
+
* The same in both accent arrangements — it is defined by its two ends, and both of
|
|
107
|
+
* those move with the seed on their own.
|
|
108
|
+
*/
|
|
109
|
+
const ACCENT_SELECTED_FILL = { "accent-selected-fill": {
|
|
110
|
+
type: "mix",
|
|
111
|
+
base: "surface",
|
|
112
|
+
target: "accent-surface",
|
|
113
|
+
value: 9,
|
|
114
|
+
space: "srgb"
|
|
115
|
+
} };
|
|
116
|
+
/**
|
|
39
117
|
* Syntax highlighting for `PrismCode`, as its own theme.
|
|
40
118
|
*
|
|
41
119
|
* A small palette of *adaptive* colored tokens. Each one is anchored to `surface`
|
|
@@ -240,6 +318,165 @@ const TINT_RECIPE = {
|
|
|
240
318
|
}
|
|
241
319
|
};
|
|
242
320
|
/**
|
|
321
|
+
* The brand family, in one of two arrangements.
|
|
322
|
+
*
|
|
323
|
+
* **`null`** — the shipped one, verbatim. Every fill hangs off a fixed white
|
|
324
|
+
* `accent-surface-text` at a relative tone delta behind an `['AA','AAA']` floor, and
|
|
325
|
+
* the text pair hangs off `accent-selected-fill` at `-49`. Those floors are
|
|
326
|
+
* load-bearing rather than decorative: relaxing them moves the shipped `accent-text`
|
|
327
|
+
* light tone from 38.76 to 48.63 and the `accent-surface` high-contrast tone from
|
|
328
|
+
* 36.08 to 51.00. Nothing on this path may change — `palette.test.ts` snapshots it.
|
|
329
|
+
*
|
|
330
|
+
* **A number** — the caller handed us a color, and the job is to render *that*. The
|
|
331
|
+
* fill is pinned to the color's own tone against `surface`, and the floors drop to
|
|
332
|
+
* {@link ACCENT_FILL_CONTRAST}. Both halves are necessary: anchored the shipped way,
|
|
333
|
+
* every accent hue lands at roughly tone 50 whatever lightness went in, and a 4.5
|
|
334
|
+
* floor then crushes anything light on top of that.
|
|
335
|
+
*
|
|
336
|
+
* Three details worth keeping straight:
|
|
337
|
+
*
|
|
338
|
+
* - **`mode: 'static'`, not `'fixed'`.** `fixed` still remaps the authored tone through
|
|
339
|
+
* `lightTone: [10, 100]`, which lands ~3 tone units off even when no floor binds
|
|
340
|
+
* (`#7A4DBF` renders `#8053c6`). `static` bypasses the windows, so the color is
|
|
341
|
+
* byte-exact wherever the floor allows. The floor is still solved per scheme, which
|
|
342
|
+
* is why a near-black brand correctly lifts off a dark page.
|
|
343
|
+
* - **The ramp carries no floor.** Re-anchored onto the fill, an `['AA','AAA']` floor
|
|
344
|
+
* is measured against the *fill* rather than white and collapses all three steps to
|
|
345
|
+
* near-black. A plain tone step is what the relationship actually is.
|
|
346
|
+
* - **The text pair stays `mode: 'auto'`.** Link text has to invert on a dark page, so
|
|
347
|
+
* byte-exactness belongs to the fill; the text is a brand-toned companion of it.
|
|
348
|
+
*/
|
|
349
|
+
function accentFillColors(accentTone) {
|
|
350
|
+
if (accentTone == null) return {
|
|
351
|
+
"accent-surface-text": {
|
|
352
|
+
tone: 100,
|
|
353
|
+
mode: "fixed"
|
|
354
|
+
},
|
|
355
|
+
"accent-surface": {
|
|
356
|
+
base: "accent-surface-text",
|
|
357
|
+
tone: "-49",
|
|
358
|
+
contrast: ["AA", "AAA"],
|
|
359
|
+
mode: "fixed"
|
|
360
|
+
},
|
|
361
|
+
"accent-surface-2": {
|
|
362
|
+
base: "accent-surface-text",
|
|
363
|
+
tone: "-52",
|
|
364
|
+
contrast: ["AA", "AAA"],
|
|
365
|
+
mode: "fixed"
|
|
366
|
+
},
|
|
367
|
+
"accent-surface-3": {
|
|
368
|
+
base: "accent-surface-text",
|
|
369
|
+
tone: "-55",
|
|
370
|
+
contrast: ["AA", "AAA"],
|
|
371
|
+
mode: "fixed"
|
|
372
|
+
},
|
|
373
|
+
"accent-surface-hover": {
|
|
374
|
+
base: "accent-surface-text",
|
|
375
|
+
tone: "-58",
|
|
376
|
+
contrast: ["AA", "AAA"],
|
|
377
|
+
mode: "fixed"
|
|
378
|
+
},
|
|
379
|
+
"accent-surface-border": {
|
|
380
|
+
base: "accent-surface",
|
|
381
|
+
tone: "+13",
|
|
382
|
+
mode: "fixed"
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
return {
|
|
386
|
+
"accent-surface-text": {
|
|
387
|
+
tone: 100,
|
|
388
|
+
mode: "fixed"
|
|
389
|
+
},
|
|
390
|
+
"accent-surface": {
|
|
391
|
+
base: "surface",
|
|
392
|
+
tone: accentTone,
|
|
393
|
+
contrast: ACCENT_FILL_CONTRAST,
|
|
394
|
+
mode: "static"
|
|
395
|
+
},
|
|
396
|
+
"accent-surface-2": {
|
|
397
|
+
base: "accent-surface",
|
|
398
|
+
tone: ACCENT_RAMP.surface2,
|
|
399
|
+
mode: "static"
|
|
400
|
+
},
|
|
401
|
+
"accent-surface-3": {
|
|
402
|
+
base: "accent-surface",
|
|
403
|
+
tone: ACCENT_RAMP.surface3,
|
|
404
|
+
mode: "static"
|
|
405
|
+
},
|
|
406
|
+
"accent-surface-hover": {
|
|
407
|
+
base: "accent-surface",
|
|
408
|
+
tone: ACCENT_RAMP.hover,
|
|
409
|
+
mode: "static"
|
|
410
|
+
},
|
|
411
|
+
"accent-surface-border": {
|
|
412
|
+
base: "accent-surface",
|
|
413
|
+
tone: "+13",
|
|
414
|
+
mode: "static"
|
|
415
|
+
}
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* The brand FOREGROUNDS — text on a neutral surface, and the icon.
|
|
420
|
+
*
|
|
421
|
+
* Split from {@link accentFillColors} because the two have different audiences: the
|
|
422
|
+
* fill ramp is shared with the standalone `special` theme, which builds its own
|
|
423
|
+
* purpose-made subset and must not gain tokens it does not consume. Only the default
|
|
424
|
+
* theme (and the colored themes that inherit from it) takes these.
|
|
425
|
+
*
|
|
426
|
+
* These stay `mode: 'auto'` in both arrangements — a link has to invert on a dark page,
|
|
427
|
+
* so exactness belongs to the fill and these are its brand-toned companions.
|
|
428
|
+
*/
|
|
429
|
+
function accentTextColors(accentTone) {
|
|
430
|
+
if (accentTone == null) return {
|
|
431
|
+
...ACCENT_SELECTED_FILL,
|
|
432
|
+
"accent-text": {
|
|
433
|
+
base: "accent-selected-fill",
|
|
434
|
+
tone: "-49",
|
|
435
|
+
saturation: 1,
|
|
436
|
+
contrast: [6, 11]
|
|
437
|
+
},
|
|
438
|
+
"accent-text-soft": {
|
|
439
|
+
base: "accent-selected-fill",
|
|
440
|
+
tone: "-49",
|
|
441
|
+
saturation: 1,
|
|
442
|
+
contrast: ["AA", "AAA"]
|
|
443
|
+
},
|
|
444
|
+
"accent-icon": {
|
|
445
|
+
base: "surface",
|
|
446
|
+
tone: "-38",
|
|
447
|
+
saturation: .9375
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
return {
|
|
451
|
+
...ACCENT_SELECTED_FILL,
|
|
452
|
+
"accent-text": {
|
|
453
|
+
base: "accent-selected-fill",
|
|
454
|
+
tone: Math.max(0, accentTone - ACCENT_TEXT_HOVER_STEP),
|
|
455
|
+
saturation: 1,
|
|
456
|
+
contrast: ACCENT_TEXT_HOVER_CONTRAST
|
|
457
|
+
},
|
|
458
|
+
"accent-text-soft": {
|
|
459
|
+
base: "accent-selected-fill",
|
|
460
|
+
tone: accentTone,
|
|
461
|
+
saturation: 1,
|
|
462
|
+
contrast: ACCENT_TEXT_CONTRAST
|
|
463
|
+
},
|
|
464
|
+
"accent-icon": {
|
|
465
|
+
base: "surface",
|
|
466
|
+
tone: accentTone,
|
|
467
|
+
saturation: .9375,
|
|
468
|
+
contrast: ACCENT_TEXT_CONTRAST
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
/** Every accent token the default theme carries — fills, foregrounds, and the mix. */
|
|
473
|
+
function accentColors(accentTone) {
|
|
474
|
+
return {
|
|
475
|
+
...accentFillColors(accentTone),
|
|
476
|
+
...accentTextColors(accentTone)
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
243
480
|
* Build the full palette from a resolved config.
|
|
244
481
|
*
|
|
245
482
|
* Pure: it reads nothing but its argument (and the global Glaze config, which
|
|
@@ -248,7 +485,7 @@ const TINT_RECIPE = {
|
|
|
248
485
|
* seed and a `GlazePalette` has no mutation API, so re-seeding means rebuilding.
|
|
249
486
|
*/
|
|
250
487
|
function buildPalette(config, options = {}) {
|
|
251
|
-
const { hue, baseHue, saturation, pastel, themes, contrastLevel } = config;
|
|
488
|
+
const { hue, baseHue, saturation, accentTone, pastel, themes, contrastLevel } = config;
|
|
252
489
|
const sharedOverrides = options.isolateContrastLevel ? { contrastLevel } : {};
|
|
253
490
|
const overrides = {
|
|
254
491
|
...sharedOverrides,
|
|
@@ -386,63 +623,7 @@ function buildPalette(config, options = {}) {
|
|
|
386
623
|
mode: "fixed",
|
|
387
624
|
inherit: false
|
|
388
625
|
},
|
|
389
|
-
|
|
390
|
-
tone: 100,
|
|
391
|
-
mode: "fixed"
|
|
392
|
-
},
|
|
393
|
-
"accent-surface": {
|
|
394
|
-
base: "accent-surface-text",
|
|
395
|
-
tone: "-49",
|
|
396
|
-
contrast: ["AA", "AAA"],
|
|
397
|
-
mode: "fixed"
|
|
398
|
-
},
|
|
399
|
-
"accent-surface-2": {
|
|
400
|
-
base: "accent-surface-text",
|
|
401
|
-
tone: "-52",
|
|
402
|
-
contrast: ["AA", "AAA"],
|
|
403
|
-
mode: "fixed"
|
|
404
|
-
},
|
|
405
|
-
"accent-surface-3": {
|
|
406
|
-
base: "accent-surface-text",
|
|
407
|
-
tone: "-55",
|
|
408
|
-
contrast: ["AA", "AAA"],
|
|
409
|
-
mode: "fixed"
|
|
410
|
-
},
|
|
411
|
-
"accent-surface-hover": {
|
|
412
|
-
base: "accent-surface-text",
|
|
413
|
-
tone: "-58",
|
|
414
|
-
contrast: ["AA", "AAA"],
|
|
415
|
-
mode: "fixed"
|
|
416
|
-
},
|
|
417
|
-
"accent-surface-border": {
|
|
418
|
-
base: "accent-surface",
|
|
419
|
-
tone: "+13",
|
|
420
|
-
mode: "fixed"
|
|
421
|
-
},
|
|
422
|
-
"accent-selected-fill": {
|
|
423
|
-
type: "mix",
|
|
424
|
-
base: "surface",
|
|
425
|
-
target: "accent-surface",
|
|
426
|
-
value: 9,
|
|
427
|
-
space: "srgb"
|
|
428
|
-
},
|
|
429
|
-
"accent-text": {
|
|
430
|
-
base: "accent-selected-fill",
|
|
431
|
-
tone: "-49",
|
|
432
|
-
saturation: 1,
|
|
433
|
-
contrast: [6, 11]
|
|
434
|
-
},
|
|
435
|
-
"accent-text-soft": {
|
|
436
|
-
base: "accent-selected-fill",
|
|
437
|
-
tone: "-49",
|
|
438
|
-
saturation: 1,
|
|
439
|
-
contrast: ["AA", "AAA"]
|
|
440
|
-
},
|
|
441
|
-
"accent-icon": {
|
|
442
|
-
base: "surface",
|
|
443
|
-
tone: "-38",
|
|
444
|
-
saturation: .9375
|
|
445
|
-
},
|
|
626
|
+
...accentColors(accentTone),
|
|
446
627
|
"accent-disabled-surface": {
|
|
447
628
|
base: "surface",
|
|
448
629
|
tone: "-13",
|
|
@@ -502,25 +683,29 @@ function buildPalette(config, options = {}) {
|
|
|
502
683
|
}
|
|
503
684
|
});
|
|
504
685
|
const primaryTheme = defaultTheme.extend({ colors: TINTED_SURFACE_OVERRIDE });
|
|
686
|
+
const statusColors = accentTone == null ? TINTED_SURFACE_OVERRIDE : {
|
|
687
|
+
...TINTED_SURFACE_OVERRIDE,
|
|
688
|
+
...accentColors(null)
|
|
689
|
+
};
|
|
505
690
|
const successTheme = defaultTheme.extend({
|
|
506
691
|
hue: themes.success.hue,
|
|
507
692
|
saturation: themes.success.saturation,
|
|
508
|
-
colors:
|
|
693
|
+
colors: statusColors
|
|
509
694
|
});
|
|
510
695
|
const dangerTheme = defaultTheme.extend({
|
|
511
696
|
hue: themes.danger.hue,
|
|
512
697
|
saturation: themes.danger.saturation,
|
|
513
|
-
colors:
|
|
698
|
+
colors: statusColors
|
|
514
699
|
});
|
|
515
700
|
const warningTheme = defaultTheme.extend({
|
|
516
701
|
hue: themes.warning.hue,
|
|
517
702
|
saturation: themes.warning.saturation,
|
|
518
|
-
colors:
|
|
703
|
+
colors: statusColors
|
|
519
704
|
});
|
|
520
705
|
const noteTheme = defaultTheme.extend({
|
|
521
706
|
hue: themes.note.hue,
|
|
522
707
|
saturation: themes.note.saturation,
|
|
523
|
-
colors:
|
|
708
|
+
colors: statusColors
|
|
524
709
|
});
|
|
525
710
|
const specialTheme = glaze(hue, saturation, instanceConfig);
|
|
526
711
|
specialTheme.colors({
|
|
@@ -529,39 +714,7 @@ function buildPalette(config, options = {}) {
|
|
|
529
714
|
saturation: .475,
|
|
530
715
|
mode: "fixed"
|
|
531
716
|
},
|
|
532
|
-
|
|
533
|
-
tone: 100,
|
|
534
|
-
mode: "fixed"
|
|
535
|
-
},
|
|
536
|
-
"accent-surface": {
|
|
537
|
-
base: "accent-surface-text",
|
|
538
|
-
tone: "-49",
|
|
539
|
-
contrast: ["AA", "AAA"],
|
|
540
|
-
mode: "fixed"
|
|
541
|
-
},
|
|
542
|
-
"accent-surface-2": {
|
|
543
|
-
base: "accent-surface-text",
|
|
544
|
-
tone: "-52",
|
|
545
|
-
contrast: ["AA", "AAA"],
|
|
546
|
-
mode: "fixed"
|
|
547
|
-
},
|
|
548
|
-
"accent-surface-3": {
|
|
549
|
-
base: "accent-surface-text",
|
|
550
|
-
tone: "-55",
|
|
551
|
-
contrast: ["AA", "AAA"],
|
|
552
|
-
mode: "fixed"
|
|
553
|
-
},
|
|
554
|
-
"accent-surface-border": {
|
|
555
|
-
base: "accent-surface",
|
|
556
|
-
tone: "+13",
|
|
557
|
-
mode: "fixed"
|
|
558
|
-
},
|
|
559
|
-
"accent-surface-hover": {
|
|
560
|
-
base: "accent-surface-text",
|
|
561
|
-
tone: "-58",
|
|
562
|
-
contrast: ["AA", "AAA"],
|
|
563
|
-
mode: "fixed"
|
|
564
|
-
},
|
|
717
|
+
...accentFillColors(accentTone),
|
|
565
718
|
"accent-text": {
|
|
566
719
|
base: "accent-surface-text",
|
|
567
720
|
tone: "-58",
|