@multiplatform.one/components 7.7.6 → 7.8.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/Button.native.js.map +1 -1
- package/dist/cjs/Card.cjs +7 -1
- package/dist/cjs/Card.native.js +11 -1
- package/dist/cjs/Card.native.js.map +1 -1
- package/dist/cjs/CardFooter.cjs +1 -0
- package/dist/cjs/CardFooter.native.js +1 -0
- package/dist/cjs/CardFooter.native.js.map +1 -1
- package/dist/cjs/CopyField/index.cjs +6 -1
- package/dist/cjs/CopyField/index.native.js +6 -1
- package/dist/cjs/CopyField/index.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/index.cjs +31 -1
- package/dist/cjs/DropdownMenu/index.native.js +31 -1
- package/dist/cjs/DropdownMenu/index.native.js.map +1 -1
- package/dist/cjs/Meter/index.cjs +12 -5
- package/dist/cjs/Meter/index.native.js +12 -5
- package/dist/cjs/Meter/index.native.js.map +1 -1
- package/dist/cjs/Tabs/index.cjs +7 -6
- package/dist/cjs/Tabs/index.native.js +8 -7
- package/dist/cjs/Tabs/index.native.js.map +1 -1
- package/dist/cjs/Toast/index.cjs +53 -2
- package/dist/cjs/Toast/index.native.js +55 -2
- package/dist/cjs/Toast/index.native.js.map +1 -1
- package/dist/cjs/actions/DestructiveAction.cjs +7 -13
- package/dist/cjs/actions/DestructiveAction.native.js +7 -15
- package/dist/cjs/actions/DestructiveAction.native.js.map +1 -1
- package/dist/cjs/charts/Axis.cjs +5 -0
- package/dist/cjs/charts/Axis.native.js +5 -0
- package/dist/cjs/charts/Axis.native.js.map +1 -1
- package/dist/cjs/charts/BarChart.cjs +71 -57
- package/dist/cjs/charts/BarChart.native.js +81 -67
- package/dist/cjs/charts/BarChart.native.js.map +1 -1
- package/dist/cjs/charts/ChartDataView.cjs +212 -0
- package/dist/cjs/charts/ChartDataView.native.js +224 -0
- package/dist/cjs/charts/ChartDataView.native.js.map +1 -0
- package/dist/cjs/charts/ChartSurface.cjs +5 -1
- package/dist/cjs/charts/ChartSurface.native.js +5 -1
- package/dist/cjs/charts/ChartSurface.native.js.map +1 -1
- package/dist/cjs/charts/LineChart.cjs +81 -67
- package/dist/cjs/charts/LineChart.native.js +94 -80
- package/dist/cjs/charts/LineChart.native.js.map +1 -1
- package/dist/cjs/charts/PieChart.cjs +98 -73
- package/dist/cjs/charts/PieChart.native.js +109 -84
- package/dist/cjs/charts/PieChart.native.js.map +1 -1
- package/dist/cjs/charts/Sparkline.cjs +10 -1
- package/dist/cjs/charts/Sparkline.native.js +10 -1
- package/dist/cjs/charts/Sparkline.native.js.map +1 -1
- package/dist/cjs/charts/accessibility.cjs +4 -0
- package/dist/cjs/charts/accessibility.native.js +7 -0
- package/dist/cjs/charts/accessibility.native.js.map +1 -1
- package/dist/cjs/charts/index.cjs +3 -1
- package/dist/cjs/charts/index.native.js +2 -0
- package/dist/cjs/charts/index.native.js.map +1 -1
- package/dist/cjs/charts/math.cjs +16 -0
- package/dist/cjs/charts/math.native.js +18 -0
- package/dist/cjs/charts/math.native.js.map +1 -1
- package/dist/cjs/charts/series.cjs +49 -7
- package/dist/cjs/charts/series.native.js +53 -11
- package/dist/cjs/charts/series.native.js.map +1 -1
- package/dist/cjs/charts/svg.cjs +46 -3
- package/dist/cjs/charts/svg.native.js +46 -3
- package/dist/cjs/charts/svg.native.js.map +1 -1
- package/dist/cjs/code/CodeBlock/index.cjs +6 -1
- package/dist/cjs/code/CodeBlock/index.native.js +6 -1
- package/dist/cjs/code/CodeBlock/index.native.js.map +1 -1
- package/dist/cjs/feedback/ConfirmDialog.cjs +7 -21
- package/dist/cjs/feedback/ConfirmDialog.native.js +7 -22
- package/dist/cjs/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/cjs/feedback/NotifyHost.cjs +2 -1
- package/dist/cjs/feedback/NotifyHost.native.js +3 -2
- package/dist/cjs/feedback/NotifyHost.native.js.map +1 -1
- package/dist/cjs/feedback/copy.cjs +36 -4
- package/dist/cjs/feedback/copy.native.js +38 -4
- package/dist/cjs/feedback/copy.native.js.map +1 -1
- package/dist/cjs/feedback/index.cjs +1 -0
- package/dist/cjs/feedback/index.native.js +1 -0
- package/dist/cjs/feedback/index.native.js.map +1 -1
- package/dist/cjs/feedback/notify.cjs +1 -0
- package/dist/cjs/feedback/notify.native.js +1 -0
- package/dist/cjs/feedback/notify.native.js.map +1 -1
- package/dist/cjs/feedback/route.cjs +3 -0
- package/dist/cjs/feedback/route.native.js +3 -0
- package/dist/cjs/feedback/route.native.js.map +1 -1
- package/dist/cjs/feedback/store.cjs +6 -0
- package/dist/cjs/feedback/store.native.js +8 -0
- package/dist/cjs/feedback/store.native.js.map +1 -1
- package/dist/cjs/icons/lucide.cjs +2 -1
- package/dist/cjs/icons/lucide.native.js +2 -1
- package/dist/cjs/icons/lucide.native.js.map +1 -1
- package/dist/cjs/layouts/PaneScaffold.cjs +96 -41
- package/dist/cjs/layouts/PaneScaffold.native.js +97 -41
- package/dist/cjs/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/cjs/layouts/index.cjs +2 -0
- package/dist/cjs/layouts/index.native.js +2 -0
- package/dist/cjs/layouts/index.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +48 -7
- package/dist/cjs/layouts/page.native.js +50 -7
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/shared/useKeyboardInset.cjs +1 -19
- package/dist/cjs/shared/useKeyboardInset.native.js +3 -3
- package/dist/cjs/shared/useKeyboardInset.native.js.map +1 -1
- package/dist/cjs/views/Dashboard.cjs +110 -17
- package/dist/cjs/views/Dashboard.native.js +151 -45
- package/dist/cjs/views/Dashboard.native.js.map +1 -1
- package/dist/cjs/views/Gantt.cjs +374 -91
- package/dist/cjs/views/Gantt.native.js +443 -94
- package/dist/cjs/views/Gantt.native.js.map +1 -1
- package/dist/cjs/views/ganttMath.cjs +91 -2
- package/dist/cjs/views/ganttMath.native.js +113 -3
- package/dist/cjs/views/ganttMath.native.js.map +1 -1
- package/dist/cjs/views/index.cjs +20 -1
- package/dist/cjs/views/index.native.js +20 -1
- package/dist/cjs/views/index.native.js.map +1 -1
- package/dist/esm/Button.mjs.map +1 -1
- package/dist/esm/Button.native.js.map +1 -1
- package/dist/esm/Card.mjs +8 -2
- package/dist/esm/Card.mjs.map +1 -1
- package/dist/esm/Card.native.js +12 -2
- package/dist/esm/Card.native.js.map +1 -1
- package/dist/esm/CardFooter.mjs +1 -0
- package/dist/esm/CardFooter.mjs.map +1 -1
- package/dist/esm/CardFooter.native.js +1 -0
- package/dist/esm/CardFooter.native.js.map +1 -1
- package/dist/esm/CopyField/index.mjs +7 -2
- package/dist/esm/CopyField/index.mjs.map +1 -1
- package/dist/esm/CopyField/index.native.js +7 -2
- package/dist/esm/CopyField/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.mjs +32 -2
- package/dist/esm/DropdownMenu/index.mjs.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js +32 -2
- package/dist/esm/DropdownMenu/index.native.js.map +1 -1
- package/dist/esm/Meter/index.mjs +12 -5
- package/dist/esm/Meter/index.mjs.map +1 -1
- package/dist/esm/Meter/index.native.js +12 -5
- package/dist/esm/Meter/index.native.js.map +1 -1
- package/dist/esm/Tabs/index.mjs +7 -6
- package/dist/esm/Tabs/index.mjs.map +1 -1
- package/dist/esm/Tabs/index.native.js +8 -7
- package/dist/esm/Tabs/index.native.js.map +1 -1
- package/dist/esm/Toast/index.mjs +52 -3
- package/dist/esm/Toast/index.mjs.map +1 -1
- package/dist/esm/Toast/index.native.js +54 -3
- package/dist/esm/Toast/index.native.js.map +1 -1
- package/dist/esm/actions/DestructiveAction.mjs +8 -14
- package/dist/esm/actions/DestructiveAction.mjs.map +1 -1
- package/dist/esm/actions/DestructiveAction.native.js +8 -16
- package/dist/esm/actions/DestructiveAction.native.js.map +1 -1
- package/dist/esm/charts/Axis.mjs +6 -1
- package/dist/esm/charts/Axis.mjs.map +1 -1
- package/dist/esm/charts/Axis.native.js +6 -1
- package/dist/esm/charts/Axis.native.js.map +1 -1
- package/dist/esm/charts/BarChart.mjs +72 -58
- package/dist/esm/charts/BarChart.mjs.map +1 -1
- package/dist/esm/charts/BarChart.native.js +82 -68
- package/dist/esm/charts/BarChart.native.js.map +1 -1
- package/dist/esm/charts/ChartDataView.mjs +185 -0
- package/dist/esm/charts/ChartDataView.mjs.map +1 -0
- package/dist/esm/charts/ChartDataView.native.js +194 -0
- package/dist/esm/charts/ChartDataView.native.js.map +1 -0
- package/dist/esm/charts/ChartSurface.mjs +5 -1
- package/dist/esm/charts/ChartSurface.mjs.map +1 -1
- package/dist/esm/charts/ChartSurface.native.js +5 -1
- package/dist/esm/charts/ChartSurface.native.js.map +1 -1
- package/dist/esm/charts/LineChart.mjs +82 -68
- package/dist/esm/charts/LineChart.mjs.map +1 -1
- package/dist/esm/charts/LineChart.native.js +95 -81
- package/dist/esm/charts/LineChart.native.js.map +1 -1
- package/dist/esm/charts/PieChart.mjs +100 -75
- package/dist/esm/charts/PieChart.mjs.map +1 -1
- package/dist/esm/charts/PieChart.native.js +111 -86
- package/dist/esm/charts/PieChart.native.js.map +1 -1
- package/dist/esm/charts/Sparkline.mjs +11 -2
- package/dist/esm/charts/Sparkline.mjs.map +1 -1
- package/dist/esm/charts/Sparkline.native.js +11 -2
- package/dist/esm/charts/Sparkline.native.js.map +1 -1
- package/dist/esm/charts/accessibility.mjs +4 -1
- package/dist/esm/charts/accessibility.mjs.map +1 -1
- package/dist/esm/charts/accessibility.native.js +7 -1
- package/dist/esm/charts/accessibility.native.js.map +1 -1
- package/dist/esm/charts/index.mjs +2 -1
- package/dist/esm/charts/index.mjs.map +1 -1
- package/dist/esm/charts/index.native.js +2 -1
- package/dist/esm/charts/index.native.js.map +1 -1
- package/dist/esm/charts/math.mjs +16 -1
- package/dist/esm/charts/math.mjs.map +1 -1
- package/dist/esm/charts/math.native.js +18 -1
- package/dist/esm/charts/math.native.js.map +1 -1
- package/dist/esm/charts/series.mjs +51 -9
- package/dist/esm/charts/series.mjs.map +1 -1
- package/dist/esm/charts/series.native.js +55 -13
- package/dist/esm/charts/series.native.js.map +1 -1
- package/dist/esm/charts/svg.mjs +40 -4
- package/dist/esm/charts/svg.mjs.map +1 -1
- package/dist/esm/charts/svg.native.js +40 -4
- package/dist/esm/charts/svg.native.js.map +1 -1
- package/dist/esm/code/CodeBlock/index.mjs +7 -2
- package/dist/esm/code/CodeBlock/index.mjs.map +1 -1
- package/dist/esm/code/CodeBlock/index.native.js +7 -2
- package/dist/esm/code/CodeBlock/index.native.js.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.mjs +8 -22
- package/dist/esm/feedback/ConfirmDialog.mjs.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.native.js +8 -23
- package/dist/esm/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/esm/feedback/NotifyHost.mjs +2 -1
- package/dist/esm/feedback/NotifyHost.mjs.map +1 -1
- package/dist/esm/feedback/NotifyHost.native.js +3 -2
- package/dist/esm/feedback/NotifyHost.native.js.map +1 -1
- package/dist/esm/feedback/copy.mjs +35 -4
- package/dist/esm/feedback/copy.mjs.map +1 -1
- package/dist/esm/feedback/copy.native.js +37 -4
- package/dist/esm/feedback/copy.native.js.map +1 -1
- package/dist/esm/feedback/index.mjs +2 -2
- package/dist/esm/feedback/index.mjs.map +1 -1
- package/dist/esm/feedback/index.native.js +2 -2
- package/dist/esm/feedback/index.native.js.map +1 -1
- package/dist/esm/feedback/notify.mjs +1 -0
- package/dist/esm/feedback/notify.mjs.map +1 -1
- package/dist/esm/feedback/notify.native.js +1 -0
- package/dist/esm/feedback/notify.native.js.map +1 -1
- package/dist/esm/feedback/route.mjs +3 -0
- package/dist/esm/feedback/route.mjs.map +1 -1
- package/dist/esm/feedback/route.native.js +3 -0
- package/dist/esm/feedback/route.native.js.map +1 -1
- package/dist/esm/feedback/store.mjs +6 -1
- package/dist/esm/feedback/store.mjs.map +1 -1
- package/dist/esm/feedback/store.native.js +8 -1
- package/dist/esm/feedback/store.native.js.map +1 -1
- package/dist/esm/icons/lucide.mjs +2 -2
- package/dist/esm/icons/lucide.mjs.map +1 -1
- package/dist/esm/icons/lucide.native.js +2 -2
- package/dist/esm/icons/lucide.native.js.map +1 -1
- package/dist/esm/layouts/PaneScaffold.mjs +97 -42
- package/dist/esm/layouts/PaneScaffold.mjs.map +1 -1
- package/dist/esm/layouts/PaneScaffold.native.js +98 -42
- package/dist/esm/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/esm/layouts/index.mjs +2 -1
- package/dist/esm/layouts/index.mjs.map +1 -1
- package/dist/esm/layouts/index.native.js +2 -1
- package/dist/esm/layouts/index.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +49 -8
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +51 -8
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/shared/useKeyboardInset.mjs +1 -19
- package/dist/esm/shared/useKeyboardInset.mjs.map +1 -1
- package/dist/esm/shared/useKeyboardInset.native.js.map +1 -1
- package/dist/esm/views/Dashboard.mjs +112 -19
- package/dist/esm/views/Dashboard.mjs.map +1 -1
- package/dist/esm/views/Dashboard.native.js +153 -47
- package/dist/esm/views/Dashboard.native.js.map +1 -1
- package/dist/esm/views/Gantt.mjs +376 -93
- package/dist/esm/views/Gantt.mjs.map +1 -1
- package/dist/esm/views/Gantt.native.js +445 -96
- package/dist/esm/views/Gantt.native.js.map +1 -1
- package/dist/esm/views/ganttMath.mjs +84 -3
- package/dist/esm/views/ganttMath.mjs.map +1 -1
- package/dist/esm/views/ganttMath.native.js +106 -4
- package/dist/esm/views/ganttMath.native.js.map +1 -1
- package/dist/esm/views/index.mjs +2 -2
- package/dist/esm/views/index.mjs.map +1 -1
- package/dist/esm/views/index.native.js +2 -2
- package/dist/esm/views/index.native.js.map +1 -1
- package/dist/jsx/Button.mjs.map +1 -1
- package/dist/jsx/Button.native.js.map +1 -1
- package/dist/jsx/Card.mjs +8 -2
- package/dist/jsx/Card.mjs.map +1 -1
- package/dist/jsx/Card.native.js +11 -1
- package/dist/jsx/Card.native.js.map +1 -1
- package/dist/jsx/CardFooter.mjs +1 -0
- package/dist/jsx/CardFooter.mjs.map +1 -1
- package/dist/jsx/CardFooter.native.js +1 -0
- package/dist/jsx/CardFooter.native.js.map +1 -1
- package/dist/jsx/CopyField/index.mjs +7 -2
- package/dist/jsx/CopyField/index.mjs.map +1 -1
- package/dist/jsx/CopyField/index.native.js +6 -1
- package/dist/jsx/CopyField/index.native.js.map +1 -1
- package/dist/jsx/DropdownMenu/index.mjs +32 -2
- package/dist/jsx/DropdownMenu/index.mjs.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js +31 -1
- package/dist/jsx/DropdownMenu/index.native.js.map +1 -1
- package/dist/jsx/Meter/index.mjs +12 -5
- package/dist/jsx/Meter/index.mjs.map +1 -1
- package/dist/jsx/Meter/index.native.js +12 -5
- package/dist/jsx/Meter/index.native.js.map +1 -1
- package/dist/jsx/Tabs/index.mjs +7 -6
- package/dist/jsx/Tabs/index.mjs.map +1 -1
- package/dist/jsx/Tabs/index.native.js +8 -7
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/Toast/index.mjs +52 -3
- package/dist/jsx/Toast/index.mjs.map +1 -1
- package/dist/jsx/Toast/index.native.js +55 -2
- package/dist/jsx/Toast/index.native.js.map +1 -1
- package/dist/jsx/actions/DestructiveAction.mjs +8 -14
- package/dist/jsx/actions/DestructiveAction.mjs.map +1 -1
- package/dist/jsx/actions/DestructiveAction.native.js +7 -15
- package/dist/jsx/actions/DestructiveAction.native.js.map +1 -1
- package/dist/jsx/charts/Axis.mjs +6 -1
- package/dist/jsx/charts/Axis.mjs.map +1 -1
- package/dist/jsx/charts/Axis.native.js +5 -0
- package/dist/jsx/charts/Axis.native.js.map +1 -1
- package/dist/jsx/charts/BarChart.mjs +72 -58
- package/dist/jsx/charts/BarChart.mjs.map +1 -1
- package/dist/jsx/charts/BarChart.native.js +81 -67
- package/dist/jsx/charts/BarChart.native.js.map +1 -1
- package/dist/jsx/charts/ChartDataView.mjs +185 -0
- package/dist/jsx/charts/ChartDataView.mjs.map +1 -0
- package/dist/jsx/charts/ChartDataView.native.js +224 -0
- package/dist/jsx/charts/ChartDataView.native.js.map +1 -0
- package/dist/jsx/charts/ChartSurface.mjs +5 -1
- package/dist/jsx/charts/ChartSurface.mjs.map +1 -1
- package/dist/jsx/charts/ChartSurface.native.js +5 -1
- package/dist/jsx/charts/ChartSurface.native.js.map +1 -1
- package/dist/jsx/charts/LineChart.mjs +82 -68
- package/dist/jsx/charts/LineChart.mjs.map +1 -1
- package/dist/jsx/charts/LineChart.native.js +94 -80
- package/dist/jsx/charts/LineChart.native.js.map +1 -1
- package/dist/jsx/charts/PieChart.mjs +100 -75
- package/dist/jsx/charts/PieChart.mjs.map +1 -1
- package/dist/jsx/charts/PieChart.native.js +109 -84
- package/dist/jsx/charts/PieChart.native.js.map +1 -1
- package/dist/jsx/charts/Sparkline.mjs +11 -2
- package/dist/jsx/charts/Sparkline.mjs.map +1 -1
- package/dist/jsx/charts/Sparkline.native.js +10 -1
- package/dist/jsx/charts/Sparkline.native.js.map +1 -1
- package/dist/jsx/charts/accessibility.mjs +4 -1
- package/dist/jsx/charts/accessibility.mjs.map +1 -1
- package/dist/jsx/charts/accessibility.native.js +7 -0
- package/dist/jsx/charts/accessibility.native.js.map +1 -1
- package/dist/jsx/charts/index.mjs +2 -1
- package/dist/jsx/charts/index.mjs.map +1 -1
- package/dist/jsx/charts/index.native.js +2 -0
- package/dist/jsx/charts/index.native.js.map +1 -1
- package/dist/jsx/charts/math.mjs +16 -1
- package/dist/jsx/charts/math.mjs.map +1 -1
- package/dist/jsx/charts/math.native.js +18 -0
- package/dist/jsx/charts/math.native.js.map +1 -1
- package/dist/jsx/charts/series.mjs +51 -9
- package/dist/jsx/charts/series.mjs.map +1 -1
- package/dist/jsx/charts/series.native.js +53 -11
- package/dist/jsx/charts/series.native.js.map +1 -1
- package/dist/jsx/charts/svg.mjs +40 -4
- package/dist/jsx/charts/svg.mjs.map +1 -1
- package/dist/jsx/charts/svg.native.js +46 -3
- package/dist/jsx/charts/svg.native.js.map +1 -1
- package/dist/jsx/code/CodeBlock/index.mjs +7 -2
- package/dist/jsx/code/CodeBlock/index.mjs.map +1 -1
- package/dist/jsx/code/CodeBlock/index.native.js +6 -1
- package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.mjs +8 -22
- package/dist/jsx/feedback/ConfirmDialog.mjs.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.native.js +7 -22
- package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/jsx/feedback/NotifyHost.mjs +2 -1
- package/dist/jsx/feedback/NotifyHost.mjs.map +1 -1
- package/dist/jsx/feedback/NotifyHost.native.js +3 -2
- package/dist/jsx/feedback/NotifyHost.native.js.map +1 -1
- package/dist/jsx/feedback/copy.mjs +35 -4
- package/dist/jsx/feedback/copy.mjs.map +1 -1
- package/dist/jsx/feedback/copy.native.js +38 -4
- package/dist/jsx/feedback/copy.native.js.map +1 -1
- package/dist/jsx/feedback/index.mjs +2 -2
- package/dist/jsx/feedback/index.mjs.map +1 -1
- package/dist/jsx/feedback/index.native.js +1 -0
- package/dist/jsx/feedback/index.native.js.map +1 -1
- package/dist/jsx/feedback/notify.mjs +1 -0
- package/dist/jsx/feedback/notify.mjs.map +1 -1
- package/dist/jsx/feedback/notify.native.js +1 -0
- package/dist/jsx/feedback/notify.native.js.map +1 -1
- package/dist/jsx/feedback/route.mjs +3 -0
- package/dist/jsx/feedback/route.mjs.map +1 -1
- package/dist/jsx/feedback/route.native.js +3 -0
- package/dist/jsx/feedback/route.native.js.map +1 -1
- package/dist/jsx/feedback/store.mjs +6 -1
- package/dist/jsx/feedback/store.mjs.map +1 -1
- package/dist/jsx/feedback/store.native.js +8 -0
- package/dist/jsx/feedback/store.native.js.map +1 -1
- package/dist/jsx/icons/lucide.mjs +2 -2
- package/dist/jsx/icons/lucide.mjs.map +1 -1
- package/dist/jsx/icons/lucide.native.js +2 -1
- package/dist/jsx/layouts/PaneScaffold.mjs +97 -42
- package/dist/jsx/layouts/PaneScaffold.mjs.map +1 -1
- package/dist/jsx/layouts/PaneScaffold.native.js +97 -41
- package/dist/jsx/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/jsx/layouts/index.mjs +2 -1
- package/dist/jsx/layouts/index.mjs.map +1 -1
- package/dist/jsx/layouts/index.native.js +2 -0
- package/dist/jsx/layouts/index.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +49 -8
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +50 -7
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/shared/useKeyboardInset.mjs +1 -19
- package/dist/jsx/shared/useKeyboardInset.mjs.map +1 -1
- package/dist/jsx/shared/useKeyboardInset.native.js +3 -3
- package/dist/jsx/shared/useKeyboardInset.native.js.map +1 -1
- package/dist/jsx/views/Dashboard.mjs +112 -19
- package/dist/jsx/views/Dashboard.mjs.map +1 -1
- package/dist/jsx/views/Dashboard.native.js +151 -45
- package/dist/jsx/views/Dashboard.native.js.map +1 -1
- package/dist/jsx/views/Gantt.mjs +376 -93
- package/dist/jsx/views/Gantt.mjs.map +1 -1
- package/dist/jsx/views/Gantt.native.js +443 -94
- package/dist/jsx/views/Gantt.native.js.map +1 -1
- package/dist/jsx/views/ganttMath.mjs +84 -3
- package/dist/jsx/views/ganttMath.mjs.map +1 -1
- package/dist/jsx/views/ganttMath.native.js +113 -3
- package/dist/jsx/views/ganttMath.native.js.map +1 -1
- package/dist/jsx/views/index.mjs +2 -2
- package/dist/jsx/views/index.mjs.map +1 -1
- package/dist/jsx/views/index.native.js +20 -1
- package/dist/jsx/views/index.native.js.map +1 -1
- package/package.json +11 -9
- package/src/Button.tsx +10 -2
- package/src/Card.spec.tsx +76 -3
- package/src/Card.stories.tsx +1 -1
- package/src/Card.tsx +13 -1
- package/src/CardFooter.stories.tsx +3 -7
- package/src/CardFooter.tsx +3 -1
- package/src/CardHeader.stories.tsx +1 -3
- package/src/Collapsible.stories.tsx +2 -2
- package/src/CopyField/CopyField.spec.tsx +66 -1
- package/src/CopyField/index.tsx +4 -3
- package/src/DropdownMenu/DropdownMenu.spec.tsx +112 -1
- package/src/DropdownMenu/DropdownMenu.stories.tsx +1 -3
- package/src/DropdownMenu/index.tsx +67 -6
- package/src/LinearGradient.stories.tsx +2 -2
- package/src/Meter/Meter.spec.tsx +59 -2
- package/src/Meter/Meter.stories.tsx +38 -0
- package/src/Meter/index.tsx +9 -4
- package/src/Panel.stories.tsx +1 -1
- package/src/SortableList/SortableList.spec.tsx +3 -3
- package/src/Tabs/Tabs.spec.tsx +43 -3
- package/src/Tabs/Tabs.stories.tsx +10 -1
- package/src/Tabs/index.tsx +19 -13
- package/src/Toast/Toast.spec.tsx +56 -1
- package/src/Toast/index.tsx +68 -3
- package/src/Unspaced.stories.tsx +2 -2
- package/src/VisuallyHidden.stories.tsx +2 -2
- package/src/actions/DestructiveAction.spec.tsx +19 -3
- package/src/actions/DestructiveAction.tsx +9 -14
- package/src/charts/Axis.tsx +6 -1
- package/src/charts/BarChart.tsx +82 -67
- package/src/charts/ChartDataView.spec.tsx +104 -0
- package/src/charts/ChartDataView.tsx +158 -0
- package/src/charts/ChartSurface.tsx +7 -2
- package/src/charts/Charts.stories.tsx +213 -9
- package/src/charts/LineChart.tsx +90 -75
- package/src/charts/PieChart.knobs.spec.tsx +25 -0
- package/src/charts/PieChart.tsx +51 -9
- package/src/charts/Sparkline.tsx +25 -3
- package/src/charts/accessibility.ts +8 -0
- package/src/charts/charts.spec.tsx +77 -3
- package/src/charts/index.ts +2 -0
- package/src/charts/math.spec.ts +19 -0
- package/src/charts/math.ts +36 -0
- package/src/charts/series.tsx +101 -21
- package/src/charts/svg.spec.ts +28 -0
- package/src/charts/svg.ts +56 -2
- package/src/code/CodeBlock/CodeBlock.copy.spec.tsx +23 -0
- package/src/code/CodeBlock/index.tsx +4 -3
- package/src/feedback/ConfirmDialog.nativeFocus.spec.tsx +52 -0
- package/src/feedback/ConfirmDialog.spec.tsx +20 -0
- package/src/feedback/ConfirmDialog.tsx +9 -15
- package/src/feedback/NotifyHost.tsx +11 -2
- package/src/feedback/copy.ts +36 -4
- package/src/feedback/index.ts +1 -0
- package/src/feedback/notify.spec.ts +15 -1
- package/src/feedback/notify.ts +1 -0
- package/src/feedback/route.ts +4 -0
- package/src/feedback/store.ts +7 -0
- package/src/icons/lucide.ts +1 -1
- package/src/images/SvgUri/index.native.ts +11 -3
- package/src/layouts/EmptyState.stories.tsx +2 -2
- package/src/layouts/Page.weight.spec.tsx +75 -0
- package/src/layouts/PageHeader.stories.tsx +4 -4
- package/src/layouts/PageTemplates.stories.tsx +2 -2
- package/src/layouts/PaneScaffold.spec.tsx +144 -4
- package/src/layouts/PaneScaffold.stories.tsx +58 -2
- package/src/layouts/PaneScaffold.tsx +156 -58
- package/src/layouts/ScreenToolbar.stories.tsx +6 -23
- package/src/layouts/index.tsx +11 -0
- package/src/layouts/layouts.spec.tsx +51 -0
- package/src/layouts/page.designLaw.spec.tsx +25 -0
- package/src/layouts/page.tsx +46 -9
- package/src/shared/useKeyboardInset.native.ts +43 -0
- package/src/shared/useKeyboardInset.ts +2 -41
- package/src/tamagui.spec.ts +63 -0
- package/src/views/Dashboard.stories.tsx +38 -1
- package/src/views/Dashboard.tsx +119 -21
- package/src/views/Gantt.scroll.spec.tsx +120 -0
- package/src/views/Gantt.spec.tsx +376 -0
- package/src/views/Gantt.stories.tsx +75 -2
- package/src/views/Gantt.tsx +564 -96
- package/src/views/Kanban.spec.tsx +11 -0
- package/src/views/ganttMath.ts +142 -4
- package/src/views/index.ts +44 -1
- package/src/views/views.spec.tsx +39 -0
- package/types/Button.d.ts +12 -2
- package/types/Button.d.ts.map +1 -1
- package/types/Card.d.ts.map +1 -1
- package/types/CardFooter.d.ts +2 -1
- package/types/CardFooter.d.ts.map +1 -1
- package/types/CopyField/index.d.ts.map +1 -1
- package/types/DropdownMenu/index.d.ts +22 -0
- package/types/DropdownMenu/index.d.ts.map +1 -1
- package/types/Meter/index.d.ts.map +1 -1
- package/types/Tabs/index.d.ts +1 -1
- package/types/Tabs/index.d.ts.map +1 -1
- package/types/Toast/index.d.ts +16 -0
- package/types/Toast/index.d.ts.map +1 -1
- package/types/actions/DestructiveAction.d.ts.map +1 -1
- package/types/charts/Axis.d.ts.map +1 -1
- package/types/charts/BarChart.d.ts.map +1 -1
- package/types/charts/ChartDataView.d.ts +22 -0
- package/types/charts/ChartDataView.d.ts.map +1 -0
- package/types/charts/ChartSurface.d.ts +4 -1
- package/types/charts/ChartSurface.d.ts.map +1 -1
- package/types/charts/LineChart.d.ts.map +1 -1
- package/types/charts/PieChart.d.ts +1 -1
- package/types/charts/PieChart.d.ts.map +1 -1
- package/types/charts/Sparkline.d.ts +3 -1
- package/types/charts/Sparkline.d.ts.map +1 -1
- package/types/charts/accessibility.d.ts +3 -0
- package/types/charts/accessibility.d.ts.map +1 -1
- package/types/charts/index.d.ts +1 -0
- package/types/charts/index.d.ts.map +1 -1
- package/types/charts/math.d.ts +12 -0
- package/types/charts/math.d.ts.map +1 -1
- package/types/charts/series.d.ts +1 -1
- package/types/charts/series.d.ts.map +1 -1
- package/types/charts/svg.d.ts +18 -2
- package/types/charts/svg.d.ts.map +1 -1
- package/types/code/CodeBlock/index.d.ts.map +1 -1
- package/types/feedback/ConfirmDialog.d.ts.map +1 -1
- package/types/feedback/NotifyHost.d.ts +3 -1
- package/types/feedback/NotifyHost.d.ts.map +1 -1
- package/types/feedback/copy.d.ts +12 -2
- package/types/feedback/copy.d.ts.map +1 -1
- package/types/feedback/index.d.ts +1 -1
- package/types/feedback/index.d.ts.map +1 -1
- package/types/feedback/notify.d.ts.map +1 -1
- package/types/feedback/route.d.ts +3 -0
- package/types/feedback/route.d.ts.map +1 -1
- package/types/feedback/store.d.ts +2 -0
- package/types/feedback/store.d.ts.map +1 -1
- package/types/icons/lucide.d.ts +1 -1
- package/types/icons/lucide.d.ts.map +1 -1
- package/types/images/SvgUri/index.native.d.ts +4 -3
- package/types/images/SvgUri/index.native.d.ts.map +1 -1
- package/types/layouts/PaneScaffold.d.ts +27 -5
- package/types/layouts/PaneScaffold.d.ts.map +1 -1
- package/types/layouts/index.d.ts +1 -0
- package/types/layouts/index.d.ts.map +1 -1
- package/types/layouts/page.d.ts +10 -5
- package/types/layouts/page.d.ts.map +1 -1
- package/types/shared/useKeyboardInset.d.ts +1 -14
- package/types/shared/useKeyboardInset.d.ts.map +1 -1
- package/types/shared/useKeyboardInset.native.d.ts +16 -0
- package/types/shared/useKeyboardInset.native.d.ts.map +1 -0
- package/types/views/Dashboard.d.ts.map +1 -1
- package/types/views/Gantt.d.ts +132 -13
- package/types/views/Gantt.d.ts.map +1 -1
- package/types/views/ganttMath.d.ts +73 -0
- package/types/views/ganttMath.d.ts.map +1 -1
- package/types/views/index.d.ts +2 -2
- package/types/views/index.d.ts.map +1 -1
|
@@ -13,6 +13,7 @@ import * as React from "react";
|
|
|
13
13
|
import { TamaguiProvider, createTamagui } from "tamagui";
|
|
14
14
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
15
15
|
import * as Debug from "./Debug";
|
|
16
|
+
import * as EmptyStateModule from "./EmptyState";
|
|
16
17
|
import * as Layouts from "./index";
|
|
17
18
|
import { Sidebar, type SidebarSection } from "./sidebar";
|
|
18
19
|
import { Toolbar, type ToolbarAction } from "./toolbar";
|
|
@@ -72,6 +73,56 @@ describe("Layouts Index", () => {
|
|
|
72
73
|
it("should export Timeline", () => {
|
|
73
74
|
expect(Layouts).toHaveProperty("Timeline");
|
|
74
75
|
});
|
|
76
|
+
|
|
77
|
+
// MPO-223. The per-component `it`s above are a hand-kept list, and a hand-kept
|
|
78
|
+
// list is how ProgressCard fell off the catalog twice (MPO-53, then 5c7af7134):
|
|
79
|
+
// nobody adds a line for the module they forgot. This walks the directory
|
|
80
|
+
// instead, so a new module in src/layouts that nothing re-exports fails here
|
|
81
|
+
// rather than in a consumer's app.
|
|
82
|
+
//
|
|
83
|
+
// Scope is this directory's own modules: the top-level files, plus each
|
|
84
|
+
// subdirectory's index. A subdirectory's internals stay internal on purpose
|
|
85
|
+
// (SafeAreaWrapper/insets, KeyboardAvoidingWrapper/behavior), and `.native`
|
|
86
|
+
// variants are the same module on a platform this runner is not.
|
|
87
|
+
//
|
|
88
|
+
// Runtime names only — `import * as` cannot see type-only exports, so the
|
|
89
|
+
// interfaces ride the typecheck. That is enough for the failure this guards:
|
|
90
|
+
// a missing VALUE is what breaks a build.
|
|
91
|
+
it("reaches every module under src/layouts from the barrel", () => {
|
|
92
|
+
// Negations live in the GLOB, not in a filter below it: `eager: true`
|
|
93
|
+
// imports every match up front, so a `.stories.tsx` skipped afterwards has
|
|
94
|
+
// already been loaded — and loading one drags the storybook runtime into a
|
|
95
|
+
// vitest environment that has no preview API (measured: "does not provide
|
|
96
|
+
// an export named 'definePreview'", whole suite fails to collect).
|
|
97
|
+
const modules = import.meta.glob<Record<string, unknown>>(
|
|
98
|
+
[
|
|
99
|
+
"./*.tsx",
|
|
100
|
+
"./*/index.tsx",
|
|
101
|
+
"!./index.tsx",
|
|
102
|
+
"!./*.spec.tsx",
|
|
103
|
+
"!./*.stories.tsx",
|
|
104
|
+
"!./**/*.spec.tsx",
|
|
105
|
+
"!./**/*.stories.tsx",
|
|
106
|
+
],
|
|
107
|
+
{ eager: true },
|
|
108
|
+
);
|
|
109
|
+
const unreachable: string[] = [];
|
|
110
|
+
for (const [file, mod] of Object.entries(modules)) {
|
|
111
|
+
for (const name of Object.keys(mod)) {
|
|
112
|
+
if (name === "default") continue;
|
|
113
|
+
if (!(name in Layouts)) unreachable.push(`${file} -> ${name}`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
expect(unreachable).toEqual([]);
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
// The import a consumer actually writes. It passed before EmptyState was
|
|
120
|
+
// named in index.tsx too — page.tsx re-exported it — and this locks the
|
|
121
|
+
// identity, not just the presence, so a future shadow cannot quietly swap it.
|
|
122
|
+
it("exports the same EmptyState from the barrel and from its module", () => {
|
|
123
|
+
expect(Layouts).toHaveProperty("EmptyState");
|
|
124
|
+
expect(Layouts.EmptyState).toBe(EmptyStateModule.EmptyState);
|
|
125
|
+
});
|
|
75
126
|
});
|
|
76
127
|
|
|
77
128
|
// ---------------------------------------------------------------------------
|
|
@@ -135,4 +135,29 @@ describe("density unpinned (LC-76)", () => {
|
|
|
135
135
|
const frame = container.querySelector('[data-testid="page-section"]') as HTMLElement;
|
|
136
136
|
expect(frame.getAttribute("data-density")).toBe("compact");
|
|
137
137
|
});
|
|
138
|
+
|
|
139
|
+
it("Screen's explicit density override reaches nested page primitives", () => {
|
|
140
|
+
renderWithProviders(
|
|
141
|
+
<Preset overrides={{ density: "comfortable" }}>
|
|
142
|
+
<Screen compact scroll={false}>
|
|
143
|
+
<PageHeader title="Compact screen" />
|
|
144
|
+
<PageSection title="Inherited section" />
|
|
145
|
+
</Screen>
|
|
146
|
+
</Preset>,
|
|
147
|
+
);
|
|
148
|
+
expect(screen.getByTestId("page-header").getAttribute("data-density")).toBe("compact");
|
|
149
|
+
expect(screen.getByTestId("page-section").getAttribute("data-density")).toBe("compact");
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
it("a painted section steps its interior density without shrinking its heading", () => {
|
|
153
|
+
renderWithProviders(
|
|
154
|
+
<Preset overrides={{ density: "comfortable" }}>
|
|
155
|
+
<PageSection surface title="Outer" data-testid="outer-section">
|
|
156
|
+
<PageSection title="Inner" data-testid="inner-section" />
|
|
157
|
+
</PageSection>
|
|
158
|
+
</Preset>,
|
|
159
|
+
);
|
|
160
|
+
expect(screen.getByTestId("outer-section").getAttribute("data-density")).toBe("comfortable");
|
|
161
|
+
expect(screen.getByTestId("inner-section").getAttribute("data-density")).toBe("compact");
|
|
162
|
+
});
|
|
138
163
|
});
|
package/src/layouts/page.tsx
CHANGED
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
import {
|
|
19
19
|
MIN_PRESS_TARGET,
|
|
20
|
+
Preset,
|
|
21
|
+
Surface,
|
|
20
22
|
hairline,
|
|
21
23
|
layoutBreakpoints,
|
|
22
24
|
resolvePageTitleScale,
|
|
@@ -55,6 +57,17 @@ function negateSpaceToken(token: string): `$-${string}` {
|
|
|
55
57
|
return `$-${token.startsWith("$") ? token.slice(1) : token}`;
|
|
56
58
|
}
|
|
57
59
|
|
|
60
|
+
function knobsFor(component: string, compact: boolean | undefined) {
|
|
61
|
+
// LC-76: an omitted override must leave density under the preset's control.
|
|
62
|
+
return compact === undefined ? { component } : { component, compact };
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Nested surfaces step density only; hue remains inherited (LC-73 / R12). */
|
|
66
|
+
function NestedScale({ density, children }: { density: string; children: ReactNode }) {
|
|
67
|
+
if (density === "compact") return children;
|
|
68
|
+
return <Preset overrides={{ density: "compact" }}>{children}</Preset>;
|
|
69
|
+
}
|
|
70
|
+
|
|
58
71
|
// ---------------------------------------------------------------------------
|
|
59
72
|
// Screen — page outer shell (scroll, max-width, padding, theme background)
|
|
60
73
|
// ---------------------------------------------------------------------------
|
|
@@ -76,6 +89,8 @@ export interface ScreenProps extends YStackProps {
|
|
|
76
89
|
noPadding?: boolean;
|
|
77
90
|
/** Props forwarded to the inner ScrollView when scroll=true. */
|
|
78
91
|
scrollViewProps?: TamaguiScrollViewProps;
|
|
92
|
+
/** Density override inherited by the subtree. Omitted follows the preset. */
|
|
93
|
+
compact?: boolean;
|
|
79
94
|
}
|
|
80
95
|
|
|
81
96
|
/**
|
|
@@ -83,8 +98,7 @@ export interface ScreenProps extends YStackProps {
|
|
|
83
98
|
* compose-only screens.
|
|
84
99
|
*
|
|
85
100
|
* SF-TRANSPARENT + SP-PAD/SP-GAP: panelPadding and gapLg restyle with the
|
|
86
|
-
* density/space knobs (LC-76).
|
|
87
|
-
* — that ceiling pinned page inset and made the density knob a no-op.
|
|
101
|
+
* density/space knobs (LC-76). Only an explicit compact prop overrides density.
|
|
88
102
|
*
|
|
89
103
|
* @example
|
|
90
104
|
* <Screen>
|
|
@@ -92,16 +106,26 @@ export interface ScreenProps extends YStackProps {
|
|
|
92
106
|
* <FrappeImageView doctype="Pokemon" />
|
|
93
107
|
* </Screen>
|
|
94
108
|
*/
|
|
95
|
-
export function Screen({
|
|
109
|
+
export function Screen({ compact, ...props }: ScreenProps) {
|
|
110
|
+
const density = compact === undefined ? undefined : compact ? "compact" : "comfortable";
|
|
111
|
+
return (
|
|
112
|
+
<Surface density={density}>
|
|
113
|
+
<ScreenInner compact={compact} {...props} />
|
|
114
|
+
</Surface>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function ScreenInner({
|
|
96
119
|
children,
|
|
97
120
|
scroll = true,
|
|
98
121
|
maxWidth = CONTENT_MAX_WIDTH,
|
|
99
122
|
bleed = false,
|
|
100
123
|
noPadding = false,
|
|
101
124
|
scrollViewProps,
|
|
125
|
+
compact,
|
|
102
126
|
...rest
|
|
103
127
|
}: ScreenProps) {
|
|
104
|
-
const { knobProps } = useResolvedKnobs(
|
|
128
|
+
const { knobProps } = useResolvedKnobs(knobsFor("Screen", compact));
|
|
105
129
|
|
|
106
130
|
const inner = (
|
|
107
131
|
<YStack
|
|
@@ -180,6 +204,8 @@ export interface PageHeaderProps extends YStackProps {
|
|
|
180
204
|
* surface. Semantics (headingLevel) are unchanged either way.
|
|
181
205
|
*/
|
|
182
206
|
titleScale?: PageTitleScale;
|
|
207
|
+
/** Density override. Omitted follows the preset or parent Surface. */
|
|
208
|
+
compact?: boolean;
|
|
183
209
|
}
|
|
184
210
|
|
|
185
211
|
/**
|
|
@@ -200,10 +226,11 @@ export function PageHeader({
|
|
|
200
226
|
divider = true,
|
|
201
227
|
headingLevel = 1,
|
|
202
228
|
titleScale,
|
|
229
|
+
compact,
|
|
203
230
|
children,
|
|
204
231
|
...rest
|
|
205
232
|
}: PageHeaderProps) {
|
|
206
|
-
const { knobProps } = useResolvedKnobs();
|
|
233
|
+
const { knobProps } = useResolvedKnobs(knobsFor("PageHeader", compact));
|
|
207
234
|
const insetToken = usePageChromeInset();
|
|
208
235
|
// DG-A11Y-02: count the built-in title toward the Screen's h1 budget.
|
|
209
236
|
// Custom `heading` nodes have an unknown level and are not registered.
|
|
@@ -230,9 +257,10 @@ export function PageHeader({
|
|
|
230
257
|
(title ? (
|
|
231
258
|
<TitleTag
|
|
232
259
|
margin={0}
|
|
233
|
-
fontWeight={knobProps.heading.fontWeight}
|
|
234
260
|
{...titleSize}
|
|
261
|
+
fontWeight={knobProps.heading.fontWeight}
|
|
235
262
|
{...headingFamily}
|
|
263
|
+
data-font-weight-knob={knobProps.heading.fontWeight === "700" ? "bold" : "regular"}
|
|
236
264
|
>
|
|
237
265
|
{title}
|
|
238
266
|
</TitleTag>
|
|
@@ -247,6 +275,7 @@ export function PageHeader({
|
|
|
247
275
|
return (
|
|
248
276
|
<YStack
|
|
249
277
|
data-testid="page-header"
|
|
278
|
+
data-density={knobProps.density}
|
|
250
279
|
overflow="visible"
|
|
251
280
|
{...bleed}
|
|
252
281
|
{...(showHairline ? { ...hairline.bottom, borderColor: componentColors.divider } : null)}
|
|
@@ -327,6 +356,8 @@ export interface PageSectionProps extends YStackProps {
|
|
|
327
356
|
* without skips. Visuals are pinned by the shared sectionHeading scale.
|
|
328
357
|
*/
|
|
329
358
|
headingLevel?: Exclude<PageHeadingLevel, 1>;
|
|
359
|
+
/** Density override. Omitted follows the preset or parent Surface. */
|
|
360
|
+
compact?: boolean;
|
|
330
361
|
}
|
|
331
362
|
|
|
332
363
|
/**
|
|
@@ -340,10 +371,11 @@ export function PageSection({
|
|
|
340
371
|
divider = true,
|
|
341
372
|
surface = false,
|
|
342
373
|
headingLevel = 2,
|
|
374
|
+
compact,
|
|
343
375
|
children,
|
|
344
376
|
...rest
|
|
345
377
|
}: PageSectionProps) {
|
|
346
|
-
const { knobProps } = useResolvedKnobs();
|
|
378
|
+
const { knobProps } = useResolvedKnobs(knobsFor("PageSection", compact));
|
|
347
379
|
// See PageHeader: native-only heading family from the headingFont knob.
|
|
348
380
|
const headingFamily = isWeb ? null : { fontFamily: knobProps.heading.fontFamily };
|
|
349
381
|
// The sectionHeading spread pins the visual scale, so stepped levels only
|
|
@@ -387,11 +419,16 @@ export function PageSection({
|
|
|
387
419
|
// a sibling flips `surface` — only the section CONTENT earns the card's
|
|
388
420
|
// panelPadding inset (the painted surface owns it, per LC-39's converse).
|
|
389
421
|
return (
|
|
390
|
-
<YStack
|
|
422
|
+
<YStack
|
|
423
|
+
data-testid="page-section"
|
|
424
|
+
data-density={knobProps.density}
|
|
425
|
+
{...knobProps.gap}
|
|
426
|
+
{...rest}
|
|
427
|
+
>
|
|
391
428
|
{headerBlock}
|
|
392
429
|
{surface ? (
|
|
393
430
|
<YStack {...knobProps.gap} {...surfaceProps}>
|
|
394
|
-
{children}
|
|
431
|
+
<NestedScale density={knobProps.density}>{children}</NestedScale>
|
|
395
432
|
</YStack>
|
|
396
433
|
) : (
|
|
397
434
|
children
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How many points of the native screen the software keyboard currently covers.
|
|
3
|
+
*
|
|
4
|
+
* A sheet that ignores this draws its frame UNDER the keyboard: the last row
|
|
5
|
+
* is sliced mid-glyph, the rounded top edge lands on top of the autocomplete
|
|
6
|
+
* suggestion strip, and the field being typed into can be occluded by it
|
|
7
|
+
* (MPO-64). KeyboardAvoidingView is not enough inside a `Modal` — it pads the
|
|
8
|
+
* container but the sheet keeps whatever fixed height it was given, so it
|
|
9
|
+
* simply overflows off the top instead of shrinking.
|
|
10
|
+
*
|
|
11
|
+
* The number comes from the platform, never from a constant: the suggestion
|
|
12
|
+
* strip is exactly the band that overlapped, and its height varies with the
|
|
13
|
+
* field, the language and whether QuickType is on.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { useEffect, useState } from "react";
|
|
17
|
+
import { Dimensions, Keyboard, Platform } from "react-native";
|
|
18
|
+
|
|
19
|
+
export function useKeyboardInset(): number {
|
|
20
|
+
const [inset, setInset] = useState(0);
|
|
21
|
+
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
// iOS fires the *Will* pair one frame before the animation, so the sheet
|
|
24
|
+
// resizes with the keyboard rather than after it. Android has no *Will*.
|
|
25
|
+
const showEvent = Platform.OS === "ios" ? "keyboardWillChangeFrame" : "keyboardDidShow";
|
|
26
|
+
const hideEvent = Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide";
|
|
27
|
+
|
|
28
|
+
const show = Keyboard.addListener(showEvent, (event) => {
|
|
29
|
+
const screen = event?.endCoordinates;
|
|
30
|
+
if (!screen) return;
|
|
31
|
+
const windowHeight = Dimensions.get("window").height;
|
|
32
|
+
setInset(Math.max(0, Math.round(windowHeight - screen.screenY)));
|
|
33
|
+
});
|
|
34
|
+
const hide = Keyboard.addListener(hideEvent, () => setInset(0));
|
|
35
|
+
|
|
36
|
+
return () => {
|
|
37
|
+
show.remove();
|
|
38
|
+
hide.remove();
|
|
39
|
+
};
|
|
40
|
+
}, []);
|
|
41
|
+
|
|
42
|
+
return inset;
|
|
43
|
+
}
|
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How many points of the screen the software keyboard currently covers.
|
|
3
|
-
*
|
|
4
|
-
* A sheet that ignores this draws its frame UNDER the keyboard: the last row
|
|
5
|
-
* is sliced mid-glyph, the rounded top edge lands on top of the autocomplete
|
|
6
|
-
* suggestion strip, and the field being typed into can be occluded by it
|
|
7
|
-
* (MPO-64). KeyboardAvoidingView is not enough inside a `Modal` — it pads the
|
|
8
|
-
* container but the sheet keeps whatever fixed height it was given, so it
|
|
9
|
-
* simply overflows off the top instead of shrinking.
|
|
10
|
-
*
|
|
11
|
-
* The number comes from the platform, never from a constant: the suggestion
|
|
12
|
-
* strip is exactly the band that overlapped, and its height varies with the
|
|
13
|
-
* field, the language and whether QuickType is on.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
import { useEffect, useState } from "react";
|
|
17
|
-
import { Dimensions, Keyboard, Platform } from "react-native";
|
|
18
|
-
|
|
1
|
+
/** Web overlays use the browser viewport; native overlays measure the keyboard band. */
|
|
19
2
|
export function useKeyboardInset(): number {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
// iOS fires the *Will* pair one frame before the animation, so the sheet
|
|
24
|
-
// resizes with the keyboard rather than after it. Android has no *Will*.
|
|
25
|
-
const showEvent = Platform.OS === "ios" ? "keyboardWillChangeFrame" : "keyboardDidShow";
|
|
26
|
-
const hideEvent = Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide";
|
|
27
|
-
|
|
28
|
-
const show = Keyboard.addListener(showEvent, (event) => {
|
|
29
|
-
const screen = event?.endCoordinates;
|
|
30
|
-
if (!screen) return;
|
|
31
|
-
const windowHeight = Dimensions.get("window").height;
|
|
32
|
-
setInset(Math.max(0, Math.round(windowHeight - screen.screenY)));
|
|
33
|
-
});
|
|
34
|
-
const hide = Keyboard.addListener(hideEvent, () => setInset(0));
|
|
35
|
-
|
|
36
|
-
return () => {
|
|
37
|
-
show.remove();
|
|
38
|
-
hide.remove();
|
|
39
|
-
};
|
|
40
|
-
}, []);
|
|
41
|
-
|
|
42
|
-
return inset;
|
|
3
|
+
return 0;
|
|
43
4
|
}
|
package/src/tamagui.spec.ts
CHANGED
|
@@ -16,9 +16,13 @@
|
|
|
16
16
|
* 4. House shadows (Tabs, Tooltip, Card, Toast, …) must stay the house
|
|
17
17
|
* versions, not the tamagui primitives.
|
|
18
18
|
*/
|
|
19
|
+
import { readdirSync, readFileSync } from "node:fs";
|
|
20
|
+
import { join } from "node:path";
|
|
19
21
|
import * as tamagui from "tamagui";
|
|
22
|
+
import * as tamaguiLinearGradient from "tamagui/linear-gradient";
|
|
20
23
|
import { describe, expect, it } from "vitest";
|
|
21
24
|
import * as pkg from "./index";
|
|
25
|
+
import * as houseTamagui from "./tamagui";
|
|
22
26
|
|
|
23
27
|
const EXCLUDED_BARE_NAMES = [
|
|
24
28
|
"Checkbox",
|
|
@@ -44,12 +48,19 @@ const ALLOWLIST_VALUE_NAMES = [
|
|
|
44
48
|
// barrel and had been red ever since. MPO-78: CI runs `turbo run build`
|
|
45
49
|
// only, so nothing caught it.)
|
|
46
50
|
"Circle",
|
|
51
|
+
// MPO-21 G1 / G3 / G4. Restored by MPO-148; MPO-169 locks them here so a
|
|
52
|
+
// later Adapt-style rewrite cannot drop them without this spec going red.
|
|
53
|
+
// LinearGradient (G2) is not on the main tamagui barrel — see the dedicated
|
|
54
|
+
// assertion below rather than this identity check.
|
|
55
|
+
"Collapsible",
|
|
47
56
|
"Group",
|
|
48
57
|
"ListItem",
|
|
49
58
|
"ScrollView",
|
|
50
59
|
"Spacer",
|
|
51
60
|
"Square",
|
|
61
|
+
"Unspaced",
|
|
52
62
|
"View",
|
|
63
|
+
"VisuallyHidden",
|
|
53
64
|
"XGroup",
|
|
54
65
|
"XStack",
|
|
55
66
|
"YGroup",
|
|
@@ -205,8 +216,60 @@ describe("curated tamagui surface", () => {
|
|
|
205
216
|
).toBe((tamagui as Record<string, unknown>)[name]);
|
|
206
217
|
}
|
|
207
218
|
});
|
|
219
|
+
|
|
220
|
+
it("exports LinearGradient from tamagui/linear-gradient, not the main tamagui barrel", () => {
|
|
221
|
+
expect((tamagui as Record<string, unknown>).LinearGradient).toBeUndefined();
|
|
222
|
+
expect(houseTamagui.LinearGradient).toBe(tamaguiLinearGradient.LinearGradient);
|
|
223
|
+
expect(pkg.LinearGradient).toBe(tamaguiLinearGradient.LinearGradient);
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
it("every Components story import from ./tamagui is a live barrel export (MPO-169)", () => {
|
|
227
|
+
const exported = new Set(Object.keys(houseTamagui));
|
|
228
|
+
const missing: string[] = [];
|
|
229
|
+
for (const file of walkStoryFiles(import.meta.dirname)) {
|
|
230
|
+
for (const name of namedValueImportsFromHouseTamagui(readFileSync(file, "utf8"))) {
|
|
231
|
+
if (!exported.has(name)) {
|
|
232
|
+
missing.push(`${file.slice(import.meta.dirname.length + 1)}:${name}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
expect(
|
|
237
|
+
missing,
|
|
238
|
+
`stories import names ./tamagui.ts does not export: ${missing.join(", ")}`,
|
|
239
|
+
).toEqual([]);
|
|
240
|
+
});
|
|
208
241
|
});
|
|
209
242
|
|
|
243
|
+
function walkStoryFiles(dir: string): string[] {
|
|
244
|
+
const out: string[] = [];
|
|
245
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
246
|
+
const path = join(dir, entry.name);
|
|
247
|
+
if (entry.isDirectory()) out.push(...walkStoryFiles(path));
|
|
248
|
+
else if (/\.stories\.tsx?$/.test(entry.name)) out.push(path);
|
|
249
|
+
}
|
|
250
|
+
return out;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
function namedValueImportsFromHouseTamagui(src: string): string[] {
|
|
254
|
+
const names: string[] = [];
|
|
255
|
+
const re = /import\s+(type\s+)?\{([^}]+)\}\s+from\s+["']\.\/tamagui["']/g;
|
|
256
|
+
for (const match of src.matchAll(re)) {
|
|
257
|
+
const wholeClauseIsType = Boolean(match[1]);
|
|
258
|
+
for (const raw of match[2].split(",")) {
|
|
259
|
+
const part = raw.trim();
|
|
260
|
+
if (!part) continue;
|
|
261
|
+
if (wholeClauseIsType || /^type\s/.test(part)) continue;
|
|
262
|
+
names.push(
|
|
263
|
+
part
|
|
264
|
+
.replace(/^type\s+/, "")
|
|
265
|
+
.split(/\s+as\s+/)[0]
|
|
266
|
+
.trim(),
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return names;
|
|
271
|
+
}
|
|
272
|
+
|
|
210
273
|
// ---------------------------------------------------------------------------
|
|
211
274
|
// Type-level locks (checked by `tsc --noEmit`, not vitest): excluded Props
|
|
212
275
|
// types must not be re-exported either, and allowlisted types must exist.
|
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
UsersIcon,
|
|
9
9
|
} from "@phosphor-icons/react";
|
|
10
10
|
import type { Meta } from "@storybook/react-native-web-vite";
|
|
11
|
-
import {
|
|
11
|
+
import { YStack } from "tamagui";
|
|
12
|
+
import { Dashboard, KPICard, type DashboardWidget } from "./Dashboard";
|
|
12
13
|
|
|
13
14
|
const iconSize = 16;
|
|
14
15
|
|
|
@@ -165,6 +166,42 @@ const meta: Meta = {
|
|
|
165
166
|
|
|
166
167
|
export default meta;
|
|
167
168
|
|
|
169
|
+
export const TrendSentiment = {
|
|
170
|
+
render: () => (
|
|
171
|
+
<YStack width="100%" maxWidth={360} gap="$3">
|
|
172
|
+
<KPICard
|
|
173
|
+
config={{
|
|
174
|
+
id: "improving",
|
|
175
|
+
title: "Improving revenue",
|
|
176
|
+
value: 120,
|
|
177
|
+
trend: "up",
|
|
178
|
+
trendValue: "+12%",
|
|
179
|
+
goodDirection: "up",
|
|
180
|
+
}}
|
|
181
|
+
/>
|
|
182
|
+
<KPICard
|
|
183
|
+
config={{
|
|
184
|
+
id: "worsening",
|
|
185
|
+
title: "Worsening revenue",
|
|
186
|
+
value: 96,
|
|
187
|
+
trend: "down",
|
|
188
|
+
trendValue: "-4%",
|
|
189
|
+
goodDirection: "up",
|
|
190
|
+
}}
|
|
191
|
+
/>
|
|
192
|
+
<KPICard
|
|
193
|
+
config={{
|
|
194
|
+
id: "undeclared",
|
|
195
|
+
title: "Undeclared sentiment",
|
|
196
|
+
value: 102,
|
|
197
|
+
trend: "up",
|
|
198
|
+
trendValue: "2%",
|
|
199
|
+
}}
|
|
200
|
+
/>
|
|
201
|
+
</YStack>
|
|
202
|
+
),
|
|
203
|
+
};
|
|
204
|
+
|
|
168
205
|
export const Default = {
|
|
169
206
|
name: "Main",
|
|
170
207
|
render: () => (
|