@multiplatform.one/components 7.75.0 → 7.77.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.cjs +23 -37
- package/dist/cjs/Accordion/index.native.js +33 -47
- package/dist/cjs/Accordion/index.native.js.map +1 -1
- package/dist/cjs/CardHeader.cjs +1 -0
- package/dist/cjs/CardHeader.native.js +1 -0
- package/dist/cjs/CardHeader.native.js.map +1 -1
- package/dist/cjs/CopyField/CopyMenuButton.cjs +60 -0
- package/dist/cjs/CopyField/CopyMenuButton.native.js +69 -0
- package/dist/cjs/CopyField/CopyMenuButton.native.js.map +1 -0
- package/dist/cjs/CopyField/index.cjs +3 -1
- package/dist/cjs/CopyField/index.native.js +3 -1
- package/dist/cjs/CopyField/index.native.js.map +1 -1
- package/dist/cjs/layouts/StatusGlyphStrip.cjs +109 -0
- package/dist/cjs/layouts/StatusGlyphStrip.native.js +118 -0
- package/dist/cjs/layouts/StatusGlyphStrip.native.js.map +1 -0
- package/dist/cjs/layouts/index.cjs +2 -0
- package/dist/cjs/layouts/index.native.js +2 -0
- package/dist/cjs/layouts/index.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +119 -2
- package/dist/cjs/layouts/page.native.js +122 -2
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/screenScroll.cjs +20 -0
- package/dist/cjs/layouts/screenScroll.native.js +29 -0
- package/dist/cjs/layouts/screenScroll.native.js.map +1 -1
- package/dist/cjs/layouts/sidebar.cjs +28 -4
- package/dist/cjs/layouts/sidebar.native.js +32 -5
- package/dist/cjs/layouts/sidebar.native.js.map +1 -1
- package/dist/cjs/views/ListRow.cjs +2 -1
- package/dist/cjs/views/ListRow.native.js +2 -1
- package/dist/cjs/views/ListRow.native.js.map +1 -1
- package/dist/esm/Accordion/index.mjs +23 -37
- package/dist/esm/Accordion/index.mjs.map +1 -1
- package/dist/esm/Accordion/index.native.js +33 -47
- package/dist/esm/Accordion/index.native.js.map +1 -1
- package/dist/esm/CardHeader.mjs +1 -0
- package/dist/esm/CardHeader.mjs.map +1 -1
- package/dist/esm/CardHeader.native.js +1 -0
- package/dist/esm/CardHeader.native.js.map +1 -1
- package/dist/esm/CopyField/CopyMenuButton.mjs +35 -0
- package/dist/esm/CopyField/CopyMenuButton.mjs.map +1 -0
- package/dist/esm/CopyField/CopyMenuButton.native.js +41 -0
- package/dist/esm/CopyField/CopyMenuButton.native.js.map +1 -0
- package/dist/esm/CopyField/index.mjs +2 -1
- package/dist/esm/CopyField/index.mjs.map +1 -1
- package/dist/esm/CopyField/index.native.js +2 -1
- package/dist/esm/CopyField/index.native.js.map +1 -1
- package/dist/esm/layouts/StatusGlyphStrip.mjs +84 -0
- package/dist/esm/layouts/StatusGlyphStrip.mjs.map +1 -0
- package/dist/esm/layouts/StatusGlyphStrip.native.js +90 -0
- package/dist/esm/layouts/StatusGlyphStrip.native.js.map +1 -0
- package/dist/esm/layouts/index.mjs +2 -1
- package/dist/esm/layouts/index.mjs.map +1 -1
- package/dist/esm/layouts/index.native.js +2 -1
- package/dist/esm/layouts/index.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +120 -4
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +123 -4
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/screenScroll.mjs +21 -2
- package/dist/esm/layouts/screenScroll.mjs.map +1 -1
- package/dist/esm/layouts/screenScroll.native.js +30 -2
- package/dist/esm/layouts/screenScroll.native.js.map +1 -1
- package/dist/esm/layouts/sidebar.mjs +28 -4
- package/dist/esm/layouts/sidebar.mjs.map +1 -1
- package/dist/esm/layouts/sidebar.native.js +32 -5
- package/dist/esm/layouts/sidebar.native.js.map +1 -1
- package/dist/esm/views/ListRow.mjs +2 -1
- package/dist/esm/views/ListRow.mjs.map +1 -1
- package/dist/esm/views/ListRow.native.js +2 -1
- package/dist/esm/views/ListRow.native.js.map +1 -1
- package/dist/jsx/Accordion/index.mjs +23 -37
- package/dist/jsx/Accordion/index.mjs.map +1 -1
- package/dist/jsx/Accordion/index.native.js +34 -48
- 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 +1 -0
- package/dist/jsx/CardHeader.mjs.map +1 -1
- package/dist/jsx/CardHeader.native.js +1 -0
- 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/CopyMenuButton.mjs +35 -0
- package/dist/jsx/CopyField/CopyMenuButton.mjs.map +1 -0
- package/dist/jsx/CopyField/CopyMenuButton.native.js +69 -0
- package/dist/jsx/CopyField/CopyMenuButton.native.js.map +1 -0
- package/dist/jsx/CopyField/index.mjs +2 -1
- package/dist/jsx/CopyField/index.mjs.map +1 -1
- package/dist/jsx/CopyField/index.native.js +3 -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.native.js +1 -1
- package/dist/jsx/Pagination.native.js.map +1 -1
- package/dist/jsx/Popover.native.js +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/SchemeToggle/index.native.js +1 -1
- package/dist/jsx/SchemeToggle/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.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/useSheetFrameFocus.native.js.map +1 -1
- package/dist/jsx/Skeleton/index.native.js.map +1 -1
- package/dist/jsx/SkipLink/index.native.js.map +1 -1
- package/dist/jsx/SortableList/SortableHandle.native.js.map +1 -1
- package/dist/jsx/SortableList/index.native.js.map +1 -1
- package/dist/jsx/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/jsx/Tabs/index.native.js +1 -1
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/Text.native.js.map +1 -1
- package/dist/jsx/ThemePresetPicker/index.native.js +2 -2
- package/dist/jsx/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/jsx/Toast/index.native.js.map +1 -1
- package/dist/jsx/Toast/store.native.js.map +1 -1
- package/dist/jsx/Tooltip/nativePress.native.js.map +1 -1
- package/dist/jsx/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/jsx/TreeSelect/index.native.js +1 -1
- package/dist/jsx/TreeSelect/index.native.js.map +1 -1
- package/dist/jsx/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/jsx/Video/PlayerChrome.native.js.map +1 -1
- package/dist/jsx/Video/VideoFrame.native.js.map +1 -1
- package/dist/jsx/Video/types.native.js.map +1 -1
- package/dist/jsx/Wheel/index.native.js.map +1 -1
- package/dist/jsx/Wizard/index.native.js +2 -2
- package/dist/jsx/Wizard/index.native.js.map +1 -1
- package/dist/jsx/actions/ActionBar.native.js.map +1 -1
- package/dist/jsx/actions/DangerSection.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.native.js +1 -1
- package/dist/jsx/actions/StandardAction.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/MpoTabHost.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.native.js +1 -1
- package/dist/jsx/charts/ChartDataView.native.js.map +1 -1
- package/dist/jsx/charts/ChartSurface.native.js.map +1 -1
- package/dist/jsx/charts/LineChart.native.js.map +1 -1
- package/dist/jsx/charts/PieChart.native.js.map +1 -1
- package/dist/jsx/charts/Sparkline.native.js.map +1 -1
- package/dist/jsx/charts/accessibility.native.js.map +1 -1
- package/dist/jsx/charts/chartHeight.native.js.map +1 -1
- package/dist/jsx/charts/composeChart.native.js.map +1 -1
- package/dist/jsx/charts/index.native.js.map +1 -1
- package/dist/jsx/charts/math.native.js.map +1 -1
- package/dist/jsx/charts/series.native.js.map +1 -1
- package/dist/jsx/charts/svg.native.js.map +1 -1
- package/dist/jsx/charts/types.native.js.map +1 -1
- package/dist/jsx/charts/useChartTheme.native.js.map +1 -1
- package/dist/jsx/code/Code/index.native.js.map +1 -1
- package/dist/jsx/code/CodeBlock/index.native.js +7 -7
- package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
- package/dist/jsx/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
- package/dist/jsx/code/Pre/index.native.js.map +1 -1
- package/dist/jsx/code/index.native.js +5 -5
- package/dist/jsx/code/index.native.js.map +1 -1
- package/dist/jsx/componentColors.native.js.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/jsx/feedback/NotifyHost.native.js +2 -2
- package/dist/jsx/feedback/NotifyHost.native.js.map +1 -1
- package/dist/jsx/feedback/copy.native.js.map +1 -1
- package/dist/jsx/feedback/index.native.js.map +1 -1
- package/dist/jsx/feedback/notify.native.js.map +1 -1
- package/dist/jsx/feedback/route.native.js.map +1 -1
- package/dist/jsx/feedback/store.native.js.map +1 -1
- package/dist/jsx/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.native.js +36 -36
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/knobImmuneExports.native.js.map +1 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js +2 -2
- package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/jsx/layouts/Debug/index.native.js.map +1 -1
- package/dist/jsx/layouts/EmptyState.native.js.map +1 -1
- package/dist/jsx/layouts/IdentityPlate.native.js.map +1 -1
- package/dist/jsx/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/jsx/layouts/PageTemplates.native.js.map +1 -1
- package/dist/jsx/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/jsx/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/jsx/layouts/StatusDot.native.js.map +1 -1
- package/dist/jsx/layouts/StatusGlyphStrip.mjs +84 -0
- package/dist/jsx/layouts/StatusGlyphStrip.mjs.map +1 -0
- package/dist/jsx/layouts/StatusGlyphStrip.native.js +118 -0
- package/dist/jsx/layouts/StatusGlyphStrip.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/bottomAccessory.native.js.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/jsx/layouts/index.mjs +2 -1
- package/dist/jsx/layouts/index.mjs.map +1 -1
- package/dist/jsx/layouts/index.native.js +5 -3
- package/dist/jsx/layouts/index.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +120 -4
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +124 -4
- 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.mjs +21 -2
- package/dist/jsx/layouts/screenScroll.mjs.map +1 -1
- package/dist/jsx/layouts/screenScroll.native.js +29 -0
- 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.mjs +28 -4
- package/dist/jsx/layouts/sidebar.mjs.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js +33 -6
- 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.native.js.map +1 -1
- package/dist/jsx/views/ListRow.mjs +2 -1
- package/dist/jsx/views/ListRow.mjs.map +1 -1
- package/dist/jsx/views/ListRow.native.js +2 -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.native.js +2 -2
- 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/Accordion/Accordion.spec.tsx +6 -7
- package/src/Accordion/index.tsx +30 -45
- package/src/Card.stories.tsx +82 -54
- package/src/CardHeader.spec.tsx +11 -8
- package/src/CardHeader.tsx +3 -0
- package/src/ContextMenu/ContextMenu.spec.tsx +4 -5
- package/src/CopyField/CopyMenuButton.spec.tsx +28 -0
- package/src/CopyField/CopyMenuButton.tsx +50 -0
- package/src/CopyField/index.tsx +2 -0
- package/src/DropdownMenu/DropdownMenu.spec.tsx +3 -4
- package/src/SheetModal/SheetModal.menus.spec.tsx +2 -2
- package/src/checkedRow.native-press.spec.tsx +136 -0
- package/src/checkedRow.spec.tsx +4 -3
- package/src/icons/slots.nativeInk.spec.tsx +1 -1
- package/src/layouts/Sidebar.spec.tsx +43 -0
- package/src/layouts/StatusGlyphStrip.spec.tsx +40 -0
- package/src/layouts/StatusGlyphStrip.tsx +96 -0
- package/src/layouts/index.tsx +1 -0
- package/src/layouts/navBar.spec.tsx +28 -0
- package/src/layouts/page.tsx +127 -4
- package/src/layouts/screenNesting.spec.tsx +201 -0
- package/src/layouts/screenScroll.tsx +23 -0
- package/src/layouts/sidebar.tsx +33 -1
- package/src/views/ListGroup.spec.tsx +14 -0
- package/src/views/ListRow.tsx +12 -2
- package/types/Accordion/index.d.ts.map +1 -1
- package/types/CardHeader.d.ts.map +1 -1
- package/types/CopyField/CopyMenuButton.d.ts +13 -0
- package/types/CopyField/CopyMenuButton.d.ts.map +1 -0
- package/types/CopyField/index.d.ts +1 -0
- package/types/CopyField/index.d.ts.map +1 -1
- package/types/layouts/StatusGlyphStrip.d.ts +18 -0
- package/types/layouts/StatusGlyphStrip.d.ts.map +1 -0
- package/types/layouts/index.d.ts +1 -0
- package/types/layouts/index.d.ts.map +1 -1
- package/types/layouts/page.d.ts +14 -21
- package/types/layouts/page.d.ts.map +1 -1
- package/types/layouts/screenScroll.d.ts +8 -0
- package/types/layouts/screenScroll.d.ts.map +1 -1
- package/types/layouts/sidebar.d.ts +13 -1
- package/types/layouts/sidebar.d.ts.map +1 -1
- package/types/views/ListRow.d.ts +3 -1
- package/types/views/ListRow.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","widgetChrome_exports","NestedIconWell","splitNestedControl","useWidgetChrome","module","exports","import_jsx_runtime","require","import_theme","import_tamagui","nested","px","hitSlop","box","onPress","resolved","useResolvedKnobs","knobProps","control","nestedControl","interactive","cursor","hoverStyle","hoverKnobProps","pressStyle","pressKnobProps","focusVisibleStyle","focusVisibleKnobProps","role"],"sources":["
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","widgetChrome_exports","NestedIconWell","splitNestedControl","useWidgetChrome","module","exports","import_jsx_runtime","require","import_theme","import_tamagui","nested","px","hitSlop","box","onPress","resolved","useResolvedKnobs","knobProps","control","nestedControl","interactive","cursor","hoverStyle","hoverKnobProps","pressStyle","pressKnobProps","focusVisibleStyle","focusVisibleKnobProps","role","param","color","radius","children","identity","useChartPalette","single","fill","ink","useReadableTextOn","jsx","YStack","alignItems","justifyContent","backgroundColor","overflow","IconSlot","icon"],"sources":["widgetChrome.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar widgetChrome_exports = {};\n__export(widgetChrome_exports, {\n NestedIconWell: () => NestedIconWell,\n splitNestedControl: () => splitNestedControl,\n useWidgetChrome: () => useWidgetChrome\n});\nmodule.exports = __toCommonJS(widgetChrome_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_theme = require(\"@multiplatform.one/theme\");\nvar import_tamagui = require(\"tamagui\");\nfunction splitNestedControl(nested) {\n var { px, hitSlop, ...box } = nested;\n return {\n px,\n hitSlop,\n box\n };\n}\nfunction useWidgetChrome(onPress) {\n var resolved = (0, import_theme.useResolvedKnobs)();\n var { knobProps, control } = resolved;\n var nested = splitNestedControl(knobProps.nestedControl);\n var interactive = onPress ? {\n cursor: \"pointer\",\n hoverStyle: control.hoverKnobProps,\n pressStyle: control.pressKnobProps,\n focusVisibleStyle: control.focusVisibleKnobProps,\n onPress,\n role: \"button\"\n } : void 0;\n return {\n knobProps,\n control,\n nested,\n interactive\n };\n}\nfunction NestedIconWell(param) {\n var { color, box, px, radius, children } = param;\n var identity = (0, import_theme.useChartPalette)().single;\n var fill = color || identity;\n var ink = (0, import_theme.useReadableTextOn)(fill);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n ...box,\n ...radius,\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: fill,\n color: ink,\n overflow: \"hidden\",\n \"data-nested-px\": px,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme.IconSlot, {\n icon: children,\n color: ink\n })\n });\n}\n//# sourceMappingURL=widgetChrome.js.map\n"],"mappings":"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","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/components",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.77.0",
|
|
4
4
|
"description": "multiplatform.one ui components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@floating-ui/react": "^0.27.20",
|
|
61
|
-
"@multiplatform.one/forms": "^7.
|
|
62
|
-
"@multiplatform.one/i18n": "^7.
|
|
63
|
-
"@multiplatform.one/platform": "^7.
|
|
64
|
-
"@multiplatform.one/router": "^7.
|
|
65
|
-
"@multiplatform.one/theme": "^7.
|
|
61
|
+
"@multiplatform.one/forms": "^7.77.0",
|
|
62
|
+
"@multiplatform.one/i18n": "^7.77.0",
|
|
63
|
+
"@multiplatform.one/platform": "^7.77.0",
|
|
64
|
+
"@multiplatform.one/router": "^7.77.0",
|
|
65
|
+
"@multiplatform.one/theme": "^7.77.0",
|
|
66
66
|
"@phosphor-icons/react": "^2.1.10",
|
|
67
67
|
"@shopify/flash-list": "^2.3.1",
|
|
68
68
|
"@tamagui/colors": "2.7.6",
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
"tamagui": "2.7.6"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@multiplatform.one/config": "7.
|
|
93
|
-
"@multiplatform.one/storybook": "7.
|
|
94
|
-
"@multiplatform.one/test-utils": "7.
|
|
92
|
+
"@multiplatform.one/config": "7.77.0",
|
|
93
|
+
"@multiplatform.one/storybook": "7.77.0",
|
|
94
|
+
"@multiplatform.one/test-utils": "7.77.0",
|
|
95
95
|
"@tamagui/build": "2.7.6",
|
|
96
96
|
"@testing-library/jest-dom": "^7.0.1",
|
|
97
97
|
"@testing-library/react": "^16.3.3",
|
|
@@ -37,7 +37,7 @@ function getTriggers(container: HTMLElement) {
|
|
|
37
37
|
|
|
38
38
|
describe("Accordion", () => {
|
|
39
39
|
it.each([undefined, "rebeccapurple"])(
|
|
40
|
-
"
|
|
40
|
+
"an open trigger's icon inherits the title ink without replacing explicit colour %s",
|
|
41
41
|
(color) => {
|
|
42
42
|
const result = renderWithProviders(
|
|
43
43
|
<Accordion defaultValue="a">
|
|
@@ -50,7 +50,7 @@ describe("Accordion", () => {
|
|
|
50
50
|
</Accordion>,
|
|
51
51
|
);
|
|
52
52
|
const icon = result.getByTestId("accordion-icon");
|
|
53
|
-
expect(icon.parentElement!.className).
|
|
53
|
+
expect(icon.parentElement!.className).toMatch(/_col-color(\s|$)/);
|
|
54
54
|
expect(icon.getAttribute("color")).toBe(color ?? null);
|
|
55
55
|
},
|
|
56
56
|
);
|
|
@@ -127,13 +127,12 @@ describe("Accordion", () => {
|
|
|
127
127
|
expect(triggers[1].getAttribute("data-group-position")).toBe("last");
|
|
128
128
|
});
|
|
129
129
|
|
|
130
|
-
it("
|
|
130
|
+
it("an open trigger keeps its rest look: no fill, the chevron says it is open", () => {
|
|
131
131
|
const result = renderAccordion({ defaultValue: "a" });
|
|
132
132
|
const triggers = getTriggers(result.container);
|
|
133
|
-
expect(triggers[0].getAttribute("
|
|
134
|
-
expect(triggers[0].
|
|
135
|
-
expect(
|
|
136
|
-
expect(triggers[1].getAttribute("data-selected")).toBeNull();
|
|
133
|
+
expect(triggers[0].getAttribute("aria-expanded")).toBe("true");
|
|
134
|
+
expect(triggers[0].getAttribute("data-selected")).toBeNull();
|
|
135
|
+
expect(triggers[0].className).not.toMatch(/_bg-color[45]\b/);
|
|
137
136
|
});
|
|
138
137
|
|
|
139
138
|
it("a nested accordion inherits its parent's size token", () => {
|
package/src/Accordion/index.tsx
CHANGED
|
@@ -162,7 +162,7 @@ const AccordionItemCtx = createContext<AccordionItemCtxValue>({
|
|
|
162
162
|
position: "only",
|
|
163
163
|
});
|
|
164
164
|
|
|
165
|
-
/**
|
|
165
|
+
/** The fill under a trigger's title; an open trigger paints none (FZ-7999). */
|
|
166
166
|
const AccordionTriggerFillCtx = createContext<string | undefined>(undefined);
|
|
167
167
|
|
|
168
168
|
/**
|
|
@@ -474,27 +474,22 @@ const AccordionTrigger = forwardRef<TamaguiElement, AccordionTriggerProps>(
|
|
|
474
474
|
start: item.position === "first" || item.position === "only",
|
|
475
475
|
end: (item.position === "last" || item.position === "only") && !item.open,
|
|
476
476
|
});
|
|
477
|
-
//
|
|
478
|
-
|
|
479
|
-
|
|
477
|
+
// Open is disclosure, not selection: the chevron says it, and the row
|
|
478
|
+
// keeps its rest look (FZ-7999). A grey open fill read as a hard-edged
|
|
479
|
+
// selected block.
|
|
480
|
+
const restFill = { backgroundColor: "transparent" as const };
|
|
481
|
+
const hoverFill = control.hoverKnobProps ?? {
|
|
482
|
+
backgroundColor: componentColors.interactive.background,
|
|
483
|
+
};
|
|
484
|
+
const pressFill = control.pressKnobProps ?? {
|
|
485
|
+
backgroundColor: componentColors.interactive.hover,
|
|
480
486
|
};
|
|
481
|
-
const restFill = item.open ? selectedFill : { backgroundColor: "transparent" as const };
|
|
482
|
-
const hoverFill = item.open
|
|
483
|
-
? { backgroundColor: componentColors.selection.hover }
|
|
484
|
-
: (control.hoverKnobProps ?? { backgroundColor: componentColors.interactive.background });
|
|
485
|
-
const pressFill = item.open
|
|
486
|
-
? { backgroundColor: componentColors.selection.press }
|
|
487
|
-
: (control.pressKnobProps ?? { backgroundColor: componentColors.interactive.hover });
|
|
488
487
|
const titleColor = item.disabled
|
|
489
488
|
? disabledState.textKnobProps.color
|
|
490
|
-
:
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
item.open ? componentColors.selection.background : undefined,
|
|
495
|
-
knobProps.textAccentColor,
|
|
496
|
-
);
|
|
497
|
-
const descriptionColor = item.disabled ? disabledState.textKnobProps.color : openDescriptionInk;
|
|
489
|
+
: componentColors.text.primary;
|
|
490
|
+
const descriptionColor = item.disabled
|
|
491
|
+
? disabledState.textKnobProps.color
|
|
492
|
+
: knobProps.textAccentColor;
|
|
498
493
|
const visualPx = tokenPx(knobProps.sizeToken, MIN_PRESS_TARGET, "size");
|
|
499
494
|
const chevronPx = tokenPx(
|
|
500
495
|
knobProps.label.fontSize,
|
|
@@ -527,7 +522,6 @@ const AccordionTrigger = forwardRef<TamaguiElement, AccordionTriggerProps>(
|
|
|
527
522
|
cursor={item.disabled ? "not-allowed" : "pointer"}
|
|
528
523
|
outlineWidth={0}
|
|
529
524
|
data-group-position={item.position}
|
|
530
|
-
{...(item.open ? { "data-selected": "true" } : {})}
|
|
531
525
|
{...(kbFocus ? { "data-keyboard-focus": "true" } : {})}
|
|
532
526
|
// Interaction rows follow the radius knob (LC-18) through the
|
|
533
527
|
// stacked-group corner fragment above — never a uniform radius,
|
|
@@ -560,11 +554,8 @@ const AccordionTrigger = forwardRef<TamaguiElement, AccordionTriggerProps>(
|
|
|
560
554
|
open={item.open}
|
|
561
555
|
size={chevronPx}
|
|
562
556
|
color={
|
|
563
|
-
(item.disabled
|
|
564
|
-
|
|
565
|
-
: item.open
|
|
566
|
-
? componentColors.selection.ink
|
|
567
|
-
: knobProps.textAccentColor) ?? knobProps.textAccentColor
|
|
557
|
+
(item.disabled ? disabledState.textKnobProps.color : knobProps.textAccentColor) ??
|
|
558
|
+
knobProps.textAccentColor
|
|
568
559
|
}
|
|
569
560
|
motion={knobProps.motion.control}
|
|
570
561
|
/>
|
|
@@ -573,35 +564,29 @@ const AccordionTrigger = forwardRef<TamaguiElement, AccordionTriggerProps>(
|
|
|
573
564
|
alignItems="center"
|
|
574
565
|
justifyContent="center"
|
|
575
566
|
flexShrink={0}
|
|
576
|
-
{...(item.
|
|
577
|
-
? { color: componentColors.selection.ink }
|
|
578
|
-
: undefined)}
|
|
567
|
+
{...(!item.disabled ? { color: titleColor } : undefined)}
|
|
579
568
|
>
|
|
580
569
|
<IconSlot icon={icon} color={titleColor} />
|
|
581
570
|
</View>
|
|
582
571
|
) : null}
|
|
583
|
-
<
|
|
584
|
-
|
|
585
|
-
>
|
|
586
|
-
<YStack flex={1} minWidth={0} alignItems="flex-start">
|
|
587
|
-
{/* LC-82 TEXT-RIDES-TEXT: wrap ALL bare string/number children
|
|
572
|
+
<YStack flex={1} minWidth={0} alignItems="flex-start">
|
|
573
|
+
{/* LC-82 TEXT-RIDES-TEXT: wrap ALL bare string/number children
|
|
588
574
|
(coalesced runs), not just the singleton case. */}
|
|
589
|
-
|
|
575
|
+
{/* Label weight rides the fontWeight knob (400 / 700). Never 500
|
|
590
576
|
or 600 — those are not house label weights (§6.1 / R7 text-node
|
|
591
|
-
trap).
|
|
592
|
-
|
|
593
|
-
|
|
577
|
+
trap). */}
|
|
578
|
+
{wrapBareTextChildren(children, (label, key) => (
|
|
579
|
+
<Text key={key} {...knobProps.label} textAlign="left" color={titleColor}>
|
|
580
|
+
{label}
|
|
581
|
+
</Text>
|
|
582
|
+
))}
|
|
583
|
+
{description != null &&
|
|
584
|
+
wrapBareTextChildren(description, (label, key) => (
|
|
585
|
+
<Text key={key} {...knobProps.label} textAlign="left" color={descriptionColor}>
|
|
594
586
|
{label}
|
|
595
587
|
</Text>
|
|
596
588
|
))}
|
|
597
|
-
|
|
598
|
-
wrapBareTextChildren(description, (label, key) => (
|
|
599
|
-
<Text key={key} {...knobProps.label} textAlign="left" color={descriptionColor}>
|
|
600
|
-
{label}
|
|
601
|
-
</Text>
|
|
602
|
-
))}
|
|
603
|
-
</YStack>
|
|
604
|
-
</AccordionTriggerFillCtx.Provider>
|
|
589
|
+
</YStack>
|
|
605
590
|
</TamaguiAccordion.Trigger>
|
|
606
591
|
</View>
|
|
607
592
|
);
|
package/src/Card.stories.tsx
CHANGED
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
} from "@multiplatform.one/forms";
|
|
10
10
|
import {
|
|
11
11
|
CompassIcon,
|
|
12
|
-
FileCodeIcon,
|
|
13
12
|
HouseLineIcon,
|
|
14
13
|
LinkIcon,
|
|
15
14
|
ShieldCheckIcon,
|
|
@@ -19,8 +18,10 @@ import { XStack, YStack } from "tamagui";
|
|
|
19
18
|
import { ActionBar } from "./actions/ActionBar";
|
|
20
19
|
import { ActionButton } from "./actions/StandardAction";
|
|
21
20
|
import { Card } from "./Card";
|
|
21
|
+
import { CopyMenuButton } from "./CopyField/CopyMenuButton";
|
|
22
|
+
import { NotifyHost } from "./feedback";
|
|
22
23
|
import { StatusDot } from "./layouts/StatusDot";
|
|
23
|
-
import {
|
|
24
|
+
import { StatusGlyphStrip, type StatusGlyph } from "./layouts/StatusGlyphStrip";
|
|
24
25
|
import { Paragraph, SizableText } from "./Text";
|
|
25
26
|
|
|
26
27
|
const meta: Meta<typeof Card> = {
|
|
@@ -131,66 +132,93 @@ export const LongContent: Story = {
|
|
|
131
132
|
};
|
|
132
133
|
|
|
133
134
|
// ── Sign-on (LC-169, FZ-7970 r3) ───────────────────────────────
|
|
134
|
-
// The SHC console's Identity › Sign-on cards rebuilt on MPO parts
|
|
135
|
-
//
|
|
136
|
-
//
|
|
137
|
-
//
|
|
138
|
-
//
|
|
139
|
-
//
|
|
140
|
-
// what differs: each check's status as a dot and one word. Rows are inline
|
|
141
|
-
// (glyph and label leading, value trailing); the URLs stack, mono, cut in the
|
|
142
|
-
// middle, with copy.
|
|
135
|
+
// The SHC console's Identity › Sign-on cards rebuilt on MPO parts, round 4.
|
|
136
|
+
// Clay on round 3: "I wonder if you could even get one fewer row." One card,
|
|
137
|
+
// two rows: the realm as an icon-only fact with its three checks trailing as
|
|
138
|
+
// a glyph cluster (the realm's accessory), then the issuer. Names are the
|
|
139
|
+
// glyphs' accessible names and tooltips. The discovery URL derives from the
|
|
140
|
+
// issuer, so it sits behind the issuer's copy menu.
|
|
143
141
|
|
|
144
142
|
const issuer = "https://91-98-47-56.sslip.io/auth/realms/master";
|
|
145
143
|
|
|
144
|
+
function SignOnCard({
|
|
145
|
+
checks,
|
|
146
|
+
...args
|
|
147
|
+
}: { checks: readonly StatusGlyph[] } & Record<string, unknown>) {
|
|
148
|
+
return (
|
|
149
|
+
<Card {...args}>
|
|
150
|
+
<Card.Header status={<StatusDot tone={signOnTone(checks)} />}>Sign-on</Card.Header>
|
|
151
|
+
<DescriptionList
|
|
152
|
+
placement="inline"
|
|
153
|
+
maxWidth="fluid"
|
|
154
|
+
items={[
|
|
155
|
+
{
|
|
156
|
+
icon: <ShieldCheckIcon />,
|
|
157
|
+
term: "Realm",
|
|
158
|
+
value: "master",
|
|
159
|
+
labelHidden: true,
|
|
160
|
+
accessory: <StatusGlyphStrip items={checks} />,
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
icon: <LinkIcon />,
|
|
164
|
+
term: "Issuer",
|
|
165
|
+
value: issuer,
|
|
166
|
+
identifier: true,
|
|
167
|
+
labelHidden: true,
|
|
168
|
+
copyAction: (
|
|
169
|
+
<CopyMenuButton
|
|
170
|
+
items={[
|
|
171
|
+
{ label: "Copy issuer", value: issuer },
|
|
172
|
+
{
|
|
173
|
+
label: "Copy discovery URL",
|
|
174
|
+
value: `${issuer}/.well-known/openid-configuration`,
|
|
175
|
+
},
|
|
176
|
+
]}
|
|
177
|
+
/>
|
|
178
|
+
),
|
|
179
|
+
},
|
|
180
|
+
]}
|
|
181
|
+
/>
|
|
182
|
+
</Card>
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function signOnTone(checks: readonly StatusGlyph[]) {
|
|
187
|
+
if (checks.some((check) => check.tone === "critical")) return "critical" as const;
|
|
188
|
+
if (checks.some((check) => check.tone === "warning")) return "warning" as const;
|
|
189
|
+
return "positive" as const;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const healthyChecks: readonly StatusGlyph[] = [
|
|
193
|
+
{ icon: <StarIcon />, label: "Default realm", tone: "positive" },
|
|
194
|
+
{ icon: <HouseLineIcon />, label: "Realm for this host", tone: "positive" },
|
|
195
|
+
{ icon: <CompassIcon />, label: "Discovery", tone: "positive" },
|
|
196
|
+
];
|
|
197
|
+
|
|
146
198
|
export const SignOn: Story = {
|
|
147
199
|
name: "Sign-on (LC-169)",
|
|
148
200
|
parameters: { layout: "fullscreen" },
|
|
149
201
|
render: (args) => (
|
|
150
202
|
<YStack padding="$4" gap="$3" backgroundColor="$background" minHeight="100%">
|
|
151
|
-
<
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
{
|
|
171
|
-
icon: <StarIcon />,
|
|
172
|
-
term: "Default realm",
|
|
173
|
-
children: <StatusDot tone="positive">OK</StatusDot>,
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
icon: <HouseLineIcon />,
|
|
177
|
-
term: "Realm for this host",
|
|
178
|
-
children: <StatusDot tone="positive">OK</StatusDot>,
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
icon: <CompassIcon />,
|
|
182
|
-
term: "Discovery",
|
|
183
|
-
children: <StatusDot tone="positive">OK</StatusDot>,
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
icon: <FileCodeIcon />,
|
|
187
|
-
term: "Configuration",
|
|
188
|
-
value: `${issuer}/.well-known/openid-configuration`,
|
|
189
|
-
identifier: true,
|
|
190
|
-
},
|
|
191
|
-
]}
|
|
192
|
-
/>
|
|
193
|
-
</Card>
|
|
203
|
+
<NotifyHost />
|
|
204
|
+
<SignOnCard {...args} checks={healthyChecks} />
|
|
205
|
+
</YStack>
|
|
206
|
+
),
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
export const SignOnFailing: Story = {
|
|
210
|
+
name: "Sign-on, a failing check (LC-169)",
|
|
211
|
+
parameters: { layout: "fullscreen" },
|
|
212
|
+
render: (args) => (
|
|
213
|
+
<YStack padding="$4" gap="$3" backgroundColor="$background" minHeight="100%">
|
|
214
|
+
<SignOnCard
|
|
215
|
+
{...args}
|
|
216
|
+
checks={[
|
|
217
|
+
healthyChecks[0]!,
|
|
218
|
+
healthyChecks[1]!,
|
|
219
|
+
{ icon: <CompassIcon />, label: "Discovery", tone: "critical", reason: "Timeout" },
|
|
220
|
+
]}
|
|
221
|
+
/>
|
|
194
222
|
</YStack>
|
|
195
223
|
),
|
|
196
224
|
};
|
package/src/CardHeader.spec.tsx
CHANGED
|
@@ -11,14 +11,6 @@ function readSibling(name: string) {
|
|
|
11
11
|
return readFileSync(join(import.meta.dirname, name), "utf8");
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
function atoms(el: Element | null, prefixes: string[]): string[] {
|
|
15
|
-
if (!el) return [];
|
|
16
|
-
return String((el as HTMLElement).className || "")
|
|
17
|
-
.split(" ")
|
|
18
|
-
.filter((c) => prefixes.some((p) => c.startsWith(p)))
|
|
19
|
-
.sort();
|
|
20
|
-
}
|
|
21
|
-
|
|
22
14
|
function titleText(container: HTMLElement, label: string): HTMLElement {
|
|
23
15
|
return (container.querySelector("[data-heading-font]") ?? screen.getByText(label)) as HTMLElement;
|
|
24
16
|
}
|
|
@@ -140,6 +132,17 @@ describe("CardHeader design-law — T-HEADING text node (R7 / LC-82)", () => {
|
|
|
140
132
|
);
|
|
141
133
|
expect(container.querySelector('[data-slot="header"]')?.textContent).toContain("Title");
|
|
142
134
|
});
|
|
135
|
+
|
|
136
|
+
it("keeps the body under the title in a stretched card (no auto bottom margin)", () => {
|
|
137
|
+
const { container } = renderWithProviders(
|
|
138
|
+
<Card height={400}>
|
|
139
|
+
<Card.Header>Title</Card.Header>
|
|
140
|
+
</Card>,
|
|
141
|
+
);
|
|
142
|
+
const header = container.querySelector('[data-slot="header"]') as HTMLElement;
|
|
143
|
+
expect(header.className).not.toMatch(/_mb-auto/);
|
|
144
|
+
expect(header.className).toMatch(/_mb-0px/);
|
|
145
|
+
});
|
|
143
146
|
});
|
|
144
147
|
|
|
145
148
|
describe("CardHeader status (LC-169)", () => {
|
package/src/CardHeader.tsx
CHANGED
|
@@ -51,6 +51,9 @@ export function CardHeader({ children, status, ...props }: CardHeaderProps) {
|
|
|
51
51
|
return (
|
|
52
52
|
<TamaguiCard.Header
|
|
53
53
|
padding={0}
|
|
54
|
+
// tamagui's header takes marginBottom "auto", which drops the body to
|
|
55
|
+
// the bottom of a card stretched to its row's height.
|
|
56
|
+
marginBottom={0}
|
|
54
57
|
{...knobProps.gap}
|
|
55
58
|
{...hostData({ "data-slot": "header" })}
|
|
56
59
|
{...props}
|
|
@@ -61,13 +61,12 @@ describe("ContextMenu", () => {
|
|
|
61
61
|
expect(copy.getAttribute("data-mp-font-weight")).toBe("400");
|
|
62
62
|
expect(copy.className).toMatch(/_btlr-0px/);
|
|
63
63
|
|
|
64
|
-
// The checked row rests on $
|
|
65
|
-
expect(selected?.getAttribute("data-mp-selected-fill")).toBe("$
|
|
66
|
-
expect(selected?.className).toMatch(/(?:^| )_bg-
|
|
64
|
+
// The checked row rests on the $color3 tint in light, the hover fill held (LC-262, FZ-8557); check trails the label.
|
|
65
|
+
expect(selected?.getAttribute("data-mp-selected-fill")).toBe("$color3");
|
|
66
|
+
expect(selected?.className).toMatch(/(?:^| )_bg-color3(?: |$)/);
|
|
67
67
|
fireEvent.focus(selected as HTMLElement);
|
|
68
68
|
expect(selected?.getAttribute("data-highlighted")).toBe("true");
|
|
69
|
-
expect(selected?.className).toMatch(/_bg-0focus-
|
|
70
|
-
expect(selected?.className).not.toMatch(/_bg-0focus-color3(?: |$)/);
|
|
69
|
+
expect(selected?.className).toMatch(/_bg-0focus-color3(?: |$)/);
|
|
71
70
|
expect(copy.getAttribute("data-mp-hover-fill")).toBe("$color3");
|
|
72
71
|
const check = selected?.querySelector("[data-mp-check]");
|
|
73
72
|
expect(check?.getAttribute("data-mp-check")).toBe("trailing");
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vitest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { fireEvent, waitFor } from "@testing-library/react";
|
|
6
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
7
|
+
import { describe, expect, it } from "vitest";
|
|
8
|
+
import { CopyMenuButton } from "./CopyMenuButton";
|
|
9
|
+
|
|
10
|
+
describe("CopyMenuButton (LC-169)", () => {
|
|
11
|
+
it("one copy glyph opens the value and its derived values as menu items", async () => {
|
|
12
|
+
const result = renderWithProviders(
|
|
13
|
+
<CopyMenuButton
|
|
14
|
+
items={[
|
|
15
|
+
{ label: "Copy issuer", value: "https://id.example/realms/master" },
|
|
16
|
+
{
|
|
17
|
+
label: "Copy discovery URL",
|
|
18
|
+
value: "https://id.example/realms/master/.well-known/openid-configuration",
|
|
19
|
+
},
|
|
20
|
+
]}
|
|
21
|
+
/>,
|
|
22
|
+
);
|
|
23
|
+
const trigger = result.getByLabelText("Copy");
|
|
24
|
+
fireEvent.click(trigger);
|
|
25
|
+
await waitFor(() => expect(result.getByText("Copy discovery URL")).toBeTruthy());
|
|
26
|
+
expect(result.getByText("Copy issuer")).toBeTruthy();
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CopyMenuButton — an identifier's copy action when there is more than one
|
|
3
|
+
* thing worth copying (LC-169): the value itself and values derived from it,
|
|
4
|
+
* such as an issuer and its discovery URL. A derived value lives here rather
|
|
5
|
+
* than as its own row, so a card says the identifier once.
|
|
6
|
+
*
|
|
7
|
+
* The glyph never flips; the confirm is notify() (DG-FB-01 / LC-16).
|
|
8
|
+
*/
|
|
9
|
+
import { Button } from "@multiplatform.one/forms";
|
|
10
|
+
import { CopyIcon } from "@phosphor-icons/react";
|
|
11
|
+
import { DropdownMenu } from "../DropdownMenu";
|
|
12
|
+
import { useCopyFeedback } from "../feedback/copy";
|
|
13
|
+
import { useTranslation } from "../shared/i18n";
|
|
14
|
+
|
|
15
|
+
export interface CopyMenuItem {
|
|
16
|
+
key?: string;
|
|
17
|
+
/** "Copy issuer", "Copy discovery URL". */
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CopyMenuButtonProps {
|
|
23
|
+
items: readonly CopyMenuItem[];
|
|
24
|
+
/** The button's accessible name. Default "Copy". */
|
|
25
|
+
"aria-label"?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function CopyMenuButton({ items, "aria-label": ariaLabel }: CopyMenuButtonProps) {
|
|
29
|
+
const { t } = useTranslation();
|
|
30
|
+
const { copy } = useCopyFeedback();
|
|
31
|
+
return (
|
|
32
|
+
<DropdownMenu
|
|
33
|
+
placement="bottom-end"
|
|
34
|
+
items={items.map((item) => ({
|
|
35
|
+
key: item.key ?? item.label,
|
|
36
|
+
label: item.label,
|
|
37
|
+
onSelect: () => void copy(item.value),
|
|
38
|
+
}))}
|
|
39
|
+
>
|
|
40
|
+
<Button
|
|
41
|
+
nested
|
|
42
|
+
chromeless
|
|
43
|
+
circular
|
|
44
|
+
flexShrink={0}
|
|
45
|
+
icon={<CopyIcon />}
|
|
46
|
+
aria-label={ariaLabel ?? t("Copy")}
|
|
47
|
+
/>
|
|
48
|
+
</DropdownMenu>
|
|
49
|
+
);
|
|
50
|
+
}
|
package/src/CopyField/index.tsx
CHANGED
|
@@ -524,12 +524,11 @@ describe("DropdownMenu FloatingPanel cover contract", () => {
|
|
|
524
524
|
});
|
|
525
525
|
const selected = document.querySelector<HTMLElement>('[role="menuitemcheckbox"]');
|
|
526
526
|
expect(selected?.getAttribute("aria-checked")).toBe("true");
|
|
527
|
-
expect(selected?.getAttribute("data-mp-selected-fill")).toBe("$
|
|
528
|
-
expect(selected?.className).toMatch(/(?:^| )_bg-
|
|
527
|
+
expect(selected?.getAttribute("data-mp-selected-fill")).toBe("$color3");
|
|
528
|
+
expect(selected?.className).toMatch(/(?:^| )_bg-color3(?: |$)/);
|
|
529
529
|
fireEvent.focus(selected as HTMLElement);
|
|
530
530
|
expect(selected?.getAttribute("data-highlighted")).toBe("true");
|
|
531
|
-
expect(selected?.className).toMatch(/_bg-0focus-
|
|
532
|
-
expect(selected?.className).not.toMatch(/_bg-0focus-color3(?: |$)/);
|
|
531
|
+
expect(selected?.className).toMatch(/_bg-0focus-color3(?: |$)/);
|
|
533
532
|
const check = selected?.querySelector("[data-mp-check]");
|
|
534
533
|
expect(check?.getAttribute("data-mp-check")).toBe("trailing");
|
|
535
534
|
expect(selected?.lastElementChild).toBe(check);
|
|
@@ -335,8 +335,8 @@ describe("LC-262 inside a sheet at 390 (FZ-7830 round 2)", () => {
|
|
|
335
335
|
expect(rows.length).toBe(5);
|
|
336
336
|
expect(rows.every((r) => r.querySelector("svg"))).toBe(true);
|
|
337
337
|
const chosen = rows.find((r) => r.getAttribute("aria-selected") === "true") as HTMLElement;
|
|
338
|
-
// The check on the light checked
|
|
339
|
-
expect(chosen.className).toMatch(/(?:^| )_bg-
|
|
338
|
+
// The check on the light checked tint marks it (LC-262, FZ-8355 r6, FZ-8557).
|
|
339
|
+
expect(chosen.className).toMatch(/(?:^| )_bg-color3(?: |$)/);
|
|
340
340
|
expect(chosen.querySelectorAll("svg").length).toBe(2);
|
|
341
341
|
});
|
|
342
342
|
|