@multiplatform.one/components 7.8.0 → 7.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Accordion/index.cjs +3 -3
- package/dist/cjs/Accordion/index.native.js +4 -4
- package/dist/cjs/Accordion/index.native.js.map +1 -1
- package/dist/cjs/Chip/index.cjs +1 -1
- package/dist/cjs/Chip/index.native.js +1 -1
- package/dist/cjs/Chip/index.native.js.map +1 -1
- package/dist/cjs/ContextMenu/index.cjs +3 -3
- package/dist/cjs/ContextMenu/index.native.js +3 -3
- package/dist/cjs/ContextMenu/index.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/index.cjs +3 -3
- package/dist/cjs/DropdownMenu/index.native.js +3 -3
- package/dist/cjs/DropdownMenu/index.native.js.map +1 -1
- package/dist/cjs/Meter/index.cjs +3 -2
- package/dist/cjs/Meter/index.native.js +3 -2
- package/dist/cjs/Meter/index.native.js.map +1 -1
- package/dist/cjs/Meter/meter.cjs +1 -2
- package/dist/cjs/Meter/meter.native.js +1 -2
- package/dist/cjs/Meter/meter.native.js.map +1 -1
- package/dist/cjs/Pagination.cjs +2 -2
- package/dist/cjs/Pagination.native.js +2 -2
- package/dist/cjs/Pagination.native.js.map +1 -1
- package/dist/cjs/ProgressSteps/index.cjs +3 -3
- package/dist/cjs/ProgressSteps/index.native.js +3 -3
- package/dist/cjs/ProgressSteps/index.native.js.map +1 -1
- package/dist/cjs/Quote/index.cjs +1 -2
- package/dist/cjs/Quote/index.native.js +1 -2
- package/dist/cjs/Quote/index.native.js.map +1 -1
- package/dist/cjs/Tabs/index.cjs +1 -1
- package/dist/cjs/Tabs/index.native.js +1 -1
- package/dist/cjs/Tabs/index.native.js.map +1 -1
- package/dist/cjs/Toast/index.cjs +4 -5
- package/dist/cjs/Toast/index.native.js +4 -5
- package/dist/cjs/Toast/index.native.js.map +1 -1
- package/dist/cjs/TreeSelect/index.cjs +46 -7
- package/dist/cjs/TreeSelect/index.native.js +58 -7
- package/dist/cjs/TreeSelect/index.native.js.map +1 -1
- package/dist/cjs/charts/PieChart.cjs +1 -2
- package/dist/cjs/charts/PieChart.native.js +1 -2
- package/dist/cjs/charts/PieChart.native.js.map +1 -1
- package/dist/cjs/code/HighlightedCode/index.cjs +1 -1
- package/dist/cjs/code/HighlightedCode/index.native.js +1 -1
- package/dist/cjs/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/cjs/componentColors.cjs +6 -4
- package/dist/cjs/componentColors.native.js +6 -4
- package/dist/cjs/componentColors.native.js.map +1 -1
- package/dist/cjs/images/Image/ImageFrame.cjs +4 -2
- package/dist/cjs/images/Image/ImageFrame.native.js +4 -2
- package/dist/cjs/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/cjs/layouts/AsyncBoundary.cjs +1 -2
- package/dist/cjs/layouts/AsyncBoundary.native.js +1 -2
- package/dist/cjs/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/cjs/layouts/EmptyState.cjs +6 -2
- package/dist/cjs/layouts/EmptyState.native.js +10 -6
- package/dist/cjs/layouts/EmptyState.native.js.map +1 -1
- package/dist/cjs/layouts/attachments.cjs +4 -4
- package/dist/cjs/layouts/attachments.native.js +4 -4
- package/dist/cjs/layouts/attachments.native.js.map +1 -1
- package/dist/cjs/layouts/breadcrumbs.cjs +1 -2
- package/dist/cjs/layouts/breadcrumbs.native.js +1 -2
- package/dist/cjs/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +2 -2
- package/dist/cjs/layouts/page.native.js +2 -2
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/sidebar.cjs +2 -2
- package/dist/cjs/layouts/sidebar.native.js +2 -2
- package/dist/cjs/layouts/sidebar.native.js.map +1 -1
- package/dist/cjs/layouts/tags.cjs +6 -7
- package/dist/cjs/layouts/tags.native.js +6 -9
- package/dist/cjs/layouts/tags.native.js.map +1 -1
- package/dist/cjs/layouts/timeline.cjs +5 -5
- package/dist/cjs/layouts/timeline.native.js +5 -5
- package/dist/cjs/layouts/timeline.native.js.map +1 -1
- package/dist/cjs/surfaces.cjs +1 -0
- package/dist/cjs/surfaces.native.js +1 -0
- package/dist/cjs/surfaces.native.js.map +1 -1
- package/dist/cjs/views/Calendar.cjs +11 -8
- package/dist/cjs/views/Calendar.native.js +11 -8
- package/dist/cjs/views/Calendar.native.js.map +1 -1
- package/dist/cjs/views/Dashboard.cjs +6 -6
- package/dist/cjs/views/Dashboard.native.js +7 -7
- package/dist/cjs/views/Dashboard.native.js.map +1 -1
- package/dist/cjs/views/Gantt.cjs +3 -3
- package/dist/cjs/views/Gantt.native.js +3 -3
- package/dist/cjs/views/Gantt.native.js.map +1 -1
- package/dist/cjs/views/Kanban.cjs +2 -2
- package/dist/cjs/views/Kanban.native.js +2 -2
- package/dist/cjs/views/Kanban.native.js.map +1 -1
- package/dist/cjs/views/ReportBuilder.cjs +4 -4
- package/dist/cjs/views/ReportBuilder.native.js +4 -4
- package/dist/cjs/views/ReportBuilder.native.js.map +1 -1
- package/dist/cjs/views/TreeView.cjs +103 -6
- package/dist/cjs/views/TreeView.native.js +115 -6
- package/dist/cjs/views/TreeView.native.js.map +1 -1
- package/dist/cjs/views/treeViewReveal.cjs +55 -0
- package/dist/cjs/views/treeViewReveal.native.js +80 -0
- package/dist/cjs/views/treeViewReveal.native.js.map +1 -0
- package/dist/esm/Accordion/index.mjs +3 -3
- package/dist/esm/Accordion/index.mjs.map +1 -1
- package/dist/esm/Accordion/index.native.js +4 -4
- package/dist/esm/Accordion/index.native.js.map +1 -1
- package/dist/esm/Chip/index.mjs +1 -1
- package/dist/esm/Chip/index.mjs.map +1 -1
- package/dist/esm/Chip/index.native.js +1 -1
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/ContextMenu/index.mjs +3 -3
- package/dist/esm/ContextMenu/index.mjs.map +1 -1
- package/dist/esm/ContextMenu/index.native.js +3 -3
- package/dist/esm/ContextMenu/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.mjs +3 -3
- package/dist/esm/DropdownMenu/index.mjs.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js +3 -3
- package/dist/esm/DropdownMenu/index.native.js.map +1 -1
- package/dist/esm/Meter/index.mjs +3 -2
- package/dist/esm/Meter/index.mjs.map +1 -1
- package/dist/esm/Meter/index.native.js +3 -2
- package/dist/esm/Meter/index.native.js.map +1 -1
- package/dist/esm/Meter/meter.mjs +1 -2
- package/dist/esm/Meter/meter.mjs.map +1 -1
- package/dist/esm/Meter/meter.native.js +1 -2
- package/dist/esm/Meter/meter.native.js.map +1 -1
- package/dist/esm/Pagination.mjs +2 -2
- package/dist/esm/Pagination.mjs.map +1 -1
- package/dist/esm/Pagination.native.js +2 -2
- package/dist/esm/Pagination.native.js.map +1 -1
- package/dist/esm/ProgressSteps/index.mjs +3 -3
- package/dist/esm/ProgressSteps/index.mjs.map +1 -1
- package/dist/esm/ProgressSteps/index.native.js +3 -3
- package/dist/esm/ProgressSteps/index.native.js.map +1 -1
- package/dist/esm/Quote/index.mjs +1 -2
- package/dist/esm/Quote/index.mjs.map +1 -1
- package/dist/esm/Quote/index.native.js +1 -2
- package/dist/esm/Quote/index.native.js.map +1 -1
- package/dist/esm/Tabs/index.mjs +1 -1
- package/dist/esm/Tabs/index.mjs.map +1 -1
- package/dist/esm/Tabs/index.native.js +1 -1
- package/dist/esm/Tabs/index.native.js.map +1 -1
- package/dist/esm/Toast/index.mjs +4 -5
- package/dist/esm/Toast/index.mjs.map +1 -1
- package/dist/esm/Toast/index.native.js +4 -5
- package/dist/esm/Toast/index.native.js.map +1 -1
- package/dist/esm/TreeSelect/index.mjs +46 -7
- package/dist/esm/TreeSelect/index.mjs.map +1 -1
- package/dist/esm/TreeSelect/index.native.js +58 -7
- package/dist/esm/TreeSelect/index.native.js.map +1 -1
- package/dist/esm/charts/PieChart.mjs +1 -2
- package/dist/esm/charts/PieChart.mjs.map +1 -1
- package/dist/esm/charts/PieChart.native.js +1 -2
- package/dist/esm/charts/PieChart.native.js.map +1 -1
- package/dist/esm/code/HighlightedCode/index.mjs +1 -1
- package/dist/esm/code/HighlightedCode/index.mjs.map +1 -1
- package/dist/esm/code/HighlightedCode/index.native.js +1 -1
- package/dist/esm/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/esm/componentColors.mjs +6 -4
- package/dist/esm/componentColors.mjs.map +1 -1
- package/dist/esm/componentColors.native.js +6 -4
- package/dist/esm/componentColors.native.js.map +1 -1
- package/dist/esm/images/Image/ImageFrame.mjs +4 -2
- package/dist/esm/images/Image/ImageFrame.mjs.map +1 -1
- package/dist/esm/images/Image/ImageFrame.native.js +4 -2
- package/dist/esm/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.mjs +1 -2
- package/dist/esm/layouts/AsyncBoundary.mjs.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.native.js +1 -2
- package/dist/esm/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/esm/layouts/EmptyState.mjs +7 -3
- package/dist/esm/layouts/EmptyState.mjs.map +1 -1
- package/dist/esm/layouts/EmptyState.native.js +11 -7
- package/dist/esm/layouts/EmptyState.native.js.map +1 -1
- package/dist/esm/layouts/attachments.mjs +4 -4
- package/dist/esm/layouts/attachments.mjs.map +1 -1
- package/dist/esm/layouts/attachments.native.js +4 -4
- package/dist/esm/layouts/attachments.native.js.map +1 -1
- package/dist/esm/layouts/breadcrumbs.mjs +1 -2
- package/dist/esm/layouts/breadcrumbs.mjs.map +1 -1
- package/dist/esm/layouts/breadcrumbs.native.js +1 -2
- package/dist/esm/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +2 -2
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +2 -2
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/sidebar.mjs +2 -2
- package/dist/esm/layouts/sidebar.mjs.map +1 -1
- package/dist/esm/layouts/sidebar.native.js +2 -2
- package/dist/esm/layouts/sidebar.native.js.map +1 -1
- package/dist/esm/layouts/tags.mjs +6 -7
- package/dist/esm/layouts/tags.mjs.map +1 -1
- package/dist/esm/layouts/tags.native.js +6 -9
- package/dist/esm/layouts/tags.native.js.map +1 -1
- package/dist/esm/layouts/timeline.mjs +5 -5
- package/dist/esm/layouts/timeline.mjs.map +1 -1
- package/dist/esm/layouts/timeline.native.js +5 -5
- package/dist/esm/layouts/timeline.native.js.map +1 -1
- package/dist/esm/surfaces.mjs +1 -0
- package/dist/esm/surfaces.mjs.map +1 -1
- package/dist/esm/surfaces.native.js +1 -0
- package/dist/esm/surfaces.native.js.map +1 -1
- package/dist/esm/views/Calendar.mjs +11 -8
- package/dist/esm/views/Calendar.mjs.map +1 -1
- package/dist/esm/views/Calendar.native.js +11 -8
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/Dashboard.mjs +6 -6
- package/dist/esm/views/Dashboard.mjs.map +1 -1
- package/dist/esm/views/Dashboard.native.js +7 -7
- package/dist/esm/views/Dashboard.native.js.map +1 -1
- package/dist/esm/views/Gantt.mjs +3 -3
- package/dist/esm/views/Gantt.mjs.map +1 -1
- package/dist/esm/views/Gantt.native.js +3 -3
- package/dist/esm/views/Gantt.native.js.map +1 -1
- package/dist/esm/views/Kanban.mjs +2 -2
- package/dist/esm/views/Kanban.mjs.map +1 -1
- package/dist/esm/views/Kanban.native.js +2 -2
- package/dist/esm/views/Kanban.native.js.map +1 -1
- package/dist/esm/views/ReportBuilder.mjs +4 -4
- package/dist/esm/views/ReportBuilder.mjs.map +1 -1
- package/dist/esm/views/ReportBuilder.native.js +4 -4
- package/dist/esm/views/ReportBuilder.native.js.map +1 -1
- package/dist/esm/views/TreeView.mjs +104 -7
- package/dist/esm/views/TreeView.mjs.map +1 -1
- package/dist/esm/views/TreeView.native.js +116 -7
- package/dist/esm/views/TreeView.native.js.map +1 -1
- package/dist/esm/views/treeViewReveal.mjs +29 -0
- package/dist/esm/views/treeViewReveal.mjs.map +1 -0
- package/dist/esm/views/treeViewReveal.native.js +51 -0
- package/dist/esm/views/treeViewReveal.native.js.map +1 -0
- package/dist/jsx/Accordion/index.mjs +3 -3
- package/dist/jsx/Accordion/index.mjs.map +1 -1
- package/dist/jsx/Accordion/index.native.js +4 -4
- package/dist/jsx/Accordion/index.native.js.map +1 -1
- package/dist/jsx/Chip/index.mjs +1 -1
- package/dist/jsx/Chip/index.mjs.map +1 -1
- package/dist/jsx/Chip/index.native.js +1 -1
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/ContextMenu/index.mjs +3 -3
- package/dist/jsx/ContextMenu/index.mjs.map +1 -1
- package/dist/jsx/ContextMenu/index.native.js +3 -3
- package/dist/jsx/ContextMenu/index.native.js.map +1 -1
- package/dist/jsx/DropdownMenu/index.mjs +3 -3
- package/dist/jsx/DropdownMenu/index.mjs.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js +3 -3
- package/dist/jsx/DropdownMenu/index.native.js.map +1 -1
- package/dist/jsx/Meter/index.mjs +3 -2
- package/dist/jsx/Meter/index.mjs.map +1 -1
- package/dist/jsx/Meter/index.native.js +3 -2
- package/dist/jsx/Meter/index.native.js.map +1 -1
- package/dist/jsx/Meter/meter.mjs +1 -2
- package/dist/jsx/Meter/meter.mjs.map +1 -1
- package/dist/jsx/Meter/meter.native.js +1 -2
- package/dist/jsx/Meter/meter.native.js.map +1 -1
- package/dist/jsx/Pagination.mjs +2 -2
- package/dist/jsx/Pagination.mjs.map +1 -1
- package/dist/jsx/Pagination.native.js +2 -2
- package/dist/jsx/Pagination.native.js.map +1 -1
- package/dist/jsx/ProgressSteps/index.mjs +3 -3
- package/dist/jsx/ProgressSteps/index.mjs.map +1 -1
- package/dist/jsx/ProgressSteps/index.native.js +3 -3
- package/dist/jsx/ProgressSteps/index.native.js.map +1 -1
- package/dist/jsx/Quote/index.mjs +1 -2
- package/dist/jsx/Quote/index.mjs.map +1 -1
- package/dist/jsx/Quote/index.native.js +1 -2
- package/dist/jsx/Quote/index.native.js.map +1 -1
- package/dist/jsx/Tabs/index.mjs +1 -1
- package/dist/jsx/Tabs/index.mjs.map +1 -1
- package/dist/jsx/Tabs/index.native.js +1 -1
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/Toast/index.mjs +4 -5
- package/dist/jsx/Toast/index.mjs.map +1 -1
- package/dist/jsx/Toast/index.native.js +4 -5
- package/dist/jsx/Toast/index.native.js.map +1 -1
- package/dist/jsx/TreeSelect/index.mjs +46 -7
- package/dist/jsx/TreeSelect/index.mjs.map +1 -1
- package/dist/jsx/TreeSelect/index.native.js +58 -7
- package/dist/jsx/TreeSelect/index.native.js.map +1 -1
- package/dist/jsx/charts/PieChart.mjs +1 -2
- package/dist/jsx/charts/PieChart.mjs.map +1 -1
- package/dist/jsx/charts/PieChart.native.js +1 -2
- package/dist/jsx/charts/PieChart.native.js.map +1 -1
- package/dist/jsx/code/HighlightedCode/index.mjs +1 -1
- package/dist/jsx/code/HighlightedCode/index.mjs.map +1 -1
- package/dist/jsx/code/HighlightedCode/index.native.js +1 -1
- package/dist/jsx/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/jsx/componentColors.mjs +6 -4
- package/dist/jsx/componentColors.mjs.map +1 -1
- package/dist/jsx/componentColors.native.js +6 -4
- package/dist/jsx/componentColors.native.js.map +1 -1
- package/dist/jsx/images/Image/ImageFrame.mjs +4 -2
- package/dist/jsx/images/Image/ImageFrame.mjs.map +1 -1
- package/dist/jsx/images/Image/ImageFrame.native.js +4 -2
- package/dist/jsx/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/jsx/layouts/AsyncBoundary.mjs +1 -2
- package/dist/jsx/layouts/AsyncBoundary.mjs.map +1 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js +1 -2
- package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/jsx/layouts/EmptyState.mjs +7 -3
- package/dist/jsx/layouts/EmptyState.mjs.map +1 -1
- package/dist/jsx/layouts/EmptyState.native.js +10 -6
- package/dist/jsx/layouts/EmptyState.native.js.map +1 -1
- package/dist/jsx/layouts/attachments.mjs +4 -4
- package/dist/jsx/layouts/attachments.mjs.map +1 -1
- package/dist/jsx/layouts/attachments.native.js +4 -4
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.mjs +1 -2
- package/dist/jsx/layouts/breadcrumbs.mjs.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.native.js +1 -2
- package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +2 -2
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +2 -2
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/sidebar.mjs +2 -2
- package/dist/jsx/layouts/sidebar.mjs.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js +2 -2
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/dist/jsx/layouts/tags.mjs +6 -7
- package/dist/jsx/layouts/tags.mjs.map +1 -1
- package/dist/jsx/layouts/tags.native.js +6 -9
- package/dist/jsx/layouts/tags.native.js.map +1 -1
- package/dist/jsx/layouts/timeline.mjs +5 -5
- package/dist/jsx/layouts/timeline.mjs.map +1 -1
- package/dist/jsx/layouts/timeline.native.js +5 -5
- package/dist/jsx/layouts/timeline.native.js.map +1 -1
- package/dist/jsx/surfaces.mjs +1 -0
- package/dist/jsx/surfaces.mjs.map +1 -1
- package/dist/jsx/surfaces.native.js +1 -0
- package/dist/jsx/surfaces.native.js.map +1 -1
- package/dist/jsx/views/Calendar.mjs +11 -8
- package/dist/jsx/views/Calendar.mjs.map +1 -1
- package/dist/jsx/views/Calendar.native.js +11 -8
- package/dist/jsx/views/Calendar.native.js.map +1 -1
- package/dist/jsx/views/Dashboard.mjs +6 -6
- package/dist/jsx/views/Dashboard.mjs.map +1 -1
- package/dist/jsx/views/Dashboard.native.js +7 -7
- package/dist/jsx/views/Dashboard.native.js.map +1 -1
- package/dist/jsx/views/Gantt.mjs +3 -3
- package/dist/jsx/views/Gantt.mjs.map +1 -1
- package/dist/jsx/views/Gantt.native.js +3 -3
- package/dist/jsx/views/Gantt.native.js.map +1 -1
- package/dist/jsx/views/Kanban.mjs +2 -2
- package/dist/jsx/views/Kanban.mjs.map +1 -1
- package/dist/jsx/views/Kanban.native.js +2 -2
- package/dist/jsx/views/Kanban.native.js.map +1 -1
- package/dist/jsx/views/ReportBuilder.mjs +4 -4
- package/dist/jsx/views/ReportBuilder.mjs.map +1 -1
- package/dist/jsx/views/ReportBuilder.native.js +4 -4
- package/dist/jsx/views/ReportBuilder.native.js.map +1 -1
- package/dist/jsx/views/TreeView.mjs +104 -7
- package/dist/jsx/views/TreeView.mjs.map +1 -1
- package/dist/jsx/views/TreeView.native.js +115 -6
- package/dist/jsx/views/TreeView.native.js.map +1 -1
- package/dist/jsx/views/treeViewReveal.mjs +29 -0
- package/dist/jsx/views/treeViewReveal.mjs.map +1 -0
- package/dist/jsx/views/treeViewReveal.native.js +80 -0
- package/dist/jsx/views/treeViewReveal.native.js.map +1 -0
- package/package.json +9 -9
- package/src/Accordion/index.tsx +4 -6
- package/src/Chip/index.tsx +1 -1
- package/src/ContextMenu/index.tsx +3 -3
- package/src/DropdownMenu/index.tsx +3 -3
- package/src/Meter/Meter.spec.tsx +12 -4
- package/src/Meter/index.tsx +3 -2
- package/src/Meter/meter.ts +6 -1
- package/src/Pagination.tsx +2 -2
- package/src/ProgressSteps/index.tsx +3 -3
- package/src/Quote/index.tsx +1 -3
- package/src/Tabs/index.tsx +2 -2
- package/src/Toast/Toast.spec.tsx +120 -48
- package/src/Toast/index.tsx +5 -3
- package/src/TreeSelect/index.tsx +61 -1
- package/src/charts/PieChart.tsx +1 -2
- package/src/code/HighlightedCode/index.tsx +1 -1
- package/src/componentColors.ts +6 -4
- package/src/images/Image/ImageFrame.tsx +2 -2
- package/src/layouts/AsyncBoundary.tsx +1 -2
- package/src/layouts/EmptyState.spec.tsx +58 -1
- package/src/layouts/EmptyState.tsx +11 -7
- package/src/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.tsx +3 -3
- package/src/layouts/PaneScaffold.stories.tsx +3 -8
- package/src/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.tsx +3 -3
- package/src/layouts/attachments.tsx +4 -4
- package/src/layouts/breadcrumbs.tsx +1 -2
- package/src/layouts/page.tsx +2 -2
- package/src/layouts/sidebar.tsx +2 -2
- package/src/layouts/tags-trigger.spec.tsx +32 -0
- package/src/layouts/tags.tsx +6 -9
- package/src/layouts/timeline.tsx +5 -5
- package/src/surfaces.spec.tsx +97 -3
- package/src/surfaces.tsx +4 -2
- package/src/textAccentSecondary.spec.tsx +187 -0
- package/src/views/Calendar.tsx +9 -8
- package/src/views/Dashboard.tsx +13 -8
- package/src/views/Gantt.tsx +3 -3
- package/src/views/Kanban.native.tsx +2 -2
- package/src/views/Kanban.tsx +2 -2
- package/src/views/ReportBuilder.tsx +4 -4
- package/src/views/TreeView.reveal.spec.tsx +167 -0
- package/src/views/TreeView.reveal.stories.tsx +115 -0
- package/src/views/TreeView.scroll.spec.tsx +196 -0
- package/src/views/TreeView.spec.tsx +1 -1
- package/src/views/TreeView.tsx +159 -16
- package/src/views/treeViewReveal.spec.ts +83 -0
- package/src/views/treeViewReveal.ts +45 -0
- package/src/views/views.spec.tsx +13 -12
- package/types/Accordion/index.d.ts.map +1 -1
- package/types/Meter/index.d.ts.map +1 -1
- package/types/Meter/meter.d.ts +5 -1
- package/types/Meter/meter.d.ts.map +1 -1
- package/types/Quote/index.d.ts.map +1 -1
- package/types/Tabs/index.d.ts.map +1 -1
- package/types/Toast/index.d.ts.map +1 -1
- package/types/TreeSelect/index.d.ts +9 -1
- package/types/TreeSelect/index.d.ts.map +1 -1
- package/types/charts/PieChart.d.ts.map +1 -1
- package/types/componentColors.d.ts +1 -4
- package/types/componentColors.d.ts.map +1 -1
- package/types/images/Image/ImageFrame.d.ts.map +1 -1
- package/types/layouts/AsyncBoundary.d.ts.map +1 -1
- package/types/layouts/EmptyState.d.ts.map +1 -1
- package/types/layouts/breadcrumbs.d.ts.map +1 -1
- package/types/layouts/tags.d.ts.map +1 -1
- package/types/surfaces.d.ts.map +1 -1
- package/types/views/Calendar.d.ts.map +1 -1
- package/types/views/Dashboard.d.ts +7 -3
- package/types/views/Dashboard.d.ts.map +1 -1
- package/types/views/TreeView.d.ts +10 -1
- package/types/views/TreeView.d.ts.map +1 -1
- package/types/views/treeViewReveal.d.ts +11 -0
- package/types/views/treeViewReveal.d.ts.map +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
import { Paragraph, YStack } from "tamagui";
|
|
3
|
-
import {
|
|
3
|
+
import { Text } from "../../Text";
|
|
4
4
|
import { SafeAreaWrapper } from "./index";
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof SafeAreaWrapper> = {
|
|
@@ -26,10 +26,10 @@ export const Default: Story = {
|
|
|
26
26
|
<SafeAreaWrapper>
|
|
27
27
|
<YStack>
|
|
28
28
|
<Paragraph>Content inside SafeAreaWrapper</Paragraph>
|
|
29
|
-
<
|
|
29
|
+
<Text>
|
|
30
30
|
On native, this respects device safe area insets. On web, it is a simple passthrough
|
|
31
31
|
wrapper.
|
|
32
|
-
</
|
|
32
|
+
</Text>
|
|
33
33
|
</YStack>
|
|
34
34
|
</SafeAreaWrapper>
|
|
35
35
|
),
|
|
@@ -454,7 +454,7 @@ function AttachmentRow({
|
|
|
454
454
|
{attachment.fileName}
|
|
455
455
|
</Text>
|
|
456
456
|
<XStack gap="$2" alignItems="center">
|
|
457
|
-
<Text fontSize="$2" color={
|
|
457
|
+
<Text fontSize="$2" color={knobProps.textAccentColor}>
|
|
458
458
|
{attachment.formattedSize || formatFileSize(attachment.fileSize)}
|
|
459
459
|
</Text>
|
|
460
460
|
{ext ? (
|
|
@@ -627,7 +627,7 @@ export function Attachments({
|
|
|
627
627
|
{...dropHandlers}
|
|
628
628
|
>
|
|
629
629
|
<PaperclipIcon size={compact ? 20 : 28} />
|
|
630
|
-
<Text color={
|
|
630
|
+
<Text color={knobProps.textAccentColor} fontSize={compact ? "$2" : "$3"} marginTop="$2">
|
|
631
631
|
{noAttachmentsLabel}
|
|
632
632
|
</Text>
|
|
633
633
|
</YStack>
|
|
@@ -657,7 +657,7 @@ export function Attachments({
|
|
|
657
657
|
{label}
|
|
658
658
|
{/* Count hides on error so the badge can't lie (DG-ST-04) */}
|
|
659
659
|
{maxAttachments > 0 && !hasError && (
|
|
660
|
-
<Text color={
|
|
660
|
+
<Text color={knobProps.textAccentColor} fontSize="$2">
|
|
661
661
|
{" "}
|
|
662
662
|
({items.length}/{maxAttachments})
|
|
663
663
|
</Text>
|
|
@@ -766,7 +766,7 @@ export function Attachments({
|
|
|
766
766
|
) : previewFile ? (
|
|
767
767
|
<YStack alignItems="center" {...knobProps.gap} paddingVertical="$4">
|
|
768
768
|
{getFileIcon(previewFile, 40)}
|
|
769
|
-
<Text color={
|
|
769
|
+
<Text color={knobProps.textAccentColor} textAlign="center">
|
|
770
770
|
{previewUnavailableLabel}
|
|
771
771
|
</Text>
|
|
772
772
|
</YStack>
|
|
@@ -23,7 +23,6 @@ import {
|
|
|
23
23
|
import React, { useMemo, useState } from "react";
|
|
24
24
|
import { useTranslation } from "react-i18next";
|
|
25
25
|
import { Anchor, Text, XStack, isWeb } from "tamagui";
|
|
26
|
-
import { componentColors } from "../componentColors";
|
|
27
26
|
import { withInterp } from "../shared/t";
|
|
28
27
|
|
|
29
28
|
/** Approx medium body line box before press-target padding (DG-LAY-04). */
|
|
@@ -240,7 +239,7 @@ export function Breadcrumbs({ items, onNavigate, label, maxVisible }: Breadcrumb
|
|
|
240
239
|
) : (
|
|
241
240
|
<Text
|
|
242
241
|
{...knobProps.body}
|
|
243
|
-
color={
|
|
242
|
+
color={knobProps.textAccentColor}
|
|
244
243
|
fontSize={textSize}
|
|
245
244
|
fontWeight="400"
|
|
246
245
|
{...(slot.isCurrent ? { "aria-current": "page" as const } : null)}
|
package/src/layouts/page.tsx
CHANGED
|
@@ -298,7 +298,7 @@ export function PageHeader({
|
|
|
298
298
|
{titleNode}
|
|
299
299
|
{subtitle ? (
|
|
300
300
|
// T-HELPER on the shared body fragment — not a local size map.
|
|
301
|
-
<Paragraph margin={0} {...knobProps.body} color={
|
|
301
|
+
<Paragraph margin={0} {...knobProps.body} color={knobProps.textAccentColor}>
|
|
302
302
|
{subtitle}
|
|
303
303
|
</Paragraph>
|
|
304
304
|
) : null}
|
|
@@ -404,7 +404,7 @@ export function PageSection({
|
|
|
404
404
|
<YStack gap="$2">
|
|
405
405
|
{headingNode}
|
|
406
406
|
{description ? (
|
|
407
|
-
<Paragraph margin={0} {...knobProps.body} color={
|
|
407
|
+
<Paragraph margin={0} {...knobProps.body} color={knobProps.textAccentColor}>
|
|
408
408
|
{description}
|
|
409
409
|
</Paragraph>
|
|
410
410
|
) : null}
|
package/src/layouts/sidebar.tsx
CHANGED
|
@@ -103,7 +103,7 @@ export function Sidebar({
|
|
|
103
103
|
fontSize="$2"
|
|
104
104
|
fontWeight="400"
|
|
105
105
|
textTransform="uppercase"
|
|
106
|
-
color={
|
|
106
|
+
color={knobProps.textAccentColor}
|
|
107
107
|
// Align with row text (LC-02): the inset rides as MARGIN so
|
|
108
108
|
// the caption's box starts at the shared row text edge —
|
|
109
109
|
// padding-based insets left the box at the panel edge, which
|
|
@@ -125,7 +125,7 @@ export function Sidebar({
|
|
|
125
125
|
const corners = stackRadiusProps(position, knobProps.borderRadius.borderRadius);
|
|
126
126
|
const itemKey = `${sectionIdx}:${String(item.value ?? item.label)}`;
|
|
127
127
|
const ink = item.active && onAccent ? onAccent : componentColors.text.primary;
|
|
128
|
-
const metaInk = item.active && onAccent ? onAccent :
|
|
128
|
+
const metaInk = item.active && onAccent ? onAccent : knobProps.textAccentColor;
|
|
129
129
|
const kbFocused = kbFocusKey === itemKey;
|
|
130
130
|
const pressable = Boolean(item.onPress);
|
|
131
131
|
const kbRing = kbFocused
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
// asserts on the atomic classes (same approach as timeline-radius.spec.tsx).
|
|
11
11
|
import { cleanup, fireEvent, screen, waitFor } from "@testing-library/react";
|
|
12
12
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
13
|
+
import { Preset } from "@multiplatform.one/theme";
|
|
13
14
|
import * as React from "react";
|
|
14
15
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
15
16
|
import { Tags } from "./tags";
|
|
@@ -72,6 +73,37 @@ describe("Tags Add Tag trigger (chip-scale)", () => {
|
|
|
72
73
|
expect(classesByPrefix(pill, borderPrefixes).length).toBeGreaterThan(0);
|
|
73
74
|
});
|
|
74
75
|
|
|
76
|
+
/**
|
|
77
|
+
* DG-BOR-01 (MPO-106 D3): the RESOLVER owns the outlined hairline floor —
|
|
78
|
+
* `outlined` + `none` draws the enumerated `small` stop, 0.5 — and a
|
|
79
|
+
* component adds no second `Math.max(..., 1)` on top. A local floor made
|
|
80
|
+
* `small` measure the same as `medium` here and nowhere else, so the Tags
|
|
81
|
+
* row was the one outlined control the borderWidth knob could not thin.
|
|
82
|
+
*/
|
|
83
|
+
it.each([
|
|
84
|
+
["none", "0--5px"],
|
|
85
|
+
["small", "0--5px"],
|
|
86
|
+
["medium", "1px"],
|
|
87
|
+
["large", "2px"],
|
|
88
|
+
] as const)(
|
|
89
|
+
"outlined borderWidth %s resolves to %s, floored only by the resolver",
|
|
90
|
+
(borderWidth, px) => {
|
|
91
|
+
renderWithProviders(
|
|
92
|
+
<Preset overrides={{ borderWidth, fillStyle: "outlined" }}>
|
|
93
|
+
<Tags tags={tags} onAdd={vi.fn()} onRemove={vi.fn()} />
|
|
94
|
+
</Preset>,
|
|
95
|
+
);
|
|
96
|
+
const pill = triggerPillOf(screen.getByLabelText("Add Tag"));
|
|
97
|
+
const chip = chipFrameOf(screen.getByText("urgent"));
|
|
98
|
+
const edges = ["_btw-", "_bbw-", "_blw-", "_brw-"];
|
|
99
|
+
const expected = edges.map((edge) => `${edge}${px}`).sort();
|
|
100
|
+
expect(classesByPrefix(pill, edges)).toEqual(expected);
|
|
101
|
+
// The trigger and the chips it sits beside share one box at every stop;
|
|
102
|
+
// a floor on only one of them is what pulled their heights apart.
|
|
103
|
+
expect(classesByPrefix(chip, edges)).toEqual(expected);
|
|
104
|
+
},
|
|
105
|
+
);
|
|
106
|
+
|
|
75
107
|
it("trigger wrapper carries the D-02 44px press-floor (minHeight class)", () => {
|
|
76
108
|
renderTags();
|
|
77
109
|
const trigger = screen.getByLabelText("Add Tag");
|
package/src/layouts/tags.tsx
CHANGED
|
@@ -331,7 +331,7 @@ export function Tags({
|
|
|
331
331
|
) : (
|
|
332
332
|
<XStack alignItems="center" gap="$2" opacity={0.5}>
|
|
333
333
|
<TagIcon size={compact ? 14 : 16} />
|
|
334
|
-
<Text color={
|
|
334
|
+
<Text color={knobProps.textAccentColor} fontSize={compact ? "$1" : "$2"} {...knobProps.body}>
|
|
335
335
|
{noTagsLabel}
|
|
336
336
|
</Text>
|
|
337
337
|
</XStack>
|
|
@@ -473,7 +473,7 @@ export function Tags({
|
|
|
473
473
|
{suggestionOptions.length > 0 && (
|
|
474
474
|
<Text
|
|
475
475
|
fontSize="$1"
|
|
476
|
-
color={
|
|
476
|
+
color={knobProps.textAccentColor}
|
|
477
477
|
paddingHorizontal="$3"
|
|
478
478
|
paddingVertical="$1.5"
|
|
479
479
|
>
|
|
@@ -484,7 +484,7 @@ export function Tags({
|
|
|
484
484
|
{showEmptyMessage && (
|
|
485
485
|
<Text
|
|
486
486
|
fontSize="$2"
|
|
487
|
-
color={
|
|
487
|
+
color={knobProps.textAccentColor}
|
|
488
488
|
textAlign="center"
|
|
489
489
|
padding="$3"
|
|
490
490
|
{...knobProps.body}
|
|
@@ -580,9 +580,6 @@ export function Tags({
|
|
|
580
580
|
variant="outline"
|
|
581
581
|
backgroundColor="transparent"
|
|
582
582
|
{...knobProps.borderRadius}
|
|
583
|
-
// Same border width the Chip paints for every tone, so the
|
|
584
|
-
// trigger's box matches the tag chips it sits beside.
|
|
585
|
-
borderWidth={Math.max(knobProps.borderRadius.borderWidth, 1)}
|
|
586
583
|
borderColor={componentColors.interactive.border}
|
|
587
584
|
gap={compact ? 0 : "$1"}
|
|
588
585
|
hoverStyle={{ backgroundColor: componentColors.interactive.hover }}
|
|
@@ -590,7 +587,7 @@ export function Tags({
|
|
|
590
587
|
{...(addKbFocus ? ensureFocusVisibleRing() : { outlineWidth: 0 })}
|
|
591
588
|
>
|
|
592
589
|
<PlusIcon size={chipIconSize(chipSize)} />
|
|
593
|
-
<ChipText size={chipSize} color={
|
|
590
|
+
<ChipText size={chipSize} color={knobProps.textAccentColor}>
|
|
594
591
|
{compact ? "\u200B" : addTagLabel}
|
|
595
592
|
</ChipText>
|
|
596
593
|
</ChipFrame>
|
|
@@ -625,7 +622,7 @@ export function Tags({
|
|
|
625
622
|
// sat off the chips' optical line.
|
|
626
623
|
fontSize={chipTextSize(chipSize)}
|
|
627
624
|
color={componentColors.text.primary}
|
|
628
|
-
placeholderTextColor={
|
|
625
|
+
placeholderTextColor={knobProps.textAccentColor as any}
|
|
629
626
|
autoComplete="off"
|
|
630
627
|
role="combobox"
|
|
631
628
|
aria-autocomplete="list"
|
|
@@ -644,7 +641,7 @@ export function Tags({
|
|
|
644
641
|
<Label {...knobProps.label} fontWeight="400">
|
|
645
642
|
{label}
|
|
646
643
|
{maxTags > 0 && (
|
|
647
|
-
<Text color={
|
|
644
|
+
<Text color={knobProps.textAccentColor} fontSize="$2">
|
|
648
645
|
{" "}
|
|
649
646
|
({tags.length}/{maxTags})
|
|
650
647
|
</Text>
|
package/src/layouts/timeline.tsx
CHANGED
|
@@ -578,7 +578,7 @@ export function Timeline({
|
|
|
578
578
|
opacity={0.5}
|
|
579
579
|
>
|
|
580
580
|
<ClockIcon size={emptyIconSize} />
|
|
581
|
-
<Text color={
|
|
581
|
+
<Text color={knobProps.textAccentColor} fontSize={compact ? "$2" : sz} marginTop="$2">
|
|
582
582
|
{noActivityLabel}
|
|
583
583
|
</Text>
|
|
584
584
|
</YStack>
|
|
@@ -626,7 +626,7 @@ export function Timeline({
|
|
|
626
626
|
<YStack gap="$1" marginTop="$1">
|
|
627
627
|
{changes.slice(0, 5).map((change) => (
|
|
628
628
|
<XStack key={change.field} gap="$2" flexWrap="wrap">
|
|
629
|
-
<Text fontSize="$1" color={
|
|
629
|
+
<Text fontSize="$1" color={knobProps.textAccentColor} fontWeight="400">
|
|
630
630
|
{change.fieldLabel || change.field}:
|
|
631
631
|
</Text>
|
|
632
632
|
{change.old !== undefined && (
|
|
@@ -639,7 +639,7 @@ export function Timeline({
|
|
|
639
639
|
</Text>
|
|
640
640
|
)}
|
|
641
641
|
{change.old !== undefined && change.new !== undefined && (
|
|
642
|
-
<Text fontSize="$1" color={
|
|
642
|
+
<Text fontSize="$1" color={knobProps.textAccentColor}>
|
|
643
643
|
{"→"}
|
|
644
644
|
</Text>
|
|
645
645
|
)}
|
|
@@ -651,7 +651,7 @@ export function Timeline({
|
|
|
651
651
|
</XStack>
|
|
652
652
|
))}
|
|
653
653
|
{changes.length > 5 && (
|
|
654
|
-
<Text fontSize="$1" color={
|
|
654
|
+
<Text fontSize="$1" color={knobProps.textAccentColor} fontStyle="italic">
|
|
655
655
|
+{changes.length - 5} more changes
|
|
656
656
|
</Text>
|
|
657
657
|
)}
|
|
@@ -996,7 +996,7 @@ export function Timeline({
|
|
|
996
996
|
{/* Entry count hides on error so the badge can't lie (DG-ST-04).
|
|
997
997
|
Bidi-isolated so RTL contexts keep "7 entries" in one run. */}
|
|
998
998
|
{entries.length > 0 && !hasError && (
|
|
999
|
-
<Text fontSize="$2" color={
|
|
999
|
+
<Text fontSize="$2" color={knobProps.textAccentColor}>
|
|
1000
1000
|
{bidiIsolate(`${entries.length} ${entries.length === 1 ? entryLabel : entriesLabel}`)}
|
|
1001
1001
|
</Text>
|
|
1002
1002
|
)}
|
package/src/surfaces.spec.tsx
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
2
|
-
import { Preset } from "@multiplatform.one/theme";
|
|
3
|
-
import {
|
|
2
|
+
import { Preset, type Knobs } from "@multiplatform.one/theme";
|
|
3
|
+
import { defaultConfig } from "@tamagui/config/v5";
|
|
4
|
+
import { cleanup, render } from "@testing-library/react";
|
|
4
5
|
import { readFileSync } from "node:fs";
|
|
5
6
|
import { dirname, join } from "node:path";
|
|
6
7
|
import { fileURLToPath } from "node:url";
|
|
7
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
AlertDialog,
|
|
10
|
+
Card as TamaguiCard,
|
|
11
|
+
createTamagui,
|
|
12
|
+
Dialog,
|
|
13
|
+
Popover,
|
|
14
|
+
Sheet,
|
|
15
|
+
TamaguiProvider,
|
|
16
|
+
} from "tamagui";
|
|
8
17
|
import { afterEach, describe, expect, it } from "vitest";
|
|
9
18
|
import { Button } from "./Button";
|
|
10
19
|
import * as pkg from "./index";
|
|
@@ -183,3 +192,88 @@ describe("DialogContent paints the OVERLAY elevation stop, not the control one (
|
|
|
183
192
|
);
|
|
184
193
|
});
|
|
185
194
|
});
|
|
195
|
+
|
|
196
|
+
// ── Overlay child-clip cap (MPO-150) ─────────────────────────────────────
|
|
197
|
+
//
|
|
198
|
+
// Axiom 1 CLIP files "children positioned toward the corners (Card, Panel,
|
|
199
|
+
// Dialog)" under R-SCALE + clip cap: radius rides the scale, capped by the
|
|
200
|
+
// container's own padding. R-SCALE is the immunity axis, CONTAINER-CAP the
|
|
201
|
+
// resolution axis (Part 2 § Radius) — the Part 3 row naming only R-SCALE is
|
|
202
|
+
// not a second ruling. `elevatedSurface` carries the UNCAPPED scale token,
|
|
203
|
+
// so each padded overlay must spread `containerRadius` AFTER it; four did
|
|
204
|
+
// and PopoverContent did not, rendering a 50px corner on an 18px inset.
|
|
205
|
+
|
|
206
|
+
const overlayCapConfig = createTamagui(defaultConfig);
|
|
207
|
+
|
|
208
|
+
const overlayCapCorners = [
|
|
209
|
+
"borderTopLeftRadius",
|
|
210
|
+
"borderTopRightRadius",
|
|
211
|
+
"borderBottomRightRadius",
|
|
212
|
+
"borderBottomLeftRadius",
|
|
213
|
+
] as const;
|
|
214
|
+
|
|
215
|
+
describe("overlay containers take the Axiom 1 child-clip cap (MPO-150)", () => {
|
|
216
|
+
afterEach(cleanup);
|
|
217
|
+
|
|
218
|
+
it("PopoverContent spreads containerRadius after elevatedSurface, as its four siblings do", () => {
|
|
219
|
+
const src = readFileSync(join(dirname(fileURLToPath(import.meta.url)), "surfaces.tsx"), "utf8");
|
|
220
|
+
const popover = src.slice(src.indexOf("// ── PopoverContent"), src.indexOf("// ── SheetFrame"));
|
|
221
|
+
const elevated = popover.indexOf("knobProps.elevatedSurface");
|
|
222
|
+
const capped = popover.indexOf("knobProps.containerRadius");
|
|
223
|
+
expect(elevated, "PopoverContent binds elevatedSurface").toBeGreaterThan(-1);
|
|
224
|
+
expect(capped, "PopoverContent binds containerRadius").toBeGreaterThan(-1);
|
|
225
|
+
expect(capped, "the cap must spread AFTER the uncapped scale token").toBeGreaterThan(elevated);
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
for (const [borderRadius, stop] of Object.entries({ medium: 9, large: 16, full: 50 })) {
|
|
229
|
+
for (const [space, inset] of Object.entries({ small: 13, medium: 18, large: 32 })) {
|
|
230
|
+
const capped = Math.min(stop, inset);
|
|
231
|
+
it(`caps every overlay frame at ${capped}px for borderRadius=${borderRadius}/space=${space}`, () => {
|
|
232
|
+
render(
|
|
233
|
+
<TamaguiProvider config={overlayCapConfig} defaultTheme="light">
|
|
234
|
+
<Preset
|
|
235
|
+
overrides={{
|
|
236
|
+
borderRadius: borderRadius as Knobs["borderRadius"],
|
|
237
|
+
space: space as Knobs["space"],
|
|
238
|
+
density: "comfortable",
|
|
239
|
+
}}
|
|
240
|
+
>
|
|
241
|
+
<Dialog modal open>
|
|
242
|
+
<Dialog.Portal>
|
|
243
|
+
<DialogContent testID="cap-dialog">dialog</DialogContent>
|
|
244
|
+
</Dialog.Portal>
|
|
245
|
+
</Dialog>
|
|
246
|
+
<AlertDialog modal open>
|
|
247
|
+
<AlertDialog.Portal>
|
|
248
|
+
<AlertDialogContent testID="cap-alertdialog">alert</AlertDialogContent>
|
|
249
|
+
</AlertDialog.Portal>
|
|
250
|
+
</AlertDialog>
|
|
251
|
+
<Popover open>
|
|
252
|
+
<PopoverContent testID="cap-popover">popover</PopoverContent>
|
|
253
|
+
</Popover>
|
|
254
|
+
<Sheet open>
|
|
255
|
+
<SheetFrame testID="cap-sheet">sheet</SheetFrame>
|
|
256
|
+
</Sheet>
|
|
257
|
+
<Panel testID="cap-panel">panel</Panel>
|
|
258
|
+
</Preset>
|
|
259
|
+
</TamaguiProvider>,
|
|
260
|
+
);
|
|
261
|
+
|
|
262
|
+
for (const id of [
|
|
263
|
+
"cap-dialog",
|
|
264
|
+
"cap-alertdialog",
|
|
265
|
+
"cap-popover",
|
|
266
|
+
"cap-sheet",
|
|
267
|
+
"cap-panel",
|
|
268
|
+
]) {
|
|
269
|
+
const frame = document.querySelector(`[data-testid="${id}"]`);
|
|
270
|
+
expect(frame, `${id} frame`).toBeTruthy();
|
|
271
|
+
const style = getComputedStyle(frame as Element);
|
|
272
|
+
for (const corner of overlayCapCorners) {
|
|
273
|
+
expect(style[corner], `${id} ${corner}`).toBe(`${capped}px`);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
});
|
package/src/surfaces.tsx
CHANGED
|
@@ -267,8 +267,9 @@ export const AlertDialogOverlay = forwardRef<
|
|
|
267
267
|
// content, start-aligned to their anchor with the shared gap (the caller's
|
|
268
268
|
// tamagui <Popover offset={OVERLAY_ANCHOR_GAP}>), flipping/shifting at
|
|
269
269
|
// viewport edges. This frame is the overlay's single surface owner —
|
|
270
|
-
// border
|
|
271
|
-
// must not draw their own
|
|
270
|
+
// border comes from the elevatedSurface recipe and radius from the
|
|
271
|
+
// containerRadius cap spread over it; children must not draw their own
|
|
272
|
+
// outer border.
|
|
272
273
|
|
|
273
274
|
export const PopoverContent = forwardRef<TamaguiElement, ViewProps & { children?: ReactNode }>(
|
|
274
275
|
function PopoverContent({ children, ...props }, ref) {
|
|
@@ -277,6 +278,7 @@ export const PopoverContent = forwardRef<TamaguiElement, ViewProps & { children?
|
|
|
277
278
|
<Popover.Content
|
|
278
279
|
ref={ref}
|
|
279
280
|
{...knobProps.elevatedSurface}
|
|
281
|
+
{...knobProps.containerRadius}
|
|
280
282
|
transition={knobProps.transition}
|
|
281
283
|
enterStyle={overlayEnterExit}
|
|
282
284
|
exitStyle={overlayEnterExit}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MPO-154 — `textAccent` reaches SECONDARY text, not just body text.
|
|
3
|
+
*
|
|
4
|
+
* The `secondary` / `muted` keys on componentColors' text table were a static
|
|
5
|
+
* `$color11` read straight into the `color` prop, so every helper, caption and
|
|
6
|
+
* inactive label rendered the same ink at `low`, `medium` and `high`. The resolver
|
|
7
|
+
* already answers this: `knobProps.textAccentColor` is `$color11` at the two
|
|
8
|
+
* dim stops (the AA legibility floor) and `$color` at `high`.
|
|
9
|
+
*
|
|
10
|
+
* Measurement follows the Text.spec.tsx discipline: read the TEXT NODE's
|
|
11
|
+
* `_col-` atomic class, compare between knob stops by identity, never against
|
|
12
|
+
* a hashed literal. Meter publishes its resolved value ink on
|
|
13
|
+
* `data-meter-value-color`, so that surface asserts the token directly.
|
|
14
|
+
*
|
|
15
|
+
* Both schemes are covered because `textAccent` is scheme-independent by
|
|
16
|
+
* construction — the tokens are theme-relative — and a regression that
|
|
17
|
+
* re-pins one scheme would show up here.
|
|
18
|
+
*/
|
|
19
|
+
import { cleanup, screen } from "@testing-library/react";
|
|
20
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
21
|
+
import { Preset } from "@multiplatform.one/theme";
|
|
22
|
+
import type { ReactElement } from "react";
|
|
23
|
+
import { Theme } from "tamagui";
|
|
24
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
25
|
+
import { Accordion } from "./Accordion";
|
|
26
|
+
import { componentColors } from "./componentColors";
|
|
27
|
+
import { Meter } from "./Meter";
|
|
28
|
+
import { Quote } from "./Quote";
|
|
29
|
+
import { Tabs } from "./Tabs";
|
|
30
|
+
|
|
31
|
+
afterEach(cleanup);
|
|
32
|
+
|
|
33
|
+
type Accent = "low" | "medium" | "high";
|
|
34
|
+
type Scheme = "light" | "dark";
|
|
35
|
+
|
|
36
|
+
function inScheme(scheme: Scheme, node: ReactElement): ReactElement {
|
|
37
|
+
return scheme === "dark" ? <Theme name="dark">{node}</Theme> : node;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** The TEXT NODE's colour atom, by identity — hashed names never asserted. */
|
|
41
|
+
function inkAtoms(el: Element): string[] {
|
|
42
|
+
return String((el as HTMLElement).className || "")
|
|
43
|
+
.split(" ")
|
|
44
|
+
.filter((c) => c.startsWith("_col-"))
|
|
45
|
+
.sort();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function inkOf(scheme: Scheme, accent: Accent, label: string, node: ReactElement): string[] {
|
|
49
|
+
renderWithProviders(inScheme(scheme, <Preset overrides={{ textAccent: accent }}>{node}</Preset>));
|
|
50
|
+
const atoms = inkAtoms(screen.getByText(label));
|
|
51
|
+
cleanup();
|
|
52
|
+
return atoms;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const schemes: Scheme[] = ["light", "dark"];
|
|
56
|
+
|
|
57
|
+
describe("Tabs — textAccent reaches the inactive tab label (MPO-154)", () => {
|
|
58
|
+
const items = [
|
|
59
|
+
{ value: "address", label: "Address & Contact", content: <>address panel</> },
|
|
60
|
+
{ value: "settings", label: "Settings", content: <>settings panel</> },
|
|
61
|
+
];
|
|
62
|
+
const tabs = <Tabs items={items} defaultValue="address" />;
|
|
63
|
+
|
|
64
|
+
for (const scheme of schemes) {
|
|
65
|
+
it(`${scheme}: the inactive label moves between low and high`, () => {
|
|
66
|
+
const low = inkOf(scheme, "low", "Settings", tabs);
|
|
67
|
+
const high = inkOf(scheme, "high", "Settings", tabs);
|
|
68
|
+
expect(low).not.toHaveLength(0);
|
|
69
|
+
expect(high).not.toHaveLength(0);
|
|
70
|
+
expect(high).not.toEqual(low);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it(`${scheme}: the inactive label keeps the AA floor at low and medium`, () => {
|
|
74
|
+
expect(inkOf(scheme, "low", "Settings", tabs)).toEqual(
|
|
75
|
+
inkOf(scheme, "medium", "Settings", tabs),
|
|
76
|
+
);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
describe("Accordion — textAccent reaches the section description (MPO-154)", () => {
|
|
82
|
+
const description = "Where should we deliver the order?";
|
|
83
|
+
const accordion = (
|
|
84
|
+
<Accordion defaultValue="shipping">
|
|
85
|
+
<Accordion.Item value="shipping">
|
|
86
|
+
<Accordion.Trigger description={description}>Shipping details</Accordion.Trigger>
|
|
87
|
+
<Accordion.Content>ship</Accordion.Content>
|
|
88
|
+
</Accordion.Item>
|
|
89
|
+
</Accordion>
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
for (const scheme of schemes) {
|
|
93
|
+
it(`${scheme}: the description moves between low and high`, () => {
|
|
94
|
+
const low = inkOf(scheme, "low", description, accordion);
|
|
95
|
+
const high = inkOf(scheme, "high", description, accordion);
|
|
96
|
+
expect(low).not.toHaveLength(0);
|
|
97
|
+
expect(high).not.toHaveLength(0);
|
|
98
|
+
expect(high).not.toEqual(low);
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it(`${scheme}: the description keeps the AA floor at low and medium`, () => {
|
|
102
|
+
expect(inkOf(scheme, "low", description, accordion)).toEqual(
|
|
103
|
+
inkOf(scheme, "medium", description, accordion),
|
|
104
|
+
);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
describe("Quote — textAccent reaches the attribution (MPO-154)", () => {
|
|
110
|
+
const quote = <Quote cite="Alan Kay">The best way to predict the future.</Quote>;
|
|
111
|
+
|
|
112
|
+
// The attribution renders as `<cite>— {name}</cite>`, two text runs in one
|
|
113
|
+
// node, so getByText cannot reach it. Read the cite element itself.
|
|
114
|
+
function citeInk(scheme: Scheme, accent: Accent): string[] {
|
|
115
|
+
const { container } = renderWithProviders(
|
|
116
|
+
inScheme(scheme, <Preset overrides={{ textAccent: accent }}>{quote}</Preset>),
|
|
117
|
+
);
|
|
118
|
+
const cite = container.querySelector("cite");
|
|
119
|
+
expect(cite?.textContent).toContain("Alan Kay");
|
|
120
|
+
const atoms = inkAtoms(cite as Element);
|
|
121
|
+
cleanup();
|
|
122
|
+
return atoms;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
for (const scheme of schemes) {
|
|
126
|
+
it(`${scheme}: the attribution moves between low and high`, () => {
|
|
127
|
+
const low = citeInk(scheme, "low");
|
|
128
|
+
const high = citeInk(scheme, "high");
|
|
129
|
+
expect(low).not.toHaveLength(0);
|
|
130
|
+
expect(high).not.toHaveLength(0);
|
|
131
|
+
expect(high).not.toEqual(low);
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
it(`${scheme}: the attribution keeps the AA floor at low and medium`, () => {
|
|
135
|
+
expect(citeInk(scheme, "low")).toEqual(citeInk(scheme, "medium"));
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
describe("Meter — textAccent reaches the ok-zone value readout (MPO-154)", () => {
|
|
141
|
+
const meter = <Meter label="Disk usage" value={6.2} min={0} max={8} unit="GB" />;
|
|
142
|
+
|
|
143
|
+
function valueInk(scheme: Scheme, accent: Accent): string | null {
|
|
144
|
+
const { container } = renderWithProviders(
|
|
145
|
+
inScheme(scheme, <Preset overrides={{ textAccent: accent }}>{meter}</Preset>),
|
|
146
|
+
);
|
|
147
|
+
const token = container
|
|
148
|
+
.querySelector("[data-meter-value]")
|
|
149
|
+
?.getAttribute("data-meter-value-color");
|
|
150
|
+
cleanup();
|
|
151
|
+
return token ?? null;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
for (const scheme of schemes) {
|
|
155
|
+
it(`${scheme}: the ok value readout rides the resolver, not a static $color11`, () => {
|
|
156
|
+
expect(valueInk(scheme, "low")).toBe("$color11");
|
|
157
|
+
expect(valueInk(scheme, "medium")).toBe("$color11");
|
|
158
|
+
expect(valueInk(scheme, "high")).toBe("$color");
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
it("a verdict zone keeps its semantic ink at every stop", () => {
|
|
163
|
+
const warned = (accent: Accent) => {
|
|
164
|
+
const { container } = renderWithProviders(
|
|
165
|
+
<Preset overrides={{ textAccent: accent }}>
|
|
166
|
+
<Meter label="Disk usage" value={7.5} min={0} max={8} low={2} high={6} unit="GB" />
|
|
167
|
+
</Preset>,
|
|
168
|
+
);
|
|
169
|
+
const token = container
|
|
170
|
+
.querySelector("[data-meter-value]")
|
|
171
|
+
?.getAttribute("data-meter-value-color");
|
|
172
|
+
cleanup();
|
|
173
|
+
return token;
|
|
174
|
+
};
|
|
175
|
+
expect(warned("low")).toBe("$orange11");
|
|
176
|
+
expect(warned("high")).toBe("$orange11");
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
describe("componentColors keeps no second answer for secondary ink (MPO-154)", () => {
|
|
181
|
+
it("the text table exposes no static secondary or muted step", () => {
|
|
182
|
+
const text = componentColors.text as Record<string, string | undefined>;
|
|
183
|
+
expect(text.secondary).toBeUndefined();
|
|
184
|
+
expect(text.muted).toBeUndefined();
|
|
185
|
+
expect(text.primary).toBe("$color");
|
|
186
|
+
});
|
|
187
|
+
});
|
package/src/views/Calendar.tsx
CHANGED
|
@@ -434,6 +434,7 @@ function DayNumberDisc({
|
|
|
434
434
|
nestedBox: NestedControlBox;
|
|
435
435
|
label: NestedLabel;
|
|
436
436
|
}) {
|
|
437
|
+
const { knobProps } = useResolvedKnobs();
|
|
437
438
|
return (
|
|
438
439
|
<YStack
|
|
439
440
|
{...nestedBox}
|
|
@@ -455,7 +456,7 @@ function DayNumberDisc({
|
|
|
455
456
|
{...label}
|
|
456
457
|
fontWeight={today ? "700" : label.fontWeight}
|
|
457
458
|
color={
|
|
458
|
-
today ? (onAccent ?? "$accentColor") : inMonth ? "$color" :
|
|
459
|
+
today ? (onAccent ?? "$accentColor") : inMonth ? "$color" : knobProps.textAccentColor
|
|
459
460
|
}
|
|
460
461
|
textAlign="center"
|
|
461
462
|
>
|
|
@@ -1731,7 +1732,7 @@ export function Calendar({
|
|
|
1731
1732
|
role="columnheader"
|
|
1732
1733
|
{...{ backgroundColor: componentColors.surface.background }}
|
|
1733
1734
|
>
|
|
1734
|
-
<Text {...nestedKnobs.label} fontWeight="500" color={
|
|
1735
|
+
<Text {...nestedKnobs.label} fontWeight="500" color={knobProps.textAccentColor}>
|
|
1735
1736
|
{day}
|
|
1736
1737
|
</Text>
|
|
1737
1738
|
</YStack>
|
|
@@ -1851,7 +1852,7 @@ export function Calendar({
|
|
|
1851
1852
|
hoverStyle={{ opacity: 0.7 }}
|
|
1852
1853
|
{...{ "data-calendar-overflow": String(hiddenCount) }}
|
|
1853
1854
|
>
|
|
1854
|
-
<Text fontSize="$1" color={
|
|
1855
|
+
<Text fontSize="$1" color={knobProps.textAccentColor}>
|
|
1855
1856
|
{withInterp(t("+{{count}} more"), { count: hiddenCount })}
|
|
1856
1857
|
</Text>
|
|
1857
1858
|
</XStack>
|
|
@@ -2073,7 +2074,7 @@ export function Calendar({
|
|
|
2073
2074
|
onDateSelect?.(day);
|
|
2074
2075
|
}}
|
|
2075
2076
|
>
|
|
2076
|
-
<Text {...nestedKnobs.label} fontWeight="500" color={
|
|
2077
|
+
<Text {...nestedKnobs.label} fontWeight="500" color={knobProps.textAccentColor}>
|
|
2077
2078
|
{weekdayNames[day.getDay()]}
|
|
2078
2079
|
</Text>
|
|
2079
2080
|
<DayNumberDisc
|
|
@@ -2094,7 +2095,7 @@ export function Calendar({
|
|
|
2094
2095
|
{/* All-day / untimed strip (also the day-granularity drop row) */}
|
|
2095
2096
|
<XStack {...hairline.bottom} borderColor="$borderColor" minHeight={MIN_PRESS_TARGET}>
|
|
2096
2097
|
<YStack width={56} justifyContent="center" alignItems="flex-end" paddingInlineEnd="$2">
|
|
2097
|
-
<Text fontSize="$1" color={
|
|
2098
|
+
<Text fontSize="$1" color={knobProps.textAccentColor}>
|
|
2098
2099
|
{t("All day")}
|
|
2099
2100
|
</Text>
|
|
2100
2101
|
</YStack>
|
|
@@ -2135,7 +2136,7 @@ export function Calendar({
|
|
|
2135
2136
|
<YStack width={56}>
|
|
2136
2137
|
{hours.map((hour) => (
|
|
2137
2138
|
<YStack key={hour} height={hourHeight} alignItems="flex-end" paddingInlineEnd="$2">
|
|
2138
|
-
<Text fontSize="$1" color={
|
|
2139
|
+
<Text fontSize="$1" color={knobProps.textAccentColor}>
|
|
2139
2140
|
{formatHour(hour)}
|
|
2140
2141
|
</Text>
|
|
2141
2142
|
</YStack>
|
|
@@ -2305,13 +2306,13 @@ export function Calendar({
|
|
|
2305
2306
|
onChangeText={setDraftTitle}
|
|
2306
2307
|
inputProps={{ autoFocus: true } as any}
|
|
2307
2308
|
/>
|
|
2308
|
-
<Text fontSize="$2" color={
|
|
2309
|
+
<Text fontSize="$2" color={knobProps.textAccentColor}>
|
|
2309
2310
|
{`${formatDayLong(editorHere.start)}, ${formatTimeRangeLabel(
|
|
2310
2311
|
editorHere.start,
|
|
2311
2312
|
editorHere.end,
|
|
2312
2313
|
)}`}
|
|
2313
2314
|
</Text>
|
|
2314
|
-
<Text fontSize="$1" color={
|
|
2315
|
+
<Text fontSize="$1" color={knobProps.textAccentColor}>
|
|
2315
2316
|
{t("Changes apply when the editor closes")}
|
|
2316
2317
|
</Text>
|
|
2317
2318
|
</YStack>
|