pixelize-design-library 2.4.2-beta.4 → 2.4.2-beta.41
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/COMPONENT-GOTCHAS.md +1102 -0
- package/README.md +26 -0
- package/dist/Components/Accordion/Accordion.d.ts +1 -0
- package/dist/Components/Accordion/Accordion.js +4 -1
- package/dist/Components/Accordion/AccordionProps.d.ts +2 -0
- package/dist/Components/AlertDialog/AlertDialog.d.ts +1 -0
- package/dist/Components/AlertDialog/AlertDialog.js +1 -0
- package/dist/Components/AlertDialog/AlertDialogProps.d.ts +2 -0
- package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +1 -0
- package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChartProps.d.ts +4 -0
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.js +1 -0
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChartProps.d.ts +6 -0
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -0
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChartProps.d.ts +8 -0
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +1 -0
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChartProps.d.ts +6 -0
- package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.js +1 -0
- package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarChartsProps.d.ts +3 -0
- package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +1 -0
- package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChartProps.d.ts +3 -0
- package/dist/Components/AppSwitcher/AppMark.d.ts +19 -0
- package/dist/Components/AppSwitcher/AppMark.js +62 -0
- package/dist/Components/AppSwitcher/AppSwitcher.d.ts +4 -0
- package/dist/Components/AppSwitcher/AppSwitcher.js +278 -0
- package/dist/Components/AppSwitcher/AppSwitcherProps.d.ts +70 -0
- package/dist/Components/AppSwitcher/AppSwitcherProps.js +86 -0
- package/dist/Components/AppSwitcher/useAppSwitcherShortcut.d.ts +3 -0
- package/dist/Components/AppSwitcher/useAppSwitcherShortcut.js +31 -0
- package/dist/Components/AppearanceSettings/AppearanceSettings.js +2 -1
- package/dist/Components/AppearanceSettings/AppearanceSettingsProps.d.ts +2 -0
- package/dist/Components/Breadcrumbs/BreadcrumbsProps.d.ts +3 -0
- package/dist/Components/Button/Button.d.ts +2 -2
- package/dist/Components/Button/Button.js +4 -3
- package/dist/Components/Button/Button.styles.js +37 -23
- package/dist/Components/Button/ButtonProps.d.ts +9 -1
- package/dist/Components/ButtonGroupIcon/ButtonGoupIconProps.d.ts +7 -0
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +2 -4
- package/dist/Components/Buttons/ButtonsProps.d.ts +2 -0
- package/dist/Components/Card/Card.d.ts +1 -1
- package/dist/Components/Card/Card.js +2 -2
- package/dist/Components/Card/CardProps.d.ts +3 -1
- package/dist/Components/Card/PaymentCard/PaymentCard.js +21 -12
- package/dist/Components/Card/PaymentCard/PaymentCardProps.d.ts +6 -0
- package/dist/Components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/Components/Checkbox/Checkbox.js +2 -1
- package/dist/Components/Checkbox/Checkbox.styles.js +12 -7
- package/dist/Components/Checkbox/CheckboxProps.d.ts +4 -0
- package/dist/Components/Common/ErrorComponent.d.ts +2 -0
- package/dist/Components/Common/ErrorComponent.js +7 -5
- package/dist/Components/Common/ErrorMessage.js +2 -2
- package/dist/Components/Common/FormLabel.d.ts +4 -0
- package/dist/Components/Common/FormLabel.js +1 -0
- package/dist/Components/Common/FormattedDescription.d.ts +2 -0
- package/dist/Components/Common/FormattedDescription.js +1 -0
- package/dist/Components/Common/HelperText.d.ts +2 -0
- package/dist/Components/Common/HelperText.js +2 -0
- package/dist/Components/Common/Label.d.ts +1 -0
- package/dist/Components/Common/Label.js +1 -0
- package/dist/Components/Common/fieldStyles.js +1 -1
- package/dist/Components/ContactForm/ContactForm.d.ts +1 -0
- package/dist/Components/ContactForm/ContactForm.js +1 -0
- package/dist/Components/ContactForm/ContactFormProps.d.ts +4 -0
- package/dist/Components/CopyButton/CopyButton.d.ts +3 -1
- package/dist/Components/CopyButton/CopyButton.js +9 -3
- package/dist/Components/CustomModulesTable/CustomModulesTableProps.d.ts +8 -0
- package/dist/Components/DatePicker/CalendarPanel.d.ts +6 -0
- package/dist/Components/DatePicker/CalendarPanel.js +37 -15
- package/dist/Components/DatePicker/DatePicker.d.ts +1 -0
- package/dist/Components/DatePicker/DatePicker.js +1 -0
- package/dist/Components/DatePicker/DatePickerProps.d.ts +30 -0
- package/dist/Components/DatePicker/RangeDatePicker.d.ts +1 -0
- package/dist/Components/DatePicker/RangeDatePicker.js +30 -5
- package/dist/Components/DatePicker/SingleDatePicker.d.ts +1 -0
- package/dist/Components/DatePicker/SingleDatePicker.js +49 -14
- package/dist/Components/DatePicker/ThemeDatePicker.d.ts +1 -0
- package/dist/Components/DatePicker/ThemeDatePicker.js +1 -0
- package/dist/Components/DatePicker/TimeOnlyPicker.d.ts +1 -0
- package/dist/Components/DatePicker/TimeOnlyPicker.js +11 -2
- package/dist/Components/DatePicker/TimePicker.d.ts +1 -0
- package/dist/Components/DatePicker/TimePicker.js +4 -3
- package/dist/Components/DatePicker/TimePickerInput.d.ts +1 -0
- package/dist/Components/DatePicker/TimePickerInput.js +2 -1
- package/dist/Components/DatePicker/dayStates.d.ts +56 -0
- package/dist/Components/DatePicker/dayStates.js +87 -0
- package/dist/Components/Divider/Divider.d.ts +1 -0
- package/dist/Components/Divider/Divider.js +1 -0
- package/dist/Components/Drawer/DrawerProps.d.ts +2 -0
- package/dist/Components/Dropdown/DropDown.d.ts +1 -0
- package/dist/Components/Dropdown/DropDown.js +22 -6
- package/dist/Components/Dropdown/DropdownProps.d.ts +3 -0
- package/dist/Components/Editor/Editor.d.ts +1 -0
- package/dist/Components/Editor/Editor.js +1 -0
- package/dist/Components/Editor/EditorProps.d.ts +2 -0
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.d.ts +1 -0
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -5
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.d.ts +4 -0
- package/dist/Components/EmptyState/EmptyState.d.ts +1 -0
- package/dist/Components/EmptyState/EmptyState.js +4 -2
- package/dist/Components/EmptyState/EmptyStateProps.d.ts +3 -0
- package/dist/Components/FeedbackForm/FeedbackForm.d.ts +3 -0
- package/dist/Components/FeedbackForm/FeedbackForm.js +1 -0
- package/dist/Components/FieldSelectModal/FieldSelectModal.d.ts +3 -2
- package/dist/Components/FieldSelectModal/FieldSelectModal.js +1 -0
- package/dist/Components/FilePreview/FilePreview.d.ts +1 -0
- package/dist/Components/FilePreview/FilePreview.js +3 -1
- package/dist/Components/FilePreview/FilePreviewProps.d.ts +5 -2
- package/dist/Components/FileUpload/FileUpload.d.ts +1 -0
- package/dist/Components/FileUpload/FileUpload.js +7 -5
- package/dist/Components/FileUpload/FileUploadProps.d.ts +7 -1
- package/dist/Components/FileUpload/constants.js +1 -0
- package/dist/Components/FileUploader/FileUploader.d.ts +1 -0
- package/dist/Components/FileUploader/FileUploader.js +1 -0
- package/dist/Components/FileUploader/FileUploaderProps.d.ts +2 -0
- package/dist/Components/FilterSidebar/FilterSidebar.d.ts +3 -0
- package/dist/Components/FilterSidebar/FilterSidebar.js +5 -5
- package/dist/Components/FilterSidebar/filterHoverStyle.d.ts +2 -10
- package/dist/Components/FilterSidebar/filterHoverStyle.js +3 -10
- package/dist/Components/Form/FormWrapper.d.ts +3 -0
- package/dist/Components/Form/FormWrapper.js +2 -1
- package/dist/Components/Header/HeaderProps.d.ts +5 -0
- package/dist/Components/Header/components/mobileMenu.js +12 -3
- package/dist/Components/Input/Input/InputProps.d.ts +2 -0
- package/dist/Components/Input/PhoneNumberInput.d.ts +1 -0
- package/dist/Components/Input/PhoneNumberInput.js +1 -0
- package/dist/Components/Input/PhoneNumberInputProps.d.ts +3 -0
- package/dist/Components/Input/Switch/InputSwitch.d.ts +2 -0
- package/dist/Components/Input/Switch/InputSwitch.js +1 -0
- package/dist/Components/Input/TextInput.js +1 -0
- package/dist/Components/Input/TextInput.styles.js +8 -10
- package/dist/Components/Input/TextInputProps.d.ts +2 -0
- package/dist/Components/InputTextArea/InputTextArea.d.ts +1 -0
- package/dist/Components/InputTextArea/InputTextArea.js +1 -0
- package/dist/Components/InputTextArea/InputTextArea.style.js +7 -6
- package/dist/Components/InputTextArea/InputTextAreaProps.d.ts +1 -0
- package/dist/Components/KanbanBoard/AccountCard.d.ts +3 -0
- package/dist/Components/KanbanBoard/AccountCard.js +1 -0
- package/dist/Components/KanbanBoard/AccountRow.d.ts +1 -0
- package/dist/Components/KanbanBoard/AccountRow.js +1 -0
- package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.d.ts +2 -0
- package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
- package/dist/Components/KanbanBoard/KanbanBoard.d.ts +1 -0
- package/dist/Components/KanbanBoard/KanbanBoard.js +1 -0
- package/dist/Components/KanbanBoard/KanbanBoardProps.d.ts +39 -14
- package/dist/Components/KanbanBoard/MeasuredItem.d.ts +1 -0
- package/dist/Components/KanbanBoard/MeasuredItem.js +1 -0
- package/dist/Components/LazyWrapper/LazyWrapper.d.ts +3 -2
- package/dist/Components/LazyWrapper/LazyWrapper.js +1 -0
- package/dist/Components/LimitReachedModal/LimitReachedModalProps.d.ts +4 -1
- package/dist/Components/LimitReachedModal/limitReachedCopy.d.ts +2 -0
- package/dist/Components/LimitReachedModal/limitReachedCopy.js +2 -0
- package/dist/Components/Loading/Loading.d.ts +1 -0
- package/dist/Components/Loading/Loading.js +16 -14
- package/dist/Components/Loading/LoadingProps.d.ts +2 -0
- package/dist/Components/Modal/ModalProps.d.ts +2 -0
- package/dist/Components/MoreItems/MoreItems.d.ts +1 -0
- package/dist/Components/MoreItems/MoreItems.js +4 -1
- package/dist/Components/MoreItems/MoreItemsProps.d.ts +4 -2
- package/dist/Components/MultiSelect/MultiSelect.js +2 -2
- package/dist/Components/MultiSelect/MultiSelectProps.d.ts +2 -0
- package/dist/Components/NavigationBar/NavigationBar.js +9 -10
- package/dist/Components/NavigationBar/NavigationBarProps.d.ts +3 -0
- package/dist/Components/NoteTextArea/NoteTextArea.d.ts +1 -0
- package/dist/Components/NoteTextArea/NoteTextArea.js +10 -4
- package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +2 -0
- package/dist/Components/Notification/Notification.d.ts +1 -0
- package/dist/Components/Notification/Notification.js +1 -0
- package/dist/Components/Notification/NotificationProps.d.ts +6 -0
- package/dist/Components/NumberInput/NumberInput.d.ts +1 -0
- package/dist/Components/NumberInput/NumberInput.js +4 -1
- package/dist/Components/NumberInput/NumberInput.styles.js +7 -6
- package/dist/Components/NumberInput/NumberInputProps.d.ts +3 -0
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +14 -10
- package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +6 -1
- package/dist/Components/OrgSwitcher/OrgSwitcherProps.js +1 -0
- package/dist/Components/OrganizationDetails/OrganizationDetails.d.ts +1 -0
- package/dist/Components/OrganizationDetails/OrganizationDetails.js +4 -2
- package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +17 -4
- package/dist/Components/PdfViewer/PdfViewer.d.ts +2 -1
- package/dist/Components/PdfViewer/PdfViewer.js +7 -1
- package/dist/Components/PinInput/PinInput.d.ts +1 -0
- package/dist/Components/PinInput/PinInput.js +1 -0
- package/dist/Components/PinInput/PinInputProps.d.ts +2 -0
- package/dist/Components/PinInputs/PinInputs.d.ts +1 -0
- package/dist/Components/PinInputs/PinInputs.js +1 -0
- package/dist/Components/PinInputs/PinInputsProps.d.ts +1 -0
- package/dist/Components/PlanBadge/PlanBadgeProps.d.ts +2 -0
- package/dist/Components/PlanPill/PlanPillProps.d.ts +2 -0
- package/dist/Components/Primitives/Primitives.d.ts +6 -0
- package/dist/Components/Primitives/Primitives.js +113 -0
- package/dist/Components/ProductCard/ProductCardProps.d.ts +10 -0
- package/dist/Components/ProductCard/ProductReview.d.ts +1 -0
- package/dist/Components/ProductCard/ProductReview.js +6 -1
- package/dist/Components/ProductCard/ProductTags.js +1 -1
- package/dist/Components/ProductDetails/ProductDetailsProps.d.ts +7 -0
- package/dist/Components/ProfileCard/ProfileCard.js +1 -1
- package/dist/Components/ProfileCard/ProfileCardProps.d.ts +3 -0
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.d.ts +1 -0
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +5 -3
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.d.ts +9 -1
- package/dist/Components/ProgressBar/ProgressBar.d.ts +1 -0
- package/dist/Components/ProgressBar/ProgressBar.js +1 -0
- package/dist/Components/ProgressBar/ProgressBarProps.d.ts +2 -0
- package/dist/Components/RadioButton/RadioButton.js +3 -2
- package/dist/Components/RadioButton/RadioButtonProps.d.ts +2 -0
- package/dist/Components/Reorder/Reorder.d.ts +2 -0
- package/dist/Components/Reorder/Reorder.js +1 -0
- package/dist/Components/Reorder/ReorderProps.d.ts +3 -0
- package/dist/Components/RolesPermission/RolesPermission.d.ts +1 -0
- package/dist/Components/RolesPermission/RolesPermission.js +5 -3
- package/dist/Components/RolesPermission/RolesPermissionProps.d.ts +16 -1
- package/dist/Components/ScrollToTop/ScrollToTop.d.ts +3 -2
- package/dist/Components/ScrollToTop/ScrollToTop.js +4 -1
- package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +7 -0
- package/dist/Components/ScrollbarBox/ScrollbarBox.js +1 -0
- package/dist/Components/Search/Search.d.ts +1 -0
- package/dist/Components/Search/Search.js +3 -2
- package/dist/Components/Search/SearchProps.d.ts +2 -0
- package/dist/Components/SearchSelect/SearchSelect.d.ts +1 -0
- package/dist/Components/SearchSelect/SearchSelect.js +48 -37
- package/dist/Components/SearchSelect/SearchSelectProps.d.ts +23 -0
- package/dist/Components/SegmentedControl/SegmentedControl.d.ts +3 -0
- package/dist/Components/SegmentedControl/SegmentedControl.js +89 -0
- package/dist/Components/SegmentedControl/SegmentedControlProps.d.ts +23 -0
- package/dist/Components/SegmentedControl/SegmentedControlProps.js +2 -0
- package/dist/Components/Select/Select.d.ts +1 -1
- package/dist/Components/Select/Select.js +4 -2
- package/dist/Components/Select/Select.styles.js +3 -2
- package/dist/Components/Select/SelectProps.d.ts +6 -0
- package/dist/Components/SelectSearch/SelectSearch.d.ts +1 -0
- package/dist/Components/SelectSearch/SelectSearch.js +37 -15
- package/dist/Components/SelectSearch/SelectSearchProps.d.ts +5 -0
- package/dist/Components/SelectV2/SelectV2.d.ts +1 -0
- package/dist/Components/SelectV2/SelectV2.js +20 -5
- package/dist/Components/SelectV2/SelectV2Props.d.ts +6 -1
- package/dist/Components/SideBar/SecondaryBar.js +1 -1
- package/dist/Components/SideBar/SideBar.js +5 -3
- package/dist/Components/SideBar/SideBarProps.d.ts +38 -24
- package/dist/Components/SideBar/components/MenuItemBox.js +15 -11
- package/dist/Components/SideBar/components/MenuPopoverContent.js +13 -10
- package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +3 -0
- package/dist/Components/Skeletons/SkeletonProps.d.ts +2 -0
- package/dist/Components/Skeletons/Skeletons.d.ts +1 -0
- package/dist/Components/Skeletons/Skeletons.js +1 -0
- package/dist/Components/Slider/Slider.d.ts +3 -0
- package/dist/Components/Slider/Slider.js +9 -1
- package/dist/Components/StageProgress/StageItem.d.ts +1 -0
- package/dist/Components/StageProgress/StageItem.js +1 -0
- package/dist/Components/StageProgress/StageProgress.d.ts +1 -0
- package/dist/Components/StageProgress/StageProgress.js +1 -0
- package/dist/Components/StageProgress/StageProgressProps.d.ts +45 -4
- package/dist/Components/StageProgress/StageProgressProps.js +6 -4
- package/dist/Components/StageProgress/StepperStage.js +2 -2
- package/dist/Components/Switch/Switch.d.ts +1 -0
- package/dist/Components/Switch/Switch.js +1 -0
- package/dist/Components/Switch/SwitchProps.d.ts +1 -0
- package/dist/Components/Table/Table.d.ts +2 -1
- package/dist/Components/Table/Table.js +15 -5
- package/dist/Components/Table/TableProps.d.ts +47 -0
- package/dist/Components/Table/components/Pagination.js +1 -1
- package/dist/Components/Table/components/TableActions.js +2 -2
- package/dist/Components/Table/components/TableBody.js +44 -18
- package/dist/Components/Table/components/TableGroupRow.js +1 -1
- package/dist/Components/Table/components/TableHeader.js +21 -8
- package/dist/Components/Table/components/TableSearch.js +1 -1
- package/dist/Components/Table/filters/CompactSelect.d.ts +1 -0
- package/dist/Components/Table/filters/CompactSelect.js +29 -8
- package/dist/Components/Table/filters/LeftFilterPane.d.ts +9 -1
- package/dist/Components/Table/filters/LeftFilterPane.js +1 -1
- package/dist/Components/Table/settings/ManageColumns.js +8 -5
- package/dist/Components/Table/settings/TableSettings.js +6 -4
- package/dist/Components/Table/variants/TableVariantContext.d.ts +4 -0
- package/dist/Components/Table/variants/TableVariantContext.js +17 -0
- package/dist/Components/Table/variants/classic.d.ts +6 -0
- package/dist/Components/Table/variants/classic.js +47 -0
- package/dist/Components/Table/variants/index.d.ts +7 -0
- package/dist/Components/Table/variants/index.js +27 -0
- package/dist/Components/Table/variants/pillInk.d.ts +6 -0
- package/dist/Components/Table/variants/pillInk.js +21 -0
- package/dist/Components/Table/variants/studio.d.ts +6 -0
- package/dist/Components/Table/variants/studio.js +50 -0
- package/dist/Components/Table/variants/tokens.d.ts +49 -0
- package/dist/Components/Table/variants/tokens.js +2 -0
- package/dist/Components/Tag/Tag.d.ts +1 -0
- package/dist/Components/Tag/Tag.js +1 -0
- package/dist/Components/Tag/Tag.styles.js +16 -11
- package/dist/Components/Tag/TagProps.d.ts +7 -0
- package/dist/Components/Timeline/Timeline.d.ts +1 -0
- package/dist/Components/Timeline/Timeline.js +1 -0
- package/dist/Components/Timeline/TimelineProps.d.ts +8 -0
- package/dist/Components/Toaster/Toaster.d.ts +1 -0
- package/dist/Components/Toaster/Toaster.js +1 -0
- package/dist/Components/Toaster/ToasterProps.d.ts +3 -0
- package/dist/Components/Toggle/TableToggle.d.ts +1 -0
- package/dist/Components/Toggle/TableToggle.js +73 -18
- package/dist/Components/Toggle/TableToggleProps.d.ts +6 -0
- package/dist/Components/ToggleSwitch/ToggleSwitch.d.ts +3 -0
- package/dist/Components/ToggleSwitch/ToggleSwitch.js +19 -0
- package/dist/Components/ToggleSwitch/ToggleSwitchProps.d.ts +13 -0
- package/dist/Components/ToggleSwitch/ToggleSwitchProps.js +2 -0
- package/dist/Components/ToolTip/ToolTip.d.ts +1 -0
- package/dist/Components/ToolTip/ToolTip.js +7 -6
- package/dist/Components/ToolTip/ToolTipProps.d.ts +5 -1
- package/dist/Components/Trail/EditableCell.d.ts +2 -0
- package/dist/Components/Trail/EditableCell.js +2 -1
- package/dist/Components/Trail/SelectAllCheckbox.d.ts +1 -0
- package/dist/Components/Trail/SelectAllCheckbox.js +1 -0
- package/dist/Components/Trail/TrailWorks.d.ts +1 -0
- package/dist/Components/Trail/TrailWorks.js +2 -1
- package/dist/Components/UpgradeButton/UpgradeButtonProps.d.ts +6 -2
- package/dist/Components/UserDetails/DeactivateConfirmModal.js +1 -1
- package/dist/Components/UserDetails/UserDetails.d.ts +1 -0
- package/dist/Components/UserDetails/UserDetails.js +6 -3
- package/dist/Components/UserDetails/UserDetailsProps.d.ts +30 -1
- package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +6 -1
- package/dist/Hooks/exclusiveOverlay.d.ts +4 -0
- package/dist/Hooks/exclusiveOverlay.js +22 -0
- package/dist/Hooks/useExclusiveOverlay.d.ts +5 -0
- package/dist/Hooks/useExclusiveOverlay.js +24 -0
- package/dist/Theme/assertPalette.d.ts +1 -1
- package/dist/Theme/assertPalette.js +3 -2
- package/dist/Theme/chakra/Menu.styles.d.ts +2 -0
- package/dist/Theme/chakra/Menu.styles.js +9 -5
- package/dist/Theme/chakra/Popover.styles.d.ts +3 -0
- package/dist/Theme/chakra/Popover.styles.js +5 -1
- package/dist/Theme/chakra/componentStyles.d.ts +5 -0
- package/dist/Theme/chakra/componentStyles.js +16 -9
- package/dist/Theme/chakra/createBrandTheme.js +22 -9
- package/dist/Theme/chakra/focusRing.styles.d.ts +52 -0
- package/dist/Theme/chakra/focusRing.styles.js +46 -0
- package/dist/Theme/provider/ThemeSwitcher.js +5 -2
- package/dist/Theme/tokens/brands/index.js +6 -1
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +1 -0
- package/dist/Theme/tokens/builders/buildDarkPalette.js +6 -1
- package/dist/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
- package/dist/Theme/tokens/builders/filledSurface.d.ts +29 -0
- package/dist/Theme/tokens/builders/filledSurface.js +74 -0
- package/dist/Theme/tokens/builders/focusRing.d.ts +52 -0
- package/dist/Theme/tokens/builders/focusRing.js +92 -0
- package/dist/Theme/tokens/builders/index.d.ts +2 -0
- package/dist/Theme/tokens/builders/index.js +2 -0
- package/dist/Theme/tokens/builders/outlineRung.d.ts +41 -3
- package/dist/Theme/tokens/builders/outlineRung.js +82 -5
- 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 +5 -1
- package/dist/Theme/tokens/builders/resolvedRungs.js +7 -2
- package/dist/Theme/tokens/builders/rowStates.d.ts +13 -0
- package/dist/Theme/tokens/builders/rowStates.js +19 -0
- package/dist/Theme/tokens/builders/scrollShadow.d.ts +2 -0
- package/dist/Theme/tokens/builders/scrollShadow.js +16 -0
- package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -2
- package/dist/Theme/tokens/builders/surfaceRungs.js +19 -9
- package/dist/Theme/tokens/types.d.ts +21 -1
- package/dist/Utils/table.d.ts +3 -0
- package/dist/Utils/table.js +49 -3
- package/dist/esm/Components/Accordion/Accordion.js +4 -1
- package/dist/esm/Components/AlertDialog/AlertDialog.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexBarChart/ApexBarChart.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +1 -0
- package/dist/esm/Components/AppSwitcher/AppMark.js +56 -0
- package/dist/esm/Components/AppSwitcher/AppSwitcher.js +243 -0
- package/dist/esm/Components/AppSwitcher/AppSwitcherProps.js +78 -0
- package/dist/esm/Components/AppSwitcher/useAppSwitcherShortcut.js +27 -0
- package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +2 -1
- package/dist/esm/Components/Button/Button.js +5 -4
- package/dist/esm/Components/Button/Button.styles.js +38 -24
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +2 -4
- package/dist/esm/Components/Card/Card.js +2 -2
- package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +21 -12
- package/dist/esm/Components/Checkbox/Checkbox.js +2 -1
- package/dist/esm/Components/Checkbox/Checkbox.styles.js +13 -8
- package/dist/esm/Components/Common/ErrorComponent.js +7 -5
- package/dist/esm/Components/Common/ErrorMessage.js +2 -2
- package/dist/esm/Components/Common/FormLabel.js +1 -0
- package/dist/esm/Components/Common/FormattedDescription.js +1 -0
- package/dist/esm/Components/Common/HelperText.js +2 -0
- package/dist/esm/Components/Common/Label.js +1 -0
- package/dist/esm/Components/Common/fieldStyles.js +1 -1
- package/dist/esm/Components/ContactForm/ContactForm.js +1 -0
- package/dist/esm/Components/CopyButton/CopyButton.js +10 -4
- package/dist/esm/Components/DatePicker/CalendarPanel.js +38 -16
- package/dist/esm/Components/DatePicker/DatePicker.js +1 -0
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +31 -6
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +50 -15
- package/dist/esm/Components/DatePicker/ThemeDatePicker.js +1 -0
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +11 -2
- package/dist/esm/Components/DatePicker/TimePicker.js +4 -3
- package/dist/esm/Components/DatePicker/TimePickerInput.js +2 -1
- package/dist/esm/Components/DatePicker/dayStates.js +79 -0
- package/dist/esm/Components/Divider/Divider.js +1 -0
- package/dist/esm/Components/Dropdown/DropDown.js +23 -7
- package/dist/esm/Components/Editor/Editor.js +1 -0
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -5
- package/dist/esm/Components/EmptyState/EmptyState.js +4 -2
- package/dist/esm/Components/FeedbackForm/FeedbackForm.js +1 -0
- package/dist/esm/Components/FieldSelectModal/FieldSelectModal.js +1 -0
- package/dist/esm/Components/FilePreview/FilePreview.js +3 -1
- package/dist/esm/Components/FileUpload/FileUpload.js +8 -6
- package/dist/esm/Components/FileUpload/constants.js +1 -0
- package/dist/esm/Components/FileUploader/FileUploader.js +1 -0
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +5 -5
- package/dist/esm/Components/FilterSidebar/filterHoverStyle.js +3 -10
- package/dist/esm/Components/Form/FormWrapper.js +2 -1
- package/dist/esm/Components/Header/components/mobileMenu.js +12 -3
- package/dist/esm/Components/Input/PhoneNumberInput.js +1 -0
- package/dist/esm/Components/Input/Switch/InputSwitch.js +1 -0
- package/dist/esm/Components/Input/TextInput.js +1 -0
- package/dist/esm/Components/Input/TextInput.styles.js +8 -10
- package/dist/esm/Components/InputTextArea/InputTextArea.js +1 -0
- package/dist/esm/Components/InputTextArea/InputTextArea.style.js +7 -6
- package/dist/esm/Components/KanbanBoard/AccountCard.js +1 -0
- package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -0
- package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
- package/dist/esm/Components/KanbanBoard/KanbanBoard.js +1 -0
- package/dist/esm/Components/KanbanBoard/MeasuredItem.js +1 -0
- package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -0
- package/dist/esm/Components/LimitReachedModal/limitReachedCopy.js +2 -0
- package/dist/esm/Components/Loading/Loading.js +13 -11
- package/dist/esm/Components/MoreItems/MoreItems.js +4 -1
- package/dist/esm/Components/MultiSelect/MultiSelect.js +2 -2
- package/dist/esm/Components/NavigationBar/NavigationBar.js +9 -10
- package/dist/esm/Components/NoteTextArea/NoteTextArea.js +10 -4
- package/dist/esm/Components/Notification/Notification.js +1 -0
- package/dist/esm/Components/NumberInput/NumberInput.js +5 -2
- package/dist/esm/Components/NumberInput/NumberInput.styles.js +7 -6
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +14 -10
- package/dist/esm/Components/OrgSwitcher/OrgSwitcherProps.js +1 -0
- package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -3
- package/dist/esm/Components/PdfViewer/PdfViewer.js +7 -1
- package/dist/esm/Components/PinInput/PinInput.js +1 -0
- package/dist/esm/Components/PinInputs/PinInputs.js +1 -0
- package/dist/esm/Components/Primitives/Primitives.js +6 -0
- package/dist/esm/Components/ProductCard/ProductReview.js +6 -1
- package/dist/esm/Components/ProductCard/ProductTags.js +1 -1
- package/dist/esm/Components/ProfileCard/ProfileCard.js +1 -1
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +6 -4
- package/dist/esm/Components/ProgressBar/ProgressBar.js +1 -0
- package/dist/esm/Components/RadioButton/RadioButton.js +3 -2
- package/dist/esm/Components/Reorder/Reorder.js +1 -0
- package/dist/esm/Components/RolesPermission/RolesPermission.js +5 -3
- package/dist/esm/Components/ScrollToTop/ScrollToTop.js +4 -1
- package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +1 -0
- package/dist/esm/Components/Search/Search.js +3 -2
- package/dist/esm/Components/SearchSelect/SearchSelect.js +48 -37
- package/dist/esm/Components/SegmentedControl/SegmentedControl.js +86 -0
- package/dist/esm/Components/SegmentedControl/SegmentedControlProps.js +1 -0
- package/dist/esm/Components/Select/Select.js +5 -3
- package/dist/esm/Components/Select/Select.styles.js +3 -2
- package/dist/esm/Components/SelectSearch/SelectSearch.js +37 -15
- package/dist/esm/Components/SelectV2/SelectV2.js +20 -5
- package/dist/esm/Components/SideBar/SecondaryBar.js +1 -1
- package/dist/esm/Components/SideBar/SideBar.js +5 -3
- package/dist/esm/Components/SideBar/components/MenuItemBox.js +15 -11
- package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +13 -10
- package/dist/esm/Components/Skeletons/Skeletons.js +1 -0
- package/dist/esm/Components/Slider/Slider.js +9 -1
- package/dist/esm/Components/StageProgress/StageItem.js +1 -0
- package/dist/esm/Components/StageProgress/StageProgress.js +1 -0
- package/dist/esm/Components/StageProgress/StageProgressProps.js +7 -5
- package/dist/esm/Components/StageProgress/StepperStage.js +2 -2
- package/dist/esm/Components/Switch/Switch.js +1 -0
- package/dist/esm/Components/Table/Table.js +15 -5
- package/dist/esm/Components/Table/components/Pagination.js +1 -1
- package/dist/esm/Components/Table/components/TableActions.js +2 -2
- package/dist/esm/Components/Table/components/TableBody.js +44 -18
- package/dist/esm/Components/Table/components/TableGroupRow.js +1 -1
- package/dist/esm/Components/Table/components/TableHeader.js +21 -8
- package/dist/esm/Components/Table/components/TableSearch.js +1 -1
- package/dist/esm/Components/Table/filters/CompactSelect.js +29 -8
- package/dist/esm/Components/Table/filters/LeftFilterPane.js +1 -1
- package/dist/esm/Components/Table/settings/ManageColumns.js +8 -5
- package/dist/esm/Components/Table/settings/TableSettings.js +7 -5
- package/dist/esm/Components/Table/variants/TableVariantContext.js +13 -0
- package/dist/esm/Components/Table/variants/classic.js +43 -0
- package/dist/esm/Components/Table/variants/index.js +9 -0
- package/dist/esm/Components/Table/variants/pillInk.js +18 -0
- package/dist/esm/Components/Table/variants/studio.js +46 -0
- package/dist/esm/Components/Table/variants/tokens.js +1 -0
- package/dist/esm/Components/Tag/Tag.js +1 -0
- package/dist/esm/Components/Tag/Tag.styles.js +17 -12
- package/dist/esm/Components/Timeline/Timeline.js +1 -0
- package/dist/esm/Components/Toaster/Toaster.js +1 -0
- package/dist/esm/Components/Toggle/TableToggle.js +72 -17
- package/dist/esm/Components/ToggleSwitch/ToggleSwitch.js +16 -0
- package/dist/esm/Components/ToggleSwitch/ToggleSwitchProps.js +1 -0
- package/dist/esm/Components/ToolTip/ToolTip.js +7 -6
- package/dist/esm/Components/Trail/EditableCell.js +2 -1
- package/dist/esm/Components/Trail/SelectAllCheckbox.js +1 -0
- package/dist/esm/Components/Trail/TrailWorks.js +2 -1
- package/dist/esm/Components/UserDetails/DeactivateConfirmModal.js +1 -1
- package/dist/esm/Components/UserDetails/UserDetails.js +6 -3
- package/dist/esm/Hooks/exclusiveOverlay.js +16 -0
- package/dist/esm/Hooks/useExclusiveOverlay.js +20 -0
- package/dist/esm/Theme/assertPalette.js +3 -2
- package/dist/esm/Theme/chakra/Menu.styles.js +9 -5
- package/dist/esm/Theme/chakra/Popover.styles.js +5 -1
- package/dist/esm/Theme/chakra/componentStyles.js +16 -9
- package/dist/esm/Theme/chakra/createBrandTheme.js +22 -9
- package/dist/esm/Theme/chakra/focusRing.styles.js +40 -0
- package/dist/esm/Theme/provider/ThemeSwitcher.js +5 -2
- package/dist/esm/Theme/tokens/brands/index.js +6 -1
- package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +6 -1
- package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
- package/dist/esm/Theme/tokens/builders/filledSurface.js +67 -0
- package/dist/esm/Theme/tokens/builders/focusRing.js +85 -0
- package/dist/esm/Theme/tokens/builders/index.js +2 -0
- package/dist/esm/Theme/tokens/builders/outlineRung.js +78 -4
- package/dist/esm/Theme/tokens/builders/placeholderInk.js +29 -0
- package/dist/esm/Theme/tokens/builders/resolvedRungs.js +7 -2
- package/dist/esm/Theme/tokens/builders/rowStates.js +15 -0
- package/dist/esm/Theme/tokens/builders/scrollShadow.js +13 -0
- package/dist/esm/Theme/tokens/builders/surfaceRungs.js +20 -10
- package/dist/esm/Utils/table.js +50 -5
- package/dist/esm/index.js +26 -1
- package/dist/index.d.ts +26 -3
- package/dist/index.js +67 -4
- package/package.json +11 -4
package/README.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
A comprehensive React component library built with TypeScript, providing a rich set of UI components for modern web applications.
|
|
4
4
|
|
|
5
|
+
> **Building with this library (including via an AI assistant)?** Read
|
|
6
|
+
> [COMPONENT-GOTCHAS.md](./COMPONENT-GOTCHAS.md) first — it documents known silent-failure traps
|
|
7
|
+
> and which near-duplicate component to pick for what. It ships with this package, so it's
|
|
8
|
+
> available at `node_modules/pixelize-design-library/COMPONENT-GOTCHAS.md` too.
|
|
9
|
+
|
|
5
10
|
## Features
|
|
6
11
|
|
|
7
12
|
- 🎨 **Modern Design System** - Consistent and beautiful components
|
|
@@ -53,6 +58,27 @@ function App() {
|
|
|
53
58
|
export default App;
|
|
54
59
|
```
|
|
55
60
|
|
|
61
|
+
## Theming and filled surfaces
|
|
62
|
+
|
|
63
|
+
Nine brand presets with light/dark palettes. Wrap your app in `PixelizeThemeProvider` and read tokens
|
|
64
|
+
via `useCustomTheme()`.
|
|
65
|
+
|
|
66
|
+
**Do not** pair a scale's `[500]` swatch with `colors.white` or `onPrimary` for custom filled UI —
|
|
67
|
+
white often fails WCAG on `[500]` and ink falls back to black (e.g. black text on red badges). Use
|
|
68
|
+
library components (`Button`, `Tag`, `Badge`) or:
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
import { resolveFilledSurface, useCustomTheme } from "pixelize-design-library";
|
|
72
|
+
|
|
73
|
+
const { colors } = useCustomTheme();
|
|
74
|
+
const solid = resolveFilledSurface(colors.red, colors);
|
|
75
|
+
// solid.fill, solid.color, solid.hoverFill, solid.hoverColor, …
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Full rules for app developers and AI assistants: [`src/Theme/THEME-CONTRACT.md`](src/Theme/THEME-CONTRACT.md)
|
|
79
|
+
(§ *Filled surfaces in consumer apps*). After upgrading, rebuild the library (`npm run build`) and run
|
|
80
|
+
`npm run pixelize` in consumer frontends.
|
|
81
|
+
|
|
56
82
|
## Components
|
|
57
83
|
|
|
58
84
|
### Layout & Navigation
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { AccordionProps } from "./AccordionProps";
|
|
2
|
+
/** Chakra Accordion wrapper for header/content pairs; FilterSidebar composes this directly for its collapsible filter sections. */
|
|
2
3
|
declare const Accordion: ({ allowMultiple, allowToggle, index, onChange, reduceMotion, items, ...rest }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default Accordion;
|
|
@@ -6,7 +6,9 @@ const react_2 = require("@chakra-ui/react");
|
|
|
6
6
|
const lucide_react_1 = require("lucide-react");
|
|
7
7
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
8
8
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
9
|
+
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
9
10
|
const accordionColors_1 = require("./accordionColors");
|
|
11
|
+
/** Chakra Accordion wrapper for header/content pairs; FilterSidebar composes this directly for its collapsible filter sections. */
|
|
10
12
|
const Accordion = ({ allowMultiple, allowToggle, index, onChange, reduceMotion, items, ...rest }) => {
|
|
11
13
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
12
14
|
const isDark = (0, accentText_1.isDarkCanvas)(colors.backgroundColor.main);
|
|
@@ -14,13 +16,14 @@ const Accordion = ({ allowMultiple, allowToggle, index, onChange, reduceMotion,
|
|
|
14
16
|
const headingColor = colors.text[800];
|
|
15
17
|
const bodyColor = colors.text[600];
|
|
16
18
|
const { expandedBg, softHover } = (0, react_1.useMemo)(() => (0, accordionColors_1.getAccordionHoverColors)(colors, isDark), [colors, isDark]);
|
|
19
|
+
const focusRing = (0, react_1.useMemo)(() => (0, outlineRung_1.liftToContrast)(colors.primary[300], colors.background[50], outlineRung_1.AA_NON_TEXT), [colors]);
|
|
17
20
|
return ((0, jsx_runtime_1.jsx)(react_2.Accordion, { allowMultiple: allowMultiple, allowToggle: allowToggle, index: index, onChange: onChange, reduceMotion: reduceMotion, ...rest, children: items.map((item, idx) => {
|
|
18
21
|
var _a;
|
|
19
22
|
return ((0, jsx_runtime_1.jsx)(react_2.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 }) => {
|
|
20
23
|
var _a, _b, _c;
|
|
21
24
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h2", { children: (0, jsx_runtime_1.jsxs)(react_2.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
25
|
boxShadow: "none",
|
|
23
|
-
outline: `0.125rem solid ${
|
|
26
|
+
outline: `0.125rem solid ${focusRing}`,
|
|
24
27
|
outlineOffset: "-0.125rem",
|
|
25
28
|
}, ...item.buttonProps, sx: {
|
|
26
29
|
...(_a = item.customStyles) === null || _a === void 0 ? void 0 : _a.buttonStyle,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { AccordionProps as ChakraAccordionProps, AccordionItemProps, AccordionButtonProps, AccordionPanelProps } from "@chakra-ui/react";
|
|
2
|
+
/** Chakra's AccordionProps plus the header/content rows to render; each row can override its own button/panel/item styles. */
|
|
2
3
|
export type AccordionProps = ChakraAccordionProps & {
|
|
3
4
|
items: {
|
|
4
5
|
header: React.ReactNode;
|
|
5
6
|
content: React.ReactNode;
|
|
7
|
+
/** Spread after the built-in style props (incl. `_hover`) — `bg`/`_hover` here replace, not merge, the expanded/hover highlight. */
|
|
6
8
|
buttonProps?: AccordionButtonProps;
|
|
7
9
|
panelProps?: AccordionPanelProps;
|
|
8
10
|
itemProps?: AccordionItemProps;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { AlertDialogsProps } from "./AlertDialogProps";
|
|
2
|
+
/** Renders a fixed Cancel/Confirm AlertDialog from title+content props — not a substitute for Modal when you need custom footer buttons or slots. */
|
|
2
3
|
declare const AlertDialog: ({ isOpen, onClose, leastDestructiveRef, content, title, confirmButtonText, cancelButtonText, isConfirmLoading, onConfirm, ContentStyle, headerStyle, bodyStyle, footerStyle, closeButtonStyle, button1Style, button2Style, isCentered, key, }: AlertDialogsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default AlertDialog;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const react_1 = require("@chakra-ui/react");
|
|
5
5
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
6
|
+
/** Renders a fixed Cancel/Confirm AlertDialog from title+content props — not a substitute for Modal when you need custom footer buttons or slots. */
|
|
6
7
|
const AlertDialog = ({ isOpen, onClose, leastDestructiveRef, content, title, confirmButtonText = "Yes", cancelButtonText = "No", isConfirmLoading, onConfirm, ContentStyle, headerStyle, bodyStyle, footerStyle, closeButtonStyle, button1Style, button2Style, isCentered, key, }) => {
|
|
7
8
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
8
9
|
return ((0, jsx_runtime_1.jsxs)(react_1.AlertDialog, { motionPreset: "slideInBottom", leastDestructiveRef: leastDestructiveRef, onClose: onClose, isOpen: isOpen, isCentered: isCentered, children: [(0, jsx_runtime_1.jsx)(react_1.AlertDialogOverlay, {}), (0, jsx_runtime_1.jsxs)(react_1.AlertDialogContent, { bg: colors.background[50], sx: ContentStyle, children: [(0, jsx_runtime_1.jsx)(react_1.AlertDialogHeader, { sx: headerStyle, children: title }), (0, jsx_runtime_1.jsx)(react_1.AlertDialogCloseButton, { sx: closeButtonStyle }), (0, jsx_runtime_1.jsx)(react_1.AlertDialogBody, { sx: bodyStyle, children: content }), (0, jsx_runtime_1.jsxs)(react_1.AlertDialogFooter, { sx: footerStyle, children: [(0, jsx_runtime_1.jsx)(react_1.Button, { ref: leastDestructiveRef, onClick: onClose, variant: "outline", colorScheme: "red", size: "sm", sx: button1Style, children: cancelButtonText }), (0, jsx_runtime_1.jsx)(react_1.Button, { colorScheme: "primary", onClick: onConfirm, isLoading: isConfirmLoading, ml: 3, size: "sm", sx: button2Style, children: confirmButtonText })] })] })] }, key));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AlertDialogProps, AlertProps } from "@chakra-ui/react";
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
|
+
/** colorScheme/size/status/variant/addRole (Picked from Chakra's AlertProps) are typed but never read — buttons are hardcoded; style via button1Style/button2Style. */
|
|
3
4
|
export type AlertDialogsProps = Pick<AlertDialogProps, "isOpen" | "onClose" | "leastDestructiveRef"> & Pick<AlertProps, "addRole" | "colorScheme" | "size" | "status" | "variant"> & {
|
|
4
5
|
title: string;
|
|
5
6
|
content: ReactElement;
|
|
@@ -15,5 +16,6 @@ export type AlertDialogsProps = Pick<AlertDialogProps, "isOpen" | "onClose" | "l
|
|
|
15
16
|
closeButtonStyle?: React.CSSProperties;
|
|
16
17
|
button1Style?: React.CSSProperties;
|
|
17
18
|
button2Style?: React.CSSProperties;
|
|
19
|
+
/** React reserves "key" and never forwards it as a prop, so this is always undefined here — no effect. */
|
|
18
20
|
key?: string | number;
|
|
19
21
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { ApexAreaChartProps } from "./ApexAreaChartProps";
|
|
2
|
+
/** Filled line chart (basic/stacked/gradient/sparkline); unlike `ApexLineChart`, `data`/`series` are read fresh via `useMemo` every render, not frozen at mount. */
|
|
2
3
|
declare const ApexAreaChart: ({ variant, data, series, labels, title, titlePosition, height, width, colors, showLegend, legendPosition, yAxisFormatter, }: ApexAreaChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default ApexAreaChart;
|
|
@@ -9,6 +9,7 @@ const react_apexcharts_1 = __importDefault(require("react-apexcharts"));
|
|
|
9
9
|
const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
|
|
10
10
|
const chartColorsFromTheme_1 = require("../../../Theme/tokens/builders/chartColorsFromTheme");
|
|
11
11
|
const chartBase_1 = require("../chartBase");
|
|
12
|
+
/** Filled line chart (basic/stacked/gradient/sparkline); unlike `ApexLineChart`, `data`/`series` are read fresh via `useMemo` every render, not frozen at mount. */
|
|
12
13
|
const ApexAreaChart = ({ variant = "basic", data, series, labels, title, titlePosition = "left", height = 320, width = "100%", colors, showLegend = true, legendPosition = "bottom", yAxisFormatter, }) => {
|
|
13
14
|
const { colors: palette } = (0, useCustomTheme_1.useCustomTheme)();
|
|
14
15
|
const seriesColors = (0, react_1.useMemo)(() => colors !== null && colors !== void 0 ? colors : (0, chartColorsFromTheme_1.getDefaultSeriesColors)(palette), [colors, palette]);
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
/** "sparkline" strips axes, legend and title for a compact inline trend; the others only change fill/stacking. */
|
|
1
2
|
export type AreaChartVariant = "basic" | "stacked" | "gradient" | "sparkline";
|
|
3
|
+
/** One named line in a multi-series area chart; `name` becomes its legend label. */
|
|
2
4
|
export type ApexAreaSeries = {
|
|
3
5
|
name: string;
|
|
4
6
|
data: number[];
|
|
5
7
|
};
|
|
8
|
+
/** Props for the area chart; unlike ApexLineChart, `data`/`series` are re-read every render, not frozen at mount. */
|
|
6
9
|
export type ApexAreaChartProps = {
|
|
7
10
|
variant?: AreaChartVariant;
|
|
11
|
+
/** Ignored entirely once `series` is also passed — `series` always wins, no merge. */
|
|
8
12
|
data?: number[];
|
|
9
13
|
series?: ApexAreaSeries[];
|
|
10
14
|
labels?: string[];
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { ApexBarChartProps } from "./ApexBarChartProps";
|
|
2
|
+
/** Bar chart wrapper around react-apexcharts (horizontal/stacked/distributed via props), themed via chartColorsFromTheme + chartBase. */
|
|
2
3
|
export default function ApexBarChart({ data, labels, title, titlePosition, height, width, barColor, xAxisStyle, yAxisStyle, titleStyle, horizontal, distributed, seriesName, series, stacked, showLegend, legendPosition, }: ApexBarChartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,6 +10,7 @@ const react_apexcharts_1 = __importDefault(require("react-apexcharts"));
|
|
|
10
10
|
const react_2 = require("@chakra-ui/react");
|
|
11
11
|
const chartColorsFromTheme_1 = require("../../../Theme/tokens/builders/chartColorsFromTheme");
|
|
12
12
|
const chartBase_1 = require("../chartBase");
|
|
13
|
+
/** Bar chart wrapper around react-apexcharts (horizontal/stacked/distributed via props), themed via chartColorsFromTheme + chartBase. */
|
|
13
14
|
function ApexBarChart({ data, labels, title, titlePosition, height = 400, width = 500, barColor, xAxisStyle, yAxisStyle, titleStyle, horizontal = false, distributed = false, seriesName = "Data", series, stacked = false, showLegend, legendPosition = "bottom", }) {
|
|
14
15
|
const theme = (0, react_2.useTheme)();
|
|
15
16
|
const palette = theme.colors;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
/** Renders grouped/stacked/distributed bars from `series`, or one series from `data`+`seriesName`; not a substitute for ApexLineChart on trend-over-time data. */
|
|
1
2
|
export type ApexBarChartProps = {
|
|
3
|
+
/** Ignored whenever `series` is also passed — series wins outright and data is silently dropped, not merged. */
|
|
2
4
|
data?: number[];
|
|
3
5
|
labels: string[];
|
|
4
6
|
title?: string;
|
|
7
|
+
/** No default here (renders ApexCharts' native left-align) — every sibling chart in this family defaults it to "center". */
|
|
5
8
|
titlePosition?: "left" | "center" | "right";
|
|
6
9
|
height?: number | string;
|
|
7
10
|
width?: number | string;
|
|
11
|
+
/** Array paints per-bar only when `distributed` is true; otherwise only barColor[0] applies and the rest are silently unused. */
|
|
8
12
|
barColor?: string[];
|
|
9
13
|
xAxisStyle?: StyleProps;
|
|
10
14
|
yAxisStyle?: StyleProps;
|
|
@@ -12,11 +16,13 @@ export type ApexBarChartProps = {
|
|
|
12
16
|
horizontal?: boolean;
|
|
13
17
|
distributed?: boolean;
|
|
14
18
|
seriesName?: string;
|
|
19
|
+
/** Multi-series bars — {name, data}[], not data's flat number[]; passing this alongside `data` makes data a no-op. */
|
|
15
20
|
series?: {
|
|
16
21
|
name: string;
|
|
17
22
|
data: number[];
|
|
18
23
|
}[];
|
|
19
24
|
stacked?: boolean;
|
|
25
|
+
/** Unset default isn't fixed — shows only when `series` has more than one entry; the single-`data` path stays legend-less. */
|
|
20
26
|
showLegend?: boolean;
|
|
21
27
|
legendPosition?: "top" | "right" | "bottom" | "left";
|
|
22
28
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { ApexLineChartProps } from "./ApexLineChartProps";
|
|
2
|
+
/** Line chart wrapper around react-apexcharts, themed via chartColorsFromTheme + chartBase. */
|
|
2
3
|
declare const ApexLineChart: ({ data, labels, title, height, width, lineColors, titlePosition, titleStyle, compact, toolbarBreakpointPct, titleClampLines, showTitleEllipsis, showSeries, series: seriesNames, variant, }: ApexLineChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default ApexLineChart;
|
|
@@ -10,6 +10,7 @@ const react_2 = require("@chakra-ui/react");
|
|
|
10
10
|
const ToolTip_1 = __importDefault(require("../../ToolTip/ToolTip"));
|
|
11
11
|
const chartColorsFromTheme_1 = require("../../../Theme/tokens/builders/chartColorsFromTheme");
|
|
12
12
|
const chartBase_1 = require("../chartBase");
|
|
13
|
+
/** Line chart wrapper around react-apexcharts, themed via chartColorsFromTheme + chartBase. */
|
|
13
14
|
const ApexLineChart = ({ data, labels, title, height, width, lineColors, titlePosition = "center", titleStyle, compact = false, toolbarBreakpointPct = 0.6, titleClampLines, showTitleEllipsis = true, showSeries = true, series: seriesNames, variant = "basic", }) => {
|
|
14
15
|
const theme = (0, react_2.useTheme)();
|
|
15
16
|
const palette = theme.colors;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
+
/** Renders exactly one line from `data`; not a substitute for ApexBarChart/ApexPieChart when comparing multiple series side by side. */
|
|
1
2
|
export type ApexLineChartProps = {
|
|
3
|
+
/** "realtime" doesn't animate your data — after mount it overwrites the series with Math.random() values every second instead. */
|
|
2
4
|
variant?: LineChartVariant;
|
|
5
|
+
/** Read only at mount — later prop updates are silently ignored unless this component remounts (new `key`). */
|
|
3
6
|
data: number[];
|
|
4
7
|
labels?: string[];
|
|
8
|
+
/** Only series[0] is read, as the single line's name — there is no way to render more than one line here. */
|
|
5
9
|
series?: string[];
|
|
6
10
|
title?: string;
|
|
7
11
|
height?: number | string;
|
|
8
12
|
width?: number | string;
|
|
9
13
|
lineColors?: string[];
|
|
14
|
+
/** Ignored once the chart renders in compact/small mode — the fallback title there is always left-aligned regardless of this value. */
|
|
10
15
|
titlePosition?: "left" | "center" | "right";
|
|
16
|
+
/** Despite the name, gates only the tooltip and hover markers — the line itself still renders when this is false. */
|
|
11
17
|
showSeries?: boolean;
|
|
12
18
|
titleStyle?: {
|
|
13
19
|
color?: string;
|
|
@@ -18,6 +24,7 @@ export type ApexLineChartProps = {
|
|
|
18
24
|
compact?: boolean;
|
|
19
25
|
titleClampLines?: number;
|
|
20
26
|
showTitleEllipsis?: boolean;
|
|
27
|
+
/** Declared but never read by this component — has zero effect here; ApexPieChart/ApexPolarCharts implement the same shape and apply it. */
|
|
21
28
|
legendStyle?: {
|
|
22
29
|
colors?: string | string[];
|
|
23
30
|
useSeriesColors?: boolean;
|
|
@@ -25,4 +32,5 @@ export type ApexLineChartProps = {
|
|
|
25
32
|
};
|
|
26
33
|
toolbarBreakpointPct?: number;
|
|
27
34
|
};
|
|
35
|
+
/** Chart mode: "basic" plots `data` as given; "realtime" instead free-runs on random values — see `variant` below. */
|
|
28
36
|
export type LineChartVariant = "basic" | "realtime";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { ApexPieChartProps } from "./ApexPieChartProps";
|
|
2
|
+
/** Pie/donut chart wrapper around react-apexcharts, themed via chartColorsFromTheme + chartBase. */
|
|
2
3
|
declare const ApexPieChart: ({ data, labels, title, height, width, donutColors, chartColor, titlePosition, titleStyle, legendPosition, legendStyle, variant, showDataLabels, minLabelPercent, surfaceColor, donutSize, totalLabel, labelPlacement, }: ApexPieChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default ApexPieChart;
|
|
@@ -17,6 +17,7 @@ const getValidLegendPosition = (position) => {
|
|
|
17
17
|
console.warn(`Invalid legend position: ${position}. Defaulting to 'bottom'.`);
|
|
18
18
|
return "bottom";
|
|
19
19
|
};
|
|
20
|
+
/** Pie/donut chart wrapper around react-apexcharts, themed via chartColorsFromTheme + chartBase. */
|
|
20
21
|
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", }) => {
|
|
21
22
|
var _a;
|
|
22
23
|
const { colors: palette } = (0, useCustomTheme_1.useCustomTheme)();
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
/** Renders pie/donut slices from parallel `data`+`labels` arrays; not a substitute for ApexPolarCharts, whose wedges vary by radius, not arc share. */
|
|
1
2
|
export type ApexPieChartProps = {
|
|
2
3
|
variant?: DonutPieVariant;
|
|
3
4
|
data: number[];
|
|
5
|
+
/** Must be the same length and order as `data` — index i labels index i; a mismatched length misaligns slices silently, no warning. */
|
|
4
6
|
labels: string[];
|
|
5
7
|
title?: string;
|
|
6
8
|
height?: number | string;
|
|
7
9
|
width?: number | string;
|
|
8
10
|
donutColors?: string[];
|
|
11
|
+
/** Wins over `donutColors` when both are set — donutColors is then silently ignored, not merged with it. */
|
|
9
12
|
chartColor?: string[];
|
|
10
13
|
titlePosition?: "left" | "center" | "right";
|
|
11
14
|
titleStyle?: {
|
|
@@ -15,7 +18,9 @@ export type ApexPieChartProps = {
|
|
|
15
18
|
fontFamily?: string;
|
|
16
19
|
};
|
|
17
20
|
legendPosition?: "left" | "right" | "top" | "bottom";
|
|
21
|
+
/** True alone doesn't guarantee labels — with the default labelPlacement="auto", a numeric height under 240 forces them off, no warning. */
|
|
18
22
|
showDataLabels?: boolean;
|
|
23
|
+
/** Slices below this render an empty-string label, not a hidden one — text silently vanishes on small slices even with showDataLabels true. */
|
|
19
24
|
minLabelPercent?: number;
|
|
20
25
|
surfaceColor?: string;
|
|
21
26
|
donutSize?: string;
|
|
@@ -31,4 +36,5 @@ export type ApexPieChartProps = {
|
|
|
31
36
|
markerOffsetY?: number;
|
|
32
37
|
};
|
|
33
38
|
};
|
|
39
|
+
/** Visual preset for the pie/donut fill; "pie-with-image" is fixed to two placeholder images, not configurable via props. */
|
|
34
40
|
export type DonutPieVariant = "pie" | "donut" | "update-donut" | "monochrome-pie" | "gradient-donut" | "semi-donut" | "donut-with-pattern" | "pie-with-image";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { ApexPolarChartProps } from "./ApexPolarChartsProps";
|
|
2
|
+
/** Polar-area chart wrapper around react-apexcharts, themed via chartColorsFromTheme + chartBase. */
|
|
2
3
|
declare const ApexPolarChart: ({ data, labels, title, height, width, chartColors, titlePosition, titleStyle, legendStyle, variant, }: ApexPolarChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default ApexPolarChart;
|
|
@@ -9,6 +9,7 @@ const react_apexcharts_1 = __importDefault(require("react-apexcharts"));
|
|
|
9
9
|
const react_2 = require("@chakra-ui/react");
|
|
10
10
|
const chartColorsFromTheme_1 = require("../../../Theme/tokens/builders/chartColorsFromTheme");
|
|
11
11
|
const chartBase_1 = require("../chartBase");
|
|
12
|
+
/** Polar-area chart wrapper around react-apexcharts, themed via chartColorsFromTheme + chartBase. */
|
|
12
13
|
const ApexPolarChart = ({ data, labels, title, height = 400, width = 500, chartColors, titlePosition = "center", titleStyle, legendStyle, variant = "basic", }) => {
|
|
13
14
|
const theme = (0, react_2.useTheme)();
|
|
14
15
|
const palette = theme.colors;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
/** Renders polarArea wedges (radius varies by value, angles equal) from parallel `data`+`labels`; not a substitute for ApexPieChart's equal-radius arcs. */
|
|
1
2
|
export type ApexPolarChartProps = {
|
|
2
3
|
variant?: PolarVariant;
|
|
3
4
|
data: number[];
|
|
5
|
+
/** Must be the same length and order as `data` — index i labels index i; a mismatched length misaligns wedges silently, no warning. */
|
|
4
6
|
labels: string[];
|
|
5
7
|
title?: string;
|
|
6
8
|
height?: number | string;
|
|
@@ -19,4 +21,5 @@ export type ApexPolarChartProps = {
|
|
|
19
21
|
position?: "top" | "right" | "bottom" | "left";
|
|
20
22
|
};
|
|
21
23
|
};
|
|
24
|
+
/** "monochrome" recolors every wedge as shades of one hue instead of the palette's distinct series colors. */
|
|
22
25
|
export type PolarVariant = "basic" | "monochrome";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { ApexRadialChartProps } from "./ApexRadialChartProps";
|
|
2
|
+
/** Radial/gauge chart (gauge/multi/semi); `hollowSize` is silently overridden to a fixed `"52%"` whenever `variant="multi"`. */
|
|
2
3
|
declare const ApexRadialChart: ({ variant, data, labels, title, titlePosition, height, width, colors, totalLabel, trackColor, hollowSize, }: ApexRadialChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default ApexRadialChart;
|
|
@@ -9,6 +9,7 @@ const react_apexcharts_1 = __importDefault(require("react-apexcharts"));
|
|
|
9
9
|
const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
|
|
10
10
|
const chartColorsFromTheme_1 = require("../../../Theme/tokens/builders/chartColorsFromTheme");
|
|
11
11
|
const chartBase_1 = require("../chartBase");
|
|
12
|
+
/** Radial/gauge chart (gauge/multi/semi); `hollowSize` is silently overridden to a fixed `"52%"` whenever `variant="multi"`. */
|
|
12
13
|
const ApexRadialChart = ({ variant = "gauge", data, labels, title, titlePosition = "left", height = 320, width = "100%", colors, totalLabel = "Total", trackColor, hollowSize = "62%", }) => {
|
|
13
14
|
const { colors: palette } = (0, useCustomTheme_1.useCustomTheme)();
|
|
14
15
|
const ink = (0, chartColorsFromTheme_1.chartInk)(palette);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** "semi" draws a half-circle gauge; "multi" stacks several bars and forces its own hollow size (see `hollowSize`). */
|
|
1
2
|
export type RadialChartVariant = "gauge" | "multi" | "semi";
|
|
3
|
+
/** Props for the radial/gauge chart; `totalLabel` only renders when `variant="multi"`, which also ignores `hollowSize`. */
|
|
2
4
|
export type ApexRadialChartProps = {
|
|
3
5
|
variant?: RadialChartVariant;
|
|
4
6
|
data: number[];
|
|
@@ -10,5 +12,6 @@ export type ApexRadialChartProps = {
|
|
|
10
12
|
colors?: string[];
|
|
11
13
|
totalLabel?: string;
|
|
12
14
|
trackColor?: string;
|
|
15
|
+
/** Ignored when `variant="multi"` — the ring width is hardcoded to `"52%"` in that variant. */
|
|
13
16
|
hollowSize?: string;
|
|
14
17
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { chartMode } from "../../Theme/tokens/builders/chartColorsFromTheme";
|
|
3
|
+
import { type AppOption } from "./AppSwitcherProps";
|
|
4
|
+
/**
|
|
5
|
+
* One hue per app. `avatarColor` hashes into an 8-hue series, so six apps collide more often than
|
|
6
|
+
* not — Billing and Account shipped identical marks. Assigned over the WHOLE list, never the
|
|
7
|
+
* filtered one, so searching cannot repaint a mark.
|
|
8
|
+
*/
|
|
9
|
+
export declare const assignAppHues: (apps: readonly AppOption[], mode: ReturnType<typeof chartMode>) => string[];
|
|
10
|
+
export declare const appTint: (hue: string, surface: string, white: string) => string;
|
|
11
|
+
export declare const appTintInk: (fill: string, white: string, black: string) => string;
|
|
12
|
+
declare const AppMark: React.FC<{
|
|
13
|
+
app: AppOption;
|
|
14
|
+
hue: string;
|
|
15
|
+
boxSize: string;
|
|
16
|
+
iconSize: number;
|
|
17
|
+
muted?: boolean;
|
|
18
|
+
}>;
|
|
19
|
+
export default AppMark;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appTintInk = exports.appTint = exports.assignAppHues = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const react_2 = require("@chakra-ui/react");
|
|
7
|
+
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
8
|
+
const color_1 = require("../../Theme/tokens/builders/color");
|
|
9
|
+
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
10
|
+
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
11
|
+
const accentText_2 = require("../../Theme/tokens/builders/accentText");
|
|
12
|
+
const chartColorsFromTheme_1 = require("../../Theme/tokens/builders/chartColorsFromTheme");
|
|
13
|
+
const statusTone_1 = require("../../Theme/tokens/builders/statusTone");
|
|
14
|
+
const OrgSwitcherProps_1 = require("../OrgSwitcher/OrgSwitcherProps");
|
|
15
|
+
const AppSwitcherProps_1 = require("./AppSwitcherProps");
|
|
16
|
+
// The app's own hue at 85% strength — the solid mark, softened just off full saturation.
|
|
17
|
+
const FILL_STRENGTH = 0.85;
|
|
18
|
+
/**
|
|
19
|
+
* One hue per app. `avatarColor` hashes into an 8-hue series, so six apps collide more often than
|
|
20
|
+
* not — Billing and Account shipped identical marks. Assigned over the WHOLE list, never the
|
|
21
|
+
* filtered one, so searching cannot repaint a mark.
|
|
22
|
+
*/
|
|
23
|
+
const assignAppHues = (apps, mode) => {
|
|
24
|
+
const ramp = chartColorsFromTheme_1.CATEGORICAL_SERIES[mode].map(statusTone_1.resolveAvatarFill);
|
|
25
|
+
const taken = new Set(apps.flatMap((a) => (a.color ? [a.color] : [])));
|
|
26
|
+
return apps.map((app) => {
|
|
27
|
+
if (app.color)
|
|
28
|
+
return app.color;
|
|
29
|
+
const seed = (0, OrgSwitcherProps_1.avatarColor)(app.id || app.name, mode);
|
|
30
|
+
const start = Math.max(0, ramp.indexOf(seed));
|
|
31
|
+
for (let i = 0; i < ramp.length; i += 1) {
|
|
32
|
+
const next = ramp[(start + i) % ramp.length];
|
|
33
|
+
if (!taken.has(next)) {
|
|
34
|
+
taken.add(next);
|
|
35
|
+
return next;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// More apps than the series has hues; past this point a repeat is unavoidable.
|
|
39
|
+
return seed;
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
exports.assignAppHues = assignAppHues;
|
|
43
|
+
// Softening costs the fill contrast, so it is walked back until a WHITE glyph clears AA — every
|
|
44
|
+
// mark keeps the same white icon instead of some flipping to black.
|
|
45
|
+
const appTint = (hue, surface, white) => (0, outlineRung_1.liftToContrast)((0, color_1.mix)(hue, surface, 1 - FILL_STRENGTH), white, accentText_2.AA_NORMAL_TEXT);
|
|
46
|
+
exports.appTint = appTint;
|
|
47
|
+
const appTintInk = (fill, white, black) => (0, accentText_1.onFilled)(fill, white, black);
|
|
48
|
+
exports.appTintInk = appTintInk;
|
|
49
|
+
const AppMark = ({ app, hue, boxSize, iconSize, muted = false, }) => {
|
|
50
|
+
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
51
|
+
if (app.iconUrl) {
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)(react_2.Image, { src: app.iconUrl, alt: "", boxSize: boxSize, borderRadius: "lg", objectFit: "cover", flexShrink: 0, opacity: muted ? 0.55 : 1 }));
|
|
53
|
+
}
|
|
54
|
+
const surface = colors.backgroundColor.light;
|
|
55
|
+
const fill = muted ? colors.backgroundColor.quaternary : (0, exports.appTint)(hue, surface, colors.white);
|
|
56
|
+
const ink = muted ? colors.textMuted : (0, exports.appTintInk)(fill, colors.white, colors.black);
|
|
57
|
+
// lucide icons are forwardRef objects, not functions — a typeof check silently drops them.
|
|
58
|
+
const isElement = (0, react_1.isValidElement)(app.icon);
|
|
59
|
+
const Icon = !isElement && app.icon ? app.icon : null;
|
|
60
|
+
return ((0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: boxSize, borderRadius: "lg", flexShrink: 0, bg: fill, color: ink, fontSize: `${Math.round(iconSize * 0.72)}px`, fontWeight: 700, "aria-hidden": true, children: Icon ? ((0, jsx_runtime_1.jsx)(Icon, { size: iconSize, color: ink })) : (0, react_1.isValidElement)(app.icon) ? ((0, jsx_runtime_1.jsx)(react_2.Box, { display: "flex", color: ink, children: app.icon })) : ((0, AppSwitcherProps_1.appInitials)(app.name)) }));
|
|
61
|
+
};
|
|
62
|
+
exports.default = AppMark;
|