pixelize-design-library 2.4.2-beta.64 → 2.4.2-beta.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +520 -21
- package/COMPONENT-GOTCHAS.md +187 -95
- package/DESIGN-GUIDE.md +54 -10
- package/README.md +37 -3
- package/dist/Components/Accordion/Accordion.js +11 -8
- package/dist/Components/Accordion/AccordionProps.d.ts +4 -0
- package/dist/Components/Accordion/accordionColors.js +1 -2
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -0
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChartProps.d.ts +2 -2
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.d.ts +1 -1
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +6 -5
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChartProps.d.ts +3 -1
- package/dist/Components/Apexcharts/ApexPieChart/pieImageTexture.d.ts +2 -0
- package/dist/Components/Apexcharts/ApexPieChart/pieImageTexture.js +13 -0
- package/dist/Components/AppSwitcher/AppSwitcher.js +6 -3
- package/dist/Components/AppSwitcher/AppSwitcherProps.d.ts +3 -1
- package/dist/Components/AppSwitcher/AppSwitcherProps.js +18 -11
- package/dist/Components/AppSwitcher/pixelizeSuite.d.ts +24 -0
- package/dist/Components/AppSwitcher/pixelizeSuite.js +71 -0
- package/dist/Components/AppearanceSettings/AppearanceSettings.js +3 -3
- package/dist/Components/AppearanceSettings/AppearanceSettingsProps.d.ts +2 -2
- package/dist/Components/Avatar/avatarColorway.d.ts +2 -2
- package/dist/Components/Avatar/avatarColorway.js +7 -6
- package/dist/Components/Breadcrumbs/BreadcrumbsProps.d.ts +1 -1
- package/dist/Components/Button/Button.styles.js +5 -2
- package/dist/Components/Button/ButtonProps.d.ts +2 -4
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +3 -1
- package/dist/Components/CalendarGrid/CalendarGrid.js +5 -3
- package/dist/Components/CalendarGrid/CalendarGridProps.d.ts +1 -1
- package/dist/Components/Card/Card.d.ts +1 -0
- package/dist/Components/Card/Card.js +1 -0
- package/dist/Components/Checkbox/Checkbox.styles.js +3 -1
- package/dist/Components/CheckoutKit/selectable.d.ts +3 -1
- package/dist/Components/CheckoutKit/selectable.js +10 -7
- package/dist/Components/CheckoutKit/tonalHover.d.ts +2 -0
- package/dist/Components/CheckoutKit/tonalHover.js +6 -0
- package/dist/Components/ChoiceCard/ChoiceCard.d.ts +1 -1
- package/dist/Components/ChoiceCard/ChoiceCard.js +2 -1
- package/dist/Components/ChoiceCard/ChoiceCardProps.d.ts +6 -0
- package/dist/Components/Common/FieldMessage.d.ts +1 -0
- package/dist/Components/Common/FormLabel.d.ts +1 -1
- package/dist/Components/Common/FormLabel.js +4 -3
- package/dist/Components/Common/HelperText.d.ts +2 -2
- package/dist/Components/Common/HelperText.js +1 -2
- package/dist/Components/Common/activationKey.d.ts +5 -0
- package/dist/Components/Common/activationKey.js +12 -0
- package/dist/Components/Common/dataAttributes.d.ts +4 -0
- package/dist/Components/Common/fieldMessageStyles.js +2 -1
- package/dist/Components/Common/findSlot.d.ts +2 -0
- package/dist/Components/Common/findSlot.js +24 -0
- package/dist/Components/Common/surfaceFocusRing.d.ts +1 -0
- package/dist/Components/Common/surfaceFocusRing.js +7 -0
- package/dist/Components/ConfirmDialog/ConfirmDialog.js +17 -5
- package/dist/Components/ConfirmDialog/ConfirmDialogProps.d.ts +38 -10
- package/dist/Components/CopyButton/CopyButton.d.ts +4 -1
- package/dist/Components/CopyButton/CopyButton.js +5 -8
- package/dist/Components/CouponField/CouponField.js +5 -2
- package/dist/Components/CustomModulesTable/CustomModulesTable.js +3 -1
- package/dist/Components/DatePicker/CalendarPanel.d.ts +1 -0
- package/dist/Components/DatePicker/CalendarPanel.js +3 -1
- package/dist/Components/DatePicker/DatePicker.js +24 -26
- package/dist/Components/DatePicker/DatePickerProps.d.ts +8 -0
- package/dist/Components/DatePicker/PickerPortal.js +1 -1
- package/dist/Components/DatePicker/RangeDatePicker.d.ts +7 -0
- package/dist/Components/DatePicker/RangeDatePicker.js +10 -29
- package/dist/Components/DatePicker/SingleDatePicker.js +5 -21
- package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -20
- package/dist/Components/DescriptionList/DescriptionList.js +1 -1
- package/dist/Components/DetailSections/DetailSections.js +2 -1
- package/dist/Components/Divider/Divider.d.ts +3 -3
- package/dist/Components/Divider/Divider.js +3 -3
- package/dist/Components/Drawer/Drawer.d.ts +3 -1
- package/dist/Components/Drawer/Drawer.js +28 -26
- package/dist/Components/Drawer/DrawerProps.d.ts +4 -0
- package/dist/Components/Dropdown/DropDown.js +6 -21
- package/dist/Components/Editor/Editor.js +6 -2
- package/dist/Components/Editor/EditorProps.d.ts +17 -1
- package/dist/Components/Editor/editorLabels.js +1 -0
- package/dist/Components/Editor/editorTokenStyles.d.ts +8 -0
- package/dist/Components/Editor/editorTokenStyles.js +9 -1
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.d.ts +1 -1
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +9 -2
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.d.ts +15 -1
- package/dist/Components/EmptyState/EmptyStateProps.d.ts +21 -0
- package/dist/Components/EmptyState/FilteredEmptyState.d.ts +5 -0
- package/dist/Components/EmptyState/FilteredEmptyState.js +23 -0
- package/dist/Components/FieldSelectModal/FieldSelectModal.d.ts +1 -0
- package/dist/Components/FilePreview/FilePreview.js +7 -3
- package/dist/Components/FilePreview/FilePreviewProps.d.ts +2 -1
- package/dist/Components/FileUpload/FileUpload.js +8 -9
- package/dist/Components/FileUpload/FileUploadProps.d.ts +2 -2
- package/dist/Components/FileUploader/FileUploader.js +5 -6
- package/dist/Components/FilterSidebar/FilterSidebar.d.ts +7 -9
- package/dist/Components/FilterSidebar/FilterSidebar.js +90 -233
- package/dist/Components/FilterSidebar/OptionsSection.d.ts +14 -0
- package/dist/Components/FilterSidebar/OptionsSection.js +46 -0
- package/dist/Components/FilterSidebar/RangeSection.d.ts +17 -0
- package/dist/Components/FilterSidebar/RangeSection.js +80 -0
- package/dist/Components/FilterSidebar/SectionHeader.d.ts +13 -0
- package/dist/Components/FilterSidebar/SectionHeader.js +29 -0
- package/dist/Components/FilterSidebar/useStableCallback.d.ts +1 -0
- package/dist/Components/FilterSidebar/useStableCallback.js +12 -0
- package/dist/Components/Form/FormWrapper.d.ts +7 -7
- package/dist/Components/Form/FormWrapper.js +5 -3
- package/dist/Components/FormDrawer/FormDrawer.d.ts +1 -1
- package/dist/Components/FormDrawer/FormDrawer.js +3 -3
- package/dist/Components/FormDrawer/FormDrawerProps.d.ts +2 -0
- package/dist/Components/FormField/FormField.js +1 -1
- package/dist/Components/Header/Header.js +1 -1
- package/dist/Components/Header/HeaderActions.js +4 -2
- package/dist/Components/IconButton/IconButtonProps.d.ts +2 -1
- package/dist/Components/Input/TextInput.js +2 -2
- package/dist/Components/Input/TextInputProps.d.ts +3 -1
- package/dist/Components/KanbanBoard/AccountCard.js +1 -1
- package/dist/Components/KanbanBoard/KanbanBoard.d.ts +1 -1
- package/dist/Components/KanbanBoard/KanbanBoard.js +11 -7
- package/dist/Components/LauncherTrigger/LauncherTrigger.js +1 -1
- package/dist/Components/LazyWrapper/LazyWrapper.d.ts +2 -1
- package/dist/Components/LazyWrapper/LazyWrapper.js +1 -1
- package/dist/Components/MediaViewer/MediaViewer.js +4 -3
- package/dist/Components/MediaViewer/components/MediaAudioPlayer.js +5 -1
- package/dist/Components/MediaViewer/components/MediaImageViewer.js +19 -8
- package/dist/Components/MediaViewer/components/MediaScrubber.js +7 -2
- package/dist/Components/MediaViewer/components/MediaVideoPlayer.js +3 -1
- package/dist/Components/MediaViewer/components/ViewerIconButton.js +3 -1
- package/dist/Components/MediaViewer/hooks/useFileViewer.d.ts +1 -0
- package/dist/Components/MediaViewer/mediaItems.d.ts +1 -0
- package/dist/Components/MediaViewer/mediaItems.js +5 -0
- package/dist/Components/Modal/Modal.d.ts +1 -0
- package/dist/Components/Modal/Modal.js +7 -25
- package/dist/Components/Modal/dialogNaming.d.ts +8 -0
- package/dist/Components/Modal/dialogNaming.js +21 -0
- package/dist/Components/Modal/warnDroppedSlotChildren.d.ts +1 -1
- package/dist/Components/Modal/warnDroppedSlotChildren.js +7 -3
- package/dist/Components/NavLauncher/LauncherTabs.js +4 -3
- package/dist/Components/NavLauncher/NavLauncher.d.ts +1 -1
- package/dist/Components/NavLauncher/NavLauncher.js +288 -56
- package/dist/Components/NavLauncher/NavLauncherProps.d.ts +83 -5
- package/dist/Components/NavLauncher/ScopeBar.d.ts +14 -0
- package/dist/Components/NavLauncher/ScopeBar.js +139 -0
- package/dist/Components/NavLauncher/engine/distance.d.ts +4 -0
- package/dist/Components/NavLauncher/engine/distance.js +41 -0
- package/dist/Components/NavLauncher/engine/engine.d.ts +84 -0
- package/dist/Components/NavLauncher/engine/engine.js +472 -0
- package/dist/Components/NavLauncher/engine/fold.d.ts +15 -0
- package/dist/Components/NavLauncher/engine/fold.js +84 -0
- package/dist/Components/NavLauncher/engine/index.d.ts +21 -0
- package/dist/Components/NavLauncher/engine/index.js +17 -0
- package/dist/Components/NavLauncher/launcherParts.d.ts +14 -0
- package/dist/Components/NavLauncher/launcherParts.js +51 -13
- package/dist/Components/NavLauncher/match.d.ts +13 -2
- package/dist/Components/NavLauncher/match.js +26 -12
- package/dist/Components/NavLauncher/searchLayout.d.ts +61 -0
- package/dist/Components/NavLauncher/searchLayout.js +110 -0
- package/dist/Components/NavLauncher/spotlight.d.ts +39 -0
- package/dist/Components/NavLauncher/spotlight.js +202 -0
- package/dist/Components/NavLauncher/spotlightParts.d.ts +53 -0
- package/dist/Components/NavLauncher/spotlightParts.js +121 -0
- package/dist/Components/NavLauncher/useCopiedFlash.d.ts +6 -0
- package/dist/Components/NavLauncher/useCopiedFlash.js +21 -0
- package/dist/Components/NavigationBar/NavigationBar.js +6 -5
- package/dist/Components/NoteTextArea/NoteTextArea.js +12 -17
- package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +5 -3
- package/dist/Components/Notification/Notification.js +19 -21
- package/dist/Components/Notification/NotificationProps.d.ts +1 -1
- package/dist/Components/NotificationBell/notificationHelpers.d.ts +16 -1
- package/dist/Components/NotificationBell/notificationHelpers.js +13 -7
- package/dist/Components/OffersList/OffersList.js +4 -2
- package/dist/Components/OptionChip/OptionChip.js +3 -2
- package/dist/Components/OptionChip/optionInk.js +4 -2
- package/dist/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +13 -6
- package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +1 -1
- package/dist/Components/OrganizationDetails/OrganizationDetails.js +4 -7
- package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +4 -2
- package/dist/Components/PdfViewer/PdfViewer.d.ts +1 -0
- package/dist/Components/PlanBadge/PlanBadgeProps.d.ts +1 -1
- package/dist/Components/PlanPill/PlanPill.js +4 -2
- package/dist/Components/PlanPill/PlanPillProps.d.ts +1 -1
- package/dist/Components/ProductCard/ProductCardAction.js +2 -1
- package/dist/Components/ProductCard/ProductCardSwatches.js +2 -1
- package/dist/Components/ProductDetails/ProductDetails.js +2 -1
- package/dist/Components/ProfileCard/ProfileCard.d.ts +1 -0
- package/dist/Components/ProfileCard/ProfileCard.js +12 -26
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +4 -2
- package/dist/Components/ProgressBar/ProgressBar.js +2 -1
- package/dist/Components/QuantityStepper/QuantityStepper.js +5 -2
- package/dist/Components/QueryState/QueryStateBoundary.d.ts +1 -1
- package/dist/Components/QueryState/QueryStateBoundary.js +5 -1
- package/dist/Components/QueryState/QueryStateProps.d.ts +6 -2
- package/dist/Components/RadioButton/RadioButton.js +2 -3
- package/dist/Components/RolesPermission/RolesPermission.js +12 -8
- package/dist/Components/ScrollToTop/ScrollToTop.d.ts +1 -0
- package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +4 -1
- package/dist/Components/ScrollbarBox/ScrollbarBox.js +10 -4
- package/dist/Components/SearchSelect/SearchSelect.d.ts +1 -1
- package/dist/Components/SearchSelect/SearchSelect.js +8 -5
- package/dist/Components/SearchSelect/SearchSelectProps.d.ts +3 -3
- package/dist/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/Components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/Components/Select/Select.js +6 -0
- package/dist/Components/Select/SelectNative.d.ts +16 -0
- package/dist/Components/Select/SelectPopup.js +170 -63
- package/dist/Components/Select/SelectProps.d.ts +30 -2
- package/dist/Components/Select/groupedWindow.d.ts +21 -0
- package/dist/Components/Select/groupedWindow.js +50 -0
- package/dist/Components/SelectSearch/SelectSearch.d.ts +1 -1
- package/dist/Components/SelectSearch/SelectSearch.js +48 -38
- package/dist/Components/SelectSearch/SelectSearchProps.d.ts +3 -3
- package/dist/Components/SelectV2/SelectV2.d.ts +1 -1
- package/dist/Components/SelectV2/SelectV2.js +1 -1
- package/dist/Components/SelectV2/SelectV2Props.d.ts +3 -3
- package/dist/Components/SideBar/SecondaryBar.js +3 -2
- package/dist/Components/SideBar/components/MenuItemBox.js +3 -2
- package/dist/Components/SideBar/components/MenuItems.js +1 -1
- package/dist/Components/SideBar/components/OtherApps.js +2 -2
- package/dist/Components/SideBar/components/PinnedSection.js +1 -1
- package/dist/Components/SideBar/sidebarScale.d.ts +2 -2
- package/dist/Components/SideBar/sidebarScale.js +2 -2
- package/dist/Components/SignInActivityTable/SignInActivityTable.js +7 -2
- package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +1 -1
- package/dist/Components/SignInActivityTable/scrollRegionRing.d.ts +10 -0
- package/dist/Components/SignInActivityTable/scrollRegionRing.js +14 -0
- package/dist/Components/Skeletons/SkeletonProps.d.ts +5 -1
- package/dist/Components/Slider/Slider.d.ts +2 -0
- package/dist/Components/Slider/Slider.js +5 -4
- package/dist/Components/StageProgress/StageItem.js +2 -1
- package/dist/Components/StageProgress/StageProgress.js +8 -2
- package/dist/Components/StageProgress/StageProgressProps.d.ts +2 -0
- package/dist/Components/StageProgress/StepperStage.js +2 -1
- package/dist/Components/StickyBuyBar/StickyBuyBar.js +2 -1
- package/dist/Components/Table/Table.js +5 -3
- package/dist/Components/Table/components/HeaderActions.js +5 -3
- package/dist/Components/Table/components/TableBody.js +13 -8
- package/dist/Components/Table/components/TableGroupRow.js +2 -1
- package/dist/Components/Table/components/TableHeader.js +17 -21
- package/dist/Components/Table/components/TableLoading.js +8 -2
- package/dist/Components/Table/components/rowDetail.js +3 -2
- package/dist/Components/Table/filters/ActiveFilters.js +6 -3
- package/dist/Components/Table/filters/CompactSelect.js +2 -1
- package/dist/Components/Table/filters/FilterDatePicker.d.ts +6 -0
- package/dist/Components/Table/filters/FilterDatePicker.js +61 -0
- package/dist/Components/Table/filters/LeftFilterPane.d.ts +1 -0
- package/dist/Components/Table/filters/LeftFilterPane.js +14 -6
- package/dist/Components/Table/hooks/useTable.js +11 -7
- package/dist/Components/Table/settings/ManageColumns.js +4 -3
- package/dist/Components/Table/settings/TableSettings.js +4 -4
- package/dist/Components/Tabs/Tabs.d.ts +1 -0
- package/dist/Components/Tabs/Tabs.js +1 -0
- package/dist/Components/Tabs/components/CountBadge.d.ts +1 -0
- package/dist/Components/Tabs/components/TabList.d.ts +1 -0
- package/dist/Components/Tabs/components/TabList.js +1 -0
- package/dist/Components/Tabs/components/TabPanel.d.ts +1 -0
- package/dist/Components/Tabs/components/TabPanel.js +1 -0
- package/dist/Components/Tabs/tabStyles.js +4 -2
- package/dist/Components/Tag/Tag.js +5 -4
- package/dist/Components/Tag/Tag.styles.js +5 -4
- package/dist/Components/Tag/TagProps.d.ts +4 -1
- package/dist/Components/Tag/tagDot.js +10 -3
- package/dist/Components/TagInput/TagInput.js +6 -5
- package/dist/Components/TagInput/TagInputProps.d.ts +15 -0
- package/dist/Components/TagInput/tagEntries.d.ts +7 -1
- package/dist/Components/TagInput/tagEntries.js +18 -5
- package/dist/Components/TimePicker/TimePicker.js +7 -3
- package/dist/Components/TimePicker/TimePickerProps.d.ts +2 -0
- package/dist/Components/Timeline/Timeline.js +13 -9
- package/dist/Components/Toaster/Toaster.js +2 -1
- package/dist/Components/Toggle/TableToggle.d.ts +1 -1
- package/dist/Components/Toggle/TableToggle.js +1 -1
- package/dist/Components/UpgradeButton/UpgradeButton.js +3 -2
- package/dist/Components/UpgradeButton/UpgradeButtonProps.d.ts +1 -1
- package/dist/Components/UserDetails/UserDetails.js +5 -7
- package/dist/Components/WishlistToggle/WishlistToggle.js +2 -1
- package/dist/Components/WizardDialog/WizardDialog.d.ts +1 -1
- package/dist/Components/WizardDialog/WizardDialog.js +15 -3
- package/dist/Components/WizardDialog/WizardDialogProps.d.ts +5 -3
- package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +11 -1
- package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +6 -3
- package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +16 -15
- package/dist/Hooks/useOutsideMouseDown.d.ts +11 -0
- package/dist/Hooks/useOutsideMouseDown.js +30 -0
- package/dist/Hooks/usePreferences.js +30 -12
- package/dist/Hooks/useScrollableRegion.d.ts +17 -0
- package/dist/Hooks/useScrollableRegion.js +36 -0
- package/dist/Hooks/useSidebarPrefs.d.ts +1 -0
- package/dist/Theme/chakra/Menu.styles.d.ts +4 -0
- package/dist/Theme/chakra/Menu.styles.js +6 -0
- package/dist/Theme/chakra/componentStyles.d.ts +4 -0
- package/dist/Theme/chakra/componentStyles.js +1 -1
- package/dist/Theme/chakra/createBrandTheme.d.ts +1 -0
- package/dist/Theme/chakra/focusRing.styles.d.ts +1 -1
- package/dist/Theme/chakra/focusRing.styles.js +3 -3
- package/dist/Theme/chakra/paletteFromTheme.d.ts +2 -1
- package/dist/Theme/chakra/paletteFromTheme.js +18 -4
- package/dist/Theme/chakra/ringShadow.d.ts +3 -0
- package/dist/Theme/chakra/ringShadow.js +7 -0
- package/dist/Theme/provider/PixelizeThemeProvider.d.ts +1 -0
- package/dist/Theme/provider/ThemeSwitcher.d.ts +1 -0
- package/dist/Theme/provider/ThemeSwitcher.js +1 -1
- package/dist/Theme/testing/testPalette.d.ts +1 -0
- package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +2 -1
- package/dist/Theme/tokens/builders/buildDarkPalette.js +5 -5
- package/dist/Theme/tokens/builders/filledSurface.js +3 -2
- package/dist/Theme/tokens/builders/focusRing.js +4 -1
- package/dist/Theme/tokens/builders/paletteScale.d.ts +2 -0
- package/dist/Theme/tokens/builders/paletteScale.js +10 -0
- package/dist/Theme/tokens/types.d.ts +1 -0
- package/dist/Utils/accountHandoff.d.ts +3 -0
- package/dist/Utils/price.d.ts +1 -0
- package/dist/Utils/tabular.d.ts +30 -0
- package/dist/Utils/tabular.js +61 -0
- package/dist/esm/Components/Accordion/Accordion.js +11 -8
- package/dist/esm/Components/Accordion/accordionColors.js +2 -3
- package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +2 -1
- package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +6 -5
- package/dist/esm/Components/Apexcharts/ApexPieChart/pieImageTexture.js +10 -0
- package/dist/esm/Components/AppSwitcher/AppSwitcher.js +6 -3
- package/dist/esm/Components/AppSwitcher/AppSwitcherProps.js +18 -11
- package/dist/esm/Components/AppSwitcher/pixelizeSuite.js +67 -0
- package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +3 -3
- package/dist/esm/Components/Avatar/avatarColorway.js +4 -4
- package/dist/esm/Components/Button/Button.styles.js +5 -2
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +3 -1
- package/dist/esm/Components/CalendarGrid/CalendarGrid.js +5 -3
- package/dist/esm/Components/Card/Card.js +1 -0
- package/dist/esm/Components/Checkbox/Checkbox.styles.js +3 -1
- package/dist/esm/Components/CheckoutKit/selectable.js +10 -7
- package/dist/esm/Components/CheckoutKit/tonalHover.js +2 -0
- package/dist/esm/Components/ChoiceCard/ChoiceCard.js +2 -1
- package/dist/esm/Components/Common/FormLabel.js +4 -3
- package/dist/esm/Components/Common/HelperText.js +1 -2
- package/dist/esm/Components/Common/activationKey.js +7 -0
- package/dist/esm/Components/Common/fieldMessageStyles.js +2 -1
- package/dist/esm/Components/Common/findSlot.js +17 -0
- package/dist/esm/Components/Common/surfaceFocusRing.js +3 -0
- package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +18 -6
- package/dist/esm/Components/CopyButton/CopyButton.js +5 -8
- package/dist/esm/Components/CouponField/CouponField.js +5 -2
- package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +3 -1
- package/dist/esm/Components/DatePicker/CalendarPanel.js +3 -1
- package/dist/esm/Components/DatePicker/DatePicker.js +25 -27
- package/dist/esm/Components/DatePicker/PickerPortal.js +2 -2
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +10 -29
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +5 -21
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -20
- package/dist/esm/Components/DescriptionList/DescriptionList.js +1 -1
- package/dist/esm/Components/DetailSections/DetailSections.js +2 -1
- package/dist/esm/Components/Divider/Divider.js +3 -3
- package/dist/esm/Components/Drawer/Drawer.js +24 -19
- package/dist/esm/Components/Dropdown/DropDown.js +7 -22
- package/dist/esm/Components/Editor/Editor.js +7 -3
- package/dist/esm/Components/Editor/editorLabels.js +1 -0
- package/dist/esm/Components/Editor/editorTokenStyles.js +7 -0
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +8 -4
- package/dist/esm/Components/EmptyState/FilteredEmptyState.js +18 -0
- package/dist/esm/Components/FilePreview/FilePreview.js +8 -4
- package/dist/esm/Components/FileUpload/FileUpload.js +8 -9
- package/dist/esm/Components/FileUploader/FileUploader.js +6 -7
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +94 -237
- package/dist/esm/Components/FilterSidebar/OptionsSection.js +41 -0
- package/dist/esm/Components/FilterSidebar/RangeSection.js +78 -0
- package/dist/esm/Components/FilterSidebar/SectionHeader.js +23 -0
- package/dist/esm/Components/FilterSidebar/useStableCallback.js +8 -0
- package/dist/esm/Components/Form/FormWrapper.js +5 -3
- package/dist/esm/Components/FormDrawer/FormDrawer.js +3 -3
- package/dist/esm/Components/FormField/FormField.js +1 -1
- package/dist/esm/Components/Header/Header.js +1 -1
- package/dist/esm/Components/Header/HeaderActions.js +6 -4
- package/dist/esm/Components/Input/TextInput.js +2 -2
- package/dist/esm/Components/KanbanBoard/AccountCard.js +1 -1
- package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
- package/dist/esm/Components/KanbanBoard/KanbanBoard.js +11 -7
- package/dist/esm/Components/LauncherTrigger/LauncherTrigger.js +1 -1
- package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -1
- package/dist/esm/Components/MediaViewer/MediaViewer.js +5 -4
- package/dist/esm/Components/MediaViewer/components/MediaAudioPlayer.js +5 -1
- package/dist/esm/Components/MediaViewer/components/MediaImageViewer.js +19 -8
- package/dist/esm/Components/MediaViewer/components/MediaScrubber.js +7 -2
- package/dist/esm/Components/MediaViewer/components/MediaVideoPlayer.js +3 -1
- package/dist/esm/Components/MediaViewer/components/ViewerIconButton.js +3 -1
- package/dist/esm/Components/MediaViewer/mediaItems.js +4 -0
- package/dist/esm/Components/Modal/Modal.js +2 -17
- package/dist/esm/Components/Modal/dialogNaming.js +18 -0
- package/dist/esm/Components/Modal/warnDroppedSlotChildren.js +7 -3
- package/dist/esm/Components/NavLauncher/LauncherTabs.js +4 -3
- package/dist/esm/Components/NavLauncher/NavLauncher.js +291 -59
- package/dist/esm/Components/NavLauncher/ScopeBar.js +136 -0
- package/dist/esm/Components/NavLauncher/engine/distance.js +37 -0
- package/dist/esm/Components/NavLauncher/engine/engine.js +459 -0
- package/dist/esm/Components/NavLauncher/engine/fold.js +75 -0
- package/dist/esm/Components/NavLauncher/engine/index.js +14 -0
- package/dist/esm/Components/NavLauncher/launcherParts.js +46 -10
- package/dist/esm/Components/NavLauncher/match.js +25 -12
- package/dist/esm/Components/NavLauncher/searchLayout.js +101 -0
- package/dist/esm/Components/NavLauncher/spotlight.js +194 -0
- package/dist/esm/Components/NavLauncher/spotlightParts.js +108 -0
- package/dist/esm/Components/NavLauncher/useCopiedFlash.js +17 -0
- package/dist/esm/Components/NavigationBar/NavigationBar.js +6 -5
- package/dist/esm/Components/NoteTextArea/NoteTextArea.js +12 -17
- package/dist/esm/Components/Notification/Notification.js +20 -22
- package/dist/esm/Components/NotificationBell/notificationHelpers.js +12 -6
- package/dist/esm/Components/OffersList/OffersList.js +4 -2
- package/dist/esm/Components/OptionChip/OptionChip.js +3 -2
- package/dist/esm/Components/OptionChip/optionInk.js +4 -2
- package/dist/esm/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +14 -7
- package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -8
- package/dist/esm/Components/PlanPill/PlanPill.js +4 -2
- package/dist/esm/Components/ProductCard/ProductCardAction.js +2 -1
- package/dist/esm/Components/ProductCard/ProductCardSwatches.js +2 -1
- package/dist/esm/Components/ProductDetails/ProductDetails.js +2 -1
- package/dist/esm/Components/ProfileCard/ProfileCard.js +6 -17
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +4 -2
- package/dist/esm/Components/ProgressBar/ProgressBar.js +2 -1
- package/dist/esm/Components/QuantityStepper/QuantityStepper.js +5 -2
- package/dist/esm/Components/QueryState/QueryStateBoundary.js +5 -1
- package/dist/esm/Components/RadioButton/RadioButton.js +2 -3
- package/dist/esm/Components/RolesPermission/RolesPermission.js +12 -8
- package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +9 -3
- package/dist/esm/Components/SearchSelect/SearchSelect.js +8 -5
- package/dist/esm/Components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/esm/Components/Select/Select.js +6 -0
- package/dist/esm/Components/Select/SelectPopup.js +171 -64
- package/dist/esm/Components/Select/groupedWindow.js +44 -0
- package/dist/esm/Components/SelectSearch/SelectSearch.js +49 -39
- package/dist/esm/Components/SelectV2/SelectV2.js +1 -1
- package/dist/esm/Components/SideBar/SecondaryBar.js +3 -2
- package/dist/esm/Components/SideBar/components/MenuItemBox.js +3 -2
- package/dist/esm/Components/SideBar/components/MenuItems.js +1 -1
- package/dist/esm/Components/SideBar/components/OtherApps.js +2 -2
- package/dist/esm/Components/SideBar/components/PinnedSection.js +1 -1
- package/dist/esm/Components/SideBar/sidebarScale.js +2 -2
- package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +8 -3
- package/dist/esm/Components/SignInActivityTable/scrollRegionRing.js +9 -0
- package/dist/esm/Components/Slider/Slider.js +6 -5
- package/dist/esm/Components/StageProgress/StageItem.js +2 -1
- package/dist/esm/Components/StageProgress/StageProgress.js +8 -2
- package/dist/esm/Components/StageProgress/StepperStage.js +2 -1
- package/dist/esm/Components/StickyBuyBar/StickyBuyBar.js +2 -1
- package/dist/esm/Components/Table/Table.js +8 -6
- package/dist/esm/Components/Table/components/HeaderActions.js +7 -5
- package/dist/esm/Components/Table/components/TableBody.js +13 -8
- package/dist/esm/Components/Table/components/TableGroupRow.js +2 -1
- package/dist/esm/Components/Table/components/TableHeader.js +19 -23
- package/dist/esm/Components/Table/components/TableLoading.js +6 -3
- package/dist/esm/Components/Table/components/rowDetail.js +3 -2
- package/dist/esm/Components/Table/filters/ActiveFilters.js +8 -5
- package/dist/esm/Components/Table/filters/CompactSelect.js +2 -1
- package/dist/esm/Components/Table/filters/FilterDatePicker.js +20 -0
- package/dist/esm/Components/Table/filters/LeftFilterPane.js +14 -6
- package/dist/esm/Components/Table/hooks/useTable.js +11 -7
- package/dist/esm/Components/Table/settings/ManageColumns.js +4 -3
- package/dist/esm/Components/Table/settings/TableSettings.js +4 -4
- package/dist/esm/Components/Tabs/Tabs.js +1 -0
- package/dist/esm/Components/Tabs/components/TabList.js +1 -0
- package/dist/esm/Components/Tabs/components/TabPanel.js +1 -0
- package/dist/esm/Components/Tabs/tabStyles.js +5 -3
- package/dist/esm/Components/Tag/Tag.js +5 -4
- package/dist/esm/Components/Tag/Tag.styles.js +5 -4
- package/dist/esm/Components/Tag/tagDot.js +10 -3
- package/dist/esm/Components/TagInput/TagInput.js +8 -7
- package/dist/esm/Components/TagInput/tagEntries.js +16 -4
- package/dist/esm/Components/TimePicker/TimePicker.js +7 -3
- package/dist/esm/Components/Timeline/Timeline.js +14 -10
- package/dist/esm/Components/Toaster/Toaster.js +2 -1
- package/dist/esm/Components/Toggle/TableToggle.js +1 -1
- package/dist/esm/Components/UpgradeButton/UpgradeButton.js +3 -2
- package/dist/esm/Components/UserDetails/UserDetails.js +5 -7
- package/dist/esm/Components/WishlistToggle/WishlistToggle.js +2 -1
- package/dist/esm/Components/WizardDialog/WizardDialog.js +15 -3
- package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +12 -2
- package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +7 -4
- package/dist/esm/Hooks/useOutsideMouseDown.js +26 -0
- package/dist/esm/Hooks/usePreferences.js +30 -12
- package/dist/esm/Hooks/useScrollableRegion.js +33 -0
- package/dist/esm/Theme/chakra/Menu.styles.js +6 -0
- package/dist/esm/Theme/chakra/componentStyles.js +1 -1
- package/dist/esm/Theme/chakra/focusRing.styles.js +3 -3
- package/dist/esm/Theme/chakra/paletteFromTheme.js +16 -3
- package/dist/esm/Theme/chakra/ringShadow.js +3 -0
- package/dist/esm/Theme/provider/ThemeSwitcher.js +1 -1
- package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +5 -5
- package/dist/esm/Theme/tokens/builders/filledSurface.js +3 -2
- package/dist/esm/Theme/tokens/builders/focusRing.js +4 -1
- package/dist/esm/Theme/tokens/builders/paletteScale.js +6 -0
- package/dist/esm/Utils/tabular.js +56 -0
- package/dist/esm/index.js +18 -25
- package/dist/index.d.ts +59 -5
- package/dist/index.js +36 -29
- package/package.json +3 -1
- package/dist/Components/Buttons/Buttons.d.ts +0 -3
- package/dist/Components/Buttons/Buttons.js +0 -9
- package/dist/Components/Buttons/ButtonsProps.d.ts +0 -12
- package/dist/Components/Common/ErrorComponent.d.ts +0 -7
- package/dist/Components/Common/ErrorComponent.js +0 -16
- package/dist/Components/Common/FormattedDescription.d.ts +0 -7
- package/dist/Components/Common/FormattedDescription.js +0 -62
- package/dist/Components/Common/Label.d.ts +0 -9
- package/dist/Components/Common/Label.js +0 -12
- package/dist/Components/Input/Input/Input.d.ts +0 -4
- package/dist/Components/Input/Input/Input.js +0 -75
- package/dist/Components/Input/Input/InputProps.d.ts +0 -24
- package/dist/Components/Input/Input/InputProps.js +0 -2
- package/dist/Components/ProductCard/productCardFixtures.d.ts +0 -7
- package/dist/Components/ProductCard/productCardFixtures.js +0 -61
- package/dist/esm/Components/Buttons/Buttons.js +0 -4
- package/dist/esm/Components/Common/ErrorComponent.js +0 -14
- package/dist/esm/Components/Common/FormattedDescription.js +0 -60
- package/dist/esm/Components/Common/Label.js +0 -10
- package/dist/esm/Components/Input/Input/Input.js +0 -37
- package/dist/esm/Components/Input/Input/InputProps.js +0 -1
- package/dist/esm/Components/ProductCard/productCardFixtures.js +0 -58
- package/dist/esm/services/feedback.js +0 -15
- package/dist/services/feedback.d.ts +0 -12
- package/dist/services/feedback.js +0 -18
- /package/dist/Components/{Buttons/ButtonsProps.js → Common/dataAttributes.js} +0 -0
- /package/dist/esm/Components/{Buttons/ButtonsProps.js → Common/dataAttributes.js} +0 -0
package/DESIGN-GUIDE.md
CHANGED
|
@@ -52,11 +52,31 @@ Borders are the one px value: `borderWidth="1px"`. Fixed widths (side panel, lis
|
|
|
52
52
|
| Body | `Text fontSize="sm" color={colors.text[800]}` |
|
|
53
53
|
| Label / meta / helper | `Text fontSize="xs" color={colors.textMuted}` |
|
|
54
54
|
| KPI tile | `StatCard` — pass `trend` and `goodDirection`; the delta is green when the change is *good* (a shorter sales cycle is green); `iconTone` tints the icon chip (unset = brand primary) |
|
|
55
|
-
| Numbers in tables/columns | `sx={
|
|
56
|
-
|
|
|
55
|
+
| Numbers in tables/columns | `sx={NUMERIC_TEXT}` (root export, tabular figures) so digits align; `Table` columns take `align: "end"` |
|
|
56
|
+
| Code, ids, shortcuts | `fontFamily="mono"` (a real monospace stack); shortcut hints are `KbdShortcut`, never a hand-styled `<kbd>` |
|
|
57
|
+
| Overline (rare) | `textStyle="overline"` |
|
|
57
58
|
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
**`textStyle` sets size, line height, weight and tracking in one prop.** Prefer it to hand-picking
|
|
60
|
+
the four: `<Text textStyle="label">`. The ramp (`TEXT_STYLES`, also a root export):
|
|
61
|
+
|
|
62
|
+
| `textStyle` | Use |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| `title` · `heading` · `subheading` | page / section / card titles (24 · 20 · 16px) |
|
|
65
|
+
| `body` | running text (14px) |
|
|
66
|
+
| `ui` · `label` | control and form text (13px, weight 500 · 600) |
|
|
67
|
+
| `caption` | helper and meta text (12px) |
|
|
68
|
+
| `overline` | small-caps eyebrow (11px, uppercase) |
|
|
69
|
+
|
|
70
|
+
Chakra size keys only (`xs-minus xs xs-plus sm md lg xl 2xl`) — never `fontSize="14px"`.
|
|
71
|
+
`xs-plus` (13px) is the control size; `xs-minus` (11px) is for chips, counts, keyboard hints and
|
|
72
|
+
overlines only; nothing is smaller. Weights: 400 body, 500 labels, 600 titles, 700 KPI numbers only.
|
|
73
|
+
|
|
74
|
+
**Radius and elevation come from the role, not the scale step.** `RADIUS_ROLE` (root export) names
|
|
75
|
+
the radius a surface plays: `control`, `field`, `tooltip` and `media` 8px · `option` 6px · `card`,
|
|
76
|
+
`float`, `dialog` and `sheet` 12px · `chip` full. Anchored popups (`Menu`, `Popover`, `Select`,
|
|
77
|
+
`Dropdown`) all take the 12px radius, and `Menu` and `Popover` the `md` (float) shadow, so a panel
|
|
78
|
+
you build yourself takes `borderRadius={RADIUS_ROLE.float}` and `boxShadow="md"`. A resting card is
|
|
79
|
+
`shadows.card`; heavier shadows belong to floating things only.
|
|
60
80
|
|
|
61
81
|
## 4. Color — pick by role
|
|
62
82
|
|
|
@@ -91,8 +111,9 @@ stay light in dark mode.
|
|
|
91
111
|
| Must stand out (a status that needs attention) | `variant="solid"` |
|
|
92
112
|
| Dense list, table cell, or an already-colored surface | `variant="outline"` — no fill to compete with the surface |
|
|
93
113
|
|
|
94
|
-
`secondary` and `tertiary`
|
|
95
|
-
|
|
114
|
+
`secondary` and `tertiary` are two distinct accents on every brand except `zinc`, which is
|
|
115
|
+
near-grey and has almost no hue to turn (see `COMPONENT-GOTCHAS.md`) — on `zinc`, reach for a
|
|
116
|
+
utility scheme to tell two categories apart.
|
|
96
117
|
|
|
97
118
|
## 5. Controls — two scales, `sm` by default
|
|
98
119
|
|
|
@@ -152,9 +173,10 @@ sections are `Card` with the title in `header`.
|
|
|
152
173
|
|
|
153
174
|
| Pattern | Component — don't hand-build it |
|
|
154
175
|
| --- | --- |
|
|
155
|
-
| Multi-step flow (send, import, onboard) with validated Continue and a review step | `WizardDialog` (`Wizard` inline) — don't hand-roll Back / Continue / Finish around `StageProgress`; each step's `validate` returns its error messages, future steps stay locked until valid, each step's `summary` drives the review |
|
|
176
|
+
| Multi-step flow (send, import, onboard) with validated Continue and a review step | `WizardDialog` (`Wizard` inline; `chrome="inline"` inside a `WorkspaceWindow` or other host that is already the dialog) — don't hand-roll Back / Continue / Finish around `StageProgress`; each step's `validate` returns its error messages, future steps stay locked until valid, each step's `summary` drives the review |
|
|
156
177
|
| Rich-text template with `${field}` placeholders | `Editor mergeFields={…}` — not a `Select` + caret tracking + dialog beside it; use its `label` / `helperText` / `errorMessage` |
|
|
157
178
|
| A PDF behind auth, shown inline | `PdfViewer getBlob={…}` — the toolbar's Open / Download then work with the token, so don't add your own buttons |
|
|
179
|
+
| Data grid | `Table` — defaults to `variant="studio"` (flat small-caps header, one row rule, the select slot resting on the row number, status as a pill). Pass `variant="classic"` for the banded header and per-column rules; don't restyle the header or rows by hand |
|
|
158
180
|
| Toolbar: search · filters · active-filter chips · count · actions | `FilterBar` (`search`, children, `activeFilters` + `onRemoveFilter`/`onClearAll`, `summary`, `actions`) |
|
|
159
181
|
| Read-only label/value grid (record details, key facts) | `DescriptionList` (`items`, `columns`, `layout="inline"` for a side panel, `copyable`, `isLoading`) |
|
|
160
182
|
| Settings row (title + description left, control right) | `SettingRow` inside a `SettingsSection` (`isDanger` for the danger zone, `action` for a header-right button) |
|
|
@@ -177,6 +199,23 @@ sections are `Card` with the title in `header`.
|
|
|
177
199
|
scrim `Box`. `Loading` is the older API and stays on the heavier house scrim by default; pass
|
|
178
200
|
`variant="dim"` to route it through `Backdrop`, or just use `Backdrop` directly.
|
|
179
201
|
|
|
202
|
+
### Parts you reach for through their parent
|
|
203
|
+
|
|
204
|
+
These are root exports, but each belongs to a parent component; start from the parent unless a row
|
|
205
|
+
here says otherwise.
|
|
206
|
+
|
|
207
|
+
| Part | Belongs to | Use it for |
|
|
208
|
+
| --- | --- | --- |
|
|
209
|
+
| `DrawerHeader` · `DrawerBody` · `DrawerFooter` | `Drawer` | the only children a `Drawer` renders; style props go straight on each slot. For a create / edit form use `FormDrawer` instead |
|
|
210
|
+
| `ProfileCardHeader` · `ProfileCardBody` · `ProfileCardFooter` | `ProfileCard` | the only children a `ProfileCard` renders; any other sibling is dropped |
|
|
211
|
+
| `StageItem` | `StageProgress` | one chevron, bar or pill stage; `StageProgress` renders it, so don't lay stages out by hand |
|
|
212
|
+
| `FilePreviewTrigger` | `FilePreview` | a thumbnail button that opens one file in a modal; for several attachments use `MediaViewer` |
|
|
213
|
+
| `MediaScrubber` · `MediaStatusPanel` · `MediaDocumentStage` | `MediaViewer` | building a custom media UI: a `role="slider"` seek bar (`onSeek`), the no-preview / error panel (`tone="warning"` for errors), and the document stage driven by a `resolveDocument` you supply |
|
|
214
|
+
| `LazyWrapper` | `React.lazy` | a `Suspense` boundary with the themed spinner; pass `fallback` to replace it |
|
|
215
|
+
| `ScrollbarBox` | any scrolling region | a themed scroll container; give it an `aria-label`, because it is a keyboard stop while it scrolls |
|
|
216
|
+
| `AppearanceSettings` | a settings page | the theme, colour-mode and font-size controls in one panel; brand and font size are controlled, the colour-mode switch reads the theme context |
|
|
217
|
+
| `ApexPolarChart` | `ApexPieChart` | independent magnitudes as wedges of equal angle and varying radius; values that add to a whole belong in `ApexPieChart` |
|
|
218
|
+
|
|
180
219
|
### Navigation shell
|
|
181
220
|
|
|
182
221
|
`SideBar` is the rail, `NavigationBar` the top bar, `NavLauncher` the full-height "go anywhere" panel.
|
|
@@ -203,6 +242,10 @@ scrim `Box`. `Loading` is the older API and stays on the heavier house scrim by
|
|
|
203
242
|
`headerActions` for the app's own icon button (help, customise) with an `aria-label`.
|
|
204
243
|
- Show the suite's apps with `appsVisibility="always"` and drive plan gating by editing `apps` /
|
|
205
244
|
`locked`.
|
|
245
|
+
- For Spotlight-style search pass `searchMode="spotlight"` plus `synonyms` for the app's jargon
|
|
246
|
+
(`pf`, `wfh`), `scopes` for its entity groups, up to 5 `quickActions`, copyable `facts` on reference
|
|
247
|
+
items and `answers` for one-line lookups. Reuse `LauncherSearchEngine` for any other in-app search
|
|
248
|
+
instead of writing a matcher.
|
|
206
249
|
- Show shortcut hints with `KbdShortcut`, never a hand-styled `<kbd>`.
|
|
207
250
|
|
|
208
251
|
## 7. Every page has four states
|
|
@@ -232,7 +275,8 @@ hides its primary; when only one section is empty on a populated page, that sect
|
|
|
232
275
|
`Menu`…) come from `pixelize-design-library` too. Anything the library owns a component for
|
|
233
276
|
(`Tabs`, `Accordion`, `Modal`, `Card`, `Select`, `TextInput`, `Skeletons`…) has no Chakra
|
|
234
277
|
passthrough at all — the owned component is the only one.
|
|
235
|
-
- Reaching for `SelectV2
|
|
278
|
+
- Reaching for `SelectV2` (`@deprecated`), `SearchSelect` or `SelectSearch` (not deprecated, but not the
|
|
279
|
+
preferred picker) in new work.
|
|
236
280
|
One picker now: `Select` (`native={false}` for the themed, searchable, multi popup).
|
|
237
281
|
`Dropdown` is the exception — it is an action menu, not a picker, and is not replaced.
|
|
238
282
|
- A card inside a card; a border on a content `Card` (it is borderless by default), or any resting
|
|
@@ -260,8 +304,8 @@ not shipped in this package). Start from the closest one:
|
|
|
260
304
|
| Settings / long form | `settings.tsx` | `SectionRail` (rail from `lg`, `Select` below, dirty dots), `SettingsSection` + `SettingRow`, `SaveBar`, danger zone |
|
|
261
305
|
| Board | `pipeline.tsx` | `KanbanBoard` with custom cards and column totals (`height`/`maxH` to size it) |
|
|
262
306
|
| Inbox / master–detail | `inbox.tsx` | selectable list rows, conversation pane, composer, mobile list↔detail |
|
|
263
|
-
| App launcher (browse, pins, recents, search with actions) | `launcher.tsx` (`/examples/launcher`) | `NavLauncher` + `LauncherTrigger` in `NavigationBar leading`, app-owned registry and permission filter, pinned / frequent / recent ids, `linkAs`, remote results via `extraResults`, `isLoading`, `SideBar pinnedItems
|
|
264
|
-
| Wizard / multi-step dialog | `wizard.tsx` (`/examples/wizard`) | `WizardDialog` and inline `
|
|
307
|
+
| App launcher (browse, pins, recents, search with actions) | `launcher.tsx` (`/examples/launcher`) | `NavLauncher` + `LauncherTrigger` in `NavigationBar leading`, app-owned registry and permission filter, pinned / frequent / recent ids, `linkAs`, remote results via `extraResults`, `isLoading`, `SideBar pinnedItems`, Classic / Spotlight toggle, synonyms, scopes, quick actions, company facts with Copy, answers |
|
|
308
|
+
| Wizard / multi-step dialog | `wizard.tsx` (`/examples/wizard`) | `WizardDialog`, inline `Wizard` and `WizardDialog chrome="inline"` in a `WorkspaceWindow`: per-step `validate` messages, locked future steps, error summary, `summary`-driven review, `isFinishing` |
|
|
265
309
|
| Template editor with merge fields | `templateEditor.tsx` (`/examples/template-editor`) | `Editor mergeFields`: grouped Insert field, chips, unknown-field error chips and `onUnknownTokens`, Make dynamic, side preview, label / helper / error |
|
|
266
310
|
| Shop front (home → listing → product → bag → checkout → order) | `storefront/` | `ProductCard` grid / rail / quick-add, `ProductDetails` + `StickyBuyBar`, `CartItem`, `OrderSummary`, `CouponField`, address/payment groups, `OrderStatusTimeline`, `BagBar`; mobile frame + desktop |
|
|
267
311
|
|
package/README.md
CHANGED
|
@@ -45,14 +45,17 @@ tracks Chakra 2.8.
|
|
|
45
45
|
|
|
46
46
|
Two dist-tags are published: `latest` (stable) and `beta` (the active feature line).
|
|
47
47
|
|
|
48
|
-
**On a `beta` version, pin the exact version — never a caret range.** `^
|
|
49
|
-
satisfied by the stable `
|
|
48
|
+
**On a `beta` version, pin the exact version — never a caret range.** `^X.Y.Z-beta.N` is
|
|
49
|
+
satisfied by the stable `X.Y.Z` as soon as it exists, so a routine `npm install` silently
|
|
50
50
|
swaps a newer prerelease for an older stable build with no warning.
|
|
51
51
|
|
|
52
52
|
```json
|
|
53
|
-
"pixelize-design-library": "
|
|
53
|
+
"pixelize-design-library": "X.Y.Z-beta.N"
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
+
`X.Y.Z-beta.N` is whatever `npm view pixelize-design-library dist-tags` prints as `beta`.
|
|
57
|
+
`npm install pixelize-design-library@beta` saves a caret range, so add `--save-exact`.
|
|
58
|
+
|
|
56
59
|
What changed in each release, and what is staged to break in the next major:
|
|
57
60
|
[CHANGELOG.md](CHANGELOG.md).
|
|
58
61
|
|
|
@@ -158,6 +161,9 @@ Full rules for app developers and AI assistants: [`src/Theme/THEME-CONTRACT.md`]
|
|
|
158
161
|
### Editor
|
|
159
162
|
- **Editor** - Rich text editor component
|
|
160
163
|
|
|
164
|
+
The lists above are the common components. Every export, including the helpers, hooks and tokens, is
|
|
165
|
+
in the [Exports index](#exports-index).
|
|
166
|
+
|
|
161
167
|
## Usage Examples
|
|
162
168
|
|
|
163
169
|
### Basic Button Usage
|
|
@@ -379,6 +385,34 @@ transpiled by your bundler rather than imported by bare Node. In Next.js:
|
|
|
379
385
|
module.exports = { transpilePackages: ['pixelize-design-library'] };
|
|
380
386
|
```
|
|
381
387
|
|
|
388
|
+
## Exports index
|
|
389
|
+
|
|
390
|
+
Every value the package root exports, so an export is never invisible to a developer or an LLM that
|
|
391
|
+
only has this package. For how to use a component see [DESIGN-GUIDE.md](./DESIGN-GUIDE.md) and
|
|
392
|
+
[COMPONENT-GOTCHAS.md](./COMPONENT-GOTCHAS.md); props are documented in the `*Props` types. This
|
|
393
|
+
block is generated: after adding or removing an export run
|
|
394
|
+
`UPDATE_README_EXPORTS=1 npx jest src/readmeExportsIndex.test.ts --coverage=false`.
|
|
395
|
+
|
|
396
|
+
<!-- exports-index:start -->
|
|
397
|
+
|
|
398
|
+
**Components and primitives (256)**
|
|
399
|
+
|
|
400
|
+
`Accordian`, `Accordion`, `AddressCard`, `AddressCardGroup`, `Alert`, `AlertDescription`, `AlertDialog`, `AlertIcon`, `AlertTitle`, `ApexAreaChart`, `ApexBarChart`, `ApexLineChart`, `ApexPieChart`, `ApexPolarChart`, `ApexRadialChart`, `AppSwitcher`, `AppearanceSettings`, `AudioRecorder`, `Avatar`, `AvatarGroup`, `Backdrop`, `Badge`, `BagBar`, `Box`, `Breadcrumbs`, `BulkSelectionBar`, `Button`, `ButtonGroupIcon`, `CalendarGrid`, `Card`, `CartItem`, `Center`, `ChakraProvider`, `Checkbox`, `ChoiceCard`, `ChoiceCardGroup`, `CircularProgress`, `Collapse`, `ConfirmDialog`, `ContactForm`, `Container`, `CopyButton`, `CouponField`, `CustomModulesTable`, `DatePicker`, `DescriptionList`, `DetailSections`, `Divider`, `Drawer`, `DrawerBody`, `DrawerFooter`, `DrawerHeader`, `Dropdown`, `Editor`, `EmptyState`, `ErrorState`, `FeedbackForm`, `FieldMessage`, `FieldSelectModal`, `FilePreview`, `FilePreviewTrigger`, `FileUpload`, `FileUploader`, `FilterBar`, `FilterSidebar`, `FilteredEmptyState`, `Flex`, `FormControl`, `FormDrawer`, `FormErrorMessage`, `FormField`, `FormHelperText`, `FormLabel`, `FormWrapper`, `Grid`, `GridItem`, `Header`, `HeaderActions`, `Heading`, `Hide`, `Icon`, `IconButton`, `Image`, `InputSwitch`, `InputTextArea`, `KanbanActions`, `KanbanBoard`, `Kbd`, `KbdShortcut`, `LauncherSearchEngine`, `LauncherTrigger`, `LazyWrapper`, `LimitReachedModal`, `Link`, `List`, `ListIcon`, `ListItem`, `Loading`, `MediaAudioPlayer`, `MediaDocumentStage`, `MediaGallery`, `MediaImageViewer`, `MediaLightbox`, `MediaScrubber`, `MediaStatusPanel`, `MediaVideoPlayer`, `MediaViewer`, `Menu`, `MenuButton`, `MenuDivider`, `MenuGroup`, `MenuItem`, `MenuItemOption`, `MenuList`, `MenuOptionGroup`, `Modal`, `ModalBody`, `ModalFooter`, `ModalHeader`, `MoreItems`, `MultiSelect`, `NavLauncher`, `NavigationBar`, `NewTabLink`, `NoteTextArea`, `Notification`, `NotificationBell`, `NotificationItem`, `NotificationList`, `NotificationPanel`, `NumberInput`, `OffersList`, `OptionChip`, `OrderStatusTimeline`, `OrderSummary`, `OrderedList`, `OrgSwitcher`, `OrganizationDetails`, `OverflowToolTip`, `PageHeader`, `Pagination`, `PaymentCard`, `PaymentOption`, `PaymentOptionGroup`, `PdfViewer`, `PersonChip`, `PhoneNumberInput`, `PinInput`, `PinToggle`, `PincodeChecker`, `PixelizeThemeProvider`, `PlanBadge`, `PlanPill`, `Popover`, `PopoverArrow`, `PopoverBody`, `PopoverCloseButton`, `PopoverContent`, `PopoverFooter`, `PopoverHeader`, `PopoverTrigger`, `Portal`, `PriceBlock`, `ProductBadges`, `ProductCard`, `ProductCardGrid`, `ProductCardSkeleton`, `ProductDetails`, `ProfileCard`, `ProfileCardBody`, `ProfileCardFooter`, `ProfileCardHeader`, `ProfilePhotoViewer`, `ProgressBar`, `QuantityStepper`, `QueryStateBoundary`, `QuickAddSheet`, `RadioButton`, `RadioButtonGroup`, `RangeSlider`, `Rating`, `Reorder`, `ReviewList`, `ReviewSummary`, `RolesPermission`, `SaveBar`, `ScrollToTop`, `ScrollbarBox`, `Search`, `SearchSelect`, `SectionRail`, `SegmentedControl`, `Select`, `SelectSearch`, `SelectV2`, `SettingRow`, `SettingsSection`, `Show`, `SideBar`, `SignInActivityTable`, `SimpleGrid`, `Skeletons`, `SkipLink`, `Slider`, `Spacer`, `SpecTable`, `Spinner`, `Stack`, `StageItem`, `StageProgress`, `StatCard`, `StatusTag`, `StickyBuyBar`, `StockStatus`, `Switch`, `Tab`, `TabList`, `TabPanel`, `TabPanels`, `Table`, `TableContainer`, `TableRoot`, `TableToggle`, `Tabs`, `Tag`, `TagInput`, `Tbody`, `Td`, `Text`, `TextInput`, `Tfoot`, `Th`, `Thead`, `ThemeSwitcher`, `ThemesList`, `TimePicker`, `Timeline`, `Toaster`, `ToggleSwitch`, `ToolTip`, `Tr`, `TrustBadges`, `UnorderedList`, `UpgradeButton`, `UserDetails`, `VariantSelector`, `VerifyEmailOtp`, `VisuallyHidden`, `WishlistToggle`, `Wizard`, `WizardDialog`, `WorkspaceTray`, `WorkspaceTrayPreview`, `WorkspaceWindow`, `Wrap`, `WrapItem`
|
|
401
|
+
|
|
402
|
+
**Hooks (18)**
|
|
403
|
+
|
|
404
|
+
`useAnchoredPanelHeight`, `useAppSwitcherShortcut`, `useBreakpointValue`, `useChartTheme`, `useCustomTheme`, `useDebouncedCallback`, `useDebouncedValue`, `useDisclosure`, `useFieldIds`, `useFileViewer`, `useFontSizeSync`, `useIsTruncated`, `useMediaQuery`, `usePrefersReducedMotion`, `useSidebarPrefs`, `useThemeMode`, `useToaster`, `useToken`
|
|
405
|
+
|
|
406
|
+
**Constants (45)**
|
|
407
|
+
|
|
408
|
+
`AA_NON_TEXT`, `AA_NORMAL_TEXT`, `ACCENT_GRADIENT`, `AVATAR_SEEDS`, `BORDER_WIDTHS`, `CALENDAR_DAY_CLASS`, `CATEGORICAL_SERIES`, `CONTROL_SIZES`, `CONTROL_SIZE_NAMES`, `DARK_CANVAS_LUMINANCE`, `DAY_STATE_KEYS`, `DEFAULT_CONTROL_SIZE`, `DEFAULT_DATE_FALLBACK`, `DEFAULT_FONT_SIZE`, `DISABLED_OPACITY`, `EMAIL_REGEX`, `FOCUS_HALO_WIDTH`, `FOCUS_RING_WIDTH`, `FOCUS_VISIBLE_OVER_STATE`, `FONT_SIZE_OPTIONS`, `LOW_STOCK_THRESHOLD`, `MAX_ZOOM`, `MIN_ZOOM`, `MOTION_BEZIER`, `MOTION_EASE`, `MOTION_EASE_IN`, `MOTION_EASE_OUT`, `MOTION_KEEP_CLASS`, `MOTION_LOOP_MS`, `MOTION_MS`, `MOTION_PRESS_SCALE`, `NUMERIC_TEXT`, `OVERLAY_BLUR`, `PIXELIZE_SUITE`, `PLAYBACK_SPEEDS`, `RADIUS_ROLE`, `RAISED_OVERLAY`, `REDUCED_MOTION_QUERY`, `SCRIM_OPACITY`, `SCROLLBAR_WIDTH`, `SEEK_STEP_SECONDS`, `STATUS_INK`, `TEXT_STYLES`, `TONES`, `ZOOM_STEP`
|
|
409
|
+
|
|
410
|
+
**Helpers and tokens (185)**
|
|
411
|
+
|
|
412
|
+
`HStack`, `VStack`, `accentTextOnCanvas`, `accentTextOnPlanes`, `appInitials`, `avatarFillFor`, `avatarScaleKeyFor`, `bandOn`, `brandThemes`, `buildDarkPalette`, `buildFileItems`, `buildFocusRing`, `buildMediaItems`, `buildSuiteApps`, `buildSurfaceRaised`, `cardRule`, `chartAxisLabelColor`, `chartInk`, `chartMode`, `chipBorder`, `chipFill`, `chipHtml`, `chipify`, `clearChunkReloadGuard`, `compositeOver`, `contrastRatio`, `controlSizeStyles`, `countMedia`, `createAccountHandoff`, `createEnumLabelResolver`, `darkPalettes`, `darkerFillRung`, `debounce`, `default`, `defaultMediaAudioPlayerLabels`, `defaultMediaDocumentStageLabels`, `defaultMediaGalleryLabels`, `defaultMediaImageViewerLabels`, `defaultMediaLightboxLabels`, `defaultMediaVideoPlayerLabels`, `defaultMediaViewerLabels`, `defaultPaginationLabels`, `defaultValidationMessages`, `describeDayStates`, `discountAmount`, `discountPercent`, `downloadBlob`, `extendTheme`, `extractTokens`, `fieldControlStyles`, `fieldLabelStyles`, `fieldMessageStyles`, `fieldSurfaces`, `fieldToken`, `fileKind`, `filterApps`, `findVariant`, `firstAvailableSelection`, `firstInvalidStep`, `flattenScreens`, `focusRingShadow`, `focusVisibleRing`, `focusVisibleStyles`, `formatCount`, `formatDate`, `formatDateRange`, `formatDateTime`, `formatPlanElapsed`, `formatPlanExpiry`, `formatPlanRemaining`, `formatPrice`, `formatRelativeTime`, `formatShortcut`, `getApiErrorMessage`, `getApiErrorStatus`, `getCategoricalSeriesColors`, `getDefaultSeriesColors`, `globalScrollbarStyles`, `gradientCss`, `groupConsecutive`, `hexToHsl`, `hexToRgb`, `hexToRgba`, `highlightSegments`, `hslToHex`, `hslToRgb`, `humanize`, `initialsFor`, `inkSafeGradient`, `inkSafeGradientToken`, `installPreloadErrorReload`, `isAllowedReturnUrl`, `isChunkLoadError`, `isControlSize`, `isDarkCanvas`, `isDayStateKey`, `isFontSize`, `isOptionAvailable`, `isTone`, `labelOnFill`, `labelOnSeries`, `lazyWithRetry`, `liftToContrast`, `lightPalettes`, `listRowBackgrounds`, `matchesShortcut`, `meetsBodyText`, `mergeRefs`, `mix`, `motionTransition`, `onFilled`, `onGradient`, `optionRowCursorSx`, `optionRowDescriptionInk`, `optionRowFill`, `optionRowInk`, `optionRowWeight`, `overlayScrim`, `overlayScrimStyles`, `palettes`, `pickAccentText`, `placeholderInk`, `placeholderInkOn`, `planPreview`, `priceRange`, `rafThrottle`, `raisedRule`, `recessOn`, `reducedMotionSx`, `relativeLuminance`, `remainingStock`, `resolveAvatarColorway`, `resolveAvatarFill`, `resolveDayStateVisual`, `resolveFilledSurface`, `resolveFontSize`, `resolveGradient`, `resolveMediaUrl`, `resolvePlanBadge`, `resolveReturnUrl`, `resolveSoftTone`, `resolveStatusTone`, `resolveSuiteApps`, `rgbToHex`, `rgbToHsl`, `ruleOn`, `safeFileName`, `scrollbarStyles`, `searchLauncher`, `searchLauncherSections`, `sectionizeByDay`, `selectionComplete`, `serializeChips`, `setRef`, `settleBetween`, `shadowsFor`, `solidFillRung`, `splitMonthsAndDays`, `statusGradient`, `stockState`, `themeNames`, `toCsv`, `toWords`, `toneInk`, `toneScale`, `toneToColorScheme`, `toneToSemantic`, `tooltipSurface`, `transitionFor`, `unitPrice`, `unknownTokens`, `validateEmail`, `validateFile`, `validateFileSize`, `validateFileType`, `validatePassword`, `validatePositiveNumber`, `validateRequired`, `validateVideoFile`, `validateVideoFileType`, `validateYoutubeUrl`, `withFocusRing`, `withLightness`, `withOutlineRung`, `wizardTransition`
|
|
413
|
+
|
|
414
|
+
<!-- exports-index:end -->
|
|
415
|
+
|
|
382
416
|
## Demo app
|
|
383
417
|
|
|
384
418
|
`npm start` runs a local component explorer on `http://localhost:5173` — every exported
|
|
@@ -9,6 +9,7 @@ const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
|
9
9
|
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
10
10
|
const motion_2 = require("../../Theme/chakra/motion");
|
|
11
11
|
const accordionColors_1 = require("./accordionColors");
|
|
12
|
+
const HEADER_ACTION_RIGHT = "3.25rem";
|
|
12
13
|
/** Chakra Accordion wrapper for header/content pairs; FilterSidebar composes this directly for its collapsible filter sections. */
|
|
13
14
|
const Accordion = ({ allowMultiple, allowToggle, index, onChange, reduceMotion, items, ...rest }) => {
|
|
14
15
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
@@ -21,14 +22,16 @@ const Accordion = ({ allowMultiple, allowToggle, index, onChange, reduceMotion,
|
|
|
21
22
|
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) => {
|
|
22
23
|
var _a;
|
|
23
24
|
return ((0, jsx_runtime_1.jsx)(react_2.AccordionItem, { border: "1px solid", borderColor: border, borderRadius: "xl", bg: colors.background[50], boxShadow: "none", mb: 3, overflow: "hidden", _last: { mb: 0 }, ...item.itemProps, sx: (_a = item.customStyles) === null || _a === void 0 ? void 0 : _a.itemStyle, children: ({ isExpanded }) => {
|
|
24
|
-
var _a, _b, _c;
|
|
25
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
...(_b = item.customStyles) === null || _b === void 0 ? void 0 : _b.
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
var _a, _b, _c, _d, _e;
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { as: "h2", position: item.headerAction ? "relative" : undefined, sx: item.headerAction
|
|
27
|
+
? { "&:hover > button": { background: isExpanded ? expandedBg : softHover, ...(_a = item.customStyles) === null || _a === void 0 ? void 0 : _a.hoverbuttonStyle } }
|
|
28
|
+
: undefined, children: [(0, jsx_runtime_1.jsxs)(react_2.AccordionButton, { px: 4, py: 3, gap: 3, fontSize: "sm", fontWeight: 600, color: headingColor, bg: isExpanded ? expandedBg : "transparent", transition: (0, motion_1.transitionFor)(["background-color"]), _hover: { bg: isExpanded ? expandedBg : softHover }, _focusVisible: focusRing, ...item.buttonProps, sx: {
|
|
29
|
+
...(0, motion_2.reducedMotionSx)(),
|
|
30
|
+
...(_b = item.customStyles) === null || _b === void 0 ? void 0 : _b.buttonStyle,
|
|
31
|
+
"&:hover": {
|
|
32
|
+
...(_c = item.customStyles) === null || _c === void 0 ? void 0 : _c.hoverbuttonStyle,
|
|
33
|
+
},
|
|
34
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", flex: "1", textAlign: "left", children: item.header }), (0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "1.5rem", flexShrink: 0, borderRadius: "lg", color: isExpanded ? colors.accentText : colors.textMuted, bg: isExpanded ? colors.primary.opacity[16] : "transparent", transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)", transition: (0, motion_1.transitionFor)(["transform", "color", "background-color"], "base"), sx: (0, motion_2.reducedMotionSx)(), children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16 }) })] }), item.headerAction && ((0, jsx_runtime_1.jsx)(react_2.Flex, { position: "absolute", top: "50%", right: HEADER_ACTION_RIGHT, transform: "translateY(-50%)", align: "center", sx: (_d = item.customStyles) === null || _d === void 0 ? void 0 : _d.headerActionStyle, children: item.headerAction }))] }), (0, jsx_runtime_1.jsx)(react_2.AccordionPanel, { px: 4, pt: 1, pb: 4, fontSize: "sm", lineHeight: "1.5", color: bodyColor, ...item.panelProps, sx: (_e = item.customStyles) === null || _e === void 0 ? void 0 : _e.panelStyle, children: item.content })] }));
|
|
32
35
|
} }, idx));
|
|
33
36
|
}) }));
|
|
34
37
|
};
|
|
@@ -6,11 +6,15 @@ export type AccordionProps = ChakraAccordionProps & {
|
|
|
6
6
|
content: React.ReactNode;
|
|
7
7
|
/** Spread after the built-in style props (incl. `_hover`) — `bg`/`_hover` here replace, not merge, the expanded/hover highlight. */
|
|
8
8
|
buttonProps?: AccordionButtonProps;
|
|
9
|
+
/** A control over the header's trailing edge, beside the button (a button inside a button is invalid); the header hover stays lit while the pointer is on it. Reserve its width in `header`. */
|
|
10
|
+
headerAction?: React.ReactNode;
|
|
9
11
|
panelProps?: AccordionPanelProps;
|
|
10
12
|
itemProps?: AccordionItemProps;
|
|
11
13
|
customStyles?: {
|
|
12
14
|
buttonStyle?: React.CSSProperties;
|
|
13
15
|
hoverbuttonStyle?: React.CSSProperties;
|
|
16
|
+
/** Overrides the action's default `right` (button padding + chevron slot); set it when `buttonStyle` changes the button padding. */
|
|
17
|
+
headerActionStyle?: React.CSSProperties;
|
|
14
18
|
panelStyle?: React.CSSProperties;
|
|
15
19
|
itemStyle?: React.CSSProperties;
|
|
16
20
|
};
|
|
@@ -25,7 +25,6 @@ exports.getAccordionHoverColors = getAccordionHoverColors;
|
|
|
25
25
|
const accordionFocusRing = (colors) => ({
|
|
26
26
|
outline: "2px solid transparent",
|
|
27
27
|
outlineOffset: "-2px",
|
|
28
|
-
boxShadow:
|
|
29
|
-
`inset 0 0 0 ${focusRing_styles_1.FOCUS_RING_WIDTH}px ${colors.focusRing.halo}`,
|
|
28
|
+
boxShadow: (0, focusRing_styles_1.insetFocusRingShadow)(colors),
|
|
30
29
|
});
|
|
31
30
|
exports.accordionFocusRing = accordionFocusRing;
|
|
@@ -97,6 +97,7 @@ const ApexLineChart = ({ data, labels, title, height, width, lineColors, titlePo
|
|
|
97
97
|
zoom: { enabled: !isSmall },
|
|
98
98
|
toolbar: { show: showToolbar },
|
|
99
99
|
}),
|
|
100
|
+
theme: { mode: (0, chartColorsFromTheme_1.chartMode)(palette) },
|
|
100
101
|
stroke: { curve: "smooth", width: 2, lineCap: "round" },
|
|
101
102
|
colors: resolvedLineColors,
|
|
102
103
|
xaxis: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Renders exactly one line from `data`; not a substitute for ApexBarChart/ApexPieChart when comparing multiple series side by side. */
|
|
2
2
|
export type ApexLineChartProps = {
|
|
3
|
-
/** "realtime"
|
|
3
|
+
/** @deprecated "realtime" does not animate your data: it appends Math.random() values every second. Removed in the next major. */
|
|
4
4
|
variant?: LineChartVariant;
|
|
5
5
|
/** Read only at mount — later prop updates are silently ignored unless this component remounts (new `key`). */
|
|
6
6
|
data: number[];
|
|
@@ -32,5 +32,5 @@ export type ApexLineChartProps = {
|
|
|
32
32
|
};
|
|
33
33
|
toolbarBreakpointPct?: number;
|
|
34
34
|
};
|
|
35
|
-
/** Chart mode: "basic" plots `data` as given; "realtime" instead free-runs on random values — see `variant
|
|
35
|
+
/** Chart mode: "basic" plots `data` as given; "realtime" instead free-runs on random values — see `variant`. */
|
|
36
36
|
export type LineChartVariant = "basic" | "realtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ApexPieChartProps } from "./ApexPieChartProps";
|
|
2
2
|
/** Pie/donut chart wrapper around react-apexcharts, themed via chartColorsFromTheme + chartBase. */
|
|
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
|
+
declare const ApexPieChart: ({ data, labels, title, height, width, donutColors, chartColor, titlePosition, titleStyle, legendPosition, legendStyle, variant, showDataLabels, minLabelPercent, surfaceColor, donutSize, totalLabel, labelPlacement, images, }: ApexPieChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default ApexPieChart;
|
|
@@ -10,6 +10,7 @@ const chartColorsFromTheme_1 = require("../../../Theme/tokens/builders/chartColo
|
|
|
10
10
|
const chartBase_1 = require("../chartBase");
|
|
11
11
|
const LazyReactApexChart_1 = __importDefault(require("../LazyReactApexChart"));
|
|
12
12
|
const ApexChartFallback_1 = __importDefault(require("../ApexChartFallback"));
|
|
13
|
+
const pieImageTexture_1 = require("./pieImageTexture");
|
|
13
14
|
const getValidLegendPosition = (position) => {
|
|
14
15
|
const validPositions = ["left", "right", "top", "bottom"];
|
|
15
16
|
if (validPositions.includes(position)) {
|
|
@@ -19,7 +20,7 @@ const getValidLegendPosition = (position) => {
|
|
|
19
20
|
return "bottom";
|
|
20
21
|
};
|
|
21
22
|
/** Pie/donut chart wrapper around react-apexcharts, themed via chartColorsFromTheme + chartBase. */
|
|
22
|
-
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", }) => {
|
|
23
|
+
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", images, }) => {
|
|
23
24
|
var _a;
|
|
24
25
|
const { colors: palette } = (0, useCustomTheme_1.useCustomTheme)();
|
|
25
26
|
const ink = (0, chartColorsFromTheme_1.chartInk)(palette);
|
|
@@ -36,6 +37,7 @@ const ApexPieChart = ({ data, labels, title, height = 400, width = 500, donutCol
|
|
|
36
37
|
? "outside"
|
|
37
38
|
: "none"
|
|
38
39
|
: labelPlacement;
|
|
40
|
+
const sliceCount = data.length;
|
|
39
41
|
const labelsOn = showDataLabels && placement !== "none";
|
|
40
42
|
const outside = placement === "outside";
|
|
41
43
|
const validLegendPosition = getValidLegendPosition(legendPosition);
|
|
@@ -92,10 +94,7 @@ const ApexPieChart = ({ data, labels, title, height = 400, width = 500, donutCol
|
|
|
92
94
|
fill: {
|
|
93
95
|
type: "image",
|
|
94
96
|
image: {
|
|
95
|
-
src: [
|
|
96
|
-
"https://i.imgur.com/UM3mrju.jpg",
|
|
97
|
-
"https://i.imgur.com/NpPOqQq.jpg",
|
|
98
|
-
],
|
|
97
|
+
src: images !== null && images !== void 0 ? images : Array.from({ length: sliceCount }, (_, i) => (0, pieImageTexture_1.pieImageTexture)(seriesColors[i % seriesColors.length], gap)),
|
|
99
98
|
},
|
|
100
99
|
},
|
|
101
100
|
};
|
|
@@ -185,6 +184,8 @@ const ApexPieChart = ({ data, labels, title, height = 400, width = 500, donutCol
|
|
|
185
184
|
totalLabel,
|
|
186
185
|
ink.muted,
|
|
187
186
|
ink.text,
|
|
187
|
+
images,
|
|
188
|
+
sliceCount,
|
|
188
189
|
]);
|
|
189
190
|
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(ApexChartFallback_1.default, { height: height, width: width }), children: (0, jsx_runtime_1.jsx)(LazyReactApexChart_1.default, { options: options, series: data, type: (_a = options.chart) === null || _a === void 0 ? void 0 : _a.type, height: height, width: width }) }) }));
|
|
190
191
|
};
|
|
@@ -26,6 +26,8 @@ export type ApexPieChartProps = {
|
|
|
26
26
|
donutSize?: string;
|
|
27
27
|
totalLabel?: string;
|
|
28
28
|
labelPlacement?: "auto" | "inside" | "outside" | "none";
|
|
29
|
+
/** Only for `variant="pie-with-image"`: one image source per slice (the first repeats past the end). Omitted, each slice gets a themed striped texture in its own colour. */
|
|
30
|
+
images?: string[];
|
|
29
31
|
legendStyle?: {
|
|
30
32
|
colors?: string | string[];
|
|
31
33
|
useSeriesColors?: boolean;
|
|
@@ -36,5 +38,5 @@ export type ApexPieChartProps = {
|
|
|
36
38
|
markerOffsetY?: number;
|
|
37
39
|
};
|
|
38
40
|
};
|
|
39
|
-
/** Visual preset for the pie/donut fill; "pie-with-image"
|
|
41
|
+
/** Visual preset for the pie/donut fill; "pie-with-image" fills slices from the `images` prop, or from inline striped textures when it is omitted. */
|
|
40
42
|
export type DonutPieVariant = "pie" | "donut" | "update-donut" | "monochrome-pie" | "gradient-donut" | "semi-donut" | "donut-with-pattern" | "pie-with-image";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pieImageTexture = pieImageTexture;
|
|
4
|
+
const SIZE = 400;
|
|
5
|
+
/** A diagonal-stripe SVG data URI: `color` ground with translucent `stripe` bands, no network. */
|
|
6
|
+
function pieImageTexture(color, stripe) {
|
|
7
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${SIZE}" height="${SIZE}" viewBox="0 0 ${SIZE} ${SIZE}">` +
|
|
8
|
+
`<defs><pattern id="s" width="24" height="24" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">` +
|
|
9
|
+
`<rect width="10" height="24" fill="${stripe}" fill-opacity="0.28"/></pattern></defs>` +
|
|
10
|
+
`<rect width="${SIZE}" height="${SIZE}" fill="${color}"/>` +
|
|
11
|
+
`<rect width="${SIZE}" height="${SIZE}" fill="url(#s)"/></svg>`;
|
|
12
|
+
return `data:image/svg+xml;utf8,${encodeURIComponent(svg)}`;
|
|
13
|
+
}
|
|
@@ -50,6 +50,9 @@ const Kbd_1 = __importDefault(require("../Kbd/Kbd"));
|
|
|
50
50
|
const AppMark_1 = __importStar(require("./AppMark"));
|
|
51
51
|
const AppSwitcherProps_1 = require("./AppSwitcherProps");
|
|
52
52
|
const useAppSwitcherShortcut_1 = require("./useAppSwitcherShortcut");
|
|
53
|
+
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
54
|
+
const BACKGROUND_BORDER_COLOR_TRANSITION = (0, motion_1.transitionFor)(["background", "border-color"]);
|
|
55
|
+
const BACKGROUND_TRANSITION = (0, motion_1.transitionFor)(["background"]);
|
|
53
56
|
const COLUMNS = 2;
|
|
54
57
|
const HEADING = "Your apps";
|
|
55
58
|
const s = { trigger: "36px", mark: "32px", icon: 17, name: "0.875rem", sub: "0.75rem", row: "52px" };
|
|
@@ -220,7 +223,7 @@ const AppSwitcher = ({ apps, currentAppId, onSelect, onOpenChange, isSearchable,
|
|
|
220
223
|
const currentSub = (0, outlineRung_1.liftToContrast)(theme.colors.textMuted, currentBg, accentText_1.AA_NORMAL_TEXT);
|
|
221
224
|
const width = panelWidth !== null && panelWidth !== void 0 ? panelWidth : "28rem";
|
|
222
225
|
const hint = shortcut && showShortcutHint ? (0, AppSwitcherProps_1.formatShortcut)(shortcut) : null;
|
|
223
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: isOpen, onOpen: () => setOpen(true), onClose: () => { setOpen(false); setQuery(""); }, placement: "bottom-end", initialFocusRef: showSearch ? searchRef : undefined, isLazy: true, children: [(0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: (0, jsx_runtime_1.jsx)(react_2.Flex, { ref: triggerRef, as: "button", type: "button", "aria-label": ariaLabel, align: "center", justify: "center", boxSize: s.trigger, borderRadius: "lg", border: "1px solid", borderColor: isOpen ? theme.colors.boxborder[500] : theme.colors.boxborder[200], bg: isOpen ? theme.colors.backgroundColor.tertiary : "transparent", color: isOpen ? theme.colors.text[900] : theme.colors.textMuted, cursor: "pointer", transition:
|
|
226
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: isOpen, onOpen: () => setOpen(true), onClose: () => { setOpen(false); setQuery(""); }, placement: "bottom-end", initialFocusRef: showSearch ? searchRef : undefined, isLazy: true, children: [(0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: (0, jsx_runtime_1.jsx)(react_2.Flex, { ref: triggerRef, as: "button", type: "button", "aria-label": ariaLabel, align: "center", justify: "center", boxSize: s.trigger, borderRadius: "lg", border: "1px solid", borderColor: isOpen ? theme.colors.boxborder[500] : theme.colors.boxborder[200], bg: isOpen ? theme.colors.backgroundColor.tertiary : "transparent", color: isOpen ? theme.colors.text[900] : theme.colors.textMuted, cursor: "pointer", transition: BACKGROUND_BORDER_COLOR_TRANSITION, _hover: { bg: rowHoverBg, color: theme.colors.text[900] }, onKeyDown: (e) => {
|
|
224
227
|
if (!isOpen) {
|
|
225
228
|
if (e.key === "ArrowDown") {
|
|
226
229
|
e.preventDefault();
|
|
@@ -229,7 +232,7 @@ const AppSwitcher = ({ apps, currentAppId, onSelect, onOpenChange, isSearchable,
|
|
|
229
232
|
return;
|
|
230
233
|
}
|
|
231
234
|
handlePanelKeyDown(e);
|
|
232
|
-
}, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Grip, { size: s.icon + 1 }) }) }), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { w: width, maxW: "calc(100vw - 1.5rem)", textAlign: "start", onKeyDown: handlePanelKeyDown, bg: theme.colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", boxShadow:
|
|
235
|
+
}, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Grip, { size: s.icon + 1 }) }) }), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { w: width, maxW: "calc(100vw - 1.5rem)", textAlign: "start", onKeyDown: handlePanelKeyDown, bg: theme.colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", boxShadow: "float", _focus: { outline: "none", boxShadow: "float" }, children: (0, jsx_runtime_1.jsxs)(react_2.PopoverBody, { p: 0, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, px: 3, pt: 3, pb: showSearch ? 2 : 1, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "xs-minus", fontWeight: 600, letterSpacing: "0.08em", textTransform: "uppercase", color: theme.colors.textMuted, children: HEADING }), (0, jsx_runtime_1.jsx)(react_2.Box, { flex: "1" }), hint && (0, jsx_runtime_1.jsx)(Kbd_1.default, { size: "xs", children: hint })] }), showSearch && ((0, jsx_runtime_1.jsx)(react_2.Box, { px: 3, pb: 2, children: (0, jsx_runtime_1.jsxs)(react_2.InputGroup, { size: "sm", children: [(0, jsx_runtime_1.jsx)(react_2.InputLeftElement, { pointerEvents: "none", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Search, { size: 15, color: theme.colors.textMuted }) }), (0, jsx_runtime_1.jsx)(react_2.Input, { ref: searchRef, value: query, onChange: (e) => setQuery(e.target.value), placeholder: "Search apps", borderRadius: "lg", "aria-label": "Search apps", onKeyDown: (e) => {
|
|
233
236
|
if (e.key === "ArrowDown" && visible.length > 0) {
|
|
234
237
|
e.preventDefault();
|
|
235
238
|
focusItem(0);
|
|
@@ -267,7 +270,7 @@ const AppSwitcher = ({ apps, currentAppId, onSelect, onOpenChange, isSearchable,
|
|
|
267
270
|
borderEndStartRadius: "lg",
|
|
268
271
|
bg: currentBar,
|
|
269
272
|
}
|
|
270
|
-
: undefined, transition:
|
|
273
|
+
: undefined, transition: BACKGROUND_TRANSITION, _hover: interactive ? { bg: rowHoverBg } : undefined, onClick: (e) => handleSelect(app, e), onKeyDown: (e) => handleItemKeyDown(e, app), children: [(0, jsx_runtime_1.jsx)(AppMark_1.default, { app: app, hue: hues[apps.indexOf(app)], boxSize: s.mark, iconSize: s.icon, muted: app.locked }), (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: "1", minW: 0, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 1.5, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.name, fontWeight: 600, color: app.locked
|
|
271
274
|
? theme.colors.textMuted
|
|
272
275
|
: isCurrent
|
|
273
276
|
? currentName
|
|
@@ -64,9 +64,11 @@ export interface SuiteAppSource extends Omit<AppOption, "url"> {
|
|
|
64
64
|
export interface SuiteUrlOptions {
|
|
65
65
|
baseUrl: string;
|
|
66
66
|
baseSubdomain: string;
|
|
67
|
+
/** Opt-in for hosts with no `baseSubdomain` label (plain `localhost`): other apps derive from this labelled URL instead of throwing, and the app owning `baseSubdomain` keeps `baseUrl`. */
|
|
68
|
+
devFallbackBaseUrl?: string;
|
|
67
69
|
}
|
|
68
70
|
/**
|
|
69
71
|
* Derives every app's origin from the host the consumer is already served on, so one deployment
|
|
70
72
|
* variable keeps dev, test and prod in step. An app may still carry its own `url`, which wins.
|
|
71
73
|
*/
|
|
72
|
-
export declare const buildSuiteApps: (apps: SuiteAppSource[], { baseUrl, baseSubdomain }: SuiteUrlOptions) => AppOption[];
|
|
74
|
+
export declare const buildSuiteApps: (apps: SuiteAppSource[], { baseUrl, baseSubdomain, devFallbackBaseUrl }: SuiteUrlOptions) => AppOption[];
|
|
@@ -58,30 +58,37 @@ const shortcutKeys = (shortcut, isApple = isAppleNow()) => {
|
|
|
58
58
|
exports.shortcutKeys = shortcutKeys;
|
|
59
59
|
const formatShortcut = (shortcut, isApple = isAppleNow()) => (0, exports.shortcutKeys)(shortcut, isApple).join(isApple ? "" : "+");
|
|
60
60
|
exports.formatShortcut = formatShortcut;
|
|
61
|
-
|
|
62
|
-
* Derives every app's origin from the host the consumer is already served on, so one deployment
|
|
63
|
-
* variable keeps dev, test and prod in step. An app may still carry its own `url`, which wins.
|
|
64
|
-
*/
|
|
65
|
-
const buildSuiteApps = (apps, { baseUrl, baseSubdomain }) => {
|
|
66
|
-
let base;
|
|
61
|
+
const parseAbsolute = (option, raw) => {
|
|
67
62
|
try {
|
|
68
|
-
|
|
63
|
+
return new URL(raw.trim());
|
|
69
64
|
}
|
|
70
65
|
catch {
|
|
71
|
-
throw new Error(`[AppSwitcher] buildSuiteApps:
|
|
66
|
+
throw new Error(`[AppSwitcher] buildSuiteApps: ${option} ${JSON.stringify(raw)} is not an absolute URL.`);
|
|
72
67
|
}
|
|
73
|
-
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Derives every app's origin from the host the consumer is already served on, so one deployment
|
|
71
|
+
* variable keeps dev, test and prod in step. An app may still carry its own `url`, which wins.
|
|
72
|
+
*/
|
|
73
|
+
const buildSuiteApps = (apps, { baseUrl, baseSubdomain, devFallbackBaseUrl }) => {
|
|
74
|
+
const base = parseAbsolute("baseUrl", baseUrl);
|
|
75
|
+
const hostHasLabel = base.hostname.split(".").includes(baseSubdomain);
|
|
76
|
+
const useFallback = !hostHasLabel && devFallbackBaseUrl !== undefined;
|
|
77
|
+
const source = useFallback ? parseAbsolute("devFallbackBaseUrl", devFallbackBaseUrl) : base;
|
|
78
|
+
const labels = source.hostname.split(".");
|
|
74
79
|
const at = labels.indexOf(baseSubdomain);
|
|
75
80
|
return apps.map(({ subdomain, url, ...app }) => {
|
|
76
81
|
if (url)
|
|
77
82
|
return { ...app, url: url.trim() };
|
|
83
|
+
if (useFallback && subdomain === baseSubdomain)
|
|
84
|
+
return { ...app, url: base.origin };
|
|
78
85
|
// Without the label there is nothing to swap, and every app would silently share one origin.
|
|
79
86
|
if (at === -1) {
|
|
80
87
|
throw new Error(`[AppSwitcher] buildSuiteApps: ${JSON.stringify(baseSubdomain)} is not a label in ` +
|
|
81
|
-
`"${
|
|
88
|
+
`"${source.hostname}", so ${JSON.stringify(app.name)} has no derivable url. ` +
|
|
82
89
|
`Give that app an explicit url, or pass a baseUrl that contains the label.`);
|
|
83
90
|
}
|
|
84
|
-
const next = new URL(
|
|
91
|
+
const next = new URL(source.toString());
|
|
85
92
|
next.hostname = labels.map((l, i) => (i === at ? subdomain : l)).join(".");
|
|
86
93
|
return { ...app, url: next.origin };
|
|
87
94
|
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type AppOption, type SuiteAppSource, type SuiteUrlOptions } from "./AppSwitcherProps";
|
|
2
|
+
/** Every app in the Pixelize suite. */
|
|
3
|
+
export type SuiteAppId = "crm" | "account" | "tickets" | "billing" | "hrms" | "social";
|
|
4
|
+
/** One catalogue entry: switcher copy plus whether the app is hidden from production lists. */
|
|
5
|
+
export interface PixelizeSuiteApp extends SuiteAppSource {
|
|
6
|
+
id: SuiteAppId;
|
|
7
|
+
/** Hidden from production lists (except as the current app) until a deployment overrides it to false. */
|
|
8
|
+
preRelease?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** The default Pixelize app list; `resolveSuiteApps` `overrides` change a single app without forking it. */
|
|
11
|
+
export declare const PIXELIZE_SUITE: readonly PixelizeSuiteApp[];
|
|
12
|
+
/** Options for `resolveSuiteApps`; the URL fields are `buildSuiteApps`'s. */
|
|
13
|
+
export interface ResolveSuiteAppsOptions extends SuiteUrlOptions {
|
|
14
|
+
/** The app this UI runs inside; always listed, even while pre-release. */
|
|
15
|
+
currentAppId: SuiteAppId;
|
|
16
|
+
/** Production drops pre-release apps so customers are never linked to a dead host. */
|
|
17
|
+
isProduction: boolean;
|
|
18
|
+
/** Explicit origin per app (e.g. Account's own deployment variable); wins over derivation. An undefined value falls back to derivation. */
|
|
19
|
+
urls?: Partial<Record<SuiteAppId, string>>;
|
|
20
|
+
/** Per-app changes to the catalogue entry, e.g. `{ hrms: { preRelease: false } }` once it ships. */
|
|
21
|
+
overrides?: Partial<Record<SuiteAppId, Partial<Omit<PixelizeSuiteApp, "id">>>>;
|
|
22
|
+
}
|
|
23
|
+
/** The catalogue as a ready `AppSwitcher` list: pre-release filtering, per-app `urls` and `overrides`, then `buildSuiteApps`. */
|
|
24
|
+
export declare const resolveSuiteApps: ({ currentAppId, isProduction, urls, overrides, ...urlOptions }: ResolveSuiteAppsOptions) => AppOption[];
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveSuiteApps = exports.PIXELIZE_SUITE = void 0;
|
|
4
|
+
const lucide_react_1 = require("lucide-react");
|
|
5
|
+
const AppSwitcherProps_1 = require("./AppSwitcherProps");
|
|
6
|
+
/** The default Pixelize app list; `resolveSuiteApps` `overrides` change a single app without forking it. */
|
|
7
|
+
exports.PIXELIZE_SUITE = [
|
|
8
|
+
{
|
|
9
|
+
id: "crm",
|
|
10
|
+
subdomain: "crm",
|
|
11
|
+
name: "CRM",
|
|
12
|
+
description: "Leads, deals and pipeline",
|
|
13
|
+
icon: lucide_react_1.LayoutGrid,
|
|
14
|
+
keywords: ["leads", "deals", "pipeline", "contacts", "sales"],
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "account",
|
|
18
|
+
subdomain: "account",
|
|
19
|
+
name: "Account",
|
|
20
|
+
description: "Organization and members",
|
|
21
|
+
icon: lucide_react_1.Building2,
|
|
22
|
+
keywords: ["organization", "members", "roles", "settings", "profile"],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "tickets",
|
|
26
|
+
subdomain: "tickets",
|
|
27
|
+
name: "Tickets",
|
|
28
|
+
description: "Support requests and queues",
|
|
29
|
+
icon: lucide_react_1.Headphones,
|
|
30
|
+
keywords: ["support", "helpdesk", "issues", "sla"],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "billing",
|
|
34
|
+
subdomain: "billing",
|
|
35
|
+
name: "Billing",
|
|
36
|
+
description: "Invoices and plans",
|
|
37
|
+
icon: lucide_react_1.Receipt,
|
|
38
|
+
keywords: ["invoices", "plans", "payments", "subscription"],
|
|
39
|
+
preRelease: true,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "hrms",
|
|
43
|
+
subdomain: "hrms",
|
|
44
|
+
name: "HRMS",
|
|
45
|
+
description: "People, leave and payroll",
|
|
46
|
+
icon: lucide_react_1.Users,
|
|
47
|
+
keywords: ["people", "employees", "leave", "attendance", "payroll"],
|
|
48
|
+
preRelease: true,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "social",
|
|
52
|
+
subdomain: "social",
|
|
53
|
+
name: "Social",
|
|
54
|
+
description: "Campaigns and inbox",
|
|
55
|
+
icon: lucide_react_1.Megaphone,
|
|
56
|
+
keywords: ["campaigns", "posts", "inbox", "marketing"],
|
|
57
|
+
preRelease: true,
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
/** The catalogue as a ready `AppSwitcher` list: pre-release filtering, per-app `urls` and `overrides`, then `buildSuiteApps`. */
|
|
61
|
+
const resolveSuiteApps = ({ currentAppId, isProduction, urls, overrides, ...urlOptions }) => {
|
|
62
|
+
const sources = exports.PIXELIZE_SUITE.flatMap((entry) => {
|
|
63
|
+
const { preRelease, ...app } = { ...entry, ...overrides === null || overrides === void 0 ? void 0 : overrides[entry.id] };
|
|
64
|
+
if (isProduction && preRelease && app.id !== currentAppId)
|
|
65
|
+
return [];
|
|
66
|
+
const url = urls === null || urls === void 0 ? void 0 : urls[app.id];
|
|
67
|
+
return [url ? { ...app, url } : app];
|
|
68
|
+
});
|
|
69
|
+
return (0, AppSwitcherProps_1.buildSuiteApps)(sources, urlOptions);
|
|
70
|
+
};
|
|
71
|
+
exports.resolveSuiteApps = resolveSuiteApps;
|