@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["List","ListRow","ListRowMeta","useListItemState","Kanban","Calendar","computeEventMoveRange","eventChipTextColor","findDayKeyAtPoint","snapMinutes","layoutDayBlocks","computeResizeRange","moveRangeToSlot","createRangeFromDrag","moveFocusDate","moveFocusSlot","eventAccessibleLabel","formatTimeRangeLabel","TreeView","ImageGrid","Dashboard","KPICard","ChartCard","ProgressCard","ShortcutCard","ListCard","calculateTrend","calculatePercentageChange","aggregateData","resolveTrendColor","ReportBuilder","GanttView","barGeometry","computeGanttRange","dateToX","dxToDayDelta","ganttTaskAccessibleLabel","generateTicks","normalizeSpanEdges","shiftSpanByDays","todayLineX","renumberIdx"],"sources":["../../../src/views/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SACEA,IAAA,EACAC,OAAA,EACAC,WAAA,EACAC,gBAAA,QAKK;AACP,SAASC,MAAA,QAAuE;AAChF,SACEC,QAAA,EACAC,qBAAA,EACAC,kBAAA,EACAC,iBAAA,QAOK;AACP,SACEC,WAAA,EACAC,eAAA,EACAC,kBAAA,EACAC,eAAA,EACAC,mBAAA,EACAC,aAAA,EACAC,aAAA,EACAC,oBAAA,EACAC,oBAAA,QAGK;AACP,SACEC,QAAA,QAKK;AACP,SAASC,SAAA,QAA6D;AAMtE,SACEC,SAAA,EACAC,OAAA,EACAC,SAAA,EACAC,YAAA,EACAC,YAAA,EACAC,QAAA,EACAC,cAAA,EACAC,yBAAA,EACAC,aAAA,EACAC,iBAAA,QAiBK;AACP,SACEC,aAAA,QAIK;AACP,
|
|
1
|
+
{"version":3,"names":["List","ListRow","ListRowMeta","useListItemState","Kanban","Calendar","computeEventMoveRange","eventChipTextColor","findDayKeyAtPoint","snapMinutes","layoutDayBlocks","computeResizeRange","moveRangeToSlot","createRangeFromDrag","moveFocusDate","moveFocusSlot","eventAccessibleLabel","formatTimeRangeLabel","TreeView","ImageGrid","Dashboard","KPICard","ChartCard","ProgressCard","ShortcutCard","ListCard","calculateTrend","calculatePercentageChange","aggregateData","resolveTrendColor","ReportBuilder","GanttView","addDays","barGeometry","clampResizeDayDelta","computeGanttRange","dateLineX","dateToX","dayDiff","dxToDayDelta","formatRangeLabel","formatSpanLabel","ganttTaskAccessibleLabel","generateTicks","isBoundedSpan","isEternalSpan","MS_PER_DAY","normalizeSpanEdges","openBarGeometry","openSpanExtent","openSpanExtents","openSpanLabelParts","rangeDays","resizeSpanByDays","scrollAnchorX","shiftSpanByDays","spanInclusiveDays","startOfDay","todayLineX","xToDate","renumberIdx"],"sources":["../../../src/views/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SACEA,IAAA,EACAC,OAAA,EACAC,WAAA,EACAC,gBAAA,QAKK;AACP,SAASC,MAAA,QAAuE;AAChF,SACEC,QAAA,EACAC,qBAAA,EACAC,kBAAA,EACAC,iBAAA,QAOK;AACP,SACEC,WAAA,EACAC,eAAA,EACAC,kBAAA,EACAC,eAAA,EACAC,mBAAA,EACAC,aAAA,EACAC,aAAA,EACAC,oBAAA,EACAC,oBAAA,QAGK;AACP,SACEC,QAAA,QAKK;AACP,SAASC,SAAA,QAA6D;AAMtE,SACEC,SAAA,EACAC,OAAA,EACAC,SAAA,EACAC,YAAA,EACAC,YAAA,EACAC,QAAA,EACAC,cAAA,EACAC,yBAAA,EACAC,aAAA,EACAC,iBAAA,QAiBK;AACP,SACEC,aAAA,QAIK;AACP,SACEC,SAAA,QAMK;AAeP,SACEC,OAAA,EACAC,WAAA,EACAC,mBAAA,EACAC,iBAAA,EACAC,SAAA,EACAC,OAAA,EACAC,OAAA,EACAC,YAAA,EACAC,gBAAA,EACAC,eAAA,EACAC,wBAAA,EACAC,aAAA,EACAC,aAAA,EACAC,aAAA,EACAC,UAAA,EACAC,kBAAA,EACAC,eAAA,EACAC,cAAA,EACAC,eAAA,EACAC,kBAAA,EACAC,SAAA,EACAC,gBAAA,EACAC,aAAA,EACAC,eAAA,EACAC,iBAAA,EACAC,UAAA,EACAC,UAAA,EACAC,OAAA,QASK;AAKP,SAASC,WAAA,QAAmB;AAI5B,cAAc","ignoreList":[]}
|
|
@@ -36,37 +36,56 @@ __export(views_exports, {
|
|
|
36
36
|
ListCard: () => import_Dashboard.ListCard,
|
|
37
37
|
ListRow: () => import_List.ListRow,
|
|
38
38
|
ListRowMeta: () => import_List.ListRowMeta,
|
|
39
|
+
MS_PER_DAY: () => import_ganttMath.MS_PER_DAY,
|
|
39
40
|
ProgressCard: () => import_Dashboard.ProgressCard,
|
|
40
41
|
ReportBuilder: () => import_ReportBuilder.ReportBuilder,
|
|
41
42
|
ShortcutCard: () => import_Dashboard.ShortcutCard,
|
|
42
43
|
TreeView: () => import_TreeView.TreeView,
|
|
44
|
+
addDays: () => import_ganttMath.addDays,
|
|
43
45
|
aggregateData: () => import_Dashboard.aggregateData,
|
|
44
46
|
barGeometry: () => import_ganttMath.barGeometry,
|
|
45
47
|
calculatePercentageChange: () => import_Dashboard.calculatePercentageChange,
|
|
46
48
|
calculateTrend: () => import_Dashboard.calculateTrend,
|
|
49
|
+
clampResizeDayDelta: () => import_ganttMath.clampResizeDayDelta,
|
|
47
50
|
computeEventMoveRange: () => import_Calendar.computeEventMoveRange,
|
|
48
51
|
computeGanttRange: () => import_ganttMath.computeGanttRange,
|
|
49
52
|
computeResizeRange: () => import_calendarMath.computeResizeRange,
|
|
50
53
|
createRangeFromDrag: () => import_calendarMath.createRangeFromDrag,
|
|
54
|
+
dateLineX: () => import_ganttMath.dateLineX,
|
|
51
55
|
dateToX: () => import_ganttMath.dateToX,
|
|
56
|
+
dayDiff: () => import_ganttMath.dayDiff,
|
|
52
57
|
dxToDayDelta: () => import_ganttMath.dxToDayDelta,
|
|
53
58
|
eventAccessibleLabel: () => import_calendarMath.eventAccessibleLabel,
|
|
54
59
|
eventChipTextColor: () => import_Calendar.eventChipTextColor,
|
|
55
60
|
findDayKeyAtPoint: () => import_Calendar.findDayKeyAtPoint,
|
|
61
|
+
formatRangeLabel: () => import_ganttMath.formatRangeLabel,
|
|
62
|
+
formatSpanLabel: () => import_ganttMath.formatSpanLabel,
|
|
56
63
|
formatTimeRangeLabel: () => import_calendarMath.formatTimeRangeLabel,
|
|
57
64
|
ganttTaskAccessibleLabel: () => import_ganttMath.ganttTaskAccessibleLabel,
|
|
58
65
|
generateTicks: () => import_ganttMath.generateTicks,
|
|
66
|
+
isBoundedSpan: () => import_ganttMath.isBoundedSpan,
|
|
67
|
+
isEternalSpan: () => import_ganttMath.isEternalSpan,
|
|
59
68
|
layoutDayBlocks: () => import_calendarMath.layoutDayBlocks,
|
|
60
69
|
moveFocusDate: () => import_calendarMath.moveFocusDate,
|
|
61
70
|
moveFocusSlot: () => import_calendarMath.moveFocusSlot,
|
|
62
71
|
moveRangeToSlot: () => import_calendarMath.moveRangeToSlot,
|
|
63
72
|
normalizeSpanEdges: () => import_ganttMath.normalizeSpanEdges,
|
|
73
|
+
openBarGeometry: () => import_ganttMath.openBarGeometry,
|
|
74
|
+
openSpanExtent: () => import_ganttMath.openSpanExtent,
|
|
75
|
+
openSpanExtents: () => import_ganttMath.openSpanExtents,
|
|
76
|
+
openSpanLabelParts: () => import_ganttMath.openSpanLabelParts,
|
|
77
|
+
rangeDays: () => import_ganttMath.rangeDays,
|
|
64
78
|
renumberIdx: () => import_kanbanDnd.renumberIdx,
|
|
79
|
+
resizeSpanByDays: () => import_ganttMath.resizeSpanByDays,
|
|
65
80
|
resolveTrendColor: () => import_Dashboard.resolveTrendColor,
|
|
81
|
+
scrollAnchorX: () => import_ganttMath.scrollAnchorX,
|
|
66
82
|
shiftSpanByDays: () => import_ganttMath.shiftSpanByDays,
|
|
67
83
|
snapMinutes: () => import_calendarMath.snapMinutes,
|
|
84
|
+
spanInclusiveDays: () => import_ganttMath.spanInclusiveDays,
|
|
85
|
+
startOfDay: () => import_ganttMath.startOfDay,
|
|
68
86
|
todayLineX: () => import_ganttMath.todayLineX,
|
|
69
|
-
useListItemState: () => import_List.useListItemState
|
|
87
|
+
useListItemState: () => import_List.useListItemState,
|
|
88
|
+
xToDate: () => import_ganttMath.xToDate
|
|
70
89
|
});
|
|
71
90
|
module.exports = __toCommonJS(views_exports);
|
|
72
91
|
var import_List = require("./List.native.js");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__reExport","mod","secondTarget","__toCommonJS","value","views_exports","Calendar","import_Calendar","ChartCard","import_Dashboard","Dashboard","GanttView","import_Gantt","ImageGrid","import_ImageGrid","KPICard","Kanban","import_Kanban","List","import_List","ListCard","ListRow","ListRowMeta","ProgressCard","ReportBuilder","import_ReportBuilder","ShortcutCard","TreeView","import_TreeView","
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__reExport","mod","secondTarget","__toCommonJS","value","views_exports","Calendar","import_Calendar","ChartCard","import_Dashboard","Dashboard","GanttView","import_Gantt","ImageGrid","import_ImageGrid","KPICard","Kanban","import_Kanban","List","import_List","ListCard","ListRow","ListRowMeta","MS_PER_DAY","import_ganttMath","ProgressCard","ReportBuilder","import_ReportBuilder","ShortcutCard","TreeView","import_TreeView","addDays","aggregateData","barGeometry","calculatePercentageChange","calculateTrend","clampResizeDayDelta","computeEventMoveRange","computeGanttRange","computeResizeRange","import_calendarMath","createRangeFromDrag","dateLineX","dateToX","dayDiff","dxToDayDelta","eventAccessibleLabel","eventChipTextColor","findDayKeyAtPoint","formatRangeLabel","formatSpanLabel","formatTimeRangeLabel","ganttTaskAccessibleLabel","generateTicks","isBoundedSpan","isEternalSpan","layoutDayBlocks","moveFocusDate","moveFocusSlot","moveRangeToSlot","normalizeSpanEdges","openBarGeometry","openSpanExtent","openSpanExtents","openSpanLabelParts","rangeDays","renumberIdx","import_kanbanDnd","resizeSpanByDays","resolveTrendColor","scrollAnchorX","shiftSpanByDays","snapMinutes","spanInclusiveDays"],"sources":["../../../src/views/index.ts"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/components",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.8.0",
|
|
4
4
|
"description": "multiplatform.one ui components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -59,8 +59,10 @@
|
|
|
59
59
|
"@floating-ui/react": "^0.27.19",
|
|
60
60
|
"@phosphor-icons/react": "^2.1.10",
|
|
61
61
|
"@shopify/flash-list": "^2.3.1",
|
|
62
|
+
"@tamagui/core": "2.7.6",
|
|
62
63
|
"@tamagui/font-inter": "2.7.6",
|
|
63
64
|
"@tamagui/logo": "2.7.6",
|
|
65
|
+
"@tamagui/lucide-icons-2": "2.7.6",
|
|
64
66
|
"@tamagui/react-native-media-driver": "2.7.6",
|
|
65
67
|
"@tamagui/react-native-svg": "2.7.6",
|
|
66
68
|
"@tamagui/shorthands": "2.7.6",
|
|
@@ -75,11 +77,11 @@
|
|
|
75
77
|
"link": "^2.1.2",
|
|
76
78
|
"shiki": "^4.0.2",
|
|
77
79
|
"tamagui": "2.7.6",
|
|
78
|
-
"@multiplatform.one/
|
|
79
|
-
"@multiplatform.one/i18n": "7.
|
|
80
|
-
"@multiplatform.one/platform": "7.
|
|
81
|
-
"@multiplatform.one/
|
|
82
|
-
"@multiplatform.one/
|
|
80
|
+
"@multiplatform.one/router": "7.8.0",
|
|
81
|
+
"@multiplatform.one/i18n": "7.8.0",
|
|
82
|
+
"@multiplatform.one/platform": "7.8.0",
|
|
83
|
+
"@multiplatform.one/theme": "7.8.0",
|
|
84
|
+
"@multiplatform.one/forms": "7.8.0"
|
|
83
85
|
},
|
|
84
86
|
"devDependencies": {
|
|
85
87
|
"@tamagui/build": "2.7.6",
|
|
@@ -99,9 +101,9 @@
|
|
|
99
101
|
"react-native-svg": "15.15.4",
|
|
100
102
|
"react-native-web": "^0.21.2",
|
|
101
103
|
"vitest": "^4.1.5",
|
|
102
|
-
"@multiplatform.one/config": "7.
|
|
103
|
-
"@multiplatform.one/storybook": "7.
|
|
104
|
-
"@multiplatform.one/test-utils": "7.
|
|
104
|
+
"@multiplatform.one/config": "7.8.0",
|
|
105
|
+
"@multiplatform.one/storybook": "7.8.0",
|
|
106
|
+
"@multiplatform.one/test-utils": "7.8.0"
|
|
105
107
|
},
|
|
106
108
|
"peerDependencies": {
|
|
107
109
|
"@mdx-js/mdx": "^3.1.1",
|
package/src/Button.tsx
CHANGED
|
@@ -29,8 +29,16 @@ import {
|
|
|
29
29
|
type ButtonProps as FormsButtonProps,
|
|
30
30
|
} from "@multiplatform.one/forms";
|
|
31
31
|
|
|
32
|
-
/**
|
|
33
|
-
|
|
32
|
+
/**
|
|
33
|
+
* House Button API — the forms Button contract, plus the raw-tamagui `variant`
|
|
34
|
+
* this shim exists to translate.
|
|
35
|
+
*
|
|
36
|
+
* MPO-91: the forms Button now OMITS `variant`, because it never read it and an
|
|
37
|
+
* inherited-but-ignored prop is how 75 call sites rendered filled while asking
|
|
38
|
+
* for outlined. So the prop is declared HERE, where something actually
|
|
39
|
+
* consumes it, instead of being inherited from a component that drops it.
|
|
40
|
+
*/
|
|
41
|
+
export type ButtonProps = FormsButtonProps & { variant?: "outlined" };
|
|
34
42
|
|
|
35
43
|
export function Button({ variant, outlined, ...props }: ButtonProps) {
|
|
36
44
|
// Raw-tamagui prop-compat: `variant="outlined"` is tamagui Button API that
|
package/src/Card.spec.tsx
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { Preset, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
1
|
+
import { Preset, useResolvedKnobs, type Knobs } from "@multiplatform.one/theme";
|
|
2
2
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
-
import { cleanup } from "@testing-library/react";
|
|
6
|
-
import {
|
|
5
|
+
import { cleanup, render } from "@testing-library/react";
|
|
6
|
+
import { defaultConfig } from "@tamagui/config/v5";
|
|
7
|
+
import { Card as TamaguiCard, createTamagui, TamaguiProvider } from "tamagui";
|
|
7
8
|
import { afterEach, describe, expect, it } from "vitest";
|
|
8
9
|
import { Card, CardFooter, CardHeader } from "./Card";
|
|
9
10
|
|
|
11
|
+
const cardConfig = createTamagui(defaultConfig);
|
|
12
|
+
|
|
10
13
|
function readSibling(name: string) {
|
|
11
14
|
return readFileSync(join(import.meta.dirname, name), "utf8");
|
|
12
15
|
}
|
|
@@ -38,6 +41,75 @@ describe("Card R12 / LC-73 — NestedScale only, no Tint", () => {
|
|
|
38
41
|
describe("Card host data attributes", () => {
|
|
39
42
|
afterEach(cleanup);
|
|
40
43
|
|
|
44
|
+
for (const tier of ["content", "elevated"] as const) {
|
|
45
|
+
for (const [borderRadius, stop] of Object.entries({
|
|
46
|
+
none: 0,
|
|
47
|
+
small: 5,
|
|
48
|
+
medium: 9,
|
|
49
|
+
large: 16,
|
|
50
|
+
full: 50,
|
|
51
|
+
})) {
|
|
52
|
+
for (const [space, inset] of Object.entries({ small: 13, medium: 18, large: 32 })) {
|
|
53
|
+
it(`renders ${tier}/${borderRadius}/${space} with the documented cap`, () => {
|
|
54
|
+
const { container } = render(
|
|
55
|
+
<TamaguiProvider config={cardConfig} defaultTheme="light">
|
|
56
|
+
<Preset
|
|
57
|
+
overrides={{
|
|
58
|
+
borderRadius: borderRadius as Knobs["borderRadius"],
|
|
59
|
+
space: space as Knobs["space"],
|
|
60
|
+
density: "comfortable",
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
63
|
+
<Card tier={tier}>Measured Card</Card>
|
|
64
|
+
</Preset>
|
|
65
|
+
</TamaguiProvider>,
|
|
66
|
+
);
|
|
67
|
+
const frame = container.querySelector(`[data-tier="${tier}"]`)!;
|
|
68
|
+
const style = getComputedStyle(frame);
|
|
69
|
+
for (const corner of [
|
|
70
|
+
"borderTopLeftRadius",
|
|
71
|
+
"borderTopRightRadius",
|
|
72
|
+
"borderBottomRightRadius",
|
|
73
|
+
"borderBottomLeftRadius",
|
|
74
|
+
] as const) {
|
|
75
|
+
expect(style[corner]).toBe(`${Math.min(stop, inset)}px`);
|
|
76
|
+
}
|
|
77
|
+
for (const side of [
|
|
78
|
+
"paddingTop",
|
|
79
|
+
"paddingRight",
|
|
80
|
+
"paddingBottom",
|
|
81
|
+
"paddingLeft",
|
|
82
|
+
] as const) {
|
|
83
|
+
expect(style[side]).toBe(`${inset}px`);
|
|
84
|
+
}
|
|
85
|
+
expect(frame).toHaveAttribute("data-radius-knob", borderRadius);
|
|
86
|
+
expect(frame).toHaveAttribute("data-space-knob", space);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
it("does not reclassify the feature identity recipe as a capped container", () => {
|
|
93
|
+
const { container } = renderWithProviders(<Card tier="feature">Feature</Card>);
|
|
94
|
+
expect(container.querySelector('[data-tier="feature"]')).not.toHaveAttribute(
|
|
95
|
+
"data-constraint-container",
|
|
96
|
+
);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
it("declares effective nested radius and space without computing an audit verdict", () => {
|
|
100
|
+
const { container } = renderWithProviders(
|
|
101
|
+
<Preset overrides={{ borderRadius: "none", space: "large", density: "comfortable" }}>
|
|
102
|
+
<Preset overrides={{ borderRadius: "full", density: "compact" }}>
|
|
103
|
+
<Card tier="elevated">Nested</Card>
|
|
104
|
+
</Preset>
|
|
105
|
+
</Preset>,
|
|
106
|
+
);
|
|
107
|
+
const frame = container.querySelector('[data-tier="elevated"]');
|
|
108
|
+
expect(frame).toHaveAttribute("data-constraint-container", "Card");
|
|
109
|
+
expect(frame).toHaveAttribute("data-radius-knob", "full");
|
|
110
|
+
expect(frame).toHaveAttribute("data-space-knob", "medium");
|
|
111
|
+
});
|
|
112
|
+
|
|
41
113
|
it("writes tier, density, nested-scale and nested-px onto the frame", () => {
|
|
42
114
|
const { container } = renderWithProviders(
|
|
43
115
|
<Card>
|
|
@@ -49,6 +121,7 @@ describe("Card host data attributes", () => {
|
|
|
49
121
|
expect(frame.getAttribute("data-density")).toBe("comfortable");
|
|
50
122
|
expect(frame.getAttribute("data-nested-scale")).toBe("root");
|
|
51
123
|
expect(Number(frame.getAttribute("data-nested-px"))).toBeGreaterThan(0);
|
|
124
|
+
expect(frame.hasAttribute("dataset")).toBe(false);
|
|
52
125
|
});
|
|
53
126
|
|
|
54
127
|
it("elevated and feature tiers stamp data-tier", () => {
|
package/src/Card.stories.tsx
CHANGED
|
@@ -61,7 +61,7 @@ export const WithHeaderFooter: Story = {
|
|
|
61
61
|
<Paragraph>Main content between header and footer.</Paragraph>
|
|
62
62
|
<Card.Footer>
|
|
63
63
|
<XStack gap="$2">
|
|
64
|
-
<Button
|
|
64
|
+
<Button>Cancel</Button>
|
|
65
65
|
<Button>Confirm</Button>
|
|
66
66
|
</XStack>
|
|
67
67
|
</Card.Footer>
|
package/src/Card.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Preset, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
1
|
+
import { Preset, borderRadiusMap, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
3
|
import { CardFooter } from "./CardFooter";
|
|
4
4
|
import { CardHeader } from "./CardHeader";
|
|
@@ -69,6 +69,11 @@ function CardRoot({ children, tier = "content", ...props }: CardProps) {
|
|
|
69
69
|
? knobProps.featureSurface
|
|
70
70
|
: knobProps.cardSurface;
|
|
71
71
|
const nested = knobProps.density === "compact";
|
|
72
|
+
// Decode the uncapped token through the canonical map. This preserves the
|
|
73
|
+
// effective nested knob without asserting anything about the painted cap.
|
|
74
|
+
const radiusKnob = Object.entries(borderRadiusMap).find(
|
|
75
|
+
([, token]) => token === knobProps.borderRadius.borderRadius,
|
|
76
|
+
)?.[0];
|
|
72
77
|
// panelPadding first so tier recipes may override (feature uses a larger
|
|
73
78
|
// inset); elevatedSurface carries no padding of its own.
|
|
74
79
|
return (
|
|
@@ -81,6 +86,13 @@ function CardRoot({ children, tier = "content", ...props }: CardProps) {
|
|
|
81
86
|
"data-density": knobProps.density,
|
|
82
87
|
"data-nested-scale": nested ? "nested" : "root",
|
|
83
88
|
"data-nested-px": String(knobProps.nestedControl.px),
|
|
89
|
+
...(tier !== "feature" && radiusKnob
|
|
90
|
+
? {
|
|
91
|
+
"data-constraint-container": "Card",
|
|
92
|
+
"data-radius-knob": radiusKnob,
|
|
93
|
+
"data-space-knob": knobProps.space,
|
|
94
|
+
}
|
|
95
|
+
: {}),
|
|
84
96
|
})}
|
|
85
97
|
{...props}
|
|
86
98
|
>
|
|
@@ -31,7 +31,7 @@ export const Default: Story = {
|
|
|
31
31
|
<Card.Footer>
|
|
32
32
|
Ready to submit
|
|
33
33
|
<XStack gap="$2">
|
|
34
|
-
<Button
|
|
34
|
+
<Button>Cancel</Button>
|
|
35
35
|
<Button>Confirm</Button>
|
|
36
36
|
</XStack>
|
|
37
37
|
</Card.Footer>
|
|
@@ -55,12 +55,8 @@ export const ManyActionsNarrow: Story = {
|
|
|
55
55
|
<Paragraph>Narrow card body.</Paragraph>
|
|
56
56
|
<Card.Footer>
|
|
57
57
|
<XStack gap="$2" flexWrap="wrap">
|
|
58
|
-
<Button size="$2"
|
|
59
|
-
|
|
60
|
-
</Button>
|
|
61
|
-
<Button size="$2" variant="outlined">
|
|
62
|
-
Another action
|
|
63
|
-
</Button>
|
|
58
|
+
<Button size="$2">A very long action label</Button>
|
|
59
|
+
<Button size="$2">Another action</Button>
|
|
64
60
|
<Button size="$2">Primary confirm</Button>
|
|
65
61
|
</XStack>
|
|
66
62
|
</Card.Footer>
|
package/src/CardFooter.tsx
CHANGED
|
@@ -8,7 +8,8 @@ import { wrapBareTextChildren } from "./shared/textRidesText";
|
|
|
8
8
|
*
|
|
9
9
|
* Nested hue is opt-in on the Card frame (R12) — this part does not wrap Tint.
|
|
10
10
|
* NestedScale stays on Card (LC-73). This host is a zero-padding slot
|
|
11
|
-
* (LC-09);
|
|
11
|
+
* (LC-09); children own their row layout and wrap within the card width.
|
|
12
|
+
* T-BODY rides caption TEXT nodes (LC-82 / R7), never the View.
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
export type CardFooterProps = ViewProps & { children?: ReactNode };
|
|
@@ -34,6 +35,7 @@ export function CardFooter({ children, ...props }: CardFooterProps) {
|
|
|
34
35
|
return (
|
|
35
36
|
<TamaguiCard.Footer
|
|
36
37
|
padding={0}
|
|
38
|
+
flexDirection="column"
|
|
37
39
|
{...knobProps.gap}
|
|
38
40
|
{...hostData({ "data-slot": "footer" })}
|
|
39
41
|
{...props}
|
|
@@ -40,9 +40,7 @@ export const WithActions: Story = {
|
|
|
40
40
|
<Card.Header>
|
|
41
41
|
<XStack justifyContent="space-between" alignItems="center" gap="$2" flexWrap="wrap">
|
|
42
42
|
<SizableText fontWeight="700">Header with actions</SizableText>
|
|
43
|
-
<Button size="$2"
|
|
44
|
-
Edit
|
|
45
|
-
</Button>
|
|
43
|
+
<Button size="$2">Edit</Button>
|
|
46
44
|
</XStack>
|
|
47
45
|
</Card.Header>
|
|
48
46
|
</Card>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
import { Button } from "@multiplatform.one/forms";
|
|
3
|
-
import { Text
|
|
4
|
-
import { Collapsible } from "./tamagui";
|
|
3
|
+
import { Text } from "./Text";
|
|
4
|
+
import { Collapsible, YStack } from "./tamagui";
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof Collapsible> = {
|
|
7
7
|
title: "Components/Collapsible",
|
|
@@ -3,6 +3,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
|
3
3
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
4
4
|
import { getToasts, resetToasts } from "../Toast/store";
|
|
5
5
|
import { getFeedback, resetFeedback } from "../feedback/store";
|
|
6
|
+
import { NotifyHost } from "../feedback";
|
|
6
7
|
import { CopyField } from "./index";
|
|
7
8
|
|
|
8
9
|
function copyOf(container: HTMLElement) {
|
|
@@ -35,13 +36,16 @@ describe("CopyField", () => {
|
|
|
35
36
|
const copy = copyOf(result.container);
|
|
36
37
|
if (!copy) throw new Error("copy not found");
|
|
37
38
|
expect(copy.getAttribute("tabindex")).toBe("0");
|
|
39
|
+
expect(copy.getAttribute("aria-label")).toBe("Copy to clipboard");
|
|
38
40
|
expect(copy.className).toMatch(/mp-chip-dismiss/);
|
|
39
41
|
expect(copy.querySelector(".mp-chip-dismiss-ring")).not.toBeNull();
|
|
40
42
|
});
|
|
41
43
|
|
|
42
44
|
it("success routes through notify() as a one-line past-tense toast", async () => {
|
|
43
45
|
const result = renderWithProviders(
|
|
44
|
-
<
|
|
46
|
+
<NotifyHost>
|
|
47
|
+
<CopyField label="API token" value="mpo_live_4f2a9c81e0b3" />
|
|
48
|
+
</NotifyHost>,
|
|
45
49
|
);
|
|
46
50
|
const copy = copyOf(result.container);
|
|
47
51
|
if (!copy) throw new Error("copy not found");
|
|
@@ -54,6 +58,11 @@ describe("CopyField", () => {
|
|
|
54
58
|
expect(toast?.title).not.toMatch(/success/i);
|
|
55
59
|
expect(getFeedback()).toHaveLength(0);
|
|
56
60
|
expect(copyOf(result.container)?.querySelector(".mp-chip-dismiss-ring")).not.toBeNull();
|
|
61
|
+
expect(await result.findByText("Copied to clipboard.")).toBeInTheDocument();
|
|
62
|
+
await vi.waitFor(() => {
|
|
63
|
+
const live = document.querySelector("[aria-live]:not([aria-live='off'])");
|
|
64
|
+
expect(live?.textContent ?? "").toMatch(/Copied to clipboard/);
|
|
65
|
+
});
|
|
57
66
|
});
|
|
58
67
|
|
|
59
68
|
it("failure is a field-scoped inline alert and never a toast", async () => {
|
|
@@ -72,5 +81,61 @@ describe("CopyField", () => {
|
|
|
72
81
|
expect(alert?.scope).toBe("field");
|
|
73
82
|
expect(alert?.body).toBe("Copy failed.");
|
|
74
83
|
expect(alert?.body).not.toMatch(/success/i);
|
|
84
|
+
expect(await result.findByText("Copy failed.")).toBeInTheDocument();
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("shows a failed copy only beside its own field and clears it after success", async () => {
|
|
88
|
+
const result = renderWithProviders(
|
|
89
|
+
<>
|
|
90
|
+
<div data-testid="first-copy">
|
|
91
|
+
<CopyField label="First token" value="first" />
|
|
92
|
+
</div>
|
|
93
|
+
<div data-testid="second-copy">
|
|
94
|
+
<CopyField label="Second token" value="second" />
|
|
95
|
+
</div>
|
|
96
|
+
</>,
|
|
97
|
+
);
|
|
98
|
+
const first = result.getByTestId("first-copy");
|
|
99
|
+
const second = result.getByTestId("second-copy");
|
|
100
|
+
writeText.mockRejectedValueOnce(new Error("Denied"));
|
|
101
|
+
fireEvent.click(copyOf(first)!);
|
|
102
|
+
await vi.waitFor(() => expect(first.textContent).toContain("Copy failed."));
|
|
103
|
+
expect(second.textContent).not.toContain("Copy failed.");
|
|
104
|
+
writeText.mockRejectedValueOnce(new Error("Denied"));
|
|
105
|
+
fireEvent.click(copyOf(second)!);
|
|
106
|
+
await vi.waitFor(() => expect(second.textContent).toContain("Copy failed."));
|
|
107
|
+
fireEvent.click(copyOf(first)!);
|
|
108
|
+
await vi.waitFor(() => expect(first.textContent).not.toContain("Copy failed."));
|
|
109
|
+
expect(second.textContent).toContain("Copy failed.");
|
|
110
|
+
expect(getToasts()).toHaveLength(1);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it("replaces repeated failures and removes its feedback on unmount", async () => {
|
|
114
|
+
writeText.mockRejectedValue(new Error("Denied"));
|
|
115
|
+
const result = renderWithProviders(<CopyField label="Token" value="first" />);
|
|
116
|
+
fireEvent.click(copyOf(result.container)!);
|
|
117
|
+
await vi.waitFor(() => expect(getFeedback()).toHaveLength(1));
|
|
118
|
+
fireEvent.click(copyOf(result.container)!);
|
|
119
|
+
await vi.waitFor(() => expect(writeText).toHaveBeenCalledTimes(2));
|
|
120
|
+
expect(result.getAllByText("Copy failed.")).toHaveLength(1);
|
|
121
|
+
expect(getFeedback()).toHaveLength(1);
|
|
122
|
+
result.unmount();
|
|
123
|
+
expect(getFeedback()).toHaveLength(0);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it("ignores a clipboard result after its field unmounts", async () => {
|
|
127
|
+
let rejectCopy!: (reason: Error) => void;
|
|
128
|
+
writeText.mockReturnValue(
|
|
129
|
+
new Promise((_, reject) => {
|
|
130
|
+
rejectCopy = reject;
|
|
131
|
+
}),
|
|
132
|
+
);
|
|
133
|
+
const result = renderWithProviders(<CopyField label="Token" value="first" />);
|
|
134
|
+
fireEvent.click(copyOf(result.container)!);
|
|
135
|
+
result.unmount();
|
|
136
|
+
rejectCopy(new Error("Denied"));
|
|
137
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
138
|
+
expect(getFeedback()).toHaveLength(0);
|
|
139
|
+
expect(getToasts()).toHaveLength(0);
|
|
75
140
|
});
|
|
76
141
|
});
|
package/src/CopyField/index.tsx
CHANGED
|
@@ -12,15 +12,16 @@
|
|
|
12
12
|
import { Input, type InputProps } from "@multiplatform.one/forms";
|
|
13
13
|
import { YStack } from "tamagui";
|
|
14
14
|
import { NotifyRegion } from "../feedback/NotifyHost";
|
|
15
|
-
import {
|
|
15
|
+
import { useCopyFeedback } from "../feedback/copy";
|
|
16
16
|
|
|
17
17
|
export type CopyFieldProps = Omit<InputProps, "copy" | "onCopyResult" | "secureTextEntry">;
|
|
18
18
|
|
|
19
19
|
export function CopyField(props: CopyFieldProps) {
|
|
20
|
+
const { region, report } = useCopyFeedback();
|
|
20
21
|
return (
|
|
21
22
|
<YStack width="100%">
|
|
22
|
-
<Input {...props} readOnly copy onCopyResult={
|
|
23
|
-
<NotifyRegion scope="field" compact />
|
|
23
|
+
<Input {...props} readOnly copy onCopyResult={report} />
|
|
24
|
+
<NotifyRegion scope="field" region={region} compact />
|
|
24
25
|
</YStack>
|
|
25
26
|
);
|
|
26
27
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { act, fireEvent, waitFor } from "@testing-library/react";
|
|
2
3
|
import { __resetDevWarnSeen } from "@multiplatform.one/theme";
|
|
3
4
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
4
5
|
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
@@ -509,3 +510,113 @@ describe("DropdownMenu FloatingPanel cover contract", () => {
|
|
|
509
510
|
expect(edit.getAttribute("data-mp-ring-offset")).toBe("0");
|
|
510
511
|
});
|
|
511
512
|
});
|
|
513
|
+
|
|
514
|
+
describe("DropdownMenu.Content onCloseAutoFocus (MPO-29)", () => {
|
|
515
|
+
for (const preventRestore of [false, true]) {
|
|
516
|
+
it(`${preventRestore ? "suppresses" : "performs"} actual delayed trigger restoration on Escape`, async () => {
|
|
517
|
+
const onCloseAutoFocus = vi.fn((event) => {
|
|
518
|
+
if (preventRestore) event.preventDefault();
|
|
519
|
+
});
|
|
520
|
+
const result = renderWithProviders(
|
|
521
|
+
<DropdownMenu>
|
|
522
|
+
<DropdownMenu.Trigger asChild>
|
|
523
|
+
<Button>Heading</Button>
|
|
524
|
+
</DropdownMenu.Trigger>
|
|
525
|
+
<DropdownMenu.Content onCloseAutoFocus={onCloseAutoFocus}>
|
|
526
|
+
<DropdownMenu.Item>H1</DropdownMenu.Item>
|
|
527
|
+
</DropdownMenu.Content>
|
|
528
|
+
</DropdownMenu>,
|
|
529
|
+
);
|
|
530
|
+
const trigger = result.getByText("Heading").closest("button")!;
|
|
531
|
+
trigger.focus();
|
|
532
|
+
fireEvent.click(trigger);
|
|
533
|
+
await waitFor(() => expect(document.querySelector('[role="menuitem"]')).toBeTruthy());
|
|
534
|
+
const item = document.querySelector('[role="menuitem"]') as HTMLElement;
|
|
535
|
+
item.focus();
|
|
536
|
+
fireEvent.keyDown(item, { key: "Escape" });
|
|
537
|
+
await waitFor(() => expect(document.querySelector('[role="menu"]')).toBeFalsy());
|
|
538
|
+
await act(() => new Promise((resolve) => setTimeout(resolve, 400)));
|
|
539
|
+
expect(onCloseAutoFocus).toHaveBeenCalledTimes(1);
|
|
540
|
+
if (preventRestore) expect(document.activeElement).not.toBe(trigger);
|
|
541
|
+
else expect(document.activeElement).toBe(trigger);
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
it("fires once when an item select closes the menu", async () => {
|
|
546
|
+
const onCloseAutoFocus = vi.fn();
|
|
547
|
+
renderWithProviders(
|
|
548
|
+
<DropdownMenu defaultOpen>
|
|
549
|
+
<DropdownMenu.Trigger asChild>
|
|
550
|
+
<Button>Actions</Button>
|
|
551
|
+
</DropdownMenu.Trigger>
|
|
552
|
+
<DropdownMenu.Content onCloseAutoFocus={onCloseAutoFocus}>
|
|
553
|
+
<DropdownMenu.Item>Edit</DropdownMenu.Item>
|
|
554
|
+
</DropdownMenu.Content>
|
|
555
|
+
</DropdownMenu>,
|
|
556
|
+
);
|
|
557
|
+
await waitFor(() => {
|
|
558
|
+
expect(document.querySelector('[role="menu"]')).toBeTruthy();
|
|
559
|
+
});
|
|
560
|
+
fireEvent.click(document.querySelector('[role="menuitem"]') as HTMLElement);
|
|
561
|
+
await waitFor(() => {
|
|
562
|
+
expect(document.querySelector('[role="menu"]')).toBeFalsy();
|
|
563
|
+
});
|
|
564
|
+
expect(onCloseAutoFocus).toHaveBeenCalledTimes(1);
|
|
565
|
+
const event = onCloseAutoFocus.mock.calls[0][0] as {
|
|
566
|
+
preventDefault: () => void;
|
|
567
|
+
defaultPrevented: boolean;
|
|
568
|
+
};
|
|
569
|
+
expect(event.defaultPrevented).toBe(false);
|
|
570
|
+
event.preventDefault();
|
|
571
|
+
expect(event.defaultPrevented).toBe(true);
|
|
572
|
+
});
|
|
573
|
+
|
|
574
|
+
it("fires once when a closeOnSelect=false item closes via the parent open state", async () => {
|
|
575
|
+
// HeadingPicker / ListPicker / MoreDropdown: they keep closeOnSelect
|
|
576
|
+
// false so the item does not ctx.close(), then they setOpen(false)
|
|
577
|
+
// themselves after executeCommand. That is a controlled close, not
|
|
578
|
+
// ctx.close() and not FloatingPanel dismissing on its own.
|
|
579
|
+
const onCloseAutoFocus = vi.fn();
|
|
580
|
+
function Harness() {
|
|
581
|
+
const [open, setOpen] = useState(true);
|
|
582
|
+
return (
|
|
583
|
+
<DropdownMenu open={open} onOpenChange={setOpen}>
|
|
584
|
+
<DropdownMenu.Trigger asChild>
|
|
585
|
+
<Button>Heading</Button>
|
|
586
|
+
</DropdownMenu.Trigger>
|
|
587
|
+
<DropdownMenu.Content onCloseAutoFocus={onCloseAutoFocus}>
|
|
588
|
+
<DropdownMenu.Item closeOnSelect={false} onSelect={() => setOpen(false)}>
|
|
589
|
+
H1
|
|
590
|
+
</DropdownMenu.Item>
|
|
591
|
+
</DropdownMenu.Content>
|
|
592
|
+
</DropdownMenu>
|
|
593
|
+
);
|
|
594
|
+
}
|
|
595
|
+
renderWithProviders(<Harness />);
|
|
596
|
+
await waitFor(() => {
|
|
597
|
+
expect(document.querySelector('[role="menu"]')).toBeTruthy();
|
|
598
|
+
});
|
|
599
|
+
fireEvent.click(document.querySelector('[role="menuitem"]') as HTMLElement);
|
|
600
|
+
await waitFor(() => {
|
|
601
|
+
expect(document.querySelector('[role="menu"]')).toBeFalsy();
|
|
602
|
+
});
|
|
603
|
+
expect(onCloseAutoFocus).toHaveBeenCalledTimes(1);
|
|
604
|
+
});
|
|
605
|
+
|
|
606
|
+
it("puts Content aria-label on the role=menu node", async () => {
|
|
607
|
+
renderWithProviders(
|
|
608
|
+
<DropdownMenu defaultOpen>
|
|
609
|
+
<DropdownMenu.Trigger asChild>
|
|
610
|
+
<Button>Status</Button>
|
|
611
|
+
</DropdownMenu.Trigger>
|
|
612
|
+
<DropdownMenu.Content aria-label="Status">
|
|
613
|
+
<DropdownMenu.Item>Open</DropdownMenu.Item>
|
|
614
|
+
</DropdownMenu.Content>
|
|
615
|
+
</DropdownMenu>,
|
|
616
|
+
);
|
|
617
|
+
await waitFor(() => {
|
|
618
|
+
expect(document.querySelector('[role="menu"]')).toBeTruthy();
|
|
619
|
+
});
|
|
620
|
+
expect(document.querySelector('[role="menu"]')?.getAttribute("aria-label")).toBe("Status");
|
|
621
|
+
});
|
|
622
|
+
});
|
|
@@ -220,9 +220,7 @@ export const Controlled: Story = {
|
|
|
220
220
|
>
|
|
221
221
|
<Button>Controlled menu</Button>
|
|
222
222
|
</DropdownMenu>
|
|
223
|
-
<Button
|
|
224
|
-
Toggle from outside
|
|
225
|
-
</Button>
|
|
223
|
+
<Button onPress={() => setOpen(!open)}>Toggle from outside</Button>
|
|
226
224
|
</XStack>
|
|
227
225
|
<Text color="$color11" fontSize="$2">
|
|
228
226
|
{last ? `Last action: ${last}` : "No action selected yet"}
|