@multiplatform.one/components 7.79.0 → 7.81.0
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/dist/cjs/CheckGlyph/MenuCheckColumn.cjs +56 -0
- package/dist/cjs/CheckGlyph/MenuCheckColumn.native.js +60 -0
- package/dist/cjs/CheckGlyph/MenuCheckColumn.native.js.map +1 -0
- package/dist/cjs/CheckGlyph/index.cjs +40 -0
- package/dist/cjs/CheckGlyph/index.native.js +44 -0
- package/dist/cjs/CheckGlyph/index.native.js.map +1 -0
- package/dist/cjs/ContextMenu/index.cjs +5 -22
- package/dist/cjs/ContextMenu/index.native.js +7 -25
- package/dist/cjs/ContextMenu/index.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/index.cjs +5 -17
- package/dist/cjs/DropdownMenu/index.native.js +7 -19
- package/dist/cjs/DropdownMenu/index.native.js.map +1 -1
- package/dist/cjs/Popover.cjs +2 -2
- package/dist/cjs/Popover.native.js +2 -2
- package/dist/cjs/Popover.native.js.map +1 -1
- package/dist/cjs/SchemeToggle/index.cjs +2 -2
- package/dist/cjs/SchemeToggle/index.native.js +2 -2
- package/dist/cjs/SchemeToggle/index.native.js.map +1 -1
- package/dist/cjs/SheetModal/index.cjs +4 -1
- package/dist/cjs/SheetModal/index.native.js +1 -1
- package/dist/cjs/SheetModal/index.native.js.map +1 -1
- package/dist/cjs/TreeSelect/index.cjs +2 -6
- package/dist/cjs/TreeSelect/index.native.js +2 -6
- package/dist/cjs/TreeSelect/index.native.js.map +1 -1
- package/dist/cjs/appShell/AppShell.cjs +438 -0
- package/dist/cjs/appShell/AppShell.native.js +505 -0
- package/dist/cjs/appShell/AppShell.native.js.map +1 -0
- package/dist/cjs/appShell/ScopeMenu.cjs +39 -16
- package/dist/cjs/appShell/ScopeMenu.native.js +43 -17
- package/dist/cjs/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/cjs/appShell/TabHost.native.js +41 -10
- package/dist/cjs/appShell/TabHost.native.js.map +1 -1
- package/dist/cjs/appShell/index.cjs +1 -0
- package/dist/cjs/appShell/index.native.js +1 -0
- package/dist/cjs/appShell/index.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +3 -0
- package/dist/cjs/layouts/page.native.js +3 -0
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/screenScroll.cjs +55 -0
- package/dist/cjs/layouts/screenScroll.native.js +59 -0
- package/dist/cjs/layouts/screenScroll.native.js.map +1 -1
- package/dist/cjs/layouts/sidebar.cjs +74 -16
- package/dist/cjs/layouts/sidebar.native.js +78 -16
- package/dist/cjs/layouts/sidebar.native.js.map +1 -1
- package/dist/esm/Accordion/index.native.js.map +1 -1
- package/dist/esm/AnimateHeight/index.native.js.map +1 -1
- package/dist/esm/Avatar/getInitials.native.js.map +1 -1
- package/dist/esm/Avatar/index.native.js.map +1 -1
- package/dist/esm/Badge/index.native.js.map +1 -1
- package/dist/esm/Button.native.js.map +1 -1
- package/dist/esm/Carousel/index.native.js.map +1 -1
- package/dist/esm/CheckGlyph/MenuCheckColumn.mjs +31 -0
- package/dist/esm/CheckGlyph/MenuCheckColumn.mjs.map +1 -0
- package/dist/esm/CheckGlyph/MenuCheckColumn.native.js +32 -0
- package/dist/esm/CheckGlyph/MenuCheckColumn.native.js.map +1 -0
- package/dist/esm/CheckGlyph/index.mjs +15 -0
- package/dist/esm/CheckGlyph/index.mjs.map +1 -0
- package/dist/esm/CheckGlyph/index.native.js +16 -0
- package/dist/esm/CheckGlyph/index.native.js.map +1 -0
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/Collapsible.native.js.map +1 -1
- package/dist/esm/ContextMenu/index.mjs +6 -23
- package/dist/esm/ContextMenu/index.mjs.map +1 -1
- package/dist/esm/ContextMenu/index.native.js +8 -26
- package/dist/esm/ContextMenu/index.native.js.map +1 -1
- package/dist/esm/CopyField/CopyMenuButton.native.js.map +1 -1
- package/dist/esm/CopyField/index.native.js.map +1 -1
- package/dist/esm/Dialog.native.js.map +1 -1
- package/dist/esm/Diff/diff.native.js.map +1 -1
- package/dist/esm/Diff/index.native.js.map +1 -1
- package/dist/esm/DotIndicator/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.mjs +6 -18
- package/dist/esm/DropdownMenu/index.mjs.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js +8 -20
- package/dist/esm/DropdownMenu/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/menuSettle.native.js.map +1 -1
- package/dist/esm/ElapsedProgress/index.native.js.map +1 -1
- package/dist/esm/ErrorBoundary/index.native.js.map +1 -1
- package/dist/esm/Heading.native.js.map +1 -1
- package/dist/esm/Kbd/index.native.js.map +1 -1
- package/dist/esm/Kbd/keys.native.js.map +1 -1
- package/dist/esm/Lightbox/MediaControl.native.js.map +1 -1
- package/dist/esm/Lightbox/index.gnome.native.js.map +1 -1
- package/dist/esm/Lightbox/shared.native.js.map +1 -1
- package/dist/esm/Lightbox/useLightbox.native.js.map +1 -1
- package/dist/esm/MachineLiteral/index.native.js.map +1 -1
- package/dist/esm/Material/index.native.js.map +1 -1
- package/dist/esm/Meter/index.native.js.map +1 -1
- package/dist/esm/Meter/meter.native.js.map +1 -1
- package/dist/esm/OverflowRow/index.native.js.map +1 -1
- package/dist/esm/Pagination.native.js.map +1 -1
- package/dist/esm/Popover.mjs +2 -2
- package/dist/esm/Popover.mjs.map +1 -1
- package/dist/esm/Popover.native.js +2 -2
- package/dist/esm/Popover.native.js.map +1 -1
- package/dist/esm/ProgressSteps/index.native.js.map +1 -1
- package/dist/esm/Quote/index.native.js.map +1 -1
- package/dist/esm/SchemeToggle/index.mjs +3 -3
- package/dist/esm/SchemeToggle/index.mjs.map +1 -1
- package/dist/esm/SchemeToggle/index.native.js +3 -3
- package/dist/esm/SchemeToggle/index.native.js.map +1 -1
- package/dist/esm/ScrollView/revealFocusedField.native.js.map +1 -1
- package/dist/esm/Separator/index.native.js.map +1 -1
- package/dist/esm/Sheet.native.js.map +1 -1
- package/dist/esm/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/esm/SheetModal/SheetNavigation.native.js.map +1 -1
- package/dist/esm/SheetModal/detents.native.js.map +1 -1
- package/dist/esm/SheetModal/index.mjs +5 -2
- package/dist/esm/SheetModal/index.mjs.map +1 -1
- package/dist/esm/SheetModal/index.native.js +2 -2
- package/dist/esm/SheetModal/index.native.js.map +1 -1
- package/dist/esm/SheetModal/useSheetFrameFocus.native.js.map +1 -1
- package/dist/esm/Skeleton/index.native.js.map +1 -1
- package/dist/esm/SkipLink/index.native.js.map +1 -1
- package/dist/esm/SortableList/SortableHandle.native.js.map +1 -1
- package/dist/esm/SortableList/index.native.js.map +1 -1
- package/dist/esm/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/esm/SortableList/useUserOrder.native.js.map +1 -1
- package/dist/esm/Tabs/index.native.js.map +1 -1
- package/dist/esm/Text.native.js.map +1 -1
- package/dist/esm/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/esm/Toast/index.native.js.map +1 -1
- package/dist/esm/Toast/store.native.js.map +1 -1
- package/dist/esm/Tooltip/nativePress.native.js.map +1 -1
- package/dist/esm/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/esm/TreeSelect/index.mjs +4 -8
- package/dist/esm/TreeSelect/index.mjs.map +1 -1
- package/dist/esm/TreeSelect/index.native.js +4 -8
- package/dist/esm/TreeSelect/index.native.js.map +1 -1
- package/dist/esm/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/esm/Video/PlayerChrome.native.js.map +1 -1
- package/dist/esm/Video/VideoFrame.native.js.map +1 -1
- package/dist/esm/Video/types.native.js.map +1 -1
- package/dist/esm/Wheel/index.native.js.map +1 -1
- package/dist/esm/Wizard/index.native.js.map +1 -1
- package/dist/esm/actions/ActionBar.native.js.map +1 -1
- package/dist/esm/actions/DangerSection.native.js.map +1 -1
- package/dist/esm/actions/DestructiveAction.native.js.map +1 -1
- package/dist/esm/actions/HeaderActions.native.js.map +1 -1
- package/dist/esm/actions/StandardAction.native.js.map +1 -1
- package/dist/esm/actions/devWarn.native.js.map +1 -1
- package/dist/esm/actions/index.native.js.map +1 -1
- package/dist/esm/actions/severity.native.js.map +1 -1
- package/dist/esm/appShell/AppShell.mjs +412 -0
- package/dist/esm/appShell/AppShell.mjs.map +1 -0
- package/dist/esm/appShell/AppShell.native.js +476 -0
- package/dist/esm/appShell/AppShell.native.js.map +1 -0
- package/dist/esm/appShell/Dock.native.js.map +1 -1
- package/dist/esm/appShell/MpoTabHost.native.js.map +1 -1
- package/dist/esm/appShell/ScopeMenu.mjs +43 -20
- package/dist/esm/appShell/ScopeMenu.mjs.map +1 -1
- package/dist/esm/appShell/ScopeMenu.native.js +47 -21
- package/dist/esm/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/esm/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/esm/appShell/Springboard.native.js.map +1 -1
- package/dist/esm/appShell/SystemBar.native.js.map +1 -1
- package/dist/esm/appShell/TabBar.mjs.map +1 -1
- package/dist/esm/appShell/TabBar.native.js.map +1 -1
- package/dist/esm/appShell/TabHost.native.js +41 -12
- package/dist/esm/appShell/TabHost.native.js.map +1 -1
- package/dist/esm/appShell/appTile.native.js.map +1 -1
- package/dist/esm/appShell/bottomChrome.native.js.map +1 -1
- package/dist/esm/appShell/index.mjs +1 -0
- package/dist/esm/appShell/index.mjs.map +1 -1
- package/dist/esm/appShell/index.native.js +1 -0
- package/dist/esm/appShell/index.native.js.map +1 -1
- package/dist/esm/charts/Axis.native.js.map +1 -1
- package/dist/esm/charts/BarChart.native.js.map +1 -1
- package/dist/esm/charts/ChartDataView.native.js.map +1 -1
- package/dist/esm/charts/ChartSurface.native.js.map +1 -1
- package/dist/esm/charts/LineChart.native.js.map +1 -1
- package/dist/esm/charts/PieChart.native.js.map +1 -1
- package/dist/esm/charts/Sparkline.native.js.map +1 -1
- package/dist/esm/charts/accessibility.native.js.map +1 -1
- package/dist/esm/charts/chartHeight.native.js.map +1 -1
- package/dist/esm/charts/composeChart.native.js.map +1 -1
- package/dist/esm/charts/index.native.js.map +1 -1
- package/dist/esm/charts/math.native.js.map +1 -1
- package/dist/esm/charts/series.native.js.map +1 -1
- package/dist/esm/charts/svg.native.js.map +1 -1
- package/dist/esm/charts/types.native.js.map +1 -1
- package/dist/esm/charts/useChartTheme.native.js.map +1 -1
- package/dist/esm/code/Code/index.native.js.map +1 -1
- package/dist/esm/code/CodeBlock/index.native.js.map +1 -1
- package/dist/esm/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/esm/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
- package/dist/esm/code/Highlighter/index.native.js.map +1 -1
- package/dist/esm/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
- package/dist/esm/code/Pre/index.native.js.map +1 -1
- package/dist/esm/code/index.native.js.map +1 -1
- package/dist/esm/componentColors.native.js.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/esm/feedback/NotifyHost.native.js.map +1 -1
- package/dist/esm/feedback/copy.native.js.map +1 -1
- package/dist/esm/feedback/index.native.js.map +1 -1
- package/dist/esm/feedback/notify.native.js.map +1 -1
- package/dist/esm/feedback/route.native.js.map +1 -1
- package/dist/esm/feedback/store.native.js.map +1 -1
- package/dist/esm/formLayouts/FormLayouts.native.js.map +1 -1
- package/dist/esm/formLayouts/PreferencePanel.native.js.map +1 -1
- package/dist/esm/formLayouts/index.native.js.map +1 -1
- package/dist/esm/hooks/index.native.js.map +1 -1
- package/dist/esm/hooks/useClipboard.native.js.map +1 -1
- package/dist/esm/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/esm/hooks/useHoldCue.native.js.map +1 -1
- package/dist/esm/icons/CheckRegular.native.js.map +1 -1
- package/dist/esm/icons/MinusRegular.native.js.map +1 -1
- package/dist/esm/icons/index.native.js.map +1 -1
- package/dist/esm/icons/lucide.native.js.map +1 -1
- package/dist/esm/icons/themed.native.js.map +1 -1
- package/dist/esm/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/esm/images/Image/framing.native.js.map +1 -1
- package/dist/esm/images/Image/mediaRadius.native.js.map +1 -1
- package/dist/esm/images/Image/shared.native.js.map +1 -1
- package/dist/esm/images/Image/types.native.js.map +1 -1
- package/dist/esm/images/index.native.js.map +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/knobImmuneExports.native.js.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/esm/layouts/Debug/index.native.js.map +1 -1
- package/dist/esm/layouts/EmptyState.native.js.map +1 -1
- package/dist/esm/layouts/IdentityPlate.native.js.map +1 -1
- package/dist/esm/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/esm/layouts/PageTemplates.native.js.map +1 -1
- package/dist/esm/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/esm/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/esm/layouts/StatusDot.native.js.map +1 -1
- package/dist/esm/layouts/StatusGlyphStrip.native.js.map +1 -1
- package/dist/esm/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/esm/layouts/attachments.native.js.map +1 -1
- package/dist/esm/layouts/bottomAccessory.native.js.map +1 -1
- package/dist/esm/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/esm/layouts/index.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +4 -2
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +4 -2
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/esm/layouts/screenScroll.mjs +53 -1
- package/dist/esm/layouts/screenScroll.mjs.map +1 -1
- package/dist/esm/layouts/screenScroll.native.js +57 -1
- package/dist/esm/layouts/screenScroll.native.js.map +1 -1
- package/dist/esm/layouts/shellSidebarSlot.native.js.map +1 -1
- package/dist/esm/layouts/sidebar.mjs +74 -19
- package/dist/esm/layouts/sidebar.mjs.map +1 -1
- package/dist/esm/layouts/sidebar.native.js +78 -19
- package/dist/esm/layouts/sidebar.native.js.map +1 -1
- package/dist/esm/layouts/tags.native.js.map +1 -1
- package/dist/esm/layouts/timeline.native.js.map +1 -1
- package/dist/esm/layouts/toolbar.native.js.map +1 -1
- package/dist/esm/shared/actionScan.native.js.map +1 -1
- package/dist/esm/shared/i18n.native.js.map +1 -1
- package/dist/esm/shared/restoreRetries.native.js.map +1 -1
- package/dist/esm/shared/t.native.js.map +1 -1
- package/dist/esm/shared/textRidesText.native.js.map +1 -1
- package/dist/esm/shared/useReturnFocusOnClose.native.js.map +1 -1
- package/dist/esm/surfaces.native.js.map +1 -1
- package/dist/esm/tamagui.native.js.map +1 -1
- package/dist/esm/testSetup.native.js.map +1 -1
- package/dist/esm/utils/setTinted.native.js.map +1 -1
- package/dist/esm/utils/unwrapText.native.js.map +1 -1
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/Dashboard.native.js.map +1 -1
- package/dist/esm/views/Gantt.native.js.map +1 -1
- package/dist/esm/views/GanttDateGrip.native.js.map +1 -1
- package/dist/esm/views/ImageGrid.native.js.map +1 -1
- package/dist/esm/views/List.native.js.map +1 -1
- package/dist/esm/views/ListGroup.native.js.map +1 -1
- package/dist/esm/views/ListRow.native.js.map +1 -1
- package/dist/esm/views/Matrix.native.js.map +1 -1
- package/dist/esm/views/ReportBuilder.native.js.map +1 -1
- package/dist/esm/views/ShortcutCard.native.js.map +1 -1
- package/dist/esm/views/TreeView.native.js.map +1 -1
- package/dist/esm/views/calendarMath.native.js.map +1 -1
- package/dist/esm/views/ganttIntervals.native.js.map +1 -1
- package/dist/esm/views/ganttMath.native.js.map +1 -1
- package/dist/esm/views/index.native.js.map +1 -1
- package/dist/esm/views/kanbanDnd.native.js.map +1 -1
- package/dist/esm/views/matrixMath.native.js.map +1 -1
- package/dist/esm/views/sameNameScope.native.js.map +1 -1
- package/dist/esm/views/treeViewDnd.native.js.map +1 -1
- package/dist/esm/views/treeViewLayout.native.js.map +1 -1
- package/dist/esm/views/treeViewMotion.native.js.map +1 -1
- package/dist/esm/views/treeViewReveal.native.js.map +1 -1
- package/dist/esm/views/usePageFlowLoadMore.native.js.map +1 -1
- package/dist/esm/views/widgetChrome.native.js.map +1 -1
- package/dist/jsx/CheckGlyph/MenuCheckColumn.mjs +31 -0
- package/dist/jsx/CheckGlyph/MenuCheckColumn.mjs.map +1 -0
- package/dist/jsx/CheckGlyph/MenuCheckColumn.native.js +60 -0
- package/dist/jsx/CheckGlyph/MenuCheckColumn.native.js.map +1 -0
- package/dist/jsx/CheckGlyph/index.mjs +15 -0
- package/dist/jsx/CheckGlyph/index.mjs.map +1 -0
- package/dist/jsx/CheckGlyph/index.native.js +44 -0
- package/dist/jsx/CheckGlyph/index.native.js.map +1 -0
- package/dist/jsx/ContextMenu/index.mjs +6 -23
- package/dist/jsx/ContextMenu/index.mjs.map +1 -1
- package/dist/jsx/ContextMenu/index.native.js +7 -25
- package/dist/jsx/ContextMenu/index.native.js.map +1 -1
- package/dist/jsx/DropdownMenu/index.mjs +6 -18
- package/dist/jsx/DropdownMenu/index.mjs.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js +7 -19
- package/dist/jsx/DropdownMenu/index.native.js.map +1 -1
- package/dist/jsx/Popover.mjs +2 -2
- package/dist/jsx/Popover.mjs.map +1 -1
- package/dist/jsx/Popover.native.js +2 -2
- package/dist/jsx/Popover.native.js.map +1 -1
- package/dist/jsx/SchemeToggle/index.mjs +3 -3
- package/dist/jsx/SchemeToggle/index.mjs.map +1 -1
- package/dist/jsx/SchemeToggle/index.native.js +2 -2
- package/dist/jsx/SchemeToggle/index.native.js.map +1 -1
- package/dist/jsx/SheetModal/index.mjs +5 -2
- package/dist/jsx/SheetModal/index.mjs.map +1 -1
- package/dist/jsx/SheetModal/index.native.js +1 -1
- package/dist/jsx/SheetModal/index.native.js.map +1 -1
- package/dist/jsx/TreeSelect/index.mjs +4 -8
- package/dist/jsx/TreeSelect/index.mjs.map +1 -1
- package/dist/jsx/TreeSelect/index.native.js +2 -6
- package/dist/jsx/TreeSelect/index.native.js.map +1 -1
- package/dist/jsx/appShell/AppShell.mjs +412 -0
- package/dist/jsx/appShell/AppShell.mjs.map +1 -0
- package/dist/jsx/appShell/AppShell.native.js +505 -0
- package/dist/jsx/appShell/AppShell.native.js.map +1 -0
- package/dist/jsx/appShell/ScopeMenu.mjs +43 -20
- package/dist/jsx/appShell/ScopeMenu.mjs.map +1 -1
- package/dist/jsx/appShell/ScopeMenu.native.js +43 -17
- package/dist/jsx/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/jsx/appShell/TabBar.mjs.map +1 -1
- package/dist/jsx/appShell/TabBar.native.js.map +1 -1
- package/dist/jsx/appShell/TabHost.native.js +41 -10
- package/dist/jsx/appShell/TabHost.native.js.map +1 -1
- package/dist/jsx/appShell/index.mjs +1 -0
- package/dist/jsx/appShell/index.mjs.map +1 -1
- package/dist/jsx/appShell/index.native.js +1 -0
- package/dist/jsx/appShell/index.native.js.map +1 -1
- package/dist/jsx/feedback/NotifyHost.native.js +1 -1
- package/dist/jsx/formLayouts/PreferencePanel.native.js +1 -1
- package/dist/jsx/index.native.js +1 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js +1 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +4 -2
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +3 -0
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/screenScroll.mjs +53 -1
- package/dist/jsx/layouts/screenScroll.mjs.map +1 -1
- package/dist/jsx/layouts/screenScroll.native.js +59 -0
- package/dist/jsx/layouts/screenScroll.native.js.map +1 -1
- package/dist/jsx/layouts/sidebar.mjs +74 -19
- package/dist/jsx/layouts/sidebar.mjs.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js +78 -16
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/package.json +9 -9
- package/src/CheckGlyph/CheckGlyph.spec.tsx +46 -0
- package/src/CheckGlyph/MenuCheckColumn.tsx +32 -0
- package/src/CheckGlyph/index.tsx +12 -0
- package/src/ContextMenu/ContextMenu.spec.tsx +46 -1
- package/src/ContextMenu/index.tsx +5 -22
- package/src/DropdownMenu/DropdownMenu.avatarTrigger.spec.tsx +6 -9
- package/src/DropdownMenu/index.tsx +5 -18
- package/src/Popover.coverTrigger.spec.tsx +3 -3
- package/src/Popover.tsx +5 -5
- package/src/SchemeToggle/SchemeToggle.spec.tsx +5 -11
- package/src/SchemeToggle/SchemeToggle.stories.tsx +21 -0
- package/src/SchemeToggle/index.tsx +2 -1
- package/src/SheetModal/index.native.tsx +2 -1
- package/src/SheetModal/index.tsx +5 -2
- package/src/TreeSelect/index.tsx +2 -4
- package/src/appShell/AppShell.spec.tsx +289 -0
- package/src/appShell/AppShell.stories.tsx +112 -0
- package/src/appShell/AppShell.tsx +535 -0
- package/src/appShell/ScopeMenu.spec.tsx +22 -0
- package/src/appShell/ScopeMenu.tsx +57 -18
- package/src/appShell/TabBar.tsx +13 -3
- package/src/appShell/TabHost.native.spec.tsx +53 -6
- package/src/appShell/TabHost.native.tsx +50 -14
- package/src/appShell/TabHost.stories.tsx +72 -0
- package/src/appShell/index.ts +1 -0
- package/src/layouts/PageHeader.stories.tsx +3 -3
- package/src/layouts/Sidebar.spec.tsx +92 -1
- package/src/layouts/page.tsx +8 -0
- package/src/layouts/pageActionButton.spec.tsx +7 -3
- package/src/layouts/screenScroll.tsx +71 -0
- package/src/layouts/sidebar.tsx +102 -10
- package/types/CheckGlyph/MenuCheckColumn.d.ts +11 -0
- package/types/CheckGlyph/MenuCheckColumn.d.ts.map +1 -0
- package/types/CheckGlyph/index.d.ts +10 -0
- package/types/CheckGlyph/index.d.ts.map +1 -0
- package/types/ContextMenu/index.d.ts.map +1 -1
- package/types/DropdownMenu/index.d.ts.map +1 -1
- package/types/Popover.d.ts +1 -1
- package/types/Popover.d.ts.map +1 -1
- package/types/SchemeToggle/index.d.ts.map +1 -1
- package/types/SheetModal/index.d.ts.map +1 -1
- package/types/SheetModal/index.native.d.ts.map +1 -1
- package/types/TreeSelect/index.d.ts.map +1 -1
- package/types/appShell/AppShell.d.ts +47 -0
- package/types/appShell/AppShell.d.ts.map +1 -0
- package/types/appShell/ScopeMenu.d.ts +0 -18
- package/types/appShell/ScopeMenu.d.ts.map +1 -1
- package/types/appShell/TabBar.d.ts +12 -6
- package/types/appShell/TabBar.d.ts.map +1 -1
- package/types/appShell/TabHost.native.d.ts +23 -5
- package/types/appShell/TabHost.native.d.ts.map +1 -1
- package/types/appShell/index.d.ts +1 -0
- package/types/appShell/index.d.ts.map +1 -1
- package/types/layouts/page.d.ts +5 -0
- package/types/layouts/page.d.ts.map +1 -1
- package/types/layouts/screenScroll.d.ts +24 -0
- package/types/layouts/screenScroll.d.ts.map +1 -1
- package/types/layouts/sidebar.d.ts +37 -1
- package/types/layouts/sidebar.d.ts.map +1 -1
|
@@ -14,13 +14,16 @@
|
|
|
14
14
|
* side, never one menu with two sections.
|
|
15
15
|
*
|
|
16
16
|
* Narrow viewports and native get FloatingPanel's sheet (phones take
|
|
17
|
-
* sheets)
|
|
17
|
+
* sheets). A sheet isn't over its trigger, so it drops the first row for a
|
|
18
|
+
* sheet title, the picker's label (FZ-8557).
|
|
18
19
|
*/
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
20
|
+
import { CheckGlyph } from "../CheckGlyph";
|
|
21
|
+
import { FloatingPanel, type PanelWidth, useInPanelSheet } from "@multiplatform.one/forms";
|
|
22
|
+
import { menuRowCheckGlyph, menuRowChecked, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
23
|
+
import { CaretDownIcon, CaretUpIcon } from "@phosphor-icons/react";
|
|
22
24
|
import { useState } from "react";
|
|
23
|
-
import { XStack, YStack } from "tamagui";
|
|
25
|
+
import { View, XStack, YStack } from "tamagui";
|
|
26
|
+
import { OverlayHeader } from "../actions/StandardAction";
|
|
24
27
|
import { SizableText } from "../Text";
|
|
25
28
|
|
|
26
29
|
export interface ScopeMenuOption {
|
|
@@ -60,8 +63,8 @@ function ScopeRow({
|
|
|
60
63
|
ariaLabel?: string;
|
|
61
64
|
}) {
|
|
62
65
|
const { knobProps, control } = useResolvedKnobs();
|
|
66
|
+
const inSheet = useInPanelSheet();
|
|
63
67
|
const iconSize = Number(knobProps.controlIcon?.width) || undefined;
|
|
64
|
-
const checkInk = useMenuRowCheckInk();
|
|
65
68
|
const Chevron = chevron === "up" ? CaretUpIcon : CaretDownIcon;
|
|
66
69
|
return (
|
|
67
70
|
<XStack
|
|
@@ -71,8 +74,11 @@ function ScopeRow({
|
|
|
71
74
|
{...(role === "menuitemradio" ? { "aria-checked": !!checked } : {})}
|
|
72
75
|
alignItems="center"
|
|
73
76
|
gap="$2"
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
// A menu row is the menu row recipe's height, a touch target on a phone
|
|
78
|
+
// (44pt, HIG); the bar trigger and its echo keep the bar's size.
|
|
79
|
+
minHeight={role === "menuitemradio" ? knobProps.menuRow.minHeight : "$3"}
|
|
80
|
+
// A phone sheet's rows keep HIG's 16pt gutter; a bar menu's hug the trigger.
|
|
81
|
+
paddingHorizontal={inSheet ? "$4" : "$2.5"}
|
|
76
82
|
cursor="pointer"
|
|
77
83
|
onPress={onPress}
|
|
78
84
|
// The echo row is the trigger itself, laid on the panel (LC-112): the
|
|
@@ -91,8 +97,8 @@ function ScopeRow({
|
|
|
91
97
|
{...(chevron === "down" ? { borderRadius: knobProps.borderRadius.borderRadius } : undefined)}
|
|
92
98
|
>
|
|
93
99
|
{role === "menuitemradio" ? (
|
|
94
|
-
<YStack width={
|
|
95
|
-
{checked ? <
|
|
100
|
+
<YStack width={menuRowCheckGlyph.size} alignItems="center" aria-hidden>
|
|
101
|
+
{checked ? <CheckGlyph /> : null}
|
|
96
102
|
</YStack>
|
|
97
103
|
) : null}
|
|
98
104
|
<SizableText size="$2" fontWeight={chevron ? "500" : "400"} numberOfLines={1}>
|
|
@@ -103,6 +109,42 @@ function ScopeRow({
|
|
|
103
109
|
);
|
|
104
110
|
}
|
|
105
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Over its trigger, the menu's first row is the pressed item with its chevron
|
|
114
|
+
* flipped (LC-112). A phone sheet isn't over its trigger, so it takes a sheet
|
|
115
|
+
* title, the picker's label, and a close (HIG, FZ-8557 Round 40).
|
|
116
|
+
*/
|
|
117
|
+
function ScopeMenuHead({
|
|
118
|
+
label,
|
|
119
|
+
currentLabel,
|
|
120
|
+
onClose,
|
|
121
|
+
testID,
|
|
122
|
+
}: {
|
|
123
|
+
label: string;
|
|
124
|
+
currentLabel: string;
|
|
125
|
+
onClose: () => void;
|
|
126
|
+
testID: string;
|
|
127
|
+
}) {
|
|
128
|
+
const inSheet = useInPanelSheet();
|
|
129
|
+
if (inSheet) {
|
|
130
|
+
return (
|
|
131
|
+
<View paddingHorizontal="$4" paddingBottom="$2">
|
|
132
|
+
<OverlayHeader title={label} onClose={onClose} testID={`${testID}-sheet-header`} />
|
|
133
|
+
</View>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
return (
|
|
137
|
+
<ScopeRow
|
|
138
|
+
role="button"
|
|
139
|
+
label={currentLabel}
|
|
140
|
+
chevron="up"
|
|
141
|
+
ariaLabel={`${label}: ${currentLabel}`}
|
|
142
|
+
onPress={onClose}
|
|
143
|
+
testID={`${testID}-first-row`}
|
|
144
|
+
/>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
106
148
|
export function ScopeMenu({
|
|
107
149
|
label,
|
|
108
150
|
options,
|
|
@@ -144,14 +186,11 @@ export function ScopeMenu({
|
|
|
144
186
|
}
|
|
145
187
|
>
|
|
146
188
|
<YStack role="menu" aria-label={label} data-testid={`${testID}-panel`}>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
ariaLabel={`${label}: ${currentLabel}`}
|
|
153
|
-
onPress={() => setOpen(false)}
|
|
154
|
-
testID={`${testID}-first-row`}
|
|
189
|
+
<ScopeMenuHead
|
|
190
|
+
label={label}
|
|
191
|
+
currentLabel={currentLabel}
|
|
192
|
+
onClose={() => setOpen(false)}
|
|
193
|
+
testID={testID}
|
|
155
194
|
/>
|
|
156
195
|
{options.map((option) => (
|
|
157
196
|
<ScopeRow
|
package/src/appShell/TabBar.tsx
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
import { zIndex } from "@multiplatform.one/forms";
|
|
22
22
|
import { isWeb } from "@multiplatform.one/platform";
|
|
23
23
|
import { type ComponentType, type ReactNode, useEffect, useState } from "react";
|
|
24
|
+
import type { ImageSourcePropType } from "react-native";
|
|
24
25
|
import { XStack, YStack } from "tamagui";
|
|
25
26
|
import { materials, useMaterial } from "../Material";
|
|
26
27
|
import { MaterialBlurFill } from "../Material/blur";
|
|
@@ -41,10 +42,19 @@ export interface TabBarItem {
|
|
|
41
42
|
label: string;
|
|
42
43
|
icon: TabBarIcon;
|
|
43
44
|
/**
|
|
44
|
-
* The
|
|
45
|
-
* on
|
|
45
|
+
* The glyphs the system tab bar draws (TabHost): SF Symbols on iOS, a
|
|
46
|
+
* raster template image on Android (Material's bar draws no SF Symbol or
|
|
47
|
+
* SVG; a bundled PNG, so an OTA can carry it). A platform keeps the MPO
|
|
48
|
+
* TabBar unless every item names its glyph.
|
|
46
49
|
*/
|
|
47
|
-
nativeIcon?:
|
|
50
|
+
nativeIcon?: TabBarNativeIcon;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface TabBarNativeIcon {
|
|
54
|
+
sfSymbol?: string;
|
|
55
|
+
sfSymbolSelected?: string;
|
|
56
|
+
/** A monochrome PNG (24dp, @2x and @3x beside it); the bar tints it. */
|
|
57
|
+
android?: ImageSourcePropType;
|
|
48
58
|
}
|
|
49
59
|
|
|
50
60
|
export interface TabBarProps {
|
|
@@ -16,23 +16,36 @@ import {
|
|
|
16
16
|
NativeTabHost,
|
|
17
17
|
TabHost,
|
|
18
18
|
itemsHaveNativeIcons,
|
|
19
|
+
nativeIconFor,
|
|
19
20
|
nativeTabBarHeight,
|
|
21
|
+
nativeTabsPlatforms,
|
|
20
22
|
resolveNativeTabs,
|
|
21
23
|
} from "./TabHost.native";
|
|
22
24
|
|
|
23
25
|
afterEach(cleanup);
|
|
24
26
|
|
|
25
27
|
const Glyph = () => null;
|
|
28
|
+
const png = (name: string) => ({ uri: `${name}.png`, width: 24, height: 24 });
|
|
26
29
|
|
|
27
30
|
const items: TabBarItem[] = [
|
|
28
31
|
{
|
|
29
32
|
key: "/",
|
|
30
33
|
label: "Home",
|
|
31
34
|
icon: Glyph,
|
|
32
|
-
nativeIcon: { sfSymbol: "house", sfSymbolSelected: "house.fill" },
|
|
35
|
+
nativeIcon: { sfSymbol: "house", sfSymbolSelected: "house.fill", android: png("house") },
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
key: "/pokemon",
|
|
39
|
+
label: "Pokemon",
|
|
40
|
+
icon: Glyph,
|
|
41
|
+
nativeIcon: { sfSymbol: "sparkles", android: png("sparkle") },
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
key: "/moves",
|
|
45
|
+
label: "Moves",
|
|
46
|
+
icon: Glyph,
|
|
47
|
+
nativeIcon: { sfSymbol: "bolt", android: png("lightning") },
|
|
33
48
|
},
|
|
34
|
-
{ key: "/pokemon", label: "Pokemon", icon: Glyph, nativeIcon: { sfSymbol: "sparkles" } },
|
|
35
|
-
{ key: "/moves", label: "Moves", icon: Glyph, nativeIcon: { sfSymbol: "bolt" } },
|
|
36
49
|
];
|
|
37
50
|
|
|
38
51
|
const fakeTabs: NativeTabs = {
|
|
@@ -58,7 +71,8 @@ const fakeTabs: NativeTabs = {
|
|
|
58
71
|
data-testid={`native-screen-${tabKey}`}
|
|
59
72
|
data-focused={String(Boolean(isFocused))}
|
|
60
73
|
data-inset-adjust={String(overrideScrollViewContentInsetAdjustmentBehavior)}
|
|
61
|
-
data-symbol={icon?.ios
|
|
74
|
+
data-symbol={icon?.ios?.name}
|
|
75
|
+
data-android-icon={(icon?.android?.imageSource as { uri?: string } | undefined)?.uri}
|
|
62
76
|
aria-label={title}
|
|
63
77
|
>
|
|
64
78
|
{children}
|
|
@@ -113,19 +127,49 @@ describe("native tabs detection", () => {
|
|
|
113
127
|
expect(resolveNativeTabs(sources(["RNSTabsHost", "RNSTabsScreen"], throws), "ios")).toBeNull();
|
|
114
128
|
});
|
|
115
129
|
|
|
116
|
-
it("keeps the MPO TabBar on Android and the web", () => {
|
|
130
|
+
it("keeps the MPO TabBar on Android and the web by default", () => {
|
|
117
131
|
const screens = vi.fn(() => ({ Tabs: fakeTabs }));
|
|
118
132
|
const all = sources(["RNSTabsHost", "RNSTabsScreen"], screens);
|
|
133
|
+
expect(nativeTabsPlatforms).toEqual({ ios: true, android: false });
|
|
119
134
|
expect(resolveNativeTabs(all, "android")).toBeNull();
|
|
120
135
|
expect(resolveNativeTabs(all, "web")).toBeNull();
|
|
121
136
|
expect(screens).not.toHaveBeenCalled();
|
|
122
137
|
});
|
|
123
138
|
|
|
124
|
-
it("
|
|
139
|
+
it("picks the Material bar on Android once the platform is switched on (FZ-8140)", () => {
|
|
140
|
+
const on = { ios: true, android: true };
|
|
141
|
+
expect(
|
|
142
|
+
resolveNativeTabs(
|
|
143
|
+
sources(["RNSTabsHost", "RNSTabsScreen"], () => ({ Tabs: fakeTabs })),
|
|
144
|
+
"android",
|
|
145
|
+
on,
|
|
146
|
+
),
|
|
147
|
+
).toBe(fakeTabs);
|
|
148
|
+
const screens = vi.fn(() => ({ Tabs: fakeTabs }));
|
|
149
|
+
expect(resolveNativeTabs(sources([], screens), "android", on)).toBeNull();
|
|
150
|
+
expect(screens).not.toHaveBeenCalled();
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
it("needs this platform's glyph on every item: an SF Symbol on iOS, a PNG on Android", () => {
|
|
125
154
|
expect(itemsHaveNativeIcons(items)).toBe(true);
|
|
155
|
+
expect(itemsHaveNativeIcons(items, "android")).toBe(true);
|
|
126
156
|
expect(itemsHaveNativeIcons([...items, { key: "/x", label: "X", icon: Glyph }])).toBe(false);
|
|
157
|
+
const symbolsOnly = items.map(({ nativeIcon, ...item }) => ({
|
|
158
|
+
...item,
|
|
159
|
+
nativeIcon: { sfSymbol: nativeIcon?.sfSymbol },
|
|
160
|
+
}));
|
|
161
|
+
expect(itemsHaveNativeIcons(symbolsOnly, "ios")).toBe(true);
|
|
162
|
+
expect(itemsHaveNativeIcons(symbolsOnly, "android")).toBe(false);
|
|
127
163
|
expect(itemsHaveNativeIcons([])).toBe(false);
|
|
128
164
|
});
|
|
165
|
+
|
|
166
|
+
it("hands react-native-screens each platform's glyph from the one item", () => {
|
|
167
|
+
expect(nativeIconFor(items[0]!)).toEqual({
|
|
168
|
+
ios: { type: "sfSymbol", name: "house" },
|
|
169
|
+
android: { type: "imageSource", imageSource: png("house") },
|
|
170
|
+
});
|
|
171
|
+
expect(nativeIconFor({ key: "/x", label: "X", icon: Glyph })).toEqual({});
|
|
172
|
+
});
|
|
129
173
|
});
|
|
130
174
|
|
|
131
175
|
describe("NativeTabHost", () => {
|
|
@@ -136,6 +180,9 @@ describe("NativeTabHost", () => {
|
|
|
136
180
|
expect(pokemon.contains(screen.getByTestId("page"))).toBe(true);
|
|
137
181
|
expect(screen.getByTestId("native-screen-/").getAttribute("data-focused")).toBe("false");
|
|
138
182
|
expect(screen.getByTestId("native-screen-/").getAttribute("data-symbol")).toBe("house");
|
|
183
|
+
expect(screen.getByTestId("native-screen-/").getAttribute("data-android-icon")).toBe(
|
|
184
|
+
"house.png",
|
|
185
|
+
);
|
|
139
186
|
expect(screen.getByTestId("native-host").getAttribute("data-hidden")).toBe("false");
|
|
140
187
|
expect(screen.queryByTestId("tab-bar")).toBeNull();
|
|
141
188
|
});
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
*
|
|
11
11
|
* The native view ships in react-native-screens' binary half, so it is
|
|
12
12
|
* feature-detected before react-native-screens' Tabs is required: a binary
|
|
13
|
-
* without RNSTabsHost, a platform
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* without RNSTabsHost, a platform switched off in `nativeTabsPlatforms`, or
|
|
14
|
+
* an item without its platform's glyph keeps the MPO TabBar. Android's arm
|
|
15
|
+
* (Material bottom navigation, PNG template icons) is built and switched off
|
|
16
|
+
* until an Android build proves it (FZ-8140).
|
|
16
17
|
*
|
|
17
18
|
* The bar's clearance is the inset this host publishes, as with the MPO
|
|
18
19
|
* TabBar, so a Screen pads by it whether or not it scrolls. Each tab screen
|
|
@@ -20,9 +21,13 @@
|
|
|
20
21
|
* otherwise flip the first scroll view to `automatic`, and UIKit would add
|
|
21
22
|
* the bar's height a second time (FZ-8640).
|
|
22
23
|
*/
|
|
23
|
-
import {
|
|
24
|
+
import {
|
|
25
|
+
useAccentTintedSurface,
|
|
26
|
+
useGlyphColor,
|
|
27
|
+
useIdentityInkOnSurface,
|
|
28
|
+
} from "@multiplatform.one/theme";
|
|
24
29
|
import { type ComponentType, type ReactNode, useEffect, useRef, useState } from "react";
|
|
25
|
-
import { Platform, UIManager } from "react-native";
|
|
30
|
+
import { type ImageSourcePropType, Platform, UIManager } from "react-native";
|
|
26
31
|
import { setBottomChromeInset } from "./bottomChrome";
|
|
27
32
|
import { useBottomInset } from "./bottomInset";
|
|
28
33
|
import { type TabBarItem, tabBarInactiveInk } from "./TabBar";
|
|
@@ -36,7 +41,17 @@ export const nativeTabsComponents = ["RNSTabsHost", "RNSTabsScreen"] as const;
|
|
|
36
41
|
/** Points the system tab bar covers above the home-indicator band. */
|
|
37
42
|
export const nativeTabBarHeight = 49;
|
|
38
43
|
|
|
39
|
-
type
|
|
44
|
+
type ImageIcon = { type: "imageSource"; imageSource: ImageSourcePropType };
|
|
45
|
+
type IconProp = { ios?: { type: "sfSymbol"; name: string }; android?: ImageIcon };
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The platforms whose system tab bar TabHost draws. Android stays off until
|
|
49
|
+
* an emulator build shows the Material bar in light and dark (FZ-8140).
|
|
50
|
+
*/
|
|
51
|
+
export const nativeTabsPlatforms: Readonly<Record<string, boolean>> = {
|
|
52
|
+
ios: true,
|
|
53
|
+
android: false,
|
|
54
|
+
};
|
|
40
55
|
|
|
41
56
|
export interface NativeTabs {
|
|
42
57
|
Host: ComponentType<{
|
|
@@ -47,6 +62,8 @@ export interface NativeTabs {
|
|
|
47
62
|
tabBarItemIconColorActive?: string;
|
|
48
63
|
tabBarItemTitleFontColor?: string;
|
|
49
64
|
tabBarItemTitleFontColorActive?: string;
|
|
65
|
+
tabBarBackgroundColor?: string;
|
|
66
|
+
tabBarItemActiveIndicatorColor?: string;
|
|
50
67
|
experimentalControlNavigationStateInJS?: boolean;
|
|
51
68
|
onNativeFocusChange?: (event: { nativeEvent: { tabKey: string } }) => void;
|
|
52
69
|
}>;
|
|
@@ -56,7 +73,7 @@ export interface NativeTabs {
|
|
|
56
73
|
title?: string;
|
|
57
74
|
isFocused?: boolean;
|
|
58
75
|
icon?: IconProp;
|
|
59
|
-
selectedIcon?:
|
|
76
|
+
selectedIcon?: { type: "sfSymbol"; name: string };
|
|
60
77
|
tabBarItemAccessibilityLabel?: string;
|
|
61
78
|
tabBarItemTestID?: string;
|
|
62
79
|
overrideScrollViewContentInsetAdjustmentBehavior?: boolean;
|
|
@@ -74,8 +91,12 @@ const appSources: NativeTabsSources = {
|
|
|
74
91
|
};
|
|
75
92
|
|
|
76
93
|
/** react-native-screens' Tabs, or null when this platform or binary cannot draw them. */
|
|
77
|
-
export function resolveNativeTabs(
|
|
78
|
-
|
|
94
|
+
export function resolveNativeTabs(
|
|
95
|
+
sources: NativeTabsSources,
|
|
96
|
+
os: string,
|
|
97
|
+
platforms: Readonly<Record<string, boolean>> = nativeTabsPlatforms,
|
|
98
|
+
): NativeTabs | null {
|
|
99
|
+
if (!platforms[os]) return null;
|
|
79
100
|
try {
|
|
80
101
|
if (!nativeTabsComponents.every((name) => sources.hasComponent(name))) return null;
|
|
81
102
|
const tabs = sources.screens().Tabs;
|
|
@@ -92,9 +113,20 @@ function loadNativeTabs(): NativeTabs | null {
|
|
|
92
113
|
return cached;
|
|
93
114
|
}
|
|
94
115
|
|
|
95
|
-
/** True when every item names the
|
|
96
|
-
export function itemsHaveNativeIcons(items: readonly TabBarItem[]): boolean {
|
|
97
|
-
|
|
116
|
+
/** True when every item names the glyph this platform's system bar draws. */
|
|
117
|
+
export function itemsHaveNativeIcons(items: readonly TabBarItem[], os = "ios"): boolean {
|
|
118
|
+
const glyph = (item: TabBarItem) =>
|
|
119
|
+
os === "android" ? item.nativeIcon?.android : item.nativeIcon?.sfSymbol;
|
|
120
|
+
return items.length > 0 && items.every((item) => Boolean(glyph(item)));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** The item's glyphs in react-native-screens' per-platform icon shape. */
|
|
124
|
+
export function nativeIconFor(item: TabBarItem): IconProp {
|
|
125
|
+
const { sfSymbol, android } = item.nativeIcon ?? {};
|
|
126
|
+
return {
|
|
127
|
+
...(sfSymbol ? { ios: { type: "sfSymbol" as const, name: sfSymbol } } : {}),
|
|
128
|
+
...(android ? { android: { type: "imageSource" as const, imageSource: android } } : {}),
|
|
129
|
+
};
|
|
98
130
|
}
|
|
99
131
|
|
|
100
132
|
export function NativeTabHost({
|
|
@@ -107,6 +139,8 @@ export function NativeTabHost({
|
|
|
107
139
|
const { Host, Screen } = tabs;
|
|
108
140
|
const accent = useIdentityInkOnSurface();
|
|
109
141
|
const ink = useGlyphColor(tabBarInactiveInk);
|
|
142
|
+
const surface = useGlyphColor("$color2");
|
|
143
|
+
const indicator = useAccentTintedSurface();
|
|
110
144
|
const deviceInset = useBottomInset();
|
|
111
145
|
const [id] = useState(() => Symbol("native-tab-host"));
|
|
112
146
|
const lastKey = useRef(activeKey ?? items[0]?.key);
|
|
@@ -126,6 +160,8 @@ export function NativeTabHost({
|
|
|
126
160
|
tabBarItemIconColorActive={accent}
|
|
127
161
|
tabBarItemTitleFontColor={ink}
|
|
128
162
|
tabBarItemTitleFontColorActive={accent}
|
|
163
|
+
tabBarBackgroundColor={surface}
|
|
164
|
+
tabBarItemActiveIndicatorColor={indicator}
|
|
129
165
|
experimentalControlNavigationStateInJS
|
|
130
166
|
onNativeFocusChange={(event) => {
|
|
131
167
|
const key = event.nativeEvent.tabKey;
|
|
@@ -138,7 +174,7 @@ export function NativeTabHost({
|
|
|
138
174
|
tabKey={item.key}
|
|
139
175
|
title={item.label}
|
|
140
176
|
isFocused={item.key === focusedKey}
|
|
141
|
-
icon={
|
|
177
|
+
icon={nativeIconFor(item)}
|
|
142
178
|
selectedIcon={
|
|
143
179
|
item.nativeIcon?.sfSymbolSelected
|
|
144
180
|
? { type: "sfSymbol", name: item.nativeIcon.sfSymbolSelected }
|
|
@@ -157,6 +193,6 @@ export function NativeTabHost({
|
|
|
157
193
|
|
|
158
194
|
export function TabHost(props: TabHostProps) {
|
|
159
195
|
const tabs = loadNativeTabs();
|
|
160
|
-
if (!tabs || !itemsHaveNativeIcons(props.items)) return <MpoTabHost {...props} />;
|
|
196
|
+
if (!tabs || !itemsHaveNativeIcons(props.items, Platform.OS)) return <MpoTabHost {...props} />;
|
|
161
197
|
return <NativeTabHost tabs={tabs} {...props} />;
|
|
162
198
|
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
|
+
import { HouseIcon, LightningIcon, SparkleIcon, SquaresFourIcon } from "@phosphor-icons/react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Screen } from "../layouts/page";
|
|
5
|
+
import { Text } from "../Text";
|
|
6
|
+
import type { TabBarItem } from "./TabBar";
|
|
7
|
+
import { TabHost } from "./TabHost";
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof TabHost> = {
|
|
10
|
+
title: "Components/TabHost",
|
|
11
|
+
component: TabHost,
|
|
12
|
+
parameters: { status: { type: "beta" }, layout: "fullscreen" },
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof TabHost>;
|
|
17
|
+
|
|
18
|
+
const items: TabBarItem[] = [
|
|
19
|
+
{
|
|
20
|
+
key: "/",
|
|
21
|
+
label: "Home",
|
|
22
|
+
icon: HouseIcon,
|
|
23
|
+
nativeIcon: { sfSymbol: "house", sfSymbolSelected: "house.fill" },
|
|
24
|
+
},
|
|
25
|
+
{ key: "/pokemon", label: "Pokemon", icon: SparkleIcon, nativeIcon: { sfSymbol: "sparkles" } },
|
|
26
|
+
{
|
|
27
|
+
key: "/moves",
|
|
28
|
+
label: "Moves",
|
|
29
|
+
icon: LightningIcon,
|
|
30
|
+
nativeIcon: { sfSymbol: "bolt", sfSymbolSelected: "bolt.fill" },
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: "/backoffice",
|
|
34
|
+
label: "Backoffice",
|
|
35
|
+
icon: SquaresFourIcon,
|
|
36
|
+
nativeIcon: { sfSymbol: "square.grid.2x2", sfSymbolSelected: "square.grid.2x2.fill" },
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
const rows = Array.from({ length: 30 }, (_, index) => `Row ${index + 1}`);
|
|
41
|
+
|
|
42
|
+
function Sections({ initial, outside }: { initial: string; outside?: boolean }) {
|
|
43
|
+
const [active, setActive] = useState(initial);
|
|
44
|
+
const label = items.find((item) => item.key === active)?.label;
|
|
45
|
+
return (
|
|
46
|
+
<TabHost items={items} activeKey={outside ? undefined : active} onTabPress={setActive}>
|
|
47
|
+
<Screen>
|
|
48
|
+
<Text>{outside ? "A route under no tab" : label}</Text>
|
|
49
|
+
{rows.map((row) => (
|
|
50
|
+
<Text key={row}>{row}</Text>
|
|
51
|
+
))}
|
|
52
|
+
</Screen>
|
|
53
|
+
</TabHost>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* One tab config: the system tab bar on an iPhone whose binary carries
|
|
59
|
+
* native tabs, the MPO floating TabBar on the web, GNOME, Android and an
|
|
60
|
+
* older binary.
|
|
61
|
+
*/
|
|
62
|
+
export const Default: Story = {
|
|
63
|
+
render: () => <Sections initial="/pokemon" />,
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* A route under no tab (no `activeKey`): no bar on any platform, and the
|
|
68
|
+
* screen keeps its place. AppShell keeps the bar on routes below a tab.
|
|
69
|
+
*/
|
|
70
|
+
export const OutsideTabs: Story = {
|
|
71
|
+
render: () => <Sections initial="/pokemon" outside />,
|
|
72
|
+
};
|
package/src/appShell/index.ts
CHANGED
|
@@ -191,9 +191,9 @@ function Meter({ label, value, detail }: { label: string; value: number; detail:
|
|
|
191
191
|
);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
//
|
|
195
|
-
//
|
|
196
|
-
//
|
|
194
|
+
// LC-112 (FZ-8665 Round 45): each icon trigger's panel covers its button with
|
|
195
|
+
// no X, and a press outside closes it. The join panel's title sits on the
|
|
196
|
+
// panel's padding.
|
|
197
197
|
function AddNode() {
|
|
198
198
|
return (
|
|
199
199
|
<Popover anchorMode="cover-trigger">
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
2
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
3
3
|
import { Sidebar } from "./sidebar";
|
|
4
4
|
|
|
5
|
+
const surface = vi.hoisted(() => ({ touch: false }));
|
|
6
|
+
vi.mock("@multiplatform.one/theme", async (original) => ({
|
|
7
|
+
...(await original<typeof import("@multiplatform.one/theme")>()),
|
|
8
|
+
useTouchSurface: () => surface.touch,
|
|
9
|
+
}));
|
|
10
|
+
|
|
11
|
+
afterEach(() => {
|
|
12
|
+
surface.touch = false;
|
|
13
|
+
});
|
|
14
|
+
|
|
5
15
|
describe("Sidebar selection tier", () => {
|
|
6
16
|
it("paints active row labels and metadata with selection ink", () => {
|
|
7
17
|
const result = renderWithProviders(
|
|
@@ -120,3 +130,84 @@ describe("Sidebar footer", () => {
|
|
|
120
130
|
expect(result.getByTestId("rail").querySelector("[data-sidebar-footer]")).toBeNull();
|
|
121
131
|
});
|
|
122
132
|
});
|
|
133
|
+
|
|
134
|
+
describe("Sidebar rows on touch (FZ-8649)", () => {
|
|
135
|
+
const sections = [{ items: [{ value: "a", label: "Alpha", onPress: () => {} }] }];
|
|
136
|
+
|
|
137
|
+
it("holds a row to the 44pt floor on a touch surface", () => {
|
|
138
|
+
surface.touch = true;
|
|
139
|
+
const result = renderWithProviders(<Sidebar sections={sections} />);
|
|
140
|
+
expect(result.container.querySelector("[data-sidebar-row]")!.className).toContain("_mih-44px");
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
it("keeps a pointer rail at its token height", () => {
|
|
144
|
+
const result = renderWithProviders(<Sidebar sections={sections} />);
|
|
145
|
+
expect(result.container.querySelector("[data-sidebar-row]")!.className).not.toContain(
|
|
146
|
+
"_mih-44px",
|
|
147
|
+
);
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
describe("Sidebar hug (FZ-8649)", () => {
|
|
152
|
+
const sections = [{ items: [{ value: "a", label: "Alpha" }] }];
|
|
153
|
+
// Rows sit directly in the rail's first child unless a scroller wraps them.
|
|
154
|
+
const rowsAreDirect = (rail: HTMLElement) =>
|
|
155
|
+
Array.from(rail.firstElementChild!.children).some(
|
|
156
|
+
(child) => child.getAttribute("role") === "group",
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
it("fills its column by default and scrolls its rows", () => {
|
|
160
|
+
const result = renderWithProviders(
|
|
161
|
+
<Sidebar sections={sections} testID="rail" footer={<span>Account</span>} />,
|
|
162
|
+
);
|
|
163
|
+
const rail = result.getByTestId("rail");
|
|
164
|
+
expect(rail.className).toContain("_fg-1");
|
|
165
|
+
expect(rail.className).toContain("_h-10037");
|
|
166
|
+
expect(rail.querySelector("[data-sidebar-footer]")!.className).toContain("_mah-5037");
|
|
167
|
+
expect(rowsAreDirect(rail)).toBe(false);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
it("takes the height of its rows and leaves scrolling to the container", () => {
|
|
171
|
+
const result = renderWithProviders(
|
|
172
|
+
<Sidebar sections={sections} testID="rail" hug footer={<span>Account</span>} />,
|
|
173
|
+
);
|
|
174
|
+
const rail = result.getByTestId("rail");
|
|
175
|
+
expect(rail.className).not.toContain("_fg-1");
|
|
176
|
+
expect(rail.className).not.toContain("_h-10037");
|
|
177
|
+
expect(rail.querySelector("[data-sidebar-footer]")!.className).not.toContain("_mah-5037");
|
|
178
|
+
expect(rowsAreDirect(rail)).toBe(true);
|
|
179
|
+
expect(result.getByText("Alpha")).toBeTruthy();
|
|
180
|
+
expect(result.getByText("Account")).toBeTruthy();
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
describe("Sidebar on the shell material (FZ-7996)", () => {
|
|
185
|
+
const sections = [
|
|
186
|
+
{
|
|
187
|
+
items: [
|
|
188
|
+
{ value: "home", label: "Home", active: true, onPress: () => {} },
|
|
189
|
+
{ value: "pokemon", label: "Pokemon", onPress: () => {} },
|
|
190
|
+
{ value: "moves", label: "Moves", onPress: () => {} },
|
|
191
|
+
],
|
|
192
|
+
},
|
|
193
|
+
];
|
|
194
|
+
|
|
195
|
+
it("sets every row as a rounded pill with no rule between rows", () => {
|
|
196
|
+
const result = renderWithProviders(<Sidebar material sections={sections} />);
|
|
197
|
+
const rows = [...result.container.querySelectorAll("[data-sidebar-row]")];
|
|
198
|
+
expect(rows).toHaveLength(3);
|
|
199
|
+
for (const row of rows) {
|
|
200
|
+
expect(row.className).toMatch(/_btlr-/);
|
|
201
|
+
expect(row.className).toMatch(/_bbrr-/);
|
|
202
|
+
}
|
|
203
|
+
expect(rows[1]!.previousElementSibling).toBe(rows[0]);
|
|
204
|
+
expect(rows[2]!.previousElementSibling).toBe(rows[1]);
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
it("keeps the stacked group with rules between rows off the material", () => {
|
|
208
|
+
const result = renderWithProviders(<Sidebar sections={sections} />);
|
|
209
|
+
const rows = [...result.container.querySelectorAll("[data-sidebar-row]")];
|
|
210
|
+
expect(rows[1]!.previousElementSibling).not.toBe(rows[0]);
|
|
211
|
+
expect(rows[1]!.previousElementSibling?.hasAttribute("data-sidebar-row")).toBe(false);
|
|
212
|
+
});
|
|
213
|
+
});
|
package/src/layouts/page.tsx
CHANGED
|
@@ -67,6 +67,7 @@ import {
|
|
|
67
67
|
ScreenScrollScope,
|
|
68
68
|
TopBarSlot,
|
|
69
69
|
useLargeTitle,
|
|
70
|
+
useReportScreenScroll,
|
|
70
71
|
useScreenScroll,
|
|
71
72
|
useScreenScrollController,
|
|
72
73
|
useTopBarSlot,
|
|
@@ -97,6 +98,12 @@ function negateSpaceToken(token: string): `$-${string}` {
|
|
|
97
98
|
*/
|
|
98
99
|
export const CONTENT_MAX_WIDTH = layoutBreakpoints.xl;
|
|
99
100
|
|
|
101
|
+
/**
|
|
102
|
+
* The readable column an app shell centres its content in at regular width
|
|
103
|
+
* (UIKit's readableContentGuide): the two-pane budget breakpoint.
|
|
104
|
+
*/
|
|
105
|
+
export const READABLE_MAX_WIDTH = layoutBreakpoints.expanded;
|
|
106
|
+
|
|
100
107
|
export interface ScreenProps extends YStackProps {
|
|
101
108
|
/** Wrap content in a ScrollView. Default: true. */
|
|
102
109
|
scroll?: boolean;
|
|
@@ -271,6 +278,7 @@ function PageShell({
|
|
|
271
278
|
}: ScreenProps) {
|
|
272
279
|
const { knobProps } = useResolvedKnobs({ component: "Screen" });
|
|
273
280
|
const scrollState = useScreenScrollController();
|
|
281
|
+
useReportScreenScroll(scrollState.state, Boolean(topBar));
|
|
274
282
|
const [accessories] = useState(createBottomAccessoryStore);
|
|
275
283
|
const chromeInset = useBottomChromeInset();
|
|
276
284
|
const inset = noPadding ? null : (knobProps.panelPadding.padding as string);
|
|
@@ -57,11 +57,15 @@ describe("PageActionButton (LC-128, LC-172)", () => {
|
|
|
57
57
|
|
|
58
58
|
it("inks its glyph with the accent and keeps the back control's recipe", () => {
|
|
59
59
|
const { action, menu } = renderBar();
|
|
60
|
-
// The glyph
|
|
61
|
-
//
|
|
60
|
+
// The glyph carries the bar tint on its fill and its stroke, one ink
|
|
61
|
+
// (FZ-8649). The "…" beside it takes the bar tint too (LC-145, FZ-7993).
|
|
62
62
|
expect(rest(action, "_col-")).toHaveLength(1);
|
|
63
63
|
expect(rest(menu, "_col-")).toHaveLength(1);
|
|
64
|
-
|
|
64
|
+
const glyph = action.querySelector("svg");
|
|
65
|
+
const ink = glyph?.getAttribute("fill");
|
|
66
|
+
expect(ink).toBeTruthy();
|
|
67
|
+
expect(ink).not.toBe("currentColor");
|
|
68
|
+
if (glyph?.hasAttribute("stroke")) expect(glyph.getAttribute("stroke")).toBe(ink);
|
|
65
69
|
expect(action.getAttribute("data-size-token")).toBe(menu.getAttribute("data-size-token"));
|
|
66
70
|
expect(action.getAttribute("data-mp-button-height")).toBe(
|
|
67
71
|
menu.getAttribute("data-mp-button-height"),
|