pixelize-design-library 2.4.2-beta.66 → 2.4.2-beta.68
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 +71 -4
- package/COMPONENT-GOTCHAS.md +105 -66
- package/DESIGN-GUIDE.md +18 -6
- package/README.md +14 -11
- package/dist/Components/Accordion/AccordionProps.d.ts +10 -0
- package/dist/Components/AddressCard/AddressCardProps.d.ts +15 -0
- package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChartProps.d.ts +11 -0
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChartProps.d.ts +17 -1
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChartProps.d.ts +10 -0
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChartProps.d.ts +14 -0
- package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarChartsProps.d.ts +9 -0
- package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChartProps.d.ts +10 -0
- package/dist/Components/AppSwitcher/AppSwitcher.d.ts +1 -0
- package/dist/Components/AppSwitcher/AppSwitcher.js +1 -0
- package/dist/Components/AppSwitcher/AppSwitcherProps.d.ts +23 -0
- package/dist/Components/AppSwitcher/pixelizeSuite.d.ts +1 -0
- package/dist/Components/AppearanceSettings/AppearanceSettings.d.ts +1 -0
- package/dist/Components/AppearanceSettings/AppearanceSettings.js +1 -0
- package/dist/Components/AppearanceSettings/AppearanceSettingsProps.d.ts +11 -0
- package/dist/Components/AudioRecorder/AudioRecorder.d.ts +1 -0
- package/dist/Components/AudioRecorder/AudioRecorder.js +1 -0
- package/dist/Components/AudioRecorder/AudioRecorderProps.d.ts +6 -0
- package/dist/Components/Avatar/AvatarGroup.d.ts +1 -0
- package/dist/Components/Avatar/AvatarGroup.js +1 -0
- package/dist/Components/Avatar/AvatarGroupProps.d.ts +2 -0
- package/dist/Components/Avatar/AvatarProps.d.ts +2 -2
- package/dist/Components/Avatar/avatarColorway.d.ts +1 -0
- package/dist/Components/BagBar/BagBarProps.d.ts +8 -0
- package/dist/Components/BulkSelectionBar/BulkSelectionBar.d.ts +1 -0
- package/dist/Components/BulkSelectionBar/BulkSelectionBar.js +1 -0
- package/dist/Components/BulkSelectionBar/BulkSelectionBarProps.d.ts +6 -0
- package/dist/Components/Button/Button.js +1 -0
- package/dist/Components/Button/ButtonProps.d.ts +3 -0
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.d.ts +1 -0
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -0
- package/dist/Components/ButtonGroupIcon/ButtonGroupIconProps.d.ts +19 -0
- package/dist/Components/CalendarGrid/CalendarGrid.d.ts +1 -0
- package/dist/Components/CalendarGrid/CalendarGrid.js +1 -0
- package/dist/Components/CalendarGrid/CalendarGridProps.d.ts +11 -0
- package/dist/Components/CalendarGrid/calendarMath.d.ts +13 -0
- package/dist/Components/Card/CardProps.d.ts +4 -0
- package/dist/Components/Card/PaymentCard/PaymentCard.d.ts +1 -0
- package/dist/Components/Card/PaymentCard/PaymentCard.js +1 -0
- package/dist/Components/Card/PaymentCard/PaymentCardProps.d.ts +19 -0
- package/dist/Components/CartItem/CartItemProps.d.ts +10 -0
- package/dist/Components/Checkbox/CheckboxProps.d.ts +1 -0
- package/dist/Components/ChoiceCard/ChoiceCard.d.ts +1 -0
- package/dist/Components/ChoiceCard/ChoiceCard.js +1 -0
- package/dist/Components/ChoiceCard/ChoiceCardGroup.d.ts +1 -0
- package/dist/Components/ChoiceCard/ChoiceCardGroup.js +1 -0
- package/dist/Components/ChoiceCard/ChoiceCardProps.d.ts +3 -0
- package/dist/Components/ConfirmDialog/ConfirmDialog.d.ts +1 -0
- package/dist/Components/ConfirmDialog/ConfirmDialog.js +1 -0
- package/dist/Components/ConfirmDialog/ConfirmDialogProps.d.ts +5 -0
- package/dist/Components/ContactForm/ContactFormProps.d.ts +13 -0
- package/dist/Components/CouponField/CouponFieldProps.d.ts +16 -0
- package/dist/Components/CustomModulesTable/CustomModulesTable.d.ts +1 -0
- package/dist/Components/CustomModulesTable/CustomModulesTable.js +1 -0
- package/dist/Components/CustomModulesTable/CustomModulesTableProps.d.ts +17 -0
- package/dist/Components/CustomModulesTable/DeleteModuleModal.d.ts +1 -0
- package/dist/Components/CustomModulesTable/DeleteModuleModal.js +1 -0
- package/dist/Components/CustomModulesTable/EditModuleModal.d.ts +1 -0
- package/dist/Components/CustomModulesTable/EditModuleModal.js +1 -0
- package/dist/Components/DatePicker/DatePickerProps.d.ts +7 -1
- package/dist/Components/DetailSections/DetailSectionsProps.d.ts +22 -0
- package/dist/Components/Drawer/DrawerProps.d.ts +1 -1
- package/dist/Components/Dropdown/DropdownProps.d.ts +1 -0
- package/dist/Components/Editor/EditorProps.d.ts +33 -0
- package/dist/Components/Editor/editorTokens.d.ts +3 -0
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.d.ts +8 -0
- package/dist/Components/FilePreview/FilePreviewProps.d.ts +4 -0
- package/dist/Components/FileUploader/FileUploaderProps.d.ts +1 -0
- package/dist/Components/FilterBar/FilterBarProps.d.ts +2 -0
- package/dist/Components/FormDrawer/FormDrawer.d.ts +1 -0
- package/dist/Components/FormDrawer/FormDrawer.js +1 -0
- package/dist/Components/FormDrawer/FormDrawerProps.d.ts +3 -0
- package/dist/Components/FormField/FormField.d.ts +1 -0
- package/dist/Components/FormField/FormField.js +1 -0
- package/dist/Components/FormField/FormFieldProps.d.ts +4 -0
- package/dist/Components/Header/Header.d.ts +1 -0
- package/dist/Components/Header/Header.js +1 -0
- package/dist/Components/Header/HeaderActions.d.ts +16 -0
- package/dist/Components/Header/HeaderActions.js +1 -0
- package/dist/Components/Header/HeaderProps.d.ts +22 -0
- package/dist/Components/Header/components/desktopMenu.d.ts +1 -0
- package/dist/Components/Header/components/desktopMenu.js +1 -0
- package/dist/Components/Header/components/mobileMenu.d.ts +1 -0
- package/dist/Components/Header/components/mobileMenu.js +1 -0
- package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.d.ts +1 -1
- package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +1 -1
- package/dist/Components/KanbanBoard/KanbanBoardProps.d.ts +11 -0
- package/dist/Components/Kbd/Kbd.d.ts +1 -0
- package/dist/Components/Kbd/Kbd.js +1 -0
- package/dist/Components/Kbd/KbdProps.d.ts +4 -0
- package/dist/Components/LauncherTrigger/LauncherTrigger.d.ts +1 -0
- package/dist/Components/LauncherTrigger/LauncherTrigger.js +1 -0
- package/dist/Components/LauncherTrigger/LauncherTriggerProps.d.ts +1 -0
- package/dist/Components/LimitReachedModal/LimitReachedModal.d.ts +1 -0
- package/dist/Components/LimitReachedModal/LimitReachedModal.js +1 -0
- package/dist/Components/LimitReachedModal/LimitReachedModalProps.d.ts +7 -0
- package/dist/Components/Loading/LoadingProps.d.ts +2 -0
- package/dist/Components/MediaGallery/MediaGalleryProps.d.ts +7 -1
- package/dist/Components/MediaGallery/MediaLightboxProps.d.ts +5 -0
- package/dist/Components/MediaViewer/components/MediaAudioPlayer.d.ts +1 -0
- package/dist/Components/MediaViewer/components/MediaAudioPlayer.js +1 -0
- package/dist/Components/MediaViewer/components/MediaDocumentStage.d.ts +1 -0
- package/dist/Components/MediaViewer/components/MediaDocumentStage.js +1 -0
- package/dist/Components/MediaViewer/components/MediaImageViewer.d.ts +1 -0
- package/dist/Components/MediaViewer/components/MediaImageViewer.js +1 -0
- package/dist/Components/MediaViewer/components/MediaVideoPlayer.d.ts +1 -0
- package/dist/Components/MediaViewer/components/MediaVideoPlayer.js +1 -0
- package/dist/Components/MediaViewer/components/MediaVideoPlayerProps.d.ts +1 -0
- package/dist/Components/MediaViewer/hooks/useFileViewer.d.ts +1 -0
- package/dist/Components/MediaViewer/mediaItems.d.ts +25 -0
- package/dist/Components/MediaViewer/mediaItems.js +5 -0
- package/dist/Components/Modal/Modal.d.ts +3 -0
- package/dist/Components/Modal/Modal.js +3 -0
- package/dist/Components/Modal/ModalProps.d.ts +6 -1
- package/dist/Components/MoreItems/MoreItemsProps.d.ts +2 -0
- package/dist/Components/MultiSelect/MultiSelect.d.ts +1 -0
- package/dist/Components/MultiSelect/MultiSelect.js +1 -0
- package/dist/Components/MultiSelect/MultiSelectProps.d.ts +13 -0
- package/dist/Components/NavLauncher/NavLauncher.js +3 -0
- package/dist/Components/NavLauncher/NavLauncherProps.d.ts +58 -0
- package/dist/Components/NavLauncher/engine/engine.d.ts +19 -0
- package/dist/Components/NavLauncher/launcherMotion.d.ts +19 -0
- package/dist/Components/NavLauncher/launcherMotion.js +15 -0
- package/dist/Components/NavLauncher/match.d.ts +34 -0
- package/dist/Components/NavigationBar/NavigationBar.d.ts +1 -0
- package/dist/Components/NavigationBar/NavigationBar.js +1 -0
- package/dist/Components/NavigationBar/NavigationBarProps.d.ts +15 -0
- package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +2 -1
- package/dist/Components/NotificationBell/NotificationBellProps.d.ts +27 -0
- package/dist/Components/NotificationBell/notificationHelpers.d.ts +13 -0
- package/dist/Components/NumberInput/NumberInputProps.d.ts +1 -1
- package/dist/Components/OffersList/OffersListProps.d.ts +12 -1
- package/dist/Components/OptionChip/OptionChipProps.d.ts +5 -0
- package/dist/Components/OrderStatusTimeline/OrderStatusTimelineProps.d.ts +10 -0
- package/dist/Components/OrderSummary/OrderSummaryProps.d.ts +10 -0
- package/dist/Components/OrgSwitcher/OrgSwitcher.d.ts +1 -0
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +11 -3
- package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +1 -0
- package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +52 -0
- package/dist/Components/PageHeader/PageHeaderProps.d.ts +1 -0
- package/dist/Components/Pagination/PaginationProps.d.ts +4 -0
- package/dist/Components/PaymentOption/PaymentOptionProps.d.ts +9 -0
- package/dist/Components/PincodeChecker/PincodeCheckerProps.d.ts +13 -0
- package/dist/Components/PlanPill/PlanPill.d.ts +1 -0
- package/dist/Components/PlanPill/PlanPill.js +1 -0
- package/dist/Components/PlanPill/PlanPillProps.d.ts +1 -0
- package/dist/Components/PriceBlock/PriceBlockProps.d.ts +6 -0
- package/dist/Components/ProductBadges/ProductBadgesProps.d.ts +3 -0
- package/dist/Components/ProductCard/ProductCardProps.d.ts +10 -0
- package/dist/Components/ProductCard/QuickAddSheetProps.d.ts +8 -0
- package/dist/Components/ProductDetails/ProductDetailsProps.d.ts +25 -1
- package/dist/Components/ProfileCard/ProfileCardProps.d.ts +1 -1
- package/dist/Components/QuantityStepper/QuantityStepperProps.d.ts +9 -0
- package/dist/Components/QueryState/QueryStateProps.d.ts +2 -0
- package/dist/Components/RadioButton/RadioButtonProps.d.ts +1 -1
- package/dist/Components/Rating/RatingProps.d.ts +2 -0
- package/dist/Components/Reorder/ReorderProps.d.ts +6 -0
- package/dist/Components/ReviewList/ReviewListProps.d.ts +21 -0
- package/dist/Components/ReviewSummary/ReviewSummaryProps.d.ts +8 -1
- package/dist/Components/RolesPermission/RolesPermissionProps.d.ts +59 -1
- package/dist/Components/SearchSelect/SearchSelect.js +17 -5
- package/dist/Components/SearchSelect/SearchSelectProps.d.ts +12 -0
- package/dist/Components/SectionRail/SectionRail.d.ts +1 -0
- package/dist/Components/SectionRail/SectionRail.js +1 -0
- package/dist/Components/SectionRail/SectionRailProps.d.ts +4 -0
- package/dist/Components/SegmentedControl/SegmentedControlProps.d.ts +4 -0
- package/dist/Components/Select/Select.styles.js +25 -0
- package/dist/Components/Select/SelectNative.d.ts +10 -0
- package/dist/Components/Select/SelectNative.js +11 -4
- package/dist/Components/Select/SelectPopup.js +45 -14
- package/dist/Components/Select/SelectProps.d.ts +46 -2
- package/dist/Components/Select/selectKeyboardRing.d.ts +2 -0
- package/dist/Components/Select/selectKeyboardRing.js +7 -0
- package/dist/Components/Select/selectRowInk.d.ts +14 -0
- package/dist/Components/Select/selectRowInk.js +41 -0
- package/dist/Components/SelectSearch/SelectSearch.js +8 -2
- package/dist/Components/SelectSearch/SelectSearchProps.d.ts +9 -0
- package/dist/Components/SelectV2/SelectV2Props.d.ts +7 -0
- package/dist/Components/SideBar/SecondaryBar.d.ts +1 -0
- package/dist/Components/SideBar/SecondaryBar.js +1 -0
- package/dist/Components/SideBar/SideBar.d.ts +1 -0
- package/dist/Components/SideBar/SideBar.js +1 -0
- package/dist/Components/SideBar/SideBarProps.d.ts +32 -0
- package/dist/Components/SideBar/sidebarAccentColors.d.ts +2 -0
- package/dist/Components/SignInActivityTable/SignInActivityTable.d.ts +1 -0
- package/dist/Components/SignInActivityTable/SignInActivityTable.js +1 -0
- package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +2 -0
- package/dist/Components/SpecTable/SpecTableProps.d.ts +9 -0
- package/dist/Components/StageProgress/StageProgressProps.d.ts +2 -0
- package/dist/Components/StageProgress/StepperStage.d.ts +1 -0
- package/dist/Components/StageProgress/StepperStage.js +1 -0
- package/dist/Components/StatCard/StatCardProps.d.ts +1 -0
- package/dist/Components/StatusTag/StatusTagProps.d.ts +4 -0
- package/dist/Components/StickyBuyBar/StickyBuyBar.d.ts +1 -0
- package/dist/Components/StickyBuyBar/StickyBuyBar.js +1 -0
- package/dist/Components/StickyBuyBar/StickyBuyBarProps.d.ts +6 -0
- package/dist/Components/StockStatus/StockStatusProps.d.ts +2 -0
- package/dist/Components/Switch/SwitchProps.d.ts +4 -0
- package/dist/Components/Table/TableProps.d.ts +20 -1
- package/dist/Components/Table/components/TableBody.js +10 -1
- package/dist/Components/Table/components/rowFocusRing.d.ts +21 -0
- package/dist/Components/Table/components/rowFocusRing.js +20 -0
- package/dist/Components/Table/variants/tokens.d.ts +4 -0
- package/dist/Components/Tabs/TabsContext.d.ts +14 -0
- package/dist/Components/Tabs/TabsProps.d.ts +18 -0
- package/dist/Components/Tabs/components/CountBadge.d.ts +4 -0
- package/dist/Components/Tabs/components/TabPanels.d.ts +1 -0
- package/dist/Components/Tabs/components/TabPanels.js +1 -0
- package/dist/Components/Tabs/tabStyles.d.ts +4 -0
- package/dist/Components/Tag/TagProps.d.ts +3 -0
- package/dist/Components/TagInput/TagInput.d.ts +1 -0
- package/dist/Components/TagInput/TagInput.js +1 -0
- package/dist/Components/TagInput/TagInputProps.d.ts +2 -0
- package/dist/Components/TimePicker/TimePicker.d.ts +1 -0
- package/dist/Components/TimePicker/TimePicker.js +1 -0
- package/dist/Components/TimePicker/TimePickerProps.d.ts +2 -0
- package/dist/Components/Timeline/TimelineProps.d.ts +7 -1
- package/dist/Components/Toggle/TableToggleProps.d.ts +2 -0
- package/dist/Components/ToggleSwitch/ToggleSwitchProps.d.ts +2 -0
- package/dist/Components/ToolTip/OverflowToolTip.d.ts +1 -0
- package/dist/Components/ToolTip/OverflowToolTip.js +1 -1
- package/dist/Components/ToolTip/ToolTipProps.d.ts +1 -0
- package/dist/Components/TrustBadges/TrustBadgesProps.d.ts +4 -0
- package/dist/Components/UpgradeButton/UpgradeButton.d.ts +1 -0
- package/dist/Components/UpgradeButton/UpgradeButton.js +1 -0
- package/dist/Components/UpgradeButton/UpgradeButtonProps.d.ts +4 -1
- package/dist/Components/UserDetails/UserDetailsProps.d.ts +58 -0
- package/dist/Components/VariantSelector/VariantSelectorProps.d.ts +4 -0
- package/dist/Components/WishlistToggle/WishlistToggleProps.d.ts +4 -0
- package/dist/Components/WizardDialog/WizardDialogProps.d.ts +15 -0
- package/dist/Components/WizardDialog/wizardSteps.d.ts +17 -5
- package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.d.ts +1 -0
- package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -1
- package/dist/Components/WorkspaceWindow/WorkspaceWindow.d.ts +2 -0
- package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +2 -1
- package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +13 -0
- package/dist/Theme/tokens/brands/index.d.ts +1 -1
- package/dist/Theme/tokens/brands/index.js +1 -1
- package/dist/Theme/tokens/builders/rowStates.d.ts +6 -0
- package/dist/Theme/tokens/builders/rowStates.js +19 -1
- package/dist/Theme/tokens/builders/scrollShadow.d.ts +1 -0
- package/dist/Theme/tokens/builders/scrollShadow.js +16 -0
- package/dist/esm/Components/AppSwitcher/AppSwitcher.js +1 -0
- package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +1 -0
- package/dist/esm/Components/AudioRecorder/AudioRecorder.js +1 -0
- package/dist/esm/Components/Avatar/AvatarGroup.js +1 -0
- package/dist/esm/Components/BulkSelectionBar/BulkSelectionBar.js +1 -0
- package/dist/esm/Components/Button/Button.js +1 -0
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -0
- package/dist/esm/Components/CalendarGrid/CalendarGrid.js +1 -0
- package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +1 -0
- package/dist/esm/Components/ChoiceCard/ChoiceCard.js +1 -0
- package/dist/esm/Components/ChoiceCard/ChoiceCardGroup.js +1 -0
- package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +1 -0
- package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +1 -0
- package/dist/esm/Components/CustomModulesTable/DeleteModuleModal.js +1 -0
- package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +1 -0
- package/dist/esm/Components/FormDrawer/FormDrawer.js +1 -0
- package/dist/esm/Components/FormField/FormField.js +1 -0
- package/dist/esm/Components/Header/Header.js +1 -0
- package/dist/esm/Components/Header/HeaderActions.js +1 -0
- package/dist/esm/Components/Header/components/desktopMenu.js +1 -0
- package/dist/esm/Components/Header/components/mobileMenu.js +1 -0
- package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +1 -1
- package/dist/esm/Components/Kbd/Kbd.js +1 -0
- package/dist/esm/Components/LauncherTrigger/LauncherTrigger.js +1 -0
- package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +1 -0
- package/dist/esm/Components/MediaViewer/components/MediaAudioPlayer.js +1 -0
- package/dist/esm/Components/MediaViewer/components/MediaDocumentStage.js +1 -0
- package/dist/esm/Components/MediaViewer/components/MediaImageViewer.js +1 -0
- package/dist/esm/Components/MediaViewer/components/MediaVideoPlayer.js +1 -0
- package/dist/esm/Components/MediaViewer/mediaItems.js +5 -0
- package/dist/esm/Components/Modal/Modal.js +3 -0
- package/dist/esm/Components/MultiSelect/MultiSelect.js +1 -0
- package/dist/esm/Components/NavLauncher/NavLauncher.js +4 -1
- package/dist/esm/Components/NavLauncher/launcherMotion.js +11 -0
- package/dist/esm/Components/NavigationBar/NavigationBar.js +1 -0
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +13 -5
- package/dist/esm/Components/PlanPill/PlanPill.js +1 -0
- package/dist/esm/Components/SearchSelect/SearchSelect.js +19 -7
- package/dist/esm/Components/SectionRail/SectionRail.js +1 -0
- package/dist/esm/Components/Select/Select.styles.js +26 -1
- package/dist/esm/Components/Select/SelectNative.js +12 -5
- package/dist/esm/Components/Select/SelectPopup.js +47 -16
- package/dist/esm/Components/Select/selectKeyboardRing.js +3 -0
- package/dist/esm/Components/Select/selectRowInk.js +33 -0
- package/dist/esm/Components/SelectSearch/SelectSearch.js +10 -4
- package/dist/esm/Components/SideBar/SecondaryBar.js +1 -0
- package/dist/esm/Components/SideBar/SideBar.js +1 -0
- package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +1 -0
- package/dist/esm/Components/StageProgress/StepperStage.js +1 -0
- package/dist/esm/Components/StickyBuyBar/StickyBuyBar.js +1 -0
- package/dist/esm/Components/Table/components/TableBody.js +10 -1
- package/dist/esm/Components/Table/components/rowFocusRing.js +16 -0
- package/dist/esm/Components/Tabs/components/TabPanels.js +1 -0
- package/dist/esm/Components/TagInput/TagInput.js +1 -0
- package/dist/esm/Components/TimePicker/TimePicker.js +1 -0
- package/dist/esm/Components/ToolTip/OverflowToolTip.js +1 -1
- package/dist/esm/Components/UpgradeButton/UpgradeButton.js +1 -0
- package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +1 -1
- package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +2 -1
- package/dist/esm/Theme/tokens/brands/index.js +1 -1
- package/dist/esm/Theme/tokens/builders/rowStates.js +18 -1
- package/dist/esm/Theme/tokens/builders/scrollShadow.js +15 -0
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@ export interface NotificationBellProps {
|
|
|
24
24
|
size?: NotificationBellSize;
|
|
25
25
|
/** Badge ring colour so the pill reads on a tinted bar. Defaults to the canvas. */
|
|
26
26
|
ringColor?: string;
|
|
27
|
+
/** Fires when the bell button is activated; the bell renders no panel, so toggle your popover here. */
|
|
27
28
|
onClick?: () => void;
|
|
28
29
|
/** Reflected as `aria-expanded`; pass the panel's open state when the bell drives a popover. */
|
|
29
30
|
isOpen?: boolean;
|
|
@@ -32,6 +33,7 @@ export interface NotificationBellProps {
|
|
|
32
33
|
}
|
|
33
34
|
/** What the row chassis actually paints. Consumers map their own row type onto this. */
|
|
34
35
|
export interface NotificationItemModel {
|
|
36
|
+
/** Used as the React key within a list; must be unique among the rows. */
|
|
35
37
|
id: string;
|
|
36
38
|
/** Main line; ReactNode so a caller can inject links/bold without the library parsing markup. */
|
|
37
39
|
title: ReactNode;
|
|
@@ -39,6 +41,7 @@ export interface NotificationItemModel {
|
|
|
39
41
|
body?: ReactNode;
|
|
40
42
|
/** Epoch ms, an ISO string, or a Date; drives both the relative label and day bucketing. */
|
|
41
43
|
timestamp: number | string | Date;
|
|
44
|
+
/** False shows the unread indicator chosen by `unreadIndicator`; true renders the row plain. */
|
|
42
45
|
isRead: boolean;
|
|
43
46
|
/** Icon for the 28x28 tile; pass a component reference, not an element. */
|
|
44
47
|
icon?: ElementType;
|
|
@@ -60,7 +63,9 @@ export interface NotificationItemModel {
|
|
|
60
63
|
export type NotificationUnreadIndicator = "bar" | "dot" | "tint" | "none";
|
|
61
64
|
/** One row; exported so a `renderItem` override can still reuse the chassis. */
|
|
62
65
|
export interface NotificationItemProps {
|
|
66
|
+
/** The mapped row model that this chassis paints. */
|
|
63
67
|
item: NotificationItemModel;
|
|
68
|
+
/** Makes the tile and text a focusable button when set; without it the row is non-interactive. */
|
|
64
69
|
onClick?: () => void;
|
|
65
70
|
/** Action cluster, hidden until row hover/focus unless `actionsAlwaysVisible`. */
|
|
66
71
|
actions?: ReactNode;
|
|
@@ -70,6 +75,7 @@ export interface NotificationItemProps {
|
|
|
70
75
|
preview?: ReactNode;
|
|
71
76
|
/** Right-hand meta, e.g. hrms' "waiting 3 days". */
|
|
72
77
|
trailing?: ReactNode;
|
|
78
|
+
/** Applies only when `item.isRead` is false; `"none"` shows no unread cue. */
|
|
73
79
|
unreadIndicator?: NotificationUnreadIndicator;
|
|
74
80
|
/** When this row represents a collapsed run, the number of rows it stands in for. */
|
|
75
81
|
groupCount?: number;
|
|
@@ -78,6 +84,7 @@ export interface NotificationItemProps {
|
|
|
78
84
|
}
|
|
79
85
|
/** Props shared by NotificationList and NotificationPanel — generic over the caller's own row type. */
|
|
80
86
|
export interface NotificationListProps<T> {
|
|
87
|
+
/** Rows in display order; each is mapped through `toItem` for rendering and, with `groupBy` "day", bucketed by its timestamp. */
|
|
81
88
|
items: T[];
|
|
82
89
|
/** The adapter. The one required piece of consumer glue. */
|
|
83
90
|
toItem: (row: T) => NotificationItemModel;
|
|
@@ -87,6 +94,7 @@ export interface NotificationListProps<T> {
|
|
|
87
94
|
collapseGroups?: boolean;
|
|
88
95
|
/** Overrides the three default bucket labels — the i18n hook. */
|
|
89
96
|
dayLabels?: DaySectionLabels;
|
|
97
|
+
/** Receives the original row, not the mapped model; setting it makes every default row a button. */
|
|
90
98
|
onItemClick?: (row: T) => void;
|
|
91
99
|
/** The hover-revealed, keyboard-reachable action cluster per row. */
|
|
92
100
|
itemActions?: (row: T) => ReactNode;
|
|
@@ -94,13 +102,18 @@ export interface NotificationListProps<T> {
|
|
|
94
102
|
renderItem?: (row: T, model: NotificationItemModel) => ReactNode;
|
|
95
103
|
/** Replaces the sticky day-section header. */
|
|
96
104
|
renderSectionHeader?: (label: string) => ReactNode;
|
|
105
|
+
/** Forwarded to each default row; has no effect when `renderItem` replaces the row. */
|
|
97
106
|
unreadIndicator?: NotificationUnreadIndicator;
|
|
107
|
+
/** Forwarded to each default row; shows `itemActions` at rest instead of on hover or focus. */
|
|
98
108
|
actionsAlwaysVisible?: boolean;
|
|
109
|
+
/** Names the list as a region landmark; no region role is added when omitted. */
|
|
99
110
|
"aria-label"?: string;
|
|
100
111
|
}
|
|
101
112
|
/** One tab in the zone row; `render` exists so a foreign queue (hrms' "Needs you") can host its own body. */
|
|
102
113
|
export interface NotificationZone {
|
|
114
|
+
/** Matched against `activeZone` and passed to `onZoneChange` when the tab is clicked. */
|
|
103
115
|
id: string;
|
|
116
|
+
/** Tab text; the capped `count` is appended in parentheses. */
|
|
104
117
|
label: string;
|
|
105
118
|
/** Rendered as a capped count suffix on the tab; omit for no count. */
|
|
106
119
|
count?: number;
|
|
@@ -111,22 +124,32 @@ export interface NotificationZone {
|
|
|
111
124
|
}
|
|
112
125
|
/** A filter chip rendered next to the zone row; count is suffixed as "(n)", capped like the badge. */
|
|
113
126
|
export interface NotificationFilter {
|
|
127
|
+
/** Matched against `activeFilter` and passed to `onFilterChange` when the chip is clicked. */
|
|
114
128
|
id: string;
|
|
129
|
+
/** Chip text; `count` is appended in parentheses when set. */
|
|
115
130
|
label: string;
|
|
131
|
+
/** Shown even when 0, unlike a zone count; capped at 99 like the badge. Omit for no suffix. */
|
|
116
132
|
count?: number;
|
|
117
133
|
}
|
|
118
134
|
/** The panel shell. Generic over the caller's row type — the library defines no notification shape. */
|
|
119
135
|
export interface NotificationPanelProps<T> extends NotificationListProps<T> {
|
|
120
136
|
/** Omit for a single-zone panel (crm, spare-cart). Two zones is the tickets/hrms shape. */
|
|
121
137
|
zones?: NotificationZone[];
|
|
138
|
+
/** Id of the selected zone; that zone's `render`, if set, replaces the panel body. */
|
|
122
139
|
activeZone?: string;
|
|
140
|
+
/** Receives the clicked zone's id; the panel is controlled, so update `activeZone` yourself. */
|
|
123
141
|
onZoneChange?: (zoneId: string) => void;
|
|
142
|
+
/** Filter chips under the zone row; the row is omitted when empty or unset. */
|
|
124
143
|
filters?: NotificationFilter[];
|
|
144
|
+
/** Id of the selected filter chip; controlled, so update it from `onFilterChange`. */
|
|
125
145
|
activeFilter?: string;
|
|
146
|
+
/** Receives the clicked filter's id; update `activeFilter` yourself. */
|
|
126
147
|
onFilterChange?: (filterId: string) => void;
|
|
148
|
+
/** Shows four skeleton rows in place of the list; beats the error and empty states, but not a zone's `render`. */
|
|
127
149
|
isLoading?: boolean;
|
|
128
150
|
/** Anything non-nullish shows the error state — closes tickets' documented no-error-state gap. */
|
|
129
151
|
error?: unknown;
|
|
152
|
+
/** Adds a Retry button to the error state; the button is omitted when unset. */
|
|
130
153
|
onRetry?: () => void;
|
|
131
154
|
/** Props for the default EmptyState. */
|
|
132
155
|
empty?: EmptyStateProps;
|
|
@@ -140,8 +163,12 @@ export interface NotificationPanelProps<T> extends NotificationListProps<T> {
|
|
|
140
163
|
variant?: "popover" | "page";
|
|
141
164
|
/** Fixed max height; when unset the popover variant measures its own anchored height. */
|
|
142
165
|
maxH?: string | number;
|
|
166
|
+
/** Fires from the "Load more" button, which renders only while `hasMore` is true. */
|
|
143
167
|
onLoadMore?: () => void;
|
|
168
|
+
/** Shows the "Load more" button under the list. Defaults to false. */
|
|
144
169
|
hasMore?: boolean;
|
|
170
|
+
/** Puts the "Load more" button into its loading state. Defaults to false. */
|
|
145
171
|
isLoadingMore?: boolean;
|
|
172
|
+
/** Receives the panel root element; also the node whose top edge the popover height is measured from. */
|
|
146
173
|
panelRef?: RefObject<HTMLDivElement>;
|
|
147
174
|
}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { type RefObject } from "react";
|
|
2
2
|
export interface DaySection<T> {
|
|
3
|
+
/** Section heading text, taken from the matching `DaySectionLabels` entry. */
|
|
3
4
|
label: string;
|
|
5
|
+
/** Rows in this bucket, in input order. */
|
|
4
6
|
rows: T[];
|
|
5
7
|
}
|
|
6
8
|
export interface ConsecutiveGroup<T> {
|
|
9
|
+
/** The shared key for the run, or null for a row that was not merged. */
|
|
7
10
|
key: string | null;
|
|
11
|
+
/** Adjacent rows in the run, in input order. */
|
|
8
12
|
rows: T[];
|
|
9
13
|
}
|
|
10
14
|
export interface DaySectionLabels {
|
|
15
|
+
/** Heading for rows dated on the current calendar day. */
|
|
11
16
|
today: string;
|
|
17
|
+
/** Heading for rows dated on the previous calendar day. */
|
|
12
18
|
yesterday: string;
|
|
19
|
+
/** Heading for every older row. */
|
|
13
20
|
earlier: string;
|
|
14
21
|
}
|
|
15
22
|
export declare const DEFAULT_DAY_LABELS: DaySectionLabels;
|
|
@@ -23,9 +30,13 @@ export declare function groupConsecutive<T>(rows: T[], getKey: (row: T) => strin
|
|
|
23
30
|
/** 5 -> "5"; 150 with max 99 -> "99+". Negative/NaN input is clamped to 0. */
|
|
24
31
|
export declare function formatCount(value: number, max?: number): string;
|
|
25
32
|
export interface RelativeTimeLabels {
|
|
33
|
+
/** Text shown for ages under one minute. */
|
|
26
34
|
justNow: string;
|
|
35
|
+
/** Receives whole minutes (1 to 59) and returns the label. */
|
|
27
36
|
minutesAgo: (count: number) => string;
|
|
37
|
+
/** Receives whole hours (1 to 23) and returns the label. */
|
|
28
38
|
hoursAgo: (count: number) => string;
|
|
39
|
+
/** Receives whole days (1 to 6) and returns the label; older times use a short date. */
|
|
29
40
|
daysAgo: (count: number) => string;
|
|
30
41
|
}
|
|
31
42
|
export declare const DEFAULT_RELATIVE_TIME_LABELS: RelativeTimeLabels;
|
|
@@ -40,7 +51,9 @@ export interface RelativeTimeOptions {
|
|
|
40
51
|
export declare function formatRelativeTime(value: number | string | Date, now?: number | Date, { labels, locale }?: RelativeTimeOptions): string;
|
|
41
52
|
/** Minimum panel height and bottom gutter for `useAnchoredPanelHeight`. */
|
|
42
53
|
export interface AnchoredPanelHeightOptions {
|
|
54
|
+
/** Smallest height in px the panel may measure to. Defaults to 280. */
|
|
43
55
|
min?: number;
|
|
56
|
+
/** Space in px kept between the panel's bottom edge and the viewport bottom. Defaults to 24. */
|
|
44
57
|
gutter?: number;
|
|
45
58
|
}
|
|
46
59
|
/** The tickets/hrms formula: max(min, viewport bottom edge - panel top - gutter), remeasured on resize. */
|
|
@@ -23,7 +23,7 @@ export type NumberInputProps = Pick<chakraNumbetInpurProps, "defaultValue" | "mi
|
|
|
23
23
|
id?: string;
|
|
24
24
|
/** Marks the field invalid (error border + `aria-invalid`) and swaps the helper for `errorMessage`. */
|
|
25
25
|
error?: boolean;
|
|
26
|
-
/** Shown under the field while `error` is true
|
|
26
|
+
/** Shown under the field while `error` is true. */
|
|
27
27
|
errorMessage?: string;
|
|
28
28
|
/** Shown under the field when there is no error; linked via `aria-describedby`. */
|
|
29
29
|
helperText?: string;
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
/** One offer; `code` adds a copy button. */
|
|
2
2
|
export interface Offer {
|
|
3
|
+
/** Stable React key; `bestOfferId` is matched against it. */
|
|
3
4
|
id: string;
|
|
5
|
+
/** Bold headline; also names the best offer in the collapsed summary. */
|
|
4
6
|
title: string;
|
|
7
|
+
/** Muted description under the title; a single offer's summary reads `title · detail`. */
|
|
5
8
|
detail: string;
|
|
9
|
+
/** Coupon code shown as a chip with a copy button; omit for offers that need no code. */
|
|
6
10
|
code?: string;
|
|
7
11
|
}
|
|
8
12
|
/** Every string the list renders; override all of them for another language. */
|
|
9
13
|
export interface OffersListLabels {
|
|
10
14
|
/** Collapsed summary, given the offer count and the best offer's title. */
|
|
11
15
|
summary: (count: number, best: string) => string;
|
|
12
|
-
/** Collapsed summary when
|
|
16
|
+
/** Collapsed summary used when the best offer has an empty title. */
|
|
13
17
|
summaryCount: (count: number) => string;
|
|
18
|
+
/** Copy button text before a copy. */
|
|
14
19
|
copy: string;
|
|
20
|
+
/** Copy button text for about 1.6 s after a copy. */
|
|
15
21
|
copied: string;
|
|
16
22
|
/** Accessible name of a copy button, given the code. */
|
|
17
23
|
copyCode: (code: string) => string;
|
|
@@ -20,15 +26,20 @@ export interface OffersListLabels {
|
|
|
20
26
|
}
|
|
21
27
|
/** One collapsed row ("Offers (3) · Best: ...") that opens into the full list with copy-code buttons; renders nothing for no offers. */
|
|
22
28
|
export interface OffersListProps {
|
|
29
|
+
/** Offers to list; nothing renders when empty. */
|
|
23
30
|
offers: Offer[];
|
|
24
31
|
/** Offer named in the collapsed summary; defaults to the first. */
|
|
25
32
|
bestOfferId?: string;
|
|
26
33
|
/** Controlled open state; pair with `onOpenChange`. */
|
|
27
34
|
isOpen?: boolean;
|
|
35
|
+
/** Initial open state when uncontrolled; collapsed by default. */
|
|
28
36
|
defaultOpen?: boolean;
|
|
37
|
+
/** Fires with the next open state on every toggle, controlled or not. */
|
|
29
38
|
onOpenChange?: (open: boolean) => void;
|
|
30
39
|
/** Fires after a code is copied, with the offer. */
|
|
31
40
|
onCopy?: (offer: Offer) => void;
|
|
41
|
+
/** Partial overrides of the default English strings. */
|
|
32
42
|
labels?: Partial<OffersListLabels>;
|
|
43
|
+
/** Test id on the outer container. */
|
|
33
44
|
"data-testid"?: string;
|
|
34
45
|
}
|
|
@@ -6,6 +6,7 @@ export type OptionChipSize = "md" | "lg";
|
|
|
6
6
|
export interface OptionChipProps {
|
|
7
7
|
/** Visible text for chip, pack and image-tile; the accessible name for a swatch. */
|
|
8
8
|
label: string;
|
|
9
|
+
/** Controlled: sets `aria-checked` and the selected styling; clicking never toggles it. Defaults to false. */
|
|
9
10
|
selected?: boolean;
|
|
10
11
|
/** Native disabled: dimmed, not focusable, onSelect never fires. */
|
|
11
12
|
disabled?: boolean;
|
|
@@ -13,6 +14,7 @@ export interface OptionChipProps {
|
|
|
13
14
|
unavailable?: boolean;
|
|
14
15
|
/** Draws a 1px error ring; use when the group needs a pick. */
|
|
15
16
|
invalid?: boolean;
|
|
17
|
+
/** Picks the layout; `swatch` needs `swatch`, `image-tile` uses `image`, and `pack` shows `hint` as a second line. Defaults to "chip". */
|
|
16
18
|
variant?: OptionChipVariant;
|
|
17
19
|
/** Any CSS colour from product data; the one place a literal colour is allowed. */
|
|
18
20
|
swatch?: string;
|
|
@@ -22,10 +24,13 @@ export interface OptionChipProps {
|
|
|
22
24
|
hint?: string;
|
|
23
25
|
/** Swatch only: print the colour name under the dot. */
|
|
24
26
|
showLabel?: boolean;
|
|
27
|
+
/** Control scale across all variants. Defaults to "md". */
|
|
25
28
|
size?: OptionChipSize;
|
|
26
29
|
/** Stretch to the parent's width, for grid layouts. */
|
|
27
30
|
fullWidth?: boolean;
|
|
31
|
+
/** Fires on every click, including when already selected or `unavailable`; never when `disabled`. Does not toggle `selected`. */
|
|
28
32
|
onSelect?: () => void;
|
|
33
|
+
/** Fires when the button receives focus; takes no arguments. */
|
|
29
34
|
onFocus?: () => void;
|
|
30
35
|
/** Roving tabindex from the parent group; omit for a standalone chip. */
|
|
31
36
|
tabIndex?: number;
|
|
@@ -2,28 +2,38 @@
|
|
|
2
2
|
export type OrderStepState = "done" | "current" | "upcoming";
|
|
3
3
|
/** One stage of an order, e.g. Placed, Packed, Shipped, Out for delivery, Delivered. */
|
|
4
4
|
export interface OrderStatusStep {
|
|
5
|
+
/** Unique key of the step. */
|
|
5
6
|
id: string;
|
|
7
|
+
/** Step name; spoken after its state word. */
|
|
6
8
|
label: string;
|
|
7
9
|
/** Muted line under the label, e.g. "Bengaluru hub". */
|
|
8
10
|
detail?: string;
|
|
9
11
|
/** Pre-formatted date or time, e.g. "Tue, 7 Oct"; for an upcoming step this is the expected date. */
|
|
10
12
|
date?: string;
|
|
13
|
+
/** Picks the marker: check for done, ringed dot for current, hollow ring for upcoming. */
|
|
11
14
|
state: OrderStepState;
|
|
12
15
|
}
|
|
13
16
|
/** Vertical for a track page, horizontal for a compact strip on the order-success screen. */
|
|
14
17
|
export type OrderStatusOrientation = "vertical" | "horizontal";
|
|
15
18
|
/** Words read out for each state, so status never rides on the marker alone. */
|
|
16
19
|
export interface OrderStatusTimelineLabels {
|
|
20
|
+
/** Spoken before a completed step's label; defaults to "Completed". */
|
|
17
21
|
done: string;
|
|
22
|
+
/** Spoken before the step in progress; defaults to "In progress". */
|
|
18
23
|
current: string;
|
|
24
|
+
/** Spoken before a step still ahead; defaults to "Upcoming". */
|
|
19
25
|
upcoming: string;
|
|
20
26
|
}
|
|
21
27
|
/** Order tracking steps as an ordered list; markers pair an icon shape with screen-reader text for each state. */
|
|
22
28
|
export interface OrderStatusTimelineProps {
|
|
29
|
+
/** Stages in order; each step's `state` is given, not derived from position. */
|
|
23
30
|
steps: OrderStatusStep[];
|
|
31
|
+
/** Layout of the list; defaults to "vertical". */
|
|
24
32
|
orientation?: OrderStatusOrientation;
|
|
33
|
+
/** Overrides the default English state words; unset keys keep their default. */
|
|
25
34
|
labels?: Partial<OrderStatusTimelineLabels>;
|
|
26
35
|
/** Accessible name of the list; defaults to "Order status". */
|
|
27
36
|
"aria-label"?: string;
|
|
37
|
+
/** Test id on the list. */
|
|
28
38
|
"data-testid"?: string;
|
|
29
39
|
}
|
|
@@ -5,9 +5,11 @@ export type OrderSummaryTone = "default" | "success" | "muted";
|
|
|
5
5
|
export interface OrderSummaryLine {
|
|
6
6
|
/** Stable key; falls back to the label. */
|
|
7
7
|
id?: string;
|
|
8
|
+
/** Row text on the left; the fallback key when `id` is omitted. */
|
|
8
9
|
label: string;
|
|
9
10
|
/** A number is formatted as a price; a string is shown as is, e.g. "Calculated at checkout". */
|
|
10
11
|
amount: number | string;
|
|
12
|
+
/** Ink of the row; a negative amount, a free line and "success" all use the success tone. */
|
|
11
13
|
tone?: OrderSummaryTone;
|
|
12
14
|
/** Muted line under the label, e.g. "Applied: WELCOME10". */
|
|
13
15
|
hint?: string;
|
|
@@ -16,13 +18,16 @@ export interface OrderSummaryLine {
|
|
|
16
18
|
}
|
|
17
19
|
/** Progress toward a free-delivery threshold, in the same currency as the lines. */
|
|
18
20
|
export interface FreeShippingProgress {
|
|
21
|
+
/** Subtotal at which free delivery unlocks. */
|
|
19
22
|
threshold: number;
|
|
20
23
|
/** Eligible subtotal so far; at or above `threshold` the line reads as unlocked. */
|
|
21
24
|
current: number;
|
|
22
25
|
}
|
|
23
26
|
/** Visible copy; override every string for another language. */
|
|
24
27
|
export interface OrderSummaryLabels {
|
|
28
|
+
/** Panel heading, also the accessible name when `hideTitle` is set. */
|
|
25
29
|
title: string;
|
|
30
|
+
/** Label beside the large total. */
|
|
26
31
|
total: string;
|
|
27
32
|
/** Shown instead of a number when `amount` is 0 on a `freeWhenZero` line. */
|
|
28
33
|
free: string;
|
|
@@ -37,17 +42,22 @@ export interface OrderSummaryLabels {
|
|
|
37
42
|
}
|
|
38
43
|
/** Price breakdown for the bag and checkout: lines, a large tabular total, optional savings banner and free-delivery progress. Flows in the page, so it is sticky-friendly. */
|
|
39
44
|
export interface OrderSummaryProps extends PriceFormat {
|
|
45
|
+
/** Breakdown rows in order, above the total. */
|
|
40
46
|
lines: OrderSummaryLine[];
|
|
47
|
+
/** Grand total, formatted as a price in the large tabular figure. */
|
|
41
48
|
total: number;
|
|
42
49
|
/** Total saved on the order; the banner is hidden at 0 or when omitted. */
|
|
43
50
|
savings?: number;
|
|
44
51
|
/** Muted line under the total, e.g. "Inclusive of all taxes". */
|
|
45
52
|
taxNote?: string;
|
|
53
|
+
/** Shows a progress bar and message above the panel; reads unlocked once `current` reaches `threshold`. */
|
|
46
54
|
freeShippingProgress?: FreeShippingProgress;
|
|
47
55
|
/** Hides the "Price details" heading when the page already has one. */
|
|
48
56
|
hideTitle?: boolean;
|
|
49
57
|
/** Skeleton of the same shape; the total and lines are not rendered. */
|
|
50
58
|
isLoading?: boolean;
|
|
59
|
+
/** Partial overrides of the default English strings. */
|
|
51
60
|
labels?: Partial<OrderSummaryLabels>;
|
|
61
|
+
/** Test id on the outer wrapper. */
|
|
52
62
|
"data-testid"?: string;
|
|
53
63
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { OrgSwitcherProps } from "./OrgSwitcherProps";
|
|
3
|
+
/** Session-scoped organization switcher: a trigger plus searchable popover that reports the chosen org via `onChange`. */
|
|
3
4
|
declare const OrgSwitcher: React.FC<OrgSwitcherProps>;
|
|
4
5
|
export default OrgSwitcher;
|
|
@@ -14,11 +14,14 @@ const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
|
14
14
|
const surfaceRaised_1 = require("../../Theme/tokens/builders/surfaceRaised");
|
|
15
15
|
const rowStates_1 = require("../../Theme/tokens/builders/rowStates");
|
|
16
16
|
const optionRowInk_1 = require("../Select/optionRowInk");
|
|
17
|
+
const selectKeyboardRing_1 = require("../Select/selectKeyboardRing");
|
|
18
|
+
const selectRowInk_1 = require("../Select/selectRowInk");
|
|
17
19
|
const useExclusiveOverlay_1 = require("../../Hooks/useExclusiveOverlay");
|
|
18
20
|
const useMatchMedia_1 = require("../../Hooks/useMatchMedia");
|
|
19
21
|
const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
|
|
20
22
|
const OrgSwitcherProps_1 = require("./OrgSwitcherProps");
|
|
21
23
|
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
24
|
+
const optionRowSizes_1 = require("../../Theme/tokens/primitives/optionRowSizes");
|
|
22
25
|
const BACKGROUND_TRANSITION = (0, motion_1.transitionFor)(["background"]);
|
|
23
26
|
const sizeMap = {
|
|
24
27
|
sm: { h: "32px", avatarH: "32px", avatar: "22px", font: "0.8rem", sub: "0.65rem", px: 2 },
|
|
@@ -34,12 +37,17 @@ const Avatar = ({ org, boxSize, fontSize, }) => {
|
|
|
34
37
|
const fill = (0, OrgSwitcherProps_1.avatarColor)(org.name, (0, chartColorsFromTheme_1.chartMode)(colors));
|
|
35
38
|
return ((0, jsx_runtime_1.jsx)(react_2.Flex, { "aria-hidden": "true", "data-initials": (0, OrgSwitcherProps_1.orgInitial)(org.name), _before: { content: "attr(data-initials)" }, align: "center", justify: "center", boxSize: boxSize, borderRadius: "lg", flexShrink: 0, bg: fill, color: (0, accentText_1.onFilled)(fill, colors.white, colors.black), fontSize: fontSize, fontWeight: 700 }));
|
|
36
39
|
};
|
|
40
|
+
/** Session-scoped organization switcher: a trigger plus searchable popover that reports the chosen org via `onChange`. */
|
|
37
41
|
const OrgSwitcher = ({ organizations, value, onChange, isLoading = false, isSearchable, searchThreshold = 6, triggerVariant = "ghost", size = "md", maxWidth = "200px", menuMinWidth = "280px", placeholder = "Select organization", ariaLabel = "Switch organization", showRole = true, display = "full", }) => {
|
|
38
42
|
var _a, _b, _c;
|
|
39
43
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
40
44
|
const isMd = (0, useMatchMedia_1.useMatchMedia)(MD_QUERY, true);
|
|
41
45
|
const avatarOnly = display === "avatar" || (display === "auto" && !isMd);
|
|
42
|
-
const rowBackgrounds = (0, react_1.useMemo)(() => (0, rowStates_1.
|
|
46
|
+
const rowBackgrounds = (0, react_1.useMemo)(() => (0, rowStates_1.selectRowBackgrounds)(theme.colors), [theme.colors]);
|
|
47
|
+
const keyboardRing = {
|
|
48
|
+
outline: "2px solid transparent",
|
|
49
|
+
boxShadow: (0, selectKeyboardRing_1.keyboardRingShadow)(rowBackgrounds.keyboardRing),
|
|
50
|
+
};
|
|
43
51
|
const s = sizeMap[size];
|
|
44
52
|
const { isOpen, onOpen, onClose } = (0, react_2.useDisclosure)();
|
|
45
53
|
const requestExclusiveOpen = (0, useExclusiveOverlay_1.useExclusiveOverlay)(isOpen, onClose);
|
|
@@ -110,7 +118,7 @@ const OrgSwitcher = ({ organizations, value, onChange, isLoading = false, isSear
|
|
|
110
118
|
return ((0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: isOpen, onOpen: handlePopoverOpen, onClose: () => {
|
|
111
119
|
onClose();
|
|
112
120
|
setQuery("");
|
|
113
|
-
}, placement: "bottom-start", initialFocusRef: showSearch ? searchRef : firstOptionRef, isLazy: true, children: [avatarOnly ? ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: (_c = selected === null || selected === void 0 ? void 0 : selected.name) !== null && _c !== void 0 ? _c : placeholder, placement: "bottom", isDisabled: isOpen, children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", flexShrink: 0, children: (0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: trigger }) }) })) : ((0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: trigger })), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { minW: menuMinWidth, maxW: "calc(100vw - 32px)", w: "auto",
|
|
121
|
+
}, placement: "bottom-start", initialFocusRef: showSearch ? searchRef : firstOptionRef, isLazy: true, children: [avatarOnly ? ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: (_c = selected === null || selected === void 0 ? void 0 : selected.name) !== null && _c !== void 0 ? _c : placeholder, placement: "bottom", isDisabled: isOpen, children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", flexShrink: 0, children: (0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: trigger }) }) })) : ((0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: trigger })), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { "aria-label": ariaLabel, minW: menuMinWidth, maxW: "calc(100vw - 32px)", w: "auto",
|
|
114
122
|
// NOTE: Chakra's --popper-bg is hardcoded white via dead _dark — without an explicit bg the panel stayed white.
|
|
115
123
|
bg: theme.colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", boxShadow: "float", _focus: { outline: "none", boxShadow: "float" }, children: (0, jsx_runtime_1.jsxs)(react_2.PopoverBody, { p: 0, children: [showSearch && ((0, jsx_runtime_1.jsx)(react_2.Box, { p: 2, borderBottom: "1px solid", borderColor: searchRule, children: (0, jsx_runtime_1.jsxs)(react_2.InputGroup, { size: "sm", children: [(0, jsx_runtime_1.jsx)(react_2.InputLeftElement, { pointerEvents: "none", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Search, { size: 15, color: theme.colors.textMuted }) }), (0, jsx_runtime_1.jsx)(react_2.Input, { ref: searchRef, placeholder: "Search organizations", value: query, onChange: (e) => setQuery(e.target.value), onKeyDown: (e) => {
|
|
116
124
|
if (e.key === "ArrowDown" && filtered.length > 0) {
|
|
@@ -123,7 +131,7 @@ const OrgSwitcher = ({ organizations, value, onChange, isLoading = false, isSear
|
|
|
123
131
|
optionRefs.current[idx] = el;
|
|
124
132
|
if (idx === 0)
|
|
125
133
|
firstOptionRef.current = el;
|
|
126
|
-
}, tabIndex: idx === activeIndex ? 0 : -1, align: "center", gap: "10px", w: "100%", textAlign: "left", border: "none", fontFamily: "inherit", px: 3, py: 2, cursor: "pointer", bg: "transparent", transition: BACKGROUND_TRANSITION,
|
|
134
|
+
}, tabIndex: idx === activeIndex ? 0 : -1, align: "center", gap: "10px", w: "calc(100% - 0.5rem)", mx: 1, textAlign: "left", border: "none", fontFamily: "inherit", px: 3, py: 2, borderRadius: optionRowSizes_1.OPTION_ROW_RADIUS, cursor: "pointer", bg: isActive ? rowBackgrounds.selected : "transparent", transition: BACKGROUND_TRANSITION, _hover: { bg: isActive ? rowBackgrounds.selectedActive : rowBackgrounds.active }, _focus: { bg: isActive ? rowBackgrounds.selectedActive : rowBackgrounds.active }, _focusVisible: keyboardRing, onClick: () => handleSelect(org), children: [(0, jsx_runtime_1.jsx)(Avatar, { org: org, boxSize: s.avatar, fontSize: s.sub }), (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: "1", minW: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.font, fontWeight: (0, optionRowInk_1.optionRowWeight)(isActive), color: (0, selectRowInk_1.selectRowInk)(theme.colors, isActive), overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: org.name }), showRole && org.role && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.sub, color: (0, selectRowInk_1.selectRowDescriptionInk)(theme.colors), overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: org.role }))] }), isActive && ((0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.Check, size: 16, color: theme.colors.accentText, flexShrink: 0 }))] }, org.id));
|
|
127
135
|
}), filtered.length === 0 && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: theme.colors.textMuted, textAlign: "center", py: 6, children: "No organizations found" }))] })] }) })] }));
|
|
128
136
|
};
|
|
129
137
|
exports.default = OrgSwitcher;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ChartMode } from "../../Theme/tokens/builders/chartColorsFromTheme";
|
|
2
2
|
/** One organization in the switcher's list; `id` is matched against `value` to find the active one. */
|
|
3
3
|
export interface OrgOption {
|
|
4
|
+
/** Unique key; compared with `value` to mark the active organization and passed to `onChange`. */
|
|
4
5
|
id: string | number;
|
|
5
6
|
/** Organization display name. */
|
|
6
7
|
name: string;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
/** One organization row — active or invited — rendered as a card in OrganizationDetails' grid. */
|
|
3
3
|
export type OrganizationItem = {
|
|
4
|
+
/** Unique per card (React key); passed to every per-organization callback and matched against the `*OrgIds` spinner arrays. */
|
|
4
5
|
orgId: number;
|
|
6
|
+
/** Card title; seeds the inline rename field, and renames are sent trimmed through `onEditOrganization`. */
|
|
5
7
|
company_name: string;
|
|
8
|
+
/** Invited cards only: shown as a line with a globe icon; ignored on active cards. */
|
|
6
9
|
company_url?: string;
|
|
7
10
|
/** 1 when this org is the user's default org. */
|
|
8
11
|
default: number;
|
|
@@ -10,6 +13,7 @@ export type OrganizationItem = {
|
|
|
10
13
|
uiInvite?: number;
|
|
11
14
|
/** Distinct from `default` above — only gates delete-protection, not the Default badge/set-default flow. */
|
|
12
15
|
defaultOrg: number;
|
|
16
|
+
/** Shown as a tag on active cards; "Super Admin" is what `canRename` and `canDelete` default to allowing. */
|
|
13
17
|
roleName?: string;
|
|
14
18
|
/** True when the current user owns this org; the app computes ownership. */
|
|
15
19
|
isOwner?: boolean;
|
|
@@ -25,8 +29,11 @@ export type OrganizationItem = {
|
|
|
25
29
|
};
|
|
26
30
|
/** Local form state for CreateOrgModal — the shape onSubmit receives when the create form is confirmed. */
|
|
27
31
|
export type CreateOrgFormValues = {
|
|
32
|
+
/** Organization name entered in the create form; required, and trimmed before submit. */
|
|
28
33
|
company_name: string;
|
|
34
|
+
/** Address entered in the create form; required, and trimmed before submit. */
|
|
29
35
|
company_address: string;
|
|
36
|
+
/** Trimmed phone; the built-in form requires it with at least 8 digits even though it is typed optional. */
|
|
30
37
|
phone?: string;
|
|
31
38
|
/** @deprecated Dead — never populated by the built-in CreateOrgModal, no known consumer usage. */
|
|
32
39
|
default?: number;
|
|
@@ -35,53 +42,95 @@ export type CreateOrgFormValues = {
|
|
|
35
42
|
};
|
|
36
43
|
/** All copy in OrganizationDetails is overridable here; unset fields fall back to its built-in DEFAULT_LABELS. */
|
|
37
44
|
export type OrganizationDetailsLabels = {
|
|
45
|
+
/** Header title, default "Hello, User!"; when `userName` is set, "User" is replaced by that name. */
|
|
38
46
|
greeting?: string;
|
|
47
|
+
/** Header subtitle under the greeting. Default "Manage your organizations". */
|
|
39
48
|
manageSubtitle?: string;
|
|
49
|
+
/** Not rendered by the current UI. */
|
|
40
50
|
organizationDetails?: string;
|
|
51
|
+
/** Header button that opens the create modal. Default "Create New Organization". */
|
|
41
52
|
createNewOrganization?: string;
|
|
53
|
+
/** Create modal title and the empty-state button. Default "Create Organization". */
|
|
42
54
|
createOrganization?: string;
|
|
55
|
+
/** Heading of the active organizations section. Default "Active Organizations". */
|
|
43
56
|
activeOrganizations?: string;
|
|
57
|
+
/** Heading of the invitations section. Default "Invited Organizations". */
|
|
44
58
|
invitedOrganizations?: string;
|
|
59
|
+
/** Link on a non-default active card that calls `onSetDefault`. Default "Set as Default". */
|
|
45
60
|
setAsDefault?: string;
|
|
61
|
+
/** Text beside the spinner while the card's id is in `switchingOrgIds`. Default "Setting...". */
|
|
46
62
|
settingDefault?: string;
|
|
63
|
+
/** Badge on the card where `default` is 1. Default "Default". */
|
|
47
64
|
default?: string;
|
|
65
|
+
/** Tag shown when `isOwner` is true. Default "Owner". */
|
|
48
66
|
owner?: string;
|
|
67
|
+
/** Badge on invited cards. Default "Pending". */
|
|
49
68
|
pending?: string;
|
|
69
|
+
/** Accept button on invited cards. Default "Accept". */
|
|
50
70
|
accept?: string;
|
|
71
|
+
/** Accept button text while the id is in `respondingOrgIds`. Default "Accepting...". */
|
|
51
72
|
accepting?: string;
|
|
73
|
+
/** Decline button on invited cards. Default "Decline". */
|
|
52
74
|
decline?: string;
|
|
75
|
+
/** Accessible name of the delete icon, and its tooltip on an unprotected card. Default "Delete Organization". */
|
|
53
76
|
deleteOrganization?: string;
|
|
77
|
+
/** Tooltip on a disabled delete icon when `deleteDisabledReason` is not set. Default "Protected organization". */
|
|
54
78
|
protectedOrganization?: string;
|
|
79
|
+
/** Confirm button in the delete modal. Default "Delete". */
|
|
55
80
|
delete?: string;
|
|
81
|
+
/** Accessible name and tooltip of the rename pencil. Default "Edit organization name". */
|
|
56
82
|
editOrganization?: string;
|
|
83
|
+
/** Accessible name of the inline rename save button. Default "Save". */
|
|
57
84
|
save?: string;
|
|
85
|
+
/** Not rendered by the current UI. */
|
|
58
86
|
saving?: string;
|
|
87
|
+
/** Error shown when a rename is saved blank. Default "Organization name cannot be empty". */
|
|
59
88
|
emptyNameError?: string;
|
|
89
|
+
/** Empty-state title when there are no active or invited organizations. Default "No organizations found". */
|
|
60
90
|
noOrganizationsTitle?: string;
|
|
91
|
+
/** Empty-state description under the title. */
|
|
61
92
|
noOrganizationsDescription?: string;
|
|
93
|
+
/** Create form field label. Default "Company Name". */
|
|
62
94
|
companyName?: string;
|
|
95
|
+
/** Create form field label. Default "Company Address". */
|
|
63
96
|
companyAddress?: string;
|
|
97
|
+
/** Create form field label. Default "Phone". */
|
|
64
98
|
phone?: string;
|
|
99
|
+
/** Cancel button in the create and delete modals and the rename cancel button. Default "Cancel". */
|
|
65
100
|
cancel?: string;
|
|
101
|
+
/** Submit button of the create form. Default "Submit". */
|
|
66
102
|
submit?: string;
|
|
103
|
+
/** Create form error for an empty required field. Default "This field is required". */
|
|
67
104
|
requiredField?: string;
|
|
105
|
+
/** Create form error for a phone with fewer than 8 digits. */
|
|
68
106
|
invalidPhone?: string;
|
|
107
|
+
/** Delete modal title. Default "Confirm Deletion". */
|
|
69
108
|
confirmDeletion?: string;
|
|
109
|
+
/** Delete modal body question. */
|
|
70
110
|
deleteConfirmText?: string;
|
|
111
|
+
/** Not rendered by the built-in UI; put footer text in `footerSlot`. */
|
|
71
112
|
copyright?: string;
|
|
113
|
+
/** Not rendered by the built-in UI; put footer links in `footerSlot`. */
|
|
72
114
|
termsOfService?: string;
|
|
73
115
|
};
|
|
74
116
|
/** Payload for the public onCreateOrganization callback — company_address/phone optional here, unlike CreateOrgFormValues. */
|
|
75
117
|
export interface CreateOrganizationValues {
|
|
118
|
+
/** Organization name, trimmed; required by the built-in form. */
|
|
76
119
|
company_name: string;
|
|
120
|
+
/** Address, trimmed; the built-in form requires it. */
|
|
77
121
|
company_address?: string;
|
|
122
|
+
/** Trimmed phone; the built-in form requires 8 or more digits. */
|
|
78
123
|
phone?: string;
|
|
79
124
|
}
|
|
80
125
|
/** Admin panel for the org list — rename/delete/create/invites/default; not a session switcher (see OrgSwitcher for picking the active org). */
|
|
81
126
|
export interface OrganizationDetailsProps {
|
|
127
|
+
/** Organizations the user belongs to; each renders a card with rename, delete and set-default controls. */
|
|
82
128
|
activeOrganizations: OrganizationItem[];
|
|
129
|
+
/** Pending invitations; each renders a card with Accept and Decline buttons. */
|
|
83
130
|
invitedOrganizations: OrganizationItem[];
|
|
131
|
+
/** Replaces both sections with six skeleton cards while true. Defaults to false. */
|
|
84
132
|
isLoading?: boolean;
|
|
133
|
+
/** Puts the create modal's submit button into its loading state. Defaults to false. */
|
|
85
134
|
isCreating?: boolean;
|
|
86
135
|
/** orgIds currently switching to default (shows a spinner on that card) */
|
|
87
136
|
switchingOrgIds?: number[];
|
|
@@ -97,6 +146,7 @@ export interface OrganizationDetailsProps {
|
|
|
97
146
|
onSetDefault?: (orgId: number) => void | Promise<void>;
|
|
98
147
|
/** Same as onSetDefault — not awaited internally; respondingOrgIds is entirely consumer-managed. */
|
|
99
148
|
onAcceptInvite?: (orgId: number) => void | Promise<void>;
|
|
149
|
+
/** Fires with the invitation's orgId on Decline; the button has no built-in loading state. */
|
|
100
150
|
onDeclineInvite?: (orgId: number) => void | Promise<void>;
|
|
101
151
|
/**
|
|
102
152
|
* Called once the built-in confirm modal is accepted. Never called when
|
|
@@ -115,7 +165,9 @@ export interface OrganizationDetailsProps {
|
|
|
115
165
|
onEditOrganization?: (orgId: number, newName: string) => void | Promise<void>;
|
|
116
166
|
/** Back icon renders only when this is provided, not merely disabled when omitted. */
|
|
117
167
|
onBack?: () => void;
|
|
168
|
+
/** Rendered below the sections, above the modals; use it for copyright or terms links. */
|
|
118
169
|
footerSlot?: ReactNode;
|
|
170
|
+
/** Partial copy overrides; unset keys keep the English defaults. */
|
|
119
171
|
labels?: OrganizationDetailsLabels;
|
|
120
172
|
}
|
|
121
173
|
/** Props for the internal create-org modal; `labels` needs only the subset of OrganizationDetailsLabels it renders. */
|
|
@@ -11,6 +11,7 @@ export interface PageHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "t
|
|
|
11
11
|
breadcrumbs?: ReactNode;
|
|
12
12
|
/** Avatar or icon left of the title; `titleAddon` sits inline after it (status Tag). */
|
|
13
13
|
leading?: ReactNode;
|
|
14
|
+
/** Rendered inline right after the h1, e.g. a status Tag; wraps under a long title. */
|
|
14
15
|
titleAddon?: ReactNode;
|
|
15
16
|
/** Wrapping row of muted xs items under the subtitle (owner, updated-at, etc.). */
|
|
16
17
|
meta?: ReactNode;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ControlSize } from "../../Theme/tokens/primitives/controlSizes";
|
|
2
2
|
/** Screen-reader names, merged over `defaultPaginationLabels`; override them all for another language. */
|
|
3
3
|
export interface PaginationLabels {
|
|
4
|
+
/** Accessible name of the previous-page button. */
|
|
4
5
|
previous: string;
|
|
6
|
+
/** Accessible name of the next-page button. */
|
|
5
7
|
next: string;
|
|
6
8
|
/** Names a numbered button from its 1-based page, e.g. (3) => "Page 3". */
|
|
7
9
|
page: (page: number) => string;
|
|
@@ -40,7 +42,9 @@ export type PaginationProps = PaginationCount & {
|
|
|
40
42
|
isDisabled?: boolean;
|
|
41
43
|
/** Names the nav landmark; defaults to "Pagination". Give each pager on a screen its own. */
|
|
42
44
|
"aria-label"?: string;
|
|
45
|
+
/** Overrides the default English names; unset keys keep their default. */
|
|
43
46
|
labels?: Partial<PaginationLabels>;
|
|
47
|
+
/** Test id on the nav element. */
|
|
44
48
|
"data-testid"?: string;
|
|
45
49
|
};
|
|
46
50
|
export {};
|
|
@@ -3,6 +3,7 @@ import type { ReactNode } from "react";
|
|
|
3
3
|
export interface PaymentOptionProps {
|
|
4
4
|
/** Identifies the option inside a `PaymentOptionGroup`; required there. */
|
|
5
5
|
value?: string;
|
|
6
|
+
/** Method name; also the row's accessible name when selectable. */
|
|
6
7
|
title: string;
|
|
7
8
|
/** Muted line under the title, e.g. "Pay on delivery · ₹50 handling fee". */
|
|
8
9
|
subtitle?: string;
|
|
@@ -12,21 +13,29 @@ export interface PaymentOptionProps {
|
|
|
12
13
|
offer?: string;
|
|
13
14
|
/** Standalone selection state; ignored inside a group, where the group's value decides. */
|
|
14
15
|
selected?: boolean;
|
|
16
|
+
/** Called when the row is chosen; also fires inside a group, after the group updates. */
|
|
15
17
|
onSelect?: () => void;
|
|
16
18
|
/** Dims the row and drops it from the tab order, e.g. COD above the order limit; say why in `subtitle`. */
|
|
17
19
|
disabled?: boolean;
|
|
18
20
|
/** Revealed under the row only while it is selected, e.g. a UPI id input. Interactive content here sits outside the radio. */
|
|
19
21
|
children?: ReactNode;
|
|
22
|
+
/** Test id on the row's outer element. */
|
|
20
23
|
"data-testid"?: string;
|
|
21
24
|
}
|
|
22
25
|
/** Radiogroup of `PaymentOption`s with a roving tab stop; arrow keys move focus and selection together. */
|
|
23
26
|
export interface PaymentOptionGroupProps {
|
|
27
|
+
/** Selected option's `value`; controls the group when set. */
|
|
24
28
|
value?: string;
|
|
29
|
+
/** Initially selected `value` when the group is uncontrolled. */
|
|
25
30
|
defaultValue?: string;
|
|
31
|
+
/** Called with the new `value` when selection changes by click or arrow key. */
|
|
26
32
|
onValueChange?: (value: string) => void;
|
|
27
33
|
/** Direct `PaymentOption` children; wrapping them in another component hides their `value` from the roving tab stop. */
|
|
28
34
|
children: ReactNode;
|
|
35
|
+
/** Accessible name of the radiogroup; give this or `aria-labelledby`. */
|
|
29
36
|
"aria-label"?: string;
|
|
37
|
+
/** Id of the element that names the radiogroup. */
|
|
30
38
|
"aria-labelledby"?: string;
|
|
39
|
+
/** Test id on the radiogroup element. */
|
|
31
40
|
"data-testid"?: string;
|
|
32
41
|
}
|