@multiplatform.one/components 8.3.0 → 8.5.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/README.md +18 -3
- package/dist/cjs/Accordion/index.native.js +1 -1
- package/dist/cjs/Accordion/index.native.js.map +1 -1
- package/dist/cjs/Alert/index.native.js.map +1 -1
- package/dist/cjs/AnimateHeight/index.native.js.map +1 -1
- package/dist/cjs/Avatar/getInitials.native.js.map +1 -1
- package/dist/cjs/Avatar/index.native.js.map +1 -1
- package/dist/cjs/Badge/index.native.js.map +1 -1
- package/dist/cjs/Button.native.js.map +1 -1
- package/dist/cjs/Card.native.js.map +1 -1
- package/dist/cjs/CardFooter.native.js.map +1 -1
- package/dist/cjs/CardHeader.native.js.map +1 -1
- package/dist/cjs/Carousel/geometry.native.js.map +1 -1
- package/dist/cjs/Carousel/index.native.js +3 -3
- package/dist/cjs/Carousel/index.native.js.map +1 -1
- package/dist/cjs/ChatTurn/index.native.js.map +1 -1
- package/dist/cjs/CheckGlyph/MenuCheckColumn.native.js.map +1 -1
- package/dist/cjs/CheckGlyph/index.native.js.map +1 -1
- package/dist/cjs/Chip/index.cjs +1 -1
- package/dist/cjs/Chip/index.native.js +1 -1
- package/dist/cjs/Chip/index.native.js.map +1 -1
- package/dist/cjs/ChoiceChips/index.native.js +1 -1
- package/dist/cjs/ChoiceChips/index.native.js.map +1 -1
- package/dist/cjs/Collapsible.native.js.map +1 -1
- package/dist/cjs/ContextMenu/index.native.js.map +1 -1
- package/dist/cjs/CopyField/CopyMenuButton.native.js +1 -1
- package/dist/cjs/CopyField/CopyMenuButton.native.js.map +1 -1
- package/dist/cjs/CopyField/index.native.js.map +1 -1
- package/dist/cjs/Dialog.native.js +1 -1
- package/dist/cjs/Dialog.native.js.map +1 -1
- package/dist/cjs/Diff/diff.native.js.map +1 -1
- package/dist/cjs/Diff/index.native.js.map +1 -1
- package/dist/cjs/DotIndicator/index.native.js.map +1 -1
- package/dist/cjs/DrillStack/DrillBar.native.js.map +1 -1
- package/dist/cjs/DrillStack/context.native.js.map +1 -1
- package/dist/cjs/DrillStack/drillMotion.native.js.map +1 -1
- package/dist/cjs/DropDownPanel/index.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/index.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/menuSettle.native.js.map +1 -1
- package/dist/cjs/ElapsedProgress/index.native.js.map +1 -1
- package/dist/cjs/ErrorBoundary/index.native.js.map +1 -1
- package/dist/cjs/Heading.native.js.map +1 -1
- package/dist/cjs/Kbd/index.native.js.map +1 -1
- package/dist/cjs/Kbd/keys.native.js.map +1 -1
- package/dist/cjs/Lightbox/MediaControl.native.js.map +1 -1
- package/dist/cjs/Lightbox/index.gnome.native.js.map +1 -1
- package/dist/cjs/Lightbox/index.native.js +1 -1
- package/dist/cjs/Lightbox/shared.native.js.map +1 -1
- package/dist/cjs/Lightbox/useLightbox.native.js.map +1 -1
- package/dist/cjs/MachineLiteral/index.native.js.map +1 -1
- package/dist/cjs/Material/blur.native.js +5 -1
- package/dist/cjs/Material/blur.native.js.map +1 -1
- package/dist/cjs/Material/index.native.js.map +1 -1
- package/dist/cjs/Meter/index.native.js +1 -1
- package/dist/cjs/Meter/index.native.js.map +1 -1
- package/dist/cjs/Meter/meter.native.js.map +1 -1
- package/dist/cjs/MiddleEllipsisText/middleSplit.native.js.map +1 -1
- package/dist/cjs/MiddleEllipsisText/types.native.js.map +1 -1
- package/dist/cjs/OverflowRow/index.native.js +1 -1
- package/dist/cjs/OverflowRow/index.native.js.map +1 -1
- package/dist/cjs/Pagination.native.js +1 -1
- package/dist/cjs/Pagination.native.js.map +1 -1
- package/dist/cjs/Popover.native.js +1 -1
- package/dist/cjs/Popover.native.js.map +1 -1
- package/dist/cjs/ProgressSteps/index.native.js.map +1 -1
- package/dist/cjs/Quote/index.native.js.map +1 -1
- package/dist/cjs/SchemeToggle/index.native.js +1 -1
- package/dist/cjs/SchemeToggle/index.native.js.map +1 -1
- package/dist/cjs/ScrollView/revealFocusedField.native.js.map +1 -1
- package/dist/cjs/ScrollView/useRevealFocusedField.native.js +3 -2
- package/dist/cjs/ScrollView/useRevealFocusedField.native.js.map +1 -1
- package/dist/cjs/Separator/index.native.js.map +1 -1
- package/dist/cjs/Sheet.native.js.map +1 -1
- package/dist/cjs/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/cjs/SheetModal/SheetNavigation.native.js.map +1 -1
- package/dist/cjs/SheetModal/detents.cjs +11 -37
- package/dist/cjs/SheetModal/detents.native.js +11 -43
- package/dist/cjs/SheetModal/detents.native.js.map +1 -1
- package/dist/cjs/SheetModal/index.cjs +13 -1
- package/dist/cjs/SheetModal/index.native.js +21 -11
- package/dist/cjs/SheetModal/index.native.js.map +1 -1
- package/dist/cjs/SheetModal/useSheetFrameFocus.native.js.map +1 -1
- package/dist/cjs/SheetScrollView/index.native.js +1 -1
- package/dist/cjs/SheetScrollView/index.native.js.map +1 -1
- package/dist/cjs/SheetScrollView/sheetHandoff.native.js.map +1 -1
- package/dist/cjs/Skeleton/index.native.js.map +1 -1
- package/dist/cjs/SkipLink/index.native.js.map +1 -1
- package/dist/cjs/SortableList/SortableHandle.native.js.map +1 -1
- package/dist/cjs/SortableList/index.native.js.map +1 -1
- package/dist/cjs/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/cjs/SortableList/useUserOrder.native.js.map +1 -1
- package/dist/cjs/SwipeDismissRow/index.native.js.map +1 -1
- package/dist/cjs/Tabs/index.cjs +16 -39
- package/dist/cjs/Tabs/index.native.js +18 -41
- package/dist/cjs/Tabs/index.native.js.map +1 -1
- package/dist/cjs/Text.native.js.map +1 -1
- package/dist/cjs/ThemePresetPicker/index.native.js +1 -1
- package/dist/cjs/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/cjs/Toast/index.native.js.map +1 -1
- package/dist/cjs/Toast/store.native.js.map +1 -1
- package/dist/cjs/Tooltip/index.native.js +9 -1
- package/dist/cjs/Tooltip/index.native.js.map +1 -1
- package/dist/cjs/Tooltip/nativePress.native.js.map +1 -1
- package/dist/cjs/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/cjs/TreeSelect/index.native.js +2 -2
- package/dist/cjs/TreeSelect/index.native.js.map +1 -1
- package/dist/cjs/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/cjs/Video/PlayerChrome.native.js.map +1 -1
- package/dist/cjs/Video/VideoFrame.native.js.map +1 -1
- package/dist/cjs/Video/types.native.js.map +1 -1
- package/dist/cjs/Wheel/index.native.js.map +1 -1
- package/dist/cjs/Wizard/index.native.js +2 -2
- package/dist/cjs/Wizard/index.native.js.map +1 -1
- package/dist/cjs/actions/ActionBar.native.js.map +1 -1
- package/dist/cjs/actions/DangerSection.native.js.map +1 -1
- package/dist/cjs/actions/DestructiveAction.native.js.map +1 -1
- package/dist/cjs/actions/HeaderActions.native.js +2 -2
- package/dist/cjs/actions/HeaderActions.native.js.map +1 -1
- package/dist/cjs/actions/StandardAction.native.js +1 -1
- package/dist/cjs/actions/StandardAction.native.js.map +1 -1
- package/dist/cjs/actions/devWarn.native.js.map +1 -1
- package/dist/cjs/actions/index.native.js.map +1 -1
- package/dist/cjs/actions/severity.native.js.map +1 -1
- package/dist/cjs/appShell/AppShell.cjs +91 -107
- package/dist/cjs/appShell/AppShell.native.js +101 -115
- package/dist/cjs/appShell/AppShell.native.js.map +1 -1
- package/dist/cjs/appShell/BottomChromeClearance.native.js.map +1 -1
- package/dist/cjs/appShell/Dock.native.js.map +1 -1
- package/dist/cjs/appShell/MpoTabHost.native.js.map +1 -1
- package/dist/cjs/appShell/ScopeMenu.native.js +1 -1
- package/dist/cjs/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/cjs/appShell/SettingsSplit.native.js +1 -1
- package/dist/cjs/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/cjs/appShell/Springboard.cjs +2 -2
- package/dist/cjs/appShell/Springboard.native.js +3 -3
- package/dist/cjs/appShell/Springboard.native.js.map +1 -1
- package/dist/cjs/appShell/SystemBar.cjs +147 -55
- package/dist/cjs/appShell/SystemBar.native.js +152 -59
- package/dist/cjs/appShell/SystemBar.native.js.map +1 -1
- package/dist/cjs/appShell/TabBar.native.js +1 -1
- package/dist/cjs/appShell/TabBar.native.js.map +1 -1
- package/dist/cjs/appShell/TabHost.native.js +5 -2
- package/dist/cjs/appShell/TabHost.native.js.map +1 -1
- package/dist/cjs/appShell/appTile.native.js +1 -1
- package/dist/cjs/appShell/appTile.native.js.map +1 -1
- package/dist/cjs/appShell/bottomChrome.native.js.map +1 -1
- package/dist/cjs/appShell/index.native.js.map +1 -1
- package/dist/cjs/appShell/stackBack.cjs +49 -0
- package/dist/cjs/appShell/stackBack.native.js +55 -0
- package/dist/cjs/appShell/stackBack.native.js.map +1 -0
- package/dist/cjs/appShell/systemBarFit.cjs +12 -2
- package/dist/cjs/appShell/systemBarFit.native.js +16 -2
- package/dist/cjs/appShell/systemBarFit.native.js.map +1 -1
- package/dist/cjs/charts/Axis.native.js.map +1 -1
- package/dist/cjs/charts/BarChart.native.js.map +1 -1
- package/dist/cjs/charts/ChartDataView.native.js +2 -2
- package/dist/cjs/charts/ChartDataView.native.js.map +1 -1
- package/dist/cjs/charts/ChartSurface.native.js.map +1 -1
- package/dist/cjs/charts/LineChart.native.js.map +1 -1
- package/dist/cjs/charts/PieChart.native.js.map +1 -1
- package/dist/cjs/charts/Sparkline.native.js.map +1 -1
- package/dist/cjs/charts/accessibility.native.js.map +1 -1
- package/dist/cjs/charts/chartHeight.native.js.map +1 -1
- package/dist/cjs/charts/composeChart.native.js.map +1 -1
- package/dist/cjs/charts/index.native.js.map +1 -1
- package/dist/cjs/charts/math.native.js.map +1 -1
- package/dist/cjs/charts/series.native.js.map +1 -1
- package/dist/cjs/charts/svg.native.js.map +1 -1
- package/dist/cjs/charts/types.native.js.map +1 -1
- package/dist/cjs/charts/useChartTheme.native.js.map +1 -1
- package/dist/cjs/code/Code/index.native.js.map +1 -1
- package/dist/cjs/code/CodeBlock/index.cjs +21 -12
- package/dist/cjs/code/CodeBlock/index.native.js +28 -19
- package/dist/cjs/code/CodeBlock/index.native.js.map +1 -1
- package/dist/cjs/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/cjs/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
- package/dist/cjs/code/Highlighter/index.native.js.map +1 -1
- package/dist/cjs/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
- package/dist/cjs/code/HoldSelect/index.cjs +69 -0
- package/dist/cjs/code/HoldSelect/index.native.js +132 -0
- package/dist/cjs/code/HoldSelect/index.native.js.map +1 -0
- package/dist/cjs/code/HoldSelect/tapGate.cjs +88 -0
- package/dist/cjs/code/HoldSelect/tapGate.native.js +95 -0
- package/dist/cjs/code/HoldSelect/tapGate.native.js.map +1 -0
- package/dist/cjs/code/LogView.cjs +14 -3
- package/dist/cjs/code/LogView.native.js +15 -3
- package/dist/cjs/code/LogView.native.js.map +1 -1
- package/dist/cjs/code/PayloadView/index.native.js +5 -5
- package/dist/cjs/code/PayloadView/index.native.js.map +1 -1
- package/dist/cjs/code/PayloadView/payloadModel.native.js.map +1 -1
- package/dist/cjs/code/Pre/index.native.js.map +1 -1
- package/dist/cjs/code/index.cjs +1 -0
- package/dist/cjs/code/index.native.js +7 -6
- package/dist/cjs/code/index.native.js.map +1 -1
- package/dist/cjs/componentColors.cjs +5 -4
- package/dist/cjs/componentColors.native.js +5 -4
- package/dist/cjs/componentColors.native.js.map +1 -1
- package/dist/cjs/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/cjs/feedback/NotifyHost.native.js +2 -2
- package/dist/cjs/feedback/NotifyHost.native.js.map +1 -1
- package/dist/cjs/feedback/copy.native.js.map +1 -1
- package/dist/cjs/feedback/index.native.js.map +1 -1
- package/dist/cjs/feedback/notify.native.js.map +1 -1
- package/dist/cjs/feedback/route.native.js.map +1 -1
- package/dist/cjs/feedback/store.native.js.map +1 -1
- package/dist/cjs/formLayouts/FormLayouts.native.js +1 -1
- package/dist/cjs/formLayouts/FormLayouts.native.js.map +1 -1
- package/dist/cjs/formLayouts/PreferencePanel.native.js +2 -2
- package/dist/cjs/formLayouts/PreferencePanel.native.js.map +1 -1
- package/dist/cjs/formLayouts/index.native.js.map +1 -1
- package/dist/cjs/hooks/index.native.js +1 -1
- package/dist/cjs/hooks/index.native.js.map +1 -1
- package/dist/cjs/hooks/useClipboard.native.js.map +1 -1
- package/dist/cjs/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/cjs/icons/CheckRegular.native.js.map +1 -1
- package/dist/cjs/icons/MinusRegular.native.js.map +1 -1
- package/dist/cjs/icons/index.native.js.map +1 -1
- package/dist/cjs/icons/lucide.native.js.map +1 -1
- package/dist/cjs/icons/themed.native.js.map +1 -1
- package/dist/cjs/images/Image/ImageFrame.native.js +1 -1
- package/dist/cjs/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/cjs/images/Image/framing.native.js.map +1 -1
- package/dist/cjs/images/Image/index.native.js +1 -1
- package/dist/cjs/images/Image/mediaRadius.native.js.map +1 -1
- package/dist/cjs/images/Image/shared.native.js +1 -1
- package/dist/cjs/images/Image/shared.native.js.map +1 -1
- package/dist/cjs/images/Image/types.native.js.map +1 -1
- package/dist/cjs/images/RemoteArt/index.native.js +1 -1
- package/dist/cjs/images/RemoteArt/remoteArtCache.native.js.map +1 -1
- package/dist/cjs/images/RemoteArt/svgMarkup.native.js.map +1 -1
- package/dist/cjs/images/RemoteArt/types.native.js.map +1 -1
- package/dist/cjs/images/index.native.js.map +1 -1
- package/dist/cjs/index.gnome.native.js +22 -22
- package/dist/cjs/index.gnome.native.js.map +1 -1
- package/dist/cjs/index.native.js +46 -46
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/knobImmuneExports.native.js.map +1 -1
- package/dist/cjs/layouts/AsyncBoundary.cjs +21 -1
- package/dist/cjs/layouts/AsyncBoundary.native.js +23 -3
- package/dist/cjs/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/cjs/layouts/Debug/index.native.js.map +1 -1
- package/dist/cjs/layouts/EmptyState.native.js +1 -1
- package/dist/cjs/layouts/EmptyState.native.js.map +1 -1
- package/dist/cjs/layouts/IdentityPlate.native.js +1 -1
- package/dist/cjs/layouts/IdentityPlate.native.js.map +1 -1
- package/dist/cjs/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/cjs/layouts/PageTemplates.native.js.map +1 -1
- package/dist/cjs/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/cjs/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/cjs/layouts/StatusDot.native.js.map +1 -1
- package/dist/cjs/layouts/StatusGlyphStrip.native.js +1 -1
- package/dist/cjs/layouts/StatusGlyphStrip.native.js.map +1 -1
- package/dist/cjs/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/cjs/layouts/asyncFailure.cjs +15 -15
- package/dist/cjs/layouts/asyncFailure.native.js +15 -15
- package/dist/cjs/layouts/asyncFailure.native.js.map +1 -1
- package/dist/cjs/layouts/attachments.cjs +45 -6
- package/dist/cjs/layouts/attachments.native.js +49 -8
- package/dist/cjs/layouts/attachments.native.js.map +1 -1
- package/dist/cjs/layouts/barTitleSpan.native.js.map +1 -1
- package/dist/cjs/layouts/bottomAccessory.native.js.map +1 -1
- package/dist/cjs/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/cjs/layouts/index.native.js +3 -3
- package/dist/cjs/layouts/index.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +89 -13
- package/dist/cjs/layouts/page.native.js +95 -16
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/cjs/layouts/screenScroll.cjs +8 -4
- package/dist/cjs/layouts/screenScroll.native.js +12 -4
- package/dist/cjs/layouts/screenScroll.native.js.map +1 -1
- package/dist/cjs/layouts/shellSidebarSlot.native.js.map +1 -1
- package/dist/cjs/layouts/sidebar.native.js +1 -1
- package/dist/cjs/layouts/sidebar.native.js.map +1 -1
- package/dist/cjs/layouts/tags.cjs +2 -1
- package/dist/cjs/layouts/tags.native.js +4 -3
- package/dist/cjs/layouts/tags.native.js.map +1 -1
- package/dist/cjs/layouts/timeline.native.js +2 -2
- package/dist/cjs/layouts/timeline.native.js.map +1 -1
- package/dist/cjs/layouts/toolbar.native.js +1 -1
- package/dist/cjs/layouts/toolbar.native.js.map +1 -1
- package/dist/cjs/shared/actionScan.native.js.map +1 -1
- package/dist/cjs/shared/i18n.native.js.map +1 -1
- package/dist/cjs/shared/restoreRetries.native.js.map +1 -1
- package/dist/cjs/shared/t.native.js.map +1 -1
- package/dist/cjs/shared/textRidesText.native.js.map +1 -1
- package/dist/cjs/shared/useReturnFocusOnClose.native.js.map +1 -1
- package/dist/cjs/surfaces.native.js +1 -1
- package/dist/cjs/surfaces.native.js.map +1 -1
- package/dist/cjs/tamagui.native.js +1 -1
- package/dist/cjs/tamagui.native.js.map +1 -1
- package/dist/cjs/testSetup.native.js.map +1 -1
- package/dist/cjs/utils/unwrapText.native.js.map +1 -1
- package/dist/cjs/views/Calendar.native.js +1 -1
- package/dist/cjs/views/Calendar.native.js.map +1 -1
- package/dist/cjs/views/CardGrid.native.js.map +1 -1
- package/dist/cjs/views/Dashboard.cjs +18 -5
- package/dist/cjs/views/Dashboard.native.js +20 -7
- package/dist/cjs/views/Dashboard.native.js.map +1 -1
- package/dist/cjs/views/FilePreview.cjs +624 -0
- package/dist/cjs/views/FilePreview.native.js +675 -0
- package/dist/cjs/views/FilePreview.native.js.map +1 -0
- package/dist/cjs/views/Gantt.native.js +2 -2
- package/dist/cjs/views/Gantt.native.js.map +1 -1
- package/dist/cjs/views/GanttDateGrip.native.js.map +1 -1
- package/dist/cjs/views/ImageGrid.native.js +2 -2
- package/dist/cjs/views/ImageGrid.native.js.map +1 -1
- package/dist/cjs/views/Kanban.native.js +1 -1
- package/dist/cjs/views/List.native.js.map +1 -1
- package/dist/cjs/views/ListGroup.cjs +2 -2
- package/dist/cjs/views/ListGroup.native.js +3 -3
- package/dist/cjs/views/ListGroup.native.js.map +1 -1
- package/dist/cjs/views/ListRow.native.js.map +1 -1
- package/dist/cjs/views/Matrix.native.js +2 -2
- package/dist/cjs/views/Matrix.native.js.map +1 -1
- package/dist/cjs/views/ReportBuilder.native.js +2 -2
- package/dist/cjs/views/ReportBuilder.native.js.map +1 -1
- package/dist/cjs/views/ShortcutCard.native.js.map +1 -1
- package/dist/cjs/views/TreeView.native.js.map +1 -1
- package/dist/cjs/views/calendarMath.native.js.map +1 -1
- package/dist/cjs/views/ganttIntervals.native.js.map +1 -1
- package/dist/cjs/views/ganttMath.native.js.map +1 -1
- package/dist/cjs/views/index.cjs +13 -0
- package/dist/cjs/views/index.native.js +14 -1
- package/dist/cjs/views/index.native.js.map +1 -1
- package/dist/cjs/views/kanbanDnd.native.js.map +1 -1
- package/dist/cjs/views/matrixMath.native.js.map +1 -1
- package/dist/cjs/views/sameNameScope.native.js.map +1 -1
- package/dist/cjs/views/treeViewDnd.native.js.map +1 -1
- package/dist/cjs/views/treeViewLayout.native.js.map +1 -1
- package/dist/cjs/views/treeViewMotion.native.js.map +1 -1
- package/dist/cjs/views/treeViewReveal.native.js.map +1 -1
- package/dist/cjs/views/usePageFlowLoadMore.native.js.map +1 -1
- package/dist/cjs/views/widgetChrome.native.js.map +1 -1
- package/dist/esm/Chip/index.mjs +3 -3
- package/dist/esm/Chip/index.mjs.map +1 -1
- package/dist/esm/Chip/index.native.js +3 -3
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/Material/blur.native.js +5 -1
- package/dist/esm/Material/blur.native.js.map +1 -1
- package/dist/esm/ScrollView/useRevealFocusedField.native.js +3 -2
- package/dist/esm/ScrollView/useRevealFocusedField.native.js.map +1 -1
- package/dist/esm/SheetModal/detents.mjs +2 -32
- package/dist/esm/SheetModal/detents.mjs.map +1 -1
- package/dist/esm/SheetModal/detents.native.js +2 -38
- package/dist/esm/SheetModal/detents.native.js.map +1 -1
- package/dist/esm/SheetModal/index.mjs +13 -1
- package/dist/esm/SheetModal/index.mjs.map +1 -1
- package/dist/esm/SheetModal/index.native.js +22 -12
- package/dist/esm/SheetModal/index.native.js.map +1 -1
- package/dist/esm/Tabs/index.mjs +16 -40
- package/dist/esm/Tabs/index.mjs.map +1 -1
- package/dist/esm/Tabs/index.native.js +17 -41
- package/dist/esm/Tabs/index.native.js.map +1 -1
- package/dist/esm/Tooltip/index.native.js +10 -2
- package/dist/esm/Tooltip/index.native.js.map +1 -1
- package/dist/esm/appShell/AppShell.mjs +91 -107
- package/dist/esm/appShell/AppShell.mjs.map +1 -1
- package/dist/esm/appShell/AppShell.native.js +100 -114
- package/dist/esm/appShell/AppShell.native.js.map +1 -1
- package/dist/esm/appShell/MpoTabHost.mjs.map +1 -1
- package/dist/esm/appShell/MpoTabHost.native.js.map +1 -1
- package/dist/esm/appShell/Springboard.mjs +1 -1
- package/dist/esm/appShell/Springboard.mjs.map +1 -1
- package/dist/esm/appShell/Springboard.native.js +1 -1
- package/dist/esm/appShell/Springboard.native.js.map +1 -1
- package/dist/esm/appShell/SystemBar.mjs +147 -58
- package/dist/esm/appShell/SystemBar.mjs.map +1 -1
- package/dist/esm/appShell/SystemBar.native.js +152 -62
- package/dist/esm/appShell/SystemBar.native.js.map +1 -1
- package/dist/esm/appShell/TabHost.native.js +5 -2
- package/dist/esm/appShell/TabHost.native.js.map +1 -1
- package/dist/esm/appShell/stackBack.mjs +23 -0
- package/dist/esm/appShell/stackBack.mjs.map +1 -0
- package/dist/esm/appShell/stackBack.native.js +26 -0
- package/dist/esm/appShell/stackBack.native.js.map +1 -0
- package/dist/esm/appShell/systemBarFit.mjs +12 -2
- package/dist/esm/appShell/systemBarFit.mjs.map +1 -1
- package/dist/esm/appShell/systemBarFit.native.js +16 -2
- package/dist/esm/appShell/systemBarFit.native.js.map +1 -1
- package/dist/esm/code/CodeBlock/index.mjs +21 -12
- package/dist/esm/code/CodeBlock/index.mjs.map +1 -1
- package/dist/esm/code/CodeBlock/index.native.js +21 -12
- package/dist/esm/code/CodeBlock/index.native.js.map +1 -1
- package/dist/esm/code/HoldSelect/index.mjs +42 -0
- package/dist/esm/code/HoldSelect/index.mjs.map +1 -0
- package/dist/esm/code/HoldSelect/index.native.js +102 -0
- package/dist/esm/code/HoldSelect/index.native.js.map +1 -0
- package/dist/esm/code/HoldSelect/tapGate.mjs +61 -0
- package/dist/esm/code/HoldSelect/tapGate.mjs.map +1 -0
- package/dist/esm/code/HoldSelect/tapGate.native.js +65 -0
- package/dist/esm/code/HoldSelect/tapGate.native.js.map +1 -0
- package/dist/esm/code/LogView.mjs +13 -3
- package/dist/esm/code/LogView.mjs.map +1 -1
- package/dist/esm/code/LogView.native.js +14 -3
- package/dist/esm/code/LogView.native.js.map +1 -1
- package/dist/esm/code/index.mjs +1 -0
- package/dist/esm/code/index.mjs.map +1 -1
- package/dist/esm/code/index.native.js +1 -0
- package/dist/esm/code/index.native.js.map +1 -1
- package/dist/esm/componentColors.mjs +5 -4
- package/dist/esm/componentColors.mjs.map +1 -1
- package/dist/esm/componentColors.native.js +5 -4
- package/dist/esm/componentColors.native.js.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.mjs +22 -2
- package/dist/esm/layouts/AsyncBoundary.mjs.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.native.js +22 -2
- package/dist/esm/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/esm/layouts/asyncFailure.mjs +15 -15
- package/dist/esm/layouts/asyncFailure.mjs.map +1 -1
- package/dist/esm/layouts/asyncFailure.native.js +15 -15
- package/dist/esm/layouts/asyncFailure.native.js.map +1 -1
- package/dist/esm/layouts/attachments.mjs +45 -6
- package/dist/esm/layouts/attachments.mjs.map +1 -1
- package/dist/esm/layouts/attachments.native.js +47 -6
- package/dist/esm/layouts/attachments.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +94 -18
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +96 -17
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/screenScroll.mjs +8 -4
- package/dist/esm/layouts/screenScroll.mjs.map +1 -1
- package/dist/esm/layouts/screenScroll.native.js +12 -4
- package/dist/esm/layouts/screenScroll.native.js.map +1 -1
- package/dist/esm/layouts/tags.mjs +2 -1
- package/dist/esm/layouts/tags.mjs.map +1 -1
- package/dist/esm/layouts/tags.native.js +2 -1
- package/dist/esm/layouts/tags.native.js.map +1 -1
- package/dist/esm/views/Dashboard.mjs +19 -6
- package/dist/esm/views/Dashboard.mjs.map +1 -1
- package/dist/esm/views/Dashboard.native.js +19 -6
- package/dist/esm/views/Dashboard.native.js.map +1 -1
- package/dist/esm/views/FilePreview.mjs +588 -0
- package/dist/esm/views/FilePreview.mjs.map +1 -0
- package/dist/esm/views/FilePreview.native.js +636 -0
- package/dist/esm/views/FilePreview.native.js.map +1 -0
- package/dist/esm/views/ListGroup.mjs +1 -1
- package/dist/esm/views/ListGroup.native.js +1 -1
- package/dist/esm/views/index.mjs +2 -1
- package/dist/esm/views/index.mjs.map +1 -1
- package/dist/esm/views/index.native.js +2 -1
- package/dist/esm/views/index.native.js.map +1 -1
- package/dist/jsx/Chip/index.mjs +3 -3
- package/dist/jsx/Chip/index.mjs.map +1 -1
- package/dist/jsx/Chip/index.native.js +1 -1
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/Material/blur.native.js +5 -1
- package/dist/jsx/Material/blur.native.js.map +1 -1
- package/dist/jsx/ScrollView/useRevealFocusedField.native.js +3 -2
- package/dist/jsx/ScrollView/useRevealFocusedField.native.js.map +1 -1
- package/dist/jsx/SheetModal/detents.mjs +2 -32
- package/dist/jsx/SheetModal/detents.mjs.map +1 -1
- package/dist/jsx/SheetModal/detents.native.js +11 -43
- package/dist/jsx/SheetModal/detents.native.js.map +1 -1
- package/dist/jsx/SheetModal/index.mjs +13 -1
- package/dist/jsx/SheetModal/index.mjs.map +1 -1
- package/dist/jsx/SheetModal/index.native.js +21 -11
- package/dist/jsx/SheetModal/index.native.js.map +1 -1
- package/dist/jsx/Tabs/index.mjs +16 -40
- package/dist/jsx/Tabs/index.mjs.map +1 -1
- package/dist/jsx/Tabs/index.native.js +17 -40
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/Tooltip/index.native.js +9 -1
- package/dist/jsx/Tooltip/index.native.js.map +1 -1
- package/dist/jsx/appShell/AppShell.mjs +91 -107
- package/dist/jsx/appShell/AppShell.mjs.map +1 -1
- package/dist/jsx/appShell/AppShell.native.js +100 -114
- package/dist/jsx/appShell/AppShell.native.js.map +1 -1
- package/dist/jsx/appShell/MpoTabHost.mjs.map +1 -1
- package/dist/jsx/appShell/MpoTabHost.native.js.map +1 -1
- package/dist/jsx/appShell/Springboard.mjs +1 -1
- package/dist/jsx/appShell/Springboard.mjs.map +1 -1
- package/dist/jsx/appShell/Springboard.native.js +2 -2
- package/dist/jsx/appShell/Springboard.native.js.map +1 -1
- package/dist/jsx/appShell/SystemBar.mjs +147 -58
- package/dist/jsx/appShell/SystemBar.mjs.map +1 -1
- package/dist/jsx/appShell/SystemBar.native.js +152 -59
- package/dist/jsx/appShell/SystemBar.native.js.map +1 -1
- package/dist/jsx/appShell/TabHost.native.js +5 -2
- package/dist/jsx/appShell/TabHost.native.js.map +1 -1
- package/dist/jsx/appShell/stackBack.mjs +23 -0
- package/dist/jsx/appShell/stackBack.mjs.map +1 -0
- package/dist/jsx/appShell/stackBack.native.js +55 -0
- package/dist/jsx/appShell/stackBack.native.js.map +1 -0
- package/dist/jsx/appShell/systemBarFit.mjs +12 -2
- package/dist/jsx/appShell/systemBarFit.mjs.map +1 -1
- package/dist/jsx/appShell/systemBarFit.native.js +16 -2
- package/dist/jsx/appShell/systemBarFit.native.js.map +1 -1
- package/dist/jsx/code/CodeBlock/index.mjs +21 -12
- package/dist/jsx/code/CodeBlock/index.mjs.map +1 -1
- package/dist/jsx/code/CodeBlock/index.native.js +21 -12
- package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
- package/dist/jsx/code/HoldSelect/index.mjs +42 -0
- package/dist/jsx/code/HoldSelect/index.mjs.map +1 -0
- package/dist/jsx/code/HoldSelect/index.native.js +132 -0
- package/dist/jsx/code/HoldSelect/index.native.js.map +1 -0
- package/dist/jsx/code/HoldSelect/tapGate.mjs +61 -0
- package/dist/jsx/code/HoldSelect/tapGate.mjs.map +1 -0
- package/dist/jsx/code/HoldSelect/tapGate.native.js +95 -0
- package/dist/jsx/code/HoldSelect/tapGate.native.js.map +1 -0
- package/dist/jsx/code/LogView.mjs +13 -3
- package/dist/jsx/code/LogView.mjs.map +1 -1
- package/dist/jsx/code/LogView.native.js +15 -3
- package/dist/jsx/code/LogView.native.js.map +1 -1
- package/dist/jsx/code/index.mjs +1 -0
- package/dist/jsx/code/index.mjs.map +1 -1
- package/dist/jsx/code/index.native.js +1 -0
- package/dist/jsx/code/index.native.js.map +1 -1
- package/dist/jsx/componentColors.mjs +5 -4
- package/dist/jsx/componentColors.mjs.map +1 -1
- package/dist/jsx/componentColors.native.js +5 -4
- package/dist/jsx/componentColors.native.js.map +1 -1
- package/dist/jsx/layouts/AsyncBoundary.mjs +22 -2
- package/dist/jsx/layouts/AsyncBoundary.mjs.map +1 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js +21 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/jsx/layouts/asyncFailure.mjs +15 -15
- package/dist/jsx/layouts/asyncFailure.mjs.map +1 -1
- package/dist/jsx/layouts/asyncFailure.native.js +15 -15
- package/dist/jsx/layouts/asyncFailure.native.js.map +1 -1
- package/dist/jsx/layouts/attachments.mjs +45 -6
- package/dist/jsx/layouts/attachments.mjs.map +1 -1
- package/dist/jsx/layouts/attachments.native.js +47 -6
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +94 -18
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +93 -14
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/screenScroll.mjs +8 -4
- package/dist/jsx/layouts/screenScroll.mjs.map +1 -1
- package/dist/jsx/layouts/screenScroll.native.js +12 -4
- package/dist/jsx/layouts/screenScroll.native.js.map +1 -1
- package/dist/jsx/layouts/tags.mjs +2 -1
- package/dist/jsx/layouts/tags.mjs.map +1 -1
- package/dist/jsx/layouts/tags.native.js +2 -1
- package/dist/jsx/layouts/tags.native.js.map +1 -1
- package/dist/jsx/views/Dashboard.mjs +19 -6
- package/dist/jsx/views/Dashboard.mjs.map +1 -1
- package/dist/jsx/views/Dashboard.native.js +18 -5
- package/dist/jsx/views/Dashboard.native.js.map +1 -1
- package/dist/jsx/views/FilePreview.mjs +588 -0
- package/dist/jsx/views/FilePreview.mjs.map +1 -0
- package/dist/jsx/views/FilePreview.native.js +675 -0
- package/dist/jsx/views/FilePreview.native.js.map +1 -0
- package/dist/jsx/views/ListGroup.mjs +1 -1
- package/dist/jsx/views/ListGroup.native.js +2 -2
- package/dist/jsx/views/ListGroup.native.js.map +1 -1
- package/dist/jsx/views/index.mjs +2 -1
- package/dist/jsx/views/index.mjs.map +1 -1
- package/dist/jsx/views/index.native.js +13 -0
- package/dist/jsx/views/index.native.js.map +1 -1
- package/package.json +8 -11
- package/src/Chip/index.tsx +4 -3
- package/src/Material/blur.native.tsx +7 -1
- package/src/OverflowRow/OverflowRow.native.spec.tsx +10 -0
- package/src/OverflowRow/OverflowRow.stories.tsx +46 -17
- package/src/ScrollView/useRevealFocusedField.native.ts +2 -2
- package/src/SheetModal/SheetModal.detentLayout.spec.tsx +65 -1
- package/src/SheetModal/SheetModal.elevation.spec.tsx +4 -4
- package/src/SheetModal/SheetModal.fill.spec.tsx +47 -0
- package/src/SheetModal/SheetModal.spec.tsx +8 -3
- package/src/SheetModal/SheetModal.stories.tsx +17 -0
- package/src/SheetModal/detents.ts +25 -78
- package/src/SheetModal/index.native.tsx +24 -12
- package/src/SheetModal/index.tsx +27 -5
- package/src/Tabs/Tabs.edgeFades.spec.tsx +77 -0
- package/src/Tabs/Tabs.fades.native.spec.tsx +23 -21
- package/src/Tabs/Tabs.measurement.spec.tsx +3 -3
- package/src/Tabs/Tabs.native.spec.tsx +1 -1
- package/src/Tabs/index.tsx +29 -50
- package/src/Tooltip/Tooltip.holdCue.native.spec.tsx +71 -0
- package/src/Tooltip/Tooltip.spec.tsx +1 -1
- package/src/Tooltip/index.native.tsx +6 -1
- package/src/appShell/AppShell.native.spec.tsx +104 -0
- package/src/appShell/AppShell.spec.tsx +49 -0
- package/src/appShell/AppShell.stackBack.native-press.spec.tsx +61 -0
- package/src/appShell/AppShell.stackBack.spec.tsx +112 -0
- package/src/appShell/AppShell.stories.tsx +51 -1
- package/src/appShell/AppShell.tsx +66 -80
- package/src/appShell/MpoTabHost.tsx +6 -0
- package/src/appShell/Springboard.spec.tsx +1 -1
- package/src/appShell/Springboard.tsx +1 -1
- package/src/appShell/SystemBar.phoneWidth.spec.tsx +17 -0
- package/src/appShell/SystemBar.spec.tsx +155 -3
- package/src/appShell/SystemBar.stories.tsx +48 -3
- package/src/appShell/SystemBar.tsx +172 -48
- package/src/appShell/TabHost.native.tsx +4 -2
- package/src/appShell/stackBack.ts +31 -0
- package/src/appShell/systemBarFit.ts +10 -7
- package/src/checkedRow.native-press.spec.tsx +4 -4
- package/src/checkedRow.spec.tsx +2 -2
- package/src/code/CodeBlock/codeBlock.stories.ts +21 -0
- package/src/code/CodeBlock/index.tsx +24 -17
- package/src/code/HoldSelect/holdSelect.spec.tsx +128 -0
- package/src/code/HoldSelect/index.native.tsx +86 -0
- package/src/code/HoldSelect/index.tsx +53 -0
- package/src/code/HoldSelect/tapGate.ts +87 -0
- package/src/code/LogView.follow.spec.tsx +104 -0
- package/src/code/LogView.tsx +29 -4
- package/src/code/index.ts +1 -0
- package/src/componentColors.spec.ts +3 -3
- package/src/componentColors.ts +5 -4
- package/src/elevatedGround.spec.tsx +7 -7
- package/src/layouts/AsyncBoundary.reason.spec.tsx +64 -23
- package/src/layouts/AsyncBoundary.stories.tsx +1 -0
- package/src/layouts/AsyncBoundary.tsx +21 -2
- package/src/layouts/Attachments.stories.tsx +31 -1
- package/src/layouts/ScreenToolbar.stories.tsx +54 -1
- package/src/layouts/Sidebar.spec.tsx +6 -1
- package/src/layouts/asyncFailure.spec.ts +28 -13
- package/src/layouts/asyncFailure.ts +17 -19
- package/src/layouts/attachments.tsx +60 -8
- package/src/layouts/heroBarTitle.native-press.spec.tsx +132 -0
- package/src/layouts/page.tsx +136 -16
- package/src/layouts/screenScroll.tsx +21 -14
- package/src/layouts/tags.tsx +2 -1
- package/src/layouts/toolbarLeadingClip.spec.tsx +120 -0
- package/src/overlayElevation.spec.tsx +1 -1
- package/src/overlayGround.spec.tsx +77 -0
- package/src/views/Dashboard.stories.tsx +21 -0
- package/src/views/Dashboard.tsx +34 -7
- package/src/views/FilePreview.tsx +640 -0
- package/src/views/Kanban.spec.tsx +6 -1
- package/src/views/List.selection.spec.tsx +42 -0
- package/src/views/List.spec.tsx +1 -26
- package/src/views/ListGroup.states.spec.tsx +1 -1
- package/src/views/ListGroup.stories.tsx +119 -2
- package/src/views/ListGroup.tsx +1 -1
- package/src/views/ReportBuilder.spec.tsx +9 -4
- package/src/views/TreeView.spec.tsx +6 -1
- package/src/views/dataIdentity.spec.tsx +5 -0
- package/src/views/filePreview.spec.tsx +282 -0
- package/src/views/index.ts +17 -0
- package/src/views/kpiNotMeasured.spec.tsx +56 -0
- package/types/Chip/index.d.ts.map +1 -1
- package/types/Material/blur.native.d.ts.map +1 -1
- package/types/SheetModal/detents.d.ts +9 -54
- package/types/SheetModal/detents.d.ts.map +1 -1
- package/types/SheetModal/index.d.ts +23 -5
- package/types/SheetModal/index.d.ts.map +1 -1
- package/types/SheetModal/index.native.d.ts +1 -1
- package/types/SheetModal/index.native.d.ts.map +1 -1
- package/types/Tabs/index.d.ts +2 -1
- package/types/Tabs/index.d.ts.map +1 -1
- package/types/Tooltip/index.native.d.ts.map +1 -1
- package/types/appShell/AppShell.d.ts +5 -1
- package/types/appShell/AppShell.d.ts.map +1 -1
- package/types/appShell/MpoTabHost.d.ts +6 -0
- package/types/appShell/MpoTabHost.d.ts.map +1 -1
- package/types/appShell/Springboard.d.ts.map +1 -1
- package/types/appShell/SystemBar.d.ts +39 -2
- package/types/appShell/SystemBar.d.ts.map +1 -1
- package/types/appShell/TabHost.native.d.ts +1 -1
- package/types/appShell/TabHost.native.d.ts.map +1 -1
- package/types/appShell/stackBack.d.ts +3 -0
- package/types/appShell/stackBack.d.ts.map +1 -0
- package/types/appShell/systemBarFit.d.ts +1 -0
- package/types/appShell/systemBarFit.d.ts.map +1 -1
- package/types/code/CodeBlock/index.d.ts +3 -1
- package/types/code/CodeBlock/index.d.ts.map +1 -1
- package/types/code/HoldSelect/index.d.ts +16 -0
- package/types/code/HoldSelect/index.d.ts.map +1 -0
- package/types/code/HoldSelect/index.native.d.ts +17 -0
- package/types/code/HoldSelect/index.native.d.ts.map +1 -0
- package/types/code/HoldSelect/tapGate.d.ts +41 -0
- package/types/code/HoldSelect/tapGate.d.ts.map +1 -0
- package/types/code/LogView.d.ts +3 -1
- package/types/code/LogView.d.ts.map +1 -1
- package/types/code/index.d.ts +1 -0
- package/types/code/index.d.ts.map +1 -1
- package/types/componentColors.d.ts +4 -4
- package/types/componentColors.d.ts.map +1 -1
- package/types/layouts/AsyncBoundary.d.ts +3 -1
- package/types/layouts/AsyncBoundary.d.ts.map +1 -1
- package/types/layouts/asyncFailure.d.ts +4 -1
- package/types/layouts/asyncFailure.d.ts.map +1 -1
- package/types/layouts/attachments.d.ts.map +1 -1
- package/types/layouts/page.d.ts.map +1 -1
- package/types/layouts/screenScroll.d.ts +4 -2
- package/types/layouts/screenScroll.d.ts.map +1 -1
- package/types/layouts/tags.d.ts.map +1 -1
- package/types/views/Dashboard.d.ts +7 -1
- package/types/views/Dashboard.d.ts.map +1 -1
- package/types/views/FilePreview.d.ts +62 -0
- package/types/views/FilePreview.d.ts.map +1 -0
- package/types/views/index.d.ts +1 -0
- package/types/views/index.d.ts.map +1 -1
- package/dist/cjs/hooks/useHoldCue.cjs +0 -52
- package/dist/cjs/hooks/useHoldCue.native.js +0 -60
- package/dist/cjs/hooks/useHoldCue.native.js.map +0 -1
- package/dist/esm/hooks/useHoldCue.mjs +0 -26
- package/dist/esm/hooks/useHoldCue.mjs.map +0 -1
- package/dist/esm/hooks/useHoldCue.native.js +0 -31
- package/dist/esm/hooks/useHoldCue.native.js.map +0 -1
- package/dist/jsx/hooks/useHoldCue.mjs +0 -26
- package/dist/jsx/hooks/useHoldCue.mjs.map +0 -1
- package/dist/jsx/hooks/useHoldCue.native.js +0 -60
- package/dist/jsx/hooks/useHoldCue.native.js.map +0 -1
- package/src/hooks/useHoldCue.ts +0 -23
- package/types/hooks/useHoldCue.d.ts +0 -8
- package/types/hooks/useHoldCue.d.ts.map +0 -1
package/src/Tabs/index.tsx
CHANGED
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
stackEdgeRadius,
|
|
37
37
|
stackRadiusProps,
|
|
38
38
|
Surface,
|
|
39
|
+
useElevatedSurface,
|
|
39
40
|
useResolvedKnobs,
|
|
40
41
|
wasKeyboardFocus,
|
|
41
42
|
type GroupPosition,
|
|
@@ -44,20 +45,8 @@ import {
|
|
|
44
45
|
import type { ReactNode } from "react";
|
|
45
46
|
import React from "react";
|
|
46
47
|
import { Platform } from "react-native";
|
|
47
|
-
import {
|
|
48
|
-
|
|
49
|
-
LinearGradient as TSvgLinearGradient,
|
|
50
|
-
Rect as TSvgRect,
|
|
51
|
-
Stop as TSvgStop,
|
|
52
|
-
Svg as TSvg,
|
|
53
|
-
} from "@tamagui/react-native-svg";
|
|
54
|
-
import type {
|
|
55
|
-
Defs as RNSvgDefs,
|
|
56
|
-
LinearGradient as RNSvgLinearGradient,
|
|
57
|
-
Rect as RNSvgRect,
|
|
58
|
-
Stop as RNSvgStop,
|
|
59
|
-
Svg as RNSvg,
|
|
60
|
-
} from "react-native-svg";
|
|
48
|
+
import { getRgba } from "@tamagui/core";
|
|
49
|
+
import { LinearGradient } from "tamagui/linear-gradient";
|
|
61
50
|
import { useDirection } from "../hooks/useDirection";
|
|
62
51
|
import { usePageChromeInset } from "../layouts/pageHeadingScope";
|
|
63
52
|
import { useTranslation } from "../shared/i18n";
|
|
@@ -77,15 +66,9 @@ import {
|
|
|
77
66
|
} from "tamagui";
|
|
78
67
|
import { componentColors } from "../componentColors";
|
|
79
68
|
import { ScrollView } from "../ScrollView";
|
|
69
|
+
import "../linearGradientSetup";
|
|
80
70
|
|
|
81
|
-
|
|
82
|
-
const Svg = TSvg as unknown as typeof RNSvg;
|
|
83
|
-
const SvgDefs = TSvgDefs as unknown as typeof RNSvgDefs;
|
|
84
|
-
const SvgLinearGradient = TSvgLinearGradient as unknown as typeof RNSvgLinearGradient;
|
|
85
|
-
const SvgStop = TSvgStop as unknown as typeof RNSvgStop;
|
|
86
|
-
const SvgRect = TSvgRect as unknown as typeof RNSvgRect;
|
|
87
|
-
|
|
88
|
-
/** Width of each overflow edge fade, web mask and native gradient alike. */
|
|
71
|
+
/** Width of each overflow edge fade. */
|
|
89
72
|
export const TABS_EDGE_FADE = 32;
|
|
90
73
|
|
|
91
74
|
// ── Types ─────────────────────────────────────────────────────
|
|
@@ -239,8 +222,8 @@ export function tabsFadeEdge(side: "left" | "right", direction: TabsDirection):
|
|
|
239
222
|
}
|
|
240
223
|
|
|
241
224
|
/**
|
|
242
|
-
* One
|
|
243
|
-
*
|
|
225
|
+
* One edge fade: the strip's own surface colour, opaque at the edge and clear
|
|
226
|
+
* toward the tabs, laid over the scroller and never hit-tested.
|
|
244
227
|
*/
|
|
245
228
|
function TabsEdgeFade({
|
|
246
229
|
side,
|
|
@@ -251,7 +234,8 @@ function TabsEdgeFade({
|
|
|
251
234
|
color: string;
|
|
252
235
|
direction: TabsDirection;
|
|
253
236
|
}) {
|
|
254
|
-
const
|
|
237
|
+
const rgba = getRgba(color);
|
|
238
|
+
const clear = rgba ? `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, 0)` : "transparent";
|
|
255
239
|
return (
|
|
256
240
|
<View
|
|
257
241
|
pointerEvents="none"
|
|
@@ -260,19 +244,18 @@ function TabsEdgeFade({
|
|
|
260
244
|
bottom={0}
|
|
261
245
|
width={TABS_EDGE_FADE}
|
|
262
246
|
zIndex={1}
|
|
263
|
-
style={{ [tabsFadeEdge(side, direction)]: 0 }}
|
|
247
|
+
style={{ [isWeb ? side : tabsFadeEdge(side, direction)]: 0 }}
|
|
264
248
|
data-tabs-fade={side}
|
|
265
249
|
testID={`tabs-fade-${side}`}
|
|
266
250
|
>
|
|
267
|
-
<
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
</Svg>
|
|
251
|
+
<LinearGradient
|
|
252
|
+
pointerEvents="none"
|
|
253
|
+
width="100%"
|
|
254
|
+
height="100%"
|
|
255
|
+
colors={side === "left" ? [color, clear] : [clear, color]}
|
|
256
|
+
start={[0, 0]}
|
|
257
|
+
end={[1, 0]}
|
|
258
|
+
/>
|
|
276
259
|
</View>
|
|
277
260
|
);
|
|
278
261
|
}
|
|
@@ -520,13 +503,15 @@ function TabsRoot({
|
|
|
520
503
|
|
|
521
504
|
// Overflow tracking for edge fades + keep-active-visible scrolling
|
|
522
505
|
const theme = useTheme();
|
|
523
|
-
// A scrolling strip paints no fill of its own: its surface is the theme's
|
|
524
|
-
//
|
|
525
|
-
const
|
|
526
|
-
|
|
527
|
-
:
|
|
528
|
-
|
|
529
|
-
|
|
506
|
+
// A scrolling strip paints no fill of its own: its surface is the theme's,
|
|
507
|
+
// or the elevated surface it sits on.
|
|
508
|
+
const elevatedGround = useElevatedSurface();
|
|
509
|
+
const surfaceKey = (
|
|
510
|
+
elevatedGround ? knobProps.elevatedSurface.backgroundColor : componentColors.surface.background
|
|
511
|
+
) as string;
|
|
512
|
+
const stripSurface = String(
|
|
513
|
+
theme[surfaceKey.replace(/^\$/, "") as "background"]?.val ?? surfaceKey,
|
|
514
|
+
);
|
|
530
515
|
const scrollRef = React.useRef<ScrollView>(null);
|
|
531
516
|
const tabRefs = React.useRef(new Map<string, HTMLElement>());
|
|
532
517
|
const scrollMetrics = React.useRef({ offset: 0, viewport: 0, content: 0, scrolled: false });
|
|
@@ -617,11 +602,6 @@ function TabsRoot({
|
|
|
617
602
|
? undefined
|
|
618
603
|
: stackRadiusProps(activePosition, outerRadiusToken, "horizontal");
|
|
619
604
|
|
|
620
|
-
// Web edge fades: a scroll-state mask keeps the fade background-agnostic.
|
|
621
|
-
// Native has no mask, so it lays a gradient of the strip's surface over the
|
|
622
|
-
// same edges (TabsEdgeFade).
|
|
623
|
-
const maskStyle: Record<string, string> | undefined = isWeb ? tabsEdgeMask(fades) : undefined;
|
|
624
|
-
|
|
625
605
|
const indicatorContent =
|
|
626
606
|
activeLayout && !isBand ? (
|
|
627
607
|
isUnderline ? (
|
|
@@ -910,7 +890,6 @@ function TabsRoot({
|
|
|
910
890
|
horizontal
|
|
911
891
|
showsHorizontalScrollIndicator={false}
|
|
912
892
|
scrollEventThrottle={16}
|
|
913
|
-
style={maskStyle as never}
|
|
914
893
|
// Slop padding keeps the 44px press floor from being clipped when
|
|
915
894
|
// the painted tab is smaller than the floor (LC-54 / nested scale).
|
|
916
895
|
contentContainerStyle={{ paddingVertical: slop }}
|
|
@@ -930,10 +909,10 @@ function TabsRoot({
|
|
|
930
909
|
{tabList}
|
|
931
910
|
</TabStripScroll>
|
|
932
911
|
)}
|
|
933
|
-
{!
|
|
912
|
+
{!equalDistribution && fades.left ? (
|
|
934
913
|
<TabsEdgeFade side="left" color={stripSurface} direction={direction} />
|
|
935
914
|
) : null}
|
|
936
|
-
{!
|
|
915
|
+
{!equalDistribution && fades.right ? (
|
|
937
916
|
<TabsEdgeFade side="right" color={stripSurface} direction={direction} />
|
|
938
917
|
) : null}
|
|
939
918
|
</StripWrapper>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { holdCueScale, holdCueStartMs } from "@multiplatform.one/forms";
|
|
2
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
3
|
+
import { act, fireEvent, screen } from "@testing-library/react";
|
|
4
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
5
|
+
import { Tooltip } from "./index.native";
|
|
6
|
+
import { TOOLTIP_NATIVE_LONG_PRESS_MS } from "./nativePress";
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
vi.useFakeTimers();
|
|
10
|
+
});
|
|
11
|
+
afterEach(() => {
|
|
12
|
+
vi.useRealTimers();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
type Pressed = (event?: unknown) => void;
|
|
16
|
+
|
|
17
|
+
function HeldTarget(props: {
|
|
18
|
+
onPressIn?: Pressed;
|
|
19
|
+
onPressOut?: Pressed;
|
|
20
|
+
scale?: number;
|
|
21
|
+
"data-hold"?: string;
|
|
22
|
+
}) {
|
|
23
|
+
return (
|
|
24
|
+
<button
|
|
25
|
+
type="button"
|
|
26
|
+
data-testid="held"
|
|
27
|
+
data-hold={props["data-hold"]}
|
|
28
|
+
data-scale={props.scale}
|
|
29
|
+
onMouseDown={() => props.onPressIn?.()}
|
|
30
|
+
onMouseUp={() => props.onPressOut?.()}
|
|
31
|
+
>
|
|
32
|
+
Info
|
|
33
|
+
</button>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
describe("native Tooltip hold cue (LC-197, FZ-8902)", () => {
|
|
38
|
+
it("shows the cue partway to the long press and clears it on release", () => {
|
|
39
|
+
renderWithProviders(
|
|
40
|
+
<Tooltip content="Details">
|
|
41
|
+
<HeldTarget />
|
|
42
|
+
</Tooltip>,
|
|
43
|
+
);
|
|
44
|
+
const target = screen.getByTestId("held");
|
|
45
|
+
expect(holdCueStartMs).toBeLessThan(TOOLTIP_NATIVE_LONG_PRESS_MS);
|
|
46
|
+
fireEvent.mouseDown(target);
|
|
47
|
+
expect(target).not.toHaveAttribute("data-hold");
|
|
48
|
+
act(() => {
|
|
49
|
+
vi.advanceTimersByTime(holdCueStartMs);
|
|
50
|
+
});
|
|
51
|
+
expect(target).toHaveAttribute("data-hold", "progress");
|
|
52
|
+
expect(target).toHaveAttribute("data-scale", String(holdCueScale));
|
|
53
|
+
fireEvent.mouseUp(target);
|
|
54
|
+
expect(target).not.toHaveAttribute("data-hold");
|
|
55
|
+
expect(target).not.toHaveAttribute("data-scale");
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it("drops the cue once the tooltip opens", () => {
|
|
59
|
+
renderWithProviders(
|
|
60
|
+
<Tooltip content="Details">
|
|
61
|
+
<HeldTarget />
|
|
62
|
+
</Tooltip>,
|
|
63
|
+
);
|
|
64
|
+
const target = screen.getByTestId("held");
|
|
65
|
+
fireEvent.mouseDown(target);
|
|
66
|
+
act(() => {
|
|
67
|
+
vi.advanceTimersByTime(TOOLTIP_NATIVE_LONG_PRESS_MS);
|
|
68
|
+
});
|
|
69
|
+
expect(target).not.toHaveAttribute("data-hold");
|
|
70
|
+
});
|
|
71
|
+
});
|
|
@@ -179,7 +179,7 @@ describe("Tooltip arrow shares the content fill", () => {
|
|
|
179
179
|
for (const scheme of ["light", "dark"] as const) {
|
|
180
180
|
it(`${scheme} resolves the same token on content and arrow`, async () => {
|
|
181
181
|
let expectedFill: string | undefined;
|
|
182
|
-
const key = scheme === "dark" ? "
|
|
182
|
+
const key = scheme === "dark" ? "color5" : "background";
|
|
183
183
|
function Probe() {
|
|
184
184
|
const theme = useTheme();
|
|
185
185
|
expectedFill = theme[key]?.val;
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
useResolvedKnobs,
|
|
14
14
|
warnTooltipOnDisabled,
|
|
15
15
|
} from "@multiplatform.one/theme";
|
|
16
|
-
import { useOverlayZIndex } from "@multiplatform.one/forms";
|
|
16
|
+
import { holdCueScale, useHoldCue, useOverlayZIndex } from "@multiplatform.one/forms";
|
|
17
17
|
|
|
18
18
|
import React from "react";
|
|
19
19
|
import { Pressable, StyleSheet } from "react-native";
|
|
@@ -100,6 +100,7 @@ export function Tooltip({
|
|
|
100
100
|
[setOpen, delay],
|
|
101
101
|
);
|
|
102
102
|
React.useEffect(() => () => press.dispose(), [press]);
|
|
103
|
+
const hold = useHoldCue();
|
|
103
104
|
|
|
104
105
|
React.useEffect(() => {
|
|
105
106
|
if (!open) {
|
|
@@ -128,15 +129,19 @@ export function Tooltip({
|
|
|
128
129
|
onPressIn: (event: unknown) => {
|
|
129
130
|
(children.props as { onPressIn?: PressHandler }).onPressIn?.(event);
|
|
130
131
|
press.pressIn();
|
|
132
|
+
hold.start();
|
|
131
133
|
},
|
|
132
134
|
onPressOut: (event: unknown) => {
|
|
133
135
|
(children.props as { onPressOut?: PressHandler }).onPressOut?.(event);
|
|
134
136
|
press.pressOut();
|
|
137
|
+
hold.stop();
|
|
135
138
|
},
|
|
136
139
|
onLongPress: (event: unknown) => {
|
|
137
140
|
(children.props as { onLongPress?: PressHandler }).onLongPress?.(event);
|
|
138
141
|
press.longPress();
|
|
142
|
+
hold.stop();
|
|
139
143
|
},
|
|
144
|
+
...(hold.holding && !open ? { scale: holdCueScale, "data-hold": "progress" } : null),
|
|
140
145
|
})
|
|
141
146
|
: children;
|
|
142
147
|
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LC-289 SHELL-KEEPS-ROUTE on the native path (FZ-9270): rotating an iPad or
|
|
3
|
+
* entering split view flips the size class, and the routed screen stays
|
|
4
|
+
* mounted inside the system tab host it sat in.
|
|
5
|
+
*/
|
|
6
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
7
|
+
import { HouseIcon, SparkleIcon } from "@phosphor-icons/react";
|
|
8
|
+
import { cleanup, fireEvent, screen } from "@testing-library/react";
|
|
9
|
+
import { useEffect } from "react";
|
|
10
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
11
|
+
import { AppShell, type AppShellDestination } from "./AppShell";
|
|
12
|
+
import type { NativeTabs } from "./TabHost.native";
|
|
13
|
+
|
|
14
|
+
const size = vi.hoisted(() => ({ value: "compact" as string }));
|
|
15
|
+
vi.mock("@multiplatform.one/theme", async (importOriginal) => ({
|
|
16
|
+
...(await importOriginal<typeof import("@multiplatform.one/theme")>()),
|
|
17
|
+
useLayoutSizeClass: () => size.value,
|
|
18
|
+
}));
|
|
19
|
+
vi.mock("@multiplatform.one/platform", async (importOriginal) => ({
|
|
20
|
+
...(await importOriginal<typeof import("@multiplatform.one/platform")>()),
|
|
21
|
+
isWeb: false,
|
|
22
|
+
}));
|
|
23
|
+
vi.mock("./TabHost", async () => {
|
|
24
|
+
const native = await import("./TabHost.native");
|
|
25
|
+
const { MpoTabHost } = await import("./MpoTabHost");
|
|
26
|
+
const fakeTabs: NativeTabs = {
|
|
27
|
+
Host: ({ children, tabBarHidden }) => (
|
|
28
|
+
<div data-testid="native-host" data-hidden={String(Boolean(tabBarHidden))}>
|
|
29
|
+
{children}
|
|
30
|
+
</div>
|
|
31
|
+
),
|
|
32
|
+
Screen: ({ children, tabKey }) => (
|
|
33
|
+
<section data-testid={`native-screen-${tabKey}`}>{children}</section>
|
|
34
|
+
),
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
...native,
|
|
38
|
+
TabHost: (props: Parameters<typeof native.TabHost>[0]) =>
|
|
39
|
+
native.itemsHaveNativeIcons(props.items, "ios") ? (
|
|
40
|
+
<native.NativeTabHost tabs={fakeTabs} {...props} />
|
|
41
|
+
) : (
|
|
42
|
+
<MpoTabHost {...props} />
|
|
43
|
+
),
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
afterEach(() => {
|
|
48
|
+
cleanup();
|
|
49
|
+
size.value = "compact";
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const destinations: AppShellDestination[] = [
|
|
53
|
+
{ key: "/", label: "Home", icon: HouseIcon, nativeIcon: { sfSymbol: "house" } },
|
|
54
|
+
{ key: "/pokemon", label: "Pokemon", icon: SparkleIcon, nativeIcon: { sfSymbol: "sparkles" } },
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
function Routed({ onMount }: { onMount: () => void }) {
|
|
58
|
+
useEffect(onMount, []);
|
|
59
|
+
return <input aria-label="Name" defaultValue="" />;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function frame(path: string, onMount: () => void) {
|
|
63
|
+
return (
|
|
64
|
+
<AppShell
|
|
65
|
+
destinations={destinations}
|
|
66
|
+
path={path}
|
|
67
|
+
onNavigate={() => {}}
|
|
68
|
+
title="multiplatform.one"
|
|
69
|
+
ownChrome={["/desk"]}
|
|
70
|
+
>
|
|
71
|
+
<Routed onMount={onMount} />
|
|
72
|
+
</AppShell>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
describe("AppShell on native across a size-class change (LC-289)", () => {
|
|
77
|
+
it.each([
|
|
78
|
+
["a tab root", "/pokemon"],
|
|
79
|
+
["a pushed route", "/pokemon/pikachu"],
|
|
80
|
+
["an own-chrome route", "/desk"],
|
|
81
|
+
])("keeps the routed screen and its form state on %s", (_, path) => {
|
|
82
|
+
const onMount = vi.fn();
|
|
83
|
+
size.value = "expanded";
|
|
84
|
+
const view = renderWithProviders(frame(path, onMount));
|
|
85
|
+
fireEvent.change(screen.getByLabelText("Name"), { target: { value: "Pikachu" } });
|
|
86
|
+
for (const next of ["compact", "medium", "compact", "expanded"]) {
|
|
87
|
+
size.value = next;
|
|
88
|
+
view.rerender(frame(path, onMount));
|
|
89
|
+
}
|
|
90
|
+
expect(onMount).toHaveBeenCalledTimes(1);
|
|
91
|
+
expect((screen.getByLabelText("Name") as HTMLInputElement).value).toBe("Pikachu");
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
it("hides the system tab bar at regular width and shows it on a phone's tab root", () => {
|
|
95
|
+
size.value = "expanded";
|
|
96
|
+
const view = renderWithProviders(frame("/pokemon", () => {}));
|
|
97
|
+
expect(screen.getByTestId("native-host").getAttribute("data-hidden")).toBe("true");
|
|
98
|
+
expect(screen.getByTestId("app-shell-sidebar")).toBeTruthy();
|
|
99
|
+
size.value = "compact";
|
|
100
|
+
view.rerender(frame("/pokemon", () => {}));
|
|
101
|
+
expect(screen.getByTestId("native-host").getAttribute("data-hidden")).toBe("false");
|
|
102
|
+
expect(screen.queryByTestId("app-shell-sidebar")).toBeNull();
|
|
103
|
+
});
|
|
104
|
+
});
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
8
8
|
import { HouseIcon, LightningIcon, SparkleIcon } from "@phosphor-icons/react";
|
|
9
9
|
import { act, cleanup, fireEvent, screen } from "@testing-library/react";
|
|
10
|
+
import { useEffect } from "react";
|
|
10
11
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
11
12
|
import {
|
|
12
13
|
CONTENT_MAX_WIDTH,
|
|
@@ -360,3 +361,51 @@ describe("AppShell at regular width", () => {
|
|
|
360
361
|
expect(screen.queryByTestId("list-page-sidebar")).toBeNull();
|
|
361
362
|
});
|
|
362
363
|
});
|
|
364
|
+
|
|
365
|
+
describe("AppShell across a size-class change (LC-289 SHELL-KEEPS-ROUTE, FZ-9270)", () => {
|
|
366
|
+
function Routed({ onMount }: { onMount: () => void }) {
|
|
367
|
+
useEffect(onMount, []);
|
|
368
|
+
return (
|
|
369
|
+
<div data-testid="page" style={{ overflow: "auto", height: 100 }}>
|
|
370
|
+
<input aria-label="Name" defaultValue="" />
|
|
371
|
+
<div style={{ height: 1000 }} />
|
|
372
|
+
</div>
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
function frame(path: string, onMount: () => void) {
|
|
377
|
+
return (
|
|
378
|
+
<AppShell
|
|
379
|
+
destinations={destinations}
|
|
380
|
+
path={path}
|
|
381
|
+
onNavigate={() => {}}
|
|
382
|
+
title="multiplatform.one"
|
|
383
|
+
ownChrome={["/desk"]}
|
|
384
|
+
>
|
|
385
|
+
<Routed onMount={onMount} />
|
|
386
|
+
</AppShell>
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
it.each([
|
|
391
|
+
["a tab root", "/pokemon"],
|
|
392
|
+
["a pushed route", "/pokemon/pikachu"],
|
|
393
|
+
["a route outside the destinations", "/playground"],
|
|
394
|
+
["an own-chrome route", "/desk"],
|
|
395
|
+
])("keeps the routed screen, its scroll and its form state on %s", (_, path) => {
|
|
396
|
+
const onMount = vi.fn();
|
|
397
|
+
size.value = "expanded";
|
|
398
|
+
const view = renderWithProviders(frame(path, onMount));
|
|
399
|
+
const page = screen.getByTestId("page");
|
|
400
|
+
page.scrollTop = 240;
|
|
401
|
+
fireEvent.change(screen.getByLabelText("Name"), { target: { value: "Pikachu" } });
|
|
402
|
+
for (const next of ["compact", "medium", "compact", "expanded"]) {
|
|
403
|
+
size.value = next;
|
|
404
|
+
view.rerender(frame(path, onMount));
|
|
405
|
+
}
|
|
406
|
+
expect(onMount).toHaveBeenCalledTimes(1);
|
|
407
|
+
expect(screen.getByTestId("page")).toBe(page);
|
|
408
|
+
expect(page.scrollTop).toBe(240);
|
|
409
|
+
expect((screen.getByLabelText("Name") as HTMLInputElement).value).toBe("Pikachu");
|
|
410
|
+
});
|
|
411
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
2
|
+
import { HouseIcon, SparkleIcon } from "@phosphor-icons/react";
|
|
3
|
+
import { cleanup, fireEvent, screen } from "@testing-library/react";
|
|
4
|
+
import { isWeb } from "tamagui";
|
|
5
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
6
|
+
import { AppShell, type AppShellDestination } from "./AppShell";
|
|
7
|
+
|
|
8
|
+
vi.mock("./TabHost", async () => await import("./TabHost.native"));
|
|
9
|
+
vi.mock("@multiplatform.one/theme", async (importOriginal) => ({
|
|
10
|
+
...(await importOriginal<typeof import("@multiplatform.one/theme")>()),
|
|
11
|
+
useLayoutSizeClass: () => "compact",
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
afterEach(cleanup);
|
|
15
|
+
|
|
16
|
+
const tap = (el: Element) => {
|
|
17
|
+
fireEvent.mouseDown(el, { button: 0, buttons: 1 });
|
|
18
|
+
fireEvent.mouseUp(el, { button: 0, buttons: 0 });
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const destinations: AppShellDestination[] = [
|
|
22
|
+
{ key: "/", label: "Home", icon: HouseIcon },
|
|
23
|
+
{ key: "/pokemon", label: "Pokemon", icon: SparkleIcon },
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
function shell(first: string) {
|
|
27
|
+
const onBack = vi.fn();
|
|
28
|
+
const ui = (path: string) => (
|
|
29
|
+
<AppShell
|
|
30
|
+
destinations={destinations}
|
|
31
|
+
path={path}
|
|
32
|
+
onNavigate={vi.fn()}
|
|
33
|
+
onBack={onBack}
|
|
34
|
+
title="multiplatform.one"
|
|
35
|
+
>
|
|
36
|
+
<span>page</span>
|
|
37
|
+
</AppShell>
|
|
38
|
+
);
|
|
39
|
+
const view = renderWithProviders(ui(first));
|
|
40
|
+
return { onBack, go: (path: string) => view.rerender(ui(path)) };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
describe("AppShell back above a tab root on native (LC-295 STACK-BACK)", () => {
|
|
44
|
+
it("runs tamagui's native build", () => {
|
|
45
|
+
expect(isWeb).toBe(false);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it("draws the bar's back on a cold deep link under no tab, and a tap goes to the first tab", () => {
|
|
49
|
+
const { onBack } = shell("/profile");
|
|
50
|
+
tap(screen.getByText("Home"));
|
|
51
|
+
expect(onBack).toHaveBeenCalledWith("/");
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it("labels back with the screen the route was pushed from", () => {
|
|
55
|
+
const { go, onBack } = shell("/pokemon");
|
|
56
|
+
go("/profile");
|
|
57
|
+
expect(screen.queryByText("Home")).toBeNull();
|
|
58
|
+
tap(screen.getByText("Pokemon"));
|
|
59
|
+
expect(onBack).toHaveBeenCalledWith("/");
|
|
60
|
+
});
|
|
61
|
+
});
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
2
|
+
import { HouseIcon, LightningIcon, SparkleIcon } from "@phosphor-icons/react";
|
|
3
|
+
import { cleanup, fireEvent } from "@testing-library/react";
|
|
4
|
+
import type { ReactNode } from "react";
|
|
5
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
6
|
+
import { PageHeader, Screen } from "../layouts/page";
|
|
7
|
+
import { AppShell, type AppShellDestination } from "./AppShell";
|
|
8
|
+
import { nextShellStack } from "./stackBack";
|
|
9
|
+
|
|
10
|
+
const size = vi.hoisted(() => ({ value: "compact" as string }));
|
|
11
|
+
vi.mock("@multiplatform.one/theme", async (importOriginal) => ({
|
|
12
|
+
...(await importOriginal<typeof import("@multiplatform.one/theme")>()),
|
|
13
|
+
useLayoutSizeClass: () => size.value,
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
cleanup();
|
|
18
|
+
size.value = "compact";
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const destinations: AppShellDestination[] = [
|
|
22
|
+
{ key: "/", label: "Home", icon: HouseIcon },
|
|
23
|
+
{ key: "/pokemon", label: "Pokemon", icon: SparkleIcon },
|
|
24
|
+
{ key: "/moves", label: "Moves", icon: LightningIcon, placement: "more" },
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
function page(title: string) {
|
|
28
|
+
return (
|
|
29
|
+
<Screen>
|
|
30
|
+
<PageHeader title={title} />
|
|
31
|
+
</Screen>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function stack(first: string, firstPage: ReactNode = <span>page</span>) {
|
|
36
|
+
const onBack = vi.fn();
|
|
37
|
+
const ui = (path: string, children: ReactNode) => (
|
|
38
|
+
<AppShell
|
|
39
|
+
destinations={destinations}
|
|
40
|
+
path={path}
|
|
41
|
+
onNavigate={vi.fn()}
|
|
42
|
+
onBack={onBack}
|
|
43
|
+
title="multiplatform.one"
|
|
44
|
+
>
|
|
45
|
+
{children}
|
|
46
|
+
</AppShell>
|
|
47
|
+
);
|
|
48
|
+
const view = renderWithProviders(ui(first, firstPage));
|
|
49
|
+
const go = (path: string, children: ReactNode = <span>page</span>) =>
|
|
50
|
+
view.rerender(ui(path, children));
|
|
51
|
+
return { onBack, go };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const backControl = () =>
|
|
55
|
+
document.querySelector("[data-top-bar-control='back']") as HTMLElement | null;
|
|
56
|
+
|
|
57
|
+
describe("nextShellStack (LC-295)", () => {
|
|
58
|
+
it("pushes a route, pops to one already below and resets at a tab root", () => {
|
|
59
|
+
expect(nextShellStack(["/"], "/profile", false)).toEqual(["/", "/profile"]);
|
|
60
|
+
expect(nextShellStack(["/", "/profile", "/profile/edit"], "/profile", false)).toEqual([
|
|
61
|
+
"/",
|
|
62
|
+
"/profile",
|
|
63
|
+
]);
|
|
64
|
+
expect(nextShellStack(["/", "/profile"], "/pokemon", true)).toEqual(["/pokemon"]);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
describe("AppShell back above a tab root (LC-295 STACK-BACK)", () => {
|
|
69
|
+
for (const width of ["compact", "expanded"]) {
|
|
70
|
+
it(`draws back on a cold deep link to a route under no tab, labelled with the first tab (${width})`, () => {
|
|
71
|
+
size.value = width;
|
|
72
|
+
const { onBack } = stack("/profile");
|
|
73
|
+
const back = backControl();
|
|
74
|
+
expect(back?.textContent).toContain("Home");
|
|
75
|
+
fireEvent.click(back!);
|
|
76
|
+
expect(onBack).toHaveBeenCalledWith("/");
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
it("labels back with the previous screen's title once the stack has one", () => {
|
|
81
|
+
const { go } = stack("/", page("Welcome"));
|
|
82
|
+
expect(backControl()).toBeNull();
|
|
83
|
+
go("/profile");
|
|
84
|
+
expect(backControl()?.textContent).toContain("Welcome");
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("labels a route pushed under a tab with the screen it came from", () => {
|
|
88
|
+
const { go, onBack } = stack("/pokemon", page("All Pokemon"));
|
|
89
|
+
go("/pokemon/pikachu");
|
|
90
|
+
expect(backControl()?.textContent).toContain("All Pokemon");
|
|
91
|
+
fireEvent.click(backControl()!);
|
|
92
|
+
expect(onBack).toHaveBeenCalledWith("/pokemon");
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it("follows pops and tab switches: a tab root has no back", () => {
|
|
96
|
+
const { go } = stack("/", page("Welcome"));
|
|
97
|
+
go("/profile", page("Profile"));
|
|
98
|
+
go("/profile/edit");
|
|
99
|
+
expect(backControl()?.textContent).toContain("Profile");
|
|
100
|
+
go("/profile", page("Profile"));
|
|
101
|
+
expect(backControl()?.textContent).toContain("Welcome");
|
|
102
|
+
go("/pokemon", page("All Pokemon"));
|
|
103
|
+
expect(backControl()).toBeNull();
|
|
104
|
+
go("/profile");
|
|
105
|
+
expect(backControl()?.textContent).toContain("All Pokemon");
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
it("draws no back at a more destination's root", () => {
|
|
109
|
+
stack("/moves");
|
|
110
|
+
expect(backControl()).toBeNull();
|
|
111
|
+
});
|
|
112
|
+
});
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
SquaresFourIcon,
|
|
8
8
|
StackIcon,
|
|
9
9
|
} from "@phosphor-icons/react";
|
|
10
|
-
import { useState } from "react";
|
|
10
|
+
import { useEffect, useState } from "react";
|
|
11
11
|
import { XStack, YStack } from "tamagui";
|
|
12
12
|
import { Button } from "@multiplatform.one/forms";
|
|
13
13
|
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
@@ -169,6 +169,56 @@ export const TabRoot: Story = { render: () => <Demo initialPath="/pokemon" /> };
|
|
|
169
169
|
/** A pushed route: tinted back to the destination, its tab still selected. */
|
|
170
170
|
export const Pushed: Story = { render: () => <Demo initialPath="/pokemon/pikachu" /> };
|
|
171
171
|
|
|
172
|
+
function ProfilePage() {
|
|
173
|
+
return (
|
|
174
|
+
<Screen>
|
|
175
|
+
<PageHeader title="Profile" subtitle="Clay Risser" />
|
|
176
|
+
<PageSection title="Account">
|
|
177
|
+
{["Name", "Email", "Language", "Time zone"].map((row) => (
|
|
178
|
+
<XStack key={row} alignItems="center" minHeight="$4">
|
|
179
|
+
<Text flexGrow={1}>{row}</Text>
|
|
180
|
+
</XStack>
|
|
181
|
+
))}
|
|
182
|
+
</PageSection>
|
|
183
|
+
</Screen>
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function StackDemo({ start, push }: { start: string; push?: string }) {
|
|
188
|
+
const [stack, setStack] = useState([start]);
|
|
189
|
+
const path = stack[stack.length - 1]!;
|
|
190
|
+
useEffect(() => {
|
|
191
|
+
if (push) setStack((prev) => [...prev, push]);
|
|
192
|
+
}, [push]);
|
|
193
|
+
const open = (next: string) => setStack((prev) => [...prev, next]);
|
|
194
|
+
return (
|
|
195
|
+
<AppShell
|
|
196
|
+
destinations={destinations}
|
|
197
|
+
path={path}
|
|
198
|
+
onNavigate={(key) => setStack([key])}
|
|
199
|
+
onBack={(key) => setStack((prev) => (prev.length > 1 ? prev.slice(0, -1) : [key]))}
|
|
200
|
+
title="multiplatform.one"
|
|
201
|
+
logo={<Mark />}
|
|
202
|
+
actions={<PageBarButton aria-label="Theme" icon={GearIcon} edge="end" />}
|
|
203
|
+
ownChrome={["/backoffice"]}
|
|
204
|
+
>
|
|
205
|
+
{path === "/profile" ? (
|
|
206
|
+
<ProfilePage />
|
|
207
|
+
) : (
|
|
208
|
+
<DemoPage path={path} open={open} items={destinations} />
|
|
209
|
+
)}
|
|
210
|
+
</AppShell>
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** A route under no tab, pushed from Pokemon: back names the screen it came from (LC-295). */
|
|
215
|
+
export const AboveTabRoot: Story = {
|
|
216
|
+
render: () => <StackDemo start="/pokemon" push="/profile" />,
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
/** The same route opened cold: back names the first tab and goes there (LC-295). */
|
|
220
|
+
export const ColdDeepLink: Story = { render: () => <StackDemo start="/profile" /> };
|
|
221
|
+
|
|
172
222
|
/** A page that hands the shell a bottom accessory: the tab bar floats it above itself. */
|
|
173
223
|
export const WithAccessory: Story = {
|
|
174
224
|
render: () => <Demo initialPath="/pokemon" accessory />,
|