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
|
@@ -13,7 +13,7 @@ const fontSize_1 = require("../../Theme/provider/fontSize");
|
|
|
13
13
|
const brands_1 = require("../../Theme/tokens/brands");
|
|
14
14
|
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
15
15
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
16
|
-
const
|
|
16
|
+
const Select_1 = __importDefault(require("../Select/Select"));
|
|
17
17
|
const FieldLabel = ({ children }) => {
|
|
18
18
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
19
19
|
return ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", fontWeight: 500, color: colors.textMuted, mb: 2, children: children }));
|
|
@@ -30,11 +30,11 @@ const AppearanceSettings = ({ brand, fontSize, onBrandChange, onFontSizeChange,
|
|
|
30
30
|
const themeLabel = (_a = labels === null || labels === void 0 ? void 0 : labels.theme) !== null && _a !== void 0 ? _a : "Theme";
|
|
31
31
|
const colorModeLabel = (_b = labels === null || labels === void 0 ? void 0 : labels.colorMode) !== null && _b !== void 0 ? _b : "Color mode";
|
|
32
32
|
const fontSizeLabel = (_c = labels === null || labels === void 0 ? void 0 : labels.fontSize) !== null && _c !== void 0 ? _c : "Font Size";
|
|
33
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "stretch", spacing: 4, children: [showBrand && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsx)(FieldLabel, { children: themeLabel }), (0, jsx_runtime_1.jsx)(
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "stretch", spacing: 4, children: [showBrand && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsx)(FieldLabel, { children: themeLabel }), (0, jsx_runtime_1.jsx)(Select_1.default, { native: false, options: brandOptions, value: brand, isSearchable: false, size: size, "aria-label": themeLabel, "data-testid": "appearance-brand-select", onChange: (option) => {
|
|
34
34
|
if (!option)
|
|
35
35
|
return;
|
|
36
36
|
onBrandChange === null || onBrandChange === void 0 ? void 0 : onBrandChange(String(option.id));
|
|
37
|
-
} })] })), showColorMode && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsx)(FieldLabel, { children: colorModeLabel }), (0, jsx_runtime_1.jsx)(react_2.Box, { "data-testid": "appearance-mode-switcher", children: (0, jsx_runtime_1.jsx)(provider_1.ThemeSwitcher, { variant: "segmented", showBrandPicker: false, size: size, "aria-label": colorModeLabel }) })] })), showFontSize && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsx)(FieldLabel, { children: fontSizeLabel }), (0, jsx_runtime_1.jsx)(
|
|
37
|
+
} })] })), showColorMode && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsx)(FieldLabel, { children: colorModeLabel }), (0, jsx_runtime_1.jsx)(react_2.Box, { "data-testid": "appearance-mode-switcher", children: (0, jsx_runtime_1.jsx)(provider_1.ThemeSwitcher, { variant: "segmented", showBrandPicker: false, size: size, "aria-label": colorModeLabel }) })] })), showFontSize && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsx)(FieldLabel, { children: fontSizeLabel }), (0, jsx_runtime_1.jsx)(Select_1.default, { native: false, options: fontSize_1.FONT_SIZE_OPTIONS, value: fontSize, isSearchable: false, size: size, "aria-label": fontSizeLabel, "data-testid": "appearance-font-size-select",
|
|
38
38
|
// Each row previews the size it sets, so the list is self-explaining.
|
|
39
39
|
renderOption: (option) => ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", style: { fontSize: String(option.id) }, children: option.label })), onChange: (option) => {
|
|
40
40
|
if (!option)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ControlSize } from "../../Theme/tokens/primitives/controlSizes";
|
|
2
2
|
/** i18n overrides for this panel's field labels; any key left out keeps the library's English default. */
|
|
3
3
|
export type AppearanceSettingsLabels = {
|
|
4
4
|
theme?: string;
|
|
@@ -14,7 +14,7 @@ export type AppearanceSettingsProps = {
|
|
|
14
14
|
showBrand?: boolean;
|
|
15
15
|
showColorMode?: boolean;
|
|
16
16
|
showFontSize?: boolean;
|
|
17
|
-
size?:
|
|
17
|
+
size?: Extract<ControlSize, "sm" | "md" | "lg">;
|
|
18
18
|
/** Pass translated strings; the library ships English defaults. */
|
|
19
19
|
labels?: AppearanceSettingsLabels;
|
|
20
20
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { PaletteProps } from "../../Theme/tokens/types";
|
|
2
|
-
declare const AVATAR_SCALE_KEYS: readonly ["red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink"];
|
|
2
|
+
export declare const AVATAR_SCALE_KEYS: readonly ["red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink"];
|
|
3
3
|
export type AvatarScaleKey = (typeof AVATAR_SCALE_KEYS)[number];
|
|
4
4
|
export declare const avatarScaleKeyFor: (seed: string) => AvatarScaleKey;
|
|
5
5
|
export type AvatarColorway = {
|
|
6
6
|
bg: string;
|
|
7
7
|
color: string;
|
|
8
8
|
};
|
|
9
|
+
export declare const avatarColorwayFor: (key: AvatarScaleKey, colors: PaletteProps) => AvatarColorway;
|
|
9
10
|
export declare const resolveAvatarColorway: (seed: string, colors: PaletteProps) => AvatarColorway;
|
|
10
11
|
export declare const initialsFor: (name: string) => string;
|
|
11
|
-
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initialsFor = exports.resolveAvatarColorway = exports.avatarScaleKeyFor = void 0;
|
|
3
|
+
exports.initialsFor = exports.resolveAvatarColorway = exports.avatarColorwayFor = exports.avatarScaleKeyFor = exports.AVATAR_SCALE_KEYS = void 0;
|
|
4
4
|
const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
|
|
5
|
-
|
|
5
|
+
exports.AVATAR_SCALE_KEYS = [
|
|
6
6
|
"red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink",
|
|
7
7
|
];
|
|
8
8
|
const hashSeed = (seed) => {
|
|
@@ -11,14 +11,15 @@ const hashSeed = (seed) => {
|
|
|
11
11
|
hash = (hash * 31 + seed.charCodeAt(i)) >>> 0;
|
|
12
12
|
return hash;
|
|
13
13
|
};
|
|
14
|
-
const avatarScaleKeyFor = (seed) => AVATAR_SCALE_KEYS[hashSeed(seed) % AVATAR_SCALE_KEYS.length];
|
|
14
|
+
const avatarScaleKeyFor = (seed) => exports.AVATAR_SCALE_KEYS[hashSeed(seed) % exports.AVATAR_SCALE_KEYS.length];
|
|
15
15
|
exports.avatarScaleKeyFor = avatarScaleKeyFor;
|
|
16
16
|
// Always via resolveFilledSurface, never scale[500] + a guessed ink.
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const { fill, color } = (0, filledSurface_1.resolveFilledSurface)(scale, colors);
|
|
17
|
+
const avatarColorwayFor = (key, colors) => {
|
|
18
|
+
const { fill, color } = (0, filledSurface_1.resolveFilledSurface)(colors[key], colors);
|
|
20
19
|
return { bg: fill, color };
|
|
21
20
|
};
|
|
21
|
+
exports.avatarColorwayFor = avatarColorwayFor;
|
|
22
|
+
const resolveAvatarColorway = (seed, colors) => (0, exports.avatarColorwayFor)((0, exports.avatarScaleKeyFor)(seed), colors);
|
|
22
23
|
exports.resolveAvatarColorway = resolveAvatarColorway;
|
|
23
24
|
const initialsFor = (name) => {
|
|
24
25
|
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
@@ -2,7 +2,7 @@ import { BreadcrumbProps } from "@chakra-ui/react";
|
|
|
2
2
|
/** `isCurrentPage` marks only the last item in `items`; `handleClick` fully replaces the link's default navigation. */
|
|
3
3
|
export type BreadcrumbsProps = Pick<BreadcrumbProps, "spacing" | "separator" | "fontWeight" | "fontSize"> & {
|
|
4
4
|
isCurrentPage?: boolean;
|
|
5
|
-
/**
|
|
5
|
+
/** @deprecated Never read by Breadcrumbs — has no effect at all. */
|
|
6
6
|
isLastChild?: boolean;
|
|
7
7
|
/** Called with a crumb's path; never called for a label-only crumb (no `path`). */
|
|
8
8
|
handleClick: (path: string) => void;
|
|
@@ -8,6 +8,8 @@ const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
|
8
8
|
const rowStates_1 = require("../../Theme/tokens/builders/rowStates");
|
|
9
9
|
const motion_1 = require("../../Theme/chakra/motion");
|
|
10
10
|
const primitives_1 = require("../../Theme/tokens/primitives");
|
|
11
|
+
const borderWidths_1 = require("../../Theme/tokens/primitives/borderWidths");
|
|
12
|
+
const states_1 = require("../../Theme/tokens/primitives/states");
|
|
11
13
|
const BUTTON_TRANSITION = [
|
|
12
14
|
(0, primitives_1.transitionFor)(["background-color", "border-color", "color", "box-shadow", "filter"]),
|
|
13
15
|
(0, primitives_1.transitionFor)(["transform"], "fast", "out"),
|
|
@@ -27,6 +29,7 @@ const controlSize = (size) => {
|
|
|
27
29
|
// NOTE: a bare button sits on the canvas, a card or an overlay; dark overlays are the hardest plane.
|
|
28
30
|
const onCanvasText = (theme, colorScheme) => (0, accentText_1.accentTextOnPlanes)(theme.colors[colorScheme], [
|
|
29
31
|
theme.colors.backgroundColor.main,
|
|
32
|
+
theme.colors.backgroundColor.base,
|
|
30
33
|
theme.colors.background[50],
|
|
31
34
|
theme.colors.surfaceRaised,
|
|
32
35
|
]);
|
|
@@ -75,7 +78,7 @@ exports.Button = {
|
|
|
75
78
|
transition: BUTTON_TRANSITION,
|
|
76
79
|
...(0, motion_1.reducedMotionSx)(),
|
|
77
80
|
_disabled: {
|
|
78
|
-
opacity:
|
|
81
|
+
opacity: states_1.DISABLED_OPACITY,
|
|
79
82
|
cursor: "not-allowed",
|
|
80
83
|
},
|
|
81
84
|
...focusRing(theme),
|
|
@@ -114,7 +117,7 @@ exports.Button = {
|
|
|
114
117
|
outline: ({ theme, colorScheme = "primary" }) => {
|
|
115
118
|
const ink = onCanvasText(theme, colorScheme);
|
|
116
119
|
return {
|
|
117
|
-
border:
|
|
120
|
+
border: `${borderWidths_1.BORDER_WIDTHS.hairline} solid`,
|
|
118
121
|
borderColor: ink,
|
|
119
122
|
color: ink,
|
|
120
123
|
bg: "transparent",
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ButtonProps as ChakraButtonProps } from "@chakra-ui/react";
|
|
2
|
+
import type { DataAttributes } from "../Common/dataAttributes";
|
|
2
3
|
type LayoutProps = Pick<ChakraButtonProps, "as" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "p" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "w" | "minW" | "maxW" | "h" | "minH" | "maxH" | "boxSize" | "flex" | "flexShrink" | "flexGrow" | "alignSelf" | "justifyContent" | "cursor" | "fontWeight" | "fontSize" | "textAlign" | "whiteSpace" | "_hover" | "_active" | "_focus" | "_focusVisible" | "_disabled" | "isActive" | "onKeyDown" | "onFocus" | "onBlur" | "onPointerDown" | "tabIndex" | "form" | "name" | "value" | "autoFocus" | "role">;
|
|
3
|
-
|
|
4
|
-
[key: `data-${string}`]: string | number | boolean | undefined;
|
|
5
|
-
};
|
|
6
|
-
/** Themed Chakra Button (default size "sm"); loading shows a spinner and keeps the width — for a plain unthemed <button>, see the separate Buttons component. */
|
|
4
|
+
/** Themed Chakra Button (default size "sm"); loading shows a spinner and keeps the width. */
|
|
7
5
|
export type ButtonProps = LayoutProps & DataAttributes & Pick<ChakraButtonProps, "onClick" | "leftIcon" | "rightIcon" | "isDisabled" | "isLoading" | "spinner" | "sx" | "border" | "borderRadius" | "onMouseEnter" | "onMouseLeave" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-expanded" | "aria-haspopup" | "aria-controls" | "aria-pressed" | "aria-current" | "id" | "title"> & {
|
|
8
6
|
/** Button text; ignored when `children` is passed. No label or children plus an icon = icon-only. */
|
|
9
7
|
label?: string;
|
|
@@ -8,6 +8,8 @@ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
|
8
8
|
const gradientInk_1 = require("../../Theme/tokens/builders/gradientInk");
|
|
9
9
|
const color_1 = require("../../Theme/tokens/builders/color");
|
|
10
10
|
const rafThrottle_1 = require("../../Utils/rafThrottle");
|
|
11
|
+
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
12
|
+
const BACKGROUND_TRANSITION = (0, motion_1.transitionFor)(["background"]);
|
|
11
13
|
function ButtonGroupIcon({ leftIcon, rightIcon, onLeftIconClick, onRightIconClick, buttonText, onButtonClick, onButtongroupClick, size, variant, color, buttonGroupStyle, buttonGroupLeftIconStyle, buttonGroupRightIconStyle, buttonStyle, onBlurLeftIcon, onBlurRightIcon, dropdownOptions, // New prop for dropdown options
|
|
12
14
|
onDropdownOptionClick, // New prop to handle option clicks
|
|
13
15
|
rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, leftIconLoading, RightIconLoading, }) {
|
|
@@ -76,7 +78,7 @@ rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, left
|
|
|
76
78
|
fontSize: "xs-plus",
|
|
77
79
|
fontWeight: 500,
|
|
78
80
|
color: theme.colors.text[700],
|
|
79
|
-
transition:
|
|
81
|
+
transition: BACKGROUND_TRANSITION,
|
|
80
82
|
"& svg": { width: "16px", height: "16px" },
|
|
81
83
|
...(divider
|
|
82
84
|
? {
|
|
@@ -9,10 +9,12 @@ const react_2 = require("@chakra-ui/react");
|
|
|
9
9
|
const lucide_react_1 = require("lucide-react");
|
|
10
10
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
11
11
|
const Skeletons_1 = __importDefault(require("../Skeletons/Skeletons"));
|
|
12
|
+
const VisuallyHidden_1 = __importDefault(require("../VisuallyHidden/VisuallyHidden"));
|
|
12
13
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
13
14
|
const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
14
15
|
const tone_1 = require("../../Theme/tokens/builders/tone");
|
|
15
16
|
const calendarMath_1 = require("./calendarMath");
|
|
17
|
+
const activationKey_1 = require("../Common/activationKey");
|
|
16
18
|
const plural = (n, one, many) => `${n} ${n === 1 ? one : many}`;
|
|
17
19
|
const DEFAULT_LABELS = {
|
|
18
20
|
today: "Today",
|
|
@@ -118,7 +120,7 @@ const CalendarGrid = ({ view, date, events, onViewChange, onDateChange, onEventC
|
|
|
118
120
|
onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(next);
|
|
119
121
|
return;
|
|
120
122
|
}
|
|
121
|
-
if ((
|
|
123
|
+
if ((0, activationKey_1.isActivationKey)(e) && onDateChange) {
|
|
122
124
|
e.preventDefault();
|
|
123
125
|
onDateChange(cellDate);
|
|
124
126
|
}
|
|
@@ -161,9 +163,9 @@ const CalendarGrid = ({ view, date, events, onViewChange, onDateChange, onEventC
|
|
|
161
163
|
cellRefs.current.set(key, el);
|
|
162
164
|
else
|
|
163
165
|
cellRefs.current.delete(key);
|
|
164
|
-
}, "data-date": key, "aria-
|
|
166
|
+
}, "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: {
|
|
165
167
|
boxShadow: (0, focusRing_styles_1.insetFocusRingShadow)(colors),
|
|
166
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_2.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));
|
|
168
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_2.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() }), (0, jsx_runtime_1.jsx)(VisuallyHidden_1.default, { position: "absolute", children: label }), body] }, key));
|
|
167
169
|
};
|
|
168
170
|
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", justify: "space-between", wrap: "wrap", gap: 2, mb: 3, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, children: [onDateChange ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Button_1.default, { label: text.today, size: "sm", variant: "outline", onClick: () => onDateChange((0, calendarMath_1.startOfDay)(new Date())) }), (0, jsx_runtime_1.jsx)(Button_1.default, { "aria-label": text.previous, size: "sm", variant: "ghost", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, { size: 16, "aria-hidden": true }), onClick: () => onDateChange((0, calendarMath_1.shiftAnchor)(view, anchor, -1)) }), (0, jsx_runtime_1.jsx)(Button_1.default, { "aria-label": text.next, size: "sm", variant: "ghost", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 16, "aria-hidden": true }), onClick: () => onDateChange((0, calendarMath_1.shiftAnchor)(view, anchor, 1)) })] })) : null, (0, jsx_runtime_1.jsx)(react_2.Text, { as: "h2", fontSize: "md", fontWeight: 600, color: colors.header[900], children: title })] }), onViewChange ? ((0, jsx_runtime_1.jsx)(react_2.Flex, { role: "group", "aria-label": text[view], gap: 1, children: VIEWS.map((v) => ((0, jsx_runtime_1.jsx)(Button_1.default, { label: text[v], size: "sm", variant: v === view ? "solid" : "outline", "aria-pressed": v === view, onClick: () => onViewChange(v) }, v))) })) : null] }), (0, jsx_runtime_1.jsx)(react_2.Box, { overflowX: "auto", children: (0, jsx_runtime_1.jsxs)(react_2.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: [(0, jsx_runtime_1.jsx)(react_2.Grid, { role: "row", templateColumns: template, children: headerDays.map((i) => ((0, jsx_runtime_1.jsx)(react_2.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) => {
|
|
169
171
|
const layout = (0, calendarMath_1.layoutWeek)(week, shownEvents, maxLanes);
|
|
@@ -27,7 +27,7 @@ export type CalendarGridLabels = {
|
|
|
27
27
|
more: (count: number) => string;
|
|
28
28
|
/** Accessible name of the "more" button, e.g. "3 more events on Tuesday, 14 October 2026". */
|
|
29
29
|
moreLabel: (count: number, date: string) => string;
|
|
30
|
-
/**
|
|
30
|
+
/** Follows the date in a day cell's accessible name, e.g. "3 events"; the cell's own content comes after it. */
|
|
31
31
|
eventCount: (count: number) => string;
|
|
32
32
|
};
|
|
33
33
|
/** Props for the month/week/day event grid; fully controlled through `view` and `date`. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CardPadding } from "./CardProps";
|
|
2
|
+
/** Themed card; `header` and `footer` render outside the body, `padding` sets density. */
|
|
2
3
|
declare const Card: import("react").ForwardRefExoticComponent<Omit<import("@chakra-ui/react").CardProps, "color" | "colorScheme" | "direction" | "padding" | "size" | "justify" | "children" | "variant" | "align"> & {
|
|
3
4
|
dividercolor?: "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "whiteAlpha" | "blackAlpha";
|
|
4
5
|
dividersize?: string;
|
|
@@ -12,6 +12,7 @@ const PADDING_VALUES = {
|
|
|
12
12
|
md: "1rem 1.25rem",
|
|
13
13
|
lg: "1.25rem 1.5rem",
|
|
14
14
|
};
|
|
15
|
+
/** Themed card; `header` and `footer` render outside the body, `padding` sets density. */
|
|
15
16
|
const Card = (0, react_1.forwardRef)(function Card({ header, footer, children, color, colorScheme, direction = "column", align, justify, bodyProps, padding, ...rest }, ref) {
|
|
16
17
|
const cardProps = { ...rest };
|
|
17
18
|
delete cardProps.dividercolor;
|
|
@@ -6,6 +6,8 @@ const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
|
6
6
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
7
7
|
const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
8
8
|
const fieldStyles_1 = require("../Common/fieldStyles");
|
|
9
|
+
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
10
|
+
const BACKGROUND_BORDER_COLOR_BOX_SHADOW_TRANSITION = (0, motion_1.transitionFor)(["background", "border-color", "box-shadow"]);
|
|
9
11
|
// One fill rule for every colour scheme, via resolveFilledSurface — was a flat [600].
|
|
10
12
|
exports.Checkbox = {
|
|
11
13
|
baseStyle: ({ theme, colorScheme = "primary" }) => {
|
|
@@ -22,7 +24,7 @@ exports.Checkbox = {
|
|
|
22
24
|
borderWidth: "1px",
|
|
23
25
|
borderRadius: "base",
|
|
24
26
|
borderColor: (0, fieldStyles_1.fieldHoverBorder)(theme.colors),
|
|
25
|
-
transition:
|
|
27
|
+
transition: BACKGROUND_BORDER_COLOR_BOX_SHADOW_TRANSITION,
|
|
26
28
|
_invalid: {
|
|
27
29
|
borderColor: theme.colors.semanticText.error,
|
|
28
30
|
},
|
|
@@ -7,18 +7,20 @@ type GroupState = {
|
|
|
7
7
|
select: (value: string) => void;
|
|
8
8
|
};
|
|
9
9
|
export declare const useSelectableGroup: () => GroupState | null;
|
|
10
|
+
/** Single-select radio group; controlled via `value`, uncontrolled via `defaultValue`. */
|
|
10
11
|
export type SelectableGroupProps = {
|
|
11
12
|
value?: string;
|
|
12
13
|
defaultValue?: string;
|
|
13
14
|
onValueChange?: (value: string) => void;
|
|
14
15
|
gap?: number;
|
|
16
|
+
columns?: number;
|
|
15
17
|
children: ReactNode;
|
|
16
18
|
"aria-label"?: string;
|
|
17
19
|
"aria-labelledby"?: string;
|
|
18
20
|
"data-testid"?: string;
|
|
19
21
|
};
|
|
20
22
|
/** Radiogroup with a roving tab stop; arrows move focus and selection together, like native radios. */
|
|
21
|
-
export declare const SelectableGroup: ({ value, defaultValue, onValueChange, gap, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "data-testid": testId, }: SelectableGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const SelectableGroup: ({ value, defaultValue, onValueChange, gap, columns, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "data-testid": testId, }: SelectableGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
24
|
/** Tonal card surface; selection is a 2px ink ring plus a check, never colour alone. */
|
|
23
25
|
export declare const selectableSurface: (colors: PaletteProps, { selected, disabled, interactive, ringed }: {
|
|
24
26
|
selected: boolean;
|
|
@@ -6,10 +6,13 @@ const react_1 = require("react");
|
|
|
6
6
|
const react_2 = require("@chakra-ui/react");
|
|
7
7
|
const lucide_react_1 = require("lucide-react");
|
|
8
8
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
9
|
+
const states_1 = require("../../Theme/tokens/primitives/states");
|
|
9
10
|
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
10
11
|
const motion_2 = require("../../Theme/chakra/motion");
|
|
11
12
|
const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
12
13
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
14
|
+
const tonalHover_1 = require("./tonalHover");
|
|
15
|
+
const activationKey_1 = require("../Common/activationKey");
|
|
13
16
|
const GroupContext = (0, react_1.createContext)(null);
|
|
14
17
|
const useSelectableGroup = () => (0, react_1.useContext)(GroupContext);
|
|
15
18
|
exports.useSelectableGroup = useSelectableGroup;
|
|
@@ -17,15 +20,15 @@ const firstEnabledValue = (children) => {
|
|
|
17
20
|
for (const child of react_1.Children.toArray(children)) {
|
|
18
21
|
if (!(0, react_1.isValidElement)(child))
|
|
19
22
|
continue;
|
|
20
|
-
const { value, disabled } = child.props;
|
|
21
|
-
if (typeof value === "string" && !disabled)
|
|
23
|
+
const { value, disabled, isDisabled } = child.props;
|
|
24
|
+
if (typeof value === "string" && !disabled && !isDisabled)
|
|
22
25
|
return value;
|
|
23
26
|
}
|
|
24
27
|
return undefined;
|
|
25
28
|
};
|
|
26
29
|
const STEP = { ArrowDown: 1, ArrowRight: 1, ArrowUp: -1, ArrowLeft: -1 };
|
|
27
30
|
/** Radiogroup with a roving tab stop; arrows move focus and selection together, like native radios. */
|
|
28
|
-
const SelectableGroup = ({ value, defaultValue, onValueChange, gap = 3, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "data-testid": testId, }) => {
|
|
31
|
+
const SelectableGroup = ({ value, defaultValue, onValueChange, gap = 3, columns = 1, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "data-testid": testId, }) => {
|
|
29
32
|
const [inner, setInner] = (0, react_1.useState)(defaultValue);
|
|
30
33
|
const current = value !== null && value !== void 0 ? value : inner;
|
|
31
34
|
const state = (0, react_1.useMemo)(() => ({
|
|
@@ -55,7 +58,7 @@ const SelectableGroup = ({ value, defaultValue, onValueChange, gap = 3, children
|
|
|
55
58
|
if (next !== null)
|
|
56
59
|
state.select(next);
|
|
57
60
|
};
|
|
58
|
-
return ((0, jsx_runtime_1.jsx)(GroupContext.Provider, { value: state, children: (0, jsx_runtime_1.jsx)(react_2.Flex, { role: "radiogroup", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, direction: "column", gap: gap, onKeyDown: onKeyDown, "data-testid": testId, children: children }) }));
|
|
61
|
+
return ((0, jsx_runtime_1.jsx)(GroupContext.Provider, { value: state, children: (0, jsx_runtime_1.jsx)(react_2.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 }) }));
|
|
59
62
|
};
|
|
60
63
|
exports.SelectableGroup = SelectableGroup;
|
|
61
64
|
/** Tonal card surface; selection is a 2px ink ring plus a check, never colour alone. */
|
|
@@ -63,9 +66,9 @@ const selectableSurface = (colors, { selected, disabled, interactive, ringed })
|
|
|
63
66
|
bg: colors.background[100],
|
|
64
67
|
borderRadius: "2xl",
|
|
65
68
|
boxShadow: selected ? `inset 0 0 0 2px ${colors.header[900]}` : "none",
|
|
66
|
-
opacity: disabled ?
|
|
69
|
+
opacity: disabled ? states_1.DISABLED_OPACITY : 1,
|
|
67
70
|
transition: (0, motion_1.transitionFor)(["background-color", "box-shadow"]),
|
|
68
|
-
_hover: interactive && !selected && !disabled ? { bg: colors
|
|
71
|
+
_hover: interactive && !selected && !disabled ? { bg: (0, tonalHover_1.tonalHover)(colors) } : undefined,
|
|
69
72
|
sx: { ...(ringed ? (0, focusRing_styles_1.focusVisibleRing)(colors) : {}), ...(0, motion_2.reducedMotionSx)() },
|
|
70
73
|
});
|
|
71
74
|
exports.selectableSurface = selectableSurface;
|
|
@@ -100,7 +103,7 @@ const useSelectable = ({ value, selected, disabled, onSelect, }) => {
|
|
|
100
103
|
onKeyDown: (event) => {
|
|
101
104
|
if (event.target !== event.currentTarget)
|
|
102
105
|
return;
|
|
103
|
-
if (
|
|
106
|
+
if ((0, activationKey_1.isActivationKey)(event)) {
|
|
104
107
|
event.preventDefault();
|
|
105
108
|
choose();
|
|
106
109
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tonalHover = void 0;
|
|
4
|
+
const planeStep_1 = require("../../Theme/tokens/builders/planeStep");
|
|
5
|
+
const tonalHover = (colors, rest = colors.background[100], fill = colors.background[200]) => (0, planeStep_1.bandOn)(fill, rest);
|
|
6
|
+
exports.tonalHover = tonalHover;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ChoiceCardProps } from "./ChoiceCardProps";
|
|
2
|
-
declare const ChoiceCard: ({ value, label, description, icon, disabled, "data-testid": testId }: ChoiceCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const ChoiceCard: ({ value, label, description, icon, disabled: disabledProp, isDisabled, "data-testid": testId }: ChoiceCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ChoiceCard;
|
|
@@ -5,7 +5,8 @@ const react_1 = require("react");
|
|
|
5
5
|
const react_2 = require("@chakra-ui/react");
|
|
6
6
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
7
7
|
const selectable_1 = require("../CheckoutKit/selectable");
|
|
8
|
-
const ChoiceCard = ({ value, label, description, icon, disabled = false, "data-testid": testId }) => {
|
|
8
|
+
const ChoiceCard = ({ value, label, description, icon, disabled: disabledProp = false, isDisabled = false, "data-testid": testId }) => {
|
|
9
|
+
const disabled = disabledProp || isDisabled;
|
|
9
10
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
10
11
|
const uid = (0, react_1.useId)();
|
|
11
12
|
const labelId = `${uid}-label`;
|
|
@@ -11,6 +11,8 @@ export interface ChoiceCardProps {
|
|
|
11
11
|
icon?: ReactNode;
|
|
12
12
|
/** Dims the card and skips it for clicks, arrow keys and the tab stop. */
|
|
13
13
|
disabled?: boolean;
|
|
14
|
+
/** Alias of `disabled` for the library's `is*` prop convention; either one disables the card. */
|
|
15
|
+
isDisabled?: boolean;
|
|
14
16
|
"data-testid"?: string;
|
|
15
17
|
}
|
|
16
18
|
/** Radiogroup of `ChoiceCard`s: one tab stop; arrows, Home and End move focus and selection together. */
|
|
@@ -19,6 +21,10 @@ export interface ChoiceCardGroupProps {
|
|
|
19
21
|
/** Seeds an uncontrolled selection; ignored once `value` is passed. */
|
|
20
22
|
defaultValue?: string;
|
|
21
23
|
onValueChange?: (value: string) => void;
|
|
24
|
+
/** Cards per row; `1` (default) stacks them in a column, more lays them out in an equal-width grid. */
|
|
25
|
+
columns?: number;
|
|
26
|
+
/** Space between cards in theme space units (`3` = 0.75rem). */
|
|
27
|
+
gap?: number;
|
|
22
28
|
/** Direct `ChoiceCard` children; a wrapper component hides their `value` from the tab stop. */
|
|
23
29
|
children: ReactNode;
|
|
24
30
|
/** Name the group with this or `aria-labelledby`. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type FieldMessageState } from "./fieldMessageStyles";
|
|
2
|
+
/** Error and helper text state plus the ids that wire it to the control. */
|
|
2
3
|
export type FieldMessageProps = FieldMessageState & {
|
|
3
4
|
/** From `useFieldIds` — must match the control's `aria-describedby`. */
|
|
4
5
|
helperId?: string;
|
|
@@ -7,7 +7,7 @@ export declare const fieldLabelStyles: (colors: PaletteProps) => {
|
|
|
7
7
|
lineHeight: string;
|
|
8
8
|
mb: string;
|
|
9
9
|
};
|
|
10
|
-
/** Renders a real `<label htmlFor>` only when `id` is given, else a `<span
|
|
10
|
+
/** Renders a real `<label htmlFor>` only when `id` is given, else a `<span>`. */
|
|
11
11
|
export declare const TextLabel: ({ label, id, isRequired, isInformation, informationMessage, fontSize, showTooltip, tooltipLabel, clampLines, inline, }: {
|
|
12
12
|
label: string;
|
|
13
13
|
/** Omit only when this sits inside another element's own `<label>` (e.g. Checkbox) — otherwise the visible text has no accessible association. */
|
|
@@ -9,16 +9,17 @@ const react_1 = require("@chakra-ui/react");
|
|
|
9
9
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
10
10
|
const lucide_react_1 = require("lucide-react");
|
|
11
11
|
const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
|
|
12
|
+
const typography_1 = require("../../Theme/tokens/primitives/typography");
|
|
12
13
|
/** The one field-label look (13px / 500 / `text[700]`); `Label` and `TextLabel` both read it. */
|
|
13
14
|
const fieldLabelStyles = (colors) => ({
|
|
14
15
|
color: colors.text[700],
|
|
15
16
|
fontWeight: 500,
|
|
16
|
-
fontSize:
|
|
17
|
+
fontSize: typography_1.fontSizes["xs-plus"],
|
|
17
18
|
lineHeight: "1.2",
|
|
18
19
|
mb: "0.375rem",
|
|
19
20
|
});
|
|
20
21
|
exports.fieldLabelStyles = fieldLabelStyles;
|
|
21
|
-
/** Renders a real `<label htmlFor>` only when `id` is given, else a `<span
|
|
22
|
+
/** Renders a real `<label htmlFor>` only when `id` is given, else a `<span>`. */
|
|
22
23
|
const TextLabel = ({ label, id, isRequired = false, isInformation = false, informationMessage = "", fontSize, showTooltip, tooltipLabel, clampLines, inline = false, }) => {
|
|
23
24
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
24
25
|
const clampStyles = clampLines ? {
|
|
@@ -37,7 +38,7 @@ const TextLabel = ({ label, id, isRequired = false, isInformation = false, infor
|
|
|
37
38
|
mb: inline ? 0 : base.mb,
|
|
38
39
|
fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : base.fontSize,
|
|
39
40
|
};
|
|
40
|
-
const content = ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "span", display: "inline-flex", alignItems: "center", gap: "0.35rem", children: [showTooltip ? ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: tooltipLabel !== null && tooltipLabel !== void 0 ? tooltipLabel : label, hasArrow: true, placement: "top", fontSize: "xs", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, children: label }) })) : ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, children: label })), isRequired && ((0, jsx_runtime_1.jsx)("span", { style: { color: theme.colors.semanticText.error, marginLeft: "0.125rem" }, children: "*" })), isInformation && informationMessage && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: informationMessage, hasArrow: true, placement: "top", fontSize: "xs", children: (0, jsx_runtime_1.jsx)(react_1.Icon, { as: lucide_react_1.InfoIcon, color: theme.colors.text[700], boxSize: 3.5 }) }))] }));
|
|
41
|
+
const content = ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "span", display: "inline-flex", alignItems: "center", gap: "0.35rem", children: [showTooltip ? ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: tooltipLabel !== null && tooltipLabel !== void 0 ? tooltipLabel : label, hasArrow: true, placement: "top", fontSize: "xs", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, children: label }) })) : ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, children: label })), isRequired && ((0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", style: { color: theme.colors.semanticText.error, marginLeft: "0.125rem" }, children: "*" })), isInformation && informationMessage && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: informationMessage, hasArrow: true, placement: "top", fontSize: "xs", children: (0, jsx_runtime_1.jsx)(react_1.Icon, { as: lucide_react_1.InfoIcon, color: theme.colors.text[700], boxSize: 3.5 }) }))] }));
|
|
41
42
|
// NOTE: real <label> only with a control id — Checkbox/Radio render this inline inside their own <label>.
|
|
42
43
|
return id ? ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "label", htmlFor: id, ...wrapperStyles, children: content })) : ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", ...wrapperStyles, children: content }));
|
|
43
44
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
/** `id` is optional; omitted, a FormControl wires its own aria-describedby. */
|
|
1
2
|
type HelperTextProps = {
|
|
2
3
|
helperText: string;
|
|
3
4
|
id?: string;
|
|
4
5
|
};
|
|
5
|
-
/**
|
|
6
|
-
/** Renders `helperText` unconditionally; prefer `FieldMessage`, which swaps it for the error. */
|
|
6
|
+
/** Always renders `helperText`; prefer `FieldMessage`, which swaps it for the error. */
|
|
7
7
|
declare const HelperText: ({ helperText, id }: HelperTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default HelperText;
|
|
@@ -8,8 +8,7 @@ const UnregisteredHelperText = ({ helperText, id, style }) => {
|
|
|
8
8
|
const styles = (0, react_1.useFormControlStyles)();
|
|
9
9
|
return ((0, jsx_runtime_1.jsx)(react_1.chakra.div, { id: id, ...style, __css: styles.helperText, className: "chakra-form__helper-text", children: helperText }));
|
|
10
10
|
};
|
|
11
|
-
/**
|
|
12
|
-
/** Renders `helperText` unconditionally; prefer `FieldMessage`, which swaps it for the error. */
|
|
11
|
+
/** Always renders `helperText`; prefer `FieldMessage`, which swaps it for the error. */
|
|
13
12
|
const HelperText = ({ helperText, id }) => {
|
|
14
13
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
15
14
|
const field = (0, react_1.useFormControlContext)();
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.onActivationKey = exports.isActivationKey = void 0;
|
|
4
|
+
const isActivationKey = (event) => event.key === "Enter" || event.key === " ";
|
|
5
|
+
exports.isActivationKey = isActivationKey;
|
|
6
|
+
const onActivationKey = (activate) => (event) => {
|
|
7
|
+
if (!(0, exports.isActivationKey)(event))
|
|
8
|
+
return;
|
|
9
|
+
event.preventDefault();
|
|
10
|
+
activate(event);
|
|
11
|
+
};
|
|
12
|
+
exports.onActivationKey = onActivationKey;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fieldMessageVisibility = exports.fieldMessageStyles = exports.FIELD_MESSAGE_GAP = void 0;
|
|
4
|
+
const typography_1 = require("../../Theme/tokens/primitives/typography");
|
|
4
5
|
exports.FIELD_MESSAGE_GAP = "0.25rem";
|
|
5
6
|
/** Shared type for helper and error text, so switching between them never shifts the row. */
|
|
6
7
|
const fieldMessageStyles = (colors) => ({
|
|
7
8
|
mt: exports.FIELD_MESSAGE_GAP,
|
|
8
|
-
fontSize:
|
|
9
|
+
fontSize: typography_1.fontSizes.xs,
|
|
9
10
|
lineHeight: "1.125rem",
|
|
10
11
|
color: colors.textMuted,
|
|
11
12
|
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.findSlot = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const isReactElement = (child) => child !== null && typeof child === "object" && "type" in child;
|
|
9
|
+
// NOTE: matches by element type through nested Fragments, so `<>{cond && <Footer />}</>` is not dropped.
|
|
10
|
+
const findSlot = (children, slot) => {
|
|
11
|
+
for (const child of react_1.default.Children.toArray(children)) {
|
|
12
|
+
if (!isReactElement(child))
|
|
13
|
+
continue;
|
|
14
|
+
if (child.type === slot)
|
|
15
|
+
return child;
|
|
16
|
+
if (child.type === react_1.default.Fragment) {
|
|
17
|
+
const nested = (0, exports.findSlot)(child.props.children, slot);
|
|
18
|
+
if (nested)
|
|
19
|
+
return nested;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
};
|
|
24
|
+
exports.findSlot = findSlot;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const surfaceFocusRing: (surface: string, ring: string) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.surfaceFocusRing = void 0;
|
|
4
|
+
const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
5
|
+
// NOTE: for chrome painted on a fixed dark surface, where the palette's focusRing pair is tuned for the page canvas instead.
|
|
6
|
+
const surfaceFocusRing = (surface, ring) => `0 0 0 ${focusRing_styles_1.FOCUS_HALO_WIDTH}px ${surface}, 0 0 0 ${focusRing_styles_1.FOCUS_RING_WIDTH}px ${ring}`;
|
|
7
|
+
exports.surfaceFocusRing = surfaceFocusRing;
|
|
@@ -9,16 +9,28 @@ const react_2 = require("@chakra-ui/react");
|
|
|
9
9
|
const lucide_react_1 = require("lucide-react");
|
|
10
10
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
11
11
|
const surfaceRaised_1 = require("../../Theme/tokens/builders/surfaceRaised");
|
|
12
|
+
const tone_1 = require("../../Theme/tokens/builders/tone");
|
|
12
13
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
13
14
|
const TextInput_1 = __importDefault(require("../Input/TextInput"));
|
|
14
|
-
const ConfirmDialog = ({ isOpen, onClose, onConfirm, title, children, icon, iconBg, iconColor, tone = "destructive", cancelLabel = "Cancel", confirmLabel = "Confirm", confirmIcon, isConfirmLoading = false, disableCancelWhilePending = true, confirmationText, confirmationLabel, bodyLayout = "flush", bodySpacing = 4, actionsPt = 0, focusCancelOnOpen = true, isCentered = true, closeOnEsc, closeOnOverlayClick, }) => {
|
|
15
|
+
const ConfirmDialog = ({ isOpen, onClose, onConfirm, title, children, icon, iconBg, iconColor, entityName, entityKind, dependents, consequence, alternative, isConfirmDisabled: isConfirmHeld = false, tone = "destructive", cancelLabel = "Cancel", confirmLabel = "Confirm", confirmIcon, isConfirmLoading = false, disableCancelWhilePending = true, confirmationText, confirmationLabel, bodyLayout = "flush", bodySpacing = 4, actionsPt = 0, focusCancelOnOpen = true, isCentered = true, closeOnEsc, closeOnOverlayClick, }) => {
|
|
15
16
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
16
17
|
const cancelRef = (0, react_1.useRef)(null);
|
|
17
18
|
const [typedText, setTypedText] = (0, react_1.useState)("");
|
|
18
19
|
const requiresTypedConfirmation = confirmationText !== undefined;
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
const isAlternativeLoading = (alternative === null || alternative === void 0 ? void 0 : alternative.isLoading) === true;
|
|
21
|
+
const isConfirmDisabled = isConfirmLoading ||
|
|
22
|
+
isAlternativeLoading ||
|
|
23
|
+
isConfirmHeld ||
|
|
24
|
+
(requiresTypedConfirmation && typedText !== confirmationText);
|
|
25
|
+
const swatch = (0, tone_1.resolveSoftTone)(colors, tone === "destructive" ? colors.semantic.error : colors.primary, colors.surfaceRaised);
|
|
26
|
+
const isEntityPrompt = entityName !== undefined;
|
|
27
|
+
const resolvedTitle = title !== null && title !== void 0 ? title : `Delete ${entityKind ? `${entityKind} ` : ""}"${entityName}"?`;
|
|
28
|
+
const dependentFacts = dependents ? dependents.filter(Boolean) : [];
|
|
29
|
+
const resolvedConsequence = consequence !== null && consequence !== void 0 ? consequence : (isEntityPrompt ? "This cannot be undone." : undefined);
|
|
30
|
+
const hasFacts = dependentFacts.length > 0 || resolvedConsequence !== undefined || (alternative === null || alternative === void 0 ? void 0 : alternative.description) !== undefined;
|
|
31
|
+
const actions = ((0, jsx_runtime_1.jsxs)(react_2.HStack, { justifyContent: "flex-end", spacing: 3, pt: actionsPt, children: [(0, jsx_runtime_1.jsx)(Button_1.default, { ref: cancelRef, label: cancelLabel, onClick: onClose, variant: "outline", colorScheme: "gray", size: "sm", isDisabled: disableCancelWhilePending && (isConfirmLoading || isAlternativeLoading) }), alternative && ((0, jsx_runtime_1.jsx)(Button_1.default, { label: alternative.label, onClick: alternative.onSelect, colorScheme: "primary", size: "sm", isLoading: alternative.isLoading, loadingText: alternative.label, isDisabled: isConfirmLoading })), (0, jsx_runtime_1.jsx)(Button_1.default, { label: confirmLabel, onClick: onConfirm, variant: alternative ? "outline" : undefined, colorScheme: tone === "destructive" ? "red" : "primary", size: "sm", isLoading: isConfirmLoading, isDisabled: isConfirmDisabled, leftIcon: confirmIcon })] }));
|
|
32
|
+
const facts = hasFacts && ((0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: 3, align: "stretch", mt: bodyLayout === "flush" && children ? 3 : 0, mb: bodyLayout === "flush" ? 4 : 0, children: [dependentFacts.length > 0 && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", fontWeight: 500, children: dependentFacts.join(" · ") })), resolvedConsequence !== undefined && ((0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "sm", color: colors.textMuted, children: resolvedConsequence })), (alternative === null || alternative === void 0 ? void 0 : alternative.description) !== undefined && ((0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "sm", p: 3, borderRadius: "md", border: "1px solid", borderColor: (0, surfaceRaised_1.raisedRule)(colors), children: alternative.description }))] }));
|
|
33
|
+
const body = requiresTypedConfirmation ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [children, facts, (0, jsx_runtime_1.jsx)(TextInput_1.default, { label: confirmationLabel, value: typedText, onChange: (event) => setTypedText(event.target.value) })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [children, facts] }));
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isOpen, onClose: onClose, isCentered: isCentered, closeOnEsc: closeOnEsc, closeOnOverlayClick: closeOnOverlayClick, initialFocusRef: focusCancelOnOpen ? cancelRef : undefined, children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, { backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { bg: colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", children: [(0, jsx_runtime_1.jsxs)(react_2.ModalHeader, { borderBottom: "1px solid", borderColor: (0, surfaceRaised_1.raisedRule)(colors), display: "flex", alignItems: "center", gap: 3, children: [(0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: iconBg !== null && iconBg !== void 0 ? iconBg : swatch.bg, color: iconColor !== null && iconColor !== void 0 ? iconColor : swatch.fg, children: icon !== null && icon !== void 0 ? icon : (0, jsx_runtime_1.jsx)(lucide_react_1.AlertTriangle, { size: 18 }) }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "1.05rem", fontWeight: 600, children: resolvedTitle })] }), (0, jsx_runtime_1.jsx)(react_2.ModalCloseButton, {}), (0, jsx_runtime_1.jsx)(react_2.ModalBody, { py: 6, children: bodyLayout === "stack" ? ((0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: bodySpacing, align: "stretch", children: [body, actions] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [body, actions] })) })] })] }));
|
|
23
35
|
};
|
|
24
36
|
exports.default = ConfirmDialog;
|