@multiplatform.one/components 7.15.0 → 7.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Accordion/index.native.js +1 -1
- package/dist/cjs/Accordion/index.native.js.map +1 -1
- package/dist/cjs/Alert/index.native.js.map +1 -1
- package/dist/cjs/AnimateHeight/index.native.js.map +1 -1
- package/dist/cjs/Avatar/getInitials.native.js.map +1 -1
- package/dist/cjs/Avatar/index.native.js.map +1 -1
- package/dist/cjs/Badge/index.native.js.map +1 -1
- package/dist/cjs/Button.native.js.map +1 -1
- package/dist/cjs/Card.native.js.map +1 -1
- package/dist/cjs/CardFooter.native.js.map +1 -1
- package/dist/cjs/CardHeader.native.js.map +1 -1
- package/dist/cjs/Carousel/index.cjs +2 -1
- package/dist/cjs/Carousel/index.native.js +3 -2
- package/dist/cjs/Carousel/index.native.js.map +1 -1
- package/dist/cjs/Chip/index.cjs +5 -2
- package/dist/cjs/Chip/index.native.js +5 -2
- package/dist/cjs/Chip/index.native.js.map +1 -1
- package/dist/cjs/Collapsible.native.js.map +1 -1
- package/dist/cjs/ContextMenu/index.native.js.map +1 -1
- package/dist/cjs/CopyField/index.native.js.map +1 -1
- package/dist/cjs/DotIndicator/index.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/index.native.js.map +1 -1
- package/dist/cjs/ErrorBoundary/index.native.js.map +1 -1
- package/dist/cjs/Heading.native.js.map +1 -1
- package/dist/cjs/Meter/index.native.js +1 -1
- package/dist/cjs/Meter/index.native.js.map +1 -1
- package/dist/cjs/Meter/meter.native.js.map +1 -1
- package/dist/cjs/Pagination.native.js +1 -1
- package/dist/cjs/Pagination.native.js.map +1 -1
- package/dist/cjs/ProgressSteps/index.native.js.map +1 -1
- package/dist/cjs/Quote/index.native.js.map +1 -1
- package/dist/cjs/ScrollView/index.cjs +28 -0
- package/dist/cjs/ScrollView/index.native.js +72 -0
- package/dist/cjs/ScrollView/index.native.js.map +1 -0
- package/dist/cjs/Separator/index.native.js.map +1 -1
- package/dist/cjs/SheetModal/detents.native.js.map +1 -1
- package/dist/cjs/Skeleton/index.cjs +1 -13
- package/dist/cjs/Skeleton/index.native.js +1 -13
- package/dist/cjs/Skeleton/index.native.js.map +1 -1
- package/dist/cjs/SkipLink/index.native.js.map +1 -1
- package/dist/cjs/SortableList/SortableHandle.native.js.map +1 -1
- package/dist/cjs/SortableList/index.native.js.map +1 -1
- package/dist/cjs/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/cjs/Tabs/index.cjs +2 -1
- package/dist/cjs/Tabs/index.native.js +2 -1
- package/dist/cjs/Tabs/index.native.js.map +1 -1
- package/dist/cjs/Text.native.js.map +1 -1
- package/dist/cjs/Toast/index.native.js.map +1 -1
- package/dist/cjs/Toast/store.native.js.map +1 -1
- package/dist/cjs/Tooltip/nativePress.native.js.map +1 -1
- package/dist/cjs/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/cjs/TreeSelect/index.native.js +1 -1
- package/dist/cjs/TreeSelect/index.native.js.map +1 -1
- package/dist/cjs/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/cjs/Video/PlayerChrome.native.js.map +1 -1
- package/dist/cjs/Video/VideoFrame.native.js.map +1 -1
- package/dist/cjs/Video/types.native.js.map +1 -1
- package/dist/cjs/Wheel/index.native.js.map +1 -1
- package/dist/cjs/Wizard/index.native.js +2 -2
- package/dist/cjs/Wizard/index.native.js.map +1 -1
- package/dist/cjs/actions/ActionBar.native.js.map +1 -1
- package/dist/cjs/actions/DestructiveAction.native.js.map +1 -1
- package/dist/cjs/actions/devWarn.native.js.map +1 -1
- package/dist/cjs/actions/index.native.js.map +1 -1
- package/dist/cjs/actions/severity.native.js.map +1 -1
- package/dist/cjs/charts/Axis.native.js.map +1 -1
- package/dist/cjs/charts/BarChart.native.js.map +1 -1
- package/dist/cjs/charts/ChartDataView.native.js.map +1 -1
- package/dist/cjs/charts/ChartSurface.native.js.map +1 -1
- package/dist/cjs/charts/LineChart.native.js.map +1 -1
- package/dist/cjs/charts/PieChart.native.js.map +1 -1
- package/dist/cjs/charts/Sparkline.native.js.map +1 -1
- package/dist/cjs/charts/accessibility.native.js.map +1 -1
- package/dist/cjs/charts/composeChart.native.js.map +1 -1
- package/dist/cjs/charts/index.native.js.map +1 -1
- package/dist/cjs/charts/math.cjs +18 -0
- package/dist/cjs/charts/math.native.js +18 -0
- package/dist/cjs/charts/math.native.js.map +1 -1
- package/dist/cjs/charts/series.cjs +17 -8
- package/dist/cjs/charts/series.native.js +17 -8
- package/dist/cjs/charts/series.native.js.map +1 -1
- package/dist/cjs/charts/svg.cjs +6 -0
- package/dist/cjs/charts/svg.native.js +6 -0
- package/dist/cjs/charts/svg.native.js.map +1 -1
- package/dist/cjs/charts/types.native.js.map +1 -1
- package/dist/cjs/charts/useChartTheme.cjs +3 -9
- package/dist/cjs/charts/useChartTheme.native.js +4 -10
- package/dist/cjs/charts/useChartTheme.native.js.map +1 -1
- package/dist/cjs/code/Code/index.native.js.map +1 -1
- package/dist/cjs/code/CodeBlock/index.native.js +6 -6
- package/dist/cjs/code/CodeBlock/index.native.js.map +1 -1
- package/dist/cjs/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/cjs/code/Highlighter/index.native.js.map +1 -1
- package/dist/cjs/code/Pre/index.native.js.map +1 -1
- package/dist/cjs/code/index.native.js +5 -5
- package/dist/cjs/code/index.native.js.map +1 -1
- package/dist/cjs/componentColors.native.js.map +1 -1
- package/dist/cjs/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/cjs/feedback/NotifyHost.native.js +2 -2
- package/dist/cjs/feedback/NotifyHost.native.js.map +1 -1
- package/dist/cjs/feedback/copy.native.js.map +1 -1
- package/dist/cjs/feedback/index.native.js.map +1 -1
- package/dist/cjs/feedback/notify.native.js.map +1 -1
- package/dist/cjs/feedback/route.native.js.map +1 -1
- package/dist/cjs/feedback/store.native.js.map +1 -1
- package/dist/cjs/hooks/index.native.js +1 -1
- package/dist/cjs/hooks/index.native.js.map +1 -1
- package/dist/cjs/hooks/useClipboard.native.js.map +1 -1
- package/dist/cjs/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/cjs/icons/CheckRegular.native.js.map +1 -1
- package/dist/cjs/icons/MinusRegular.native.js.map +1 -1
- package/dist/cjs/icons/index.native.js.map +1 -1
- package/dist/cjs/icons/lucide.native.js.map +1 -1
- package/dist/cjs/icons/themed.native.js.map +1 -1
- package/dist/cjs/images/Image/ImageFrame.native.js +1 -1
- package/dist/cjs/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/cjs/images/Image/index.native.js +1 -1
- package/dist/cjs/images/Image/shared.native.js +1 -1
- package/dist/cjs/images/Image/shared.native.js.map +1 -1
- package/dist/cjs/images/Image/types.native.js.map +1 -1
- package/dist/cjs/images/index.native.js.map +1 -1
- package/dist/cjs/index.native.js +29 -29
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/knobImmuneExports.native.js.map +1 -1
- package/dist/cjs/layouts/AsyncBoundary.native.js +2 -2
- package/dist/cjs/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/cjs/layouts/Debug/index.native.js.map +1 -1
- package/dist/cjs/layouts/EmptyState.native.js.map +1 -1
- package/dist/cjs/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/cjs/layouts/PageTemplates.native.js.map +1 -1
- package/dist/cjs/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/cjs/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/cjs/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/cjs/layouts/attachments.cjs +2 -1
- package/dist/cjs/layouts/attachments.native.js +3 -2
- package/dist/cjs/layouts/attachments.native.js.map +1 -1
- package/dist/cjs/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/cjs/layouts/index.native.js +3 -3
- package/dist/cjs/layouts/index.native.js.map +1 -1
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/cjs/layouts/sidebar.native.js.map +1 -1
- package/dist/cjs/layouts/tags.native.js +1 -1
- package/dist/cjs/layouts/tags.native.js.map +1 -1
- package/dist/cjs/layouts/timeline.cjs +9 -1
- package/dist/cjs/layouts/timeline.native.js +11 -3
- package/dist/cjs/layouts/timeline.native.js.map +1 -1
- package/dist/cjs/layouts/toolbar.native.js.map +1 -1
- package/dist/cjs/shared/actionScan.native.js.map +1 -1
- package/dist/cjs/shared/i18n.native.js.map +1 -1
- package/dist/cjs/shared/t.native.js.map +1 -1
- package/dist/cjs/shared/textRidesText.native.js.map +1 -1
- package/dist/cjs/shared/useReturnFocusOnClose.native.js.map +1 -1
- package/dist/cjs/surfaces.native.js +1 -1
- package/dist/cjs/surfaces.native.js.map +1 -1
- package/dist/cjs/tamagui.cjs +2 -1
- package/dist/cjs/tamagui.native.js +2 -1
- package/dist/cjs/tamagui.native.js.map +1 -1
- package/dist/cjs/testSetup.native.js.map +1 -1
- package/dist/cjs/utils/setTinted.native.js.map +1 -1
- package/dist/cjs/utils/unwrapText.native.js.map +1 -1
- package/dist/cjs/views/Calendar.native.js.map +1 -1
- package/dist/cjs/views/Dashboard.native.js +1 -1
- package/dist/cjs/views/Dashboard.native.js.map +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/ImageGrid.native.js +1 -1
- package/dist/cjs/views/ImageGrid.native.js.map +1 -1
- package/dist/cjs/views/Kanban.cjs +1 -0
- package/dist/cjs/views/Kanban.native.js +3 -1
- package/dist/cjs/views/Kanban.native.js.map +1 -1
- package/dist/cjs/views/List.cjs +3 -1
- package/dist/cjs/views/List.native.js +6 -4
- package/dist/cjs/views/List.native.js.map +1 -1
- package/dist/cjs/views/Matrix.native.js +1 -1
- package/dist/cjs/views/Matrix.native.js.map +1 -1
- package/dist/cjs/views/ReportBuilder.native.js +1 -1
- package/dist/cjs/views/ReportBuilder.native.js.map +1 -1
- package/dist/cjs/views/TreeView.native.js.map +1 -1
- package/dist/cjs/views/calendarMath.native.js.map +1 -1
- package/dist/cjs/views/ganttMath.native.js.map +1 -1
- package/dist/cjs/views/index.native.js +1 -1
- package/dist/cjs/views/index.native.js.map +1 -1
- package/dist/cjs/views/kanbanDnd.native.js.map +1 -1
- package/dist/cjs/views/matrixMath.native.js.map +1 -1
- package/dist/cjs/views/treeViewDnd.native.js.map +1 -1
- package/dist/cjs/views/treeViewLayout.native.js.map +1 -1
- package/dist/cjs/views/treeViewMotion.native.js.map +1 -1
- package/dist/cjs/views/treeViewReveal.native.js.map +1 -1
- package/dist/esm/Carousel/index.mjs +2 -1
- package/dist/esm/Carousel/index.mjs.map +1 -1
- package/dist/esm/Carousel/index.native.js +2 -1
- package/dist/esm/Carousel/index.native.js.map +1 -1
- package/dist/esm/Chip/index.mjs +6 -3
- package/dist/esm/Chip/index.mjs.map +1 -1
- package/dist/esm/Chip/index.native.js +6 -3
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/ScrollView/index.mjs +3 -0
- package/dist/esm/ScrollView/index.mjs.map +1 -0
- package/dist/esm/ScrollView/index.native.js +44 -0
- package/dist/esm/ScrollView/index.native.js.map +1 -0
- package/dist/esm/Skeleton/index.mjs +1 -13
- package/dist/esm/Skeleton/index.mjs.map +1 -1
- package/dist/esm/Skeleton/index.native.js +1 -13
- package/dist/esm/Skeleton/index.native.js.map +1 -1
- package/dist/esm/Tabs/index.mjs +2 -1
- package/dist/esm/Tabs/index.mjs.map +1 -1
- package/dist/esm/Tabs/index.native.js +2 -1
- package/dist/esm/Tabs/index.native.js.map +1 -1
- package/dist/esm/charts/math.mjs +18 -1
- package/dist/esm/charts/math.mjs.map +1 -1
- package/dist/esm/charts/math.native.js +18 -1
- package/dist/esm/charts/math.native.js.map +1 -1
- package/dist/esm/charts/series.mjs +19 -10
- package/dist/esm/charts/series.mjs.map +1 -1
- package/dist/esm/charts/series.native.js +19 -10
- package/dist/esm/charts/series.native.js.map +1 -1
- package/dist/esm/charts/svg.mjs +6 -1
- package/dist/esm/charts/svg.mjs.map +1 -1
- package/dist/esm/charts/svg.native.js +6 -1
- package/dist/esm/charts/svg.native.js.map +1 -1
- package/dist/esm/charts/useChartTheme.mjs +4 -10
- package/dist/esm/charts/useChartTheme.mjs.map +1 -1
- package/dist/esm/charts/useChartTheme.native.js +5 -11
- package/dist/esm/charts/useChartTheme.native.js.map +1 -1
- package/dist/esm/layouts/attachments.mjs +3 -2
- package/dist/esm/layouts/attachments.mjs.map +1 -1
- package/dist/esm/layouts/attachments.native.js +3 -2
- package/dist/esm/layouts/attachments.native.js.map +1 -1
- package/dist/esm/layouts/timeline.mjs +11 -3
- package/dist/esm/layouts/timeline.mjs.map +1 -1
- package/dist/esm/layouts/timeline.native.js +11 -3
- package/dist/esm/layouts/timeline.native.js.map +1 -1
- package/dist/esm/tamagui.mjs +2 -1
- package/dist/esm/tamagui.mjs.map +1 -1
- package/dist/esm/tamagui.native.js +2 -1
- package/dist/esm/tamagui.native.js.map +1 -1
- package/dist/esm/views/Kanban.mjs +1 -0
- package/dist/esm/views/Kanban.mjs.map +1 -1
- package/dist/esm/views/Kanban.native.js +3 -1
- package/dist/esm/views/Kanban.native.js.map +1 -1
- package/dist/esm/views/List.mjs +4 -2
- package/dist/esm/views/List.mjs.map +1 -1
- package/dist/esm/views/List.native.js +7 -5
- package/dist/esm/views/List.native.js.map +1 -1
- package/dist/jsx/Carousel/index.mjs +2 -1
- package/dist/jsx/Carousel/index.mjs.map +1 -1
- package/dist/jsx/Carousel/index.native.js +2 -1
- package/dist/jsx/Carousel/index.native.js.map +1 -1
- package/dist/jsx/Chip/index.mjs +6 -3
- package/dist/jsx/Chip/index.mjs.map +1 -1
- package/dist/jsx/Chip/index.native.js +5 -2
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/ScrollView/index.mjs +3 -0
- package/dist/jsx/ScrollView/index.mjs.map +1 -0
- package/dist/jsx/ScrollView/index.native.js +72 -0
- package/dist/jsx/ScrollView/index.native.js.map +1 -0
- package/dist/jsx/Skeleton/index.mjs +1 -13
- package/dist/jsx/Skeleton/index.mjs.map +1 -1
- package/dist/jsx/Skeleton/index.native.js +1 -13
- package/dist/jsx/Skeleton/index.native.js.map +1 -1
- package/dist/jsx/Tabs/index.mjs +2 -1
- package/dist/jsx/Tabs/index.mjs.map +1 -1
- package/dist/jsx/Tabs/index.native.js +2 -1
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/charts/math.mjs +18 -1
- package/dist/jsx/charts/math.mjs.map +1 -1
- package/dist/jsx/charts/math.native.js +18 -0
- package/dist/jsx/charts/math.native.js.map +1 -1
- package/dist/jsx/charts/series.mjs +19 -10
- package/dist/jsx/charts/series.mjs.map +1 -1
- package/dist/jsx/charts/series.native.js +17 -8
- package/dist/jsx/charts/series.native.js.map +1 -1
- package/dist/jsx/charts/svg.mjs +6 -1
- package/dist/jsx/charts/svg.mjs.map +1 -1
- package/dist/jsx/charts/svg.native.js +6 -0
- package/dist/jsx/charts/svg.native.js.map +1 -1
- package/dist/jsx/charts/useChartTheme.mjs +4 -10
- package/dist/jsx/charts/useChartTheme.mjs.map +1 -1
- package/dist/jsx/charts/useChartTheme.native.js +4 -10
- package/dist/jsx/charts/useChartTheme.native.js.map +1 -1
- package/dist/jsx/layouts/attachments.mjs +3 -2
- package/dist/jsx/layouts/attachments.mjs.map +1 -1
- package/dist/jsx/layouts/attachments.native.js +2 -1
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/timeline.mjs +11 -3
- package/dist/jsx/layouts/timeline.mjs.map +1 -1
- package/dist/jsx/layouts/timeline.native.js +9 -1
- package/dist/jsx/layouts/timeline.native.js.map +1 -1
- package/dist/jsx/tamagui.mjs +2 -1
- package/dist/jsx/tamagui.mjs.map +1 -1
- package/dist/jsx/tamagui.native.js +2 -1
- package/dist/jsx/tamagui.native.js.map +1 -1
- package/dist/jsx/views/Kanban.mjs +1 -0
- package/dist/jsx/views/Kanban.mjs.map +1 -1
- package/dist/jsx/views/Kanban.native.js +3 -1
- package/dist/jsx/views/Kanban.native.js.map +1 -1
- package/dist/jsx/views/List.mjs +4 -2
- package/dist/jsx/views/List.mjs.map +1 -1
- package/dist/jsx/views/List.native.js +6 -4
- package/dist/jsx/views/List.native.js.map +1 -1
- package/package.json +9 -9
- package/src/Carousel/index.tsx +2 -1
- package/src/Chip/Chip.spec.tsx +21 -16
- package/src/Chip/index.tsx +10 -2
- package/src/ScrollView/ScrollView.native.spec.tsx +157 -0
- package/src/ScrollView/index.native.tsx +45 -0
- package/src/ScrollView/index.tsx +2 -0
- package/src/Skeleton/Skeleton.spec.tsx +3 -3
- package/src/Skeleton/index.tsx +2 -15
- package/src/Tabs/index.tsx +1 -1
- package/src/charts/charts.spec.tsx +49 -6
- package/src/charts/math.spec.ts +30 -0
- package/src/charts/math.ts +36 -0
- package/src/charts/series.tsx +14 -9
- package/src/charts/svg.ts +13 -0
- package/src/charts/useChartTheme.ts +14 -15
- package/src/layouts/attachments.radius.spec.tsx +74 -0
- package/src/layouts/attachments.tsx +3 -1
- package/src/layouts/timeline-radius.spec.tsx +38 -0
- package/src/layouts/timeline.tsx +16 -1
- package/src/tamagui.ts +4 -1
- package/src/views/Kanban.native.tsx +3 -1
- package/src/views/Kanban.spec.tsx +15 -0
- package/src/views/Kanban.tsx +1 -0
- package/src/views/List.spec.tsx +50 -0
- package/src/views/List.tsx +11 -4
- package/types/Carousel/index.d.ts.map +1 -1
- package/types/Chip/index.d.ts.map +1 -1
- package/types/ScrollView/index.d.ts +3 -0
- package/types/ScrollView/index.d.ts.map +1 -0
- package/types/ScrollView/index.native.d.ts +4 -0
- package/types/ScrollView/index.native.d.ts.map +1 -0
- package/types/Skeleton/index.d.ts +1 -1
- package/types/Skeleton/index.d.ts.map +1 -1
- package/types/Tabs/index.d.ts.map +1 -1
- package/types/charts/math.d.ts +18 -0
- package/types/charts/math.d.ts.map +1 -1
- package/types/charts/series.d.ts +2 -1
- package/types/charts/series.d.ts.map +1 -1
- package/types/charts/svg.d.ts +8 -0
- package/types/charts/svg.d.ts.map +1 -1
- package/types/charts/useChartTheme.d.ts +4 -3
- package/types/charts/useChartTheme.d.ts.map +1 -1
- package/types/layouts/attachments.d.ts.map +1 -1
- package/types/layouts/timeline.d.ts.map +1 -1
- package/types/tamagui.d.ts +2 -1
- package/types/tamagui.d.ts.map +1 -1
- package/types/views/Kanban.native.d.ts.map +1 -1
- package/types/views/List.d.ts.map +1 -1
package/src/charts/math.ts
CHANGED
|
@@ -165,6 +165,42 @@ const curveFactories: Record<ChartCurve, CurveFactory> = {
|
|
|
165
165
|
step: curveStepAfter,
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
+
export interface BarPathInput {
|
|
169
|
+
x: number;
|
|
170
|
+
/** Top edge of the bar box (the value end for a positive bar). */
|
|
171
|
+
y: number;
|
|
172
|
+
width: number;
|
|
173
|
+
height: number;
|
|
174
|
+
/** Corner radius on the value end; the baseline corners stay square. */
|
|
175
|
+
radius: number;
|
|
176
|
+
/** The value end is the top edge (value above the baseline) or the bottom. */
|
|
177
|
+
valueEnd: "top" | "bottom";
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* SVG path for a bar that rounds only its value-end corners (R-SCALE-DATA):
|
|
182
|
+
* the baseline corners stay square so the mark sits on its axis. The radius
|
|
183
|
+
* is clamped to half the width and to the height, so a short bar never
|
|
184
|
+
* rounds past its own box.
|
|
185
|
+
*/
|
|
186
|
+
export function barPath(input: BarPathInput): string {
|
|
187
|
+
const { x, y, width: w, height: h, valueEnd } = input;
|
|
188
|
+
const r = Math.max(0, Math.min(input.radius, w / 2, h));
|
|
189
|
+
const right = x + w;
|
|
190
|
+
const bottom = y + h;
|
|
191
|
+
if (r === 0) return `M${x},${y}H${right}V${bottom}H${x}Z`;
|
|
192
|
+
if (valueEnd === "top") {
|
|
193
|
+
return (
|
|
194
|
+
`M${x},${bottom}V${y + r}A${r},${r} 0 0 1 ${x + r},${y}` +
|
|
195
|
+
`H${right - r}A${r},${r} 0 0 1 ${right},${y + r}V${bottom}Z`
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
return (
|
|
199
|
+
`M${x},${y}H${right}V${bottom - r}A${r},${r} 0 0 1 ${right - r},${bottom}` +
|
|
200
|
+
`H${x + r}A${r},${r} 0 0 1 ${x},${bottom - r}Z`
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
168
204
|
export interface LinePathOptions {
|
|
169
205
|
curve?: ChartCurve;
|
|
170
206
|
}
|
package/src/charts/series.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MIN_PRESS_TARGET } from "@multiplatform.one/theme";
|
|
2
2
|
import type { ScaleBand, ScaleLinear } from "d3-scale";
|
|
3
3
|
import { useId } from "react";
|
|
4
|
-
import { areaPath, arcPath, linePath, pieSlices, canMaskPieSlices } from "./math";
|
|
4
|
+
import { areaPath, arcPath, barPath, linePath, pieSlices, canMaskPieSlices } from "./math";
|
|
5
5
|
import {
|
|
6
6
|
Circle,
|
|
7
7
|
Defs,
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
Path,
|
|
11
11
|
Rect,
|
|
12
12
|
datumTargetProps,
|
|
13
|
+
chartBarProps,
|
|
13
14
|
chartMarkProps,
|
|
14
15
|
chartWebProps,
|
|
15
16
|
luminanceMaskProps,
|
|
@@ -69,7 +70,8 @@ export interface BarSeriesProps extends DatumTargetCallbacks {
|
|
|
69
70
|
|
|
70
71
|
/**
|
|
71
72
|
* Vertical bars from the zero baseline (negative values hang below it).
|
|
72
|
-
*
|
|
73
|
+
* Only the value end rounds, with the borderRadius knob clamped to bar
|
|
74
|
+
* anatomy; the baseline corners stay square (R-SCALE-DATA).
|
|
73
75
|
* Hit target = the full column, floored at 44px width.
|
|
74
76
|
*/
|
|
75
77
|
export function BarSeries({ data, xScale, yScale, plot, fills, ...callbacks }: BarSeriesProps) {
|
|
@@ -90,15 +92,18 @@ export function BarSeries({ data, xScale, yScale, plot, fills, ...callbacks }: B
|
|
|
90
92
|
const targetWidth = Math.max(bandwidth, MIN_PRESS_TARGET);
|
|
91
93
|
return (
|
|
92
94
|
<G key={`${datum.label}-${index}`}>
|
|
93
|
-
<
|
|
95
|
+
<Path
|
|
94
96
|
{...chartMarkProps(datum.label)}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
{...chartBarProps({ x, y, width: bandwidth, height, radius })}
|
|
98
|
+
d={barPath({
|
|
99
|
+
x,
|
|
100
|
+
y,
|
|
101
|
+
width: bandwidth,
|
|
102
|
+
height,
|
|
103
|
+
radius,
|
|
104
|
+
valueEnd: valueY <= baseline ? "top" : "bottom",
|
|
105
|
+
})}
|
|
99
106
|
fill={fills[index]}
|
|
100
|
-
rx={radius}
|
|
101
|
-
ry={radius}
|
|
102
107
|
/>
|
|
103
108
|
{interactive ? (
|
|
104
109
|
<Rect
|
package/src/charts/svg.ts
CHANGED
|
@@ -88,6 +88,19 @@ export function chartMarkProps(label: string): Record<string, unknown> {
|
|
|
88
88
|
return isWeb ? { "data-mpo-chart-mark": label } : {};
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
/** A bar mark's box and value-end radius, for audits that cannot read a path. */
|
|
92
|
+
export function chartBarProps(box: {
|
|
93
|
+
x: number;
|
|
94
|
+
y: number;
|
|
95
|
+
width: number;
|
|
96
|
+
height: number;
|
|
97
|
+
radius: number;
|
|
98
|
+
}): Record<string, unknown> {
|
|
99
|
+
return isWeb
|
|
100
|
+
? { "data-mpo-chart-bar": [box.x, box.y, box.width, box.height, box.radius].join(",") }
|
|
101
|
+
: {};
|
|
102
|
+
}
|
|
103
|
+
|
|
91
104
|
export function chartChromeProps(kind: "axis" | "grid"): Record<string, unknown> {
|
|
92
105
|
return isWeb ? { "data-mpo-chart-chrome": kind } : {};
|
|
93
106
|
}
|
|
@@ -16,11 +16,18 @@
|
|
|
16
16
|
* from the Tamagui font config — KNOB-TOTALITY for text inside SVG);
|
|
17
17
|
* - `transition` carries the animation knob (undefined at `none`/PRM via
|
|
18
18
|
* `useResolvedKnobs`) so draw-in motion stops per A-CONTINUOUS;
|
|
19
|
-
* - `barCornerRadius`
|
|
20
|
-
*
|
|
19
|
+
* - `barCornerRadius` resolves the borderRadius knob through the DEFAULT
|
|
20
|
+
* class (Part 2b: 0/5/9/16/50) and caps at the mark's own anatomy
|
|
21
|
+
* (R-SCALE-DATA: half the band, and the bar's own value extent).
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
|
-
import {
|
|
24
|
+
import {
|
|
25
|
+
radiusStopFromToken,
|
|
26
|
+
resolveRadiusClass,
|
|
27
|
+
useChartPalette,
|
|
28
|
+
useResolvedKnobs,
|
|
29
|
+
type ChartPalette,
|
|
30
|
+
} from "@multiplatform.one/theme";
|
|
24
31
|
import * as Colors from "@tamagui/colors";
|
|
25
32
|
import { useMemo } from "react";
|
|
26
33
|
import {
|
|
@@ -49,7 +56,7 @@ export interface ChartTheme {
|
|
|
49
56
|
transition?: TransitionProp;
|
|
50
57
|
/** True when draw-in / continuous motion may play (A-CONTINUOUS). */
|
|
51
58
|
animationEnabled: boolean;
|
|
52
|
-
/**
|
|
59
|
+
/** Value-end bar corner radius from the borderRadius knob, clamped to anatomy. */
|
|
53
60
|
barCornerRadius: (bandWidth: number, barHeight: number) => number;
|
|
54
61
|
}
|
|
55
62
|
|
|
@@ -59,15 +66,6 @@ const labelFontSizeBySizeToken: Record<string, number> = {
|
|
|
59
66
|
$5: 13,
|
|
60
67
|
};
|
|
61
68
|
|
|
62
|
-
/** borderRadius knob → bar corner radius px (pre-clamp). */
|
|
63
|
-
const barRadiusByKnob: Record<string, number> = {
|
|
64
|
-
$0: 0,
|
|
65
|
-
$2: 2,
|
|
66
|
-
$4: 3,
|
|
67
|
-
$6: 5,
|
|
68
|
-
$12: Number.POSITIVE_INFINITY,
|
|
69
|
-
};
|
|
70
|
-
|
|
71
69
|
function resolveFontFamily(fontToken: unknown): string | undefined {
|
|
72
70
|
if (typeof fontToken !== "string") return undefined;
|
|
73
71
|
try {
|
|
@@ -102,7 +100,8 @@ export function useChartTheme(): ChartTheme {
|
|
|
102
100
|
const transition = knobProps.transition;
|
|
103
101
|
|
|
104
102
|
return useMemo(() => {
|
|
105
|
-
const
|
|
103
|
+
const radiusStop = radiusStopFromToken(radiusToken);
|
|
104
|
+
const barRadiusBase = radiusStop ? resolveRadiusClass("DEFAULT", radiusStop) : 0;
|
|
106
105
|
return {
|
|
107
106
|
scheme,
|
|
108
107
|
palette,
|
|
@@ -114,7 +113,7 @@ export function useChartTheme(): ChartTheme {
|
|
|
114
113
|
transition,
|
|
115
114
|
animationEnabled: transition !== null && transition !== undefined,
|
|
116
115
|
barCornerRadius: (bandWidth: number, barHeight: number) =>
|
|
117
|
-
Math.max(0, Math.min(barRadiusBase, bandWidth / 2, barHeight
|
|
116
|
+
Math.max(0, Math.min(barRadiusBase, bandWidth / 2, barHeight)),
|
|
118
117
|
};
|
|
119
118
|
}, [
|
|
120
119
|
scheme,
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vitest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { cleanup, screen } from "@testing-library/react";
|
|
6
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
7
|
+
import { Preset, type Knobs } from "@multiplatform.one/theme";
|
|
8
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
9
|
+
import { Attachments, type AttachmentItem } from "./attachments";
|
|
10
|
+
|
|
11
|
+
afterEach(cleanup);
|
|
12
|
+
|
|
13
|
+
const items: AttachmentItem[] = [
|
|
14
|
+
{ id: "a", fileName: "restore-log.txt", fileUrl: "/a.txt", fileSize: 12_000 },
|
|
15
|
+
{ id: "b", fileName: "topology.txt", fileUrl: "/b.txt", fileSize: 812_000 },
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
function rowAtoms(overrides: Partial<Knobs>) {
|
|
19
|
+
renderWithProviders(
|
|
20
|
+
<Preset overrides={overrides}>
|
|
21
|
+
<Attachments items={items} />
|
|
22
|
+
</Preset>,
|
|
23
|
+
);
|
|
24
|
+
return screen
|
|
25
|
+
.getAllByRole("listitem")
|
|
26
|
+
.map((row) => (row.getAttribute("class") ?? "").split(/\s+/));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
describe("Attachments rows are a CONTAINER-CAP stack (DG-RAD-04, MPO-56)", () => {
|
|
30
|
+
it("caps the outer corners at the row padding at full", () => {
|
|
31
|
+
const [first, last] = rowAtoms({ borderRadius: "full", space: "medium" });
|
|
32
|
+
expect(first).toEqual(
|
|
33
|
+
expect.arrayContaining(["_borderStartStartRadius-18px", "_borderStartEndRadius-18px"]),
|
|
34
|
+
);
|
|
35
|
+
expect(last).toEqual(
|
|
36
|
+
expect.arrayContaining(["_borderEndStartRadius-18px", "_borderEndEndRadius-18px"]),
|
|
37
|
+
);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("caps large at 13 under space small, where 16 would exceed the padding", () => {
|
|
41
|
+
const [first] = rowAtoms({ borderRadius: "large", space: "small" });
|
|
42
|
+
expect(first).toEqual(
|
|
43
|
+
expect.arrayContaining(["_borderStartStartRadius-13px", "_borderStartEndRadius-13px"]),
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("declares each row a StackedRow cap with the stops it resolved", () => {
|
|
48
|
+
renderWithProviders(
|
|
49
|
+
<Preset overrides={{ borderRadius: "large", space: "small" }}>
|
|
50
|
+
<Attachments items={items} />
|
|
51
|
+
</Preset>,
|
|
52
|
+
);
|
|
53
|
+
const declared = screen.getAllByRole("listitem").map((row) => ({
|
|
54
|
+
container: row.getAttribute("data-constraint-container"),
|
|
55
|
+
position: row.getAttribute("data-stack-position"),
|
|
56
|
+
radius: row.getAttribute("data-radius-knob"),
|
|
57
|
+
space: row.getAttribute("data-space-knob"),
|
|
58
|
+
}));
|
|
59
|
+
expect(declared).toEqual([
|
|
60
|
+
{ container: "StackedRow", position: "first", radius: "large", space: "small" },
|
|
61
|
+
{ container: "StackedRow", position: "last", radius: "large", space: "small" },
|
|
62
|
+
]);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it("squares every corner at none", () => {
|
|
66
|
+
for (const row of rowAtoms({ borderRadius: "none" })) {
|
|
67
|
+
const corners = row.filter((a) =>
|
|
68
|
+
/^_border(Start|End)(Start|End)Radius-(\d+px|t-radius-\d+)$/.test(a),
|
|
69
|
+
);
|
|
70
|
+
expect(corners).toHaveLength(4);
|
|
71
|
+
expect(corners.filter((a) => !/-(0px|t-radius-0)$/.test(a))).toEqual([]);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
});
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from "@phosphor-icons/react";
|
|
12
12
|
import { downloadFile } from "@multiplatform.one/platform";
|
|
13
13
|
import {
|
|
14
|
+
containerCapProps,
|
|
14
15
|
ensureFocusVisibleRing,
|
|
15
16
|
ensureKeyboardModalityTracking,
|
|
16
17
|
getGroupPosition,
|
|
@@ -335,7 +336,7 @@ function AttachmentRow({
|
|
|
335
336
|
const ext = getFileExtension(attachment);
|
|
336
337
|
const iconSize = compact ? 14 : 16;
|
|
337
338
|
const position = getGroupPosition(index, count);
|
|
338
|
-
const corners = stackRadiusProps(position, knobProps.
|
|
339
|
+
const corners = stackRadiusProps(position, knobProps.containerRadius.borderRadius);
|
|
339
340
|
|
|
340
341
|
const actions = {
|
|
341
342
|
onPreview: () => onPreview(attachment),
|
|
@@ -419,6 +420,7 @@ function AttachmentRow({
|
|
|
419
420
|
<XStack
|
|
420
421
|
role="listitem"
|
|
421
422
|
data-stack-position={position}
|
|
423
|
+
{...containerCapProps("StackedRow", knobProps.borderRadius.borderRadius, knobProps.space)}
|
|
422
424
|
alignItems="center"
|
|
423
425
|
paddingVertical="$2"
|
|
424
426
|
paddingHorizontal={rowPad}
|
|
@@ -76,3 +76,41 @@ describe("Timeline entry radius knob (SB-M-301)", () => {
|
|
|
76
76
|
expect(fullRadiusClass).not.toBe(noneRadiusClass);
|
|
77
77
|
});
|
|
78
78
|
});
|
|
79
|
+
|
|
80
|
+
describe("Timeline comment card is CONTAINER-CAP on its own padding (DG-RAD-04, MPO-56)", () => {
|
|
81
|
+
const cardRadius = (borderRadius: "none" | "medium" | "large" | "full", compact = false) => {
|
|
82
|
+
renderWithProviders(
|
|
83
|
+
<Preset overrides={{ borderRadius }}>
|
|
84
|
+
<Timeline entries={entries} compact={compact} />
|
|
85
|
+
</Preset>,
|
|
86
|
+
);
|
|
87
|
+
const found = entryRowRadiusClass();
|
|
88
|
+
cleanup();
|
|
89
|
+
return found;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
it("takes the token while it fits the $3 padding", () => {
|
|
93
|
+
expect(cardRadius("none")).toBe("_btlr-0px");
|
|
94
|
+
expect(cardRadius("medium")).toBe("_btlr-9px");
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it("caps large and full at the 13px padding", () => {
|
|
98
|
+
expect(cardRadius("large")).toBe("_btlr-13px");
|
|
99
|
+
expect(cardRadius("full")).toBe("_btlr-13px");
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it("caps at the compact $2 padding when compact", () => {
|
|
103
|
+
expect(cardRadius("medium", true)).toBe("_btlr-7px");
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it("declares an OwnInset cap for the constraint audit", () => {
|
|
107
|
+
renderWithProviders(
|
|
108
|
+
<Preset overrides={{ borderRadius: "full" }}>
|
|
109
|
+
<Timeline entries={entries} />
|
|
110
|
+
</Preset>,
|
|
111
|
+
);
|
|
112
|
+
const card = screen.getByText("Looks good!").closest("[data-constraint-container]");
|
|
113
|
+
expect(card?.getAttribute("data-constraint-container")).toBe("OwnInset");
|
|
114
|
+
expect(card?.getAttribute("data-radius-knob")).toBe("full");
|
|
115
|
+
});
|
|
116
|
+
});
|
package/src/layouts/timeline.tsx
CHANGED
|
@@ -13,12 +13,15 @@ import {
|
|
|
13
13
|
import { useDirection } from "../hooks/useDirection";
|
|
14
14
|
import {
|
|
15
15
|
MIN_PRESS_TARGET,
|
|
16
|
+
containerCapProps,
|
|
16
17
|
ensureFocusVisibleRing,
|
|
17
18
|
formatAbsoluteDateTime,
|
|
18
19
|
formatRelativeTimestamp,
|
|
19
20
|
getGroupPosition,
|
|
20
21
|
pressTargetHitSlop,
|
|
21
22
|
pressTargetStyle,
|
|
23
|
+
radiusStopFromToken,
|
|
24
|
+
resolveRadiusClass,
|
|
22
25
|
stackRadiusProps,
|
|
23
26
|
useResolvedKnobs,
|
|
24
27
|
} from "@multiplatform.one/theme";
|
|
@@ -37,6 +40,7 @@ import {
|
|
|
37
40
|
XStack,
|
|
38
41
|
YStack,
|
|
39
42
|
type YStackProps,
|
|
43
|
+
getTokenValue,
|
|
40
44
|
isWeb,
|
|
41
45
|
} from "tamagui";
|
|
42
46
|
import { Avatar } from "../Avatar";
|
|
@@ -556,6 +560,15 @@ export function Timeline({
|
|
|
556
560
|
// Twin of the live avatar/badge column — spine centers on this well.
|
|
557
561
|
const columnPx = compact ? 20 : sz === "$5" ? 34 : 24;
|
|
558
562
|
const rowPad = compact ? 8 : sz === "$5" ? 16 : 12;
|
|
563
|
+
// DG-RAD-04: the comment card is a padded content container, so it caps
|
|
564
|
+
// at its own padding, not at the panelPadding knob it does not use.
|
|
565
|
+
const commentPad = compact ? "$2" : "$3";
|
|
566
|
+
const commentPadPx = getTokenValue(commentPad as Parameters<typeof getTokenValue>[0], "space");
|
|
567
|
+
const commentStop = radiusStopFromToken(radiusToken);
|
|
568
|
+
const commentRadius =
|
|
569
|
+
commentStop && typeof commentPadPx === "number"
|
|
570
|
+
? resolveRadiusClass("CONTAINER-CAP", commentStop, { paddingPx: commentPadPx })
|
|
571
|
+
: radiusToken;
|
|
559
572
|
|
|
560
573
|
const emptyIconSize = compact
|
|
561
574
|
? sz === "$3"
|
|
@@ -818,7 +831,9 @@ export function Timeline({
|
|
|
818
831
|
gap="$1"
|
|
819
832
|
backgroundColor={componentColors.surface.background}
|
|
820
833
|
{...knobProps.borderRadius}
|
|
821
|
-
|
|
834
|
+
borderRadius={commentRadius}
|
|
835
|
+
{...containerCapProps("OwnInset", radiusToken, knobProps.space)}
|
|
836
|
+
padding={commentPad}
|
|
822
837
|
>
|
|
823
838
|
<XStack gap="$2" alignItems="center" flexWrap="wrap">
|
|
824
839
|
<Text fontSize={nameFontSize} fontWeight="400" color={componentColors.text.primary}>
|
package/src/tamagui.ts
CHANGED
|
@@ -32,7 +32,6 @@ export {
|
|
|
32
32
|
Circle,
|
|
33
33
|
Group,
|
|
34
34
|
ListItem,
|
|
35
|
-
ScrollView,
|
|
36
35
|
Spacer,
|
|
37
36
|
Square,
|
|
38
37
|
Unspaced,
|
|
@@ -44,6 +43,10 @@ export {
|
|
|
44
43
|
YStack,
|
|
45
44
|
} from "tamagui";
|
|
46
45
|
|
|
46
|
+
// Raw tamagui on web. On native ./ScrollView/index.native.tsx hands onScroll
|
|
47
|
+
// to the RN ScrollView, which tamagui's own styled scroller drops (MPO-368).
|
|
48
|
+
export { ScrollView } from "./ScrollView";
|
|
49
|
+
|
|
47
50
|
// MPO-21 G2: LinearGradient is NOT on the main tamagui barrel — it lives
|
|
48
51
|
// on the `tamagui/linear-gradient` subpath.
|
|
49
52
|
export { LinearGradient } from "tamagui/linear-gradient";
|
|
@@ -17,8 +17,9 @@ import React, {
|
|
|
17
17
|
type ReactNode,
|
|
18
18
|
} from "react";
|
|
19
19
|
import { AccessibilityInfo, Animated } from "react-native";
|
|
20
|
-
import { ListItem,
|
|
20
|
+
import { ListItem, Text, View, XStack, YStack, type YStackProps } from "tamagui";
|
|
21
21
|
import { componentColors } from "../componentColors";
|
|
22
|
+
import { ScrollView } from "../ScrollView";
|
|
22
23
|
import { AsyncBoundary, useAsyncCount } from "../layouts/AsyncBoundary";
|
|
23
24
|
import { EmptyState } from "../layouts/page";
|
|
24
25
|
import { Card } from "../surfaces";
|
|
@@ -838,6 +839,7 @@ function KanbanColumnView<T>({
|
|
|
838
839
|
overflow="hidden"
|
|
839
840
|
transition={knobProps.transition}
|
|
840
841
|
{...knobProps.borderRadius}
|
|
842
|
+
{...knobProps.containerRadius}
|
|
841
843
|
{...knobProps.panelPadding}
|
|
842
844
|
backgroundColor={isDropTarget ? componentColors.interactive.background : "transparent"}
|
|
843
845
|
data-kanban-column={column.id}
|
|
@@ -112,6 +112,21 @@ describe("Kanban design law (SB-M-302 / LC-60)", () => {
|
|
|
112
112
|
expect(fullColumn).not.toBe(noneColumn);
|
|
113
113
|
});
|
|
114
114
|
|
|
115
|
+
it("caps the padded column frame at its own padding (DG-RAD-04 CONTAINER-CAP)", () => {
|
|
116
|
+
const columnRadius = (overrides: Parameters<typeof Preset>[0]["overrides"]) => {
|
|
117
|
+
renderWithProviders(
|
|
118
|
+
<Preset overrides={overrides}>
|
|
119
|
+
<Kanban columns={columns} renderCard={(item) => <span>{item.title}</span>} />
|
|
120
|
+
</Preset>,
|
|
121
|
+
);
|
|
122
|
+
const found = radiusClassOn(document.querySelector("[data-kanban-column='todo']"));
|
|
123
|
+
cleanup();
|
|
124
|
+
return found;
|
|
125
|
+
};
|
|
126
|
+
expect(columnRadius({ borderRadius: "full", space: "medium" })).toBe("_btlr-18px");
|
|
127
|
+
expect(columnRadius({ borderRadius: "large", space: "small" })).toBe("_btlr-13px");
|
|
128
|
+
});
|
|
129
|
+
|
|
115
130
|
it("does not paint raw input-surface borders on the column frame", () => {
|
|
116
131
|
renderWithProviders(
|
|
117
132
|
<Kanban columns={columns} renderCard={(item) => <span>{item.title}</span>} />,
|
package/src/views/Kanban.tsx
CHANGED
|
@@ -1336,6 +1336,7 @@ function KanbanColumnView<T>({
|
|
|
1336
1336
|
overflow="hidden"
|
|
1337
1337
|
transition={knobProps.transition}
|
|
1338
1338
|
{...knobProps.borderRadius}
|
|
1339
|
+
{...knobProps.containerRadius}
|
|
1339
1340
|
{...knobProps.panelPadding}
|
|
1340
1341
|
backgroundColor={
|
|
1341
1342
|
isDropTarget || isActiveColumn ? componentColors.interactive.background : "transparent"
|
package/src/views/List.spec.tsx
CHANGED
|
@@ -132,3 +132,53 @@ describe("ListRow ink — textAccent reaches the TEXT NODE (F11 / data-chrome ho
|
|
|
132
132
|
expect(high).not.toEqual(low);
|
|
133
133
|
});
|
|
134
134
|
});
|
|
135
|
+
|
|
136
|
+
describe("List rows are a CONTAINER-CAP stack (DG-RAD-04, MPO-56)", () => {
|
|
137
|
+
const rows = (overrides: {
|
|
138
|
+
borderRadius: "none" | "large" | "full";
|
|
139
|
+
space: "small" | "medium";
|
|
140
|
+
}) => {
|
|
141
|
+
renderWithProviders(
|
|
142
|
+
<Preset overrides={overrides}>
|
|
143
|
+
<List
|
|
144
|
+
items={documents}
|
|
145
|
+
aria-label="Documents"
|
|
146
|
+
renderItem={(item) => <ListRow title={item.title} />}
|
|
147
|
+
height={300}
|
|
148
|
+
estimateSize={50}
|
|
149
|
+
/>
|
|
150
|
+
</Preset>,
|
|
151
|
+
);
|
|
152
|
+
const found = screen.getAllByRole("listitem").map((row) => ({
|
|
153
|
+
corners: atoms(row, ["_borderStartStartRadius-", "_borderEndEndRadius-"]).filter((a) =>
|
|
154
|
+
/Radius-\d+px$/.test(a),
|
|
155
|
+
),
|
|
156
|
+
container: row.getAttribute("data-constraint-container"),
|
|
157
|
+
position: row.getAttribute("data-stack-position"),
|
|
158
|
+
}));
|
|
159
|
+
cleanup();
|
|
160
|
+
return found;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
it("caps the outer corners at the row padding at full, square inside", () => {
|
|
164
|
+
const [first, middle, last] = rows({ borderRadius: "full", space: "medium" });
|
|
165
|
+
expect(first.corners).toEqual(["_borderEndEndRadius-0px", "_borderStartStartRadius-18px"]);
|
|
166
|
+
expect(middle.corners).toEqual(["_borderEndEndRadius-0px", "_borderStartStartRadius-0px"]);
|
|
167
|
+
expect(last.corners).toEqual(["_borderEndEndRadius-18px", "_borderStartStartRadius-0px"]);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
it("caps large at 13 under space small", () => {
|
|
171
|
+
const [first] = rows({ borderRadius: "large", space: "small" });
|
|
172
|
+
expect(first.corners).toContain("_borderStartStartRadius-13px");
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
it("declares each row a StackedRow with its position", () => {
|
|
176
|
+
expect(
|
|
177
|
+
rows({ borderRadius: "large", space: "small" }).map((r) => [r.container, r.position]),
|
|
178
|
+
).toEqual([
|
|
179
|
+
["StackedRow", "first"],
|
|
180
|
+
["StackedRow", "middle"],
|
|
181
|
+
["StackedRow", "last"],
|
|
182
|
+
]);
|
|
183
|
+
});
|
|
184
|
+
});
|
package/src/views/List.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { Spinner } from "@multiplatform.one/forms";
|
|
|
4
4
|
import { FlashList, type FlashListRef } from "@shopify/flash-list";
|
|
5
5
|
import {
|
|
6
6
|
MIN_PRESS_TARGET,
|
|
7
|
+
containerCapProps,
|
|
7
8
|
ensureKeyboardModalityTracking,
|
|
8
9
|
getGroupPosition,
|
|
9
10
|
hairline,
|
|
@@ -281,7 +282,7 @@ export function List<T>({
|
|
|
281
282
|
const estimateSize = estimateSizeProp ?? Math.max(MIN_PRESS_TARGET, knobProps.control.height);
|
|
282
283
|
const rowPad = knobProps.panelPadding.padding;
|
|
283
284
|
const onAccent = useReadableTextOn("$accentBackground");
|
|
284
|
-
const cornersRadius = knobProps.
|
|
285
|
+
const cornersRadius = knobProps.containerRadius.borderRadius;
|
|
285
286
|
// No explicit height: hug content when the list is complete (page scrolls,
|
|
286
287
|
// no dead space / nested scrollbar); cap + scroll internally only while
|
|
287
288
|
// more pages can stream in (FlashList needs a bounded viewport to
|
|
@@ -476,6 +477,12 @@ export function List<T>({
|
|
|
476
477
|
{index > 0 ? <View {...hairline.line} /> : null}
|
|
477
478
|
<XStack
|
|
478
479
|
id={`${listId}-item-${index}`}
|
|
480
|
+
data-stack-position={position}
|
|
481
|
+
{...containerCapProps(
|
|
482
|
+
"StackedRow",
|
|
483
|
+
knobProps.borderRadius.borderRadius,
|
|
484
|
+
knobProps.space,
|
|
485
|
+
)}
|
|
479
486
|
{...({
|
|
480
487
|
"data-list-row": true,
|
|
481
488
|
...(isSelected ? { "data-selected": true } : {}),
|
|
@@ -487,9 +494,9 @@ export function List<T>({
|
|
|
487
494
|
alignItems="center"
|
|
488
495
|
overflow="hidden"
|
|
489
496
|
// Rows form ONE stacked group: the hover/focus/selection
|
|
490
|
-
// surface rounds
|
|
491
|
-
//
|
|
492
|
-
// sit BETWEEN rows only
|
|
497
|
+
// surface rounds only at the group's outer corners, capped
|
|
498
|
+
// at the row padding (DG-RAD-04); interiors stay square
|
|
499
|
+
// (LC-72). Hairlines sit BETWEEN rows only, never after the last.
|
|
493
500
|
{...corners}
|
|
494
501
|
role="listitem"
|
|
495
502
|
aria-selected={isSelected}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Carousel/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAWtD,OAAO,KAAK,EAAE,QAAQ,EAAmC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Carousel/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAWtD,OAAO,KAAK,EAAE,QAAQ,EAAmC,MAAM,SAAS,CAAC;AASzE,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB,6BAA6B;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wBAAwB;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAkCD,QAAA,MAAM,iBAAiB,kPAKrB,CAAC;AAQH,QAAA,MAAM,aAAa,kPAGjB,CAAC;AAgDH,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,UAAiB,EACjB,QAAe,EACf,QAAY,EACZ,IAAY,EACZ,GAAG,EAAE,OAAO,EACZ,aAAa,EACb,YAAgB,GACjB,EAAE,aAAa,2CAqUf;yBA9Ue,QAAQ;;;AAoVxB,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Chip/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Chip/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAe,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKrD,4FAA4F;AAC5F,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AACvD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AACpE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,O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|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ScrollView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../src/ScrollView/index.native.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAU,KAAK,UAAU,IAAI,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEvE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAmC/C,eAAO,MAAM,UAAU,EAEN,OAAO,iBAAiB,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { View } from "tamagui";
|
|
|
4
4
|
export type SkeletonVariant = "text" | "circular" | "rectangular" | "rounded";
|
|
5
5
|
export type SkeletonTextSize = "body" | "display";
|
|
6
6
|
declare const SkeletonFrame: import("tamagui").TamaguiComponent<import("@tamagui/web").TamaDefer, import("tamagui").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "rounded" | "text" | "circular" | "rectangular" | undefined;
|
|
8
8
|
}, import("@tamagui/web").StaticConfigPublic>;
|
|
9
9
|
export interface SkeletonProps extends Omit<GetProps<typeof SkeletonFrame>, "variant"> {
|
|
10
10
|
variant?: SkeletonVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Skeleton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,IAAI,EAAiB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot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C;;;;;;;;oBAAq8C,CAAC;oBAA2C,CAAC;gBAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAk1R,CAAC;;;;;;;;oBAAq8C,CAAC;oBAA2C,CAAC;gBAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAH74oC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC"}
|
package/types/charts/math.d.ts
CHANGED
|
@@ -77,6 +77,24 @@ export declare function formatAxisTick(value: number): string;
|
|
|
77
77
|
* so it rides the shared register (`formatNumber`).
|
|
78
78
|
*/
|
|
79
79
|
export declare function formatChartValue(value: number): string;
|
|
80
|
+
export interface BarPathInput {
|
|
81
|
+
x: number;
|
|
82
|
+
/** Top edge of the bar box (the value end for a positive bar). */
|
|
83
|
+
y: number;
|
|
84
|
+
width: number;
|
|
85
|
+
height: number;
|
|
86
|
+
/** Corner radius on the value end; the baseline corners stay square. */
|
|
87
|
+
radius: number;
|
|
88
|
+
/** The value end is the top edge (value above the baseline) or the bottom. */
|
|
89
|
+
valueEnd: "top" | "bottom";
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* SVG path for a bar that rounds only its value-end corners (R-SCALE-DATA):
|
|
93
|
+
* the baseline corners stay square so the mark sits on its axis. The radius
|
|
94
|
+
* is clamped to half the width and to the height, so a short bar never
|
|
95
|
+
* rounds past its own box.
|
|
96
|
+
*/
|
|
97
|
+
export declare function barPath(input: BarPathInput): string;
|
|
80
98
|
export interface LinePathOptions {
|
|
81
99
|
curve?: ChartCurve;
|
|
82
100
|
}
|