@multiplatform.one/components 9.2.0 → 9.4.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/Avatar/index.cjs +1 -1
- package/dist/cjs/Avatar/index.native.js +1 -1
- package/dist/cjs/Avatar/index.native.js.map +1 -1
- package/dist/cjs/Carousel/index.cjs +1 -1
- package/dist/cjs/Carousel/index.native.js +1 -1
- package/dist/cjs/Chip/index.cjs +37 -16
- package/dist/cjs/Chip/index.native.js +38 -16
- package/dist/cjs/Chip/index.native.js.map +1 -1
- package/dist/cjs/DropDownPanel/index.cjs +1 -1
- package/dist/cjs/DropDownPanel/index.native.js +1 -1
- package/dist/cjs/DropDownPanel/index.native.js.map +1 -1
- package/dist/cjs/Meter/meter.cjs +3 -3
- package/dist/cjs/Meter/meter.native.js +3 -3
- package/dist/cjs/Meter/meter.native.js.map +1 -1
- package/dist/cjs/{ScrollView/index.cjs → ScrollView.cjs} +2 -2
- package/dist/cjs/{ScrollView/useRevealFocusedField.cjs → ScrollView.native.js} +8 -5
- package/dist/cjs/ScrollView.native.js.map +1 -0
- package/dist/cjs/SheetModal/index.cjs +9 -5
- package/dist/cjs/SheetModal/index.native.js +6 -4
- package/dist/cjs/SheetModal/index.native.js.map +1 -1
- package/dist/cjs/SheetScrollView/index.cjs +1 -1
- package/dist/cjs/SheetScrollView/index.native.js +1 -1
- package/dist/cjs/Tabs/index.cjs +64 -14
- package/dist/cjs/Tabs/index.native.js +74 -19
- package/dist/cjs/Tabs/index.native.js.map +1 -1
- package/dist/cjs/appShell/SettingsSplit.cjs +1 -1
- package/dist/cjs/appShell/SettingsSplit.native.js +1 -1
- package/dist/cjs/charts/ChartDataView.cjs +1 -1
- package/dist/cjs/charts/ChartDataView.native.js +1 -1
- package/dist/cjs/code/CodeBlock/index.cjs +1 -1
- package/dist/cjs/code/CodeBlock/index.native.js +1 -1
- package/dist/cjs/code/LogView.cjs +2 -2
- package/dist/cjs/code/LogView.native.js +2 -2
- package/dist/cjs/code/LogView.native.js.map +1 -1
- package/dist/cjs/code/PayloadView/index.cjs +1 -1
- package/dist/cjs/code/PayloadView/index.native.js +1 -1
- package/dist/cjs/hooks/useDirection.cjs +2 -27
- package/dist/cjs/hooks/useDirection.native.js +5 -8
- package/dist/cjs/hooks/useDirection.native.js.map +1 -1
- package/dist/cjs/index.cjs +11 -11
- package/dist/cjs/index.native.js +11 -11
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/layouts/IdentityPlate.cjs +2 -2
- package/dist/cjs/layouts/IdentityPlate.native.js +2 -2
- package/dist/cjs/layouts/IdentityPlate.native.js.map +1 -1
- package/dist/cjs/layouts/StatusDot.cjs +9 -2
- package/dist/cjs/layouts/StatusDot.native.js +9 -2
- package/dist/cjs/layouts/StatusDot.native.js.map +1 -1
- package/dist/cjs/layouts/StatusGlyphStrip.cjs +1 -1
- package/dist/cjs/layouts/StatusGlyphStrip.native.js +1 -1
- package/dist/cjs/layouts/StatusGlyphStrip.native.js.map +1 -1
- package/dist/cjs/layouts/attachments.cjs +1 -3
- package/dist/cjs/layouts/attachments.native.js +1 -3
- package/dist/cjs/layouts/attachments.native.js.map +1 -1
- package/dist/cjs/layouts/index.cjs +1 -0
- package/dist/cjs/layouts/index.native.js +1 -0
- package/dist/cjs/layouts/index.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +1 -1
- package/dist/cjs/layouts/page.native.js +1 -1
- package/dist/cjs/layouts/sidebar.cjs +4 -7
- package/dist/cjs/layouts/sidebar.native.js +4 -7
- package/dist/cjs/layouts/sidebar.native.js.map +1 -1
- package/dist/cjs/layouts/tags.cjs +1 -1
- package/dist/cjs/layouts/tags.native.js +1 -1
- package/dist/cjs/layouts/toolbar.cjs +1 -1
- package/dist/cjs/layouts/toolbar.native.js +1 -1
- package/dist/cjs/tamagui.cjs +1 -1
- package/dist/cjs/tamagui.native.js +1 -1
- package/dist/cjs/views/Calendar.cjs +1 -1
- package/dist/cjs/views/Calendar.native.js +1 -1
- package/dist/cjs/views/Dashboard.cjs +1 -1
- package/dist/cjs/views/Dashboard.native.js +1 -1
- package/dist/cjs/views/FilePreview.cjs +1 -2
- package/dist/cjs/views/FilePreview.native.js +1 -2
- package/dist/cjs/views/Gantt.cjs +1 -1
- package/dist/cjs/views/Gantt.native.js +1 -1
- package/dist/cjs/views/Gantt.native.js.map +1 -1
- package/dist/cjs/views/Kanban.cjs +1 -1
- package/dist/cjs/views/Kanban.native.js +1 -1
- package/dist/cjs/views/Matrix.cjs +1 -1
- package/dist/cjs/views/Matrix.native.js +1 -1
- package/dist/cjs/views/ReportBuilder.cjs +1 -1
- package/dist/cjs/views/ReportBuilder.native.js +1 -1
- package/dist/esm/Accordion/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.mjs +1 -1
- package/dist/esm/Avatar/index.native.js +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/geometry.native.js.map +1 -1
- package/dist/esm/Carousel/index.mjs +1 -1
- package/dist/esm/Carousel/index.native.js +1 -1
- package/dist/esm/Carousel/index.native.js.map +1 -1
- package/dist/esm/ChatTurn/index.native.js.map +1 -1
- package/dist/esm/CheckGlyph/MenuCheckColumn.native.js.map +1 -1
- package/dist/esm/CheckGlyph/index.native.js.map +1 -1
- package/dist/esm/Chip/index.mjs +37 -17
- package/dist/esm/Chip/index.mjs.map +1 -1
- package/dist/esm/Chip/index.native.js +38 -17
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/ChoiceChips/index.native.js.map +1 -1
- package/dist/esm/Collapsible.native.js.map +1 -1
- package/dist/esm/ContextMenu/index.native.js.map +1 -1
- package/dist/esm/CopyField/CopyMenuButton.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/Diff/diff.native.js.map +1 -1
- package/dist/esm/Diff/index.native.js.map +1 -1
- package/dist/esm/DotIndicator/index.native.js.map +1 -1
- package/dist/esm/DrillStack/DrillBar.native.js.map +1 -1
- package/dist/esm/DrillStack/context.native.js.map +1 -1
- package/dist/esm/DrillStack/drillMotion.native.js.map +1 -1
- package/dist/esm/DropDownPanel/index.mjs +2 -2
- package/dist/esm/DropDownPanel/index.mjs.map +1 -1
- package/dist/esm/DropDownPanel/index.native.js +2 -2
- package/dist/esm/DropDownPanel/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/menuSettle.native.js.map +1 -1
- package/dist/esm/ElapsedProgress/index.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.native.js.map +1 -1
- package/dist/esm/Lightbox/index.gnome.native.js.map +1 -1
- package/dist/esm/Lightbox/shared.native.js.map +1 -1
- package/dist/esm/Lightbox/useLightbox.native.js.map +1 -1
- package/dist/esm/MachineLiteral/index.native.js.map +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.mjs +3 -3
- package/dist/esm/Meter/meter.mjs.map +1 -1
- package/dist/esm/Meter/meter.native.js +3 -3
- package/dist/esm/Meter/meter.native.js.map +1 -1
- package/dist/esm/MiddleEllipsisText/middleSplit.native.js.map +1 -1
- package/dist/esm/MiddleEllipsisText/types.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/SchemeToggle/index.native.js.map +1 -1
- package/dist/esm/ScrollView.mjs +3 -0
- package/dist/esm/ScrollView.mjs.map +1 -0
- package/dist/esm/ScrollView.native.js +3 -0
- package/dist/esm/ScrollView.native.js.map +1 -0
- package/dist/esm/Separator/index.native.js.map +1 -1
- package/dist/esm/Sheet.native.js.map +1 -1
- package/dist/esm/SheetModal/SheetBodyRegion.native.js.map +1 -1
- package/dist/esm/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/esm/SheetModal/SheetNavigation.native.js.map +1 -1
- package/dist/esm/SheetModal/detents.native.js.map +1 -1
- package/dist/esm/SheetModal/index.mjs +10 -6
- package/dist/esm/SheetModal/index.mjs.map +1 -1
- package/dist/esm/SheetModal/index.native.js +7 -5
- package/dist/esm/SheetModal/index.native.js.map +1 -1
- package/dist/esm/SheetModal/useSheetFrameFocus.native.js.map +1 -1
- package/dist/esm/SheetScrollView/index.mjs +1 -1
- package/dist/esm/SheetScrollView/index.native.js +1 -1
- package/dist/esm/SheetScrollView/index.native.js.map +1 -1
- package/dist/esm/SheetScrollView/sheetHandoff.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/SortableList/useUserOrder.native.js.map +1 -1
- package/dist/esm/SwipeDismissRow/index.native.js.map +1 -1
- package/dist/esm/Tabs/index.mjs +64 -14
- package/dist/esm/Tabs/index.mjs.map +1 -1
- package/dist/esm/Tabs/index.native.js +74 -19
- 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.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/StandardAction.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/AppShell.native.js.map +1 -1
- package/dist/esm/appShell/BottomChromeClearance.native.js.map +1 -1
- package/dist/esm/appShell/Dock.native.js.map +1 -1
- package/dist/esm/appShell/MpoTabHost.native.js.map +1 -1
- package/dist/esm/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/esm/appShell/SettingsSplit.mjs +1 -1
- package/dist/esm/appShell/SettingsSplit.native.js +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/appShell/stackBack.native.js.map +1 -1
- package/dist/esm/appShell/systemBarFit.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.mjs +1 -1
- package/dist/esm/charts/ChartDataView.native.js +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.mjs +1 -1
- package/dist/esm/code/CodeBlock/index.native.js +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/HoldSelect/tapGate.native.js.map +1 -1
- package/dist/esm/code/LogView.mjs +2 -2
- package/dist/esm/code/LogView.mjs.map +1 -1
- package/dist/esm/code/LogView.native.js +2 -2
- package/dist/esm/code/LogView.native.js.map +1 -1
- package/dist/esm/code/PayloadView/index.mjs +1 -1
- package/dist/esm/code/PayloadView/index.native.js +1 -1
- package/dist/esm/code/PayloadView/index.native.js.map +1 -1
- package/dist/esm/code/PayloadView/payloadModel.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.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/SingleTaskColumn.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/useDirection.mjs +1 -26
- package/dist/esm/hooks/useDirection.mjs.map +1 -1
- package/dist/esm/hooks/useDirection.native.js +1 -4
- package/dist/esm/hooks/useDirection.native.js.map +1 -1
- package/dist/esm/hooks/useDocumentTitle.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.native.js.map +1 -1
- package/dist/esm/images/Image/mediaRadius.native.js.map +1 -1
- 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/RemoteArt/remoteArtCache.native.js.map +1 -1
- package/dist/esm/images/RemoteArt/svgMarkup.native.js.map +1 -1
- package/dist/esm/images/RemoteArt/types.native.js.map +1 -1
- package/dist/esm/images/index.native.js.map +1 -1
- package/dist/esm/index.gnome.native.js.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.native.js +1 -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.mjs +1 -1
- package/dist/esm/layouts/IdentityPlate.mjs.map +1 -1
- package/dist/esm/layouts/IdentityPlate.native.js +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.mjs +8 -2
- package/dist/esm/layouts/StatusDot.mjs.map +1 -1
- package/dist/esm/layouts/StatusDot.native.js +8 -2
- package/dist/esm/layouts/StatusDot.native.js.map +1 -1
- package/dist/esm/layouts/StatusGlyphStrip.mjs +2 -2
- package/dist/esm/layouts/StatusGlyphStrip.mjs.map +1 -1
- package/dist/esm/layouts/StatusGlyphStrip.native.js +2 -2
- package/dist/esm/layouts/StatusGlyphStrip.native.js.map +1 -1
- package/dist/esm/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/esm/layouts/asyncFailure.native.js.map +1 -1
- package/dist/esm/layouts/attachments.mjs +1 -3
- package/dist/esm/layouts/attachments.mjs.map +1 -1
- package/dist/esm/layouts/attachments.native.js +1 -3
- package/dist/esm/layouts/attachments.native.js.map +1 -1
- package/dist/esm/layouts/barTitleSpan.native.js.map +1 -1
- package/dist/esm/layouts/bottomAccessory.native.js.map +1 -1
- package/dist/esm/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/esm/layouts/index.mjs +2 -2
- package/dist/esm/layouts/index.mjs.map +1 -1
- package/dist/esm/layouts/index.native.js +2 -2
- package/dist/esm/layouts/index.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +1 -1
- package/dist/esm/layouts/page.native.js +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.mjs +4 -7
- package/dist/esm/layouts/sidebar.mjs.map +1 -1
- package/dist/esm/layouts/sidebar.native.js +4 -7
- package/dist/esm/layouts/sidebar.native.js.map +1 -1
- package/dist/esm/layouts/tags.mjs +1 -1
- package/dist/esm/layouts/tags.native.js +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.mjs +1 -1
- package/dist/esm/layouts/toolbar.native.js +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.mjs +1 -1
- package/dist/esm/tamagui.native.js +1 -1
- package/dist/esm/tamagui.native.js.map +1 -1
- package/dist/esm/testSetup.native.js.map +1 -1
- package/dist/esm/utils/unwrapText.native.js.map +1 -1
- package/dist/esm/views/Calendar.mjs +1 -1
- package/dist/esm/views/Calendar.native.js +1 -1
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/CardGrid.native.js.map +1 -1
- package/dist/esm/views/Dashboard.mjs +1 -1
- package/dist/esm/views/Dashboard.native.js +1 -1
- package/dist/esm/views/Dashboard.native.js.map +1 -1
- package/dist/esm/views/FilePreview.mjs +1 -2
- package/dist/esm/views/FilePreview.mjs.map +1 -1
- package/dist/esm/views/FilePreview.native.js +1 -2
- package/dist/esm/views/FilePreview.native.js.map +1 -1
- package/dist/esm/views/Gantt.mjs +1 -1
- package/dist/esm/views/Gantt.native.js +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.native.js.map +1 -1
- package/dist/esm/views/Kanban.mjs +1 -1
- package/dist/esm/views/Kanban.native.js +1 -1
- package/dist/esm/views/List.native.js.map +1 -1
- package/dist/esm/views/ListGroup.native.js.map +1 -1
- package/dist/esm/views/ListRow.native.js.map +1 -1
- package/dist/esm/views/Matrix.mjs +1 -1
- package/dist/esm/views/Matrix.native.js +1 -1
- package/dist/esm/views/Matrix.native.js.map +1 -1
- package/dist/esm/views/ReportBuilder.mjs +1 -1
- package/dist/esm/views/ReportBuilder.native.js +1 -1
- package/dist/esm/views/ReportBuilder.native.js.map +1 -1
- package/dist/esm/views/ShortcutCard.native.js.map +1 -1
- 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.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/sameNameScope.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/usePageFlowLoadMore.native.js.map +1 -1
- package/dist/esm/views/widgetChrome.native.js.map +1 -1
- package/dist/jsx/Avatar/index.mjs +1 -1
- package/dist/jsx/Avatar/index.native.js +1 -1
- package/dist/jsx/Carousel/index.mjs +1 -1
- package/dist/jsx/Carousel/index.native.js +1 -1
- package/dist/jsx/Chip/index.mjs +37 -17
- package/dist/jsx/Chip/index.mjs.map +1 -1
- package/dist/jsx/Chip/index.native.js +38 -16
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/DropDownPanel/index.mjs +2 -2
- package/dist/jsx/DropDownPanel/index.mjs.map +1 -1
- package/dist/jsx/DropDownPanel/index.native.js +1 -1
- package/dist/jsx/DropDownPanel/index.native.js.map +1 -1
- package/dist/jsx/Meter/meter.mjs +3 -3
- package/dist/jsx/Meter/meter.mjs.map +1 -1
- package/dist/jsx/Meter/meter.native.js +3 -3
- package/dist/jsx/Meter/meter.native.js.map +1 -1
- package/dist/jsx/ScrollView.mjs +3 -0
- package/dist/jsx/ScrollView.mjs.map +1 -0
- package/dist/{cjs/ScrollView/revealFocusedField.cjs → jsx/ScrollView.native.js} +8 -13
- package/dist/jsx/ScrollView.native.js.map +1 -0
- package/dist/jsx/SheetModal/index.mjs +10 -6
- package/dist/jsx/SheetModal/index.mjs.map +1 -1
- package/dist/jsx/SheetModal/index.native.js +6 -4
- package/dist/jsx/SheetModal/index.native.js.map +1 -1
- package/dist/jsx/SheetScrollView/index.mjs +1 -1
- package/dist/jsx/SheetScrollView/index.native.js +1 -1
- package/dist/jsx/SheetScrollView/index.native.js.map +1 -1
- package/dist/jsx/Tabs/index.mjs +64 -14
- package/dist/jsx/Tabs/index.mjs.map +1 -1
- package/dist/jsx/Tabs/index.native.js +74 -19
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/appShell/SettingsSplit.mjs +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/jsx/charts/ChartDataView.mjs +1 -1
- package/dist/jsx/charts/ChartDataView.native.js +1 -1
- package/dist/jsx/code/CodeBlock/index.mjs +1 -1
- package/dist/jsx/code/CodeBlock/index.native.js +1 -1
- package/dist/jsx/code/LogView.mjs +2 -2
- package/dist/jsx/code/LogView.mjs.map +1 -1
- package/dist/jsx/code/LogView.native.js +2 -2
- package/dist/jsx/code/LogView.native.js.map +1 -1
- package/dist/jsx/code/PayloadView/index.mjs +1 -1
- package/dist/jsx/code/PayloadView/index.native.js +1 -1
- package/dist/jsx/hooks/useDirection.mjs +1 -26
- package/dist/jsx/hooks/useDirection.mjs.map +1 -1
- package/dist/jsx/hooks/useDirection.native.js +5 -8
- package/dist/jsx/hooks/useDirection.native.js.map +1 -1
- package/dist/jsx/index.js +1 -1
- package/dist/jsx/index.mjs +1 -1
- package/dist/jsx/index.native.js +11 -11
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/layouts/IdentityPlate.mjs +1 -1
- package/dist/jsx/layouts/IdentityPlate.mjs.map +1 -1
- package/dist/jsx/layouts/IdentityPlate.native.js +2 -2
- package/dist/jsx/layouts/IdentityPlate.native.js.map +1 -1
- package/dist/jsx/layouts/StatusDot.mjs +8 -2
- package/dist/jsx/layouts/StatusDot.mjs.map +1 -1
- package/dist/jsx/layouts/StatusDot.native.js +9 -2
- package/dist/jsx/layouts/StatusDot.native.js.map +1 -1
- package/dist/jsx/layouts/StatusGlyphStrip.mjs +2 -2
- package/dist/jsx/layouts/StatusGlyphStrip.mjs.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/attachments.mjs +1 -3
- package/dist/jsx/layouts/attachments.mjs.map +1 -1
- package/dist/jsx/layouts/attachments.native.js +1 -3
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/index.mjs +2 -2
- package/dist/jsx/layouts/index.mjs.map +1 -1
- package/dist/jsx/layouts/index.native.js +1 -0
- package/dist/jsx/layouts/index.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +1 -1
- package/dist/jsx/layouts/page.native.js +1 -1
- package/dist/jsx/layouts/sidebar.mjs +4 -7
- package/dist/jsx/layouts/sidebar.mjs.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js +4 -7
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/dist/jsx/layouts/tags.mjs +1 -1
- package/dist/jsx/layouts/tags.native.js +1 -1
- package/dist/jsx/layouts/toolbar.mjs +1 -1
- package/dist/jsx/layouts/toolbar.native.js +1 -1
- package/dist/jsx/layouts/toolbar.native.js.map +1 -1
- package/dist/jsx/tamagui.mjs +1 -1
- package/dist/jsx/tamagui.native.js +1 -1
- package/dist/jsx/views/Calendar.mjs +1 -1
- package/dist/jsx/views/Calendar.native.js +1 -1
- package/dist/jsx/views/Dashboard.mjs +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.mjs +1 -2
- package/dist/jsx/views/FilePreview.mjs.map +1 -1
- package/dist/jsx/views/FilePreview.native.js +1 -2
- package/dist/jsx/views/Gantt.mjs +1 -1
- package/dist/jsx/views/Gantt.native.js +1 -1
- package/dist/jsx/views/Kanban.mjs +1 -1
- package/dist/jsx/views/Kanban.native.js +1 -1
- package/dist/jsx/views/Matrix.mjs +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.mjs +1 -1
- package/dist/jsx/views/ReportBuilder.native.js +1 -1
- package/package.json +7 -7
- package/src/Avatar/index.tsx +1 -1
- package/src/Carousel/Carousel.native.spec.tsx +4 -2
- package/src/Chip/Chip.native-press.spec.tsx +48 -0
- package/src/Chip/Chip.stories.tsx +14 -0
- package/src/Chip/Chip.trailingArea.spec.tsx +259 -0
- package/src/Chip/Chip.trailingToggle.spec.tsx +2 -2
- package/src/Chip/index.tsx +44 -18
- package/src/DropDownPanel/index.tsx +2 -2
- package/src/Meter/Meter.spec.tsx +5 -4
- package/src/Meter/meter.ts +4 -3
- package/src/ScrollView.ts +2 -0
- package/src/SheetModal/SheetModal.consumerProps.native.spec.tsx +89 -0
- package/src/SheetModal/SheetModal.consumerProps.spec.tsx +104 -0
- package/src/SheetModal/SheetModal.stories.tsx +36 -4
- package/src/SheetModal/index.native.tsx +7 -5
- package/src/SheetModal/index.tsx +31 -8
- package/src/Tabs/Tabs.measurement.spec.tsx +2 -2
- package/src/Tabs/Tabs.stories.tsx +6 -3
- package/src/Tabs/Tabs.tamagui.spec.tsx +213 -0
- package/src/Tabs/index.tsx +96 -25
- package/src/actions/ActionButton.spec.tsx +31 -0
- package/src/code/LogView.tsx +1 -1
- package/src/feedback/ConfirmDialog.stories.tsx +41 -5
- package/src/hooks/useDirection.ts +2 -67
- package/src/index.ts +1 -1
- package/src/layouts/IdentityPlate.native-press.spec.tsx +3 -3
- package/src/layouts/IdentityPlate.tsx +1 -1
- package/src/layouts/Sidebar.spec.tsx +29 -0
- package/src/layouts/StatusDot.tsx +9 -1
- package/src/layouts/StatusGlyphStrip.tsx +2 -2
- package/src/layouts/attachments.tsx +1 -1
- package/src/layouts/index.tsx +1 -0
- package/src/layouts/sidebar.tsx +5 -3
- package/src/layouts/warningScope.spec.tsx +71 -0
- package/src/linearGradientSetup.native.spec.ts +2 -2
- package/src/tamagui.ts +1 -1
- package/src/textAccentSecondary.spec.tsx +2 -2
- package/src/views/FilePreview.tsx +1 -1
- package/types/Chip/index.d.ts +14 -0
- package/types/Chip/index.d.ts.map +1 -1
- package/types/Meter/meter.d.ts +5 -4
- package/types/Meter/meter.d.ts.map +1 -1
- package/types/ScrollView.d.ts +3 -0
- package/types/ScrollView.d.ts.map +1 -0
- package/types/SheetModal/index.d.ts +15 -1
- package/types/SheetModal/index.d.ts.map +1 -1
- package/types/SheetModal/index.native.d.ts +1 -1
- package/types/SheetModal/index.native.d.ts.map +1 -1
- package/types/Tabs/index.d.ts +2 -2
- package/types/Tabs/index.d.ts.map +1 -1
- package/types/hooks/useDirection.d.ts +2 -28
- package/types/hooks/useDirection.d.ts.map +1 -1
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/layouts/IdentityPlate.d.ts.map +1 -1
- package/types/layouts/StatusDot.d.ts +2 -0
- package/types/layouts/StatusDot.d.ts.map +1 -1
- package/types/layouts/StatusGlyphStrip.d.ts.map +1 -1
- package/types/layouts/index.d.ts +1 -1
- package/types/layouts/index.d.ts.map +1 -1
- package/types/layouts/sidebar.d.ts.map +1 -1
- package/dist/cjs/OverflowRow/index.cjs +0 -239
- package/dist/cjs/OverflowRow/index.native.js +0 -252
- package/dist/cjs/OverflowRow/index.native.js.map +0 -1
- package/dist/cjs/ScrollView/index.native.js +0 -89
- package/dist/cjs/ScrollView/index.native.js.map +0 -1
- package/dist/cjs/ScrollView/revealFocusedField.native.js +0 -39
- package/dist/cjs/ScrollView/revealFocusedField.native.js.map +0 -1
- package/dist/cjs/ScrollView/useRevealFocusedField.native.js +0 -76
- package/dist/cjs/ScrollView/useRevealFocusedField.native.js.map +0 -1
- package/dist/esm/OverflowRow/index.mjs +0 -213
- package/dist/esm/OverflowRow/index.mjs.map +0 -1
- package/dist/esm/OverflowRow/index.native.js +0 -223
- package/dist/esm/OverflowRow/index.native.js.map +0 -1
- package/dist/esm/ScrollView/index.mjs +0 -3
- package/dist/esm/ScrollView/index.mjs.map +0 -1
- package/dist/esm/ScrollView/index.native.js +0 -61
- package/dist/esm/ScrollView/index.native.js.map +0 -1
- package/dist/esm/ScrollView/revealFocusedField.mjs +0 -11
- package/dist/esm/ScrollView/revealFocusedField.mjs.map +0 -1
- package/dist/esm/ScrollView/revealFocusedField.native.js +0 -11
- package/dist/esm/ScrollView/revealFocusedField.native.js.map +0 -1
- package/dist/esm/ScrollView/useRevealFocusedField.mjs +0 -3
- package/dist/esm/ScrollView/useRevealFocusedField.mjs.map +0 -1
- package/dist/esm/ScrollView/useRevealFocusedField.native.js +0 -48
- package/dist/esm/ScrollView/useRevealFocusedField.native.js.map +0 -1
- package/dist/jsx/OverflowRow/index.mjs +0 -213
- package/dist/jsx/OverflowRow/index.mjs.map +0 -1
- package/dist/jsx/OverflowRow/index.native.js +0 -252
- package/dist/jsx/OverflowRow/index.native.js.map +0 -1
- package/dist/jsx/ScrollView/index.mjs +0 -3
- package/dist/jsx/ScrollView/index.mjs.map +0 -1
- package/dist/jsx/ScrollView/index.native.js +0 -89
- package/dist/jsx/ScrollView/index.native.js.map +0 -1
- package/dist/jsx/ScrollView/revealFocusedField.mjs +0 -11
- package/dist/jsx/ScrollView/revealFocusedField.mjs.map +0 -1
- package/dist/jsx/ScrollView/revealFocusedField.native.js +0 -39
- package/dist/jsx/ScrollView/revealFocusedField.native.js.map +0 -1
- package/dist/jsx/ScrollView/useRevealFocusedField.mjs +0 -3
- package/dist/jsx/ScrollView/useRevealFocusedField.mjs.map +0 -1
- package/dist/jsx/ScrollView/useRevealFocusedField.native.js +0 -76
- package/dist/jsx/ScrollView/useRevealFocusedField.native.js.map +0 -1
- package/src/OverflowRow/OverflowRow.native.spec.tsx +0 -335
- package/src/OverflowRow/OverflowRow.spec.tsx +0 -51
- package/src/OverflowRow/OverflowRow.stories.tsx +0 -138
- package/src/OverflowRow/index.tsx +0 -264
- package/src/ScrollView/ScrollView.native.spec.tsx +0 -278
- package/src/ScrollView/index.native.tsx +0 -68
- package/src/ScrollView/index.tsx +0 -2
- package/src/ScrollView/revealFocusedField.spec.ts +0 -26
- package/src/ScrollView/revealFocusedField.ts +0 -24
- package/src/ScrollView/useRevealFocusedField.native.ts +0 -65
- package/src/ScrollView/useRevealFocusedField.ts +0 -4
- package/src/hooks/useDirection.native.ts +0 -16
- package/src/hooks/useDirection.spec.tsx +0 -89
- package/types/OverflowRow/index.d.ts +0 -12
- package/types/OverflowRow/index.d.ts.map +0 -1
- package/types/ScrollView/index.d.ts +0 -3
- package/types/ScrollView/index.d.ts.map +0 -1
- package/types/ScrollView/index.native.d.ts +0 -4
- package/types/ScrollView/index.native.d.ts.map +0 -1
- package/types/ScrollView/revealFocusedField.d.ts +0 -15
- package/types/ScrollView/revealFocusedField.d.ts.map +0 -1
- package/types/ScrollView/useRevealFocusedField.d.ts +0 -4
- package/types/ScrollView/useRevealFocusedField.d.ts.map +0 -1
- package/types/ScrollView/useRevealFocusedField.native.d.ts +0 -12
- package/types/ScrollView/useRevealFocusedField.native.d.ts.map +0 -1
- package/types/hooks/useDirection.native.d.ts +0 -11
- package/types/hooks/useDirection.native.d.ts.map +0 -1
package/src/Tabs/index.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { IconSlot } from "@multiplatform.one/theme";
|
|
|
5
5
|
* Wraps `tamagui`'s Tabs (roving focus, tablist/tab/tabpanel aria, automatic
|
|
6
6
|
* or manual activation) and adds MP1 anatomy + knob wiring:
|
|
7
7
|
*
|
|
8
|
-
* - variants: `underline` (desk / Primer / Linear) and `contained`
|
|
8
|
+
* - variants: `frame` (tamagui v3, default), `underline` (desk / Primer / Linear) and `contained`
|
|
9
9
|
* (Carbon contained / iOS segmented — CONTAINER-CLIP, selected = fill)
|
|
10
10
|
* - knobs: size (tab chrome via size recipe — height/pad/font/gap; radius
|
|
11
11
|
* stays on the radius knob), spacing roles (pad + panel), animation
|
|
@@ -73,7 +73,7 @@ export const TABS_EDGE_FADE = 32;
|
|
|
73
73
|
|
|
74
74
|
// ── Types ─────────────────────────────────────────────────────
|
|
75
75
|
|
|
76
|
-
export type TabsVariant = "underline" | "contained" | "band";
|
|
76
|
+
export type TabsVariant = "frame" | "underline" | "contained" | "band";
|
|
77
77
|
/** Any Tamagui size key; the tab strip and every panel's parts render at it. */
|
|
78
78
|
export type TabsSize = SizeTokens;
|
|
79
79
|
export type TabsDirection = "ltr" | "rtl";
|
|
@@ -104,7 +104,7 @@ export interface TabsProps {
|
|
|
104
104
|
defaultValue?: string;
|
|
105
105
|
/** Called when the active tab changes */
|
|
106
106
|
onChange?: (value: string) => void;
|
|
107
|
-
/** underline (desk-style
|
|
107
|
+
/** frame (tamagui v3 bordered box, default), underline (desk-style) or contained (segmented track) */
|
|
108
108
|
variant?: TabsVariant;
|
|
109
109
|
/** Equal tabs share a bounded row. Band always uses equal distribution. */
|
|
110
110
|
distribution?: "content" | "equal";
|
|
@@ -395,6 +395,15 @@ const ThumbIndicator = styled(View, {
|
|
|
395
395
|
zIndex: 0,
|
|
396
396
|
});
|
|
397
397
|
|
|
398
|
+
// FZ-11426: tamagui v3's roving intent indicator. It slides to the tab under
|
|
399
|
+
// the pointer or keyboard focus and fades out when neither rests on a tab.
|
|
400
|
+
const IntentIndicator = styled(View, {
|
|
401
|
+
name: "MpTabsIntent",
|
|
402
|
+
position: "absolute",
|
|
403
|
+
zIndex: 0,
|
|
404
|
+
pointerEvents: "none",
|
|
405
|
+
});
|
|
406
|
+
|
|
398
407
|
// One weight for every tab: active emphasis is the underline or the fill
|
|
399
408
|
// only, so a label never reflows on activation.
|
|
400
409
|
const TabLabel = styled(Text, {
|
|
@@ -410,7 +419,7 @@ function TabsRoot({
|
|
|
410
419
|
value,
|
|
411
420
|
defaultValue,
|
|
412
421
|
onChange,
|
|
413
|
-
variant = "
|
|
422
|
+
variant = "frame",
|
|
414
423
|
distribution = "content",
|
|
415
424
|
accent,
|
|
416
425
|
error,
|
|
@@ -487,7 +496,22 @@ function TabsRoot({
|
|
|
487
496
|
const [activeLayout, setActiveLayout] = React.useState<(TabLayout & { value: string }) | null>(
|
|
488
497
|
null,
|
|
489
498
|
);
|
|
499
|
+
const [roving, setRoving] = React.useState<{
|
|
500
|
+
hover: (TabLayout & { value: string }) | null;
|
|
501
|
+
focus: (TabLayout & { value: string }) | null;
|
|
502
|
+
}>({ hover: null, focus: null });
|
|
503
|
+
const [intentLayout, setIntentLayout] = React.useState<(TabLayout & { value: string }) | null>(
|
|
504
|
+
null,
|
|
505
|
+
);
|
|
490
506
|
const handleInteraction = (tabValue: string, type: string, layout: TabLayout | null) => {
|
|
507
|
+
if (type === "hover" || type === "focus") {
|
|
508
|
+
const next = layout ? { ...layout, value: tabValue } : null;
|
|
509
|
+
setRoving((prev) =>
|
|
510
|
+
!next && prev[type]?.value !== tabValue ? prev : { ...prev, [type]: next },
|
|
511
|
+
);
|
|
512
|
+
if (next) setIntentLayout(next);
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
491
515
|
if (type !== "select" || !layout || tabValue !== currentValue) return;
|
|
492
516
|
setActiveLayout((prev) =>
|
|
493
517
|
prev &&
|
|
@@ -562,6 +586,7 @@ function TabsRoot({
|
|
|
562
586
|
|
|
563
587
|
const isUnderline = variant === "underline";
|
|
564
588
|
const isBand = variant === "band";
|
|
589
|
+
const isFrame = variant === "frame";
|
|
565
590
|
const equalDistribution = isBand || distribution === "equal";
|
|
566
591
|
const onTabKeyDown = (event: React.KeyboardEvent, value: string) => {
|
|
567
592
|
if (!["Home", "End", "ArrowLeft", "ArrowRight"].includes(event.key)) return;
|
|
@@ -598,9 +623,10 @@ function TabsRoot({
|
|
|
598
623
|
const enabledCount = items.length;
|
|
599
624
|
const activeIndex = items.findIndex((i) => i.value === currentValue);
|
|
600
625
|
const activePosition = getGroupPosition(Math.max(0, activeIndex), enabledCount);
|
|
601
|
-
const thumbRadius =
|
|
602
|
-
|
|
603
|
-
|
|
626
|
+
const thumbRadius =
|
|
627
|
+
isUnderline || isFrame
|
|
628
|
+
? undefined
|
|
629
|
+
: stackRadiusProps(activePosition, outerRadiusToken, "horizontal");
|
|
604
630
|
|
|
605
631
|
const indicatorContent =
|
|
606
632
|
activeLayout && !isBand ? (
|
|
@@ -639,22 +665,49 @@ function TabsRoot({
|
|
|
639
665
|
indicatorContent
|
|
640
666
|
);
|
|
641
667
|
|
|
668
|
+
const intentTarget = roving.hover ?? roving.focus;
|
|
669
|
+
const intentShown =
|
|
670
|
+
intentTarget !== null &&
|
|
671
|
+
intentTarget.value !== currentValue &&
|
|
672
|
+
!disabled &&
|
|
673
|
+
!items.find((item) => item.value === intentTarget.value)?.disabled;
|
|
674
|
+
const intentIndicator =
|
|
675
|
+
isFrame && intentLayout ? (
|
|
676
|
+
<IntentIndicator
|
|
677
|
+
x={intentLayout.x}
|
|
678
|
+
y={intentLayout.y}
|
|
679
|
+
width={intentLayout.width}
|
|
680
|
+
height={intentLayout.height}
|
|
681
|
+
opacity={intentShown ? 1 : 0}
|
|
682
|
+
backgroundColor={
|
|
683
|
+
intentShown && pressValue === intentTarget?.value
|
|
684
|
+
? componentColors.interactive.hover
|
|
685
|
+
: componentColors.interactive.background
|
|
686
|
+
}
|
|
687
|
+
data-tabs-indicator="intent"
|
|
688
|
+
data-intent-value={intentShown ? intentTarget?.value : undefined}
|
|
689
|
+
{...transitionProps(knobProps.motion.control, ["width", "opacity"])}
|
|
690
|
+
/>
|
|
691
|
+
) : null;
|
|
692
|
+
|
|
642
693
|
// LC-122 side inset: under a page gutter, or anywhere inside a padded
|
|
643
694
|
// Screen (a card there resets the gutter but still pads), the panel sits on
|
|
644
695
|
// the padding it is given; edge-to-edge Tabs supply the gutter themselves.
|
|
645
696
|
// The strip-to-content gap is one section gap either way.
|
|
646
|
-
const panelInset =
|
|
647
|
-
?
|
|
648
|
-
:
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
697
|
+
const panelInset = isFrame
|
|
698
|
+
? knobProps.panelPadding
|
|
699
|
+
: pageInset
|
|
700
|
+
? { paddingTop: knobProps.gapLg.gap }
|
|
701
|
+
: {
|
|
702
|
+
paddingHorizontal: knobProps.panelPadding.padding,
|
|
703
|
+
paddingTop: knobProps.gapLg.gap,
|
|
704
|
+
paddingBottom: knobProps.panelPadding.padding,
|
|
705
|
+
};
|
|
653
706
|
// LC-159: an edge-to-edge panel is the page line for its content, so it
|
|
654
707
|
// declares the gutter it pads by and nested containers add none.
|
|
655
708
|
const panelBody = (content: ReactNode) => {
|
|
656
709
|
const body = <Surface size={size}>{content}</Surface>;
|
|
657
|
-
return pageInset ? (
|
|
710
|
+
return pageInset && !isFrame ? (
|
|
658
711
|
body
|
|
659
712
|
) : (
|
|
660
713
|
<PageGutter inset={knobProps.panelPadding.padding as string}>{body}</PageGutter>
|
|
@@ -672,10 +725,11 @@ function TabsRoot({
|
|
|
672
725
|
data-size-token={visualSizeToken}
|
|
673
726
|
data-visual-px={sizePx}
|
|
674
727
|
{...(!isWeb ? { role: "tablist" as const } : undefined)}
|
|
675
|
-
alignSelf={equalDistribution ? "stretch" : "flex-start"}
|
|
728
|
+
alignSelf={equalDistribution || isFrame ? "stretch" : "flex-start"}
|
|
676
729
|
minWidth={0}
|
|
677
|
-
contained={
|
|
678
|
-
{...(
|
|
730
|
+
contained={variant === "contained"}
|
|
731
|
+
{...(isFrame ? { flexGrow: 1 } : undefined)}
|
|
732
|
+
{...(isUnderline || isBand || isFrame
|
|
679
733
|
? { gap: 0 }
|
|
680
734
|
: {
|
|
681
735
|
backgroundColor: componentColors.interactive.background,
|
|
@@ -685,14 +739,17 @@ function TabsRoot({
|
|
|
685
739
|
...knobProps.borderRadiusNested,
|
|
686
740
|
})}
|
|
687
741
|
>
|
|
742
|
+
{intentIndicator}
|
|
688
743
|
{indicator}
|
|
689
744
|
{items.map((item, itemIndex) => {
|
|
690
745
|
const isActive = item.value === currentValue;
|
|
691
746
|
const isDisabled = disabled || item.disabled;
|
|
692
747
|
const position = getGroupPosition(itemIndex, enabledCount);
|
|
693
|
-
const cornerProps =
|
|
694
|
-
?
|
|
695
|
-
:
|
|
748
|
+
const cornerProps = isFrame
|
|
749
|
+
? undefined
|
|
750
|
+
: isUnderline
|
|
751
|
+
? underlineStackRadius(position, radiusToken)
|
|
752
|
+
: stackRadiusProps(position, outerRadiusToken, "horizontal");
|
|
696
753
|
// Roving tabindex (single tab stop): tamagui's vendored
|
|
697
754
|
// roving-focus item hardcodes tabIndex=0 on every tab, making
|
|
698
755
|
// each tab its own Tab stop. Exactly one tab stays in the page
|
|
@@ -727,6 +784,7 @@ function TabsRoot({
|
|
|
727
784
|
else tabRefs.current.delete(item.value);
|
|
728
785
|
}}
|
|
729
786
|
flex={equalDistribution ? 1 : undefined}
|
|
787
|
+
flexGrow={!equalDistribution && isFrame ? 1 : undefined}
|
|
730
788
|
minWidth={0}
|
|
731
789
|
minHeight={equalDistribution ? MIN_PRESS_TARGET : undefined}
|
|
732
790
|
borderEndWidth={isBand && itemIndex < items.length - 1 ? 1 : 0}
|
|
@@ -807,7 +865,7 @@ function TabsRoot({
|
|
|
807
865
|
// Band columns share width; a minimal inset keeps labels off the edges.
|
|
808
866
|
paddingHorizontal={isBand ? "$1" : knobProps.tab.paddingHorizontal}
|
|
809
867
|
alignSelf="stretch"
|
|
810
|
-
flexGrow={equalDistribution ? 1 : undefined}
|
|
868
|
+
flexGrow={equalDistribution || isFrame ? 1 : undefined}
|
|
811
869
|
flexShrink={equalDistribution ? 1 : undefined}
|
|
812
870
|
flexBasis={equalDistribution ? 0 : undefined}
|
|
813
871
|
minWidth={0}
|
|
@@ -815,7 +873,9 @@ function TabsRoot({
|
|
|
815
873
|
alignItems="center"
|
|
816
874
|
justifyContent="center"
|
|
817
875
|
backgroundColor={
|
|
818
|
-
isBand || isActive || isDisabled
|
|
876
|
+
isBand || isActive || isDisabled || (isFrame && isWeb)
|
|
877
|
+
? "transparent"
|
|
878
|
+
: feedbackBackground
|
|
819
879
|
}
|
|
820
880
|
{...(isActive && !isDisabled ? { color: "$selectedColor" } : undefined)}
|
|
821
881
|
{...(kbRing ? keyboardFocusRingProps : undefined)}
|
|
@@ -862,6 +922,13 @@ function TabsRoot({
|
|
|
862
922
|
// `flex: 1` alone is not enough — without `minHeight: 0` the column
|
|
863
923
|
// refuses to shrink below its content and the panel never gets a box.
|
|
864
924
|
{...(fill ? fillProps : undefined)}
|
|
925
|
+
{...(isFrame
|
|
926
|
+
? {
|
|
927
|
+
...knobProps.controlBorderOutlined,
|
|
928
|
+
...knobProps.containerRadius,
|
|
929
|
+
overflow: "hidden" as const,
|
|
930
|
+
}
|
|
931
|
+
: undefined)}
|
|
865
932
|
data-tabs-variant={variant}
|
|
866
933
|
data-tabs-distribution={equalDistribution ? "equal" : "content"}
|
|
867
934
|
data-tabs-fill={fill ? "true" : undefined}
|
|
@@ -873,7 +940,7 @@ function TabsRoot({
|
|
|
873
940
|
backgroundColor={isBand ? "$color2" : undefined}
|
|
874
941
|
borderBottomWidth={isBand ? 1 : undefined}
|
|
875
942
|
borderBottomColor={isBand ? componentColors.surface.border : undefined}
|
|
876
|
-
{...(isUnderline
|
|
943
|
+
{...(isUnderline || isFrame
|
|
877
944
|
? { ...hairline.bottom, borderColor: componentColors.surface.border }
|
|
878
945
|
: undefined)}
|
|
879
946
|
data-fade-left={fades.left ? "true" : undefined}
|
|
@@ -892,7 +959,10 @@ function TabsRoot({
|
|
|
892
959
|
scrollEventThrottle={16}
|
|
893
960
|
// Slop padding keeps the 44px press floor from being clipped when
|
|
894
961
|
// the painted tab is smaller than the floor (LC-54 / nested scale).
|
|
895
|
-
contentContainerStyle={{
|
|
962
|
+
contentContainerStyle={{
|
|
963
|
+
paddingVertical: slop,
|
|
964
|
+
...(isFrame ? { flexGrow: 1 } : undefined),
|
|
965
|
+
}}
|
|
896
966
|
marginVertical={-slop}
|
|
897
967
|
onScroll={(e) => {
|
|
898
968
|
scrollMetrics.current.offset = e.nativeEvent.contentOffset.x;
|
|
@@ -923,6 +993,7 @@ function TabsRoot({
|
|
|
923
993
|
*/}
|
|
924
994
|
<YStack
|
|
925
995
|
data-tabs-panels=""
|
|
996
|
+
backgroundColor={isFrame ? componentColors.surface.background : undefined}
|
|
926
997
|
{...(fill ? fillProps : heldHeight > 0 ? { minHeight: heldHeight } : undefined)}
|
|
927
998
|
onLayout={
|
|
928
999
|
fill
|
|
@@ -82,6 +82,37 @@ describe("ActionButton (LC-260)", () => {
|
|
|
82
82
|
);
|
|
83
83
|
});
|
|
84
84
|
|
|
85
|
+
it("import is a bare glyph named Import, by default and by a sharper label (FZ-11009)", () => {
|
|
86
|
+
renderWithProviders(
|
|
87
|
+
<>
|
|
88
|
+
<ActionButton kind="import" />
|
|
89
|
+
<ActionButton kind="import" label="Import certificate chain" />
|
|
90
|
+
</>,
|
|
91
|
+
);
|
|
92
|
+
for (const name of ["Import", "Import certificate chain"]) {
|
|
93
|
+
const button = screen.getByRole("button", { name });
|
|
94
|
+
expect(button.getAttribute("data-mp-action")).toBe("import");
|
|
95
|
+
expect(button.getAttribute("data-mp-icon-button")).toBe("neutral");
|
|
96
|
+
expect(button.textContent).toBe("");
|
|
97
|
+
expect(button.querySelector("svg")).not.toBeNull();
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it("import and upload share one glyph, which never reads as export's (FZ-11009)", () => {
|
|
102
|
+
renderWithProviders(
|
|
103
|
+
<>
|
|
104
|
+
<ActionButton kind="import" />
|
|
105
|
+
<ActionButton kind="upload" />
|
|
106
|
+
<ActionButton kind="export" />
|
|
107
|
+
</>,
|
|
108
|
+
);
|
|
109
|
+
const glyph = (name: string) =>
|
|
110
|
+
screen.getByRole("button", { name }).querySelector("svg")!.innerHTML;
|
|
111
|
+
expect(glyph("Upload")).toBe(glyph("Import"));
|
|
112
|
+
expect(glyph("Import")).not.toBe(glyph("Export"));
|
|
113
|
+
expect(standardActions.import.icon).not.toBe(standardActions.export.icon);
|
|
114
|
+
});
|
|
115
|
+
|
|
85
116
|
it("presses reach the caller", () => {
|
|
86
117
|
const onPress = vi.fn();
|
|
87
118
|
renderWithProviders(<ActionButton kind="delete" onPress={onPress} />);
|
package/src/code/LogView.tsx
CHANGED
|
@@ -36,7 +36,7 @@ interface ScrollMetrics {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
const levelInk = { warn: "
|
|
39
|
+
const levelInk = { warn: "warningInk", error: "red11" } as const;
|
|
40
40
|
const levelGlyph = { warn: WarningIcon, error: XCircleIcon } as const;
|
|
41
41
|
|
|
42
42
|
function clockTime(time: string | Date): string {
|
|
@@ -9,6 +9,9 @@ import { Sheet } from "../Sheet";
|
|
|
9
9
|
import { SheetFrame } from "../surfaces";
|
|
10
10
|
import { resetToasts } from "../Toast/store";
|
|
11
11
|
import { Paragraph, SizableText } from "../Text";
|
|
12
|
+
import { H2 } from "../Heading";
|
|
13
|
+
import { ListGroup, ListGroupItem, ListRow } from "../views";
|
|
14
|
+
import { CalendarIcon, ReceiptIcon, UserIcon, WarningIcon } from "@phosphor-icons/react";
|
|
12
15
|
|
|
13
16
|
const meta: Meta<typeof ConfirmDialog> = {
|
|
14
17
|
title: "Components/ConfirmDialog",
|
|
@@ -27,6 +30,28 @@ export default meta;
|
|
|
27
30
|
|
|
28
31
|
type Story = StoryObj<typeof ConfirmDialog>;
|
|
29
32
|
|
|
33
|
+
function CustomerPage() {
|
|
34
|
+
return (
|
|
35
|
+
<YStack padding="$4" gap="$4" width="100%" maxWidth={560}>
|
|
36
|
+
<H2>Acme Corp</H2>
|
|
37
|
+
<ListGroup aria-label="Customer">
|
|
38
|
+
<ListGroupItem>
|
|
39
|
+
<ListRow icon={<UserIcon />} title="Jane Doe" meta="Contact" />
|
|
40
|
+
</ListGroupItem>
|
|
41
|
+
<ListGroupItem>
|
|
42
|
+
<ListRow icon={<ReceiptIcon />} title="Open invoices" meta="12" />
|
|
43
|
+
</ListGroupItem>
|
|
44
|
+
<ListGroupItem>
|
|
45
|
+
<ListRow icon={<WarningIcon />} title="Overdue" meta="3" />
|
|
46
|
+
</ListGroupItem>
|
|
47
|
+
<ListGroupItem>
|
|
48
|
+
<ListRow icon={<CalendarIcon />} title="Renewal" meta="March" />
|
|
49
|
+
</ListGroupItem>
|
|
50
|
+
</ListGroup>
|
|
51
|
+
</YStack>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
30
55
|
function ConfirmHarness({
|
|
31
56
|
destructive = false,
|
|
32
57
|
warning = false,
|
|
@@ -36,6 +61,7 @@ function ConfirmHarness({
|
|
|
36
61
|
body = "This removes the customer record. This cannot be undone.",
|
|
37
62
|
confirmDisabled = false,
|
|
38
63
|
confirmDisabledReason,
|
|
64
|
+
overPage = false,
|
|
39
65
|
}: {
|
|
40
66
|
destructive?: boolean;
|
|
41
67
|
warning?: boolean;
|
|
@@ -45,13 +71,18 @@ function ConfirmHarness({
|
|
|
45
71
|
body?: string;
|
|
46
72
|
confirmDisabled?: boolean;
|
|
47
73
|
confirmDisabledReason?: string;
|
|
74
|
+
overPage?: boolean;
|
|
48
75
|
}) {
|
|
49
76
|
const [open, setOpen] = useState(startOpen);
|
|
50
77
|
return (
|
|
51
|
-
<YStack minHeight={360} gap="$3" padding="$4" alignItems="flex-start">
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
78
|
+
<YStack minHeight={360} gap="$3" padding={overPage ? 0 : "$4"} alignItems="flex-start">
|
|
79
|
+
{overPage ? (
|
|
80
|
+
<CustomerPage />
|
|
81
|
+
) : (
|
|
82
|
+
<Button size="$3" onPress={() => setOpen(true)}>
|
|
83
|
+
Open confirm
|
|
84
|
+
</Button>
|
|
85
|
+
)}
|
|
55
86
|
<ConfirmDialog
|
|
56
87
|
open={open}
|
|
57
88
|
onOpenChange={setOpen}
|
|
@@ -86,6 +117,11 @@ export const Destructive: Story = {
|
|
|
86
117
|
render: () => <ConfirmHarness destructive />,
|
|
87
118
|
};
|
|
88
119
|
|
|
120
|
+
export const OverPage: Story = {
|
|
121
|
+
name: "Over a page",
|
|
122
|
+
render: () => <ConfirmHarness destructive overPage body="This cannot be undone." />,
|
|
123
|
+
};
|
|
124
|
+
|
|
89
125
|
export const Warning: Story = {
|
|
90
126
|
render: () => (
|
|
91
127
|
<ConfirmHarness
|
|
@@ -115,7 +151,7 @@ function ConfirmInSheetDemo() {
|
|
|
115
151
|
const [confirming, setConfirming] = useState(false);
|
|
116
152
|
const [applied, setApplied] = useState(0);
|
|
117
153
|
return (
|
|
118
|
-
<YStack minHeight={360} gap="$3" padding="$4" alignItems="flex-start">
|
|
154
|
+
<YStack minHeight={360} gap="$3" padding={overPage ? 0 : "$4"} alignItems="flex-start">
|
|
119
155
|
<Button size="$3" onPress={() => setSheetOpen(true)}>
|
|
120
156
|
Open sheet
|
|
121
157
|
</Button>
|
|
@@ -1,67 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* CSS logical properties mirror layout for free, but directional *glyphs*
|
|
5
|
-
* (prev/next carets, expand arrows) and JS-measured geometry need to know the
|
|
6
|
-
* writing direction at runtime. This hook is that source.
|
|
7
|
-
*
|
|
8
|
-
* Web: reads the document-level `dir` attribute — `<body dir>` wins over
|
|
9
|
-
* `<html dir>` (the nearer attribute governs content per bidi inheritance);
|
|
10
|
-
* `"auto"` and empty values fall through. A MutationObserver keeps the value
|
|
11
|
-
* live, so flipping `document.dir` at runtime (e.g. the RTL probe, a locale
|
|
12
|
-
* switcher) re-renders consumers. SSR-safe via `useSyncExternalStore`: the
|
|
13
|
-
* server snapshot is `"ltr"`, hydration renders with it (no mismatch), and
|
|
14
|
-
* React re-checks the client snapshot immediately after.
|
|
15
|
-
*
|
|
16
|
-
* Native (`useDirection.native.ts`): `I18nManager.isRTL`, which is fixed for
|
|
17
|
-
* the app session (RN requires a reload to change direction).
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
import { useSyncExternalStore } from "react";
|
|
21
|
-
|
|
22
|
-
export type Direction = "ltr" | "rtl";
|
|
23
|
-
|
|
24
|
-
function normalizeDir(value: string | null | undefined): Direction | undefined {
|
|
25
|
-
if (value === "rtl") return "rtl";
|
|
26
|
-
if (value === "ltr") return "ltr";
|
|
27
|
-
// "" / "auto" / unknown → not an explicit direction; keep resolving.
|
|
28
|
-
return undefined;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function readDocumentDirection(): Direction {
|
|
32
|
-
if (typeof document === "undefined") return "ltr";
|
|
33
|
-
return (
|
|
34
|
-
normalizeDir(document.body?.getAttribute("dir")) ??
|
|
35
|
-
normalizeDir(document.documentElement?.getAttribute("dir")) ??
|
|
36
|
-
"ltr"
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function subscribe(onChange: () => void): () => void {
|
|
41
|
-
if (typeof document === "undefined" || typeof MutationObserver === "undefined") {
|
|
42
|
-
return () => {};
|
|
43
|
-
}
|
|
44
|
-
const observer = new MutationObserver(onChange);
|
|
45
|
-
// One observer catches <html dir>, <body dir>, and any nested island —
|
|
46
|
-
// snapshot equality in useSyncExternalStore drops the irrelevant ones.
|
|
47
|
-
observer.observe(document.documentElement, {
|
|
48
|
-
attributes: true,
|
|
49
|
-
attributeFilter: ["dir"],
|
|
50
|
-
subtree: true,
|
|
51
|
-
});
|
|
52
|
-
return () => observer.disconnect();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const getServerSnapshot = (): Direction => "ltr";
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Returns the current writing direction (`"ltr"` | `"rtl"`).
|
|
59
|
-
*
|
|
60
|
-
* Use it to mirror directional chrome that CSS logical properties cannot
|
|
61
|
-
* reach — swap paired glyphs (CaretLeft ⇄ CaretRight) when the icon encodes
|
|
62
|
-
* direction-of-travel. Do NOT mirror direction-neutral glyphs (search,
|
|
63
|
-
* close, checkmarks).
|
|
64
|
-
*/
|
|
65
|
-
export function useDirection(): Direction {
|
|
66
|
-
return useSyncExternalStore(subscribe, readDocumentDirection, getServerSnapshot);
|
|
67
|
-
}
|
|
1
|
+
export { useDirection } from "@multiplatform.one/forms";
|
|
2
|
+
export type { Direction } from "@multiplatform.one/forms";
|
package/src/index.ts
CHANGED
|
@@ -11,8 +11,8 @@ vi.mock("@multiplatform.one/platform", async (importOriginal) => ({
|
|
|
11
11
|
isNative: true,
|
|
12
12
|
}));
|
|
13
13
|
const scrollers = vi.hoisted(() => [] as { horizontal?: boolean }[]);
|
|
14
|
-
vi.mock("
|
|
15
|
-
const native = await import("
|
|
14
|
+
vi.mock("../../../forms/src/ScrollView", async () => {
|
|
15
|
+
const native = await import("@multiplatform.one/forms/native-twins");
|
|
16
16
|
const ScrollView = forwardRef<unknown, ComponentProps<typeof native.ScrollView>>((props, ref) => {
|
|
17
17
|
scrollers.push(props as { horizontal?: boolean });
|
|
18
18
|
return createElement(
|
|
@@ -21,7 +21,7 @@ vi.mock("../ScrollView", async () => {
|
|
|
21
21
|
createElement(native.ScrollView, { ...props, ref } as never),
|
|
22
22
|
);
|
|
23
23
|
});
|
|
24
|
-
return {
|
|
24
|
+
return { ScrollView };
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
const config = createDefaultThemeConfig();
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* the section step and heading weight, the status line in the body, the facts
|
|
8
8
|
* at the label role in the secondary ink with their glyphs.
|
|
9
9
|
*/
|
|
10
|
+
import { OverflowRow } from "@multiplatform.one/forms";
|
|
10
11
|
import { IconSlot, useGlyphColor, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
11
12
|
import type { ReactNode } from "react";
|
|
12
13
|
import { SizableText, Text, View, XStack, YStack, isWeb } from "tamagui";
|
|
13
14
|
import { sectionHeading } from "../componentColors";
|
|
14
|
-
import { OverflowRow } from "../OverflowRow";
|
|
15
15
|
import { StatusMark, type StatusTone } from "./StatusDot";
|
|
16
16
|
|
|
17
17
|
export type IdentityPlateTone = StatusTone;
|
|
@@ -216,3 +216,32 @@ describe("Sidebar on the shell material (FZ-7996)", () => {
|
|
|
216
216
|
expect(rows[1]!.previousElementSibling?.hasAttribute("data-sidebar-row")).toBe(false);
|
|
217
217
|
});
|
|
218
218
|
});
|
|
219
|
+
|
|
220
|
+
describe("Sidebar row hairlines (LC-02)", () => {
|
|
221
|
+
const sections = [
|
|
222
|
+
{
|
|
223
|
+
title: "Navigation",
|
|
224
|
+
items: [
|
|
225
|
+
{ value: "a", label: "Alpha", onPress: () => {} },
|
|
226
|
+
{ value: "b", label: "Beta", onPress: () => {} },
|
|
227
|
+
{ value: "c", label: "Gamma", onPress: () => {} },
|
|
228
|
+
],
|
|
229
|
+
},
|
|
230
|
+
];
|
|
231
|
+
|
|
232
|
+
it("runs each hairline the panel's full width", () => {
|
|
233
|
+
const result = renderWithProviders(<Sidebar sections={sections} />);
|
|
234
|
+
const group = result.container.querySelector("[data-sidebar-group]")!;
|
|
235
|
+
const hairlines = [...group.querySelectorAll('[data-sidebar-hairline="full"]')];
|
|
236
|
+
expect(hairlines).toHaveLength(2);
|
|
237
|
+
for (const hairline of hairlines) {
|
|
238
|
+
expect(hairline.parentElement).toBe(group);
|
|
239
|
+
const insets = String(hairline.className)
|
|
240
|
+
.split(/\s+/)
|
|
241
|
+
.filter((atom) => /^_(p|px|pl|pr|ps|pe|m|mx|ml|mr|ms|me)-/.test(atom))
|
|
242
|
+
.filter((atom) => !/^_pe-(none|auto|box-none|box-only)$/.test(atom))
|
|
243
|
+
.filter((atom) => !/-0(px)?$/.test(atom));
|
|
244
|
+
expect(insets).toEqual([]);
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
});
|
|
@@ -13,11 +13,19 @@ export type StatusTone = "positive" | "warning" | "critical" | "neutral";
|
|
|
13
13
|
|
|
14
14
|
export const statusToneInk: Record<StatusTone, string> = {
|
|
15
15
|
positive: "$green9",
|
|
16
|
-
warning: "$
|
|
16
|
+
warning: "$warningMark",
|
|
17
17
|
critical: "$red9",
|
|
18
18
|
neutral: "$color9",
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
/** The tone's ink for words, where step 9 is too pale to read (LC-288). */
|
|
22
|
+
export const statusToneText: Record<StatusTone, string> = {
|
|
23
|
+
positive: "$green11",
|
|
24
|
+
warning: "$warningInk",
|
|
25
|
+
critical: "$red11",
|
|
26
|
+
neutral: "$color11",
|
|
27
|
+
};
|
|
28
|
+
|
|
21
29
|
export function StatusMark({ tone }: { tone: StatusTone }) {
|
|
22
30
|
return (
|
|
23
31
|
<View
|
|
@@ -12,7 +12,7 @@ import type { ReactNode } from "react";
|
|
|
12
12
|
import { Text, View, XStack, isWeb } from "tamagui";
|
|
13
13
|
import { useTranslation } from "../shared/i18n";
|
|
14
14
|
import { Tooltip } from "../Tooltip";
|
|
15
|
-
import { StatusMark,
|
|
15
|
+
import { StatusMark, statusToneText, type StatusTone } from "./StatusDot";
|
|
16
16
|
|
|
17
17
|
export interface StatusGlyph {
|
|
18
18
|
key?: string;
|
|
@@ -66,7 +66,7 @@ function GlyphCheck({ item }: { item: StatusGlyph }) {
|
|
|
66
66
|
{showReason ? (
|
|
67
67
|
<Text
|
|
68
68
|
{...knobProps.textRole.meta}
|
|
69
|
-
color={
|
|
69
|
+
color={statusToneText[item.tone] as never}
|
|
70
70
|
numberOfLines={1}
|
|
71
71
|
>
|
|
72
72
|
{item.reason}
|
|
@@ -822,7 +822,7 @@ export function Attachments({
|
|
|
822
822
|
onOpenChange={(open) => !open && setPreviewFile(null)}
|
|
823
823
|
>
|
|
824
824
|
<Dialog.Portal>
|
|
825
|
-
<DialogOverlay
|
|
825
|
+
<DialogOverlay />
|
|
826
826
|
<DialogContent maxWidth={800} maxHeight="80vh">
|
|
827
827
|
<Dialog.Title>{previewFile?.fileName}</Dialog.Title>
|
|
828
828
|
{previewFile && isImageFile(previewFile) ? (
|
package/src/layouts/index.tsx
CHANGED
package/src/layouts/sidebar.tsx
CHANGED
|
@@ -288,9 +288,11 @@ export function Sidebar({
|
|
|
288
288
|
return (
|
|
289
289
|
<Fragment key={itemKey}>
|
|
290
290
|
{itemIdx > 0 && !material ? (
|
|
291
|
-
<
|
|
292
|
-
|
|
293
|
-
|
|
291
|
+
<Separator
|
|
292
|
+
alignSelf="stretch"
|
|
293
|
+
data-sidebar-hairline="full"
|
|
294
|
+
{...hairline.line}
|
|
295
|
+
/>
|
|
294
296
|
) : null}
|
|
295
297
|
<XStack
|
|
296
298
|
data-group-position={position}
|