@multiplatform.one/components 7.8.0 → 7.11.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/README.md +98 -0
- 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/SheetModal/index.cjs +22 -3
- package/dist/cjs/SheetModal/index.native.js +50 -10
- package/dist/cjs/SheetModal/index.native.js.map +1 -1
- package/dist/cjs/Tabs/index.cjs +34 -13
- package/dist/cjs/Tabs/index.native.js +38 -13
- 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 +248 -19
- package/dist/cjs/views/TreeView.native.js +264 -20
- 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/SheetModal/index.mjs +22 -3
- package/dist/esm/SheetModal/index.mjs.map +1 -1
- package/dist/esm/SheetModal/index.native.js +51 -11
- package/dist/esm/SheetModal/index.native.js.map +1 -1
- package/dist/esm/Tabs/index.mjs +34 -13
- package/dist/esm/Tabs/index.mjs.map +1 -1
- package/dist/esm/Tabs/index.native.js +38 -13
- 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 +249 -20
- package/dist/esm/views/TreeView.mjs.map +1 -1
- package/dist/esm/views/TreeView.native.js +265 -21
- 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/SheetModal/index.mjs +22 -3
- package/dist/jsx/SheetModal/index.mjs.map +1 -1
- package/dist/jsx/SheetModal/index.native.js +50 -10
- package/dist/jsx/SheetModal/index.native.js.map +1 -1
- package/dist/jsx/Tabs/index.mjs +34 -13
- package/dist/jsx/Tabs/index.mjs.map +1 -1
- package/dist/jsx/Tabs/index.native.js +38 -13
- 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 +249 -20
- package/dist/jsx/views/TreeView.mjs.map +1 -1
- package/dist/jsx/views/TreeView.native.js +264 -20
- 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 +11 -11
- 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/SheetModal/SheetModal.fill.spec.tsx +147 -0
- package/src/SheetModal/SheetModal.ownedBody.spec.tsx +200 -0
- package/src/SheetModal/SheetModal.stories.spec.tsx +23 -2
- package/src/SheetModal/SheetModal.stories.tsx +275 -2
- package/src/SheetModal/index.native.tsx +50 -6
- package/src/SheetModal/index.tsx +40 -3
- package/src/Tabs/Tabs.lifecycle.spec.tsx +123 -0
- package/src/Tabs/Tabs.measurement.spec.tsx +186 -0
- package/src/Tabs/Tabs.stories.tsx +43 -0
- package/src/Tabs/index.tsx +44 -15
- 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 +7 -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 +174 -0
- package/src/views/TreeView.reveal.stories.tsx +249 -0
- package/src/views/TreeView.scroll-index.spec.tsx +246 -0
- package/src/views/TreeView.scroll.spec.tsx +857 -0
- package/src/views/TreeView.spec.tsx +1 -1
- package/src/views/TreeView.tsx +353 -29
- 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/SheetModal/index.d.ts +8 -1
- package/types/SheetModal/index.d.ts.map +1 -1
- package/types/SheetModal/index.native.d.ts +1 -1
- package/types/SheetModal/index.native.d.ts.map +1 -1
- package/types/Tabs/index.d.ts.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 +19 -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
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>
|
package/src/views/Dashboard.tsx
CHANGED
|
@@ -326,15 +326,20 @@ export interface KPICardProps extends Omit<YStackProps, "children"> {
|
|
|
326
326
|
* The one sentinel resolver for trend sentiment color (LC-36
|
|
327
327
|
* TREND-SENTIMENT): color encodes sentiment — `trend × goodDirection` —
|
|
328
328
|
* never direction alone. Undeclared or `"none"` sentiment renders the
|
|
329
|
-
* neutral
|
|
330
|
-
*
|
|
329
|
+
* neutral tier; a metric whose polarity the system doesn't know must not
|
|
330
|
+
* wear a verdict color.
|
|
331
|
+
*
|
|
332
|
+
* MPO-154: the neutral ink is passed in, not looked up. It is ordinary
|
|
333
|
+
* secondary text, so the caller hands over `knobProps.textAccentColor` —
|
|
334
|
+
* a static tier here could not see the `textAccent` knob.
|
|
331
335
|
*/
|
|
332
336
|
export function resolveTrendColor(
|
|
333
337
|
trend: TrendDirection | undefined,
|
|
334
338
|
goodDirection: KPICardConfig["goodDirection"],
|
|
339
|
+
neutral: string,
|
|
335
340
|
): string {
|
|
336
|
-
if (!trend || trend === "neutral") return
|
|
337
|
-
if (!goodDirection || goodDirection === "none") return
|
|
341
|
+
if (!trend || trend === "neutral") return neutral;
|
|
342
|
+
if (!goodDirection || goodDirection === "none") return neutral;
|
|
338
343
|
return trend === goodDirection
|
|
339
344
|
? componentColors.semantic.success
|
|
340
345
|
: componentColors.semantic.error;
|
|
@@ -373,8 +378,8 @@ export function KPICard({ config, ...stackProps }: KPICardProps) {
|
|
|
373
378
|
);
|
|
374
379
|
|
|
375
380
|
const trendColor = useMemo(
|
|
376
|
-
() => resolveTrendColor(config.trend, config.goodDirection),
|
|
377
|
-
[config.trend, config.goodDirection],
|
|
381
|
+
() => resolveTrendColor(config.trend, config.goodDirection, knobProps.textAccentColor),
|
|
382
|
+
[config.trend, config.goodDirection, knobProps.textAccentColor],
|
|
378
383
|
);
|
|
379
384
|
|
|
380
385
|
const trendSymbol = useMemo(() => {
|
|
@@ -660,7 +665,7 @@ export function ShortcutCard({ config, ...stackProps }: ShortcutCardProps) {
|
|
|
660
665
|
{...knobProps.borderRadius}
|
|
661
666
|
data-nested-px={px}
|
|
662
667
|
>
|
|
663
|
-
<Text {...knobProps.label} color={
|
|
668
|
+
<Text {...knobProps.label} color={knobProps.textAccentColor}>
|
|
664
669
|
{config.count}
|
|
665
670
|
</Text>
|
|
666
671
|
</XStack>
|
|
@@ -708,7 +713,7 @@ export function ListCard({ config, headingLevel = 2, ...stackProps }: ListCardPr
|
|
|
708
713
|
{item.label}
|
|
709
714
|
</Text>
|
|
710
715
|
{item.meta ? (
|
|
711
|
-
<Text {...knobProps.label} color={
|
|
716
|
+
<Text {...knobProps.label} color={knobProps.textAccentColor}>
|
|
712
717
|
{item.meta}
|
|
713
718
|
</Text>
|
|
714
719
|
) : null}
|
package/src/views/Gantt.tsx
CHANGED
|
@@ -1576,7 +1576,7 @@ export function GanttView({
|
|
|
1576
1576
|
borderColor="$borderColor"
|
|
1577
1577
|
{...{ backgroundColor: componentColors.surface.background }}
|
|
1578
1578
|
>
|
|
1579
|
-
<Text {...knobProps.label} color={
|
|
1579
|
+
<Text {...knobProps.label} color={knobProps.textAccentColor} numberOfLines={1}>
|
|
1580
1580
|
{t("Task")}
|
|
1581
1581
|
</Text>
|
|
1582
1582
|
</XStack>
|
|
@@ -1631,7 +1631,7 @@ export function GanttView({
|
|
|
1631
1631
|
top={2}
|
|
1632
1632
|
width={Math.max(0, band.width - 8)}
|
|
1633
1633
|
{...knobProps.label}
|
|
1634
|
-
color={
|
|
1634
|
+
color={knobProps.textAccentColor}
|
|
1635
1635
|
numberOfLines={1}
|
|
1636
1636
|
>
|
|
1637
1637
|
{band.label}
|
|
@@ -1645,7 +1645,7 @@ export function GanttView({
|
|
|
1645
1645
|
{...(rtl ? { right: tick.x + 4 } : { left: tick.x + 4 })}
|
|
1646
1646
|
top={axisHeight / 2}
|
|
1647
1647
|
{...knobProps.label}
|
|
1648
|
-
color={
|
|
1648
|
+
color={knobProps.textAccentColor}
|
|
1649
1649
|
numberOfLines={1}
|
|
1650
1650
|
>
|
|
1651
1651
|
{formatDayOfMonth(tick.date)}
|
|
@@ -861,7 +861,7 @@ function KanbanColumnView<T>({
|
|
|
861
861
|
<XStack alignItems="center" {...knobProps.gap}>
|
|
862
862
|
{itemCount !== undefined && (
|
|
863
863
|
<Text
|
|
864
|
-
color={
|
|
864
|
+
color={knobProps.textAccentColor}
|
|
865
865
|
{...knobProps.label}
|
|
866
866
|
{...knobProps.textWeight}
|
|
867
867
|
data-async-count
|
|
@@ -1004,7 +1004,7 @@ function KanbanColumnView<T>({
|
|
|
1004
1004
|
justifyContent="center"
|
|
1005
1005
|
>
|
|
1006
1006
|
{column.items.length === 0 && (
|
|
1007
|
-
<Text color={
|
|
1007
|
+
<Text color={knobProps.textAccentColor} {...knobProps.label}>
|
|
1008
1008
|
{t("Drop here")}
|
|
1009
1009
|
</Text>
|
|
1010
1010
|
)}
|
package/src/views/Kanban.tsx
CHANGED
|
@@ -1361,7 +1361,7 @@ function KanbanColumnView<T>({
|
|
|
1361
1361
|
<XStack alignItems="center" {...knobProps.gap}>
|
|
1362
1362
|
{itemCount !== undefined && (
|
|
1363
1363
|
<Text
|
|
1364
|
-
color={
|
|
1364
|
+
color={knobProps.textAccentColor}
|
|
1365
1365
|
{...knobProps.label}
|
|
1366
1366
|
{...knobProps.textWeight}
|
|
1367
1367
|
data-async-count
|
|
@@ -1551,7 +1551,7 @@ function KanbanColumnView<T>({
|
|
|
1551
1551
|
justifyContent="center"
|
|
1552
1552
|
>
|
|
1553
1553
|
{isEmpty && (
|
|
1554
|
-
<Text color={
|
|
1554
|
+
<Text color={knobProps.textAccentColor} {...knobProps.label}>
|
|
1555
1555
|
{t("Drop here")}
|
|
1556
1556
|
</Text>
|
|
1557
1557
|
)}
|
|
@@ -513,7 +513,7 @@ export function ReportBuilder({
|
|
|
513
513
|
<SortIcon
|
|
514
514
|
size={iconPx}
|
|
515
515
|
weight="bold"
|
|
516
|
-
color={active ? componentColors.text.primary :
|
|
516
|
+
color={active ? componentColors.text.primary : knobProps.textAccentColor}
|
|
517
517
|
opacity={active ? 1 : 0.35}
|
|
518
518
|
/>
|
|
519
519
|
</XStack>
|
|
@@ -634,7 +634,7 @@ export function ReportBuilder({
|
|
|
634
634
|
<Text {...knobProps.label} color="$accentColor" numberOfLines={1}>
|
|
635
635
|
{groupByCol?.label ?? groupBy.field}: {groupKey}
|
|
636
636
|
</Text>
|
|
637
|
-
<Text {...knobProps.label} color={
|
|
637
|
+
<Text {...knobProps.label} color={knobProps.textAccentColor}>
|
|
638
638
|
({group.rows.length} {group.rows.length === 1 ? t("record") : t("records")})
|
|
639
639
|
</Text>
|
|
640
640
|
<XStack flex={1} />
|
|
@@ -902,7 +902,7 @@ export function ReportBuilder({
|
|
|
902
902
|
{...knobProps.gapLg}
|
|
903
903
|
flexWrap="wrap"
|
|
904
904
|
>
|
|
905
|
-
<Text {...knobProps.label} color={
|
|
905
|
+
<Text {...knobProps.label} color={knobProps.textAccentColor}>
|
|
906
906
|
{t("Totals")}
|
|
907
907
|
</Text>
|
|
908
908
|
{totals.map(({ col, value }) => (
|
|
@@ -912,7 +912,7 @@ export function ReportBuilder({
|
|
|
912
912
|
</Text>
|
|
913
913
|
))}
|
|
914
914
|
<XStack flex={1} />
|
|
915
|
-
<Text {...knobProps.label} color={
|
|
915
|
+
<Text {...knobProps.label} color={knobProps.textAccentColor}>
|
|
916
916
|
{t("{{count}} row(s)", { count: data.length })}
|
|
917
917
|
</Text>
|
|
918
918
|
</XStack>
|