@multiplatform.one/components 7.46.0 → 7.47.1
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.cjs +1 -1
- package/dist/cjs/Alert/index.native.js +1 -1
- package/dist/cjs/Alert/index.native.js.map +1 -1
- package/dist/cjs/Carousel/index.cjs +1 -1
- package/dist/cjs/Carousel/index.native.js +1 -1
- package/dist/cjs/Carousel/index.native.js.map +1 -1
- package/dist/cjs/Chip/index.cjs +18 -7
- package/dist/cjs/Chip/index.native.js +20 -8
- package/dist/cjs/Chip/index.native.js.map +1 -1
- package/dist/cjs/ErrorBoundary/index.cjs +2 -2
- package/dist/cjs/ErrorBoundary/index.native.js +2 -2
- package/dist/cjs/ErrorBoundary/index.native.js.map +1 -1
- package/dist/cjs/Heading.cjs +8 -127
- package/dist/cjs/Heading.native.js +7 -133
- package/dist/cjs/Heading.native.js.map +1 -1
- package/dist/cjs/OverflowRow/index.cjs +65 -2
- package/dist/cjs/OverflowRow/index.native.js +68 -2
- package/dist/cjs/OverflowRow/index.native.js.map +1 -1
- package/dist/cjs/Pagination.cjs +4 -1
- package/dist/cjs/Pagination.native.js +4 -1
- package/dist/cjs/Pagination.native.js.map +1 -1
- package/dist/cjs/ProgressSteps/index.cjs +1 -1
- package/dist/cjs/ProgressSteps/index.native.js +1 -1
- package/dist/cjs/ProgressSteps/index.native.js.map +1 -1
- package/dist/cjs/Quote/index.cjs +1 -0
- package/dist/cjs/Quote/index.native.js +1 -0
- package/dist/cjs/Quote/index.native.js.map +1 -1
- package/dist/cjs/SkipLink/index.cjs +1 -2
- package/dist/cjs/SkipLink/index.native.js +1 -2
- package/dist/cjs/SkipLink/index.native.js.map +1 -1
- package/dist/cjs/SortableList/index.cjs +2 -1
- package/dist/cjs/SortableList/index.native.js +2 -1
- package/dist/cjs/SortableList/index.native.js.map +1 -1
- package/dist/cjs/SortableList/useSortableRows.cjs +2 -2
- package/dist/cjs/SortableList/useSortableRows.native.js +2 -2
- package/dist/cjs/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/cjs/Text.cjs +5 -116
- package/dist/cjs/Text.native.js +4 -120
- package/dist/cjs/Text.native.js.map +1 -1
- package/dist/cjs/ThemePlayground/index.cjs +3 -2
- package/dist/cjs/ThemePresetPicker/index.cjs +21 -22
- package/dist/cjs/ThemePresetPicker/index.native.js +21 -22
- package/dist/cjs/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/cjs/TreeSelect/index.cjs +2 -1
- package/dist/cjs/TreeSelect/index.native.js +2 -1
- package/dist/cjs/TreeSelect/index.native.js.map +1 -1
- package/dist/cjs/Video/PlayerChrome.cjs +1 -1
- package/dist/cjs/Video/PlayerChrome.native.js +1 -1
- package/dist/cjs/Video/PlayerChrome.native.js.map +1 -1
- package/dist/cjs/Video/VideoFrame.cjs +2 -1
- package/dist/cjs/Video/VideoFrame.native.js +2 -1
- package/dist/cjs/Video/VideoFrame.native.js.map +1 -1
- package/dist/cjs/Video/index.cjs +3 -1
- package/dist/cjs/actions/DestructiveAction.cjs +3 -2
- package/dist/cjs/actions/DestructiveAction.native.js +3 -2
- package/dist/cjs/actions/DestructiveAction.native.js.map +1 -1
- package/dist/cjs/appShell/ScopeMenu.cjs +2 -1
- package/dist/cjs/appShell/ScopeMenu.native.js +2 -1
- package/dist/cjs/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/cjs/appShell/SettingsSplit.cjs +5 -4
- package/dist/cjs/appShell/SettingsSplit.native.js +5 -4
- package/dist/cjs/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/cjs/appShell/Springboard.cjs +2 -1
- package/dist/cjs/appShell/Springboard.native.js +2 -1
- package/dist/cjs/appShell/Springboard.native.js.map +1 -1
- package/dist/cjs/appShell/SystemBar.cjs +2 -1
- package/dist/cjs/appShell/SystemBar.native.js +2 -1
- package/dist/cjs/appShell/SystemBar.native.js.map +1 -1
- package/dist/cjs/code/Highlighter/index.cjs +9 -2
- package/dist/cjs/code/Highlighter/index.native.js +13 -2
- package/dist/cjs/code/Highlighter/index.native.js.map +1 -1
- package/dist/cjs/code/Highlighter/namedGroupMatchAll.cjs +96 -0
- package/dist/cjs/code/Highlighter/namedGroupMatchAll.native.js +108 -0
- package/dist/cjs/code/Highlighter/namedGroupMatchAll.native.js.map +1 -0
- package/dist/cjs/feedback/ConfirmDialog.cjs +1 -1
- package/dist/cjs/feedback/ConfirmDialog.native.js +1 -1
- package/dist/cjs/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/cjs/layouts/attachments.cjs +11 -10
- package/dist/cjs/layouts/attachments.native.js +11 -10
- package/dist/cjs/layouts/attachments.native.js.map +1 -1
- package/dist/cjs/layouts/breadcrumbs.cjs +3 -2
- package/dist/cjs/layouts/breadcrumbs.native.js +3 -2
- package/dist/cjs/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +80 -8
- package/dist/cjs/layouts/page.native.js +82 -8
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/sidebar.cjs +3 -1
- package/dist/cjs/layouts/sidebar.native.js +3 -1
- package/dist/cjs/layouts/sidebar.native.js.map +1 -1
- package/dist/cjs/layouts/tags.cjs +2 -1
- package/dist/cjs/layouts/tags.native.js +2 -1
- package/dist/cjs/layouts/tags.native.js.map +1 -1
- package/dist/cjs/layouts/timeline.cjs +14 -13
- package/dist/cjs/layouts/timeline.native.js +14 -13
- package/dist/cjs/layouts/timeline.native.js.map +1 -1
- package/dist/cjs/layouts/toolbar.cjs +2 -1
- package/dist/cjs/layouts/toolbar.native.js +2 -1
- package/dist/cjs/layouts/toolbar.native.js.map +1 -1
- package/dist/cjs/linearGradientSetup.cjs +18 -0
- package/dist/cjs/linearGradientSetup.native.js +4 -0
- package/dist/cjs/linearGradientSetup.native.js.map +1 -0
- package/dist/cjs/views/Calendar.cjs +14 -13
- package/dist/cjs/views/Calendar.native.js +14 -13
- package/dist/cjs/views/Calendar.native.js.map +1 -1
- package/dist/cjs/views/Gantt.cjs +188 -55
- package/dist/cjs/views/Gantt.native.js +201 -55
- package/dist/cjs/views/Gantt.native.js.map +1 -1
- package/dist/cjs/views/GanttDateGrip.cjs +216 -0
- package/dist/cjs/views/GanttDateGrip.native.js +259 -0
- package/dist/cjs/views/GanttDateGrip.native.js.map +1 -0
- package/dist/cjs/views/Kanban.cjs +3 -2
- package/dist/cjs/views/Kanban.native.js +3 -2
- package/dist/cjs/views/Kanban.native.js.map +1 -1
- package/dist/cjs/views/List.cjs +13 -3
- package/dist/cjs/views/List.native.js +14 -3
- package/dist/cjs/views/List.native.js.map +1 -1
- package/dist/cjs/views/Matrix.cjs +2 -1
- package/dist/cjs/views/Matrix.native.js +2 -1
- package/dist/cjs/views/Matrix.native.js.map +1 -1
- package/dist/cjs/views/TreeView.cjs +3 -2
- package/dist/cjs/views/TreeView.native.js +3 -2
- package/dist/cjs/views/TreeView.native.js.map +1 -1
- package/dist/cjs/views/ganttIntervals.cjs +85 -0
- package/dist/cjs/views/ganttIntervals.native.js +92 -0
- package/dist/cjs/views/ganttIntervals.native.js.map +1 -0
- package/dist/esm/Alert/index.mjs +2 -2
- package/dist/esm/Alert/index.mjs.map +1 -1
- package/dist/esm/Alert/index.native.js +2 -2
- package/dist/esm/Alert/index.native.js.map +1 -1
- package/dist/esm/Carousel/index.mjs +1 -1
- package/dist/esm/Carousel/index.mjs.map +1 -1
- package/dist/esm/Carousel/index.native.js +1 -1
- package/dist/esm/Carousel/index.native.js.map +1 -1
- package/dist/esm/Chip/index.mjs +18 -7
- package/dist/esm/Chip/index.mjs.map +1 -1
- package/dist/esm/Chip/index.native.js +20 -8
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/ErrorBoundary/index.mjs +1 -1
- package/dist/esm/ErrorBoundary/index.mjs.map +1 -1
- package/dist/esm/ErrorBoundary/index.native.js +1 -1
- package/dist/esm/ErrorBoundary/index.native.js.map +1 -1
- package/dist/esm/Heading.mjs +1 -120
- package/dist/esm/Heading.mjs.map +1 -1
- package/dist/esm/Heading.native.js +1 -127
- package/dist/esm/Heading.native.js.map +1 -1
- package/dist/esm/OverflowRow/index.mjs +66 -4
- package/dist/esm/OverflowRow/index.mjs.map +1 -1
- package/dist/esm/OverflowRow/index.native.js +69 -4
- package/dist/esm/OverflowRow/index.native.js.map +1 -1
- package/dist/esm/Pagination.mjs +4 -1
- package/dist/esm/Pagination.mjs.map +1 -1
- package/dist/esm/Pagination.native.js +4 -1
- package/dist/esm/Pagination.native.js.map +1 -1
- package/dist/esm/ProgressSteps/index.mjs +2 -2
- package/dist/esm/ProgressSteps/index.mjs.map +1 -1
- package/dist/esm/ProgressSteps/index.native.js +2 -2
- package/dist/esm/ProgressSteps/index.native.js.map +1 -1
- package/dist/esm/Quote/index.mjs +2 -1
- package/dist/esm/Quote/index.mjs.map +1 -1
- package/dist/esm/Quote/index.native.js +2 -1
- package/dist/esm/Quote/index.native.js.map +1 -1
- package/dist/esm/SkipLink/index.mjs +1 -2
- package/dist/esm/SkipLink/index.mjs.map +1 -1
- package/dist/esm/SkipLink/index.native.js +1 -2
- package/dist/esm/SkipLink/index.native.js.map +1 -1
- package/dist/esm/SortableList/index.mjs +5 -4
- package/dist/esm/SortableList/index.mjs.map +1 -1
- package/dist/esm/SortableList/index.native.js +5 -4
- package/dist/esm/SortableList/index.native.js.map +1 -1
- package/dist/esm/SortableList/useSortableRows.mjs +2 -2
- package/dist/esm/SortableList/useSortableRows.mjs.map +1 -1
- package/dist/esm/SortableList/useSortableRows.native.js +2 -2
- package/dist/esm/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/esm/Text.mjs +1 -112
- package/dist/esm/Text.mjs.map +1 -1
- package/dist/esm/Text.native.js +1 -117
- package/dist/esm/Text.native.js.map +1 -1
- package/dist/esm/ThemePlayground/index.mjs +2 -1
- package/dist/esm/ThemePlayground/index.mjs.map +1 -1
- package/dist/esm/ThemePresetPicker/index.mjs +21 -22
- package/dist/esm/ThemePresetPicker/index.mjs.map +1 -1
- package/dist/esm/ThemePresetPicker/index.native.js +21 -22
- package/dist/esm/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/esm/TreeSelect/index.mjs +6 -5
- package/dist/esm/TreeSelect/index.mjs.map +1 -1
- package/dist/esm/TreeSelect/index.native.js +6 -5
- package/dist/esm/TreeSelect/index.native.js.map +1 -1
- package/dist/esm/Video/PlayerChrome.mjs +1 -1
- package/dist/esm/Video/PlayerChrome.mjs.map +1 -1
- package/dist/esm/Video/PlayerChrome.native.js +1 -1
- package/dist/esm/Video/PlayerChrome.native.js.map +1 -1
- package/dist/esm/Video/VideoFrame.mjs +3 -2
- package/dist/esm/Video/VideoFrame.mjs.map +1 -1
- package/dist/esm/Video/VideoFrame.native.js +3 -2
- package/dist/esm/Video/VideoFrame.native.js.map +1 -1
- package/dist/esm/Video/index.mjs +3 -1
- package/dist/esm/Video/index.mjs.map +1 -1
- package/dist/esm/actions/DestructiveAction.mjs +2 -1
- package/dist/esm/actions/DestructiveAction.mjs.map +1 -1
- package/dist/esm/actions/DestructiveAction.native.js +2 -1
- package/dist/esm/actions/DestructiveAction.native.js.map +1 -1
- package/dist/esm/appShell/ScopeMenu.mjs +2 -1
- package/dist/esm/appShell/ScopeMenu.mjs.map +1 -1
- package/dist/esm/appShell/ScopeMenu.native.js +2 -1
- package/dist/esm/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/esm/appShell/SettingsSplit.mjs +5 -4
- package/dist/esm/appShell/SettingsSplit.mjs.map +1 -1
- package/dist/esm/appShell/SettingsSplit.native.js +5 -4
- package/dist/esm/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/esm/appShell/Springboard.mjs +3 -2
- package/dist/esm/appShell/Springboard.mjs.map +1 -1
- package/dist/esm/appShell/Springboard.native.js +3 -2
- package/dist/esm/appShell/Springboard.native.js.map +1 -1
- package/dist/esm/appShell/SystemBar.mjs +2 -1
- package/dist/esm/appShell/SystemBar.mjs.map +1 -1
- package/dist/esm/appShell/SystemBar.native.js +2 -1
- package/dist/esm/appShell/SystemBar.native.js.map +1 -1
- package/dist/esm/code/Highlighter/index.mjs +9 -2
- package/dist/esm/code/Highlighter/index.mjs.map +1 -1
- package/dist/esm/code/Highlighter/index.native.js +13 -2
- package/dist/esm/code/Highlighter/index.native.js.map +1 -1
- package/dist/esm/code/Highlighter/namedGroupMatchAll.mjs +70 -0
- package/dist/esm/code/Highlighter/namedGroupMatchAll.mjs.map +1 -0
- package/dist/esm/code/Highlighter/namedGroupMatchAll.native.js +79 -0
- package/dist/esm/code/Highlighter/namedGroupMatchAll.native.js.map +1 -0
- package/dist/esm/feedback/ConfirmDialog.mjs +1 -1
- package/dist/esm/feedback/ConfirmDialog.mjs.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.native.js +1 -1
- package/dist/esm/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/esm/layouts/attachments.mjs +3 -2
- package/dist/esm/layouts/attachments.mjs.map +1 -1
- package/dist/esm/layouts/attachments.native.js +3 -2
- package/dist/esm/layouts/attachments.native.js.map +1 -1
- package/dist/esm/layouts/breadcrumbs.mjs +3 -2
- package/dist/esm/layouts/breadcrumbs.mjs.map +1 -1
- package/dist/esm/layouts/breadcrumbs.native.js +3 -2
- package/dist/esm/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +80 -10
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +82 -10
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/sidebar.mjs +5 -3
- package/dist/esm/layouts/sidebar.mjs.map +1 -1
- package/dist/esm/layouts/sidebar.native.js +5 -3
- package/dist/esm/layouts/sidebar.native.js.map +1 -1
- package/dist/esm/layouts/tags.mjs +6 -5
- package/dist/esm/layouts/tags.mjs.map +1 -1
- package/dist/esm/layouts/tags.native.js +6 -5
- package/dist/esm/layouts/tags.native.js.map +1 -1
- package/dist/esm/layouts/timeline.mjs +4 -3
- package/dist/esm/layouts/timeline.mjs.map +1 -1
- package/dist/esm/layouts/timeline.native.js +4 -3
- package/dist/esm/layouts/timeline.native.js.map +1 -1
- package/dist/esm/layouts/toolbar.mjs +2 -1
- package/dist/esm/layouts/toolbar.mjs.map +1 -1
- package/dist/esm/layouts/toolbar.native.js +2 -1
- package/dist/esm/layouts/toolbar.native.js.map +1 -1
- package/dist/esm/linearGradientSetup.mjs +2 -0
- package/dist/esm/linearGradientSetup.mjs.map +1 -0
- package/dist/esm/linearGradientSetup.native.js +2 -0
- package/dist/esm/linearGradientSetup.native.js.map +1 -0
- package/dist/esm/views/Calendar.mjs +7 -6
- package/dist/esm/views/Calendar.mjs.map +1 -1
- package/dist/esm/views/Calendar.native.js +7 -6
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/Gantt.mjs +196 -63
- package/dist/esm/views/Gantt.mjs.map +1 -1
- package/dist/esm/views/Gantt.native.js +209 -63
- package/dist/esm/views/Gantt.native.js.map +1 -1
- package/dist/esm/views/GanttDateGrip.mjs +191 -0
- package/dist/esm/views/GanttDateGrip.mjs.map +1 -0
- package/dist/esm/views/GanttDateGrip.native.js +231 -0
- package/dist/esm/views/GanttDateGrip.native.js.map +1 -0
- package/dist/esm/views/Kanban.mjs +5 -4
- package/dist/esm/views/Kanban.mjs.map +1 -1
- package/dist/esm/views/Kanban.native.js +3 -2
- package/dist/esm/views/Kanban.native.js.map +1 -1
- package/dist/esm/views/List.mjs +13 -5
- package/dist/esm/views/List.mjs.map +1 -1
- package/dist/esm/views/List.native.js +14 -5
- package/dist/esm/views/List.native.js.map +1 -1
- package/dist/esm/views/Matrix.mjs +10 -9
- package/dist/esm/views/Matrix.mjs.map +1 -1
- package/dist/esm/views/Matrix.native.js +10 -9
- package/dist/esm/views/Matrix.native.js.map +1 -1
- package/dist/esm/views/TreeView.mjs +5 -4
- package/dist/esm/views/TreeView.mjs.map +1 -1
- package/dist/esm/views/TreeView.native.js +5 -4
- package/dist/esm/views/TreeView.native.js.map +1 -1
- package/dist/esm/views/ganttIntervals.mjs +57 -0
- package/dist/esm/views/ganttIntervals.mjs.map +1 -0
- package/dist/esm/views/ganttIntervals.native.js +61 -0
- package/dist/esm/views/ganttIntervals.native.js.map +1 -0
- package/dist/jsx/Alert/index.mjs +2 -2
- package/dist/jsx/Alert/index.mjs.map +1 -1
- package/dist/jsx/Alert/index.native.js +1 -1
- package/dist/jsx/Alert/index.native.js.map +1 -1
- package/dist/jsx/Carousel/index.mjs +1 -1
- package/dist/jsx/Carousel/index.mjs.map +1 -1
- package/dist/jsx/Carousel/index.native.js +1 -1
- package/dist/jsx/Carousel/index.native.js.map +1 -1
- package/dist/jsx/Chip/index.mjs +18 -7
- package/dist/jsx/Chip/index.mjs.map +1 -1
- package/dist/jsx/Chip/index.native.js +20 -8
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/ErrorBoundary/index.mjs +1 -1
- package/dist/jsx/ErrorBoundary/index.mjs.map +1 -1
- package/dist/jsx/ErrorBoundary/index.native.js +2 -2
- package/dist/jsx/ErrorBoundary/index.native.js.map +1 -1
- package/dist/jsx/Heading.mjs +1 -120
- package/dist/jsx/Heading.mjs.map +1 -1
- package/dist/jsx/Heading.native.js +7 -133
- package/dist/jsx/Heading.native.js.map +1 -1
- package/dist/jsx/OverflowRow/index.mjs +66 -4
- package/dist/jsx/OverflowRow/index.mjs.map +1 -1
- package/dist/jsx/OverflowRow/index.native.js +68 -2
- package/dist/jsx/OverflowRow/index.native.js.map +1 -1
- package/dist/jsx/Pagination.mjs +4 -1
- package/dist/jsx/Pagination.mjs.map +1 -1
- package/dist/jsx/Pagination.native.js +4 -1
- package/dist/jsx/Pagination.native.js.map +1 -1
- package/dist/jsx/ProgressSteps/index.mjs +2 -2
- package/dist/jsx/ProgressSteps/index.mjs.map +1 -1
- package/dist/jsx/ProgressSteps/index.native.js +1 -1
- package/dist/jsx/ProgressSteps/index.native.js.map +1 -1
- package/dist/jsx/Quote/index.mjs +2 -1
- package/dist/jsx/Quote/index.mjs.map +1 -1
- package/dist/jsx/Quote/index.native.js +1 -0
- package/dist/jsx/Quote/index.native.js.map +1 -1
- package/dist/jsx/SkipLink/index.mjs +1 -2
- package/dist/jsx/SkipLink/index.mjs.map +1 -1
- package/dist/jsx/SkipLink/index.native.js +1 -2
- package/dist/jsx/SkipLink/index.native.js.map +1 -1
- package/dist/jsx/SortableList/index.mjs +5 -4
- package/dist/jsx/SortableList/index.mjs.map +1 -1
- package/dist/jsx/SortableList/index.native.js +2 -1
- package/dist/jsx/SortableList/index.native.js.map +1 -1
- package/dist/jsx/SortableList/useSortableRows.mjs +2 -2
- package/dist/jsx/SortableList/useSortableRows.mjs.map +1 -1
- package/dist/jsx/SortableList/useSortableRows.native.js +2 -2
- package/dist/jsx/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/jsx/Text.mjs +1 -112
- package/dist/jsx/Text.mjs.map +1 -1
- package/dist/jsx/Text.native.js +4 -120
- package/dist/jsx/Text.native.js.map +1 -1
- package/dist/jsx/ThemePlayground/index.mjs +2 -1
- package/dist/jsx/ThemePlayground/index.mjs.map +1 -1
- package/dist/jsx/ThemePresetPicker/index.mjs +21 -22
- package/dist/jsx/ThemePresetPicker/index.mjs.map +1 -1
- package/dist/jsx/ThemePresetPicker/index.native.js +21 -22
- package/dist/jsx/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/jsx/TreeSelect/index.mjs +6 -5
- package/dist/jsx/TreeSelect/index.mjs.map +1 -1
- package/dist/jsx/TreeSelect/index.native.js +2 -1
- package/dist/jsx/TreeSelect/index.native.js.map +1 -1
- package/dist/jsx/Video/PlayerChrome.mjs +1 -1
- package/dist/jsx/Video/PlayerChrome.mjs.map +1 -1
- package/dist/jsx/Video/PlayerChrome.native.js +1 -1
- package/dist/jsx/Video/PlayerChrome.native.js.map +1 -1
- package/dist/jsx/Video/VideoFrame.mjs +3 -2
- package/dist/jsx/Video/VideoFrame.mjs.map +1 -1
- package/dist/jsx/Video/VideoFrame.native.js +2 -1
- package/dist/jsx/Video/VideoFrame.native.js.map +1 -1
- package/dist/jsx/Video/index.mjs +3 -1
- package/dist/jsx/Video/index.mjs.map +1 -1
- package/dist/jsx/actions/DestructiveAction.mjs +2 -1
- package/dist/jsx/actions/DestructiveAction.mjs.map +1 -1
- package/dist/jsx/actions/DestructiveAction.native.js +3 -2
- package/dist/jsx/actions/DestructiveAction.native.js.map +1 -1
- package/dist/jsx/appShell/ScopeMenu.mjs +2 -1
- package/dist/jsx/appShell/ScopeMenu.mjs.map +1 -1
- package/dist/jsx/appShell/ScopeMenu.native.js +2 -1
- package/dist/jsx/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/jsx/appShell/SettingsSplit.mjs +5 -4
- package/dist/jsx/appShell/SettingsSplit.mjs.map +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js +5 -4
- package/dist/jsx/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/jsx/appShell/Springboard.mjs +3 -2
- package/dist/jsx/appShell/Springboard.mjs.map +1 -1
- package/dist/jsx/appShell/Springboard.native.js +2 -1
- package/dist/jsx/appShell/Springboard.native.js.map +1 -1
- package/dist/jsx/appShell/SystemBar.mjs +2 -1
- package/dist/jsx/appShell/SystemBar.mjs.map +1 -1
- package/dist/jsx/appShell/SystemBar.native.js +2 -1
- package/dist/jsx/appShell/SystemBar.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/index.mjs +9 -2
- package/dist/jsx/code/Highlighter/index.mjs.map +1 -1
- package/dist/jsx/code/Highlighter/index.native.js +13 -2
- package/dist/jsx/code/Highlighter/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.mjs +70 -0
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.mjs.map +1 -0
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.native.js +108 -0
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.native.js.map +1 -0
- package/dist/jsx/feedback/ConfirmDialog.mjs +1 -1
- package/dist/jsx/feedback/ConfirmDialog.mjs.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.native.js +1 -1
- package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/jsx/layouts/attachments.mjs +3 -2
- package/dist/jsx/layouts/attachments.mjs.map +1 -1
- package/dist/jsx/layouts/attachments.native.js +11 -10
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.mjs +3 -2
- package/dist/jsx/layouts/breadcrumbs.mjs.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.native.js +3 -2
- package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +80 -10
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +82 -8
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/sidebar.mjs +5 -3
- package/dist/jsx/layouts/sidebar.mjs.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js +3 -1
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/dist/jsx/layouts/tags.mjs +6 -5
- package/dist/jsx/layouts/tags.mjs.map +1 -1
- package/dist/jsx/layouts/tags.native.js +2 -1
- package/dist/jsx/layouts/tags.native.js.map +1 -1
- package/dist/jsx/layouts/timeline.mjs +4 -3
- package/dist/jsx/layouts/timeline.mjs.map +1 -1
- package/dist/jsx/layouts/timeline.native.js +14 -13
- package/dist/jsx/layouts/timeline.native.js.map +1 -1
- package/dist/jsx/layouts/toolbar.mjs +2 -1
- package/dist/jsx/layouts/toolbar.mjs.map +1 -1
- package/dist/jsx/layouts/toolbar.native.js +2 -1
- package/dist/jsx/layouts/toolbar.native.js.map +1 -1
- package/dist/jsx/linearGradientSetup.mjs +2 -0
- package/dist/jsx/linearGradientSetup.mjs.map +1 -0
- package/dist/jsx/linearGradientSetup.native.js +4 -0
- package/dist/jsx/linearGradientSetup.native.js.map +1 -0
- package/dist/jsx/views/Calendar.mjs +7 -6
- package/dist/jsx/views/Calendar.mjs.map +1 -1
- package/dist/jsx/views/Calendar.native.js +14 -13
- package/dist/jsx/views/Calendar.native.js.map +1 -1
- package/dist/jsx/views/Gantt.mjs +196 -63
- package/dist/jsx/views/Gantt.mjs.map +1 -1
- package/dist/jsx/views/Gantt.native.js +201 -55
- package/dist/jsx/views/Gantt.native.js.map +1 -1
- package/dist/jsx/views/GanttDateGrip.mjs +191 -0
- package/dist/jsx/views/GanttDateGrip.mjs.map +1 -0
- package/dist/jsx/views/GanttDateGrip.native.js +259 -0
- package/dist/jsx/views/GanttDateGrip.native.js.map +1 -0
- package/dist/jsx/views/Kanban.mjs +5 -4
- package/dist/jsx/views/Kanban.mjs.map +1 -1
- package/dist/jsx/views/Kanban.native.js +3 -2
- package/dist/jsx/views/Kanban.native.js.map +1 -1
- package/dist/jsx/views/List.mjs +13 -5
- package/dist/jsx/views/List.mjs.map +1 -1
- package/dist/jsx/views/List.native.js +14 -3
- package/dist/jsx/views/List.native.js.map +1 -1
- package/dist/jsx/views/Matrix.mjs +10 -9
- package/dist/jsx/views/Matrix.mjs.map +1 -1
- package/dist/jsx/views/Matrix.native.js +2 -1
- package/dist/jsx/views/Matrix.native.js.map +1 -1
- package/dist/jsx/views/TreeView.mjs +5 -4
- package/dist/jsx/views/TreeView.mjs.map +1 -1
- package/dist/jsx/views/TreeView.native.js +3 -2
- package/dist/jsx/views/TreeView.native.js.map +1 -1
- package/dist/jsx/views/ganttIntervals.mjs +57 -0
- package/dist/jsx/views/ganttIntervals.mjs.map +1 -0
- package/dist/jsx/views/ganttIntervals.native.js +92 -0
- package/dist/jsx/views/ganttIntervals.native.js.map +1 -0
- package/package.json +12 -10
- package/src/Accordion/Accordion.stories.tsx +2 -1
- package/src/Alert/Alert.stories.tsx +2 -1
- package/src/Alert/index.tsx +2 -1
- package/src/AnimateHeight/AnimateHeight.stories.tsx +2 -1
- package/src/Avatar/Avatar.stories.tsx +2 -1
- package/src/Badge/Badge.stories.tsx +2 -1
- package/src/Card.stories.tsx +2 -1
- package/src/CardFooter.stories.tsx +2 -1
- package/src/CardHeader.stories.tsx +2 -1
- package/src/Carousel/Carousel.stories.tsx +2 -1
- package/src/Carousel/index.tsx +1 -1
- package/src/Chip/Chip.borderLadder.spec.tsx +3 -3
- package/src/Chip/Chip.ink.spec.tsx +70 -2
- package/src/Chip/Chip.spec.tsx +7 -4
- package/src/Chip/Chip.stories.tsx +2 -1
- package/src/Chip/index.tsx +29 -7
- package/src/ContextMenu/ContextMenu.stories.tsx +2 -1
- package/src/DialogContent.stories.tsx +2 -1
- package/src/DotIndicator/DotIndicator.stories.tsx +2 -1
- package/src/DropdownMenu/DropdownMenu.stories.tsx +2 -1
- package/src/ErrorBoundary/ErrorBoundary.stories.tsx +2 -1
- package/src/ErrorBoundary/index.tsx +1 -1
- package/src/Heading.native.spec.tsx +13 -5
- package/src/Heading.spec.tsx +55 -11
- package/src/Heading.tsx +3 -66
- package/src/Meter/Meter.spec.tsx +4 -4
- package/src/OverflowRow/OverflowRow.native.spec.tsx +124 -1
- package/src/OverflowRow/index.tsx +103 -4
- package/src/Pagination.stories.tsx +2 -1
- package/src/Pagination.tsx +9 -1
- package/src/Panel.stories.tsx +2 -1
- package/src/PopoverContent.stories.tsx +2 -1
- package/src/ProgressSteps/index.tsx +5 -1
- package/src/Quote/index.tsx +9 -2
- package/src/Separator/Separator.stories.tsx +2 -1
- package/src/SheetFrame.stories.tsx +2 -1
- package/src/SheetModal/SheetModal.stories.tsx +2 -1
- package/src/Skeleton/Skeleton.stories.tsx +2 -1
- package/src/SkipLink/SkipLink.stories.tsx +2 -1
- package/src/SkipLink/index.tsx +1 -2
- package/src/SortableList/index.tsx +14 -6
- package/src/SortableList/useSortableRows.ts +3 -2
- package/src/Tabs/Tabs.stories.tsx +2 -1
- package/src/Text.spec.tsx +22 -0
- package/src/Text.tsx +9 -133
- package/src/ThemePlayground/ExpoThemeColors.stories.tsx +60 -0
- package/src/ThemePlayground/index.tsx +2 -1
- package/src/ThemePresetPicker/ThemePresetPicker.spec.tsx +20 -0
- package/src/ThemePresetPicker/ThemePresetPicker.stories.spec.tsx +34 -12
- package/src/ThemePresetPicker/ThemePresetPicker.stories.tsx +11 -3
- package/src/ThemePresetPicker/index.tsx +35 -29
- package/src/Toast/Toast.stories.tsx +2 -1
- package/src/Tooltip/Tooltip.spec.tsx +1 -1
- package/src/TreeSelect/index.tsx +10 -9
- package/src/Video/PlayerChrome.tsx +1 -1
- package/src/Video/VideoFrame.tsx +4 -3
- package/src/Video/index.tsx +3 -1
- package/src/Wheel/Wheel.stories.tsx +2 -1
- package/src/actions/ActionBar.stories.tsx +2 -1
- package/src/actions/DestructiveAction.stories.tsx +2 -1
- package/src/actions/DestructiveAction.tsx +2 -1
- package/src/appShell/ScopeMenu.tsx +2 -1
- package/src/appShell/SettingsSplit.stories.tsx +2 -1
- package/src/appShell/SettingsSplit.tsx +6 -5
- package/src/appShell/Springboard.tsx +3 -2
- package/src/appShell/SystemBar.tsx +2 -1
- package/src/charts/Axis.stories.tsx +2 -1
- package/src/charts/ChartSurface.stories.tsx +2 -1
- package/src/charts/Charts.stories.tsx +2 -1
- package/src/code/CodeBlock/codeBlock.stories.ts +15 -0
- package/src/code/CodeInline.stories.tsx +3 -1
- package/src/code/Highlighter/Highlighter.native.spec.ts +76 -0
- package/src/code/Highlighter/index.ts +16 -1
- package/src/code/Highlighter/namedGroupMatchAll.ts +90 -0
- package/src/feedback/ConfirmDialog.stories.tsx +2 -1
- package/src/feedback/ConfirmDialog.tsx +1 -1
- package/src/feedback/Notify.stories.tsx +2 -1
- package/src/icons/CheckRegular.stories.tsx +2 -1
- package/src/icons/MinusRegular.stories.tsx +2 -1
- package/src/layouts/AsyncBoundary.stories.tsx +2 -1
- package/src/layouts/Attachments.stories.tsx +2 -1
- package/src/layouts/Debug/DebugLayout.stories.tsx +2 -1
- package/src/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.tsx +2 -2
- package/src/layouts/PageHeader.stories.tsx +2 -1
- package/src/layouts/PageSection.stories.tsx +2 -1
- package/src/layouts/PageTemplates.stories.tsx +64 -2
- package/src/layouts/PaneScaffold.stories.tsx +2 -2
- package/src/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.tsx +2 -2
- package/src/layouts/Screen.stories.tsx +2 -1
- package/src/layouts/Sidebar.stories.tsx +2 -1
- package/src/layouts/Tags.stories.tsx +2 -1
- package/src/layouts/Timeline.stories.tsx +2 -1
- package/src/layouts/Toolbar.stories.tsx +2 -1
- package/src/layouts/ViewSwitcher.stories.tsx +2 -1
- package/src/layouts/attachments.tsx +4 -3
- package/src/layouts/breadcrumbs.tsx +4 -3
- package/src/layouts/page.tsx +98 -9
- package/src/layouts/pageChrome.phone.spec.tsx +58 -0
- package/src/layouts/sidebar.tsx +7 -5
- package/src/layouts/tags-trigger.spec.tsx +3 -3
- package/src/layouts/tags.tsx +14 -9
- package/src/layouts/timeline.tsx +6 -5
- package/src/layouts/toolbar.tsx +2 -1
- package/src/linearGradientSetup.native.spec.ts +19 -0
- package/src/linearGradientSetup.native.ts +3 -0
- package/src/linearGradientSetup.ts +1 -0
- package/src/views/Calendar.tsx +12 -11
- package/src/views/Gantt.intervals.spec.tsx +69 -0
- package/src/views/Gantt.scroll.spec.tsx +42 -0
- package/src/views/Gantt.spec.tsx +4 -5
- package/src/views/Gantt.stories.tsx +19 -0
- package/src/views/Gantt.tsx +230 -106
- package/src/views/GanttDateGrip.native.spec.tsx +118 -0
- package/src/views/GanttDateGrip.tsx +266 -0
- package/src/views/ImageGrid.stories.tsx +2 -1
- package/src/views/Kanban.native.spec.tsx +98 -0
- package/src/views/Kanban.native.tsx +3 -2
- package/src/views/Kanban.stories.tsx +2 -1
- package/src/views/Kanban.tsx +15 -6
- package/src/views/List.spec.tsx +18 -0
- package/src/views/List.tsx +17 -2
- package/src/views/Matrix.tsx +22 -17
- package/src/views/TreeView.reveal.stories.tsx +2 -1
- package/src/views/TreeView.tsx +15 -6
- package/src/views/dataIdentity.spec.tsx +5 -1
- package/src/views/ganttIntervals.spec.ts +84 -0
- package/src/views/ganttIntervals.ts +91 -0
- package/src/views/index.ts +2 -0
- package/types/Alert/index.d.ts.map +1 -1
- package/types/Chip/index.d.ts +5 -3
- package/types/Chip/index.d.ts.map +1 -1
- package/types/Collapsible.d.ts +1 -1
- package/types/Heading.d.ts +2 -9
- package/types/Heading.d.ts.map +1 -1
- package/types/OverflowRow/index.d.ts +1 -0
- package/types/OverflowRow/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/Quote/index.d.ts.map +1 -1
- package/types/SkipLink/index.d.ts.map +1 -1
- package/types/SortableList/index.d.ts.map +1 -1
- package/types/SortableList/useSortableRows.d.ts.map +1 -1
- package/types/Tabs/index.d.ts +1 -1
- package/types/Text.d.ts +2 -12
- package/types/Text.d.ts.map +1 -1
- package/types/ThemePlayground/index.d.ts.map +1 -1
- package/types/ThemePresetPicker/index.d.ts +3 -1
- package/types/ThemePresetPicker/index.d.ts.map +1 -1
- package/types/TreeSelect/index.d.ts.map +1 -1
- package/types/Video/VideoFrame.d.ts.map +1 -1
- package/types/Video/index.d.ts.map +1 -1
- package/types/actions/DestructiveAction.d.ts.map +1 -1
- package/types/appShell/ScopeMenu.d.ts.map +1 -1
- package/types/appShell/SettingsSplit.d.ts.map +1 -1
- package/types/appShell/Springboard.d.ts.map +1 -1
- package/types/appShell/SystemBar.d.ts.map +1 -1
- package/types/code/Highlighter/index.d.ts.map +1 -1
- package/types/code/Highlighter/namedGroupMatchAll.d.ts +22 -0
- package/types/code/Highlighter/namedGroupMatchAll.d.ts.map +1 -0
- package/types/layouts/attachments.d.ts.map +1 -1
- package/types/layouts/breadcrumbs.d.ts.map +1 -1
- package/types/layouts/page.d.ts +21 -3
- package/types/layouts/page.d.ts.map +1 -1
- package/types/layouts/sidebar.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/layouts/toolbar.d.ts.map +1 -1
- package/types/linearGradientSetup.d.ts +2 -0
- package/types/linearGradientSetup.d.ts.map +1 -0
- package/types/linearGradientSetup.native.d.ts +2 -0
- package/types/linearGradientSetup.native.d.ts.map +1 -0
- package/types/views/Calendar.d.ts.map +1 -1
- package/types/views/Gantt.d.ts +9 -21
- package/types/views/Gantt.d.ts.map +1 -1
- package/types/views/GanttDateGrip.d.ts +22 -0
- package/types/views/GanttDateGrip.d.ts.map +1 -0
- package/types/views/Kanban.d.ts.map +1 -1
- package/types/views/List.d.ts +17 -0
- package/types/views/List.d.ts.map +1 -1
- package/types/views/Matrix.d.ts.map +1 -1
- package/types/views/TreeView.d.ts.map +1 -1
- package/types/views/ganttIntervals.d.ts +11 -0
- package/types/views/ganttIntervals.d.ts.map +1 -0
- package/types/views/index.d.ts +1 -0
- package/types/views/index.d.ts.map +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { action } from "@multiplatform.one/storybook";
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
3
3
|
import { useState } from "react";
|
|
4
|
-
import { XStack, YStack
|
|
4
|
+
import { XStack, YStack } from "tamagui";
|
|
5
5
|
import { DotIndicator, type DotVariant } from "./index";
|
|
6
|
+
import { Text } from "../Text";
|
|
6
7
|
|
|
7
8
|
const meta: Meta<typeof DotIndicator> = {
|
|
8
9
|
title: "Components/DotIndicator",
|
|
@@ -12,8 +12,9 @@ import {
|
|
|
12
12
|
} from "@phosphor-icons/react";
|
|
13
13
|
// Catalog Button (G-15 story honesty / LC-18, UX-P06).
|
|
14
14
|
import { Button } from "@multiplatform.one/forms";
|
|
15
|
-
import {
|
|
15
|
+
import { XStack, YStack } from "tamagui";
|
|
16
16
|
import { DropdownMenu, type DropdownMenuEntry } from "./index";
|
|
17
|
+
import { Text } from "../Text";
|
|
17
18
|
|
|
18
19
|
const meta: Meta<typeof DropdownMenu> = {
|
|
19
20
|
title: "Components/DropdownMenu",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { Button } from "@multiplatform.one/forms";
|
|
4
|
-
import {
|
|
4
|
+
import { YStack } from "tamagui";
|
|
5
5
|
import { ErrorBoundary } from "./index";
|
|
6
|
+
import { Text } from "../Text";
|
|
6
7
|
|
|
7
8
|
const meta: Meta<typeof ErrorBoundary> = {
|
|
8
9
|
title: "Components/ErrorBoundary",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ErrorInfo, ReactNode } from "react";
|
|
2
2
|
import { Component } from "react";
|
|
3
|
-
import { Text } from "tamagui";
|
|
4
3
|
import { useTranslation } from "../shared/i18n";
|
|
5
4
|
import { Button } from "../Button";
|
|
6
5
|
import { EmptyState } from "../layouts/EmptyState";
|
|
6
|
+
import { Text } from "../Text";
|
|
7
7
|
|
|
8
8
|
const logger = console;
|
|
9
9
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { cleanup, screen } from "@testing-library/react";
|
|
7
7
|
import { renderTypography as renderWithProviders } from "../tests/renderTypography";
|
|
8
|
-
import { Preset } from "@multiplatform.one/theme";
|
|
8
|
+
import { Preset, resolvePageTitleScale } from "@multiplatform.one/theme";
|
|
9
9
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
10
10
|
import { H1, H3, Heading } from "./Heading";
|
|
11
11
|
|
|
@@ -94,12 +94,20 @@ describe("house Heading — NATIVE environment (isWeb false)", () => {
|
|
|
94
94
|
["_fos-", "_lh-"],
|
|
95
95
|
"H1",
|
|
96
96
|
);
|
|
97
|
-
const
|
|
98
|
-
|
|
97
|
+
const explicitModerate = renderHeadingClasses(
|
|
98
|
+
<H1 {...resolvePageTitleScale("moderate")}>{TITLE}</H1>,
|
|
99
|
+
["_fos-", "_lh-"],
|
|
100
|
+
"H1",
|
|
101
|
+
);
|
|
102
|
+
const explicitDisplay = renderHeadingClasses(
|
|
103
|
+
<H1 {...resolvePageTitleScale("display")}>{TITLE}</H1>,
|
|
104
|
+
["_fos-", "_lh-"],
|
|
105
|
+
"H1",
|
|
106
|
+
);
|
|
99
107
|
expect(moderate).not.toHaveLength(0);
|
|
100
108
|
expect(moderate).not.toEqual(display);
|
|
101
|
-
expect(moderate).toEqual(
|
|
102
|
-
expect(display).toEqual(
|
|
109
|
+
expect(moderate).toEqual(explicitModerate);
|
|
110
|
+
expect(display).toEqual(explicitDisplay);
|
|
103
111
|
});
|
|
104
112
|
|
|
105
113
|
it("H1 carries the fontWeight flip too — pageTitle does not swallow it", () => {
|
package/src/Heading.spec.tsx
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { cleanup, screen } from "@testing-library/react";
|
|
6
6
|
import { renderTypography as renderWithProviders } from "../tests/renderTypography";
|
|
7
|
-
import { Preset } from "@multiplatform.one/theme";
|
|
7
|
+
import { Preset, resolvePageTitleScale } from "@multiplatform.one/theme";
|
|
8
8
|
import { afterEach, describe, expect, it } from "vitest";
|
|
9
9
|
import { H1, H2, H3, Heading } from "./Heading";
|
|
10
10
|
|
|
@@ -191,12 +191,16 @@ describe("house H1 — pageTitleScale reaches the title text node (LC-17 / D-11)
|
|
|
191
191
|
expect(byDefault).not.toEqual(display);
|
|
192
192
|
});
|
|
193
193
|
|
|
194
|
-
it("resolves through the one D-11 table: the knob equals the explicit
|
|
195
|
-
// moderate → $10, display → $12 on the heading
|
|
196
|
-
// pageTitleSizeMap). Identity against
|
|
197
|
-
// fragment
|
|
194
|
+
it("resolves through the one D-11 table: the knob equals the explicit table step", () => {
|
|
195
|
+
// moderate → $10 ($9 below $sm), display → $12 ($11) on the heading
|
|
196
|
+
// scale (resolveKnobs pageTitleSizeMap). Identity against the table's own
|
|
197
|
+
// fragment pins the knob to it without hardcoding hashed classes or px.
|
|
198
198
|
const moderate = renderHeadingClasses(<H1>{TITLE}</H1>, ["_fos-", "_lh-"], "H1");
|
|
199
|
-
const
|
|
199
|
+
const explicitModerate = renderHeadingClasses(
|
|
200
|
+
<H1 {...resolvePageTitleScale("moderate")}>{TITLE}</H1>,
|
|
201
|
+
["_fos-", "_lh-"],
|
|
202
|
+
"H1",
|
|
203
|
+
);
|
|
200
204
|
const display = renderHeadingClasses(
|
|
201
205
|
<Preset overrides={{ pageTitleScale: "display" }}>
|
|
202
206
|
<H1>{TITLE}</H1>
|
|
@@ -204,9 +208,39 @@ describe("house H1 — pageTitleScale reaches the title text node (LC-17 / D-11)
|
|
|
204
208
|
["_fos-", "_lh-"],
|
|
205
209
|
"H1",
|
|
206
210
|
);
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
211
|
+
const explicitDisplay = renderHeadingClasses(
|
|
212
|
+
<H1 {...resolvePageTitleScale("display")}>{TITLE}</H1>,
|
|
213
|
+
["_fos-", "_lh-"],
|
|
214
|
+
"H1",
|
|
215
|
+
);
|
|
216
|
+
expect(moderate).toEqual(explicitModerate);
|
|
217
|
+
expect(display).toEqual(explicitDisplay);
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
it("steps down one token below $sm (LC-143)", () => {
|
|
221
|
+
const moderate = renderHeadingClasses(<H1>{TITLE}</H1>, ["_fos-_maxsm", "_lh-_maxsm"], "H1");
|
|
222
|
+
const compact9 = renderHeadingClasses(
|
|
223
|
+
<H1 size="$10" $max-sm={{ fontSize: "$9", lineHeight: "$9", letterSpacing: "$9" }}>
|
|
224
|
+
{TITLE}
|
|
225
|
+
</H1>,
|
|
226
|
+
["_fos-_maxsm", "_lh-_maxsm"],
|
|
227
|
+
"H1",
|
|
228
|
+
);
|
|
229
|
+
expect(moderate).not.toHaveLength(0);
|
|
230
|
+
expect(moderate).toEqual(compact9);
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
it("keeps the preset's weight and the consumer's colour on a phone (LC-143)", () => {
|
|
234
|
+
// A media `size` variant would also write the font table's weight and
|
|
235
|
+
// colour, which outrank base props below $sm.
|
|
236
|
+
const bold = renderHeadingClasses(
|
|
237
|
+
<Preset overrides={{ fontWeight: "bold" }}>
|
|
238
|
+
<H1 color="$red10">{TITLE}</H1>
|
|
239
|
+
</Preset>,
|
|
240
|
+
["_fow-_maxsm", "_col-_maxsm", "_ff-_maxsm"],
|
|
241
|
+
"H1",
|
|
242
|
+
);
|
|
243
|
+
expect(bold).toEqual([]);
|
|
210
244
|
});
|
|
211
245
|
|
|
212
246
|
it("does NOT re-step H2 — the dial is the page title's, not every heading's", () => {
|
|
@@ -228,6 +262,8 @@ describe("house H1 — pageTitleScale reaches the title text node (LC-17 / D-11)
|
|
|
228
262
|
});
|
|
229
263
|
|
|
230
264
|
it("the per-instance eject still wins over the knob (PageHeader contract)", () => {
|
|
265
|
+
// An explicit size takes the whole step, compact entry included: the
|
|
266
|
+
// display knob's `$max-sm` step must not leak through it.
|
|
231
267
|
const ejected = renderHeadingClasses(
|
|
232
268
|
<Preset overrides={{ pageTitleScale: "display" }}>
|
|
233
269
|
<H1 size="$10">{TITLE}</H1>
|
|
@@ -235,8 +271,16 @@ describe("house H1 — pageTitleScale reaches the title text node (LC-17 / D-11)
|
|
|
235
271
|
["_fos-", "_lh-"],
|
|
236
272
|
"H1",
|
|
237
273
|
);
|
|
238
|
-
const
|
|
239
|
-
|
|
274
|
+
const explicit10 = renderHeadingClasses(<H1 size="$10">{TITLE}</H1>, ["_fos-", "_lh-"], "H1");
|
|
275
|
+
const display = renderHeadingClasses(
|
|
276
|
+
<Preset overrides={{ pageTitleScale: "display" }}>
|
|
277
|
+
<H1>{TITLE}</H1>
|
|
278
|
+
</Preset>,
|
|
279
|
+
["_fos-", "_lh-"],
|
|
280
|
+
"H1",
|
|
281
|
+
);
|
|
282
|
+
expect(ejected).toEqual(explicit10);
|
|
283
|
+
expect(ejected).not.toEqual(display);
|
|
240
284
|
});
|
|
241
285
|
});
|
|
242
286
|
|
package/src/Heading.tsx
CHANGED
|
@@ -1,66 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* H1 alone takes pageTitle: moderate $10 (40 px), display $12 (52 px).
|
|
5
|
-
*/
|
|
6
|
-
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
7
|
-
import {
|
|
8
|
-
H1 as RawH1,
|
|
9
|
-
H2 as RawH2,
|
|
10
|
-
H3 as RawH3,
|
|
11
|
-
H4 as RawH4,
|
|
12
|
-
H5 as RawH5,
|
|
13
|
-
H6 as RawH6,
|
|
14
|
-
Heading as RawHeading,
|
|
15
|
-
type HeadingProps,
|
|
16
|
-
} from "tamagui";
|
|
17
|
-
|
|
18
|
-
export type { HeadingProps };
|
|
19
|
-
|
|
20
|
-
type Weight = HeadingProps["fontWeight"];
|
|
21
|
-
|
|
22
|
-
function useHeadingVoice(fontWeight: Weight) {
|
|
23
|
-
const { knobProps } = useResolvedKnobs();
|
|
24
|
-
const { fontWeight: knobWeight, ...heading } = knobProps.heading;
|
|
25
|
-
const resolvedWeight = fontWeight ?? (knobWeight as Weight);
|
|
26
|
-
return {
|
|
27
|
-
heading,
|
|
28
|
-
pageTitle: knobProps.pageTitle,
|
|
29
|
-
weight: resolvedWeight === undefined ? {} : { fontWeight: resolvedWeight },
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function Heading({ fontWeight, ...props }: HeadingProps) {
|
|
34
|
-
const { heading, weight } = useHeadingVoice(fontWeight);
|
|
35
|
-
return <RawHeading {...heading} {...props} {...weight} />;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function H1({ fontWeight, ...props }: HeadingProps) {
|
|
39
|
-
const { heading, pageTitle, weight } = useHeadingVoice(fontWeight);
|
|
40
|
-
return <RawH1 {...pageTitle} {...heading} {...props} {...weight} />;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function H2({ fontWeight, ...props }: HeadingProps) {
|
|
44
|
-
const { heading, weight } = useHeadingVoice(fontWeight);
|
|
45
|
-
return <RawH2 {...heading} {...props} {...weight} />;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function H3({ fontWeight, ...props }: HeadingProps) {
|
|
49
|
-
const { heading, weight } = useHeadingVoice(fontWeight);
|
|
50
|
-
return <RawH3 {...heading} {...props} {...weight} />;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function H4({ fontWeight, ...props }: HeadingProps) {
|
|
54
|
-
const { heading, weight } = useHeadingVoice(fontWeight);
|
|
55
|
-
return <RawH4 {...heading} {...props} {...weight} />;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function H5({ fontWeight, ...props }: HeadingProps) {
|
|
59
|
-
const { heading, weight } = useHeadingVoice(fontWeight);
|
|
60
|
-
return <RawH5 {...heading} {...props} {...weight} />;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export function H6({ fontWeight, ...props }: HeadingProps) {
|
|
64
|
-
const { heading, weight } = useHeadingVoice(fontWeight);
|
|
65
|
-
return <RawH6 {...heading} {...props} {...weight} />;
|
|
66
|
-
}
|
|
1
|
+
// The house heading voices live in @multiplatform.one/theme beside Text (FZ-7739).
|
|
2
|
+
export { H1, H2, H3, H4, H5, H6, Heading } from "@multiplatform.one/theme";
|
|
3
|
+
export type { HeadingProps } from "@multiplatform.one/theme";
|
package/src/Meter/Meter.spec.tsx
CHANGED
|
@@ -222,8 +222,8 @@ describe("Meter a11y and the Progress semantic line", () => {
|
|
|
222
222
|
"light",
|
|
223
223
|
{ fillStyle: "outlined", borderWidth: "none" },
|
|
224
224
|
);
|
|
225
|
-
// LC-86: outlined + none still draws the small hairline, not 0.
|
|
226
|
-
expect(rail(hairline).getAttribute("data-meter-border-width")).toBe("
|
|
225
|
+
// LC-86: outlined + none still draws the small hairline, not 0 (1px on web, LC-148).
|
|
226
|
+
expect(rail(hairline).getAttribute("data-meter-border-width")).toBe("1");
|
|
227
227
|
|
|
228
228
|
cleanup();
|
|
229
229
|
const { container: large } = renderMeter(
|
|
@@ -242,8 +242,8 @@ describe("Meter a11y and the Progress semantic line", () => {
|
|
|
242
242
|
|
|
243
243
|
for (const discrete of [0, 5]) {
|
|
244
244
|
for (const [borderWidth, expected] of [
|
|
245
|
-
["none", "
|
|
246
|
-
["small", "
|
|
245
|
+
["none", "1px"],
|
|
246
|
+
["small", "1px"],
|
|
247
247
|
["large", "2px"],
|
|
248
248
|
] as const) {
|
|
249
249
|
it(`paints ${borderWidth} outline on ${discrete ? "every segment" : "the continuous rail"}`, () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { act, createElement, createRef } from "react";
|
|
1
|
+
import { act, createElement, createRef, type ReactElement } from "react";
|
|
2
2
|
import { createRoot, type Root } from "react-dom/client";
|
|
3
3
|
import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from "vitest";
|
|
4
4
|
|
|
@@ -184,4 +184,127 @@ describe("OverflowRow through native Tamagui", () => {
|
|
|
184
184
|
expect(fade("start")).toBeNull();
|
|
185
185
|
expect(fade("end")).toBeNull();
|
|
186
186
|
});
|
|
187
|
+
|
|
188
|
+
describe("selection rows (LC-136)", () => {
|
|
189
|
+
function Choice(_: { selected?: boolean; label: string }) {
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
const labels = ["a", "b", "c", "d", "e", "f"];
|
|
193
|
+
function choices(selected: string) {
|
|
194
|
+
return labels.map((label) =>
|
|
195
|
+
createElement(Choice, { key: label, label, selected: label === selected }),
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
function wrappers() {
|
|
199
|
+
const latest = new Map<string, Record<string, unknown>>();
|
|
200
|
+
for (const props of runtime.allHostProps("View")) {
|
|
201
|
+
const child = props.children as ReactElement<{ label?: string }> | undefined;
|
|
202
|
+
if (typeof props.onLayout === "function" && child?.type === Choice)
|
|
203
|
+
latest.set(child.props.label!, props);
|
|
204
|
+
}
|
|
205
|
+
return latest;
|
|
206
|
+
}
|
|
207
|
+
function layout(sizes: { viewport: number; content: number }) {
|
|
208
|
+
call("onLayout", { nativeEvent: { layout: { width: sizes.viewport, height: 40 } } });
|
|
209
|
+
call("onContentSizeChange", sizes.content, 40);
|
|
210
|
+
for (const [label, props] of wrappers()) {
|
|
211
|
+
const i = labels.indexOf(label);
|
|
212
|
+
act(() =>
|
|
213
|
+
(props.onLayout as (event: unknown) => void)({
|
|
214
|
+
nativeEvent: { layout: { x: i * 100, y: 0, width: 90, height: 40 } },
|
|
215
|
+
}),
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function scrollSpy() {
|
|
220
|
+
const scrollTo = vi.fn();
|
|
221
|
+
Object.assign(runtime.hostInstance("ScrollView"), { scrollTo });
|
|
222
|
+
return scrollTo;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
it("opens with an offscreen selected choice in view, without animating", () => {
|
|
226
|
+
(runtime.reactNative.Platform as { OS: string }).OS = "ios";
|
|
227
|
+
const scrollTo = scrollSpy();
|
|
228
|
+
render({ children: choices("f") });
|
|
229
|
+
layout({ viewport: 200, content: 590 });
|
|
230
|
+
expect(scrollTo).toHaveBeenCalledExactlyOnceWith({ x: 390, animated: false });
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
it("leaves a visible selection, the user's scroll and a later visible pick alone", () => {
|
|
234
|
+
const scrollTo = scrollSpy();
|
|
235
|
+
render({ children: choices("b") });
|
|
236
|
+
layout({ viewport: 200, content: 590 });
|
|
237
|
+
expect(scrollTo).not.toHaveBeenCalled();
|
|
238
|
+
scroll(300);
|
|
239
|
+
expect(scrollTo).not.toHaveBeenCalled();
|
|
240
|
+
act(() =>
|
|
241
|
+
root.render(
|
|
242
|
+
createElement(
|
|
243
|
+
TamaguiProvider,
|
|
244
|
+
{ config, defaultTheme: "light" },
|
|
245
|
+
createElement(OverflowRow, { children: choices("d") }),
|
|
246
|
+
),
|
|
247
|
+
),
|
|
248
|
+
);
|
|
249
|
+
expect(scrollTo).not.toHaveBeenCalled();
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
it("scrolls back to a selection that moved off the start", () => {
|
|
253
|
+
const scrollTo = scrollSpy();
|
|
254
|
+
render({ children: choices("e") });
|
|
255
|
+
layout({ viewport: 200, content: 590 });
|
|
256
|
+
expect(scrollTo).toHaveBeenLastCalledWith({ x: 290, animated: false });
|
|
257
|
+
scroll(390);
|
|
258
|
+
act(() =>
|
|
259
|
+
root.render(
|
|
260
|
+
createElement(
|
|
261
|
+
TamaguiProvider,
|
|
262
|
+
{ config, defaultTheme: "light" },
|
|
263
|
+
createElement(OverflowRow, { children: choices("a") }),
|
|
264
|
+
),
|
|
265
|
+
),
|
|
266
|
+
);
|
|
267
|
+
expect(scrollTo).toHaveBeenLastCalledWith({ x: 0, animated: true });
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
it("follows a selected chip that grows when it takes its check", () => {
|
|
271
|
+
const scrollTo = scrollSpy();
|
|
272
|
+
render({ children: choices("a") });
|
|
273
|
+
layout({ viewport: 200, content: 590 });
|
|
274
|
+
expect(scrollTo).not.toHaveBeenCalled();
|
|
275
|
+
act(() =>
|
|
276
|
+
root.render(
|
|
277
|
+
createElement(
|
|
278
|
+
TamaguiProvider,
|
|
279
|
+
{ config, defaultTheme: "light" },
|
|
280
|
+
createElement(OverflowRow, { children: choices("c") }),
|
|
281
|
+
),
|
|
282
|
+
),
|
|
283
|
+
);
|
|
284
|
+
expect(scrollTo).toHaveBeenLastCalledWith({ x: 90, animated: true });
|
|
285
|
+
const grown = () =>
|
|
286
|
+
act(() =>
|
|
287
|
+
(wrappers().get("c")!.onLayout as (event: unknown) => void)({
|
|
288
|
+
nativeEvent: { layout: { x: 200, y: 0, width: 110, height: 40 } },
|
|
289
|
+
}),
|
|
290
|
+
);
|
|
291
|
+
grown();
|
|
292
|
+
expect(scrollTo).toHaveBeenLastCalledWith({ x: 110, animated: true });
|
|
293
|
+
grown();
|
|
294
|
+
expect(scrollTo).toHaveBeenCalledTimes(2);
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
it("keeps an RTL row at its start and a row without selection unwrapped", () => {
|
|
298
|
+
(runtime.reactNative.I18nManager as { isRTL: boolean }).isRTL = true;
|
|
299
|
+
const scrollTo = scrollSpy();
|
|
300
|
+
render({ children: choices("f") });
|
|
301
|
+
layout({ viewport: 200, content: 590 });
|
|
302
|
+
expect(scrollTo).not.toHaveBeenCalled();
|
|
303
|
+
act(() => root.unmount());
|
|
304
|
+
runtime.resetHosts();
|
|
305
|
+
(runtime.reactNative.I18nManager as { isRTL: boolean }).isRTL = false;
|
|
306
|
+
render({ children: labels.map((label) => createElement(Choice, { key: label, label })) });
|
|
307
|
+
expect(wrappers().size).toBe(0);
|
|
308
|
+
});
|
|
309
|
+
});
|
|
187
310
|
});
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { getRgba } from "@tamagui/core";
|
|
2
2
|
import { useResolvedKnobs, type SizeKey } from "@multiplatform.one/theme";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Children,
|
|
5
|
+
forwardRef,
|
|
6
|
+
isValidElement,
|
|
7
|
+
useCallback,
|
|
8
|
+
useEffect,
|
|
9
|
+
useRef,
|
|
10
|
+
useState,
|
|
11
|
+
type ComponentRef,
|
|
12
|
+
type ReactNode,
|
|
13
|
+
} from "react";
|
|
4
14
|
import {
|
|
5
15
|
XStack,
|
|
6
16
|
YStack,
|
|
@@ -10,10 +20,11 @@ import {
|
|
|
10
20
|
type SpaceTokens,
|
|
11
21
|
type YStackProps,
|
|
12
22
|
} from "tamagui";
|
|
13
|
-
import { Platform } from "react-native";
|
|
23
|
+
import { Platform, View, type LayoutChangeEvent } from "react-native";
|
|
14
24
|
import { useDirection } from "../hooks/useDirection";
|
|
15
25
|
import { LinearGradient } from "tamagui/linear-gradient";
|
|
16
26
|
import { ScrollView, type ScrollViewProps } from "../ScrollView";
|
|
27
|
+
import "../linearGradientSetup";
|
|
17
28
|
|
|
18
29
|
export interface OverflowRowProps extends Omit<ScrollViewProps, "horizontal"> {
|
|
19
30
|
fade?: SizeKey | false;
|
|
@@ -22,6 +33,28 @@ export interface OverflowRowProps extends Omit<ScrollViewProps, "horizontal"> {
|
|
|
22
33
|
containerProps?: Omit<YStackProps, "children">;
|
|
23
34
|
}
|
|
24
35
|
|
|
36
|
+
type ScrollHandle = ComponentRef<typeof ScrollView> & {
|
|
37
|
+
scrollTo?: (options: { x: number; animated: boolean }) => void;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
function keyOf(child: ReactNode, index: number): string {
|
|
41
|
+
return isValidElement(child) && child.key != null ? String(child.key) : String(index);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** The selected child's key; null when no child is selected, undefined when none takes `selected`. */
|
|
45
|
+
function selectionOf(items: ReactNode[]): string | null | undefined {
|
|
46
|
+
let selectable = false;
|
|
47
|
+
let key: string | null = null;
|
|
48
|
+
items.forEach((child, i) => {
|
|
49
|
+
if (!isValidElement(child)) return;
|
|
50
|
+
const selected = (child.props as { selected?: unknown }).selected;
|
|
51
|
+
if (selected === undefined) return;
|
|
52
|
+
selectable = true;
|
|
53
|
+
if (selected === true && key === null) key = keyOf(child, i);
|
|
54
|
+
});
|
|
55
|
+
return selectable ? key : undefined;
|
|
56
|
+
}
|
|
57
|
+
|
|
25
58
|
export const OverflowRow = forwardRef<ComponentRef<typeof ScrollView>, OverflowRowProps>(
|
|
26
59
|
function OverflowRow(
|
|
27
60
|
{
|
|
@@ -51,6 +84,20 @@ export const OverflowRow = forwardRef<ComponentRef<typeof ScrollView>, OverflowR
|
|
|
51
84
|
const rgba = getRgba(surfaceColor);
|
|
52
85
|
const clearColor = rgba ? `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, 0)` : "transparent";
|
|
53
86
|
const initialOffsetX = props.contentOffset?.x;
|
|
87
|
+
const items = Children.toArray(children);
|
|
88
|
+
const selectedKey = selectionOf(items);
|
|
89
|
+
const scrollRef = useRef<ScrollHandle | null>(null);
|
|
90
|
+
const setScrollRef = useCallback(
|
|
91
|
+
(node: ScrollHandle | null) => {
|
|
92
|
+
scrollRef.current = node;
|
|
93
|
+
if (typeof ref === "function") ref(node);
|
|
94
|
+
else if (ref) ref.current = node;
|
|
95
|
+
},
|
|
96
|
+
[ref],
|
|
97
|
+
);
|
|
98
|
+
const boxes = useRef(new Map<string, { x: number; width: number }>());
|
|
99
|
+
const revealed = useRef<{ key: string; x: number; width: number } | undefined>(undefined);
|
|
100
|
+
const [selectedLayout, setSelectedLayout] = useState(0);
|
|
54
101
|
const [measurements, setMeasurements] = useState({
|
|
55
102
|
viewport: 0,
|
|
56
103
|
content: 0,
|
|
@@ -84,6 +131,42 @@ export const OverflowRow = forwardRef<ComponentRef<typeof ScrollView>, OverflowR
|
|
|
84
131
|
end: measurements.viewport > 0 && maxOffset - offset > 1,
|
|
85
132
|
};
|
|
86
133
|
|
|
134
|
+
const fadeInset =
|
|
135
|
+
fade === false
|
|
136
|
+
? 0
|
|
137
|
+
: Number(getTokenValue(fade as Parameters<typeof getTokenValue>[0], "size")) || 0;
|
|
138
|
+
// LC-136: a selection row opens with its selected choice in view (a preset
|
|
139
|
+
// switch remounts the picker at offset 0). RTL offsets differ per platform,
|
|
140
|
+
// so RTL rows keep their start.
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
if (rtl || selectedKey == null) return;
|
|
143
|
+
const box = boxes.current.get(selectedKey);
|
|
144
|
+
if (!box || measurements.viewport <= 0 || measurements.content <= 0) return;
|
|
145
|
+
// A chip grows when it takes its check, after this effect first sees it,
|
|
146
|
+
// so a new box for the same selection is revealed again.
|
|
147
|
+
const last = revealed.current;
|
|
148
|
+
if (last?.key === selectedKey && last.x === box.x && last.width === box.width) return;
|
|
149
|
+
const first = last === undefined;
|
|
150
|
+
revealed.current = { key: selectedKey, ...box };
|
|
151
|
+
const start = box.x - fadeInset;
|
|
152
|
+
const end = box.x + box.width + fadeInset - measurements.viewport;
|
|
153
|
+
const target = start < offset ? start : end > offset ? end : undefined;
|
|
154
|
+
if (target === undefined) return;
|
|
155
|
+
scrollRef.current?.scrollTo?.({
|
|
156
|
+
x: Math.max(0, Math.min(target, maxOffset)),
|
|
157
|
+
animated: !first,
|
|
158
|
+
});
|
|
159
|
+
}, [
|
|
160
|
+
rtl,
|
|
161
|
+
selectedKey,
|
|
162
|
+
selectedLayout,
|
|
163
|
+
measurements.viewport,
|
|
164
|
+
measurements.content,
|
|
165
|
+
fadeInset,
|
|
166
|
+
offset,
|
|
167
|
+
maxOffset,
|
|
168
|
+
]);
|
|
169
|
+
|
|
87
170
|
function measure(next: Partial<typeof measurements>) {
|
|
88
171
|
setMeasurements((previous) => ({ ...previous, ...next }));
|
|
89
172
|
}
|
|
@@ -94,7 +177,7 @@ export const OverflowRow = forwardRef<ComponentRef<typeof ScrollView>, OverflowR
|
|
|
94
177
|
showsHorizontalScrollIndicator={showsHorizontalScrollIndicator}
|
|
95
178
|
scrollEventThrottle={scrollEventThrottle}
|
|
96
179
|
{...props}
|
|
97
|
-
ref={
|
|
180
|
+
ref={setScrollRef}
|
|
98
181
|
horizontal
|
|
99
182
|
onLayout={(event) => {
|
|
100
183
|
measure({ viewport: event.nativeEvent.layout.width });
|
|
@@ -116,7 +199,23 @@ export const OverflowRow = forwardRef<ComponentRef<typeof ScrollView>, OverflowR
|
|
|
116
199
|
}}
|
|
117
200
|
>
|
|
118
201
|
<XStack alignItems="center" {...knobProps.gap} {...(gap === undefined ? {} : { gap })}>
|
|
119
|
-
{
|
|
202
|
+
{selectedKey === undefined
|
|
203
|
+
? children
|
|
204
|
+
: items.map((child, i) => {
|
|
205
|
+
const key = keyOf(child, i);
|
|
206
|
+
return (
|
|
207
|
+
<View
|
|
208
|
+
key={key}
|
|
209
|
+
onLayout={(event: LayoutChangeEvent) => {
|
|
210
|
+
const { x, width } = event.nativeEvent.layout;
|
|
211
|
+
boxes.current.set(key, { x, width });
|
|
212
|
+
if (key === selectedKey) setSelectedLayout((n) => n + 1);
|
|
213
|
+
}}
|
|
214
|
+
>
|
|
215
|
+
{child}
|
|
216
|
+
</View>
|
|
217
|
+
);
|
|
218
|
+
})}
|
|
120
219
|
</XStack>
|
|
121
220
|
</ScrollView>
|
|
122
221
|
{fade !== false && edges.start ? (
|
|
@@ -2,8 +2,9 @@ import { action } from "@multiplatform.one/storybook";
|
|
|
2
2
|
import { Preset } from "@multiplatform.one/theme";
|
|
3
3
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
4
4
|
import { useState } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { YStack } from "tamagui";
|
|
6
6
|
import { Pagination, type PaginationProps } from "./Pagination";
|
|
7
|
+
import { Text } from "./Text";
|
|
7
8
|
|
|
8
9
|
const meta: Meta<typeof Pagination> = {
|
|
9
10
|
title: "Components/Pagination",
|
package/src/Pagination.tsx
CHANGED
|
@@ -119,6 +119,11 @@ export interface PaginationProps extends Omit<XStackProps, "children" | "onChang
|
|
|
119
119
|
* governs a strip mark's size.
|
|
120
120
|
*/
|
|
121
121
|
variant?: "dots" | "bars" | "numbered" | "simple";
|
|
122
|
+
/**
|
|
123
|
+
* The last page is not known (a list without a count): `total` is only how
|
|
124
|
+
* far the pager may step, so the simple variant reads "Page 3", never "3 of 4".
|
|
125
|
+
*/
|
|
126
|
+
openEnded?: boolean;
|
|
122
127
|
/** Total number of items across all pages (numbered summary slot) */
|
|
123
128
|
totalItems?: number;
|
|
124
129
|
/** Items per page (numbered summary slot) */
|
|
@@ -152,6 +157,7 @@ export function Pagination({
|
|
|
152
157
|
siblingCount = 1,
|
|
153
158
|
boundaryCount = 1,
|
|
154
159
|
showFirstLast = false,
|
|
160
|
+
openEnded = false,
|
|
155
161
|
...stackProps
|
|
156
162
|
}: PaginationProps) {
|
|
157
163
|
const { t } = useTranslation();
|
|
@@ -324,7 +330,9 @@ export function Pagination({
|
|
|
324
330
|
flexShrink={1}
|
|
325
331
|
minWidth={0}
|
|
326
332
|
>
|
|
327
|
-
{
|
|
333
|
+
{openEnded
|
|
334
|
+
? withInterp(t("Page {{number}}"), { number: currentPage })
|
|
335
|
+
: bidiIsolate(withInterp(t("{{page}} of {{total}}"), { page: currentPage, total }))}
|
|
328
336
|
</Text>
|
|
329
337
|
) : isNumbered ? (
|
|
330
338
|
<XStack alignItems="center" {...knobProps.gap}>
|
package/src/Panel.stories.tsx
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
// Catalog Button + Input (G-15 story honesty / LC-56, UX-P06).
|
|
3
3
|
import { Button, Input } from "@multiplatform.one/forms";
|
|
4
|
-
import {
|
|
4
|
+
import { XStack, YStack } from "tamagui";
|
|
5
5
|
import { Panel } from "./surfaces";
|
|
6
|
+
import { Paragraph, SizableText } from "./Text";
|
|
6
7
|
|
|
7
8
|
const meta: Meta<typeof Panel> = {
|
|
8
9
|
title: "Components/Panel",
|
|
@@ -3,9 +3,10 @@ import { useState } from "react";
|
|
|
3
3
|
// Catalog Button (G-15 story honesty / LC-18, UX-P06).
|
|
4
4
|
import { Button } from "@multiplatform.one/forms";
|
|
5
5
|
import { OVERLAY_ANCHOR_GAP, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
6
|
-
import {
|
|
6
|
+
import { YStack } from "tamagui";
|
|
7
7
|
import { Popover } from "./Popover";
|
|
8
8
|
import { PopoverContent } from "./surfaces";
|
|
9
|
+
import { Paragraph, SizableText } from "./Text";
|
|
9
10
|
|
|
10
11
|
function PopoverHarness({
|
|
11
12
|
placement = "bottom" as const,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
edgeColorAt,
|
|
2
3
|
transitionProps,
|
|
3
4
|
MIN_PRESS_TARGET,
|
|
4
5
|
ensureKeyboardModalityTracking,
|
|
@@ -202,7 +203,10 @@ export function ProgressSteps({
|
|
|
202
203
|
: kind === "current"
|
|
203
204
|
? currentFill
|
|
204
205
|
: "transparent";
|
|
205
|
-
const markerBorder =
|
|
206
|
+
const markerBorder =
|
|
207
|
+
kind === "upcoming"
|
|
208
|
+
? edgeColorAt(componentColors.indicator.track, knobProps.borderWidthStop)
|
|
209
|
+
: markerBg;
|
|
206
210
|
const markerFg =
|
|
207
211
|
kind === "upcoming"
|
|
208
212
|
? knobProps.textAccentColor
|