@multiplatform.one/components 9.11.0 → 9.12.1
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/Avatar/index.cjs +4 -15
- package/dist/cjs/Avatar/index.native.js +4 -15
- package/dist/cjs/Avatar/index.native.js.map +1 -1
- package/dist/cjs/Tabs/index.cjs +9 -2
- package/dist/cjs/Tabs/index.native.js +9 -2
- package/dist/cjs/Tabs/index.native.js.map +1 -1
- package/dist/cjs/layouts/bottomSafeArea.cjs +1 -0
- package/dist/cjs/layouts/bottomSafeArea.native.js +1 -0
- package/dist/cjs/layouts/bottomSafeArea.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +5 -1
- package/dist/cjs/layouts/page.native.js +5 -1
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/esm/Avatar/index.mjs +5 -15
- package/dist/esm/Avatar/index.mjs.map +1 -1
- package/dist/esm/Avatar/index.native.js +5 -15
- package/dist/esm/Avatar/index.native.js.map +1 -1
- package/dist/esm/Tabs/index.mjs +10 -3
- package/dist/esm/Tabs/index.mjs.map +1 -1
- package/dist/esm/Tabs/index.native.js +10 -3
- package/dist/esm/Tabs/index.native.js.map +1 -1
- package/dist/esm/layouts/bottomSafeArea.mjs +1 -0
- package/dist/esm/layouts/bottomSafeArea.mjs.map +1 -1
- package/dist/esm/layouts/bottomSafeArea.native.js +1 -0
- package/dist/esm/layouts/bottomSafeArea.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +5 -1
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +5 -1
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/jsx/Accordion/index.native.js +1 -1
- package/dist/jsx/Accordion/index.native.js.map +1 -1
- package/dist/jsx/Alert/index.native.js.map +1 -1
- package/dist/jsx/AnimateHeight/index.native.js.map +1 -1
- package/dist/jsx/Avatar/getInitials.native.js.map +1 -1
- package/dist/jsx/Avatar/index.mjs +5 -15
- package/dist/jsx/Avatar/index.mjs.map +1 -1
- package/dist/jsx/Avatar/index.native.js +4 -15
- 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/geometry.native.js.map +1 -1
- package/dist/jsx/Carousel/index.native.js +2 -2
- package/dist/jsx/Carousel/index.native.js.map +1 -1
- package/dist/jsx/ChatTurn/index.native.js.map +1 -1
- package/dist/jsx/CheckGlyph/MenuCheckColumn.native.js.map +1 -1
- package/dist/jsx/CheckGlyph/index.native.js.map +1 -1
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/ChoiceChips/index.native.js +1 -1
- package/dist/jsx/ChoiceChips/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.native.js +1 -1
- package/dist/jsx/CopyField/CopyMenuButton.native.js.map +1 -1
- package/dist/jsx/CopyField/index.native.js.map +1 -1
- package/dist/jsx/Dialog.native.js +1 -1
- package/dist/jsx/Dialog.native.js.map +1 -1
- package/dist/jsx/Diff/diff.native.js.map +1 -1
- package/dist/jsx/Diff/index.native.js.map +1 -1
- package/dist/jsx/DotIndicator/index.native.js.map +1 -1
- package/dist/jsx/DrillStack/DrillBar.native.js.map +1 -1
- package/dist/jsx/DrillStack/context.native.js.map +1 -1
- package/dist/jsx/DrillStack/drillMotion.native.js.map +1 -1
- package/dist/jsx/DropDownPanel/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/ElapsedProgress/index.native.js.map +1 -1
- package/dist/jsx/ErrorBoundary/index.native.js.map +1 -1
- package/dist/jsx/Heading.native.js.map +1 -1
- package/dist/jsx/Kbd/index.native.js.map +1 -1
- package/dist/jsx/Kbd/keys.native.js.map +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/MachineLiteral/index.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/MiddleEllipsisText/middleSplit.native.js.map +1 -1
- package/dist/jsx/MiddleEllipsisText/types.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.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/SheetBodyRegion.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/SheetScrollView/index.native.js.map +1 -1
- package/dist/jsx/SheetScrollView/sheetHandoff.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/SortableList/useUserOrder.native.js.map +1 -1
- package/dist/jsx/SwipeDismissRow/index.native.js.map +1 -1
- package/dist/jsx/Tabs/index.mjs +10 -3
- package/dist/jsx/Tabs/index.mjs.map +1 -1
- package/dist/jsx/Tabs/index.native.js +9 -2
- 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 +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.native.js +2 -2
- 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/AppShell.native.js +1 -1
- package/dist/jsx/appShell/AppShell.native.js.map +1 -1
- package/dist/jsx/appShell/BottomChromeClearance.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 +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 +1 -1
- package/dist/jsx/appShell/Springboard.native.js.map +1 -1
- package/dist/jsx/appShell/SystemBar.native.js +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/appShell/stackBack.native.js.map +1 -1
- package/dist/jsx/appShell/systemBarFit.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/SeriesLegend.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/HoldSelect/tapGate.native.js.map +1 -1
- package/dist/jsx/code/LogView.native.js.map +1 -1
- package/dist/jsx/code/PayloadView/index.native.js +4 -4
- package/dist/jsx/code/PayloadView/index.native.js.map +1 -1
- package/dist/jsx/code/PayloadView/payloadModel.native.js.map +1 -1
- package/dist/jsx/code/Pre/index.native.js.map +1 -1
- package/dist/jsx/code/index.native.js +7 -7
- 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/SingleTaskColumn.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/useDirection.native.js.map +1 -1
- package/dist/jsx/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/jsx/icons/CheckRegular.native.js.map +1 -1
- package/dist/jsx/icons/MinusRegular.native.js.map +1 -1
- package/dist/jsx/icons/index.native.js.map +1 -1
- package/dist/jsx/icons/lucide.native.js.map +1 -1
- package/dist/jsx/icons/themed.native.js.map +1 -1
- package/dist/jsx/images/Image/ImageFrame.native.js +1 -1
- package/dist/jsx/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/jsx/images/Image/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/RemoteArt/index.native.js +1 -1
- package/dist/jsx/images/RemoteArt/remoteArtCache.native.js.map +1 -1
- package/dist/jsx/images/RemoteArt/svgMarkup.native.js.map +1 -1
- package/dist/jsx/images/RemoteArt/types.native.js.map +1 -1
- package/dist/jsx/images/index.native.js.map +1 -1
- package/dist/jsx/index.gnome.native.js +22 -22
- package/dist/jsx/index.gnome.native.js.map +1 -1
- package/dist/jsx/index.native.js +45 -45
- 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 +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.native.js +1 -1
- package/dist/jsx/layouts/StatusGlyphStrip.native.js.map +1 -1
- package/dist/jsx/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/jsx/layouts/asyncFailure.native.js.map +1 -1
- package/dist/jsx/layouts/attachments.native.js +2 -2
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/barTitleSpan.native.js.map +1 -1
- package/dist/jsx/layouts/bottomAccessory.native.js.map +1 -1
- package/dist/jsx/layouts/bottomSafeArea.mjs +1 -0
- package/dist/jsx/layouts/bottomSafeArea.mjs.map +1 -1
- package/dist/jsx/layouts/bottomSafeArea.native.js +1 -0
- package/dist/jsx/layouts/bottomSafeArea.native.js.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/jsx/layouts/index.native.js +3 -3
- package/dist/jsx/layouts/index.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +5 -1
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +6 -2
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/jsx/layouts/screenScroll.native.js.map +1 -1
- package/dist/jsx/layouts/shellSidebarSlot.native.js.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/dist/jsx/layouts/tags.native.js +1 -1
- 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.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.map +1 -1
- package/dist/jsx/testSetup.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/CardGrid.native.js.map +1 -1
- package/dist/jsx/views/Dashboard.native.js +1 -1
- package/dist/jsx/views/Dashboard.native.js.map +1 -1
- package/dist/jsx/views/FilePreview.native.js +2 -2
- package/dist/jsx/views/FilePreview.native.js.map +1 -1
- package/dist/jsx/views/Gantt.native.js +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.native.js +2 -2
- package/dist/jsx/views/ImageGrid.native.js.map +1 -1
- package/dist/jsx/views/List.native.js.map +1 -1
- package/dist/jsx/views/ListGroup.native.js +1 -1
- package/dist/jsx/views/ListGroup.native.js.map +1 -1
- package/dist/jsx/views/ListRow.native.js.map +1 -1
- package/dist/jsx/views/Matrix.native.js +1 -1
- package/dist/jsx/views/Matrix.native.js.map +1 -1
- package/dist/jsx/views/ReportBuilder.native.js +1 -1
- 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/sameNameScope.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/usePageFlowLoadMore.native.js.map +1 -1
- package/dist/jsx/views/widgetChrome.native.js.map +1 -1
- package/package.json +7 -7
- package/src/Avatar/Avatar.spec.tsx +7 -18
- package/src/Avatar/index.tsx +6 -34
- package/src/Tabs/Tabs.gutter.spec.tsx +61 -1
- package/src/Tabs/Tabs.measurement.spec.tsx +4 -1
- package/src/Tabs/Tabs.stories.tsx +39 -0
- package/src/Tabs/index.tsx +18 -3
- package/src/layouts/bottomAccessory.spec.tsx +56 -0
- package/src/layouts/bottomSafeArea.native.tsx +8 -2
- package/src/layouts/bottomSafeArea.tsx +2 -2
- package/src/layouts/page.tsx +12 -1
- package/src/surfaces.spec.tsx +2 -2
- package/types/Avatar/index.d.ts +2 -11
- package/types/Avatar/index.d.ts.map +1 -1
- package/types/Tabs/index.d.ts.map +1 -1
- package/types/layouts/bottomSafeArea.d.ts +1 -1
- package/types/layouts/bottomSafeArea.d.ts.map +1 -1
- package/types/layouts/bottomSafeArea.native.d.ts +1 -1
- package/types/layouts/bottomSafeArea.native.d.ts.map +1 -1
- package/types/layouts/page.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","treeViewReveal_exports","treeRevealExpansion","treeRevealOffset","module","exports","nodes","expandedIds","targetId","ancestors","find","find1","items"],"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","treeViewReveal_exports","treeRevealExpansion","treeRevealOffset","module","exports","nodes","expandedIds","targetId","ancestors","find","find1","items","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","node","_node_children","id","children","length","push","pop","err","return","every","has","Set","layout","offset","viewportHeight","y","height","Number","isFinite","Math","max"],"sources":["treeViewReveal.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 treeViewReveal_exports = {};\n__export(treeViewReveal_exports, {\n treeRevealExpansion: () => treeRevealExpansion,\n treeRevealOffset: () => treeRevealOffset\n});\nmodule.exports = __toCommonJS(treeViewReveal_exports);\nfunction treeRevealExpansion(nodes, expandedIds, targetId) {\n var ancestors = [];\n var find = function find1(items) {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = items[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var node = _step.value;\n var _node_children;\n if (node.id === targetId) return true;\n if ((_node_children = node.children) === null || _node_children === void 0 ? void 0 : _node_children.length) {\n ancestors.push(node.id);\n if (find(node.children)) return true;\n ancestors.pop();\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return false;\n };\n if (!find(nodes)) return void 0;\n if (ancestors.every(function(id) {\n return expandedIds.has(id);\n })) return expandedIds;\n return /* @__PURE__ */ new Set([\n ...expandedIds,\n ...ancestors\n ]);\n}\nfunction treeRevealOffset(layout, offset, viewportHeight) {\n if (![\n layout.y,\n layout.height,\n offset,\n viewportHeight\n ].every(Number.isFinite) || viewportHeight <= 0 || layout.height <= 0) {\n return void 0;\n }\n if (layout.height > viewportHeight || layout.y < offset) return Math.max(0, layout.y);\n if (layout.y + layout.height > offset + viewportHeight) {\n return Math.max(0, layout.y + layout.height - viewportHeight);\n }\n return offset;\n}\n//# sourceMappingURL=treeViewReveal.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAA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,SAAS,CACb,CAAC;AACJ;AACA,SAASN,gBAAgBA,CAAC+B,MAAM,EAAEC,MAAM,EAAEC,cAAc,EAAE;EACxD,IAAI,CAAC,CACHF,MAAM,CAACG,CAAC,EACRH,MAAM,CAACI,MAAM,EACbH,MAAM,EACNC,cAAc,CACf,CAACL,KAAK,CAACQ,MAAM,CAACC,QAAQ,CAAC,IAAIJ,cAAc,IAAI,CAAC,IAAIF,MAAM,CAACI,MAAM,IAAI,CAAC,EAAE;IACrE,OAAO,KAAK,CAAC;EACf;EACA,IAAIJ,MAAM,CAACI,MAAM,GAAGF,cAAc,IAAIF,MAAM,CAACG,CAAC,GAAGF,MAAM,EAAE,OAAOM,IAAI,CAACC,GAAG,CAAC,CAAC,EAAER,MAAM,CAACG,CAAC,CAAC;EACrF,IAAIH,MAAM,CAACG,CAAC,GAAGH,MAAM,CAACI,MAAM,GAAGH,MAAM,GAAGC,cAAc,EAAE;IACtD,OAAOK,IAAI,CAACC,GAAG,CAAC,CAAC,EAAER,MAAM,CAACG,CAAC,GAAGH,MAAM,CAACI,MAAM,GAAGF,cAAc,CAAC;EAC/D;EACA,OAAOD,MAAM;AACf","ignoreList":[]}
|
|
@@ -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","usePageFlowLoadMore_exports","PAGE_FLOW_POLL_MS","usePageFlowLoadMore","module","exports","import_react","require","import_tamagui","param","sentinelRef","enabled","onLoadMore","rearmKey","onLoadMoreRef","useRef","current","width","height","useWindowDimensions","windowRef","live","Boolean","useEffect","isWeb","IntersectionObserver","el"],"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","usePageFlowLoadMore_exports","PAGE_FLOW_POLL_MS","usePageFlowLoadMore","module","exports","import_react","require","import_tamagui","param","sentinelRef","enabled","onLoadMore","rearmKey","onLoadMoreRef","useRef","current","width","height","useWindowDimensions","windowRef","live","Boolean","useEffect","isWeb","IntersectionObserver","el","observer","entries","_onLoadMoreRef_current","some","entry","isIntersecting","observe","disconnect","active","inside","timer","setInterval","node","measureInWindow","x","y","w","h","win","now","clearInterval"],"sources":["usePageFlowLoadMore.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 usePageFlowLoadMore_exports = {};\n__export(usePageFlowLoadMore_exports, {\n PAGE_FLOW_POLL_MS: () => PAGE_FLOW_POLL_MS,\n usePageFlowLoadMore: () => usePageFlowLoadMore\n});\nmodule.exports = __toCommonJS(usePageFlowLoadMore_exports);\nvar import_react = require(\"react\");\nvar import_tamagui = require(\"tamagui\");\nvar PAGE_FLOW_POLL_MS = 250;\nfunction usePageFlowLoadMore(param) {\n var { sentinelRef, enabled, onLoadMore, rearmKey } = param;\n var onLoadMoreRef = (0, import_react.useRef)(onLoadMore);\n onLoadMoreRef.current = onLoadMore;\n var { width, height } = (0, import_tamagui.useWindowDimensions)();\n var windowRef = (0, import_react.useRef)({\n width,\n height\n });\n windowRef.current = {\n width,\n height\n };\n var live = enabled && Boolean(onLoadMore);\n (0, import_react.useEffect)(function() {\n if (!live) return;\n if (import_tamagui.isWeb) {\n if (typeof IntersectionObserver === \"undefined\") return;\n var el = sentinelRef.current;\n if (!el) return;\n var observer = new IntersectionObserver(function(entries) {\n var _onLoadMoreRef_current;\n if (entries.some(function(entry) {\n return entry.isIntersecting;\n })) (_onLoadMoreRef_current = onLoadMoreRef.current) === null || _onLoadMoreRef_current === void 0 ? void 0 : _onLoadMoreRef_current.call(onLoadMoreRef);\n });\n observer.observe(el);\n return function() {\n return observer.disconnect();\n };\n }\n var active = true;\n var inside = false;\n var timer = setInterval(function() {\n var node = sentinelRef.current;\n if (typeof (node === null || node === void 0 ? void 0 : node.measureInWindow) !== \"function\") return;\n node.measureInWindow(function(x, y, w, h) {\n var _onLoadMoreRef_current;\n if (!active || w <= 0) return;\n var win = windowRef.current;\n var now = y <= win.height && y + h >= 0 && x < win.width && x + w > 0;\n if (now && !inside) (_onLoadMoreRef_current = onLoadMoreRef.current) === null || _onLoadMoreRef_current === void 0 ? void 0 : _onLoadMoreRef_current.call(onLoadMoreRef);\n inside = now;\n });\n }, PAGE_FLOW_POLL_MS);\n return function() {\n active = false;\n clearInterval(timer);\n };\n }, [\n live,\n rearmKey,\n sentinelRef\n ]);\n}\n//# sourceMappingURL=usePageFlowLoadMore.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAAC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@@ -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":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAA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,MAAM;EACzD,IAAIC,IAAI,GAAGN,KAAK,IAAIG,QAAQ;EAC5B,IAAII,GAAG,GAAG,CAAC,CAAC,EAAE7B,YAAY,CAAC8B,iBAAiB,EAAEF,IAAI,CAAC;EACnD,OAAO,eAAgB,CAAC,CAAC,EAAE9B,kBAAkB,CAACiC,GAAG,EAAE9B,cAAc,CAAC+B,MAAM,EAAE;IACxE,GAAG3B,GAAG;IACN,GAAGkB,MAAM;IACTU,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,eAAe,EAAEP,IAAI;IACrBN,KAAK,EAAEO,GAAG;IACVO,QAAQ,EAAE,QAAQ;IAClB,gBAAgB,EAAEjC,EAAE;IACpBqB,QAAQ,EAAE,eAAgB,CAAC,CAAC,EAAE1B,kBAAkB,CAACiC,GAAG,EAAE/B,YAAY,CAACqC,QAAQ,EAAE;MAC3EC,IAAI,EAAEd,QAAQ;MACdF,KAAK,EAAEO;IACT,CAAC;EACH,CAAC,CAAC;AACJ","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/components",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.12.1",
|
|
4
4
|
"description": "multiplatform.one ui components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@floating-ui/react": "^0.27.20",
|
|
73
|
-
"@multiplatform.one/forms": "^9.
|
|
74
|
-
"@multiplatform.one/platform": "^9.
|
|
75
|
-
"@multiplatform.one/theme": "^9.
|
|
73
|
+
"@multiplatform.one/forms": "^9.12.1",
|
|
74
|
+
"@multiplatform.one/platform": "^9.12.1",
|
|
75
|
+
"@multiplatform.one/theme": "^9.12.1",
|
|
76
76
|
"@phosphor-icons/react": "^2.1.10",
|
|
77
77
|
"@shopify/flash-list": "^2.3.1",
|
|
78
78
|
"@tamagui/colors": "2.7.6",
|
|
@@ -99,9 +99,9 @@
|
|
|
99
99
|
"tamagui": "2.7.6"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@multiplatform.one/config": "9.
|
|
103
|
-
"@multiplatform.one/storybook": "9.
|
|
104
|
-
"@multiplatform.one/test-utils": "9.
|
|
102
|
+
"@multiplatform.one/config": "9.12.1",
|
|
103
|
+
"@multiplatform.one/storybook": "9.12.1",
|
|
104
|
+
"@multiplatform.one/test-utils": "9.12.1",
|
|
105
105
|
"@tamagui/build": "2.7.6",
|
|
106
106
|
"@testing-library/jest-dom": "^7.0.1",
|
|
107
107
|
"@testing-library/react": "^16.3.3",
|
|
@@ -3,14 +3,7 @@ import { Preset, Surface, useReadableTextOn } from "@multiplatform.one/theme";
|
|
|
3
3
|
import { cleanup, fireEvent } from "@testing-library/react";
|
|
4
4
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
5
5
|
import { SizableText } from "tamagui";
|
|
6
|
-
import {
|
|
7
|
-
Avatar,
|
|
8
|
-
avatarGroupOverlapPx,
|
|
9
|
-
getInitials,
|
|
10
|
-
initialsCapAdvance,
|
|
11
|
-
initialsFill,
|
|
12
|
-
initialsMetrics,
|
|
13
|
-
} from "./index";
|
|
6
|
+
import { Avatar, avatarGroupOverlapPx, getInitials, initialsFill, initialsMetrics } from "./index";
|
|
14
7
|
|
|
15
8
|
afterEach(cleanup);
|
|
16
9
|
|
|
@@ -146,12 +139,11 @@ describe("Avatar.Group", () => {
|
|
|
146
139
|
).toBe("true");
|
|
147
140
|
});
|
|
148
141
|
|
|
149
|
-
// LC-276: the face on top covers the right of the face before it
|
|
150
|
-
// initials face keeps both letters clear; a covered photo keeps the 32% stack.
|
|
142
|
+
// LC-276: the face on top covers the right 32% of the face before it, initials included.
|
|
151
143
|
const overlapOf = (container: HTMLElement) =>
|
|
152
144
|
Number(container.querySelector("[data-avatar-group]")?.getAttribute("data-avatar-overlap-px"));
|
|
153
145
|
|
|
154
|
-
it("
|
|
146
|
+
it("overlaps covered initials faces by the 32% stack, the same as photos (LC-276)", () => {
|
|
155
147
|
for (const px of [16, 28, 36, 44, 64]) {
|
|
156
148
|
const { container } = renderWithProviders(
|
|
157
149
|
<Avatar.Group size={px}>
|
|
@@ -160,10 +152,7 @@ describe("Avatar.Group", () => {
|
|
|
160
152
|
<Avatar name="Grace Hopper" />
|
|
161
153
|
</Avatar.Group>,
|
|
162
154
|
);
|
|
163
|
-
|
|
164
|
-
const textRight = px / 2 + initialsCapAdvance * initialsMetrics(px).fontPx;
|
|
165
|
-
expect(overlap, `${px}px overlap`).toBeGreaterThanOrEqual(0);
|
|
166
|
-
expect(px - overlap, `${px}px: next face edge vs initials`).toBeGreaterThanOrEqual(textRight);
|
|
155
|
+
expect(overlapOf(container), `${px}px overlap`).toBe(Math.round(px * 0.32));
|
|
167
156
|
cleanup();
|
|
168
157
|
}
|
|
169
158
|
});
|
|
@@ -176,10 +165,10 @@ describe("Avatar.Group", () => {
|
|
|
176
165
|
<Avatar name="Alan Turing" />
|
|
177
166
|
</Avatar.Group>,
|
|
178
167
|
);
|
|
179
|
-
expect(overlapOf(container)).toBe(
|
|
168
|
+
expect(overlapOf(container)).toBe(avatarGroupOverlapPx(36));
|
|
180
169
|
});
|
|
181
170
|
|
|
182
|
-
it("
|
|
171
|
+
it("keeps the 32% stack in a mixed row with a +N overflow (LC-276)", () => {
|
|
183
172
|
const { container } = renderWithProviders(
|
|
184
173
|
<Avatar.Group size={36} max={2}>
|
|
185
174
|
<Avatar src="https://example.com/a.png" name="Ada Lovelace" />
|
|
@@ -187,7 +176,7 @@ describe("Avatar.Group", () => {
|
|
|
187
176
|
<Avatar name="Alan Turing" />
|
|
188
177
|
</Avatar.Group>,
|
|
189
178
|
);
|
|
190
|
-
expect(overlapOf(container)).toBe(
|
|
179
|
+
expect(overlapOf(container)).toBe(Math.round(36 * 0.32));
|
|
191
180
|
});
|
|
192
181
|
|
|
193
182
|
it("draws no overlap when overlap is off", () => {
|
package/src/Avatar/index.tsx
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Children,
|
|
3
|
-
createContext,
|
|
4
|
-
isValidElement,
|
|
5
|
-
useContext,
|
|
6
|
-
type ReactElement,
|
|
7
|
-
type ReactNode,
|
|
8
|
-
} from "react";
|
|
1
|
+
import { Children, createContext, isValidElement, useContext, type ReactNode } from "react";
|
|
9
2
|
import { UserIcon } from "@phosphor-icons/react";
|
|
10
3
|
import {
|
|
11
4
|
MIN_PRESS_TARGET,
|
|
@@ -191,30 +184,11 @@ export function initialsMetrics(px: number): InitialsMetrics {
|
|
|
191
184
|
};
|
|
192
185
|
}
|
|
193
186
|
|
|
194
|
-
|
|
195
|
-
* LC-276: the widest capital's advance in em. Two of them at the initials em
|
|
196
|
-
* set the box a covered initials face must keep clear of the face on top.
|
|
197
|
-
*/
|
|
198
|
-
export const initialsCapAdvance = 0.84;
|
|
199
|
-
|
|
200
|
-
const PHOTO_STACK_OVERLAP = 0.32;
|
|
201
|
-
|
|
202
|
-
export type AvatarGroupCovered = "photo" | "initials";
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* LC-276: how far each face slides under the next. A covered photo keeps the
|
|
206
|
-
* Primer 32% stack; a covered initials face gives way until both letters clear.
|
|
207
|
-
*/
|
|
208
|
-
export function avatarGroupOverlapPx(px: number, covered: AvatarGroupCovered): number {
|
|
209
|
-
const photo = Math.round(px * PHOTO_STACK_OVERLAP);
|
|
210
|
-
if (covered === "photo") return photo;
|
|
211
|
-
const clear = Math.floor(px / 2 - initialsCapAdvance * initialsMetrics(px).fontPx);
|
|
212
|
-
return Math.max(0, Math.min(photo, clear));
|
|
213
|
-
}
|
|
187
|
+
const STACK_OVERLAP = 0.32;
|
|
214
188
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
return
|
|
189
|
+
/** LC-276: each face slides under the next by the Primer 32% of its diameter. */
|
|
190
|
+
export function avatarGroupOverlapPx(px: number): number {
|
|
191
|
+
return Math.round(px * STACK_OVERLAP);
|
|
218
192
|
}
|
|
219
193
|
|
|
220
194
|
// The RN/Tamagui `onPress` type is `((event: GestureResponderEvent) => void)
|
|
@@ -417,9 +391,7 @@ function AvatarGroup({
|
|
|
417
391
|
const items = Children.toArray(children).filter(isValidElement);
|
|
418
392
|
const shown = items.slice(0, Math.max(1, max));
|
|
419
393
|
const extra = items.length - shown.length;
|
|
420
|
-
const
|
|
421
|
-
const coveredFace = covered.some(showsInitials) ? "initials" : "photo";
|
|
422
|
-
const overlapPx = overlap ? avatarGroupOverlapPx(visualPx, coveredFace) : 0;
|
|
394
|
+
const overlapPx = overlap ? avatarGroupOverlapPx(visualPx) : 0;
|
|
423
395
|
const total = shown.length + (extra > 0 ? 1 : 0);
|
|
424
396
|
const overflowLabel = extra > 9 ? "9+" : `+${extra}`;
|
|
425
397
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { cleanup, screen } from "@testing-library/react";
|
|
10
10
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
11
|
-
import { PageGutter } from "@multiplatform.one/theme";
|
|
11
|
+
import { PageGutter, panelPaddingPx, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
12
12
|
import type { ReactNode } from "react";
|
|
13
13
|
import { afterEach, describe, expect, it } from "vitest";
|
|
14
14
|
import { Screen } from "../layouts/page";
|
|
@@ -93,3 +93,63 @@ describe.each(["underline", "contained", "band"] as const)("%s Tabs panel inset"
|
|
|
93
93
|
expect(atoms(panel, "_pr-").map(value)).toEqual([gutter]);
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* LC-287 STRIP-ON-PAGE-LINE: an edge-to-edge strip insets its row so the first
|
|
99
|
+
* label (underline) or the track and band columns (contained, band) start on
|
|
100
|
+
* the gutter its panel pads by; the strip itself still spans the edges.
|
|
101
|
+
*/
|
|
102
|
+
function TabPadProbe() {
|
|
103
|
+
const { knobProps } = useResolvedKnobs({ component: "Tabs" });
|
|
104
|
+
return <span data-testid="tab-pad" data-px={knobProps.tab.paddingHorizontal} />;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function stripInset(container: HTMLElement): number {
|
|
108
|
+
return Number(
|
|
109
|
+
container.querySelector("[data-tabs-strip-inset]")?.getAttribute("data-tabs-strip-inset"),
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
describe("LC-287 an edge-to-edge strip starts on the page line", () => {
|
|
114
|
+
it.each([
|
|
115
|
+
["standalone", (tabs: ReactNode) => tabs],
|
|
116
|
+
["noPadding Screen", (tabs: ReactNode) => <Screen noPadding>{tabs}</Screen>],
|
|
117
|
+
])("underline (%s): first label sits on the panel gutter", (_name, wrap) => {
|
|
118
|
+
const { container } = renderWithProviders(
|
|
119
|
+
<>
|
|
120
|
+
<TabPadProbe />
|
|
121
|
+
{wrap(<Tabs items={items} variant="underline" />)}
|
|
122
|
+
</>,
|
|
123
|
+
);
|
|
124
|
+
const padX = Number(screen.getByTestId("tab-pad").getAttribute("data-px"));
|
|
125
|
+
expect(padX).toBeGreaterThan(0);
|
|
126
|
+
expect(stripInset(container) + padX).toBe(panelPaddingPx());
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it.each(["contained", "band"] as const)("%s: the track starts on the panel gutter", (variant) => {
|
|
130
|
+
const { container } = renderWithProviders(<Tabs items={items} variant={variant} />);
|
|
131
|
+
expect(stripInset(container)).toBe(panelPaddingPx());
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
it.each(["underline", "contained", "band"] as const)(
|
|
135
|
+
"%s under a page gutter adds no strip inset",
|
|
136
|
+
(variant) => {
|
|
137
|
+
const { container } = renderWithProviders(
|
|
138
|
+
<PageGutter inset="$4">
|
|
139
|
+
<Tabs items={items} variant={variant} />
|
|
140
|
+
</PageGutter>,
|
|
141
|
+
);
|
|
142
|
+
expect(stripInset(container)).toBe(0);
|
|
143
|
+
},
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
it("pads the scroll content, so the hairline and scrolled labels still reach both edges", () => {
|
|
147
|
+
const { container } = renderWithProviders(<Tabs items={items} variant="underline" />);
|
|
148
|
+
const inset = stripInset(container);
|
|
149
|
+
const scroller = container.querySelector('[data-tabs-scroll="true"]') as HTMLElement;
|
|
150
|
+
const content = scroller.firstElementChild as HTMLElement;
|
|
151
|
+
expect(getComputedStyle(content).paddingLeft).toBe(`${inset}px`);
|
|
152
|
+
expect(getComputedStyle(content).paddingRight).toBe(`${inset}px`);
|
|
153
|
+
expect(getComputedStyle(scroller).paddingLeft || "0px").toMatch(/^0(px)?$/);
|
|
154
|
+
});
|
|
155
|
+
});
|
|
@@ -160,7 +160,10 @@ it("rechecks changed content width without fighting subsequent manual scroll", (
|
|
|
160
160
|
tree.content(620);
|
|
161
161
|
expect(tree.scroll).not.toHaveBeenCalled();
|
|
162
162
|
tree.content(650);
|
|
163
|
-
|
|
163
|
+
const inset = Number(
|
|
164
|
+
document.querySelector("[data-tabs-strip-inset]")?.getAttribute("data-tabs-strip-inset"),
|
|
165
|
+
);
|
|
166
|
+
expect(tree.scroll).toHaveBeenCalledExactlyOnceWith({ x: 242 + inset, animated: true });
|
|
164
167
|
});
|
|
165
168
|
|
|
166
169
|
it("waits for the latest selected tab's layout when dimensions were pending", () => {
|
|
@@ -494,3 +494,42 @@ export const InPageGutter: Story = {
|
|
|
494
494
|
</Screen>
|
|
495
495
|
),
|
|
496
496
|
};
|
|
497
|
+
|
|
498
|
+
const consoleTabs: TabsItem[] = [
|
|
499
|
+
"Overview",
|
|
500
|
+
"Apps",
|
|
501
|
+
"Services",
|
|
502
|
+
"Volumes",
|
|
503
|
+
"Networks",
|
|
504
|
+
"Secrets",
|
|
505
|
+
"Logs",
|
|
506
|
+
"Events",
|
|
507
|
+
"Backups",
|
|
508
|
+
"Domains",
|
|
509
|
+
"Settings",
|
|
510
|
+
].map((label) => ({
|
|
511
|
+
value: label.toLowerCase(),
|
|
512
|
+
label,
|
|
513
|
+
content: <Panel title={label} body="The panel pads by the page gutter." />,
|
|
514
|
+
}));
|
|
515
|
+
|
|
516
|
+
export const EdgeToEdgeStrip: Story = {
|
|
517
|
+
parameters: {
|
|
518
|
+
layout: "fullscreen",
|
|
519
|
+
docs: {
|
|
520
|
+
description: {
|
|
521
|
+
story:
|
|
522
|
+
"LC-287 STRIP-ON-PAGE-LINE (FZ-7972): in an edge-to-edge surface the strip and its hairline run to both edges, while the first label starts on the gutter the header and panel use, and the last label ends on it once scrolled to the end.",
|
|
523
|
+
},
|
|
524
|
+
},
|
|
525
|
+
},
|
|
526
|
+
args: { variant: "underline" },
|
|
527
|
+
render: (args) => (
|
|
528
|
+
<Screen noPadding scroll={false}>
|
|
529
|
+
<YStack paddingHorizontal="$4">
|
|
530
|
+
<PageHeader title="mpo-stack" subtitle="11 sections" />
|
|
531
|
+
</YStack>
|
|
532
|
+
<Tabs {...args} items={consoleTabs} />
|
|
533
|
+
</Screen>
|
|
534
|
+
),
|
|
535
|
+
};
|
package/src/Tabs/index.tsx
CHANGED
|
@@ -28,6 +28,7 @@ import { IconSlot } from "@multiplatform.one/theme";
|
|
|
28
28
|
import {
|
|
29
29
|
MIN_PRESS_TARGET,
|
|
30
30
|
PageGutter,
|
|
31
|
+
panelPaddingPx,
|
|
31
32
|
usePageGutter,
|
|
32
33
|
ensureKeyboardModalityTracking,
|
|
33
34
|
getGroupPosition,
|
|
@@ -449,6 +450,12 @@ function TabsRoot({
|
|
|
449
450
|
component: "Tabs",
|
|
450
451
|
size,
|
|
451
452
|
});
|
|
453
|
+
const stripInsetPx = pageInset
|
|
454
|
+
? 0
|
|
455
|
+
: Math.max(
|
|
456
|
+
0,
|
|
457
|
+
panelPaddingPx() - (variant === "underline" ? knobProps.tab.paddingHorizontal : 0),
|
|
458
|
+
);
|
|
452
459
|
|
|
453
460
|
if (isWeb) ensureKeyboardModalityTracking();
|
|
454
461
|
// Tab value currently showing the manual keyboard focus ring (see tracker note)
|
|
@@ -578,11 +585,17 @@ function TabsRoot({
|
|
|
578
585
|
React.useEffect(() => {
|
|
579
586
|
if (!activeLayout || activeLayout.value !== currentValue) return;
|
|
580
587
|
const { offset, viewport, content } = scrollMetrics.current;
|
|
581
|
-
const target = tabsScrollIntoViewX(
|
|
588
|
+
const target = tabsScrollIntoViewX(
|
|
589
|
+
{ ...activeLayout, x: activeLayout.x + stripInsetPx },
|
|
590
|
+
offset,
|
|
591
|
+
viewport,
|
|
592
|
+
content,
|
|
593
|
+
direction,
|
|
594
|
+
);
|
|
582
595
|
if (target !== undefined && Math.abs(target - offset) >= 1) {
|
|
583
596
|
scrollRef.current?.scrollTo({ x: target, animated: true });
|
|
584
597
|
}
|
|
585
|
-
}, [activeLayout, currentValue, direction, sizeRevision]);
|
|
598
|
+
}, [activeLayout, currentValue, direction, sizeRevision, stripInsetPx]);
|
|
586
599
|
|
|
587
600
|
const isUnderline = variant === "underline";
|
|
588
601
|
const isBand = variant === "band";
|
|
@@ -943,11 +956,12 @@ function TabsRoot({
|
|
|
943
956
|
{...(isUnderline || isFrame
|
|
944
957
|
? { ...hairline.bottom, borderColor: componentColors.surface.border }
|
|
945
958
|
: undefined)}
|
|
959
|
+
data-tabs-strip-inset={stripInsetPx}
|
|
946
960
|
data-fade-left={fades.left ? "true" : undefined}
|
|
947
961
|
data-fade-right={fades.right ? "true" : undefined}
|
|
948
962
|
>
|
|
949
963
|
{equalDistribution ? (
|
|
950
|
-
<View alignSelf="stretch" minWidth={0}>
|
|
964
|
+
<View alignSelf="stretch" minWidth={0} paddingHorizontal={stripInsetPx}>
|
|
951
965
|
{tabList}
|
|
952
966
|
</View>
|
|
953
967
|
) : (
|
|
@@ -961,6 +975,7 @@ function TabsRoot({
|
|
|
961
975
|
// the painted tab is smaller than the floor (LC-54 / nested scale).
|
|
962
976
|
contentContainerStyle={{
|
|
963
977
|
paddingVertical: slop,
|
|
978
|
+
paddingHorizontal: stripInsetPx,
|
|
964
979
|
...(isFrame ? { flexGrow: 1 } : undefined),
|
|
965
980
|
}}
|
|
966
981
|
marginVertical={-slop}
|
|
@@ -145,3 +145,59 @@ describe("createBottomAccessoryStore", () => {
|
|
|
145
145
|
expect(emits).toBe(3);
|
|
146
146
|
});
|
|
147
147
|
});
|
|
148
|
+
|
|
149
|
+
describe("a non-scrolling Screen's bottom edge has one owner (FZ-9399, LC-174)", () => {
|
|
150
|
+
const owners = (root: HTMLElement) =>
|
|
151
|
+
Array.from(root.querySelectorAll<HTMLElement>("[data-bottom-safe-area]"));
|
|
152
|
+
|
|
153
|
+
it("pads the home indicator under its content when no accessory is mounted", () => {
|
|
154
|
+
const { container } = renderWithProviders(
|
|
155
|
+
<Screen scroll={false}>
|
|
156
|
+
<span>content</span>
|
|
157
|
+
</Screen>,
|
|
158
|
+
);
|
|
159
|
+
const [edge, ...rest] = owners(container);
|
|
160
|
+
expect(rest).toHaveLength(0);
|
|
161
|
+
const column = container.querySelector("[data-testid='screen']")!;
|
|
162
|
+
expect(column.contains(edge!)).toBe(false);
|
|
163
|
+
expect(edge!.parentElement!.lastElementChild).toBe(edge);
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
it("leaves the home indicator to the accessory bar when one is mounted", () => {
|
|
167
|
+
const { container } = renderWithProviders(
|
|
168
|
+
<Screen scroll={false}>
|
|
169
|
+
<span>content</span>
|
|
170
|
+
<BottomAccessory>
|
|
171
|
+
<span>pager</span>
|
|
172
|
+
</BottomAccessory>
|
|
173
|
+
</Screen>,
|
|
174
|
+
);
|
|
175
|
+
const found = owners(container);
|
|
176
|
+
expect(found).toHaveLength(1);
|
|
177
|
+
expect(found[0]!.closest("[data-bottom-accessory='slot']")).not.toBeNull();
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
it("hands the edge to the accessory when one registers after mount", () => {
|
|
181
|
+
function Page() {
|
|
182
|
+
const [paged, setPaged] = useState(false);
|
|
183
|
+
return (
|
|
184
|
+
<Screen scroll={false}>
|
|
185
|
+
<button type="button" onClick={() => setPaged(true)}>
|
|
186
|
+
page
|
|
187
|
+
</button>
|
|
188
|
+
{paged ? (
|
|
189
|
+
<BottomAccessory>
|
|
190
|
+
<span>pager</span>
|
|
191
|
+
</BottomAccessory>
|
|
192
|
+
) : null}
|
|
193
|
+
</Screen>
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
const { container, getByText } = renderWithProviders(<Page />);
|
|
197
|
+
expect(owners(container)).toHaveLength(1);
|
|
198
|
+
act(() => getByText("page").click());
|
|
199
|
+
const found = owners(container);
|
|
200
|
+
expect(found).toHaveLength(1);
|
|
201
|
+
expect(found[0]!.closest("[data-bottom-accessory='slot']")).not.toBeNull();
|
|
202
|
+
});
|
|
203
|
+
});
|
|
@@ -13,7 +13,7 @@ import { YStack } from "tamagui";
|
|
|
13
13
|
* the column without changing the bar's frame, so it re-measures once the
|
|
14
14
|
* keyboard has finished showing or hiding.
|
|
15
15
|
*/
|
|
16
|
-
export function BottomSafeArea({ children }: { children
|
|
16
|
+
export function BottomSafeArea({ children }: { children?: ReactNode }) {
|
|
17
17
|
const insets = useSafeAreaInsets();
|
|
18
18
|
const frame = useSafeAreaFrame();
|
|
19
19
|
const ref = useRef<NativeView>(null);
|
|
@@ -36,7 +36,13 @@ export function BottomSafeArea({ children }: { children: ReactNode }) {
|
|
|
36
36
|
};
|
|
37
37
|
}, []);
|
|
38
38
|
return (
|
|
39
|
-
<YStack
|
|
39
|
+
<YStack
|
|
40
|
+
ref={ref as never}
|
|
41
|
+
width="100%"
|
|
42
|
+
paddingBottom={overlap}
|
|
43
|
+
onLayout={measure}
|
|
44
|
+
data-bottom-safe-area=""
|
|
45
|
+
>
|
|
40
46
|
{children}
|
|
41
47
|
</YStack>
|
|
42
48
|
);
|
|
@@ -4,9 +4,9 @@ import { YStack } from "tamagui";
|
|
|
4
4
|
const homeIndicator = { paddingBottom: "env(safe-area-inset-bottom)" };
|
|
5
5
|
|
|
6
6
|
/** Web: the home indicator's inset under the bar (0 outside a notched viewport). */
|
|
7
|
-
export function BottomSafeArea({ children }: { children
|
|
7
|
+
export function BottomSafeArea({ children }: { children?: ReactNode }) {
|
|
8
8
|
return (
|
|
9
|
-
<YStack width="100%" style={homeIndicator as never}>
|
|
9
|
+
<YStack width="100%" style={homeIndicator as never} data-bottom-safe-area="">
|
|
10
10
|
{children}
|
|
11
11
|
</YStack>
|
|
12
12
|
);
|
package/src/layouts/page.tsx
CHANGED
|
@@ -87,11 +87,13 @@ import {
|
|
|
87
87
|
styled,
|
|
88
88
|
} from "tamagui";
|
|
89
89
|
import { BottomChromeClearance } from "../appShell/BottomChromeClearance";
|
|
90
|
+
import { useBottomChromeInset } from "../appShell/bottomChrome";
|
|
90
91
|
import { componentColors, sectionHeading } from "../componentColors";
|
|
91
92
|
import { useDirection } from "../hooks/useDirection";
|
|
92
93
|
import { useTranslation } from "../shared/i18n";
|
|
93
94
|
import { ScrollView } from "../ScrollView";
|
|
94
95
|
import { KeyboardAvoidingWrapper } from "./KeyboardAvoidingWrapper";
|
|
96
|
+
import { BottomSafeArea } from "./bottomSafeArea";
|
|
95
97
|
import {
|
|
96
98
|
BottomAccessoryHost,
|
|
97
99
|
useBottomAccessoryOccupied,
|
|
@@ -401,17 +403,26 @@ function PageShell({
|
|
|
401
403
|
// under it, and this clears its last row. A slot accessory stands on the bar
|
|
402
404
|
// and ends the scroll view above it, so it takes the clearance instead.
|
|
403
405
|
const accessoryOccupied = useBottomAccessoryOccupied(accessories);
|
|
406
|
+
const chromeInset = useBottomChromeInset();
|
|
404
407
|
const chromeClearance = accessoryOccupied ? null : (
|
|
405
408
|
<BottomChromeClearance testID="screen-chrome-clearance" />
|
|
406
409
|
);
|
|
407
410
|
|
|
408
411
|
if (!scroll) {
|
|
412
|
+
// FZ-9399: the page's bottom edge has one owner. The accessory bar pads the
|
|
413
|
+
// home indicator when it is mounted, else the floating tab bar's clearance,
|
|
414
|
+
// else this. A host that pads it too moves the bar after it measured.
|
|
415
|
+
const bottomEdge = accessoryOccupied ? null : chromeInset > 0 ? (
|
|
416
|
+
chromeClearance
|
|
417
|
+
) : (
|
|
418
|
+
<BottomSafeArea />
|
|
419
|
+
);
|
|
409
420
|
return shell(
|
|
410
421
|
<YStack flex={1} backgroundColor="$background">
|
|
411
422
|
{bar}
|
|
412
423
|
{inner}
|
|
413
424
|
{accessory}
|
|
414
|
-
{
|
|
425
|
+
{bottomEdge}
|
|
415
426
|
</YStack>,
|
|
416
427
|
);
|
|
417
428
|
}
|
package/src/surfaces.spec.tsx
CHANGED
|
@@ -244,11 +244,11 @@ describe("overlay containers take the Axiom 1 child-clip cap (MPO-150)", () => {
|
|
|
244
244
|
expect(capped, "the cap must spread AFTER the uncapped scale token").toBeGreaterThan(elevated);
|
|
245
245
|
});
|
|
246
246
|
|
|
247
|
-
const sheetStop = { medium:
|
|
247
|
+
const sheetStop = { medium: 16, large: 20, full: 44 } as const;
|
|
248
248
|
for (const [borderRadius, stop] of Object.entries({ medium: 14, large: 20, full: 44 })) {
|
|
249
249
|
{
|
|
250
250
|
const capped = Math.min(stop, 16);
|
|
251
|
-
const sheetCapped =
|
|
251
|
+
const sheetCapped = sheetStop[borderRadius as keyof typeof sheetStop];
|
|
252
252
|
it(`caps every overlay frame at ${capped}px for borderRadius=${borderRadius} on the panelPadding role`, () => {
|
|
253
253
|
render(
|
|
254
254
|
<TamaguiProvider config={overlayCapConfig} defaultTheme="light">
|
package/types/Avatar/index.d.ts
CHANGED
|
@@ -60,17 +60,8 @@ export interface InitialsMetrics {
|
|
|
60
60
|
* whatever line height the label knob carries, and the LC-158 Dynamic Type cap.
|
|
61
61
|
*/
|
|
62
62
|
export declare function initialsMetrics(px: number): InitialsMetrics;
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
* set the box a covered initials face must keep clear of the face on top.
|
|
66
|
-
*/
|
|
67
|
-
export declare const initialsCapAdvance = 0.84;
|
|
68
|
-
export type AvatarGroupCovered = "photo" | "initials";
|
|
69
|
-
/**
|
|
70
|
-
* LC-276: how far each face slides under the next. A covered photo keeps the
|
|
71
|
-
* Primer 32% stack; a covered initials face gives way until both letters clear.
|
|
72
|
-
*/
|
|
73
|
-
export declare function avatarGroupOverlapPx(px: number, covered: AvatarGroupCovered): number;
|
|
63
|
+
/** LC-276: each face slides under the next by the Primer 32% of its diameter. */
|
|
64
|
+
export declare function avatarGroupOverlapPx(px: number): number;
|
|
74
65
|
declare function AvatarRoot({ src, name, alt, initials, fallbackBackgroundColor, fallbackColor, fallback, size: sizeProp, circular: circularProp, nested: nestedProp, status, children, backgroundColor, onPress, focusStyle, focusVisibleStyle, hitSlop: hitSlopProp, ...props }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
75
66
|
declare function AvatarGroup({ children, max, size, circular, nested, overlap, }: AvatarGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
76
67
|
export declare const Avatar: typeof AvatarRoot & {
|