pixelize-design-library 2.4.2-beta.61 → 2.4.2-beta.63
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/CHANGELOG.md +228 -2
- package/COMPONENT-GOTCHAS.md +144 -7
- package/DESIGN-GUIDE.md +12 -5
- package/dist/Components/Accordion/Accordion.js +2 -2
- package/dist/Components/AddressCard/AddressCard.js +2 -1
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -1
- package/dist/Components/AppSwitcher/AppSwitcher.js +1 -1
- package/dist/Components/AppearanceSettings/AppearanceSettings.js +1 -1
- package/dist/Components/AudioRecorder/AudioRecorder.js +2 -1
- package/dist/Components/Avatar/Avatar.d.ts +2 -1
- package/dist/Components/Avatar/Avatar.js +5 -3
- package/dist/Components/Backdrop/Backdrop.js +1 -1
- package/dist/Components/BagBar/BagBar.js +2 -1
- package/dist/Components/Button/Button.styles.js +51 -21
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -1
- package/dist/Components/CalendarGrid/CalendarGrid.js +5 -5
- package/dist/Components/CalendarGrid/calendarMath.js +18 -6
- package/dist/Components/Card/CardProps.d.ts +2 -2
- package/dist/Components/Card/PaymentCard/PaymentCard.js +6 -5
- package/dist/Components/CartItem/CartItem.js +2 -1
- package/dist/Components/Checkbox/Checkbox.d.ts +18 -3
- package/dist/Components/Checkbox/Checkbox.js +9 -7
- package/dist/Components/CheckoutKit/selectable.js +1 -1
- package/dist/Components/ChoiceCard/ChoiceCard.d.ts +3 -0
- package/dist/Components/ChoiceCard/ChoiceCard.js +16 -0
- package/dist/Components/ChoiceCard/ChoiceCardGroup.d.ts +3 -0
- package/dist/Components/ChoiceCard/ChoiceCardGroup.js +6 -0
- package/dist/Components/ChoiceCard/ChoiceCardProps.d.ts +28 -0
- package/dist/Components/ChoiceCard/ChoiceCardProps.js +2 -0
- package/dist/Components/CircularProgress/CircularProgress.js +4 -8
- package/dist/Components/CircularProgress/CircularProgressProps.d.ts +5 -3
- package/dist/Components/CircularProgress/arc.d.ts +9 -1
- package/dist/Components/CircularProgress/arc.js +15 -1
- package/dist/Components/Common/FormLabel.js +1 -1
- package/dist/Components/Common/FormattedDescription.js +1 -1
- package/dist/Components/Common/HelperText.d.ts +5 -4
- package/dist/Components/Common/HelperText.js +10 -7
- package/dist/Components/Common/fieldStyles.d.ts +4 -4
- package/dist/Components/Common/fieldStyles.js +2 -1
- package/dist/Components/ConfirmDialog/ConfirmDialog.js +2 -1
- package/dist/Components/ContactForm/ContactForm.js +1 -1
- package/dist/Components/CopyButton/CopyButton.js +12 -5
- package/dist/Components/CouponField/CouponField.js +4 -3
- package/dist/Components/CustomModulesTable/CustomModulesTable.js +6 -4
- package/dist/Components/CustomModulesTable/CustomModulesTableProps.d.ts +18 -0
- package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -1
- package/dist/Components/DatePicker/CalendarPanel.js +2 -2
- package/dist/Components/DatePicker/DatePicker.js +8 -2
- package/dist/Components/DatePicker/RangeDatePicker.d.ts +9 -3
- package/dist/Components/DatePicker/RangeDatePicker.js +8 -6
- package/dist/Components/DatePicker/SingleDatePicker.d.ts +9 -5
- package/dist/Components/DatePicker/SingleDatePicker.js +9 -5
- package/dist/Components/DatePicker/ThemeDatePicker.d.ts +8 -4
- package/dist/Components/DatePicker/ThemeDatePicker.js +9 -6
- package/dist/Components/DatePicker/TimeOnlyPicker.d.ts +9 -5
- package/dist/Components/DatePicker/TimeOnlyPicker.js +8 -5
- package/dist/Components/DatePicker/TimePickerInput.d.ts +2 -2
- package/dist/Components/DatePicker/TimePickerInput.js +6 -5
- package/dist/Components/DatePicker/dayStates.js +2 -1
- package/dist/Components/DescriptionList/DescriptionList.d.ts +1 -1
- package/dist/Components/DescriptionList/DescriptionList.js +3 -3
- package/dist/Components/DescriptionList/DescriptionListProps.d.ts +3 -3
- package/dist/Components/Drawer/Drawer.js +2 -1
- package/dist/Components/Dropdown/DropDown.js +13 -4
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -1
- package/dist/Components/EmptyState/EmptyState.js +2 -2
- package/dist/Components/EmptyState/EmptyStateProps.d.ts +3 -3
- package/dist/Components/FileUpload/FileUpload.js +28 -15
- package/dist/Components/FileUpload/useObjectUrl.d.ts +1 -0
- package/dist/Components/FileUpload/useObjectUrl.js +14 -0
- package/dist/Components/FileUploader/FileUploader.js +9 -3
- package/dist/Components/FileUploader/FileUploaderProps.d.ts +8 -0
- package/dist/Components/FilterBar/FilterBar.d.ts +1 -1
- package/dist/Components/FilterBar/FilterBar.js +2 -2
- package/dist/Components/FilterBar/FilterBarProps.d.ts +3 -3
- package/dist/Components/FilterSidebar/FilterSidebar.js +15 -8
- package/dist/Components/Form/FormWrapper.js +1 -1
- package/dist/Components/FormField/FormField.d.ts +3 -0
- package/dist/Components/FormField/FormField.js +57 -0
- package/dist/Components/FormField/FormFieldProps.d.ts +33 -0
- package/dist/Components/FormField/FormFieldProps.js +2 -0
- package/dist/Components/Header/HeaderActions.js +2 -2
- package/dist/Components/Header/components/mobileMenu.js +1 -1
- package/dist/Components/IconButton/IconButton.d.ts +5 -0
- package/dist/Components/IconButton/IconButton.js +24 -0
- package/dist/Components/IconButton/IconButtonProps.d.ts +10 -0
- package/dist/Components/IconButton/IconButtonProps.js +2 -0
- package/dist/Components/Input/PhoneNumberInput.js +14 -0
- package/dist/Components/Input/PhoneNumberInputProps.d.ts +1 -0
- package/dist/Components/KanbanBoard/AccountCard.js +7 -4
- package/dist/Components/KanbanBoard/AccountRow.js +1 -1
- package/dist/Components/KanbanBoard/KanbanBoard.js +56 -39
- package/dist/Components/KanbanBoard/MeasuredItem.js +6 -14
- package/dist/Components/KanbanBoard/boardStore.d.ts +8 -0
- package/dist/Components/KanbanBoard/boardStore.js +27 -0
- package/dist/Components/Kbd/Kbd.js +1 -1
- package/dist/Components/LimitReachedModal/LimitReachedModal.js +1 -1
- package/dist/Components/Loading/Loading.js +1 -1
- package/dist/Components/MediaGallery/MediaGallery.js +1 -1
- package/dist/Components/MediaGallery/MediaLightbox.js +2 -1
- package/dist/Components/MediaGallery/glass.js +2 -1
- package/dist/Components/MediaViewer/MediaViewer.js +1 -1
- package/dist/Components/MediaViewer/components/MediaAudioPlayer.js +7 -7
- package/dist/Components/MediaViewer/components/MediaImageViewer.js +1 -1
- package/dist/Components/MediaViewer/components/MediaScrubber.js +5 -1
- package/dist/Components/MediaViewer/components/MediaVideoPlayer.js +7 -7
- package/dist/Components/MediaViewer/components/PlaybackTimeline.d.ts +20 -0
- package/dist/Components/MediaViewer/components/PlaybackTimeline.js +47 -0
- package/dist/Components/MediaViewer/components/TileChip.js +1 -1
- package/dist/Components/Modal/Modal.js +1 -1
- package/dist/Components/MoreItems/MoreItems.js +2 -2
- package/dist/Components/NavigationBar/NavigationBar.js +5 -4
- package/dist/Components/NoteTextArea/NoteTextArea.js +18 -4
- package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +12 -0
- package/dist/Components/Notification/Notification.js +18 -3
- package/dist/Components/Notification/NotificationProps.d.ts +17 -1
- package/dist/Components/NotificationBell/NotificationBell.js +5 -1
- package/dist/Components/NotificationBell/NotificationItem.js +1 -1
- package/dist/Components/NotificationBell/NotificationList.js +1 -1
- package/dist/Components/NotificationBell/NotificationPanel.js +4 -3
- package/dist/Components/OffersList/OffersList.js +2 -1
- package/dist/Components/OptionChip/OptionChip.js +3 -2
- package/dist/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
- package/dist/Components/OrderSummary/OrderSummary.js +5 -5
- package/dist/Components/OrganizationDetails/CreateOrgModal.js +2 -1
- package/dist/Components/OrganizationDetails/OrganizationDetails.js +10 -2
- package/dist/Components/PageHeader/PageHeader.d.ts +1 -1
- package/dist/Components/PageHeader/PageHeader.js +2 -2
- package/dist/Components/PageHeader/PageHeaderProps.d.ts +3 -3
- package/dist/Components/Pagination/Pagination.d.ts +5 -0
- package/dist/Components/Pagination/Pagination.js +48 -0
- package/dist/Components/Pagination/PaginationProps.d.ts +46 -0
- package/dist/Components/Pagination/PaginationProps.js +9 -0
- package/dist/Components/Pagination/pageWindow.d.ts +4 -0
- package/dist/Components/Pagination/pageWindow.js +22 -0
- package/dist/Components/PaymentOption/PaymentOption.js +1 -1
- package/dist/Components/PersonChip/PersonChip.js +2 -2
- package/dist/Components/PinInput/PinInput.d.ts +1 -1
- package/dist/Components/PinInput/PinInput.js +17 -2
- package/dist/Components/PinInput/PinInputProps.d.ts +9 -1
- package/dist/Components/PincodeChecker/PincodeChecker.js +4 -4
- package/dist/Components/PlanPill/PlanPill.js +2 -1
- package/dist/Components/PriceBlock/PriceBlock.js +3 -3
- package/dist/Components/Primitives/Primitives.d.ts +2 -2
- package/dist/Components/Primitives/Primitives.js +2 -3
- package/dist/Components/ProductBadges/ProductBadges.js +2 -1
- package/dist/Components/ProductCard/ProductCard.js +1 -1
- package/dist/Components/ProductCard/ProductCardAction.js +2 -2
- package/dist/Components/ProductCard/ProductCardSwatches.js +2 -1
- package/dist/Components/ProductCard/cardMetrics.d.ts +1 -1
- package/dist/Components/ProductCard/cardMetrics.js +5 -1
- package/dist/Components/ProfileCard/ProfileCardProps.d.ts +11 -0
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +9 -4
- package/dist/Components/QuantityStepper/QuantityStepper.js +2 -1
- package/dist/Components/RadioButton/RadioButton.d.ts +11 -2
- package/dist/Components/RadioButton/RadioButton.js +9 -6
- package/dist/Components/RangeSlider/RangeSlider.js +3 -3
- package/dist/Components/Rating/Rating.js +2 -1
- package/dist/Components/Reorder/Reorder.js +3 -2
- package/dist/Components/ReviewList/ReviewList.js +3 -3
- package/dist/Components/ReviewSummary/ReviewSummary.js +3 -3
- package/dist/Components/SaveBar/SaveBar.d.ts +1 -1
- package/dist/Components/SaveBar/SaveBar.js +2 -2
- package/dist/Components/SaveBar/SaveBarProps.d.ts +3 -3
- package/dist/Components/Search/Search.js +2 -9
- package/dist/Components/Search/ctrlShortcut.d.ts +1 -0
- package/dist/Components/Search/ctrlShortcut.js +29 -0
- package/dist/Components/SearchSelect/SearchSelect.js +157 -49
- package/dist/Components/SearchSelect/searchSelectNav.d.ts +13 -0
- package/dist/Components/SearchSelect/searchSelectNav.js +40 -0
- package/dist/Components/SegmentedControl/SegmentedControl.d.ts +8 -2
- package/dist/Components/SegmentedControl/SegmentedControl.js +9 -5
- package/dist/Components/Select/SelectPopup.js +7 -4
- package/dist/Components/SelectSearch/SelectSearch.js +6 -4
- package/dist/Components/SettingRow/SettingRow.js +2 -1
- package/dist/Components/SettingRow/SettingsSection.js +2 -1
- package/dist/Components/SideBar/SecondaryBar.js +5 -3
- package/dist/Components/SideBar/SideBar.js +96 -32
- package/dist/Components/SideBar/SideBarProps.d.ts +1 -1
- package/dist/Components/SideBar/components/MenuItemBox.d.ts +2 -2
- package/dist/Components/SideBar/components/MenuItemBox.js +11 -7
- package/dist/Components/SideBar/components/MenuItems.d.ts +2 -2
- package/dist/Components/SideBar/components/MenuItems.js +3 -3
- package/dist/Components/SideBar/components/MenuPopoverContent.js +2 -1
- package/dist/Components/SideBar/components/OtherApps.js +7 -2
- package/dist/Components/SideBar/components/OverflowTooltipText.js +4 -5
- package/dist/Components/SideBar/components/PinnedSection.js +8 -5
- package/dist/Components/SideBar/components/TextTruncation.js +11 -6
- package/dist/Components/SideBar/sidebarMotion.d.ts +2 -0
- package/dist/Components/SideBar/sidebarMotion.js +6 -0
- package/dist/Components/SideBar/sidebarScale.d.ts +1 -1
- package/dist/Components/SideBar/sidebarScale.js +2 -1
- package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -4
- package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +8 -0
- package/dist/Components/Skeletons/SkeletonProps.d.ts +5 -2
- package/dist/Components/Skeletons/Skeletons.d.ts +1 -1
- package/dist/Components/Skeletons/Skeletons.js +4 -2
- package/dist/Components/SkipLink/SkipLink.d.ts +4 -0
- package/dist/Components/SkipLink/SkipLink.js +54 -0
- package/dist/Components/SkipLink/SkipLinkProps.d.ts +8 -0
- package/dist/Components/SkipLink/SkipLinkProps.js +2 -0
- package/dist/Components/Slider/Slider.d.ts +2 -2
- package/dist/Components/Slider/Slider.js +11 -4
- package/dist/Components/SpecTable/SpecTable.js +2 -1
- package/dist/Components/StageProgress/StageItem.js +7 -7
- package/dist/Components/StageProgress/StageProgress.js +2 -1
- package/dist/Components/StageProgress/StageProgressProps.d.ts +1 -1
- package/dist/Components/StageProgress/StepperStage.js +4 -8
- package/dist/Components/StageProgress/centerInStrip.d.ts +2 -0
- package/dist/Components/StageProgress/centerInStrip.js +15 -0
- package/dist/Components/StatCard/StatCard.d.ts +1 -1
- package/dist/Components/StatCard/StatCard.js +6 -4
- package/dist/Components/StatCard/StatCardProps.d.ts +3 -3
- package/dist/Components/StickyBuyBar/StickyBuyBar.js +1 -1
- package/dist/Components/Table/Table.js +6 -2
- package/dist/Components/Table/components/TableActions.js +41 -24
- package/dist/Components/Table/components/TableBody.js +25 -40
- package/dist/Components/Table/components/rowMeasurer.d.ts +8 -0
- package/dist/Components/Table/components/rowMeasurer.js +71 -0
- package/dist/Components/Table/filters/CompactSelect.js +2 -1
- package/dist/Components/Table/filters/TableFilters.js +2 -13
- package/dist/Components/Table/hooks/useTable.js +12 -9
- package/dist/Components/Table/settings/TableSettings.js +7 -2
- package/dist/Components/Table/variants/classic.js +3 -2
- package/dist/Components/Tabs/components/CountBadge.js +3 -3
- package/dist/Components/Tabs/components/Tab.d.ts +2 -1
- package/dist/Components/Tabs/components/Tab.js +4 -3
- package/dist/Components/Tabs/components/TabList.js +16 -1
- package/dist/Components/Tag/Tag.d.ts +2 -2
- package/dist/Components/Tag/Tag.js +15 -12
- package/dist/Components/Tag/Tag.styles.js +6 -4
- package/dist/Components/TagInput/TagInput.d.ts +3 -0
- package/dist/Components/TagInput/TagInput.js +99 -0
- package/dist/Components/TagInput/TagInputProps.d.ts +46 -0
- package/dist/Components/TagInput/TagInputProps.js +2 -0
- package/dist/Components/TagInput/tagEntries.d.ts +15 -0
- package/dist/Components/TagInput/tagEntries.js +45 -0
- package/dist/Components/TimePicker/TimePicker.d.ts +3 -0
- package/dist/Components/TimePicker/TimePicker.js +50 -0
- package/dist/Components/TimePicker/TimePickerProps.d.ts +44 -0
- package/dist/Components/TimePicker/TimePickerProps.js +2 -0
- package/dist/Components/TimePicker/timeParts.d.ts +10 -0
- package/dist/Components/TimePicker/timeParts.js +36 -0
- package/dist/Components/Timeline/Timeline.js +21 -12
- package/dist/Components/Toaster/Toaster.js +20 -8
- package/dist/Components/Toggle/TableToggle.js +8 -4
- package/dist/Components/ToggleSwitch/ToggleSwitch.d.ts +3 -2
- package/dist/Components/ToggleSwitch/ToggleSwitch.js +6 -5
- package/dist/Components/ToolTip/ToolTip.js +86 -8
- package/dist/Components/UpgradeButton/UpgradeButton.js +4 -2
- package/dist/Components/UserDetails/AddUserModal.js +2 -1
- package/dist/Components/UserDetails/ChangeRoleModal.js +2 -1
- package/dist/Components/UserDetails/UserDetails.js +10 -2
- package/dist/Components/VisuallyHidden/VisuallyHidden.d.ts +15 -0
- package/dist/Components/VisuallyHidden/VisuallyHidden.js +21 -0
- package/dist/Components/VisuallyHidden/VisuallyHiddenProps.d.ts +3 -0
- package/dist/Components/VisuallyHidden/VisuallyHiddenProps.js +2 -0
- package/dist/Components/WizardDialog/WizardDialog.js +10 -5
- package/dist/Components/WizardDialog/WizardDialogProps.d.ts +4 -0
- package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +5 -1
- package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +15 -2
- package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +2 -1
- package/dist/Hooks/sharedResizeObserver.d.ts +6 -0
- package/dist/Hooks/sharedResizeObserver.js +77 -0
- package/dist/Hooks/useIsTruncated.js +3 -4
- package/dist/Theme/chakra/Card.styles.d.ts +7 -1
- package/dist/Theme/chakra/Card.styles.js +4 -1
- package/dist/Theme/chakra/Menu.styles.d.ts +4 -6
- package/dist/Theme/chakra/Menu.styles.js +3 -0
- package/dist/Theme/chakra/Popover.styles.d.ts +2 -11
- package/dist/Theme/chakra/Popover.styles.js +2 -0
- package/dist/Theme/chakra/common.web.d.ts +5 -0
- package/dist/Theme/chakra/componentStyles.d.ts +12 -4
- package/dist/Theme/chakra/componentStyles.js +10 -6
- package/dist/Theme/chakra/createBrandTheme.d.ts +3 -0
- package/dist/Theme/chakra/createBrandTheme.js +34 -4
- package/dist/Theme/chakra/focusRing.styles.d.ts +2 -0
- package/dist/Theme/chakra/focusRing.styles.js +5 -1
- package/dist/Theme/chakra/fonts.web.d.ts +2 -0
- package/dist/Theme/chakra/motion.d.ts +15 -0
- package/dist/Theme/chakra/motion.js +27 -1
- package/dist/Theme/chakra/overlay.styles.d.ts +5 -0
- package/dist/Theme/chakra/overlay.styles.js +4 -1
- package/dist/Theme/index.d.ts +2 -1
- package/dist/Theme/index.js +12 -9
- package/dist/Theme/provider/PixelizeThemeProvider.d.ts +4 -1
- package/dist/Theme/provider/PixelizeThemeProvider.js +21 -12
- package/dist/Theme/provider/ThemeSwitcher.js +3 -2
- package/dist/Theme/themeProps.d.ts +7 -0
- package/dist/Theme/tokens/brands/emerald/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/index.d.ts +2 -1
- package/dist/Theme/tokens/brands/index.js +31 -14
- package/dist/Theme/tokens/brands/lavender/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/meadow/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/radiant/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/radiant/palette.light.js +15 -0
- package/dist/Theme/tokens/brands/rosewood/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/rosewood/palette.light.js +10 -10
- package/dist/Theme/tokens/brands/skyline/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/slate/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/storefront/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +7 -29
- package/dist/Theme/tokens/brands/zinc/palette.dark.js +27 -55
- package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +6 -1
- package/dist/Theme/tokens/builders/buildDarkPalette.js +37 -8
- package/dist/Theme/tokens/builders/color.js +11 -7
- package/dist/Theme/tokens/builders/filledSurface.d.ts +3 -1
- package/dist/Theme/tokens/builders/filledSurface.js +7 -7
- package/dist/Theme/tokens/builders/lazy.d.ts +5 -0
- package/dist/Theme/tokens/builders/lazy.js +55 -0
- package/dist/Theme/tokens/builders/memo.d.ts +9 -0
- package/dist/Theme/tokens/builders/memo.js +28 -0
- package/dist/Theme/tokens/builders/memoByReads.d.ts +2 -0
- package/dist/Theme/tokens/builders/memoByReads.js +50 -0
- package/dist/Theme/tokens/builders/mutedText.d.ts +1 -1
- package/dist/Theme/tokens/builders/mutedText.js +13 -3
- package/dist/Theme/tokens/builders/outlineRung.js +10 -2
- package/dist/Theme/tokens/builders/planeStep.d.ts +4 -0
- package/dist/Theme/tokens/builders/planeStep.js +20 -0
- package/dist/Theme/tokens/builders/planes.d.ts +4 -0
- package/dist/Theme/tokens/builders/planes.js +33 -0
- package/dist/Theme/tokens/builders/skeletonShimmer.d.ts +9 -0
- package/dist/Theme/tokens/builders/skeletonShimmer.js +25 -0
- package/dist/Theme/tokens/builders/surfaceRaised.d.ts +3 -1
- package/dist/Theme/tokens/builders/surfaceRaised.js +18 -8
- package/dist/Theme/tokens/builders/surfaceRungs.js +3 -1
- package/dist/Theme/tokens/builders/tone.js +5 -4
- package/dist/Theme/tokens/primitives/borderWidths.d.ts +6 -0
- package/dist/Theme/tokens/primitives/borderWidths.js +5 -0
- package/dist/Theme/tokens/primitives/index.d.ts +8 -3
- package/dist/Theme/tokens/primitives/index.js +11 -1
- package/dist/Theme/tokens/primitives/motion.d.ts +26 -2
- package/dist/Theme/tokens/primitives/motion.js +24 -5
- package/dist/Theme/tokens/primitives/optionRowSizes.d.ts +1 -1
- package/dist/Theme/tokens/primitives/optionRowSizes.js +2 -1
- package/dist/Theme/tokens/primitives/radii.d.ts +15 -0
- package/dist/Theme/tokens/primitives/radii.js +14 -0
- package/dist/Theme/tokens/primitives/shadows.d.ts +21 -1
- package/dist/Theme/tokens/primitives/shadows.js +59 -5
- package/dist/Theme/tokens/primitives/states.d.ts +1 -0
- package/dist/Theme/tokens/primitives/states.js +4 -0
- package/dist/Theme/tokens/primitives/typography.d.ts +17 -0
- package/dist/Theme/tokens/primitives/typography.js +22 -2
- package/dist/Theme/tokens/primitives/zIndices.d.ts +1 -0
- package/dist/Theme/tokens/primitives/zIndices.js +1 -0
- package/dist/Utils/formatDate.d.ts +25 -0
- package/dist/Utils/formatDate.js +144 -0
- package/dist/esm/Components/Accordion/Accordion.js +2 -2
- package/dist/esm/Components/AddressCard/AddressCard.js +2 -1
- package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -1
- package/dist/esm/Components/AppSwitcher/AppSwitcher.js +1 -1
- package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +1 -1
- package/dist/esm/Components/AudioRecorder/AudioRecorder.js +2 -1
- package/dist/esm/Components/Avatar/Avatar.js +6 -4
- package/dist/esm/Components/Backdrop/Backdrop.js +1 -1
- package/dist/esm/Components/BagBar/BagBar.js +2 -1
- package/dist/esm/Components/Button/Button.styles.js +54 -24
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -1
- package/dist/esm/Components/CalendarGrid/CalendarGrid.js +6 -6
- package/dist/esm/Components/CalendarGrid/calendarMath.js +18 -6
- package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +6 -5
- package/dist/esm/Components/CartItem/CartItem.js +2 -1
- package/dist/esm/Components/Checkbox/Checkbox.js +8 -5
- package/dist/esm/Components/CheckoutKit/selectable.js +1 -1
- package/dist/esm/Components/ChoiceCard/ChoiceCard.js +14 -0
- package/dist/esm/Components/ChoiceCard/ChoiceCardGroup.js +4 -0
- package/dist/esm/Components/ChoiceCard/ChoiceCardProps.js +1 -0
- package/dist/esm/Components/CircularProgress/CircularProgress.js +5 -9
- package/dist/esm/Components/CircularProgress/arc.js +13 -0
- package/dist/esm/Components/Common/FormLabel.js +1 -1
- package/dist/esm/Components/Common/FormattedDescription.js +1 -1
- package/dist/esm/Components/Common/HelperText.js +11 -8
- package/dist/esm/Components/Common/fieldStyles.js +2 -1
- package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +2 -1
- package/dist/esm/Components/ContactForm/ContactForm.js +1 -1
- package/dist/esm/Components/CopyButton/CopyButton.js +14 -7
- package/dist/esm/Components/CouponField/CouponField.js +4 -3
- package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +6 -4
- package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -1
- package/dist/esm/Components/DatePicker/CalendarPanel.js +2 -2
- package/dist/esm/Components/DatePicker/DatePicker.js +8 -2
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +10 -7
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +9 -5
- package/dist/esm/Components/DatePicker/ThemeDatePicker.js +7 -4
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +7 -4
- package/dist/esm/Components/DatePicker/TimePickerInput.js +8 -6
- package/dist/esm/Components/DatePicker/dayStates.js +2 -1
- package/dist/esm/Components/DescriptionList/DescriptionList.js +3 -3
- package/dist/esm/Components/Drawer/Drawer.js +2 -1
- package/dist/esm/Components/Dropdown/DropDown.js +13 -4
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -1
- package/dist/esm/Components/EmptyState/EmptyState.js +2 -2
- package/dist/esm/Components/FileUpload/FileUpload.js +29 -16
- package/dist/esm/Components/FileUpload/useObjectUrl.js +10 -0
- package/dist/esm/Components/FileUploader/FileUploader.js +9 -3
- package/dist/esm/Components/FilterBar/FilterBar.js +2 -2
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +15 -8
- package/dist/esm/Components/Form/FormWrapper.js +1 -1
- package/dist/esm/Components/FormField/FormField.js +52 -0
- package/dist/esm/Components/FormField/FormFieldProps.js +1 -0
- package/dist/esm/Components/Header/HeaderActions.js +2 -2
- package/dist/esm/Components/Header/components/mobileMenu.js +1 -1
- package/dist/esm/Components/IconButton/IconButton.js +21 -0
- package/dist/esm/Components/IconButton/IconButtonProps.js +1 -0
- package/dist/esm/Components/Input/PhoneNumberInput.js +15 -1
- package/dist/esm/Components/KanbanBoard/AccountCard.js +7 -4
- package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -1
- package/dist/esm/Components/KanbanBoard/KanbanBoard.js +56 -39
- package/dist/esm/Components/KanbanBoard/MeasuredItem.js +6 -14
- package/dist/esm/Components/KanbanBoard/boardStore.js +22 -0
- package/dist/esm/Components/Kbd/Kbd.js +1 -1
- package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +1 -1
- package/dist/esm/Components/Loading/Loading.js +1 -1
- package/dist/esm/Components/MediaGallery/MediaGallery.js +2 -2
- package/dist/esm/Components/MediaGallery/MediaLightbox.js +2 -1
- package/dist/esm/Components/MediaGallery/glass.js +2 -1
- package/dist/esm/Components/MediaViewer/MediaViewer.js +1 -1
- package/dist/esm/Components/MediaViewer/components/MediaAudioPlayer.js +7 -7
- package/dist/esm/Components/MediaViewer/components/MediaImageViewer.js +1 -1
- package/dist/esm/Components/MediaViewer/components/MediaScrubber.js +5 -1
- package/dist/esm/Components/MediaViewer/components/MediaVideoPlayer.js +7 -7
- package/dist/esm/Components/MediaViewer/components/PlaybackTimeline.js +38 -0
- package/dist/esm/Components/MediaViewer/components/TileChip.js +1 -1
- package/dist/esm/Components/Modal/Modal.js +1 -1
- package/dist/esm/Components/MoreItems/MoreItems.js +2 -2
- package/dist/esm/Components/NavigationBar/NavigationBar.js +5 -4
- package/dist/esm/Components/NoteTextArea/NoteTextArea.js +18 -4
- package/dist/esm/Components/Notification/Notification.js +18 -3
- package/dist/esm/Components/NotificationBell/NotificationBell.js +2 -1
- package/dist/esm/Components/NotificationBell/NotificationItem.js +1 -1
- package/dist/esm/Components/NotificationBell/NotificationList.js +1 -1
- package/dist/esm/Components/NotificationBell/NotificationPanel.js +4 -3
- package/dist/esm/Components/OffersList/OffersList.js +2 -1
- package/dist/esm/Components/OptionChip/OptionChip.js +3 -2
- package/dist/esm/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
- package/dist/esm/Components/OrderSummary/OrderSummary.js +5 -5
- package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +2 -1
- package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +10 -2
- package/dist/esm/Components/PageHeader/PageHeader.js +2 -2
- package/dist/esm/Components/Pagination/Pagination.js +42 -0
- package/dist/esm/Components/Pagination/PaginationProps.js +6 -0
- package/dist/esm/Components/Pagination/pageWindow.js +16 -0
- package/dist/esm/Components/PaymentOption/PaymentOption.js +1 -1
- package/dist/esm/Components/PersonChip/PersonChip.js +2 -2
- package/dist/esm/Components/PinInput/PinInput.js +14 -2
- package/dist/esm/Components/PincodeChecker/PincodeChecker.js +4 -4
- package/dist/esm/Components/PlanPill/PlanPill.js +2 -1
- package/dist/esm/Components/PriceBlock/PriceBlock.js +3 -3
- package/dist/esm/Components/Primitives/Primitives.js +1 -1
- package/dist/esm/Components/ProductBadges/ProductBadges.js +2 -1
- package/dist/esm/Components/ProductCard/ProductCard.js +1 -1
- package/dist/esm/Components/ProductCard/ProductCardAction.js +3 -3
- package/dist/esm/Components/ProductCard/ProductCardSwatches.js +2 -1
- package/dist/esm/Components/ProductCard/cardMetrics.js +2 -1
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +9 -4
- package/dist/esm/Components/QuantityStepper/QuantityStepper.js +2 -1
- package/dist/esm/Components/RadioButton/RadioButton.js +7 -4
- package/dist/esm/Components/RangeSlider/RangeSlider.js +3 -3
- package/dist/esm/Components/Rating/Rating.js +2 -1
- package/dist/esm/Components/Reorder/Reorder.js +3 -2
- package/dist/esm/Components/ReviewList/ReviewList.js +3 -3
- package/dist/esm/Components/ReviewSummary/ReviewSummary.js +3 -3
- package/dist/esm/Components/SaveBar/SaveBar.js +2 -2
- package/dist/esm/Components/Search/Search.js +2 -9
- package/dist/esm/Components/Search/ctrlShortcut.js +25 -0
- package/dist/esm/Components/SearchSelect/SearchSelect.js +160 -52
- package/dist/esm/Components/SearchSelect/searchSelectNav.js +32 -0
- package/dist/esm/Components/SegmentedControl/SegmentedControl.js +11 -6
- package/dist/esm/Components/Select/SelectPopup.js +7 -4
- package/dist/esm/Components/SelectSearch/SelectSearch.js +6 -4
- package/dist/esm/Components/SettingRow/SettingRow.js +2 -1
- package/dist/esm/Components/SettingRow/SettingsSection.js +2 -1
- package/dist/esm/Components/SideBar/SecondaryBar.js +5 -3
- package/dist/esm/Components/SideBar/SideBar.js +98 -34
- package/dist/esm/Components/SideBar/components/MenuItemBox.js +11 -7
- package/dist/esm/Components/SideBar/components/MenuItems.js +4 -4
- package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +2 -1
- package/dist/esm/Components/SideBar/components/OtherApps.js +4 -2
- package/dist/esm/Components/SideBar/components/OverflowTooltipText.js +4 -5
- package/dist/esm/Components/SideBar/components/PinnedSection.js +8 -5
- package/dist/esm/Components/SideBar/components/TextTruncation.js +9 -7
- package/dist/esm/Components/SideBar/sidebarMotion.js +3 -0
- package/dist/esm/Components/SideBar/sidebarScale.js +2 -1
- package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -4
- package/dist/esm/Components/Skeletons/Skeletons.js +4 -2
- package/dist/esm/Components/SkipLink/SkipLink.js +50 -0
- package/dist/esm/Components/SkipLink/SkipLinkProps.js +1 -0
- package/dist/esm/Components/Slider/Slider.js +11 -4
- package/dist/esm/Components/SpecTable/SpecTable.js +2 -1
- package/dist/esm/Components/StageProgress/StageItem.js +7 -7
- package/dist/esm/Components/StageProgress/StageProgress.js +2 -1
- package/dist/esm/Components/StageProgress/StepperStage.js +4 -8
- package/dist/esm/Components/StageProgress/centerInStrip.js +11 -0
- package/dist/esm/Components/StatCard/StatCard.js +6 -4
- package/dist/esm/Components/StickyBuyBar/StickyBuyBar.js +2 -2
- package/dist/esm/Components/Table/Table.js +8 -4
- package/dist/esm/Components/Table/components/TableActions.js +43 -26
- package/dist/esm/Components/Table/components/TableBody.js +25 -40
- package/dist/esm/Components/Table/components/rowMeasurer.js +66 -0
- package/dist/esm/Components/Table/filters/CompactSelect.js +2 -1
- package/dist/esm/Components/Table/filters/TableFilters.js +3 -14
- package/dist/esm/Components/Table/hooks/useTable.js +12 -9
- package/dist/esm/Components/Table/settings/TableSettings.js +8 -3
- package/dist/esm/Components/Table/variants/classic.js +3 -2
- package/dist/esm/Components/Tabs/components/CountBadge.js +3 -3
- package/dist/esm/Components/Tabs/components/Tab.js +5 -4
- package/dist/esm/Components/Tabs/components/TabList.js +16 -1
- package/dist/esm/Components/Tag/Tag.js +11 -8
- package/dist/esm/Components/Tag/Tag.styles.js +6 -4
- package/dist/esm/Components/TagInput/TagInput.js +94 -0
- package/dist/esm/Components/TagInput/TagInputProps.js +1 -0
- package/dist/esm/Components/TagInput/tagEntries.js +39 -0
- package/dist/esm/Components/TimePicker/TimePicker.js +45 -0
- package/dist/esm/Components/TimePicker/TimePickerProps.js +1 -0
- package/dist/esm/Components/TimePicker/timeParts.js +26 -0
- package/dist/esm/Components/Timeline/Timeline.js +21 -12
- package/dist/esm/Components/Toaster/Toaster.js +21 -9
- package/dist/esm/Components/Toggle/TableToggle.js +8 -4
- package/dist/esm/Components/ToggleSwitch/ToggleSwitch.js +7 -5
- package/dist/esm/Components/ToolTip/ToolTip.js +89 -11
- package/dist/esm/Components/UpgradeButton/UpgradeButton.js +4 -2
- package/dist/esm/Components/UserDetails/AddUserModal.js +2 -1
- package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -1
- package/dist/esm/Components/UserDetails/UserDetails.js +10 -2
- package/dist/esm/Components/VisuallyHidden/VisuallyHidden.js +18 -0
- package/dist/esm/Components/VisuallyHidden/VisuallyHiddenProps.js +1 -0
- package/dist/esm/Components/WizardDialog/WizardDialog.js +11 -6
- package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +2 -1
- package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +13 -3
- package/dist/esm/Hooks/sharedResizeObserver.js +73 -0
- package/dist/esm/Hooks/useIsTruncated.js +3 -4
- package/dist/esm/Theme/chakra/Card.styles.js +4 -1
- package/dist/esm/Theme/chakra/Menu.styles.js +3 -0
- package/dist/esm/Theme/chakra/Popover.styles.js +2 -0
- package/dist/esm/Theme/chakra/componentStyles.js +10 -6
- package/dist/esm/Theme/chakra/createBrandTheme.js +34 -4
- package/dist/esm/Theme/chakra/focusRing.styles.js +3 -0
- package/dist/esm/Theme/chakra/motion.js +26 -0
- package/dist/esm/Theme/chakra/overlay.styles.js +3 -0
- package/dist/esm/Theme/index.js +12 -9
- package/dist/esm/Theme/provider/PixelizeThemeProvider.js +22 -13
- package/dist/esm/Theme/provider/ThemeSwitcher.js +3 -2
- package/dist/esm/Theme/tokens/brands/emerald/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/index.js +30 -13
- package/dist/esm/Theme/tokens/brands/lavender/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/meadow/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/radiant/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +15 -0
- package/dist/esm/Theme/tokens/brands/rosewood/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +10 -10
- package/dist/esm/Theme/tokens/brands/skyline/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/slate/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/storefront/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +27 -55
- package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +38 -9
- package/dist/esm/Theme/tokens/builders/color.js +10 -6
- package/dist/esm/Theme/tokens/builders/filledSurface.js +7 -7
- package/dist/esm/Theme/tokens/builders/lazy.js +49 -0
- package/dist/esm/Theme/tokens/builders/memo.js +21 -0
- package/dist/esm/Theme/tokens/builders/memoByReads.js +46 -0
- package/dist/esm/Theme/tokens/builders/mutedText.js +12 -2
- package/dist/esm/Theme/tokens/builders/outlineRung.js +10 -2
- package/dist/esm/Theme/tokens/builders/planeStep.js +14 -0
- package/dist/esm/Theme/tokens/builders/planes.js +28 -0
- package/dist/esm/Theme/tokens/builders/skeletonShimmer.js +21 -0
- package/dist/esm/Theme/tokens/builders/surfaceRaised.js +16 -7
- package/dist/esm/Theme/tokens/builders/surfaceRungs.js +3 -1
- package/dist/esm/Theme/tokens/builders/tone.js +5 -4
- package/dist/esm/Theme/tokens/primitives/borderWidths.js +2 -0
- package/dist/esm/Theme/tokens/primitives/index.js +5 -3
- package/dist/esm/Theme/tokens/primitives/motion.js +21 -4
- package/dist/esm/Theme/tokens/primitives/optionRowSizes.js +2 -1
- package/dist/esm/Theme/tokens/primitives/radii.js +13 -0
- package/dist/esm/Theme/tokens/primitives/shadows.js +56 -5
- package/dist/esm/Theme/tokens/primitives/states.js +1 -0
- package/dist/esm/Theme/tokens/primitives/typography.js +21 -1
- package/dist/esm/Theme/tokens/primitives/zIndices.js +1 -0
- package/dist/esm/Utils/formatDate.js +138 -0
- package/dist/esm/index.js +19 -2
- package/dist/index.d.ts +34 -5
- package/dist/index.js +51 -4
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
+
import { observeResize } from "./sharedResizeObserver.js";
|
|
2
3
|
// NOTE: compares scrollWidth/Height vs clientWidth/Height to detect real ellipsis truncation; re-measures via ResizeObserver.
|
|
3
4
|
export function useIsTruncated(content, enabled = true) {
|
|
4
5
|
const ref = useRef(null);
|
|
@@ -14,11 +15,9 @@ export function useIsTruncated(content, enabled = true) {
|
|
|
14
15
|
return;
|
|
15
16
|
measure();
|
|
16
17
|
const el = ref.current;
|
|
17
|
-
if (!el
|
|
18
|
+
if (!el)
|
|
18
19
|
return;
|
|
19
|
-
|
|
20
|
-
observer.observe(el);
|
|
21
|
-
return () => observer.disconnect();
|
|
20
|
+
return observeResize(el, measure);
|
|
22
21
|
}, [measure, content, enabled]);
|
|
23
22
|
return { ref, isTruncated };
|
|
24
23
|
}
|
|
@@ -36,10 +36,13 @@ const variants = {
|
|
|
36
36
|
outline: definePartsStyle({
|
|
37
37
|
container: { [$border.variable]: "1px", [$shadow.variable]: "none" },
|
|
38
38
|
}),
|
|
39
|
+
elevated: definePartsStyle({
|
|
40
|
+
container: { [$border.variable]: "0", [$shadow.variable]: "shadows.card" },
|
|
41
|
+
}),
|
|
39
42
|
};
|
|
40
43
|
export const Card = defineMultiStyleConfig({
|
|
41
44
|
baseStyle,
|
|
42
45
|
sizes,
|
|
43
46
|
variants,
|
|
44
|
-
defaultProps: { variant: "
|
|
47
|
+
defaultProps: { variant: "elevated", size: "md" },
|
|
45
48
|
});
|
|
@@ -3,6 +3,7 @@ import { menuAnatomy } from "@chakra-ui/anatomy";
|
|
|
3
3
|
import { listRowBackgrounds } from "../tokens/builders/rowStates.js";
|
|
4
4
|
import { OPTION_ROW_SIZES, OPTION_ROW_RADIUS } from "../tokens/primitives/optionRowSizes.js";
|
|
5
5
|
import { paletteOf } from "./paletteFromTheme.js";
|
|
6
|
+
import { POPUP_SURFACE } from "./overlay.styles.js";
|
|
6
7
|
const itemRowSpec = OPTION_ROW_SIZES.sm;
|
|
7
8
|
const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(menuAnatomy.keys);
|
|
8
9
|
const $bg = cssVar("menu-bg");
|
|
@@ -21,12 +22,14 @@ const baseStyle = definePartsStyle(({ theme }) => {
|
|
|
21
22
|
borderWidth: "1px",
|
|
22
23
|
borderStyle: "solid",
|
|
23
24
|
borderColor: colors.boxborder[200],
|
|
25
|
+
...POPUP_SURFACE,
|
|
24
26
|
},
|
|
25
27
|
item: {
|
|
26
28
|
minH: itemRowSpec.minH,
|
|
27
29
|
px: itemRowSpec.px,
|
|
28
30
|
py: itemRowSpec.py,
|
|
29
31
|
mx: itemRowSpec.mx,
|
|
32
|
+
width: `calc(100% - 2 * ${itemRowSpec.mx})`,
|
|
30
33
|
fontSize: itemRowSpec.fontSize,
|
|
31
34
|
borderRadius: OPTION_ROW_RADIUS,
|
|
32
35
|
bg: "transparent",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createMultiStyleConfigHelpers, cssVar } from "@chakra-ui/react";
|
|
2
2
|
import { popoverAnatomy } from "@chakra-ui/anatomy";
|
|
3
3
|
import { paletteOf } from "./paletteFromTheme.js";
|
|
4
|
+
import { POPUP_SURFACE } from "./overlay.styles.js";
|
|
4
5
|
const { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(popoverAnatomy.keys);
|
|
5
6
|
const $popperBg = cssVar("popper-bg");
|
|
6
7
|
const $arrowShadowColor = cssVar("popper-arrow-shadow-color");
|
|
@@ -16,6 +17,7 @@ const baseStyle = definePartsStyle(({ theme }) => {
|
|
|
16
17
|
borderWidth: "1px",
|
|
17
18
|
borderStyle: "solid",
|
|
18
19
|
borderColor: colors.boxborder[200],
|
|
20
|
+
...POPUP_SURFACE,
|
|
19
21
|
},
|
|
20
22
|
};
|
|
21
23
|
});
|
|
@@ -12,6 +12,7 @@ import { AA_NORMAL_TEXT, accentTextOnCanvas, isDarkCanvas } from "../tokens/buil
|
|
|
12
12
|
import { labelOnFill, solidFillRung } from "../tokens/builders/filledSurface.js";
|
|
13
13
|
import { liftToContrast, resolveHoverTint } from "../tokens/builders/outlineRung.js";
|
|
14
14
|
import { resolveSoftTone } from "../tokens/builders/tone.js";
|
|
15
|
+
import { skeletonShimmer } from "../tokens/builders/skeletonShimmer.js";
|
|
15
16
|
import { tooltipSurface } from "../tokens/builders/tooltipSurface.js";
|
|
16
17
|
import { Drawer } from "./Drawer.styles.js";
|
|
17
18
|
import { Menu } from "./Menu.styles.js";
|
|
@@ -142,12 +143,15 @@ const $skeletonStart = cssVar("skeleton-start-color");
|
|
|
142
143
|
const $skeletonEnd = cssVar("skeleton-end-color");
|
|
143
144
|
// NOTE: fixes Chakra's Skeleton hardcoding gray.100/.400 via `_dark` (dead here) — an explicit startColor/endColor prop still wins.
|
|
144
145
|
const Skeleton = {
|
|
145
|
-
baseStyle: ({ theme }) =>
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
baseStyle: ({ theme }) => {
|
|
147
|
+
const shimmer = skeletonShimmer(paletteOf(theme));
|
|
148
|
+
return {
|
|
149
|
+
[$skeletonStart.variable]: shimmer.start,
|
|
150
|
+
[$skeletonEnd.variable]: shimmer.end,
|
|
151
|
+
background: $skeletonStart.reference,
|
|
152
|
+
borderColor: $skeletonEnd.reference,
|
|
153
|
+
};
|
|
154
|
+
},
|
|
151
155
|
};
|
|
152
156
|
// NOTE: uses Chakra's own shorthand style keys (bg/w/h/pos) + !important — extendTheme deep-merges by key, so mismatched keys let Chakra's stock value win.
|
|
153
157
|
const Radio = {
|
|
@@ -5,18 +5,44 @@ import { componentStyles } from "./componentStyles.js";
|
|
|
5
5
|
import { resolveFilledSurface } from "../tokens/builders/filledSurface.js";
|
|
6
6
|
import { globalScrollbarStyles } from "../tokens/builders/scrollbar.js";
|
|
7
7
|
import { focusRingShadow } from "./focusRing.styles.js";
|
|
8
|
+
import { shadowsFor } from "../tokens/primitives/shadows.js";
|
|
9
|
+
import { reducedMotionGlobalStyles } from "./motion.js";
|
|
10
|
+
import { TEXT_STYLES } from "../tokens/primitives/typography.js";
|
|
11
|
+
import { memoiseByReads } from "../tokens/builders/memoByReads.js";
|
|
12
|
+
const memoisedStyle = (value) => typeof value === "function" ? memoiseByReads(value) : value;
|
|
13
|
+
const memoisedGroup = (group) => Object.fromEntries(Object.entries(group).map(([key, value]) => [key, memoisedStyle(value)]));
|
|
14
|
+
const memoisedConfig = (config) => Object.fromEntries(Object.entries(config).map(([key, value]) => [
|
|
15
|
+
key,
|
|
16
|
+
key === "baseStyle"
|
|
17
|
+
? memoisedStyle(value)
|
|
18
|
+
: key === "variants" || key === "sizes"
|
|
19
|
+
? memoisedGroup(value)
|
|
20
|
+
: value,
|
|
21
|
+
]));
|
|
22
|
+
// NOTE: extendTheme deep-merges Chakra's and our style output on every call; cache it per theme.
|
|
23
|
+
const withMemoisedStyles = (theme) => {
|
|
24
|
+
const components = theme.components;
|
|
25
|
+
return {
|
|
26
|
+
...theme,
|
|
27
|
+
components: {
|
|
28
|
+
...components,
|
|
29
|
+
...Object.fromEntries(Object.keys(componentStyles).map((name) => [name, memoisedConfig(components[name])])),
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
};
|
|
8
33
|
// Builds a Chakra theme from a pure brand palette — dark mode works by swapping which palette it carries.
|
|
9
34
|
export const createBrandTheme = (palette, options = {}) => {
|
|
10
35
|
var _a;
|
|
11
36
|
const colorMode = (_a = options.colorMode) !== null && _a !== void 0 ? _a : "light";
|
|
37
|
+
const motionRule = options.reducedMotion === "global" ? reducedMotionGlobalStyles : {};
|
|
12
38
|
const brand = {
|
|
13
39
|
colors: palette,
|
|
14
40
|
...fonts,
|
|
15
41
|
...common,
|
|
16
42
|
// NOTE: binds the palette-derived ring to shadows.outline — Chakra's stock one failed 1.4.11 on every brand.
|
|
17
|
-
shadows: { ...
|
|
43
|
+
shadows: { ...shadowsFor(colorMode), outline: focusRingShadow(palette) },
|
|
18
44
|
};
|
|
19
|
-
return extendTheme({
|
|
45
|
+
return withMemoisedStyles(extendTheme({
|
|
20
46
|
...brand,
|
|
21
47
|
config: {
|
|
22
48
|
...common.config,
|
|
@@ -64,11 +90,15 @@ export const createBrandTheme = (palette, options = {}) => {
|
|
|
64
90
|
WebkitTextFillColor: palette.text[900],
|
|
65
91
|
caretColor: palette.text[900],
|
|
66
92
|
},
|
|
93
|
+
...motionRule,
|
|
67
94
|
},
|
|
68
95
|
},
|
|
69
96
|
}
|
|
70
|
-
:
|
|
97
|
+
: options.reducedMotion === "global"
|
|
98
|
+
? { styles: { global: motionRule } }
|
|
99
|
+
: {}),
|
|
100
|
+
textStyles: TEXT_STYLES,
|
|
71
101
|
components: componentStyles,
|
|
72
|
-
});
|
|
102
|
+
}));
|
|
73
103
|
};
|
|
74
104
|
export default createBrandTheme;
|
|
@@ -6,6 +6,9 @@ export const FOCUS_RING_WIDTH = 4;
|
|
|
6
6
|
// NOTE: a box-shadow, not an outline — drawn outside the border box so it never resizes the control.
|
|
7
7
|
export const focusRingShadow = (colors) => `0 0 0 ${FOCUS_HALO_WIDTH}px ${colors.focusRing.halo}, ` +
|
|
8
8
|
`0 0 0 ${FOCUS_RING_WIDTH}px ${colors.focusRing.ring}`;
|
|
9
|
+
/** For controls whose rounded shell clips overflow: the same halo and ring, drawn inside the border box. */
|
|
10
|
+
export const insetFocusRingShadow = (colors) => `inset 0 0 0 ${FOCUS_HALO_WIDTH}px ${colors.focusRing.halo}, ` +
|
|
11
|
+
`inset 0 0 0 ${FOCUS_RING_WIDTH}px ${colors.focusRing.ring}`;
|
|
9
12
|
// NOTE: stacked pseudo-classes raise specificity above Chakra's _hover, so a hovered+focused button keeps its ring.
|
|
10
13
|
export const FOCUS_VISIBLE_OVER_STATE = "&:hover:focus-visible, &:active:focus-visible, &[data-active]:focus-visible";
|
|
11
14
|
// NOTE: transparent outline isn't decorative — forced-colors mode drops box-shadow but repaints an outline.
|
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
import { useMatchMedia } from "../../Hooks/useMatchMedia.js";
|
|
2
2
|
export const REDUCED_MOTION_QUERY = "@media (prefers-reduced-motion: reduce)";
|
|
3
|
+
export const MOTION_OK_QUERY = "@media (prefers-reduced-motion: no-preference)";
|
|
3
4
|
const MEDIA = "(prefers-reduced-motion: reduce)";
|
|
4
5
|
export const usePrefersReducedMotion = () => useMatchMedia(MEDIA, false);
|
|
5
6
|
/** Spread into `sx`: drops transitions and animations when the user asks for less motion. */
|
|
6
7
|
export const reducedMotionSx = (overrides = {}) => ({
|
|
7
8
|
[REDUCED_MOTION_QUERY]: { transition: "none", animation: "none", ...overrides },
|
|
8
9
|
});
|
|
10
|
+
/** Add to an element whose loop is essential feedback; it and its subtree keep moving. */
|
|
11
|
+
export const MOTION_KEEP_CLASS = "pz-motion-keep";
|
|
12
|
+
const KEPT = [
|
|
13
|
+
".chakra-spinner",
|
|
14
|
+
".chakra-progress",
|
|
15
|
+
".chakra-progress *",
|
|
16
|
+
`.${MOTION_KEEP_CLASS}`,
|
|
17
|
+
`.${MOTION_KEEP_CLASS} *`,
|
|
18
|
+
];
|
|
19
|
+
const notKept = KEPT.map((selector) => `:not(${selector})`).join("");
|
|
20
|
+
export const REDUCED_MOTION_SELECTOR = [
|
|
21
|
+
`*${notKept}`,
|
|
22
|
+
`*${notKept}::before`,
|
|
23
|
+
`*${notKept}::after`,
|
|
24
|
+
].join(", ");
|
|
25
|
+
export const reducedMotionGlobalStyles = {
|
|
26
|
+
[REDUCED_MOTION_QUERY]: {
|
|
27
|
+
[REDUCED_MOTION_SELECTOR]: {
|
|
28
|
+
transitionDuration: "0.01ms !important",
|
|
29
|
+
animationDuration: "0.01ms !important",
|
|
30
|
+
animationIterationCount: "1 !important",
|
|
31
|
+
scrollBehavior: "auto !important",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { overlayScrim } from "../tokens/builders/scrim.js";
|
|
2
2
|
import { raisedRule } from "../tokens/builders/surfaceRaised.js";
|
|
3
|
+
import { RADIUS_ROLE } from "../tokens/primitives/radii.js";
|
|
3
4
|
export const OVERLAY_BLUR = "blur(4px)";
|
|
5
|
+
/** Radius and elevation every anchored popup shares: menus, popovers, selects, dropdowns. */
|
|
6
|
+
export const POPUP_SURFACE = { borderRadius: RADIUS_ROLE.float, boxShadow: "md" };
|
|
4
7
|
/** The one Modal/Drawer backdrop; reuse it for any custom full-screen scrim. */
|
|
5
8
|
export const overlayScrimStyles = (colors) => ({
|
|
6
9
|
bg: overlayScrim(colors),
|
package/dist/esm/Theme/index.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import createBrandTheme from "./chakra/createBrandTheme.js";
|
|
2
2
|
import { lightPalettes, darkPalettes } from "./tokens/brands/index.js";
|
|
3
|
-
|
|
3
|
+
import { lazyObject } from "./tokens/builders/lazy.js";
|
|
4
|
+
// NOTE: lavender is built at import as the shape template — every light theme shares its keys.
|
|
4
5
|
const lavender = createBrandTheme(lightPalettes.lavender);
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
6
|
+
const lightThemeKeys = Object.keys(lavender);
|
|
7
|
+
const lazyLightTheme = (brand) => lazyObject(lightThemeKeys, () => createBrandTheme(lightPalettes[brand]));
|
|
8
|
+
const meadow = lazyLightTheme("meadow");
|
|
9
|
+
const radiant = lazyLightTheme("radiant");
|
|
10
|
+
const skyline = lazyLightTheme("skyline");
|
|
11
|
+
const slate = lazyLightTheme("slate");
|
|
12
|
+
const emerald = lazyLightTheme("emerald");
|
|
13
|
+
const rosewood = lazyLightTheme("rosewood");
|
|
14
|
+
const storefront = lazyLightTheme("storefront");
|
|
15
|
+
const zinc = lazyLightTheme("zinc");
|
|
13
16
|
export { skyline, meadow, radiant, lavender, slate, emerald, rosewood, storefront, zinc };
|
|
14
17
|
// NOTE: consumers iterate this to render theme pickers — key order is load-bearing. Stays light-only.
|
|
15
18
|
export const ThemesList = {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, } from "react";
|
|
2
|
+
import { createContext, useCallback, useDeferredValue, useEffect, useLayoutEffect, useMemo, useRef, useState, } from "react";
|
|
3
3
|
import { ChakraProvider, extendTheme } from "@chakra-ui/react";
|
|
4
4
|
import { brandThemes } from "../index.js";
|
|
5
5
|
import ToasterProvider from "../../Components/Toaster/Toaster.js";
|
|
6
|
+
import { reducedMotionGlobalStyles } from "../chakra/motion.js";
|
|
6
7
|
import { getSystemColorMode, readStoredTheme, subscribeToSystemColorMode, writeStoredTheme, } from "./colorModeStorage.js";
|
|
7
8
|
const DEFAULT_BRAND = "lavender";
|
|
8
9
|
const DEFAULT_MODE = "system";
|
|
@@ -16,7 +17,7 @@ const forcedLightColorModeManager = {
|
|
|
16
17
|
};
|
|
17
18
|
export const ThemeModeContext = createContext(undefined);
|
|
18
19
|
// NOTE: Chakra's own color mode stays unsynced from resolvedMode — its built-in `_dark:` blocks assume the opposite ramp direction. Read mode via useThemeMode(), not useColorModeValue().
|
|
19
|
-
export const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRAND, onBrandChange, defaultMode = DEFAULT_MODE, onModeChange, storageKey = DEFAULT_STORAGE_KEY, disablePersistence = false, themeOverrides, }) => {
|
|
20
|
+
export const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRAND, onBrandChange, defaultMode = DEFAULT_MODE, onModeChange, storageKey = DEFAULT_STORAGE_KEY, disablePersistence = false, themeOverrides, reducedMotion = "components", }) => {
|
|
20
21
|
const [mode, setModeState] = useState(() => { var _a; return (_a = (disablePersistence ? undefined : readStoredTheme(storageKey).mode)) !== null && _a !== void 0 ? _a : defaultMode; });
|
|
21
22
|
const [brand, setBrandState] = useState(() => { var _a; return (_a = (disablePersistence ? undefined : readStoredTheme(storageKey).brand)) !== null && _a !== void 0 ? _a : brandProp; });
|
|
22
23
|
const [systemMode, setSystemMode] = useState(getSystemColorMode);
|
|
@@ -58,14 +59,17 @@ export const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRA
|
|
|
58
59
|
writeStoredTheme(storageKey, { mode, brand });
|
|
59
60
|
}, [mode, brand, disablePersistence, storageKey]);
|
|
60
61
|
const resolvedMode = mode === "system" ? systemMode : mode;
|
|
62
|
+
// NOTE: the page re-themes in an interruptible second commit; the switcher paints first.
|
|
63
|
+
const appliedMode = useDeferredValue(resolvedMode);
|
|
64
|
+
const appliedBrand = useDeferredValue(brand);
|
|
61
65
|
// NOTE: sets CSS color-scheme so native chrome (select popups, date pickers) matches the mode.
|
|
62
66
|
useLayoutEffect(() => {
|
|
63
|
-
document.documentElement.style.colorScheme =
|
|
64
|
-
}, [
|
|
67
|
+
document.documentElement.style.colorScheme = appliedMode;
|
|
68
|
+
}, [appliedMode]);
|
|
65
69
|
// NOTE: re-asserted after Chakra's own ColorModeProvider effect overwrites it back to "light".
|
|
66
70
|
useEffect(() => {
|
|
67
|
-
document.documentElement.style.colorScheme =
|
|
68
|
-
}, [
|
|
71
|
+
document.documentElement.style.colorScheme = appliedMode;
|
|
72
|
+
}, [appliedMode]);
|
|
69
73
|
const onModeChangeRef = useRef(onModeChange);
|
|
70
74
|
const onBrandChangeRef = useRef(onBrandChange);
|
|
71
75
|
useLayoutEffect(() => {
|
|
@@ -87,14 +91,18 @@ export const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRA
|
|
|
87
91
|
// NOTE: keyed by value, not identity — themeOverrides is usually an inline literal.
|
|
88
92
|
const overridesKey = themeOverrides ? JSON.stringify(themeOverrides) : "";
|
|
89
93
|
const resolvedTheme = useMemo(() => {
|
|
90
|
-
const base = brandThemes[
|
|
91
|
-
|
|
94
|
+
const base = brandThemes[appliedBrand][appliedMode];
|
|
95
|
+
const extensions = [
|
|
96
|
+
...(reducedMotion === "global" ? [{ styles: { global: reducedMotionGlobalStyles } }] : []),
|
|
97
|
+
...(themeOverrides ? [themeOverrides] : []),
|
|
98
|
+
];
|
|
99
|
+
return extensions.length ? extendTheme(base, ...extensions) : base;
|
|
92
100
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
93
|
-
}, [
|
|
101
|
+
}, [appliedBrand, appliedMode, overridesKey, reducedMotion]);
|
|
94
102
|
// NOTE: global.css ships var(--color-*) light-only — re-point them here in dark, clear in light.
|
|
95
103
|
useLayoutEffect(() => {
|
|
96
104
|
const root = document.documentElement;
|
|
97
|
-
root.dataset.mode =
|
|
105
|
+
root.dataset.mode = appliedMode;
|
|
98
106
|
const { colors } = resolvedTheme;
|
|
99
107
|
const { gray, semantic } = colors;
|
|
100
108
|
const HUE_SCALES = [
|
|
@@ -118,7 +126,7 @@ export const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRA
|
|
|
118
126
|
const set = (name, val) => root.style.setProperty(`--color-${name}`, val);
|
|
119
127
|
const clear = (name) => root.style.removeProperty(`--color-${name}`);
|
|
120
128
|
const allRampNames = [...HUE_SCALES, ...SEMANTIC_SCALES].flatMap((s) => RUNGS.map((r) => `${s}-${r}`));
|
|
121
|
-
if (
|
|
129
|
+
if (appliedMode === "dark") {
|
|
122
130
|
for (const s of HUE_SCALES)
|
|
123
131
|
for (const r of RUNGS)
|
|
124
132
|
set(`${s}-${r}`, colors[s][r]);
|
|
@@ -134,6 +142,7 @@ export const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRA
|
|
|
134
142
|
for (const name of Object.keys(SEMANTIC_VARS))
|
|
135
143
|
clear(name);
|
|
136
144
|
}
|
|
137
|
-
}, [
|
|
138
|
-
|
|
145
|
+
}, [appliedMode, resolvedTheme]);
|
|
146
|
+
const themedTree = useMemo(() => (_jsx(ChakraProvider, { theme: resolvedTheme, colorModeManager: forcedLightColorModeManager, children: _jsx(ToasterProvider, { children: children }) })), [resolvedTheme, children]);
|
|
147
|
+
return _jsx(ThemeModeContext.Provider, { value: value, children: themedTree });
|
|
139
148
|
};
|
|
@@ -3,6 +3,7 @@ import { useRef, useState } from "react";
|
|
|
3
3
|
import { Box, Button, HStack, IconButton, Menu, MenuButton, MenuDivider, MenuItemOption, MenuList, MenuOptionGroup, Text, Tooltip, } from "@chakra-ui/react";
|
|
4
4
|
import { Monitor, Moon, Sun } from "lucide-react";
|
|
5
5
|
import { brandThemes } from "../index.js";
|
|
6
|
+
import { lightPalettes } from "../tokens/brands/index.js";
|
|
6
7
|
import { useCustomTheme } from "../useCustomTheme.js";
|
|
7
8
|
import { useThemeMode } from "./useThemeMode.js";
|
|
8
9
|
import { focusGlowShadow, focusVisibleRing } from "../chakra/focusRing.styles.js";
|
|
@@ -18,8 +19,8 @@ const SIZES = {
|
|
|
18
19
|
lg: { control: "lg", icon: 18 },
|
|
19
20
|
};
|
|
20
21
|
const toBrandLabel = (brand) => brand.charAt(0).toUpperCase() + brand.slice(1);
|
|
21
|
-
// NOTE:
|
|
22
|
-
const brandSwatchColor = (brand) =>
|
|
22
|
+
// NOTE: reads the brand's own palette, not its Chakra theme, so the picker builds no themes.
|
|
23
|
+
const brandSwatchColor = (brand) => lightPalettes[brand].primary[500];
|
|
23
24
|
const BrandSwatch = ({ brand }) => {
|
|
24
25
|
const { colors } = useCustomTheme();
|
|
25
26
|
return (_jsx(Box, { as: "span", display: "inline-block", w: "0.625rem", h: "0.625rem", borderRadius: "full", bg: brandSwatchColor(brand), border: "1px solid", borderColor: colors.boxborder[200], flexShrink: 0 }));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildDarkPalette } from "../../builders/buildDarkPalette.js";
|
|
2
|
+
import { lazyPalette } from "../../builders/lazy.js";
|
|
2
3
|
import light from "./palette.light.js";
|
|
3
|
-
const palette = buildDarkPalette(light);
|
|
4
|
+
const palette = lazyPalette(light, () => buildDarkPalette(light));
|
|
4
5
|
export default palette;
|
|
@@ -26,9 +26,26 @@ import { buildFocusRing, withFocusRing } from "../builders/focusRing.js";
|
|
|
26
26
|
import { withSurfaceRungs } from "../builders/surfaceRungs.js";
|
|
27
27
|
import { buildSurfaceRaised, withSurfaceRaised } from "../builders/surfaceRaised.js";
|
|
28
28
|
import { buildStar } from "../builders/star.js";
|
|
29
|
+
import { lazyPalette } from "../builders/lazy.js";
|
|
30
|
+
import { contrastRatio, mix } from "../builders/color.js";
|
|
31
|
+
export const LIGHT_CANVAS_STEP = 1.09;
|
|
32
|
+
const CANVAS_MIX_STEP = 0.0025;
|
|
33
|
+
const CANVAS_MIX_MAX = 0.5;
|
|
34
|
+
const lightCanvas = (canvas, card, ink) => {
|
|
35
|
+
for (let weight = 0; weight < CANVAS_MIX_MAX; weight += CANVAS_MIX_STEP) {
|
|
36
|
+
const next = mix(canvas, ink, weight);
|
|
37
|
+
if (contrastRatio(next, card) >= LIGHT_CANVAS_STEP)
|
|
38
|
+
return next;
|
|
39
|
+
}
|
|
40
|
+
return mix(canvas, ink, CANVAS_MIX_MAX);
|
|
41
|
+
};
|
|
29
42
|
/** Derived, never hand-written: a copied hex goes stale the moment a canvas moves. */
|
|
30
43
|
export const finalizeLightPalette = (source) => ({
|
|
31
44
|
...source,
|
|
45
|
+
backgroundColor: {
|
|
46
|
+
...source.backgroundColor,
|
|
47
|
+
base: lightCanvas(source.backgroundColor.base, source.background[50], source.text[900]),
|
|
48
|
+
},
|
|
32
49
|
sidebar: withSidebarTokens(source),
|
|
33
50
|
accentText: pickAccentText(source.primary, source.backgroundColor.main),
|
|
34
51
|
textMuted: buildMutedText(source.text, source.backgroundColor.main),
|
|
@@ -43,8 +60,8 @@ export { lavender, meadow, radiant, skyline, slate, emerald, rosewood, storefron
|
|
|
43
60
|
export { lavenderDark, meadowDark, radiantDark, skylineDark, slateDark, emeraldDark, rosewoodDark, storefrontDark, zincDark, };
|
|
44
61
|
// NOTE: withFocusRing is outermost — it must see primary and surfaces together, after every earlier step.
|
|
45
62
|
const resolveRungs = (palette) => withFocusRing(withSurfaceRungs(withSurfaceRaised(withTableHoverRung(withPlaceholderRung(withOutlineRung(palette))))));
|
|
46
|
-
const lightBrand = (source) => resolveRungs(finalizeLightPalette(source));
|
|
47
|
-
/** Light palette per brand. `lavender` is the base the other six extend. */
|
|
63
|
+
const lightBrand = (source) => lazyPalette(source, () => resolveRungs(finalizeLightPalette(source)));
|
|
64
|
+
/** Light palette per brand, derived on first read. `lavender` is the base the other six extend. */
|
|
48
65
|
export const lightPalettes = {
|
|
49
66
|
lavender: lightBrand(lavender),
|
|
50
67
|
meadow: lightBrand(meadow),
|
|
@@ -56,18 +73,18 @@ export const lightPalettes = {
|
|
|
56
73
|
storefront: lightBrand(storefront),
|
|
57
74
|
zinc: lightBrand(zinc),
|
|
58
75
|
};
|
|
59
|
-
/** Dark palette per brand, derived from the matching light palette. */
|
|
60
|
-
const darkBrand = (dark) => resolveRungs(dark);
|
|
76
|
+
/** Dark palette per brand, derived from the matching light palette on first read. */
|
|
77
|
+
const darkBrand = (source, dark) => lazyPalette(source, () => resolveRungs(dark));
|
|
61
78
|
export const darkPalettes = {
|
|
62
|
-
lavender: darkBrand(lavenderDark),
|
|
63
|
-
meadow: darkBrand(meadowDark),
|
|
64
|
-
radiant: darkBrand(radiantDark),
|
|
65
|
-
skyline: darkBrand(skylineDark),
|
|
66
|
-
slate: darkBrand(slateDark),
|
|
67
|
-
emerald: darkBrand(emeraldDark),
|
|
68
|
-
rosewood: darkBrand(rosewoodDark),
|
|
69
|
-
storefront: darkBrand(storefrontDark),
|
|
70
|
-
zinc: darkBrand(zincDark),
|
|
79
|
+
lavender: darkBrand(lavender, lavenderDark),
|
|
80
|
+
meadow: darkBrand(meadow, meadowDark),
|
|
81
|
+
radiant: darkBrand(radiant, radiantDark),
|
|
82
|
+
skyline: darkBrand(skyline, skylineDark),
|
|
83
|
+
slate: darkBrand(slate, slateDark),
|
|
84
|
+
emerald: darkBrand(emerald, emeraldDark),
|
|
85
|
+
rosewood: darkBrand(rosewood, rosewoodDark),
|
|
86
|
+
storefront: darkBrand(storefront, storefrontDark),
|
|
87
|
+
zinc: darkBrand(zinc, zincDark),
|
|
71
88
|
};
|
|
72
89
|
// Built from lightPalettes/darkPalettes (not the raw literals) so accentText can never be
|
|
73
90
|
// present on one map and missing on the other.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildDarkPalette } from "../../builders/buildDarkPalette.js";
|
|
2
|
+
import { lazyPalette } from "../../builders/lazy.js";
|
|
2
3
|
import light from "./palette.light.js";
|
|
3
|
-
const palette = buildDarkPalette(light);
|
|
4
|
+
const palette = lazyPalette(light, () => buildDarkPalette(light));
|
|
4
5
|
export default palette;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildDarkPalette } from "../../builders/buildDarkPalette.js";
|
|
2
|
+
import { lazyPalette } from "../../builders/lazy.js";
|
|
2
3
|
import light from "./palette.light.js";
|
|
3
|
-
const palette = buildDarkPalette(light);
|
|
4
|
+
const palette = lazyPalette(light, () => buildDarkPalette(light));
|
|
4
5
|
export default palette;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildDarkPalette } from "../../builders/buildDarkPalette.js";
|
|
2
|
+
import { lazyPalette } from "../../builders/lazy.js";
|
|
2
3
|
import light from "./palette.light.js";
|
|
3
|
-
const palette = buildDarkPalette(light);
|
|
4
|
+
const palette = lazyPalette(light, () => buildDarkPalette(light));
|
|
4
5
|
export default palette;
|
|
@@ -15,8 +15,22 @@ const primary = {
|
|
|
15
15
|
900: "#531a14",
|
|
16
16
|
opacity: buildPrimaryOpacity(PRIMARY_500),
|
|
17
17
|
};
|
|
18
|
+
const danger = {
|
|
19
|
+
50: "#fcedf3",
|
|
20
|
+
100: "#f5c5db",
|
|
21
|
+
200: "#f1a9ca",
|
|
22
|
+
300: "#ec82b4",
|
|
23
|
+
400: "#ea69a7",
|
|
24
|
+
500: "#e74494",
|
|
25
|
+
600: "#d23e87",
|
|
26
|
+
700: "#a43069",
|
|
27
|
+
800: "#7f2651",
|
|
28
|
+
900: "#611c3e",
|
|
29
|
+
};
|
|
18
30
|
const palette = {
|
|
19
31
|
...neutralTokens,
|
|
32
|
+
red: danger,
|
|
33
|
+
semantic: { ...neutralTokens.semantic, error: danger },
|
|
20
34
|
...buildBrandInk(PRIMARY_500),
|
|
21
35
|
// NOTE: stops retuned so white gradient-button text clears AA at both ends — original let it drop to 4.37/2.15.
|
|
22
36
|
gradient: { from: "#cd4733", to: "#a36807" }, // terracotta red → amber
|
|
@@ -118,6 +132,7 @@ const palette = {
|
|
|
118
132
|
boxShadow: {
|
|
119
133
|
primary: buildPrimaryShadowTint(PRIMARY_500),
|
|
120
134
|
...sharedBoxShadow,
|
|
135
|
+
error: `${danger[500]}47`,
|
|
121
136
|
},
|
|
122
137
|
};
|
|
123
138
|
export default palette;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildDarkPalette } from "../../builders/buildDarkPalette.js";
|
|
2
|
+
import { lazyPalette } from "../../builders/lazy.js";
|
|
2
3
|
import light from "./palette.light.js";
|
|
3
|
-
const palette = buildDarkPalette(light);
|
|
4
|
+
const palette = lazyPalette(light, () => buildDarkPalette(light));
|
|
4
5
|
export default palette;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { neutralTokens, sharedBoxShadow } from "../neutrals.js";
|
|
2
2
|
import { buildPrimaryOpacity, buildPrimaryShadowTint } from "../../builders/buildBrandTokens.js";
|
|
3
3
|
import { buildBrandInk } from "../../builders/brandInk.js";
|
|
4
|
-
const PRIMARY_500 = "#
|
|
4
|
+
const PRIMARY_500 = "#cb6b94";
|
|
5
5
|
const primary = {
|
|
6
|
-
50: "#
|
|
7
|
-
100: "#
|
|
8
|
-
200: "#
|
|
9
|
-
300: "#
|
|
10
|
-
400: "#
|
|
6
|
+
50: "#fcf2f7",
|
|
7
|
+
100: "#f6d6e5",
|
|
8
|
+
200: "#edabc9",
|
|
9
|
+
300: "#e480ad",
|
|
10
|
+
400: "#d76398",
|
|
11
11
|
500: PRIMARY_500,
|
|
12
|
-
600: "#
|
|
13
|
-
700: "#
|
|
14
|
-
800: "#
|
|
15
|
-
900: "#
|
|
12
|
+
600: "#b35681",
|
|
13
|
+
700: "#93466a",
|
|
14
|
+
800: "#723754",
|
|
15
|
+
900: "#52273e",
|
|
16
16
|
opacity: buildPrimaryOpacity(PRIMARY_500),
|
|
17
17
|
};
|
|
18
18
|
const palette = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildDarkPalette } from "../../builders/buildDarkPalette.js";
|
|
2
|
+
import { lazyPalette } from "../../builders/lazy.js";
|
|
2
3
|
import light from "./palette.light.js";
|
|
3
|
-
const palette = buildDarkPalette(light);
|
|
4
|
+
const palette = lazyPalette(light, () => buildDarkPalette(light));
|
|
4
5
|
export default palette;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildDarkPalette } from "../../builders/buildDarkPalette.js";
|
|
2
|
+
import { lazyPalette } from "../../builders/lazy.js";
|
|
2
3
|
import light from "./palette.light.js";
|
|
3
|
-
const palette = buildDarkPalette(light);
|
|
4
|
+
const palette = lazyPalette(light, () => buildDarkPalette(light));
|
|
4
5
|
export default palette;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildDarkPalette } from "../../builders/buildDarkPalette.js";
|
|
2
|
+
import { lazyPalette } from "../../builders/lazy.js";
|
|
2
3
|
import light from "./palette.light.js";
|
|
3
|
-
const palette = buildDarkPalette(light);
|
|
4
|
+
const palette = lazyPalette(light, () => buildDarkPalette(light));
|
|
4
5
|
export default palette;
|