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
|
@@ -3,11 +3,15 @@ import { ModalContentProps, ModalProps, ModalHeaderProps, ModalBodyProps, ModalF
|
|
|
3
3
|
export type ChakraModelProps = Pick<ModalProps, "isOpen" | "onClose" | "finalFocusRef" | "blockScrollOnMount" | "initialFocusRef" | "closeOnOverlayClick" | "closeOnEsc" | "trapFocus" | "isCentered" | "motionPreset" | "scrollBehavior"> & {
|
|
4
4
|
/** Overrides the theme scrim colour on ModalOverlay. */
|
|
5
5
|
overlaybg?: string;
|
|
6
|
+
/** Chakra `backdropFilter` value applied to the scrim, e.g. `blur(4px)`. */
|
|
6
7
|
overlaybackdropFilter?: string;
|
|
8
|
+
/** Chakra `backdropInvert` value applied to the scrim, e.g. `80%`. */
|
|
7
9
|
overlaybackdropInvert?: string;
|
|
10
|
+
/** Chakra `backdropBlur` value applied to the scrim, e.g. `4px` or `sm`. */
|
|
8
11
|
overlaybackdropBlur?: string;
|
|
12
|
+
/** Dialog width from `xs` to `6xl`; `full` fills the viewport. Required. */
|
|
9
13
|
size: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "full";
|
|
10
|
-
/** Only ModalHeader/ModalBody/ModalFooter render, matched by type
|
|
14
|
+
/** Only ModalHeader/ModalBody/ModalFooter render, matched by type through nested Fragments; any other child is dropped (dev console.warn) — use `portalChildren`. */
|
|
11
15
|
children?: React.ReactNode;
|
|
12
16
|
/** Spinner replaces body and footer; header and close button stay. */
|
|
13
17
|
isLoading?: boolean;
|
|
@@ -15,6 +19,7 @@ export type ChakraModelProps = Pick<ModalProps, "isOpen" | "onClose" | "finalFoc
|
|
|
15
19
|
title?: React.ReactNode;
|
|
16
20
|
/** Muted line under the header; renders a header even without `title`. */
|
|
17
21
|
subtitle?: React.ReactNode;
|
|
22
|
+
/** Hides the top-right close (X) button; Esc and overlay click still close unless disabled. */
|
|
18
23
|
hideCloseButton?: boolean;
|
|
19
24
|
/** Spread onto ModalContent last, so it overrides `aria-busy` and theme styles. */
|
|
20
25
|
contentProps?: ModalContentProps;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
/** One row in the MoreItems popover grid — id, label and an optional dot color. */
|
|
3
3
|
export interface MoreItem {
|
|
4
|
+
/** React key for the row; not shown or emitted. */
|
|
4
5
|
id: string | number;
|
|
6
|
+
/** Row text, truncated with an ellipsis when it overflows the column. */
|
|
5
7
|
label: string;
|
|
6
8
|
/** Optional leading dot color. Falls back to colorResolver or a neutral gray. */
|
|
7
9
|
color?: string;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { MultiSelectProps } from "./MultiSelectProps";
|
|
2
|
+
/** Email chip input: typed addresses are validated and committed on Enter, shown as removable chips. */
|
|
2
3
|
export default function MultiSelect({ value, onValueChange, width, label, isRequired, isInformation, informationMessage, name, id, placeholderText, isDisabled, isReadOnly, addOnBlur, size, inputStyle, helperText, error, errorMessage, }: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -25,6 +25,7 @@ const generateUniqueId = (() => {
|
|
|
25
25
|
return `${Date.now()}-${counter}`;
|
|
26
26
|
};
|
|
27
27
|
})();
|
|
28
|
+
/** Email chip input: typed addresses are validated and committed on Enter, shown as removable chips. */
|
|
28
29
|
function MultiSelect({ value, onValueChange, width = "100%", label = "label", isRequired = true, isInformation = false, informationMessage = "", name, id, placeholderText = "Type valid email and press enter", isDisabled, isReadOnly, addOnBlur = false, size = controlSizes_1.DEFAULT_CONTROL_SIZE, inputStyle, helperText, error, errorMessage, }) {
|
|
29
30
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
30
31
|
const s = (0, searchSelectSize_1.getSearchSelectSizeStyles)((size || controlSizes_1.DEFAULT_CONTROL_SIZE));
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
/** No `options` prop — typed text is validated as an email, not picked from a list; use `SearchSelect isMultiple`. */
|
|
2
2
|
export type MultiSelectProps = {
|
|
3
|
+
/** Controlled list of entered chips; the component never keeps its own copy. */
|
|
3
4
|
value: MultiSelectOption[];
|
|
5
|
+
/** Fires with the full new list when an email is added, a chip is removed, or Backspace on empty input drops the last chip. */
|
|
4
6
|
onValueChange: (options: MultiSelectOption[]) => void;
|
|
7
|
+
/** CSS width of the whole field; defaults to "100%". */
|
|
5
8
|
width?: string;
|
|
9
|
+
/** Label text above the field; defaults to the literal "label", and an empty string hides the label. */
|
|
6
10
|
label?: string;
|
|
7
11
|
/** DOM id of the input; the label's `for` and the message ids derive from it. Auto-generated when omitted. */
|
|
8
12
|
id?: string;
|
|
13
|
+
/** Native `name` of the text input. */
|
|
9
14
|
name?: string;
|
|
10
15
|
/** Sets native `required` + `aria-required` on the field, and draws the label asterisk. Defaults to true. */
|
|
11
16
|
isRequired?: boolean;
|
|
17
|
+
/** Shows an info icon beside the label; renders nothing unless `informationMessage` is also set. */
|
|
12
18
|
isInformation?: boolean;
|
|
19
|
+
/** Tooltip text of the label's info icon; only read when `isInformation` is true. */
|
|
13
20
|
informationMessage?: string;
|
|
21
|
+
/** Placeholder of the text input, shown only while no chips exist; defaults to "Type valid email and press enter". */
|
|
14
22
|
placeholderText?: string;
|
|
23
|
+
/** Disables the text input and applies the disabled field styling. */
|
|
15
24
|
isDisabled?: boolean;
|
|
25
|
+
/** Makes the text input read-only and stops `addOnBlur` from committing; chips can still be removed. */
|
|
16
26
|
isReadOnly?: boolean;
|
|
17
27
|
/** Also commits the typed email when the field loses focus, not just on Enter. Defaults to false. */
|
|
18
28
|
addOnBlur?: boolean;
|
|
@@ -20,6 +30,7 @@ export type MultiSelectProps = {
|
|
|
20
30
|
error?: boolean;
|
|
21
31
|
/** Height on the field control scale (xs 32 · sm 38 · md 40 · lg 48px). Defaults to `sm`. */
|
|
22
32
|
size?: "xs" | "sm" | "md" | "lg";
|
|
33
|
+
/** Inline style merged over the text input's own style (after a transparent background), not the outer field. */
|
|
23
34
|
inputStyle?: object;
|
|
24
35
|
/** Rendered only while `error` is true; a rejected email's internal "Invalid email address" text wins over this until the input changes. */
|
|
25
36
|
errorMessage?: string;
|
|
@@ -28,7 +39,9 @@ export type MultiSelectProps = {
|
|
|
28
39
|
};
|
|
29
40
|
/** One entered chip — id is a generated key, label is the email text the user typed. */
|
|
30
41
|
export type MultiSelectOption = {
|
|
42
|
+
/** Generated unique key for the chip; not derived from the email. */
|
|
31
43
|
id: string;
|
|
44
|
+
/** The email address as typed; duplicates are rejected by comparing this. */
|
|
32
45
|
label: string;
|
|
33
46
|
};
|
|
34
47
|
/** @deprecated Typo'd name — use `MultiSelectOption`. */
|
|
@@ -63,6 +63,7 @@ const LauncherTabs_1 = require("./LauncherTabs");
|
|
|
63
63
|
const match_1 = require("./match");
|
|
64
64
|
const NewTabLink_1 = __importDefault(require("./NewTabLink"));
|
|
65
65
|
const PinToggle_1 = __importDefault(require("./PinToggle"));
|
|
66
|
+
const launcherMotion_1 = require("./launcherMotion");
|
|
66
67
|
const resultNavigation_1 = require("./resultNavigation");
|
|
67
68
|
const ScopeBar_1 = require("./ScopeBar");
|
|
68
69
|
const searchLayout_1 = require("./searchLayout");
|
|
@@ -243,6 +244,7 @@ function NavLauncher({ isOpen, onClose, sections: rawSections, pinnedIds, freque
|
|
|
243
244
|
const isDesktop = (0, useMatchMedia_1.useMatchMedia)(MD_QUERY, true);
|
|
244
245
|
const isLg = (0, useMatchMedia_1.useMatchMedia)(LG_QUERY, true);
|
|
245
246
|
const isWide = (0, useMatchMedia_1.useMatchMedia)(XL_QUERY, false);
|
|
247
|
+
const isReducedMotion = (0, motion_1.usePrefersReducedMotion)();
|
|
246
248
|
const columns = isWide ? 3 : isDesktop ? 2 : 1;
|
|
247
249
|
const [innerQuery, setInnerQuery] = (0, react_2.useState)("");
|
|
248
250
|
const [activeIndex, setActiveIndex] = (0, react_2.useState)(0);
|
|
@@ -828,6 +830,7 @@ function NavLauncher({ isOpen, onClose, sections: rawSections, pinnedIds, freque
|
|
|
828
830
|
borderBottomRightRadius: { base: 0, lg: "16px" },
|
|
829
831
|
boxShadow: colors.boxShadow.default,
|
|
830
832
|
overflow: "hidden",
|
|
833
|
+
motionProps: (0, launcherMotion_1.launcherSlide)(isReducedMotion),
|
|
831
834
|
onKeyDown: onContentKeyDown,
|
|
832
835
|
...{ "data-testid": testId },
|
|
833
836
|
}, children: [(0, jsx_runtime_1.jsxs)(Drawer_1.DrawerHeader, { p: 0, flexShrink: 0, children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { "data-testid": "launcher-header-row", align: "center", gap: { base: "8px", md: "12px" }, minH: { base: "60px", md: "68px" }, pl: { base: "12px", md: "18px" }, pr: { base: "8px", md: "12px" }, children: [(0, jsx_runtime_1.jsx)(react_1.VisuallyHidden, { as: "h2", id: titleId, children: labels.title }), (0, jsx_runtime_1.jsx)(SearchField, { inputRef: inputRef, value: query, onChange: setQuery, onKeyDown: onInputKeyDown, labels: labels, placeholder: (_c = currentScope === null || currentScope === void 0 ? void 0 : currentScope.placeholder) !== null && _c !== void 0 ? _c : labels.searchPlaceholder, hint: searchHint, listboxId: listboxId, activeId: isListView && hasResults ? optionId(active) : undefined, isExpanded: isListView, hasResults: hasResults, minW: inlineScopes ? FIELD_MIN_WIDTH : 0 }), inlineScopes, (0, jsx_runtime_1.jsx)(react_1.Box, { "aria-hidden": true, "data-testid": "launcher-count", display: { base: "none", sm: "block" }, flexShrink: 0, overflow: "hidden", w: countText ? "88px" : "0", opacity: countText ? 1 : 0, textAlign: "right", fontSize: "13px", whiteSpace: "nowrap", color: colors.textMuted, transition: (0, motion_2.transitionFor)(["width", "opacity"]), sx: { fontVariantNumeric: "tabular-nums", ...(0, motion_1.reducedMotionSx)() }, children: countText }), headerActions ? ((0, jsx_runtime_1.jsx)(react_1.Flex, { align: "center", gap: "4px", flexShrink: 0, children: headerActions })) : null, (0, jsx_runtime_1.jsx)(react_1.IconButton, { "aria-label": labels.close, icon: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 18, "aria-hidden": true }), variant: "ghost", boxSize: { base: "40px", md: "44px" }, minW: { base: "40px", md: "44px" }, borderRadius: "10px", flexShrink: 0, color: colors.textMuted, onClick: onClose })] }), scopeRow ? ((0, jsx_runtime_1.jsx)(react_1.Box, { "data-testid": "launcher-scope-row", pl: "7px", pr: "3px", mt: "-6px", pb: "4px", children: scopeRow })) : null] }), (0, jsx_runtime_1.jsx)(Drawer_1.DrawerBody, { p: 0, display: "flex", flexDirection: "column", overflowY: "hidden", minH: 0, children: (0, jsx_runtime_1.jsxs)(react_1.Flex, { ref: bodyRef, direction: "column", flex: 1, minH: 0, minW: 0, children: [(0, jsx_runtime_1.jsx)(react_1.VisuallyHidden, { "data-testid": "launcher-live", "aria-live": "polite", "aria-atomic": "true", children: countText }), (0, jsx_runtime_1.jsx)(react_1.VisuallyHidden, { "data-testid": "launcher-announce", "aria-live": "polite", "aria-atomic": "true", children: (0, jsx_runtime_1.jsx)("span", { children: announcement.text }, announcement.n) }), isTabbed ? ((0, jsx_runtime_1.jsx)(LauncherTabs_1.LauncherTabs, { tabs: tabs, selected: activeTab, onSelect: setTab, idBase: baseId, label: labels.tabsLabel, onLeaveUp: () => focusField(), onLeaveDown: () => moveFocus("first") })) : null, isLg ? ((0, jsx_runtime_1.jsx)(react_1.Flex, { direction: "row", flex: 1, minH: 0, minW: 0, children: body })) : (compactBody), dock] }) }), (0, jsx_runtime_1.jsxs)(Drawer_1.DrawerFooter, { p: 0, minH: "32px", flexShrink: 0, px: "18px", py: "6px", gap: "6px 14px", flexWrap: "wrap", bg: colors.backgroundColor.subtle, fontSize: "xs-minus", color: colors.textMuted, whiteSpace: "nowrap", justifyContent: "flex-start", children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { display: { base: "none", md: "flex" }, gap: "6px 14px", align: "center", wrap: "wrap", "aria-hidden": true, sx: { "@media (hover: none)": { display: "none" } }, children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", gap: "5px", children: [(0, jsx_runtime_1.jsx)(react_1.Flex, { as: "span", gap: "2px", children: ARROW_KEYS.map((arrow) => ((0, jsx_runtime_1.jsx)(Kbd_1.default, { size: "xs", children: arrow }, arrow))) }), labels.hintMove] }), (0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", gap: "5px", children: [(0, jsx_runtime_1.jsx)(Kbd_1.KbdShortcut, { shortcut: "enter", size: "xs" }), (0, jsx_runtime_1.jsx)(launcherParts_1.HintLabel, { text: enterLabel, reserve: enterReserve })] }), (0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", gap: "5px", opacity: canOpenInTab ? 1 : 0.45, transition: (0, motion_2.transitionFor)(["opacity"]), sx: (0, motion_1.reducedMotionSx)(), children: [modKeyLabel ? ((0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", gap: "4px", children: [(0, jsx_runtime_1.jsx)(Kbd_1.default, { size: "xs", children: modKeyLabel }), (0, jsx_runtime_1.jsx)(Kbd_1.default, { size: "xs", children: ENTER_KEY })] })) : ((0, jsx_runtime_1.jsx)(Kbd_1.KbdShortcut, { shortcut: "mod+enter", size: "xs" })), labels.hintNewTab] }), (0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", gap: "5px", display: { base: "none", lg: "flex" }, children: [(0, jsx_runtime_1.jsx)(Kbd_1.default, { size: "xs", children: modKeyLabel !== null && modKeyLabel !== void 0 ? modKeyLabel : MOD_KEY }), labels.hintClickNewTab] }), onTogglePin ? ((0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", gap: "5px", children: [(0, jsx_runtime_1.jsx)(Kbd_1.default, { size: "xs", children: "P" }), labels.hintPin] })) : null, (0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "span", align: "center", gap: "5px", children: [(0, jsx_runtime_1.jsx)(Kbd_1.KbdShortcut, { shortcut: "esc", size: "xs" }), labels.hintClose] })] }), (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", ml: "auto", children: labels.footerNote })] })] }) }));
|
|
@@ -5,59 +5,84 @@ import type { LauncherSynonyms } from "./engine";
|
|
|
5
5
|
export type LauncherIcon = ElementType;
|
|
6
6
|
/** One destination the launcher can open; screens are what pins, Frequent and Recent refer to. */
|
|
7
7
|
export type LauncherScreen = {
|
|
8
|
+
/** Unique across all sections; the id that pins, Frequent and Recent refer to. */
|
|
8
9
|
id: string;
|
|
10
|
+
/** Row text; also what search matches first. */
|
|
9
11
|
label: string;
|
|
12
|
+
/** Destination of the row's link; Enter passes it to `onNavigate`. */
|
|
10
13
|
href: string;
|
|
14
|
+
/** Row icon; falls back to the module's icon in search results. */
|
|
11
15
|
icon?: LauncherIcon;
|
|
16
|
+
/** Count or short text shown on the row. */
|
|
12
17
|
badge?: number | string;
|
|
18
|
+
/** Extra terms the query may match; never rendered. */
|
|
13
19
|
keywords?: readonly string[];
|
|
14
20
|
/** Listed on the module's second line (first `keyScreenLimit` of them). */
|
|
15
21
|
isKey?: boolean;
|
|
16
22
|
};
|
|
17
23
|
/** A group of screens shown as one row in the browse view. */
|
|
18
24
|
export type LauncherModule = {
|
|
25
|
+
/** Unique across sections. */
|
|
19
26
|
id: string;
|
|
27
|
+
/** Row title; also what search matches first. */
|
|
20
28
|
label: string;
|
|
21
29
|
/** Normally its first visible screen's href. */
|
|
22
30
|
href: string;
|
|
31
|
+
/** Icon beside the title. */
|
|
23
32
|
icon?: LauncherIcon;
|
|
33
|
+
/** Count or short text shown on the module row. */
|
|
24
34
|
badge?: number | string;
|
|
25
35
|
/** Shows a small "New" tag after the name. */
|
|
26
36
|
isNew?: boolean;
|
|
37
|
+
/** Extra terms the query may match; never rendered. */
|
|
27
38
|
keywords?: readonly string[];
|
|
28
39
|
/** Pinning the module pins `screens[0]`; a module with no screens is not rendered. */
|
|
29
40
|
screens: readonly LauncherScreen[];
|
|
30
41
|
};
|
|
31
42
|
/** A labelled run of modules; a section with no renderable module is dropped. */
|
|
32
43
|
export type LauncherSection = {
|
|
44
|
+
/** Unique key of the section. */
|
|
33
45
|
id: string;
|
|
46
|
+
/** Section heading. */
|
|
34
47
|
label: string;
|
|
48
|
+
/** Modules in display order; modules with no screens are skipped. */
|
|
35
49
|
modules: readonly LauncherModule[];
|
|
36
50
|
};
|
|
37
51
|
/** One label/value pair of a result, e.g. PAN: ABCDE1234F; plain text only, never HTML. */
|
|
38
52
|
export type LauncherFact = {
|
|
53
|
+
/** Name shown before the value, e.g. "PAN". */
|
|
39
54
|
label: string;
|
|
55
|
+
/** Text shown, and copied when `copyable`. */
|
|
40
56
|
value: string;
|
|
41
57
|
/** Adds a Copy button; a blocked clipboard selects the value instead. */
|
|
42
58
|
copyable?: boolean;
|
|
43
59
|
};
|
|
44
60
|
/** Direct-answer payload, e.g. label "Next holiday", value "24 Oct — Diwali". */
|
|
45
61
|
export type LauncherAnswer = {
|
|
62
|
+
/** Heading of the answer card. */
|
|
46
63
|
label: string;
|
|
64
|
+
/** The answer itself, shown large; plain text. */
|
|
47
65
|
value: string;
|
|
66
|
+
/** Small line under the value. */
|
|
48
67
|
hint?: string;
|
|
49
68
|
};
|
|
50
69
|
/** A search row that is not a screen: an action (`run`) or an entity result (`href`). */
|
|
51
70
|
export type LauncherSearchItem = {
|
|
71
|
+
/** Unique within its list; prefixed internally with the group or "action". */
|
|
52
72
|
id: string;
|
|
73
|
+
/** Row text; also what search matches first. */
|
|
53
74
|
label: string;
|
|
54
75
|
/** Second line, e.g. the module a result belongs to. */
|
|
55
76
|
context?: string;
|
|
77
|
+
/** Row icon. */
|
|
56
78
|
icon?: LauncherIcon;
|
|
57
79
|
/** Extra terms the query may match; never rendered. Separate phrases with commas. */
|
|
58
80
|
keywords?: string;
|
|
81
|
+
/** Short text appended to `context` on the second line, separated by a dot. */
|
|
59
82
|
hint?: string;
|
|
83
|
+
/** Destination of an entity result; Enter passes it to `onNavigate`. */
|
|
60
84
|
href?: string;
|
|
85
|
+
/** Action to perform; the launcher closes first, then calls it. */
|
|
61
86
|
run?: () => void;
|
|
62
87
|
/** Shown in the Preview pane for the active result; searchable in spotlight. */
|
|
63
88
|
facts?: readonly LauncherFact[];
|
|
@@ -66,8 +91,11 @@ export type LauncherSearchItem = {
|
|
|
66
91
|
};
|
|
67
92
|
/** A titled batch of remote results, rendered after Screens in the order given. */
|
|
68
93
|
export type LauncherResultGroup = {
|
|
94
|
+
/** Unique key of the group; also its default scope id. */
|
|
69
95
|
id: string;
|
|
96
|
+
/** Group heading. */
|
|
70
97
|
label: string;
|
|
98
|
+
/** Results in display order. */
|
|
71
99
|
items: readonly LauncherSearchItem[];
|
|
72
100
|
/** Scope chip this group belongs to; defaults to `id`. */
|
|
73
101
|
scope?: string;
|
|
@@ -76,7 +104,9 @@ export type LauncherResultGroup = {
|
|
|
76
104
|
};
|
|
77
105
|
/** A filter chip; "screens" and "actions" are built in, others match `LauncherResultGroup.scope`. */
|
|
78
106
|
export type LauncherScope = {
|
|
107
|
+
/** "all", "screens", "actions" or a `LauncherResultGroup.scope`. */
|
|
79
108
|
id: string;
|
|
109
|
+
/** Chip text. */
|
|
80
110
|
label: string;
|
|
81
111
|
/** Field placeholder while this chip is selected, e.g. "Search legal name, PAN, GSTIN…"; the field's accessible name stays `labels.searchPlaceholder`. */
|
|
82
112
|
placeholder?: string;
|
|
@@ -87,20 +117,35 @@ export type LauncherSearchMode = "classic" | "spotlight";
|
|
|
87
117
|
export type LauncherLabels = {
|
|
88
118
|
/** Accessible name of the dialog and the results list; no longer drawn as a header pill. */
|
|
89
119
|
title: string;
|
|
120
|
+
/** Search field placeholder and accessible name. */
|
|
90
121
|
searchPlaceholder: string;
|
|
122
|
+
/** Accessible name of the clear-query button. */
|
|
91
123
|
clearSearch: string;
|
|
124
|
+
/** Accessible name of the close button. */
|
|
92
125
|
close: string;
|
|
126
|
+
/** Heading of the Pinned section. */
|
|
93
127
|
pinned: string;
|
|
128
|
+
/** Message shown in Pinned when nothing is pinned. */
|
|
94
129
|
pinnedEmpty: string;
|
|
130
|
+
/** Heading of the Frequently visited section. */
|
|
95
131
|
frequent: string;
|
|
132
|
+
/** Heading of the Recent section. */
|
|
96
133
|
recent: string;
|
|
134
|
+
/** Name for a Screens result group; NavLauncher does not read it, hosts pass it as `screensLabel` to `searchLauncher`. */
|
|
97
135
|
screensGroup: string;
|
|
136
|
+
/** Name of the group holding matching `actions` in search results. */
|
|
98
137
|
actionsGroup: string;
|
|
138
|
+
/** Accessible name of a pin button for the named screen, e.g. "Pin Leave". */
|
|
99
139
|
pin: (label: string) => string;
|
|
140
|
+
/** Accessible name of an unpin button for the named screen. */
|
|
100
141
|
unpin: (label: string) => string;
|
|
142
|
+
/** Accessible name of the new-tab arrow beside the named row. */
|
|
101
143
|
openInNewTab: (label: string) => string;
|
|
144
|
+
/** Heading of the empty state for the given query. */
|
|
102
145
|
noResults: (query: string) => string;
|
|
146
|
+
/** Line under the empty-state heading when no `suggestions` are given. */
|
|
103
147
|
noResultsHint: string;
|
|
148
|
+
/** Empty-state heading while `isSearching` and nothing local matched. */
|
|
104
149
|
searching: string;
|
|
105
150
|
/** Accessible name of the skeleton region while `isLoading`. */
|
|
106
151
|
loading: string;
|
|
@@ -187,17 +232,22 @@ export type LauncherLabels = {
|
|
|
187
232
|
};
|
|
188
233
|
/** Passed to `onNavigate`; `newTab` is true for mod+Enter. */
|
|
189
234
|
export type LauncherNavigateOptions = {
|
|
235
|
+
/** True when the open was requested in a new tab (mod+Enter). */
|
|
190
236
|
newTab: boolean;
|
|
191
237
|
};
|
|
192
238
|
/** Full-height navigation launcher: browse every screen, search, pins, Frequent, Recent and optionally the suite's apps. */
|
|
193
239
|
export interface NavLauncherProps {
|
|
240
|
+
/** Shows the launcher; the query resets when it closes. */
|
|
194
241
|
isOpen: boolean;
|
|
242
|
+
/** Called on Escape with an empty query, the close button, a plain-click navigation, `run` and app selection. */
|
|
195
243
|
onClose: () => void;
|
|
196
244
|
/** Already permission-filtered by the app. Empty sections/modules are dropped, never rendered as gaps. */
|
|
197
245
|
sections: readonly LauncherSection[];
|
|
198
246
|
/** Screen ids in display order; ids not in `sections` are ignored silently. */
|
|
199
247
|
pinnedIds: readonly string[];
|
|
248
|
+
/** Screen ids in display order; pinned ids are skipped and the list is cut at `frequentLimit`. */
|
|
200
249
|
frequentIds: readonly string[];
|
|
250
|
+
/** Screen ids in display order; ids not in `sections` are ignored silently. */
|
|
201
251
|
recentIds: readonly string[];
|
|
202
252
|
/** Omit to hide every pin toggle (read-only launcher). */
|
|
203
253
|
onTogglePin?: (screenId: string) => void;
|
|
@@ -205,6 +255,7 @@ export interface NavLauncherProps {
|
|
|
205
255
|
onNavigate: (href: string, options: LauncherNavigateOptions) => void;
|
|
206
256
|
/** Anchor-like component receiving `href`, `target`, `rel`, `onClick`, `ref`. Defaults to `"a"`. */
|
|
207
257
|
linkAs?: ElementType;
|
|
258
|
+
/** Command rows matched by search under the Actions group; each has `run` or `href`. */
|
|
208
259
|
actions?: readonly LauncherSearchItem[];
|
|
209
260
|
/** Remote results, already filtered by the app; rendered after Screens in the given order. */
|
|
210
261
|
extraResults?: readonly LauncherResultGroup[];
|
|
@@ -232,6 +283,7 @@ export interface NavLauncherProps {
|
|
|
232
283
|
headerActions?: ReactNode;
|
|
233
284
|
/** Panel width at `lg`+; always full width below `lg`. Defaults to "1080px". */
|
|
234
285
|
maxWidth?: string;
|
|
286
|
+
/** Overrides for any `LauncherLabels` key; unset keys keep their English default. */
|
|
235
287
|
labels?: Partial<LauncherLabels>;
|
|
236
288
|
/** Other Pixelize apps, shown as an "Apps" section at the bottom of the right rail. Same shape as AppSwitcher. */
|
|
237
289
|
apps?: AppOption[];
|
|
@@ -249,6 +301,7 @@ export interface NavLauncherProps {
|
|
|
249
301
|
scopes?: readonly LauncherScope[];
|
|
250
302
|
/** Controlled scope id; omit for uncontrolled ("all", reset on close). */
|
|
251
303
|
activeScope?: string;
|
|
304
|
+
/** Called with the new scope id whenever the user picks a chip, controlled or not. */
|
|
252
305
|
onScopeChange?: (scope: string) => void;
|
|
253
306
|
/** Up to 5 pill buttons at the top of the menu while the query is empty and the scope is All; each runs or links like an action. */
|
|
254
307
|
quickActions?: readonly LauncherSearchItem[];
|
|
@@ -256,13 +309,16 @@ export interface NavLauncherProps {
|
|
|
256
309
|
answers?: readonly LauncherSearchItem[];
|
|
257
310
|
/** Rows per group before "Show N more"; default 5 in spotlight, unlimited in classic. */
|
|
258
311
|
groupLimit?: number;
|
|
312
|
+
/** Test id on the drawer content. */
|
|
259
313
|
"data-testid"?: string;
|
|
260
314
|
}
|
|
261
315
|
/** Props for the star pin toggle used on launcher rows and reusable on a landing page; shows only while its row is hovered or focused. */
|
|
262
316
|
export interface PinToggleProps {
|
|
317
|
+
/** Draws the star filled when true. */
|
|
263
318
|
isPinned: boolean;
|
|
264
319
|
/** Accessible name and tooltip, e.g. "Pin Leave". */
|
|
265
320
|
label: string;
|
|
321
|
+
/** Called when the star is pressed. */
|
|
266
322
|
onToggle: () => void;
|
|
267
323
|
/** Tooltip text; defaults to `label`. */
|
|
268
324
|
title?: string;
|
|
@@ -273,6 +329,7 @@ export interface PinToggleProps {
|
|
|
273
329
|
}
|
|
274
330
|
/** Props for the small "open in new tab" anchor beside a launcher row. */
|
|
275
331
|
export interface NewTabLinkProps {
|
|
332
|
+
/** Link target, opened in a new tab. */
|
|
276
333
|
href: string;
|
|
277
334
|
/** Accessible name, e.g. "Open Leave in a new tab". */
|
|
278
335
|
label: string;
|
|
@@ -280,5 +337,6 @@ export interface NewTabLinkProps {
|
|
|
280
337
|
tip?: string;
|
|
281
338
|
/** Anchor-like component receiving `href`, `target`, `rel`; defaults to `"a"`. */
|
|
282
339
|
linkAs?: ElementType;
|
|
340
|
+
/** Pass -1 where the row itself is the tab stop. */
|
|
283
341
|
tabIndex?: number;
|
|
284
342
|
}
|
|
@@ -2,42 +2,59 @@ import { editDistance } from "./distance";
|
|
|
2
2
|
import { foldText, splitWords, tokenize } from "./fold";
|
|
3
3
|
/** One searchable string; `weight` scales its matches (label 1, keyword 0.75, context 0.4). */
|
|
4
4
|
export type LauncherSearchField = {
|
|
5
|
+
/** Field identifier, reported back in `LauncherTokenMatch.field`. */
|
|
5
6
|
name: string;
|
|
7
|
+
/** String to match, compared without case or accents. */
|
|
6
8
|
text: string;
|
|
9
|
+
/** Scales this field's matches; defaults to 1. */
|
|
7
10
|
weight?: number;
|
|
8
11
|
};
|
|
9
12
|
/** Anything searchable: an id plus its weighted fields, in the order results should tie-break. */
|
|
10
13
|
export type LauncherSearchDocument = {
|
|
14
|
+
/** Identifier returned on the matching hit. */
|
|
11
15
|
id: string;
|
|
16
|
+
/** Fields searched; each query token scores against its best field. */
|
|
12
17
|
fields: readonly LauncherSearchField[];
|
|
13
18
|
};
|
|
14
19
|
/** How a query token matched a field, strongest first. */
|
|
15
20
|
export type LauncherMatchKind = "exact" | "prefix" | "word" | "word-prefix" | "initialism" | "substring" | "fuzzy" | "subsequence";
|
|
16
21
|
/** The field that gave a query token its best score. */
|
|
17
22
|
export type LauncherTokenMatch = {
|
|
23
|
+
/** The query token this entry explains. */
|
|
18
24
|
token: string;
|
|
25
|
+
/** `name` of the field that scored best for the token. */
|
|
19
26
|
field: string;
|
|
27
|
+
/** Text of that field. */
|
|
20
28
|
text: string;
|
|
29
|
+
/** How the token matched that field. */
|
|
21
30
|
kind: LauncherMatchKind;
|
|
22
31
|
};
|
|
23
32
|
/** A ranked document: `index` is its input position, `synonym` the expansion used. */
|
|
24
33
|
export type LauncherSearchHit = {
|
|
34
|
+
/** `id` of the matching document. */
|
|
25
35
|
id: string;
|
|
36
|
+
/** Position of the document in the list that was indexed. */
|
|
26
37
|
index: number;
|
|
38
|
+
/** Relevance, including any `boosts`; higher ranks first. */
|
|
27
39
|
score: number;
|
|
40
|
+
/** Best match for each query token. */
|
|
28
41
|
matches: LauncherTokenMatch[];
|
|
42
|
+
/** The synonym expansion that produced the hit; absent when the literal query matched. */
|
|
29
43
|
synonym?: string;
|
|
30
44
|
};
|
|
31
45
|
/** Term -> equivalent phrases, matched both ways: `{ pf: ["provident fund"] }`. */
|
|
32
46
|
export type LauncherSynonyms = Readonly<Record<string, readonly string[]>>;
|
|
33
47
|
/** Ranking knobs; `boosts` adds points per document id to documents that already match. */
|
|
34
48
|
export type LauncherSearchOptions = {
|
|
49
|
+
/** Equivalent terms expanded in both directions. */
|
|
35
50
|
synonyms?: LauncherSynonyms;
|
|
51
|
+
/** Points added per document id to documents that already match; never adds a non-match. */
|
|
36
52
|
boosts?: Readonly<Record<string, number>>;
|
|
37
53
|
/** Typo tolerance; defaults to true. */
|
|
38
54
|
fuzzy?: boolean;
|
|
39
55
|
/** Drops hits under this share of the best score; 0 keeps all. */
|
|
40
56
|
relativeCutoff?: number;
|
|
57
|
+
/** Maximum hits returned; unlimited when omitted. */
|
|
41
58
|
limit?: number;
|
|
42
59
|
};
|
|
43
60
|
type IndexedField = {
|
|
@@ -60,7 +77,9 @@ type IndexedDocument = {
|
|
|
60
77
|
};
|
|
61
78
|
/** Pre-folded documents; build once with `createIndex`, query many times. */
|
|
62
79
|
export type LauncherSearchIndex = {
|
|
80
|
+
/** Number of indexed documents. */
|
|
63
81
|
readonly size: number;
|
|
82
|
+
/** Pre-folded records; internal shape, pass the index to the engine rather than reading it. */
|
|
64
83
|
readonly documents: readonly IndexedDocument[];
|
|
65
84
|
};
|
|
66
85
|
export declare const createSearchIndex: (documents: readonly LauncherSearchDocument[]) => LauncherSearchIndex;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const launcherSlide: (isReducedMotion: boolean) => {
|
|
2
|
+
variants: {
|
|
3
|
+
enter: {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
transition: {
|
|
7
|
+
duration: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
exit: {
|
|
11
|
+
x: string;
|
|
12
|
+
y: number;
|
|
13
|
+
transition: {
|
|
14
|
+
duration: number;
|
|
15
|
+
ease: (0 | 1 | 0.2 | 0.4)[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.launcherSlide = void 0;
|
|
4
|
+
const react_1 = require("@chakra-ui/react");
|
|
5
|
+
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
6
|
+
const ENTER = (0, motion_1.motionTransition)("enter", "out");
|
|
7
|
+
const INSTANT = { duration: 0 };
|
|
8
|
+
const EXIT = { duration: 0.15, ease: [...react_1.EASINGS.easeInOut] };
|
|
9
|
+
const launcherSlide = (isReducedMotion) => ({
|
|
10
|
+
variants: {
|
|
11
|
+
enter: { x: 0, y: 0, transition: isReducedMotion ? INSTANT : ENTER },
|
|
12
|
+
exit: { x: "-100%", y: 0, transition: EXIT },
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
exports.launcherSlide = launcherSlide;
|
|
@@ -1,63 +1,97 @@
|
|
|
1
1
|
import { type LauncherSynonyms } from "./engine/engine";
|
|
2
2
|
import type { LauncherAnswer, LauncherFact, LauncherIcon, LauncherResultGroup, LauncherSearchItem, LauncherSection } from "./NavLauncherProps";
|
|
3
3
|
export type LauncherResult = {
|
|
4
|
+
/** Unique within the result list; prefixed `screen:`, `module:`, `action:` or by the group id. */
|
|
4
5
|
id: string;
|
|
6
|
+
/** Row text. */
|
|
5
7
|
label: string;
|
|
8
|
+
/** Second line, such as the module a screen belongs to. */
|
|
6
9
|
context?: string;
|
|
10
|
+
/** Row icon. */
|
|
7
11
|
icon?: LauncherIcon;
|
|
12
|
+
/** Short text appended to `context`. */
|
|
8
13
|
hint?: string;
|
|
14
|
+
/** Count or short text shown on the row. */
|
|
9
15
|
badge?: number | string;
|
|
16
|
+
/** Destination of the row. */
|
|
10
17
|
href?: string;
|
|
18
|
+
/** Action to perform instead of navigating. */
|
|
11
19
|
run?: () => void;
|
|
20
|
+
/** Screen the row stands for, so it can be pinned and counted; a module row carries its first screen. */
|
|
12
21
|
screenId?: string;
|
|
13
22
|
/** Set on `searchLauncherSections` rows: a module row or one of its screens. */
|
|
14
23
|
kind?: "module" | "screen";
|
|
15
24
|
/** Keyword that matched a module or screen whose own name did not. */
|
|
16
25
|
keywordHint?: string;
|
|
26
|
+
/** Shows the "New" tag after the label. */
|
|
17
27
|
isNew?: boolean;
|
|
28
|
+
/** Label/value pairs shown in the Preview pane. */
|
|
18
29
|
facts?: readonly LauncherFact[];
|
|
30
|
+
/** Direct-answer payload rendered as an answer card. */
|
|
19
31
|
answer?: LauncherAnswer;
|
|
32
|
+
/** Relevance from the spotlight engine; higher ranks first. */
|
|
20
33
|
score?: number;
|
|
21
34
|
};
|
|
22
35
|
export type LauncherResultView = {
|
|
36
|
+
/** Group id, e.g. "actions" or a `LauncherResultGroup.id`. */
|
|
23
37
|
id: string;
|
|
38
|
+
/** Group heading. */
|
|
24
39
|
label: string;
|
|
40
|
+
/** Matching rows in rank order. */
|
|
25
41
|
items: LauncherResult[];
|
|
26
42
|
};
|
|
27
43
|
export declare function filterItems(items: readonly LauncherSearchItem[], query: string): LauncherSearchItem[];
|
|
28
44
|
export declare function flattenScreens(sections: readonly LauncherSection[]): LauncherResult[];
|
|
29
45
|
/** @deprecated Legacy flat search; NavLauncher uses searchLauncherSections (classic) or the spotlight engine. */
|
|
30
46
|
export declare function searchLauncher(input: {
|
|
47
|
+
/** Text to match; all whitespace-separated tokens must appear. */
|
|
31
48
|
query: string;
|
|
49
|
+
/** Sections whose screens are searched, flattened and de-duplicated by screen id. */
|
|
32
50
|
sections: readonly LauncherSection[];
|
|
51
|
+
/** Command rows matched by label, context and keywords. */
|
|
33
52
|
actions?: readonly LauncherSearchItem[];
|
|
53
|
+
/** Remote result groups appended unfiltered, in the given order. */
|
|
34
54
|
extraResults?: readonly LauncherResultGroup[];
|
|
55
|
+
/** Heading of the Screens group. */
|
|
35
56
|
screensLabel: string;
|
|
57
|
+
/** Heading of the Actions group. */
|
|
36
58
|
actionsLabel: string;
|
|
37
59
|
}): LauncherResultView[];
|
|
38
60
|
export type LauncherSectionResult = {
|
|
61
|
+
/** Id of the source `LauncherSection`. */
|
|
39
62
|
id: string;
|
|
63
|
+
/** Heading of the source section. */
|
|
40
64
|
label: string;
|
|
65
|
+
/** Matching module rows, each followed by its matching screens. */
|
|
41
66
|
items: LauncherResult[];
|
|
42
67
|
};
|
|
43
68
|
/** Search that keeps the sections: per section, matching modules, each followed by its matching screens. */
|
|
44
69
|
export declare function searchLauncherSections(input: {
|
|
70
|
+
/** Text to match; all whitespace-separated tokens must appear. */
|
|
45
71
|
query: string;
|
|
72
|
+
/** Sections whose modules and screens are searched. */
|
|
46
73
|
sections: readonly LauncherSection[];
|
|
74
|
+
/** Command rows matched by label, context and keywords. */
|
|
47
75
|
actions?: readonly LauncherSearchItem[];
|
|
76
|
+
/** Remote result groups appended unfiltered, in the given order. */
|
|
48
77
|
extraResults?: readonly LauncherResultGroup[];
|
|
78
|
+
/** Heading of the Actions group. */
|
|
49
79
|
actionsLabel: string;
|
|
50
80
|
}): {
|
|
51
81
|
sections: LauncherSectionResult[];
|
|
52
82
|
groups: LauncherResultView[];
|
|
53
83
|
};
|
|
54
84
|
export type HighlightSegment = {
|
|
85
|
+
/** A slice of the original text. */
|
|
55
86
|
text: string;
|
|
87
|
+
/** True when the slice matched the query. */
|
|
56
88
|
isMatch: boolean;
|
|
57
89
|
};
|
|
58
90
|
/** Highlight options; `fuzzy` also marks prefix, typo, initial and accent-folded matches. */
|
|
59
91
|
export type HighlightOptions = {
|
|
92
|
+
/** Also marks prefix, typo, initial and accent-folded matches; off marks plain substrings only. */
|
|
60
93
|
fuzzy?: boolean;
|
|
94
|
+
/** Equivalent terms to mark too; only read when `fuzzy` is set. */
|
|
61
95
|
synonyms?: LauncherSynonyms;
|
|
62
96
|
};
|
|
63
97
|
/** Splits `text` so every case-insensitive occurrence of a query token is its own matched segment. */
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { NavbarProps } from "./NavigationBarProps";
|
|
2
|
+
/** Top bar with sidebar toggle, optional back button and title, a right-hand slot, and an avatar menu of navigation entries plus logout. */
|
|
2
3
|
export default function NavBar({ userAvathar, userName, userRole, navMenu, moreIcon, handleNavOnClick, handleLogout, logoutText, navigationBarText, sideBarToggole, onSideBarToggole, forceSideBarToggle, onSideBarPeek, leading, }: NavbarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -20,6 +20,7 @@ const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
|
20
20
|
const BACKGROUND_TRANSITION = (0, motion_1.transitionFor)(["background"]);
|
|
21
21
|
// Roomy enough to hover without aiming: the glyph is only 1.25rem.
|
|
22
22
|
const SIDEBAR_TOGGLE_HIT = "2.5rem";
|
|
23
|
+
/** Top bar with sidebar toggle, optional back button and title, a right-hand slot, and an avatar menu of navigation entries plus logout. */
|
|
23
24
|
function NavBar({ userAvathar, userName, userRole, navMenu, moreIcon, handleNavOnClick, handleLogout, logoutText, navigationBarText, sideBarToggole, onSideBarToggole, forceSideBarToggle = false, onSideBarPeek, leading, }) {
|
|
24
25
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
25
26
|
const rowBackgrounds = (0, rowStates_1.listRowBackgrounds)(theme.colors);
|
|
@@ -3,19 +3,30 @@ import type { ReactNode } from "react";
|
|
|
3
3
|
export type NavbarProps = {
|
|
4
4
|
/** Prop name is spelled exactly this way ("Avathar") — not a typo to correct at the call site. */
|
|
5
5
|
userAvathar?: string;
|
|
6
|
+
/** Name shown in the account menu header; also the avatar's initials source when no image is given. */
|
|
6
7
|
userName: string;
|
|
8
|
+
/** Secondary line under the name in the account menu. */
|
|
7
9
|
userRole?: string;
|
|
10
|
+
/** Entries listed in the account menu, in order, above the logout item. */
|
|
8
11
|
navMenu: MenuProps[];
|
|
9
12
|
/** Right-cluster slot before the avatar (org switcher, bell, launcher trigger). Its child may shrink; give icon buttons `flexShrink={0}`. */
|
|
10
13
|
moreIcon?: ReactNode;
|
|
14
|
+
/** Called with a menu entry's `url` when it is chosen; the bar does not navigate itself. */
|
|
11
15
|
handleNavOnClick: (url: string) => void;
|
|
16
|
+
/** Called when the logout item is chosen. */
|
|
12
17
|
handleLogout: () => void;
|
|
18
|
+
/** Label of the logout item. */
|
|
13
19
|
logoutText: string;
|
|
20
|
+
/** Page title shown on the left, with an optional back button. */
|
|
14
21
|
navigationBarText?: {
|
|
22
|
+
/** Title content; truncated to one line, with a tooltip when the text is a string. */
|
|
15
23
|
text: ReactNode;
|
|
24
|
+
/** Shows a "Go back" button before the title and calls this when pressed. */
|
|
16
25
|
onIconClick?: () => void;
|
|
17
26
|
};
|
|
27
|
+
/** Whether the sidebar is currently open; flips the hamburger icon and its accessible name. */
|
|
18
28
|
sideBarToggole?: boolean;
|
|
29
|
+
/** Called when the hamburger is pressed. */
|
|
19
30
|
onSideBarToggole?: () => void;
|
|
20
31
|
/**
|
|
21
32
|
* Force the sidebar hamburger to show at all widths (not just below `lg`).
|
|
@@ -34,8 +45,12 @@ export type NavbarProps = {
|
|
|
34
45
|
};
|
|
35
46
|
/** One navMenu entry (id/title/url/icon) — unrelated to Chakra's own MenuProps despite the shared name. */
|
|
36
47
|
export type MenuProps = {
|
|
48
|
+
/** Optional key for the entry; falls back to `url`, then `title`. */
|
|
37
49
|
id?: string | number;
|
|
50
|
+
/** Entry text, truncated to one line with a native title tooltip. */
|
|
38
51
|
title: string;
|
|
52
|
+
/** Passed to `handleNavOnClick` when the entry is chosen. */
|
|
39
53
|
url: string;
|
|
54
|
+
/** Leading icon, shown at 16px. */
|
|
40
55
|
icon?: ReactNode;
|
|
41
56
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Plain Chakra Textarea + title + file attach, not a rich text editor — no formatting toolbar despite the "note" naming. Use Editor for HTML content. */
|
|
2
2
|
export type NoteTextAreaProps = {
|
|
3
|
+
/** Width of the whole composer; a number is px, a string is any CSS length. Defaults to "100%". */
|
|
3
4
|
width?: number | string;
|
|
4
5
|
/** Save click with note, title and files; `resetState` is never passed. */
|
|
5
6
|
handleSubmit: (noteValue: string, titleValue: string, file: File[],
|
|
@@ -21,7 +22,7 @@ export type NoteTextAreaProps = {
|
|
|
21
22
|
maxFileSize?: number;
|
|
22
23
|
/** Error prefix; the formatted limit and a full stop are appended. */
|
|
23
24
|
maxFilesSizeError?: string;
|
|
24
|
-
/** Disables Save
|
|
25
|
+
/** Disables Save when the note or the title exceeds this many words (default 15); the counter shows note words only. */
|
|
25
26
|
maxNoteWordCount?: number;
|
|
26
27
|
/** Note text after each edit; whitespace-only input is rejected and not reported. */
|
|
27
28
|
onChange?: (value: string) => void;
|