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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { compositeOver } from "../../Theme/tokens/builders/color.js";
|
|
2
2
|
import { liftToContrast } from "../../Theme/tokens/builders/outlineRung.js";
|
|
3
|
-
import {
|
|
3
|
+
import { insetFocusRingShadow } from "../../Theme/chakra/focusRing.styles.js";
|
|
4
4
|
// NOTE: light softHover measured 1.04-1.11 (invisible) unresolved — both modes now resolve against the rest surface.
|
|
5
5
|
const MIN_HOVER_STEP = 1.15;
|
|
6
6
|
export const getAccordionHoverColors = (colors, isDark) => {
|
|
@@ -21,6 +21,5 @@ export const getAccordionHoverColors = (colors, isDark) => {
|
|
|
21
21
|
export const accordionFocusRing = (colors) => ({
|
|
22
22
|
outline: "2px solid transparent",
|
|
23
23
|
outlineOffset: "-2px",
|
|
24
|
-
boxShadow:
|
|
25
|
-
`inset 0 0 0 ${FOCUS_RING_WIDTH}px ${colors.focusRing.halo}`,
|
|
24
|
+
boxShadow: insetFocusRingShadow(colors),
|
|
26
25
|
});
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Suspense, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { useTheme } from "@chakra-ui/react";
|
|
4
4
|
import ToolTip from "../../ToolTip/ToolTip.js";
|
|
5
|
-
import { getDefaultSeriesColors, mergeChartTitleStyle, } from "../../../Theme/tokens/builders/chartColorsFromTheme.js";
|
|
5
|
+
import { chartMode, getDefaultSeriesColors, mergeChartTitleStyle, } from "../../../Theme/tokens/builders/chartColorsFromTheme.js";
|
|
6
6
|
import { baseAxisLabels, baseChart, baseGrid, baseTooltip } from "../chartBase.js";
|
|
7
7
|
import LazyReactApexChart from "../LazyReactApexChart.js";
|
|
8
8
|
import ApexChartFallback from "../ApexChartFallback.js";
|
|
@@ -92,6 +92,7 @@ const ApexLineChart = ({ data, labels, title, height, width, lineColors, titlePo
|
|
|
92
92
|
zoom: { enabled: !isSmall },
|
|
93
93
|
toolbar: { show: showToolbar },
|
|
94
94
|
}),
|
|
95
|
+
theme: { mode: chartMode(palette) },
|
|
95
96
|
stroke: { curve: "smooth", width: 2, lineCap: "round" },
|
|
96
97
|
colors: resolvedLineColors,
|
|
97
98
|
xaxis: {
|
|
@@ -5,6 +5,7 @@ import { chartInk, chartMode, getDefaultSeriesColors, labelOnSeries, mergeChartT
|
|
|
5
5
|
import { baseChart, baseLegend, baseTooltip } from "../chartBase.js";
|
|
6
6
|
import LazyReactApexChart from "../LazyReactApexChart.js";
|
|
7
7
|
import ApexChartFallback from "../ApexChartFallback.js";
|
|
8
|
+
import { pieImageTexture } from "./pieImageTexture.js";
|
|
8
9
|
const getValidLegendPosition = (position) => {
|
|
9
10
|
const validPositions = ["left", "right", "top", "bottom"];
|
|
10
11
|
if (validPositions.includes(position)) {
|
|
@@ -14,7 +15,7 @@ const getValidLegendPosition = (position) => {
|
|
|
14
15
|
return "bottom";
|
|
15
16
|
};
|
|
16
17
|
/** Pie/donut chart wrapper around react-apexcharts, themed via chartColorsFromTheme + chartBase. */
|
|
17
|
-
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", }) => {
|
|
18
|
+
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, }) => {
|
|
18
19
|
var _a;
|
|
19
20
|
const { colors: palette } = useCustomTheme();
|
|
20
21
|
const ink = chartInk(palette);
|
|
@@ -31,6 +32,7 @@ const ApexPieChart = ({ data, labels, title, height = 400, width = 500, donutCol
|
|
|
31
32
|
? "outside"
|
|
32
33
|
: "none"
|
|
33
34
|
: labelPlacement;
|
|
35
|
+
const sliceCount = data.length;
|
|
34
36
|
const labelsOn = showDataLabels && placement !== "none";
|
|
35
37
|
const outside = placement === "outside";
|
|
36
38
|
const validLegendPosition = getValidLegendPosition(legendPosition);
|
|
@@ -87,10 +89,7 @@ const ApexPieChart = ({ data, labels, title, height = 400, width = 500, donutCol
|
|
|
87
89
|
fill: {
|
|
88
90
|
type: "image",
|
|
89
91
|
image: {
|
|
90
|
-
src: [
|
|
91
|
-
"https://i.imgur.com/UM3mrju.jpg",
|
|
92
|
-
"https://i.imgur.com/NpPOqQq.jpg",
|
|
93
|
-
],
|
|
92
|
+
src: images !== null && images !== void 0 ? images : Array.from({ length: sliceCount }, (_, i) => pieImageTexture(seriesColors[i % seriesColors.length], gap)),
|
|
94
93
|
},
|
|
95
94
|
},
|
|
96
95
|
};
|
|
@@ -180,6 +179,8 @@ const ApexPieChart = ({ data, labels, title, height = 400, width = 500, donutCol
|
|
|
180
179
|
totalLabel,
|
|
181
180
|
ink.muted,
|
|
182
181
|
ink.text,
|
|
182
|
+
images,
|
|
183
|
+
sliceCount,
|
|
183
184
|
]);
|
|
184
185
|
return (_jsx("div", { children: _jsx(Suspense, { fallback: _jsx(ApexChartFallback, { height: height, width: width }), children: _jsx(LazyReactApexChart, { options: options, series: data, type: (_a = options.chart) === null || _a === void 0 ? void 0 : _a.type, height: height, width: width }) }) }));
|
|
185
186
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const SIZE = 400;
|
|
2
|
+
/** A diagonal-stripe SVG data URI: `color` ground with translucent `stripe` bands, no network. */
|
|
3
|
+
export function pieImageTexture(color, stripe) {
|
|
4
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${SIZE}" height="${SIZE}" viewBox="0 0 ${SIZE} ${SIZE}">` +
|
|
5
|
+
`<defs><pattern id="s" width="24" height="24" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">` +
|
|
6
|
+
`<rect width="10" height="24" fill="${stripe}" fill-opacity="0.28"/></pattern></defs>` +
|
|
7
|
+
`<rect width="${SIZE}" height="${SIZE}" fill="${color}"/>` +
|
|
8
|
+
`<rect width="${SIZE}" height="${SIZE}" fill="url(#s)"/></svg>`;
|
|
9
|
+
return `data:image/svg+xml;utf8,${encodeURIComponent(svg)}`;
|
|
10
|
+
}
|
|
@@ -12,6 +12,9 @@ import Kbd from "../Kbd/Kbd.js";
|
|
|
12
12
|
import AppMark, { assignAppHues } from "./AppMark.js";
|
|
13
13
|
import { filterApps, formatShortcut, } from "./AppSwitcherProps.js";
|
|
14
14
|
import { useAppSwitcherShortcut } from "./useAppSwitcherShortcut.js";
|
|
15
|
+
import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
|
|
16
|
+
const BACKGROUND_BORDER_COLOR_TRANSITION = transitionFor(["background", "border-color"]);
|
|
17
|
+
const BACKGROUND_TRANSITION = transitionFor(["background"]);
|
|
15
18
|
const COLUMNS = 2;
|
|
16
19
|
const HEADING = "Your apps";
|
|
17
20
|
const s = { trigger: "36px", mark: "32px", icon: 17, name: "0.875rem", sub: "0.75rem", row: "52px" };
|
|
@@ -182,7 +185,7 @@ const AppSwitcher = ({ apps, currentAppId, onSelect, onOpenChange, isSearchable,
|
|
|
182
185
|
const currentSub = liftToContrast(theme.colors.textMuted, currentBg, AA_NORMAL_TEXT);
|
|
183
186
|
const width = panelWidth !== null && panelWidth !== void 0 ? panelWidth : "28rem";
|
|
184
187
|
const hint = shortcut && showShortcutHint ? formatShortcut(shortcut) : null;
|
|
185
|
-
return (_jsxs(Popover, { isOpen: isOpen, onOpen: () => setOpen(true), onClose: () => { setOpen(false); setQuery(""); }, placement: "bottom-end", initialFocusRef: showSearch ? searchRef : undefined, isLazy: true, children: [_jsx(PopoverTrigger, { children: _jsx(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:
|
|
188
|
+
return (_jsxs(Popover, { isOpen: isOpen, onOpen: () => setOpen(true), onClose: () => { setOpen(false); setQuery(""); }, placement: "bottom-end", initialFocusRef: showSearch ? searchRef : undefined, isLazy: true, children: [_jsx(PopoverTrigger, { children: _jsx(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) => {
|
|
186
189
|
if (!isOpen) {
|
|
187
190
|
if (e.key === "ArrowDown") {
|
|
188
191
|
e.preventDefault();
|
|
@@ -191,7 +194,7 @@ const AppSwitcher = ({ apps, currentAppId, onSelect, onOpenChange, isSearchable,
|
|
|
191
194
|
return;
|
|
192
195
|
}
|
|
193
196
|
handlePanelKeyDown(e);
|
|
194
|
-
}, children: _jsx(Grip, { size: s.icon + 1 }) }) }), _jsx(PopoverContent, { w: width, maxW: "calc(100vw - 1.5rem)", textAlign: "start", onKeyDown: handlePanelKeyDown, bg: theme.colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", boxShadow:
|
|
197
|
+
}, children: _jsx(Grip, { size: s.icon + 1 }) }) }), _jsx(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: _jsxs(PopoverBody, { p: 0, children: [_jsxs(Flex, { align: "center", gap: 2, px: 3, pt: 3, pb: showSearch ? 2 : 1, children: [_jsx(Text, { fontSize: "xs-minus", fontWeight: 600, letterSpacing: "0.08em", textTransform: "uppercase", color: theme.colors.textMuted, children: HEADING }), _jsx(Box, { flex: "1" }), hint && _jsx(Kbd, { size: "xs", children: hint })] }), showSearch && (_jsx(Box, { px: 3, pb: 2, children: _jsxs(InputGroup, { size: "sm", children: [_jsx(InputLeftElement, { pointerEvents: "none", children: _jsx(Search, { size: 15, color: theme.colors.textMuted }) }), _jsx(Input, { ref: searchRef, value: query, onChange: (e) => setQuery(e.target.value), placeholder: "Search apps", borderRadius: "lg", "aria-label": "Search apps", onKeyDown: (e) => {
|
|
195
198
|
if (e.key === "ArrowDown" && visible.length > 0) {
|
|
196
199
|
e.preventDefault();
|
|
197
200
|
focusItem(0);
|
|
@@ -229,7 +232,7 @@ const AppSwitcher = ({ apps, currentAppId, onSelect, onOpenChange, isSearchable,
|
|
|
229
232
|
borderEndStartRadius: "lg",
|
|
230
233
|
bg: currentBar,
|
|
231
234
|
}
|
|
232
|
-
: undefined, transition:
|
|
235
|
+
: undefined, transition: BACKGROUND_TRANSITION, _hover: interactive ? { bg: rowHoverBg } : undefined, onClick: (e) => handleSelect(app, e), onKeyDown: (e) => handleItemKeyDown(e, app), children: [_jsx(AppMark, { app: app, hue: hues[apps.indexOf(app)], boxSize: s.mark, iconSize: s.icon, muted: app.locked }), _jsxs(Box, { flex: "1", minW: 0, children: [_jsxs(Flex, { align: "center", gap: 1.5, children: [_jsx(Text, { fontSize: s.name, fontWeight: 600, color: app.locked
|
|
233
236
|
? theme.colors.textMuted
|
|
234
237
|
: isCurrent
|
|
235
238
|
? currentName
|
|
@@ -50,30 +50,37 @@ export const shortcutKeys = (shortcut, isApple = isAppleNow()) => {
|
|
|
50
50
|
return parts.map((p, i) => { var _a; return (i === parts.length - 1 ? p.toUpperCase() : ((_a = table[p]) !== null && _a !== void 0 ? _a : p.toUpperCase())); });
|
|
51
51
|
};
|
|
52
52
|
export const formatShortcut = (shortcut, isApple = isAppleNow()) => shortcutKeys(shortcut, isApple).join(isApple ? "" : "+");
|
|
53
|
-
|
|
54
|
-
* Derives every app's origin from the host the consumer is already served on, so one deployment
|
|
55
|
-
* variable keeps dev, test and prod in step. An app may still carry its own `url`, which wins.
|
|
56
|
-
*/
|
|
57
|
-
export const buildSuiteApps = (apps, { baseUrl, baseSubdomain }) => {
|
|
58
|
-
let base;
|
|
53
|
+
const parseAbsolute = (option, raw) => {
|
|
59
54
|
try {
|
|
60
|
-
|
|
55
|
+
return new URL(raw.trim());
|
|
61
56
|
}
|
|
62
57
|
catch {
|
|
63
|
-
throw new Error(`[AppSwitcher] buildSuiteApps:
|
|
58
|
+
throw new Error(`[AppSwitcher] buildSuiteApps: ${option} ${JSON.stringify(raw)} is not an absolute URL.`);
|
|
64
59
|
}
|
|
65
|
-
|
|
60
|
+
};
|
|
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
|
+
export const buildSuiteApps = (apps, { baseUrl, baseSubdomain, devFallbackBaseUrl }) => {
|
|
66
|
+
const base = parseAbsolute("baseUrl", baseUrl);
|
|
67
|
+
const hostHasLabel = base.hostname.split(".").includes(baseSubdomain);
|
|
68
|
+
const useFallback = !hostHasLabel && devFallbackBaseUrl !== undefined;
|
|
69
|
+
const source = useFallback ? parseAbsolute("devFallbackBaseUrl", devFallbackBaseUrl) : base;
|
|
70
|
+
const labels = source.hostname.split(".");
|
|
66
71
|
const at = labels.indexOf(baseSubdomain);
|
|
67
72
|
return apps.map(({ subdomain, url, ...app }) => {
|
|
68
73
|
if (url)
|
|
69
74
|
return { ...app, url: url.trim() };
|
|
75
|
+
if (useFallback && subdomain === baseSubdomain)
|
|
76
|
+
return { ...app, url: base.origin };
|
|
70
77
|
// Without the label there is nothing to swap, and every app would silently share one origin.
|
|
71
78
|
if (at === -1) {
|
|
72
79
|
throw new Error(`[AppSwitcher] buildSuiteApps: ${JSON.stringify(baseSubdomain)} is not a label in ` +
|
|
73
|
-
`"${
|
|
80
|
+
`"${source.hostname}", so ${JSON.stringify(app.name)} has no derivable url. ` +
|
|
74
81
|
`Give that app an explicit url, or pass a baseUrl that contains the label.`);
|
|
75
82
|
}
|
|
76
|
-
const next = new URL(
|
|
83
|
+
const next = new URL(source.toString());
|
|
77
84
|
next.hostname = labels.map((l, i) => (i === at ? subdomain : l)).join(".");
|
|
78
85
|
return { ...app, url: next.origin };
|
|
79
86
|
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Building2, Headphones, LayoutGrid, Megaphone, Receipt, Users } from "lucide-react";
|
|
2
|
+
import { buildSuiteApps } from "./AppSwitcherProps.js";
|
|
3
|
+
/** The default Pixelize app list; `resolveSuiteApps` `overrides` change a single app without forking it. */
|
|
4
|
+
export const PIXELIZE_SUITE = [
|
|
5
|
+
{
|
|
6
|
+
id: "crm",
|
|
7
|
+
subdomain: "crm",
|
|
8
|
+
name: "CRM",
|
|
9
|
+
description: "Leads, deals and pipeline",
|
|
10
|
+
icon: LayoutGrid,
|
|
11
|
+
keywords: ["leads", "deals", "pipeline", "contacts", "sales"],
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: "account",
|
|
15
|
+
subdomain: "account",
|
|
16
|
+
name: "Account",
|
|
17
|
+
description: "Organization and members",
|
|
18
|
+
icon: Building2,
|
|
19
|
+
keywords: ["organization", "members", "roles", "settings", "profile"],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "tickets",
|
|
23
|
+
subdomain: "tickets",
|
|
24
|
+
name: "Tickets",
|
|
25
|
+
description: "Support requests and queues",
|
|
26
|
+
icon: Headphones,
|
|
27
|
+
keywords: ["support", "helpdesk", "issues", "sla"],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "billing",
|
|
31
|
+
subdomain: "billing",
|
|
32
|
+
name: "Billing",
|
|
33
|
+
description: "Invoices and plans",
|
|
34
|
+
icon: Receipt,
|
|
35
|
+
keywords: ["invoices", "plans", "payments", "subscription"],
|
|
36
|
+
preRelease: true,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "hrms",
|
|
40
|
+
subdomain: "hrms",
|
|
41
|
+
name: "HRMS",
|
|
42
|
+
description: "People, leave and payroll",
|
|
43
|
+
icon: Users,
|
|
44
|
+
keywords: ["people", "employees", "leave", "attendance", "payroll"],
|
|
45
|
+
preRelease: true,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "social",
|
|
49
|
+
subdomain: "social",
|
|
50
|
+
name: "Social",
|
|
51
|
+
description: "Campaigns and inbox",
|
|
52
|
+
icon: Megaphone,
|
|
53
|
+
keywords: ["campaigns", "posts", "inbox", "marketing"],
|
|
54
|
+
preRelease: true,
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
/** The catalogue as a ready `AppSwitcher` list: pre-release filtering, per-app `urls` and `overrides`, then `buildSuiteApps`. */
|
|
58
|
+
export const resolveSuiteApps = ({ currentAppId, isProduction, urls, overrides, ...urlOptions }) => {
|
|
59
|
+
const sources = PIXELIZE_SUITE.flatMap((entry) => {
|
|
60
|
+
const { preRelease, ...app } = { ...entry, ...overrides === null || overrides === void 0 ? void 0 : overrides[entry.id] };
|
|
61
|
+
if (isProduction && preRelease && app.id !== currentAppId)
|
|
62
|
+
return [];
|
|
63
|
+
const url = urls === null || urls === void 0 ? void 0 : urls[app.id];
|
|
64
|
+
return [url ? { ...app, url } : app];
|
|
65
|
+
});
|
|
66
|
+
return buildSuiteApps(sources, urlOptions);
|
|
67
|
+
};
|
|
@@ -7,7 +7,7 @@ import { FONT_SIZE_OPTIONS } from "../../Theme/provider/fontSize.js";
|
|
|
7
7
|
import { lightPalettes } from "../../Theme/tokens/brands/index.js";
|
|
8
8
|
import { CHROME_RULE, ruleInk } from "../../Theme/tokens/builders/outlineRung.js";
|
|
9
9
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
10
|
-
import
|
|
10
|
+
import Select from "../Select/Select.js";
|
|
11
11
|
const FieldLabel = ({ children }) => {
|
|
12
12
|
const { colors } = useCustomTheme();
|
|
13
13
|
return (_jsx(Text, { fontSize: "sm", fontWeight: 500, color: colors.textMuted, mb: 2, children: children }));
|
|
@@ -24,11 +24,11 @@ export const AppearanceSettings = ({ brand, fontSize, onBrandChange, onFontSizeC
|
|
|
24
24
|
const themeLabel = (_a = labels === null || labels === void 0 ? void 0 : labels.theme) !== null && _a !== void 0 ? _a : "Theme";
|
|
25
25
|
const colorModeLabel = (_b = labels === null || labels === void 0 ? void 0 : labels.colorMode) !== null && _b !== void 0 ? _b : "Color mode";
|
|
26
26
|
const fontSizeLabel = (_c = labels === null || labels === void 0 ? void 0 : labels.fontSize) !== null && _c !== void 0 ? _c : "Font Size";
|
|
27
|
-
return (_jsxs(VStack, { align: "stretch", spacing: 4, children: [showBrand && (_jsxs(Box, { children: [_jsx(FieldLabel, { children: themeLabel }), _jsx(
|
|
27
|
+
return (_jsxs(VStack, { align: "stretch", spacing: 4, children: [showBrand && (_jsxs(Box, { children: [_jsx(FieldLabel, { children: themeLabel }), _jsx(Select, { native: false, options: brandOptions, value: brand, isSearchable: false, size: size, "aria-label": themeLabel, "data-testid": "appearance-brand-select", onChange: (option) => {
|
|
28
28
|
if (!option)
|
|
29
29
|
return;
|
|
30
30
|
onBrandChange === null || onBrandChange === void 0 ? void 0 : onBrandChange(String(option.id));
|
|
31
|
-
} })] })), showColorMode && (_jsxs(Box, { children: [_jsx(FieldLabel, { children: colorModeLabel }), _jsx(Box, { "data-testid": "appearance-mode-switcher", children: _jsx(ThemeSwitcher, { variant: "segmented", showBrandPicker: false, size: size, "aria-label": colorModeLabel }) })] })), showFontSize && (_jsxs(Box, { children: [_jsx(FieldLabel, { children: fontSizeLabel }), _jsx(
|
|
31
|
+
} })] })), showColorMode && (_jsxs(Box, { children: [_jsx(FieldLabel, { children: colorModeLabel }), _jsx(Box, { "data-testid": "appearance-mode-switcher", children: _jsx(ThemeSwitcher, { variant: "segmented", showBrandPicker: false, size: size, "aria-label": colorModeLabel }) })] })), showFontSize && (_jsxs(Box, { children: [_jsx(FieldLabel, { children: fontSizeLabel }), _jsx(Select, { native: false, options: FONT_SIZE_OPTIONS, value: fontSize, isSearchable: false, size: size, "aria-label": fontSizeLabel, "data-testid": "appearance-font-size-select",
|
|
32
32
|
// Each row previews the size it sets, so the list is self-explaining.
|
|
33
33
|
renderOption: (option) => (_jsx(Text, { as: "span", style: { fontSize: String(option.id) }, children: option.label })), onChange: (option) => {
|
|
34
34
|
if (!option)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveFilledSurface } from "../../Theme/tokens/builders/filledSurface.js";
|
|
2
|
-
const AVATAR_SCALE_KEYS = [
|
|
2
|
+
export const AVATAR_SCALE_KEYS = [
|
|
3
3
|
"red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink",
|
|
4
4
|
];
|
|
5
5
|
const hashSeed = (seed) => {
|
|
@@ -10,11 +10,11 @@ const hashSeed = (seed) => {
|
|
|
10
10
|
};
|
|
11
11
|
export const avatarScaleKeyFor = (seed) => AVATAR_SCALE_KEYS[hashSeed(seed) % AVATAR_SCALE_KEYS.length];
|
|
12
12
|
// Always via resolveFilledSurface, never scale[500] + a guessed ink.
|
|
13
|
-
export const
|
|
14
|
-
const
|
|
15
|
-
const { fill, color } = resolveFilledSurface(scale, colors);
|
|
13
|
+
export const avatarColorwayFor = (key, colors) => {
|
|
14
|
+
const { fill, color } = resolveFilledSurface(colors[key], colors);
|
|
16
15
|
return { bg: fill, color };
|
|
17
16
|
};
|
|
17
|
+
export const resolveAvatarColorway = (seed, colors) => avatarColorwayFor(avatarScaleKeyFor(seed), colors);
|
|
18
18
|
export const initialsFor = (name) => {
|
|
19
19
|
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
20
20
|
if (words.length === 0)
|
|
@@ -5,6 +5,8 @@ import { focusVisibleStyles } from "../../Theme/chakra/focusRing.styles.js";
|
|
|
5
5
|
import { listRowBackgrounds } from "../../Theme/tokens/builders/rowStates.js";
|
|
6
6
|
import { MOTION_OK_QUERY, reducedMotionSx } from "../../Theme/chakra/motion.js";
|
|
7
7
|
import { BUTTON_SIZES, DEFAULT_CONTROL_SIZE, MOTION_PRESS_SCALE, transitionFor } from "../../Theme/tokens/primitives/index.js";
|
|
8
|
+
import { BORDER_WIDTHS } from "../../Theme/tokens/primitives/borderWidths.js";
|
|
9
|
+
import { DISABLED_OPACITY } from "../../Theme/tokens/primitives/states.js";
|
|
8
10
|
const BUTTON_TRANSITION = [
|
|
9
11
|
transitionFor(["background-color", "border-color", "color", "box-shadow", "filter"]),
|
|
10
12
|
transitionFor(["transform"], "fast", "out"),
|
|
@@ -24,6 +26,7 @@ const controlSize = (size) => {
|
|
|
24
26
|
// NOTE: a bare button sits on the canvas, a card or an overlay; dark overlays are the hardest plane.
|
|
25
27
|
const onCanvasText = (theme, colorScheme) => accentTextOnPlanes(theme.colors[colorScheme], [
|
|
26
28
|
theme.colors.backgroundColor.main,
|
|
29
|
+
theme.colors.backgroundColor.base,
|
|
27
30
|
theme.colors.background[50],
|
|
28
31
|
theme.colors.surfaceRaised,
|
|
29
32
|
]);
|
|
@@ -72,7 +75,7 @@ export const Button = {
|
|
|
72
75
|
transition: BUTTON_TRANSITION,
|
|
73
76
|
...reducedMotionSx(),
|
|
74
77
|
_disabled: {
|
|
75
|
-
opacity:
|
|
78
|
+
opacity: DISABLED_OPACITY,
|
|
76
79
|
cursor: "not-allowed",
|
|
77
80
|
},
|
|
78
81
|
...focusRing(theme),
|
|
@@ -111,7 +114,7 @@ export const Button = {
|
|
|
111
114
|
outline: ({ theme, colorScheme = "primary" }) => {
|
|
112
115
|
const ink = onCanvasText(theme, colorScheme);
|
|
113
116
|
return {
|
|
114
|
-
border:
|
|
117
|
+
border: `${BORDER_WIDTHS.hairline} solid`,
|
|
115
118
|
borderColor: ink,
|
|
116
119
|
color: ink,
|
|
117
120
|
bg: "transparent",
|
|
@@ -5,6 +5,8 @@ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
|
5
5
|
import { resolveGradient, gradientCss } from "../../Theme/tokens/builders/gradientInk.js";
|
|
6
6
|
import { hexToRgb } from "../../Theme/tokens/builders/color.js";
|
|
7
7
|
import { rafThrottle } from "../../Utils/rafThrottle.js";
|
|
8
|
+
import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
|
|
9
|
+
const BACKGROUND_TRANSITION = transitionFor(["background"]);
|
|
8
10
|
export default function ButtonGroupIcon({ leftIcon, rightIcon, onLeftIconClick, onRightIconClick, buttonText, onButtonClick, onButtongroupClick, size, variant, color, buttonGroupStyle, buttonGroupLeftIconStyle, buttonGroupRightIconStyle, buttonStyle, onBlurLeftIcon, onBlurRightIcon, dropdownOptions, // New prop for dropdown options
|
|
9
11
|
onDropdownOptionClick, // New prop to handle option clicks
|
|
10
12
|
rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, leftIconLoading, RightIconLoading, }) {
|
|
@@ -73,7 +75,7 @@ rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, left
|
|
|
73
75
|
fontSize: "xs-plus",
|
|
74
76
|
fontWeight: 500,
|
|
75
77
|
color: theme.colors.text[700],
|
|
76
|
-
transition:
|
|
78
|
+
transition: BACKGROUND_TRANSITION,
|
|
77
79
|
"& svg": { width: "16px", height: "16px" },
|
|
78
80
|
...(divider
|
|
79
81
|
? {
|
|
@@ -4,10 +4,12 @@ import { Box, Flex, Grid, Text } from "@chakra-ui/react";
|
|
|
4
4
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
5
5
|
import Button from "../Button/Button.js";
|
|
6
6
|
import Skeletons from "../Skeletons/Skeletons.js";
|
|
7
|
+
import VisuallyHidden from "../VisuallyHidden/VisuallyHidden.js";
|
|
7
8
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
8
9
|
import { focusVisibleStyles, insetFocusRingShadow } from "../../Theme/chakra/focusRing.styles.js";
|
|
9
10
|
import { resolveSoftTone, toneScale } from "../../Theme/tokens/builders/tone.js";
|
|
10
11
|
import { dayKey, eventsOnDay, formatFullDate, formatTitle, isNavKey, isSameDay, isWeekend, layoutWeek, moveFocus, shiftAnchor, startOfDay, visibleWeeks, weekdayLabels, } from "./calendarMath.js";
|
|
12
|
+
import { isActivationKey } from "../Common/activationKey.js";
|
|
11
13
|
const plural = (n, one, many) => `${n} ${n === 1 ? one : many}`;
|
|
12
14
|
const DEFAULT_LABELS = {
|
|
13
15
|
today: "Today",
|
|
@@ -113,7 +115,7 @@ const CalendarGrid = ({ view, date, events, onViewChange, onDateChange, onEventC
|
|
|
113
115
|
onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(next);
|
|
114
116
|
return;
|
|
115
117
|
}
|
|
116
|
-
if ((e
|
|
118
|
+
if (isActivationKey(e) && onDateChange) {
|
|
117
119
|
e.preventDefault();
|
|
118
120
|
onDateChange(cellDate);
|
|
119
121
|
}
|
|
@@ -156,9 +158,9 @@ const CalendarGrid = ({ view, date, events, onViewChange, onDateChange, onEventC
|
|
|
156
158
|
cellRefs.current.set(key, el);
|
|
157
159
|
else
|
|
158
160
|
cellRefs.current.delete(key);
|
|
159
|
-
}, "data-date": key, "aria-
|
|
161
|
+
}, "data-date": key, "aria-current": isToday ? "date" : undefined, tabIndex: active ? 0 : -1, onFocus: () => setFocusedKey(key), onKeyDown: (e) => handleCellKeyDown(e, day), position: "relative", minH: MIN_CELL_HEIGHT[view], p: 1, bg: surface, borderRight: "1px solid", borderBottom: "1px solid", borderColor: border, outline: "none", _focusVisible: {
|
|
160
162
|
boxShadow: insetFocusRingShadow(colors),
|
|
161
|
-
}, children: [_jsx(Text, { as: "span", display: "inline-flex", alignItems: "center", justifyContent: "center", minW: "1.5rem", h: "1.5rem", px: 1, borderRadius: "full", fontSize: "xs-plus", fontWeight: isToday ? 700 : 500, color: isToday ? colors.accentText : inMonth ? colors.header[900] : colors.textMuted, boxShadow: isToday ? `inset 0 0 0 1.5px ${colors.accentText}` : undefined, "aria-hidden": true, children: day.getDate() }), body] }, key));
|
|
163
|
+
}, children: [_jsx(Text, { as: "span", display: "inline-flex", alignItems: "center", justifyContent: "center", minW: "1.5rem", h: "1.5rem", px: 1, borderRadius: "full", fontSize: "xs-plus", fontWeight: isToday ? 700 : 500, color: isToday ? colors.accentText : inMonth ? colors.header[900] : colors.textMuted, boxShadow: isToday ? `inset 0 0 0 1.5px ${colors.accentText}` : undefined, "aria-hidden": true, children: day.getDate() }), _jsx(VisuallyHidden, { position: "absolute", children: label }), body] }, key));
|
|
162
164
|
};
|
|
163
165
|
return (_jsxs(Box, { children: [_jsxs(Flex, { align: "center", justify: "space-between", wrap: "wrap", gap: 2, mb: 3, children: [_jsxs(Flex, { align: "center", gap: 2, children: [onDateChange ? (_jsxs(_Fragment, { children: [_jsx(Button, { label: text.today, size: "sm", variant: "outline", onClick: () => onDateChange(startOfDay(new Date())) }), _jsx(Button, { "aria-label": text.previous, size: "sm", variant: "ghost", leftIcon: _jsx(ChevronLeft, { size: 16, "aria-hidden": true }), onClick: () => onDateChange(shiftAnchor(view, anchor, -1)) }), _jsx(Button, { "aria-label": text.next, size: "sm", variant: "ghost", leftIcon: _jsx(ChevronRight, { size: 16, "aria-hidden": true }), onClick: () => onDateChange(shiftAnchor(view, anchor, 1)) })] })) : null, _jsx(Text, { as: "h2", fontSize: "md", fontWeight: 600, color: colors.header[900], children: title })] }), onViewChange ? (_jsx(Flex, { role: "group", "aria-label": text[view], gap: 1, children: VIEWS.map((v) => (_jsx(Button, { label: text[v], size: "sm", variant: v === view ? "solid" : "outline", "aria-pressed": v === view, onClick: () => onViewChange(v) }, v))) })) : null] }), _jsx(Box, { overflowX: "auto", children: _jsxs(Box, { role: "grid", "aria-label": title, "aria-busy": isLoading || undefined, "data-view": view, minW: view === "day" ? undefined : "42rem", borderTop: "1px solid", borderLeft: "1px solid", borderColor: border, borderRadius: "lg", overflow: "hidden", children: [_jsx(Grid, { role: "row", templateColumns: template, children: headerDays.map((i) => (_jsx(Box, { role: "columnheader", "aria-label": weekdayLong[i], px: 2, py: 1, fontSize: "xs", fontWeight: 600, color: colors.textMuted, bg: colors.backgroundColor.main, borderRight: "1px solid", borderBottom: "1px solid", borderColor: border, children: weekdayShort[i] }, i))) }), weeks.map((week, weekIndex) => {
|
|
164
166
|
const layout = layoutWeek(week, shownEvents, maxLanes);
|
|
@@ -10,6 +10,7 @@ const PADDING_VALUES = {
|
|
|
10
10
|
md: "1rem 1.25rem",
|
|
11
11
|
lg: "1.25rem 1.5rem",
|
|
12
12
|
};
|
|
13
|
+
/** Themed card; `header` and `footer` render outside the body, `padding` sets density. */
|
|
13
14
|
const Card = forwardRef(function Card({ header, footer, children, color, colorScheme, direction = "column", align, justify, bodyProps, padding, ...rest }, ref) {
|
|
14
15
|
const cardProps = { ...rest };
|
|
15
16
|
delete cardProps.dividercolor;
|
|
@@ -3,6 +3,8 @@ import { resolveHoverTint } from "../../Theme/tokens/builders/outlineRung.js";
|
|
|
3
3
|
import { onFilled } from "../../Theme/tokens/builders/accentText.js";
|
|
4
4
|
import { focusVisibleRing } from "../../Theme/chakra/focusRing.styles.js";
|
|
5
5
|
import { fieldHoverBorder } from "../Common/fieldStyles.js";
|
|
6
|
+
import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
|
|
7
|
+
const BACKGROUND_BORDER_COLOR_BOX_SHADOW_TRANSITION = transitionFor(["background", "border-color", "box-shadow"]);
|
|
6
8
|
// One fill rule for every colour scheme, via resolveFilledSurface — was a flat [600].
|
|
7
9
|
export const Checkbox = {
|
|
8
10
|
baseStyle: ({ theme, colorScheme = "primary" }) => {
|
|
@@ -19,7 +21,7 @@ export const Checkbox = {
|
|
|
19
21
|
borderWidth: "1px",
|
|
20
22
|
borderRadius: "base",
|
|
21
23
|
borderColor: fieldHoverBorder(theme.colors),
|
|
22
|
-
transition:
|
|
24
|
+
transition: BACKGROUND_BORDER_COLOR_BOX_SHADOW_TRANSITION,
|
|
23
25
|
_invalid: {
|
|
24
26
|
borderColor: theme.colors.semanticText.error,
|
|
25
27
|
},
|
|
@@ -3,25 +3,28 @@ import { Children, createContext, isValidElement, useContext, useMemo, useState
|
|
|
3
3
|
import { Box, Flex } from "@chakra-ui/react";
|
|
4
4
|
import { Check } from "lucide-react";
|
|
5
5
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
6
|
+
import { DISABLED_OPACITY } from "../../Theme/tokens/primitives/states.js";
|
|
6
7
|
import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
|
|
7
8
|
import { reducedMotionSx } from "../../Theme/chakra/motion.js";
|
|
8
9
|
import { focusVisibleRing } from "../../Theme/chakra/focusRing.styles.js";
|
|
9
10
|
import { onFilled } from "../../Theme/tokens/builders/accentText.js";
|
|
11
|
+
import { tonalHover } from "./tonalHover.js";
|
|
12
|
+
import { isActivationKey } from "../Common/activationKey.js";
|
|
10
13
|
const GroupContext = createContext(null);
|
|
11
14
|
export const useSelectableGroup = () => useContext(GroupContext);
|
|
12
15
|
const firstEnabledValue = (children) => {
|
|
13
16
|
for (const child of Children.toArray(children)) {
|
|
14
17
|
if (!isValidElement(child))
|
|
15
18
|
continue;
|
|
16
|
-
const { value, disabled } = child.props;
|
|
17
|
-
if (typeof value === "string" && !disabled)
|
|
19
|
+
const { value, disabled, isDisabled } = child.props;
|
|
20
|
+
if (typeof value === "string" && !disabled && !isDisabled)
|
|
18
21
|
return value;
|
|
19
22
|
}
|
|
20
23
|
return undefined;
|
|
21
24
|
};
|
|
22
25
|
const STEP = { ArrowDown: 1, ArrowRight: 1, ArrowUp: -1, ArrowLeft: -1 };
|
|
23
26
|
/** Radiogroup with a roving tab stop; arrows move focus and selection together, like native radios. */
|
|
24
|
-
export const SelectableGroup = ({ value, defaultValue, onValueChange, gap = 3, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "data-testid": testId, }) => {
|
|
27
|
+
export const SelectableGroup = ({ value, defaultValue, onValueChange, gap = 3, columns = 1, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "data-testid": testId, }) => {
|
|
25
28
|
const [inner, setInner] = useState(defaultValue);
|
|
26
29
|
const current = value !== null && value !== void 0 ? value : inner;
|
|
27
30
|
const state = useMemo(() => ({
|
|
@@ -51,16 +54,16 @@ export const SelectableGroup = ({ value, defaultValue, onValueChange, gap = 3, c
|
|
|
51
54
|
if (next !== null)
|
|
52
55
|
state.select(next);
|
|
53
56
|
};
|
|
54
|
-
return (_jsx(GroupContext.Provider, { value: state, children: _jsx(Flex, { role: "radiogroup", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, direction: "column", gap: gap, onKeyDown: onKeyDown, "data-testid": testId, children: children }) }));
|
|
57
|
+
return (_jsx(GroupContext.Provider, { value: state, children: _jsx(Flex, { role: "radiogroup", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, direction: "column", gap: gap, ...(columns > 1 ? { display: "grid", gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` } : {}), onKeyDown: onKeyDown, "data-testid": testId, children: children }) }));
|
|
55
58
|
};
|
|
56
59
|
/** Tonal card surface; selection is a 2px ink ring plus a check, never colour alone. */
|
|
57
60
|
export const selectableSurface = (colors, { selected, disabled, interactive, ringed }) => ({
|
|
58
61
|
bg: colors.background[100],
|
|
59
62
|
borderRadius: "2xl",
|
|
60
63
|
boxShadow: selected ? `inset 0 0 0 2px ${colors.header[900]}` : "none",
|
|
61
|
-
opacity: disabled ?
|
|
64
|
+
opacity: disabled ? DISABLED_OPACITY : 1,
|
|
62
65
|
transition: transitionFor(["background-color", "box-shadow"]),
|
|
63
|
-
_hover: interactive && !selected && !disabled ? { bg: colors
|
|
66
|
+
_hover: interactive && !selected && !disabled ? { bg: tonalHover(colors) } : undefined,
|
|
64
67
|
sx: { ...(ringed ? focusVisibleRing(colors) : {}), ...reducedMotionSx() },
|
|
65
68
|
});
|
|
66
69
|
/** The 20px circle that carries selection state beside the text. */
|
|
@@ -93,7 +96,7 @@ export const useSelectable = ({ value, selected, disabled, onSelect, }) => {
|
|
|
93
96
|
onKeyDown: (event) => {
|
|
94
97
|
if (event.target !== event.currentTarget)
|
|
95
98
|
return;
|
|
96
|
-
if (event
|
|
99
|
+
if (isActivationKey(event)) {
|
|
97
100
|
event.preventDefault();
|
|
98
101
|
choose();
|
|
99
102
|
}
|
|
@@ -3,7 +3,8 @@ import { useId } from "react";
|
|
|
3
3
|
import { Box, Flex, Text } from "@chakra-ui/react";
|
|
4
4
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
5
5
|
import { RadioIndicator, selectableSurface, useSelectable } from "../CheckoutKit/selectable.js";
|
|
6
|
-
const ChoiceCard = ({ value, label, description, icon, disabled = false, "data-testid": testId }) => {
|
|
6
|
+
const ChoiceCard = ({ value, label, description, icon, disabled: disabledProp = false, isDisabled = false, "data-testid": testId }) => {
|
|
7
|
+
const disabled = disabledProp || isDisabled;
|
|
7
8
|
const { colors } = useCustomTheme();
|
|
8
9
|
const uid = useId();
|
|
9
10
|
const labelId = `${uid}-label`;
|
|
@@ -3,15 +3,16 @@ import { Box, Icon } from "@chakra-ui/react";
|
|
|
3
3
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
4
4
|
import { InfoIcon } from "lucide-react";
|
|
5
5
|
import ToolTip from "../ToolTip/ToolTip.js";
|
|
6
|
+
import { fontSizes } from "../../Theme/tokens/primitives/typography.js";
|
|
6
7
|
/** The one field-label look (13px / 500 / `text[700]`); `Label` and `TextLabel` both read it. */
|
|
7
8
|
export const fieldLabelStyles = (colors) => ({
|
|
8
9
|
color: colors.text[700],
|
|
9
10
|
fontWeight: 500,
|
|
10
|
-
fontSize: "
|
|
11
|
+
fontSize: fontSizes["xs-plus"],
|
|
11
12
|
lineHeight: "1.2",
|
|
12
13
|
mb: "0.375rem",
|
|
13
14
|
});
|
|
14
|
-
/** Renders a real `<label htmlFor>` only when `id` is given, else a `<span
|
|
15
|
+
/** Renders a real `<label htmlFor>` only when `id` is given, else a `<span>`. */
|
|
15
16
|
export const TextLabel = ({ label, id, isRequired = false, isInformation = false, informationMessage = "", fontSize, showTooltip, tooltipLabel, clampLines, inline = false, }) => {
|
|
16
17
|
const theme = useCustomTheme();
|
|
17
18
|
const clampStyles = clampLines ? {
|
|
@@ -30,7 +31,7 @@ export const TextLabel = ({ label, id, isRequired = false, isInformation = false
|
|
|
30
31
|
mb: inline ? 0 : base.mb,
|
|
31
32
|
fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : base.fontSize,
|
|
32
33
|
};
|
|
33
|
-
const content = (_jsxs(Box, { as: "span", display: "inline-flex", alignItems: "center", gap: "0.35rem", children: [showTooltip ? (_jsx(ToolTip, { label: tooltipLabel !== null && tooltipLabel !== void 0 ? tooltipLabel : label, hasArrow: true, placement: "top", fontSize: "xs", children: _jsx(Box, { as: "span", sx: clampStyles, children: label }) })) : (_jsx(Box, { as: "span", sx: clampStyles, children: label })), isRequired && (_jsx("span", { style: { color: theme.colors.semanticText.error, marginLeft: "0.125rem" }, children: "*" })), isInformation && informationMessage && (_jsx(ToolTip, { label: informationMessage, hasArrow: true, placement: "top", fontSize: "xs", children: _jsx(Icon, { as: InfoIcon, color: theme.colors.text[700], boxSize: 3.5 }) }))] }));
|
|
34
|
+
const content = (_jsxs(Box, { as: "span", display: "inline-flex", alignItems: "center", gap: "0.35rem", children: [showTooltip ? (_jsx(ToolTip, { label: tooltipLabel !== null && tooltipLabel !== void 0 ? tooltipLabel : label, hasArrow: true, placement: "top", fontSize: "xs", children: _jsx(Box, { as: "span", sx: clampStyles, children: label }) })) : (_jsx(Box, { as: "span", sx: clampStyles, children: label })), isRequired && (_jsx("span", { "aria-hidden": "true", style: { color: theme.colors.semanticText.error, marginLeft: "0.125rem" }, children: "*" })), isInformation && informationMessage && (_jsx(ToolTip, { label: informationMessage, hasArrow: true, placement: "top", fontSize: "xs", children: _jsx(Icon, { as: InfoIcon, color: theme.colors.text[700], boxSize: 3.5 }) }))] }));
|
|
34
35
|
// NOTE: real <label> only with a control id — Checkbox/Radio render this inline inside their own <label>.
|
|
35
36
|
return id ? (_jsx(Box, { as: "label", htmlFor: id, ...wrapperStyles, children: content })) : (_jsx(Box, { as: "span", ...wrapperStyles, children: content }));
|
|
36
37
|
};
|
|
@@ -6,8 +6,7 @@ const UnregisteredHelperText = ({ helperText, id, style }) => {
|
|
|
6
6
|
const styles = useFormControlStyles();
|
|
7
7
|
return (_jsx(chakra.div, { id: id, ...style, __css: styles.helperText, className: "chakra-form__helper-text", children: helperText }));
|
|
8
8
|
};
|
|
9
|
-
/**
|
|
10
|
-
/** Renders `helperText` unconditionally; prefer `FieldMessage`, which swaps it for the error. */
|
|
9
|
+
/** Always renders `helperText`; prefer `FieldMessage`, which swaps it for the error. */
|
|
11
10
|
const HelperText = ({ helperText, id }) => {
|
|
12
11
|
const theme = useCustomTheme();
|
|
13
12
|
const field = useFormControlContext();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { fontSizes } from "../../Theme/tokens/primitives/typography.js";
|
|
1
2
|
export const FIELD_MESSAGE_GAP = "0.25rem";
|
|
2
3
|
/** Shared type for helper and error text, so switching between them never shifts the row. */
|
|
3
4
|
export const fieldMessageStyles = (colors) => ({
|
|
4
5
|
mt: FIELD_MESSAGE_GAP,
|
|
5
|
-
fontSize:
|
|
6
|
+
fontSize: fontSizes.xs,
|
|
6
7
|
lineHeight: "1.125rem",
|
|
7
8
|
color: colors.textMuted,
|
|
8
9
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
const isReactElement = (child) => child !== null && typeof child === "object" && "type" in child;
|
|
3
|
+
// NOTE: matches by element type through nested Fragments, so `<>{cond && <Footer />}</>` is not dropped.
|
|
4
|
+
export const findSlot = (children, slot) => {
|
|
5
|
+
for (const child of React.Children.toArray(children)) {
|
|
6
|
+
if (!isReactElement(child))
|
|
7
|
+
continue;
|
|
8
|
+
if (child.type === slot)
|
|
9
|
+
return child;
|
|
10
|
+
if (child.type === React.Fragment) {
|
|
11
|
+
const nested = findSlot(child.props.children, slot);
|
|
12
|
+
if (nested)
|
|
13
|
+
return nested;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return undefined;
|
|
17
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { FOCUS_HALO_WIDTH, FOCUS_RING_WIDTH } from "../../Theme/chakra/focusRing.styles.js";
|
|
2
|
+
// NOTE: for chrome painted on a fixed dark surface, where the palette's focusRing pair is tuned for the page canvas instead.
|
|
3
|
+
export const surfaceFocusRing = (surface, ring) => `0 0 0 ${FOCUS_HALO_WIDTH}px ${surface}, 0 0 0 ${FOCUS_RING_WIDTH}px ${ring}`;
|