@multiplatform.one/components 7.57.0 → 7.59.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/Card.cjs +2 -0
- package/dist/cjs/Card.native.js +3 -0
- package/dist/cjs/Card.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/index.cjs +16 -3
- package/dist/cjs/DropdownMenu/index.native.js +21 -3
- package/dist/cjs/DropdownMenu/index.native.js.map +1 -1
- package/dist/cjs/SheetModal/SheetHeader.cjs +53 -0
- package/dist/cjs/SheetModal/SheetHeader.native.js +57 -0
- package/dist/cjs/SheetModal/SheetHeader.native.js.map +1 -0
- package/dist/cjs/SheetModal/index.cjs +11 -4
- package/dist/cjs/SheetModal/index.native.js +7 -1
- package/dist/cjs/SheetModal/index.native.js.map +1 -1
- package/dist/cjs/actions/DangerSection.cjs +73 -0
- package/dist/cjs/actions/DangerSection.native.js +77 -0
- package/dist/cjs/actions/DangerSection.native.js.map +1 -0
- package/dist/cjs/actions/HeaderActions.cjs +98 -0
- package/dist/cjs/actions/HeaderActions.native.js +114 -0
- package/dist/cjs/actions/HeaderActions.native.js.map +1 -0
- package/dist/cjs/actions/index.cjs +7 -1
- package/dist/cjs/actions/index.native.js +7 -1
- package/dist/cjs/actions/index.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +3 -1
- package/dist/cjs/layouts/page.native.js +2 -0
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/tags.cjs +5 -8
- package/dist/cjs/layouts/tags.native.js +9 -6
- package/dist/cjs/layouts/tags.native.js.map +1 -1
- package/dist/cjs/surfaces.cjs +2 -0
- package/dist/cjs/surfaces.native.js +3 -0
- package/dist/cjs/surfaces.native.js.map +1 -1
- package/dist/esm/Accordion/index.native.js.map +1 -1
- package/dist/esm/AnimateHeight/index.native.js.map +1 -1
- package/dist/esm/Avatar/getInitials.native.js.map +1 -1
- package/dist/esm/Avatar/index.native.js.map +1 -1
- package/dist/esm/Badge/index.native.js.map +1 -1
- package/dist/esm/Button.native.js.map +1 -1
- package/dist/esm/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/Carousel/index.native.js.map +1 -1
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/Collapsible.native.js.map +1 -1
- package/dist/esm/ContextMenu/index.native.js.map +1 -1
- package/dist/esm/CopyField/index.native.js.map +1 -1
- package/dist/esm/Dialog.native.js.map +1 -1
- package/dist/esm/DotIndicator/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.mjs +15 -3
- package/dist/esm/DropdownMenu/index.mjs.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js +20 -3
- package/dist/esm/DropdownMenu/index.native.js.map +1 -1
- package/dist/esm/ErrorBoundary/index.native.js.map +1 -1
- package/dist/esm/Heading.native.js.map +1 -1
- package/dist/esm/Meter/index.native.js.map +1 -1
- package/dist/esm/Meter/meter.native.js.map +1 -1
- package/dist/esm/OverflowRow/index.native.js.map +1 -1
- package/dist/esm/Pagination.native.js.map +1 -1
- package/dist/esm/Popover.native.js.map +1 -1
- package/dist/esm/ProgressSteps/index.native.js.map +1 -1
- package/dist/esm/Quote/index.native.js.map +1 -1
- package/dist/esm/ScrollView/revealFocusedField.native.js.map +1 -1
- package/dist/esm/Separator/index.native.js.map +1 -1
- package/dist/esm/Sheet.native.js.map +1 -1
- package/dist/esm/SheetModal/SheetHeader.mjs +28 -0
- package/dist/esm/SheetModal/SheetHeader.mjs.map +1 -0
- package/dist/esm/SheetModal/SheetHeader.native.js +29 -0
- package/dist/esm/SheetModal/SheetHeader.native.js.map +1 -0
- package/dist/esm/SheetModal/detents.native.js.map +1 -1
- package/dist/esm/SheetModal/index.mjs +11 -4
- package/dist/esm/SheetModal/index.mjs.map +1 -1
- package/dist/esm/SheetModal/index.native.js +7 -1
- package/dist/esm/SheetModal/index.native.js.map +1 -1
- package/dist/esm/SheetModal/useSheetFrameFocus.native.js.map +1 -1
- package/dist/esm/Skeleton/index.native.js.map +1 -1
- package/dist/esm/SkipLink/index.native.js.map +1 -1
- package/dist/esm/SortableList/SortableHandle.native.js.map +1 -1
- package/dist/esm/SortableList/index.native.js.map +1 -1
- package/dist/esm/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/esm/Tabs/index.native.js.map +1 -1
- package/dist/esm/Text.native.js.map +1 -1
- package/dist/esm/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/esm/Toast/index.native.js.map +1 -1
- package/dist/esm/Toast/store.native.js.map +1 -1
- package/dist/esm/Tooltip/nativePress.native.js.map +1 -1
- package/dist/esm/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/esm/TreeSelect/index.native.js.map +1 -1
- package/dist/esm/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/esm/Video/PlayerChrome.native.js.map +1 -1
- package/dist/esm/Video/VideoFrame.native.js.map +1 -1
- package/dist/esm/Video/types.native.js.map +1 -1
- package/dist/esm/Wheel/index.native.js.map +1 -1
- package/dist/esm/Wizard/index.native.js.map +1 -1
- package/dist/esm/actions/ActionBar.native.js.map +1 -1
- package/dist/esm/actions/DangerSection.mjs +48 -0
- package/dist/esm/actions/DangerSection.mjs.map +1 -0
- package/dist/esm/actions/DangerSection.native.js +49 -0
- package/dist/esm/actions/DangerSection.native.js.map +1 -0
- package/dist/esm/actions/DestructiveAction.native.js.map +1 -1
- package/dist/esm/actions/HeaderActions.mjs +71 -0
- package/dist/esm/actions/HeaderActions.mjs.map +1 -0
- package/dist/esm/actions/HeaderActions.native.js +84 -0
- package/dist/esm/actions/HeaderActions.native.js.map +1 -0
- package/dist/esm/actions/devWarn.native.js.map +1 -1
- package/dist/esm/actions/index.mjs +3 -1
- package/dist/esm/actions/index.mjs.map +1 -1
- package/dist/esm/actions/index.native.js +3 -1
- package/dist/esm/actions/index.native.js.map +1 -1
- package/dist/esm/actions/severity.native.js.map +1 -1
- package/dist/esm/appShell/Dock.native.js.map +1 -1
- package/dist/esm/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/esm/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/esm/appShell/Springboard.native.js.map +1 -1
- package/dist/esm/appShell/SystemBar.native.js.map +1 -1
- package/dist/esm/appShell/TabBar.native.js.map +1 -1
- package/dist/esm/appShell/appTile.native.js.map +1 -1
- package/dist/esm/appShell/index.native.js.map +1 -1
- package/dist/esm/charts/Axis.native.js.map +1 -1
- package/dist/esm/charts/BarChart.native.js.map +1 -1
- package/dist/esm/charts/ChartDataView.native.js.map +1 -1
- package/dist/esm/charts/ChartSurface.native.js.map +1 -1
- package/dist/esm/charts/LineChart.native.js.map +1 -1
- package/dist/esm/charts/PieChart.native.js.map +1 -1
- package/dist/esm/charts/Sparkline.native.js.map +1 -1
- package/dist/esm/charts/accessibility.native.js.map +1 -1
- package/dist/esm/charts/chartHeight.native.js.map +1 -1
- package/dist/esm/charts/composeChart.native.js.map +1 -1
- package/dist/esm/charts/index.native.js.map +1 -1
- package/dist/esm/charts/math.native.js.map +1 -1
- package/dist/esm/charts/series.native.js.map +1 -1
- package/dist/esm/charts/svg.native.js.map +1 -1
- package/dist/esm/charts/types.native.js.map +1 -1
- package/dist/esm/charts/useChartTheme.native.js.map +1 -1
- package/dist/esm/code/Code/index.native.js.map +1 -1
- package/dist/esm/code/CodeBlock/index.native.js.map +1 -1
- package/dist/esm/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/esm/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
- package/dist/esm/code/Highlighter/index.native.js.map +1 -1
- package/dist/esm/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
- package/dist/esm/code/Pre/index.native.js.map +1 -1
- package/dist/esm/code/index.native.js.map +1 -1
- package/dist/esm/componentColors.native.js.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/esm/feedback/NotifyHost.native.js.map +1 -1
- package/dist/esm/feedback/copy.native.js.map +1 -1
- package/dist/esm/feedback/index.native.js.map +1 -1
- package/dist/esm/feedback/notify.native.js.map +1 -1
- package/dist/esm/feedback/route.native.js.map +1 -1
- package/dist/esm/feedback/store.native.js.map +1 -1
- package/dist/esm/hooks/index.native.js.map +1 -1
- package/dist/esm/hooks/useClipboard.native.js.map +1 -1
- package/dist/esm/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/esm/icons/CheckRegular.native.js.map +1 -1
- package/dist/esm/icons/MinusRegular.native.js.map +1 -1
- package/dist/esm/icons/index.native.js.map +1 -1
- package/dist/esm/icons/lucide.native.js.map +1 -1
- package/dist/esm/icons/themed.native.js.map +1 -1
- package/dist/esm/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/esm/images/Image/shared.native.js.map +1 -1
- package/dist/esm/images/Image/types.native.js.map +1 -1
- package/dist/esm/images/index.native.js.map +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/knobImmuneExports.native.js.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/esm/layouts/Debug/index.native.js.map +1 -1
- package/dist/esm/layouts/EmptyState.native.js.map +1 -1
- package/dist/esm/layouts/IdentityPlate.native.js.map +1 -1
- package/dist/esm/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/esm/layouts/PageTemplates.native.js.map +1 -1
- package/dist/esm/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/esm/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/esm/layouts/StatusDot.native.js.map +1 -1
- package/dist/esm/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/esm/layouts/attachments.native.js.map +1 -1
- package/dist/esm/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/esm/layouts/index.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +2 -0
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +2 -0
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/esm/layouts/screenScroll.native.js.map +1 -1
- package/dist/esm/layouts/shellSidebarSlot.native.js.map +1 -1
- package/dist/esm/layouts/sidebar.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/layouts/timeline.native.js.map +1 -1
- package/dist/esm/layouts/toolbar.native.js.map +1 -1
- package/dist/esm/shared/actionScan.native.js.map +1 -1
- package/dist/esm/shared/i18n.native.js.map +1 -1
- package/dist/esm/shared/restoreRetries.native.js.map +1 -1
- package/dist/esm/shared/t.native.js.map +1 -1
- package/dist/esm/shared/textRidesText.native.js.map +1 -1
- package/dist/esm/shared/useReturnFocusOnClose.native.js.map +1 -1
- package/dist/esm/surfaces.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/esm/tamagui.native.js.map +1 -1
- package/dist/esm/testSetup.native.js.map +1 -1
- package/dist/esm/utils/setTinted.native.js.map +1 -1
- package/dist/esm/utils/unwrapText.native.js.map +1 -1
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/Dashboard.native.js.map +1 -1
- package/dist/esm/views/Gantt.native.js.map +1 -1
- package/dist/esm/views/GanttDateGrip.native.js.map +1 -1
- package/dist/esm/views/ImageGrid.native.js.map +1 -1
- package/dist/esm/views/List.native.js.map +1 -1
- package/dist/esm/views/Matrix.native.js.map +1 -1
- package/dist/esm/views/ReportBuilder.native.js.map +1 -1
- package/dist/esm/views/TreeView.native.js.map +1 -1
- package/dist/esm/views/calendarMath.native.js.map +1 -1
- package/dist/esm/views/ganttIntervals.native.js.map +1 -1
- package/dist/esm/views/ganttMath.native.js.map +1 -1
- package/dist/esm/views/index.native.js.map +1 -1
- package/dist/esm/views/kanbanDnd.native.js.map +1 -1
- package/dist/esm/views/matrixMath.native.js.map +1 -1
- package/dist/esm/views/treeViewDnd.native.js.map +1 -1
- package/dist/esm/views/treeViewLayout.native.js.map +1 -1
- package/dist/esm/views/treeViewMotion.native.js.map +1 -1
- package/dist/esm/views/treeViewReveal.native.js.map +1 -1
- package/dist/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 +15 -3
- package/dist/jsx/DropdownMenu/index.mjs.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js +21 -3
- 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.mjs +28 -0
- package/dist/jsx/SheetModal/SheetHeader.mjs.map +1 -0
- package/dist/jsx/SheetModal/SheetHeader.native.js +57 -0
- package/dist/jsx/SheetModal/SheetHeader.native.js.map +1 -0
- package/dist/jsx/SheetModal/detents.native.js.map +1 -1
- package/dist/jsx/SheetModal/index.mjs +11 -4
- package/dist/jsx/SheetModal/index.mjs.map +1 -1
- package/dist/jsx/SheetModal/index.native.js +7 -1
- package/dist/jsx/SheetModal/index.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.mjs +48 -0
- package/dist/jsx/actions/DangerSection.mjs.map +1 -0
- package/dist/jsx/actions/DangerSection.native.js +77 -0
- package/dist/jsx/actions/DangerSection.native.js.map +1 -0
- package/dist/jsx/actions/DestructiveAction.native.js.map +1 -1
- package/dist/jsx/actions/HeaderActions.mjs +71 -0
- package/dist/jsx/actions/HeaderActions.mjs.map +1 -0
- package/dist/jsx/actions/HeaderActions.native.js +114 -0
- package/dist/jsx/actions/HeaderActions.native.js.map +1 -0
- package/dist/jsx/actions/devWarn.native.js.map +1 -1
- package/dist/jsx/actions/index.mjs +3 -1
- package/dist/jsx/actions/index.mjs.map +1 -1
- package/dist/jsx/actions/index.native.js +7 -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.native.js +1 -1
- 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.mjs +2 -0
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +4 -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 +31 -4
- package/src/SheetModal/SheetHeader.tsx +30 -0
- package/src/SheetModal/SheetModal.menus.spec.tsx +247 -0
- package/src/SheetModal/SheetModal.stories.tsx +113 -1
- package/src/SheetModal/index.native.tsx +7 -1
- package/src/SheetModal/index.tsx +20 -4
- package/src/actions/DangerSection.spec.tsx +45 -0
- package/src/actions/DangerSection.tsx +52 -0
- package/src/actions/HeaderActions.spec.tsx +84 -0
- package/src/actions/HeaderActions.tsx +90 -0
- package/src/actions/index.ts +10 -0
- package/src/elevatedGround.spec.tsx +71 -0
- package/src/layouts/IdentityPlate.stories.tsx +20 -1
- package/src/layouts/Tags.stories.tsx +42 -0
- package/src/layouts/page.tsx +3 -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 +5 -0
- package/types/DropdownMenu/index.d.ts.map +1 -1
- package/types/SheetModal/SheetHeader.d.ts +13 -0
- package/types/SheetModal/SheetHeader.d.ts.map +1 -0
- package/types/SheetModal/index.d.ts +7 -1
- package/types/SheetModal/index.d.ts.map +1 -1
- package/types/SheetModal/index.native.d.ts +1 -1
- package/types/SheetModal/index.native.d.ts.map +1 -1
- package/types/actions/DangerSection.d.ts +15 -0
- package/types/actions/DangerSection.d.ts.map +1 -0
- package/types/actions/HeaderActions.d.ts +42 -0
- package/types/actions/HeaderActions.d.ts.map +1 -0
- package/types/actions/index.d.ts +2 -0
- package/types/actions/index.d.ts.map +1 -1
- package/types/layouts/page.d.ts +6 -0
- package/types/layouts/page.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.59.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.59.0",
|
|
62
|
+
"@multiplatform.one/i18n": "^7.59.0",
|
|
63
|
+
"@multiplatform.one/platform": "^7.59.0",
|
|
64
|
+
"@multiplatform.one/router": "^7.59.0",
|
|
65
|
+
"@multiplatform.one/theme": "^7.59.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.59.0",
|
|
93
|
+
"@multiplatform.one/storybook": "7.59.0",
|
|
94
|
+
"@multiplatform.one/test-utils": "7.59.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>
|
|
@@ -5,11 +5,14 @@ import { IconSlot } from "@multiplatform.one/theme";
|
|
|
5
5
|
* Trigger + elevated overlay of action rows on the FloatingPanel stack
|
|
6
6
|
* (cover contract: the panel opens OVER its trigger, top edge on the
|
|
7
7
|
* trigger's top edge, trigger label as its first row, `at-least-trigger`
|
|
8
|
-
* width — Clay 2026-10-23
|
|
8
|
+
* width — Clay 2026-10-23; an icon-only trigger instead opens the menu
|
|
9
|
+
* attached under it with no echo row, LC-262). Do not fork
|
|
9
10
|
* a second overlay. SF-OVERLAY via elevatedSurface, SP-EDGE rows (container
|
|
10
11
|
* owns only its 1px border; items own ALL padding), LC-21 COMMIT/COMPOSE,
|
|
11
12
|
* and the APG keyboard layer (ArrowUp/Down + Home/End, Enter/Space, Escape,
|
|
12
|
-
* typeahead).
|
|
13
|
+
* typeahead). Native opens it over the trigger as a pull-down; the web at
|
|
14
|
+
* ≤640 takes the sheet at page level and the menu inside an overlay
|
|
15
|
+
* (FZ-7830).
|
|
13
16
|
*
|
|
14
17
|
* Composable parts (DropdownMenu.Trigger/Content/Item/CheckboxItem/
|
|
15
18
|
* Separator/Label) plus a convenience `items=[]` prop. Plain items
|
|
@@ -236,6 +239,19 @@ const coverContract = {
|
|
|
236
239
|
fitContent: false,
|
|
237
240
|
};
|
|
238
241
|
|
|
242
|
+
/**
|
|
243
|
+
* A trigger that shows only a glyph: an `icon` and no label children, or a
|
|
244
|
+
* component marked `iconOnly` (PageMenuButton, PageBarButton).
|
|
245
|
+
*/
|
|
246
|
+
export function isIconTrigger(trigger: ReactNode): boolean {
|
|
247
|
+
if (!isValidElement(trigger)) return false;
|
|
248
|
+
if ((trigger.type as { iconOnly?: boolean } | null)?.iconOnly) return true;
|
|
249
|
+
const props = trigger.props as { icon?: unknown; children?: ReactNode };
|
|
250
|
+
if (props.icon == null) return false;
|
|
251
|
+
const kids = props.children;
|
|
252
|
+
return kids == null || kids === false || (Array.isArray(kids) && kids.length === 0);
|
|
253
|
+
}
|
|
254
|
+
|
|
239
255
|
function decorateTrigger(
|
|
240
256
|
trigger: ReactNode,
|
|
241
257
|
open: boolean,
|
|
@@ -307,7 +323,7 @@ function DropdownMenuRoot({
|
|
|
307
323
|
closeOnSelect,
|
|
308
324
|
size,
|
|
309
325
|
triggerSizing = "content",
|
|
310
|
-
anchorMode
|
|
326
|
+
anchorMode,
|
|
311
327
|
triggerRow,
|
|
312
328
|
}: DropdownMenuProps) {
|
|
313
329
|
const [open, setOpen] = useControllableState({
|
|
@@ -398,6 +414,11 @@ function DropdownMenuRoot({
|
|
|
398
414
|
if (contentParts.length) body = contentParts;
|
|
399
415
|
}
|
|
400
416
|
|
|
417
|
+
// LC-262: an icon trigger (a ⋯) is not echoed as the menu's first row, which
|
|
418
|
+
// reads as junk; the menu opens under it instead, the UIMenu pull-down.
|
|
419
|
+
const iconTrigger = triggerRow == null && isIconTrigger(trigger);
|
|
420
|
+
const resolvedAnchorMode = anchorMode ?? (iconTrigger ? "attach" : "cover-trigger");
|
|
421
|
+
|
|
401
422
|
return (
|
|
402
423
|
<Surface size={size}>
|
|
403
424
|
<DropdownMenuContext.Provider value={ctx}>
|
|
@@ -406,10 +427,16 @@ function DropdownMenuRoot({
|
|
|
406
427
|
onOpenChange={setOpen}
|
|
407
428
|
skipReturnFocusRef={skipReturnFocusRef}
|
|
408
429
|
trigger={decorateTrigger(trigger, open, onArrow)}
|
|
409
|
-
anchorMode={
|
|
430
|
+
anchorMode={resolvedAnchorMode}
|
|
431
|
+
triggerEcho={!iconTrigger}
|
|
410
432
|
triggerRow={triggerRow}
|
|
411
433
|
contentPadding="none"
|
|
412
434
|
triggerSizing={triggerSizing}
|
|
435
|
+
// FZ-7830, LC-112: a menu is a menu over its trigger on native, the
|
|
436
|
+
// UIMenu pull-down, never a bottom sheet. The phone-width web keeps
|
|
437
|
+
// its sheet at page level and opens the menu inside an overlay, so a
|
|
438
|
+
// sheet never stacks on a sheet.
|
|
439
|
+
compactFace={isWeb ? "auto" : "menu"}
|
|
413
440
|
{...coverContract}
|
|
414
441
|
{...(placement ? { placement } : {})}
|
|
415
442
|
>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { View, XStack } from "tamagui";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The sheet's header row: what the sheet is about, and its frequent actions as
|
|
6
|
+
* icon buttons in the trailing area (LC-262 DIRECT-ACTIONS), never hidden in a
|
|
7
|
+
* menu.
|
|
8
|
+
*/
|
|
9
|
+
export function SheetHeader({
|
|
10
|
+
header,
|
|
11
|
+
actions,
|
|
12
|
+
titleId,
|
|
13
|
+
}: {
|
|
14
|
+
header?: ReactNode;
|
|
15
|
+
actions?: ReactNode;
|
|
16
|
+
/** Names the sheet: on the header content alone, so the actions stay out of it. */
|
|
17
|
+
titleId?: string;
|
|
18
|
+
}) {
|
|
19
|
+
if (!actions) return <>{header}</>;
|
|
20
|
+
return (
|
|
21
|
+
<XStack alignItems="center" gap="$2">
|
|
22
|
+
<View id={titleId} flex={1} minWidth={0}>
|
|
23
|
+
{header}
|
|
24
|
+
</View>
|
|
25
|
+
<XStack testID="sheet-modal-header-actions" flexShrink={0} alignItems="center">
|
|
26
|
+
{actions}
|
|
27
|
+
</XStack>
|
|
28
|
+
</XStack>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
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, vi } from "vitest";
|
|
12
|
+
import { Button } from "tamagui";
|
|
13
|
+
import {
|
|
14
|
+
DotsThreeIcon,
|
|
15
|
+
GlobeIcon,
|
|
16
|
+
HouseIcon,
|
|
17
|
+
LockIcon,
|
|
18
|
+
ShieldCheckIcon,
|
|
19
|
+
UserCircleCheckIcon,
|
|
20
|
+
} from "@phosphor-icons/react";
|
|
21
|
+
import { DropdownMenu, isIconTrigger } from "../DropdownMenu";
|
|
22
|
+
import { SheetModal } from "./index";
|
|
23
|
+
import { MenusInOpenSheet, MenusInSheet } from "./SheetModal.stories";
|
|
24
|
+
|
|
25
|
+
const options = [
|
|
26
|
+
{ label: "Private", value: "private" },
|
|
27
|
+
{ label: "Tailnet", value: "tailnet" },
|
|
28
|
+
{ label: "LAN", value: "lan" },
|
|
29
|
+
{ label: "Public", value: "public" },
|
|
30
|
+
{ label: "Public, signed in", value: "public-auth" },
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const exposure = [
|
|
34
|
+
{ label: "Private", value: "private", icon: <LockIcon /> },
|
|
35
|
+
{ label: "Tailnet", value: "tailnet", icon: <ShieldCheckIcon /> },
|
|
36
|
+
{ label: "LAN", value: "lan", icon: <HouseIcon /> },
|
|
37
|
+
{ label: "Public", value: "public", icon: <GlobeIcon /> },
|
|
38
|
+
{ label: "Public, signed in", value: "public-auth", icon: <UserCircleCheckIcon /> },
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
const regions = [
|
|
42
|
+
"Ashburn",
|
|
43
|
+
"Hillsboro",
|
|
44
|
+
"Helsinki",
|
|
45
|
+
"Falkenstein",
|
|
46
|
+
"Nuremberg",
|
|
47
|
+
"Singapore",
|
|
48
|
+
"Sydney",
|
|
49
|
+
"Tokyo",
|
|
50
|
+
].map((label) => ({ label, value: label.toLowerCase() }));
|
|
51
|
+
|
|
52
|
+
let width = 0;
|
|
53
|
+
beforeEach(() => {
|
|
54
|
+
width = window.innerWidth;
|
|
55
|
+
Object.defineProperty(window, "innerWidth", { configurable: true, writable: true, value: 390 });
|
|
56
|
+
});
|
|
57
|
+
afterEach(() => {
|
|
58
|
+
cleanup();
|
|
59
|
+
Object.defineProperty(window, "innerWidth", { configurable: true, writable: true, value: width });
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const panelSheets = () => document.querySelectorAll('[data-testid="floating-panel-sheet"]');
|
|
63
|
+
|
|
64
|
+
describe("menus inside a SheetModal at 390 (FZ-7830)", () => {
|
|
65
|
+
it("a DropdownMenu in the sheet opens over its trigger, not as a second sheet", async () => {
|
|
66
|
+
renderWithProviders(
|
|
67
|
+
<SheetModal open onOpenChange={() => {}}>
|
|
68
|
+
<DropdownMenu defaultOpen items={[{ label: "Stop" }, { label: "Restart" }]}>
|
|
69
|
+
<Button>Stack actions</Button>
|
|
70
|
+
</DropdownMenu>
|
|
71
|
+
</SheetModal>,
|
|
72
|
+
);
|
|
73
|
+
await waitFor(() => expect(document.querySelector('[role="menu"]')).toBeTruthy());
|
|
74
|
+
expect(document.querySelector('[data-testid="floating-panel-viewport"]')).toBeTruthy();
|
|
75
|
+
expect(panelSheets().length).toBe(0);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it("a DropdownMenu at page level keeps its sheet", async () => {
|
|
79
|
+
renderWithProviders(
|
|
80
|
+
<DropdownMenu defaultOpen items={[{ label: "Stop" }, { label: "Restart" }]}>
|
|
81
|
+
<Button>Stack actions</Button>
|
|
82
|
+
</DropdownMenu>,
|
|
83
|
+
);
|
|
84
|
+
await waitFor(() => expect(document.querySelector('[role="menu"]')).toBeTruthy());
|
|
85
|
+
expect(document.querySelector('[data-testid="floating-panel-viewport"]')).toBeFalsy();
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it("a Select in the sheet opens its listbox over the trigger, not as a second sheet", async () => {
|
|
89
|
+
const result = renderWithProviders(
|
|
90
|
+
<SheetModal open onOpenChange={() => {}}>
|
|
91
|
+
<Select aria-label="Exposure" options={options} defaultValue="tailnet" />
|
|
92
|
+
</SheetModal>,
|
|
93
|
+
);
|
|
94
|
+
const trigger = (await result.findAllByTestId("select-trigger"))[0];
|
|
95
|
+
fireEvent.pointerDown(trigger);
|
|
96
|
+
fireEvent.mouseDown(trigger);
|
|
97
|
+
fireEvent.click(trigger);
|
|
98
|
+
await result.findByTestId("select-dropdown");
|
|
99
|
+
expect(panelSheets().length).toBe(0);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it("a long Select in the sheet opens its listbox over the trigger, not as a second sheet", async () => {
|
|
103
|
+
const result = renderWithProviders(
|
|
104
|
+
<SheetModal open onOpenChange={() => {}}>
|
|
105
|
+
<Select aria-label="Region" options={regions} defaultValue="helsinki" />
|
|
106
|
+
</SheetModal>,
|
|
107
|
+
);
|
|
108
|
+
const trigger = (await result.findAllByTestId("select-trigger"))[0];
|
|
109
|
+
fireEvent.pointerDown(trigger);
|
|
110
|
+
fireEvent.mouseDown(trigger);
|
|
111
|
+
fireEvent.click(trigger);
|
|
112
|
+
await result.findByTestId("select-dropdown");
|
|
113
|
+
expect(panelSheets().length).toBe(0);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
it("a short Select at page level (seven options) opens over its trigger, not as a sheet", async () => {
|
|
117
|
+
const result = renderWithProviders(
|
|
118
|
+
<Select aria-label="Region" options={regions.slice(0, 7)} defaultValue="helsinki" />,
|
|
119
|
+
);
|
|
120
|
+
const trigger = result.getByTestId("select-trigger");
|
|
121
|
+
fireEvent.pointerDown(trigger);
|
|
122
|
+
fireEvent.mouseDown(trigger);
|
|
123
|
+
fireEvent.click(trigger);
|
|
124
|
+
await result.findByTestId("select-dropdown");
|
|
125
|
+
expect(panelSheets().length).toBe(0);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
it("a long Select at page level (eight options) keeps its sheet", async () => {
|
|
129
|
+
const result = renderWithProviders(
|
|
130
|
+
<Select aria-label="Region" options={regions} defaultValue="helsinki" />,
|
|
131
|
+
);
|
|
132
|
+
fireEvent.click(result.getByTestId("select-trigger"));
|
|
133
|
+
await waitFor(() => expect(panelSheets().length).toBeGreaterThan(0));
|
|
134
|
+
expect(result.queryByTestId("select-dropdown")).toBeNull();
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
it("the Menus in a sheet stories mount", () => {
|
|
138
|
+
for (const story of [MenusInSheet, MenusInOpenSheet]) {
|
|
139
|
+
const result = renderWithProviders(<>{story.render?.({} as never, {} as never)}</>);
|
|
140
|
+
expect(result.getAllByText("Open sheet").length).toBeGreaterThan(0);
|
|
141
|
+
cleanup();
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
describe("LC-262 inside a sheet at 390 (FZ-7830 round 2)", () => {
|
|
147
|
+
it("five options with glyphs lay out inline as a radio list, with no trigger and no popover", () => {
|
|
148
|
+
const onValueChange = vi.fn();
|
|
149
|
+
const result = renderWithProviders(
|
|
150
|
+
<SheetModal open onOpenChange={() => {}}>
|
|
151
|
+
<Select
|
|
152
|
+
aria-label="Exposure"
|
|
153
|
+
options={exposure}
|
|
154
|
+
defaultValue="tailnet"
|
|
155
|
+
onValueChange={onValueChange}
|
|
156
|
+
/>
|
|
157
|
+
</SheetModal>,
|
|
158
|
+
);
|
|
159
|
+
expect(result.queryByTestId("select-trigger")).toBeNull();
|
|
160
|
+
const group = result.getByRole("radiogroup", { name: "Exposure" });
|
|
161
|
+
const radios = Array.from(group.querySelectorAll('[role="radio"]'));
|
|
162
|
+
expect(radios.map((r) => r.textContent)).toEqual(exposure.map((o) => o.label));
|
|
163
|
+
expect(radios.every((r) => r.querySelector("svg"))).toBe(true);
|
|
164
|
+
expect(radios[1].getAttribute("aria-checked")).toBe("true");
|
|
165
|
+
fireEvent.click(radios[2]);
|
|
166
|
+
expect(onValueChange).toHaveBeenCalledWith("lan");
|
|
167
|
+
expect(panelSheets().length).toBe(0);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
it("the inline list is one tab stop, and arrows move and choose (APG radio group)", () => {
|
|
171
|
+
const onValueChange = vi.fn();
|
|
172
|
+
const result = renderWithProviders(
|
|
173
|
+
<SheetModal open onOpenChange={() => {}}>
|
|
174
|
+
<Select
|
|
175
|
+
aria-label="Exposure"
|
|
176
|
+
options={exposure}
|
|
177
|
+
defaultValue="tailnet"
|
|
178
|
+
onValueChange={onValueChange}
|
|
179
|
+
/>
|
|
180
|
+
</SheetModal>,
|
|
181
|
+
);
|
|
182
|
+
const radios = Array.from(
|
|
183
|
+
result.getByRole("radiogroup", { name: "Exposure" }).querySelectorAll('[role="radio"]'),
|
|
184
|
+
) as HTMLElement[];
|
|
185
|
+
expect(radios.map((r) => r.getAttribute("tabindex"))).toEqual(["-1", "0", "-1", "-1", "-1"]);
|
|
186
|
+
fireEvent.keyDown(radios[1], { key: "ArrowDown" });
|
|
187
|
+
expect(onValueChange).toHaveBeenLastCalledWith("lan");
|
|
188
|
+
fireEvent.keyDown(radios[0], { key: "ArrowUp" });
|
|
189
|
+
expect(onValueChange).toHaveBeenLastCalledWith("public-auth");
|
|
190
|
+
fireEvent.keyDown(radios[3], { key: " " });
|
|
191
|
+
expect(onValueChange).toHaveBeenLastCalledWith("public");
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
it("a short list missing a glyph, or one past five, keeps its trigger and opens over it", async () => {
|
|
195
|
+
const six = [...exposure, { label: "Mesh", value: "mesh", icon: <GlobeIcon /> }];
|
|
196
|
+
const bare = exposure.map(({ icon: _icon, ...rest }) => rest);
|
|
197
|
+
for (const options of [six, bare]) {
|
|
198
|
+
const result = renderWithProviders(
|
|
199
|
+
<SheetModal open onOpenChange={() => {}}>
|
|
200
|
+
<Select aria-label="Exposure" options={options} defaultValue="tailnet" />
|
|
201
|
+
</SheetModal>,
|
|
202
|
+
);
|
|
203
|
+
expect(result.queryByRole("radiogroup")).toBeNull();
|
|
204
|
+
const trigger = (await result.findAllByTestId("select-trigger"))[0];
|
|
205
|
+
fireEvent.pointerDown(trigger);
|
|
206
|
+
fireEvent.mouseDown(trigger);
|
|
207
|
+
fireEvent.click(trigger);
|
|
208
|
+
await result.findByTestId("select-dropdown");
|
|
209
|
+
expect(panelSheets().length).toBe(0);
|
|
210
|
+
cleanup();
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
it("at page level the same five options keep their trigger, each menu row with its glyph", async () => {
|
|
215
|
+
const result = renderWithProviders(
|
|
216
|
+
<Select aria-label="Exposure" options={exposure} defaultValue="tailnet" />,
|
|
217
|
+
);
|
|
218
|
+
expect(result.queryByRole("radiogroup")).toBeNull();
|
|
219
|
+
const trigger = result.getByTestId("select-trigger");
|
|
220
|
+
fireEvent.pointerDown(trigger);
|
|
221
|
+
fireEvent.mouseDown(trigger);
|
|
222
|
+
fireEvent.click(trigger);
|
|
223
|
+
const list = await result.findByTestId("select-dropdown");
|
|
224
|
+
const rows = Array.from(list.querySelectorAll('[role="option"]'));
|
|
225
|
+
expect(rows.length).toBe(5);
|
|
226
|
+
expect(rows.every((r) => r.querySelector("svg"))).toBe(true);
|
|
227
|
+
const chosen = rows.find((r) => r.getAttribute("aria-selected") === "true") as HTMLElement;
|
|
228
|
+
// The accent check alone marks it: no grey fill (LC-262).
|
|
229
|
+
expect(chosen.className).toContain("_bg-transparent");
|
|
230
|
+
expect(chosen.querySelectorAll("svg").length).toBe(2);
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
it("an icon-only menu trigger is not echoed as the menu's first row", async () => {
|
|
234
|
+
expect(isIconTrigger(<Button icon={DotsThreeIcon} aria-label="More actions" />)).toBe(true);
|
|
235
|
+
expect(isIconTrigger(<Button icon={DotsThreeIcon}>More</Button>)).toBe(false);
|
|
236
|
+
expect(isIconTrigger(<Button>Actions</Button>)).toBe(false);
|
|
237
|
+
renderWithProviders(
|
|
238
|
+
<SheetModal open onOpenChange={() => {}}>
|
|
239
|
+
<DropdownMenu defaultOpen items={[{ label: "Stop" }, { label: "Restart" }]}>
|
|
240
|
+
<Button icon={DotsThreeIcon} aria-label="Stack actions" />
|
|
241
|
+
</DropdownMenu>
|
|
242
|
+
</SheetModal>,
|
|
243
|
+
);
|
|
244
|
+
await waitFor(() => expect(document.querySelector('[role="menu"]')).toBeTruthy());
|
|
245
|
+
expect(document.querySelector("[data-fp-trigger-row]")).toBeNull();
|
|
246
|
+
});
|
|
247
|
+
});
|
|
@@ -6,12 +6,27 @@ 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 {
|
|
11
|
+
ArrowClockwiseIcon,
|
|
12
|
+
CloudArrowUpIcon,
|
|
13
|
+
GlobeIcon,
|
|
14
|
+
HouseIcon,
|
|
15
|
+
LockIcon,
|
|
16
|
+
ScrollIcon,
|
|
17
|
+
ShieldCheckIcon,
|
|
18
|
+
StopIcon,
|
|
19
|
+
TerminalIcon,
|
|
20
|
+
UserCircleCheckIcon,
|
|
21
|
+
} from "@phosphor-icons/react";
|
|
10
22
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
11
23
|
import { useRef, useState } from "react";
|
|
12
24
|
import { Platform, useWindowDimensions, type LayoutChangeEvent } from "react-native";
|
|
13
25
|
import { YStack } from "tamagui";
|
|
14
26
|
import { ActionBar } from "../actions/ActionBar";
|
|
27
|
+
import { DangerSection } from "../actions/DangerSection";
|
|
28
|
+
import { DestructiveAction } from "../actions/DestructiveAction";
|
|
29
|
+
import { HeaderActions } from "../actions/HeaderActions";
|
|
15
30
|
import { SheetModal } from "./index";
|
|
16
31
|
import { Paragraph, SizableText } from "../Text";
|
|
17
32
|
|
|
@@ -118,6 +133,103 @@ export const OpenOnMount: Story = {
|
|
|
118
133
|
render: () => <Harness startOpen />,
|
|
119
134
|
};
|
|
120
135
|
|
|
136
|
+
const exposureOptions = [
|
|
137
|
+
{ label: "Private", value: "private", icon: <LockIcon /> },
|
|
138
|
+
{ label: "Tailnet", value: "tailnet", icon: <ShieldCheckIcon /> },
|
|
139
|
+
{ label: "LAN", value: "lan", icon: <HouseIcon /> },
|
|
140
|
+
{ label: "Public", value: "public", icon: <GlobeIcon /> },
|
|
141
|
+
{ label: "Public, signed in", value: "public-auth", icon: <UserCircleCheckIcon /> },
|
|
142
|
+
];
|
|
143
|
+
|
|
144
|
+
const regionOptions = [
|
|
145
|
+
"Ashburn",
|
|
146
|
+
"Hillsboro",
|
|
147
|
+
"Helsinki",
|
|
148
|
+
"Falkenstein",
|
|
149
|
+
"Nuremberg",
|
|
150
|
+
"Singapore",
|
|
151
|
+
"Sydney",
|
|
152
|
+
"Tokyo",
|
|
153
|
+
].map((label) => ({ label, value: label.toLowerCase() }));
|
|
154
|
+
|
|
155
|
+
const noop = () => {};
|
|
156
|
+
|
|
157
|
+
/** Stop and Restart: the stack's frequent actions, shown, never hidden (LC-262). */
|
|
158
|
+
const lifecycleActions = [
|
|
159
|
+
{ icon: StopIcon, label: "Stop", onPress: noop },
|
|
160
|
+
{ icon: ArrowClockwiseIcon, label: "Restart", onPress: noop },
|
|
161
|
+
];
|
|
162
|
+
|
|
163
|
+
/** Past three, the last slot is "…" with the rest, each row with its glyph. */
|
|
164
|
+
const pageActions = [
|
|
165
|
+
...lifecycleActions,
|
|
166
|
+
{ icon: ScrollIcon, label: "Logs", onPress: noop },
|
|
167
|
+
{ icon: TerminalIcon, label: "Shell", onPress: noop },
|
|
168
|
+
{ icon: CloudArrowUpIcon, label: "Back up", onPress: noop },
|
|
169
|
+
];
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* FZ-7830, LC-262 DIRECT-ACTIONS. The sheet's frequent actions are icon
|
|
173
|
+
* buttons in its header, Uninstall sits in a Danger section at the end with
|
|
174
|
+
* its confirm, and the five-option Exposure lays out inline with its glyphs.
|
|
175
|
+
* The eight-option Region stays a menu over its field. On the page, past three
|
|
176
|
+
* actions "…" holds the rest, and the short Select opens over its trigger.
|
|
177
|
+
*/
|
|
178
|
+
function MenusHarness({ startOpen = false }: { startOpen?: boolean }) {
|
|
179
|
+
const [open, setOpen] = useState(startOpen);
|
|
180
|
+
const [exposure, setExposure] = useState("tailnet");
|
|
181
|
+
const [region, setRegion] = useState("helsinki");
|
|
182
|
+
return (
|
|
183
|
+
<FixtureStack minHeight={480} gap="$3" padding="$4">
|
|
184
|
+
<XStack alignItems="center" justifyContent="space-between" gap="$3">
|
|
185
|
+
<Paragraph>Page stack</Paragraph>
|
|
186
|
+
<HeaderActions actions={pageActions} />
|
|
187
|
+
</XStack>
|
|
188
|
+
<Select
|
|
189
|
+
label="Page exposure"
|
|
190
|
+
options={exposureOptions}
|
|
191
|
+
value={exposure}
|
|
192
|
+
onValueChange={(value) => setExposure(value as string)}
|
|
193
|
+
/>
|
|
194
|
+
<Button onPress={() => setOpen(true)}>Open sheet</Button>
|
|
195
|
+
<SheetModal
|
|
196
|
+
open={open}
|
|
197
|
+
onOpenChange={setOpen}
|
|
198
|
+
header={<SizableText fontWeight="600">keycloak</SizableText>}
|
|
199
|
+
headerActions={<HeaderActions actions={lifecycleActions} />}
|
|
200
|
+
>
|
|
201
|
+
<FixtureStack gap="$3">
|
|
202
|
+
<Select
|
|
203
|
+
label="Exposure"
|
|
204
|
+
options={exposureOptions}
|
|
205
|
+
value={exposure}
|
|
206
|
+
onValueChange={(value) => setExposure(value as string)}
|
|
207
|
+
/>
|
|
208
|
+
<Select
|
|
209
|
+
label="Region"
|
|
210
|
+
options={regionOptions}
|
|
211
|
+
value={region}
|
|
212
|
+
onValueChange={(value) => setRegion(value as string)}
|
|
213
|
+
/>
|
|
214
|
+
<DangerSection>
|
|
215
|
+
<DestructiveAction verb="Uninstall" noun="keycloak" severity="medium" onAction={noop} />
|
|
216
|
+
</DangerSection>
|
|
217
|
+
</FixtureStack>
|
|
218
|
+
</SheetModal>
|
|
219
|
+
</FixtureStack>
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export const MenusInSheet: Story = {
|
|
224
|
+
name: "Menus in a sheet",
|
|
225
|
+
render: () => <MenusHarness />,
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
export const MenusInOpenSheet: Story = {
|
|
229
|
+
name: "Menus in an open sheet",
|
|
230
|
+
render: () => <MenusHarness startOpen />,
|
|
231
|
+
};
|
|
232
|
+
|
|
121
233
|
type Bounds = { x: number; y: number; width: number; height: number };
|
|
122
234
|
type Reading<T> = T | "unmeasured" | "unavailable" | "invalid";
|
|
123
235
|
type FixtureMode = "subject" | "control-240";
|
|
@@ -48,6 +48,7 @@ import { View, YStack } from "tamagui";
|
|
|
48
48
|
import { DialogRegionContext } from "../surfaces";
|
|
49
49
|
|
|
50
50
|
import type { SheetModalProps } from "./index";
|
|
51
|
+
import { SheetHeader } from "./SheetHeader";
|
|
51
52
|
export type { SheetModalProps } from "./index";
|
|
52
53
|
|
|
53
54
|
const bottomInset = Platform.OS === "ios" ? 24 : 16;
|
|
@@ -76,11 +77,16 @@ export function SheetModal({
|
|
|
76
77
|
open,
|
|
77
78
|
onOpenChange,
|
|
78
79
|
children,
|
|
79
|
-
header,
|
|
80
|
+
header: headerContent,
|
|
81
|
+
headerActions,
|
|
80
82
|
snapPoint,
|
|
81
83
|
scrollable,
|
|
82
84
|
fill = false,
|
|
83
85
|
}: SheetModalProps) {
|
|
86
|
+
const header =
|
|
87
|
+
headerContent || headerActions ? (
|
|
88
|
+
<SheetHeader header={headerContent} actions={headerActions} />
|
|
89
|
+
) : null;
|
|
84
90
|
const { t } = useTranslation();
|
|
85
91
|
const { knobProps } = useResolvedKnobs();
|
|
86
92
|
const windowZIndex = useOverlayZIndex("sheet");
|
package/src/SheetModal/index.tsx
CHANGED
|
@@ -15,6 +15,7 @@ import { useEffect, useId, useRef, type ReactNode } from "react";
|
|
|
15
15
|
import { isWeb, Sheet, View, useWindowDimensions } from "tamagui";
|
|
16
16
|
import { DialogRegionContext, SheetFrame } from "../surfaces";
|
|
17
17
|
import { largeDetentRatio, resolveWebSnap } from "./detents";
|
|
18
|
+
import { SheetHeader } from "./SheetHeader";
|
|
18
19
|
import { useSheetFrameFocus } from "./useSheetFrameFocus";
|
|
19
20
|
|
|
20
21
|
export interface SheetModalProps {
|
|
@@ -23,6 +24,12 @@ export interface SheetModalProps {
|
|
|
23
24
|
children?: ReactNode;
|
|
24
25
|
/** Fixed content above the (scrollable) body, e.g. the sheet title. */
|
|
25
26
|
header?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* The sheet's frequent actions, as icon buttons in the header's trailing
|
|
29
|
+
* area (LC-262 DIRECT-ACTIONS): `HeaderActions`. Destructive actions go in a
|
|
30
|
+
* `DangerSection` at the end of the body instead.
|
|
31
|
+
*/
|
|
32
|
+
headerActions?: ReactNode;
|
|
26
33
|
/**
|
|
27
34
|
* Percent snap point. Web: the Sheet's snap point. Native: a drag detent.
|
|
28
35
|
* Omitted: the sheet opens at its content's height, capped at the large
|
|
@@ -77,17 +84,26 @@ export function SheetModal({
|
|
|
77
84
|
open,
|
|
78
85
|
onOpenChange,
|
|
79
86
|
children,
|
|
80
|
-
header,
|
|
87
|
+
header: headerContent,
|
|
88
|
+
headerActions,
|
|
81
89
|
snapPoint,
|
|
82
90
|
scrollable,
|
|
83
91
|
fill = false,
|
|
84
92
|
}: SheetModalProps) {
|
|
93
|
+
const titleId = useId();
|
|
94
|
+
const header =
|
|
95
|
+
headerContent || headerActions ? (
|
|
96
|
+
<SheetHeader
|
|
97
|
+
header={headerContent}
|
|
98
|
+
actions={headerActions}
|
|
99
|
+
titleId={headerActions ? titleId : undefined}
|
|
100
|
+
/>
|
|
101
|
+
) : null;
|
|
85
102
|
const snap = resolveWebSnap({ snapPoint, fill });
|
|
86
103
|
const { height: windowHeight } = useWindowDimensions();
|
|
87
104
|
const { knobProps } = useResolvedKnobs();
|
|
88
105
|
const sheetZIndex = useOverlayZIndex("sheet");
|
|
89
106
|
const transition = knobProps.motion.slide.transition;
|
|
90
|
-
const titleId = useId();
|
|
91
107
|
const frameRef = useRef<HTMLElement | null>(null);
|
|
92
108
|
|
|
93
109
|
useSheetFrameFocus(open, frameRef);
|
|
@@ -125,7 +141,7 @@ export function SheetModal({
|
|
|
125
141
|
tabIndex: -1,
|
|
126
142
|
role: "dialog",
|
|
127
143
|
"aria-modal": true,
|
|
128
|
-
"aria-labelledby":
|
|
144
|
+
"aria-labelledby": headerContent ? titleId : undefined,
|
|
129
145
|
} as Record<string, unknown>)}
|
|
130
146
|
{...knobProps.gap}
|
|
131
147
|
{...(snap.snapPointsMode === "fit"
|
|
@@ -139,7 +155,7 @@ export function SheetModal({
|
|
|
139
155
|
<DialogRegionContext.Provider value={IN_DIALOG_REGION}>
|
|
140
156
|
<OverlayStackProvider zIndex={sheetZIndex}>
|
|
141
157
|
{header ? (
|
|
142
|
-
<View id={titleId} {...(fill ? nonShrinking : null)}>
|
|
158
|
+
<View id={headerActions ? undefined : titleId} {...(fill ? nonShrinking : null)}>
|
|
143
159
|
{header}
|
|
144
160
|
</View>
|
|
145
161
|
) : null}
|