@multiplatform.one/components 7.67.0 → 7.68.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.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/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 +5 -1
- package/dist/cjs/SheetModal/SheetHeader.native.js +5 -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 +2 -0
- package/dist/cjs/index.native.js +37 -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 +20 -1
- package/dist/cjs/layouts/page.native.js +23 -3
- 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/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/SheetModal/SheetHeader.mjs +5 -1
- package/dist/esm/SheetModal/SheetHeader.mjs.map +1 -1
- package/dist/esm/SheetModal/SheetHeader.native.js +5 -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 +2 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +2 -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 +20 -1
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +21 -1
- 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/Accordion/index.native.js +1 -1
- package/dist/jsx/Accordion/index.native.js.map +1 -1
- package/dist/jsx/Alert/index.native.js.map +1 -1
- package/dist/jsx/AnimateHeight/index.native.js.map +1 -1
- package/dist/jsx/Avatar/getInitials.native.js.map +1 -1
- package/dist/jsx/Avatar/index.native.js.map +1 -1
- package/dist/jsx/Badge/index.native.js.map +1 -1
- package/dist/jsx/Button.native.js.map +1 -1
- package/dist/jsx/Card.native.js.map +1 -1
- package/dist/jsx/CardFooter.native.js.map +1 -1
- package/dist/jsx/CardHeader.native.js.map +1 -1
- package/dist/jsx/Carousel/index.native.js +3 -3
- package/dist/jsx/Carousel/index.native.js.map +1 -1
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/Collapsible.native.js.map +1 -1
- package/dist/jsx/ContextMenu/index.native.js.map +1 -1
- package/dist/jsx/CopyField/index.native.js.map +1 -1
- package/dist/jsx/Dialog.native.js.map +1 -1
- package/dist/jsx/DotIndicator/index.native.js.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js.map +1 -1
- package/dist/jsx/DropdownMenu/menuSettle.native.js.map +1 -1
- package/dist/jsx/ErrorBoundary/index.native.js.map +1 -1
- package/dist/jsx/Heading.native.js.map +1 -1
- package/dist/jsx/Kbd/index.native.js.map +1 -1
- package/dist/jsx/Kbd/keys.native.js.map +1 -1
- package/dist/jsx/Lightbox/MediaControl.native.js +1 -1
- package/dist/jsx/Lightbox/MediaControl.native.js.map +1 -1
- package/dist/jsx/Lightbox/index.gnome.native.js.map +1 -1
- package/dist/jsx/Lightbox/index.native.js +1 -1
- package/dist/jsx/Lightbox/shared.native.js.map +1 -1
- package/dist/jsx/Lightbox/useLightbox.native.js.map +1 -1
- package/dist/jsx/Material/index.native.js.map +1 -1
- package/dist/jsx/Meter/index.native.js +1 -1
- package/dist/jsx/Meter/index.native.js.map +1 -1
- package/dist/jsx/Meter/meter.native.js.map +1 -1
- package/dist/jsx/OverflowRow/index.native.js +1 -1
- package/dist/jsx/OverflowRow/index.native.js.map +1 -1
- package/dist/jsx/Pagination.mjs +0 -2
- package/dist/jsx/Pagination.mjs.map +1 -1
- package/dist/jsx/Pagination.native.js +2 -4
- package/dist/jsx/Pagination.native.js.map +1 -1
- package/dist/jsx/Popover.native.js.map +1 -1
- package/dist/jsx/ProgressSteps/index.native.js.map +1 -1
- package/dist/jsx/Quote/index.native.js.map +1 -1
- package/dist/jsx/ScrollView/revealFocusedField.native.js.map +1 -1
- package/dist/jsx/Separator/index.native.js.map +1 -1
- package/dist/jsx/Sheet.native.js.map +1 -1
- package/dist/jsx/SheetModal/SheetHeader.mjs +5 -1
- package/dist/jsx/SheetModal/SheetHeader.mjs.map +1 -1
- package/dist/jsx/SheetModal/SheetHeader.native.js +5 -1
- package/dist/jsx/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/jsx/SheetModal/SheetNavigation.native.js.map +1 -1
- package/dist/jsx/SheetModal/detents.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/SheetModal/useSheetFrameFocus.native.js.map +1 -1
- package/dist/jsx/Skeleton/index.native.js.map +1 -1
- package/dist/jsx/SkipLink/index.native.js.map +1 -1
- package/dist/jsx/SortableList/SortableHandle.native.js.map +1 -1
- package/dist/jsx/SortableList/index.native.js.map +1 -1
- package/dist/jsx/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/jsx/Tabs/index.native.js +1 -1
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/Text.native.js.map +1 -1
- package/dist/jsx/ThemePlayground/index.mjs +1 -2
- package/dist/jsx/ThemePlayground/index.mjs.map +1 -1
- package/dist/jsx/ThemePresetPicker/index.native.js +2 -2
- package/dist/jsx/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/jsx/Toast/index.native.js.map +1 -1
- package/dist/jsx/Toast/store.native.js.map +1 -1
- package/dist/jsx/Tooltip/nativePress.native.js.map +1 -1
- package/dist/jsx/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/jsx/TreeSelect/index.native.js +1 -1
- package/dist/jsx/TreeSelect/index.native.js.map +1 -1
- package/dist/jsx/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/jsx/Video/PlayerChrome.native.js.map +1 -1
- package/dist/jsx/Video/VideoFrame.native.js.map +1 -1
- package/dist/jsx/Video/types.native.js.map +1 -1
- package/dist/jsx/Wheel/index.native.js.map +1 -1
- package/dist/jsx/Wizard/index.native.js +2 -2
- package/dist/jsx/Wizard/index.native.js.map +1 -1
- package/dist/jsx/actions/ActionBar.native.js.map +1 -1
- package/dist/jsx/actions/DangerSection.native.js.map +1 -1
- package/dist/jsx/actions/DestructiveAction.native.js.map +1 -1
- package/dist/jsx/actions/HeaderActions.native.js +2 -2
- package/dist/jsx/actions/HeaderActions.native.js.map +1 -1
- package/dist/jsx/actions/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/devWarn.native.js.map +1 -1
- package/dist/jsx/actions/index.mjs +3 -1
- package/dist/jsx/actions/index.mjs.map +1 -1
- package/dist/jsx/actions/index.native.js +8 -1
- package/dist/jsx/actions/index.native.js.map +1 -1
- package/dist/jsx/actions/severity.native.js.map +1 -1
- package/dist/jsx/appShell/BottomAccessory.native.js.map +1 -1
- package/dist/jsx/appShell/Dock.native.js.map +1 -1
- package/dist/jsx/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/jsx/appShell/Springboard.native.js +1 -1
- package/dist/jsx/appShell/Springboard.native.js.map +1 -1
- package/dist/jsx/appShell/SystemBar.native.js.map +1 -1
- package/dist/jsx/appShell/TabBar.native.js +1 -1
- package/dist/jsx/appShell/TabBar.native.js.map +1 -1
- package/dist/jsx/appShell/appTile.native.js +1 -1
- package/dist/jsx/appShell/appTile.native.js.map +1 -1
- package/dist/jsx/appShell/bottomChrome.native.js.map +1 -1
- package/dist/jsx/appShell/index.native.js.map +1 -1
- package/dist/jsx/charts/Axis.native.js.map +1 -1
- package/dist/jsx/charts/BarChart.native.js.map +1 -1
- package/dist/jsx/charts/ChartDataView.mjs +8 -20
- package/dist/jsx/charts/ChartDataView.mjs.map +1 -1
- package/dist/jsx/charts/ChartDataView.native.js +11 -21
- package/dist/jsx/charts/ChartDataView.native.js.map +1 -1
- package/dist/jsx/charts/ChartSurface.native.js.map +1 -1
- package/dist/jsx/charts/LineChart.native.js.map +1 -1
- package/dist/jsx/charts/PieChart.native.js.map +1 -1
- package/dist/jsx/charts/Sparkline.native.js.map +1 -1
- package/dist/jsx/charts/accessibility.native.js.map +1 -1
- package/dist/jsx/charts/chartHeight.native.js.map +1 -1
- package/dist/jsx/charts/composeChart.native.js.map +1 -1
- package/dist/jsx/charts/index.native.js.map +1 -1
- package/dist/jsx/charts/math.native.js.map +1 -1
- package/dist/jsx/charts/series.native.js.map +1 -1
- package/dist/jsx/charts/svg.native.js.map +1 -1
- package/dist/jsx/charts/types.native.js.map +1 -1
- package/dist/jsx/charts/useChartTheme.native.js.map +1 -1
- package/dist/jsx/code/Code/index.native.js.map +1 -1
- package/dist/jsx/code/CodeBlock/index.native.js +7 -7
- package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
- package/dist/jsx/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
- package/dist/jsx/code/Pre/index.native.js.map +1 -1
- package/dist/jsx/code/index.native.js +5 -5
- package/dist/jsx/code/index.native.js.map +1 -1
- package/dist/jsx/componentColors.native.js.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/jsx/feedback/NotifyHost.native.js +2 -2
- package/dist/jsx/feedback/NotifyHost.native.js.map +1 -1
- package/dist/jsx/feedback/copy.native.js.map +1 -1
- package/dist/jsx/feedback/index.native.js.map +1 -1
- package/dist/jsx/feedback/notify.native.js.map +1 -1
- package/dist/jsx/feedback/route.native.js.map +1 -1
- package/dist/jsx/feedback/store.native.js.map +1 -1
- package/dist/jsx/formLayouts/FormLayouts.native.js +1 -1
- package/dist/jsx/formLayouts/FormLayouts.native.js.map +1 -1
- package/dist/jsx/formLayouts/PreferencePanel.native.js +2 -2
- package/dist/jsx/formLayouts/PreferencePanel.native.js.map +1 -1
- package/dist/jsx/formLayouts/index.native.js.map +1 -1
- package/dist/jsx/hooks/index.native.js +1 -1
- package/dist/jsx/hooks/index.native.js.map +1 -1
- package/dist/jsx/hooks/useClipboard.native.js.map +1 -1
- package/dist/jsx/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/jsx/hooks/useHoldCue.native.js.map +1 -1
- package/dist/jsx/icons/CheckRegular.native.js.map +1 -1
- package/dist/jsx/icons/MinusRegular.native.js.map +1 -1
- package/dist/jsx/icons/index.native.js.map +1 -1
- package/dist/jsx/icons/lucide.native.js.map +1 -1
- package/dist/jsx/icons/themed.native.js.map +1 -1
- package/dist/jsx/images/Image/ImageFrame.native.js +1 -1
- package/dist/jsx/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/jsx/images/Image/framing.native.js.map +1 -1
- package/dist/jsx/images/Image/index.native.js +1 -1
- package/dist/jsx/images/Image/mediaRadius.native.js.map +1 -1
- package/dist/jsx/images/Image/shared.native.js +1 -1
- package/dist/jsx/images/Image/shared.native.js.map +1 -1
- package/dist/jsx/images/Image/types.native.js.map +1 -1
- package/dist/jsx/images/index.native.js.map +1 -1
- package/dist/jsx/index.js +2 -1
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +2 -1
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +37 -35
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/knobImmuneExports.native.js.map +1 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js +2 -2
- package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/jsx/layouts/Debug/index.native.js.map +1 -1
- package/dist/jsx/layouts/EmptyState.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/IdentityPlate.native.js.map +1 -1
- package/dist/jsx/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/jsx/layouts/PageTemplates.native.js.map +1 -1
- package/dist/jsx/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/jsx/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/jsx/layouts/StatusDot.native.js.map +1 -1
- package/dist/jsx/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/jsx/layouts/attachments.native.js +1 -1
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/jsx/layouts/index.native.js +3 -3
- package/dist/jsx/layouts/index.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +20 -1
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +23 -3
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/jsx/layouts/screenScroll.native.js.map +1 -1
- package/dist/jsx/layouts/shellSidebarSlot.native.js.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js +1 -1
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/dist/jsx/layouts/tags.native.js +2 -2
- package/dist/jsx/layouts/tags.native.js.map +1 -1
- package/dist/jsx/layouts/timeline.native.js +2 -2
- package/dist/jsx/layouts/timeline.native.js.map +1 -1
- package/dist/jsx/layouts/toolbar.native.js +1 -1
- package/dist/jsx/layouts/toolbar.native.js.map +1 -1
- package/dist/jsx/shared/actionScan.native.js.map +1 -1
- package/dist/jsx/shared/i18n.native.js.map +1 -1
- package/dist/jsx/shared/restoreRetries.native.js.map +1 -1
- package/dist/jsx/shared/t.native.js.map +1 -1
- package/dist/jsx/shared/textRidesText.native.js.map +1 -1
- package/dist/jsx/shared/useReturnFocusOnClose.native.js.map +1 -1
- package/dist/jsx/surfaces.native.js +1 -1
- package/dist/jsx/surfaces.native.js.map +1 -1
- package/dist/jsx/tamagui.native.js +1 -1
- package/dist/jsx/tamagui.native.js.map +1 -1
- package/dist/jsx/testSetup.native.js.map +1 -1
- package/dist/jsx/utils/setTinted.native.js.map +1 -1
- package/dist/jsx/utils/unwrapText.native.js.map +1 -1
- package/dist/jsx/views/Calendar.native.js +1 -1
- package/dist/jsx/views/Calendar.native.js.map +1 -1
- package/dist/jsx/views/Dashboard.native.js +2 -2
- package/dist/jsx/views/Dashboard.native.js.map +1 -1
- package/dist/jsx/views/Gantt.native.js +2 -2
- package/dist/jsx/views/Gantt.native.js.map +1 -1
- package/dist/jsx/views/GanttDateGrip.native.js.map +1 -1
- package/dist/jsx/views/ImageGrid.native.js +2 -2
- package/dist/jsx/views/ImageGrid.native.js.map +1 -1
- package/dist/jsx/views/Kanban.native.js +1 -1
- package/dist/jsx/views/List.native.js.map +1 -1
- package/dist/jsx/views/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/ListRow.native.js.map +1 -1
- package/dist/jsx/views/Matrix.native.js +2 -2
- package/dist/jsx/views/Matrix.native.js.map +1 -1
- package/dist/jsx/views/ReportBuilder.mjs +4 -7
- package/dist/jsx/views/ReportBuilder.mjs.map +1 -1
- package/dist/jsx/views/ReportBuilder.native.js +5 -8
- package/dist/jsx/views/ReportBuilder.native.js.map +1 -1
- package/dist/jsx/views/ShortcutCard.native.js.map +1 -1
- package/dist/jsx/views/TreeView.native.js.map +1 -1
- package/dist/jsx/views/calendarMath.native.js.map +1 -1
- package/dist/jsx/views/ganttIntervals.native.js.map +1 -1
- package/dist/jsx/views/ganttMath.native.js.map +1 -1
- package/dist/jsx/views/index.native.js +1 -1
- package/dist/jsx/views/index.native.js.map +1 -1
- package/dist/jsx/views/kanbanDnd.native.js.map +1 -1
- package/dist/jsx/views/matrixMath.native.js.map +1 -1
- package/dist/jsx/views/treeViewDnd.native.js.map +1 -1
- package/dist/jsx/views/treeViewLayout.native.js.map +1 -1
- package/dist/jsx/views/treeViewMotion.native.js.map +1 -1
- package/dist/jsx/views/treeViewReveal.native.js.map +1 -1
- package/dist/jsx/views/widgetChrome.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/DialogContent.stories.tsx +9 -11
- package/src/DropdownMenu/DropdownMenu.stories.tsx +2 -1
- package/src/Pagination.spec.tsx +43 -15
- package/src/Pagination.tsx +1 -3
- package/src/Panel.stories.tsx +5 -6
- package/src/SheetModal/SheetHeader.tsx +3 -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 +2 -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 +22 -0
- package/src/layouts/page.tsx +26 -1
- 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/Pagination.d.ts.map +1 -1
- 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 +2 -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
|
@@ -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
|
),
|
|
@@ -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
|
|
@@ -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
|
),
|