@multiplatform.one/components 7.55.0 → 7.56.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/CardHeader.cjs +22 -8
- package/dist/cjs/CardHeader.native.js +21 -7
- package/dist/cjs/CardHeader.native.js.map +1 -1
- package/dist/cjs/Carousel/index.native.js +2 -2
- package/dist/cjs/Carousel/index.native.js.map +1 -1
- package/dist/cjs/Meter/index.native.js +1 -1
- package/dist/cjs/Meter/index.native.js.map +1 -1
- package/dist/cjs/OverflowRow/index.native.js +1 -1
- package/dist/cjs/OverflowRow/index.native.js.map +1 -1
- package/dist/cjs/Pagination.native.js +1 -1
- package/dist/cjs/Pagination.native.js.map +1 -1
- package/dist/cjs/SheetModal/detents.cjs +18 -1
- package/dist/cjs/SheetModal/detents.native.js +19 -1
- package/dist/cjs/SheetModal/detents.native.js.map +1 -1
- package/dist/cjs/SheetModal/index.cjs +13 -3
- package/dist/cjs/SheetModal/index.native.js +1 -2
- package/dist/cjs/SheetModal/index.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/ThemePresetPicker/index.native.js +2 -2
- package/dist/cjs/ThemePresetPicker/index.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/Wizard/index.native.js +2 -2
- package/dist/cjs/Wizard/index.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/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/charts/ChartDataView.native.js +1 -1
- package/dist/cjs/charts/ChartDataView.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/index.native.js +5 -5
- package/dist/cjs/code/index.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/hooks/index.native.js +1 -1
- package/dist/cjs/hooks/index.native.js.map +1 -1
- package/dist/cjs/images/Image/ImageFrame.native.js +1 -1
- package/dist/cjs/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/cjs/images/Image/index.native.js +1 -1
- package/dist/cjs/images/Image/shared.native.js +1 -1
- package/dist/cjs/images/Image/shared.native.js.map +1 -1
- package/dist/cjs/index.native.js +32 -32
- package/dist/cjs/index.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/EmptyState.cjs +107 -33
- package/dist/cjs/layouts/EmptyState.native.js +111 -37
- package/dist/cjs/layouts/EmptyState.native.js.map +1 -1
- package/dist/cjs/layouts/IdentityPlate.cjs +127 -0
- package/dist/cjs/layouts/IdentityPlate.native.js +135 -0
- package/dist/cjs/layouts/IdentityPlate.native.js.map +1 -0
- package/dist/cjs/layouts/StatusDot.cjs +72 -0
- package/dist/cjs/layouts/StatusDot.native.js +77 -0
- package/dist/cjs/layouts/StatusDot.native.js.map +1 -0
- package/dist/cjs/layouts/attachments.native.js +1 -1
- package/dist/cjs/layouts/attachments.native.js.map +1 -1
- package/dist/cjs/layouts/index.cjs +6 -0
- package/dist/cjs/layouts/index.native.js +9 -3
- package/dist/cjs/layouts/index.native.js.map +1 -1
- package/dist/cjs/layouts/page.native.js +2 -2
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/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/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/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/ImageGrid.native.js +1 -1
- package/dist/cjs/views/ImageGrid.native.js.map +1 -1
- package/dist/cjs/views/Kanban.native.js +1 -1
- package/dist/cjs/views/Matrix.native.js +2 -2
- package/dist/cjs/views/Matrix.native.js.map +1 -1
- package/dist/cjs/views/ReportBuilder.native.js +2 -2
- package/dist/cjs/views/ReportBuilder.native.js.map +1 -1
- package/dist/cjs/views/index.native.js +1 -1
- package/dist/cjs/views/index.native.js.map +1 -1
- package/dist/esm/CardHeader.mjs +24 -10
- package/dist/esm/CardHeader.mjs.map +1 -1
- package/dist/esm/CardHeader.native.js +23 -9
- package/dist/esm/CardHeader.native.js.map +1 -1
- package/dist/esm/SheetModal/detents.mjs +15 -1
- package/dist/esm/SheetModal/detents.mjs.map +1 -1
- package/dist/esm/SheetModal/detents.native.js +16 -1
- package/dist/esm/SheetModal/detents.native.js.map +1 -1
- package/dist/esm/SheetModal/index.mjs +14 -4
- package/dist/esm/SheetModal/index.mjs.map +1 -1
- package/dist/esm/SheetModal/index.native.js +2 -3
- package/dist/esm/SheetModal/index.native.js.map +1 -1
- package/dist/esm/layouts/EmptyState.mjs +103 -29
- package/dist/esm/layouts/EmptyState.mjs.map +1 -1
- package/dist/esm/layouts/EmptyState.native.js +107 -33
- package/dist/esm/layouts/EmptyState.native.js.map +1 -1
- package/dist/esm/layouts/IdentityPlate.mjs +102 -0
- package/dist/esm/layouts/IdentityPlate.mjs.map +1 -0
- package/dist/esm/layouts/IdentityPlate.native.js +107 -0
- package/dist/esm/layouts/IdentityPlate.native.js.map +1 -0
- package/dist/esm/layouts/StatusDot.mjs +45 -0
- package/dist/esm/layouts/StatusDot.mjs.map +1 -0
- package/dist/esm/layouts/StatusDot.native.js +47 -0
- package/dist/esm/layouts/StatusDot.native.js.map +1 -0
- package/dist/esm/layouts/index.mjs +3 -1
- package/dist/esm/layouts/index.mjs.map +1 -1
- package/dist/esm/layouts/index.native.js +3 -1
- package/dist/esm/layouts/index.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.mjs +24 -10
- package/dist/jsx/CardHeader.mjs.map +1 -1
- package/dist/jsx/CardHeader.native.js +21 -7
- package/dist/jsx/CardHeader.native.js.map +1 -1
- package/dist/jsx/Carousel/index.native.js +2 -2
- package/dist/jsx/Carousel/index.native.js.map +1 -1
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/Collapsible.native.js.map +1 -1
- package/dist/jsx/ContextMenu/index.native.js.map +1 -1
- package/dist/jsx/CopyField/index.native.js.map +1 -1
- package/dist/jsx/Dialog.native.js.map +1 -1
- package/dist/jsx/DotIndicator/index.native.js.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js.map +1 -1
- package/dist/jsx/ErrorBoundary/index.native.js.map +1 -1
- package/dist/jsx/Heading.native.js.map +1 -1
- package/dist/jsx/Meter/index.native.js +1 -1
- package/dist/jsx/Meter/index.native.js.map +1 -1
- package/dist/jsx/Meter/meter.native.js.map +1 -1
- package/dist/jsx/OverflowRow/index.native.js +1 -1
- package/dist/jsx/OverflowRow/index.native.js.map +1 -1
- package/dist/jsx/Pagination.native.js +1 -1
- package/dist/jsx/Pagination.native.js.map +1 -1
- package/dist/jsx/Popover.native.js.map +1 -1
- package/dist/jsx/ProgressSteps/index.native.js.map +1 -1
- package/dist/jsx/Quote/index.native.js.map +1 -1
- package/dist/jsx/ScrollView/revealFocusedField.native.js.map +1 -1
- package/dist/jsx/Separator/index.native.js.map +1 -1
- package/dist/jsx/Sheet.native.js.map +1 -1
- package/dist/jsx/SheetModal/detents.mjs +15 -1
- package/dist/jsx/SheetModal/detents.mjs.map +1 -1
- package/dist/jsx/SheetModal/detents.native.js +19 -1
- package/dist/jsx/SheetModal/detents.native.js.map +1 -1
- package/dist/jsx/SheetModal/index.mjs +14 -4
- package/dist/jsx/SheetModal/index.mjs.map +1 -1
- package/dist/jsx/SheetModal/index.native.js +1 -2
- package/dist/jsx/SheetModal/index.native.js.map +1 -1
- package/dist/jsx/SheetModal/useSheetFrameFocus.native.js.map +1 -1
- package/dist/jsx/Skeleton/index.native.js.map +1 -1
- package/dist/jsx/SkipLink/index.native.js.map +1 -1
- package/dist/jsx/SortableList/SortableHandle.native.js.map +1 -1
- package/dist/jsx/SortableList/index.native.js.map +1 -1
- package/dist/jsx/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/jsx/Tabs/index.native.js +1 -1
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/Text.native.js.map +1 -1
- package/dist/jsx/ThemePresetPicker/index.native.js +2 -2
- package/dist/jsx/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/jsx/Toast/index.native.js.map +1 -1
- package/dist/jsx/Toast/store.native.js.map +1 -1
- package/dist/jsx/Tooltip/nativePress.native.js.map +1 -1
- package/dist/jsx/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/jsx/TreeSelect/index.native.js +1 -1
- package/dist/jsx/TreeSelect/index.native.js.map +1 -1
- package/dist/jsx/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/jsx/Video/PlayerChrome.native.js.map +1 -1
- package/dist/jsx/Video/VideoFrame.native.js.map +1 -1
- package/dist/jsx/Video/types.native.js.map +1 -1
- package/dist/jsx/Wheel/index.native.js.map +1 -1
- package/dist/jsx/Wizard/index.native.js +2 -2
- package/dist/jsx/Wizard/index.native.js.map +1 -1
- package/dist/jsx/actions/ActionBar.native.js.map +1 -1
- package/dist/jsx/actions/DestructiveAction.native.js.map +1 -1
- package/dist/jsx/actions/devWarn.native.js.map +1 -1
- package/dist/jsx/actions/index.native.js.map +1 -1
- package/dist/jsx/actions/severity.native.js.map +1 -1
- package/dist/jsx/appShell/Dock.native.js.map +1 -1
- package/dist/jsx/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/jsx/appShell/Springboard.native.js +1 -1
- package/dist/jsx/appShell/Springboard.native.js.map +1 -1
- package/dist/jsx/appShell/SystemBar.native.js.map +1 -1
- package/dist/jsx/appShell/TabBar.native.js +1 -1
- package/dist/jsx/appShell/TabBar.native.js.map +1 -1
- package/dist/jsx/appShell/appTile.native.js +1 -1
- package/dist/jsx/appShell/appTile.native.js.map +1 -1
- package/dist/jsx/appShell/index.native.js.map +1 -1
- package/dist/jsx/charts/Axis.native.js.map +1 -1
- package/dist/jsx/charts/BarChart.native.js.map +1 -1
- package/dist/jsx/charts/ChartDataView.native.js +1 -1
- package/dist/jsx/charts/ChartDataView.native.js.map +1 -1
- package/dist/jsx/charts/ChartSurface.native.js.map +1 -1
- package/dist/jsx/charts/LineChart.native.js.map +1 -1
- package/dist/jsx/charts/PieChart.native.js.map +1 -1
- package/dist/jsx/charts/Sparkline.native.js.map +1 -1
- package/dist/jsx/charts/accessibility.native.js.map +1 -1
- package/dist/jsx/charts/chartHeight.native.js.map +1 -1
- package/dist/jsx/charts/composeChart.native.js.map +1 -1
- package/dist/jsx/charts/index.native.js.map +1 -1
- package/dist/jsx/charts/math.native.js.map +1 -1
- package/dist/jsx/charts/series.native.js.map +1 -1
- package/dist/jsx/charts/svg.native.js.map +1 -1
- package/dist/jsx/charts/types.native.js.map +1 -1
- package/dist/jsx/charts/useChartTheme.native.js.map +1 -1
- package/dist/jsx/code/Code/index.native.js.map +1 -1
- package/dist/jsx/code/CodeBlock/index.native.js +7 -7
- package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
- package/dist/jsx/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
- package/dist/jsx/code/Pre/index.native.js.map +1 -1
- package/dist/jsx/code/index.native.js +5 -5
- package/dist/jsx/code/index.native.js.map +1 -1
- package/dist/jsx/componentColors.native.js.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/jsx/feedback/NotifyHost.native.js +1 -1
- package/dist/jsx/feedback/NotifyHost.native.js.map +1 -1
- package/dist/jsx/feedback/copy.native.js.map +1 -1
- package/dist/jsx/feedback/index.native.js.map +1 -1
- package/dist/jsx/feedback/notify.native.js.map +1 -1
- package/dist/jsx/feedback/route.native.js.map +1 -1
- package/dist/jsx/feedback/store.native.js.map +1 -1
- package/dist/jsx/hooks/index.native.js +1 -1
- package/dist/jsx/hooks/index.native.js.map +1 -1
- package/dist/jsx/hooks/useClipboard.native.js.map +1 -1
- package/dist/jsx/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/jsx/icons/CheckRegular.native.js.map +1 -1
- package/dist/jsx/icons/MinusRegular.native.js.map +1 -1
- package/dist/jsx/icons/index.native.js.map +1 -1
- package/dist/jsx/icons/lucide.native.js.map +1 -1
- package/dist/jsx/icons/themed.native.js.map +1 -1
- package/dist/jsx/images/Image/ImageFrame.native.js +1 -1
- package/dist/jsx/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/jsx/images/Image/index.native.js +1 -1
- package/dist/jsx/images/Image/shared.native.js +1 -1
- package/dist/jsx/images/Image/shared.native.js.map +1 -1
- package/dist/jsx/images/Image/types.native.js.map +1 -1
- package/dist/jsx/images/index.native.js.map +1 -1
- package/dist/jsx/index.native.js +31 -31
- 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 +1 -1
- 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 +103 -29
- package/dist/jsx/layouts/EmptyState.mjs.map +1 -1
- package/dist/jsx/layouts/EmptyState.native.js +111 -37
- package/dist/jsx/layouts/EmptyState.native.js.map +1 -1
- package/dist/jsx/layouts/IdentityPlate.mjs +102 -0
- package/dist/jsx/layouts/IdentityPlate.mjs.map +1 -0
- package/dist/jsx/layouts/IdentityPlate.native.js +135 -0
- package/dist/jsx/layouts/IdentityPlate.native.js.map +1 -0
- 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.mjs +45 -0
- package/dist/jsx/layouts/StatusDot.mjs.map +1 -0
- package/dist/jsx/layouts/StatusDot.native.js +77 -0
- package/dist/jsx/layouts/StatusDot.native.js.map +1 -0
- 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.mjs +3 -1
- package/dist/jsx/layouts/index.mjs.map +1 -1
- package/dist/jsx/layouts/index.native.js +9 -3
- package/dist/jsx/layouts/index.native.js.map +1 -1
- package/dist/jsx/layouts/page.native.js +2 -2
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/jsx/layouts/screenScroll.native.js.map +1 -1
- package/dist/jsx/layouts/shellSidebarSlot.native.js.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js +1 -1
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/dist/jsx/layouts/tags.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 +1 -1
- package/dist/jsx/views/ImageGrid.native.js.map +1 -1
- package/dist/jsx/views/Kanban.native.js +1 -1
- package/dist/jsx/views/List.native.js.map +1 -1
- package/dist/jsx/views/Matrix.native.js +2 -2
- package/dist/jsx/views/Matrix.native.js.map +1 -1
- package/dist/jsx/views/ReportBuilder.native.js +2 -2
- package/dist/jsx/views/ReportBuilder.native.js.map +1 -1
- package/dist/jsx/views/TreeView.native.js.map +1 -1
- package/dist/jsx/views/calendarMath.native.js.map +1 -1
- package/dist/jsx/views/ganttIntervals.native.js.map +1 -1
- package/dist/jsx/views/ganttMath.native.js.map +1 -1
- package/dist/jsx/views/index.native.js +1 -1
- package/dist/jsx/views/index.native.js.map +1 -1
- package/dist/jsx/views/kanbanDnd.native.js.map +1 -1
- package/dist/jsx/views/matrixMath.native.js.map +1 -1
- package/dist/jsx/views/treeViewDnd.native.js.map +1 -1
- package/dist/jsx/views/treeViewLayout.native.js.map +1 -1
- package/dist/jsx/views/treeViewMotion.native.js.map +1 -1
- package/dist/jsx/views/treeViewReveal.native.js.map +1 -1
- package/package.json +9 -9
- package/src/Card.stories.tsx +83 -1
- package/src/CardHeader.spec.tsx +22 -0
- package/src/CardHeader.tsx +30 -13
- package/src/DropdownMenu/DropdownMenu.stories.tsx +1 -1
- package/src/OverflowRow/OverflowRow.stories.tsx +2 -2
- package/src/SheetModal/SheetModal.spec.tsx +18 -1
- package/src/SheetModal/detents.ts +28 -0
- package/src/SheetModal/index.native.tsx +2 -3
- package/src/SheetModal/index.tsx +15 -5
- package/src/Tabs/Tabs.gutter.spec.tsx +1 -1
- package/src/Tabs/Tabs.panelHeight.spec.tsx +5 -5
- package/src/Tabs/Tabs.scroll.spec.tsx +5 -5
- package/src/Tabs/Tabs.stories.tsx +9 -9
- package/src/layouts/EmptyState.spec.tsx +33 -31
- package/src/layouts/EmptyState.stories.tsx +66 -3
- package/src/layouts/EmptyState.tsx +132 -42
- package/src/layouts/IdentityPlate.stories.tsx +150 -0
- package/src/layouts/IdentityPlate.tsx +117 -0
- package/src/layouts/StatusDot.tsx +53 -0
- package/src/layouts/index.tsx +13 -0
- package/types/CardHeader.d.ts +6 -1
- package/types/CardHeader.d.ts.map +1 -1
- package/types/SheetModal/detents.d.ts +21 -0
- package/types/SheetModal/detents.d.ts.map +1 -1
- package/types/SheetModal/index.d.ts +6 -1
- package/types/SheetModal/index.d.ts.map +1 -1
- package/types/SheetModal/index.native.d.ts.map +1 -1
- package/types/layouts/EmptyState.d.ts +17 -5
- package/types/layouts/EmptyState.d.ts.map +1 -1
- package/types/layouts/IdentityPlate.d.ts +26 -0
- package/types/layouts/IdentityPlate.d.ts.map +1 -0
- package/types/layouts/StatusDot.d.ts +13 -0
- package/types/layouts/StatusDot.d.ts.map +1 -0
- package/types/layouts/index.d.ts +2 -0
- package/types/layouts/index.d.ts.map +1 -1
|
@@ -2,7 +2,13 @@ import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
|
2
2
|
// Catalog Button (G-15 story honesty / LC-18): the raw tamagui action held a
|
|
3
3
|
// 9px radius at borderRadius:none and ignored the size token (UX-P06).
|
|
4
4
|
import { Button } from "@multiplatform.one/forms";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
LockSimpleIcon,
|
|
7
|
+
MagnifyingGlassIcon,
|
|
8
|
+
SparkleIcon,
|
|
9
|
+
TrayIcon,
|
|
10
|
+
WarningCircleIcon,
|
|
11
|
+
} from "@phosphor-icons/react";
|
|
6
12
|
import type { ReactNode } from "react";
|
|
7
13
|
import { YStack } from "tamagui";
|
|
8
14
|
import { EmptyState } from "./EmptyState";
|
|
@@ -23,7 +29,7 @@ const meta: Meta<typeof EmptyState> = {
|
|
|
23
29
|
docs: {
|
|
24
30
|
description: {
|
|
25
31
|
component:
|
|
26
|
-
"
|
|
32
|
+
"Centred state (HIG ContentUnavailableView, LC-171): a symbol in the secondary ink on no well, one short title at the section step, at most one line, one action. `loading` waits on a live source; `command` is the one CLI line a refusal gate needs. Prefer AsyncBoundary for async data views so empty chrome never renders on a failed load (DG-ST-01). First-use and filtered-empty are different states (Polaris); error is sober, one recovery action, no secondary (Primer).",
|
|
27
33
|
},
|
|
28
34
|
},
|
|
29
35
|
},
|
|
@@ -34,7 +40,7 @@ const meta: Meta<typeof EmptyState> = {
|
|
|
34
40
|
},
|
|
35
41
|
args: {
|
|
36
42
|
title: "Create your first record",
|
|
37
|
-
description: "Records you add
|
|
43
|
+
description: "Records you add show up here.",
|
|
38
44
|
},
|
|
39
45
|
};
|
|
40
46
|
export default meta;
|
|
@@ -161,3 +167,60 @@ export const Error: Story = {
|
|
|
161
167
|
</PageCanvas>
|
|
162
168
|
),
|
|
163
169
|
};
|
|
170
|
+
|
|
171
|
+
// ── States (LC-171, FZ-7970 r3) ─────────────────────────────────
|
|
172
|
+
// Clay on the round-2 states: "Still needs work right?" Each state is a
|
|
173
|
+
// symbol, one short title, at most one line and one action.
|
|
174
|
+
|
|
175
|
+
export const StatesEmpty: Story = {
|
|
176
|
+
name: "States — Empty",
|
|
177
|
+
render: () => (
|
|
178
|
+
<PageCanvas>
|
|
179
|
+
<EmptyState
|
|
180
|
+
icon={<SparkleIcon />}
|
|
181
|
+
title="No Pokémon yet"
|
|
182
|
+
action={<Button accent>Add Pokémon</Button>}
|
|
183
|
+
/>
|
|
184
|
+
</PageCanvas>
|
|
185
|
+
),
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export const StatesWaiting: Story = {
|
|
189
|
+
name: "States — Waiting",
|
|
190
|
+
render: () => (
|
|
191
|
+
<PageCanvas>
|
|
192
|
+
<EmptyState
|
|
193
|
+
loading
|
|
194
|
+
title="Waiting for events"
|
|
195
|
+
description="New events show up as they happen."
|
|
196
|
+
/>
|
|
197
|
+
</PageCanvas>
|
|
198
|
+
),
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export const StatesRefusal: Story = {
|
|
202
|
+
name: "States — Refusal",
|
|
203
|
+
render: () => (
|
|
204
|
+
<PageCanvas>
|
|
205
|
+
<EmptyState
|
|
206
|
+
icon={<LockSimpleIcon />}
|
|
207
|
+
title="Platform administrator required"
|
|
208
|
+
description="Create tenants from the host instead."
|
|
209
|
+
command="shc tenant create <name>"
|
|
210
|
+
/>
|
|
211
|
+
</PageCanvas>
|
|
212
|
+
),
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
export const StatesNotFound: Story = {
|
|
216
|
+
name: "States — Not found",
|
|
217
|
+
render: () => (
|
|
218
|
+
<PageCanvas>
|
|
219
|
+
<EmptyState
|
|
220
|
+
icon={<MagnifyingGlassIcon />}
|
|
221
|
+
title="No Pokémon named missingno"
|
|
222
|
+
action={<Button>Back to Pokémon</Button>}
|
|
223
|
+
/>
|
|
224
|
+
</PageCanvas>
|
|
225
|
+
),
|
|
226
|
+
};
|
|
@@ -1,31 +1,61 @@
|
|
|
1
|
-
import { IconSlot } from "@multiplatform.one/theme";
|
|
2
1
|
/**
|
|
3
|
-
* EmptyState —
|
|
4
|
-
*
|
|
2
|
+
* EmptyState — the centred empty, waiting, refusal and error state (HIG
|
|
3
|
+
* ContentUnavailableView, LC-171).
|
|
5
4
|
*
|
|
6
|
-
* Full-page:
|
|
7
|
-
*
|
|
8
|
-
* flex-fill, for tables and columns. `
|
|
9
|
-
*
|
|
5
|
+
* Full-page: a symbol in the secondary ink on no well → one short title at
|
|
6
|
+
* the section step → at most one line → one action. Below the default size
|
|
7
|
+
* token: quieter type, no flex-fill, for tables and columns. `loading` swaps
|
|
8
|
+
* the symbol for the house spinner (a live tail waiting for its first row).
|
|
9
|
+
* `command` is the one CLI line a refusal gate needs, mono with copy; it is
|
|
10
|
+
* not a second description. `intent="error"` is sober failure chrome
|
|
11
|
+
* (DG-ST-01) — never for a successful empty dataset.
|
|
10
12
|
*/
|
|
13
|
+
import { Button, Spinner } from "@multiplatform.one/forms";
|
|
14
|
+
import { CopyIcon } from "@phosphor-icons/react";
|
|
11
15
|
import {
|
|
16
|
+
IconSlot,
|
|
12
17
|
Intent,
|
|
13
18
|
readingWidthStyle,
|
|
14
19
|
sizeTokenStep,
|
|
20
|
+
useGlyphColor,
|
|
15
21
|
useResolvedKnobs,
|
|
16
22
|
warnBannedErrorWords,
|
|
17
23
|
} from "@multiplatform.one/theme";
|
|
18
24
|
import { useId, type ReactNode } from "react";
|
|
19
|
-
import {
|
|
20
|
-
|
|
25
|
+
import {
|
|
26
|
+
H2,
|
|
27
|
+
Paragraph,
|
|
28
|
+
type SizeTokens,
|
|
29
|
+
Text,
|
|
30
|
+
View,
|
|
31
|
+
XStack,
|
|
32
|
+
YStack,
|
|
33
|
+
isWeb,
|
|
34
|
+
type YStackProps,
|
|
35
|
+
} from "tamagui";
|
|
36
|
+
import { componentColors, sectionHeading } from "../componentColors";
|
|
37
|
+
import { NotifyRegion } from "../feedback/NotifyHost";
|
|
38
|
+
import { useCopyFeedback } from "../feedback/copy";
|
|
21
39
|
|
|
22
40
|
export interface EmptyStateProps extends Omit<YStackProps, "size"> {
|
|
41
|
+
/** One short title: what is true now ("No Pokémon yet"), not an instruction. */
|
|
23
42
|
title: string;
|
|
43
|
+
/**
|
|
44
|
+
* At most one line, and only when it says something the title doesn't
|
|
45
|
+
* (LC-171). A multi-line server reason (LC-96) keeps one paragraph per line.
|
|
46
|
+
*/
|
|
24
47
|
description?: string;
|
|
25
|
-
/**
|
|
48
|
+
/** Symbol above the title, in the secondary ink on no well. Decorative — hidden from AT. */
|
|
26
49
|
icon?: ReactNode;
|
|
27
|
-
/**
|
|
50
|
+
/** The one action. A second action is a smell; a state offers one way forward. */
|
|
28
51
|
action?: ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* The one CLI line a refusal gate needs (`shc tenant create <name>`): mono,
|
|
54
|
+
* with copy. Only where the gate names a command; never a second description.
|
|
55
|
+
*/
|
|
56
|
+
command?: string;
|
|
57
|
+
/** Waiting for the first row of a live source: the symbol is the spinner. */
|
|
58
|
+
loading?: boolean;
|
|
29
59
|
/**
|
|
30
60
|
* Visual intent. `error` marks sober failure chrome (DG-ST-01) — use via
|
|
31
61
|
* AsyncBoundary; never for a successful empty dataset.
|
|
@@ -39,8 +69,84 @@ export interface EmptyStateProps extends Omit<YStackProps, "size"> {
|
|
|
39
69
|
}
|
|
40
70
|
|
|
41
71
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
72
|
+
* The state's symbol: SF-symbol weight in the secondary ink, no well behind
|
|
73
|
+
* it (HIG ContentUnavailableView). It reads its ink inside the intent's theme,
|
|
74
|
+
* so an error symbol takes the error ramp without a hue literal (MPO-369).
|
|
75
|
+
*/
|
|
76
|
+
function StateSymbol({
|
|
77
|
+
icon,
|
|
78
|
+
loading,
|
|
79
|
+
small,
|
|
80
|
+
}: {
|
|
81
|
+
icon?: ReactNode;
|
|
82
|
+
loading?: boolean;
|
|
83
|
+
small: boolean;
|
|
84
|
+
}) {
|
|
85
|
+
const ink = useGlyphColor("$textMuted");
|
|
86
|
+
return (
|
|
87
|
+
<View
|
|
88
|
+
data-empty-symbol=""
|
|
89
|
+
alignItems="center"
|
|
90
|
+
justifyContent="center"
|
|
91
|
+
aria-hidden
|
|
92
|
+
{...(!isWeb ? { accessibilityElementsHidden: true } : null)}
|
|
93
|
+
{...(isWeb && ink ? ({ style: { color: ink } } as Record<string, unknown>) : {})}
|
|
94
|
+
>
|
|
95
|
+
{loading ? (
|
|
96
|
+
<Spinner px={small ? 24 : 36} color={ink} />
|
|
97
|
+
) : (
|
|
98
|
+
<IconSlot icon={icon} color={ink} size={small ? 28 : 44} />
|
|
99
|
+
)}
|
|
100
|
+
</View>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The refusal gate's one command: mono, one line, with copy. The confirm is
|
|
106
|
+
* notify() and the glyph never flips (DG-FB-01 / LC-16).
|
|
107
|
+
*/
|
|
108
|
+
function CommandLine({ command }: { command: string }) {
|
|
109
|
+
const { knobProps } = useResolvedKnobs();
|
|
110
|
+
const { region, copy } = useCopyFeedback();
|
|
111
|
+
return (
|
|
112
|
+
<YStack data-empty-command="" alignItems="center" {...readingWidthStyle()}>
|
|
113
|
+
<XStack
|
|
114
|
+
alignItems="center"
|
|
115
|
+
maxWidth="100%"
|
|
116
|
+
backgroundColor="$color3"
|
|
117
|
+
paddingLeft="$3"
|
|
118
|
+
paddingRight="$1"
|
|
119
|
+
paddingVertical="$1"
|
|
120
|
+
{...knobProps.containerRadius}
|
|
121
|
+
{...knobProps.gapSm}
|
|
122
|
+
>
|
|
123
|
+
<Text
|
|
124
|
+
{...knobProps.body}
|
|
125
|
+
fontFamily="$mono"
|
|
126
|
+
color={componentColors.text.primary}
|
|
127
|
+
numberOfLines={1}
|
|
128
|
+
flexShrink={1}
|
|
129
|
+
>
|
|
130
|
+
{command}
|
|
131
|
+
</Text>
|
|
132
|
+
<Button
|
|
133
|
+
nested
|
|
134
|
+
chromeless
|
|
135
|
+
circular
|
|
136
|
+
flexShrink={0}
|
|
137
|
+
icon={<CopyIcon />}
|
|
138
|
+
aria-label="Copy to clipboard"
|
|
139
|
+
onPress={() => void copy(command)}
|
|
140
|
+
/>
|
|
141
|
+
</XStack>
|
|
142
|
+
<NotifyRegion scope="field" region={region} size="$3" />
|
|
143
|
+
</YStack>
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Centered empty, waiting, refusal or error state. Use for "no data", "not
|
|
149
|
+
* configured", "permission denied" and "waiting for events".
|
|
44
150
|
*
|
|
45
151
|
* Prefer `<AsyncBoundary>` for async data views so empty chrome can never
|
|
46
152
|
* render on a failed load (DG-ST-01).
|
|
@@ -50,6 +156,8 @@ export function EmptyState({
|
|
|
50
156
|
description,
|
|
51
157
|
icon,
|
|
52
158
|
action,
|
|
159
|
+
command,
|
|
160
|
+
loading = false,
|
|
53
161
|
intent = "neutral",
|
|
54
162
|
size,
|
|
55
163
|
children,
|
|
@@ -59,8 +167,8 @@ export function EmptyState({
|
|
|
59
167
|
const small = sizeTokenStep(knobProps.sizeToken) < 0;
|
|
60
168
|
const titleId = useId();
|
|
61
169
|
const isError = intent === "error";
|
|
62
|
-
//
|
|
63
|
-
//
|
|
170
|
+
// Symbol | copy | action are three bands; title and line sit tighter than
|
|
171
|
+
// the bands. Inline (table/column) takes the within-group gap.
|
|
64
172
|
const frameGap = small ? knobProps.gap : knobProps.gapLg;
|
|
65
173
|
// One paragraph per line: a web paragraph folds a newline into a space, and
|
|
66
174
|
// a multi-line server reason (LC-96) then reads as one run-on sentence.
|
|
@@ -74,29 +182,8 @@ export function EmptyState({
|
|
|
74
182
|
warnBannedErrorWords(description, { component: "EmptyState" });
|
|
75
183
|
}
|
|
76
184
|
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
borderWidth: _wellEdgeWidth,
|
|
80
|
-
...wellRadius
|
|
81
|
-
} = knobProps.borderRadius;
|
|
82
|
-
|
|
83
|
-
const well = icon ? (
|
|
84
|
-
<YStack
|
|
85
|
-
alignItems="center"
|
|
86
|
-
justifyContent="center"
|
|
87
|
-
backgroundColor={componentColors.interactive.background}
|
|
88
|
-
// R2e: an icon well rides the radius scale (DEFAULT), the same
|
|
89
|
-
// resolution KPICard's well takes. Only the radius half of the
|
|
90
|
-
// fragment applies — the well paints no edge. Its inset still scales
|
|
91
|
-
// with the size token (spec: empty icon well consumes sizeToken).
|
|
92
|
-
{...wellRadius}
|
|
93
|
-
padding={knobProps.sizeToken as any}
|
|
94
|
-
aria-hidden
|
|
95
|
-
{...(!isWeb ? { accessibilityElementsHidden: true } : null)}
|
|
96
|
-
>
|
|
97
|
-
<IconSlot icon={icon} />
|
|
98
|
-
</YStack>
|
|
99
|
-
) : null;
|
|
185
|
+
const symbol =
|
|
186
|
+
icon || loading ? <StateSymbol icon={icon} loading={loading} small={small} /> : null;
|
|
100
187
|
|
|
101
188
|
const titleNode = small ? (
|
|
102
189
|
<Paragraph
|
|
@@ -113,6 +200,7 @@ export function EmptyState({
|
|
|
113
200
|
) : (
|
|
114
201
|
<H2
|
|
115
202
|
{...(isWeb ? { id: titleId } : { nativeID: titleId })}
|
|
203
|
+
{...sectionHeading}
|
|
116
204
|
{...knobProps.heading}
|
|
117
205
|
textAlign="center"
|
|
118
206
|
margin={0}
|
|
@@ -126,16 +214,18 @@ export function EmptyState({
|
|
|
126
214
|
|
|
127
215
|
return (
|
|
128
216
|
<YStack
|
|
129
|
-
|
|
217
|
+
flexGrow={small ? undefined : 1}
|
|
130
218
|
width="100%"
|
|
131
219
|
alignItems="center"
|
|
132
220
|
justifyContent="center"
|
|
133
221
|
data-empty-intent={intent}
|
|
134
222
|
data-size-token={knobProps.sizeToken}
|
|
223
|
+
{...(loading ? { "data-empty-loading": "" } : null)}
|
|
135
224
|
{...(isWeb
|
|
136
225
|
? {
|
|
137
226
|
role: isError ? "alert" : "status",
|
|
138
227
|
"aria-labelledby": titleId,
|
|
228
|
+
...(loading ? { "aria-busy": true } : null),
|
|
139
229
|
...(!isError ? { "aria-live": "polite" as const } : null),
|
|
140
230
|
}
|
|
141
231
|
: {
|
|
@@ -146,15 +236,14 @@ export function EmptyState({
|
|
|
146
236
|
{...frameGap}
|
|
147
237
|
{...rest}
|
|
148
238
|
>
|
|
149
|
-
{
|
|
239
|
+
{symbol && isError ? <Intent name="error">{symbol}</Intent> : symbol}
|
|
150
240
|
<YStack alignItems="center" gap="$1" {...readingWidthStyle()}>
|
|
151
241
|
{titleNode}
|
|
152
242
|
{descriptionLines.map((line, index) => (
|
|
153
243
|
<Paragraph
|
|
154
244
|
key={`${index}:${line}`}
|
|
155
245
|
{...knobProps.body}
|
|
156
|
-
color=
|
|
157
|
-
fontSize={knobProps.label.fontSize}
|
|
246
|
+
color="$textMuted"
|
|
158
247
|
textAlign="center"
|
|
159
248
|
margin={0}
|
|
160
249
|
width="100%"
|
|
@@ -163,6 +252,7 @@ export function EmptyState({
|
|
|
163
252
|
</Paragraph>
|
|
164
253
|
))}
|
|
165
254
|
</YStack>
|
|
255
|
+
{command ? <CommandLine command={command} /> : null}
|
|
166
256
|
{action ? (
|
|
167
257
|
<XStack
|
|
168
258
|
{...knobProps.gap}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
|
+
import { DescriptionList } from "@multiplatform.one/forms";
|
|
3
|
+
import {
|
|
4
|
+
ArrowsClockwiseIcon,
|
|
5
|
+
BuildingsIcon,
|
|
6
|
+
CubeIcon,
|
|
7
|
+
HardDrivesIcon,
|
|
8
|
+
PackageIcon,
|
|
9
|
+
StackIcon,
|
|
10
|
+
TagIcon,
|
|
11
|
+
TreeStructureIcon,
|
|
12
|
+
} from "@phosphor-icons/react";
|
|
13
|
+
import { useState } from "react";
|
|
14
|
+
import { YStack } from "tamagui";
|
|
15
|
+
import { Avatar } from "../Avatar";
|
|
16
|
+
import { Card } from "../Card";
|
|
17
|
+
import { SheetModal } from "../SheetModal";
|
|
18
|
+
import { Tabs } from "../Tabs";
|
|
19
|
+
import { Paragraph } from "../Text";
|
|
20
|
+
import { IdentityPlate } from "./IdentityPlate";
|
|
21
|
+
import { StatusDot } from "./StatusDot";
|
|
22
|
+
|
|
23
|
+
// The app's own art (deploy/shc/keycloak/icon.svg); the Avatar falls back to
|
|
24
|
+
// initials only when an app has none.
|
|
25
|
+
const keycloakArt = `data:image/svg+xml;utf8,${encodeURIComponent(
|
|
26
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="167.117" height="150.658" viewBox="0 0 44.216 39.861"><path d="m88.61 138.456 5.716-9.865 23.018-.004 5.686 9.965.007 19.932-5.691 9.957-23.012.008-5.782-9.965z" style="display:inline;fill:#4d4d4d;fill-opacity:1;stroke-width:.264583" transform="translate(-82.815 -128.588)"/><path d="M88.552 158.481h10.375l-5.699-10.041 4.634-9.982-9.252-.002-5.795 10.065" style="fill:#ededed;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.330729" transform="translate(-82.815 -128.588)"/><path d="M102.073 158.481h7.582l6.706-9.773-6.589-10.156h-8.921l-5.373 9.814z" style="fill:#e0e0e0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.330729" transform="translate(-82.815 -128.588)"/><path d="m82.815 148.52 5.738 9.964h10.374l-5.636-9.93z" style="fill:#acacac;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.330729" transform="translate(-82.815 -128.588)"/><path d="m95.589 148.522 6.484 9.963h7.582l6.601-9.959z" style="fill:#9e9e9e;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.330729" transform="translate(-82.815 -128.588)"/><path d="m98.157 148.529-1.958.569-1.877-.572 7.667-13.288 1.918 3.316" style="fill:#00b8e3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.330729" transform="translate(-82.815 -128.588)"/><path d="m103.9 158.482-1.909 3.332-5.093-5.487-2.58-7.797v-.004h3.838" style="fill:#33c6e9;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.330729" transform="translate(-82.815 -128.588)"/><path d="M94.322 148.526h-.003v.003l-1.918 3.322-1.925-3.307 1.952-3.386 5.728-9.92h3.834" style="fill:#008aaa;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.330729" transform="translate(-82.815 -128.588)"/><path d="M115.42 158.481h11.611l-.007-19.93h-11.605z" style="fill:#d4d4d4;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.330729" transform="translate(-82.815 -128.588)"/><path d="M115.42 148.554v9.93h11.59v-9.93z" style="fill:#919191;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.330729" transform="translate(-82.815 -128.588)"/><path d="M101.992 161.817h-3.836l-5.755-9.966 1.918-3.321z" style="fill:#00b8e3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.330729" transform="translate(-82.815 -128.588)"/><path d="m117.333 148.526-7.669 13.289c-.705-1.036-1.913-3.331-1.913-3.331l5.753-9.959z" style="fill:#008aaa;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.330729" transform="translate(-82.815 -128.588)"/><path d="m113.495 161.815-3.831-.001 7.67-13.288 1.917-3.317 1.921 3.34m-3.839-.023h-3.828l-5.755-9.973 1.905-3.314 4.658 5.922z" style="fill:#00b8e3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.330729" transform="translate(-82.815 -128.588)"/><path d="M119.25 145.205v.003l-1.917 3.318-7.677-13.286 3.841.002z" style="fill:#33c6e9;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.330729" transform="translate(-82.815 -128.588)"/></svg>',
|
|
27
|
+
)}`;
|
|
28
|
+
|
|
29
|
+
const meta: Meta<typeof IdentityPlate> = {
|
|
30
|
+
title: "Components/IdentityPlate",
|
|
31
|
+
component: IdentityPlate,
|
|
32
|
+
parameters: {
|
|
33
|
+
status: { type: "beta" },
|
|
34
|
+
docs: {
|
|
35
|
+
description: {
|
|
36
|
+
component:
|
|
37
|
+
"What a sheet or detail page is about, above its tabs (LC-170 NO-OVERVIEW-TAB): art, the name at the section step, a status line with its dot, and the key facts at the label role. The tabs under it start at real content, so no tab is an Overview.",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export default meta;
|
|
43
|
+
|
|
44
|
+
type Story = StoryObj<typeof IdentityPlate>;
|
|
45
|
+
|
|
46
|
+
const facts = [
|
|
47
|
+
{ icon: <TagIcon />, label: "26.7" },
|
|
48
|
+
{ icon: <TreeStructureIcon />, label: "default" },
|
|
49
|
+
{ icon: <BuildingsIcon />, label: "master" },
|
|
50
|
+
{ icon: <HardDrivesIcon />, label: "aa1n1" },
|
|
51
|
+
{ icon: <CubeIcon />, label: "docker" },
|
|
52
|
+
{ icon: <ArrowsClockwiseIcon />, label: "1h ago" },
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
export const Main: Story = {
|
|
56
|
+
render: () => (
|
|
57
|
+
<YStack padding="$4" backgroundColor="$background">
|
|
58
|
+
<IdentityPlate
|
|
59
|
+
icon={<Avatar name="Keycloak" src={keycloakArt} size="$5" />}
|
|
60
|
+
title="keycloak"
|
|
61
|
+
status="Running"
|
|
62
|
+
statusTone="positive"
|
|
63
|
+
facts={facts}
|
|
64
|
+
/>
|
|
65
|
+
</YStack>
|
|
66
|
+
),
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const image = "registry.selfhostedcloud.org/shc/keycloak:26.6.1@sha256:9f2c41a7e0b3";
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The SHC stack sheet without its Overview tab. Clay on round 2: "I told you
|
|
73
|
+
* no overview section". The facts the Overview held ride the plate, and the
|
|
74
|
+
* first tab is the stack's services.
|
|
75
|
+
*/
|
|
76
|
+
function StackSheet() {
|
|
77
|
+
const [open, setOpen] = useState(true);
|
|
78
|
+
return (
|
|
79
|
+
<YStack minHeight={844} backgroundColor="$background">
|
|
80
|
+
<SheetModal
|
|
81
|
+
open={open}
|
|
82
|
+
onOpenChange={setOpen}
|
|
83
|
+
header={
|
|
84
|
+
<IdentityPlate
|
|
85
|
+
icon={<Avatar name="Keycloak" src={keycloakArt} size="$5" />}
|
|
86
|
+
title="keycloak"
|
|
87
|
+
status="Running"
|
|
88
|
+
statusTone="positive"
|
|
89
|
+
facts={facts}
|
|
90
|
+
/>
|
|
91
|
+
}
|
|
92
|
+
>
|
|
93
|
+
<Tabs
|
|
94
|
+
defaultValue="services"
|
|
95
|
+
items={[
|
|
96
|
+
{
|
|
97
|
+
value: "services",
|
|
98
|
+
label: "Services",
|
|
99
|
+
content: (
|
|
100
|
+
<Card>
|
|
101
|
+
<Card.Header status={<StatusDot tone="positive">Running</StatusDot>}>
|
|
102
|
+
keycloak
|
|
103
|
+
</Card.Header>
|
|
104
|
+
<DescriptionList
|
|
105
|
+
placement="inline"
|
|
106
|
+
maxWidth="fluid"
|
|
107
|
+
items={[
|
|
108
|
+
{ icon: <StackIcon />, term: "Replicas", value: "1/1" },
|
|
109
|
+
{ icon: <PackageIcon />, term: "Image", value: image, identifier: true },
|
|
110
|
+
]}
|
|
111
|
+
/>
|
|
112
|
+
</Card>
|
|
113
|
+
),
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
value: "backups",
|
|
117
|
+
label: "Backups",
|
|
118
|
+
content: (
|
|
119
|
+
<DescriptionList
|
|
120
|
+
placement="inline"
|
|
121
|
+
maxWidth="fluid"
|
|
122
|
+
items={[
|
|
123
|
+
{ term: "1h ago", value: "1.4 MiB" },
|
|
124
|
+
{ term: "2h ago", value: "1.4 MiB" },
|
|
125
|
+
]}
|
|
126
|
+
/>
|
|
127
|
+
),
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
value: "logs",
|
|
131
|
+
label: "Logs",
|
|
132
|
+
content: <Paragraph>Listening on :8080 (http)</Paragraph>,
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
value: "telemetry",
|
|
136
|
+
label: "Telemetry",
|
|
137
|
+
content: <Paragraph>CPU 2%, memory 512 MiB</Paragraph>,
|
|
138
|
+
},
|
|
139
|
+
]}
|
|
140
|
+
/>
|
|
141
|
+
</SheetModal>
|
|
142
|
+
</YStack>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export const StackSheetStory: Story = {
|
|
147
|
+
name: "Stack sheet (LC-170)",
|
|
148
|
+
parameters: { layout: "fullscreen" },
|
|
149
|
+
render: () => <StackSheet />,
|
|
150
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IdentityPlate — what a sheet or detail page is about, above its tabs.
|
|
3
|
+
*
|
|
4
|
+
* LC-170 NO-OVERVIEW-TAB: the identity (art, name, status line, key facts)
|
|
5
|
+
* rides the header, so the tabs start at real content and no tab or section
|
|
6
|
+
* is an "Overview". LC-169 CARD-HIERARCHY sets its three levels: the name at
|
|
7
|
+
* the section step and heading weight, the status line in the body, the facts
|
|
8
|
+
* at the label role in the secondary ink with their glyphs.
|
|
9
|
+
*/
|
|
10
|
+
import { IconSlot, useGlyphColor, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
11
|
+
import type { ReactNode } from "react";
|
|
12
|
+
import { SizableText, Text, View, XStack, YStack, isWeb } from "tamagui";
|
|
13
|
+
import { sectionHeading } from "../componentColors";
|
|
14
|
+
import { StatusMark, type StatusTone } from "./StatusDot";
|
|
15
|
+
|
|
16
|
+
export type IdentityPlateTone = StatusTone;
|
|
17
|
+
|
|
18
|
+
export interface IdentityPlateFact {
|
|
19
|
+
/** Stable key; defaults to the label. */
|
|
20
|
+
key?: string;
|
|
21
|
+
/** A glyph that names the fact's kind (host, runtime, time). */
|
|
22
|
+
icon?: ReactNode;
|
|
23
|
+
label: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface IdentityPlateProps {
|
|
27
|
+
title: string;
|
|
28
|
+
/** Leading art: an app icon, an avatar, a sprite. */
|
|
29
|
+
icon?: ReactNode;
|
|
30
|
+
/** The status beside its dot, one short word: "Running". Other facts go in `facts`. */
|
|
31
|
+
status?: string;
|
|
32
|
+
/** The status dot's tone. Omitted: no dot. */
|
|
33
|
+
statusTone?: IdentityPlateTone;
|
|
34
|
+
/** Key facts, one wrapping line under the status. */
|
|
35
|
+
facts?: readonly IdentityPlateFact[];
|
|
36
|
+
/** Header actions on the name's row (close, menu). */
|
|
37
|
+
trailing?: ReactNode;
|
|
38
|
+
testID?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function FactGlyph({ icon }: { icon: ReactNode }) {
|
|
42
|
+
const ink = useGlyphColor("$textMuted");
|
|
43
|
+
return (
|
|
44
|
+
<View
|
|
45
|
+
aria-hidden
|
|
46
|
+
{...(isWeb && ink ? ({ style: { color: ink } } as Record<string, unknown>) : {})}
|
|
47
|
+
>
|
|
48
|
+
<IconSlot icon={icon} color={ink} size={14} />
|
|
49
|
+
</View>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function IdentityPlate({
|
|
54
|
+
title,
|
|
55
|
+
icon,
|
|
56
|
+
status,
|
|
57
|
+
statusTone,
|
|
58
|
+
facts = [],
|
|
59
|
+
trailing,
|
|
60
|
+
testID,
|
|
61
|
+
}: IdentityPlateProps) {
|
|
62
|
+
const { knobProps } = useResolvedKnobs();
|
|
63
|
+
return (
|
|
64
|
+
<YStack data-mpo-identity-plate="" data-testid={testID} width="100%" {...knobProps.gap}>
|
|
65
|
+
<XStack alignItems="center" width="100%" {...knobProps.gap}>
|
|
66
|
+
{icon ? (
|
|
67
|
+
<View flexShrink={0} data-slot="art">
|
|
68
|
+
{icon}
|
|
69
|
+
</View>
|
|
70
|
+
) : null}
|
|
71
|
+
<YStack flex={1} minWidth={0}>
|
|
72
|
+
<SizableText
|
|
73
|
+
role="heading"
|
|
74
|
+
aria-level={2}
|
|
75
|
+
{...sectionHeading}
|
|
76
|
+
{...knobProps.heading}
|
|
77
|
+
numberOfLines={1}
|
|
78
|
+
data-slot="title"
|
|
79
|
+
>
|
|
80
|
+
{title}
|
|
81
|
+
</SizableText>
|
|
82
|
+
{status ? (
|
|
83
|
+
<XStack alignItems="center" minWidth={0} {...knobProps.gapSm} data-slot="status">
|
|
84
|
+
{statusTone ? <StatusMark tone={statusTone} /> : null}
|
|
85
|
+
<Text {...knobProps.body} color="$textMuted" numberOfLines={1} flexShrink={1}>
|
|
86
|
+
{status}
|
|
87
|
+
</Text>
|
|
88
|
+
</XStack>
|
|
89
|
+
) : null}
|
|
90
|
+
</YStack>
|
|
91
|
+
{trailing ? (
|
|
92
|
+
<XStack flexShrink={0} alignItems="center" {...knobProps.gapSm}>
|
|
93
|
+
{trailing}
|
|
94
|
+
</XStack>
|
|
95
|
+
) : null}
|
|
96
|
+
</XStack>
|
|
97
|
+
{facts.length > 0 ? (
|
|
98
|
+
<XStack
|
|
99
|
+
flexWrap="wrap"
|
|
100
|
+
alignItems="center"
|
|
101
|
+
columnGap={knobProps.gap.gap as never}
|
|
102
|
+
rowGap={knobProps.gapSm.gap as never}
|
|
103
|
+
data-slot="facts"
|
|
104
|
+
>
|
|
105
|
+
{facts.map((fact) => (
|
|
106
|
+
<XStack key={fact.key ?? fact.label} alignItems="center" gap="$1.5">
|
|
107
|
+
{fact.icon ? <FactGlyph icon={fact.icon} /> : null}
|
|
108
|
+
<Text {...knobProps.textRole.meta} numberOfLines={1}>
|
|
109
|
+
{fact.label}
|
|
110
|
+
</Text>
|
|
111
|
+
</XStack>
|
|
112
|
+
))}
|
|
113
|
+
</XStack>
|
|
114
|
+
) : null}
|
|
115
|
+
</YStack>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StatusDot — a status as a tone dot and one short word (LC-169).
|
|
3
|
+
*
|
|
4
|
+
* It rides beside a title (`Card.Header status`) or as a fact row's value, so
|
|
5
|
+
* the tone says ok / warning / failing at a glance and the word stays short.
|
|
6
|
+
* The word is the footnote size in the secondary ink; the dot carries the hue.
|
|
7
|
+
*/
|
|
8
|
+
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
9
|
+
import type { ReactNode } from "react";
|
|
10
|
+
import { Text, View, XStack } from "tamagui";
|
|
11
|
+
|
|
12
|
+
export type StatusTone = "positive" | "warning" | "critical" | "neutral";
|
|
13
|
+
|
|
14
|
+
export const statusToneInk: Record<StatusTone, string> = {
|
|
15
|
+
positive: "$green9",
|
|
16
|
+
warning: "$yellow9",
|
|
17
|
+
critical: "$red9",
|
|
18
|
+
neutral: "$color9",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export function StatusMark({ tone }: { tone: StatusTone }) {
|
|
22
|
+
return (
|
|
23
|
+
<View
|
|
24
|
+
width={8}
|
|
25
|
+
height={8}
|
|
26
|
+
borderRadius={4}
|
|
27
|
+
flexShrink={0}
|
|
28
|
+
backgroundColor={statusToneInk[tone] as never}
|
|
29
|
+
data-tone={tone}
|
|
30
|
+
aria-hidden
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface StatusDotProps {
|
|
36
|
+
tone?: StatusTone;
|
|
37
|
+
/** One short word: "OK", "Degraded", "Down". */
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function StatusDot({ tone = "neutral", children }: StatusDotProps) {
|
|
42
|
+
const { knobProps } = useResolvedKnobs();
|
|
43
|
+
return (
|
|
44
|
+
<XStack data-mpo-status-dot="" alignItems="center" flexShrink={0} {...knobProps.gapSm}>
|
|
45
|
+
<StatusMark tone={tone} />
|
|
46
|
+
{children != null ? (
|
|
47
|
+
<Text {...knobProps.textRole.meta} numberOfLines={1}>
|
|
48
|
+
{children}
|
|
49
|
+
</Text>
|
|
50
|
+
) : null}
|
|
51
|
+
</XStack>
|
|
52
|
+
);
|
|
53
|
+
}
|