@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
|
@@ -23,10 +23,10 @@ import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
|
23
23
|
import { useRef, useState } from "react";
|
|
24
24
|
import { Platform, useWindowDimensions, type LayoutChangeEvent } from "react-native";
|
|
25
25
|
import { YStack } from "tamagui";
|
|
26
|
-
import { ActionBar } from "../actions/ActionBar";
|
|
27
26
|
import { DangerSection } from "../actions/DangerSection";
|
|
28
27
|
import { DestructiveAction } from "../actions/DestructiveAction";
|
|
29
28
|
import { HeaderActions } from "../actions/HeaderActions";
|
|
29
|
+
import { OverlayHeader } from "../actions/StandardAction";
|
|
30
30
|
import { SheetModal } from "./index";
|
|
31
31
|
import { Paragraph, SizableText } from "../Text";
|
|
32
32
|
|
|
@@ -51,7 +51,15 @@ function Harness({
|
|
|
51
51
|
onOpenChange={setOpen}
|
|
52
52
|
scrollable={scrollable}
|
|
53
53
|
{...(snapPoint === undefined ? {} : { snapPoint })}
|
|
54
|
-
header={
|
|
54
|
+
header={
|
|
55
|
+
<OverlayHeader
|
|
56
|
+
title="Move to project"
|
|
57
|
+
closeKind="cancel"
|
|
58
|
+
onClose={() => setOpen(false)}
|
|
59
|
+
onConfirm={() => setOpen(false)}
|
|
60
|
+
confirmLabel="Move"
|
|
61
|
+
/>
|
|
62
|
+
}
|
|
55
63
|
>
|
|
56
64
|
{scrollable ? (
|
|
57
65
|
<YStack gap="$2">
|
|
@@ -60,22 +68,10 @@ function Harness({
|
|
|
60
68
|
))}
|
|
61
69
|
</YStack>
|
|
62
70
|
) : (
|
|
63
|
-
<YStack gap="$
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<ActionBar
|
|
68
|
-
cancel={
|
|
69
|
-
<Button chromeless onPress={() => setOpen(false)}>
|
|
70
|
-
Cancel
|
|
71
|
-
</Button>
|
|
72
|
-
}
|
|
73
|
-
primary={
|
|
74
|
-
<Button accent onPress={() => setOpen(false)}>
|
|
75
|
-
Move
|
|
76
|
-
</Button>
|
|
77
|
-
}
|
|
78
|
-
/>
|
|
71
|
+
<YStack gap="$2">
|
|
72
|
+
{["Inbox", "Launch", "Backlog"].map((project) => (
|
|
73
|
+
<Paragraph key={project}>{project}</Paragraph>
|
|
74
|
+
))}
|
|
79
75
|
</YStack>
|
|
80
76
|
)}
|
|
81
77
|
</SheetModal>
|
package/src/SheetModal/index.tsx
CHANGED
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
import { transitionProps, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
13
13
|
import { OverlayStackProvider, useOverlayZIndex } from "@multiplatform.one/forms";
|
|
14
|
-
import { useEffect, useId, useRef, type ReactNode } from "react";
|
|
14
|
+
import { isValidElement, useEffect, useId, useRef, type ReactNode } from "react";
|
|
15
15
|
import { isWeb, Sheet, View, useWindowDimensions } from "tamagui";
|
|
16
|
+
import { OverlayHeader, OverlayTitleIdContext } from "../actions/StandardAction";
|
|
16
17
|
import { DialogRegionContext, SheetFrame } from "../surfaces";
|
|
17
18
|
import { largeDetentRatio, resolveWebSnap } from "./detents";
|
|
18
19
|
import { SheetHeader } from "./SheetHeader";
|
|
@@ -92,12 +93,13 @@ export function SheetModal({
|
|
|
92
93
|
fill = false,
|
|
93
94
|
}: SheetModalProps) {
|
|
94
95
|
const titleId = useId();
|
|
96
|
+
const overlayHeader = isValidElement(headerContent) && headerContent.type === OverlayHeader;
|
|
95
97
|
const header =
|
|
96
98
|
headerContent || headerActions ? (
|
|
97
99
|
<SheetHeader
|
|
98
100
|
header={headerContent}
|
|
99
101
|
actions={headerActions}
|
|
100
|
-
titleId={headerActions ? titleId : undefined}
|
|
102
|
+
titleId={headerActions && !overlayHeader ? titleId : undefined}
|
|
101
103
|
/>
|
|
102
104
|
) : null;
|
|
103
105
|
const snap = resolveWebSnap({ snapPoint, fill });
|
|
@@ -163,10 +165,12 @@ export function SheetModal({
|
|
|
163
165
|
<>
|
|
164
166
|
{header ? (
|
|
165
167
|
<View
|
|
166
|
-
id={headerActions ? undefined : titleId}
|
|
168
|
+
id={overlayHeader || headerActions ? undefined : titleId}
|
|
167
169
|
{...(fill ? nonShrinking : null)}
|
|
168
170
|
>
|
|
169
|
-
{
|
|
171
|
+
<OverlayTitleIdContext.Provider value={overlayHeader ? titleId : undefined}>
|
|
172
|
+
{header}
|
|
173
|
+
</OverlayTitleIdContext.Provider>
|
|
170
174
|
</View>
|
|
171
175
|
) : null}
|
|
172
176
|
{fill ? (
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
import { Button, Input } from "@multiplatform.one/forms";
|
|
3
3
|
import { XStack, YStack, View } from "tamagui";
|
|
4
|
+
import { ActionButton } from "../actions/StandardAction";
|
|
4
5
|
import { SkipLink } from "./index";
|
|
5
6
|
import { SizableText } from "../Text";
|
|
6
7
|
|
|
@@ -39,7 +40,6 @@ export const Default: Story = {
|
|
|
39
40
|
</SizableText>
|
|
40
41
|
<XStack gap="$2" alignItems="center" flexWrap="wrap">
|
|
41
42
|
<Button size="$3">File</Button>
|
|
42
|
-
<Button size="$3">Edit</Button>
|
|
43
43
|
<Button size="$3">View</Button>
|
|
44
44
|
<Button size="$3">Workspace</Button>
|
|
45
45
|
<Button size="$3">Help</Button>
|
|
@@ -64,7 +64,7 @@ export const Default: Story = {
|
|
|
64
64
|
<Input label="Full name" placeholder="Ada Lovelace" />
|
|
65
65
|
<Input label="Email" placeholder="ada@example.com" />
|
|
66
66
|
<XStack>
|
|
67
|
-
<
|
|
67
|
+
<ActionButton kind="save" />
|
|
68
68
|
</XStack>
|
|
69
69
|
</YStack>
|
|
70
70
|
</View>
|
|
@@ -46,8 +46,7 @@ export function ThemePlayground({ testID }: ThemePlaygroundProps) {
|
|
|
46
46
|
<>
|
|
47
47
|
<Tooltip content={t("Restyle the page live: scheme, preset and style knobs")}>
|
|
48
48
|
<Button
|
|
49
|
-
|
|
50
|
-
theme={open ? "accent" : undefined}
|
|
49
|
+
selected={open}
|
|
51
50
|
onPress={() => change(true)}
|
|
52
51
|
icon={<PaletteIcon size={16} />}
|
|
53
52
|
aria-label={t("Theme")}
|
|
@@ -54,7 +54,7 @@ export const LongContent: Story = {
|
|
|
54
54
|
render: () => (
|
|
55
55
|
<YStack padding="$8" alignItems="center">
|
|
56
56
|
<Tooltip content="Saving applies your new settings right away. You can change them later from Preferences.">
|
|
57
|
-
<Button>
|
|
57
|
+
<Button>Apply settings</Button>
|
|
58
58
|
</Tooltip>
|
|
59
59
|
</YStack>
|
|
60
60
|
),
|
|
@@ -20,13 +20,13 @@ describe("ActionBar stories", () => {
|
|
|
20
20
|
renderWithProviders(
|
|
21
21
|
<>{Default.render?.(Default.args as never, { args: Default.args } as never)}</>,
|
|
22
22
|
);
|
|
23
|
-
expect(screen.
|
|
24
|
-
expect(screen.
|
|
23
|
+
expect(screen.getByRole("button", { name: "Cancel" }).textContent).toBe("");
|
|
24
|
+
expect(screen.getByRole("button", { name: "Save changes" }).textContent).toBe("");
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
it("Cancel + secondary + primary renders every slot", () => {
|
|
28
28
|
renderWithProviders(<>{WithSecondary.render?.({} as never, {} as never)}</>);
|
|
29
|
-
expect(screen.
|
|
29
|
+
expect(screen.getByRole("button", { name: "Cancel" })).toBeTruthy();
|
|
30
30
|
expect(screen.getByText("Save draft")).toBeTruthy();
|
|
31
31
|
expect(screen.getByText("Preview")).toBeTruthy();
|
|
32
32
|
expect(screen.getByText("Publish")).toBeTruthy();
|
|
@@ -34,12 +34,12 @@ describe("ActionBar stories", () => {
|
|
|
34
34
|
|
|
35
35
|
it("Alignments renders one bar per align value", () => {
|
|
36
36
|
renderWithProviders(<>{Alignments.render?.({} as never, {} as never)}</>);
|
|
37
|
-
expect(screen.
|
|
37
|
+
expect(screen.getAllByRole("button", { name: "Confirm" })).toHaveLength(3);
|
|
38
38
|
expect(screen.getByText('align="between"')).toBeTruthy();
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
it("the cancel-disabled story still paints a reachable cancel", () => {
|
|
42
42
|
renderWithProviders(<>{CancelNeverDisabled.render?.({} as never, {} as never)}</>);
|
|
43
|
-
expect(screen.
|
|
43
|
+
expect(screen.getByRole("button", { name: "Cancel" })).toBeTruthy();
|
|
44
44
|
});
|
|
45
45
|
});
|
|
@@ -4,6 +4,7 @@ import { useState } from "react";
|
|
|
4
4
|
import { YStack } from "tamagui";
|
|
5
5
|
import { Card } from "../surfaces";
|
|
6
6
|
import { ActionBar, type ActionBarProps } from "./ActionBar";
|
|
7
|
+
import { ActionButton } from "./StandardAction";
|
|
7
8
|
import { Paragraph } from "../Text";
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -54,15 +55,9 @@ function Basic(args: Partial<ActionBarProps>) {
|
|
|
54
55
|
{readout}
|
|
55
56
|
<ActionBar
|
|
56
57
|
{...args}
|
|
57
|
-
cancel={
|
|
58
|
-
<Button chromeless onPress={press("Cancel")}>
|
|
59
|
-
Cancel
|
|
60
|
-
</Button>
|
|
61
|
-
}
|
|
58
|
+
cancel={<ActionButton kind="cancel" onPress={press("Cancel")} />}
|
|
62
59
|
primary={
|
|
63
|
-
<
|
|
64
|
-
Save changes
|
|
65
|
-
</Button>
|
|
60
|
+
<ActionButton kind="save" label="Save changes" onPress={press("Save changes")} />
|
|
66
61
|
}
|
|
67
62
|
/>
|
|
68
63
|
</YStack>
|
|
@@ -77,11 +72,7 @@ function FullRow() {
|
|
|
77
72
|
<YStack gap="$3">
|
|
78
73
|
{readout}
|
|
79
74
|
<ActionBar
|
|
80
|
-
cancel={
|
|
81
|
-
<Button chromeless onPress={press("Cancel")}>
|
|
82
|
-
Cancel
|
|
83
|
-
</Button>
|
|
84
|
-
}
|
|
75
|
+
cancel={<ActionButton kind="cancel" onPress={press("Cancel")} />}
|
|
85
76
|
secondary={[
|
|
86
77
|
<Button key="draft" onPress={press("Save draft")}>
|
|
87
78
|
Save draft
|
|
@@ -121,8 +112,8 @@ export const Alignments: Story = {
|
|
|
121
112
|
<Paragraph size="$2">{`align="${align}"`}</Paragraph>
|
|
122
113
|
<ActionBar
|
|
123
114
|
align={align}
|
|
124
|
-
cancel={<
|
|
125
|
-
primary={<
|
|
115
|
+
cancel={<ActionButton kind="cancel" />}
|
|
116
|
+
primary={<ActionButton kind="confirm" />}
|
|
126
117
|
/>
|
|
127
118
|
</YStack>
|
|
128
119
|
</Card>
|
|
@@ -145,16 +136,8 @@ export const CancelNeverDisabled: Story = {
|
|
|
145
136
|
return (
|
|
146
137
|
<Card maxWidth={480}>
|
|
147
138
|
<ActionBar
|
|
148
|
-
cancel={
|
|
149
|
-
|
|
150
|
-
Cancel
|
|
151
|
-
</Button>
|
|
152
|
-
}
|
|
153
|
-
primary={
|
|
154
|
-
<Button accent disabled>
|
|
155
|
-
Save changes
|
|
156
|
-
</Button>
|
|
157
|
-
}
|
|
139
|
+
cancel={<ActionButton kind="cancel" disabled />}
|
|
140
|
+
primary={<ActionButton kind="save" label="Save changes" disabled />}
|
|
158
141
|
/>
|
|
159
142
|
</Card>
|
|
160
143
|
);
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vitest-environment jsdom
|
|
3
|
+
*
|
|
4
|
+
* LC-260 ICONS-OVER-WORDS (FZ-8036). Clay: "we should always use icons where
|
|
5
|
+
* we can ... it's lazy to make users read". A standard action is its symbol,
|
|
6
|
+
* named for assistive tech; the overlay's one confirm is the accent ✓.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { standardActions, type StandardActionKind } from "@multiplatform.one/forms";
|
|
10
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
11
|
+
import { Surface } from "@multiplatform.one/theme";
|
|
12
|
+
import { cleanup, fireEvent, screen } from "@testing-library/react";
|
|
13
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
14
|
+
import { ActionButton, OverlayHeader } from "./StandardAction";
|
|
15
|
+
|
|
16
|
+
afterEach(cleanup);
|
|
17
|
+
|
|
18
|
+
const kinds = Object.keys(standardActions) as StandardActionKind[];
|
|
19
|
+
|
|
20
|
+
describe("ActionButton (LC-260)", () => {
|
|
21
|
+
it.each(kinds)("%s renders its symbol alone, named by its action", (kind) => {
|
|
22
|
+
renderWithProviders(<ActionButton kind={kind} />);
|
|
23
|
+
const button = screen.getByRole("button", { name: standardActions[kind].label });
|
|
24
|
+
expect(button.getAttribute("data-mp-action")).toBe(kind);
|
|
25
|
+
expect(button.textContent).toBe("");
|
|
26
|
+
expect(button.querySelector("svg")).not.toBeNull();
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it("the confirms are the accent plate; every other action is a bare glyph, bold mono in content", () => {
|
|
30
|
+
renderWithProviders(
|
|
31
|
+
<>
|
|
32
|
+
{kinds.map((kind) => (
|
|
33
|
+
<ActionButton key={kind} kind={kind} />
|
|
34
|
+
))}
|
|
35
|
+
</>,
|
|
36
|
+
);
|
|
37
|
+
for (const kind of kinds) {
|
|
38
|
+
const button = screen.getByRole("button", { name: standardActions[kind].label });
|
|
39
|
+
expect(button.getAttribute("data-mp-icon-button"), kind).toBe(
|
|
40
|
+
standardActions[kind].primary ? "primary" : "neutral",
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
expect(kinds.filter((kind) => standardActions[kind].primary).sort()).toEqual([
|
|
44
|
+
"confirm",
|
|
45
|
+
"done",
|
|
46
|
+
"save",
|
|
47
|
+
"submit",
|
|
48
|
+
]);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it("a label names the action more precisely; primary={false} drops the plate", () => {
|
|
52
|
+
renderWithProviders(<ActionButton kind="save" label="Save profile" primary={false} />);
|
|
53
|
+
const button = screen.getByRole("button", { name: "Save profile" });
|
|
54
|
+
expect(button.getAttribute("data-mp-icon-button")).toBe("neutral");
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("in a bar a plateless action takes the bar tint (LC-176)", () => {
|
|
58
|
+
renderWithProviders(
|
|
59
|
+
<Surface bar>
|
|
60
|
+
<ActionButton kind="close" />
|
|
61
|
+
<ActionButton kind="save" primary={false} />
|
|
62
|
+
</Surface>,
|
|
63
|
+
);
|
|
64
|
+
for (const name of ["Close", "Save"])
|
|
65
|
+
expect(screen.getByRole("button", { name }).getAttribute("data-mp-icon-button")).toBe(
|
|
66
|
+
"glyph",
|
|
67
|
+
);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it("overMedia floats a glyph on the media plate; a confirm keeps its accent plate", () => {
|
|
71
|
+
renderWithProviders(
|
|
72
|
+
<>
|
|
73
|
+
<ActionButton kind="replace" overMedia />
|
|
74
|
+
<ActionButton kind="done" overMedia />
|
|
75
|
+
</>,
|
|
76
|
+
);
|
|
77
|
+
expect(
|
|
78
|
+
screen.getByRole("button", { name: "Replace" }).getAttribute("data-mp-icon-button"),
|
|
79
|
+
).toBe("media");
|
|
80
|
+
expect(screen.getByRole("button", { name: "Done" }).getAttribute("data-mp-icon-button")).toBe(
|
|
81
|
+
"primary",
|
|
82
|
+
);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it("presses reach the caller", () => {
|
|
86
|
+
const onPress = vi.fn();
|
|
87
|
+
renderWithProviders(<ActionButton kind="delete" onPress={onPress} />);
|
|
88
|
+
fireEvent.click(screen.getByRole("button", { name: "Delete" }));
|
|
89
|
+
expect(onPress).toHaveBeenCalledTimes(1);
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
describe("OverlayHeader (LC-260, the iOS 26 sheet bar)", () => {
|
|
94
|
+
it("a confirming overlay: ✕ leading, the title, ✓ trailing", () => {
|
|
95
|
+
const onClose = vi.fn();
|
|
96
|
+
const onConfirm = vi.fn();
|
|
97
|
+
const { container } = renderWithProviders(
|
|
98
|
+
<OverlayHeader
|
|
99
|
+
title="Edit profile"
|
|
100
|
+
closeKind="cancel"
|
|
101
|
+
onClose={onClose}
|
|
102
|
+
onConfirm={onConfirm}
|
|
103
|
+
/>,
|
|
104
|
+
);
|
|
105
|
+
const header = container.querySelector("[data-mp-overlay-header]")!;
|
|
106
|
+
expect(header.getAttribute("data-mp-overlay-header")).toBe("confirm");
|
|
107
|
+
const buttons = Array.from(header.querySelectorAll("[role=button]"));
|
|
108
|
+
expect(buttons.map((b) => b.getAttribute("aria-label"))).toEqual(["Cancel", "Done"]);
|
|
109
|
+
expect(buttons[1]!.getAttribute("data-mp-icon-button")).toBe("primary");
|
|
110
|
+
expect(screen.getByRole("heading").textContent).toBe("Edit profile");
|
|
111
|
+
fireEvent.click(buttons[0]!);
|
|
112
|
+
fireEvent.click(buttons[1]!);
|
|
113
|
+
expect(onClose).toHaveBeenCalledTimes(1);
|
|
114
|
+
expect(onConfirm).toHaveBeenCalledTimes(1);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it("a dismiss-only overlay: the title leading, ✕ trailing", () => {
|
|
118
|
+
const { container } = renderWithProviders(<OverlayHeader title="About" onClose={() => {}} />);
|
|
119
|
+
const header = container.querySelector("[data-mp-overlay-header]")!;
|
|
120
|
+
expect(header.getAttribute("data-mp-overlay-header")).toBe("dismiss");
|
|
121
|
+
const buttons = Array.from(header.querySelectorAll("[role=button]"));
|
|
122
|
+
expect(buttons.map((b) => b.getAttribute("aria-label"))).toEqual(["Close"]);
|
|
123
|
+
expect(header.textContent).toBe("About");
|
|
124
|
+
});
|
|
125
|
+
});
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Input, standardActions, type StandardActionKind } from "@multiplatform.one/forms";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { XStack, YStack } from "tamagui";
|
|
5
|
+
import { Panel } from "../surfaces";
|
|
6
|
+
import { Paragraph } from "../Text";
|
|
7
|
+
import { ActionBar } from "./ActionBar";
|
|
8
|
+
import { ActionButton, OverlayHeader } from "./StandardAction";
|
|
9
|
+
|
|
10
|
+
const meta: Meta<typeof ActionButton> = {
|
|
11
|
+
title: "Components/ActionButton",
|
|
12
|
+
component: ActionButton,
|
|
13
|
+
parameters: {
|
|
14
|
+
status: { type: "beta" },
|
|
15
|
+
docs: {
|
|
16
|
+
description: {
|
|
17
|
+
component:
|
|
18
|
+
"LC-260 ICONS-OVER-WORDS. Each standard action renders as its symbol, an LC-176 icon button, with the action's name as the accessible label and the web tooltip. The overlay's one confirm is the accent ✓ circle. `OverlayHeader` puts ✕ leading and ✓ trailing around a centred title when the overlay confirms, and the title leading with ✕ trailing when it only dismisses.",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
|
|
25
|
+
type Story = StoryObj<typeof ActionButton>;
|
|
26
|
+
|
|
27
|
+
const kinds = Object.keys(standardActions) as StandardActionKind[];
|
|
28
|
+
|
|
29
|
+
function useLast() {
|
|
30
|
+
const [last, setLast] = useState<string | null>(null);
|
|
31
|
+
return {
|
|
32
|
+
press: (label: string) => () => setLast(label),
|
|
33
|
+
readout: (
|
|
34
|
+
<Paragraph size="$2" color="$color11">
|
|
35
|
+
{last === null ? "No action pressed yet." : `Last pressed: ${last}`}
|
|
36
|
+
</Paragraph>
|
|
37
|
+
),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function VocabularyDemo() {
|
|
42
|
+
const { press, readout } = useLast();
|
|
43
|
+
return (
|
|
44
|
+
<YStack gap="$3">
|
|
45
|
+
<XStack flexWrap="wrap" gap="$2" alignItems="center">
|
|
46
|
+
{kinds.map((kind) => (
|
|
47
|
+
<ActionButton key={kind} kind={kind} onPress={press(kind)} />
|
|
48
|
+
))}
|
|
49
|
+
</XStack>
|
|
50
|
+
{readout}
|
|
51
|
+
</YStack>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function ConfirmHeaderDemo() {
|
|
56
|
+
const { press, readout } = useLast();
|
|
57
|
+
return (
|
|
58
|
+
<Panel maxWidth={420}>
|
|
59
|
+
<OverlayHeader
|
|
60
|
+
title="Edit profile"
|
|
61
|
+
closeKind="cancel"
|
|
62
|
+
onClose={press("cancel")}
|
|
63
|
+
onConfirm={press("done")}
|
|
64
|
+
/>
|
|
65
|
+
<Input placeholder="Name" inputProps={{ "aria-label": "Name" }} />
|
|
66
|
+
{readout}
|
|
67
|
+
</Panel>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function DismissHeaderDemo() {
|
|
72
|
+
const { press, readout } = useLast();
|
|
73
|
+
return (
|
|
74
|
+
<Panel maxWidth={420}>
|
|
75
|
+
<OverlayHeader title="About" onClose={press("close")} />
|
|
76
|
+
<Paragraph>Version 7.43.0</Paragraph>
|
|
77
|
+
{readout}
|
|
78
|
+
</Panel>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function PanelFooterDemo() {
|
|
83
|
+
const { press, readout } = useLast();
|
|
84
|
+
return (
|
|
85
|
+
<Panel maxWidth={420}>
|
|
86
|
+
<Input placeholder="Name" inputProps={{ "aria-label": "Name" }} />
|
|
87
|
+
<ActionBar
|
|
88
|
+
cancel={<ActionButton kind="cancel" onPress={press("cancel")} />}
|
|
89
|
+
primary={<ActionButton kind="submit" onPress={press("submit")} />}
|
|
90
|
+
/>
|
|
91
|
+
{readout}
|
|
92
|
+
</Panel>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const Vocabulary: Story = {
|
|
97
|
+
render: () => <VocabularyDemo />,
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const ConfirmHeader: Story = {
|
|
101
|
+
name: "Overlay header — confirm",
|
|
102
|
+
render: () => <ConfirmHeaderDemo />,
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export const DismissHeader: Story = {
|
|
106
|
+
name: "Overlay header — dismiss only",
|
|
107
|
+
render: () => <DismissHeaderDemo />,
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const PanelFooter: Story = {
|
|
111
|
+
name: "Panel footer",
|
|
112
|
+
render: () => <PanelFooterDemo />,
|
|
113
|
+
};
|
|
@@ -4,6 +4,7 @@ import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
|
4
4
|
import { YStack } from "tamagui";
|
|
5
5
|
import { ActionBar } from "./ActionBar";
|
|
6
6
|
import { DestructiveAction } from "./DestructiveAction";
|
|
7
|
+
import { ActionButton } from "./StandardAction";
|
|
7
8
|
import { Paragraph } from "../Text";
|
|
8
9
|
|
|
9
10
|
const meta: Meta<typeof DestructiveAction> = {
|
|
@@ -80,14 +81,14 @@ export const ActionBarOnePrimary: Story = {
|
|
|
80
81
|
<Paragraph size="$3">One primary per region; labels from verb + noun.</Paragraph>
|
|
81
82
|
<ActionBar
|
|
82
83
|
id="form-actions"
|
|
83
|
-
cancel={<
|
|
84
|
+
cancel={<ActionButton kind="cancel" />}
|
|
84
85
|
secondary={<Button actionRole="secondary" verb="Save" noun="draft" outlined />}
|
|
85
86
|
primary={<Button accent verb="Publish" noun="post" />}
|
|
86
87
|
/>
|
|
87
88
|
<ActionBar
|
|
88
89
|
id="row-actions"
|
|
89
90
|
align="end"
|
|
90
|
-
secondary={<
|
|
91
|
+
secondary={<ActionButton kind="edit" />}
|
|
91
92
|
primary={
|
|
92
93
|
<DestructiveAction verb="Delete" noun="row" onAction={() => action("delete-row")()} />
|
|
93
94
|
}
|
|
@@ -107,7 +108,7 @@ export const TwoPrimariesWarn: Story = {
|
|
|
107
108
|
},
|
|
108
109
|
render: () => (
|
|
109
110
|
<ActionBar id="bad-region" padding="$4">
|
|
110
|
-
<
|
|
111
|
+
<ActionButton kind="save" />
|
|
111
112
|
<Button accent>Publish</Button>
|
|
112
113
|
</ActionBar>
|
|
113
114
|
),
|