@multiplatform.one/components 7.56.0 → 7.58.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.cjs +2 -0
- package/dist/cjs/Card.native.js +3 -0
- 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.cjs +1 -0
- package/dist/cjs/DropdownMenu/index.native.js +5 -0
- 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/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/DestructiveAction.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/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 +30 -23
- package/dist/cjs/appShell/TabBar.native.js +31 -26
- 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/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/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.native.js +2 -2
- 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.cjs +5 -8
- package/dist/cjs/layouts/tags.native.js +11 -8
- 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.cjs +2 -0
- package/dist/cjs/surfaces.native.js +4 -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/Card.mjs +3 -1
- package/dist/esm/Card.mjs.map +1 -1
- package/dist/esm/Card.native.js +4 -1
- package/dist/esm/Card.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.mjs +1 -0
- package/dist/esm/DropdownMenu/index.mjs.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js +5 -0
- package/dist/esm/DropdownMenu/index.native.js.map +1 -1
- package/dist/esm/appShell/TabBar.mjs +30 -21
- package/dist/esm/appShell/TabBar.mjs.map +1 -1
- package/dist/esm/appShell/TabBar.native.js +30 -23
- package/dist/esm/appShell/TabBar.native.js.map +1 -1
- package/dist/esm/layouts/tags.mjs +5 -8
- package/dist/esm/layouts/tags.mjs.map +1 -1
- package/dist/esm/layouts/tags.native.js +9 -6
- package/dist/esm/layouts/tags.native.js.map +1 -1
- package/dist/esm/surfaces.mjs +3 -1
- package/dist/esm/surfaces.mjs.map +1 -1
- package/dist/esm/surfaces.native.js +4 -1
- package/dist/esm/surfaces.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.mjs +3 -1
- package/dist/jsx/Card.mjs.map +1 -1
- package/dist/jsx/Card.native.js +3 -0
- 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.mjs +1 -0
- package/dist/jsx/DropdownMenu/index.mjs.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js +5 -0
- 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/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/DestructiveAction.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/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 +30 -21
- package/dist/jsx/appShell/TabBar.mjs.map +1 -1
- package/dist/jsx/appShell/TabBar.native.js +31 -26
- 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/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/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.native.js +2 -2
- 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.mjs +5 -8
- package/dist/jsx/layouts/tags.mjs.map +1 -1
- package/dist/jsx/layouts/tags.native.js +11 -8
- 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.mjs +3 -1
- package/dist/jsx/surfaces.mjs.map +1 -1
- package/dist/jsx/surfaces.native.js +4 -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/Card.tsx +8 -2
- package/src/DropdownMenu/index.tsx +8 -1
- package/src/SheetModal/SheetModal.menus.spec.tsx +128 -0
- package/src/SheetModal/SheetModal.stories.tsx +77 -1
- package/src/appShell/TabBar.native.spec.tsx +9 -13
- package/src/appShell/TabBar.spec.tsx +44 -17
- package/src/appShell/TabBar.stories.tsx +40 -0
- package/src/appShell/TabBar.tsx +45 -39
- package/src/elevatedGround.spec.tsx +71 -0
- package/src/layouts/Tags.stories.tsx +42 -0
- package/src/layouts/tags-trigger.spec.tsx +6 -0
- package/src/layouts/tags.tsx +7 -6
- package/src/surfaces.tsx +3 -1
- package/types/Card.d.ts.map +1 -1
- package/types/DropdownMenu/index.d.ts.map +1 -1
- package/types/appShell/TabBar.d.ts +21 -8
- package/types/appShell/TabBar.d.ts.map +1 -1
- package/types/layouts/tags.d.ts.map +1 -1
- package/types/surfaces.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.58.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.58.0",
|
|
62
|
+
"@multiplatform.one/i18n": "^7.58.0",
|
|
63
|
+
"@multiplatform.one/platform": "^7.58.0",
|
|
64
|
+
"@multiplatform.one/router": "^7.58.0",
|
|
65
|
+
"@multiplatform.one/theme": "^7.58.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.58.0",
|
|
93
|
+
"@multiplatform.one/storybook": "7.58.0",
|
|
94
|
+
"@multiplatform.one/test-utils": "7.58.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",
|
package/src/Card.tsx
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
borderRadiusMap,
|
|
3
|
+
Surface,
|
|
4
|
+
SurfaceContext,
|
|
5
|
+
useResolvedKnobs,
|
|
6
|
+
} from "@multiplatform.one/theme";
|
|
2
7
|
import { CardFooter } from "./CardFooter";
|
|
3
8
|
import { CardHeader } from "./CardHeader";
|
|
4
9
|
import {
|
|
@@ -59,6 +64,7 @@ function hostData(attrs: Record<string, string>): Record<string, unknown> {
|
|
|
59
64
|
|
|
60
65
|
function CardRoot({ children, tier = "content", size, ...props }: CardProps) {
|
|
61
66
|
const { knobProps } = useResolvedKnobs({ component: "Card", size });
|
|
67
|
+
const parentPainted = SurfaceContext.useStyledContext().painted ?? false;
|
|
62
68
|
// Axiom 1 child-clip cap: the padded container's radius may not exceed its
|
|
63
69
|
// own inset. cardSurface carries the cap already; the elevated tier layers
|
|
64
70
|
// containerRadius over elevatedSurface. The feature tier follows the knobs
|
|
@@ -94,7 +100,7 @@ function CardRoot({ children, tier = "content", size, ...props }: CardProps) {
|
|
|
94
100
|
})}
|
|
95
101
|
{...props}
|
|
96
102
|
>
|
|
97
|
-
<Surface size={size} painted>
|
|
103
|
+
<Surface size={size} painted elevated={tier === "elevated" && !parentPainted}>
|
|
98
104
|
{children}
|
|
99
105
|
</Surface>
|
|
100
106
|
</TamaguiCard>
|
|
@@ -9,7 +9,9 @@ import { IconSlot } from "@multiplatform.one/theme";
|
|
|
9
9
|
* a second overlay. SF-OVERLAY via elevatedSurface, SP-EDGE rows (container
|
|
10
10
|
* owns only its 1px border; items own ALL padding), LC-21 COMMIT/COMPOSE,
|
|
11
11
|
* and the APG keyboard layer (ArrowUp/Down + Home/End, Enter/Space, Escape,
|
|
12
|
-
* typeahead).
|
|
12
|
+
* typeahead). Native opens it over the trigger as a pull-down; the web at
|
|
13
|
+
* ≤640 takes the sheet at page level and the menu inside an overlay
|
|
14
|
+
* (FZ-7830).
|
|
13
15
|
*
|
|
14
16
|
* Composable parts (DropdownMenu.Trigger/Content/Item/CheckboxItem/
|
|
15
17
|
* Separator/Label) plus a convenience `items=[]` prop. Plain items
|
|
@@ -410,6 +412,11 @@ function DropdownMenuRoot({
|
|
|
410
412
|
triggerRow={triggerRow}
|
|
411
413
|
contentPadding="none"
|
|
412
414
|
triggerSizing={triggerSizing}
|
|
415
|
+
// FZ-7830, LC-112: a menu is a menu over its trigger on native, the
|
|
416
|
+
// UIMenu pull-down, never a bottom sheet. The phone-width web keeps
|
|
417
|
+
// its sheet at page level and opens the menu inside an overlay, so a
|
|
418
|
+
// sheet never stacks on a sheet.
|
|
419
|
+
compactFace={isWeb ? "auto" : "menu"}
|
|
413
420
|
{...coverContract}
|
|
414
421
|
{...(placement ? { placement } : {})}
|
|
415
422
|
>
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FZ-7830: a DropdownMenu or Select opened inside a SheetModal on a phone-width
|
|
3
|
+
* web never presents a second bottom sheet; it opens over its trigger. At page
|
|
4
|
+
* level a DropdownMenu keeps its sheet on the web, a Select with a short list
|
|
5
|
+
* (seven or fewer options) opens over its trigger and a long one keeps its
|
|
6
|
+
* sheet. The native face is pinned in forms' FloatingPanel.menuFace.native.spec.tsx.
|
|
7
|
+
*/
|
|
8
|
+
import { Select } from "@multiplatform.one/forms";
|
|
9
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
10
|
+
import { cleanup, fireEvent, waitFor } from "@testing-library/react";
|
|
11
|
+
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
12
|
+
import { Button } from "tamagui";
|
|
13
|
+
import { DropdownMenu } from "../DropdownMenu";
|
|
14
|
+
import { SheetModal } from "./index";
|
|
15
|
+
import { MenusInOpenSheet, MenusInSheet } from "./SheetModal.stories";
|
|
16
|
+
|
|
17
|
+
const options = [
|
|
18
|
+
{ label: "Private", value: "private" },
|
|
19
|
+
{ label: "Tailnet", value: "tailnet" },
|
|
20
|
+
{ label: "LAN", value: "lan" },
|
|
21
|
+
{ label: "Public", value: "public" },
|
|
22
|
+
{ label: "Public, signed in", value: "public-auth" },
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
const regions = [
|
|
26
|
+
"Ashburn",
|
|
27
|
+
"Hillsboro",
|
|
28
|
+
"Helsinki",
|
|
29
|
+
"Falkenstein",
|
|
30
|
+
"Nuremberg",
|
|
31
|
+
"Singapore",
|
|
32
|
+
"Sydney",
|
|
33
|
+
"Tokyo",
|
|
34
|
+
].map((label) => ({ label, value: label.toLowerCase() }));
|
|
35
|
+
|
|
36
|
+
let width = 0;
|
|
37
|
+
beforeEach(() => {
|
|
38
|
+
width = window.innerWidth;
|
|
39
|
+
Object.defineProperty(window, "innerWidth", { configurable: true, writable: true, value: 390 });
|
|
40
|
+
});
|
|
41
|
+
afterEach(() => {
|
|
42
|
+
cleanup();
|
|
43
|
+
Object.defineProperty(window, "innerWidth", { configurable: true, writable: true, value: width });
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const panelSheets = () => document.querySelectorAll('[data-testid="floating-panel-sheet"]');
|
|
47
|
+
|
|
48
|
+
describe("menus inside a SheetModal at 390 (FZ-7830)", () => {
|
|
49
|
+
it("a DropdownMenu in the sheet opens over its trigger, not as a second sheet", async () => {
|
|
50
|
+
renderWithProviders(
|
|
51
|
+
<SheetModal open onOpenChange={() => {}}>
|
|
52
|
+
<DropdownMenu defaultOpen items={[{ label: "Stop" }, { label: "Restart" }]}>
|
|
53
|
+
<Button>Stack actions</Button>
|
|
54
|
+
</DropdownMenu>
|
|
55
|
+
</SheetModal>,
|
|
56
|
+
);
|
|
57
|
+
await waitFor(() => expect(document.querySelector('[role="menu"]')).toBeTruthy());
|
|
58
|
+
expect(document.querySelector('[data-testid="floating-panel-viewport"]')).toBeTruthy();
|
|
59
|
+
expect(panelSheets().length).toBe(0);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("a DropdownMenu at page level keeps its sheet", async () => {
|
|
63
|
+
renderWithProviders(
|
|
64
|
+
<DropdownMenu defaultOpen items={[{ label: "Stop" }, { label: "Restart" }]}>
|
|
65
|
+
<Button>Stack actions</Button>
|
|
66
|
+
</DropdownMenu>,
|
|
67
|
+
);
|
|
68
|
+
await waitFor(() => expect(document.querySelector('[role="menu"]')).toBeTruthy());
|
|
69
|
+
expect(document.querySelector('[data-testid="floating-panel-viewport"]')).toBeFalsy();
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it("a Select in the sheet opens its listbox over the trigger, not as a second sheet", async () => {
|
|
73
|
+
const result = renderWithProviders(
|
|
74
|
+
<SheetModal open onOpenChange={() => {}}>
|
|
75
|
+
<Select aria-label="Exposure" options={options} defaultValue="tailnet" />
|
|
76
|
+
</SheetModal>,
|
|
77
|
+
);
|
|
78
|
+
const trigger = (await result.findAllByTestId("select-trigger"))[0];
|
|
79
|
+
fireEvent.pointerDown(trigger);
|
|
80
|
+
fireEvent.mouseDown(trigger);
|
|
81
|
+
fireEvent.click(trigger);
|
|
82
|
+
await result.findByTestId("select-dropdown");
|
|
83
|
+
expect(panelSheets().length).toBe(0);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it("a long Select in the sheet opens its listbox over the trigger, not as a second sheet", async () => {
|
|
87
|
+
const result = renderWithProviders(
|
|
88
|
+
<SheetModal open onOpenChange={() => {}}>
|
|
89
|
+
<Select aria-label="Region" options={regions} defaultValue="helsinki" />
|
|
90
|
+
</SheetModal>,
|
|
91
|
+
);
|
|
92
|
+
const trigger = (await result.findAllByTestId("select-trigger"))[0];
|
|
93
|
+
fireEvent.pointerDown(trigger);
|
|
94
|
+
fireEvent.mouseDown(trigger);
|
|
95
|
+
fireEvent.click(trigger);
|
|
96
|
+
await result.findByTestId("select-dropdown");
|
|
97
|
+
expect(panelSheets().length).toBe(0);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it("a short Select at page level (seven options) opens over its trigger, not as a sheet", async () => {
|
|
101
|
+
const result = renderWithProviders(
|
|
102
|
+
<Select aria-label="Region" options={regions.slice(0, 7)} defaultValue="helsinki" />,
|
|
103
|
+
);
|
|
104
|
+
const trigger = result.getByTestId("select-trigger");
|
|
105
|
+
fireEvent.pointerDown(trigger);
|
|
106
|
+
fireEvent.mouseDown(trigger);
|
|
107
|
+
fireEvent.click(trigger);
|
|
108
|
+
await result.findByTestId("select-dropdown");
|
|
109
|
+
expect(panelSheets().length).toBe(0);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it("a long Select at page level (eight options) keeps its sheet", async () => {
|
|
113
|
+
const result = renderWithProviders(
|
|
114
|
+
<Select aria-label="Region" options={regions} defaultValue="helsinki" />,
|
|
115
|
+
);
|
|
116
|
+
fireEvent.click(result.getByTestId("select-trigger"));
|
|
117
|
+
await waitFor(() => expect(panelSheets().length).toBeGreaterThan(0));
|
|
118
|
+
expect(result.queryByTestId("select-dropdown")).toBeNull();
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it("the Menus in a sheet stories mount", () => {
|
|
122
|
+
for (const story of [MenusInSheet, MenusInOpenSheet]) {
|
|
123
|
+
const result = renderWithProviders(<>{story.render?.({} as never, {} as never)}</>);
|
|
124
|
+
expect(result.getAllByText("Open sheet").length).toBeGreaterThan(0);
|
|
125
|
+
cleanup();
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
});
|
|
@@ -6,12 +6,14 @@ import {
|
|
|
6
6
|
YStack as FixtureStack,
|
|
7
7
|
type TamaguiElement,
|
|
8
8
|
} from "@multiplatform.one/components";
|
|
9
|
-
import { Button, Input } from "@multiplatform.one/forms";
|
|
9
|
+
import { Button, Input, Select } from "@multiplatform.one/forms";
|
|
10
|
+
import { DotsThreeIcon } from "@phosphor-icons/react";
|
|
10
11
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
11
12
|
import { useRef, useState } from "react";
|
|
12
13
|
import { Platform, useWindowDimensions, type LayoutChangeEvent } from "react-native";
|
|
13
14
|
import { YStack } from "tamagui";
|
|
14
15
|
import { ActionBar } from "../actions/ActionBar";
|
|
16
|
+
import { DropdownMenu, type DropdownMenuEntry } from "../DropdownMenu";
|
|
15
17
|
import { SheetModal } from "./index";
|
|
16
18
|
import { Paragraph, SizableText } from "../Text";
|
|
17
19
|
|
|
@@ -118,6 +120,80 @@ export const OpenOnMount: Story = {
|
|
|
118
120
|
render: () => <Harness startOpen />,
|
|
119
121
|
};
|
|
120
122
|
|
|
123
|
+
const lifecycleItems: DropdownMenuEntry[] = [
|
|
124
|
+
{ label: "Stop" },
|
|
125
|
+
{ label: "Restart" },
|
|
126
|
+
{ separator: true },
|
|
127
|
+
{ label: "Uninstall", destructive: true },
|
|
128
|
+
];
|
|
129
|
+
|
|
130
|
+
const exposureOptions = [
|
|
131
|
+
{ label: "Private", value: "private" },
|
|
132
|
+
{ label: "Tailnet", value: "tailnet" },
|
|
133
|
+
{ label: "LAN", value: "lan" },
|
|
134
|
+
{ label: "Public", value: "public" },
|
|
135
|
+
{ label: "Public, signed in", value: "public-auth" },
|
|
136
|
+
];
|
|
137
|
+
|
|
138
|
+
function MenuRow({ label }: { label: string }) {
|
|
139
|
+
return (
|
|
140
|
+
<XStack alignItems="center" justifyContent="space-between" gap="$3">
|
|
141
|
+
<Paragraph>{label}</Paragraph>
|
|
142
|
+
<DropdownMenu items={lifecycleItems} closeOnSelect>
|
|
143
|
+
<Button chromeless icon={DotsThreeIcon} aria-label={`${label} actions`} />
|
|
144
|
+
</DropdownMenu>
|
|
145
|
+
</XStack>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* FZ-7830: a menu or picker inside a sheet never stacks a second sheet. On a
|
|
151
|
+
* phone the ⋯ menu and the Select inside the sheet open over their triggers.
|
|
152
|
+
* On the page the ⋯ menu is a pull-down on native and the five-option Select
|
|
153
|
+
* opens over its trigger too; only a list longer than seven keeps a sheet.
|
|
154
|
+
*/
|
|
155
|
+
function MenusHarness({ startOpen = false }: { startOpen?: boolean }) {
|
|
156
|
+
const [open, setOpen] = useState(startOpen);
|
|
157
|
+
const [exposure, setExposure] = useState("tailnet");
|
|
158
|
+
return (
|
|
159
|
+
<FixtureStack minHeight={480} gap="$3" padding="$4">
|
|
160
|
+
<MenuRow label="Page stack" />
|
|
161
|
+
<Select
|
|
162
|
+
label="Page exposure"
|
|
163
|
+
options={exposureOptions}
|
|
164
|
+
value={exposure}
|
|
165
|
+
onValueChange={(value) => setExposure(value as string)}
|
|
166
|
+
/>
|
|
167
|
+
<Button onPress={() => setOpen(true)}>Open sheet</Button>
|
|
168
|
+
<SheetModal
|
|
169
|
+
open={open}
|
|
170
|
+
onOpenChange={setOpen}
|
|
171
|
+
header={<SizableText fontWeight="600">Stack</SizableText>}
|
|
172
|
+
>
|
|
173
|
+
<FixtureStack gap="$3">
|
|
174
|
+
<MenuRow label="Sheet stack" />
|
|
175
|
+
<Select
|
|
176
|
+
label="Exposure"
|
|
177
|
+
options={exposureOptions}
|
|
178
|
+
value={exposure}
|
|
179
|
+
onValueChange={(value) => setExposure(value as string)}
|
|
180
|
+
/>
|
|
181
|
+
</FixtureStack>
|
|
182
|
+
</SheetModal>
|
|
183
|
+
</FixtureStack>
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export const MenusInSheet: Story = {
|
|
188
|
+
name: "Menus in a sheet",
|
|
189
|
+
render: () => <MenusHarness />,
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
export const MenusInOpenSheet: Story = {
|
|
193
|
+
name: "Menus in an open sheet",
|
|
194
|
+
render: () => <MenusHarness startOpen />,
|
|
195
|
+
};
|
|
196
|
+
|
|
121
197
|
type Bounds = { x: number; y: number; width: number; height: number };
|
|
122
198
|
type Reading<T> = T | "unmeasured" | "unavailable" | "invalid";
|
|
123
199
|
type FixtureMode = "subject" | "control-240";
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* LC-150 TAB-BAR-ANATOMY, NATIVE arm: the label is
|
|
3
|
-
*
|
|
4
|
-
* its size under Dynamic Type (UITabBar parity). The house Text is replaced
|
|
2
|
+
* LC-150 TAB-BAR-ANATOMY, NATIVE arm: the label is UITabBar's 10pt medium
|
|
3
|
+
* caption on one line that shrinks to 9pt at most, clips rather than
|
|
4
|
+
* ellipsizes, and keeps its size under Dynamic Type (UITabBar parity). The house Text is replaced
|
|
5
5
|
* by a recorder so the props the bar hands the native text node are read
|
|
6
6
|
* directly; this is not device-render evidence.
|
|
7
7
|
*/
|
|
8
|
-
import { NATIVE_TYPE_SHAPE } from "@multiplatform.one/theme";
|
|
9
8
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
10
9
|
import { cleanup } from "@testing-library/react";
|
|
11
10
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
12
|
-
import { TabBar
|
|
11
|
+
import { TabBar } from "./TabBar";
|
|
13
12
|
|
|
14
13
|
vi.mock("@multiplatform.one/platform", async (importOriginal) => ({
|
|
15
14
|
...(await importOriginal<typeof import("@multiplatform.one/platform")>()),
|
|
@@ -33,7 +32,7 @@ afterEach(() => {
|
|
|
33
32
|
const Glyph = () => null;
|
|
34
33
|
|
|
35
34
|
describe("TabBar native label (LC-150)", () => {
|
|
36
|
-
it("is one
|
|
35
|
+
it("is one 10pt medium line, shrinking to 9pt at most, clipped, unscaled", () => {
|
|
37
36
|
renderWithProviders(
|
|
38
37
|
<TabBar
|
|
39
38
|
items={[
|
|
@@ -44,20 +43,17 @@ describe("TabBar native label (LC-150)", () => {
|
|
|
44
43
|
/>,
|
|
45
44
|
);
|
|
46
45
|
expect(textProps).toHaveLength(2);
|
|
47
|
-
const floor =
|
|
48
|
-
NATIVE_TYPE_SHAPE[tabBarLabelMinSize.slice(1) as "1"] /
|
|
49
|
-
NATIVE_TYPE_SHAPE[tabBarLabelSize.slice(1) as "2"];
|
|
50
46
|
for (const props of textProps) {
|
|
51
47
|
expect(props).toMatchObject({
|
|
52
|
-
fontSize:
|
|
53
|
-
lineHeight:
|
|
48
|
+
fontSize: 10,
|
|
49
|
+
lineHeight: 12,
|
|
50
|
+
fontWeight: "500",
|
|
54
51
|
numberOfLines: 1,
|
|
55
52
|
ellipsizeMode: "clip",
|
|
56
53
|
adjustsFontSizeToFit: true,
|
|
57
|
-
minimumFontScale:
|
|
54
|
+
minimumFontScale: 0.9,
|
|
58
55
|
allowFontScaling: false,
|
|
59
56
|
});
|
|
60
|
-
expect(props.minimumFontScale).toBeLessThan(1);
|
|
61
57
|
}
|
|
62
58
|
});
|
|
63
59
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* LC-150 TAB-BAR-ANATOMY (FZ-7754). The bar owns every item's icon
|
|
3
|
-
*
|
|
2
|
+
* LC-150 TAB-BAR-ANATOMY (FZ-7754, FZ-7995). The bar owns every item's icon
|
|
3
|
+
* box, label and ink, at UITabBar's fixed metrics; an app passes an icon
|
|
4
|
+
* component and a label only. Icons are
|
|
4
5
|
* probes that record what the bar handed them, so the anatomy is asserted on
|
|
5
6
|
* the values the bar decides, never on hashed classes.
|
|
6
7
|
*/
|
|
@@ -8,10 +9,9 @@ import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
|
8
9
|
import {
|
|
9
10
|
Preset,
|
|
10
11
|
createDefaultThemeConfig,
|
|
11
|
-
getActiveScaleTokens,
|
|
12
12
|
normalizeToHex,
|
|
13
|
+
useAccentOnSurface,
|
|
13
14
|
useGlyphColor,
|
|
14
|
-
useIdentityInkOnSurface,
|
|
15
15
|
} from "@multiplatform.one/theme";
|
|
16
16
|
import { cleanup, fireEvent, screen } from "@testing-library/react";
|
|
17
17
|
import fs from "node:fs";
|
|
@@ -23,10 +23,9 @@ import {
|
|
|
23
23
|
TabBar,
|
|
24
24
|
type TabBarIcon,
|
|
25
25
|
type TabBarItem,
|
|
26
|
-
tabBarIconBox,
|
|
27
26
|
tabBarInactiveInk,
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
tabBarMaterial,
|
|
28
|
+
tabBarMetrics,
|
|
30
29
|
} from "./TabBar";
|
|
31
30
|
|
|
32
31
|
// LC-152: the inactive ink is `$textMuted`, a key only MPO's themes define.
|
|
@@ -66,7 +65,7 @@ function probeItems(seen: Record<string, GlyphProps>): TabBarItem[] {
|
|
|
66
65
|
|
|
67
66
|
const expected: { accent?: string; secondary?: string; primary?: string } = {};
|
|
68
67
|
function InkProbe() {
|
|
69
|
-
expected.accent =
|
|
68
|
+
expected.accent = useAccentOnSurface();
|
|
70
69
|
expected.secondary = useGlyphColor(tabBarInactiveInk);
|
|
71
70
|
expected.primary = useGlyphColor("$color");
|
|
72
71
|
return null;
|
|
@@ -126,10 +125,10 @@ describe("TabBar (LC-150 TAB-BAR-ANATOMY)", () => {
|
|
|
126
125
|
for (const preset of ["default", "bold"] as const) {
|
|
127
126
|
const cell = `${scheme}, ${preset}, orange`;
|
|
128
127
|
|
|
129
|
-
it(`${cell}: every icon gets
|
|
128
|
+
it(`${cell}: every icon gets UITabBar's 25pt glyph, whatever the preset`, () => {
|
|
130
129
|
const seen = renderBar(scheme, "/", preset);
|
|
131
130
|
const sizes = new Set(Object.values(seen).map((props) => props.size));
|
|
132
|
-
expect(sizes).toEqual(new Set([
|
|
131
|
+
expect(sizes).toEqual(new Set([25]));
|
|
133
132
|
});
|
|
134
133
|
|
|
135
134
|
it(`${cell}: active is the accent, inactive the secondary ink, never the accent`, () => {
|
|
@@ -149,10 +148,10 @@ describe("TabBar (LC-150 TAB-BAR-ANATOMY)", () => {
|
|
|
149
148
|
});
|
|
150
149
|
}
|
|
151
150
|
|
|
152
|
-
it(`${scheme}, no hue: the active tab is the
|
|
151
|
+
it(`${scheme}, no hue: the active tab is the preset's accent ink, inactive the secondary ink`, () => {
|
|
153
152
|
const seen = renderBar(scheme, "/");
|
|
154
|
-
expect(expected.accent).
|
|
155
|
-
expect(seen["/"]).toMatchObject({ color: expected.
|
|
153
|
+
expect(expected.accent).toBeTruthy();
|
|
154
|
+
expect(seen["/"]).toMatchObject({ color: expected.accent, weight: "fill" });
|
|
156
155
|
expect(seen["/moves"]).toMatchObject({ color: expected.secondary, weight: "regular" });
|
|
157
156
|
});
|
|
158
157
|
}
|
|
@@ -178,14 +177,42 @@ describe("TabBar (LC-150 TAB-BAR-ANATOMY)", () => {
|
|
|
178
177
|
expect(new Set(labels.map(sizeAtoms)).size).toBe(1);
|
|
179
178
|
});
|
|
180
179
|
|
|
181
|
-
it("pins
|
|
182
|
-
expect(
|
|
183
|
-
|
|
184
|
-
|
|
180
|
+
it("pins UITabBar's metrics: a 49pt row, a 25pt glyph clear of the hairline, a 10pt medium caption", () => {
|
|
181
|
+
expect(tabBarMetrics).toMatchObject({
|
|
182
|
+
rowHeight: 49,
|
|
183
|
+
iconSize: 25,
|
|
184
|
+
labelSize: 10,
|
|
185
|
+
labelWeight: "500",
|
|
186
|
+
});
|
|
187
|
+
// Nothing touches the top hairline, and the column fits inside the row,
|
|
188
|
+
// so the safe-area inset is the only height under the caption.
|
|
189
|
+
expect(tabBarMetrics.iconTop).toBeGreaterThanOrEqual(6);
|
|
190
|
+
const column =
|
|
191
|
+
tabBarMetrics.iconTop +
|
|
192
|
+
tabBarMetrics.iconSize +
|
|
193
|
+
tabBarMetrics.labelGap +
|
|
194
|
+
tabBarMetrics.labelLineHeight;
|
|
195
|
+
expect(column).toBeLessThanOrEqual(tabBarMetrics.rowHeight);
|
|
196
|
+
expect(tabBarMetrics.rowHeight - column).toBeLessThanOrEqual(4);
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
it("paints colours and material from the theme only and builds on no Button", () => {
|
|
200
|
+
expect(tabBarInactiveInk).toBe("$textMuted");
|
|
201
|
+
expect(tabBarMaterial).toMatch(/^\$color\d+$/);
|
|
185
202
|
const source = fs.readFileSync(path.resolve(__dirname, "TabBar.tsx"), "utf-8");
|
|
186
203
|
expect(source).not.toMatch(/\bButton\b/);
|
|
187
204
|
expect(source).toMatch(/edges=\{\["bottom"\]\}/);
|
|
188
205
|
expect(source).toMatch(/\{\.\.\.hairline\.top\}/);
|
|
189
206
|
expect(source).toMatch(/overflow="hidden"/);
|
|
207
|
+
expect(source).toMatch(/justifyContent="flex-start"/);
|
|
208
|
+
expect(source).toMatch(/paddingTop=\{tabBarMetrics\.iconTop\}/);
|
|
209
|
+
expect(source).toMatch(/height=\{tabBarMetrics\.rowHeight\}/);
|
|
210
|
+
// SafeAreaWrapper defaults to flex={1}. Yoga turns flex 1 with an auto
|
|
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"/);
|
|
215
|
+
// No preset hook reaches the geometry: a theme changes colours only.
|
|
216
|
+
expect(source).not.toMatch(/useResolvedKnobs|getActiveScaleTokens/);
|
|
190
217
|
});
|
|
191
218
|
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
|
+
import { HouseIcon, LightningIcon, SparkleIcon, SquaresFourIcon } from "@phosphor-icons/react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { YStack } from "tamagui";
|
|
5
|
+
import { TabBar } from "./TabBar";
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof TabBar> = {
|
|
8
|
+
title: "Components/TabBar",
|
|
9
|
+
component: TabBar,
|
|
10
|
+
parameters: { status: { type: "beta" }, layout: "fullscreen" },
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof TabBar>;
|
|
15
|
+
|
|
16
|
+
const items = [
|
|
17
|
+
{ key: "/", label: "Home", icon: HouseIcon },
|
|
18
|
+
{ key: "/pokemon", label: "Pokemon", icon: SparkleIcon },
|
|
19
|
+
{ key: "/moves", label: "Moves", icon: LightningIcon },
|
|
20
|
+
{ key: "/backoffice", label: "Backoffice", icon: SquaresFourIcon },
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
function Switcher({ initial }: { initial: string }) {
|
|
24
|
+
const [active, setActive] = useState(initial);
|
|
25
|
+
return (
|
|
26
|
+
<YStack flex={1} minHeight="$20" backgroundColor="$background" justifyContent="flex-end">
|
|
27
|
+
<TabBar items={items} activeKey={active} onTabPress={setActive} />
|
|
28
|
+
</YStack>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Four sections under a page, the second selected: UITabBar metrics, the theme's accent on the active item. */
|
|
33
|
+
export const Default: Story = {
|
|
34
|
+
render: () => <Switcher initial="/pokemon" />,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** The first item selected, so the accent moves and nothing else does. */
|
|
38
|
+
export const FirstActive: Story = {
|
|
39
|
+
render: () => <Switcher initial="/" />,
|
|
40
|
+
};
|