pixelize-design-library 2.4.2-beta.0 → 2.4.2-beta.2
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/Components/Accordion/Accordion.js +13 -15
- package/dist/Components/Accordion/accordionColors.js +6 -9
- package/dist/Components/AlertDialog/AlertDialog.js +1 -2
- package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +2 -3
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +2 -3
- package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +2 -3
- package/dist/Components/AppearanceSettings/AppearanceSettings.js +9 -7
- package/dist/Components/Button/Button.styles.js +4 -10
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +9 -10
- package/dist/Components/Common/ErrorComponent.js +5 -8
- package/dist/Components/Common/ErrorMessage.js +2 -8
- package/dist/Components/Common/FormLabel.js +1 -3
- package/dist/Components/Common/FormattedDescription.js +3 -1
- package/dist/Components/Common/Label.js +3 -8
- package/dist/Components/Common/fieldStyles.js +6 -7
- package/dist/Components/ContactForm/ContactForm.js +1 -2
- package/dist/Components/CopyButton/CopyButton.js +3 -6
- package/dist/Components/CustomModulesTable/CustomModulesTable.js +7 -10
- package/dist/Components/CustomModulesTable/DeleteModuleModal.js +2 -2
- package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -3
- package/dist/Components/DatePicker/CalendarPanel.js +2 -3
- package/dist/Components/DatePicker/RangeDatePicker.js +9 -9
- package/dist/Components/DatePicker/SingleDatePicker.js +11 -11
- package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -2
- package/dist/Components/DatePicker/TimePicker.js +6 -7
- package/dist/Components/DatePicker/TimePickerInput.js +6 -7
- package/dist/Components/Divider/Divider.js +1 -2
- package/dist/Components/Drawer/Drawer.js +1 -2
- package/dist/Components/Dropdown/DropDown.js +22 -26
- package/dist/Components/Editor/Editor.js +10 -13
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -2
- package/dist/Components/EmptyState/EmptyState.js +11 -11
- package/dist/Components/FieldSelectModal/FieldSelectModal.js +1 -1
- package/dist/Components/FilePreview/FilePreview.js +2 -2
- package/dist/Components/FileUpload/FileUpload.js +18 -24
- package/dist/Components/FileUploader/FileUploader.js +5 -6
- package/dist/Components/FilterSidebar/FilterSidebar.js +156 -160
- package/dist/Components/Form/FormWrapper.js +1 -2
- package/dist/Components/Header/Header.js +6 -6
- package/dist/Components/Header/HeaderActions.d.ts +3 -1
- package/dist/Components/Header/HeaderActions.js +8 -4
- package/dist/Components/Header/components/desktopMenu.js +7 -20
- package/dist/Components/Header/components/mobileMenu.js +3 -15
- package/dist/Components/Input/Input/Input.js +13 -17
- package/dist/Components/Input/TextInput.styles.js +10 -13
- package/dist/Components/InputTextArea/InputTextArea.d.ts +1 -1
- package/dist/Components/InputTextArea/InputTextArea.style.js +10 -11
- package/dist/Components/KanbanBoard/AccountCard.js +10 -4
- package/dist/Components/KanbanBoard/AccountRow.js +1 -2
- package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
- package/dist/Components/KanbanBoard/KanbanBoard.js +21 -28
- package/dist/Components/LazyWrapper/LazyWrapper.js +1 -1
- package/dist/Components/LimitReachedModal/LimitReachedModal.js +3 -15
- package/dist/Components/Loading/Loading.js +1 -1
- package/dist/Components/Modal/Modal.js +3 -1
- package/dist/Components/MoreItems/MoreItems.js +3 -7
- package/dist/Components/MultiSelect/MultiSelect.js +5 -6
- package/dist/Components/NavigationBar/NavigationBar.d.ts +1 -1
- package/dist/Components/NavigationBar/NavigationBar.js +22 -18
- package/dist/Components/NavigationBar/NavigationBarProps.d.ts +5 -0
- package/dist/Components/NoteTextArea/NoteTextArea.js +4 -8
- package/dist/Components/Notification/Notification.js +17 -15
- package/dist/Components/NumberInput/NumberInput.styles.js +10 -11
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +6 -7
- package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +2 -0
- package/dist/Components/OrgSwitcher/OrgSwitcherProps.js +6 -2
- package/dist/Components/OrganizationDetails/CreateOrgModal.js +1 -2
- package/dist/Components/OrganizationDetails/DeleteOrgModal.js +5 -2
- package/dist/Components/OrganizationDetails/OrganizationDetails.js +25 -22
- package/dist/Components/PdfViewer/PdfViewer.js +1 -1
- package/dist/Components/PinInputs/PinInputs.js +7 -14
- package/dist/Components/PlanPill/PlanPill.js +5 -8
- package/dist/Components/PlanPill/planPillGradient.d.ts +19 -0
- package/dist/Components/PlanPill/planPillGradient.js +30 -1
- package/dist/Components/ProductCard/ProductPrice.js +6 -6
- package/dist/Components/ProductCard/ProductReview.js +4 -1
- package/dist/Components/ProductCard/ProductTags.js +4 -4
- package/dist/Components/ProductDetails/ProductDetails.js +3 -1
- package/dist/Components/ProductDetails/ProductDtlPrice.js +3 -3
- package/dist/Components/ProfileCard/ProfileCard.js +4 -4
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +19 -16
- package/dist/Components/Reorder/Reorder.js +3 -4
- package/dist/Components/RolesPermission/DeleteRoleModal.js +5 -4
- package/dist/Components/RolesPermission/RolesPermission.js +12 -14
- package/dist/Components/ScrollToTop/ScrollToTop.js +2 -3
- package/dist/Components/SearchSelect/SearchSelect.js +25 -28
- package/dist/Components/Select/Select.styles.js +33 -37
- package/dist/Components/SelectSearch/SelectSearch.js +8 -8
- package/dist/Components/SelectV2/SelectV2.js +14 -20
- package/dist/Components/SideBar/SecondaryBar.js +10 -15
- package/dist/Components/SideBar/SideBar.d.ts +1 -1
- package/dist/Components/SideBar/SideBar.js +41 -34
- package/dist/Components/SideBar/SideBarProps.d.ts +6 -0
- package/dist/Components/SideBar/components/MenuItemBox.js +10 -12
- package/dist/Components/SideBar/components/MenuItems.js +3 -1
- package/dist/Components/SideBar/components/MenuPopoverContent.js +7 -9
- package/dist/Components/SideBar/components/OtherApps.js +4 -4
- package/dist/Components/SideBar/sidebarAccentColors.d.ts +4 -17
- package/dist/Components/SideBar/sidebarAccentColors.js +6 -33
- package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -7
- package/dist/Components/Slider/Slider.js +2 -2
- package/dist/Components/StageProgress/StageProgressProps.js +9 -13
- package/dist/Components/Table/Table.js +10 -10
- package/dist/Components/Table/components/HeaderActions.js +6 -7
- package/dist/Components/Table/components/Pagination.js +1 -1
- package/dist/Components/Table/components/TableActions.js +4 -4
- package/dist/Components/Table/components/TableBody.js +18 -20
- package/dist/Components/Table/components/TableGroupRow.js +1 -2
- package/dist/Components/Table/components/TableHeader.js +8 -12
- package/dist/Components/Table/components/TableSearch.js +1 -2
- package/dist/Components/Table/components/tableRowHoverStyle.js +2 -3
- package/dist/Components/Table/filters/ActiveFilters.js +5 -8
- package/dist/Components/Table/filters/CompactSelect.js +4 -5
- package/dist/Components/Table/filters/LeftFilterPane.js +4 -5
- package/dist/Components/Table/filters/TableFilters.js +1 -2
- package/dist/Components/Table/hooks/useTable.js +8 -11
- package/dist/Components/Table/settings/ManageColumns.js +1 -1
- package/dist/Components/Table/settings/TableSettings.js +12 -14
- package/dist/Components/Tag/Tag.styles.js +8 -6
- package/dist/Components/Timeline/Timeline.js +32 -45
- package/dist/Components/Toaster/Toaster.js +43 -44
- package/dist/Components/ToolTip/ToolTip.js +1 -6
- package/dist/Components/Trail/EditableCell.js +4 -1
- package/dist/Components/Trail/TrailWorks.js +3 -3
- package/dist/Components/UpgradeButton/UpgradeButton.js +2 -4
- package/dist/Components/UserDetails/AddUserModal.js +3 -3
- package/dist/Components/UserDetails/ChangeRoleModal.js +2 -2
- package/dist/Components/UserDetails/DeactivateConfirmModal.js +5 -5
- package/dist/Components/UserDetails/UserDetails.js +14 -16
- package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -2
- package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +3 -4
- package/dist/Theme/assertPalette.d.ts +11 -0
- package/dist/Theme/assertPalette.js +55 -0
- package/dist/Theme/chakra/Avatar.styles.d.ts +5 -5
- package/dist/Theme/chakra/Avatar.styles.js +2 -2
- package/dist/Theme/chakra/Drawer.styles.d.ts +5 -5
- package/dist/Theme/chakra/Drawer.styles.js +8 -10
- package/dist/Theme/chakra/Modal.styles.d.ts +5 -5
- package/dist/Theme/chakra/Modal.styles.js +8 -10
- package/dist/Theme/chakra/Popover.styles.d.ts +3 -3
- package/dist/Theme/chakra/Slider.styles.d.ts +1 -1
- package/dist/Theme/chakra/Slider.styles.js +7 -9
- package/dist/Theme/chakra/Tabs.styles.d.ts +2 -2
- package/dist/Theme/chakra/Tabs.styles.js +13 -18
- package/dist/Theme/chakra/componentStyles.d.ts +54 -21
- package/dist/Theme/chakra/componentStyles.js +52 -43
- package/dist/Theme/chakra/paletteFromTheme.d.ts +10 -0
- package/dist/Theme/chakra/paletteFromTheme.js +14 -0
- package/dist/Theme/provider/PixelizeThemeProvider.js +5 -0
- package/dist/Theme/testing/testPalette.d.ts +16 -0
- package/dist/Theme/testing/testPalette.js +24 -0
- package/dist/Theme/tokens/brands/emerald/palette.light.d.ts +2 -373
- package/dist/Theme/tokens/brands/emerald/palette.light.js +5 -7
- package/dist/Theme/tokens/brands/index.d.ts +3 -2
- package/dist/Theme/tokens/brands/index.js +29 -23
- package/dist/Theme/tokens/brands/lavender/palette.light.d.ts +2 -373
- package/dist/Theme/tokens/brands/lavender/palette.light.js +3 -110
- package/dist/Theme/tokens/brands/meadow/palette.light.d.ts +2 -373
- package/dist/Theme/tokens/brands/meadow/palette.light.js +5 -7
- package/dist/Theme/tokens/brands/neutrals.d.ts +8 -0
- package/dist/Theme/tokens/brands/neutrals.js +119 -0
- package/dist/Theme/tokens/brands/radiant/palette.light.d.ts +2 -373
- package/dist/Theme/tokens/brands/radiant/palette.light.js +5 -7
- package/dist/Theme/tokens/brands/rosewood/palette.light.d.ts +2 -373
- package/dist/Theme/tokens/brands/rosewood/palette.light.js +5 -7
- package/dist/Theme/tokens/brands/skyline/palette.light.d.ts +2 -373
- package/dist/Theme/tokens/brands/skyline/palette.light.js +5 -7
- package/dist/Theme/tokens/brands/slate/palette.light.d.ts +2 -373
- package/dist/Theme/tokens/brands/slate/palette.light.js +6 -8
- package/dist/Theme/tokens/brands/storefront/palette.light.d.ts +2 -373
- package/dist/Theme/tokens/brands/storefront/palette.light.js +5 -7
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +5 -3
- package/dist/Theme/tokens/brands/zinc/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/zinc/palette.light.d.ts +2 -373
- package/dist/Theme/tokens/builders/accentText.d.ts +2 -2
- package/dist/Theme/tokens/builders/accentText.js +8 -27
- package/dist/Theme/tokens/builders/brandInk.d.ts +11 -0
- package/dist/Theme/tokens/builders/brandInk.js +106 -0
- package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +2 -2
- package/dist/Theme/tokens/builders/buildDarkPalette.js +16 -8
- package/dist/Theme/tokens/builders/mutedText.d.ts +5 -0
- package/dist/Theme/tokens/builders/mutedText.js +9 -0
- package/dist/Theme/tokens/builders/outlineRung.d.ts +7 -6
- package/dist/Theme/tokens/builders/outlineRung.js +20 -18
- package/dist/Theme/tokens/builders/resolvedRungs.d.ts +7 -0
- package/dist/Theme/tokens/builders/resolvedRungs.js +25 -0
- package/dist/Theme/tokens/builders/semanticText.d.ts +10 -0
- package/dist/Theme/tokens/builders/semanticText.js +22 -0
- package/dist/Theme/tokens/builders/sidebarAccent.d.ts +9 -0
- package/dist/Theme/tokens/builders/sidebarAccent.js +29 -0
- package/dist/Theme/tokens/builders/statusTone.js +3 -4
- package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -0
- package/dist/Theme/tokens/builders/surfaceRungs.js +39 -0
- package/dist/Theme/tokens/types.d.ts +41 -13
- package/dist/Theme/useCustomTheme.js +4 -1
- package/dist/Utils/table.d.ts +1 -7
- package/dist/Utils/table.js +27 -35
- package/dist/esm/Components/Accordion/Accordion.js +14 -16
- package/dist/esm/Components/Accordion/accordionColors.js +6 -9
- package/dist/esm/Components/AlertDialog/AlertDialog.js +1 -2
- package/dist/esm/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +2 -3
- package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +2 -3
- package/dist/esm/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +2 -3
- package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +9 -7
- package/dist/esm/Components/Button/Button.styles.js +4 -10
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +9 -10
- package/dist/esm/Components/Common/ErrorComponent.js +6 -9
- package/dist/esm/Components/Common/ErrorMessage.js +2 -8
- package/dist/esm/Components/Common/FormLabel.js +1 -3
- package/dist/esm/Components/Common/FormattedDescription.js +3 -1
- package/dist/esm/Components/Common/Label.js +3 -8
- package/dist/esm/Components/Common/fieldStyles.js +6 -7
- package/dist/esm/Components/ContactForm/ContactForm.js +1 -2
- package/dist/esm/Components/CopyButton/CopyButton.js +3 -6
- package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +7 -10
- package/dist/esm/Components/CustomModulesTable/DeleteModuleModal.js +2 -2
- package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -3
- package/dist/esm/Components/DatePicker/CalendarPanel.js +2 -3
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +9 -9
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +11 -11
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -2
- package/dist/esm/Components/DatePicker/TimePicker.js +6 -7
- package/dist/esm/Components/DatePicker/TimePickerInput.js +6 -7
- package/dist/esm/Components/Divider/Divider.js +1 -2
- package/dist/esm/Components/Drawer/Drawer.js +1 -2
- package/dist/esm/Components/Dropdown/DropDown.js +22 -26
- package/dist/esm/Components/Editor/Editor.js +11 -14
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -2
- package/dist/esm/Components/EmptyState/EmptyState.js +11 -11
- package/dist/esm/Components/FieldSelectModal/FieldSelectModal.js +1 -1
- package/dist/esm/Components/FilePreview/FilePreview.js +2 -2
- package/dist/esm/Components/FileUpload/FileUpload.js +18 -24
- package/dist/esm/Components/FileUploader/FileUploader.js +6 -7
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +157 -161
- package/dist/esm/Components/Form/FormWrapper.js +1 -2
- package/dist/esm/Components/Header/Header.js +6 -6
- package/dist/esm/Components/Header/HeaderActions.js +9 -5
- package/dist/esm/Components/Header/components/desktopMenu.js +8 -21
- package/dist/esm/Components/Header/components/mobileMenu.js +3 -15
- package/dist/esm/Components/Input/Input/Input.js +14 -18
- package/dist/esm/Components/Input/TextInput.styles.js +10 -13
- package/dist/esm/Components/InputTextArea/InputTextArea.style.js +10 -11
- package/dist/esm/Components/KanbanBoard/AccountCard.js +10 -4
- package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -2
- package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
- package/dist/esm/Components/KanbanBoard/KanbanBoard.js +21 -28
- package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -1
- package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +4 -16
- package/dist/esm/Components/Loading/Loading.js +1 -1
- package/dist/esm/Components/Modal/Modal.js +3 -1
- package/dist/esm/Components/MoreItems/MoreItems.js +3 -7
- package/dist/esm/Components/MultiSelect/MultiSelect.js +5 -6
- package/dist/esm/Components/NavigationBar/NavigationBar.js +23 -19
- package/dist/esm/Components/NoteTextArea/NoteTextArea.js +4 -8
- package/dist/esm/Components/Notification/Notification.js +18 -16
- package/dist/esm/Components/NumberInput/NumberInput.styles.js +10 -11
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +7 -8
- package/dist/esm/Components/OrgSwitcher/OrgSwitcherProps.js +5 -1
- package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +1 -2
- package/dist/esm/Components/OrganizationDetails/DeleteOrgModal.js +5 -2
- package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +25 -22
- package/dist/esm/Components/PdfViewer/PdfViewer.js +1 -1
- package/dist/esm/Components/PinInputs/PinInputs.js +8 -15
- package/dist/esm/Components/PlanPill/PlanPill.js +6 -9
- package/dist/esm/Components/PlanPill/planPillGradient.js +24 -0
- package/dist/esm/Components/ProductCard/ProductPrice.js +6 -6
- package/dist/esm/Components/ProductCard/ProductReview.js +4 -1
- package/dist/esm/Components/ProductCard/ProductTags.js +5 -5
- package/dist/esm/Components/ProductDetails/ProductDetails.js +3 -1
- package/dist/esm/Components/ProductDetails/ProductDtlPrice.js +3 -3
- package/dist/esm/Components/ProfileCard/ProfileCard.js +5 -5
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +20 -17
- package/dist/esm/Components/Reorder/Reorder.js +3 -4
- package/dist/esm/Components/RolesPermission/DeleteRoleModal.js +5 -4
- package/dist/esm/Components/RolesPermission/RolesPermission.js +12 -14
- package/dist/esm/Components/ScrollToTop/ScrollToTop.js +2 -3
- package/dist/esm/Components/SearchSelect/SearchSelect.js +25 -28
- package/dist/esm/Components/Select/Select.styles.js +33 -37
- package/dist/esm/Components/SelectSearch/SelectSearch.js +8 -8
- package/dist/esm/Components/SelectV2/SelectV2.js +14 -20
- package/dist/esm/Components/SideBar/SecondaryBar.js +11 -16
- package/dist/esm/Components/SideBar/SideBar.js +43 -36
- package/dist/esm/Components/SideBar/components/MenuItemBox.js +11 -13
- package/dist/esm/Components/SideBar/components/MenuItems.js +3 -1
- package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +8 -10
- package/dist/esm/Components/SideBar/components/OtherApps.js +4 -4
- package/dist/esm/Components/SideBar/sidebarAccentColors.js +5 -31
- package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -7
- package/dist/esm/Components/Slider/Slider.js +2 -2
- package/dist/esm/Components/StageProgress/StageProgressProps.js +9 -13
- package/dist/esm/Components/Table/Table.js +10 -10
- package/dist/esm/Components/Table/components/HeaderActions.js +6 -7
- package/dist/esm/Components/Table/components/Pagination.js +1 -1
- package/dist/esm/Components/Table/components/TableActions.js +4 -4
- package/dist/esm/Components/Table/components/TableBody.js +18 -20
- package/dist/esm/Components/Table/components/TableGroupRow.js +1 -2
- package/dist/esm/Components/Table/components/TableHeader.js +8 -12
- package/dist/esm/Components/Table/components/TableSearch.js +1 -2
- package/dist/esm/Components/Table/components/tableRowHoverStyle.js +2 -3
- package/dist/esm/Components/Table/filters/ActiveFilters.js +5 -8
- package/dist/esm/Components/Table/filters/CompactSelect.js +4 -5
- package/dist/esm/Components/Table/filters/LeftFilterPane.js +4 -5
- package/dist/esm/Components/Table/filters/TableFilters.js +1 -2
- package/dist/esm/Components/Table/hooks/useTable.js +8 -11
- package/dist/esm/Components/Table/settings/ManageColumns.js +1 -1
- package/dist/esm/Components/Table/settings/TableSettings.js +12 -14
- package/dist/esm/Components/Tag/Tag.styles.js +9 -7
- package/dist/esm/Components/Timeline/Timeline.js +33 -46
- package/dist/esm/Components/Toaster/Toaster.js +44 -45
- package/dist/esm/Components/ToolTip/ToolTip.js +1 -6
- package/dist/esm/Components/Trail/EditableCell.js +4 -1
- package/dist/esm/Components/Trail/TrailWorks.js +4 -4
- package/dist/esm/Components/UpgradeButton/UpgradeButton.js +2 -4
- package/dist/esm/Components/UserDetails/AddUserModal.js +3 -3
- package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -2
- package/dist/esm/Components/UserDetails/DeactivateConfirmModal.js +5 -5
- package/dist/esm/Components/UserDetails/UserDetails.js +15 -17
- package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -2
- package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +3 -4
- package/dist/esm/Theme/assertPalette.js +50 -0
- package/dist/esm/Theme/chakra/Avatar.styles.js +2 -2
- package/dist/esm/Theme/chakra/Drawer.styles.js +8 -10
- package/dist/esm/Theme/chakra/Modal.styles.js +8 -10
- package/dist/esm/Theme/chakra/Slider.styles.js +7 -9
- package/dist/esm/Theme/chakra/Tabs.styles.js +13 -18
- package/dist/esm/Theme/chakra/componentStyles.js +53 -44
- package/dist/esm/Theme/chakra/paletteFromTheme.js +9 -0
- package/dist/esm/Theme/provider/PixelizeThemeProvider.js +5 -0
- package/dist/esm/Theme/testing/testPalette.js +19 -0
- package/dist/esm/Theme/tokens/brands/emerald/palette.light.js +5 -4
- package/dist/esm/Theme/tokens/brands/index.js +28 -23
- package/dist/esm/Theme/tokens/brands/lavender/palette.light.js +3 -110
- package/dist/esm/Theme/tokens/brands/meadow/palette.light.js +5 -4
- package/dist/esm/Theme/tokens/brands/neutrals.js +116 -0
- package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +5 -4
- package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +5 -4
- package/dist/esm/Theme/tokens/brands/skyline/palette.light.js +5 -4
- package/dist/esm/Theme/tokens/brands/slate/palette.light.js +6 -5
- package/dist/esm/Theme/tokens/brands/storefront/palette.light.js +5 -4
- package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +3 -2
- package/dist/esm/Theme/tokens/builders/accentText.js +8 -27
- package/dist/esm/Theme/tokens/builders/brandInk.js +103 -0
- package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +17 -9
- package/dist/esm/Theme/tokens/builders/mutedText.js +5 -0
- package/dist/esm/Theme/tokens/builders/outlineRung.js +21 -19
- package/dist/esm/Theme/tokens/builders/resolvedRungs.js +20 -0
- package/dist/esm/Theme/tokens/builders/semanticText.js +17 -0
- package/dist/esm/Theme/tokens/builders/sidebarAccent.js +23 -0
- package/dist/esm/Theme/tokens/builders/statusTone.js +3 -4
- package/dist/esm/Theme/tokens/builders/surfaceRungs.js +33 -0
- package/dist/esm/Theme/useCustomTheme.js +4 -1
- package/dist/esm/Utils/table.js +28 -36
- package/dist/esm/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -2
- package/package.json +1 -1
|
@@ -1,374 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
from: string;
|
|
4
|
-
to: string;
|
|
5
|
-
};
|
|
6
|
-
primary: {
|
|
7
|
-
50: string;
|
|
8
|
-
100: string;
|
|
9
|
-
200: string;
|
|
10
|
-
300: string;
|
|
11
|
-
400: string;
|
|
12
|
-
500: string;
|
|
13
|
-
600: string;
|
|
14
|
-
700: string;
|
|
15
|
-
800: string;
|
|
16
|
-
900: string;
|
|
17
|
-
opacity: {
|
|
18
|
-
4: string;
|
|
19
|
-
8: string;
|
|
20
|
-
16: string;
|
|
21
|
-
24: string;
|
|
22
|
-
32: string;
|
|
23
|
-
40: string;
|
|
24
|
-
48: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
secondary: {
|
|
28
|
-
50: string;
|
|
29
|
-
100: string;
|
|
30
|
-
200: string;
|
|
31
|
-
300: string;
|
|
32
|
-
400: string;
|
|
33
|
-
500: string;
|
|
34
|
-
600: string;
|
|
35
|
-
700: string;
|
|
36
|
-
800: string;
|
|
37
|
-
900: string;
|
|
38
|
-
opacity: {
|
|
39
|
-
4: string;
|
|
40
|
-
8: string;
|
|
41
|
-
16: string;
|
|
42
|
-
24: string;
|
|
43
|
-
32: string;
|
|
44
|
-
40: string;
|
|
45
|
-
48: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
tertiary: {
|
|
49
|
-
50: string;
|
|
50
|
-
100: string;
|
|
51
|
-
200: string;
|
|
52
|
-
300: string;
|
|
53
|
-
400: string;
|
|
54
|
-
500: string;
|
|
55
|
-
600: string;
|
|
56
|
-
700: string;
|
|
57
|
-
800: string;
|
|
58
|
-
900: string;
|
|
59
|
-
opacity: {
|
|
60
|
-
4: string;
|
|
61
|
-
8: string;
|
|
62
|
-
16: string;
|
|
63
|
-
24: string;
|
|
64
|
-
32: string;
|
|
65
|
-
40: string;
|
|
66
|
-
48: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
transparent: string;
|
|
70
|
-
black: string;
|
|
71
|
-
white: string;
|
|
72
|
-
semantic: {
|
|
73
|
-
success: {
|
|
74
|
-
50: string;
|
|
75
|
-
100: string;
|
|
76
|
-
200: string;
|
|
77
|
-
300: string;
|
|
78
|
-
400: string;
|
|
79
|
-
500: string;
|
|
80
|
-
600: string;
|
|
81
|
-
700: string;
|
|
82
|
-
800: string;
|
|
83
|
-
900: string;
|
|
84
|
-
};
|
|
85
|
-
error: {
|
|
86
|
-
50: string;
|
|
87
|
-
100: string;
|
|
88
|
-
200: string;
|
|
89
|
-
300: string;
|
|
90
|
-
400: string;
|
|
91
|
-
500: string;
|
|
92
|
-
600: string;
|
|
93
|
-
700: string;
|
|
94
|
-
800: string;
|
|
95
|
-
900: string;
|
|
96
|
-
};
|
|
97
|
-
warning: {
|
|
98
|
-
50: string;
|
|
99
|
-
100: string;
|
|
100
|
-
200: string;
|
|
101
|
-
300: string;
|
|
102
|
-
400: string;
|
|
103
|
-
500: string;
|
|
104
|
-
600: string;
|
|
105
|
-
700: string;
|
|
106
|
-
800: string;
|
|
107
|
-
900: string;
|
|
108
|
-
};
|
|
109
|
-
info: {
|
|
110
|
-
50: string;
|
|
111
|
-
100: string;
|
|
112
|
-
200: string;
|
|
113
|
-
300: string;
|
|
114
|
-
400: string;
|
|
115
|
-
500: string;
|
|
116
|
-
600: string;
|
|
117
|
-
700: string;
|
|
118
|
-
800: string;
|
|
119
|
-
900: string;
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
gray: {
|
|
123
|
-
50: string;
|
|
124
|
-
100: string;
|
|
125
|
-
200: string;
|
|
126
|
-
300: string;
|
|
127
|
-
400: string;
|
|
128
|
-
500: string;
|
|
129
|
-
600: string;
|
|
130
|
-
700: string;
|
|
131
|
-
800: string;
|
|
132
|
-
900: string;
|
|
133
|
-
};
|
|
134
|
-
red: {
|
|
135
|
-
50: string;
|
|
136
|
-
100: string;
|
|
137
|
-
200: string;
|
|
138
|
-
300: string;
|
|
139
|
-
400: string;
|
|
140
|
-
500: string;
|
|
141
|
-
600: string;
|
|
142
|
-
700: string;
|
|
143
|
-
800: string;
|
|
144
|
-
900: string;
|
|
145
|
-
};
|
|
146
|
-
orange: {
|
|
147
|
-
50: string;
|
|
148
|
-
100: string;
|
|
149
|
-
200: string;
|
|
150
|
-
300: string;
|
|
151
|
-
400: string;
|
|
152
|
-
500: string;
|
|
153
|
-
600: string;
|
|
154
|
-
700: string;
|
|
155
|
-
800: string;
|
|
156
|
-
900: string;
|
|
157
|
-
};
|
|
158
|
-
yellow: {
|
|
159
|
-
50: string;
|
|
160
|
-
100: string;
|
|
161
|
-
200: string;
|
|
162
|
-
300: string;
|
|
163
|
-
400: string;
|
|
164
|
-
500: string;
|
|
165
|
-
600: string;
|
|
166
|
-
700: string;
|
|
167
|
-
800: string;
|
|
168
|
-
900: string;
|
|
169
|
-
};
|
|
170
|
-
green: {
|
|
171
|
-
50: string;
|
|
172
|
-
100: string;
|
|
173
|
-
200: string;
|
|
174
|
-
300: string;
|
|
175
|
-
400: string;
|
|
176
|
-
500: string;
|
|
177
|
-
600: string;
|
|
178
|
-
700: string;
|
|
179
|
-
800: string;
|
|
180
|
-
900: string;
|
|
181
|
-
};
|
|
182
|
-
teal: {
|
|
183
|
-
50: string;
|
|
184
|
-
100: string;
|
|
185
|
-
200: string;
|
|
186
|
-
300: string;
|
|
187
|
-
400: string;
|
|
188
|
-
500: string;
|
|
189
|
-
600: string;
|
|
190
|
-
700: string;
|
|
191
|
-
800: string;
|
|
192
|
-
900: string;
|
|
193
|
-
};
|
|
194
|
-
blue: {
|
|
195
|
-
50: string;
|
|
196
|
-
100: string;
|
|
197
|
-
200: string;
|
|
198
|
-
300: string;
|
|
199
|
-
400: string;
|
|
200
|
-
500: string;
|
|
201
|
-
600: string;
|
|
202
|
-
700: string;
|
|
203
|
-
800: string;
|
|
204
|
-
900: string;
|
|
205
|
-
};
|
|
206
|
-
cyan: {
|
|
207
|
-
50: string;
|
|
208
|
-
100: string;
|
|
209
|
-
200: string;
|
|
210
|
-
300: string;
|
|
211
|
-
400: string;
|
|
212
|
-
500: string;
|
|
213
|
-
600: string;
|
|
214
|
-
700: string;
|
|
215
|
-
800: string;
|
|
216
|
-
900: string;
|
|
217
|
-
};
|
|
218
|
-
purple: {
|
|
219
|
-
50: string;
|
|
220
|
-
100: string;
|
|
221
|
-
200: string;
|
|
222
|
-
300: string;
|
|
223
|
-
400: string;
|
|
224
|
-
500: string;
|
|
225
|
-
600: string;
|
|
226
|
-
700: string;
|
|
227
|
-
800: string;
|
|
228
|
-
900: string;
|
|
229
|
-
};
|
|
230
|
-
pink: {
|
|
231
|
-
50: string;
|
|
232
|
-
100: string;
|
|
233
|
-
200: string;
|
|
234
|
-
300: string;
|
|
235
|
-
400: string;
|
|
236
|
-
500: string;
|
|
237
|
-
600: string;
|
|
238
|
-
700: string;
|
|
239
|
-
800: string;
|
|
240
|
-
900: string;
|
|
241
|
-
};
|
|
242
|
-
backgroundColor: {
|
|
243
|
-
main: string;
|
|
244
|
-
secondary: string;
|
|
245
|
-
tertiary: string;
|
|
246
|
-
quaternary: string;
|
|
247
|
-
light: string;
|
|
248
|
-
medium: string;
|
|
249
|
-
accent: string;
|
|
250
|
-
subtle: string;
|
|
251
|
-
muted: string;
|
|
252
|
-
neutral: string;
|
|
253
|
-
base: string;
|
|
254
|
-
tableHeader: string;
|
|
255
|
-
};
|
|
256
|
-
background: {
|
|
257
|
-
50: string;
|
|
258
|
-
100: string;
|
|
259
|
-
200: string;
|
|
260
|
-
300: string;
|
|
261
|
-
400: string;
|
|
262
|
-
500: string;
|
|
263
|
-
600: string;
|
|
264
|
-
700: string;
|
|
265
|
-
800: string;
|
|
266
|
-
900: string;
|
|
267
|
-
};
|
|
268
|
-
text: {
|
|
269
|
-
50: string;
|
|
270
|
-
100: string;
|
|
271
|
-
200: string;
|
|
272
|
-
300: string;
|
|
273
|
-
400: string;
|
|
274
|
-
500: string;
|
|
275
|
-
600: string;
|
|
276
|
-
700: string;
|
|
277
|
-
800: string;
|
|
278
|
-
900: string;
|
|
279
|
-
};
|
|
280
|
-
header: {
|
|
281
|
-
50: string;
|
|
282
|
-
100: string;
|
|
283
|
-
200: string;
|
|
284
|
-
300: string;
|
|
285
|
-
400: string;
|
|
286
|
-
500: string;
|
|
287
|
-
600: string;
|
|
288
|
-
700: string;
|
|
289
|
-
800: string;
|
|
290
|
-
900: string;
|
|
291
|
-
};
|
|
292
|
-
placeholder: {
|
|
293
|
-
50: string;
|
|
294
|
-
100: string;
|
|
295
|
-
200: string;
|
|
296
|
-
300: string;
|
|
297
|
-
400: string;
|
|
298
|
-
500: string;
|
|
299
|
-
600: string;
|
|
300
|
-
700: string;
|
|
301
|
-
800: string;
|
|
302
|
-
900: string;
|
|
303
|
-
};
|
|
304
|
-
boxShadow: {
|
|
305
|
-
primary: string;
|
|
306
|
-
error: string;
|
|
307
|
-
default: string;
|
|
308
|
-
};
|
|
309
|
-
sidebar: {
|
|
310
|
-
background: {
|
|
311
|
-
50: string;
|
|
312
|
-
100: string;
|
|
313
|
-
200: string;
|
|
314
|
-
300: string;
|
|
315
|
-
400: string;
|
|
316
|
-
500: string;
|
|
317
|
-
600: string;
|
|
318
|
-
700: string;
|
|
319
|
-
800: string;
|
|
320
|
-
900: string;
|
|
321
|
-
};
|
|
322
|
-
};
|
|
323
|
-
boxborder: {
|
|
324
|
-
50: string;
|
|
325
|
-
100: string;
|
|
326
|
-
200: string;
|
|
327
|
-
300: string;
|
|
328
|
-
400: string;
|
|
329
|
-
500: string;
|
|
330
|
-
600: string;
|
|
331
|
-
700: string;
|
|
332
|
-
800: string;
|
|
333
|
-
900: string;
|
|
334
|
-
};
|
|
335
|
-
border: {
|
|
336
|
-
50: string;
|
|
337
|
-
100: string;
|
|
338
|
-
200: string;
|
|
339
|
-
300: string;
|
|
340
|
-
400: string;
|
|
341
|
-
500: string;
|
|
342
|
-
600: string;
|
|
343
|
-
700: string;
|
|
344
|
-
800: string;
|
|
345
|
-
900: string;
|
|
346
|
-
};
|
|
347
|
-
table: {
|
|
348
|
-
hover: {
|
|
349
|
-
50: string;
|
|
350
|
-
100: string;
|
|
351
|
-
200: string;
|
|
352
|
-
300: string;
|
|
353
|
-
400: string;
|
|
354
|
-
500: string;
|
|
355
|
-
600: string;
|
|
356
|
-
700: string;
|
|
357
|
-
800: string;
|
|
358
|
-
900: string;
|
|
359
|
-
};
|
|
360
|
-
};
|
|
361
|
-
disabled: {
|
|
362
|
-
50: string;
|
|
363
|
-
100: string;
|
|
364
|
-
200: string;
|
|
365
|
-
300: string;
|
|
366
|
-
400: string;
|
|
367
|
-
500: string;
|
|
368
|
-
600: string;
|
|
369
|
-
700: string;
|
|
370
|
-
800: string;
|
|
371
|
-
900: string;
|
|
372
|
-
};
|
|
373
|
-
};
|
|
1
|
+
import type { BrandPaletteSource } from "../../types";
|
|
2
|
+
declare const palette: BrandPaletteSource;
|
|
374
3
|
export default palette;
|
|
@@ -18,7 +18,7 @@ declare const AA_NORMAL_TEXT = 4.5;
|
|
|
18
18
|
* sparse test theme mock, a hand-built scale) — treat a missing rung as "doesn't clear AA" and
|
|
19
19
|
* keep walking rather than crashing `contrastRatio` on `undefined`.
|
|
20
20
|
*/
|
|
21
|
-
export declare const pickAccentText: (primary: ColorScale
|
|
21
|
+
export declare const pickAccentText: (primary: ColorScale, canvas: string) => string;
|
|
22
22
|
/** Canvas assumed when no Pixelize theme is mounted. Never painted; only fed to contrast math. */
|
|
23
23
|
export declare const DEFAULT_CANVAS = "#ffffff";
|
|
24
24
|
/** Mode-stable ink absolutes, used when no theme supplies `colors.white` / `colors.black`. */
|
|
@@ -36,7 +36,7 @@ export declare const isDarkCanvas: (canvas: string) => boolean;
|
|
|
36
36
|
* failures (radiant 4.15, emerald 3.24, rosewood 3.29). Those brands now step to the nearest rung
|
|
37
37
|
* that clears AA, which changes their light pixels — the accepted cost of meeting WCAG.
|
|
38
38
|
*/
|
|
39
|
-
export declare const accentTextOnCanvas: (scale: ColorScale
|
|
39
|
+
export declare const accentTextOnCanvas: (scale: ColorScale, canvas: string) => string;
|
|
40
40
|
/**
|
|
41
41
|
* Ink for text drawn ON a filled swatch (a button/tag/badge fill), not the canvas. `white`/`black`
|
|
42
42
|
* must be the mode-stable absolutes (`theme.colors.white` / `theme.colors.black`) — NOT a
|
|
@@ -6,19 +6,11 @@ const color_1 = require("./color");
|
|
|
6
6
|
const AA_NORMAL_TEXT = 4.5;
|
|
7
7
|
exports.AA_NORMAL_TEXT = AA_NORMAL_TEXT;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* Light canvases need darker rungs; dark canvases need lighter ones. Both walk 500 -> 900 because
|
|
14
|
-
* BOTH ramps put their light end at 900: light mode runs light -> dark (so 900 is the darkest),
|
|
15
|
-
* while every dark scale runs dark -> light (so 900 is the lightest). Same direction, opposite
|
|
16
|
-
* meaning — walking 500 -> 100 for dark would step toward the canvas and land at ~1.4 contrast.
|
|
9
|
+
* Ordered nearest-to-accent first, so brand identity survives as far as contrast allows.
|
|
10
|
+
* One order serves both modes: light ramps run light -> dark and dark ramps run dark -> light,
|
|
11
|
+
* so 500 -> 900 always steps AWAY from that mode's own canvas.
|
|
17
12
|
*/
|
|
18
|
-
const SEARCH_ORDER =
|
|
19
|
-
light: [500, 600, 700, 800, 900],
|
|
20
|
-
dark: [500, 600, 700, 800, 900],
|
|
21
|
-
};
|
|
13
|
+
const SEARCH_ORDER = [500, 600, 700, 800, 900];
|
|
22
14
|
/**
|
|
23
15
|
* Pick the accent rung to use for accent-COLORED TEXT sitting on the canvas.
|
|
24
16
|
*
|
|
@@ -36,20 +28,9 @@ const SEARCH_ORDER = {
|
|
|
36
28
|
* sparse test theme mock, a hand-built scale) — treat a missing rung as "doesn't clear AA" and
|
|
37
29
|
* keep walking rather than crashing `contrastRatio` on `undefined`.
|
|
38
30
|
*/
|
|
39
|
-
const pickAccentText = (primary, canvas
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
return safeInk();
|
|
43
|
-
const order = SEARCH_ORDER[mode];
|
|
44
|
-
const found = order.find((rung) => primary[rung] != null && (0, color_1.contrastRatio)(primary[rung], canvas) >= AA_NORMAL_TEXT);
|
|
45
|
-
if (found !== undefined)
|
|
46
|
-
return primary[found];
|
|
47
|
-
for (let i = order.length - 1; i >= 0; i--) {
|
|
48
|
-
const rung = primary[order[i]];
|
|
49
|
-
if (rung != null)
|
|
50
|
-
return rung;
|
|
51
|
-
}
|
|
52
|
-
return safeInk();
|
|
31
|
+
const pickAccentText = (primary, canvas) => {
|
|
32
|
+
const found = SEARCH_ORDER.find((rung) => (0, color_1.contrastRatio)(primary[rung], canvas) >= AA_NORMAL_TEXT);
|
|
33
|
+
return primary[found !== null && found !== void 0 ? found : SEARCH_ORDER[SEARCH_ORDER.length - 1]];
|
|
53
34
|
};
|
|
54
35
|
exports.pickAccentText = pickAccentText;
|
|
55
36
|
/** Canvas assumed when no Pixelize theme is mounted. Never painted; only fed to contrast math. */
|
|
@@ -71,7 +52,7 @@ exports.isDarkCanvas = isDarkCanvas;
|
|
|
71
52
|
* failures (radiant 4.15, emerald 3.24, rosewood 3.29). Those brands now step to the nearest rung
|
|
72
53
|
* that clears AA, which changes their light pixels — the accepted cost of meeting WCAG.
|
|
73
54
|
*/
|
|
74
|
-
const accentTextOnCanvas = (scale, canvas) => (0, exports.pickAccentText)(scale, canvas
|
|
55
|
+
const accentTextOnCanvas = (scale, canvas) => (0, exports.pickAccentText)(scale, canvas);
|
|
75
56
|
exports.accentTextOnCanvas = accentTextOnCanvas;
|
|
76
57
|
/**
|
|
77
58
|
* Ink for text drawn ON a filled swatch (a button/tag/badge fill), not the canvas. `white`/`black`
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BrandScale, ColorScale } from "../types";
|
|
2
|
+
export type BrandInkRamps = {
|
|
3
|
+
secondary: BrandScale;
|
|
4
|
+
tertiary: BrandScale;
|
|
5
|
+
text: ColorScale;
|
|
6
|
+
header: ColorScale;
|
|
7
|
+
placeholder: ColorScale;
|
|
8
|
+
disabled: ColorScale;
|
|
9
|
+
};
|
|
10
|
+
/** Brand-hued ink ramps at lavender's verified luminances, so contrast carries over. */
|
|
11
|
+
export declare function buildBrandInk(primary500: string): BrandInkRamps;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildBrandInk = buildBrandInk;
|
|
4
|
+
const buildBrandTokens_1 = require("./buildBrandTokens");
|
|
5
|
+
const color_1 = require("./color");
|
|
6
|
+
const RUNGS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
|
|
7
|
+
// Lavender's primary saturation. Each brand's ramps scale away from it.
|
|
8
|
+
const REFERENCE_SATURATION = 55.5;
|
|
9
|
+
const SECONDARY = {
|
|
10
|
+
50: [39.4, 0.8231],
|
|
11
|
+
100: [41.0, 0.61132],
|
|
12
|
+
200: [37.7, 0.39479],
|
|
13
|
+
300: [27.4, 0.18614],
|
|
14
|
+
400: [28.4, 0.10269],
|
|
15
|
+
500: [52.4, 0.00831],
|
|
16
|
+
600: [55.1, 0.00573],
|
|
17
|
+
700: [55.6, 0.00386],
|
|
18
|
+
800: [60.0, 0.00245],
|
|
19
|
+
900: [57.1, 0.00141],
|
|
20
|
+
};
|
|
21
|
+
const TEXT = {
|
|
22
|
+
50: [25.9, 0.86267],
|
|
23
|
+
100: [32.4, 0.63853],
|
|
24
|
+
200: [32.7, 0.48344],
|
|
25
|
+
300: [30.6, 0.30607],
|
|
26
|
+
400: [29.2, 0.21515],
|
|
27
|
+
500: [26.3, 0.10787],
|
|
28
|
+
600: [26.6, 0.08786],
|
|
29
|
+
700: [26.7, 0.05281],
|
|
30
|
+
800: [27.4, 0.03145],
|
|
31
|
+
900: [29.0, 0.01826],
|
|
32
|
+
};
|
|
33
|
+
const HEADER = {
|
|
34
|
+
50: [31.3, 0.83382],
|
|
35
|
+
100: [31.0, 0.59779],
|
|
36
|
+
200: [30.6, 0.44729],
|
|
37
|
+
300: [29.3, 0.27622],
|
|
38
|
+
400: [30.0, 0.19238],
|
|
39
|
+
500: [29.9, 0.10467],
|
|
40
|
+
600: [29.9, 0.08682],
|
|
41
|
+
700: [29.7, 0.05281],
|
|
42
|
+
800: [29.1, 0.0319],
|
|
43
|
+
900: [29.9, 0.01915],
|
|
44
|
+
};
|
|
45
|
+
const PLACEHOLDER = {
|
|
46
|
+
50: [30.4, 0.87913],
|
|
47
|
+
100: [35.4, 0.67128],
|
|
48
|
+
200: [36.1, 0.53513],
|
|
49
|
+
300: [34.7, 0.37333],
|
|
50
|
+
400: [31.4, 0.30462],
|
|
51
|
+
500: [28.2, 0.19307],
|
|
52
|
+
600: [22.8, 0.15818],
|
|
53
|
+
700: [22.0, 0.09196],
|
|
54
|
+
800: [21.5, 0.05448],
|
|
55
|
+
900: [22.3, 0.03206],
|
|
56
|
+
};
|
|
57
|
+
const DISABLED = {
|
|
58
|
+
50: [33.3, 0.90353],
|
|
59
|
+
100: [38.9, 0.80618],
|
|
60
|
+
200: [40.7, 0.71546],
|
|
61
|
+
300: [41.0, 0.60545],
|
|
62
|
+
400: [39.6, 0.53328],
|
|
63
|
+
500: [40.5, 0.43688],
|
|
64
|
+
600: [28.2, 0.35566],
|
|
65
|
+
700: [13.4, 0.20289],
|
|
66
|
+
800: [11.4, 0.1171],
|
|
67
|
+
900: [11.2, 0.06724],
|
|
68
|
+
};
|
|
69
|
+
// Lightness is monotonic in luminance for a fixed hue/saturation, so bisection converges.
|
|
70
|
+
const atLuminance = (anchor, saturation, target) => {
|
|
71
|
+
let low = 0;
|
|
72
|
+
let high = 100;
|
|
73
|
+
for (let i = 0; i < 30; i += 1) {
|
|
74
|
+
const mid = (low + high) / 2;
|
|
75
|
+
if ((0, color_1.relativeLuminance)((0, color_1.withLightness)(anchor, mid, saturation)) < target)
|
|
76
|
+
low = mid;
|
|
77
|
+
else
|
|
78
|
+
high = mid;
|
|
79
|
+
}
|
|
80
|
+
return (0, color_1.withLightness)(anchor, (low + high) / 2, saturation);
|
|
81
|
+
};
|
|
82
|
+
const ramp = (anchor, profile) => {
|
|
83
|
+
const ratio = (0, color_1.hexToHsl)(anchor).s / REFERENCE_SATURATION;
|
|
84
|
+
const scale = {};
|
|
85
|
+
for (const rung of RUNGS) {
|
|
86
|
+
const [saturation, luminance] = profile[rung];
|
|
87
|
+
scale[rung] = atLuminance(anchor, Math.min(100, saturation * ratio), luminance);
|
|
88
|
+
}
|
|
89
|
+
return scale;
|
|
90
|
+
};
|
|
91
|
+
const brandRamp = (anchor, profile) => {
|
|
92
|
+
const scale = ramp(anchor, profile);
|
|
93
|
+
return { ...scale, opacity: (0, buildBrandTokens_1.buildPrimaryOpacity)(scale[500]) };
|
|
94
|
+
};
|
|
95
|
+
/** Brand-hued ink ramps at lavender's verified luminances, so contrast carries over. */
|
|
96
|
+
function buildBrandInk(primary500) {
|
|
97
|
+
const secondary = brandRamp(primary500, SECONDARY);
|
|
98
|
+
return {
|
|
99
|
+
secondary,
|
|
100
|
+
tertiary: { ...secondary },
|
|
101
|
+
text: ramp(primary500, TEXT),
|
|
102
|
+
header: ramp(primary500, HEADER),
|
|
103
|
+
placeholder: ramp(primary500, PLACEHOLDER),
|
|
104
|
+
disabled: ramp(primary500, DISABLED),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ColorScale, PaletteProps } from "../types";
|
|
1
|
+
import type { BrandPaletteSource, ColorScale, PaletteProps } from "../types";
|
|
2
2
|
/** Mirrors index roles: 50↔900, 100↔800, 200↔700, 300↔600, 400↔500. */
|
|
3
3
|
export declare const reverseScale: (scale: ColorScale) => ColorScale;
|
|
4
4
|
/** Shifts a ramp one step lighter, keeping hue. Used for brand + semantic accents. */
|
|
@@ -18,5 +18,5 @@ export declare const shiftLighter: (scale: ColorScale) => ColorScale;
|
|
|
18
18
|
export declare const accentLightnessDelta: (accent500: string, white: string) => number;
|
|
19
19
|
/** Raises every rung by the same lightness delta, preserving the ramp's shape and hue. */
|
|
20
20
|
export declare const liftScale: (scale: ColorScale, delta: number) => ColorScale;
|
|
21
|
-
export declare function buildDarkPalette(light:
|
|
21
|
+
export declare function buildDarkPalette(light: BrandPaletteSource): PaletteProps;
|
|
22
22
|
export default buildDarkPalette;
|
|
@@ -5,6 +5,9 @@ exports.buildDarkPalette = buildDarkPalette;
|
|
|
5
5
|
const buildBrandTokens_1 = require("./buildBrandTokens");
|
|
6
6
|
const color_1 = require("./color");
|
|
7
7
|
const accentText_1 = require("./accentText");
|
|
8
|
+
const sidebarAccent_1 = require("./sidebarAccent");
|
|
9
|
+
const mutedText_1 = require("./mutedText");
|
|
10
|
+
const semanticText_1 = require("./semanticText");
|
|
8
11
|
/**
|
|
9
12
|
* Derives a brand's dark palette from its light palette.
|
|
10
13
|
*
|
|
@@ -243,6 +246,12 @@ function buildDarkPalette(light) {
|
|
|
243
246
|
]));
|
|
244
247
|
const white = light.white;
|
|
245
248
|
const primary = liftBrand(light.primary, white);
|
|
249
|
+
const semantic = {
|
|
250
|
+
success: liftAccent(light.semantic.success, white),
|
|
251
|
+
error: liftAccent(light.semantic.error, white),
|
|
252
|
+
warning: liftAccent(light.semantic.warning, white),
|
|
253
|
+
info: liftAccent(light.semantic.info, white),
|
|
254
|
+
};
|
|
246
255
|
return {
|
|
247
256
|
...light,
|
|
248
257
|
// Brand identity: hue preserved, accent lifted as far as the white label allows.
|
|
@@ -250,12 +259,7 @@ function buildDarkPalette(light) {
|
|
|
250
259
|
secondary: liftBrand(light.secondary, white),
|
|
251
260
|
tertiary: liftBrand(light.tertiary, white),
|
|
252
261
|
gradient: light.gradient,
|
|
253
|
-
semantic
|
|
254
|
-
success: liftAccent(light.semantic.success, white),
|
|
255
|
-
error: liftAccent(light.semantic.error, white),
|
|
256
|
-
warning: liftAccent(light.semantic.warning, white),
|
|
257
|
-
info: liftAccent(light.semantic.info, white),
|
|
258
|
-
},
|
|
262
|
+
semantic,
|
|
259
263
|
// `white` stays white on purpose: it is the label color on filled buttons.
|
|
260
264
|
transparent: light.transparent,
|
|
261
265
|
black: light.black,
|
|
@@ -284,9 +288,13 @@ function buildDarkPalette(light) {
|
|
|
284
288
|
disabled: fromTargets(hueSource, DISABLED_TARGETS, DISABLED_SAT),
|
|
285
289
|
// Derived from the LIFTED accent against the dark canvas: the lift stops at the white-label
|
|
286
290
|
// floor (~4.55), which leaves primary[500] short of AA as text, so text needs its own rung.
|
|
287
|
-
accentText: (0, accentText_1.pickAccentText)(primary, namedSurfaces.main
|
|
291
|
+
accentText: (0, accentText_1.pickAccentText)(primary, namedSurfaces.main),
|
|
292
|
+
textMuted: (0, mutedText_1.buildMutedText)(fromTargets(hueSource, TEXT_TARGETS, TEXT_SAT), namedSurfaces.main),
|
|
293
|
+
semanticText: (0, semanticText_1.buildSemanticText)(semantic, namedSurfaces.main),
|
|
294
|
+
onPrimary: (0, accentText_1.onFilled)(primary[500], light.white, light.black),
|
|
295
|
+
onSemantic: (0, semanticText_1.buildOnSemantic)(semantic, light.white, light.black),
|
|
288
296
|
// Sidebar is already near-black in light mode, so it needs no inversion.
|
|
289
|
-
sidebar: light
|
|
297
|
+
sidebar: (0, sidebarAccent_1.withSidebarTokens)(light),
|
|
290
298
|
boxShadow: {
|
|
291
299
|
primary: (0, buildBrandTokens_1.buildPrimaryShadowTint)(primary[500]),
|
|
292
300
|
error: light.boxShadow.error,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ColorScale } from "../types";
|
|
2
|
+
/** WCAG 1.4.3 — muted is still body text. */
|
|
3
|
+
export declare const AA_NORMAL_TEXT = 4.5;
|
|
4
|
+
/** Seeded from the ramp's muted rung so brand tint survives, then lifted until it clears AA. */
|
|
5
|
+
export declare const buildMutedText: (text: ColorScale, canvas: string) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildMutedText = exports.AA_NORMAL_TEXT = void 0;
|
|
4
|
+
const outlineRung_1 = require("./outlineRung");
|
|
5
|
+
/** WCAG 1.4.3 — muted is still body text. */
|
|
6
|
+
exports.AA_NORMAL_TEXT = 4.5;
|
|
7
|
+
/** Seeded from the ramp's muted rung so brand tint survives, then lifted until it clears AA. */
|
|
8
|
+
const buildMutedText = (text, canvas) => (0, outlineRung_1.liftToContrast)(text[400], canvas, exports.AA_NORMAL_TEXT);
|
|
9
|
+
exports.buildMutedText = buildMutedText;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PaletteProps
|
|
1
|
+
import type { PaletteProps } from "../types";
|
|
2
2
|
/**
|
|
3
3
|
* The floor a hover/active state's step off its own resting surface must clear to be seen at
|
|
4
4
|
* all — same value the SideBar ladder, Accordion, and NavigationBar hover states are held to.
|
|
@@ -8,11 +8,12 @@ export declare const MIN_PERCEPTIBLE_STEP = 1.15;
|
|
|
8
8
|
/** WCAG 1.4.11 — a control outline is a UI component boundary, held to 3:1. */
|
|
9
9
|
export declare const AA_NON_TEXT = 3;
|
|
10
10
|
/**
|
|
11
|
-
* Walks a hex toward `target` contrast against `backdrop`, keeping
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* Walks a hex toward `target` contrast against `backdrop`, keeping hue and saturation.
|
|
12
|
+
* Direction is DERIVED from the backdrop, never passed: a mode argument here was redundant
|
|
13
|
+
* with the backdrop in every call site, and a redundant argument is one that can be wrong.
|
|
14
|
+
* Tries the far side first, falls back to the near side, and stops at the first passing step.
|
|
14
15
|
*/
|
|
15
|
-
export declare function liftToContrast(hex: string, backdrop: string,
|
|
16
|
+
export declare function liftToContrast(hex: string, backdrop: string, target?: number): string;
|
|
16
17
|
/**
|
|
17
18
|
* `boxborder[500]` is the rung every control outline reads (Checkbox, SearchSelect, the date
|
|
18
19
|
* pickers, the editor's inputs). It was authored as a decorative value — measured 1.30-2.56:1
|
|
@@ -22,7 +23,7 @@ export declare function liftToContrast(hex: string, backdrop: string, mode: Reso
|
|
|
22
23
|
* `border[*]` is deliberately untouched — that ramp draws table gridlines, which are decorative
|
|
23
24
|
* and outside 1.4.11.
|
|
24
25
|
*/
|
|
25
|
-
export declare function withOutlineRung(palette: PaletteProps
|
|
26
|
+
export declare function withOutlineRung(palette: PaletteProps): PaletteProps;
|
|
26
27
|
/**
|
|
27
28
|
* A hover/active tint resolved against the surface it actually sits on, guaranteed to clear
|
|
28
29
|
* `MIN_PERCEPTIBLE_STEP`. Written for the recurring shape found across NavigationBar, UserDetails
|