pixelize-design-library 2.4.2-beta.65 → 2.4.2-beta.67
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 +447 -13
- package/COMPONENT-GOTCHAS.md +150 -91
- package/DESIGN-GUIDE.md +47 -7
- package/README.md +37 -3
- package/dist/Components/Accordion/Accordion.js +11 -8
- package/dist/Components/Accordion/AccordionProps.d.ts +4 -0
- package/dist/Components/Accordion/accordionColors.js +1 -2
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -0
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChartProps.d.ts +2 -2
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.d.ts +1 -1
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +6 -5
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChartProps.d.ts +3 -1
- package/dist/Components/Apexcharts/ApexPieChart/pieImageTexture.d.ts +2 -0
- package/dist/Components/Apexcharts/ApexPieChart/pieImageTexture.js +13 -0
- package/dist/Components/AppSwitcher/AppSwitcher.js +6 -3
- package/dist/Components/AppSwitcher/AppSwitcherProps.d.ts +3 -1
- package/dist/Components/AppSwitcher/AppSwitcherProps.js +18 -11
- package/dist/Components/AppSwitcher/pixelizeSuite.d.ts +24 -0
- package/dist/Components/AppSwitcher/pixelizeSuite.js +71 -0
- package/dist/Components/AppearanceSettings/AppearanceSettings.js +3 -3
- package/dist/Components/AppearanceSettings/AppearanceSettingsProps.d.ts +2 -2
- package/dist/Components/Avatar/avatarColorway.d.ts +2 -2
- package/dist/Components/Avatar/avatarColorway.js +7 -6
- package/dist/Components/Breadcrumbs/BreadcrumbsProps.d.ts +1 -1
- package/dist/Components/Button/Button.styles.js +5 -2
- package/dist/Components/Button/ButtonProps.d.ts +2 -4
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +3 -1
- package/dist/Components/CalendarGrid/CalendarGrid.js +5 -3
- package/dist/Components/CalendarGrid/CalendarGridProps.d.ts +1 -1
- package/dist/Components/Card/Card.d.ts +1 -0
- package/dist/Components/Card/Card.js +1 -0
- package/dist/Components/Checkbox/Checkbox.styles.js +3 -1
- package/dist/Components/CheckoutKit/selectable.d.ts +3 -1
- package/dist/Components/CheckoutKit/selectable.js +10 -7
- package/dist/Components/CheckoutKit/tonalHover.d.ts +2 -0
- package/dist/Components/CheckoutKit/tonalHover.js +6 -0
- package/dist/Components/ChoiceCard/ChoiceCard.d.ts +1 -1
- package/dist/Components/ChoiceCard/ChoiceCard.js +2 -1
- package/dist/Components/ChoiceCard/ChoiceCardProps.d.ts +6 -0
- package/dist/Components/Common/FieldMessage.d.ts +1 -0
- package/dist/Components/Common/FormLabel.d.ts +1 -1
- package/dist/Components/Common/FormLabel.js +4 -3
- package/dist/Components/Common/HelperText.d.ts +2 -2
- package/dist/Components/Common/HelperText.js +1 -2
- package/dist/Components/Common/activationKey.d.ts +5 -0
- package/dist/Components/Common/activationKey.js +12 -0
- package/dist/Components/Common/dataAttributes.d.ts +4 -0
- package/dist/Components/Common/fieldMessageStyles.js +2 -1
- package/dist/Components/Common/findSlot.d.ts +2 -0
- package/dist/Components/Common/findSlot.js +24 -0
- package/dist/Components/Common/surfaceFocusRing.d.ts +1 -0
- package/dist/Components/Common/surfaceFocusRing.js +7 -0
- package/dist/Components/ConfirmDialog/ConfirmDialog.js +17 -5
- package/dist/Components/ConfirmDialog/ConfirmDialogProps.d.ts +38 -10
- package/dist/Components/CopyButton/CopyButton.d.ts +1 -0
- package/dist/Components/CopyButton/CopyButton.js +3 -6
- package/dist/Components/CouponField/CouponField.js +5 -2
- package/dist/Components/CustomModulesTable/CustomModulesTable.js +3 -1
- package/dist/Components/DatePicker/CalendarPanel.d.ts +1 -0
- package/dist/Components/DatePicker/CalendarPanel.js +3 -1
- package/dist/Components/DatePicker/DatePicker.js +24 -26
- package/dist/Components/DatePicker/DatePickerProps.d.ts +8 -0
- package/dist/Components/DatePicker/PickerPortal.js +1 -1
- package/dist/Components/DatePicker/RangeDatePicker.d.ts +7 -0
- package/dist/Components/DatePicker/RangeDatePicker.js +10 -29
- package/dist/Components/DatePicker/SingleDatePicker.js +5 -21
- package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -20
- package/dist/Components/DescriptionList/DescriptionList.js +1 -1
- package/dist/Components/DetailSections/DetailSections.js +2 -1
- package/dist/Components/Divider/Divider.d.ts +3 -3
- package/dist/Components/Divider/Divider.js +3 -3
- package/dist/Components/Drawer/Drawer.d.ts +2 -0
- package/dist/Components/Drawer/Drawer.js +23 -25
- package/dist/Components/Dropdown/DropDown.js +6 -21
- package/dist/Components/Editor/Editor.js +6 -2
- package/dist/Components/Editor/EditorProps.d.ts +17 -1
- package/dist/Components/Editor/editorLabels.js +1 -0
- package/dist/Components/Editor/editorTokenStyles.d.ts +8 -0
- package/dist/Components/Editor/editorTokenStyles.js +9 -1
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.d.ts +1 -1
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +9 -2
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.d.ts +15 -1
- package/dist/Components/EmptyState/EmptyStateProps.d.ts +21 -0
- package/dist/Components/EmptyState/FilteredEmptyState.d.ts +5 -0
- package/dist/Components/EmptyState/FilteredEmptyState.js +23 -0
- package/dist/Components/FieldSelectModal/FieldSelectModal.d.ts +1 -0
- package/dist/Components/FilePreview/FilePreview.js +7 -3
- package/dist/Components/FilePreview/FilePreviewProps.d.ts +2 -1
- package/dist/Components/FileUpload/FileUpload.js +8 -9
- package/dist/Components/FileUpload/FileUploadProps.d.ts +2 -2
- package/dist/Components/FileUploader/FileUploader.js +5 -6
- package/dist/Components/FilterSidebar/FilterSidebar.d.ts +7 -9
- package/dist/Components/FilterSidebar/FilterSidebar.js +90 -233
- package/dist/Components/FilterSidebar/OptionsSection.d.ts +14 -0
- package/dist/Components/FilterSidebar/OptionsSection.js +46 -0
- package/dist/Components/FilterSidebar/RangeSection.d.ts +17 -0
- package/dist/Components/FilterSidebar/RangeSection.js +80 -0
- package/dist/Components/FilterSidebar/SectionHeader.d.ts +13 -0
- package/dist/Components/FilterSidebar/SectionHeader.js +29 -0
- package/dist/Components/FilterSidebar/useStableCallback.d.ts +1 -0
- package/dist/Components/FilterSidebar/useStableCallback.js +12 -0
- package/dist/Components/Form/FormWrapper.d.ts +7 -7
- package/dist/Components/Form/FormWrapper.js +5 -3
- package/dist/Components/FormField/FormField.js +1 -1
- package/dist/Components/Header/Header.js +1 -1
- package/dist/Components/Header/HeaderActions.js +4 -2
- package/dist/Components/IconButton/IconButtonProps.d.ts +2 -1
- package/dist/Components/Input/TextInput.js +2 -2
- package/dist/Components/Input/TextInputProps.d.ts +3 -1
- package/dist/Components/KanbanBoard/AccountCard.js +1 -1
- package/dist/Components/KanbanBoard/KanbanBoard.d.ts +1 -1
- package/dist/Components/KanbanBoard/KanbanBoard.js +11 -7
- package/dist/Components/LauncherTrigger/LauncherTrigger.js +1 -1
- package/dist/Components/LazyWrapper/LazyWrapper.d.ts +2 -1
- package/dist/Components/LazyWrapper/LazyWrapper.js +1 -1
- package/dist/Components/MediaViewer/MediaViewer.js +4 -3
- package/dist/Components/MediaViewer/components/MediaAudioPlayer.js +5 -1
- package/dist/Components/MediaViewer/components/MediaImageViewer.js +19 -8
- package/dist/Components/MediaViewer/components/MediaScrubber.js +7 -2
- package/dist/Components/MediaViewer/components/MediaVideoPlayer.js +3 -1
- package/dist/Components/MediaViewer/components/ViewerIconButton.js +3 -1
- package/dist/Components/MediaViewer/hooks/useFileViewer.d.ts +1 -0
- package/dist/Components/MediaViewer/mediaItems.d.ts +1 -0
- package/dist/Components/MediaViewer/mediaItems.js +5 -0
- package/dist/Components/Modal/Modal.d.ts +1 -0
- package/dist/Components/Modal/Modal.js +7 -25
- package/dist/Components/Modal/warnDroppedSlotChildren.d.ts +1 -1
- package/dist/Components/Modal/warnDroppedSlotChildren.js +7 -3
- package/dist/Components/NavLauncher/LauncherTabs.js +2 -1
- package/dist/Components/NavLauncher/NavLauncher.js +47 -22
- package/dist/Components/NavLauncher/NavLauncherProps.d.ts +6 -4
- package/dist/Components/NavLauncher/ScopeBar.js +4 -2
- package/dist/Components/NavLauncher/engine/engine.js +2 -1
- package/dist/Components/NavLauncher/engine/fold.js +2 -1
- package/dist/Components/NavLauncher/launcherMotion.d.ts +19 -0
- package/dist/Components/NavLauncher/launcherMotion.js +15 -0
- package/dist/Components/NavLauncher/launcherParts.d.ts +12 -0
- package/dist/Components/NavLauncher/launcherParts.js +45 -11
- package/dist/Components/NavLauncher/searchLayout.d.ts +1 -0
- package/dist/Components/NavLauncher/searchLayout.js +3 -1
- package/dist/Components/NavLauncher/spotlightParts.d.ts +6 -2
- package/dist/Components/NavLauncher/spotlightParts.js +22 -9
- package/dist/Components/NavLauncher/useCopiedFlash.d.ts +6 -0
- package/dist/Components/NavLauncher/useCopiedFlash.js +21 -0
- package/dist/Components/NavigationBar/NavigationBar.js +6 -5
- package/dist/Components/NoteTextArea/NoteTextArea.js +12 -17
- package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +5 -3
- package/dist/Components/Notification/Notification.js +19 -21
- package/dist/Components/Notification/NotificationProps.d.ts +1 -1
- package/dist/Components/NotificationBell/notificationHelpers.d.ts +16 -1
- package/dist/Components/NotificationBell/notificationHelpers.js +13 -7
- package/dist/Components/OffersList/OffersList.js +4 -2
- package/dist/Components/OptionChip/OptionChip.js +3 -2
- package/dist/Components/OptionChip/optionInk.js +4 -2
- package/dist/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +13 -6
- package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +1 -1
- package/dist/Components/OrganizationDetails/OrganizationDetails.js +4 -7
- package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +4 -2
- package/dist/Components/PdfViewer/PdfViewer.d.ts +1 -0
- package/dist/Components/PlanBadge/PlanBadgeProps.d.ts +1 -1
- package/dist/Components/PlanPill/PlanPill.js +4 -2
- package/dist/Components/PlanPill/PlanPillProps.d.ts +1 -1
- package/dist/Components/ProductCard/ProductCardAction.js +2 -1
- package/dist/Components/ProductCard/ProductCardSwatches.js +2 -1
- package/dist/Components/ProductDetails/ProductDetails.js +2 -1
- package/dist/Components/ProfileCard/ProfileCard.d.ts +1 -0
- package/dist/Components/ProfileCard/ProfileCard.js +12 -26
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +4 -2
- package/dist/Components/ProgressBar/ProgressBar.js +2 -1
- package/dist/Components/QuantityStepper/QuantityStepper.js +5 -2
- package/dist/Components/QueryState/QueryStateBoundary.d.ts +1 -1
- package/dist/Components/QueryState/QueryStateBoundary.js +5 -1
- package/dist/Components/QueryState/QueryStateProps.d.ts +6 -2
- package/dist/Components/RadioButton/RadioButton.js +2 -3
- package/dist/Components/RolesPermission/RolesPermission.js +12 -8
- package/dist/Components/ScrollToTop/ScrollToTop.d.ts +1 -0
- package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +4 -1
- package/dist/Components/ScrollbarBox/ScrollbarBox.js +10 -4
- package/dist/Components/SearchSelect/SearchSelect.d.ts +1 -1
- package/dist/Components/SearchSelect/SearchSelect.js +8 -5
- package/dist/Components/SearchSelect/SearchSelectProps.d.ts +3 -3
- package/dist/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/Components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/Components/Select/Select.js +6 -0
- package/dist/Components/Select/SelectNative.d.ts +16 -0
- package/dist/Components/Select/SelectPopup.js +170 -63
- package/dist/Components/Select/SelectProps.d.ts +30 -2
- package/dist/Components/Select/groupedWindow.d.ts +21 -0
- package/dist/Components/Select/groupedWindow.js +50 -0
- package/dist/Components/SelectSearch/SelectSearch.d.ts +1 -1
- package/dist/Components/SelectSearch/SelectSearch.js +48 -38
- package/dist/Components/SelectSearch/SelectSearchProps.d.ts +3 -3
- package/dist/Components/SelectV2/SelectV2.d.ts +1 -1
- package/dist/Components/SelectV2/SelectV2.js +1 -1
- package/dist/Components/SelectV2/SelectV2Props.d.ts +3 -3
- package/dist/Components/SideBar/SecondaryBar.js +3 -2
- package/dist/Components/SideBar/components/MenuItemBox.js +3 -2
- package/dist/Components/SideBar/components/MenuItems.js +1 -1
- package/dist/Components/SideBar/components/OtherApps.js +2 -2
- package/dist/Components/SideBar/components/PinnedSection.js +1 -1
- package/dist/Components/SideBar/sidebarScale.d.ts +2 -2
- package/dist/Components/SideBar/sidebarScale.js +2 -2
- package/dist/Components/SignInActivityTable/SignInActivityTable.js +7 -2
- package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +1 -1
- package/dist/Components/SignInActivityTable/scrollRegionRing.d.ts +10 -0
- package/dist/Components/SignInActivityTable/scrollRegionRing.js +14 -0
- package/dist/Components/Skeletons/SkeletonProps.d.ts +5 -1
- package/dist/Components/Slider/Slider.d.ts +2 -0
- package/dist/Components/Slider/Slider.js +5 -4
- package/dist/Components/StageProgress/StageItem.js +2 -1
- package/dist/Components/StageProgress/StageProgress.js +8 -2
- package/dist/Components/StageProgress/StageProgressProps.d.ts +2 -0
- package/dist/Components/StageProgress/StepperStage.js +2 -1
- package/dist/Components/StickyBuyBar/StickyBuyBar.js +2 -1
- package/dist/Components/Table/Table.js +5 -3
- package/dist/Components/Table/TableProps.d.ts +1 -1
- package/dist/Components/Table/components/HeaderActions.js +5 -3
- package/dist/Components/Table/components/TableBody.js +22 -8
- package/dist/Components/Table/components/TableGroupRow.js +2 -1
- package/dist/Components/Table/components/TableHeader.js +14 -20
- package/dist/Components/Table/components/rowDetail.js +3 -2
- package/dist/Components/Table/components/rowFocusRing.d.ts +21 -0
- package/dist/Components/Table/components/rowFocusRing.js +20 -0
- package/dist/Components/Table/filters/ActiveFilters.js +6 -3
- package/dist/Components/Table/filters/CompactSelect.js +2 -1
- package/dist/Components/Table/filters/FilterDatePicker.d.ts +6 -0
- package/dist/Components/Table/filters/FilterDatePicker.js +61 -0
- package/dist/Components/Table/filters/LeftFilterPane.d.ts +1 -0
- package/dist/Components/Table/filters/LeftFilterPane.js +14 -6
- package/dist/Components/Table/hooks/useTable.js +11 -7
- package/dist/Components/Table/settings/ManageColumns.js +4 -3
- package/dist/Components/Table/settings/TableSettings.js +4 -4
- package/dist/Components/Tabs/Tabs.d.ts +1 -0
- package/dist/Components/Tabs/Tabs.js +1 -0
- package/dist/Components/Tabs/components/CountBadge.d.ts +1 -0
- package/dist/Components/Tabs/components/TabList.d.ts +1 -0
- package/dist/Components/Tabs/components/TabList.js +1 -0
- package/dist/Components/Tabs/components/TabPanel.d.ts +1 -0
- package/dist/Components/Tabs/components/TabPanel.js +1 -0
- package/dist/Components/Tabs/tabStyles.js +4 -2
- package/dist/Components/Tag/Tag.js +5 -4
- package/dist/Components/Tag/Tag.styles.js +5 -4
- package/dist/Components/Tag/TagProps.d.ts +4 -1
- package/dist/Components/Tag/tagDot.js +10 -3
- package/dist/Components/TagInput/TagInput.js +6 -5
- package/dist/Components/TagInput/TagInputProps.d.ts +15 -0
- package/dist/Components/TagInput/tagEntries.d.ts +7 -1
- package/dist/Components/TagInput/tagEntries.js +18 -5
- package/dist/Components/TimePicker/TimePicker.js +7 -3
- package/dist/Components/TimePicker/TimePickerProps.d.ts +2 -0
- package/dist/Components/Timeline/Timeline.js +13 -9
- package/dist/Components/Toaster/Toaster.js +2 -1
- package/dist/Components/Toggle/TableToggle.d.ts +1 -1
- package/dist/Components/Toggle/TableToggle.js +1 -1
- package/dist/Components/UpgradeButton/UpgradeButton.js +3 -2
- package/dist/Components/UpgradeButton/UpgradeButtonProps.d.ts +1 -1
- package/dist/Components/UserDetails/UserDetails.js +5 -7
- package/dist/Components/WishlistToggle/WishlistToggle.js +2 -1
- package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +11 -1
- package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +3 -1
- package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +14 -7
- package/dist/Hooks/useOutsideMouseDown.d.ts +11 -0
- package/dist/Hooks/useOutsideMouseDown.js +30 -0
- package/dist/Hooks/usePreferences.js +30 -12
- package/dist/Hooks/useScrollableRegion.d.ts +17 -0
- package/dist/Hooks/useScrollableRegion.js +36 -0
- package/dist/Hooks/useSidebarPrefs.d.ts +1 -0
- package/dist/Theme/chakra/Menu.styles.d.ts +4 -0
- package/dist/Theme/chakra/Menu.styles.js +6 -0
- package/dist/Theme/chakra/componentStyles.d.ts +4 -0
- package/dist/Theme/chakra/componentStyles.js +1 -1
- package/dist/Theme/chakra/createBrandTheme.d.ts +1 -0
- package/dist/Theme/chakra/focusRing.styles.d.ts +1 -1
- package/dist/Theme/chakra/focusRing.styles.js +3 -3
- package/dist/Theme/chakra/paletteFromTheme.d.ts +2 -1
- package/dist/Theme/chakra/paletteFromTheme.js +18 -4
- package/dist/Theme/provider/PixelizeThemeProvider.d.ts +1 -0
- package/dist/Theme/provider/ThemeSwitcher.d.ts +1 -0
- package/dist/Theme/provider/ThemeSwitcher.js +1 -1
- package/dist/Theme/testing/testPalette.d.ts +1 -0
- package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +1 -0
- package/dist/Theme/tokens/builders/filledSurface.js +3 -2
- package/dist/Theme/tokens/builders/focusRing.js +4 -1
- package/dist/Theme/tokens/builders/paletteScale.d.ts +2 -0
- package/dist/Theme/tokens/builders/paletteScale.js +10 -0
- package/dist/Theme/tokens/types.d.ts +1 -0
- package/dist/Utils/accountHandoff.d.ts +3 -0
- package/dist/Utils/price.d.ts +1 -0
- package/dist/Utils/tabular.d.ts +30 -0
- package/dist/Utils/tabular.js +61 -0
- package/dist/esm/Components/Accordion/Accordion.js +11 -8
- package/dist/esm/Components/Accordion/accordionColors.js +2 -3
- package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +2 -1
- package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +6 -5
- package/dist/esm/Components/Apexcharts/ApexPieChart/pieImageTexture.js +10 -0
- package/dist/esm/Components/AppSwitcher/AppSwitcher.js +6 -3
- package/dist/esm/Components/AppSwitcher/AppSwitcherProps.js +18 -11
- package/dist/esm/Components/AppSwitcher/pixelizeSuite.js +67 -0
- package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +3 -3
- package/dist/esm/Components/Avatar/avatarColorway.js +4 -4
- package/dist/esm/Components/Button/Button.styles.js +5 -2
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +3 -1
- package/dist/esm/Components/CalendarGrid/CalendarGrid.js +5 -3
- package/dist/esm/Components/Card/Card.js +1 -0
- package/dist/esm/Components/Checkbox/Checkbox.styles.js +3 -1
- package/dist/esm/Components/CheckoutKit/selectable.js +10 -7
- package/dist/esm/Components/CheckoutKit/tonalHover.js +2 -0
- package/dist/esm/Components/ChoiceCard/ChoiceCard.js +2 -1
- package/dist/esm/Components/Common/FormLabel.js +4 -3
- package/dist/esm/Components/Common/HelperText.js +1 -2
- package/dist/esm/Components/Common/activationKey.js +7 -0
- package/dist/esm/Components/Common/fieldMessageStyles.js +2 -1
- package/dist/esm/Components/Common/findSlot.js +17 -0
- package/dist/esm/Components/Common/surfaceFocusRing.js +3 -0
- package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +18 -6
- package/dist/esm/Components/CopyButton/CopyButton.js +3 -6
- package/dist/esm/Components/CouponField/CouponField.js +5 -2
- package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +3 -1
- package/dist/esm/Components/DatePicker/CalendarPanel.js +3 -1
- package/dist/esm/Components/DatePicker/DatePicker.js +25 -27
- package/dist/esm/Components/DatePicker/PickerPortal.js +2 -2
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +10 -29
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +5 -21
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -20
- package/dist/esm/Components/DescriptionList/DescriptionList.js +1 -1
- package/dist/esm/Components/DetailSections/DetailSections.js +2 -1
- package/dist/esm/Components/Divider/Divider.js +3 -3
- package/dist/esm/Components/Drawer/Drawer.js +19 -18
- package/dist/esm/Components/Dropdown/DropDown.js +7 -22
- package/dist/esm/Components/Editor/Editor.js +7 -3
- package/dist/esm/Components/Editor/editorLabels.js +1 -0
- package/dist/esm/Components/Editor/editorTokenStyles.js +7 -0
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +8 -4
- package/dist/esm/Components/EmptyState/FilteredEmptyState.js +18 -0
- package/dist/esm/Components/FilePreview/FilePreview.js +8 -4
- package/dist/esm/Components/FileUpload/FileUpload.js +8 -9
- package/dist/esm/Components/FileUploader/FileUploader.js +6 -7
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +94 -237
- package/dist/esm/Components/FilterSidebar/OptionsSection.js +41 -0
- package/dist/esm/Components/FilterSidebar/RangeSection.js +78 -0
- package/dist/esm/Components/FilterSidebar/SectionHeader.js +23 -0
- package/dist/esm/Components/FilterSidebar/useStableCallback.js +8 -0
- package/dist/esm/Components/Form/FormWrapper.js +5 -3
- package/dist/esm/Components/FormField/FormField.js +1 -1
- package/dist/esm/Components/Header/Header.js +1 -1
- package/dist/esm/Components/Header/HeaderActions.js +6 -4
- package/dist/esm/Components/Input/TextInput.js +2 -2
- package/dist/esm/Components/KanbanBoard/AccountCard.js +1 -1
- package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
- package/dist/esm/Components/KanbanBoard/KanbanBoard.js +11 -7
- package/dist/esm/Components/LauncherTrigger/LauncherTrigger.js +1 -1
- package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -1
- package/dist/esm/Components/MediaViewer/MediaViewer.js +5 -4
- package/dist/esm/Components/MediaViewer/components/MediaAudioPlayer.js +5 -1
- package/dist/esm/Components/MediaViewer/components/MediaImageViewer.js +19 -8
- package/dist/esm/Components/MediaViewer/components/MediaScrubber.js +7 -2
- package/dist/esm/Components/MediaViewer/components/MediaVideoPlayer.js +3 -1
- package/dist/esm/Components/MediaViewer/components/ViewerIconButton.js +3 -1
- package/dist/esm/Components/MediaViewer/mediaItems.js +4 -0
- package/dist/esm/Components/Modal/Modal.js +2 -17
- package/dist/esm/Components/Modal/warnDroppedSlotChildren.js +7 -3
- package/dist/esm/Components/NavLauncher/LauncherTabs.js +2 -1
- package/dist/esm/Components/NavLauncher/NavLauncher.js +51 -26
- package/dist/esm/Components/NavLauncher/ScopeBar.js +4 -2
- package/dist/esm/Components/NavLauncher/engine/engine.js +2 -1
- package/dist/esm/Components/NavLauncher/engine/fold.js +2 -1
- package/dist/esm/Components/NavLauncher/launcherMotion.js +11 -0
- package/dist/esm/Components/NavLauncher/launcherParts.js +40 -8
- package/dist/esm/Components/NavLauncher/searchLayout.js +1 -0
- package/dist/esm/Components/NavLauncher/spotlightParts.js +23 -10
- package/dist/esm/Components/NavLauncher/useCopiedFlash.js +17 -0
- package/dist/esm/Components/NavigationBar/NavigationBar.js +6 -5
- package/dist/esm/Components/NoteTextArea/NoteTextArea.js +12 -17
- package/dist/esm/Components/Notification/Notification.js +20 -22
- package/dist/esm/Components/NotificationBell/notificationHelpers.js +12 -6
- package/dist/esm/Components/OffersList/OffersList.js +4 -2
- package/dist/esm/Components/OptionChip/OptionChip.js +3 -2
- package/dist/esm/Components/OptionChip/optionInk.js +4 -2
- package/dist/esm/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +14 -7
- package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -8
- package/dist/esm/Components/PlanPill/PlanPill.js +4 -2
- package/dist/esm/Components/ProductCard/ProductCardAction.js +2 -1
- package/dist/esm/Components/ProductCard/ProductCardSwatches.js +2 -1
- package/dist/esm/Components/ProductDetails/ProductDetails.js +2 -1
- package/dist/esm/Components/ProfileCard/ProfileCard.js +6 -17
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +4 -2
- package/dist/esm/Components/ProgressBar/ProgressBar.js +2 -1
- package/dist/esm/Components/QuantityStepper/QuantityStepper.js +5 -2
- package/dist/esm/Components/QueryState/QueryStateBoundary.js +5 -1
- package/dist/esm/Components/RadioButton/RadioButton.js +2 -3
- package/dist/esm/Components/RolesPermission/RolesPermission.js +12 -8
- package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +9 -3
- package/dist/esm/Components/SearchSelect/SearchSelect.js +8 -5
- package/dist/esm/Components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/esm/Components/Select/Select.js +6 -0
- package/dist/esm/Components/Select/SelectPopup.js +171 -64
- package/dist/esm/Components/Select/groupedWindow.js +44 -0
- package/dist/esm/Components/SelectSearch/SelectSearch.js +49 -39
- package/dist/esm/Components/SelectV2/SelectV2.js +1 -1
- package/dist/esm/Components/SideBar/SecondaryBar.js +3 -2
- package/dist/esm/Components/SideBar/components/MenuItemBox.js +3 -2
- package/dist/esm/Components/SideBar/components/MenuItems.js +1 -1
- package/dist/esm/Components/SideBar/components/OtherApps.js +2 -2
- package/dist/esm/Components/SideBar/components/PinnedSection.js +1 -1
- package/dist/esm/Components/SideBar/sidebarScale.js +2 -2
- package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +8 -3
- package/dist/esm/Components/SignInActivityTable/scrollRegionRing.js +9 -0
- package/dist/esm/Components/Slider/Slider.js +6 -5
- package/dist/esm/Components/StageProgress/StageItem.js +2 -1
- package/dist/esm/Components/StageProgress/StageProgress.js +8 -2
- package/dist/esm/Components/StageProgress/StepperStage.js +2 -1
- package/dist/esm/Components/StickyBuyBar/StickyBuyBar.js +2 -1
- package/dist/esm/Components/Table/Table.js +8 -6
- package/dist/esm/Components/Table/components/HeaderActions.js +7 -5
- package/dist/esm/Components/Table/components/TableBody.js +22 -8
- package/dist/esm/Components/Table/components/TableGroupRow.js +2 -1
- package/dist/esm/Components/Table/components/TableHeader.js +15 -21
- package/dist/esm/Components/Table/components/rowDetail.js +3 -2
- package/dist/esm/Components/Table/components/rowFocusRing.js +16 -0
- package/dist/esm/Components/Table/filters/ActiveFilters.js +8 -5
- package/dist/esm/Components/Table/filters/CompactSelect.js +2 -1
- package/dist/esm/Components/Table/filters/FilterDatePicker.js +20 -0
- package/dist/esm/Components/Table/filters/LeftFilterPane.js +14 -6
- package/dist/esm/Components/Table/hooks/useTable.js +11 -7
- package/dist/esm/Components/Table/settings/ManageColumns.js +4 -3
- package/dist/esm/Components/Table/settings/TableSettings.js +4 -4
- package/dist/esm/Components/Tabs/Tabs.js +1 -0
- package/dist/esm/Components/Tabs/components/TabList.js +1 -0
- package/dist/esm/Components/Tabs/components/TabPanel.js +1 -0
- package/dist/esm/Components/Tabs/tabStyles.js +5 -3
- package/dist/esm/Components/Tag/Tag.js +5 -4
- package/dist/esm/Components/Tag/Tag.styles.js +5 -4
- package/dist/esm/Components/Tag/tagDot.js +10 -3
- package/dist/esm/Components/TagInput/TagInput.js +8 -7
- package/dist/esm/Components/TagInput/tagEntries.js +16 -4
- package/dist/esm/Components/TimePicker/TimePicker.js +7 -3
- package/dist/esm/Components/Timeline/Timeline.js +14 -10
- package/dist/esm/Components/Toaster/Toaster.js +2 -1
- package/dist/esm/Components/Toggle/TableToggle.js +1 -1
- package/dist/esm/Components/UpgradeButton/UpgradeButton.js +3 -2
- package/dist/esm/Components/UserDetails/UserDetails.js +5 -7
- package/dist/esm/Components/WishlistToggle/WishlistToggle.js +2 -1
- package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +12 -2
- package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +3 -1
- package/dist/esm/Hooks/useOutsideMouseDown.js +26 -0
- package/dist/esm/Hooks/usePreferences.js +30 -12
- package/dist/esm/Hooks/useScrollableRegion.js +33 -0
- package/dist/esm/Theme/chakra/Menu.styles.js +6 -0
- package/dist/esm/Theme/chakra/componentStyles.js +1 -1
- package/dist/esm/Theme/chakra/focusRing.styles.js +3 -3
- package/dist/esm/Theme/chakra/paletteFromTheme.js +16 -3
- package/dist/esm/Theme/provider/ThemeSwitcher.js +1 -1
- package/dist/esm/Theme/tokens/builders/filledSurface.js +3 -2
- package/dist/esm/Theme/tokens/builders/focusRing.js +4 -1
- package/dist/esm/Theme/tokens/builders/paletteScale.js +6 -0
- package/dist/esm/Utils/tabular.js +56 -0
- package/dist/esm/index.js +16 -24
- package/dist/index.d.ts +54 -2
- package/dist/index.js +33 -29
- package/package.json +3 -1
- package/dist/Components/Buttons/Buttons.d.ts +0 -3
- package/dist/Components/Buttons/Buttons.js +0 -9
- package/dist/Components/Buttons/ButtonsProps.d.ts +0 -12
- package/dist/Components/Common/ErrorComponent.d.ts +0 -7
- package/dist/Components/Common/ErrorComponent.js +0 -16
- package/dist/Components/Common/FormattedDescription.d.ts +0 -7
- package/dist/Components/Common/FormattedDescription.js +0 -62
- package/dist/Components/Common/Label.d.ts +0 -9
- package/dist/Components/Common/Label.js +0 -12
- package/dist/Components/Input/Input/Input.d.ts +0 -4
- package/dist/Components/Input/Input/Input.js +0 -75
- package/dist/Components/Input/Input/InputProps.d.ts +0 -24
- package/dist/Components/Input/Input/InputProps.js +0 -2
- package/dist/Components/ProductCard/productCardFixtures.d.ts +0 -7
- package/dist/Components/ProductCard/productCardFixtures.js +0 -61
- package/dist/esm/Components/Buttons/Buttons.js +0 -4
- package/dist/esm/Components/Common/ErrorComponent.js +0 -14
- package/dist/esm/Components/Common/FormattedDescription.js +0 -60
- package/dist/esm/Components/Common/Label.js +0 -10
- package/dist/esm/Components/Input/Input/Input.js +0 -37
- package/dist/esm/Components/Input/Input/InputProps.js +0 -1
- package/dist/esm/Components/ProductCard/productCardFixtures.js +0 -58
- package/dist/esm/services/feedback.js +0 -15
- package/dist/services/feedback.d.ts +0 -12
- package/dist/services/feedback.js +0 -18
- /package/dist/Components/{Buttons/ButtonsProps.js → Common/dataAttributes.js} +0 -0
- /package/dist/esm/Components/{Buttons/ButtonsProps.js → Common/dataAttributes.js} +0 -0
|
@@ -2,8 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef, useState } from "react";
|
|
3
3
|
import { Box } from "@chakra-ui/react";
|
|
4
4
|
import { settleBetween } from "../../../Theme/tokens/builders/focusRing.js";
|
|
5
|
+
import { surfaceFocusRing } from "../../Common/surfaceFocusRing.js";
|
|
5
6
|
import { NUMERIC_TEXT } from "../../../Theme/tokens/primitives/typography.js";
|
|
6
7
|
import { useViewerChrome } from "../useViewerChrome.js";
|
|
8
|
+
import { transitionFor } from "../../../Theme/tokens/primitives/motion.js";
|
|
9
|
+
const HEIGHT_TRANSITION = transitionFor(["height"], "fast", "out");
|
|
10
|
+
const THUMB_TRANSITION = transitionFor(["width", "height"], "fast", "out");
|
|
7
11
|
const STEP_SECONDS = 5;
|
|
8
12
|
const BIG_STEP_SECONDS = 30;
|
|
9
13
|
const clamp = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
@@ -15,6 +19,7 @@ const MediaScrubber = ({ value, max, buffered = [], onSeek, onPreview, ariaLabel
|
|
|
15
19
|
const [hovering, setHovering] = useState(false);
|
|
16
20
|
const [previewX, setPreviewX] = useState(null);
|
|
17
21
|
const ring = settleBetween(chrome.accent, [chrome.stage, chrome.raised, chrome.hover]);
|
|
22
|
+
const focusShadow = surfaceFocusRing(chrome.stage, ring);
|
|
18
23
|
const disabled = isDisabled || !Number.isFinite(max) || max <= 0;
|
|
19
24
|
const fraction = disabled ? 0 : clamp(value / max, 0, 1);
|
|
20
25
|
const fractionAt = (clientX) => {
|
|
@@ -83,9 +88,9 @@ const MediaScrubber = ({ value, max, buffered = [], onSeek, onPreview, ariaLabel
|
|
|
83
88
|
setHovering(false);
|
|
84
89
|
if (!dragging.current)
|
|
85
90
|
endPreview();
|
|
86
|
-
}, children: [previewLabel !== null ? (_jsx(Box, { position: "absolute", bottom: "100%", style: { left: `${previewX}%` }, transform: "translateX(-50%)", mb: 1, px: 2, py: 0.5, borderRadius: "base", bg: chrome.raised, color: chrome.ink, fontSize: "xs", fontWeight: 600, whiteSpace: "nowrap", pointerEvents: "none", sx: NUMERIC_TEXT, "data-testid": testId ? `${testId}-tooltip` : undefined, children: previewLabel })) : null, _jsxs(Box, { ref: trackRef, role: "slider", tabIndex: disabled ? -1 : 0, "aria-label": ariaLabel, "aria-orientation": "horizontal", "aria-valuemin": 0, "aria-valuemax": disabled ? 0 : max, "aria-valuenow": disabled ? 0 : value, "aria-valuetext": disabled ? undefined : ariaValueText(value), "aria-disabled": disabled || undefined, position: "relative", h: trackH, borderRadius: "full", bg: chrome.track, transition:
|
|
91
|
+
}, children: [previewLabel !== null ? (_jsx(Box, { position: "absolute", bottom: "100%", style: { left: `${previewX}%` }, transform: "translateX(-50%)", mb: 1, px: 2, py: 0.5, borderRadius: "base", bg: chrome.raised, color: chrome.ink, fontSize: "xs", fontWeight: 600, whiteSpace: "nowrap", pointerEvents: "none", sx: NUMERIC_TEXT, "data-testid": testId ? `${testId}-tooltip` : undefined, children: previewLabel })) : null, _jsxs(Box, { ref: trackRef, role: "slider", tabIndex: disabled ? -1 : 0, "aria-label": ariaLabel, "aria-orientation": "horizontal", "aria-valuemin": 0, "aria-valuemax": disabled ? 0 : max, "aria-valuenow": disabled ? 0 : value, "aria-valuetext": disabled ? undefined : ariaValueText(value), "aria-disabled": disabled || undefined, position: "relative", h: trackH, borderRadius: "full", bg: chrome.track, transition: HEIGHT_TRANSITION, onPointerDown: onPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onPointerCancel: onPointerUp, onKeyDown: onKeyDown, _focusVisible: { boxShadow: focusShadow }, "data-testid": testId, children: [buffered.map((range, i) => (_jsx(Box, { position: "absolute", top: 0, bottom: 0, style: {
|
|
87
92
|
left: `${disabled ? 0 : clamp(range.start / max, 0, 1) * 100}%`,
|
|
88
93
|
width: `${disabled ? 0 : (clamp(range.end / max, 0, 1) - clamp(range.start / max, 0, 1)) * 100}%`,
|
|
89
|
-
}, bg: chrome.hover, borderRadius: "full" }, i))), _jsx(Box, { position: "absolute", top: 0, bottom: 0, left: 0, style: { width: `${fraction * 100}%` }, bg: chrome.accent, borderRadius: "full" }), _jsx(Box, { position: "absolute", top: "50%", style: { left: `${fraction * 100}%` }, transform: "translate(-50%, -50%)", boxSize: hovering || dragging.current ? "14px" : "0px", borderRadius: "full", bg: chrome.ink, transition:
|
|
94
|
+
}, bg: chrome.hover, borderRadius: "full" }, i))), _jsx(Box, { position: "absolute", top: 0, bottom: 0, left: 0, style: { width: `${fraction * 100}%` }, bg: chrome.accent, borderRadius: "full" }), _jsx(Box, { position: "absolute", top: "50%", style: { left: `${fraction * 100}%` }, transform: "translate(-50%, -50%)", boxSize: hovering || dragging.current ? "14px" : "0px", borderRadius: "full", bg: chrome.ink, transition: THUMB_TRANSITION, pointerEvents: "none" })] })] }));
|
|
90
95
|
};
|
|
91
96
|
export default MediaScrubber;
|
|
@@ -5,6 +5,7 @@ import { keyframes } from "@emotion/react";
|
|
|
5
5
|
import { Captions, ChevronDown, ChevronLeft, ChevronRight, Download, Loader2, Maximize, Minimize, Pause, PictureInPicture2, Play, SkipBack, SkipForward, Volume2, VolumeX, } from "lucide-react";
|
|
6
6
|
import { useFullscreen } from "../../../Hooks/useFullscreen.js";
|
|
7
7
|
import { settleBetween } from "../../../Theme/tokens/builders/focusRing.js";
|
|
8
|
+
import { surfaceFocusRing } from "../../Common/surfaceFocusRing.js";
|
|
8
9
|
import { formatClock, isTypingTarget, isUnsupportedVideoSrc, PLAYBACK_SPEEDS, SEEK_STEP_SECONDS } from "../mediaItems.js";
|
|
9
10
|
import { useAutoHideChrome } from "../hooks/useAutoHideChrome.js";
|
|
10
11
|
import { usePrefersReducedMotion } from "../../../Theme/chakra/motion.js";
|
|
@@ -48,6 +49,7 @@ const MediaVideoPlayer = ({ item, label, onTimeChange, onPrevious, onNext, label
|
|
|
48
49
|
const iosFullscreen = !shellFullscreen && hasIosVideoFullscreen();
|
|
49
50
|
const pipSupported = typeof document !== "undefined" && document.pictureInPictureEnabled === true;
|
|
50
51
|
const ring = settleBetween(chrome.accent, [chrome.stage, chrome.raised, chrome.hover]);
|
|
52
|
+
const focusShadow = surfaceFocusRing(chrome.stage, ring);
|
|
51
53
|
const { visible: chromeVisible, handlers: chromeHandlers } = useAutoHideChrome(shellRef, playing && !unsupported);
|
|
52
54
|
const video = () => videoRef.current;
|
|
53
55
|
const togglePlay = () => {
|
|
@@ -238,6 +240,6 @@ const MediaVideoPlayer = ({ item, label, onTimeChange, onPrevious, onNext, label
|
|
|
238
240
|
}, onDurationChange: (e) => setDuration(e.currentTarget.duration), onVolumeChange: (e) => {
|
|
239
241
|
setVolume(e.currentTarget.volume);
|
|
240
242
|
setMuted(e.currentTarget.muted);
|
|
241
|
-
}, "data-testid": "media-video" })) }), buffering && !failed ? (_jsx(Box, { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", pointerEvents: "none", "data-testid": "media-video-buffering", children: _jsx(Box, { as: Loader2, boxSize: "40px", color: chrome.ink, sx: reducedMotion ? undefined : { animation: `${spin} 0.9s linear infinite` } }) })) : null, ripple ? (_jsx(Flex, { position: "absolute", top: 0, bottom: 0, left: ripple.side === "left" ? 0 : undefined, right: ripple.side === "right" ? 0 : undefined, w: "40%", align: "center", justify: "center", pointerEvents: "none", opacity: reducedMotion ? 1 : undefined, sx: reducedMotion ? undefined : { animation: `${rippleFade} ${RIPPLE_LIFETIME_MS}ms ease-out` }, children: _jsxs(Flex, { direction: "column", align: "center", gap: 1, color: chrome.ink, bg: chrome.scrim(0.35), borderRadius: "full", boxSize: "72px", justify: "center", children: [ripple.side === "left" ? _jsx(SkipBack, { size: 22, "aria-hidden": true }) : _jsx(SkipForward, { size: 22, "aria-hidden": true }), _jsx(Text, { fontSize: "xs", fontWeight: 600, children: `${SKIP_SECONDS}s` })] }) }, ripple.nonce)) : null, !playing && !failed ? (_jsx(IconButton, { "aria-label": labels.play, "aria-hidden": true, icon: _jsx(Play, { size: 36 }), onClick: togglePlay, position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", boxSize: { base: "64px", md: "88px" }, isRound: true, variant: "ghost", bg: chrome.raised, color: chrome.accent, _hover: { bg: chrome.hover }, _focusVisible: { boxShadow:
|
|
243
|
+
}, "data-testid": "media-video" })) }), buffering && !failed ? (_jsx(Box, { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", pointerEvents: "none", "data-testid": "media-video-buffering", children: _jsx(Box, { as: Loader2, boxSize: "40px", color: chrome.ink, sx: reducedMotion ? undefined : { animation: `${spin} 0.9s linear infinite` } }) })) : null, ripple ? (_jsx(Flex, { position: "absolute", top: 0, bottom: 0, left: ripple.side === "left" ? 0 : undefined, right: ripple.side === "right" ? 0 : undefined, w: "40%", align: "center", justify: "center", pointerEvents: "none", opacity: reducedMotion ? 1 : undefined, sx: reducedMotion ? undefined : { animation: `${rippleFade} ${RIPPLE_LIFETIME_MS}ms ease-out` }, children: _jsxs(Flex, { direction: "column", align: "center", gap: 1, color: chrome.ink, bg: chrome.scrim(0.35), borderRadius: "full", boxSize: "72px", justify: "center", children: [ripple.side === "left" ? _jsx(SkipBack, { size: 22, "aria-hidden": true }) : _jsx(SkipForward, { size: 22, "aria-hidden": true }), _jsx(Text, { fontSize: "xs", fontWeight: 600, children: `${SKIP_SECONDS}s` })] }) }, ripple.nonce)) : null, !playing && !failed ? (_jsx(IconButton, { "aria-label": labels.play, "aria-hidden": true, icon: _jsx(Play, { size: 36 }), onClick: togglePlay, position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", boxSize: { base: "64px", md: "88px" }, isRound: true, variant: "ghost", bg: chrome.raised, color: chrome.accent, _hover: { bg: chrome.hover }, _focusVisible: { boxShadow: focusShadow }, tabIndex: -1, transition: fadeTransition, zIndex: 3, "data-testid": "media-video-big-play" })) : null, _jsx(Box, { position: "absolute", top: 0, left: 0, right: 0, h: "72px", bgImage: scrimTop, pointerEvents: "none", opacity: showChrome ? 1 : 0, transition: fadeTransition, "aria-hidden": true }), _jsxs(Box, { position: "absolute", bottom: 0, left: 0, right: 0, zIndex: 3, bgImage: scrimBottom, pt: failed || duration <= 0 ? 2 : 10, px: 3, pb: 2, opacity: showChrome ? 1 : 0, visibility: showChrome ? "visible" : "hidden", transition: fadeTransition, children: [_jsx(TimelineScrubber, { timeline: timeline, duration: duration, buffered: buffered, onSeek: seekTo, ariaLabel: labels.seek, ariaValueText: (v) => labels.seekValue(clock(v), clock(duration)), formatTime: clock, isDisabled: failed || duration <= 0, testId: "media-video-seek" }), _jsxs(Flex, { role: "toolbar", "aria-label": labels.videoControls, align: "center", justify: "space-between", gap: 2, wrap: "wrap", mt: 1, children: [_jsxs(Flex, { align: "center", gap: 1, wrap: "wrap", children: [_jsx(ViewerIconButton, { label: playing ? labels.pause : labels.play, hint: "K", icon: playing ? _jsx(Pause, { size: 18 }) : _jsx(Play, { size: 18 }), onClick: togglePlay, testId: "media-video-toggle" }), _jsx(ViewerIconButton, { label: labels.rewind, hint: "J", icon: seekIcon(_jsx(SkipBack, { size: 16 })), onClick: () => seekBy(-SEEK_STEP_SECONDS), testId: "media-video-rewind" }), _jsx(ViewerIconButton, { label: labels.forward, hint: "L", icon: seekIcon(_jsx(SkipForward, { size: 16 })), onClick: () => seekBy(SEEK_STEP_SECONDS), testId: "media-video-forward" }), onPrevious ? (_jsx(ViewerIconButton, { label: labels.previous, icon: _jsx(ChevronLeft, { size: 18 }), onClick: onPrevious, testId: "media-video-previous" })) : null, onNext ? (_jsx(ViewerIconButton, { label: labels.next, icon: _jsx(ChevronRight, { size: 18 }), onClick: onNext, testId: "media-video-next" })) : null, _jsxs(Flex, { align: "center", onMouseEnter: () => setVolumeHover(true), onMouseLeave: () => setVolumeHover(false), sx: { "&:focus-within": { "--volume-w": "88px" } }, children: [_jsx(ViewerIconButton, { label: muted || volume === 0 ? labels.unmute : labels.mute, hint: "M", icon: muted || volume === 0 ? _jsx(VolumeX, { size: 18 }) : _jsx(Volume2, { size: 18 }), onClick: toggleMute, pressed: muted, testId: "media-video-mute" }), _jsx(Box, { w: volumeHover ? { base: "64px", md: "88px" } : { base: "64px", md: "0px" }, overflow: "hidden", px: volumeHover ? 1 : 0, transition: fadeTransition, sx: { "&:focus-within": { width: "88px", paddingInline: "4px" } }, children: _jsxs(Slider, { "aria-label": labels.volume, min: 0, max: 100, step: 5, value: effectiveVolume, onChange: changeVolume, focusThumbOnChange: false, getAriaValueText: (v) => `${v}%`, children: [_jsx(SliderTrack, { bg: chrome.track, h: "4px", borderRadius: "full", children: _jsx(SliderFilledTrack, { bg: chrome.ink }) }), _jsx(SliderThumb, { bg: chrome.ink, boxSize: "12px", _focusVisible: { boxShadow: focusShadow } })] }) })] }), _jsx(TimelineClock, { timeline: timeline, duration: duration, testId: "media-video-time" })] }), _jsxs(Flex, { align: "center", gap: 1, children: [_jsxs(Menu, { placement: "top-end", children: [_jsx(MenuButton, { "aria-label": labels.speed, h: "32px", px: 3, borderRadius: "full", borderWidth: "1px", borderColor: chrome.track, bg: chrome.raised, color: chrome.ink, fontSize: "sm", fontWeight: 600, _hover: { bg: chrome.hover }, _focusVisible: { boxShadow: focusShadow }, "data-testid": "media-video-speed", children: _jsxs(Flex, { as: "span", align: "center", gap: 1, children: [`${rate}x`, _jsx(ChevronDown, { size: 14, "aria-hidden": true })] }) }), _jsx(MenuList, { minW: "160px", bg: chrome.raised, zIndex: "popover", children: _jsx(MenuOptionGroup, { type: "radio", title: labels.speed, value: String(rate), onChange: (value) => changeRate(Number(value)), children: PLAYBACK_SPEEDS.map((speed) => (_jsx(MenuItemOption, { value: String(speed), bg: chrome.raised, color: chrome.ink, _hover: { bg: chrome.hover }, _focus: { bg: chrome.hover }, children: speed === 1 ? `1x - ${labels.normalSpeed}` : `${speed}x` }, speed))) }) })] }), hasCaptions ? (_jsx(ViewerIconButton, { label: labels.captions, hint: "C", icon: _jsx(Captions, { size: 18 }), onClick: toggleCaptions, pressed: captionsOn, testId: "media-video-captions" })) : null, pipSupported ? (_jsx(ViewerIconButton, { label: labels.pip, hint: "P", icon: _jsx(PictureInPicture2, { size: 18 }), onClick: () => void togglePip(), testId: "media-video-pip" })) : null, _jsx(ViewerIconButton, { label: labels.download, icon: _jsx(Download, { size: 18 }), href: item.src, testId: "media-video-download" }), shellFullscreen || iosFullscreen ? (_jsx(ViewerIconButton, { label: isFullscreen ? labels.exitFullscreen : labels.fullscreen, hint: "F", icon: isFullscreen ? _jsx(Minimize, { size: 18 }) : _jsx(Maximize, { size: 18 }), onClick: () => void toggleFullscreen(), pressed: isFullscreen, testId: "media-video-fullscreen" })) : null] })] })] })] }));
|
|
242
244
|
};
|
|
243
245
|
export default MediaVideoPlayer;
|
|
@@ -3,13 +3,15 @@ import { IconButton } from "@chakra-ui/react";
|
|
|
3
3
|
import ToolTip from "../../ToolTip/ToolTip.js";
|
|
4
4
|
import { useViewerChrome } from "../useViewerChrome.js";
|
|
5
5
|
import { settleBetween } from "../../../Theme/tokens/builders/focusRing.js";
|
|
6
|
+
import { surfaceFocusRing } from "../../Common/surfaceFocusRing.js";
|
|
6
7
|
/** Toolbar/nav button for the media lightbox — always painted against the fixed dark viewer chrome. */
|
|
7
8
|
const ViewerIconButton = ({ label, hint, icon, onClick, href, size = "md", round = false, pressed = false, isDisabled = false, testId, }) => {
|
|
8
9
|
const chrome = useViewerChrome();
|
|
9
10
|
const tooltipLabel = hint ? `${label} (${hint})` : label;
|
|
10
11
|
// The stage is a fixed dark chrome regardless of app mode, so the ring is settled against it directly.
|
|
11
12
|
const ring = settleBetween(chrome.accent, [chrome.stage, chrome.raised, chrome.hover]);
|
|
13
|
+
const focusShadow = surfaceFocusRing(chrome.stage, ring);
|
|
12
14
|
const linkProps = href ? { as: "a", href, download: true, rel: "noopener" } : {};
|
|
13
|
-
return (_jsx(ToolTip, { label: tooltipLabel, children: _jsx(IconButton, { "aria-label": label, "aria-pressed": href ? undefined : pressed, icon: icon, onClick: onClick, isDisabled: isDisabled, size: size, isRound: round, variant: "ghost", color: chrome.ink, bg: round || pressed ? chrome.raised : "transparent", _hover: { bg: chrome.hover }, _active: { bg: chrome.hover }, outline: "2px solid transparent", outlineOffset: "2px", _focusVisible: { boxShadow:
|
|
15
|
+
return (_jsx(ToolTip, { label: tooltipLabel, children: _jsx(IconButton, { "aria-label": label, "aria-pressed": href ? undefined : pressed, icon: icon, onClick: onClick, isDisabled: isDisabled, size: size, isRound: round, variant: "ghost", color: chrome.ink, bg: round || pressed ? chrome.raised : "transparent", _hover: { bg: chrome.hover }, _active: { bg: chrome.hover }, outline: "2px solid transparent", outlineOffset: "2px", _focusVisible: { boxShadow: focusShadow }, "data-testid": testId, ...linkProps }) }));
|
|
14
16
|
};
|
|
15
17
|
export default ViewerIconButton;
|
|
@@ -158,6 +158,10 @@ export function formatFileSize(bytes) {
|
|
|
158
158
|
return `${(bytes / 1024).toFixed(1)} KB`;
|
|
159
159
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
160
160
|
}
|
|
161
|
+
const UPLOADED_DATE = new Intl.DateTimeFormat("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
162
|
+
export function formatUploadedDate(value) {
|
|
163
|
+
return UPLOADED_DATE.format(new Date(value));
|
|
164
|
+
}
|
|
161
165
|
export function fileTypeLabel(src) {
|
|
162
166
|
const match = /\.([a-z0-9]{2,5})(?:[?#].*)?$/i.exec(src);
|
|
163
167
|
return match ? match[1].toUpperCase() : null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
2
|
import { Modal as ChakraModal, ModalOverlay, ModalContent, ModalHeader as ChakraModalHeader, ModalCloseButton, ModalBody as ChakraModalBody, ModalFooter as ChakraModalFooter, Flex, Spinner, Text, } from "@chakra-ui/react";
|
|
4
3
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
5
4
|
import { warnDroppedSlotChildren } from "./warnDroppedSlotChildren.js";
|
|
5
|
+
import { findSlot } from "../Common/findSlot.js";
|
|
6
6
|
export const ModalHeader = ({ children }) => {
|
|
7
7
|
return _jsx(_Fragment, { children: children });
|
|
8
8
|
};
|
|
@@ -12,22 +12,7 @@ export const ModalBody = ({ children }) => {
|
|
|
12
12
|
export const ModalFooter = ({ children }) => {
|
|
13
13
|
return _jsx(_Fragment, { children: children });
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
// Matches by type one Fragment deep, so `<>{cond && <ModalFooter>...</ModalFooter>}</>` isn't dropped.
|
|
17
|
-
const findSlot = (children, slot) => {
|
|
18
|
-
for (const child of React.Children.toArray(children)) {
|
|
19
|
-
if (!isReactElement(child))
|
|
20
|
-
continue;
|
|
21
|
-
if (child.type === slot)
|
|
22
|
-
return child;
|
|
23
|
-
if (child.type === React.Fragment) {
|
|
24
|
-
const nested = findSlot(child.props.children, slot);
|
|
25
|
-
if (nested)
|
|
26
|
-
return nested;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return undefined;
|
|
30
|
-
};
|
|
15
|
+
/** Dialog built from ModalHeader, ModalBody and ModalFooter slots; other children are dropped. */
|
|
31
16
|
export default function Modal({ size, isOpen = false, onClose, overlaybg, overlaybackdropFilter, overlaybackdropInvert, overlaybackdropBlur, isCentered, finalFocusRef, blockScrollOnMount = true, initialFocusRef, closeOnOverlayClick = true, closeOnEsc = true, trapFocus = true, motionPreset = "scale", scrollBehavior = "outside", children, isLoading, title, subtitle, hideCloseButton, contentProps, portalChildren, }) {
|
|
32
17
|
var _a, _b;
|
|
33
18
|
const { colors } = useCustomTheme();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
const
|
|
2
|
+
const warnedByOwner = new Map();
|
|
3
|
+
const PORTAL_ADVICE = "Pass nested dialogs and live regions through the portalChildren prop.";
|
|
3
4
|
const nameOf = (type) => {
|
|
4
5
|
if (typeof type === "string")
|
|
5
6
|
return type;
|
|
@@ -24,15 +25,18 @@ const collect = (children, slots, dropped) => {
|
|
|
24
25
|
dropped.set(child.type, nameOf(child.type));
|
|
25
26
|
}
|
|
26
27
|
};
|
|
27
|
-
export const warnDroppedSlotChildren = (owner, children, slots) => {
|
|
28
|
+
export const warnDroppedSlotChildren = (owner, children, slots, advice = PORTAL_ADVICE) => {
|
|
29
|
+
var _a;
|
|
28
30
|
if (process.env.NODE_ENV === "production")
|
|
29
31
|
return;
|
|
32
|
+
const warned = (_a = warnedByOwner.get(owner)) !== null && _a !== void 0 ? _a : new Set();
|
|
33
|
+
warnedByOwner.set(owner, warned);
|
|
30
34
|
const dropped = new Map();
|
|
31
35
|
collect(children, slots, dropped);
|
|
32
36
|
dropped.forEach((name, type) => {
|
|
33
37
|
if (warned.has(type))
|
|
34
38
|
return;
|
|
35
39
|
warned.add(type);
|
|
36
|
-
console.warn(`[pixelize-design-library] ${owner}: <${name}> is not a ${owner}Header/${owner}Body/${owner}Footer slot and was dropped.
|
|
40
|
+
console.warn(`[pixelize-design-library] ${owner}: <${name}> is not a ${owner}Header/${owner}Body/${owner}Footer slot and was dropped. ${advice}`);
|
|
37
41
|
});
|
|
38
42
|
};
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, Flex } from "@chakra-ui/react";
|
|
3
3
|
import { useRef } from "react";
|
|
4
4
|
import { focusVisibleStyles } from "../../Theme/chakra/focusRing.styles.js";
|
|
5
|
+
import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
|
|
5
6
|
import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
|
|
6
7
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
7
8
|
export const tabId = (base, id) => `${base}-tab-${id}`;
|
|
@@ -35,7 +36,7 @@ export function LauncherTabs({ tabs, selected, onSelect, idBase, label, onLeaveU
|
|
|
35
36
|
event.stopPropagation();
|
|
36
37
|
handle();
|
|
37
38
|
};
|
|
38
|
-
return (_jsx(Flex, { role: "tablist", "aria-label": label, "aria-orientation": "horizontal", flexShrink: 0, px: { base: "10px", md: "16px" }, gap: { base: 0, md: "4px" }, borderBottomWidth: "1px", borderColor: colors
|
|
39
|
+
return (_jsx(Flex, { role: "tablist", "aria-label": label, "aria-orientation": "horizontal", flexShrink: 0, px: { base: "10px", md: "16px" }, gap: { base: 0, md: "4px" }, borderBottomWidth: "1px", borderColor: raisedRule(colors), bg: colors.surfaceRaised, onKeyDown: onKeyDown, children: tabs.map((tab) => {
|
|
39
40
|
const isSelected = tab.id === selected;
|
|
40
41
|
return (_jsx(Box, { as: "button", type: "button", role: "tab", id: tabId(idBase, tab.id), ref: (node) => {
|
|
41
42
|
if (node)
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Flex, IconButton, Text, VisuallyHidden } from "@chakra-ui/react";
|
|
3
3
|
import { Search as SearchIcon, X } from "lucide-react";
|
|
4
|
-
import { useCallback, useEffect, useId, useMemo, useRef, useState, } from "react";
|
|
4
|
+
import { memo, useCallback, useEffect, useId, useMemo, useRef, useState, } from "react";
|
|
5
5
|
import { useMatchMedia } from "../../Hooks/useMatchMedia.js";
|
|
6
6
|
import { focusVisibleStyles } from "../../Theme/chakra/focusRing.styles.js";
|
|
7
|
-
import { reducedMotionSx } from "../../Theme/chakra/motion.js";
|
|
7
|
+
import { reducedMotionSx, usePrefersReducedMotion } from "../../Theme/chakra/motion.js";
|
|
8
8
|
import { chartMode } from "../../Theme/tokens/builders/chartColorsFromTheme.js";
|
|
9
9
|
import { placeholderInk } from "../../Theme/tokens/builders/placeholderInk.js";
|
|
10
10
|
import { listRowBackgrounds } from "../../Theme/tokens/builders/rowStates.js";
|
|
11
|
+
import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
|
|
11
12
|
import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
|
|
12
13
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
13
14
|
import { assignAppHues } from "../AppSwitcher/AppMark.js";
|
|
@@ -18,16 +19,18 @@ import ToolTip from "../ToolTip/ToolTip.js";
|
|
|
18
19
|
import { useIsTruncated } from "../../Hooks/useIsTruncated.js";
|
|
19
20
|
import { shortcutKeys } from "../AppSwitcher/AppSwitcherProps.js";
|
|
20
21
|
import Skeletons from "../Skeletons/Skeletons.js";
|
|
21
|
-
import { activeRowSurface, AppsSection, CountBadge, Highlight, HighlightOptionsProvider, isPlainClick, ITEM_SELECTOR, ModuleRow, NewTag, PinnedTile, PinTextButton, RailRow, ROW_CONTAINER, RowActions, RowIcon, RowTip, SectionHeader, titleInset, TouchDensity, useTouchDensity, WIDE_ROW, } from "./launcherParts.js";
|
|
22
|
+
import { activeRowSurface, AppsSection, CountBadge, Highlight, HighlightOptionsProvider, HintLabel, isPlainClick, ITEM_SELECTOR, ModuleRow, NewTag, PinnedTile, PinTextButton, RailRow, ROW_CONTAINER, RowActions, RulePlaneProvider, RowIcon, RowTip, SectionHeader, titleInset, TouchDensity, useTouchDensity, WIDE_ROW, } from "./launcherParts.js";
|
|
22
23
|
import { LauncherTabs, panelId, tabId, } from "./LauncherTabs.js";
|
|
23
24
|
import { filterItems, searchLauncherSections, } from "./match.js";
|
|
24
25
|
import NewTabLink from "./NewTabLink.js";
|
|
25
26
|
import PinToggle from "./PinToggle.js";
|
|
27
|
+
import { launcherSlide } from "./launcherMotion.js";
|
|
26
28
|
import { moveResult } from "./resultNavigation.js";
|
|
27
29
|
import { ScopeBar } from "./ScopeBar.js";
|
|
28
|
-
import { countByScope, inScope, layoutSearch, scopeGroups, takeTopHit, } from "./searchLayout.js";
|
|
30
|
+
import { copiesOnEnter, countByScope, inScope, layoutSearch, scopeGroups, takeTopHit, } from "./searchLayout.js";
|
|
29
31
|
import { createSpotlightIndex, matchAnswers, SCOPE_ACTIONS, SCOPE_ALL, SCOPE_SCREENS, searchSpotlight, spotlightBoosts, } from "./spotlight.js";
|
|
30
32
|
import { AnswerCard, describeFacts, PreviewPane, QuickActionsRow, ShowMoreOption, TopHitCard, } from "./spotlightParts.js";
|
|
33
|
+
import { useCopiedFlash } from "./useCopiedFlash.js";
|
|
31
34
|
const NO_APPS = [];
|
|
32
35
|
const MD_QUERY = "(min-width: 48em)";
|
|
33
36
|
const LG_QUERY = "(min-width: 62em)";
|
|
@@ -101,6 +104,7 @@ const DEFAULT_LABELS = {
|
|
|
101
104
|
matchedOn: "Matches",
|
|
102
105
|
answers: "Answers",
|
|
103
106
|
hintCopy: "copy",
|
|
107
|
+
hintExpand: "expand",
|
|
104
108
|
scopes: "Search in",
|
|
105
109
|
scopeAll: "All",
|
|
106
110
|
scopeChanged: (label) => `Showing ${label}`,
|
|
@@ -153,7 +157,7 @@ function Pane({ children, scrolls = false, }) {
|
|
|
153
157
|
}
|
|
154
158
|
function Rail({ label, children, scrolls = false, }) {
|
|
155
159
|
const { colors } = useCustomTheme();
|
|
156
|
-
return (_jsx(Flex, { "data-scroll-region": scrolls || undefined, as: "aside", "aria-label": label, direction: "column", gap: "16px", w: { base: "100%", lg: RAIL_WIDTH }, flexShrink: 0, px: "14px", pt: "12px", pb: "16px", bg: colors.backgroundColor.subtle, borderTopWidth: { base: "1px", lg: 0 }, borderLeftWidth: { base: 0, lg: "1px" }, borderColor: colors
|
|
160
|
+
return (_jsx(Flex, { "data-scroll-region": scrolls || undefined, as: "aside", "aria-label": label, direction: "column", gap: "16px", w: { base: "100%", lg: RAIL_WIDTH }, flexShrink: 0, px: "14px", pt: "12px", pb: "16px", bg: colors.backgroundColor.subtle, borderTopWidth: { base: "1px", lg: 0 }, borderLeftWidth: { base: 0, lg: "1px" }, borderColor: raisedRule(colors), overflowY: { base: "visible", lg: "auto" }, children: _jsx(RulePlaneProvider, { value: "recess", children: children }) }));
|
|
157
161
|
}
|
|
158
162
|
function SkeletonLayout({ label }) {
|
|
159
163
|
return (_jsxs(Flex, { role: "status", "aria-busy": "true", "aria-label": label, direction: { base: "column", lg: "row" }, flex: 1, minH: 0, children: [_jsx(Pane, { children: [0, 1, 2].map((section) => (_jsxs(Box, { children: [_jsx(Skeletons, { type: "skeleton", height: "0.75rem", width: "6rem" }), _jsx(ItemGrid, { children: [0, 1, 2, 3].map((row) => (_jsxs(Flex, { align: "center", gap: "10px", h: "34px", mt: 2, children: [_jsx(Skeletons, { type: "skeleton", height: "1rem", width: "1rem" }), _jsx(Skeletons, { type: "skeleton", height: "0.875rem", width: "8rem" })] }, row))) })] }, section))) }), _jsx(Rail, { label: label, children: [0, 1].map((group) => (_jsxs(Box, { children: [_jsx(Skeletons, { type: "skeleton", height: "0.75rem", width: "5rem" }), [0, 1, 2].map((row) => (_jsx(Skeletons, { type: "skeleton", height: "1.5rem", width: "100%", mt: 2 }, row)))] }, group))) })] }));
|
|
@@ -164,9 +168,9 @@ function SearchField({ inputRef, value, onChange, onKeyDown, labels, placeholder
|
|
|
164
168
|
var _a;
|
|
165
169
|
onChange("");
|
|
166
170
|
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
167
|
-
}, boxSize: "24px", borderRadius: "
|
|
171
|
+
}, boxSize: "24px", borderRadius: "md", bg: colors.backgroundColor.subtle, color: colors.textMuted, display: "inline-flex", alignItems: "center", justifyContent: "center", flexShrink: 0, sx: focusVisibleStyles(colors), children: _jsx(X, { size: 12, strokeWidth: 2.4, "aria-hidden": true }) })) : null, hint ? (_jsx(Box, { "aria-hidden": true, display: { base: "none", md: "block" }, children: _jsx(Kbd, { size: "xs", children: hint }) })) : null] }));
|
|
168
172
|
}
|
|
169
|
-
function SearchRow({ item, query, isActive, link, labels, optionId, isPinned, canPin, onPin, onOpen, onHover, describedBy, }) {
|
|
173
|
+
const SearchRow = memo(function SearchRow({ item, query, isActive, link, labels, optionId, index, isPinned, canPin, onPin, onOpen, onHover, describedBy, }) {
|
|
170
174
|
const { colors } = useCustomTheme();
|
|
171
175
|
const isTouch = useTouchDensity();
|
|
172
176
|
const isScreen = item.kind === "screen";
|
|
@@ -179,17 +183,17 @@ function SearchRow({ item, query, isActive, link, labels, optionId, isPinned, ca
|
|
|
179
183
|
const titleRef = title.ref;
|
|
180
184
|
const contextRef = context.ref;
|
|
181
185
|
const tipLabel = isScreen || !item.context ? fullLabel : `${fullLabel} · ${item.context}`;
|
|
182
|
-
return (_jsx(ToolTip, { label: tipLabel, placement: "top-start", isDisabled: !title.isTruncated && !context.isTruncated, children: _jsxs(Flex, { role: "presentation", "data-group": true, "data-reveal": isActive, position: "relative", align: "flex-start", gap: "10px", minH: isTouch ? "44px" : "34px", pl: "8px", pr: "4px", pt: isTouch ? "12px" : "7px", pb: isTouch ? "8px" : "5px", borderRadius: "
|
|
186
|
+
return (_jsx(ToolTip, { label: tipLabel, placement: "top-start", isDisabled: !title.isTruncated && !context.isTruncated, children: _jsxs(Flex, { role: "presentation", "data-group": true, "data-reveal": isActive, position: "relative", align: "flex-start", gap: "10px", minH: isTouch ? "44px" : "34px", pl: "8px", pr: "4px", pt: isTouch ? "12px" : "7px", pb: isTouch ? "8px" : "5px", borderRadius: "lg", transition: transitionFor(["background-color"]), onMouseMove: () => onHover(index), sx: isActive
|
|
183
187
|
? { ...ROW_CONTAINER, ...activeRowSurface(colors) }
|
|
184
188
|
: ROW_CONTAINER, children: [_jsxs(Flex, { id: optionId, role: "option", "aria-selected": isActive, "aria-describedby": describedBy, "data-active": isActive, flex: 1, minW: 0, align: "flex-start", gap: "10px", cursor: "pointer", onClick: () => {
|
|
185
189
|
if (!item.href)
|
|
186
|
-
onOpen();
|
|
187
|
-
}, children: [_jsx(RowIcon, { icon: item.icon, size: 16, mt: "2px" }), _jsxs(Flex, { direction: "column", flex: 1, minW: 0, children: [_jsxs(Flex, { align: "center", gap: "6px", minW: 0, h: "19px", overflow: item.keywordHint ? "hidden" : undefined, sx: titleInset(base, open, ENTER_CHIP_WIDTH), children: [_jsxs(Text, { ref: titleRef, fontSize: "13.5px", fontWeight: 500, color: colors.text[900], noOfLines: 1, minW: 0, ...(item.keywordHint ? { flexShrink: 0, maxW: "100%" } : {}), children: [_jsx(Highlight, { text: item.label, query: query }), isScreen ? (_jsx(Text, { as: "span", fontWeight: 400, color: colors.textMuted, children: ` — ${item.context}` })) : null] }), item.isNew ? _jsx(NewTag, { label: labels.newBadge }) : null, item.keywordHint ? (_jsx(Text, { as: "span", fontSize: "
|
|
190
|
+
onOpen(item);
|
|
191
|
+
}, children: [_jsx(RowIcon, { icon: item.icon, size: 16, mt: "2px" }), _jsxs(Flex, { direction: "column", flex: 1, minW: 0, children: [_jsxs(Flex, { align: "center", gap: "6px", minW: 0, h: "19px", overflow: item.keywordHint ? "hidden" : undefined, sx: titleInset(base, open, ENTER_CHIP_WIDTH), children: [_jsxs(Text, { ref: titleRef, fontSize: "13.5px", fontWeight: 500, color: colors.text[900], noOfLines: 1, minW: 0, ...(item.keywordHint ? { flexShrink: 0, maxW: "100%" } : {}), children: [_jsx(Highlight, { text: item.label, query: query }), isScreen ? (_jsx(Text, { as: "span", fontWeight: 400, color: colors.textMuted, children: ` — ${item.context}` })) : null] }), item.isNew ? _jsx(NewTag, { label: labels.newBadge }) : null, item.keywordHint ? (_jsx(Text, { as: "span", fontSize: "xs-minus", color: colors.textMuted, whiteSpace: "nowrap", minW: 0, flexShrink: 100, overflow: "hidden", textOverflow: "ellipsis", children: ` · ${item.keywordHint}` })) : null, item.hint ? (_jsx(Text, { as: "span", fontSize: "xs-minus", color: colors.textMuted, whiteSpace: "nowrap", children: item.hint })) : null] }), item.context && !isScreen ? (_jsx(Text, { ref: contextRef, fontSize: "xs-minus", lineHeight: "15px", color: colors.textMuted, noOfLines: 1, children: item.context })) : null] })] }), item.href ? (_jsx(Box, { as: link.linkAs, href: item.href, tabIndex: -1, "aria-hidden": true, onClick: link.onPlainClick, position: "absolute", inset: 0, borderRadius: "lg" })) : null, _jsx(RowActions, { children: _jsxs(Box, { "aria-hidden": true, display: "contents", children: [isActive ? (_jsx(Box, { sx: {
|
|
188
192
|
display: "none",
|
|
189
193
|
[WIDE_ROW]: { display: "inline-flex" },
|
|
190
194
|
"@media (hover: none)": { display: "none" },
|
|
191
|
-
}, children: _jsx(KbdShortcut, { shortcut: "enter", size: "xs" }) })) : null, _jsx(CountBadge, { value: item.badge }), hasStar ? (_jsx(PinToggle, { isPinned: isPinned, label: isPinned ? labels.unpin(item.label) : labels.pin(item.label), title: "", onToggle: onPin, tabIndex: -1 })) : null, item.href ? (_jsx(NewTabLink, { href: item.href, label: labels.openInNewTab(isScreen ? `${item.label} — ${item.context}` : item.label), tip: labels.newTabTip, linkAs: link.linkAs, tabIndex: -1 })) : null] }) }), hasStar ? (_jsx(RowTip, { text: isPinned ? labels.unpinTip : labels.pinTip })) : null] }) }));
|
|
192
|
-
}
|
|
195
|
+
}, children: _jsx(KbdShortcut, { shortcut: "enter", size: "xs" }) })) : null, _jsx(CountBadge, { value: item.badge }), hasStar ? (_jsx(PinToggle, { isPinned: isPinned, label: isPinned ? labels.unpin(item.label) : labels.pin(item.label), title: "", onToggle: () => item.screenId && onPin(item.screenId), tabIndex: -1 })) : null, item.href ? (_jsx(NewTabLink, { href: item.href, label: labels.openInNewTab(isScreen ? `${item.label} — ${item.context}` : item.label), tip: labels.newTabTip, linkAs: link.linkAs, tabIndex: -1 })) : null] }) }), hasStar ? (_jsx(RowTip, { text: isPinned ? labels.unpinTip : labels.pinTip })) : null] }) }));
|
|
196
|
+
});
|
|
193
197
|
/** Left-drawer navigation launcher: browse every module, pins, Frequent, Recent, search and (compact) the suite's apps. */
|
|
194
198
|
export default function NavLauncher({ isOpen, onClose, sections: rawSections, pinnedIds, frequentIds, recentIds, onTogglePin, onNavigate, linkAs = "a", actions, extraResults, query: controlledQuery, onQueryChange, isSearching = false, isLoading = false, keyScreenLimit = 3, frequentLimit = 4, suggestions, searchHint, modKeyLabel, headerActions, maxWidth = "1080px", labels: labelOverrides, apps, currentAppId, onAppSelect, appsVisibility = "apps-on-compact", searchMode = "classic", synonyms, scopes, activeScope, onScopeChange, quickActions, answers, groupLimit, "data-testid": testId, }) {
|
|
195
199
|
var _a, _b, _c;
|
|
@@ -201,6 +205,7 @@ export default function NavLauncher({ isOpen, onClose, sections: rawSections, pi
|
|
|
201
205
|
const isDesktop = useMatchMedia(MD_QUERY, true);
|
|
202
206
|
const isLg = useMatchMedia(LG_QUERY, true);
|
|
203
207
|
const isWide = useMatchMedia(XL_QUERY, false);
|
|
208
|
+
const isReducedMotion = usePrefersReducedMotion();
|
|
204
209
|
const columns = isWide ? 3 : isDesktop ? 2 : 1;
|
|
205
210
|
const [innerQuery, setInnerQuery] = useState("");
|
|
206
211
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
@@ -208,6 +213,7 @@ export default function NavLauncher({ isOpen, onClose, sections: rawSections, pi
|
|
|
208
213
|
const [innerScope, setInnerScope] = useState(SCOPE_ALL);
|
|
209
214
|
const [expanded, setExpanded] = useState(NO_GROUPS);
|
|
210
215
|
const [announcement, setAnnouncement] = useState({ text: "", n: 0 });
|
|
216
|
+
const { copiedId, flash, clear: clearFlash } = useCopiedFlash();
|
|
211
217
|
const navigating = useRef(false);
|
|
212
218
|
const labels = useMemo(() => ({ ...DEFAULT_LABELS, ...labelOverrides }), [labelOverrides]);
|
|
213
219
|
const isControlled = controlledQuery !== undefined;
|
|
@@ -245,11 +251,12 @@ export default function NavLauncher({ isOpen, onClose, sections: rawSections, pi
|
|
|
245
251
|
setTab("menu");
|
|
246
252
|
setExpanded(NO_GROUPS);
|
|
247
253
|
setAnnouncement({ text: "", n: 0 });
|
|
254
|
+
clearFlash();
|
|
248
255
|
if (latest.current.query !== "")
|
|
249
256
|
latest.current.setQuery("");
|
|
250
257
|
if (latest.current.scope !== SCOPE_ALL)
|
|
251
258
|
latest.current.setScope(SCOPE_ALL, true);
|
|
252
|
-
}, [isOpen]);
|
|
259
|
+
}, [isOpen, clearFlash]);
|
|
253
260
|
useEffect(() => {
|
|
254
261
|
navigating.current = false;
|
|
255
262
|
setActiveIndex(0);
|
|
@@ -373,13 +380,15 @@ export default function NavLauncher({ isOpen, onClose, sections: rawSections, pi
|
|
|
373
380
|
const isTabbed = !isLg && !isListView && !isLoading && tabs.length > 1;
|
|
374
381
|
const activeTab = tabs.some((item) => item.id === tab) ? tab : "menu";
|
|
375
382
|
const countText = isSearchView && layout.total > 0 ? labels.resultsCount(layout.total) : "";
|
|
383
|
+
const closeRef = useRef(onClose);
|
|
384
|
+
closeRef.current = onClose;
|
|
376
385
|
const link = useMemo(() => ({
|
|
377
386
|
linkAs,
|
|
378
387
|
onPlainClick: (event) => {
|
|
379
388
|
if (isPlainClick(event))
|
|
380
|
-
|
|
389
|
+
closeRef.current();
|
|
381
390
|
},
|
|
382
|
-
}), [linkAs
|
|
391
|
+
}), [linkAs]);
|
|
383
392
|
const open = useCallback((item, newTab) => {
|
|
384
393
|
if (item.run) {
|
|
385
394
|
onClose();
|
|
@@ -392,16 +401,21 @@ export default function NavLauncher({ isOpen, onClose, sections: rawSections, pi
|
|
|
392
401
|
onClose();
|
|
393
402
|
onNavigate(item.href, { newTab });
|
|
394
403
|
}, [onClose, onNavigate]);
|
|
395
|
-
const
|
|
404
|
+
const rowHandlers = useRef({ open, togglePin: onTogglePin });
|
|
405
|
+
rowHandlers.current = { open, togglePin: onTogglePin };
|
|
406
|
+
const openRow = useCallback((item) => rowHandlers.current.open(item, false), []);
|
|
407
|
+
const pinRow = useCallback((screenId) => { var _a, _b; return (_b = (_a = rowHandlers.current).togglePin) === null || _b === void 0 ? void 0 : _b.call(_a, screenId); }, []);
|
|
408
|
+
const copyValue = useCallback(async (id, value, node) => {
|
|
396
409
|
try {
|
|
397
410
|
await navigator.clipboard.writeText(value);
|
|
398
411
|
announce(labels.copied);
|
|
412
|
+
flash(id);
|
|
399
413
|
}
|
|
400
414
|
catch {
|
|
401
415
|
selectNode(node);
|
|
402
416
|
announce(labels.copySelected);
|
|
403
417
|
}
|
|
404
|
-
}, [announce, labels]);
|
|
418
|
+
}, [announce, flash, labels]);
|
|
405
419
|
const onCopied = useCallback(() => announce(labels.copied), [announce, labels]);
|
|
406
420
|
const onCopyBlocked = useCallback((node) => {
|
|
407
421
|
selectNode(node);
|
|
@@ -417,9 +431,9 @@ export default function NavLauncher({ isOpen, onClose, sections: rawSections, pi
|
|
|
417
431
|
return;
|
|
418
432
|
}
|
|
419
433
|
const { item } = entry;
|
|
420
|
-
if (entry
|
|
434
|
+
if (copiesOnEnter(entry)) {
|
|
421
435
|
const node = document.getElementById(`${baseId}-opt-${index}-value`);
|
|
422
|
-
void copyValue((_b = (_a = item.answer) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : item.label, node);
|
|
436
|
+
void copyValue(item.id, (_b = (_a = item.answer) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : item.label, node);
|
|
423
437
|
return;
|
|
424
438
|
}
|
|
425
439
|
open(item, newTab);
|
|
@@ -708,9 +722,9 @@ export default function NavLauncher({ isOpen, onClose, sections: rawSections, pi
|
|
|
708
722
|
: isScopeBrowse
|
|
709
723
|
? labels.scopeEmpty((_a = currentScope === null || currentScope === void 0 ? void 0 : currentScope.label) !== null && _a !== void 0 ? _a : "")
|
|
710
724
|
: labels.noResults(trimmed);
|
|
711
|
-
const noResults = (_jsxs(Flex, { direction: "column", align: "center", gap: "12px", py: "48px", px: "20px", textAlign: "center", role: "status", children: [_jsx(Flex, { boxSize: "40px", borderRadius: "
|
|
725
|
+
const noResults = (_jsxs(Flex, { direction: "column", align: "center", gap: "12px", py: "48px", px: "20px", textAlign: "center", role: "status", children: [_jsx(Flex, { boxSize: "40px", borderRadius: "xl", bg: colors.backgroundColor.subtle, color: colors.textMuted, align: "center", justify: "center", children: _jsx(SearchIcon, { size: 18, strokeWidth: 2, "aria-hidden": true }) }), _jsxs(Flex, { direction: "column", gap: "3px", children: [_jsx(Text, { fontSize: "14px", fontWeight: 600, color: colors.text[900], children: emptyTitle }), hasHint ? (_jsx(Text, { fontSize: "xs-plus", color: colors.textMuted, children: (suggestions === null || suggestions === void 0 ? void 0 : suggestions.length)
|
|
712
726
|
? labels.suggestionsHint
|
|
713
|
-
: labels.noResultsHint })) : null] }), hasHint && (suggestions === null || suggestions === void 0 ? void 0 : suggestions.length) ? (_jsx(Flex, { wrap: "wrap", justify: "center", gap: "6px", children: suggestions.map((suggestion) => (_jsx(Box, { as: "button", type: "button", onClick: () => pickSuggestion(suggestion), h: "28px", px: "11px", borderRadius: "full", borderWidth: "1px", borderColor: colors
|
|
727
|
+
: labels.noResultsHint })) : null] }), hasHint && (suggestions === null || suggestions === void 0 ? void 0 : suggestions.length) ? (_jsx(Flex, { wrap: "wrap", justify: "center", gap: "6px", children: suggestions.map((suggestion) => (_jsx(Box, { as: "button", type: "button", onClick: () => pickSuggestion(suggestion), h: "28px", px: "11px", borderRadius: "full", borderWidth: "1px", borderColor: raisedRule(colors), bg: colors.surfaceRaised, fontSize: "xs-plus", fontWeight: 500, color: colors.text[900], transition: transitionFor(["background-color"]), _hover: { bg: listRowBackgrounds(colors).active }, sx: focusVisibleStyles(colors), children: suggestion }, suggestion))) })) : null] }));
|
|
714
728
|
const factsId = (index) => `${optionId(index)}-facts`;
|
|
715
729
|
const describedBy = (item, index) => { var _a; return ((_a = item.facts) === null || _a === void 0 ? void 0 : _a.length) ? factsId(index) : undefined; };
|
|
716
730
|
const cardProps = (item, index) => ({
|
|
@@ -725,7 +739,7 @@ export default function NavLauncher({ isOpen, onClose, sections: rawSections, pi
|
|
|
725
739
|
});
|
|
726
740
|
const renderBlock = (block) => {
|
|
727
741
|
if (block.type === "answers") {
|
|
728
|
-
return (_jsx(Flex, { role: "group", "aria-label": labels.answers, direction: "column", gap: "6px", children: block.items.map((item, i) => (_jsx(AnswerCard, { ...cardProps(item, block.start + i) }, item.id))) }, "answers"));
|
|
742
|
+
return (_jsx(Flex, { role: "group", "aria-label": labels.answers, direction: "column", gap: "6px", children: block.items.map((item, i) => (_jsx(AnswerCard, { ...cardProps(item, block.start + i), isCopied: copiedId === item.id }, item.id))) }, "answers"));
|
|
729
743
|
}
|
|
730
744
|
if (block.type === "top") {
|
|
731
745
|
return (_jsxs(Flex, { role: "group", "aria-label": labels.topHit, direction: "column", gap: "6px", children: [_jsx(SectionHeader, { label: labels.topHit, isDecorative: true }), _jsx(TopHitCard, { ...cardProps(block.item, block.start), query: query })] }, "top"));
|
|
@@ -734,7 +748,7 @@ export default function NavLauncher({ isOpen, onClose, sections: rawSections, pi
|
|
|
734
748
|
const meta = group.isSection ? labels.found(group.items.length) : undefined;
|
|
735
749
|
return (_jsxs(Flex, { role: "group", "aria-label": meta ? `${group.label}, ${meta}` : group.label, direction: "column", gap: "3px", children: [_jsx(SectionHeader, { label: group.label, meta: meta ? `(${meta})` : undefined, isDecorative: true }), _jsx(ItemGrid, { columns: columns, children: block.visible.map((item, i) => {
|
|
736
750
|
const index = block.start + i;
|
|
737
|
-
return (_jsx(SearchRow, { item: item, query: query, isActive: index === active, link: link, labels: labels, optionId: optionId(index), isPinned: item.screenId ? pinned.has(item.screenId) : false, canPin: Boolean(onTogglePin) && item.kind === "module", onPin:
|
|
751
|
+
return (_jsx(SearchRow, { item: item, query: query, isActive: index === active, link: link, labels: labels, optionId: optionId(index), index: index, isPinned: item.screenId ? pinned.has(item.screenId) : false, canPin: Boolean(onTogglePin) && item.kind === "module", onPin: pinRow, onOpen: openRow, onHover: setActiveIndex, describedBy: describedBy(item, index) }, item.id));
|
|
738
752
|
}) }), more ? (_jsx(ShowMoreOption, { count: more.count, isActive: more.index === active, optionId: optionId(more.index), label: labels.showMore, onExpand: () => activate(more.index, false), onHover: () => setActiveIndex(more.index) })) : null] }, group.id));
|
|
739
753
|
};
|
|
740
754
|
const searchPane = hasResults ? (_jsxs(HighlightOptionsProvider, { value: highlightOptions, children: [_jsx(Flex, { role: "listbox", id: listboxId, "aria-label": labels.title, "aria-busy": isSearching || undefined, direction: "column", gap: "14px", children: layout.blocks.map(renderBlock) }), entries.map((entry, index) => {
|
|
@@ -746,8 +760,18 @@ export default function NavLauncher({ isOpen, onClose, sections: rawSections, pi
|
|
|
746
760
|
entries.some((entry) => { var _a; return entry.type !== "more" && ((_a = entry.item.facts) === null || _a === void 0 ? void 0 : _a.length); });
|
|
747
761
|
const activeEntry = entries[active];
|
|
748
762
|
const activeItem = activeEntry && activeEntry.type !== "more" ? activeEntry.item : undefined;
|
|
749
|
-
const
|
|
750
|
-
const
|
|
763
|
+
const enterCopies = isListView && copiesOnEnter(activeEntry);
|
|
764
|
+
const enterExpands = isListView && (activeEntry === null || activeEntry === void 0 ? void 0 : activeEntry.type) === "more";
|
|
765
|
+
const enterLabel = enterCopies
|
|
766
|
+
? labels.hintCopy
|
|
767
|
+
: enterExpands
|
|
768
|
+
? labels.hintExpand
|
|
769
|
+
: labels.hintOpen;
|
|
770
|
+
const enterReserve = [labels.hintOpen, labels.hintCopy, labels.hintExpand].join("\n");
|
|
771
|
+
const canOpenInTab = !isListView || Boolean(activeItem === null || activeItem === void 0 ? void 0 : activeItem.href);
|
|
772
|
+
const isActiveCopied = enterCopies && activeItem !== undefined && copiedId === activeItem.id;
|
|
773
|
+
const dock = !isLg && isListView && !isLoading && ((_b = activeItem === null || activeItem === void 0 ? void 0 : activeItem.facts) === null || _b === void 0 ? void 0 : _b.length) ? (_jsx(PreviewPane, { item: activeItem, placement: "dock", enterCopies: enterCopies, isCopied: isActiveCopied, labels: labels, onCopied: onCopied, onCopyBlocked: onCopyBlocked })) : null;
|
|
774
|
+
const stacked = (_jsxs(_Fragment, { children: [_jsx(Pane, { scrolls: isLg, children: isListView ? searchPane : browsePane }), showPreview ? (_jsx(PreviewPane, { item: activeItem, placement: "side", width: RAIL_WIDTH, enterCopies: enterCopies, isCopied: isActiveCopied, labels: labels, onCopied: onCopied, onCopyBlocked: onCopyBlocked })) : (rail)] }));
|
|
751
775
|
const body = isLoading ? _jsx(SkeletonLayout, { label: labels.loading }) : stacked;
|
|
752
776
|
const titleId = `${baseId}-title`;
|
|
753
777
|
const scopeBar = hasScopes ? (_jsx(ScopeBar, { scopes: scopeChips, value: scope, onChange: (next) => setScope(next), label: labels.scopes, countLabel: labels.scopeCount })) : null;
|
|
@@ -767,7 +791,8 @@ export default function NavLauncher({ isOpen, onClose, sections: rawSections, pi
|
|
|
767
791
|
borderBottomRightRadius: { base: 0, lg: "16px" },
|
|
768
792
|
boxShadow: colors.boxShadow.default,
|
|
769
793
|
overflow: "hidden",
|
|
794
|
+
motionProps: launcherSlide(isReducedMotion),
|
|
770
795
|
onKeyDown: onContentKeyDown,
|
|
771
796
|
...{ "data-testid": testId },
|
|
772
|
-
}, children: [_jsxs(DrawerHeader, { p: 0, flexShrink: 0, children: [_jsxs(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: [_jsx(VisuallyHidden, { as: "h2", id: titleId, children: labels.title }), _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, _jsx(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: transitionFor(["width", "opacity"]), sx: { fontVariantNumeric: "tabular-nums", ...reducedMotionSx() }, children: countText }), headerActions ? (_jsx(Flex, { align: "center", gap: "4px", flexShrink: 0, children: headerActions })) : null, _jsx(IconButton, { "aria-label": labels.close, icon: _jsx(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 ? (_jsx(Box, { "data-testid": "launcher-scope-row", pl: "7px", pr: "3px", mt: "-6px", pb: "4px", children: scopeRow })) : null] }), _jsx(DrawerBody, { p: 0, display: "flex", flexDirection: "column", overflowY: "hidden", minH: 0, children: _jsxs(Flex, { ref: bodyRef, direction: "column", flex: 1, minH: 0, minW: 0, children: [_jsx(VisuallyHidden, { "data-testid": "launcher-live", "aria-live": "polite", "aria-atomic": "true", children: countText }), _jsx(VisuallyHidden, { "data-testid": "launcher-announce", "aria-live": "polite", "aria-atomic": "true", children: _jsx("span", { children: announcement.text }, announcement.n) }), isTabbed ? (_jsx(LauncherTabs, { tabs: tabs, selected: activeTab, onSelect: setTab, idBase: baseId, label: labels.tabsLabel, onLeaveUp: () => focusField(), onLeaveDown: () => moveFocus("first") })) : null, isLg ? (_jsx(Flex, { direction: "row", flex: 1, minH: 0, minW: 0, children: body })) : (compactBody), dock] }) }), _jsxs(DrawerFooter, { p: 0, minH: "32px", flexShrink: 0, px: "18px", py: "6px", gap: "6px 14px", flexWrap: "wrap", bg: colors.backgroundColor.subtle, fontSize: "
|
|
797
|
+
}, children: [_jsxs(DrawerHeader, { p: 0, flexShrink: 0, children: [_jsxs(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: [_jsx(VisuallyHidden, { as: "h2", id: titleId, children: labels.title }), _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, _jsx(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: transitionFor(["width", "opacity"]), sx: { fontVariantNumeric: "tabular-nums", ...reducedMotionSx() }, children: countText }), headerActions ? (_jsx(Flex, { align: "center", gap: "4px", flexShrink: 0, children: headerActions })) : null, _jsx(IconButton, { "aria-label": labels.close, icon: _jsx(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 ? (_jsx(Box, { "data-testid": "launcher-scope-row", pl: "7px", pr: "3px", mt: "-6px", pb: "4px", children: scopeRow })) : null] }), _jsx(DrawerBody, { p: 0, display: "flex", flexDirection: "column", overflowY: "hidden", minH: 0, children: _jsxs(Flex, { ref: bodyRef, direction: "column", flex: 1, minH: 0, minW: 0, children: [_jsx(VisuallyHidden, { "data-testid": "launcher-live", "aria-live": "polite", "aria-atomic": "true", children: countText }), _jsx(VisuallyHidden, { "data-testid": "launcher-announce", "aria-live": "polite", "aria-atomic": "true", children: _jsx("span", { children: announcement.text }, announcement.n) }), isTabbed ? (_jsx(LauncherTabs, { tabs: tabs, selected: activeTab, onSelect: setTab, idBase: baseId, label: labels.tabsLabel, onLeaveUp: () => focusField(), onLeaveDown: () => moveFocus("first") })) : null, isLg ? (_jsx(Flex, { direction: "row", flex: 1, minH: 0, minW: 0, children: body })) : (compactBody), dock] }) }), _jsxs(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: [_jsxs(Flex, { display: { base: "none", md: "flex" }, gap: "6px 14px", align: "center", wrap: "wrap", "aria-hidden": true, sx: { "@media (hover: none)": { display: "none" } }, children: [_jsxs(Flex, { as: "span", align: "center", gap: "5px", children: [_jsx(Flex, { as: "span", gap: "2px", children: ARROW_KEYS.map((arrow) => (_jsx(Kbd, { size: "xs", children: arrow }, arrow))) }), labels.hintMove] }), _jsxs(Flex, { as: "span", align: "center", gap: "5px", children: [_jsx(KbdShortcut, { shortcut: "enter", size: "xs" }), _jsx(HintLabel, { text: enterLabel, reserve: enterReserve })] }), _jsxs(Flex, { as: "span", align: "center", gap: "5px", opacity: canOpenInTab ? 1 : 0.45, transition: transitionFor(["opacity"]), sx: reducedMotionSx(), children: [modKeyLabel ? (_jsxs(Flex, { as: "span", gap: "4px", children: [_jsx(Kbd, { size: "xs", children: modKeyLabel }), _jsx(Kbd, { size: "xs", children: ENTER_KEY })] })) : (_jsx(KbdShortcut, { shortcut: "mod+enter", size: "xs" })), labels.hintNewTab] }), _jsxs(Flex, { as: "span", align: "center", gap: "5px", display: { base: "none", lg: "flex" }, children: [_jsx(Kbd, { size: "xs", children: modKeyLabel !== null && modKeyLabel !== void 0 ? modKeyLabel : MOD_KEY }), labels.hintClickNewTab] }), onTogglePin ? (_jsxs(Flex, { as: "span", align: "center", gap: "5px", children: [_jsx(Kbd, { size: "xs", children: "P" }), labels.hintPin] })) : null, _jsxs(Flex, { as: "span", align: "center", gap: "5px", children: [_jsx(KbdShortcut, { shortcut: "esc", size: "xs" }), labels.hintClose] })] }), _jsx(Text, { as: "span", ml: "auto", children: labels.footerNote })] })] }) }));
|
|
773
798
|
}
|
|
@@ -6,6 +6,7 @@ import { focusVisibleStyles } from "../../Theme/chakra/focusRing.styles.js";
|
|
|
6
6
|
import { reducedMotionSx, usePrefersReducedMotion, } from "../../Theme/chakra/motion.js";
|
|
7
7
|
import { AA_NON_TEXT, liftToContrast, } from "../../Theme/tokens/builders/outlineRung.js";
|
|
8
8
|
import { listRowBackgrounds } from "../../Theme/tokens/builders/rowStates.js";
|
|
9
|
+
import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
|
|
9
10
|
import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
|
|
10
11
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
11
12
|
const EDGE = 36;
|
|
@@ -27,7 +28,7 @@ const fadeMask = ({ start, end }) => start || end
|
|
|
27
28
|
function PageArrow({ side, onPage, }) {
|
|
28
29
|
const { colors } = useCustomTheme();
|
|
29
30
|
const Icon = side === "start" ? ChevronLeft : ChevronRight;
|
|
30
|
-
return (_jsx(Box, { as: "button", type: "button", tabIndex: -1, "aria-hidden": true, "data-testid": `launcher-scopes-${side}`, onMouseDown: (event) => event.preventDefault(), onClick: onPage, position: "absolute", top: "50%", left: side === "start" ? 0 : undefined, right: side === "end" ? 0 : undefined, transform: "translateY(-50%)", display: "inline-flex", alignItems: "center", justifyContent: "center", boxSize: "28px", borderRadius: "full", borderWidth: "1px", borderColor: colors
|
|
31
|
+
return (_jsx(Box, { as: "button", type: "button", tabIndex: -1, "aria-hidden": true, "data-testid": `launcher-scopes-${side}`, onMouseDown: (event) => event.preventDefault(), onClick: onPage, position: "absolute", top: "50%", left: side === "start" ? 0 : undefined, right: side === "end" ? 0 : undefined, transform: "translateY(-50%)", display: "inline-flex", alignItems: "center", justifyContent: "center", boxSize: "28px", borderRadius: "full", borderWidth: "1px", borderColor: raisedRule(colors), bg: colors.surfaceRaised, boxShadow: `0 1px 3px ${colors.boxShadow.default}`, color: colors.textMuted, cursor: "pointer", _hover: { color: colors.text[900] }, sx: { "@media (hover: none)": { display: "none" } }, children: _jsx(Icon, { size: 16, "aria-hidden": true }) }));
|
|
31
32
|
}
|
|
32
33
|
export function ScopeBar({ scopes, value, onChange, label, countLabel, }) {
|
|
33
34
|
const { colors } = useCustomTheme();
|
|
@@ -38,6 +39,7 @@ export function ScopeBar({ scopes, value, onChange, label, countLabel, }) {
|
|
|
38
39
|
const selected = Math.max(0, scopes.findIndex((scope) => scope.id === value));
|
|
39
40
|
const layoutKey = scopes.map((s) => { var _a; return `${s.id}:${(_a = s.count) !== null && _a !== void 0 ? _a : ""}`; }).join("|");
|
|
40
41
|
const edge = liftToContrast(colors.primary[500], colors.surfaceRaised, AA_NON_TEXT);
|
|
42
|
+
const rule = raisedRule(colors);
|
|
41
43
|
const measure = useCallback(() => {
|
|
42
44
|
const strip = stripRef.current;
|
|
43
45
|
if (!strip)
|
|
@@ -116,7 +118,7 @@ export function ScopeBar({ scopes, value, onChange, label, countLabel, }) {
|
|
|
116
118
|
chipRefs.current[index] = node;
|
|
117
119
|
}, role: "radio", "aria-checked": isSelected, "aria-label": hasCount
|
|
118
120
|
? countLabel(scope.label, (_a = scope.count) !== null && _a !== void 0 ? _a : 0)
|
|
119
|
-
: undefined, tabIndex: isSelected ? 0 : -1, onClick: () => onChange(scope.id), display: "inline-flex", alignItems: "center", gap: "6px", flexShrink: 0, h: "32px", pl: "12px", pr: hasCount ? "6px" : "12px", borderRadius: "full", borderWidth: "1px", borderColor: isSelected ? edge :
|
|
121
|
+
: undefined, tabIndex: isSelected ? 0 : -1, onClick: () => onChange(scope.id), display: "inline-flex", alignItems: "center", gap: "6px", flexShrink: 0, h: "32px", pl: "12px", pr: hasCount ? "6px" : "12px", borderRadius: "full", borderWidth: "1px", borderColor: isSelected ? edge : rule, bg: isSelected ? colors.primary[50] : colors.surfaceRaised, color: isSelected ? colors.accentText : colors.textMuted, fontSize: "xs-plus", fontWeight: isSelected ? 600 : 500, whiteSpace: "nowrap", cursor: "pointer", transition: transitionFor([
|
|
120
122
|
"background-color",
|
|
121
123
|
"border-color",
|
|
122
124
|
"color",
|
|
@@ -15,7 +15,8 @@ const SYNONYM_FACTOR = 0.92;
|
|
|
15
15
|
const STEM_PENALTY = 1;
|
|
16
16
|
const MAX_ALTERNATIVES = 12;
|
|
17
17
|
const UNBOUNDED_SLACK = 32;
|
|
18
|
-
|
|
18
|
+
// NOTE: code points, not a literal; see ANUSVARA in fold.ts.
|
|
19
|
+
const TAMIL_FINAL_MA = String.fromCodePoint(0x0bae, 0x0bcd);
|
|
19
20
|
const WORD_RE = /[\p{L}\p{N}\p{M}]+/gu;
|
|
20
21
|
const charBit = (code) => {
|
|
21
22
|
if (code >= 97 && code <= 122)
|
|
@@ -3,7 +3,8 @@ const OPTIONAL_MARKS =
|
|
|
3
3
|
// eslint-disable-next-line no-misleading-character-class -- each mark is removed on its own
|
|
4
4
|
/[\u0300-\u036f\u0591-\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06ed\u093c\u1ab0-\u1aff\u1dc0-\u1dff\u200c\u200d\u20d0-\u20ff\ufe20-\ufe2f]/g;
|
|
5
5
|
const CHANDRABINDU = /\u0901/g;
|
|
6
|
-
|
|
6
|
+
// NOTE: built from code points; minified Indic literals trip consumers' locale-data budget gates.
|
|
7
|
+
const ANUSVARA = String.fromCodePoint(0x0902);
|
|
7
8
|
const MARK = /\p{M}/u;
|
|
8
9
|
const SEPARATOR = /[^\p{L}\p{N}\p{M}]+/u;
|
|
9
10
|
const SPECIAL = {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EASINGS } from "@chakra-ui/react";
|
|
2
|
+
import { motionTransition } from "../../Theme/tokens/primitives/motion.js";
|
|
3
|
+
const ENTER = motionTransition("enter", "out");
|
|
4
|
+
const INSTANT = { duration: 0 };
|
|
5
|
+
const EXIT = { duration: 0.15, ease: [...EASINGS.easeInOut] };
|
|
6
|
+
export const launcherSlide = (isReducedMotion) => ({
|
|
7
|
+
variants: {
|
|
8
|
+
enter: { x: 0, y: 0, transition: isReducedMotion ? INSTANT : ENTER },
|
|
9
|
+
exit: { x: "-100%", y: 0, transition: EXIT },
|
|
10
|
+
},
|
|
11
|
+
});
|