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
|
@@ -5,7 +5,7 @@ export type AvatarSize = ControlSize | "2xs" | "xl";
|
|
|
5
5
|
export type AvatarStatus = "online" | "away" | "busy" | "offline";
|
|
6
6
|
/** Image with graceful initials fallback, a deterministic per-name fill, and an optional presence dot. */
|
|
7
7
|
export interface AvatarProps {
|
|
8
|
-
/** Used for initials, alt text, the deterministic fill color, and the
|
|
8
|
+
/** Used for initials, image alt text, the deterministic fill color, and the default `aria-label`. */
|
|
9
9
|
name: string;
|
|
10
10
|
/** Image URL. Falls back to initials on a missing src or a failed load. */
|
|
11
11
|
src?: string;
|
|
@@ -13,7 +13,7 @@ export interface AvatarProps {
|
|
|
13
13
|
size?: AvatarSize;
|
|
14
14
|
/** Presence dot in the bottom-right corner; omitted entirely when unset. */
|
|
15
15
|
status?: AvatarStatus;
|
|
16
|
-
/** Overrides the
|
|
16
|
+
/** Overrides the initials fallback's `aria-label` (defaults to `name`); no effect while the image shows, where `alt` is `name`. */
|
|
17
17
|
ariaLabel?: string;
|
|
18
18
|
/** Replaces the built-in two-letter initials derivation. */
|
|
19
19
|
getInitials?: (name: string) => string;
|
|
@@ -2,6 +2,7 @@ import type { PaletteProps } from "../../Theme/tokens/types";
|
|
|
2
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
|
+
/** Avatar fill and its contrast-resolved text colour (`bg` is the fill, `color` the ink on it). */
|
|
5
6
|
export type AvatarColorway = {
|
|
6
7
|
bg: string;
|
|
7
8
|
color: string;
|
|
@@ -5,12 +5,16 @@ export type BagBarPosition = "static" | "bottom";
|
|
|
5
5
|
export interface BagBarLabels {
|
|
6
6
|
/** Accessible name of the bar landmark. */
|
|
7
7
|
region: string;
|
|
8
|
+
/** Label next to the amount; default "Total". */
|
|
8
9
|
total: string;
|
|
10
|
+
/** Text of the price-details link; default "View price details". */
|
|
9
11
|
viewDetails: string;
|
|
12
|
+
/** Primary action text used when `ctaLabel` is not set; default "Place order". */
|
|
10
13
|
cta: string;
|
|
11
14
|
}
|
|
12
15
|
/** Mobile bottom bar: the payable total with a price-details link on the left and the one primary action on the right. */
|
|
13
16
|
export interface BagBarProps extends PriceFormat {
|
|
17
|
+
/** Payable amount in major currency units, formatted with `currency` and `locale`. */
|
|
14
18
|
total: number;
|
|
15
19
|
/** Muted line beside the total, e.g. "Inclusive of all taxes". */
|
|
16
20
|
note?: string;
|
|
@@ -18,13 +22,17 @@ export interface BagBarProps extends PriceFormat {
|
|
|
18
22
|
onViewDetails?: () => void;
|
|
19
23
|
/** Primary action label, e.g. "Place order" or "Checkout". */
|
|
20
24
|
ctaLabel?: string;
|
|
25
|
+
/** Fires when the primary action is pressed. */
|
|
21
26
|
onCta?: () => void;
|
|
27
|
+
/** Disables the primary action; default false. */
|
|
22
28
|
ctaDisabled?: boolean;
|
|
23
29
|
/** Spinner on the primary action while the order is being placed. */
|
|
24
30
|
ctaLoading?: boolean;
|
|
31
|
+
/** "static" flows in the page, "bottom" sticks to the container's bottom edge; default "static". */
|
|
25
32
|
position?: BagBarPosition;
|
|
26
33
|
/** Stacking order when `position` is "bottom"; above page content, below dialogs by default. */
|
|
27
34
|
zIndex?: number;
|
|
35
|
+
/** Per-string copy overrides; unset keys keep the English defaults. */
|
|
28
36
|
labels?: Partial<BagBarLabels>;
|
|
29
37
|
"data-testid"?: string;
|
|
30
38
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { BulkSelectionBarProps } from "./BulkSelectionBarProps";
|
|
2
|
+
/** Action bar for table row selection: count, shared facts, bulk action buttons and a clear button; renders nothing at zero. */
|
|
2
3
|
declare const BulkSelectionBar: ({ selectedCount, facts, actions, onClearSelection, clearLabel, countLabel, placement, "aria-label": ariaLabel, "data-testid": testId, }: BulkSelectionBarProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
4
|
export default BulkSelectionBar;
|
|
@@ -21,6 +21,7 @@ const SCHEME_BY_TONE = {
|
|
|
21
21
|
danger: "red",
|
|
22
22
|
};
|
|
23
23
|
const TOUCH_SX = { "@media (pointer: coarse)": { minHeight: "44px", minWidth: "44px" } };
|
|
24
|
+
/** Action bar for table row selection: count, shared facts, bulk action buttons and a clear button; renders nothing at zero. */
|
|
24
25
|
const BulkSelectionBar = ({ selectedCount, facts, actions, onClearSelection, clearLabel = "Clear selection", countLabel, placement = "sticky", "aria-label": ariaLabel = "Selection actions", "data-testid": testId = "bulk-selection-bar", }) => {
|
|
25
26
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
26
27
|
const isActive = selectedCount > 0;
|
|
@@ -5,12 +5,15 @@ export type BulkActionTone = "default" | "primary" | "danger";
|
|
|
5
5
|
export interface BulkAction {
|
|
6
6
|
/** Stable key; also the suffix of the button's `data-testid` (`bulk-action-<id>`). */
|
|
7
7
|
id: string;
|
|
8
|
+
/** Button text; also the loading text while `isLoading`. */
|
|
8
9
|
label: string;
|
|
10
|
+
/** Called when the button is pressed. */
|
|
9
11
|
onClick: () => void;
|
|
10
12
|
/** Defaults to "default". */
|
|
11
13
|
tone?: BulkActionTone;
|
|
12
14
|
/** Icon component (e.g. a lucide icon); rendered at 16px, decorative. */
|
|
13
15
|
icon?: ElementType;
|
|
16
|
+
/** Disables the button. */
|
|
14
17
|
isDisabled?: boolean;
|
|
15
18
|
/** Spinner on this action; the label stays as the loading text. */
|
|
16
19
|
isLoading?: boolean;
|
|
@@ -21,7 +24,9 @@ export interface BulkSelectionBarProps {
|
|
|
21
24
|
selectedCount: number;
|
|
22
25
|
/** Short claims true of the whole selection, e.g. ["all leave", "no clashes"]; joined after the count with " · ". */
|
|
23
26
|
facts?: string[];
|
|
27
|
+
/** Buttons shown after the count, in array order, before the clear button. */
|
|
24
28
|
actions: BulkAction[];
|
|
29
|
+
/** Called when the clear button is pressed. */
|
|
25
30
|
onClearSelection: () => void;
|
|
26
31
|
/** Clear button text; defaults to "Clear selection". */
|
|
27
32
|
clearLabel?: string;
|
|
@@ -31,5 +36,6 @@ export interface BulkSelectionBarProps {
|
|
|
31
36
|
placement?: "inline" | "sticky";
|
|
32
37
|
/** Accessible name of the region; defaults to "Selection actions". */
|
|
33
38
|
"aria-label"?: string;
|
|
39
|
+
/** Test id on the bar; defaults to "bulk-selection-bar". */
|
|
34
40
|
"data-testid"?: string;
|
|
35
41
|
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const react_2 = require("@chakra-ui/react");
|
|
6
|
+
/** Themed button with label or children, left/right icons and a loading state that keeps its width. */
|
|
6
7
|
const Button = (0, react_1.forwardRef)(function Button({ label, children, onClick, opacity, variant = "solid", leftIcon, rightIcon, size, isDisabled = false, isLoading = false, loadingText, type, width, w, sx, colorScheme, border, borderRadius, onMouseEnter, onMouseLeave, ...aria }, ref) {
|
|
7
8
|
const isIconOnly = !children && !label && !!(leftIcon || rightIcon);
|
|
8
9
|
return ((0, jsx_runtime_1.jsx)(react_2.Button, { ...aria, type: type, onClick: onClick, width: width || w || "fit-content", variant: variant, size: size, isLoading: isLoading, isDisabled: isDisabled, loadingText: loadingText, leftIcon: leftIcon, rightIcon: rightIcon, iconSpacing: isIconOnly ? 0 : undefined, px: isIconOnly ? 0 : undefined, ref: ref, colorScheme: colorScheme, sx: sx, opacity: opacity, border: border, borderRadius: borderRadius, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: children !== null && children !== void 0 ? children : label }));
|
|
@@ -17,8 +17,11 @@ export type ButtonProps = LayoutProps & DataAttributes & Pick<ChakraButtonProps,
|
|
|
17
17
|
type?: "button" | "submit" | "reset";
|
|
18
18
|
/** Ignored when variant="gradient" — that variant always paints the theme's fixed gradient pair, not this scheme. */
|
|
19
19
|
colorScheme?: 'primary' | 'secondary' | 'tertiary' | 'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink';
|
|
20
|
+
/** Forwarded to the underlying `<button>` element. */
|
|
20
21
|
ref?: React.Ref<HTMLButtonElement>;
|
|
22
|
+
/** Button content; takes precedence over `label`. */
|
|
21
23
|
children?: React.ReactNode;
|
|
24
|
+
/** Opacity of the whole button, 0 to 1. */
|
|
22
25
|
opacity?: number;
|
|
23
26
|
};
|
|
24
27
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ButtonGroupIconProps } from "./ButtonGroupIconProps";
|
|
2
|
+
/** Attached left icon, text button and right icon or dropdown trigger; see ButtonGroupIconProps. */
|
|
2
3
|
export default function ButtonGroupIcon({ leftIcon, rightIcon, onLeftIconClick, onRightIconClick, buttonText, onButtonClick, onButtongroupClick, size, variant, color, buttonGroupStyle, buttonGroupLeftIconStyle, buttonGroupRightIconStyle, buttonStyle, onBlurLeftIcon, onBlurRightIcon, dropdownOptions, // New prop for dropdown options
|
|
3
4
|
onDropdownOptionClick, // New prop to handle option clicks
|
|
4
5
|
rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider, leftIconLoading, RightIconLoading, }: ButtonGroupIconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,6 +10,7 @@ const color_1 = require("../../Theme/tokens/builders/color");
|
|
|
10
10
|
const rafThrottle_1 = require("../../Utils/rafThrottle");
|
|
11
11
|
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
12
12
|
const BACKGROUND_TRANSITION = (0, motion_1.transitionFor)(["background"]);
|
|
13
|
+
/** Attached left icon, text button and right icon or dropdown trigger; see ButtonGroupIconProps. */
|
|
13
14
|
function ButtonGroupIcon({ leftIcon, rightIcon, onLeftIconClick, onRightIconClick, buttonText, onButtonClick, onButtongroupClick, size, variant, color, buttonGroupStyle, buttonGroupLeftIconStyle, buttonGroupRightIconStyle, buttonStyle, onBlurLeftIcon, onBlurRightIcon, dropdownOptions, // New prop for dropdown options
|
|
14
15
|
onDropdownOptionClick, // New prop to handle option clicks
|
|
15
16
|
rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, leftIconLoading, RightIconLoading, }) {
|
|
@@ -1,24 +1,37 @@
|
|
|
1
1
|
import { ReactElement } from "react";
|
|
2
2
|
/** Themed Chakra ButtonGroup wrapper (left icon + text button + right icon/dropdown) — closed prop list, no ...rest, text via buttonText only. */
|
|
3
3
|
export type ButtonGroupIconProps = {
|
|
4
|
+
/** Icon button at the left edge of the group; omitted entirely when unset. */
|
|
4
5
|
leftIcon?: ReactElement;
|
|
6
|
+
/** Icon button at the right edge; with `rightIconDropdown` it opens the `dropdownOptions` menu instead. */
|
|
5
7
|
rightIcon?: ReactElement;
|
|
8
|
+
/** Fires when the left icon button is clicked. */
|
|
6
9
|
onLeftIconClick?: () => void;
|
|
10
|
+
/** Fires when the right icon button is clicked; with `rightIconDropdown` it also toggles the menu. */
|
|
7
11
|
onRightIconClick?: () => void;
|
|
8
12
|
/** Auto-wrapped in a tooltip showing full text, but only when it visually truncates (maxW 200px). */
|
|
9
13
|
buttonText: string;
|
|
14
|
+
/** Fires when the centre text button is clicked. */
|
|
10
15
|
onButtonClick?: () => void;
|
|
11
16
|
/** Fires on every click inside the group via DOM bubbling too — not just clicks on group chrome. */
|
|
12
17
|
onButtongroupClick?: () => void;
|
|
18
|
+
/** Size of every segment; unset keeps the theme's default button size. */
|
|
13
19
|
size?: "lg" | "md" | "sm" | "xs" | "xl";
|
|
20
|
+
/** "gradient" paints one themed gradient across the whole group, with transparent segments; the rest style each segment. */
|
|
14
21
|
variant?: "solid" | "outline" | "ghost" | "link" | "unstyled" | "gradient";
|
|
15
22
|
/** Actually Chakra's colorScheme (a palette name like "red"), not a CSS text or icon color. */
|
|
16
23
|
color?: "primary" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "whiteAlpha" | "blackAlpha";
|
|
24
|
+
/** Inline style on the group wrapper, not on individual buttons. */
|
|
17
25
|
buttonGroupStyle?: React.CSSProperties;
|
|
26
|
+
/** Inline style on the left icon button. */
|
|
18
27
|
buttonGroupLeftIconStyle?: React.CSSProperties;
|
|
28
|
+
/** Inline style on the right icon button, or the dropdown trigger when `rightIconDropdown` is set. */
|
|
19
29
|
buttonGroupRightIconStyle?: React.CSSProperties;
|
|
30
|
+
/** Inline style on the centre text button. */
|
|
20
31
|
buttonStyle?: React.CSSProperties;
|
|
32
|
+
/** Fires when the left icon button loses focus. */
|
|
21
33
|
onBlurLeftIcon?: () => void;
|
|
34
|
+
/** Fires when the right icon button loses focus. */
|
|
22
35
|
onBlurRightIcon?: () => void;
|
|
23
36
|
/** Rendered only when BOTH rightIcon and rightIconDropdown are also set — otherwise silently unused. */
|
|
24
37
|
dropdownOptions?: {
|
|
@@ -26,16 +39,22 @@ export type ButtonGroupIconProps = {
|
|
|
26
39
|
id: string | number;
|
|
27
40
|
image?: ReactElement | undefined;
|
|
28
41
|
}[];
|
|
42
|
+
/** Fires when a menu option is chosen, with the click event and the option; the menu closes first. */
|
|
29
43
|
onDropdownOptionClick?: (event: React.MouseEvent, option: {
|
|
30
44
|
label: string;
|
|
31
45
|
id: string | number;
|
|
32
46
|
}) => void;
|
|
33
47
|
/** Also requires rightIcon — without it, neither the dropdown nor a plain right icon button renders. */
|
|
34
48
|
rightIconDropdown?: boolean;
|
|
49
|
+
/** Inline style on the dropdown menu list; used only when the dropdown renders. */
|
|
35
50
|
menulistStyle?: React.CSSProperties;
|
|
51
|
+
/** Inline style on each dropdown item; used only when the dropdown renders. */
|
|
36
52
|
menuItemStyle?: React.CSSProperties;
|
|
53
|
+
/** Shows a spinner on the centre text button only; icon buttons have their own loading flags. */
|
|
37
54
|
isLoading?: boolean;
|
|
55
|
+
/** Draws a rule between dropdown items. Defaults to true; false gives inset, rounded items instead. */
|
|
38
56
|
divider?: boolean;
|
|
57
|
+
/** Shows a spinner on the left icon button. */
|
|
39
58
|
leftIconLoading?: boolean;
|
|
40
59
|
/** Capitalized "R" unlike leftIconLoading — same casing must match exactly, there is no rightIconLoading. */
|
|
41
60
|
RightIconLoading?: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { CalendarGridProps } from "./CalendarGridProps";
|
|
2
|
+
/** Controlled month, week or day grid that places date-granularity events as chips and spanning bars, with a toolbar and arrow-key navigation. */
|
|
2
3
|
declare const CalendarGrid: ({ view, date, events, onViewChange, onDateChange, onEventClick, renderDayCell, weekStartsOn, locale, isLoading, labels, }: CalendarGridProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default CalendarGrid;
|
|
@@ -78,6 +78,7 @@ const EventChip = ({ event, colors, surface, onEventClick, segment }) => {
|
|
|
78
78
|
};
|
|
79
79
|
return event.href ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "a", href: event.href, ...common, children: event.label })) : ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "button", type: "button", ...common, children: event.label }));
|
|
80
80
|
};
|
|
81
|
+
/** Controlled month, week or day grid that places date-granularity events as chips and spanning bars, with a toolbar and arrow-key navigation. */
|
|
81
82
|
const CalendarGrid = ({ view, date, events, onViewChange, onDateChange, onEventClick, renderDayCell, weekStartsOn = 0, locale, isLoading = false, labels, }) => {
|
|
82
83
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
83
84
|
const text = { ...DEFAULT_LABELS, ...labels };
|
|
@@ -4,11 +4,13 @@ import type { Tone } from "../../Theme/tokens/builders/tone";
|
|
|
4
4
|
export type CalendarGridView = "month" | "week" | "day";
|
|
5
5
|
/** A date-granularity event; time of day is ignored. */
|
|
6
6
|
export type CalendarEvent = {
|
|
7
|
+
/** Unique key; also the last tie-break when ordering events that start together. */
|
|
7
8
|
id: string;
|
|
8
9
|
/** First day covered; only the date part is read. */
|
|
9
10
|
start: Date;
|
|
10
11
|
/** Last day covered, inclusive. Omit for a single-day event; a value before `start` is swapped. */
|
|
11
12
|
end?: Date;
|
|
13
|
+
/** Chip text; also breaks ties when ordering events that start on the same day. */
|
|
12
14
|
label: string;
|
|
13
15
|
/** Status tint of the chip, same tones as Tag. Defaults to "neutral". */
|
|
14
16
|
tone?: Tone;
|
|
@@ -17,11 +19,17 @@ export type CalendarEvent = {
|
|
|
17
19
|
};
|
|
18
20
|
/** Visible text and accessible names; every key falls back to English. */
|
|
19
21
|
export type CalendarGridLabels = {
|
|
22
|
+
/** Toolbar button that moves the anchor to the current day. */
|
|
20
23
|
today: string;
|
|
24
|
+
/** Accessible name of the previous-period button. */
|
|
21
25
|
previous: string;
|
|
26
|
+
/** Accessible name of the next-period button. */
|
|
22
27
|
next: string;
|
|
28
|
+
/** View switcher entry for the month view. */
|
|
23
29
|
month: string;
|
|
30
|
+
/** View switcher entry for the week view. */
|
|
24
31
|
week: string;
|
|
32
|
+
/** View switcher entry for the day view. */
|
|
25
33
|
day: string;
|
|
26
34
|
/** Receives the number of hidden events, e.g. "+3 more". */
|
|
27
35
|
more: (count: number) => string;
|
|
@@ -32,9 +40,11 @@ export type CalendarGridLabels = {
|
|
|
32
40
|
};
|
|
33
41
|
/** Props for the month/week/day event grid; fully controlled through `view` and `date`. */
|
|
34
42
|
export interface CalendarGridProps {
|
|
43
|
+
/** Span shown: a month of weeks, one week or one day. */
|
|
35
44
|
view: CalendarGridView;
|
|
36
45
|
/** Anchor date: any day inside the month, week or day being shown. */
|
|
37
46
|
date: Date;
|
|
47
|
+
/** Events to place; multi-day events span cells and long days collapse into "+N more". */
|
|
38
48
|
events: CalendarEvent[];
|
|
39
49
|
/** Called by the toolbar's view switcher and by a cell's "+N more" button (with "day"). */
|
|
40
50
|
onViewChange?: (view: CalendarGridView) => void;
|
|
@@ -50,5 +60,6 @@ export interface CalendarGridProps {
|
|
|
50
60
|
locale?: string;
|
|
51
61
|
/** Keeps the grid's shape and swaps the events for skeleton bars; sets aria-busy. */
|
|
52
62
|
isLoading?: boolean;
|
|
63
|
+
/** Overrides the default English strings; unset keys keep their default. */
|
|
53
64
|
labels?: Partial<CalendarGridLabels>;
|
|
54
65
|
}
|
|
@@ -1,22 +1,35 @@
|
|
|
1
1
|
export type CalendarView = "month" | "week" | "day";
|
|
2
2
|
export type WeekStart = 0 | 1;
|
|
3
3
|
export type SpanEvent = {
|
|
4
|
+
/** Unique key of the event. */
|
|
4
5
|
id: string;
|
|
6
|
+
/** First day covered; time of day is ignored. */
|
|
5
7
|
start: Date;
|
|
8
|
+
/** Last day covered, inclusive; omit for a single-day event. */
|
|
6
9
|
end?: Date;
|
|
10
|
+
/** Event text, used as a sort tie-break when laying out lanes. */
|
|
7
11
|
label: string;
|
|
8
12
|
};
|
|
9
13
|
export type WeekSegment<E extends SpanEvent> = {
|
|
14
|
+
/** The event this bar draws. */
|
|
10
15
|
event: E;
|
|
16
|
+
/** First column the bar covers, clamped to the week. */
|
|
11
17
|
startCol: number;
|
|
18
|
+
/** Last column the bar covers, clamped to the week. */
|
|
12
19
|
endCol: number;
|
|
20
|
+
/** Row index of the bar; lanes at or past `maxLanes` are counted in `hiddenByCol`, not drawn. */
|
|
13
21
|
lane: number;
|
|
22
|
+
/** True when the event began in an earlier week. */
|
|
14
23
|
continuesBefore: boolean;
|
|
24
|
+
/** True when the event runs into a later week. */
|
|
15
25
|
continuesAfter: boolean;
|
|
16
26
|
};
|
|
17
27
|
export type WeekLayout<E extends SpanEvent> = {
|
|
28
|
+
/** Every bar for the week, including those in hidden lanes. */
|
|
18
29
|
segments: WeekSegment<E>[];
|
|
30
|
+
/** Number of lanes to draw, capped at `maxLanes`. */
|
|
19
31
|
visibleLanes: number;
|
|
32
|
+
/** Per column, how many events fall in lanes that are not drawn. */
|
|
20
33
|
hiddenByCol: number[];
|
|
21
34
|
};
|
|
22
35
|
export declare const startOfDay: (d: Date) => Date;
|
|
@@ -2,8 +2,11 @@ import { CardProps as ChakraCardProps, CardBodyProps, ResponsiveValue } from "@c
|
|
|
2
2
|
type CardColorScheme = "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink";
|
|
3
3
|
/** @deprecated Never rendered — Card draws no divider; parts are separated by theme padding. */
|
|
4
4
|
type DeadDividerProps = {
|
|
5
|
+
/** Ignored; Card draws no divider. */
|
|
5
6
|
dividercolor?: CardColorScheme;
|
|
7
|
+
/** Ignored; Card draws no divider. */
|
|
6
8
|
dividersize?: string;
|
|
9
|
+
/** Ignored; Card draws no divider. */
|
|
7
10
|
dividervariant?: "solid" | "dashed";
|
|
8
11
|
};
|
|
9
12
|
/** Padding steps: "none" flush, "2xs" 0.375rem, "xs" 0.75rem all round, "sm" / "md" / "lg" match `size`. */
|
|
@@ -14,6 +17,7 @@ export type CardProps = Omit<ChakraCardProps, "children" | "variant" | "size" |
|
|
|
14
17
|
header?: React.ReactNode;
|
|
15
18
|
/** Rendered in CardFooter only when truthy. */
|
|
16
19
|
footer?: React.ReactNode;
|
|
20
|
+
/** Body content, rendered inside the flex body wrapper. */
|
|
17
21
|
children: React.ReactNode;
|
|
18
22
|
/** "elevated" (default): borderless, lifted by `shadows.card`. "outline": 1px rule, no shadow, for tables and row lists. */
|
|
19
23
|
variant?: "elevated" | "outline" | "filled" | "unstyled";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { PaymentCardProps } from "./PaymentCardProps";
|
|
2
|
+
/** Subscription plan card with price, feature list and a call-to-action; badge and accent follow active, upgrade and popular state. */
|
|
2
3
|
declare const PaymentCard: ({ plan, isActive, isNextUpgrade, billingCycle, onSelect, onHover, buttonLoading, isLoading, isRenewal, }: PaymentCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default PaymentCard;
|
|
@@ -63,6 +63,7 @@ const getCardStyles = (isActive, isNextUpgrade, popular, theme) => {
|
|
|
63
63
|
colorScheme: "primary",
|
|
64
64
|
});
|
|
65
65
|
};
|
|
66
|
+
/** Subscription plan card with price, feature list and a call-to-action; badge and accent follow active, upgrade and popular state. */
|
|
66
67
|
const PaymentCard = ({ plan, isActive = false, isNextUpgrade = false, billingCycle, onSelect, onHover, buttonLoading, isLoading = false, isRenewal = false, }) => {
|
|
67
68
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
68
69
|
const { badgeText, badgeColor, buttonColor, buttonColor50, onButtonColor, iconInk, colorScheme } = getCardStyles(isActive, isNextUpgrade, !!plan.popular, theme);
|
|
@@ -1,33 +1,52 @@
|
|
|
1
1
|
/** Subscription/pricing-tier card — takes a `Plan` (billing cycle, features), not a physical product like ProductCard's `options`. */
|
|
2
2
|
export type PaymentCardProps = {
|
|
3
|
+
/** The plan to render. */
|
|
3
4
|
plan: Plan;
|
|
4
5
|
/** true hides the CTA button unless `isRenewal` is also true, no matter what `plan.buttonText` says. */
|
|
5
6
|
isActive?: boolean;
|
|
7
|
+
/** Adds an "Upgrade Your Plan" badge and primary outline; ignored when `isActive` is set. */
|
|
6
8
|
isNextUpgrade?: boolean;
|
|
9
|
+
/** Picks which of `plan.monthlyPrice` / `plan.yearlyPrice` is shown. */
|
|
7
10
|
billingCycle: "monthly" | "yearly";
|
|
11
|
+
/** Called with `plan.plan_id` when the CTA button is clicked. */
|
|
8
12
|
onSelect?: (planId: number) => void;
|
|
9
13
|
/** `type` is always "button" in practice — PaymentCard never wires hover on the outer card, only the CTA button. */
|
|
10
14
|
onHover?: (planId: number, type: "card" | "button", state: boolean) => void;
|
|
11
15
|
/** The plan_id whose button should spin, not a boolean — matched via `===` against each plan's plan_id. */
|
|
12
16
|
buttonLoading?: number;
|
|
17
|
+
/** Replaces the card content with skeletons. */
|
|
13
18
|
isLoading?: boolean;
|
|
19
|
+
/** Keeps the CTA button visible on the active plan. */
|
|
14
20
|
isRenewal?: boolean;
|
|
15
21
|
};
|
|
16
22
|
/** Plan data rendered by PaymentCard — `billing`/`tax` are pre-formatted display strings shown under the price, not derived from monthlyPrice/yearlyPrice. */
|
|
17
23
|
export type Plan = {
|
|
24
|
+
/** Identifier passed to `onSelect` / `onHover` and matched against `buttonLoading`. */
|
|
18
25
|
plan_id: number;
|
|
26
|
+
/** Plan title. */
|
|
19
27
|
name: string;
|
|
28
|
+
/** Muted line under the price. */
|
|
20
29
|
description: string;
|
|
30
|
+
/** Price in rupees shown for the monthly cycle; the price block is hidden when both prices are 0. */
|
|
21
31
|
monthlyPrice: number;
|
|
32
|
+
/** Price in rupees shown for the yearly cycle; the price block is hidden when both prices are 0. */
|
|
22
33
|
yearlyPrice: number;
|
|
34
|
+
/** Display string beside the price, e.g. "/month". */
|
|
23
35
|
billing: string;
|
|
36
|
+
/** Display string under `billing`, e.g. "+ GST". */
|
|
24
37
|
tax: string;
|
|
38
|
+
/** Check-marked feature list, one row per entry. */
|
|
25
39
|
features: string[];
|
|
40
|
+
/** Icon rendered in the tinted tile above the name. */
|
|
26
41
|
icon: React.ReactNode;
|
|
42
|
+
/** CTA label; with no text the button is hidden unless `isRenewal`. */
|
|
27
43
|
buttonText: string;
|
|
28
44
|
/** "link" still gets the same filled bg/color override as "solid" — only "outline" is excluded from it. */
|
|
29
45
|
buttonVariant: "solid" | "outline" | "link";
|
|
46
|
+
/** Adds a "Most Popular" badge and scales the card up slightly; lower priority than active and upgrade badges. */
|
|
30
47
|
popular?: boolean;
|
|
48
|
+
/** CTA text while this plan's button is loading. */
|
|
31
49
|
buttonLoadingText?: string;
|
|
50
|
+
/** Success-coloured line under the price, e.g. a discount note. */
|
|
32
51
|
priceDescription?: string;
|
|
33
52
|
};
|
|
@@ -3,7 +3,9 @@ import type { OptionAxis, PriceFormat, StockState, VariantSelection } from "../C
|
|
|
3
3
|
export type CartItemLayout = "row" | "compact";
|
|
4
4
|
/** Every visible string; override for another language. */
|
|
5
5
|
export interface CartItemLabels {
|
|
6
|
+
/** Text and accessible name of the move-to-wishlist action; default "Move to wishlist". */
|
|
6
7
|
moveToWishlist: string;
|
|
8
|
+
/** Text and accessible name of the remove action; default "Remove". */
|
|
7
9
|
remove: string;
|
|
8
10
|
/** Shown instead of the price when `unavailable`. */
|
|
9
11
|
outOfStock: string;
|
|
@@ -18,7 +20,9 @@ export interface CartItemLabels {
|
|
|
18
20
|
}
|
|
19
21
|
/** One bag line: thumbnail, title, chosen options, line total, quantity and actions. Totals are computed here, so pass unit prices. */
|
|
20
22
|
export interface CartItemProps extends PriceFormat {
|
|
23
|
+
/** Product name, clamped to two lines; also names the quantity stepper and action buttons for screen readers. */
|
|
21
24
|
title: string;
|
|
25
|
+
/** Muted single line above the title. */
|
|
22
26
|
brand?: string;
|
|
23
27
|
/** Makes the title a link to the product page. */
|
|
24
28
|
href?: string;
|
|
@@ -30,6 +34,7 @@ export interface CartItemProps extends PriceFormat {
|
|
|
30
34
|
imageAlt?: string;
|
|
31
35
|
/** With `selection`, builds the "Indigo Wash · M" line from the chosen option labels. */
|
|
32
36
|
axes?: OptionAxis[];
|
|
37
|
+
/** Chosen option per axis, read against `axes` to build the options line. */
|
|
33
38
|
selection?: VariantSelection;
|
|
34
39
|
/** Replaces the line built from `axes` and `selection`. */
|
|
35
40
|
optionsSummary?: string;
|
|
@@ -37,12 +42,15 @@ export interface CartItemProps extends PriceFormat {
|
|
|
37
42
|
price: number;
|
|
38
43
|
/** List price of one unit; the strike only shows when it is above `price`. */
|
|
39
44
|
mrp?: number;
|
|
45
|
+
/** Units on this line; the line total is `price * quantity`. Controlled: update it from `onQuantityChange`. */
|
|
40
46
|
quantity: number;
|
|
47
|
+
/** Called with the new quantity when the stepper changes it; never fires in the compact layout, which has no stepper. */
|
|
41
48
|
onQuantityChange?: (quantity: number) => void;
|
|
42
49
|
/** Lowest quantity; at this value the minus becomes a trash button when `onRemove` is set. */
|
|
43
50
|
minQuantity?: number;
|
|
44
51
|
/** Highest quantity, usually the stock on hand. */
|
|
45
52
|
maxQuantity?: number;
|
|
53
|
+
/** Adds the Remove action (row layout) and turns the stepper's minus into a trash at `minQuantity`. */
|
|
46
54
|
onRemove?: () => void;
|
|
47
55
|
/** Adds the "Move to wishlist" action. */
|
|
48
56
|
onMoveToWishlist?: () => void;
|
|
@@ -56,9 +64,11 @@ export interface CartItemProps extends PriceFormat {
|
|
|
56
64
|
deliveryBy?: string;
|
|
57
65
|
/** Dims the image, drops price and stepper and keeps only Remove. */
|
|
58
66
|
unavailable?: boolean;
|
|
67
|
+
/** "row" or "compact"; default "row". */
|
|
59
68
|
layout?: CartItemLayout;
|
|
60
69
|
/** Skeleton of the same shape; actions are not rendered. */
|
|
61
70
|
isLoading?: boolean;
|
|
71
|
+
/** Per-string copy overrides; unset keys keep the English defaults. */
|
|
62
72
|
labels?: Partial<CartItemLabels>;
|
|
63
73
|
"data-testid"?: string;
|
|
64
74
|
}
|
|
@@ -21,6 +21,7 @@ export type CheckboxProps = Pick<ChakraButtonProps, "spacing" | "isInvalid" | "s
|
|
|
21
21
|
size?: "sm" | "md" | "lg";
|
|
22
22
|
/** Sets `isInvalid` (error border + aria-invalid) and shows `errorMessage` in place of `helperText`, linked via aria-describedby. */
|
|
23
23
|
error?: boolean;
|
|
24
|
+
/** Shown in place of `helperText` while `error` is true, linked via aria-describedby. */
|
|
24
25
|
errorMessage?: string;
|
|
25
26
|
/** Hidden while `error` is true. */
|
|
26
27
|
helperText?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { ChoiceCardProps } from "./ChoiceCardProps";
|
|
2
|
+
/** Selectable radio card with a label, optional description and icon; must sit inside a `ChoiceCardGroup`. */
|
|
2
3
|
declare const ChoiceCard: ({ value, label, description, icon, disabled: disabledProp, isDisabled, "data-testid": testId }: ChoiceCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default ChoiceCard;
|
|
@@ -5,6 +5,7 @@ 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
|
+
/** Selectable radio card with a label, optional description and icon; must sit inside a `ChoiceCardGroup`. */
|
|
8
9
|
const ChoiceCard = ({ value, label, description, icon, disabled: disabledProp = false, isDisabled = false, "data-testid": testId }) => {
|
|
9
10
|
const disabled = disabledProp || isDisabled;
|
|
10
11
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { ChoiceCardGroupProps } from "./ChoiceCardProps";
|
|
2
|
+
/** Radiogroup that lays out `ChoiceCard`s in one or more columns and manages the single selection. */
|
|
2
3
|
declare const ChoiceCardGroup: (props: ChoiceCardGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default ChoiceCardGroup;
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const selectable_1 = require("../CheckoutKit/selectable");
|
|
5
|
+
/** Radiogroup that lays out `ChoiceCard`s in one or more columns and manages the single selection. */
|
|
5
6
|
const ChoiceCardGroup = (props) => (0, jsx_runtime_1.jsx)(selectable_1.SelectableGroup, { ...props });
|
|
6
7
|
exports.default = ChoiceCardGroup;
|
|
@@ -17,9 +17,11 @@ export interface ChoiceCardProps {
|
|
|
17
17
|
}
|
|
18
18
|
/** Radiogroup of `ChoiceCard`s: one tab stop; arrows, Home and End move focus and selection together. */
|
|
19
19
|
export interface ChoiceCardGroupProps {
|
|
20
|
+
/** Selected card's `value`; passing it makes the group controlled. */
|
|
20
21
|
value?: string;
|
|
21
22
|
/** Seeds an uncontrolled selection; ignored once `value` is passed. */
|
|
22
23
|
defaultValue?: string;
|
|
24
|
+
/** Called with the newly chosen card's `value`, only when the selection actually changes. */
|
|
23
25
|
onValueChange?: (value: string) => void;
|
|
24
26
|
/** Cards per row; `1` (default) stacks them in a column, more lays them out in an equal-width grid. */
|
|
25
27
|
columns?: number;
|
|
@@ -29,6 +31,7 @@ export interface ChoiceCardGroupProps {
|
|
|
29
31
|
children: ReactNode;
|
|
30
32
|
/** Name the group with this or `aria-labelledby`. */
|
|
31
33
|
"aria-label"?: string;
|
|
34
|
+
/** Id of an element that names the group; use instead of `aria-label`. */
|
|
32
35
|
"aria-labelledby"?: string;
|
|
33
36
|
"data-testid"?: string;
|
|
34
37
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ConfirmDialogProps } from "./ConfirmDialogProps";
|
|
3
|
+
/** Cancel/Confirm modal for destructive prompts; focus starts on Cancel and Confirm never closes the dialog itself. */
|
|
3
4
|
declare const ConfirmDialog: React.FC<ConfirmDialogProps>;
|
|
4
5
|
export default ConfirmDialog;
|
|
@@ -12,6 +12,7 @@ const surfaceRaised_1 = require("../../Theme/tokens/builders/surfaceRaised");
|
|
|
12
12
|
const tone_1 = require("../../Theme/tokens/builders/tone");
|
|
13
13
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
14
14
|
const TextInput_1 = __importDefault(require("../Input/TextInput"));
|
|
15
|
+
/** Cancel/Confirm modal for destructive prompts; focus starts on Cancel and Confirm never closes the dialog itself. */
|
|
15
16
|
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, }) => {
|
|
16
17
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
17
18
|
const cancelRef = (0, react_1.useRef)(null);
|
|
@@ -5,12 +5,15 @@ export interface ConfirmDialogAlternative {
|
|
|
5
5
|
label: string;
|
|
6
6
|
/** What choosing it keeps, shown in a hint box above the buttons. */
|
|
7
7
|
description?: ReactNode;
|
|
8
|
+
/** Fires when the alternative button is clicked; does not close the dialog. */
|
|
8
9
|
onSelect: () => void;
|
|
9
10
|
/** Spinner on the alternative; Cancel and Confirm are disabled meanwhile. */
|
|
10
11
|
isLoading?: boolean;
|
|
11
12
|
}
|
|
12
13
|
interface ConfirmDialogBaseProps {
|
|
14
|
+
/** Controlled visibility; the dialog never opens or closes itself. */
|
|
13
15
|
isOpen: boolean;
|
|
16
|
+
/** Fires on Cancel, the close button, Esc and overlay click; the caller must then set `isOpen` to false. */
|
|
14
17
|
onClose: () => void;
|
|
15
18
|
/** Fires on Confirm click; does not close the dialog — call onClose yourself. */
|
|
16
19
|
onConfirm: () => void;
|
|
@@ -60,7 +63,9 @@ interface ConfirmDialogBaseProps {
|
|
|
60
63
|
focusCancelOnOpen?: boolean;
|
|
61
64
|
/** Defaults to true. */
|
|
62
65
|
isCentered?: boolean;
|
|
66
|
+
/** Whether Esc closes the dialog; unset keeps Chakra's default (true). */
|
|
63
67
|
closeOnEsc?: boolean;
|
|
68
|
+
/** Whether clicking the overlay closes the dialog; unset keeps Chakra's default (true). */
|
|
64
69
|
closeOnOverlayClick?: boolean;
|
|
65
70
|
}
|
|
66
71
|
/** Reusable Cancel/Confirm modal for delete/deactivate-style prompts; pass `title`, or `entityName` to get a title and a consequence body. */
|
|
@@ -2,13 +2,21 @@ import { SystemStyleObject } from "@chakra-ui/react";
|
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
/** The built-in fields plus any customValues, sent to onSubmit and/or POSTed to apiKey. */
|
|
4
4
|
export type ContactFormPayload = {
|
|
5
|
+
/** Built by the form as `firstName` and `lastName` joined by a space. */
|
|
5
6
|
name: string;
|
|
7
|
+
/** Required field. */
|
|
6
8
|
firstName: string;
|
|
9
|
+
/** Optional; an empty string when left blank. */
|
|
7
10
|
lastName: string;
|
|
11
|
+
/** Optional; checked for address format when filled, otherwise an empty string. */
|
|
8
12
|
email: string;
|
|
13
|
+
/** Required, digits only, 7-15 long; validated before submit. */
|
|
9
14
|
phone: string;
|
|
15
|
+
/** Text of the Enquiry field; may be empty. */
|
|
10
16
|
message: string;
|
|
17
|
+
/** Copied from the `customerId` prop; `getCustomValues` cannot override it. */
|
|
11
18
|
customerId: string | number;
|
|
19
|
+
/** Copied from the `organizationId` prop; `getCustomValues` cannot override it. */
|
|
12
20
|
organizationId: string | number;
|
|
13
21
|
[key: string]: unknown;
|
|
14
22
|
};
|
|
@@ -18,13 +26,18 @@ export interface ContactFormProps {
|
|
|
18
26
|
apiKey?: string;
|
|
19
27
|
/** Called with the submitted payload before/instead of the apiKey fetch; awaited if it returns a promise. */
|
|
20
28
|
onSubmit?: (payload: ContactFormPayload) => void | Promise<void>;
|
|
29
|
+
/** Sent unchanged in every payload to identify the customer; not shown in the form. */
|
|
21
30
|
customerId: string | number;
|
|
31
|
+
/** Sent unchanged in every payload to identify the organization; not shown in the form. */
|
|
22
32
|
organizationId: string | number;
|
|
33
|
+
/** Disables the submit button and blocks submission; fields stay editable. Defaults to false. */
|
|
23
34
|
isDisabled?: boolean;
|
|
24
35
|
/** Rendered markup only — its values are never read automatically; pair with getCustomValues or they're dropped from the submitted payload. */
|
|
25
36
|
customFields?: ReactNode;
|
|
26
37
|
/** Return value spreads into the payload after the built-in fields — a key like "email" silently overwrites the typed value; customerId/organizationId can't be overridden this way. */
|
|
27
38
|
getCustomValues?: () => Record<string, unknown>;
|
|
39
|
+
/** Colour scheme of the Send Message button. Defaults to "primary". */
|
|
28
40
|
buttonColorScheme?: "primary" | "blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow" | "secondary" | "tertiary" | undefined;
|
|
41
|
+
/** Chakra style object applied to the Send Message button. */
|
|
29
42
|
buttonSx?: SystemStyleObject;
|
|
30
43
|
}
|