@multiplatform.one/components 7.65.1 → 7.66.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/Alert/index.cjs +26 -5
- package/dist/cjs/Alert/index.native.js +26 -5
- package/dist/cjs/Alert/index.native.js.map +1 -1
- package/dist/cjs/Carousel/index.cjs +15 -2
- package/dist/cjs/Carousel/index.native.js +17 -2
- package/dist/cjs/Carousel/index.native.js.map +1 -1
- package/dist/cjs/ContextMenu/index.cjs +6 -7
- package/dist/cjs/ContextMenu/index.native.js +6 -7
- package/dist/cjs/ContextMenu/index.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/index.cjs +6 -7
- package/dist/cjs/DropdownMenu/index.native.js +6 -7
- package/dist/cjs/DropdownMenu/index.native.js.map +1 -1
- package/dist/cjs/Lightbox/MediaControl.cjs +59 -0
- package/dist/cjs/Lightbox/MediaControl.native.js +64 -0
- package/dist/cjs/Lightbox/MediaControl.native.js.map +1 -0
- package/dist/cjs/Lightbox/index.cjs +334 -0
- package/dist/cjs/Lightbox/index.gnome.cjs +32 -0
- package/dist/cjs/Lightbox/index.gnome.native.js +35 -0
- package/dist/cjs/Lightbox/index.gnome.native.js.map +1 -0
- package/dist/cjs/Lightbox/index.native.js +530 -0
- package/dist/cjs/Lightbox/index.native.js.map +1 -0
- package/dist/cjs/Lightbox/shared.cjs +84 -0
- package/dist/cjs/Lightbox/shared.native.js +89 -0
- package/dist/cjs/Lightbox/shared.native.js.map +1 -0
- package/dist/cjs/Lightbox/useLightbox.cjs +44 -0
- package/dist/cjs/Lightbox/useLightbox.native.js +53 -0
- package/dist/cjs/Lightbox/useLightbox.native.js.map +1 -0
- package/dist/cjs/Material/index.cjs +1 -0
- package/dist/cjs/Material/index.native.js +1 -0
- package/dist/cjs/Material/index.native.js.map +1 -1
- package/dist/cjs/TreeSelect/index.cjs +1 -1
- package/dist/cjs/TreeSelect/index.native.js +1 -1
- package/dist/cjs/TreeSelect/index.native.js.map +1 -1
- package/dist/cjs/componentColors.cjs +10 -1
- package/dist/cjs/componentColors.native.js +10 -1
- package/dist/cjs/componentColors.native.js.map +1 -1
- package/dist/cjs/images/Image/framing.cjs +29 -0
- package/dist/cjs/images/Image/framing.native.js +32 -0
- package/dist/cjs/images/Image/framing.native.js.map +1 -0
- package/dist/cjs/images/Image/index.cjs +2 -1
- package/dist/cjs/images/Image/index.native.js +2 -1
- package/dist/cjs/images/Image/index.native.js.map +1 -1
- package/dist/cjs/images/Image/mediaRadius.cjs +29 -0
- package/dist/cjs/images/Image/mediaRadius.native.js +32 -0
- package/dist/cjs/images/Image/mediaRadius.native.js.map +1 -0
- package/dist/cjs/images/Image/shared.cjs +4 -2
- package/dist/cjs/images/Image/shared.native.js +4 -2
- package/dist/cjs/images/Image/shared.native.js.map +1 -1
- package/dist/cjs/index.cjs +3 -0
- package/dist/cjs/index.native.js +3 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/views/Dashboard.cjs +16 -131
- package/dist/cjs/views/Dashboard.native.js +16 -131
- package/dist/cjs/views/Dashboard.native.js.map +1 -1
- package/dist/cjs/views/ImageGrid.cjs +37 -9
- package/dist/cjs/views/ImageGrid.native.js +27 -8
- package/dist/cjs/views/ImageGrid.native.js.map +1 -1
- package/dist/cjs/views/List.cjs +14 -189
- package/dist/cjs/views/List.native.js +14 -193
- package/dist/cjs/views/List.native.js.map +1 -1
- package/dist/cjs/views/ListGroup.cjs +181 -0
- package/dist/cjs/views/ListGroup.native.js +194 -0
- package/dist/cjs/views/ListGroup.native.js.map +1 -0
- package/dist/cjs/views/ListRow.cjs +266 -0
- package/dist/cjs/views/ListRow.native.js +274 -0
- package/dist/cjs/views/ListRow.native.js.map +1 -0
- package/dist/cjs/views/ShortcutCard.cjs +100 -0
- package/dist/cjs/views/ShortcutCard.native.js +104 -0
- package/dist/cjs/views/ShortcutCard.native.js.map +1 -0
- package/dist/cjs/views/index.cjs +3 -0
- package/dist/cjs/views/index.native.js +3 -0
- package/dist/cjs/views/index.native.js.map +1 -1
- package/dist/cjs/views/widgetChrome.cjs +93 -0
- package/dist/cjs/views/widgetChrome.native.js +95 -0
- package/dist/cjs/views/widgetChrome.native.js.map +1 -0
- package/dist/esm/Accordion/index.native.js.map +1 -1
- package/dist/esm/Alert/index.mjs +27 -6
- package/dist/esm/Alert/index.mjs.map +1 -1
- package/dist/esm/Alert/index.native.js +27 -6
- package/dist/esm/Alert/index.native.js.map +1 -1
- package/dist/esm/AnimateHeight/index.native.js.map +1 -1
- package/dist/esm/Avatar/getInitials.native.js.map +1 -1
- package/dist/esm/Avatar/index.native.js.map +1 -1
- package/dist/esm/Badge/index.native.js.map +1 -1
- package/dist/esm/Button.native.js.map +1 -1
- package/dist/esm/Carousel/index.mjs +15 -2
- package/dist/esm/Carousel/index.mjs.map +1 -1
- package/dist/esm/Carousel/index.native.js +17 -2
- package/dist/esm/Carousel/index.native.js.map +1 -1
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/Collapsible.native.js.map +1 -1
- package/dist/esm/ContextMenu/index.mjs +7 -8
- package/dist/esm/ContextMenu/index.mjs.map +1 -1
- package/dist/esm/ContextMenu/index.native.js +7 -8
- package/dist/esm/ContextMenu/index.native.js.map +1 -1
- package/dist/esm/CopyField/index.native.js.map +1 -1
- package/dist/esm/Dialog.native.js.map +1 -1
- package/dist/esm/DotIndicator/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.mjs +7 -8
- package/dist/esm/DropdownMenu/index.mjs.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js +7 -8
- package/dist/esm/DropdownMenu/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/menuSettle.native.js.map +1 -1
- package/dist/esm/ErrorBoundary/index.native.js.map +1 -1
- package/dist/esm/Heading.native.js.map +1 -1
- package/dist/esm/Kbd/index.native.js.map +1 -1
- package/dist/esm/Kbd/keys.native.js.map +1 -1
- package/dist/esm/Lightbox/MediaControl.mjs +34 -0
- package/dist/esm/Lightbox/MediaControl.mjs.map +1 -0
- package/dist/esm/Lightbox/MediaControl.native.js +36 -0
- package/dist/esm/Lightbox/MediaControl.native.js.map +1 -0
- package/dist/esm/Lightbox/index.gnome.mjs +6 -0
- package/dist/esm/Lightbox/index.gnome.mjs.map +1 -0
- package/dist/esm/Lightbox/index.gnome.native.js +6 -0
- package/dist/esm/Lightbox/index.gnome.native.js.map +1 -0
- package/dist/esm/Lightbox/index.mjs +308 -0
- package/dist/esm/Lightbox/index.mjs.map +1 -0
- package/dist/esm/Lightbox/index.native.js +501 -0
- package/dist/esm/Lightbox/index.native.js.map +1 -0
- package/dist/esm/Lightbox/shared.mjs +48 -0
- package/dist/esm/Lightbox/shared.mjs.map +1 -0
- package/dist/esm/Lightbox/shared.native.js +50 -0
- package/dist/esm/Lightbox/shared.native.js.map +1 -0
- package/dist/esm/Lightbox/useLightbox.mjs +19 -0
- package/dist/esm/Lightbox/useLightbox.mjs.map +1 -0
- package/dist/esm/Lightbox/useLightbox.native.js +25 -0
- package/dist/esm/Lightbox/useLightbox.native.js.map +1 -0
- package/dist/esm/Material/index.mjs +1 -1
- package/dist/esm/Material/index.mjs.map +1 -1
- package/dist/esm/Material/index.native.js +1 -1
- package/dist/esm/Material/index.native.js.map +1 -1
- package/dist/esm/Meter/index.native.js.map +1 -1
- package/dist/esm/Meter/meter.native.js.map +1 -1
- package/dist/esm/OverflowRow/index.native.js.map +1 -1
- package/dist/esm/Pagination.native.js.map +1 -1
- package/dist/esm/Popover.native.js.map +1 -1
- package/dist/esm/ProgressSteps/index.native.js.map +1 -1
- package/dist/esm/Quote/index.native.js.map +1 -1
- package/dist/esm/ScrollView/revealFocusedField.native.js.map +1 -1
- package/dist/esm/Separator/index.native.js.map +1 -1
- package/dist/esm/Sheet.native.js.map +1 -1
- package/dist/esm/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/esm/SheetModal/detents.native.js.map +1 -1
- package/dist/esm/SheetModal/useSheetFrameFocus.native.js.map +1 -1
- package/dist/esm/Skeleton/index.native.js.map +1 -1
- package/dist/esm/SkipLink/index.native.js.map +1 -1
- package/dist/esm/SortableList/SortableHandle.native.js.map +1 -1
- package/dist/esm/SortableList/index.native.js.map +1 -1
- package/dist/esm/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/esm/Tabs/index.native.js.map +1 -1
- package/dist/esm/Text.native.js.map +1 -1
- package/dist/esm/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/esm/Toast/index.native.js.map +1 -1
- package/dist/esm/Toast/store.native.js.map +1 -1
- package/dist/esm/Tooltip/nativePress.native.js.map +1 -1
- package/dist/esm/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/esm/TreeSelect/index.mjs +2 -2
- package/dist/esm/TreeSelect/index.mjs.map +1 -1
- package/dist/esm/TreeSelect/index.native.js +2 -2
- package/dist/esm/TreeSelect/index.native.js.map +1 -1
- package/dist/esm/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/esm/Video/PlayerChrome.native.js.map +1 -1
- package/dist/esm/Video/VideoFrame.native.js.map +1 -1
- package/dist/esm/Video/types.native.js.map +1 -1
- package/dist/esm/Wheel/index.native.js.map +1 -1
- package/dist/esm/Wizard/index.native.js.map +1 -1
- package/dist/esm/actions/ActionBar.native.js.map +1 -1
- package/dist/esm/actions/DangerSection.native.js.map +1 -1
- package/dist/esm/actions/DestructiveAction.native.js.map +1 -1
- package/dist/esm/actions/HeaderActions.native.js.map +1 -1
- package/dist/esm/actions/devWarn.native.js.map +1 -1
- package/dist/esm/actions/index.native.js.map +1 -1
- package/dist/esm/actions/severity.native.js.map +1 -1
- package/dist/esm/appShell/BottomAccessory.native.js.map +1 -1
- package/dist/esm/appShell/Dock.native.js.map +1 -1
- package/dist/esm/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/esm/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/esm/appShell/Springboard.native.js.map +1 -1
- package/dist/esm/appShell/SystemBar.native.js.map +1 -1
- package/dist/esm/appShell/TabBar.native.js.map +1 -1
- package/dist/esm/appShell/appTile.native.js.map +1 -1
- package/dist/esm/appShell/bottomChrome.native.js.map +1 -1
- package/dist/esm/appShell/index.native.js.map +1 -1
- package/dist/esm/charts/Axis.native.js.map +1 -1
- package/dist/esm/charts/BarChart.native.js.map +1 -1
- package/dist/esm/charts/ChartDataView.native.js.map +1 -1
- package/dist/esm/charts/ChartSurface.native.js.map +1 -1
- package/dist/esm/charts/LineChart.native.js.map +1 -1
- package/dist/esm/charts/PieChart.native.js.map +1 -1
- package/dist/esm/charts/Sparkline.native.js.map +1 -1
- package/dist/esm/charts/accessibility.native.js.map +1 -1
- package/dist/esm/charts/chartHeight.native.js.map +1 -1
- package/dist/esm/charts/composeChart.native.js.map +1 -1
- package/dist/esm/charts/index.native.js.map +1 -1
- package/dist/esm/charts/math.native.js.map +1 -1
- package/dist/esm/charts/series.native.js.map +1 -1
- package/dist/esm/charts/svg.native.js.map +1 -1
- package/dist/esm/charts/types.native.js.map +1 -1
- package/dist/esm/charts/useChartTheme.native.js.map +1 -1
- package/dist/esm/code/Code/index.native.js.map +1 -1
- package/dist/esm/code/CodeBlock/index.native.js.map +1 -1
- package/dist/esm/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/esm/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
- package/dist/esm/code/Highlighter/index.native.js.map +1 -1
- package/dist/esm/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
- package/dist/esm/code/Pre/index.native.js.map +1 -1
- package/dist/esm/code/index.native.js.map +1 -1
- package/dist/esm/componentColors.mjs +10 -1
- package/dist/esm/componentColors.mjs.map +1 -1
- package/dist/esm/componentColors.native.js +10 -1
- package/dist/esm/componentColors.native.js.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/esm/feedback/NotifyHost.native.js.map +1 -1
- package/dist/esm/feedback/copy.native.js.map +1 -1
- package/dist/esm/feedback/index.native.js.map +1 -1
- package/dist/esm/feedback/notify.native.js.map +1 -1
- package/dist/esm/feedback/route.native.js.map +1 -1
- package/dist/esm/feedback/store.native.js.map +1 -1
- package/dist/esm/formLayouts/FormLayouts.native.js.map +1 -1
- package/dist/esm/formLayouts/PreferencePanel.native.js.map +1 -1
- package/dist/esm/formLayouts/index.native.js.map +1 -1
- package/dist/esm/hooks/index.native.js.map +1 -1
- package/dist/esm/hooks/useClipboard.native.js.map +1 -1
- package/dist/esm/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/esm/hooks/useHoldCue.native.js.map +1 -1
- package/dist/esm/icons/CheckRegular.native.js.map +1 -1
- package/dist/esm/icons/MinusRegular.native.js.map +1 -1
- package/dist/esm/icons/index.native.js.map +1 -1
- package/dist/esm/icons/lucide.native.js.map +1 -1
- package/dist/esm/icons/themed.native.js.map +1 -1
- package/dist/esm/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/esm/images/Image/framing.mjs +4 -0
- package/dist/esm/images/Image/framing.mjs.map +1 -0
- package/dist/esm/images/Image/framing.native.js +4 -0
- package/dist/esm/images/Image/framing.native.js.map +1 -0
- package/dist/esm/images/Image/index.mjs +3 -2
- package/dist/esm/images/Image/index.mjs.map +1 -1
- package/dist/esm/images/Image/index.native.js +3 -2
- package/dist/esm/images/Image/index.native.js.map +1 -1
- package/dist/esm/images/Image/mediaRadius.mjs +4 -0
- package/dist/esm/images/Image/mediaRadius.mjs.map +1 -0
- package/dist/esm/images/Image/mediaRadius.native.js +4 -0
- package/dist/esm/images/Image/mediaRadius.native.js.map +1 -0
- package/dist/esm/images/Image/shared.mjs +4 -3
- package/dist/esm/images/Image/shared.mjs.map +1 -1
- package/dist/esm/images/Image/shared.native.js +4 -3
- package/dist/esm/images/Image/shared.native.js.map +1 -1
- package/dist/esm/images/Image/types.native.js.map +1 -1
- package/dist/esm/images/index.native.js.map +1 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +2 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/knobImmuneExports.native.js.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/esm/layouts/Debug/index.native.js.map +1 -1
- package/dist/esm/layouts/EmptyState.native.js.map +1 -1
- package/dist/esm/layouts/IdentityPlate.native.js.map +1 -1
- package/dist/esm/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/esm/layouts/PageTemplates.native.js.map +1 -1
- package/dist/esm/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/esm/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/esm/layouts/StatusDot.native.js.map +1 -1
- package/dist/esm/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/esm/layouts/attachments.native.js.map +1 -1
- package/dist/esm/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/esm/layouts/index.native.js.map +1 -1
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/esm/layouts/screenScroll.native.js.map +1 -1
- package/dist/esm/layouts/shellSidebarSlot.native.js.map +1 -1
- package/dist/esm/layouts/sidebar.native.js.map +1 -1
- package/dist/esm/layouts/tags.native.js.map +1 -1
- package/dist/esm/layouts/timeline.native.js.map +1 -1
- package/dist/esm/layouts/toolbar.native.js.map +1 -1
- package/dist/esm/shared/actionScan.native.js.map +1 -1
- package/dist/esm/shared/i18n.native.js.map +1 -1
- package/dist/esm/shared/restoreRetries.native.js.map +1 -1
- package/dist/esm/shared/t.native.js.map +1 -1
- package/dist/esm/shared/textRidesText.native.js.map +1 -1
- package/dist/esm/shared/useReturnFocusOnClose.native.js.map +1 -1
- package/dist/esm/surfaces.native.js.map +1 -1
- package/dist/esm/tamagui.native.js.map +1 -1
- package/dist/esm/testSetup.native.js.map +1 -1
- package/dist/esm/utils/setTinted.native.js.map +1 -1
- package/dist/esm/utils/unwrapText.native.js.map +1 -1
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/Dashboard.mjs +6 -121
- package/dist/esm/views/Dashboard.mjs.map +1 -1
- package/dist/esm/views/Dashboard.native.js +6 -121
- package/dist/esm/views/Dashboard.native.js.map +1 -1
- package/dist/esm/views/Gantt.native.js.map +1 -1
- package/dist/esm/views/GanttDateGrip.native.js.map +1 -1
- package/dist/esm/views/ImageGrid.mjs +26 -9
- package/dist/esm/views/ImageGrid.mjs.map +1 -1
- package/dist/esm/views/ImageGrid.native.js +27 -8
- package/dist/esm/views/ImageGrid.native.js.map +1 -1
- package/dist/esm/views/List.mjs +8 -186
- package/dist/esm/views/List.mjs.map +1 -1
- package/dist/esm/views/List.native.js +8 -190
- package/dist/esm/views/List.native.js.map +1 -1
- package/dist/esm/views/ListGroup.mjs +144 -0
- package/dist/esm/views/ListGroup.mjs.map +1 -0
- package/dist/esm/views/ListGroup.native.js +154 -0
- package/dist/esm/views/ListGroup.native.js.map +1 -0
- package/dist/esm/views/ListRow.mjs +234 -0
- package/dist/esm/views/ListRow.mjs.map +1 -0
- package/dist/esm/views/ListRow.native.js +239 -0
- package/dist/esm/views/ListRow.native.js.map +1 -0
- package/dist/esm/views/Matrix.native.js.map +1 -1
- package/dist/esm/views/ReportBuilder.native.js.map +1 -1
- package/dist/esm/views/ShortcutCard.mjs +75 -0
- package/dist/esm/views/ShortcutCard.mjs.map +1 -0
- package/dist/esm/views/ShortcutCard.native.js +76 -0
- package/dist/esm/views/ShortcutCard.native.js.map +1 -0
- package/dist/esm/views/TreeView.native.js.map +1 -1
- package/dist/esm/views/calendarMath.native.js.map +1 -1
- package/dist/esm/views/ganttIntervals.native.js.map +1 -1
- package/dist/esm/views/ganttMath.native.js.map +1 -1
- package/dist/esm/views/index.mjs +2 -2
- package/dist/esm/views/index.mjs.map +1 -1
- package/dist/esm/views/index.native.js +2 -2
- package/dist/esm/views/index.native.js.map +1 -1
- package/dist/esm/views/kanbanDnd.native.js.map +1 -1
- package/dist/esm/views/matrixMath.native.js.map +1 -1
- package/dist/esm/views/treeViewDnd.native.js.map +1 -1
- package/dist/esm/views/treeViewLayout.native.js.map +1 -1
- package/dist/esm/views/treeViewMotion.native.js.map +1 -1
- package/dist/esm/views/treeViewReveal.native.js.map +1 -1
- package/dist/esm/views/widgetChrome.mjs +66 -0
- package/dist/esm/views/widgetChrome.mjs.map +1 -0
- package/dist/esm/views/widgetChrome.native.js +65 -0
- package/dist/esm/views/widgetChrome.native.js.map +1 -0
- package/dist/jsx/Accordion/index.native.js.map +1 -1
- package/dist/jsx/Alert/index.mjs +27 -6
- package/dist/jsx/Alert/index.mjs.map +1 -1
- package/dist/jsx/Alert/index.native.js +26 -5
- package/dist/jsx/Alert/index.native.js.map +1 -1
- package/dist/jsx/AnimateHeight/index.native.js.map +1 -1
- package/dist/jsx/Avatar/getInitials.native.js.map +1 -1
- package/dist/jsx/Avatar/index.native.js.map +1 -1
- package/dist/jsx/Badge/index.native.js.map +1 -1
- package/dist/jsx/Button.native.js.map +1 -1
- package/dist/jsx/Card.native.js.map +1 -1
- package/dist/jsx/CardFooter.native.js.map +1 -1
- package/dist/jsx/CardHeader.native.js.map +1 -1
- package/dist/jsx/Carousel/index.mjs +15 -2
- package/dist/jsx/Carousel/index.mjs.map +1 -1
- package/dist/jsx/Carousel/index.native.js +17 -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.mjs +7 -8
- package/dist/jsx/ContextMenu/index.mjs.map +1 -1
- package/dist/jsx/ContextMenu/index.native.js +6 -7
- 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.mjs +7 -8
- package/dist/jsx/DropdownMenu/index.mjs.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js +6 -7
- 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.mjs +34 -0
- package/dist/jsx/Lightbox/MediaControl.mjs.map +1 -0
- package/dist/jsx/Lightbox/MediaControl.native.js +64 -0
- package/dist/jsx/Lightbox/MediaControl.native.js.map +1 -0
- package/dist/jsx/Lightbox/index.gnome.mjs +6 -0
- package/dist/jsx/Lightbox/index.gnome.mjs.map +1 -0
- package/dist/jsx/Lightbox/index.gnome.native.js +35 -0
- package/dist/jsx/Lightbox/index.gnome.native.js.map +1 -0
- package/dist/jsx/Lightbox/index.mjs +308 -0
- package/dist/jsx/Lightbox/index.mjs.map +1 -0
- package/dist/jsx/Lightbox/index.native.js +530 -0
- package/dist/jsx/Lightbox/index.native.js.map +1 -0
- package/dist/jsx/Lightbox/shared.mjs +48 -0
- package/dist/jsx/Lightbox/shared.mjs.map +1 -0
- package/dist/jsx/Lightbox/shared.native.js +89 -0
- package/dist/jsx/Lightbox/shared.native.js.map +1 -0
- package/dist/jsx/Lightbox/useLightbox.mjs +19 -0
- package/dist/jsx/Lightbox/useLightbox.mjs.map +1 -0
- package/dist/jsx/Lightbox/useLightbox.native.js +53 -0
- package/dist/jsx/Lightbox/useLightbox.native.js.map +1 -0
- package/dist/jsx/Material/index.mjs +1 -1
- package/dist/jsx/Material/index.mjs.map +1 -1
- package/dist/jsx/Material/index.native.js +1 -0
- package/dist/jsx/Material/index.native.js.map +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.map +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/SheetHeader.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.map +1 -1
- package/dist/jsx/Text.native.js.map +1 -1
- 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.mjs +2 -2
- package/dist/jsx/TreeSelect/index.mjs.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.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.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/BottomAccessory.native.js.map +1 -1
- package/dist/jsx/appShell/Dock.native.js.map +1 -1
- package/dist/jsx/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js.map +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.map +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.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.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.map +1 -1
- package/dist/jsx/componentColors.mjs +10 -1
- package/dist/jsx/componentColors.mjs.map +1 -1
- package/dist/jsx/componentColors.native.js +10 -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/formLayouts/FormLayouts.native.js.map +1 -1
- package/dist/jsx/formLayouts/PreferencePanel.native.js +1 -1
- 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.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.map +1 -1
- package/dist/jsx/images/Image/framing.mjs +4 -0
- package/dist/jsx/images/Image/framing.mjs.map +1 -0
- package/dist/jsx/images/Image/framing.native.js +32 -0
- package/dist/jsx/images/Image/framing.native.js.map +1 -0
- package/dist/jsx/images/Image/index.mjs +3 -2
- package/dist/jsx/images/Image/index.mjs.map +1 -1
- package/dist/jsx/images/Image/index.native.js +2 -1
- package/dist/jsx/images/Image/index.native.js.map +1 -1
- package/dist/jsx/images/Image/mediaRadius.mjs +4 -0
- package/dist/jsx/images/Image/mediaRadius.mjs.map +1 -0
- package/dist/jsx/images/Image/mediaRadius.native.js +32 -0
- package/dist/jsx/images/Image/mediaRadius.native.js.map +1 -0
- package/dist/jsx/images/Image/shared.mjs +4 -3
- package/dist/jsx/images/Image/shared.mjs.map +1 -1
- package/dist/jsx/images/Image/shared.native.js +4 -2
- package/dist/jsx/images/Image/shared.native.js.map +1 -1
- package/dist/jsx/images/Image/types.native.js.map +1 -1
- package/dist/jsx/images/index.native.js.map +1 -1
- package/dist/jsx/index.js +2 -1
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +2 -1
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +4 -1
- 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.native.js.map +1 -1
- package/dist/jsx/layouts/IdentityPlate.native.js.map +1 -1
- package/dist/jsx/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/jsx/layouts/PageTemplates.native.js.map +1 -1
- package/dist/jsx/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/jsx/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/jsx/layouts/StatusDot.native.js.map +1 -1
- package/dist/jsx/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/jsx/layouts/index.native.js.map +1 -1
- 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.map +1 -1
- package/dist/jsx/layouts/tags.native.js.map +1 -1
- package/dist/jsx/layouts/timeline.native.js.map +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.map +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.map +1 -1
- package/dist/jsx/views/Dashboard.mjs +6 -121
- package/dist/jsx/views/Dashboard.mjs.map +1 -1
- package/dist/jsx/views/Dashboard.native.js +16 -131
- package/dist/jsx/views/Dashboard.native.js.map +1 -1
- 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.mjs +26 -9
- package/dist/jsx/views/ImageGrid.mjs.map +1 -1
- package/dist/jsx/views/ImageGrid.native.js +27 -8
- package/dist/jsx/views/ImageGrid.native.js.map +1 -1
- package/dist/jsx/views/List.mjs +8 -186
- package/dist/jsx/views/List.mjs.map +1 -1
- package/dist/jsx/views/List.native.js +14 -193
- package/dist/jsx/views/List.native.js.map +1 -1
- package/dist/jsx/views/ListGroup.mjs +144 -0
- package/dist/jsx/views/ListGroup.mjs.map +1 -0
- package/dist/jsx/views/ListGroup.native.js +194 -0
- package/dist/jsx/views/ListGroup.native.js.map +1 -0
- package/dist/jsx/views/ListRow.mjs +234 -0
- package/dist/jsx/views/ListRow.mjs.map +1 -0
- package/dist/jsx/views/ListRow.native.js +274 -0
- package/dist/jsx/views/ListRow.native.js.map +1 -0
- package/dist/jsx/views/Matrix.native.js.map +1 -1
- package/dist/jsx/views/ReportBuilder.native.js.map +1 -1
- package/dist/jsx/views/ShortcutCard.mjs +75 -0
- package/dist/jsx/views/ShortcutCard.mjs.map +1 -0
- package/dist/jsx/views/ShortcutCard.native.js +104 -0
- package/dist/jsx/views/ShortcutCard.native.js.map +1 -0
- 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.mjs +2 -2
- package/dist/jsx/views/index.mjs.map +1 -1
- package/dist/jsx/views/index.native.js +3 -0
- 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.mjs +66 -0
- package/dist/jsx/views/widgetChrome.mjs.map +1 -0
- package/dist/jsx/views/widgetChrome.native.js +95 -0
- package/dist/jsx/views/widgetChrome.native.js.map +1 -0
- package/package.json +9 -9
- package/src/Alert/Alert.spec.tsx +79 -0
- package/src/Alert/Alert.stories.tsx +32 -1
- package/src/Alert/index.tsx +54 -5
- package/src/Carousel/Carousel.native.spec.tsx +4 -0
- package/src/Carousel/index.tsx +21 -0
- package/src/ContextMenu/ContextMenu.spec.tsx +3 -2
- package/src/ContextMenu/index.tsx +13 -7
- package/src/DropdownMenu/DropdownMenu.spec.tsx +13 -2
- package/src/DropdownMenu/DropdownMenu.stories.tsx +41 -0
- package/src/DropdownMenu/index.tsx +14 -7
- package/src/Lightbox/Lightbox.spec.tsx +127 -0
- package/src/Lightbox/Lightbox.stories.tsx +108 -0
- package/src/Lightbox/MediaControl.tsx +44 -0
- package/src/Lightbox/index.gnome.tsx +12 -0
- package/src/Lightbox/index.native.tsx +484 -0
- package/src/Lightbox/index.tsx +304 -0
- package/src/Lightbox/shared.spec.ts +78 -0
- package/src/Lightbox/shared.ts +100 -0
- package/src/Lightbox/useLightbox.ts +21 -0
- package/src/Material/index.tsx +1 -1
- package/src/TreeSelect/index.tsx +2 -1
- package/src/checkedRow.spec.tsx +146 -0
- package/src/code/Pre/Pre.stories.tsx +13 -0
- package/src/componentColors.ts +10 -0
- package/src/images/Image/framing.ts +8 -0
- package/src/images/Image/index.native.tsx +3 -1
- package/src/images/Image/index.tsx +8 -2
- package/src/images/Image/mediaRadius.ts +8 -0
- package/src/images/Image/shared.ts +4 -7
- package/src/index.ts +2 -0
- package/src/overlayElevation.spec.tsx +3 -1
- package/src/views/Dashboard.tsx +5 -146
- package/src/views/ImageGrid.spec.tsx +33 -0
- package/src/views/ImageGrid.stories.tsx +4 -13
- package/src/views/ImageGrid.tsx +31 -6
- package/src/views/Kanban.native.spec.tsx +2 -2
- package/src/views/List.tsx +22 -237
- package/src/views/ListGroup.spec.tsx +220 -0
- package/src/views/ListGroup.stories.tsx +83 -0
- package/src/views/ListGroup.tsx +189 -0
- package/src/views/ListRow.tsx +282 -0
- package/src/views/ShortcutCard.spec.tsx +40 -0
- package/src/views/ShortcutCard.stories.tsx +50 -1
- package/src/views/ShortcutCard.tsx +88 -0
- package/src/views/index.ts +6 -0
- package/src/views/widgetChrome.tsx +73 -0
- package/types/Alert/index.d.ts +9 -0
- package/types/Alert/index.d.ts.map +1 -1
- package/types/Carousel/index.d.ts +8 -1
- package/types/Carousel/index.d.ts.map +1 -1
- package/types/ContextMenu/index.d.ts.map +1 -1
- package/types/DropdownMenu/index.d.ts.map +1 -1
- package/types/Lightbox/MediaControl.d.ts +13 -0
- package/types/Lightbox/MediaControl.d.ts.map +1 -0
- package/types/Lightbox/index.d.ts +14 -0
- package/types/Lightbox/index.d.ts.map +1 -0
- package/types/Lightbox/index.gnome.d.ts +9 -0
- package/types/Lightbox/index.gnome.d.ts.map +1 -0
- package/types/Lightbox/index.native.d.ts +13 -0
- package/types/Lightbox/index.native.d.ts.map +1 -0
- package/types/Lightbox/shared.d.ts +61 -0
- package/types/Lightbox/shared.d.ts.map +1 -0
- package/types/Lightbox/useLightbox.d.ts +11 -0
- package/types/Lightbox/useLightbox.d.ts.map +1 -0
- package/types/Material/index.d.ts +1 -0
- package/types/Material/index.d.ts.map +1 -1
- package/types/TreeSelect/index.d.ts.map +1 -1
- package/types/componentColors.d.ts +9 -0
- package/types/componentColors.d.ts.map +1 -1
- package/types/images/Image/framing.d.ts +7 -0
- package/types/images/Image/framing.d.ts.map +1 -0
- package/types/images/Image/index.d.ts.map +1 -1
- package/types/images/Image/index.native.d.ts.map +1 -1
- package/types/images/Image/mediaRadius.d.ts +7 -0
- package/types/images/Image/mediaRadius.d.ts.map +1 -0
- package/types/images/Image/shared.d.ts +2 -6
- package/types/images/Image/shared.d.ts.map +1 -1
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -1
- package/types/views/Dashboard.d.ts +2 -15
- package/types/views/Dashboard.d.ts.map +1 -1
- package/types/views/ImageGrid.d.ts +8 -1
- package/types/views/ImageGrid.d.ts.map +1 -1
- package/types/views/List.d.ts +3 -66
- package/types/views/List.d.ts.map +1 -1
- package/types/views/ListGroup.d.ts +43 -0
- package/types/views/ListGroup.d.ts.map +1 -0
- package/types/views/ListRow.d.ts +88 -0
- package/types/views/ListRow.d.ts.map +1 -0
- package/types/views/ShortcutCard.d.ts +26 -0
- package/types/views/ShortcutCard.d.ts.map +1 -0
- package/types/views/index.d.ts +1 -1
- package/types/views/index.d.ts.map +1 -1
- package/types/views/widgetChrome.d.ts +72 -0
- package/types/views/widgetChrome.d.ts.map +1 -0
package/src/views/List.tsx
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { componentColors } from "../componentColors";
|
|
2
|
-
import { ImageFramingContext } from "../images/Image/shared";
|
|
3
2
|
import { AsyncBoundary } from "../layouts/AsyncBoundary";
|
|
4
3
|
import { Spinner } from "@multiplatform.one/forms";
|
|
5
4
|
import { FlashList, type FlashListRef } from "@shopify/flash-list";
|
|
6
5
|
import {
|
|
7
|
-
IconSlot,
|
|
8
6
|
MIN_PRESS_TARGET,
|
|
9
7
|
containerCapProps,
|
|
10
8
|
ensureKeyboardModalityTracking,
|
|
@@ -12,10 +10,7 @@ import {
|
|
|
12
10
|
hairline,
|
|
13
11
|
hairlineWidth,
|
|
14
12
|
keyboardFocusRingProps,
|
|
15
|
-
recipeKeyAbove,
|
|
16
|
-
sizeRecipeForToken,
|
|
17
13
|
stackRadiusProps,
|
|
18
|
-
type SizeRecipeToken,
|
|
19
14
|
Surface,
|
|
20
15
|
useResolvedKnobs,
|
|
21
16
|
useTouchSurface,
|
|
@@ -24,17 +19,29 @@ import {
|
|
|
24
19
|
} from "@multiplatform.one/theme";
|
|
25
20
|
import { useHotkey } from "@tanstack/react-hotkeys";
|
|
26
21
|
import type { RegisterableHotkey } from "@tanstack/react-hotkeys";
|
|
27
|
-
import React, {
|
|
28
|
-
createContext,
|
|
29
|
-
useCallback,
|
|
30
|
-
useContext,
|
|
31
|
-
useId,
|
|
32
|
-
useRef,
|
|
33
|
-
useState,
|
|
34
|
-
type ReactNode,
|
|
35
|
-
} from "react";
|
|
22
|
+
import React, { useCallback, useId, useRef, useState, type ReactNode } from "react";
|
|
36
23
|
import { useTranslation } from "../shared/i18n";
|
|
37
|
-
import {
|
|
24
|
+
import { View, XStack, YStack, type SizeTokens, type YStackProps } from "tamagui";
|
|
25
|
+
import { ListItemStateContext, listRowTouchProps, type ListItemState } from "./ListRow";
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
ListRow,
|
|
29
|
+
ListRowFact,
|
|
30
|
+
ListRowMeta,
|
|
31
|
+
listLeadingIconSize,
|
|
32
|
+
listRowPressDelayMs,
|
|
33
|
+
listRowTouchProps,
|
|
34
|
+
useListItemState,
|
|
35
|
+
type ListItemState,
|
|
36
|
+
type ListRowProps,
|
|
37
|
+
} from "./ListRow";
|
|
38
|
+
export {
|
|
39
|
+
ListGroup,
|
|
40
|
+
ListGroupItem,
|
|
41
|
+
type ListGroupItemProps,
|
|
42
|
+
type ListGroupProps,
|
|
43
|
+
type ListGroupVariant,
|
|
44
|
+
} from "./ListGroup";
|
|
38
45
|
|
|
39
46
|
/**
|
|
40
47
|
* Configurable hotkey bindings for the List component.
|
|
@@ -56,228 +63,6 @@ export interface ListHotkeys {
|
|
|
56
63
|
pageUp?: RegisterableHotkey;
|
|
57
64
|
}
|
|
58
65
|
|
|
59
|
-
/** Per-row interaction state passed to `renderItem` and `ListRow`. */
|
|
60
|
-
export interface ListItemState {
|
|
61
|
-
selected: boolean;
|
|
62
|
-
focused: boolean;
|
|
63
|
-
/** Ink for the selected row (LC-05 selection tier) */
|
|
64
|
-
selectedInk?: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/** True inside a ListRow with a subtitle: its trailing meta is a caption. */
|
|
68
|
-
const ListRowTwoLineContext = createContext(false);
|
|
69
|
-
|
|
70
|
-
const ListItemStateContext = createContext<ListItemState>({
|
|
71
|
-
selected: false,
|
|
72
|
-
focused: false,
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
/** Read the current row's selection/focus. Defaults to idle outside a List. */
|
|
76
|
-
export function useListItemState(): ListItemState {
|
|
77
|
-
return useContext(ListItemStateContext);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Subject-led document row (Desk list / Linear / Finder): leading glyph or
|
|
82
|
-
* media, title (+ optional subtitle), trailing muted meta. Sits inside List's
|
|
83
|
-
* stacked-group chrome — does not paint its own radius, fill, or ring.
|
|
84
|
-
*
|
|
85
|
-
* LC-155 ROW-ANATOMY: the title is the headline role, the subtitle the meta
|
|
86
|
-
* role on one line, and with a subtitle the row is a two-line Mail row whose
|
|
87
|
-
* trailing meta is a caption at the top right.
|
|
88
|
-
*/
|
|
89
|
-
export interface ListRowProps {
|
|
90
|
-
/** Leading glyph slot — fixed box so titles share one x (LC-08). */
|
|
91
|
-
icon?: ReactNode;
|
|
92
|
-
/**
|
|
93
|
-
* Leading media slot (an avatar, a thumbnail): a `$true` square, and a
|
|
94
|
-
* thumbnail inside it draws no tile of its own.
|
|
95
|
-
*/
|
|
96
|
-
media?: ReactNode;
|
|
97
|
-
title: ReactNode;
|
|
98
|
-
subtitle?: ReactNode;
|
|
99
|
-
/** Trailing Finder/Desk columns (dates, size, kind, status). */
|
|
100
|
-
meta?: ReactNode;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function RowText({
|
|
104
|
-
children,
|
|
105
|
-
...props
|
|
106
|
-
}: { children: ReactNode } & React.ComponentProps<typeof Text>) {
|
|
107
|
-
if (children == null || children === false) return null;
|
|
108
|
-
if (typeof children === "string" || typeof children === "number") {
|
|
109
|
-
return <Text {...props}>{children}</Text>;
|
|
110
|
-
}
|
|
111
|
-
return <>{children}</>;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Trailing Finder/Desk column. Inherits selected fill ink (LC-71). `width`
|
|
116
|
-
* fixes the column (a size token or a measured px) so the same column lines
|
|
117
|
-
* up from row to row; rich cell content (pills, formatted cells) renders in a
|
|
118
|
-
* box of that width instead of a Text run.
|
|
119
|
-
*/
|
|
120
|
-
export function ListRowMeta({
|
|
121
|
-
children,
|
|
122
|
-
width,
|
|
123
|
-
color,
|
|
124
|
-
}: {
|
|
125
|
-
children: ReactNode;
|
|
126
|
-
width?: number | SizeTokens;
|
|
127
|
-
color?: string;
|
|
128
|
-
}) {
|
|
129
|
-
const { knobProps } = useResolvedKnobs();
|
|
130
|
-
const { selected, selectedInk } = useListItemState();
|
|
131
|
-
const twoLine = useContext(ListRowTwoLineContext);
|
|
132
|
-
const type = twoLine ? knobProps.textRole.caption : knobProps.label;
|
|
133
|
-
const ink = color ?? (twoLine ? knobProps.textRole.caption.color : knobProps.textAccentColor);
|
|
134
|
-
const resolved = selected && selectedInk ? selectedInk : ink;
|
|
135
|
-
if (typeof children !== "string" && typeof children !== "number") {
|
|
136
|
-
return (
|
|
137
|
-
<XStack
|
|
138
|
-
width={width}
|
|
139
|
-
flexShrink={0}
|
|
140
|
-
minWidth={0}
|
|
141
|
-
alignItems="center"
|
|
142
|
-
justifyContent="flex-end"
|
|
143
|
-
overflow="hidden"
|
|
144
|
-
{...({ "data-list-slot": "trailing", color: resolved } as Record<string, unknown>)}
|
|
145
|
-
>
|
|
146
|
-
{children}
|
|
147
|
-
</XStack>
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
return (
|
|
151
|
-
<Text
|
|
152
|
-
{...type}
|
|
153
|
-
color={resolved}
|
|
154
|
-
numberOfLines={1}
|
|
155
|
-
width={width}
|
|
156
|
-
flexShrink={0}
|
|
157
|
-
textAlign="right"
|
|
158
|
-
userSelect="none"
|
|
159
|
-
>
|
|
160
|
-
{children}
|
|
161
|
-
</Text>
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* The leading glyph of a (two-line) list row: the control icon two recipe
|
|
167
|
-
* keys above the row's size token (20 at the default `$true`), read off the
|
|
168
|
-
* scale so a preset restyles it with every other control icon.
|
|
169
|
-
*/
|
|
170
|
-
export function listLeadingIconSize(sizeToken: string): number {
|
|
171
|
-
return sizeRecipeForToken(recipeKeyAbove(recipeKeyAbove(sizeToken as SizeRecipeToken))).iconSize;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export function ListRow({ icon, media, title, subtitle, meta }: ListRowProps) {
|
|
175
|
-
const { knobProps } = useResolvedKnobs();
|
|
176
|
-
const { selected, selectedInk } = useListItemState();
|
|
177
|
-
const { headline, meta: metaRole } = knobProps.textRole;
|
|
178
|
-
const selectedOverride = selected && selectedInk ? selectedInk : undefined;
|
|
179
|
-
const ink = selectedOverride ?? knobProps.textAccentColor;
|
|
180
|
-
const iconSize = listLeadingIconSize(knobProps.sizeToken);
|
|
181
|
-
const leading = icon ? <IconSlot icon={icon} size={iconSize} color={ink} /> : null;
|
|
182
|
-
const twoLine = subtitle != null && subtitle !== false;
|
|
183
|
-
|
|
184
|
-
return (
|
|
185
|
-
<ListRowTwoLineContext.Provider value={twoLine}>
|
|
186
|
-
<XStack
|
|
187
|
-
alignItems="center"
|
|
188
|
-
{...knobProps.gap}
|
|
189
|
-
flex={1}
|
|
190
|
-
minWidth={0}
|
|
191
|
-
width="100%"
|
|
192
|
-
{...(twoLine ? { paddingVertical: "$1" } : null)}
|
|
193
|
-
>
|
|
194
|
-
{media ? (
|
|
195
|
-
<View
|
|
196
|
-
width="$true"
|
|
197
|
-
height="$true"
|
|
198
|
-
flexShrink={0}
|
|
199
|
-
alignItems="center"
|
|
200
|
-
justifyContent="center"
|
|
201
|
-
overflow="hidden"
|
|
202
|
-
{...({ "data-list-slot": "media" } as Record<string, unknown>)}
|
|
203
|
-
>
|
|
204
|
-
<ImageFramingContext.Provider value={false}>{media}</ImageFramingContext.Provider>
|
|
205
|
-
</View>
|
|
206
|
-
) : null}
|
|
207
|
-
{leading ? (
|
|
208
|
-
<View
|
|
209
|
-
width={iconSize}
|
|
210
|
-
height={iconSize}
|
|
211
|
-
flexShrink={0}
|
|
212
|
-
alignItems="center"
|
|
213
|
-
justifyContent="center"
|
|
214
|
-
{...({ "data-list-slot": "icon", color: ink } as Record<string, unknown>)}
|
|
215
|
-
>
|
|
216
|
-
{leading}
|
|
217
|
-
</View>
|
|
218
|
-
) : null}
|
|
219
|
-
<YStack
|
|
220
|
-
flex={1}
|
|
221
|
-
minWidth={0}
|
|
222
|
-
{...({ "data-list-slot": "title" } as Record<string, unknown>)}
|
|
223
|
-
>
|
|
224
|
-
<RowText
|
|
225
|
-
{...knobProps.body}
|
|
226
|
-
{...headline}
|
|
227
|
-
color={selectedOverride ?? headline.color}
|
|
228
|
-
numberOfLines={1}
|
|
229
|
-
userSelect="none"
|
|
230
|
-
>
|
|
231
|
-
{title}
|
|
232
|
-
</RowText>
|
|
233
|
-
{twoLine ? (
|
|
234
|
-
<RowText
|
|
235
|
-
{...knobProps.body}
|
|
236
|
-
{...metaRole}
|
|
237
|
-
color={selectedOverride ?? metaRole.color}
|
|
238
|
-
opacity={selected ? 0.85 : 1}
|
|
239
|
-
numberOfLines={1}
|
|
240
|
-
userSelect="none"
|
|
241
|
-
>
|
|
242
|
-
{subtitle}
|
|
243
|
-
</RowText>
|
|
244
|
-
) : null}
|
|
245
|
-
</YStack>
|
|
246
|
-
{meta != null && meta !== false ? (
|
|
247
|
-
<XStack
|
|
248
|
-
alignItems="center"
|
|
249
|
-
{...knobProps.gap}
|
|
250
|
-
flexShrink={0}
|
|
251
|
-
{...(twoLine ? { alignSelf: "flex-start" } : null)}
|
|
252
|
-
{...({ "data-list-slot": "meta" } as Record<string, unknown>)}
|
|
253
|
-
>
|
|
254
|
-
{typeof meta === "string" || typeof meta === "number" ? (
|
|
255
|
-
<ListRowMeta>{meta}</ListRowMeta>
|
|
256
|
-
) : (
|
|
257
|
-
meta
|
|
258
|
-
)}
|
|
259
|
-
</XStack>
|
|
260
|
-
) : null}
|
|
261
|
-
</XStack>
|
|
262
|
-
</ListRowTwoLineContext.Provider>
|
|
263
|
-
);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* A row in a scroller waits this long before it paints its press, the delay
|
|
268
|
-
* UIScrollView gives its content: a touch that becomes a scroll never fills
|
|
269
|
-
* the row it started on (LC-147).
|
|
270
|
-
*/
|
|
271
|
-
export const listRowPressDelayMs = 150;
|
|
272
|
-
|
|
273
|
-
/** What a touch surface adds to a row: the 44 floor and, on native, the press delay. */
|
|
274
|
-
export function listRowTouchProps(touch: boolean, native = !isWeb) {
|
|
275
|
-
if (!touch) return {};
|
|
276
|
-
return native
|
|
277
|
-
? { minHeight: MIN_PRESS_TARGET, delayPressIn: listRowPressDelayMs }
|
|
278
|
-
: { minHeight: MIN_PRESS_TARGET };
|
|
279
|
-
}
|
|
280
|
-
|
|
281
66
|
/**
|
|
282
67
|
* Props for the generic List component.
|
|
283
68
|
*
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { cleanup, fireEvent, screen } from "@testing-library/react";
|
|
2
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
3
|
+
import { GroupPositionContext } from "@multiplatform.one/theme";
|
|
4
|
+
import { useContext } from "react";
|
|
5
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
6
|
+
import { ListGroup, ListGroupItem, ListRow, ListRowFact, useListItemState } from "./List";
|
|
7
|
+
import * as ViewExports from "./index";
|
|
8
|
+
|
|
9
|
+
afterEach(cleanup);
|
|
10
|
+
|
|
11
|
+
function rows(container: HTMLElement): HTMLElement[] {
|
|
12
|
+
return Array.from(container.querySelectorAll<HTMLElement>("[data-list-row]"));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
describe("ListGroup (LC-175 MPO-ONLY-REUSE: the inset-grouped list apps used to build)", () => {
|
|
16
|
+
it("ships from the views barrel", () => {
|
|
17
|
+
expect(ViewExports).toHaveProperty("ListGroup");
|
|
18
|
+
expect(ViewExports).toHaveProperty("ListGroupItem");
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it("tells each row its place in the stacked group (LC-72)", () => {
|
|
22
|
+
const { container } = renderWithProviders(
|
|
23
|
+
<ListGroup aria-label="Settings">
|
|
24
|
+
<ListGroupItem>
|
|
25
|
+
<ListRow title="Wi-Fi" />
|
|
26
|
+
</ListGroupItem>
|
|
27
|
+
<ListGroupItem>
|
|
28
|
+
<ListRow title="Bluetooth" />
|
|
29
|
+
</ListGroupItem>
|
|
30
|
+
<ListGroupItem>
|
|
31
|
+
<ListRow title="Cellular" />
|
|
32
|
+
</ListGroupItem>
|
|
33
|
+
</ListGroup>,
|
|
34
|
+
);
|
|
35
|
+
expect(rows(container).map((row) => row.getAttribute("data-group-position"))).toEqual([
|
|
36
|
+
"first",
|
|
37
|
+
"middle",
|
|
38
|
+
"last",
|
|
39
|
+
]);
|
|
40
|
+
expect(screen.getByRole("list", { name: "Settings" })).toBeTruthy();
|
|
41
|
+
expect(screen.getAllByRole("listitem")).toHaveLength(3);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("draws a hairline between rows only, never above the first", () => {
|
|
45
|
+
const { container } = renderWithProviders(
|
|
46
|
+
<ListGroup>
|
|
47
|
+
<ListGroupItem>
|
|
48
|
+
<ListRow title="One" />
|
|
49
|
+
</ListGroupItem>
|
|
50
|
+
<ListGroupItem>
|
|
51
|
+
<ListRow title="Two" />
|
|
52
|
+
</ListGroupItem>
|
|
53
|
+
</ListGroup>,
|
|
54
|
+
);
|
|
55
|
+
const items = screen.getAllByRole("listitem");
|
|
56
|
+
expect(items[0].children).toHaveLength(1);
|
|
57
|
+
expect(items[1].children).toHaveLength(2);
|
|
58
|
+
expect(rows(container)).toHaveLength(2);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("insets each hairline to the row's text, past a leading icon (iOS inset-grouped)", () => {
|
|
62
|
+
const { container } = renderWithProviders(
|
|
63
|
+
<ListGroup>
|
|
64
|
+
<ListGroupItem>
|
|
65
|
+
<ListRow icon={<span />} title="Wi-Fi" />
|
|
66
|
+
</ListGroupItem>
|
|
67
|
+
<ListGroupItem>
|
|
68
|
+
<ListRow icon={<span />} title="Bluetooth" />
|
|
69
|
+
</ListGroupItem>
|
|
70
|
+
<ListGroupItem>
|
|
71
|
+
<ListRow title="About" />
|
|
72
|
+
</ListGroupItem>
|
|
73
|
+
</ListGroup>,
|
|
74
|
+
);
|
|
75
|
+
const lines = Array.from(container.querySelectorAll("[data-list-hairline]"));
|
|
76
|
+
expect(lines.map((line) => line.getAttribute("data-list-hairline"))).toEqual(["icon", "text"]);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it("the inset variant sits on the Card surface; plain paints none", () => {
|
|
80
|
+
const { container, unmount } = renderWithProviders(
|
|
81
|
+
<ListGroup>
|
|
82
|
+
<ListGroupItem>
|
|
83
|
+
<ListRow title="Inset" />
|
|
84
|
+
</ListGroupItem>
|
|
85
|
+
</ListGroup>,
|
|
86
|
+
);
|
|
87
|
+
expect(container.querySelector('[data-tier="content"]')).toBeTruthy();
|
|
88
|
+
unmount();
|
|
89
|
+
const plain = renderWithProviders(
|
|
90
|
+
<ListGroup variant="plain">
|
|
91
|
+
<ListGroupItem>
|
|
92
|
+
<ListRow title="Plain" />
|
|
93
|
+
</ListGroupItem>
|
|
94
|
+
</ListGroup>,
|
|
95
|
+
);
|
|
96
|
+
expect(plain.container.querySelector('[data-tier="content"]')).toBeNull();
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
it("a pressable row is a button that answers press, Enter and Space", () => {
|
|
100
|
+
const onPress = vi.fn();
|
|
101
|
+
renderWithProviders(
|
|
102
|
+
<ListGroup>
|
|
103
|
+
<ListGroupItem onPress={onPress} aria-label="Open Pikachu">
|
|
104
|
+
<ListRow title="Pikachu" />
|
|
105
|
+
</ListGroupItem>
|
|
106
|
+
</ListGroup>,
|
|
107
|
+
);
|
|
108
|
+
const button = screen.getByRole("button", { name: "Open Pikachu" });
|
|
109
|
+
fireEvent.click(button);
|
|
110
|
+
fireEvent.keyDown(button, { key: "Enter" });
|
|
111
|
+
fireEvent.keyDown(button, { key: " " });
|
|
112
|
+
expect(onPress).toHaveBeenCalledTimes(3);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
it("a row without onPress is not a button", () => {
|
|
116
|
+
renderWithProviders(
|
|
117
|
+
<ListGroup>
|
|
118
|
+
<ListGroupItem>
|
|
119
|
+
<ListRow title="Static" />
|
|
120
|
+
</ListGroupItem>
|
|
121
|
+
</ListGroup>,
|
|
122
|
+
);
|
|
123
|
+
expect(screen.queryByRole("button")).toBeNull();
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it("the selected row carries data-selected and hands its state to the content", () => {
|
|
127
|
+
let seen: boolean | undefined;
|
|
128
|
+
function Probe() {
|
|
129
|
+
seen = useListItemState().selected;
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
const { container } = renderWithProviders(
|
|
133
|
+
<ListGroup variant="plain">
|
|
134
|
+
<ListGroupItem selected onPress={() => {}}>
|
|
135
|
+
<Probe />
|
|
136
|
+
</ListGroupItem>
|
|
137
|
+
</ListGroup>,
|
|
138
|
+
);
|
|
139
|
+
expect(rows(container)[0].hasAttribute("data-selected")).toBe(true);
|
|
140
|
+
expect(seen).toBe(true);
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
it("an explicit position wins for rows a virtualized list renders one by one", () => {
|
|
144
|
+
const { container } = renderWithProviders(
|
|
145
|
+
<ListGroupItem groupPosition="last">
|
|
146
|
+
<ListRow title="Alone" />
|
|
147
|
+
</ListGroupItem>,
|
|
148
|
+
);
|
|
149
|
+
expect(rows(container)[0].getAttribute("data-group-position")).toBe("last");
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
describe("ListRow done (a checked to-do)", () => {
|
|
154
|
+
it("marks the row done and strikes the title and subtitle through", () => {
|
|
155
|
+
const { container } = renderWithProviders(
|
|
156
|
+
<ListRow title="Buy milk" subtitle="Two litres" done />,
|
|
157
|
+
);
|
|
158
|
+
expect(container.querySelector("[data-done]")).toBeTruthy();
|
|
159
|
+
for (const text of ["Buy milk", "Two litres"]) {
|
|
160
|
+
const className = String(screen.getByText(text).className);
|
|
161
|
+
// tamagui truncates long atomic class names: _td-line-throug<hash>
|
|
162
|
+
expect(className).toMatch(/_td-line-throug/);
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
it("an open row is neither marked nor struck", () => {
|
|
167
|
+
const { container } = renderWithProviders(<ListRow title="Buy bread" />);
|
|
168
|
+
expect(container.querySelector("[data-done]")).toBeNull();
|
|
169
|
+
expect(String(screen.getByText("Buy bread").className)).not.toMatch(/line-through/);
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
describe("ListGroupItem content", () => {
|
|
174
|
+
it("does not hand its group position to what it holds", () => {
|
|
175
|
+
let seen: unknown = "unset";
|
|
176
|
+
function Probe() {
|
|
177
|
+
seen = useContext(GroupPositionContext);
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
renderWithProviders(
|
|
181
|
+
<ListGroup>
|
|
182
|
+
<ListGroupItem>
|
|
183
|
+
<Probe />
|
|
184
|
+
</ListGroupItem>
|
|
185
|
+
<ListGroupItem>
|
|
186
|
+
<ListRow title="Two" />
|
|
187
|
+
</ListGroupItem>
|
|
188
|
+
</ListGroup>,
|
|
189
|
+
);
|
|
190
|
+
expect(seen).toBeUndefined();
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
describe("ListRowFact (LC-261 NO-MIDDOT-JOIN)", () => {
|
|
195
|
+
it("puts a count beside its glyph in the trailing meta, named in words, the subtitle left alone", () => {
|
|
196
|
+
const Glyph = () => <svg data-testid="fact-glyph" />;
|
|
197
|
+
const { container } = renderWithProviders(
|
|
198
|
+
<ListGroup>
|
|
199
|
+
<ListGroupItem>
|
|
200
|
+
<ListRow
|
|
201
|
+
title="Button"
|
|
202
|
+
subtitle="Forms"
|
|
203
|
+
meta={
|
|
204
|
+
<ListRowFact icon={Glyph} label="12 stories">
|
|
205
|
+
12
|
|
206
|
+
</ListRowFact>
|
|
207
|
+
}
|
|
208
|
+
/>
|
|
209
|
+
</ListGroupItem>
|
|
210
|
+
</ListGroup>,
|
|
211
|
+
);
|
|
212
|
+
const fact = container.querySelector<HTMLElement>('[data-list-slot="fact"]');
|
|
213
|
+
expect(fact?.getAttribute("aria-label")).toBe("12 stories");
|
|
214
|
+
expect(fact?.textContent).toBe("12");
|
|
215
|
+
expect(fact?.querySelector('[data-testid="fact-glyph"]')).toBeTruthy();
|
|
216
|
+
expect(fact?.closest('[data-list-slot="meta"]')).toBeTruthy();
|
|
217
|
+
expect(screen.getByText("Forms").textContent).toBe("Forms");
|
|
218
|
+
expect(ViewExports).toHaveProperty("ListRowFact");
|
|
219
|
+
});
|
|
220
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { action } from "@multiplatform.one/storybook";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
3
|
+
import { BellIcon, HouseIcon, MoonIcon, WifiHighIcon } from "@phosphor-icons/react";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { YStack } from "tamagui";
|
|
6
|
+
import { ListGroup, ListGroupItem, ListRow, ListRowFact } from "./List";
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof ListGroup> = {
|
|
9
|
+
title: "Components/ListGroup",
|
|
10
|
+
component: ListGroup,
|
|
11
|
+
parameters: {
|
|
12
|
+
status: { type: "stable" },
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component:
|
|
16
|
+
"A short, static list of rows drawn as one stacked group: a settings section, a to-do list, a catalog section. `inset` sits on the Card surface; `plain` on the ground it is placed on.",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof ListGroup>;
|
|
24
|
+
|
|
25
|
+
export const Inset: Story = {
|
|
26
|
+
render: () => (
|
|
27
|
+
<YStack width="100%" maxWidth={390}>
|
|
28
|
+
<ListGroup aria-label="Settings">
|
|
29
|
+
<ListGroupItem onPress={action("row:wifi")}>
|
|
30
|
+
<ListRow
|
|
31
|
+
icon={<WifiHighIcon />}
|
|
32
|
+
title="Wi-Fi"
|
|
33
|
+
meta={<ListRowFact icon={HouseIcon} label="Joined the home network" />}
|
|
34
|
+
/>
|
|
35
|
+
</ListGroupItem>
|
|
36
|
+
<ListGroupItem onPress={action("row:notifications")}>
|
|
37
|
+
<ListRow icon={<BellIcon />} title="Notifications" subtitle="Banners, sounds" />
|
|
38
|
+
</ListGroupItem>
|
|
39
|
+
<ListGroupItem onPress={action("row:focus")}>
|
|
40
|
+
<ListRow icon={<MoonIcon />} title="Focus" meta="Off" />
|
|
41
|
+
</ListGroupItem>
|
|
42
|
+
</ListGroup>
|
|
43
|
+
</YStack>
|
|
44
|
+
),
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const Plain: Story = {
|
|
48
|
+
render: function PlainStory() {
|
|
49
|
+
const [active, setActive] = useState("primitives");
|
|
50
|
+
const sections = ["primitives", "forms", "layouts", "data"];
|
|
51
|
+
return (
|
|
52
|
+
<YStack width={260} padding="$4">
|
|
53
|
+
<ListGroup variant="plain" aria-label="Sections">
|
|
54
|
+
{sections.map((id) => (
|
|
55
|
+
<ListGroupItem
|
|
56
|
+
key={id}
|
|
57
|
+
selected={id === active}
|
|
58
|
+
aria-current={id === active ? "true" : undefined}
|
|
59
|
+
onPress={() => setActive(id)}
|
|
60
|
+
>
|
|
61
|
+
<ListRow title={id[0].toUpperCase() + id.slice(1)} />
|
|
62
|
+
</ListGroupItem>
|
|
63
|
+
))}
|
|
64
|
+
</ListGroup>
|
|
65
|
+
</YStack>
|
|
66
|
+
);
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const Done: Story = {
|
|
71
|
+
render: () => (
|
|
72
|
+
<YStack width="100%" maxWidth={390}>
|
|
73
|
+
<ListGroup aria-label="To-dos">
|
|
74
|
+
<ListGroupItem>
|
|
75
|
+
<ListRow title="Book the venue" subtitle="Call before Friday" />
|
|
76
|
+
</ListGroupItem>
|
|
77
|
+
<ListGroupItem>
|
|
78
|
+
<ListRow title="Send invitations" subtitle="Forty guests" done />
|
|
79
|
+
</ListGroupItem>
|
|
80
|
+
</ListGroup>
|
|
81
|
+
</YStack>
|
|
82
|
+
),
|
|
83
|
+
};
|