pixelize-design-library 2.4.2-beta.0 → 2.4.2-beta.10
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 +7 -12
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +12 -13
- package/dist/Components/Checkbox/Checkbox.js +1 -1
- package/dist/Components/Checkbox/Checkbox.styles.js +2 -0
- 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 +3 -4
- 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 +19 -33
- package/dist/Components/Editor/Editor.js +10 -13
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +3 -3
- 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 +15 -16
- package/dist/Components/InputTextArea/InputTextArea.d.ts +1 -1
- package/dist/Components/InputTextArea/InputTextArea.style.js +14 -14
- 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 +15 -62
- package/dist/Components/LazyWrapper/LazyWrapper.js +1 -1
- package/dist/Components/LimitReachedModal/LimitReachedModal.js +5 -18
- 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 +7 -9
- package/dist/Components/Notification/Notification.js +17 -15
- package/dist/Components/NumberInput/NumberInput.styles.js +14 -14
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +7 -8
- 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/PinInput/PinInput.js +1 -1
- package/dist/Components/PinInputs/PinInputs.js +7 -14
- package/dist/Components/PlanPill/PlanPill.js +8 -11
- package/dist/Components/PlanPill/planPillGradient.d.ts +21 -14
- package/dist/Components/PlanPill/planPillGradient.js +33 -16
- 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/RadioButton/RadioButton.js +1 -1
- 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/ScrollbarBox/ScrollbarBox.d.ts +13 -0
- package/dist/Components/ScrollbarBox/ScrollbarBox.js +11 -0
- package/dist/Components/SearchSelect/SearchSelect.js +26 -28
- package/dist/Components/Select/Select.styles.js +34 -37
- package/dist/Components/SelectSearch/SelectSearch.js +10 -10
- package/dist/Components/SelectV2/SelectV2.js +8 -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/StageProgress.js +2 -9
- package/dist/Components/StageProgress/StageProgressProps.js +9 -13
- package/dist/Components/Table/Table.js +19 -30
- 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 -24
- 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 +4 -18
- package/dist/Components/Table/settings/TableSettings.js +13 -21
- 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 +4 -6
- 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/Constants/Sidebar.js +3 -2
- 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/Menu.styles.d.ts +9 -6
- package/dist/Theme/chakra/Menu.styles.js +11 -5
- 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 +9 -6
- package/dist/Theme/chakra/Popover.styles.js +11 -6
- package/dist/Theme/chakra/Slider.styles.d.ts +1 -1
- package/dist/Theme/chakra/Slider.styles.js +7 -9
- package/dist/Theme/chakra/Switch.styles.d.ts +1 -1
- package/dist/Theme/chakra/Switch.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 +69 -30
- package/dist/Theme/chakra/componentStyles.js +52 -43
- package/dist/Theme/chakra/createBrandTheme.js +3 -16
- package/dist/Theme/chakra/paletteFromTheme.d.ts +10 -0
- package/dist/Theme/chakra/paletteFromTheme.js +14 -0
- package/dist/Theme/provider/PixelizeThemeProvider.js +23 -20
- package/dist/Theme/provider/ThemeSwitcher.js +13 -20
- 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 +5 -116
- 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 +7 -13
- 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/chartColorsFromTheme.js +1 -1
- package/dist/Theme/tokens/builders/gradientInk.d.ts +22 -0
- package/dist/Theme/tokens/builders/gradientInk.js +28 -0
- package/dist/Theme/tokens/builders/index.d.ts +3 -0
- package/dist/Theme/tokens/builders/index.js +3 -0
- 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 +39 -9
- package/dist/Theme/tokens/builders/outlineRung.js +92 -21
- package/dist/Theme/tokens/builders/placeholderInk.d.ts +19 -0
- package/dist/Theme/tokens/builders/placeholderInk.js +35 -0
- package/dist/Theme/tokens/builders/resolvedRungs.d.ts +11 -0
- package/dist/Theme/tokens/builders/resolvedRungs.js +30 -0
- package/dist/Theme/tokens/builders/scrollbar.d.ts +12 -0
- package/dist/Theme/tokens/builders/scrollbar.js +57 -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 +10 -0
- package/dist/Theme/tokens/builders/surfaceRungs.js +54 -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 +8 -13
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +12 -13
- package/dist/esm/Components/Checkbox/Checkbox.js +1 -1
- package/dist/esm/Components/Checkbox/Checkbox.styles.js +2 -0
- 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 +3 -4
- 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 +19 -33
- package/dist/esm/Components/Editor/Editor.js +11 -14
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +3 -3
- 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 +15 -16
- package/dist/esm/Components/InputTextArea/InputTextArea.style.js +14 -14
- 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 +15 -62
- package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -1
- package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +5 -18
- 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 +7 -9
- package/dist/esm/Components/Notification/Notification.js +18 -16
- package/dist/esm/Components/NumberInput/NumberInput.styles.js +14 -14
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +8 -9
- 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/PinInput/PinInput.js +1 -1
- package/dist/esm/Components/PinInputs/PinInputs.js +8 -15
- package/dist/esm/Components/PlanPill/PlanPill.js +9 -12
- package/dist/esm/Components/PlanPill/planPillGradient.js +27 -15
- 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/RadioButton/RadioButton.js +1 -1
- 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/ScrollbarBox/ScrollbarBox.js +9 -0
- package/dist/esm/Components/SearchSelect/SearchSelect.js +26 -28
- package/dist/esm/Components/Select/Select.styles.js +34 -37
- package/dist/esm/Components/SelectSearch/SelectSearch.js +10 -10
- package/dist/esm/Components/SelectV2/SelectV2.js +8 -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/StageProgress.js +2 -9
- package/dist/esm/Components/StageProgress/StageProgressProps.js +9 -13
- package/dist/esm/Components/Table/Table.js +19 -30
- 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 -24
- 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 +4 -18
- package/dist/esm/Components/Table/settings/TableSettings.js +13 -21
- 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 +4 -6
- 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/Constants/Sidebar.js +3 -2
- 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/Menu.styles.js +11 -5
- package/dist/esm/Theme/chakra/Modal.styles.js +8 -10
- package/dist/esm/Theme/chakra/Popover.styles.js +11 -6
- package/dist/esm/Theme/chakra/Slider.styles.js +7 -9
- package/dist/esm/Theme/chakra/Switch.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/createBrandTheme.js +3 -16
- package/dist/esm/Theme/chakra/paletteFromTheme.js +9 -0
- package/dist/esm/Theme/provider/PixelizeThemeProvider.js +23 -20
- package/dist/esm/Theme/provider/ThemeSwitcher.js +13 -20
- 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 +5 -116
- 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 +7 -10
- 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/chartColorsFromTheme.js +1 -1
- package/dist/esm/Theme/tokens/builders/gradientInk.js +22 -0
- package/dist/esm/Theme/tokens/builders/index.js +3 -0
- package/dist/esm/Theme/tokens/builders/mutedText.js +5 -0
- package/dist/esm/Theme/tokens/builders/outlineRung.js +89 -21
- package/dist/esm/Theme/tokens/builders/placeholderInk.js +29 -0
- package/dist/esm/Theme/tokens/builders/resolvedRungs.js +25 -0
- package/dist/esm/Theme/tokens/builders/scrollbar.js +52 -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 +48 -0
- package/dist/esm/Theme/useCustomTheme.js +4 -1
- package/dist/esm/Utils/table.js +28 -36
- package/dist/esm/index.js +6 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +24 -3
- package/package.json +4 -2
|
@@ -30,12 +30,10 @@ export type OpacityScale = {
|
|
|
30
30
|
export type BrandScale = ColorScale & {
|
|
31
31
|
opacity: OpacityScale;
|
|
32
32
|
};
|
|
33
|
-
export type
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
info: ColorScale;
|
|
38
|
-
};
|
|
33
|
+
export type SemanticTone = "success" | "error" | "warning" | "info";
|
|
34
|
+
export type SemanticColors = Record<SemanticTone, ColorScale>;
|
|
35
|
+
/** Each tone as TEXT on the canvas, resolved to 4.5:1. The `[500]` rung is a fill, never ink. */
|
|
36
|
+
export type SemanticTextTokens = Record<SemanticTone, string>;
|
|
39
37
|
/** Named (non-numeric) surface keys. Elevation order inverts between light and dark. */
|
|
40
38
|
export type NamedSurfaces = {
|
|
41
39
|
main: string;
|
|
@@ -51,6 +49,22 @@ export type NamedSurfaces = {
|
|
|
51
49
|
base: string;
|
|
52
50
|
tableHeader: string;
|
|
53
51
|
};
|
|
52
|
+
/** The permanently-dark rail. Accents are derived from the light primary, never hand-written. */
|
|
53
|
+
export type SidebarTokens = {
|
|
54
|
+
background: ColorScale;
|
|
55
|
+
/** Icon on the active surface, resolved to 3:1. */
|
|
56
|
+
activeIcon: string;
|
|
57
|
+
/** Label on the active surface, resolved to 4.5:1. */
|
|
58
|
+
activeLabel: string;
|
|
59
|
+
/** Flyout/menu surface raised off the rail. `background[200]` is a mid-grey on 6 of 9 brands. */
|
|
60
|
+
elevated: string;
|
|
61
|
+
/** Secondary icon on the rail, resolved to 3:1. Replaces an opacity guess at the call site. */
|
|
62
|
+
mutedIcon: string;
|
|
63
|
+
/** Secondary label on the rail, resolved to 4.5:1. `textMuted` is canvas-relative, not rail. */
|
|
64
|
+
mutedLabel: string;
|
|
65
|
+
/** Status ink resolved against the RAIL. `semanticText` is canvas-relative, not rail. */
|
|
66
|
+
semanticText: SemanticTextTokens;
|
|
67
|
+
};
|
|
54
68
|
export type BoxShadowTokens = {
|
|
55
69
|
primary: string;
|
|
56
70
|
error: string;
|
|
@@ -88,9 +102,7 @@ export type PaletteProps = {
|
|
|
88
102
|
header: ColorScale;
|
|
89
103
|
placeholder: ColorScale;
|
|
90
104
|
boxShadow: BoxShadowTokens;
|
|
91
|
-
sidebar:
|
|
92
|
-
background: ColorScale;
|
|
93
|
-
};
|
|
105
|
+
sidebar: SidebarTokens;
|
|
94
106
|
boxborder: ColorScale;
|
|
95
107
|
border: ColorScale;
|
|
96
108
|
table: {
|
|
@@ -101,12 +113,28 @@ export type PaletteProps = {
|
|
|
101
113
|
* Accent color for accent-COLORED TEXT on the canvas. Distinct from `primary[500]`, which
|
|
102
114
|
* must stay dark enough to carry a white label on a filled button and therefore cannot also
|
|
103
115
|
* be light enough to read as text on a dark canvas. Derived per brand (see `pickAccentText`).
|
|
104
|
-
*
|
|
105
|
-
* Optional so that a consumer who hand-builds a palette object against this type keeps
|
|
106
|
-
* compiling; every shipped brand palette always populates it.
|
|
107
116
|
*/
|
|
108
|
-
accentText
|
|
117
|
+
accentText: string;
|
|
118
|
+
semanticText: SemanticTextTokens;
|
|
119
|
+
/** Secondary text on the canvas, resolved to 4.5:1 in both modes. */
|
|
120
|
+
textMuted: string;
|
|
121
|
+
/** Ink for a `primary[500]`-FILLED surface — never an ink on the canvas. */
|
|
122
|
+
onPrimary: string;
|
|
123
|
+
/** Ink for a `semantic[tone][500]`-FILLED surface — never an ink on the canvas. */
|
|
124
|
+
onSemantic: SemanticTextTokens;
|
|
125
|
+
};
|
|
126
|
+
/** What a brand writes by hand; every token required, so a gap is a compile error. */
|
|
127
|
+
/** Derived tokens are excluded — `finalizeLightPalette` resolves them per brand. */
|
|
128
|
+
export type BrandPaletteSource = Omit<PaletteProps, "accentText" | "textMuted" | "semanticText" | "sidebar" | "onPrimary" | "onSemantic"> & {
|
|
129
|
+
sidebar: {
|
|
130
|
+
background: ColorScale;
|
|
131
|
+
};
|
|
109
132
|
};
|
|
133
|
+
/** Utility scales carrying no brand identity. The only tokens a brand may inherit. */
|
|
134
|
+
export type NeutralPaletteKey = "transparent" | "black" | "white" | "semantic" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink";
|
|
135
|
+
export type NeutralPaletteTokens = Pick<BrandPaletteSource, NeutralPaletteKey>;
|
|
136
|
+
/** Everything a brand must state itself — never by spreading another brand. */
|
|
137
|
+
export type BrandIdentityTokens = Omit<BrandPaletteSource, NeutralPaletteKey>;
|
|
110
138
|
/** Brand identities shipped by the library. */
|
|
111
139
|
export type ThemeName = "lavender" | "meadow" | "radiant" | "skyline" | "slate" | "emerald" | "rosewood" | "storefront" | "zinc";
|
|
112
140
|
/** User-selectable color mode. `system` follows the OS setting. */
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useCustomTheme = void 0;
|
|
4
4
|
const react_1 = require("@chakra-ui/react");
|
|
5
|
+
const assertPalette_1 = require("./assertPalette");
|
|
5
6
|
const useCustomTheme = () => {
|
|
6
|
-
|
|
7
|
+
const theme = (0, react_1.useTheme)();
|
|
8
|
+
(0, assertPalette_1.assertPixelizePalette)(theme);
|
|
9
|
+
return theme;
|
|
7
10
|
};
|
|
8
11
|
exports.useCustomTheme = useCustomTheme;
|
package/dist/Utils/table.d.ts
CHANGED
|
@@ -18,13 +18,7 @@ export type TablePaletteColor = {
|
|
|
18
18
|
};
|
|
19
19
|
/** Deterministic, theme-aware color palette for groups + status pills. */
|
|
20
20
|
export declare function buildTablePalette(theme: CustomThemeProps): TablePaletteColor[];
|
|
21
|
-
/**
|
|
22
|
-
* Pick a deterministic palette color for a value, with optional override hex.
|
|
23
|
-
*
|
|
24
|
-
* `theme` is optional so existing callers that don't have it keep compiling — when omitted,
|
|
25
|
-
* `onSolid` falls back to the mode-stable absolutes ("#FFFFFF"/"#000000", same value
|
|
26
|
-
* `theme.colors.white`/`black` resolve to for every brand) instead of going undefined.
|
|
27
|
-
*/
|
|
21
|
+
/** Pick a deterministic palette color for a value, with optional consumer override hex. */
|
|
28
22
|
export declare function pickTableColor(value: string | number, palette: TablePaletteColor[], override?: string, theme?: CustomThemeProps): TablePaletteColor;
|
|
29
23
|
export type TableGroup = {
|
|
30
24
|
value: string | number;
|
package/dist/Utils/table.js
CHANGED
|
@@ -45,6 +45,7 @@ exports.useDebounce = useDebounce;
|
|
|
45
45
|
exports.globalSearchFilter = globalSearchFilter;
|
|
46
46
|
const react_1 = __importStar(require("react"));
|
|
47
47
|
const accentText_1 = require("../Theme/tokens/builders/accentText");
|
|
48
|
+
const statusTone_1 = require("../Theme/tokens/builders/statusTone");
|
|
48
49
|
// Built once, not per comparison: sorting 10k rows runs this ~130k times, and constructing a
|
|
49
50
|
// collator is orders of magnitude dearer than using one.
|
|
50
51
|
const COLLATOR = new Intl.Collator(undefined, {
|
|
@@ -98,33 +99,31 @@ function SortMultiColumnData(data, sortConfig) {
|
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
const withAlpha = (hex, aa) => /^#([0-9a-fA-F]{6})$/.test(hex) ? `${hex}${aa}` : hex;
|
|
101
|
-
const FALLBACK_SOLID = "#8B3FC8";
|
|
102
102
|
/** Deterministic, theme-aware color palette for groups + status pills. */
|
|
103
103
|
function buildTablePalette(theme) {
|
|
104
|
-
|
|
105
|
-
const
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
(_p = c.orange) === null || _p === void 0 ? void 0 : _p[500],
|
|
118
|
-
(_q = c.purple) === null || _q === void 0 ? void 0 : _q[500],
|
|
104
|
+
const c = theme.colors;
|
|
105
|
+
const mode = (0, accentText_1.isDarkCanvas)(c.backgroundColor.main) ? "dark" : "light";
|
|
106
|
+
const scales = [
|
|
107
|
+
c.primary,
|
|
108
|
+
c.semantic.success,
|
|
109
|
+
c.semantic.info,
|
|
110
|
+
c.semantic.warning,
|
|
111
|
+
c.teal,
|
|
112
|
+
c.blue,
|
|
113
|
+
c.pink,
|
|
114
|
+
c.semantic.error,
|
|
115
|
+
c.orange,
|
|
116
|
+
c.purple,
|
|
119
117
|
];
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
118
|
+
return scales.map((scale) => {
|
|
119
|
+
const tone = (0, statusTone_1.resolveStatusTone)(scale, mode);
|
|
120
|
+
return {
|
|
121
|
+
solid: scale[500],
|
|
122
|
+
soft: tone.bg,
|
|
123
|
+
text: tone.fg,
|
|
124
|
+
onSolid: (0, accentText_1.onFilled)(scale[500], c.white, c.black),
|
|
125
|
+
};
|
|
126
|
+
});
|
|
128
127
|
}
|
|
129
128
|
const hashKey = (value) => {
|
|
130
129
|
const s = String(value);
|
|
@@ -133,22 +132,15 @@ const hashKey = (value) => {
|
|
|
133
132
|
h = (h * 31 + s.charCodeAt(i)) >>> 0;
|
|
134
133
|
return h;
|
|
135
134
|
};
|
|
136
|
-
/**
|
|
137
|
-
* Pick a deterministic palette color for a value, with optional override hex.
|
|
138
|
-
*
|
|
139
|
-
* `theme` is optional so existing callers that don't have it keep compiling — when omitted,
|
|
140
|
-
* `onSolid` falls back to the mode-stable absolutes ("#FFFFFF"/"#000000", same value
|
|
141
|
-
* `theme.colors.white`/`black` resolve to for every brand) instead of going undefined.
|
|
142
|
-
*/
|
|
135
|
+
/** Pick a deterministic palette color for a value, with optional consumer override hex. */
|
|
143
136
|
function pickTableColor(value, palette, override, theme) {
|
|
144
|
-
|
|
145
|
-
const
|
|
146
|
-
const black = ((_b = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _b === void 0 ? void 0 : _b.black) || "#000000";
|
|
137
|
+
const white = theme ? theme.colors.white : accentText_1.DEFAULT_WHITE;
|
|
138
|
+
const black = theme ? theme.colors.black : accentText_1.DEFAULT_BLACK;
|
|
147
139
|
if (override) {
|
|
148
140
|
return { solid: override, soft: withAlpha(override, "22"), text: override, onSolid: (0, accentText_1.onFilled)(override, white, black) };
|
|
149
141
|
}
|
|
150
142
|
if (!palette.length) {
|
|
151
|
-
|
|
143
|
+
throw new Error("pickTableColor: empty palette — build it with buildTablePalette(theme).");
|
|
152
144
|
}
|
|
153
145
|
return palette[hashKey(value) % palette.length];
|
|
154
146
|
}
|
|
@@ -3,31 +3,29 @@ import { useMemo } from "react";
|
|
|
3
3
|
import { Accordion as ChakraAccordian, AccordionItem, AccordionButton, AccordionPanel, Box, Flex, } from "@chakra-ui/react";
|
|
4
4
|
import { ChevronDown } from "lucide-react";
|
|
5
5
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
6
|
-
import {
|
|
6
|
+
import { isDarkCanvas } from "../../Theme/tokens/builders/accentText.js";
|
|
7
7
|
import { getAccordionHoverColors } from "./accordionColors.js";
|
|
8
8
|
const Accordion = ({ allowMultiple, allowToggle, index, onChange, reduceMotion, items, ...rest }) => {
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const bodyColor = (_l = (_k = c.text) === null || _k === void 0 ? void 0 : _k[600]) !== null && _l !== void 0 ? _l : (_m = c.gray) === null || _m === void 0 ? void 0 : _m[600];
|
|
16
|
-
const { expandedBg, softHover } = useMemo(() => { var _a; return getAccordionHoverColors((_a = theme.colors) !== null && _a !== void 0 ? _a : {}, isDark); }, [theme.colors, isDark]);
|
|
9
|
+
const { colors } = useCustomTheme();
|
|
10
|
+
const isDark = isDarkCanvas(colors.backgroundColor.main);
|
|
11
|
+
const border = colors.boxborder[200];
|
|
12
|
+
const headingColor = colors.text[800];
|
|
13
|
+
const bodyColor = colors.text[600];
|
|
14
|
+
const { expandedBg, softHover } = useMemo(() => getAccordionHoverColors(colors, isDark), [colors, isDark]);
|
|
17
15
|
return (_jsx(ChakraAccordian, { allowMultiple: allowMultiple, allowToggle: allowToggle, index: index, onChange: onChange, reduceMotion: reduceMotion, ...rest, children: items.map((item, idx) => {
|
|
18
|
-
var _a
|
|
19
|
-
return (_jsx(AccordionItem, { border: `0.063rem solid ${border}`, borderRadius: "xl", bg:
|
|
20
|
-
var _a, _b, _c
|
|
16
|
+
var _a;
|
|
17
|
+
return (_jsx(AccordionItem, { border: `0.063rem solid ${border}`, borderRadius: "xl", bg: colors.background[50], mb: 3, overflow: "hidden", transition: "border-color 0.15s ease, box-shadow 0.15s ease", _last: { mb: 0 }, _hover: { borderColor: colors.boxborder[200] }, ...item.itemProps, sx: (_a = item.customStyles) === null || _a === void 0 ? void 0 : _a.itemStyle, children: ({ isExpanded }) => {
|
|
18
|
+
var _a, _b, _c;
|
|
21
19
|
return (_jsxs(_Fragment, { children: [_jsx("h2", { children: _jsxs(AccordionButton, { px: 4, py: 3, gap: 3, fontSize: "0.875rem", fontWeight: 600, color: headingColor, bg: isExpanded ? expandedBg : "transparent", transition: "background 0.15s ease", _hover: { bg: isExpanded ? expandedBg : softHover }, _focusVisible: {
|
|
22
20
|
boxShadow: "none",
|
|
23
|
-
outline: `0.125rem solid ${
|
|
21
|
+
outline: `0.125rem solid ${colors.primary[300]}`,
|
|
24
22
|
outlineOffset: "-0.125rem",
|
|
25
23
|
}, ...item.buttonProps, sx: {
|
|
26
|
-
...(
|
|
24
|
+
...(_a = item.customStyles) === null || _a === void 0 ? void 0 : _a.buttonStyle,
|
|
27
25
|
"&:hover": {
|
|
28
|
-
...(
|
|
26
|
+
...(_b = item.customStyles) === null || _b === void 0 ? void 0 : _b.hoverbuttonStyle,
|
|
29
27
|
},
|
|
30
|
-
}, children: [_jsx(Box, { as: "span", flex: "1", textAlign: "left", children: item.header }), _jsx(Flex, { align: "center", justify: "center", boxSize: "1.5rem", flexShrink: 0, borderRadius: "md", color: isExpanded ?
|
|
28
|
+
}, children: [_jsx(Box, { as: "span", flex: "1", textAlign: "left", children: item.header }), _jsx(Flex, { align: "center", justify: "center", boxSize: "1.5rem", flexShrink: 0, borderRadius: "md", color: isExpanded ? colors.accentText : colors.textMuted, bg: isExpanded ? colors.primary.opacity[16] : "transparent", transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)", transition: "transform 0.2s ease, color 0.2s ease, background 0.2s ease", children: _jsx(ChevronDown, { size: 16 }) })] }) }), _jsx(AccordionPanel, { px: 4, pt: 1, pb: 4, fontSize: "0.875rem", lineHeight: "1.5", color: bodyColor, ...item.panelProps, sx: (_c = item.customStyles) === null || _c === void 0 ? void 0 : _c.panelStyle, children: item.content })] }));
|
|
31
29
|
} }, idx));
|
|
32
30
|
}) }));
|
|
33
31
|
};
|
|
@@ -9,22 +9,19 @@ import { liftToContrast } from "../../Theme/tokens/builders/outlineRung.js";
|
|
|
9
9
|
*/
|
|
10
10
|
const MIN_HOVER_STEP = 1.15;
|
|
11
11
|
export const getAccordionHoverColors = (colors, isDark) => {
|
|
12
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
13
12
|
if (isDark) {
|
|
14
13
|
// primary.opacity[8] composited over the dark canvas collapses to ~1.07:1 (near-black on
|
|
15
14
|
// near-black) — gray[200] is an opaque rung that stays visibly above canvas (~1.6:1) without
|
|
16
15
|
// being as loud as the gray[300] hover fill FilterSidebar/Table already use.
|
|
17
16
|
return {
|
|
18
|
-
expandedBg:
|
|
19
|
-
softHover:
|
|
17
|
+
expandedBg: colors.gray[200],
|
|
18
|
+
softHover: colors.gray[200],
|
|
20
19
|
};
|
|
21
20
|
}
|
|
22
|
-
const rest =
|
|
23
|
-
const expandedTint = (
|
|
24
|
-
? compositeOver(colors.primary.opacity[8], rest)
|
|
25
|
-
: ((_s = (_r = colors.gray) === null || _r === void 0 ? void 0 : _r[50]) !== null && _s !== void 0 ? _s : rest);
|
|
21
|
+
const rest = colors.background[50];
|
|
22
|
+
const expandedTint = compositeOver(colors.primary.opacity[8], rest);
|
|
26
23
|
return {
|
|
27
|
-
expandedBg: liftToContrast(expandedTint, rest,
|
|
28
|
-
softHover: liftToContrast(
|
|
24
|
+
expandedBg: liftToContrast(expandedTint, rest, MIN_HOVER_STEP),
|
|
25
|
+
softHover: liftToContrast(colors.table.hover[100], rest, MIN_HOVER_STEP),
|
|
29
26
|
};
|
|
30
27
|
};
|
|
@@ -2,8 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { AlertDialog as ChakraAlertDialog, AlertDialogBody, AlertDialogCloseButton, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, Button, } from "@chakra-ui/react";
|
|
3
3
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
4
4
|
const AlertDialog = ({ isOpen, onClose, leastDestructiveRef, content, title, confirmButtonText = "Yes", cancelButtonText = "No", isConfirmLoading, onConfirm, ContentStyle, headerStyle, bodyStyle, footerStyle, closeButtonStyle, button1Style, button2Style, isCentered, key, }) => {
|
|
5
|
-
var _a;
|
|
6
5
|
const { colors } = useCustomTheme();
|
|
7
|
-
return (_jsxs(ChakraAlertDialog, { motionPreset: "slideInBottom", leastDestructiveRef: leastDestructiveRef, onClose: onClose, isOpen: isOpen, isCentered: isCentered, children: [_jsx(AlertDialogOverlay, {}), _jsxs(AlertDialogContent, { bg:
|
|
6
|
+
return (_jsxs(ChakraAlertDialog, { motionPreset: "slideInBottom", leastDestructiveRef: leastDestructiveRef, onClose: onClose, isOpen: isOpen, isCentered: isCentered, children: [_jsx(AlertDialogOverlay, {}), _jsxs(AlertDialogContent, { bg: colors.background[50], sx: ContentStyle, children: [_jsx(AlertDialogHeader, { sx: headerStyle, children: title }), _jsx(AlertDialogCloseButton, { sx: closeButtonStyle }), _jsx(AlertDialogBody, { sx: bodyStyle, children: content }), _jsxs(AlertDialogFooter, { sx: footerStyle, children: [_jsx(Button, { ref: leastDestructiveRef, onClick: onClose, variant: "outline", colorScheme: "red", size: "sm", sx: button1Style, children: cancelButtonText }), _jsx(Button, { colorScheme: "primary", onClick: onConfirm, isLoading: isConfirmLoading, ml: 3, size: "sm", sx: button2Style, children: confirmButtonText })] })] })] }, key));
|
|
8
7
|
};
|
|
9
8
|
export default AlertDialog;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import ReactApexChart from "react-apexcharts";
|
|
4
|
-
import {
|
|
4
|
+
import { useCustomTheme } from "../../../Theme/useCustomTheme.js";
|
|
5
5
|
import { getDefaultSeriesColors, mergeChartTitleStyle, } from "../../../Theme/tokens/builders/chartColorsFromTheme.js";
|
|
6
6
|
import { baseAxisLabels, baseChart, baseGrid, baseLegend, baseTooltip } from "../chartBase.js";
|
|
7
7
|
const ApexAreaChart = ({ variant = "basic", data, series, labels, title, titlePosition = "left", height = 320, width = "100%", colors, showLegend = true, legendPosition = "bottom", yAxisFormatter, }) => {
|
|
8
|
-
const
|
|
9
|
-
const palette = theme.colors;
|
|
8
|
+
const { colors: palette } = useCustomTheme();
|
|
10
9
|
const seriesColors = useMemo(() => colors !== null && colors !== void 0 ? colors : getDefaultSeriesColors(palette), [colors, palette]);
|
|
11
10
|
const resolvedSeries = useMemo(() => series !== null && series !== void 0 ? series : [{ name: title !== null && title !== void 0 ? title : "Series 1", data: data !== null && data !== void 0 ? data : [] }], [series, data, title]);
|
|
12
11
|
const isSpark = variant === "sparkline";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import ReactApexChart from "react-apexcharts";
|
|
4
|
-
import {
|
|
4
|
+
import { useCustomTheme } from "../../../Theme/useCustomTheme.js";
|
|
5
5
|
import { chartInk, chartMode, getDefaultSeriesColors, labelOnSeries, mergeChartTitleStyle, } from "../../../Theme/tokens/builders/chartColorsFromTheme.js";
|
|
6
6
|
import { baseChart, baseLegend, baseTooltip } from "../chartBase.js";
|
|
7
7
|
const getValidLegendPosition = (position) => {
|
|
@@ -14,8 +14,7 @@ const getValidLegendPosition = (position) => {
|
|
|
14
14
|
};
|
|
15
15
|
const ApexPieChart = ({ data, labels, title, height = 400, width = 500, donutColors, chartColor, titlePosition = "center", titleStyle, legendPosition = "bottom", legendStyle, variant = "pie", showDataLabels = true, minLabelPercent = 8, surfaceColor, donutSize = "68%", totalLabel = "Total", labelPlacement = "auto", }) => {
|
|
16
16
|
var _a;
|
|
17
|
-
const
|
|
18
|
-
const palette = theme.colors;
|
|
17
|
+
const { colors: palette } = useCustomTheme();
|
|
19
18
|
const ink = chartInk(palette);
|
|
20
19
|
const gap = surfaceColor !== null && surfaceColor !== void 0 ? surfaceColor : ink.surface;
|
|
21
20
|
const mergedTitleStyle = useMemo(() => mergeChartTitleStyle(palette, titleStyle), [palette, titleStyle]);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import ReactApexChart from "react-apexcharts";
|
|
4
|
-
import {
|
|
4
|
+
import { useCustomTheme } from "../../../Theme/useCustomTheme.js";
|
|
5
5
|
import { chartInk, getDefaultSeriesColors, mergeChartTitleStyle, } from "../../../Theme/tokens/builders/chartColorsFromTheme.js";
|
|
6
6
|
import { baseChart, baseLegend } from "../chartBase.js";
|
|
7
7
|
const ApexRadialChart = ({ variant = "gauge", data, labels, title, titlePosition = "left", height = 320, width = "100%", colors, totalLabel = "Total", trackColor, hollowSize = "62%", }) => {
|
|
8
|
-
const
|
|
9
|
-
const palette = theme.colors;
|
|
8
|
+
const { colors: palette } = useCustomTheme();
|
|
10
9
|
const ink = chartInk(palette);
|
|
11
10
|
const seriesColors = useMemo(() => colors !== null && colors !== void 0 ? colors : getDefaultSeriesColors(palette), [colors, palette]);
|
|
12
11
|
const options = useMemo(() => ({
|
|
@@ -4,20 +4,22 @@ import { Box, Text, VStack } from "@chakra-ui/react";
|
|
|
4
4
|
import { ThemesList } from "../../Theme/index.js";
|
|
5
5
|
import { ThemeSwitcher } from "../../Theme/provider/index.js";
|
|
6
6
|
import { FONT_SIZE_OPTIONS } from "../../Theme/provider/fontSize.js";
|
|
7
|
+
import { lightPalettes } from "../../Theme/tokens/brands/index.js";
|
|
8
|
+
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
7
9
|
import SelectV2 from "../SelectV2/SelectV2.js";
|
|
8
|
-
const FieldLabel = ({ children }) =>
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const brand = ThemesList[name];
|
|
12
|
-
return (_jsx(Box, { w: "14px", h: "14px", borderRadius: "full", bg: (_c = (_b = (_a = brand === null || brand === void 0 ? void 0 : brand.colors) === null || _a === void 0 ? void 0 : _a.primary) === null || _b === void 0 ? void 0 : _b[500]) !== null && _c !== void 0 ? _c : "gray.300", border: "1px solid", borderColor: "whiteAlpha.300" }));
|
|
10
|
+
const FieldLabel = ({ children }) => {
|
|
11
|
+
const { colors } = useCustomTheme();
|
|
12
|
+
return (_jsx(Text, { fontSize: "sm", fontWeight: "medium", color: colors.textMuted, mb: 2, children: children }));
|
|
13
13
|
};
|
|
14
|
+
const brandSwatch = (name, colors) => (_jsx(Box, { w: "14px", h: "14px", borderRadius: "full", bg: lightPalettes[name].primary[500], border: "1px solid", borderColor: colors.boxborder[500] }));
|
|
14
15
|
export const AppearanceSettings = ({ brand, fontSize, onBrandChange, onFontSizeChange, showBrand = true, showColorMode = true, showFontSize = true, size = "sm", labels, }) => {
|
|
15
16
|
var _a, _b, _c;
|
|
17
|
+
const { colors } = useCustomTheme();
|
|
16
18
|
const brandOptions = useMemo(() => Object.keys(ThemesList).map((name) => ({
|
|
17
19
|
id: name,
|
|
18
20
|
label: name.charAt(0).toUpperCase() + name.slice(1),
|
|
19
|
-
icon: brandSwatch(name),
|
|
20
|
-
})), []);
|
|
21
|
+
icon: brandSwatch(name, colors),
|
|
22
|
+
})), [colors]);
|
|
21
23
|
const themeLabel = (_a = labels === null || labels === void 0 ? void 0 : labels.theme) !== null && _a !== void 0 ? _a : "Theme";
|
|
22
24
|
const colorModeLabel = (_b = labels === null || labels === void 0 ? void 0 : labels.colorMode) !== null && _b !== void 0 ? _b : "Color mode";
|
|
23
25
|
const fontSizeLabel = (_c = labels === null || labels === void 0 ? void 0 : labels.fontSize) !== null && _c !== void 0 ? _c : "Font Size";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { accentTextOnCanvas, isDarkCanvas, onFilled
|
|
1
|
+
import { accentTextOnCanvas, isDarkCanvas, onFilled } from "../../Theme/tokens/builders/accentText.js";
|
|
2
|
+
import { resolveGradient, gradientCss } from "../../Theme/tokens/builders/gradientInk.js";
|
|
2
3
|
/**
|
|
3
4
|
* Outline/ghost/link text sits ON the canvas, so it needs a rung that stays readable there —
|
|
4
5
|
* `[500]` is pinned dark enough to carry a white label on the solid variant and measures only
|
|
@@ -13,9 +14,8 @@ const onCanvasText = (theme, colorScheme) => accentTextOnCanvas(theme.colors[col
|
|
|
13
14
|
* `[50]`.
|
|
14
15
|
*/
|
|
15
16
|
const onCanvasHoverBg = (theme, colorScheme, step) => {
|
|
16
|
-
var _a, _b;
|
|
17
17
|
const scale = theme.colors[colorScheme];
|
|
18
|
-
return
|
|
18
|
+
return "opacity" in scale ? scale.opacity[step] : scale[50];
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* The rung one/two steps DARKER than the accent — what a filled button's hover/active needs so its
|
|
@@ -136,19 +136,14 @@ export const Button = {
|
|
|
136
136
|
bg: "transparent",
|
|
137
137
|
},
|
|
138
138
|
}),
|
|
139
|
-
// Theme-based two-tone gradient: each theme defines its own `gradient`
|
|
140
|
-
//
|
|
141
|
-
// colorScheme. Hover/active shift brightness so it works for any pair.
|
|
139
|
+
// Theme-based two-tone gradient: each theme defines its own `gradient` {from,to} pair.
|
|
140
|
+
// Ignores colorScheme; hover/active shift brightness so it works for any pair.
|
|
142
141
|
gradient: ({ theme }) => {
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
from: theme.colors.primary[400],
|
|
146
|
-
to: theme.colors.primary[700],
|
|
147
|
-
};
|
|
148
|
-
const bg = `linear-gradient(135deg, ${g.from} 0%, ${g.to} 100%)`;
|
|
142
|
+
const g = resolveGradient(theme.colors.gradient, theme.colors.white, theme.colors.black);
|
|
143
|
+
const bg = gradientCss(g);
|
|
149
144
|
return {
|
|
150
145
|
bgImage: bg,
|
|
151
|
-
color:
|
|
146
|
+
color: g.ink,
|
|
152
147
|
border: "none",
|
|
153
148
|
_hover: {
|
|
154
149
|
bgImage: bg,
|
|
@@ -2,12 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useRef, useEffect } from "react";
|
|
3
3
|
import { Box, Button, ButtonGroup, IconButton, Menu, MenuButton, MenuItem, MenuList, Tooltip, } from "@chakra-ui/react";
|
|
4
4
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
5
|
-
import {
|
|
5
|
+
import { resolveGradient, gradientCss } from "../../Theme/tokens/builders/gradientInk.js";
|
|
6
|
+
import { hexToRgb } from "../../Theme/tokens/builders/color.js";
|
|
6
7
|
import { rafThrottle } from "../../Utils/rafThrottle.js";
|
|
7
8
|
export default function ButtonGroupIcon({ leftIcon, rightIcon, onLeftIconClick, onRightIconClick, buttonText, onButtonClick, onButtongroupClick, size, variant, color, buttonGroupStyle, buttonGroupLeftIconStyle, buttonGroupRightIconStyle, buttonStyle, onBlurLeftIcon, onBlurRightIcon, dropdownOptions, // New prop for dropdown options
|
|
8
9
|
onDropdownOptionClick, // New prop to handle option clicks
|
|
9
10
|
rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, leftIconLoading, RightIconLoading, }) {
|
|
10
|
-
var _a;
|
|
11
11
|
const theme = useCustomTheme();
|
|
12
12
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
13
13
|
const textRef = useRef(null);
|
|
@@ -46,31 +46,30 @@ rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, left
|
|
|
46
46
|
// keep the segments transparent (so it doesn't restart per button/icon), with a
|
|
47
47
|
// translucent-white hover overlay for per-segment feedback.
|
|
48
48
|
const isGradient = variant === "gradient";
|
|
49
|
-
const gradientStops = (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
const gradientInk = onGradient(gradientStops.from, gradientStops.to, theme.colors.white, theme.colors.black);
|
|
49
|
+
const gradientStops = resolveGradient(theme.colors.gradient, theme.colors.white, theme.colors.black);
|
|
50
|
+
const gradientBg = gradientCss(gradientStops);
|
|
51
|
+
const gradientInk = gradientStops.ink;
|
|
52
|
+
const whiteRgb = hexToRgb(theme.colors.white);
|
|
53
|
+
const whiteOverlay = (alpha) => `rgba(${whiteRgb.r}, ${whiteRgb.g}, ${whiteRgb.b}, ${alpha})`;
|
|
55
54
|
const gradientItemSx = isGradient
|
|
56
55
|
? {
|
|
57
56
|
color: gradientInk,
|
|
58
57
|
bg: "transparent",
|
|
59
58
|
bgImage: "none",
|
|
60
59
|
boxShadow: "none",
|
|
61
|
-
_hover: { bg:
|
|
62
|
-
_active: { bg:
|
|
60
|
+
_hover: { bg: whiteOverlay(0.08), boxShadow: "none" },
|
|
61
|
+
_active: { bg: whiteOverlay(0.16) },
|
|
63
62
|
}
|
|
64
63
|
: undefined;
|
|
65
64
|
return (_jsxs(ButtonGroup, { size: size, isAttached: true, variant: isGradient ? "solid" : variant, onClick: onButtongroupClick, colorScheme: color, style: buttonGroupStyle, sx: isGradient
|
|
66
65
|
? { bgImage: gradientBg, color: gradientInk, borderRadius: "lg", overflow: "hidden" }
|
|
67
|
-
: undefined, children: [leftIcon && (_jsx(IconButton, { "aria-label": "Left icon button", icon: leftIcon, isLoading: leftIconLoading, onClick: onLeftIconClick, onBlur: onBlurLeftIcon, style: buttonGroupLeftIconStyle, sx: gradientItemSx })), _jsx(Tooltip, { label: buttonText, isDisabled: !buttonText || !isTextTruncated, children: _jsx(Button, { onClick: onButtonClick, style: buttonStyle, isLoading: isLoading, borderLeft: "1px solid", borderRight: "1px solid", borderColor:
|
|
66
|
+
: undefined, children: [leftIcon && (_jsx(IconButton, { "aria-label": "Left icon button", icon: leftIcon, isLoading: leftIconLoading, onClick: onLeftIconClick, onBlur: onBlurLeftIcon, style: buttonGroupLeftIconStyle, sx: gradientItemSx })), _jsx(Tooltip, { label: buttonText, isDisabled: !buttonText || !isTextTruncated, children: _jsx(Button, { onClick: onButtonClick, style: buttonStyle, isLoading: isLoading, borderLeft: "1px solid", borderRight: "1px solid", borderColor: whiteOverlay(0.24), maxW: "200px", sx: gradientItemSx, children: _jsx(Box, { ref: textRef, as: "span", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", display: "block", width: "100%", children: buttonText }) }) }), rightIcon && rightIconDropdown ? (_jsxs(Menu, { isOpen: isDropdownOpen, onClose: () => setIsDropdownOpen(false), children: [_jsx(MenuButton, { as: IconButton, "aria-label": "Right icon button", icon: rightIcon, isLoading: RightIconLoading, onClick: handleRightIconClick, onBlur: onBlurRightIcon, style: buttonGroupRightIconStyle, sx: gradientItemSx }), _jsx(Box, { sx: { zIndex: 99 }, children: _jsx(MenuList, { style: menulistStyle, bg: theme.colors.backgroundColor.light,
|
|
68
67
|
// Chakra's own MenuItem renders `background: var(--menu-bg)` at rest, and its
|
|
69
68
|
// MenuList baseStyle sets that var to a hardcoded "#fff" (never our `_dark`, which
|
|
70
69
|
// this theme-swap app never triggers) — our `bg` prop above only recolors the list
|
|
71
70
|
// itself, not the inherited var, so items fell back to white until hover/focus (which
|
|
72
71
|
// our own sx already overrides). Setting the var here fixes the rest state too.
|
|
73
|
-
sx: { "--menu-bg": theme.colors.backgroundColor.light },
|
|
72
|
+
sx: { "--menu-bg": theme.colors.backgroundColor.light }, borderRadius: "xl", boxShadow: "lg", py: "0.375rem", minW: "12rem", overflow: "hidden", children: dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((option, index) => (_jsxs(MenuItem, { onClick: (event) => handleMenuClick(event, option), style: menuItemStyle, sx: {
|
|
74
73
|
display: "flex",
|
|
75
74
|
alignItems: "center",
|
|
76
75
|
gap: "0.5rem",
|
|
@@ -88,7 +87,7 @@ rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, left
|
|
|
88
87
|
mx: 0,
|
|
89
88
|
borderRadius: "none",
|
|
90
89
|
borderBottom: "1px solid",
|
|
91
|
-
borderColor:
|
|
90
|
+
borderColor: theme.colors.boxborder[200],
|
|
92
91
|
}
|
|
93
92
|
: {}),
|
|
94
93
|
_hover: { bg: theme.colors.primary[50], color: theme.colors.primary[700] },
|
|
@@ -21,7 +21,7 @@ export default function CheckBox({ label, labelFontSize, showLabelTooltip, label
|
|
|
21
21
|
...labelSx,
|
|
22
22
|
}
|
|
23
23
|
: { ...labelSx };
|
|
24
|
-
return (_jsxs(_Fragment, { children: [_jsx(ChakraCheckbox, { ...aria, onClick: onClick, spacing: spacing !== null && spacing !== void 0 ? spacing : "0.5rem", isInvalid: isInvalid, colorScheme: color, iconColor: iconColor, iconSize: iconSize, isChecked: isChecked, isIndeterminate: isIndeterminate, onChange: onChange, isDisabled: isDisabled, size: size, value: value, defaultChecked: defaultChecked, borderColor: theme.colors.
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsx(ChakraCheckbox, { ...aria, onClick: onClick, spacing: spacing !== null && spacing !== void 0 ? spacing : "0.5rem", isInvalid: isInvalid, colorScheme: color, iconColor: iconColor, iconSize: iconSize, isChecked: isChecked, isIndeterminate: isIndeterminate, onChange: onChange, isDisabled: isDisabled, size: size, value: value, defaultChecked: defaultChecked, borderColor: theme.colors.boxborder[500], display: "flex", alignItems: "center", sx: {
|
|
25
25
|
...sx,
|
|
26
26
|
".chakra-checkbox__control": { w: controlSize, h: controlSize },
|
|
27
27
|
}, children: label && (showLabelTooltip ? (_jsx(ToolTip, { label: labelTooltip !== null && labelTooltip !== void 0 ? labelTooltip : label, hasArrow: true, placement: "top", fontSize: "0.75rem", children: _jsx(Box, { as: "span", sx: clampStyles, fontSize: labelFontSize !== null && labelFontSize !== void 0 ? labelFontSize : "0.8125rem", color: theme.colors.text[700], fontWeight: 500, ml: 0, children: label }) })) : (_jsx(Box, { as: "span", sx: clampStyles, fontSize: labelFontSize !== null && labelFontSize !== void 0 ? labelFontSize : "0.8125rem", color: theme.colors.text[700], fontWeight: 500, ml: 0, children: label }))) }), error && _jsx(ErrorMessage, { errorMessage: errorMessage }), helperText && !error && _jsx(HelperText, { helperText: helperText })] }));
|
|
@@ -15,6 +15,8 @@ export const Checkbox = {
|
|
|
15
15
|
height: "1.25rem",
|
|
16
16
|
borderWidth: "1.6px",
|
|
17
17
|
borderRadius: "base",
|
|
18
|
+
// Without a resting colour Chakra falls back to its own gray.500.
|
|
19
|
+
borderColor: theme.colors.boxborder[500],
|
|
18
20
|
transition: "background 0.15s, border-color 0.15s, box-shadow 0.15s",
|
|
19
21
|
_disabled: {
|
|
20
22
|
bg: theme.colors.background[50],
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { HStack, Text } from "@chakra-ui/react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
4
|
+
import { onFilled } from "../../Theme/tokens/builders/accentText.js";
|
|
5
5
|
const ErrorComponent = ({ error, errorClassName, }) => {
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
//
|
|
9
|
-
const
|
|
10
|
-
// errorFill is tuned for text-on-page-canvas, not for carrying a white mark on top of itself —
|
|
11
|
-
// pick the mark ink structurally (onFilled) instead of assuming white always clears AA on it.
|
|
12
|
-
const markInk = onFilled(errorFill, theme.colors.white, theme.colors.black);
|
|
6
|
+
const { colors } = useCustomTheme();
|
|
7
|
+
const errorFill = colors.semanticText.error;
|
|
8
|
+
// errorFill is ink, not a fill tuned to carry a mark — pick the mark's ink structurally.
|
|
9
|
+
const markInk = onFilled(errorFill, colors.white, colors.black);
|
|
13
10
|
return (_jsxs(HStack, { as: "p", align: "flex-start", spacing: 1, mt: 1, fontSize: "sm", color: errorFill, className: errorClassName, children: [_jsxs("svg", { width: "12", height: "12", viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": true, children: [_jsx("circle", { cx: "50", cy: "50", r: "50", fill: errorFill }), _jsx("rect", { x: "46", y: "40", width: "8", height: "30", rx: "2", fill: markInk }), _jsx("circle", { cx: "50", cy: "28", r: "4", fill: markInk })] }), _jsx(Text, { as: "span", children: error })] }));
|
|
14
11
|
};
|
|
15
12
|
export default ErrorComponent;
|
|
@@ -2,16 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Flex, Text, } from "@chakra-ui/react";
|
|
3
3
|
import { Info } from "lucide-react";
|
|
4
4
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
5
|
-
import { DEFAULT_CANVAS, accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
|
|
6
5
|
// `id` lets a field point `aria-describedby` here so the message is part of the control's
|
|
7
6
|
// description on every focus. `role="alert"` alone announces once, when it first renders.
|
|
8
7
|
const ErrorMessage = ({ errorMessage, id }) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
// red[500] alone fails AA on the page canvas (~3.4:1 vs the ~4.5 bar) in every brand — step
|
|
12
|
-
// to a darker rung of the same scale instead of hardcoding one, since a manual retune of a
|
|
13
|
-
// vivid-alert red collides with its own darker rungs before it clears AA (see red/error
|
|
14
|
-
// scale comments in each brand's palette.light.ts).
|
|
15
|
-
return (_jsxs(Flex, { id: id, align: "center", color: accentTextOnCanvas(theme.colors.red, (_b = (_a = theme.colors.backgroundColor) === null || _a === void 0 ? void 0 : _a.main) !== null && _b !== void 0 ? _b : DEFAULT_CANVAS), fontSize: "0.875rem", role: "alert", children: [_jsx(Info, { width: "0.875rem" }), _jsx(Text, { ml: "0.188rem", children: errorMessage !== null && errorMessage !== void 0 ? errorMessage : "Error" })] }));
|
|
8
|
+
const { colors } = useCustomTheme();
|
|
9
|
+
return (_jsxs(Flex, { id: id, align: "center", color: colors.semanticText.error, fontSize: "0.875rem", role: "alert", children: [_jsx(Info, { width: "0.875rem" }), _jsx(Text, { ml: "0.188rem", children: errorMessage !== null && errorMessage !== void 0 ? errorMessage : "Error" })] }));
|
|
16
10
|
};
|
|
17
11
|
export default ErrorMessage;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Icon } from "@chakra-ui/react";
|
|
3
3
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
4
|
-
import { DEFAULT_CANVAS, accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
|
|
5
4
|
import { InfoIcon } from "lucide-react";
|
|
6
5
|
import ToolTip from "../ToolTip/ToolTip.js";
|
|
7
6
|
export const TextLabel = ({ label, id, isRequired = false, isInformation = false, informationMessage = "", fontSize, showTooltip, tooltipLabel, clampLines, inline = false, }) => {
|
|
8
|
-
var _a, _b, _c;
|
|
9
7
|
const theme = useCustomTheme();
|
|
10
8
|
const clampStyles = clampLines ? {
|
|
11
9
|
display: "-webkit-box",
|
|
@@ -24,7 +22,7 @@ export const TextLabel = ({ label, id, isRequired = false, isInformation = false
|
|
|
24
22
|
fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : "0.8125rem",
|
|
25
23
|
lineHeight: "1.2",
|
|
26
24
|
};
|
|
27
|
-
const content = (_jsxs(Box, { as: "span", display: "inline-flex", alignItems: "center", gap: "0.35rem", children: [showTooltip ? (_jsx(ToolTip, { label: tooltipLabel !== null && tooltipLabel !== void 0 ? tooltipLabel : label, hasArrow: true, placement: "top", fontSize: "0.75rem", children: _jsx(Box, { as: "span", sx: clampStyles, children: label }) })) : (_jsx(Box, { as: "span", sx: clampStyles, children: label })), isRequired && (_jsx("span", { style: { color:
|
|
25
|
+
const content = (_jsxs(Box, { as: "span", display: "inline-flex", alignItems: "center", gap: "0.35rem", children: [showTooltip ? (_jsx(ToolTip, { label: tooltipLabel !== null && tooltipLabel !== void 0 ? tooltipLabel : label, hasArrow: true, placement: "top", fontSize: "0.75rem", children: _jsx(Box, { as: "span", sx: clampStyles, children: label }) })) : (_jsx(Box, { as: "span", sx: clampStyles, children: label })), isRequired && (_jsx("span", { style: { color: theme.colors.semanticText.error, marginLeft: "0.125rem" }, children: "*" })), isInformation && informationMessage && (_jsx(ToolTip, { label: informationMessage, hasArrow: true, placement: "top", fontSize: "0.75rem", children: _jsx(Icon, { as: InfoIcon, color: theme.colors.text[700], boxSize: 3.5 }) }))] }));
|
|
28
26
|
// A real <label> only when there is a control id to point at. Without one it would name
|
|
29
27
|
// nothing, and TextLabel also renders `inline` inside controls that are themselves a <label>
|
|
30
28
|
// (Checkbox/Radio) — nesting labels there would be invalid markup.
|