@multiplatform.one/components 6.4.2 → 6.6.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/Alert/index.native.js.map +1 -1
- package/dist/cjs/Avatar/index.cjs +4 -0
- package/dist/cjs/Avatar/index.native.js +4 -0
- package/dist/cjs/Avatar/index.native.js.map +1 -1
- package/dist/cjs/Badge/index.cjs +3 -0
- package/dist/cjs/Badge/index.native.js +3 -0
- package/dist/cjs/Badge/index.native.js.map +1 -1
- package/dist/cjs/Carousel/index.cjs +29 -16
- package/dist/cjs/Carousel/index.native.js +35 -18
- package/dist/cjs/Carousel/index.native.js.map +1 -1
- package/dist/cjs/DotIndicator/index.cjs +95 -36
- package/dist/cjs/DotIndicator/index.native.js +96 -36
- package/dist/cjs/DotIndicator/index.native.js.map +1 -1
- package/dist/cjs/Pagination.cjs +112 -163
- package/dist/cjs/Pagination.native.js +125 -176
- package/dist/cjs/Pagination.native.js.map +1 -1
- package/dist/cjs/ProgressSteps/index.cjs +5 -3
- package/dist/cjs/ProgressSteps/index.native.js +5 -3
- package/dist/cjs/ProgressSteps/index.native.js.map +1 -1
- package/dist/cjs/Wheel/index.cjs +1 -1
- package/dist/cjs/Wheel/index.native.js +1 -1
- package/dist/cjs/Wheel/index.native.js.map +1 -1
- package/dist/cjs/charts/Axis.cjs +1 -1
- package/dist/cjs/charts/Axis.native.js +1 -1
- package/dist/cjs/charts/Axis.native.js.map +1 -1
- package/dist/cjs/charts/BarChart.cjs +1 -1
- package/dist/cjs/charts/BarChart.native.js +1 -3
- package/dist/cjs/charts/BarChart.native.js.map +1 -1
- package/dist/cjs/charts/LineChart.cjs +1 -1
- package/dist/cjs/charts/LineChart.native.js +1 -3
- package/dist/cjs/charts/LineChart.native.js.map +1 -1
- package/dist/cjs/charts/PieChart.cjs +3 -2
- package/dist/cjs/charts/PieChart.native.js +9 -5
- package/dist/cjs/charts/PieChart.native.js.map +1 -1
- package/dist/cjs/charts/accessibility.native.js.map +1 -1
- package/dist/cjs/charts/index.cjs +1 -0
- package/dist/cjs/charts/index.native.js +1 -0
- package/dist/cjs/charts/index.native.js.map +1 -1
- package/dist/cjs/charts/math.cjs +6 -1
- package/dist/cjs/charts/math.native.js +6 -1
- package/dist/cjs/charts/math.native.js.map +1 -1
- package/dist/cjs/componentColors.cjs +11 -3
- package/dist/cjs/componentColors.native.js +11 -3
- package/dist/cjs/componentColors.native.js.map +1 -1
- package/dist/cjs/feedback/ConfirmDialog.cjs +1 -3
- package/dist/cjs/feedback/ConfirmDialog.native.js +1 -3
- package/dist/cjs/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/index.native.js +1 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/layouts/ViewSwitcher.cjs +19 -0
- package/dist/cjs/layouts/ViewSwitcher.native.js +33 -0
- package/dist/cjs/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/cjs/layouts/attachments.cjs +4 -8
- package/dist/cjs/layouts/attachments.native.js +5 -8
- package/dist/cjs/layouts/attachments.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +3 -4
- package/dist/cjs/layouts/page.native.js +6 -5
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/tags.cjs +1 -0
- package/dist/cjs/layouts/tags.native.js +2 -0
- package/dist/cjs/layouts/tags.native.js.map +1 -1
- package/dist/cjs/layouts/timeline.cjs +0 -6
- package/dist/cjs/layouts/timeline.native.js +0 -6
- package/dist/cjs/layouts/timeline.native.js.map +1 -1
- package/dist/cjs/surfaces.cjs +21 -0
- package/dist/cjs/surfaces.native.js +22 -0
- package/dist/cjs/surfaces.native.js.map +1 -1
- package/dist/cjs/views/Calendar.cjs +15 -38
- package/dist/cjs/views/Calendar.native.js +21 -44
- package/dist/cjs/views/Calendar.native.js.map +1 -1
- package/dist/cjs/views/Dashboard.cjs +10 -10
- package/dist/cjs/views/Dashboard.native.js +12 -10
- package/dist/cjs/views/Dashboard.native.js.map +1 -1
- package/dist/cjs/views/Kanban.cjs +22 -13
- package/dist/cjs/views/Kanban.native.js +1 -0
- package/dist/cjs/views/Kanban.native.js.map +1 -1
- package/dist/cjs/views/ReportBuilder.cjs +29 -11
- package/dist/cjs/views/ReportBuilder.native.js +29 -11
- package/dist/cjs/views/ReportBuilder.native.js.map +1 -1
- package/dist/cjs/views/TreeView.cjs +1 -1
- package/dist/cjs/views/TreeView.native.js +1 -1
- package/dist/cjs/views/TreeView.native.js.map +1 -1
- package/dist/cjs/views/calendarMath.cjs +3 -9
- package/dist/cjs/views/calendarMath.native.js +3 -9
- package/dist/cjs/views/calendarMath.native.js.map +1 -1
- package/dist/cjs/views/ganttMath.cjs +14 -19
- package/dist/cjs/views/ganttMath.native.js +21 -20
- package/dist/cjs/views/ganttMath.native.js.map +1 -1
- package/dist/esm/Accordion/index.mjs.map +1 -1
- package/dist/esm/Alert/index.mjs.map +1 -1
- package/dist/esm/Alert/index.native.js.map +1 -1
- package/dist/esm/Avatar/index.mjs +5 -1
- package/dist/esm/Avatar/index.mjs.map +1 -1
- package/dist/esm/Avatar/index.native.js +5 -1
- package/dist/esm/Avatar/index.native.js.map +1 -1
- package/dist/esm/Badge/index.mjs +4 -1
- package/dist/esm/Badge/index.mjs.map +1 -1
- package/dist/esm/Badge/index.native.js +4 -1
- package/dist/esm/Badge/index.native.js.map +1 -1
- package/dist/esm/Carousel/index.mjs +29 -16
- package/dist/esm/Carousel/index.mjs.map +1 -1
- package/dist/esm/Carousel/index.native.js +35 -18
- package/dist/esm/Carousel/index.native.js.map +1 -1
- package/dist/esm/DotIndicator/index.mjs +96 -37
- package/dist/esm/DotIndicator/index.mjs.map +1 -1
- package/dist/esm/DotIndicator/index.native.js +97 -37
- package/dist/esm/DotIndicator/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.mjs.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js.map +1 -1
- package/dist/esm/Pagination.mjs +113 -164
- package/dist/esm/Pagination.mjs.map +1 -1
- package/dist/esm/Pagination.native.js +126 -177
- package/dist/esm/Pagination.native.js.map +1 -1
- package/dist/esm/ProgressSteps/index.mjs +6 -4
- package/dist/esm/ProgressSteps/index.mjs.map +1 -1
- package/dist/esm/ProgressSteps/index.native.js +6 -4
- package/dist/esm/ProgressSteps/index.native.js.map +1 -1
- package/dist/esm/Wheel/index.mjs +1 -1
- package/dist/esm/Wheel/index.mjs.map +1 -1
- package/dist/esm/Wheel/index.native.js +1 -1
- package/dist/esm/Wheel/index.native.js.map +1 -1
- package/dist/esm/charts/Axis.mjs +2 -2
- package/dist/esm/charts/Axis.mjs.map +1 -1
- package/dist/esm/charts/Axis.native.js +2 -2
- package/dist/esm/charts/Axis.native.js.map +1 -1
- package/dist/esm/charts/BarChart.mjs +2 -2
- package/dist/esm/charts/BarChart.mjs.map +1 -1
- package/dist/esm/charts/BarChart.native.js +2 -4
- package/dist/esm/charts/BarChart.native.js.map +1 -1
- package/dist/esm/charts/LineChart.mjs +2 -2
- package/dist/esm/charts/LineChart.mjs.map +1 -1
- package/dist/esm/charts/LineChart.native.js +2 -4
- package/dist/esm/charts/LineChart.native.js.map +1 -1
- package/dist/esm/charts/PieChart.mjs +3 -2
- package/dist/esm/charts/PieChart.mjs.map +1 -1
- package/dist/esm/charts/PieChart.native.js +9 -5
- package/dist/esm/charts/PieChart.native.js.map +1 -1
- package/dist/esm/charts/accessibility.mjs.map +1 -1
- package/dist/esm/charts/accessibility.native.js.map +1 -1
- package/dist/esm/charts/index.mjs +2 -2
- package/dist/esm/charts/index.mjs.map +1 -1
- package/dist/esm/charts/index.native.js +2 -2
- package/dist/esm/charts/index.native.js.map +1 -1
- package/dist/esm/charts/math.mjs +6 -2
- package/dist/esm/charts/math.mjs.map +1 -1
- package/dist/esm/charts/math.native.js +6 -2
- package/dist/esm/charts/math.native.js.map +1 -1
- package/dist/esm/componentColors.mjs +11 -3
- package/dist/esm/componentColors.mjs.map +1 -1
- package/dist/esm/componentColors.native.js +11 -3
- package/dist/esm/componentColors.native.js.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.mjs +2 -4
- package/dist/esm/feedback/ConfirmDialog.mjs.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.native.js +2 -4
- package/dist/esm/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +2 -2
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/layouts/ViewSwitcher.mjs +20 -1
- package/dist/esm/layouts/ViewSwitcher.mjs.map +1 -1
- package/dist/esm/layouts/ViewSwitcher.native.js +34 -1
- package/dist/esm/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/esm/layouts/attachments.mjs +4 -8
- package/dist/esm/layouts/attachments.mjs.map +1 -1
- package/dist/esm/layouts/attachments.native.js +5 -8
- package/dist/esm/layouts/attachments.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +4 -5
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +7 -6
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/tags.mjs +1 -0
- package/dist/esm/layouts/tags.mjs.map +1 -1
- package/dist/esm/layouts/tags.native.js +2 -0
- package/dist/esm/layouts/tags.native.js.map +1 -1
- package/dist/esm/layouts/timeline.mjs +0 -6
- package/dist/esm/layouts/timeline.mjs.map +1 -1
- package/dist/esm/layouts/timeline.native.js +0 -6
- package/dist/esm/layouts/timeline.native.js.map +1 -1
- package/dist/esm/surfaces.mjs +21 -1
- package/dist/esm/surfaces.mjs.map +1 -1
- package/dist/esm/surfaces.native.js +22 -1
- package/dist/esm/surfaces.native.js.map +1 -1
- package/dist/esm/views/Calendar.mjs +6 -29
- package/dist/esm/views/Calendar.mjs.map +1 -1
- package/dist/esm/views/Calendar.native.js +12 -35
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/Dashboard.mjs +12 -12
- package/dist/esm/views/Dashboard.mjs.map +1 -1
- package/dist/esm/views/Dashboard.native.js +14 -12
- package/dist/esm/views/Dashboard.native.js.map +1 -1
- package/dist/esm/views/Kanban.mjs +23 -14
- package/dist/esm/views/Kanban.mjs.map +1 -1
- package/dist/esm/views/Kanban.native.js +2 -1
- package/dist/esm/views/Kanban.native.js.map +1 -1
- package/dist/esm/views/ReportBuilder.mjs +30 -12
- package/dist/esm/views/ReportBuilder.mjs.map +1 -1
- package/dist/esm/views/ReportBuilder.native.js +30 -12
- package/dist/esm/views/ReportBuilder.native.js.map +1 -1
- package/dist/esm/views/TreeView.mjs +1 -1
- package/dist/esm/views/TreeView.mjs.map +1 -1
- package/dist/esm/views/TreeView.native.js +1 -1
- package/dist/esm/views/TreeView.native.js.map +1 -1
- package/dist/esm/views/calendarMath.mjs +3 -9
- package/dist/esm/views/calendarMath.mjs.map +1 -1
- package/dist/esm/views/calendarMath.native.js +3 -9
- package/dist/esm/views/calendarMath.native.js.map +1 -1
- package/dist/esm/views/ganttMath.mjs +14 -19
- package/dist/esm/views/ganttMath.mjs.map +1 -1
- package/dist/esm/views/ganttMath.native.js +21 -20
- package/dist/esm/views/ganttMath.native.js.map +1 -1
- package/dist/esm/views/kanbanDnd.mjs.map +1 -1
- package/dist/jsx/Accordion/index.mjs.map +1 -1
- package/dist/jsx/Alert/index.mjs.map +1 -1
- package/dist/jsx/Alert/index.native.js.map +1 -1
- package/dist/jsx/Avatar/index.mjs +5 -1
- package/dist/jsx/Avatar/index.mjs.map +1 -1
- package/dist/jsx/Avatar/index.native.js +4 -0
- package/dist/jsx/Avatar/index.native.js.map +1 -1
- package/dist/jsx/Badge/index.mjs +4 -1
- package/dist/jsx/Badge/index.mjs.map +1 -1
- package/dist/jsx/Badge/index.native.js +3 -0
- package/dist/jsx/Badge/index.native.js.map +1 -1
- package/dist/jsx/Carousel/index.mjs +29 -16
- package/dist/jsx/Carousel/index.mjs.map +1 -1
- package/dist/jsx/Carousel/index.native.js +35 -18
- package/dist/jsx/Carousel/index.native.js.map +1 -1
- package/dist/jsx/DotIndicator/index.mjs +96 -37
- package/dist/jsx/DotIndicator/index.mjs.map +1 -1
- package/dist/jsx/DotIndicator/index.native.js +96 -36
- package/dist/jsx/DotIndicator/index.native.js.map +1 -1
- package/dist/jsx/DropdownMenu/index.mjs.map +1 -1
- package/dist/jsx/Pagination.mjs +113 -164
- package/dist/jsx/Pagination.mjs.map +1 -1
- package/dist/jsx/Pagination.native.js +125 -176
- package/dist/jsx/Pagination.native.js.map +1 -1
- package/dist/jsx/ProgressSteps/index.mjs +6 -4
- package/dist/jsx/ProgressSteps/index.mjs.map +1 -1
- package/dist/jsx/ProgressSteps/index.native.js +5 -3
- package/dist/jsx/ProgressSteps/index.native.js.map +1 -1
- package/dist/jsx/Wheel/index.mjs +1 -1
- package/dist/jsx/Wheel/index.mjs.map +1 -1
- package/dist/jsx/Wheel/index.native.js +1 -1
- package/dist/jsx/Wheel/index.native.js.map +1 -1
- package/dist/jsx/charts/Axis.mjs +2 -2
- package/dist/jsx/charts/Axis.mjs.map +1 -1
- package/dist/jsx/charts/Axis.native.js +1 -1
- package/dist/jsx/charts/Axis.native.js.map +1 -1
- package/dist/jsx/charts/BarChart.mjs +2 -2
- package/dist/jsx/charts/BarChart.mjs.map +1 -1
- package/dist/jsx/charts/BarChart.native.js +1 -3
- package/dist/jsx/charts/BarChart.native.js.map +1 -1
- package/dist/jsx/charts/LineChart.mjs +2 -2
- package/dist/jsx/charts/LineChart.mjs.map +1 -1
- package/dist/jsx/charts/LineChart.native.js +1 -3
- package/dist/jsx/charts/LineChart.native.js.map +1 -1
- package/dist/jsx/charts/PieChart.mjs +3 -2
- package/dist/jsx/charts/PieChart.mjs.map +1 -1
- package/dist/jsx/charts/PieChart.native.js +9 -5
- package/dist/jsx/charts/PieChart.native.js.map +1 -1
- package/dist/jsx/charts/accessibility.mjs.map +1 -1
- package/dist/jsx/charts/accessibility.native.js.map +1 -1
- package/dist/jsx/charts/index.mjs +2 -2
- package/dist/jsx/charts/index.mjs.map +1 -1
- package/dist/jsx/charts/index.native.js +1 -0
- package/dist/jsx/charts/index.native.js.map +1 -1
- package/dist/jsx/charts/math.mjs +6 -2
- package/dist/jsx/charts/math.mjs.map +1 -1
- package/dist/jsx/charts/math.native.js +6 -1
- package/dist/jsx/charts/math.native.js.map +1 -1
- package/dist/jsx/componentColors.mjs +11 -3
- package/dist/jsx/componentColors.mjs.map +1 -1
- package/dist/jsx/componentColors.native.js +11 -3
- package/dist/jsx/componentColors.native.js.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.mjs +2 -4
- package/dist/jsx/feedback/ConfirmDialog.mjs.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.native.js +1 -3
- package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/jsx/index.js +2 -2
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +2 -2
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +1 -0
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/layouts/ViewSwitcher.mjs +20 -1
- package/dist/jsx/layouts/ViewSwitcher.mjs.map +1 -1
- package/dist/jsx/layouts/ViewSwitcher.native.js +33 -0
- package/dist/jsx/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/jsx/layouts/attachments.mjs +4 -8
- package/dist/jsx/layouts/attachments.mjs.map +1 -1
- package/dist/jsx/layouts/attachments.native.js +5 -8
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +4 -5
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +6 -5
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/tags.mjs +1 -0
- package/dist/jsx/layouts/tags.mjs.map +1 -1
- package/dist/jsx/layouts/tags.native.js +2 -0
- package/dist/jsx/layouts/tags.native.js.map +1 -1
- package/dist/jsx/layouts/timeline.mjs +0 -6
- package/dist/jsx/layouts/timeline.mjs.map +1 -1
- package/dist/jsx/layouts/timeline.native.js +0 -6
- package/dist/jsx/layouts/timeline.native.js.map +1 -1
- package/dist/jsx/surfaces.mjs +21 -1
- package/dist/jsx/surfaces.mjs.map +1 -1
- package/dist/jsx/surfaces.native.js +22 -0
- package/dist/jsx/surfaces.native.js.map +1 -1
- package/dist/jsx/views/Calendar.mjs +6 -29
- package/dist/jsx/views/Calendar.mjs.map +1 -1
- package/dist/jsx/views/Calendar.native.js +21 -44
- package/dist/jsx/views/Calendar.native.js.map +1 -1
- package/dist/jsx/views/Dashboard.mjs +12 -12
- package/dist/jsx/views/Dashboard.mjs.map +1 -1
- package/dist/jsx/views/Dashboard.native.js +12 -10
- package/dist/jsx/views/Dashboard.native.js.map +1 -1
- package/dist/jsx/views/Kanban.mjs +23 -14
- package/dist/jsx/views/Kanban.mjs.map +1 -1
- package/dist/jsx/views/Kanban.native.js +1 -0
- package/dist/jsx/views/Kanban.native.js.map +1 -1
- package/dist/jsx/views/ReportBuilder.mjs +30 -12
- package/dist/jsx/views/ReportBuilder.mjs.map +1 -1
- package/dist/jsx/views/ReportBuilder.native.js +29 -11
- package/dist/jsx/views/ReportBuilder.native.js.map +1 -1
- package/dist/jsx/views/TreeView.mjs +1 -1
- package/dist/jsx/views/TreeView.mjs.map +1 -1
- package/dist/jsx/views/TreeView.native.js +1 -1
- package/dist/jsx/views/TreeView.native.js.map +1 -1
- package/dist/jsx/views/calendarMath.mjs +3 -9
- package/dist/jsx/views/calendarMath.mjs.map +1 -1
- package/dist/jsx/views/calendarMath.native.js +3 -9
- package/dist/jsx/views/calendarMath.native.js.map +1 -1
- package/dist/jsx/views/ganttMath.mjs +14 -19
- package/dist/jsx/views/ganttMath.mjs.map +1 -1
- package/dist/jsx/views/ganttMath.native.js +21 -20
- package/dist/jsx/views/ganttMath.native.js.map +1 -1
- package/dist/jsx/views/kanbanDnd.mjs.map +1 -1
- package/package.json +12 -12
- package/src/Accordion/Accordion.stories.tsx +7 -2
- package/src/Alert/index.tsx +1 -3
- package/src/Avatar/Avatar.spec.tsx +31 -0
- package/src/Avatar/index.tsx +19 -1
- package/src/Badge/Badge.stories.tsx +3 -1
- package/src/Badge/index.tsx +4 -1
- package/src/Carousel/Carousel.spec.tsx +271 -0
- package/src/Carousel/Carousel.stories.tsx +35 -0
- package/src/Carousel/index.tsx +45 -20
- package/src/DialogContent.stories.tsx +2 -2
- package/src/DotIndicator/dotIndicator.spec.tsx +43 -1
- package/src/DotIndicator/index.tsx +170 -37
- package/src/Pagination.api.spec.tsx +345 -0
- package/src/Pagination.tsx +138 -176
- package/src/Panel.stories.tsx +4 -4
- package/src/ProgressSteps/ProgressSteps.spec.tsx +40 -1
- package/src/ProgressSteps/ProgressSteps.stories.tsx +3 -1
- package/src/ProgressSteps/index.tsx +6 -1
- package/src/charts/PieChart.tsx +4 -1
- package/src/feedback/ConfirmDialog.tsx +2 -2
- package/src/index.ts +1 -0
- package/src/layouts/PageHeader.stories.tsx +21 -3
- package/src/layouts/ScreenToolbar.stories.tsx +12 -5
- package/src/layouts/ViewSwitcher.tsx +25 -6
- package/src/layouts/attachments.tsx +4 -1
- package/src/layouts/layouts.spec.tsx +77 -1
- package/src/layouts/page.tsx +5 -1
- package/src/layouts/pageTitleScale.spec.tsx +70 -0
- package/src/layouts/tags.tsx +2 -0
- package/src/layouts/timeline-radius.spec.tsx +21 -0
- package/src/layouts/timeline.tsx +7 -18
- package/src/shared/t.spec.ts +47 -0
- package/src/surfaces.tsx +33 -0
- package/src/views/Calendar.stories.tsx +4 -2
- package/src/views/Calendar.tsx +6 -1
- package/src/views/Gantt.stories.tsx +2 -2
- package/src/views/Kanban.native.tsx +8 -2
- package/src/views/Kanban.stories.tsx +3 -1
- package/src/views/Kanban.tsx +42 -13
- package/src/views/ReportBuilder.tsx +15 -2
- package/src/views/ganttMath.ts +2 -6
- package/types/Alert/index.d.ts.map +1 -1
- package/types/Avatar/index.d.ts.map +1 -1
- package/types/Badge/index.d.ts.map +1 -1
- package/types/Carousel/index.d.ts.map +1 -1
- package/types/DotIndicator/index.d.ts +44 -3
- package/types/DotIndicator/index.d.ts.map +1 -1
- package/types/Pagination.d.ts +6 -1
- package/types/Pagination.d.ts.map +1 -1
- package/types/ProgressSteps/index.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/LineChart.d.ts.map +1 -1
- package/types/charts/PieChart.d.ts.map +1 -1
- package/types/charts/accessibility.d.ts +3 -2
- package/types/charts/accessibility.d.ts.map +1 -1
- package/types/charts/index.d.ts +1 -1
- package/types/charts/index.d.ts.map +1 -1
- package/types/charts/math.d.ts +16 -1
- package/types/charts/math.d.ts.map +1 -1
- package/types/componentColors.d.ts +11 -3
- package/types/componentColors.d.ts.map +1 -1
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/layouts/ViewSwitcher.d.ts.map +1 -1
- package/types/layouts/attachments.d.ts.map +1 -1
- package/types/layouts/page.d.ts +8 -6
- package/types/layouts/page.d.ts.map +1 -1
- package/types/layouts/tags.d.ts.map +1 -1
- package/types/layouts/timeline.d.ts.map +1 -1
- package/types/surfaces.d.ts +17 -0
- package/types/surfaces.d.ts.map +1 -1
- package/types/views/Calendar.d.ts.map +1 -1
- package/types/views/Dashboard.d.ts.map +1 -1
- package/types/views/Kanban.d.ts +13 -1
- package/types/views/Kanban.d.ts.map +1 -1
- package/types/views/ReportBuilder.d.ts.map +1 -1
- package/types/views/TreeView.d.ts.map +1 -1
- package/types/views/calendarMath.d.ts +5 -1
- package/types/views/calendarMath.d.ts.map +1 -1
- package/types/views/ganttMath.d.ts +3 -0
- package/types/views/ganttMath.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["siblingOffset","index","sourceIndex","gapIndex","size","wdIndex","closeOrigin","openGap","gapPosition","count","totalSize","getStart","insertionIndexForY","localY","items","wdCount","rendered","filter","it","length","first","base","passed","wdStart","start","uniformInsertionIndex","Math","floor","autoScrollVelocity","pos","end","edge","maxSpeed","span","effEdge","min","clamp01","v","dStart","dEnd","maxInsertionIndex","board","drag","columnId","column","find","c","id","sourceColumnId","max","keyboardLift","target","keyboardMove","direction","
|
|
1
|
+
{"version":3,"names":["siblingOffset","index","sourceIndex","gapIndex","size","wdIndex","closeOrigin","openGap","gapPosition","count","totalSize","getStart","insertionIndexForY","localY","items","wdCount","rendered","filter","it","length","first","base","passed","wdStart","start","uniformInsertionIndex","Math","floor","autoScrollVelocity","pos","end","edge","maxSpeed","span","effEdge","min","clamp01","v","dStart","dEnd","maxInsertionIndex","board","drag","columnId","column","find","c","id","sourceColumnId","max","keyboardLift","target","keyboardMove","direction","colIndex","findIndex","nextIndex","nextColumn","resolveDrop","commit","from","to","describeDragState","type","card","title","position","describeCancel"],"sources":["../../../src/views/kanbanDnd.ts"],"sourcesContent":[null],"mappings":"AA+DO,SAASA,cAAc;EAC5BC,KAAA;EACAC,WAAA;EACAC,QAAA;EACAC;AACF,GAAiC;EAC/B,IAAIF,WAAA,IAAe,MAAM;IACvB,IAAID,KAAA,KAAUC,WAAA,EAAa,OAAO;IAClC,MAAMG,OAAA,GAAUJ,KAAA,GAAQC,WAAA,GAAcD,KAAA,GAAQ,IAAIA,KAAA;IAClD,MAAMK,WAAA,GAAcL,KAAA,GAAQC,WAAA,GAAc,CAACE,IAAA,GAAO;IAClD,MAAMG,OAAA,GAAUJ,QAAA,IAAY,QAAQE,OAAA,IAAWF,QAAA,GAAWC,IAAA,GAAO;IACjE,OAAOE,WAAA,GAAcC,OAAA;EACvB;EACA,OAAOJ,QAAA,IAAY,QAAQF,KAAA,IAASE,QAAA,GAAWC,IAAA,GAAO;AACxD;AAkBO,SAASI,YAAY;EAC1BL,QAAA;EACAD,WAAA;EACAO,KAAA;EACAL,IAAA;EACAM,SAAA;EACAC;AACF,GAA+B;EAC7B,IAAIT,WAAA,IAAe,MAAM;I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AAA,EAAQqB,KAAA,IAASvB,IAAA,CAAKS,MAAA,CAAOR,QAAA;IACrCuB,QAAA,EAAUxB,IAAA,CAAKS,MAAA,CAAOlD,KAAA,GAAQ;IAC9BQ,KAAA,EAAOwC,GAAA,GAAM;EACf;AACF;AAEO,SAASkB,eACdzB,IAAA,EACAD,KAAA,EACAuB,IAAA,EACoB;EACpB,MAAMpB,MAAA,GAASH,KAAA,CAAMI,IAAA,CAAMC,CAAA,IAAMA,CAAA,CAAEC,EAAA,KAAOL,IAAA,CAAKM,cAAc;EAC7D,OAAO;IAAEe,IAAA,EAAM;IAAUC,IAAA;IAAMpB,MAAA,EAAQA,MAAA,EAAQqB,KAAA,IAASvB,IAAA,CAAKM;EAAe;AAC9E","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"description": "multiplatform.one ui components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
"link": "^2.1.2",
|
|
75
75
|
"shiki": "^4.0.2",
|
|
76
76
|
"tamagui": "2.0.0-rc.41",
|
|
77
|
-
"@multiplatform.one/
|
|
78
|
-
"@multiplatform.one/
|
|
79
|
-
"@multiplatform.one/router": "6.
|
|
80
|
-
"@multiplatform.one/theme": "6.
|
|
81
|
-
"@multiplatform.one/platform": "6.
|
|
77
|
+
"@multiplatform.one/i18n": "6.6.0",
|
|
78
|
+
"@multiplatform.one/forms": "6.6.0",
|
|
79
|
+
"@multiplatform.one/router": "6.6.0",
|
|
80
|
+
"@multiplatform.one/theme": "6.6.0",
|
|
81
|
+
"@multiplatform.one/platform": "6.6.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@tamagui/build": "2.0.0-rc.41",
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
"react-native-svg": "15.15.4",
|
|
97
97
|
"react-native-web": "^0.21.2",
|
|
98
98
|
"vitest": "^4.1.5",
|
|
99
|
-
"@multiplatform.one/
|
|
100
|
-
"@multiplatform.one/
|
|
101
|
-
"@multiplatform.one/storybook": "6.
|
|
99
|
+
"@multiplatform.one/config": "6.6.0",
|
|
100
|
+
"@multiplatform.one/test-utils": "6.6.0",
|
|
101
|
+
"@multiplatform.one/storybook": "6.6.0"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
104
|
"@mdx-js/mdx": "^3.1.1",
|
|
@@ -116,11 +116,11 @@
|
|
|
116
116
|
"react-native-safe-area-context": "*",
|
|
117
117
|
"react-native-svg": "*",
|
|
118
118
|
"refractor": "^4.9.0",
|
|
119
|
-
"rehype-autolink-headings": "
|
|
119
|
+
"rehype-autolink-headings": "^6.1.1 || ^7.0.0",
|
|
120
120
|
"rehype-parse": "~8.0.5",
|
|
121
|
-
"rehype-slug": "
|
|
121
|
+
"rehype-slug": "^5.1.0 || ^6.0.0",
|
|
122
122
|
"remark-frontmatter": "^5.0.0",
|
|
123
|
-
"remark-mdx-frontmatter": "^4.0.0",
|
|
123
|
+
"remark-mdx-frontmatter": "^4.0.0 || ^5.0.0",
|
|
124
124
|
"unist-util-visit": "^5.1.0"
|
|
125
125
|
},
|
|
126
126
|
"peerDependenciesMeta": {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { action } from "@multiplatform.one/storybook";
|
|
2
|
-
|
|
2
|
+
// Catalog Button (LC-56 story honesty): stories compose catalog controls, never raw tamagui ones.
|
|
3
|
+
import { Button, Checkbox, FormGrid, Input, Select, TextArea } from "@multiplatform.one/forms";
|
|
3
4
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
4
5
|
import { useState } from "react";
|
|
5
|
-
import { Text, XStack, YStack
|
|
6
|
+
import { Text, XStack, YStack } from "tamagui";
|
|
6
7
|
import { Accordion, type AccordionProps } from "./index";
|
|
7
8
|
|
|
8
9
|
const meta: Meta<typeof Accordion> = {
|
|
@@ -130,10 +131,14 @@ export const WithFormContent: Story = {
|
|
|
130
131
|
name="country"
|
|
131
132
|
label="Country"
|
|
132
133
|
placeholder="Select country"
|
|
134
|
+
// >5 options: shorter single-select lists trip `select-too-few-options` (DG-CTRL-01).
|
|
133
135
|
options={[
|
|
134
136
|
{ label: "United States", value: "us" },
|
|
135
137
|
{ label: "India", value: "in" },
|
|
136
138
|
{ label: "Germany", value: "de" },
|
|
139
|
+
{ label: "Japan", value: "jp" },
|
|
140
|
+
{ label: "Brazil", value: "br" },
|
|
141
|
+
{ label: "Australia", value: "au" },
|
|
137
142
|
]}
|
|
138
143
|
/>
|
|
139
144
|
</FormGrid>
|
package/src/Alert/index.tsx
CHANGED
|
@@ -240,9 +240,7 @@ function AlertInner({
|
|
|
240
240
|
<DismissButton
|
|
241
241
|
aria-label={t("Dismiss")}
|
|
242
242
|
{...pressTargetStyle()}
|
|
243
|
-
{...(actionNode
|
|
244
|
-
? { minWidth: DISMISS_VISUAL + DISMISS_ADJACENT_OUTSET * 2 }
|
|
245
|
-
: null)}
|
|
243
|
+
{...(actionNode ? { minWidth: DISMISS_VISUAL + DISMISS_ADJACENT_OUTSET * 2 } : null)}
|
|
246
244
|
marginVertical={-DISMISS_OUTSET}
|
|
247
245
|
marginHorizontal={-(actionNode ? DISMISS_ADJACENT_OUTSET : DISMISS_OUTSET)}
|
|
248
246
|
hitSlop={actionNode ? undefined : pressTargetHitSlop(DISMISS_VISUAL)}
|
|
@@ -43,3 +43,34 @@ describe("Avatar", () => {
|
|
|
43
43
|
expect(container.textContent).toContain("OK");
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
|
+
|
|
47
|
+
// D-09 / LC-60: Avatar is the spec's declared R-IDENTITY part. Knob immunity
|
|
48
|
+
// is only legitimate when it is declared, so the declaration is part of the
|
|
49
|
+
// contract — the `radius:none` sweep reads it off the DOM and matches it
|
|
50
|
+
// against the registry generated from the spec's radius-class table.
|
|
51
|
+
describe("Avatar identity-shape declaration (LC-60)", () => {
|
|
52
|
+
const declaration = (container: HTMLElement) => container.querySelector("[data-radius-class]");
|
|
53
|
+
|
|
54
|
+
it("declares R-IDENTITY / Avatar while it is a circle", () => {
|
|
55
|
+
const { container } = renderWithProviders(<Avatar name="Ada Lovelace" />);
|
|
56
|
+
const el = declaration(container);
|
|
57
|
+
expect(el?.getAttribute("data-radius-class")).toBe("R-IDENTITY");
|
|
58
|
+
expect(el?.getAttribute("data-radius-part")).toBe("Avatar");
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("declares on the compound branch too", () => {
|
|
62
|
+
const { container } = renderWithProviders(
|
|
63
|
+
<Avatar size="$3">
|
|
64
|
+
<Avatar.Fallback>
|
|
65
|
+
<span>OK</span>
|
|
66
|
+
</Avatar.Fallback>
|
|
67
|
+
</Avatar>,
|
|
68
|
+
);
|
|
69
|
+
expect(declaration(container)?.getAttribute("data-radius-class")).toBe("R-IDENTITY");
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it("drops the declaration when a consumer ejects to circular={false}", () => {
|
|
73
|
+
const { container } = renderWithProviders(<Avatar name="Ada Lovelace" circular={false} />);
|
|
74
|
+
expect(declaration(container)).toBeNull();
|
|
75
|
+
});
|
|
76
|
+
});
|
package/src/Avatar/index.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import { useReadableTextOn, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
2
|
+
import { radiusClassProps, useReadableTextOn, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
3
3
|
import type { GetProps, SizeTokens } from "tamagui";
|
|
4
4
|
import { Avatar as TamaguiAvatar, SizableText, withStaticProperties } from "tamagui";
|
|
5
5
|
import { componentColors } from "../componentColors";
|
|
@@ -43,6 +43,21 @@ const avatarSizeMap: Record<string, SizeTokens> = {
|
|
|
43
43
|
$5: "$4",
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
// ── Identity-shape declaration (D-09 / LC-60) ─────────────────
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Avatar is declared R-IDENTITY in the spec's radius-class table: a circular
|
|
50
|
+
* avatar is a recognized object class, not a styled box, so it keeps its
|
|
51
|
+
* circle at `borderRadius:none`. Knob immunity is only legitimate when it is
|
|
52
|
+
* DECLARED — the `radius:none` sweep generates its allowlist from that table
|
|
53
|
+
* and reads this declaration off the DOM, so an undeclared knob-immune shape
|
|
54
|
+
* stays an LC-18 KNOB-TOTALITY defect.
|
|
55
|
+
*
|
|
56
|
+
* The declaration rides `circular`: a consumer that ejects to `circular=false`
|
|
57
|
+
* has opted the part back onto the radius channel and must not be exempt.
|
|
58
|
+
*/
|
|
59
|
+
const identityShapeProps = radiusClassProps("R-IDENTITY", "Avatar");
|
|
60
|
+
|
|
46
61
|
// ── Size → font mapping ───────────────────────────────────────
|
|
47
62
|
|
|
48
63
|
function initialsFontSize(size: AvatarSize | undefined): SizeTokens {
|
|
@@ -94,12 +109,14 @@ function AvatarRoot({
|
|
|
94
109
|
// dark; paper/ink-on-fill lands the readable anchor (dark ink → 4.02+).
|
|
95
110
|
const onAccentInitials = useReadableTextOn("$accentBackground");
|
|
96
111
|
const size = sizeProp ?? avatarSizeMap[knobProps.sizeToken] ?? "$3";
|
|
112
|
+
const identityProps = circular ? identityShapeProps : null;
|
|
97
113
|
if (children != null) {
|
|
98
114
|
return (
|
|
99
115
|
<TamaguiAvatar
|
|
100
116
|
circular={circular}
|
|
101
117
|
size={size}
|
|
102
118
|
backgroundColor={backgroundColor ?? fallbackBackgroundColor}
|
|
119
|
+
{...identityProps}
|
|
103
120
|
{...props}
|
|
104
121
|
>
|
|
105
122
|
{children}
|
|
@@ -118,6 +135,7 @@ function AvatarRoot({
|
|
|
118
135
|
size={size}
|
|
119
136
|
backgroundColor={backgroundColor ?? fallbackBackgroundColor}
|
|
120
137
|
aria-label={label}
|
|
138
|
+
{...identityProps}
|
|
121
139
|
{...props}
|
|
122
140
|
>
|
|
123
141
|
{src ? <TamaguiAvatar.Image src={src} alt={label} /> : null}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
import { BellIcon, EnvelopeIcon, ShoppingCartIcon, UserIcon } from "@phosphor-icons/react";
|
|
3
|
-
|
|
3
|
+
// Catalog Button (LC-56 story honesty): stories compose catalog controls, never raw tamagui ones.
|
|
4
|
+
import { Button } from "@multiplatform.one/forms";
|
|
5
|
+
import { XStack, YStack, Text, View } from "tamagui";
|
|
4
6
|
import { Badge, type BadgeColor, type BadgePosition } from "./index";
|
|
5
7
|
|
|
6
8
|
const meta: Meta<typeof Badge> = {
|
package/src/Badge/index.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
2
|
+
import { radiusClassProps, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
3
3
|
import type { ColorTokens, GetProps } from "tamagui";
|
|
4
4
|
import { Text, View, styled } from "tamagui";
|
|
5
5
|
import { componentColors } from "../componentColors";
|
|
@@ -76,6 +76,9 @@ const BadgeWrapper = styled(View, {
|
|
|
76
76
|
|
|
77
77
|
const BadgeIndicator = styled(View, {
|
|
78
78
|
name: "BadgeIndicator",
|
|
79
|
+
// R-PILL (D-09 / LC-60): the count/dot indicator is a pill at every radius
|
|
80
|
+
// value; the knob moves its size and padding, never its shape.
|
|
81
|
+
...radiusClassProps("R-PILL", "Badge count/dot"),
|
|
79
82
|
position: "absolute",
|
|
80
83
|
alignItems: "center",
|
|
81
84
|
justifyContent: "center",
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Carousel geometry contract specs (LC-62 SLIDE-VIEWPORT-WIDTH): slides size
|
|
3
|
+
* from the MEASURED scroll viewport — never percent-of-track — and every
|
|
4
|
+
* paging offset is index × (slideWidth + gap), so slide N is actually
|
|
5
|
+
* reachable at the offset the dots promise. Also locks the re-anchor on
|
|
6
|
+
* re-measure (resize) and the scroll → active-dot mapping at the same pitch.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { act, fireEvent } from "@testing-library/react";
|
|
10
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
11
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
12
|
+
import { Text, View, getTokens } from "tamagui";
|
|
13
|
+
import { Carousel } from "./index";
|
|
14
|
+
|
|
15
|
+
// ── happy-dom layout plumbing ─────────────────────────────────
|
|
16
|
+
// react-native-web's onLayout rides a module-level ResizeObserver singleton
|
|
17
|
+
// captured on first use, so the stub must exist before the first render and
|
|
18
|
+
// stay installed for the whole file. `observe` fires immediately (mount
|
|
19
|
+
// measure); `fireResize` re-fires for every observed node (resize). The
|
|
20
|
+
// measure callback itself reads offsetWidth via a setTimeout(0), hence the
|
|
21
|
+
// prototype getter and the flushMeasure() helper.
|
|
22
|
+
|
|
23
|
+
let layoutWidth = 400;
|
|
24
|
+
|
|
25
|
+
type ObserverRecord = { cb: ResizeObserverCallback; targets: Set<Element> };
|
|
26
|
+
const observerRecords: ObserverRecord[] = [];
|
|
27
|
+
|
|
28
|
+
function makeEntry(target: Element): ResizeObserverEntry {
|
|
29
|
+
return {
|
|
30
|
+
target,
|
|
31
|
+
contentRect: { width: layoutWidth, height: 240 } as DOMRectReadOnly,
|
|
32
|
+
borderBoxSize: [],
|
|
33
|
+
contentBoxSize: [],
|
|
34
|
+
devicePixelContentBoxSize: [],
|
|
35
|
+
} as unknown as ResizeObserverEntry;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
vi.stubGlobal(
|
|
39
|
+
"ResizeObserver",
|
|
40
|
+
class {
|
|
41
|
+
record: ObserverRecord;
|
|
42
|
+
constructor(cb: ResizeObserverCallback) {
|
|
43
|
+
this.record = { cb, targets: new Set() };
|
|
44
|
+
observerRecords.push(this.record);
|
|
45
|
+
}
|
|
46
|
+
observe(target: Element) {
|
|
47
|
+
this.record.targets.add(target);
|
|
48
|
+
this.record.cb([makeEntry(target)], this as unknown as ResizeObserver);
|
|
49
|
+
}
|
|
50
|
+
unobserve(target: Element) {
|
|
51
|
+
this.record.targets.delete(target);
|
|
52
|
+
}
|
|
53
|
+
disconnect() {
|
|
54
|
+
this.record.targets.clear();
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
Object.defineProperty(HTMLElement.prototype, "offsetWidth", {
|
|
60
|
+
configurable: true,
|
|
61
|
+
get() {
|
|
62
|
+
return layoutWidth;
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
Object.defineProperty(HTMLElement.prototype, "offsetHeight", {
|
|
66
|
+
configurable: true,
|
|
67
|
+
get() {
|
|
68
|
+
return 240;
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// react-native-web's scrollTo lands on the DOM node's scroll(); capture it.
|
|
73
|
+
const scrollCalls: Array<{ left?: number; top?: number; behavior?: string }> = [];
|
|
74
|
+
Object.defineProperty(HTMLElement.prototype, "scroll", {
|
|
75
|
+
configurable: true,
|
|
76
|
+
writable: true,
|
|
77
|
+
value(options: { left?: number; top?: number; behavior?: string }) {
|
|
78
|
+
scrollCalls.push(options);
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
/** Flush UIManager.measure's setTimeout(0) so onLayout commits. */
|
|
83
|
+
async function flushMeasure() {
|
|
84
|
+
await act(async () => {
|
|
85
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function fireResize(width: number) {
|
|
90
|
+
layoutWidth = width;
|
|
91
|
+
for (const record of observerRecords) {
|
|
92
|
+
for (const target of record.targets) {
|
|
93
|
+
record.cb([makeEntry(target)], undefined as unknown as ResizeObserver);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function slides(container: HTMLElement) {
|
|
99
|
+
return container.querySelectorAll("[data-carousel-slide]");
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Tamagui materializes dynamic numeric widths as atomic CSS classes, not
|
|
104
|
+
* inline style — resolve whether any class on the node carries the width, in
|
|
105
|
+
* inline style, <style> text, CSSOM rules, or adopted sheets.
|
|
106
|
+
*/
|
|
107
|
+
function elementCarriesWidth(node: HTMLElement, widthPx: number): boolean {
|
|
108
|
+
const needle = `${widthPx}px`;
|
|
109
|
+
const inline = node.getAttribute("style") ?? "";
|
|
110
|
+
if (inline.includes(needle)) return true;
|
|
111
|
+
const ruleTexts: string[] = [];
|
|
112
|
+
for (const styleTag of Array.from(document.querySelectorAll("style"))) {
|
|
113
|
+
ruleTexts.push(styleTag.textContent ?? "");
|
|
114
|
+
}
|
|
115
|
+
const sheets = [
|
|
116
|
+
...Array.from(document.styleSheets),
|
|
117
|
+
...Array.from(
|
|
118
|
+
(document as unknown as { adoptedStyleSheets?: CSSStyleSheet[] }).adoptedStyleSheets ?? [],
|
|
119
|
+
),
|
|
120
|
+
];
|
|
121
|
+
for (const sheet of sheets) {
|
|
122
|
+
try {
|
|
123
|
+
for (const rule of Array.from((sheet as CSSStyleSheet).cssRules)) {
|
|
124
|
+
ruleTexts.push(rule.cssText);
|
|
125
|
+
}
|
|
126
|
+
} catch {
|
|
127
|
+
// Unreadable sheet — nothing Tamagui inserts is.
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return Array.from(node.classList).some((className) =>
|
|
131
|
+
ruleTexts.some((text) => text.includes(`.${className}`) && text.includes(needle)),
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function dots(container: HTMLElement) {
|
|
136
|
+
return container.querySelectorAll("[role='button'][aria-label^='Go to item']");
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
beforeEach(() => {
|
|
140
|
+
layoutWidth = 400;
|
|
141
|
+
scrollCalls.length = 0;
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
const Slide = ({ index }: { index: number }) => (
|
|
145
|
+
<View height={100}>
|
|
146
|
+
<Text>Slide {index + 1}</Text>
|
|
147
|
+
</View>
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
describe("Carousel geometry (LC-62)", () => {
|
|
151
|
+
it("sizes each slide from the measured viewport, never percent-of-track", async () => {
|
|
152
|
+
const { container } = renderWithProviders(
|
|
153
|
+
<Carousel gap={0}>
|
|
154
|
+
{[0, 1, 2].map((index) => (
|
|
155
|
+
<Slide key={index} index={index} />
|
|
156
|
+
))}
|
|
157
|
+
</Carousel>,
|
|
158
|
+
);
|
|
159
|
+
await flushMeasure();
|
|
160
|
+
const slideNodes = slides(container);
|
|
161
|
+
expect(slideNodes).toHaveLength(3);
|
|
162
|
+
for (const node of slideNodes) {
|
|
163
|
+
expect(elementCarriesWidth(node as HTMLElement, 400)).toBe(true);
|
|
164
|
+
expect((node as HTMLElement).getAttribute("style") ?? "").not.toContain("100%");
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
it("pages to index × slideWidth when gap is 0", async () => {
|
|
169
|
+
const { container } = renderWithProviders(
|
|
170
|
+
<Carousel gap={0}>
|
|
171
|
+
{[0, 1, 2].map((index) => (
|
|
172
|
+
<Slide key={index} index={index} />
|
|
173
|
+
))}
|
|
174
|
+
</Carousel>,
|
|
175
|
+
);
|
|
176
|
+
await flushMeasure();
|
|
177
|
+
// First measure anchors the initial slide without animating.
|
|
178
|
+
expect(scrollCalls[0]).toMatchObject({ left: 0, behavior: "auto" });
|
|
179
|
+
fireEvent.click(dots(container)[2]);
|
|
180
|
+
expect(scrollCalls.at(-1)).toMatchObject({ left: 800, behavior: "smooth" });
|
|
181
|
+
fireEvent.click(dots(container)[1]);
|
|
182
|
+
expect(scrollCalls.at(-1)).toMatchObject({ left: 400, behavior: "smooth" });
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
it("includes the inter-slide gap in the pitch: index × (slideWidth + gap)", async () => {
|
|
186
|
+
const { container } = renderWithProviders(
|
|
187
|
+
<Carousel gap={16}>
|
|
188
|
+
{[0, 1, 2, 3, 4].map((index) => (
|
|
189
|
+
<Slide key={index} index={index} />
|
|
190
|
+
))}
|
|
191
|
+
</Carousel>,
|
|
192
|
+
);
|
|
193
|
+
await flushMeasure();
|
|
194
|
+
fireEvent.click(dots(container)[4]);
|
|
195
|
+
expect(scrollCalls.at(-1)).toMatchObject({ left: 4 * (400 + 16), behavior: "smooth" });
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
it("resolves token gaps into the offset math", async () => {
|
|
199
|
+
const tokenGap = (getTokens().space as Record<string, { val?: number } | undefined>)?.$4?.val;
|
|
200
|
+
expect(typeof tokenGap).toBe("number");
|
|
201
|
+
expect(tokenGap!).toBeGreaterThan(0);
|
|
202
|
+
const { container } = renderWithProviders(
|
|
203
|
+
<Carousel gap="$4">
|
|
204
|
+
{[0, 1, 2].map((index) => (
|
|
205
|
+
<Slide key={index} index={index} />
|
|
206
|
+
))}
|
|
207
|
+
</Carousel>,
|
|
208
|
+
);
|
|
209
|
+
await flushMeasure();
|
|
210
|
+
fireEvent.click(dots(container)[2]);
|
|
211
|
+
expect(scrollCalls.at(-1)).toMatchObject({ left: 2 * (400 + tokenGap!), behavior: "smooth" });
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
it("re-anchors the active slide when the viewport re-measures", async () => {
|
|
215
|
+
const { container } = renderWithProviders(
|
|
216
|
+
<Carousel gap={16}>
|
|
217
|
+
{[0, 1, 2].map((index) => (
|
|
218
|
+
<Slide key={index} index={index} />
|
|
219
|
+
))}
|
|
220
|
+
</Carousel>,
|
|
221
|
+
);
|
|
222
|
+
await flushMeasure();
|
|
223
|
+
fireEvent.click(dots(container)[2]);
|
|
224
|
+
expect(scrollCalls.at(-1)).toMatchObject({ left: 2 * (400 + 16), behavior: "smooth" });
|
|
225
|
+
fireResize(600);
|
|
226
|
+
await flushMeasure();
|
|
227
|
+
// Same slide, new pitch, no animation.
|
|
228
|
+
expect(scrollCalls.at(-1)).toMatchObject({ left: 2 * (600 + 16), behavior: "auto" });
|
|
229
|
+
expect(elementCarriesWidth(slides(container)[0] as HTMLElement, 600)).toBe(true);
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
it("maps scroll offsets back to the active dot at the same pitch", async () => {
|
|
233
|
+
const { container } = renderWithProviders(
|
|
234
|
+
<Carousel gap={16}>
|
|
235
|
+
{[0, 1, 2].map((index) => (
|
|
236
|
+
<Slide key={index} index={index} />
|
|
237
|
+
))}
|
|
238
|
+
</Carousel>,
|
|
239
|
+
);
|
|
240
|
+
await flushMeasure();
|
|
241
|
+
const track = container.querySelector("[data-carousel-track]") as HTMLElement;
|
|
242
|
+
expect(track).toBeTruthy();
|
|
243
|
+
Object.defineProperty(track, "scrollLeft", { configurable: true, value: 2 * (400 + 16) });
|
|
244
|
+
fireEvent.scroll(track);
|
|
245
|
+
expect(dots(container)[2].getAttribute("aria-current")).toBe("true");
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
it("renders a single slide without dots or arrows (N=1)", async () => {
|
|
249
|
+
const { container } = renderWithProviders(
|
|
250
|
+
<Carousel gap={0}>
|
|
251
|
+
<Slide index={0} />
|
|
252
|
+
</Carousel>,
|
|
253
|
+
);
|
|
254
|
+
await flushMeasure();
|
|
255
|
+
expect(slides(container)).toHaveLength(1);
|
|
256
|
+
expect(dots(container)).toHaveLength(0);
|
|
257
|
+
expect(container.querySelector("[aria-label='Next slide']")).toBeNull();
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
it("lands initialSlide at its pitch offset on first measure", async () => {
|
|
261
|
+
renderWithProviders(
|
|
262
|
+
<Carousel gap={0} initialSlide={2}>
|
|
263
|
+
{[0, 1, 2, 3].map((index) => (
|
|
264
|
+
<Slide key={index} index={index} />
|
|
265
|
+
))}
|
|
266
|
+
</Carousel>,
|
|
267
|
+
);
|
|
268
|
+
await flushMeasure();
|
|
269
|
+
expect(scrollCalls.at(-1)).toMatchObject({ left: 2 * 400, behavior: "auto" });
|
|
270
|
+
});
|
|
271
|
+
});
|
|
@@ -207,6 +207,41 @@ export const SingleSlide: Story = {
|
|
|
207
207
|
),
|
|
208
208
|
};
|
|
209
209
|
|
|
210
|
+
/**
|
|
211
|
+
* LC-62 SLIDE-VIEWPORT-WIDTH VERIFY arm. The failure this locks against:
|
|
212
|
+
* percent-of-track slide sizing inflates N fixed-width slides to N×W each, so
|
|
213
|
+
* every slide past the first lands beyond max scroll while the dots animate
|
|
214
|
+
* at nothing — dots alone can never catch it, only the geometry check can.
|
|
215
|
+
*/
|
|
216
|
+
export const SlideGeometry: Story = {
|
|
217
|
+
parameters: {
|
|
218
|
+
docs: {
|
|
219
|
+
description: {
|
|
220
|
+
story:
|
|
221
|
+
"LC-62 VERIFY: fixed 400px viewport, four fixed-width slides, default (non-zero) " +
|
|
222
|
+
"gap. Probe: for every N, click the dot `[aria-label='Go to item N']`, wait for " +
|
|
223
|
+
"the smooth scroll to settle, and assert `[data-carousel-slide]` N's bounding box " +
|
|
224
|
+
"intersects the `[data-carousel-track]` viewport box by ≥90% — the pitch must be " +
|
|
225
|
+
"index × (slideWidth + gap), sized from the MEASURED viewport, never " +
|
|
226
|
+
"percent-of-track.",
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
render: () => (
|
|
231
|
+
<View width={400}>
|
|
232
|
+
<Carousel onSlideChange={action("onSlideChange")}>
|
|
233
|
+
{colors.slice(0, 4).map((color, i) => (
|
|
234
|
+
// Fixed-width slide content (the pokemon-gallery shape that exposed
|
|
235
|
+
// the inflation): content exactly as wide as the viewport.
|
|
236
|
+
<View key={i} width={400}>
|
|
237
|
+
<SlideContent index={i} color={color} />
|
|
238
|
+
</View>
|
|
239
|
+
))}
|
|
240
|
+
</Carousel>
|
|
241
|
+
</View>
|
|
242
|
+
),
|
|
243
|
+
};
|
|
244
|
+
|
|
210
245
|
export const AllStates: Story = {
|
|
211
246
|
render: () => (
|
|
212
247
|
<YStack gap="$6">
|