@multiplatform.one/components 7.67.0 → 7.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Accordion/index.native.js +1 -1
- package/dist/cjs/Accordion/index.native.js.map +1 -1
- package/dist/cjs/Alert/index.native.js.map +1 -1
- package/dist/cjs/AnimateHeight/index.native.js.map +1 -1
- package/dist/cjs/Avatar/getInitials.native.js.map +1 -1
- package/dist/cjs/Avatar/index.native.js.map +1 -1
- package/dist/cjs/Badge/index.native.js.map +1 -1
- package/dist/cjs/Button.native.js.map +1 -1
- package/dist/cjs/Card.native.js.map +1 -1
- package/dist/cjs/CardFooter.native.js.map +1 -1
- package/dist/cjs/CardHeader.native.js.map +1 -1
- package/dist/cjs/Carousel/index.native.js +3 -3
- 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.cjs +18 -9
- package/dist/cjs/ContextMenu/index.native.js +18 -9
- package/dist/cjs/ContextMenu/index.native.js.map +1 -1
- package/dist/cjs/CopyField/index.native.js.map +1 -1
- package/dist/cjs/Dialog.native.js.map +1 -1
- package/dist/cjs/DotIndicator/index.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/index.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/menuSettle.native.js.map +1 -1
- package/dist/cjs/ErrorBoundary/index.native.js.map +1 -1
- package/dist/cjs/Heading.native.js.map +1 -1
- package/dist/cjs/Kbd/index.native.js.map +1 -1
- package/dist/cjs/Kbd/keys.native.js.map +1 -1
- package/dist/cjs/Lightbox/MediaControl.native.js +1 -1
- package/dist/cjs/Lightbox/MediaControl.native.js.map +1 -1
- package/dist/cjs/Lightbox/index.gnome.native.js.map +1 -1
- package/dist/cjs/Lightbox/index.native.js +1 -1
- package/dist/cjs/Lightbox/shared.native.js.map +1 -1
- package/dist/cjs/Lightbox/useLightbox.native.js.map +1 -1
- package/dist/cjs/Material/index.native.js.map +1 -1
- package/dist/cjs/Meter/index.native.js +1 -1
- package/dist/cjs/Meter/index.native.js.map +1 -1
- package/dist/cjs/Meter/meter.native.js.map +1 -1
- package/dist/cjs/OverflowRow/index.native.js +1 -1
- package/dist/cjs/OverflowRow/index.native.js.map +1 -1
- package/dist/cjs/Pagination.cjs +0 -2
- package/dist/cjs/Pagination.native.js +2 -4
- 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/SchemeToggle/index.cjs +85 -0
- package/dist/cjs/SchemeToggle/index.native.js +95 -0
- package/dist/cjs/SchemeToggle/index.native.js.map +1 -0
- package/dist/cjs/ScrollView/revealFocusedField.native.js.map +1 -1
- package/dist/cjs/Separator/index.native.js.map +1 -1
- package/dist/cjs/Sheet.native.js.map +1 -1
- package/dist/cjs/SheetModal/SheetHeader.cjs +8 -1
- package/dist/cjs/SheetModal/SheetHeader.native.js +8 -1
- package/dist/cjs/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/cjs/SheetModal/SheetNavigation.native.js.map +1 -1
- package/dist/cjs/SheetModal/detents.native.js.map +1 -1
- package/dist/cjs/SheetModal/index.cjs +8 -3
- 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/ThemePlayground/index.cjs +1 -2
- package/dist/cjs/ThemePresetPicker/index.native.js +2 -2
- package/dist/cjs/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/cjs/Toast/index.native.js.map +1 -1
- package/dist/cjs/Toast/store.native.js.map +1 -1
- package/dist/cjs/Tooltip/nativePress.native.js.map +1 -1
- package/dist/cjs/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/cjs/TreeSelect/index.native.js +1 -1
- package/dist/cjs/TreeSelect/index.native.js.map +1 -1
- package/dist/cjs/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/cjs/Video/PlayerChrome.native.js.map +1 -1
- package/dist/cjs/Video/VideoFrame.native.js.map +1 -1
- package/dist/cjs/Video/types.native.js.map +1 -1
- package/dist/cjs/Wheel/index.native.js.map +1 -1
- package/dist/cjs/Wizard/index.native.js +2 -2
- package/dist/cjs/Wizard/index.native.js.map +1 -1
- package/dist/cjs/actions/ActionBar.native.js.map +1 -1
- package/dist/cjs/actions/DangerSection.native.js.map +1 -1
- package/dist/cjs/actions/DestructiveAction.native.js.map +1 -1
- package/dist/cjs/actions/HeaderActions.native.js +2 -2
- package/dist/cjs/actions/HeaderActions.native.js.map +1 -1
- package/dist/cjs/actions/StandardAction.cjs +131 -0
- package/dist/cjs/actions/StandardAction.native.js +136 -0
- package/dist/cjs/actions/StandardAction.native.js.map +1 -0
- package/dist/cjs/actions/devWarn.native.js.map +1 -1
- package/dist/cjs/actions/index.cjs +9 -2
- package/dist/cjs/actions/index.native.js +8 -1
- package/dist/cjs/actions/index.native.js.map +1 -1
- package/dist/cjs/actions/severity.native.js.map +1 -1
- package/dist/cjs/appShell/BottomAccessory.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.native.js +1 -1
- package/dist/cjs/appShell/TabBar.native.js.map +1 -1
- package/dist/cjs/appShell/appTile.native.js +1 -1
- package/dist/cjs/appShell/appTile.native.js.map +1 -1
- package/dist/cjs/appShell/bottomChrome.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.cjs +8 -20
- package/dist/cjs/charts/ChartDataView.native.js +11 -21
- package/dist/cjs/charts/ChartDataView.native.js.map +1 -1
- package/dist/cjs/charts/ChartSurface.native.js.map +1 -1
- package/dist/cjs/charts/LineChart.native.js.map +1 -1
- package/dist/cjs/charts/PieChart.native.js.map +1 -1
- package/dist/cjs/charts/Sparkline.native.js.map +1 -1
- package/dist/cjs/charts/accessibility.native.js.map +1 -1
- package/dist/cjs/charts/chartHeight.native.js.map +1 -1
- package/dist/cjs/charts/composeChart.native.js.map +1 -1
- package/dist/cjs/charts/index.native.js.map +1 -1
- package/dist/cjs/charts/math.native.js.map +1 -1
- package/dist/cjs/charts/series.native.js.map +1 -1
- package/dist/cjs/charts/svg.native.js.map +1 -1
- package/dist/cjs/charts/types.native.js.map +1 -1
- package/dist/cjs/charts/useChartTheme.native.js.map +1 -1
- package/dist/cjs/code/Code/index.native.js.map +1 -1
- package/dist/cjs/code/CodeBlock/index.native.js +7 -7
- package/dist/cjs/code/CodeBlock/index.native.js.map +1 -1
- package/dist/cjs/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/cjs/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
- package/dist/cjs/code/Highlighter/index.native.js.map +1 -1
- package/dist/cjs/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
- package/dist/cjs/code/Pre/index.native.js.map +1 -1
- package/dist/cjs/code/index.native.js +5 -5
- package/dist/cjs/code/index.native.js.map +1 -1
- package/dist/cjs/componentColors.native.js.map +1 -1
- package/dist/cjs/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/cjs/feedback/NotifyHost.native.js +2 -2
- package/dist/cjs/feedback/NotifyHost.native.js.map +1 -1
- package/dist/cjs/feedback/copy.native.js.map +1 -1
- package/dist/cjs/feedback/index.native.js.map +1 -1
- package/dist/cjs/feedback/notify.native.js.map +1 -1
- package/dist/cjs/feedback/route.native.js.map +1 -1
- package/dist/cjs/feedback/store.native.js.map +1 -1
- package/dist/cjs/formLayouts/FormLayouts.native.js +1 -1
- package/dist/cjs/formLayouts/FormLayouts.native.js.map +1 -1
- package/dist/cjs/formLayouts/PreferencePanel.native.js +2 -2
- package/dist/cjs/formLayouts/PreferencePanel.native.js.map +1 -1
- package/dist/cjs/formLayouts/index.native.js.map +1 -1
- package/dist/cjs/hooks/index.native.js +1 -1
- package/dist/cjs/hooks/index.native.js.map +1 -1
- package/dist/cjs/hooks/useClipboard.native.js.map +1 -1
- package/dist/cjs/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/cjs/hooks/useHoldCue.native.js.map +1 -1
- package/dist/cjs/icons/CheckRegular.native.js.map +1 -1
- package/dist/cjs/icons/MinusRegular.native.js.map +1 -1
- package/dist/cjs/icons/index.native.js.map +1 -1
- package/dist/cjs/icons/lucide.native.js.map +1 -1
- package/dist/cjs/icons/themed.native.js.map +1 -1
- package/dist/cjs/images/Image/ImageFrame.native.js +1 -1
- package/dist/cjs/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/cjs/images/Image/framing.native.js.map +1 -1
- package/dist/cjs/images/Image/index.native.js +1 -1
- package/dist/cjs/images/Image/mediaRadius.native.js.map +1 -1
- package/dist/cjs/images/Image/shared.native.js +1 -1
- package/dist/cjs/images/Image/shared.native.js.map +1 -1
- package/dist/cjs/images/Image/types.native.js.map +1 -1
- package/dist/cjs/images/index.native.js.map +1 -1
- package/dist/cjs/index.cjs +3 -0
- package/dist/cjs/index.native.js +38 -35
- 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.cjs +0 -1
- package/dist/cjs/layouts/EmptyState.native.js +0 -1
- package/dist/cjs/layouts/EmptyState.native.js.map +1 -1
- package/dist/cjs/layouts/IdentityPlate.native.js.map +1 -1
- package/dist/cjs/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/cjs/layouts/PageTemplates.native.js.map +1 -1
- package/dist/cjs/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/cjs/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/cjs/layouts/StatusDot.native.js.map +1 -1
- package/dist/cjs/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/cjs/layouts/attachments.native.js +1 -1
- package/dist/cjs/layouts/attachments.native.js.map +1 -1
- package/dist/cjs/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/cjs/layouts/index.native.js +3 -3
- package/dist/cjs/layouts/index.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +31 -6
- package/dist/cjs/layouts/page.native.js +34 -8
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/cjs/layouts/screenScroll.native.js.map +1 -1
- package/dist/cjs/layouts/shellSidebarSlot.native.js.map +1 -1
- package/dist/cjs/layouts/sidebar.native.js +1 -1
- package/dist/cjs/layouts/sidebar.native.js.map +1 -1
- package/dist/cjs/layouts/tags.native.js +2 -2
- package/dist/cjs/layouts/tags.native.js.map +1 -1
- package/dist/cjs/layouts/timeline.native.js +2 -2
- package/dist/cjs/layouts/timeline.native.js.map +1 -1
- package/dist/cjs/layouts/toolbar.native.js +1 -1
- package/dist/cjs/layouts/toolbar.native.js.map +1 -1
- package/dist/cjs/shared/actionScan.native.js.map +1 -1
- package/dist/cjs/shared/i18n.native.js.map +1 -1
- package/dist/cjs/shared/restoreRetries.native.js.map +1 -1
- package/dist/cjs/shared/t.native.js.map +1 -1
- package/dist/cjs/shared/textRidesText.native.js.map +1 -1
- package/dist/cjs/shared/useReturnFocusOnClose.native.js.map +1 -1
- package/dist/cjs/surfaces.native.js +1 -1
- package/dist/cjs/surfaces.native.js.map +1 -1
- package/dist/cjs/tamagui.native.js +1 -1
- package/dist/cjs/tamagui.native.js.map +1 -1
- package/dist/cjs/testSetup.native.js.map +1 -1
- package/dist/cjs/utils/setTinted.native.js.map +1 -1
- package/dist/cjs/utils/unwrapText.native.js.map +1 -1
- package/dist/cjs/views/Calendar.native.js +1 -1
- package/dist/cjs/views/Calendar.native.js.map +1 -1
- package/dist/cjs/views/Dashboard.native.js +2 -2
- package/dist/cjs/views/Dashboard.native.js.map +1 -1
- package/dist/cjs/views/Gantt.native.js +2 -2
- package/dist/cjs/views/Gantt.native.js.map +1 -1
- package/dist/cjs/views/GanttDateGrip.native.js.map +1 -1
- package/dist/cjs/views/ImageGrid.native.js +2 -2
- package/dist/cjs/views/ImageGrid.native.js.map +1 -1
- package/dist/cjs/views/Kanban.native.js +1 -1
- package/dist/cjs/views/List.native.js.map +1 -1
- package/dist/cjs/views/ListGroup.cjs +19 -25
- package/dist/cjs/views/ListGroup.native.js +19 -25
- package/dist/cjs/views/ListGroup.native.js.map +1 -1
- package/dist/cjs/views/ListRow.native.js.map +1 -1
- package/dist/cjs/views/Matrix.native.js +2 -2
- package/dist/cjs/views/Matrix.native.js.map +1 -1
- package/dist/cjs/views/ReportBuilder.cjs +3 -6
- package/dist/cjs/views/ReportBuilder.native.js +5 -8
- package/dist/cjs/views/ReportBuilder.native.js.map +1 -1
- package/dist/cjs/views/ShortcutCard.native.js.map +1 -1
- package/dist/cjs/views/TreeView.native.js.map +1 -1
- package/dist/cjs/views/calendarMath.native.js.map +1 -1
- package/dist/cjs/views/ganttIntervals.native.js.map +1 -1
- package/dist/cjs/views/ganttMath.native.js.map +1 -1
- package/dist/cjs/views/index.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/cjs/views/widgetChrome.native.js.map +1 -1
- package/dist/esm/ContextMenu/index.mjs +19 -10
- package/dist/esm/ContextMenu/index.mjs.map +1 -1
- package/dist/esm/ContextMenu/index.native.js +19 -10
- package/dist/esm/ContextMenu/index.native.js.map +1 -1
- package/dist/esm/Pagination.mjs +0 -2
- package/dist/esm/Pagination.mjs.map +1 -1
- package/dist/esm/Pagination.native.js +1 -3
- package/dist/esm/Pagination.native.js.map +1 -1
- package/dist/esm/SchemeToggle/index.mjs +59 -0
- package/dist/esm/SchemeToggle/index.mjs.map +1 -0
- package/dist/esm/SchemeToggle/index.native.js +66 -0
- package/dist/esm/SchemeToggle/index.native.js.map +1 -0
- package/dist/esm/SheetModal/SheetHeader.mjs +8 -1
- package/dist/esm/SheetModal/SheetHeader.mjs.map +1 -1
- package/dist/esm/SheetModal/SheetHeader.native.js +8 -1
- package/dist/esm/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/esm/SheetModal/index.mjs +9 -4
- package/dist/esm/SheetModal/index.mjs.map +1 -1
- package/dist/esm/ThemePlayground/index.mjs +1 -2
- package/dist/esm/ThemePlayground/index.mjs.map +1 -1
- package/dist/esm/actions/StandardAction.mjs +104 -0
- package/dist/esm/actions/StandardAction.mjs.map +1 -0
- package/dist/esm/actions/StandardAction.native.js +106 -0
- package/dist/esm/actions/StandardAction.native.js.map +1 -0
- 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/charts/ChartDataView.mjs +8 -20
- package/dist/esm/charts/ChartDataView.mjs.map +1 -1
- package/dist/esm/charts/ChartDataView.native.js +10 -20
- package/dist/esm/charts/ChartDataView.native.js.map +1 -1
- package/dist/esm/index.mjs +3 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +3 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/layouts/EmptyState.mjs +0 -1
- package/dist/esm/layouts/EmptyState.mjs.map +1 -1
- package/dist/esm/layouts/EmptyState.native.js +0 -1
- package/dist/esm/layouts/EmptyState.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +32 -7
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +33 -7
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/views/ListGroup.mjs +20 -26
- package/dist/esm/views/ListGroup.mjs.map +1 -1
- package/dist/esm/views/ListGroup.native.js +20 -26
- package/dist/esm/views/ListGroup.native.js.map +1 -1
- package/dist/esm/views/ReportBuilder.mjs +4 -7
- package/dist/esm/views/ReportBuilder.mjs.map +1 -1
- package/dist/esm/views/ReportBuilder.native.js +4 -7
- package/dist/esm/views/ReportBuilder.native.js.map +1 -1
- package/dist/jsx/ContextMenu/index.mjs +19 -10
- package/dist/jsx/ContextMenu/index.mjs.map +1 -1
- package/dist/jsx/ContextMenu/index.native.js +18 -9
- package/dist/jsx/ContextMenu/index.native.js.map +1 -1
- package/dist/jsx/Pagination.mjs +0 -2
- package/dist/jsx/Pagination.mjs.map +1 -1
- package/dist/jsx/Pagination.native.js +1 -3
- package/dist/jsx/Pagination.native.js.map +1 -1
- package/dist/jsx/SchemeToggle/index.mjs +59 -0
- package/dist/jsx/SchemeToggle/index.mjs.map +1 -0
- package/dist/jsx/SchemeToggle/index.native.js +95 -0
- package/dist/jsx/SchemeToggle/index.native.js.map +1 -0
- package/dist/jsx/SheetModal/SheetHeader.mjs +8 -1
- package/dist/jsx/SheetModal/SheetHeader.mjs.map +1 -1
- package/dist/jsx/SheetModal/SheetHeader.native.js +8 -1
- package/dist/jsx/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/jsx/SheetModal/index.mjs +9 -4
- package/dist/jsx/SheetModal/index.mjs.map +1 -1
- package/dist/jsx/ThemePlayground/index.mjs +1 -2
- package/dist/jsx/ThemePlayground/index.mjs.map +1 -1
- package/dist/jsx/actions/StandardAction.mjs +104 -0
- package/dist/jsx/actions/StandardAction.mjs.map +1 -0
- package/dist/jsx/actions/StandardAction.native.js +136 -0
- package/dist/jsx/actions/StandardAction.native.js.map +1 -0
- package/dist/jsx/actions/index.mjs +3 -1
- package/dist/jsx/actions/index.mjs.map +1 -1
- package/dist/jsx/actions/index.native.js +8 -1
- package/dist/jsx/actions/index.native.js.map +1 -1
- package/dist/jsx/charts/ChartDataView.mjs +8 -20
- package/dist/jsx/charts/ChartDataView.mjs.map +1 -1
- package/dist/jsx/charts/ChartDataView.native.js +10 -20
- package/dist/jsx/charts/ChartDataView.native.js.map +1 -1
- package/dist/jsx/index.js +3 -1
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +3 -1
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +3 -0
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/layouts/EmptyState.mjs +0 -1
- package/dist/jsx/layouts/EmptyState.mjs.map +1 -1
- package/dist/jsx/layouts/EmptyState.native.js +0 -1
- package/dist/jsx/layouts/EmptyState.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +32 -7
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +32 -6
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/views/ListGroup.mjs +20 -26
- package/dist/jsx/views/ListGroup.mjs.map +1 -1
- package/dist/jsx/views/ListGroup.native.js +19 -25
- package/dist/jsx/views/ListGroup.native.js.map +1 -1
- package/dist/jsx/views/ReportBuilder.mjs +4 -7
- package/dist/jsx/views/ReportBuilder.mjs.map +1 -1
- package/dist/jsx/views/ReportBuilder.native.js +3 -6
- package/dist/jsx/views/ReportBuilder.native.js.map +1 -1
- package/package.json +9 -9
- package/src/AlertDialogContent.stories.tsx +4 -3
- package/src/Button.stories.tsx +1 -1
- package/src/Card.stories.tsx +7 -6
- package/src/CardFooter.stories.tsx +3 -2
- package/src/CardHeader.stories.tsx +2 -1
- package/src/ContextMenu/ContextMenu.spec.tsx +4 -3
- package/src/ContextMenu/index.tsx +30 -17
- package/src/DialogContent.stories.tsx +9 -11
- package/src/DropdownMenu/DropdownMenu.stories.tsx +2 -1
- package/src/Pagination.spec.tsx +48 -15
- package/src/Pagination.tsx +1 -3
- package/src/Panel.stories.tsx +5 -6
- package/src/SchemeToggle/SchemeToggle.spec.tsx +64 -0
- package/src/SchemeToggle/index.tsx +77 -0
- package/src/SheetModal/SheetHeader.tsx +6 -2
- package/src/SheetModal/SheetModal.stories.spec.tsx +7 -3
- package/src/SheetModal/SheetModal.stories.tsx +14 -18
- package/src/SheetModal/index.tsx +8 -4
- package/src/SkipLink/SkipLink.stories.tsx +2 -2
- package/src/ThemePlayground/index.tsx +1 -2
- package/src/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/actions/ActionBar.stories.spec.tsx +5 -5
- package/src/actions/ActionBar.stories.tsx +8 -25
- package/src/actions/ActionButton.spec.tsx +125 -0
- package/src/actions/ActionButton.stories.tsx +113 -0
- package/src/actions/DestructiveAction.stories.tsx +4 -3
- package/src/actions/StandardAction.tsx +185 -0
- package/src/actions/index.ts +14 -0
- package/src/charts/ChartDataView.tsx +9 -14
- package/src/index.ts +3 -0
- package/src/layouts/EmptyState.stories.tsx +3 -2
- package/src/layouts/EmptyState.tsx +0 -1
- package/src/layouts/PageHeader.stories.tsx +88 -4
- package/src/layouts/PageTemplates.stories.tsx +6 -7
- package/src/layouts/ScreenToolbar.stories.tsx +3 -2
- package/src/layouts/navBar.spec.tsx +58 -0
- package/src/layouts/page.tsx +43 -9
- package/src/surfaces.spec.tsx +60 -0
- package/src/views/ListGroup.native-press.spec.tsx +66 -0
- package/src/views/ListGroup.spec.tsx +25 -6
- package/src/views/ListGroup.tsx +20 -30
- package/src/views/ReportBuilder.tsx +2 -10
- package/types/ContextMenu/index.d.ts +13 -3
- package/types/ContextMenu/index.d.ts.map +1 -1
- package/types/Pagination.d.ts.map +1 -1
- package/types/SchemeToggle/index.d.ts +20 -0
- package/types/SchemeToggle/index.d.ts.map +1 -0
- package/types/SheetModal/SheetHeader.d.ts +1 -1
- package/types/SheetModal/SheetHeader.d.ts.map +1 -1
- package/types/SheetModal/index.d.ts.map +1 -1
- package/types/ThemePlayground/index.d.ts.map +1 -1
- package/types/actions/StandardAction.d.ts +64 -0
- package/types/actions/StandardAction.d.ts.map +1 -0
- package/types/actions/index.d.ts +2 -0
- package/types/actions/index.d.ts.map +1 -1
- package/types/charts/ChartDataView.d.ts.map +1 -1
- package/types/index.d.ts +3 -0
- package/types/index.d.ts.map +1 -1
- package/types/layouts/EmptyState.d.ts.map +1 -1
- package/types/layouts/page.d.ts.map +1 -1
- package/types/views/ListGroup.d.ts +4 -1
- package/types/views/ListGroup.d.ts.map +1 -1
- package/types/views/ReportBuilder.d.ts.map +1 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LC-260 ICONS-OVER-WORDS: the house action vocabulary (its table lives in
|
|
3
|
+
* forms, `standardActions`). An action with an
|
|
4
|
+
* unambiguous standard symbol is drawn as that symbol (an LC-176 icon button),
|
|
5
|
+
* and its name lives in the accessible label and, on web, the tooltip. The
|
|
6
|
+
* overlay's one confirm is an accent-filled circle with a checkmark, the iOS 26
|
|
7
|
+
* sheet's Done. Words stay only where no symbol is unambiguous ("Publish to
|
|
8
|
+
* production", "Move").
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
IconButton,
|
|
13
|
+
standardActions,
|
|
14
|
+
type IconButtonProps,
|
|
15
|
+
type StandardActionKind,
|
|
16
|
+
} from "@multiplatform.one/forms";
|
|
17
|
+
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
18
|
+
import { createContext, useContext, type ReactNode } from "react";
|
|
19
|
+
import { XStack, isWeb } from "tamagui";
|
|
20
|
+
import { useTranslation } from "../shared/i18n";
|
|
21
|
+
import { SizableText } from "../Text";
|
|
22
|
+
import { Tooltip } from "../Tooltip";
|
|
23
|
+
|
|
24
|
+
export interface ActionButtonProps extends Omit<
|
|
25
|
+
IconButtonProps,
|
|
26
|
+
"icon" | "aria-label" | "action" | "plate"
|
|
27
|
+
> {
|
|
28
|
+
kind: StandardActionKind;
|
|
29
|
+
/**
|
|
30
|
+
* The accessible name when the action's own word is too thin ("Save
|
|
31
|
+
* profile", "Delete invoice"). Defaults to the localized action name.
|
|
32
|
+
*/
|
|
33
|
+
label?: string;
|
|
34
|
+
/** Overrides the table: a confirm that is not the overlay's primary. */
|
|
35
|
+
primary?: boolean;
|
|
36
|
+
/** A `submit` inside a Form submits it, as `<Button action="submit">` does. */
|
|
37
|
+
formAction?: "submit" | "reset";
|
|
38
|
+
/** Floats over imagery on LC-176's media plate (a preview's Replace and Remove). */
|
|
39
|
+
overMedia?: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* One standard action as its symbol. The primary confirm is the accent
|
|
44
|
+
* circle; every other action is a bare tinted glyph (LC-176).
|
|
45
|
+
*/
|
|
46
|
+
export function ActionButton({
|
|
47
|
+
kind,
|
|
48
|
+
label,
|
|
49
|
+
primary,
|
|
50
|
+
formAction,
|
|
51
|
+
overMedia,
|
|
52
|
+
...props
|
|
53
|
+
}: ActionButtonProps) {
|
|
54
|
+
const { t } = useTranslation();
|
|
55
|
+
const spec = standardActions[kind];
|
|
56
|
+
const name = label ?? t(spec.label);
|
|
57
|
+
const plated = primary ?? spec.primary;
|
|
58
|
+
const button = (
|
|
59
|
+
<IconButton
|
|
60
|
+
icon={spec.icon}
|
|
61
|
+
{...(plated
|
|
62
|
+
? { plate: "primary" as const }
|
|
63
|
+
: overMedia
|
|
64
|
+
? { plate: "media" as const }
|
|
65
|
+
: undefined)}
|
|
66
|
+
{...(formAction ? { action: formAction } : undefined)}
|
|
67
|
+
data-mp-action={kind}
|
|
68
|
+
{...props}
|
|
69
|
+
aria-label={name}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
// Touch has no hover: the name is the accessible label there. A disabled
|
|
73
|
+
// control takes no tooltip (DG-OVL-05).
|
|
74
|
+
if (!isWeb || props.disabled) return button;
|
|
75
|
+
return <Tooltip content={name}>{button}</Tooltip>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The id an overlay labels itself by. A SheetModal whose header is an
|
|
80
|
+
* OverlayHeader hands it down, so the sheet is named by its title alone and
|
|
81
|
+
* not by the header's buttons as well.
|
|
82
|
+
*/
|
|
83
|
+
export const OverlayTitleIdContext = createContext<string | undefined>(undefined);
|
|
84
|
+
|
|
85
|
+
export interface OverlayHeaderProps {
|
|
86
|
+
/** The overlay's title: a string, or the dialog's own `Dialog.Title`. */
|
|
87
|
+
title?: ReactNode;
|
|
88
|
+
/** Dismiss. With a confirm it is the leading ✕; alone it is the trailing ✕. */
|
|
89
|
+
onClose?: () => void;
|
|
90
|
+
/** `cancel` when dismissing discards an edit, `close` otherwise. */
|
|
91
|
+
closeKind?: "close" | "cancel";
|
|
92
|
+
/** The dismiss's accessible name when the caller localizes its own. */
|
|
93
|
+
closeLabel?: string;
|
|
94
|
+
/** The one confirm: the trailing accent ✓. */
|
|
95
|
+
onConfirm?: () => void;
|
|
96
|
+
confirmKind?: "confirm" | "done" | "save" | "submit";
|
|
97
|
+
/** The confirm's accessible name when its kind is too thin. */
|
|
98
|
+
confirmLabel?: string;
|
|
99
|
+
confirmDisabled?: boolean;
|
|
100
|
+
confirmDisabledReason?: string;
|
|
101
|
+
confirmLoading?: boolean;
|
|
102
|
+
/** Other header actions, between the title and the trailing control. */
|
|
103
|
+
actions?: ReactNode;
|
|
104
|
+
testID?: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The house sheet and dialog header (LC-260, the iOS 26 sheet bar): ✕ leading
|
|
109
|
+
* and an accent ✓ trailing around a centred title when the overlay confirms;
|
|
110
|
+
* the title leading and ✕ trailing when it only dismisses.
|
|
111
|
+
*/
|
|
112
|
+
export function OverlayHeader({
|
|
113
|
+
title,
|
|
114
|
+
onClose,
|
|
115
|
+
closeKind = "close",
|
|
116
|
+
closeLabel,
|
|
117
|
+
onConfirm,
|
|
118
|
+
confirmKind = "done",
|
|
119
|
+
confirmLabel,
|
|
120
|
+
confirmDisabled,
|
|
121
|
+
confirmDisabledReason,
|
|
122
|
+
confirmLoading,
|
|
123
|
+
actions,
|
|
124
|
+
testID,
|
|
125
|
+
}: OverlayHeaderProps) {
|
|
126
|
+
const { knobProps } = useResolvedKnobs();
|
|
127
|
+
const titleId = useContext(OverlayTitleIdContext);
|
|
128
|
+
const confirms = onConfirm != null;
|
|
129
|
+
const heading =
|
|
130
|
+
typeof title === "string" ? (
|
|
131
|
+
<SizableText
|
|
132
|
+
role="heading"
|
|
133
|
+
numberOfLines={1}
|
|
134
|
+
flexShrink={1}
|
|
135
|
+
textAlign={confirms ? "center" : "left"}
|
|
136
|
+
{...knobProps.heading}
|
|
137
|
+
>
|
|
138
|
+
{title}
|
|
139
|
+
</SizableText>
|
|
140
|
+
) : (
|
|
141
|
+
title
|
|
142
|
+
);
|
|
143
|
+
const close = onClose ? (
|
|
144
|
+
<ActionButton
|
|
145
|
+
kind={closeKind}
|
|
146
|
+
label={closeLabel}
|
|
147
|
+
onPress={onClose}
|
|
148
|
+
testID={testID ? `${testID}-close` : undefined}
|
|
149
|
+
/>
|
|
150
|
+
) : null;
|
|
151
|
+
const confirm = confirms ? (
|
|
152
|
+
<ActionButton
|
|
153
|
+
kind={confirmKind}
|
|
154
|
+
onPress={onConfirm}
|
|
155
|
+
label={confirmLabel}
|
|
156
|
+
loading={confirmLoading}
|
|
157
|
+
disabled={confirmDisabled}
|
|
158
|
+
disabledReason={confirmDisabledReason}
|
|
159
|
+
disabledReasonPlacement="inline"
|
|
160
|
+
testID={testID ? `${testID}-confirm` : undefined}
|
|
161
|
+
/>
|
|
162
|
+
) : null;
|
|
163
|
+
return (
|
|
164
|
+
<XStack
|
|
165
|
+
alignItems="center"
|
|
166
|
+
width="100%"
|
|
167
|
+
{...knobProps.gapSm}
|
|
168
|
+
data-mp-overlay-header={confirms ? "confirm" : "dismiss"}
|
|
169
|
+
testID={testID}
|
|
170
|
+
>
|
|
171
|
+
{confirms ? close : null}
|
|
172
|
+
<XStack
|
|
173
|
+
id={titleId}
|
|
174
|
+
flex={1}
|
|
175
|
+
minWidth={0}
|
|
176
|
+
alignItems="center"
|
|
177
|
+
justifyContent={confirms ? "center" : "flex-start"}
|
|
178
|
+
>
|
|
179
|
+
{heading}
|
|
180
|
+
</XStack>
|
|
181
|
+
{actions}
|
|
182
|
+
{confirms ? confirm : close}
|
|
183
|
+
</XStack>
|
|
184
|
+
);
|
|
185
|
+
}
|
package/src/actions/index.ts
CHANGED
|
@@ -32,3 +32,17 @@ export {
|
|
|
32
32
|
type ActionDevWarnCode,
|
|
33
33
|
type ActionDevWarnDetail,
|
|
34
34
|
} from "./devWarn";
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
ActionButton,
|
|
38
|
+
OverlayHeader,
|
|
39
|
+
OverlayTitleIdContext,
|
|
40
|
+
type ActionButtonProps,
|
|
41
|
+
type OverlayHeaderProps,
|
|
42
|
+
} from "./StandardAction";
|
|
43
|
+
export {
|
|
44
|
+
standardActions,
|
|
45
|
+
standardActionWords,
|
|
46
|
+
type StandardAction,
|
|
47
|
+
type StandardActionKind,
|
|
48
|
+
} from "@multiplatform.one/forms";
|
|
@@ -3,6 +3,7 @@ import { isWeb } from "@multiplatform.one/platform";
|
|
|
3
3
|
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
4
4
|
import { createContext, useContext, useId, useState, type ReactNode } from "react";
|
|
5
5
|
import { Paragraph, XStack, YStack } from "tamagui";
|
|
6
|
+
import { OverlayHeader } from "../actions/StandardAction";
|
|
6
7
|
import { Dialog } from "../Dialog";
|
|
7
8
|
import { ScrollView } from "../ScrollView";
|
|
8
9
|
import { sectionHeading } from "../componentColors";
|
|
@@ -65,9 +66,14 @@ export function ChartDataView({ data, title, valueFormatter, children }: ChartDa
|
|
|
65
66
|
maxHeight="80%"
|
|
66
67
|
{...chartWebProps({ "data-mpo-chart-data-panel": id })}
|
|
67
68
|
>
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
<OverlayHeader
|
|
70
|
+
title={
|
|
71
|
+
<Dialog.Title {...sectionHeading} {...knobProps.heading}>
|
|
72
|
+
{title ? `${title}: ${t("data")}` : t("Chart data")}
|
|
73
|
+
</Dialog.Title>
|
|
74
|
+
}
|
|
75
|
+
onClose={() => setOpen(false)}
|
|
76
|
+
/>
|
|
71
77
|
<Dialog.Description
|
|
72
78
|
{...knobProps.body}
|
|
73
79
|
>{`${normalized.length} ${t("data points")}`}</Dialog.Description>
|
|
@@ -109,17 +115,6 @@ export function ChartDataView({ data, title, valueFormatter, children }: ChartDa
|
|
|
109
115
|
))}
|
|
110
116
|
</YStack>
|
|
111
117
|
</ScrollView>
|
|
112
|
-
<XStack justifyContent="flex-end">
|
|
113
|
-
<Dialog.Close asChild aria-label={t("Close")}>
|
|
114
|
-
<Button
|
|
115
|
-
aria-label={t("Close")}
|
|
116
|
-
{...(!isWeb ? { accessibilityLabel: t("Close") } : {})}
|
|
117
|
-
{...chartWebProps({ "data-mpo-chart-data-close": id })}
|
|
118
|
-
>
|
|
119
|
-
{t("Close")}
|
|
120
|
-
</Button>
|
|
121
|
-
</Dialog.Close>
|
|
122
|
-
</XStack>
|
|
123
118
|
</DialogContent>
|
|
124
119
|
</Dialog.Portal>
|
|
125
120
|
</Dialog>
|
package/src/index.ts
CHANGED
|
@@ -151,6 +151,8 @@ export type { SpinnerProps } from "@multiplatform.one/forms";
|
|
|
151
151
|
// longer exports the bare name; raw stays reachable as TamaguiButton.
|
|
152
152
|
export { Button } from "./Button";
|
|
153
153
|
export type { ButtonProps } from "./Button";
|
|
154
|
+
export { IconButton } from "@multiplatform.one/forms";
|
|
155
|
+
export type { IconButtonProps } from "@multiplatform.one/forms";
|
|
154
156
|
|
|
155
157
|
// Shadow tamagui Text and Heading with the house versions. ./tamagui.ts says
|
|
156
158
|
// so in its own words -- "Bare Text/SizableText/Paragraph/Anchor are the house
|
|
@@ -213,4 +215,5 @@ declare module "@tamagui/web" {
|
|
|
213
215
|
}
|
|
214
216
|
}
|
|
215
217
|
|
|
218
|
+
export * from "./SchemeToggle";
|
|
216
219
|
export * from "./ThemePresetPicker";
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from "@phosphor-icons/react";
|
|
12
12
|
import type { ReactNode } from "react";
|
|
13
13
|
import { YStack } from "tamagui";
|
|
14
|
+
import { ActionButton } from "../actions";
|
|
14
15
|
import { EmptyState } from "./EmptyState";
|
|
15
16
|
|
|
16
17
|
function PageCanvas({ children }: { children: ReactNode }) {
|
|
@@ -68,7 +69,7 @@ export const TitleOnly: Story = {
|
|
|
68
69
|
export const NoIcon: Story = {
|
|
69
70
|
render: (args) => (
|
|
70
71
|
<PageCanvas>
|
|
71
|
-
<EmptyState {...args} action={<
|
|
72
|
+
<EmptyState {...args} action={<ActionButton kind="retry" primary />} />
|
|
72
73
|
</PageCanvas>
|
|
73
74
|
),
|
|
74
75
|
};
|
|
@@ -162,7 +163,7 @@ export const Error: Story = {
|
|
|
162
163
|
{...args}
|
|
163
164
|
intent="error"
|
|
164
165
|
icon={<WarningCircleIcon size={40} weight="fill" />}
|
|
165
|
-
action={<
|
|
166
|
+
action={<ActionButton kind="retry" primary />}
|
|
166
167
|
/>
|
|
167
168
|
</PageCanvas>
|
|
168
169
|
),
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
// Catalog Button (G-15 story honesty / LC-18): raw tamagui buttons ignored
|
|
3
3
|
// the knobs and pinned a non-house radius (UX-P06).
|
|
4
|
-
import { Button } from "@multiplatform.one/forms";
|
|
4
|
+
import { Button, IconButton, Progress } from "@multiplatform.one/forms";
|
|
5
|
+
import {
|
|
6
|
+
CopyIcon,
|
|
7
|
+
DotsThreeIcon,
|
|
8
|
+
MagnifyingGlassIcon,
|
|
9
|
+
PlusIcon,
|
|
10
|
+
TrashIcon,
|
|
11
|
+
} from "@phosphor-icons/react";
|
|
5
12
|
import { Preset } from "@multiplatform.one/theme";
|
|
6
13
|
import type { ReactNode } from "react";
|
|
7
|
-
import { YStack } from "tamagui";
|
|
14
|
+
import { XStack, YStack } from "tamagui";
|
|
15
|
+
import { Avatar } from "../Avatar";
|
|
16
|
+
import { Card } from "../Card";
|
|
8
17
|
import { Tabs } from "../Tabs";
|
|
9
|
-
import { PageHeader, Screen } from "./page";
|
|
10
|
-
import { Paragraph } from "../Text";
|
|
18
|
+
import { PageBackButton, PageHeader, Screen, ScreenToolbar } from "./page";
|
|
19
|
+
import { Paragraph, SizableText } from "../Text";
|
|
11
20
|
|
|
12
21
|
const meta: Meta<typeof PageHeader> = {
|
|
13
22
|
title: "Components/PageHeader",
|
|
@@ -158,3 +167,78 @@ export const LongTitleNarrow: Story = {
|
|
|
158
167
|
</YStack>
|
|
159
168
|
),
|
|
160
169
|
};
|
|
170
|
+
|
|
171
|
+
// FZ-8020 LC-176: the SHC console Nodes screen with every icon-button
|
|
172
|
+
// context, drawn by the platform with no use-site paint. Its bar (back,
|
|
173
|
+
// search, add) takes the accent, on Liquid Glass on iOS 26; content actions
|
|
174
|
+
// (the inline copy, the card's overflow) are bold glyphs in the text colour;
|
|
175
|
+
// the delete keeps its intent ink; the tile's favourite rides the media plate.
|
|
176
|
+
function Meter({ label, value, detail }: { label: string; value: number; detail: string }) {
|
|
177
|
+
return (
|
|
178
|
+
<YStack gap="$2">
|
|
179
|
+
<XStack justifyContent="space-between">
|
|
180
|
+
<SizableText color="$color11">{label}</SizableText>
|
|
181
|
+
<SizableText>{detail}</SizableText>
|
|
182
|
+
</XStack>
|
|
183
|
+
<Progress value={value} />
|
|
184
|
+
</YStack>
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function NodesScreen() {
|
|
189
|
+
return (
|
|
190
|
+
<Screen
|
|
191
|
+
scroll={false}
|
|
192
|
+
topBar={
|
|
193
|
+
<ScreenToolbar
|
|
194
|
+
leading={
|
|
195
|
+
<>
|
|
196
|
+
<PageBackButton />
|
|
197
|
+
<SizableText size="$5">corp</SizableText>
|
|
198
|
+
<SizableText size="$5" color="$color11">
|
|
199
|
+
All
|
|
200
|
+
</SizableText>
|
|
201
|
+
</>
|
|
202
|
+
}
|
|
203
|
+
trailing={
|
|
204
|
+
<>
|
|
205
|
+
<SizableText size="$5">52</SizableText>
|
|
206
|
+
<IconButton icon={MagnifyingGlassIcon} aria-label="Search" />
|
|
207
|
+
<Avatar name="Admin" size="$3" />
|
|
208
|
+
</>
|
|
209
|
+
}
|
|
210
|
+
/>
|
|
211
|
+
}
|
|
212
|
+
>
|
|
213
|
+
<PageHeader
|
|
214
|
+
title="Nodes"
|
|
215
|
+
divider={false}
|
|
216
|
+
actions={<IconButton icon={PlusIcon} aria-label="Add node" edge="end" />}
|
|
217
|
+
/>
|
|
218
|
+
<XStack alignItems="center">
|
|
219
|
+
<SizableText fontFamily="$mono" color="$color11">
|
|
220
|
+
shc node join
|
|
221
|
+
</SizableText>
|
|
222
|
+
<IconButton inline icon={CopyIcon} aria-label="Copy" />
|
|
223
|
+
</XStack>
|
|
224
|
+
<Card gap="$4">
|
|
225
|
+
<XStack justifyContent="space-between" alignItems="center">
|
|
226
|
+
<SizableText size="$6" fontWeight="600">
|
|
227
|
+
incus01
|
|
228
|
+
</SizableText>
|
|
229
|
+
<XStack alignItems="center">
|
|
230
|
+
<IconButton icon={DotsThreeIcon} aria-label="More for incus01" />
|
|
231
|
+
<IconButton error icon={TrashIcon} aria-label="Remove incus01" />
|
|
232
|
+
</XStack>
|
|
233
|
+
</XStack>
|
|
234
|
+
<SizableText color="$color11">10.64.96.1:4003</SizableText>
|
|
235
|
+
<Meter label="CPU" value={12} detail="2.83/24 cores 12%" />
|
|
236
|
+
<Meter label="Mem" value={41} detail="25.3/61.9 GiB 41%" />
|
|
237
|
+
</Card>
|
|
238
|
+
</Screen>
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export const IconButtonByContext: Story = {
|
|
243
|
+
render: () => <NodesScreen />,
|
|
244
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
// Catalog Button (G-15 story honesty / LC-18, UX-P06).
|
|
3
3
|
import { Button } from "@multiplatform.one/forms";
|
|
4
|
-
import { ChartBarIcon,
|
|
4
|
+
import { ChartBarIcon, ListBulletsIcon } from "@phosphor-icons/react";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { XStack, YStack } from "tamagui";
|
|
7
|
+
import { ActionButton } from "../actions/StandardAction";
|
|
7
8
|
import { PageBackButton, PageHeader, PageMenuButton, PageSection } from "./page";
|
|
8
9
|
import { DetailPageLayout, ListPageLayout, SettingsPageLayout } from "./PageTemplates";
|
|
9
10
|
import { ViewSwitcher } from "./ViewSwitcher";
|
|
@@ -73,7 +74,7 @@ export const DetailPage: StoryObj<typeof DetailPageLayout> = {
|
|
|
73
74
|
title="Bulbasaur"
|
|
74
75
|
subtitle="Pokemon · #0001"
|
|
75
76
|
toolbarLeading={<Button>Back</Button>}
|
|
76
|
-
toolbarTrailing={<
|
|
77
|
+
toolbarTrailing={<ActionButton kind="edit" />}
|
|
77
78
|
aside={<ContentBox label="Aside (meta / timeline) ⅓" minHeight={240} />}
|
|
78
79
|
>
|
|
79
80
|
<ContentBox label="Main content ⅔" minHeight={240} />
|
|
@@ -121,10 +122,8 @@ function PhoneListActions() {
|
|
|
121
122
|
<XStack flex={1} flexWrap="wrap" gap="$2" alignItems="center" justifyContent="space-between">
|
|
122
123
|
<ViewSwitcher views={phoneViews} currentView={view} onViewChange={setView} />
|
|
123
124
|
<XStack flexGrow={1} gap="$2" alignItems="center" justifyContent="flex-end">
|
|
124
|
-
<
|
|
125
|
-
<
|
|
126
|
-
Add
|
|
127
|
-
</Button>
|
|
125
|
+
<ActionButton kind="more" label="More actions" />
|
|
126
|
+
<ActionButton kind="add" />
|
|
128
127
|
</XStack>
|
|
129
128
|
</XStack>
|
|
130
129
|
);
|
|
@@ -156,7 +155,7 @@ export const DetailPageOnPhone: StoryObj<typeof DetailPageLayout> = {
|
|
|
156
155
|
toolbarLeading={<PageBackButton label="Pokemon" />}
|
|
157
156
|
toolbarTrailing={
|
|
158
157
|
<>
|
|
159
|
-
<
|
|
158
|
+
<ActionButton kind="save" />
|
|
160
159
|
<PageMenuButton edge="end" />
|
|
161
160
|
</>
|
|
162
161
|
}
|
|
@@ -3,6 +3,7 @@ import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
|
3
3
|
// non-house radius and ignored every knob, poisoning the knob probes.
|
|
4
4
|
import { Button } from "@multiplatform.one/forms";
|
|
5
5
|
import { YStack } from "tamagui";
|
|
6
|
+
import { ActionButton } from "../actions/StandardAction";
|
|
6
7
|
import { ScreenToolbar } from "./page";
|
|
7
8
|
|
|
8
9
|
const meta: Meta<typeof ScreenToolbar> = {
|
|
@@ -29,8 +30,8 @@ export const Default: Story = {
|
|
|
29
30
|
leading={<Button>Back</Button>}
|
|
30
31
|
trailing={
|
|
31
32
|
<>
|
|
32
|
-
<
|
|
33
|
-
<
|
|
33
|
+
<ActionButton kind="cancel" />
|
|
34
|
+
<ActionButton kind="save" />
|
|
34
35
|
</>
|
|
35
36
|
}
|
|
36
37
|
/>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* jsdom has no layout: the large title's geometry is stubbed through
|
|
9
9
|
* getBoundingClientRect, and scrolling sets scrollTop on the scroll element.
|
|
10
10
|
*/
|
|
11
|
+
import { ICON_BUTTON_GLYPH_PX } from "@multiplatform.one/forms";
|
|
11
12
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
12
13
|
import { Preset, useIdentityInkOnSurface } from "@multiplatform.one/theme";
|
|
13
14
|
import { SlidersHorizontalIcon } from "@phosphor-icons/react";
|
|
@@ -161,3 +162,60 @@ describe("top bar controls (LC-145)", () => {
|
|
|
161
162
|
expect(screen.getByLabelText("Knobs")).toBeTruthy();
|
|
162
163
|
});
|
|
163
164
|
});
|
|
165
|
+
|
|
166
|
+
describe("bar glyphs carry their weight (LC-176)", () => {
|
|
167
|
+
it("back's caret takes the bar glyph size beside its label and pulls to the title edge", () => {
|
|
168
|
+
renderWithProviders(
|
|
169
|
+
<Screen topBar={<ScreenToolbar leading={<PageBackButton label="Components" />} />}>
|
|
170
|
+
<PageHeader title="Nodes" />
|
|
171
|
+
</Screen>,
|
|
172
|
+
);
|
|
173
|
+
const back = document.querySelector('[data-top-bar-control="back"]')!;
|
|
174
|
+
const caret = back.querySelector("svg")!;
|
|
175
|
+
const size = Number(caret.getAttribute("width"));
|
|
176
|
+
expect(size).toBeGreaterThanOrEqual(ICON_BUTTON_GLYPH_PX);
|
|
177
|
+
const pull = Math.round(size * (72 / 256));
|
|
178
|
+
const wrapper = caret.parentElement!;
|
|
179
|
+
expect(
|
|
180
|
+
Array.from(wrapper.classList).some(
|
|
181
|
+
(c) => c.includes(`-${pull}px`) || c.includes(`${pull}px`),
|
|
182
|
+
),
|
|
183
|
+
).toBe(true);
|
|
184
|
+
});
|
|
185
|
+
it("the bar's trailing icon buttons and a page header's actions are one group", () => {
|
|
186
|
+
renderWithProviders(
|
|
187
|
+
<Screen
|
|
188
|
+
topBar={
|
|
189
|
+
<ScreenToolbar
|
|
190
|
+
leading={<PageBackButton />}
|
|
191
|
+
trailing={
|
|
192
|
+
<>
|
|
193
|
+
<PageBarButton icon={SlidersHorizontalIcon} aria-label="Filter" />
|
|
194
|
+
<PageMenuButton edge="end" />
|
|
195
|
+
</>
|
|
196
|
+
}
|
|
197
|
+
/>
|
|
198
|
+
}
|
|
199
|
+
>
|
|
200
|
+
<PageHeader
|
|
201
|
+
title="Nodes"
|
|
202
|
+
actions={
|
|
203
|
+
<>
|
|
204
|
+
<PageBarButton icon={SlidersHorizontalIcon} aria-label="Sort" />
|
|
205
|
+
<PageBarButton icon={SlidersHorizontalIcon} aria-label="Share" />
|
|
206
|
+
</>
|
|
207
|
+
}
|
|
208
|
+
/>
|
|
209
|
+
</Screen>,
|
|
210
|
+
);
|
|
211
|
+
for (const label of ["Filter", "Sort"]) {
|
|
212
|
+
const group = screen.getByLabelText(label).closest("[data-mp-icon-button-group]");
|
|
213
|
+
// No glass module under jsdom: the bar's group is a bare row.
|
|
214
|
+
expect(group?.getAttribute("data-mp-icon-button-group")).toBe("bar");
|
|
215
|
+
}
|
|
216
|
+
expect(screen.getByLabelText("More actions").closest("[data-mp-icon-button-group]")).toBe(
|
|
217
|
+
screen.getByLabelText("Filter").closest("[data-mp-icon-button-group]"),
|
|
218
|
+
);
|
|
219
|
+
expect(screen.getByLabelText("Back").closest("[data-mp-icon-button-group]")).toBeNull();
|
|
220
|
+
});
|
|
221
|
+
});
|
package/src/layouts/page.tsx
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
useResolvedKnobs,
|
|
30
30
|
type PageTitleScale,
|
|
31
31
|
} from "@multiplatform.one/theme";
|
|
32
|
-
import { Button, type ButtonProps } from "@multiplatform.one/forms";
|
|
32
|
+
import { Button, IconButtonGroup, type ButtonProps } from "@multiplatform.one/forms";
|
|
33
33
|
import { CaretLeftIcon, CaretRightIcon, DotsThreeIcon } from "@phosphor-icons/react";
|
|
34
34
|
import { useState, type ReactNode } from "react";
|
|
35
35
|
import type { LayoutChangeEvent, NativeScrollEvent, NativeSyntheticEvent } from "react-native";
|
|
@@ -376,7 +376,18 @@ export function PageHeader({
|
|
|
376
376
|
data-page-header-actions=""
|
|
377
377
|
>
|
|
378
378
|
{/* LC-153: page-head actions are a bar; neutral buttons go plain. */}
|
|
379
|
-
<Surface bar>
|
|
379
|
+
<Surface bar>
|
|
380
|
+
<IconButtonGroup
|
|
381
|
+
{...knobProps.gap}
|
|
382
|
+
justifyContent="flex-end"
|
|
383
|
+
flexWrap="wrap"
|
|
384
|
+
flexGrow={1}
|
|
385
|
+
flexShrink={1}
|
|
386
|
+
minWidth={0}
|
|
387
|
+
>
|
|
388
|
+
{actions}
|
|
389
|
+
</IconButtonGroup>
|
|
390
|
+
</Surface>
|
|
380
391
|
</XStack>
|
|
381
392
|
) : null}
|
|
382
393
|
</XStack>
|
|
@@ -558,16 +569,15 @@ function InlineToolbar({ leading, trailing, children, ...rest }: ScreenToolbarPr
|
|
|
558
569
|
{leading}
|
|
559
570
|
</XStack>
|
|
560
571
|
{children}
|
|
561
|
-
<
|
|
572
|
+
<IconButtonGroup
|
|
562
573
|
{...knobProps.gap}
|
|
563
|
-
alignItems="center"
|
|
564
574
|
flexWrap="wrap"
|
|
565
575
|
flexShrink={1}
|
|
566
576
|
minWidth={0}
|
|
567
577
|
justifyContent="flex-end"
|
|
568
578
|
>
|
|
569
579
|
{trailing}
|
|
570
|
-
</
|
|
580
|
+
</IconButtonGroup>
|
|
571
581
|
</XStack>
|
|
572
582
|
</Surface>
|
|
573
583
|
);
|
|
@@ -638,16 +648,15 @@ function PinnedTopBar({
|
|
|
638
648
|
{/* Pushes the actions to the trailing edge (LC-102: no space-between)
|
|
639
649
|
without widening the leading group the bar title clears. */}
|
|
640
650
|
<XStack flexGrow={1} />
|
|
641
|
-
<
|
|
651
|
+
<IconButtonGroup
|
|
642
652
|
{...knobProps.gap}
|
|
643
|
-
alignItems="center"
|
|
644
653
|
flexShrink={1}
|
|
645
654
|
minWidth={0}
|
|
646
655
|
justifyContent="flex-end"
|
|
647
656
|
onLayout={measureSide("trailing")}
|
|
648
657
|
>
|
|
649
658
|
{trailing}
|
|
650
|
-
</
|
|
659
|
+
</IconButtonGroup>
|
|
651
660
|
{title ? (
|
|
652
661
|
<XStack
|
|
653
662
|
position="absolute"
|
|
@@ -688,6 +697,31 @@ function useTopBarControl() {
|
|
|
688
697
|
return { size: knobProps.sizeToken, chromeless: true, accentInk: true } as const;
|
|
689
698
|
}
|
|
690
699
|
|
|
700
|
+
// Phosphor's caret path starts 72 units into its 256 grid; back pulls by that
|
|
701
|
+
// so the caret's point, not its box, lands on the title's leading edge.
|
|
702
|
+
const CARET_OPTICAL_INSET = 72 / 256;
|
|
703
|
+
|
|
704
|
+
function backCaret(Caret: typeof CaretLeftIcon) {
|
|
705
|
+
return function BackCaret({
|
|
706
|
+
size = 22,
|
|
707
|
+
color,
|
|
708
|
+
weight,
|
|
709
|
+
}: {
|
|
710
|
+
size?: number;
|
|
711
|
+
color?: string;
|
|
712
|
+
weight?: "regular" | "bold";
|
|
713
|
+
}) {
|
|
714
|
+
return (
|
|
715
|
+
<XStack marginInlineStart={-Math.round(size * CARET_OPTICAL_INSET)}>
|
|
716
|
+
<Caret size={size} color={color} weight={weight} />
|
|
717
|
+
</XStack>
|
|
718
|
+
);
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
const BackCaretLeft = backCaret(CaretLeftIcon);
|
|
723
|
+
const BackCaretRight = backCaret(CaretRightIcon);
|
|
724
|
+
|
|
691
725
|
export interface PageBackButtonProps extends Omit<ButtonProps, "children"> {
|
|
692
726
|
/** Where back goes, shown beside the caret (the list's name). */
|
|
693
727
|
label?: string;
|
|
@@ -707,7 +741,7 @@ export function PageBackButton({ label, ...props }: PageBackButtonProps) {
|
|
|
707
741
|
edge="start"
|
|
708
742
|
flexShrink={1}
|
|
709
743
|
minWidth={0}
|
|
710
|
-
icon={rtl ?
|
|
744
|
+
icon={rtl ? BackCaretRight : BackCaretLeft}
|
|
711
745
|
aria-label={label ? undefined : t("Back")}
|
|
712
746
|
data-top-bar-control="back"
|
|
713
747
|
{...props}
|