@multiplatform.one/components 7.60.0 → 7.61.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/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/index.native.js +2 -2
- package/dist/cjs/Carousel/index.native.js.map +1 -1
- package/dist/cjs/Chip/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/index.native.js.map +1 -1
- package/dist/cjs/Dialog.native.js.map +1 -1
- package/dist/cjs/DotIndicator/index.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/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/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/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.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/ScrollView/revealFocusedField.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/detents.native.js.map +1 -1
- package/dist/cjs/SheetModal/useSheetFrameFocus.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/Tabs/index.native.js +1 -1
- 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 +2 -2
- 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/nativePress.native.js.map +1 -1
- package/dist/cjs/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/cjs/TreeSelect/index.native.js +1 -1
- 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/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/BottomAccessory.cjs +43 -0
- package/dist/cjs/appShell/BottomAccessory.native.js +53 -0
- package/dist/cjs/appShell/BottomAccessory.native.js.map +1 -0
- package/dist/cjs/appShell/Dock.native.js.map +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.native.js +1 -1
- package/dist/cjs/appShell/Springboard.native.js.map +1 -1
- package/dist/cjs/appShell/SystemBar.native.js.map +1 -1
- package/dist/cjs/appShell/TabBar.cjs +99 -17
- package/dist/cjs/appShell/TabBar.native.js +109 -17
- package/dist/cjs/appShell/TabBar.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.cjs +76 -0
- package/dist/cjs/appShell/bottomChrome.native.js +110 -0
- package/dist/cjs/appShell/bottomChrome.native.js.map +1 -0
- package/dist/cjs/appShell/bottomInset.cjs +30 -0
- package/dist/cjs/appShell/bottomInset.native.js +34 -0
- package/dist/cjs/appShell/bottomInset.native.js.map +1 -0
- package/dist/cjs/appShell/index.cjs +13 -1
- package/dist/cjs/appShell/index.native.js +12 -0
- package/dist/cjs/appShell/index.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 +1 -1
- 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.native.js +7 -7
- 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/Pre/index.native.js.map +1 -1
- package/dist/cjs/code/index.native.js +5 -5
- package/dist/cjs/code/index.native.js.map +1 -1
- 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/index.native.js +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/index.native.js.map +1 -1
- package/dist/cjs/index.native.js +32 -32
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/knobImmuneExports.native.js.map +1 -1
- package/dist/cjs/layouts/AsyncBoundary.native.js +2 -2
- 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.map +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/ViewSwitcher.native.js.map +1 -1
- package/dist/cjs/layouts/attachments.native.js +1 -1
- package/dist/cjs/layouts/attachments.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 +11 -3
- package/dist/cjs/layouts/page.native.js +13 -5
- 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.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.native.js +2 -2
- 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/setTinted.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/Dashboard.native.js +2 -2
- package/dist/cjs/views/Dashboard.native.js.map +1 -1
- 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 +1 -1
- 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/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/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.native.js +1 -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/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/esm/appShell/BottomAccessory.mjs +18 -0
- package/dist/esm/appShell/BottomAccessory.mjs.map +1 -0
- package/dist/esm/appShell/BottomAccessory.native.js +25 -0
- package/dist/esm/appShell/BottomAccessory.native.js.map +1 -0
- package/dist/esm/appShell/TabBar.mjs +99 -20
- package/dist/esm/appShell/TabBar.mjs.map +1 -1
- package/dist/esm/appShell/TabBar.native.js +109 -20
- package/dist/esm/appShell/TabBar.native.js.map +1 -1
- package/dist/esm/appShell/bottomChrome.mjs +46 -0
- package/dist/esm/appShell/bottomChrome.mjs.map +1 -0
- package/dist/esm/appShell/bottomChrome.native.js +77 -0
- package/dist/esm/appShell/bottomChrome.native.js.map +1 -0
- package/dist/esm/appShell/bottomInset.mjs +5 -0
- package/dist/esm/appShell/bottomInset.mjs.map +1 -0
- package/dist/esm/appShell/bottomInset.native.js +6 -0
- package/dist/esm/appShell/bottomInset.native.js.map +1 -0
- package/dist/esm/appShell/index.mjs +3 -0
- package/dist/esm/appShell/index.mjs.map +1 -1
- package/dist/esm/appShell/index.native.js +3 -0
- package/dist/esm/appShell/index.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +11 -3
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +11 -3
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/jsx/Accordion/index.native.js +1 -1
- package/dist/jsx/Accordion/index.native.js.map +1 -1
- package/dist/jsx/Alert/index.native.js.map +1 -1
- package/dist/jsx/AnimateHeight/index.native.js.map +1 -1
- package/dist/jsx/Avatar/getInitials.native.js.map +1 -1
- package/dist/jsx/Avatar/index.native.js.map +1 -1
- package/dist/jsx/Badge/index.native.js.map +1 -1
- package/dist/jsx/Button.native.js.map +1 -1
- package/dist/jsx/Card.native.js.map +1 -1
- package/dist/jsx/CardFooter.native.js.map +1 -1
- package/dist/jsx/CardHeader.native.js.map +1 -1
- package/dist/jsx/Carousel/index.native.js +2 -2
- package/dist/jsx/Carousel/index.native.js.map +1 -1
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/Collapsible.native.js.map +1 -1
- package/dist/jsx/ContextMenu/index.native.js.map +1 -1
- package/dist/jsx/CopyField/index.native.js.map +1 -1
- package/dist/jsx/Dialog.native.js.map +1 -1
- package/dist/jsx/DotIndicator/index.native.js.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js.map +1 -1
- package/dist/jsx/ErrorBoundary/index.native.js.map +1 -1
- package/dist/jsx/Heading.native.js.map +1 -1
- package/dist/jsx/Meter/index.native.js +1 -1
- package/dist/jsx/Meter/index.native.js.map +1 -1
- package/dist/jsx/Meter/meter.native.js.map +1 -1
- package/dist/jsx/OverflowRow/index.native.js +1 -1
- package/dist/jsx/OverflowRow/index.native.js.map +1 -1
- package/dist/jsx/Pagination.native.js +1 -1
- package/dist/jsx/Pagination.native.js.map +1 -1
- package/dist/jsx/Popover.native.js.map +1 -1
- package/dist/jsx/ProgressSteps/index.native.js.map +1 -1
- package/dist/jsx/Quote/index.native.js.map +1 -1
- package/dist/jsx/ScrollView/revealFocusedField.native.js.map +1 -1
- package/dist/jsx/Separator/index.native.js.map +1 -1
- package/dist/jsx/Sheet.native.js.map +1 -1
- package/dist/jsx/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/jsx/SheetModal/detents.native.js.map +1 -1
- package/dist/jsx/SheetModal/useSheetFrameFocus.native.js.map +1 -1
- package/dist/jsx/Skeleton/index.native.js.map +1 -1
- package/dist/jsx/SkipLink/index.native.js.map +1 -1
- package/dist/jsx/SortableList/SortableHandle.native.js.map +1 -1
- package/dist/jsx/SortableList/index.native.js.map +1 -1
- package/dist/jsx/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/jsx/Tabs/index.native.js +1 -1
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/Text.native.js.map +1 -1
- package/dist/jsx/ThemePresetPicker/index.native.js +2 -2
- package/dist/jsx/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/jsx/Toast/index.native.js.map +1 -1
- package/dist/jsx/Toast/store.native.js.map +1 -1
- package/dist/jsx/Tooltip/nativePress.native.js.map +1 -1
- package/dist/jsx/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/jsx/TreeSelect/index.native.js +1 -1
- package/dist/jsx/TreeSelect/index.native.js.map +1 -1
- package/dist/jsx/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/jsx/Video/PlayerChrome.native.js.map +1 -1
- package/dist/jsx/Video/VideoFrame.native.js.map +1 -1
- package/dist/jsx/Video/types.native.js.map +1 -1
- package/dist/jsx/Wheel/index.native.js.map +1 -1
- package/dist/jsx/Wizard/index.native.js +2 -2
- package/dist/jsx/Wizard/index.native.js.map +1 -1
- package/dist/jsx/actions/ActionBar.native.js.map +1 -1
- package/dist/jsx/actions/DangerSection.native.js.map +1 -1
- package/dist/jsx/actions/DestructiveAction.native.js.map +1 -1
- package/dist/jsx/actions/HeaderActions.native.js +2 -2
- package/dist/jsx/actions/HeaderActions.native.js.map +1 -1
- package/dist/jsx/actions/devWarn.native.js.map +1 -1
- package/dist/jsx/actions/index.native.js.map +1 -1
- package/dist/jsx/actions/severity.native.js.map +1 -1
- package/dist/jsx/appShell/BottomAccessory.mjs +18 -0
- package/dist/jsx/appShell/BottomAccessory.mjs.map +1 -0
- package/dist/jsx/appShell/BottomAccessory.native.js +53 -0
- package/dist/jsx/appShell/BottomAccessory.native.js.map +1 -0
- package/dist/jsx/appShell/Dock.native.js.map +1 -1
- package/dist/jsx/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/jsx/appShell/Springboard.native.js +1 -1
- package/dist/jsx/appShell/Springboard.native.js.map +1 -1
- package/dist/jsx/appShell/SystemBar.native.js.map +1 -1
- package/dist/jsx/appShell/TabBar.mjs +99 -20
- package/dist/jsx/appShell/TabBar.mjs.map +1 -1
- package/dist/jsx/appShell/TabBar.native.js +109 -17
- package/dist/jsx/appShell/TabBar.native.js.map +1 -1
- package/dist/jsx/appShell/appTile.native.js +1 -1
- package/dist/jsx/appShell/appTile.native.js.map +1 -1
- package/dist/jsx/appShell/bottomChrome.mjs +46 -0
- package/dist/jsx/appShell/bottomChrome.mjs.map +1 -0
- package/dist/jsx/appShell/bottomChrome.native.js +110 -0
- package/dist/jsx/appShell/bottomChrome.native.js.map +1 -0
- package/dist/jsx/appShell/bottomInset.mjs +5 -0
- package/dist/jsx/appShell/bottomInset.mjs.map +1 -0
- package/dist/jsx/appShell/bottomInset.native.js +34 -0
- package/dist/jsx/appShell/bottomInset.native.js.map +1 -0
- package/dist/jsx/appShell/index.mjs +3 -0
- package/dist/jsx/appShell/index.mjs.map +1 -1
- package/dist/jsx/appShell/index.native.js +12 -0
- package/dist/jsx/appShell/index.native.js.map +1 -1
- package/dist/jsx/charts/Axis.native.js.map +1 -1
- package/dist/jsx/charts/BarChart.native.js.map +1 -1
- package/dist/jsx/charts/ChartDataView.native.js +1 -1
- package/dist/jsx/charts/ChartDataView.native.js.map +1 -1
- package/dist/jsx/charts/ChartSurface.native.js.map +1 -1
- package/dist/jsx/charts/LineChart.native.js.map +1 -1
- package/dist/jsx/charts/PieChart.native.js.map +1 -1
- package/dist/jsx/charts/Sparkline.native.js.map +1 -1
- package/dist/jsx/charts/accessibility.native.js.map +1 -1
- package/dist/jsx/charts/chartHeight.native.js.map +1 -1
- package/dist/jsx/charts/composeChart.native.js.map +1 -1
- package/dist/jsx/charts/index.native.js.map +1 -1
- package/dist/jsx/charts/math.native.js.map +1 -1
- package/dist/jsx/charts/series.native.js.map +1 -1
- package/dist/jsx/charts/svg.native.js.map +1 -1
- package/dist/jsx/charts/types.native.js.map +1 -1
- package/dist/jsx/charts/useChartTheme.native.js.map +1 -1
- package/dist/jsx/code/Code/index.native.js.map +1 -1
- package/dist/jsx/code/CodeBlock/index.native.js +7 -7
- package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
- package/dist/jsx/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
- package/dist/jsx/code/Pre/index.native.js.map +1 -1
- package/dist/jsx/code/index.native.js +5 -5
- package/dist/jsx/code/index.native.js.map +1 -1
- package/dist/jsx/componentColors.native.js.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/jsx/feedback/NotifyHost.native.js +2 -2
- package/dist/jsx/feedback/NotifyHost.native.js.map +1 -1
- package/dist/jsx/feedback/copy.native.js.map +1 -1
- package/dist/jsx/feedback/index.native.js.map +1 -1
- package/dist/jsx/feedback/notify.native.js.map +1 -1
- package/dist/jsx/feedback/route.native.js.map +1 -1
- package/dist/jsx/feedback/store.native.js.map +1 -1
- package/dist/jsx/formLayouts/FormLayouts.native.js +1 -1
- package/dist/jsx/formLayouts/FormLayouts.native.js.map +1 -1
- package/dist/jsx/formLayouts/PreferencePanel.native.js +2 -2
- package/dist/jsx/formLayouts/PreferencePanel.native.js.map +1 -1
- package/dist/jsx/formLayouts/index.native.js.map +1 -1
- package/dist/jsx/hooks/index.native.js +1 -1
- package/dist/jsx/hooks/index.native.js.map +1 -1
- package/dist/jsx/hooks/useClipboard.native.js.map +1 -1
- package/dist/jsx/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/jsx/icons/CheckRegular.native.js.map +1 -1
- package/dist/jsx/icons/MinusRegular.native.js.map +1 -1
- package/dist/jsx/icons/index.native.js.map +1 -1
- package/dist/jsx/icons/lucide.native.js.map +1 -1
- package/dist/jsx/icons/themed.native.js.map +1 -1
- package/dist/jsx/images/Image/ImageFrame.native.js +1 -1
- package/dist/jsx/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/jsx/images/Image/index.native.js +1 -1
- package/dist/jsx/images/Image/shared.native.js +1 -1
- package/dist/jsx/images/Image/shared.native.js.map +1 -1
- package/dist/jsx/images/Image/types.native.js.map +1 -1
- package/dist/jsx/images/index.native.js.map +1 -1
- package/dist/jsx/index.native.js +32 -32
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/knobImmuneExports.native.js.map +1 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js +2 -2
- package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/jsx/layouts/Debug/index.native.js.map +1 -1
- package/dist/jsx/layouts/EmptyState.native.js.map +1 -1
- package/dist/jsx/layouts/IdentityPlate.native.js.map +1 -1
- package/dist/jsx/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/jsx/layouts/PageTemplates.native.js.map +1 -1
- package/dist/jsx/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/jsx/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/jsx/layouts/StatusDot.native.js.map +1 -1
- package/dist/jsx/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/jsx/layouts/attachments.native.js +1 -1
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/jsx/layouts/index.native.js +3 -3
- package/dist/jsx/layouts/index.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +11 -3
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +13 -5
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/jsx/layouts/screenScroll.native.js.map +1 -1
- package/dist/jsx/layouts/shellSidebarSlot.native.js.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js +1 -1
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/dist/jsx/layouts/tags.native.js +2 -2
- package/dist/jsx/layouts/tags.native.js.map +1 -1
- package/dist/jsx/layouts/timeline.native.js +2 -2
- package/dist/jsx/layouts/timeline.native.js.map +1 -1
- package/dist/jsx/layouts/toolbar.native.js +1 -1
- package/dist/jsx/layouts/toolbar.native.js.map +1 -1
- package/dist/jsx/shared/actionScan.native.js.map +1 -1
- package/dist/jsx/shared/i18n.native.js.map +1 -1
- package/dist/jsx/shared/restoreRetries.native.js.map +1 -1
- package/dist/jsx/shared/t.native.js.map +1 -1
- package/dist/jsx/shared/textRidesText.native.js.map +1 -1
- package/dist/jsx/shared/useReturnFocusOnClose.native.js.map +1 -1
- package/dist/jsx/surfaces.native.js +1 -1
- package/dist/jsx/surfaces.native.js.map +1 -1
- package/dist/jsx/tamagui.native.js +1 -1
- package/dist/jsx/tamagui.native.js.map +1 -1
- package/dist/jsx/testSetup.native.js.map +1 -1
- package/dist/jsx/utils/setTinted.native.js.map +1 -1
- package/dist/jsx/utils/unwrapText.native.js.map +1 -1
- package/dist/jsx/views/Calendar.native.js +1 -1
- package/dist/jsx/views/Calendar.native.js.map +1 -1
- package/dist/jsx/views/Dashboard.native.js +2 -2
- package/dist/jsx/views/Dashboard.native.js.map +1 -1
- package/dist/jsx/views/Gantt.native.js +2 -2
- package/dist/jsx/views/Gantt.native.js.map +1 -1
- package/dist/jsx/views/GanttDateGrip.native.js.map +1 -1
- package/dist/jsx/views/ImageGrid.native.js +1 -1
- package/dist/jsx/views/ImageGrid.native.js.map +1 -1
- package/dist/jsx/views/Kanban.native.js +1 -1
- package/dist/jsx/views/List.native.js.map +1 -1
- package/dist/jsx/views/Matrix.native.js +2 -2
- package/dist/jsx/views/Matrix.native.js.map +1 -1
- package/dist/jsx/views/ReportBuilder.native.js +2 -2
- package/dist/jsx/views/ReportBuilder.native.js.map +1 -1
- package/dist/jsx/views/TreeView.native.js.map +1 -1
- package/dist/jsx/views/calendarMath.native.js.map +1 -1
- package/dist/jsx/views/ganttIntervals.native.js.map +1 -1
- package/dist/jsx/views/ganttMath.native.js.map +1 -1
- package/dist/jsx/views/index.native.js +1 -1
- package/dist/jsx/views/index.native.js.map +1 -1
- package/dist/jsx/views/kanbanDnd.native.js.map +1 -1
- package/dist/jsx/views/matrixMath.native.js.map +1 -1
- package/dist/jsx/views/treeViewDnd.native.js.map +1 -1
- package/dist/jsx/views/treeViewLayout.native.js.map +1 -1
- package/dist/jsx/views/treeViewMotion.native.js.map +1 -1
- package/dist/jsx/views/treeViewReveal.native.js.map +1 -1
- package/package.json +9 -9
- package/src/appShell/BottomAccessory.tsx +18 -0
- package/src/appShell/TabBar.spec.tsx +97 -26
- package/src/appShell/TabBar.stories.tsx +24 -6
- package/src/appShell/TabBar.tsx +158 -32
- package/src/appShell/bottomChrome.ts +68 -0
- package/src/appShell/bottomInset.native.ts +6 -0
- package/src/appShell/bottomInset.ts +7 -0
- package/src/appShell/index.ts +2 -0
- package/src/layouts/Screen.chromeClearance.spec.tsx +41 -0
- package/src/layouts/page.tsx +16 -0
- package/types/appShell/BottomAccessory.d.ts +11 -0
- package/types/appShell/BottomAccessory.d.ts.map +1 -0
- package/types/appShell/TabBar.d.ts +32 -10
- package/types/appShell/TabBar.d.ts.map +1 -1
- package/types/appShell/bottomChrome.d.ts +22 -0
- package/types/appShell/bottomChrome.d.ts.map +1 -0
- package/types/appShell/bottomInset.d.ts +6 -0
- package/types/appShell/bottomInset.d.ts.map +1 -0
- package/types/appShell/bottomInset.native.d.ts +3 -0
- package/types/appShell/bottomInset.native.d.ts.map +1 -0
- package/types/appShell/index.d.ts +2 -0
- package/types/appShell/index.d.ts.map +1 -1
- package/types/layouts/page.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/components",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.61.0",
|
|
4
4
|
"description": "multiplatform.one ui components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@floating-ui/react": "^0.27.20",
|
|
61
|
-
"@multiplatform.one/forms": "^7.
|
|
62
|
-
"@multiplatform.one/i18n": "^7.
|
|
63
|
-
"@multiplatform.one/platform": "^7.
|
|
64
|
-
"@multiplatform.one/router": "^7.
|
|
65
|
-
"@multiplatform.one/theme": "^7.
|
|
61
|
+
"@multiplatform.one/forms": "^7.61.0",
|
|
62
|
+
"@multiplatform.one/i18n": "^7.61.0",
|
|
63
|
+
"@multiplatform.one/platform": "^7.61.0",
|
|
64
|
+
"@multiplatform.one/router": "^7.61.0",
|
|
65
|
+
"@multiplatform.one/theme": "^7.61.0",
|
|
66
66
|
"@phosphor-icons/react": "^2.1.10",
|
|
67
67
|
"@shopify/flash-list": "^2.3.1",
|
|
68
68
|
"@tamagui/colors": "2.7.6",
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
"tamagui": "2.7.6"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@multiplatform.one/config": "7.
|
|
93
|
-
"@multiplatform.one/storybook": "7.
|
|
94
|
-
"@multiplatform.one/test-utils": "7.
|
|
92
|
+
"@multiplatform.one/config": "7.61.0",
|
|
93
|
+
"@multiplatform.one/storybook": "7.61.0",
|
|
94
|
+
"@multiplatform.one/test-utils": "7.61.0",
|
|
95
95
|
"@tamagui/build": "2.7.6",
|
|
96
96
|
"@testing-library/jest-dom": "^7.0.1",
|
|
97
97
|
"@testing-library/react": "^16.3.3",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BottomAccessory — a page's bottom accessory (LC-174 BOTTOM-ACCESSORY, e.g.
|
|
3
|
+
* a pager). Under a floating TabBar it moves into the bar, which floats it as
|
|
4
|
+
* its own smaller capsule above the tab capsule (LC-150); with no bar it
|
|
5
|
+
* renders where the page put it.
|
|
6
|
+
*/
|
|
7
|
+
import { type ReactNode, useEffect, useState } from "react";
|
|
8
|
+
import { setBottomAccessory, useFloatingBarMounted } from "./bottomChrome";
|
|
9
|
+
|
|
10
|
+
export function BottomAccessory({ children }: { children: ReactNode }) {
|
|
11
|
+
const hosted = useFloatingBarMounted();
|
|
12
|
+
const [id] = useState(() => Symbol("bottom-accessory"));
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
setBottomAccessory(id, hosted ? children : null);
|
|
15
|
+
}, [hosted, children, id]);
|
|
16
|
+
useEffect(() => () => setBottomAccessory(id, null), [id]);
|
|
17
|
+
return hosted ? null : <>{children}</>;
|
|
18
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* LC-150 TAB-BAR-ANATOMY (FZ-7754, FZ-7995). The bar owns every item's icon
|
|
3
|
-
* box, label and ink, at
|
|
4
|
-
* component and a label only. Icons are
|
|
3
|
+
* box, label and ink, at the iOS 26 floating tab bar's fixed metrics; an app
|
|
4
|
+
* passes an icon component and a label only. Icons are
|
|
5
5
|
* probes that record what the bar handed them, so the anatomy is asserted on
|
|
6
6
|
* the values the bar decides, never on hashed classes.
|
|
7
7
|
*/
|
|
@@ -13,16 +13,20 @@ import {
|
|
|
13
13
|
useAccentOnSurface,
|
|
14
14
|
useGlyphColor,
|
|
15
15
|
} from "@multiplatform.one/theme";
|
|
16
|
-
import { cleanup, fireEvent, screen } from "@testing-library/react";
|
|
16
|
+
import { act, cleanup, fireEvent, renderHook, screen } from "@testing-library/react";
|
|
17
17
|
import fs from "node:fs";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import type { ReactElement } from "react";
|
|
20
20
|
import { Theme } from "tamagui";
|
|
21
21
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
22
|
+
import { BottomAccessory } from "./BottomAccessory";
|
|
23
|
+
import { useBottomChromeInset } from "./bottomChrome";
|
|
22
24
|
import {
|
|
23
25
|
TabBar,
|
|
24
26
|
type TabBarIcon,
|
|
25
27
|
type TabBarItem,
|
|
28
|
+
tabBarBottomOffset,
|
|
29
|
+
tabBarCapsuleHeight,
|
|
26
30
|
tabBarInactiveInk,
|
|
27
31
|
tabBarMaterial,
|
|
28
32
|
tabBarMetrics,
|
|
@@ -177,23 +181,94 @@ describe("TabBar (LC-150 TAB-BAR-ANATOMY)", () => {
|
|
|
177
181
|
expect(new Set(labels.map(sizeAtoms)).size).toBe(1);
|
|
178
182
|
});
|
|
179
183
|
|
|
180
|
-
it("pins
|
|
184
|
+
it("pins the floating capsule: 16pt side insets, 8pt above the home indicator, 25pt glyphs, 10pt medium labels", () => {
|
|
181
185
|
expect(tabBarMetrics).toMatchObject({
|
|
182
|
-
|
|
186
|
+
sideInset: 16,
|
|
187
|
+
indicatorClearance: 8,
|
|
188
|
+
homeIndicatorBand: 13,
|
|
183
189
|
iconSize: 25,
|
|
184
190
|
labelSize: 10,
|
|
185
191
|
labelWeight: "500",
|
|
186
192
|
});
|
|
187
|
-
//
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
expect(
|
|
196
|
-
|
|
193
|
+
// 4 + (7 + 25 + 2 + 12 + 7) + 4: one item pill inside the capsule padding.
|
|
194
|
+
expect(tabBarCapsuleHeight).toBe(61);
|
|
195
|
+
// iPhone 390x844: the 34pt inset's lowest 13pt is the home indicator, so
|
|
196
|
+
// the capsule's bottom edge sits 21pt up, 8pt clear of the indicator, and
|
|
197
|
+
// its top at 844 - 21 - 61 = 762. Nothing but the indicator is below it.
|
|
198
|
+
expect(tabBarBottomOffset(34)).toBe(21);
|
|
199
|
+
expect(844 - tabBarBottomOffset(34) - tabBarCapsuleHeight).toBe(762);
|
|
200
|
+
// Web and devices with no indicator: 8pt above the viewport edge.
|
|
201
|
+
expect(tabBarBottomOffset(0)).toBe(8);
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
it("floats over content and publishes the height a Screen pads by, clearing it on unmount", () => {
|
|
205
|
+
const inset = renderHook(() => useBottomChromeInset());
|
|
206
|
+
expect(inset.result.current).toBe(0);
|
|
207
|
+
let view: ReturnType<typeof renderWithProviders> | undefined;
|
|
208
|
+
act(() => {
|
|
209
|
+
view = renderWithProviders(<TabBar items={probeItems({})} activeKey="/" />);
|
|
210
|
+
});
|
|
211
|
+
inset.rerender();
|
|
212
|
+
// Web: bottom 8 + capsule 61 + 8 clearance for the last row.
|
|
213
|
+
expect(inset.result.current).toBe(8 + tabBarCapsuleHeight + 8);
|
|
214
|
+
const bar = screen.getByTestId("tab-bar");
|
|
215
|
+
expect(bar.getAttribute("style") ?? "").not.toMatch(/border-top/);
|
|
216
|
+
act(() => view?.unmount());
|
|
217
|
+
inset.rerender();
|
|
218
|
+
expect(inset.result.current).toBe(0);
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
it("floats the bottom accessory as its own capsule above the bar", () => {
|
|
222
|
+
renderWithProviders(
|
|
223
|
+
<TabBar items={probeItems({})} activeKey="/" accessory={<span>1 of 4</span>} />,
|
|
224
|
+
);
|
|
225
|
+
const accessory = screen.getByTestId("tab-bar-accessory");
|
|
226
|
+
const capsule = screen.getByTestId("tab-bar-capsule");
|
|
227
|
+
expect(accessory.textContent).toBe("1 of 4");
|
|
228
|
+
expect(
|
|
229
|
+
accessory.compareDocumentPosition(capsule) & Node.DOCUMENT_POSITION_FOLLOWING,
|
|
230
|
+
).toBeTruthy();
|
|
231
|
+
expect(capsule.contains(accessory)).toBe(false);
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
it("hosts a page's BottomAccessory in the floating bar, and leaves it in place with no bar", () => {
|
|
235
|
+
const page = renderWithProviders(
|
|
236
|
+
<BottomAccessory>
|
|
237
|
+
<span>Page 2 of 9</span>
|
|
238
|
+
</BottomAccessory>,
|
|
239
|
+
);
|
|
240
|
+
expect(screen.getByText("Page 2 of 9")).toBeTruthy();
|
|
241
|
+
expect(screen.queryByTestId("tab-bar-accessory")).toBeNull();
|
|
242
|
+
page.unmount();
|
|
243
|
+
act(() => {
|
|
244
|
+
renderWithProviders(
|
|
245
|
+
<>
|
|
246
|
+
<BottomAccessory>
|
|
247
|
+
<span>Page 2 of 9</span>
|
|
248
|
+
</BottomAccessory>
|
|
249
|
+
<TabBar items={probeItems({})} activeKey="/" />
|
|
250
|
+
</>,
|
|
251
|
+
);
|
|
252
|
+
});
|
|
253
|
+
const hosted = screen.getByTestId("tab-bar-accessory");
|
|
254
|
+
expect(hosted.textContent).toBe("Page 2 of 9");
|
|
255
|
+
expect(screen.getAllByText("Page 2 of 9")).toHaveLength(1);
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
it("keeps the floating bar's clearance when an in-flow bar unmounts", () => {
|
|
259
|
+
const inset = renderHook(() => useBottomChromeInset());
|
|
260
|
+
let demo: ReturnType<typeof renderWithProviders> | undefined;
|
|
261
|
+
act(() => {
|
|
262
|
+
renderWithProviders(<TabBar items={probeItems({})} activeKey="/" />);
|
|
263
|
+
demo = renderWithProviders(
|
|
264
|
+
<TabBar items={probeItems({})} activeKey="/" floating={false} testID="demo-bar" />,
|
|
265
|
+
);
|
|
266
|
+
});
|
|
267
|
+
inset.rerender();
|
|
268
|
+
expect(inset.result.current).toBe(8 + tabBarCapsuleHeight + 8);
|
|
269
|
+
act(() => demo?.unmount());
|
|
270
|
+
inset.rerender();
|
|
271
|
+
expect(inset.result.current).toBe(8 + tabBarCapsuleHeight + 8);
|
|
197
272
|
});
|
|
198
273
|
|
|
199
274
|
it("paints colours and material from the theme only and builds on no Button", () => {
|
|
@@ -201,17 +276,13 @@ describe("TabBar (LC-150 TAB-BAR-ANATOMY)", () => {
|
|
|
201
276
|
expect(tabBarMaterial).toMatch(/^\$color\d+$/);
|
|
202
277
|
const source = fs.readFileSync(path.resolve(__dirname, "TabBar.tsx"), "utf-8");
|
|
203
278
|
expect(source).not.toMatch(/\bButton\b/);
|
|
204
|
-
|
|
205
|
-
expect(source).toMatch(
|
|
206
|
-
expect(source).toMatch(/
|
|
207
|
-
expect(source).toMatch(/
|
|
208
|
-
expect(source).toMatch(/
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
// basis into a 0 basis (the bar shrinks to the inset), and web compiles
|
|
212
|
-
// flex={0} alone to `0 1 0px` (the bar shrinks to its hairline). The bar
|
|
213
|
-
// sizes to its row on both.
|
|
214
|
-
expect(source).toMatch(/flex=\{0\}\s+flexShrink=\{0\}\s+flexBasis="auto"/);
|
|
279
|
+
// No full-width band: no safe-area wrapper painting to the edge, no top hairline.
|
|
280
|
+
expect(source).not.toMatch(/SafeAreaWrapper|hairline\.top/);
|
|
281
|
+
expect(source).toMatch(/pointerEvents="box-none"/);
|
|
282
|
+
expect(source).toMatch(/paddingHorizontal: tabBarMetrics\.sideInset/);
|
|
283
|
+
expect(source).toMatch(/height=\{tabBarCapsuleHeight\}/);
|
|
284
|
+
// The selected item is the accent on the accent wash.
|
|
285
|
+
expect(source).toMatch(/useAccentTintedSurface\(\)/);
|
|
215
286
|
// No preset hook reaches the geometry: a theme changes colours only.
|
|
216
287
|
expect(source).not.toMatch(/useResolvedKnobs|getActiveScaleTokens/);
|
|
217
288
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
import { HouseIcon, LightningIcon, SparkleIcon, SquaresFourIcon } from "@phosphor-icons/react";
|
|
3
3
|
import { useState } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { Screen } from "../layouts/page";
|
|
5
|
+
import { Text } from "../Text";
|
|
5
6
|
import { TabBar } from "./TabBar";
|
|
6
7
|
|
|
7
8
|
const meta: Meta<typeof TabBar> = {
|
|
@@ -20,16 +21,28 @@ const items = [
|
|
|
20
21
|
{ key: "/backoffice", label: "Backoffice", icon: SquaresFourIcon },
|
|
21
22
|
];
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
const rows = Array.from({ length: 30 }, (_, index) => `Row ${index + 1}`);
|
|
25
|
+
|
|
26
|
+
function Switcher({ initial, accessory }: { initial: string; accessory?: boolean }) {
|
|
24
27
|
const [active, setActive] = useState(initial);
|
|
25
28
|
return (
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
+
<>
|
|
30
|
+
<Screen>
|
|
31
|
+
{rows.map((row) => (
|
|
32
|
+
<Text key={row}>{row}</Text>
|
|
33
|
+
))}
|
|
34
|
+
</Screen>
|
|
35
|
+
<TabBar
|
|
36
|
+
items={items}
|
|
37
|
+
activeKey={active}
|
|
38
|
+
onTabPress={setActive}
|
|
39
|
+
accessory={accessory ? <Text>Page 1 of 4</Text> : undefined}
|
|
40
|
+
/>
|
|
41
|
+
</>
|
|
29
42
|
);
|
|
30
43
|
}
|
|
31
44
|
|
|
32
|
-
/**
|
|
45
|
+
/** A scrolling page under the floating capsule, the second tab selected: the accent on its wash. */
|
|
33
46
|
export const Default: Story = {
|
|
34
47
|
render: () => <Switcher initial="/pokemon" />,
|
|
35
48
|
};
|
|
@@ -38,3 +51,8 @@ export const Default: Story = {
|
|
|
38
51
|
export const FirstActive: Story = {
|
|
39
52
|
render: () => <Switcher initial="/" />,
|
|
40
53
|
};
|
|
54
|
+
|
|
55
|
+
/** The bottom accessory (LC-174) floats as its own capsule above the bar. */
|
|
56
|
+
export const WithAccessory: Story = {
|
|
57
|
+
render: () => <Switcher initial="/pokemon" accessory />,
|
|
58
|
+
};
|
package/src/appShell/TabBar.tsx
CHANGED
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TabBar — a phone app's bottom section switcher (LC-150 TAB-BAR-ANATOMY,
|
|
3
|
-
* iOS
|
|
3
|
+
* the iOS 26 floating tab bar).
|
|
4
4
|
*
|
|
5
5
|
* The bar owns the whole anatomy, so an app hands over an icon component and
|
|
6
|
-
* a label and nothing else.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* the
|
|
6
|
+
* a label and nothing else. It floats: a capsule of translucent material
|
|
7
|
+
* inset 16pt from the sides, 8pt above the home indicator, with content
|
|
8
|
+
* scrolling under it and no band or hairline across the screen. A Screen
|
|
9
|
+
* pads its scroll content by the height the capsule covers
|
|
10
|
+
* (`useBottomChromeInset`), so the last row clears it. The bottom accessory
|
|
11
|
+
* (LC-174, e.g. a pager) floats as its own smaller capsule above it. A theme
|
|
12
|
+
* changes the colours only: the active item is the theme's accent as
|
|
13
|
+
* readable ink on an accent-wash pill, inactive items are the secondary text
|
|
14
|
+
* ink.
|
|
13
15
|
*/
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
+
import {
|
|
17
|
+
hairlineWidth,
|
|
18
|
+
normalizeToHex,
|
|
19
|
+
useAccentOnSurface,
|
|
20
|
+
useAccentTintedSurface,
|
|
21
|
+
useGlyphColor,
|
|
22
|
+
} from "@multiplatform.one/theme";
|
|
23
|
+
import { zIndex } from "@multiplatform.one/forms";
|
|
16
24
|
import { isWeb } from "@multiplatform.one/platform";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
25
|
+
import { type ComponentType, type ReactNode, useEffect, useState } from "react";
|
|
26
|
+
import { XStack, YStack, useTheme } from "tamagui";
|
|
19
27
|
import { Text } from "../Text";
|
|
28
|
+
import { setBottomChromeInset, setFloatingBarMounted, useBottomAccessory } from "./bottomChrome";
|
|
29
|
+
import { useBottomInset } from "./bottomInset";
|
|
20
30
|
|
|
21
31
|
/** A phosphor-style glyph: the bar sets its size, colour and weight. */
|
|
22
32
|
export type TabBarIcon = ComponentType<{
|
|
@@ -36,21 +46,35 @@ export interface TabBarProps {
|
|
|
36
46
|
items: readonly TabBarItem[];
|
|
37
47
|
activeKey?: string;
|
|
38
48
|
onTabPress?: (key: string) => void;
|
|
49
|
+
/**
|
|
50
|
+
* The bottom accessory (LC-174): its own capsule floating above the bar. A
|
|
51
|
+
* page's `BottomAccessory` lands here when this prop is unset.
|
|
52
|
+
*/
|
|
53
|
+
accessory?: ReactNode;
|
|
54
|
+
/**
|
|
55
|
+
* Default true: the bar floats over the screen and pads every Screen. False
|
|
56
|
+
* draws the same capsule in flow (a demo inside a page).
|
|
57
|
+
*/
|
|
58
|
+
floating?: boolean;
|
|
39
59
|
/** Accessible name of the tab list. Default "Tabs". */
|
|
40
60
|
label?: string;
|
|
41
61
|
testID?: string;
|
|
42
62
|
}
|
|
43
63
|
|
|
44
64
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
65
|
+
* The iOS 26 floating tab bar's metrics in points, fixed like the
|
|
66
|
+
* platform's: a preset's scale or a large Dynamic Type size never moves
|
|
67
|
+
* them. The capsule is 4 + 53 + 4 tall; each item is a pill of 7 + 25 + 2 +
|
|
68
|
+
* 12 + 7. Its bottom edge sits 8pt above the home indicator, whose band is
|
|
69
|
+
* the lowest 13pt of the device's bottom inset, or 8pt above the viewport
|
|
70
|
+
* edge where there is none.
|
|
50
71
|
*/
|
|
51
72
|
export const tabBarMetrics = {
|
|
52
|
-
|
|
53
|
-
|
|
73
|
+
sideInset: 16,
|
|
74
|
+
indicatorClearance: 8,
|
|
75
|
+
homeIndicatorBand: 13,
|
|
76
|
+
capsulePadding: 4,
|
|
77
|
+
itemPaddingY: 7,
|
|
54
78
|
iconSize: 25,
|
|
55
79
|
labelGap: 2,
|
|
56
80
|
labelSize: 10,
|
|
@@ -58,7 +82,23 @@ export const tabBarMetrics = {
|
|
|
58
82
|
labelWeight: "500",
|
|
59
83
|
/** A label that does not fit shrinks to 9pt at most, then clips. */
|
|
60
84
|
labelMinScale: 0.9,
|
|
85
|
+
accessoryGap: 8,
|
|
86
|
+
accessoryHeight: 44,
|
|
61
87
|
} as const;
|
|
88
|
+
|
|
89
|
+
/** The capsule's height: its padding around one item pill. */
|
|
90
|
+
export const tabBarCapsuleHeight =
|
|
91
|
+
2 * tabBarMetrics.capsulePadding +
|
|
92
|
+
2 * tabBarMetrics.itemPaddingY +
|
|
93
|
+
tabBarMetrics.iconSize +
|
|
94
|
+
tabBarMetrics.labelGap +
|
|
95
|
+
tabBarMetrics.labelLineHeight;
|
|
96
|
+
|
|
97
|
+
/** The capsule's bottom edge above the screen's bottom edge. */
|
|
98
|
+
export function tabBarBottomOffset(bottomInset: number): number {
|
|
99
|
+
return (bottomInset > 0 ? tabBarMetrics.homeIndicatorBand : 0) + tabBarMetrics.indicatorClearance;
|
|
100
|
+
}
|
|
101
|
+
|
|
62
102
|
/**
|
|
63
103
|
* Inactive ink: the theme's secondary text ink (LC-152), whatever the
|
|
64
104
|
* preset's textAccent. Bold sets textAccent "high", whose text colour is the
|
|
@@ -66,8 +106,39 @@ export const tabBarMetrics = {
|
|
|
66
106
|
* body text.
|
|
67
107
|
*/
|
|
68
108
|
export const tabBarInactiveInk = "$textMuted";
|
|
69
|
-
/** The
|
|
109
|
+
/** The material's base: the chrome step one off the page, as the SystemBar paints. */
|
|
70
110
|
export const tabBarMaterial = "$color2";
|
|
111
|
+
/** How much of the material shows through: web blurs what is behind it, native cannot. */
|
|
112
|
+
export const tabBarMaterialOpacity = isWeb ? 0.72 : 0.94;
|
|
113
|
+
|
|
114
|
+
function translucent(color: string | undefined, opacity: number): string | undefined {
|
|
115
|
+
const hex = color ? normalizeToHex(color) : null;
|
|
116
|
+
if (!hex) return color;
|
|
117
|
+
const [r, g, b] = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16));
|
|
118
|
+
return `rgba(${r}, ${g}, ${b}, ${opacity})`;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function useMaterial() {
|
|
122
|
+
const theme = useTheme() as unknown as Record<string, { val?: unknown } | undefined>;
|
|
123
|
+
const base = theme[tabBarMaterial.slice(1)]?.val;
|
|
124
|
+
return {
|
|
125
|
+
backgroundColor:
|
|
126
|
+
translucent(typeof base === "string" ? base : undefined, tabBarMaterialOpacity) ??
|
|
127
|
+
tabBarMaterial,
|
|
128
|
+
borderWidth: hairlineWidth,
|
|
129
|
+
borderColor: "$borderColor",
|
|
130
|
+
shadowColor: "$shadow3",
|
|
131
|
+
shadowOffset: { width: 0, height: 4 },
|
|
132
|
+
shadowRadius: 16,
|
|
133
|
+
elevation: 6,
|
|
134
|
+
...(isWeb
|
|
135
|
+
? {
|
|
136
|
+
backdropFilter: "blur(20px) saturate(180%)",
|
|
137
|
+
WebkitBackdropFilter: "blur(20px) saturate(180%)",
|
|
138
|
+
}
|
|
139
|
+
: null),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
71
142
|
|
|
72
143
|
function TabBarButton({
|
|
73
144
|
item,
|
|
@@ -81,6 +152,7 @@ function TabBarButton({
|
|
|
81
152
|
testID: string;
|
|
82
153
|
}) {
|
|
83
154
|
const accent = useAccentOnSurface();
|
|
155
|
+
const wash = useAccentTintedSurface();
|
|
84
156
|
const secondaryInk = useGlyphColor(tabBarInactiveInk);
|
|
85
157
|
const ink = active ? accent : secondaryInk;
|
|
86
158
|
const Icon = item.icon;
|
|
@@ -95,8 +167,10 @@ function TabBarButton({
|
|
|
95
167
|
alignItems="center"
|
|
96
168
|
justifyContent="flex-start"
|
|
97
169
|
gap={tabBarMetrics.labelGap}
|
|
98
|
-
|
|
170
|
+
paddingVertical={tabBarMetrics.itemPaddingY}
|
|
99
171
|
paddingHorizontal="$1"
|
|
172
|
+
borderRadius={1000}
|
|
173
|
+
backgroundColor={active ? (wash ?? "$color4") : "transparent"}
|
|
100
174
|
cursor="pointer"
|
|
101
175
|
onPress={onPress}
|
|
102
176
|
data-testid={testID}
|
|
@@ -142,26 +216,78 @@ export function TabBar({
|
|
|
142
216
|
items,
|
|
143
217
|
activeKey,
|
|
144
218
|
onTabPress,
|
|
219
|
+
accessory: ownAccessory,
|
|
220
|
+
floating = true,
|
|
145
221
|
label = "Tabs",
|
|
146
222
|
testID = "tab-bar",
|
|
147
223
|
}: TabBarProps) {
|
|
224
|
+
const material = useMaterial();
|
|
225
|
+
const pageAccessory = useBottomAccessory();
|
|
226
|
+
const accessory = ownAccessory ?? (floating ? pageAccessory : null);
|
|
227
|
+
const deviceInset = useBottomInset();
|
|
228
|
+
const bottom = floating ? tabBarBottomOffset(deviceInset) : 0;
|
|
229
|
+
const [id] = useState(() => Symbol("tab-bar"));
|
|
230
|
+
const [accessoryHeight, setAccessoryHeight] = useState(0);
|
|
231
|
+
const covered =
|
|
232
|
+
bottom +
|
|
233
|
+
tabBarCapsuleHeight +
|
|
234
|
+
(accessory ? tabBarMetrics.accessoryGap + accessoryHeight : 0) +
|
|
235
|
+
tabBarMetrics.indicatorClearance;
|
|
236
|
+
|
|
237
|
+
useEffect(() => {
|
|
238
|
+
setBottomChromeInset(id, floating ? covered : null);
|
|
239
|
+
}, [covered, floating, id]);
|
|
240
|
+
useEffect(() => {
|
|
241
|
+
setFloatingBarMounted(id, floating);
|
|
242
|
+
}, [floating, id]);
|
|
243
|
+
useEffect(
|
|
244
|
+
() => () => {
|
|
245
|
+
setBottomChromeInset(id, null);
|
|
246
|
+
setFloatingBarMounted(id, false);
|
|
247
|
+
},
|
|
248
|
+
[id],
|
|
249
|
+
);
|
|
250
|
+
|
|
148
251
|
return (
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
252
|
+
<YStack
|
|
253
|
+
{...(floating
|
|
254
|
+
? {
|
|
255
|
+
position: (isWeb ? "fixed" : "absolute") as "absolute",
|
|
256
|
+
left: 0,
|
|
257
|
+
right: 0,
|
|
258
|
+
bottom: 0,
|
|
259
|
+
zIndex: zIndex.stickyHeader,
|
|
260
|
+
paddingHorizontal: tabBarMetrics.sideInset,
|
|
261
|
+
}
|
|
262
|
+
: null)}
|
|
263
|
+
paddingBottom={bottom}
|
|
264
|
+
gap={tabBarMetrics.accessoryGap}
|
|
265
|
+
pointerEvents="box-none"
|
|
157
266
|
data-testid={testID}
|
|
158
267
|
>
|
|
268
|
+
{accessory ? (
|
|
269
|
+
<XStack
|
|
270
|
+
alignSelf="center"
|
|
271
|
+
alignItems="center"
|
|
272
|
+
minHeight={tabBarMetrics.accessoryHeight}
|
|
273
|
+
paddingHorizontal="$3"
|
|
274
|
+
borderRadius={1000}
|
|
275
|
+
{...material}
|
|
276
|
+
onLayout={(event) => setAccessoryHeight(Math.round(event.nativeEvent.layout.height))}
|
|
277
|
+
data-testid={`${testID}-accessory`}
|
|
278
|
+
>
|
|
279
|
+
{accessory}
|
|
280
|
+
</XStack>
|
|
281
|
+
) : null}
|
|
159
282
|
<XStack
|
|
160
283
|
role="tablist"
|
|
161
284
|
aria-label={label}
|
|
162
|
-
height={
|
|
285
|
+
height={tabBarCapsuleHeight}
|
|
286
|
+
padding={tabBarMetrics.capsulePadding}
|
|
163
287
|
alignItems="stretch"
|
|
164
|
-
|
|
288
|
+
borderRadius={1000}
|
|
289
|
+
{...material}
|
|
290
|
+
data-testid={`${testID}-capsule`}
|
|
165
291
|
>
|
|
166
292
|
{items.map((item) => (
|
|
167
293
|
<TabBarButton
|
|
@@ -173,6 +299,6 @@ export function TabBar({
|
|
|
173
299
|
/>
|
|
174
300
|
))}
|
|
175
301
|
</XStack>
|
|
176
|
-
</
|
|
302
|
+
</YStack>
|
|
177
303
|
);
|
|
178
304
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The floating bottom chrome's shared state. A mounted floating TabBar
|
|
3
|
+
* publishes the height it covers, so a Screen pads its scroll content by it
|
|
4
|
+
* and its last row clears the capsule. A page publishes its bottom accessory
|
|
5
|
+
* (LC-174, e.g. a pager) here, so the bar floats it as its own capsule. The
|
|
6
|
+
* bar and the page are siblings in every host, so both live in a store, not
|
|
7
|
+
* a context a host would have to wire.
|
|
8
|
+
*/
|
|
9
|
+
import { type ReactNode, useSyncExternalStore } from "react";
|
|
10
|
+
|
|
11
|
+
function createStore<T>(empty: T) {
|
|
12
|
+
const entries = new Map<symbol, T>();
|
|
13
|
+
const listeners = new Set<() => void>();
|
|
14
|
+
let current = empty;
|
|
15
|
+
return {
|
|
16
|
+
set(id: symbol, value: T | null, pick: (values: T[]) => T) {
|
|
17
|
+
if (value === null) entries.delete(id);
|
|
18
|
+
else entries.set(id, value);
|
|
19
|
+
const next = entries.size ? pick([...entries.values()]) : empty;
|
|
20
|
+
if (Object.is(next, current)) return;
|
|
21
|
+
current = next;
|
|
22
|
+
for (const listener of listeners) listener();
|
|
23
|
+
},
|
|
24
|
+
subscribe(listener: () => void) {
|
|
25
|
+
listeners.add(listener);
|
|
26
|
+
return () => {
|
|
27
|
+
listeners.delete(listener);
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
get: () => current,
|
|
31
|
+
empty: () => empty,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const insets = createStore(0);
|
|
36
|
+
|
|
37
|
+
/** Publish (or with null, withdraw) one floating bar's covered height. */
|
|
38
|
+
export function setBottomChromeInset(id: symbol, next: number | null) {
|
|
39
|
+
insets.set(id, next, (values) => Math.max(...values));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Points of screen the bottom chrome covers; 0 when no floating tab bar is mounted. */
|
|
43
|
+
export function useBottomChromeInset(): number {
|
|
44
|
+
return useSyncExternalStore(insets.subscribe, insets.get, insets.empty);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const accessories = createStore<ReactNode>(null);
|
|
48
|
+
const bars = createStore(false);
|
|
49
|
+
|
|
50
|
+
/** Publish (or with null, withdraw) a page's bottom accessory. The latest wins. */
|
|
51
|
+
export function setBottomAccessory(id: symbol, node: ReactNode | null) {
|
|
52
|
+
accessories.set(id, node, (values) => values[values.length - 1]);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** The accessory a page published, for the floating TabBar to host. */
|
|
56
|
+
export function useBottomAccessory(): ReactNode {
|
|
57
|
+
return useSyncExternalStore(accessories.subscribe, accessories.get, accessories.empty);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** A floating TabBar announces itself so accessories move into it. */
|
|
61
|
+
export function setFloatingBarMounted(id: symbol, mounted: boolean) {
|
|
62
|
+
bars.set(id, mounted ? true : null, () => true);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** True while a floating TabBar is mounted and hosts the accessory. */
|
|
66
|
+
export function useFloatingBarMounted(): boolean {
|
|
67
|
+
return useSyncExternalStore(bars.subscribe, bars.get, bars.empty);
|
|
68
|
+
}
|
package/src/appShell/index.ts
CHANGED