@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
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hermes drops named groups from `String.prototype.matchAll` results.
|
|
3
|
+
*
|
|
4
|
+
* `RegExp.prototype[@@matchAll]` copies the regex through a fast path that
|
|
5
|
+
* reuses the compiled bytecode but never copies the group-name mapping
|
|
6
|
+
* (`JSRegExp::initialize(self, other, flags)`, hermes rn/0.83-stable and main),
|
|
7
|
+
* so every match comes back with `groups === undefined` while `exec` on the
|
|
8
|
+
* same regex is fine. shiki's JavaScript engine converts Oniguruma patterns
|
|
9
|
+
* with `oniguruma-to-es`, whose `regex` / `regex-utilities` helpers destructure
|
|
10
|
+
* `match.groups` from `matchAll`; on Hermes that throws, `highlightCode`
|
|
11
|
+
* catches it, and shell, python and every grammar that reaches those helpers
|
|
12
|
+
* render as uncoloured lines (FZ-7829).
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
let dropsGroups: boolean | undefined;
|
|
16
|
+
|
|
17
|
+
function matchAllDropsGroups(): boolean {
|
|
18
|
+
if (dropsGroups === undefined) {
|
|
19
|
+
try {
|
|
20
|
+
// Built from a string so Babel's named-groups transform leaves it native.
|
|
21
|
+
const first = "x".matchAll(new RegExp("(?<g>x)", "g")).next().value;
|
|
22
|
+
dropsGroups = !!first && first.groups === undefined;
|
|
23
|
+
} catch {
|
|
24
|
+
dropsGroups = false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return dropsGroups;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function advance(str: string, index: number, unicode: boolean): number {
|
|
31
|
+
if (!unicode || index + 1 >= str.length) return index + 1;
|
|
32
|
+
const code = str.charCodeAt(index);
|
|
33
|
+
if (code < 0xd800 || code > 0xdbff) return index + 1;
|
|
34
|
+
const next = str.charCodeAt(index + 1);
|
|
35
|
+
return next >= 0xdc00 && next <= 0xdfff ? index + 2 : index + 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function matchAllViaExec(str: string, regexp: RegExp): IterableIterator<RegExpExecArray> {
|
|
39
|
+
// A string pattern takes Hermes's full compile path, which keeps the names.
|
|
40
|
+
const matcher = new RegExp(regexp.source, regexp.flags);
|
|
41
|
+
matcher.lastIndex = regexp.lastIndex;
|
|
42
|
+
const unicode = regexp.unicode || regexp.flags.includes("v");
|
|
43
|
+
let done = false;
|
|
44
|
+
const iterator: IterableIterator<RegExpExecArray> = {
|
|
45
|
+
next() {
|
|
46
|
+
if (done) return { value: undefined, done: true };
|
|
47
|
+
const match = matcher.exec(str);
|
|
48
|
+
if (!match) {
|
|
49
|
+
done = true;
|
|
50
|
+
return { value: undefined, done: true };
|
|
51
|
+
}
|
|
52
|
+
if (match[0] === "") matcher.lastIndex = advance(str, matcher.lastIndex, unicode);
|
|
53
|
+
return { value: match, done: false };
|
|
54
|
+
},
|
|
55
|
+
[Symbol.iterator]() {
|
|
56
|
+
return iterator;
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
return iterator;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Runs `fn` with a `String.prototype.matchAll` that keeps named groups, only
|
|
64
|
+
* on an engine that loses them, and puts the native method back afterwards.
|
|
65
|
+
* Everywhere else it just calls `fn`.
|
|
66
|
+
*/
|
|
67
|
+
export function withNamedGroupMatchAll<T>(fn: () => T): T {
|
|
68
|
+
if (!matchAllDropsGroups()) return fn();
|
|
69
|
+
const native = String.prototype.matchAll;
|
|
70
|
+
String.prototype.matchAll = function matchAll(this: string, regexp: RegExp) {
|
|
71
|
+
if (
|
|
72
|
+
regexp instanceof RegExp &&
|
|
73
|
+
Object.getPrototypeOf(regexp) === RegExp.prototype &&
|
|
74
|
+
regexp.global
|
|
75
|
+
) {
|
|
76
|
+
return matchAllViaExec(String(this), regexp);
|
|
77
|
+
}
|
|
78
|
+
return native.call(this, regexp);
|
|
79
|
+
} as typeof native;
|
|
80
|
+
try {
|
|
81
|
+
return fn();
|
|
82
|
+
} finally {
|
|
83
|
+
String.prototype.matchAll = native;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Test hook: forget the cached engine probe. */
|
|
88
|
+
export function resetNamedGroupMatchAllProbe(): void {
|
|
89
|
+
dropsGroups = undefined;
|
|
90
|
+
}
|
|
@@ -2,10 +2,11 @@ import { action } from "@multiplatform.one/storybook";
|
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
3
3
|
import { Button } from "@multiplatform.one/forms";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { XStack, YStack } from "tamagui";
|
|
6
6
|
import { ConfirmDialog } from "./ConfirmDialog";
|
|
7
7
|
import { notify, NotifyHost, resetFeedback } from "./index";
|
|
8
8
|
import { resetToasts } from "../Toast/store";
|
|
9
|
+
import { Paragraph, SizableText } from "../Text";
|
|
9
10
|
|
|
10
11
|
const meta: Meta<typeof ConfirmDialog> = {
|
|
11
12
|
title: "Components/ConfirmDialog",
|
|
@@ -37,7 +37,7 @@ const TAB_STOPS =
|
|
|
37
37
|
'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]';
|
|
38
38
|
|
|
39
39
|
function asHtml(node: unknown): HTMLElement | null {
|
|
40
|
-
return node instanceof HTMLElement ? node : null;
|
|
40
|
+
return typeof HTMLElement !== "undefined" && node instanceof HTMLElement ? node : null;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
function panelNode(ref: unknown): HTMLElement | null {
|
|
@@ -3,9 +3,10 @@ import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
|
3
3
|
import { Button } from "@multiplatform.one/forms";
|
|
4
4
|
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
5
5
|
import { useEffect, type ReactNode } from "react";
|
|
6
|
-
import {
|
|
6
|
+
import { XStack, YStack } from "tamagui";
|
|
7
7
|
import { notify, NotifyHost, NotifyRegion, resetFeedback, type NotifyEvent } from "./index";
|
|
8
8
|
import { resetToasts } from "../Toast/store";
|
|
9
|
+
import { Paragraph, SizableText } from "../Text";
|
|
9
10
|
|
|
10
11
|
/** Demo region frame rides the knobs (G-15 story honesty): a pinned $3
|
|
11
12
|
* radius held a 7px arc at borderRadius:none (UX-P06). */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
|
-
import {
|
|
2
|
+
import { Theme, XStack, YStack } from "tamagui";
|
|
3
3
|
import { CheckRegular } from "./CheckRegular";
|
|
4
|
+
import { Paragraph } from "../Text";
|
|
4
5
|
|
|
5
6
|
const meta: Meta<typeof CheckRegular> = {
|
|
6
7
|
title: "Components/CheckRegular",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
|
-
import {
|
|
2
|
+
import { Theme, XStack, YStack } from "tamagui";
|
|
3
3
|
import { MinusRegular } from "./MinusRegular";
|
|
4
|
+
import { Paragraph } from "../Text";
|
|
4
5
|
|
|
5
6
|
const meta: Meta<typeof MinusRegular> = {
|
|
6
7
|
title: "Components/MinusRegular",
|
|
@@ -2,9 +2,10 @@ import { action } from "@multiplatform.one/storybook";
|
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
3
3
|
import { Button } from "@multiplatform.one/forms";
|
|
4
4
|
import { useState } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { XStack, YStack } from "tamagui";
|
|
6
6
|
import { Badge } from "../Badge";
|
|
7
7
|
import { AsyncBoundary, type AsyncBoundaryLayout } from "./AsyncBoundary";
|
|
8
|
+
import { Paragraph, Text } from "../Text";
|
|
8
9
|
|
|
9
10
|
const meta: Meta<typeof AsyncBoundary> = {
|
|
10
11
|
title: "Components/AsyncBoundary",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { action } from "@multiplatform.one/storybook";
|
|
2
|
-
import { YStack
|
|
2
|
+
import { YStack } from "tamagui";
|
|
3
3
|
import { Attachments, type AttachmentItem } from "./attachments";
|
|
4
|
+
import { Text } from "../Text";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
title: "Components/Attachments",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
import { action } from "@multiplatform.one/storybook";
|
|
3
3
|
import { Button } from "@multiplatform.one/forms";
|
|
4
|
-
import {
|
|
4
|
+
import { YStack } from "tamagui";
|
|
5
5
|
import { DebugLayout, createWithDebugLayout } from "./index";
|
|
6
|
+
import { Paragraph } from "../../Text";
|
|
6
7
|
|
|
7
8
|
function DebugRows() {
|
|
8
9
|
return <Paragraph>scheme / knobs / env</Paragraph>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
import { Input } from "@multiplatform.one/forms";
|
|
3
|
-
import {
|
|
4
|
-
import { Text } from "../../Text";
|
|
3
|
+
import { YStack } from "tamagui";
|
|
4
|
+
import { Text, Paragraph } from "../../Text";
|
|
5
5
|
import { KeyboardAvoidingWrapper } from "./index";
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof KeyboardAvoidingWrapper> = {
|
|
@@ -4,9 +4,10 @@ import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
|
4
4
|
import { Button } from "@multiplatform.one/forms";
|
|
5
5
|
import { Preset } from "@multiplatform.one/theme";
|
|
6
6
|
import type { ReactNode } from "react";
|
|
7
|
-
import {
|
|
7
|
+
import { YStack } from "tamagui";
|
|
8
8
|
import { Tabs } from "../Tabs";
|
|
9
9
|
import { PageHeader, Screen } from "./page";
|
|
10
|
+
import { Paragraph } from "../Text";
|
|
10
11
|
|
|
11
12
|
const meta: Meta<typeof PageHeader> = {
|
|
12
13
|
title: "Components/PageHeader",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
|
-
import {
|
|
2
|
+
import { YStack } from "tamagui";
|
|
3
3
|
import { PageSection } from "./page";
|
|
4
|
+
import { Paragraph } from "../Text";
|
|
4
5
|
|
|
5
6
|
const meta: Meta<typeof PageSection> = {
|
|
6
7
|
title: "Components/PageSection",
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
// Catalog Button (G-15 story honesty / LC-18, UX-P06).
|
|
3
3
|
import { Button } from "@multiplatform.one/forms";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { ChartBarIcon, DotsThreeIcon, ListBulletsIcon, PlusIcon } from "@phosphor-icons/react";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { XStack, YStack } from "tamagui";
|
|
7
|
+
import { PageBackButton, PageHeader, PageMenuButton, PageSection } from "./page";
|
|
6
8
|
import { DetailPageLayout, ListPageLayout, SettingsPageLayout } from "./PageTemplates";
|
|
9
|
+
import { ViewSwitcher } from "./ViewSwitcher";
|
|
10
|
+
import { Paragraph } from "../Text";
|
|
7
11
|
|
|
8
12
|
function ContentBox({
|
|
9
13
|
label,
|
|
@@ -105,3 +109,61 @@ export const SettingsPage: StoryObj<typeof SettingsPageLayout> = {
|
|
|
105
109
|
</SettingsPageLayout>
|
|
106
110
|
),
|
|
107
111
|
};
|
|
112
|
+
|
|
113
|
+
const phoneViews = [
|
|
114
|
+
{ type: "list", label: "List", icon: ListBulletsIcon },
|
|
115
|
+
{ type: "report", label: "Report", icon: ChartBarIcon },
|
|
116
|
+
];
|
|
117
|
+
|
|
118
|
+
function PhoneListActions() {
|
|
119
|
+
const [view, setView] = useState("list");
|
|
120
|
+
return (
|
|
121
|
+
<XStack flex={1} flexWrap="wrap" gap="$2" alignItems="center" justifyContent="space-between">
|
|
122
|
+
<ViewSwitcher views={phoneViews} currentView={view} onViewChange={setView} />
|
|
123
|
+
<XStack flexGrow={1} gap="$2" alignItems="center" justifyContent="flex-end">
|
|
124
|
+
<Button outlined icon={DotsThreeIcon} aria-label="More actions" />
|
|
125
|
+
<Button accent icon={PlusIcon}>
|
|
126
|
+
Add
|
|
127
|
+
</Button>
|
|
128
|
+
</XStack>
|
|
129
|
+
</XStack>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* FZ-7703 on a phone: the actions row that wraps under the title runs to
|
|
135
|
+
* the trailing gutter, and the page title takes the compact step.
|
|
136
|
+
*/
|
|
137
|
+
export const ListPageOnPhone: Story = {
|
|
138
|
+
parameters: { viewport: { defaultViewport: "mobile1" } },
|
|
139
|
+
render: () => (
|
|
140
|
+
<ListPageLayout title="Pokemon" actions={<PhoneListActions />}>
|
|
141
|
+
<ContentBox label="List content" minHeight={240} />
|
|
142
|
+
</ListPageLayout>
|
|
143
|
+
),
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* FZ-7703 / FZ-7748 on a phone: back, "…" and Save share the top bar (LC-145),
|
|
148
|
+
* back's caret and the "…" glyph sit on the gutters, the two quiet controls
|
|
149
|
+
* share one recipe and size, and the title starts directly under the bar.
|
|
150
|
+
*/
|
|
151
|
+
export const DetailPageOnPhone: StoryObj<typeof DetailPageLayout> = {
|
|
152
|
+
parameters: { viewport: { defaultViewport: "mobile1" } },
|
|
153
|
+
render: () => (
|
|
154
|
+
<DetailPageLayout
|
|
155
|
+
header={<PageHeader title="Caterpie" subtitle="Not Saved" />}
|
|
156
|
+
toolbarLeading={<PageBackButton label="Pokemon" />}
|
|
157
|
+
toolbarTrailing={
|
|
158
|
+
<>
|
|
159
|
+
<Button accent>Save</Button>
|
|
160
|
+
<PageMenuButton edge="end" />
|
|
161
|
+
</>
|
|
162
|
+
}
|
|
163
|
+
>
|
|
164
|
+
<PageSection>
|
|
165
|
+
<ContentBox label="Fields" minHeight={200} />
|
|
166
|
+
</PageSection>
|
|
167
|
+
</DetailPageLayout>
|
|
168
|
+
),
|
|
169
|
+
};
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
useResolvedKnobs,
|
|
7
7
|
} from "@multiplatform.one/theme";
|
|
8
8
|
import type { ReactNode } from "react";
|
|
9
|
-
import {
|
|
10
|
-
import { Text as HouseText } from "../Text";
|
|
9
|
+
import { YStack } from "tamagui";
|
|
10
|
+
import { Text as HouseText, Paragraph, Text } from "../Text";
|
|
11
11
|
import { componentColors } from "../componentColors";
|
|
12
12
|
import {
|
|
13
13
|
FeedLayout,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
|
-
import {
|
|
3
|
-
import { Text } from "../../Text";
|
|
2
|
+
import { YStack } from "tamagui";
|
|
3
|
+
import { Text, Paragraph } from "../../Text";
|
|
4
4
|
import { SafeAreaWrapper } from "./index";
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof SafeAreaWrapper> = {
|
|
@@ -2,9 +2,10 @@ import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
|
2
2
|
// Catalog Button (G-15 story honesty / LC-18, UX-P06).
|
|
3
3
|
import { Button, Input } from "@multiplatform.one/forms";
|
|
4
4
|
import { useState } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { YStack } from "tamagui";
|
|
6
6
|
import { SheetModal } from "../SheetModal";
|
|
7
7
|
import { CONTENT_MAX_WIDTH, EmptyState, PageHeader, PageSection, Screen } from "./page";
|
|
8
|
+
import { Paragraph, SizableText } from "../Text";
|
|
8
9
|
|
|
9
10
|
const meta: Meta<typeof Screen> = {
|
|
10
11
|
title: "Components/Screen",
|
|
@@ -10,8 +10,9 @@ import {
|
|
|
10
10
|
} from "@phosphor-icons/react";
|
|
11
11
|
import { useState } from "react";
|
|
12
12
|
import type { ReactNode } from "react";
|
|
13
|
-
import {
|
|
13
|
+
import { XStack, YStack } from "tamagui";
|
|
14
14
|
import { Sidebar } from "./sidebar";
|
|
15
|
+
import { Paragraph } from "../Text";
|
|
15
16
|
|
|
16
17
|
export default {
|
|
17
18
|
title: "Components/Sidebar",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { action } from "@multiplatform.one/storybook";
|
|
2
|
-
import { YStack,
|
|
2
|
+
import { YStack, XStack } from "tamagui";
|
|
3
3
|
import { Timeline, type TimelineEntry } from "./timeline";
|
|
4
|
+
import { Text } from "../Text";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
title: "Components/Timeline",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import { YStack
|
|
3
|
+
import { YStack } from "tamagui";
|
|
4
4
|
import { ViewSwitcher, type ViewOption } from "./ViewSwitcher";
|
|
5
|
+
import { Text } from "../Text";
|
|
5
6
|
|
|
6
7
|
const views: ViewOption[] = [
|
|
7
8
|
{ type: "list", label: "List" },
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
Label,
|
|
32
32
|
SizableText,
|
|
33
33
|
Separator,
|
|
34
|
-
Text,
|
|
34
|
+
Text as TamaguiText,
|
|
35
35
|
XStack,
|
|
36
36
|
YStack,
|
|
37
37
|
isWeb,
|
|
@@ -44,6 +44,7 @@ import { componentColors, sectionHeading } from "../componentColors";
|
|
|
44
44
|
import { Skeleton } from "../Skeleton";
|
|
45
45
|
import { useReturnFocusOnClose } from "../shared/useReturnFocusOnClose";
|
|
46
46
|
import { AsyncBoundary, resolveAsyncStatus } from "./AsyncBoundary";
|
|
47
|
+
import { Text } from "../Text";
|
|
47
48
|
|
|
48
49
|
// ---------------------------------------------------------------------------
|
|
49
50
|
// Types (generic -- no Frappe dependency)
|
|
@@ -460,9 +461,9 @@ function AttachmentRow({
|
|
|
460
461
|
<XStack flex={1} alignItems="center" minWidth={0} gap="$3">
|
|
461
462
|
{mediaSlot}
|
|
462
463
|
<YStack flex={1} minWidth={0}>
|
|
463
|
-
<
|
|
464
|
+
<TamaguiText {...knobProps.body} fontSize={small ? "$3" : "$4"} numberOfLines={1}>
|
|
464
465
|
{attachment.fileName}
|
|
465
|
-
</
|
|
466
|
+
</TamaguiText>
|
|
466
467
|
<XStack gap="$2" alignItems="center">
|
|
467
468
|
<Text fontSize="$2" color={knobProps.textAccentColor}>
|
|
468
469
|
{attachment.formattedSize || formatFileSize(attachment.fileSize)}
|
|
@@ -22,8 +22,9 @@ import {
|
|
|
22
22
|
} from "@multiplatform.one/theme";
|
|
23
23
|
import React, { useMemo, useState } from "react";
|
|
24
24
|
import { useTranslation } from "react-i18next";
|
|
25
|
-
import { Anchor, Text, XStack, isWeb } from "tamagui";
|
|
25
|
+
import { Anchor, Text as TamaguiText, XStack, isWeb } from "tamagui";
|
|
26
26
|
import { withInterp } from "../shared/t";
|
|
27
|
+
import { Text } from "../Text";
|
|
27
28
|
|
|
28
29
|
/** Approx medium body line box before press-target padding (DG-LAY-04). */
|
|
29
30
|
const CRUMB_LINE_PX = 24;
|
|
@@ -235,7 +236,7 @@ export function Breadcrumbs({ items, onNavigate, label, maxVisible }: Breadcrumb
|
|
|
235
236
|
{slot.item.label}
|
|
236
237
|
</Anchor>
|
|
237
238
|
) : (
|
|
238
|
-
<
|
|
239
|
+
<TamaguiText
|
|
239
240
|
{...knobProps.body}
|
|
240
241
|
color={knobProps.textAccentColor}
|
|
241
242
|
fontSize={textSize}
|
|
@@ -243,7 +244,7 @@ export function Breadcrumbs({ items, onNavigate, label, maxVisible }: Breadcrumb
|
|
|
243
244
|
{...(slot.isCurrent ? { "aria-current": "page" as const } : null)}
|
|
244
245
|
>
|
|
245
246
|
{slot.item.label}
|
|
246
|
-
</
|
|
247
|
+
</TamaguiText>
|
|
247
248
|
)}
|
|
248
249
|
{!isLastSlot && (
|
|
249
250
|
<Text
|
package/src/layouts/page.tsx
CHANGED
|
@@ -17,17 +17,23 @@
|
|
|
17
17
|
|
|
18
18
|
import {
|
|
19
19
|
MIN_PRESS_TARGET,
|
|
20
|
+
PageGutter,
|
|
20
21
|
containerCapProps,
|
|
21
22
|
hairline,
|
|
22
23
|
layoutBreakpoints,
|
|
23
24
|
resolvePageTitleScale,
|
|
25
|
+
useLayoutSizeClass,
|
|
24
26
|
useResolvedKnobs,
|
|
25
27
|
type PageTitleScale,
|
|
26
28
|
} from "@multiplatform.one/theme";
|
|
29
|
+
import { Button, type ButtonProps } from "@multiplatform.one/forms";
|
|
30
|
+
import { CaretLeftIcon, CaretRightIcon, DotsThreeIcon } from "@phosphor-icons/react";
|
|
27
31
|
import type { ReactNode } from "react";
|
|
28
32
|
import type { ScrollViewProps as TamaguiScrollViewProps, XStackProps, YStackProps } from "tamagui";
|
|
29
33
|
import { H1, H2, H3, H4, H5, H6, Paragraph, Separator, XStack, YStack, isWeb } from "tamagui";
|
|
30
34
|
import { componentColors, sectionHeading } from "../componentColors";
|
|
35
|
+
import { useDirection } from "../hooks/useDirection";
|
|
36
|
+
import { useTranslation } from "../shared/i18n";
|
|
31
37
|
import { ScrollView } from "../ScrollView";
|
|
32
38
|
import { KeyboardAvoidingWrapper } from "./KeyboardAvoidingWrapper";
|
|
33
39
|
import {
|
|
@@ -112,7 +118,9 @@ export function Screen({
|
|
|
112
118
|
{/* DG-A11Y-02: one h1 budget per Screen — catalog headings register here.
|
|
113
119
|
insetToken lets PageHeader bleed its hairline to the column edges. */}
|
|
114
120
|
<PageHeadingScope insetToken={noPadding ? null : (knobProps.panelPadding.padding as string)}>
|
|
115
|
-
{
|
|
121
|
+
<PageGutter inset={noPadding ? null : (knobProps.panelPadding.padding as string)}>
|
|
122
|
+
{children}
|
|
123
|
+
</PageGutter>
|
|
116
124
|
</PageHeadingScope>
|
|
117
125
|
</YStack>
|
|
118
126
|
);
|
|
@@ -151,6 +159,8 @@ export interface PageHeaderProps extends YStackProps {
|
|
|
151
159
|
title?: string;
|
|
152
160
|
/** Smaller supporting text below the title. */
|
|
153
161
|
subtitle?: string;
|
|
162
|
+
/** The record's state (a status chip), under the title in its column (LC-145). */
|
|
163
|
+
status?: ReactNode;
|
|
154
164
|
/** Override the default H1 — pass a custom heading node. */
|
|
155
165
|
heading?: ReactNode;
|
|
156
166
|
/** Trailing actions (buttons, switchers, etc.) shown right of the title. */
|
|
@@ -188,6 +198,7 @@ export interface PageHeaderProps extends YStackProps {
|
|
|
188
198
|
export function PageHeader({
|
|
189
199
|
title,
|
|
190
200
|
subtitle,
|
|
201
|
+
status,
|
|
191
202
|
heading,
|
|
192
203
|
actions,
|
|
193
204
|
nav,
|
|
@@ -248,7 +259,7 @@ export function PageHeader({
|
|
|
248
259
|
<YStack {...contentPad} paddingBottom={nav ? 0 : (knobProps.gap.gap as "$4")}>
|
|
249
260
|
<XStack
|
|
250
261
|
justifyContent="space-between"
|
|
251
|
-
alignItems={subtitle ? "flex-start" : "center"}
|
|
262
|
+
alignItems={subtitle || status ? "flex-start" : "center"}
|
|
252
263
|
flexWrap="wrap"
|
|
253
264
|
{...knobProps.gap}
|
|
254
265
|
>
|
|
@@ -256,7 +267,7 @@ export function PageHeader({
|
|
|
256
267
|
narrow widths instead of painting past the frame. flexShrink:1 +
|
|
257
268
|
minWidth:0 lets the H1 wrap (DF-02) and each action wrap below the
|
|
258
269
|
title rather than clip off-canvas (DF-01). */}
|
|
259
|
-
{titleNode || subtitle ? (
|
|
270
|
+
{titleNode || subtitle || status ? (
|
|
260
271
|
<YStack flexGrow={1} flexShrink={1} minWidth={0} gap="$1">
|
|
261
272
|
{titleNode}
|
|
262
273
|
{subtitle ? (
|
|
@@ -265,15 +276,22 @@ export function PageHeader({
|
|
|
265
276
|
{subtitle}
|
|
266
277
|
</Paragraph>
|
|
267
278
|
) : null}
|
|
279
|
+
{status ? <XStack alignItems="center">{status}</XStack> : null}
|
|
268
280
|
</YStack>
|
|
269
281
|
) : null}
|
|
270
282
|
{actions ? (
|
|
283
|
+
// Grows into the row it lands on: beside the title it stays
|
|
284
|
+
// trailing, wrapped under it (a phone) it spans the content
|
|
285
|
+
// width, so the trailing action reaches the gutter.
|
|
271
286
|
<XStack
|
|
272
287
|
{...knobProps.gap}
|
|
273
288
|
alignItems="center"
|
|
289
|
+
justifyContent="flex-end"
|
|
274
290
|
flexWrap="wrap"
|
|
291
|
+
flexGrow={1}
|
|
275
292
|
flexShrink={1}
|
|
276
293
|
minWidth={0}
|
|
294
|
+
data-page-header-actions=""
|
|
277
295
|
>
|
|
278
296
|
{actions}
|
|
279
297
|
</XStack>
|
|
@@ -382,7 +400,7 @@ export function PageSection({
|
|
|
382
400
|
{headerBlock}
|
|
383
401
|
{surface ? (
|
|
384
402
|
<YStack {...knobProps.gap} {...surfaceProps}>
|
|
385
|
-
{children}
|
|
403
|
+
<PageGutter inset={null}>{children}</PageGutter>
|
|
386
404
|
</YStack>
|
|
387
405
|
) : (
|
|
388
406
|
children
|
|
@@ -414,26 +432,36 @@ export interface ScreenToolbarProps extends XStackProps {
|
|
|
414
432
|
*
|
|
415
433
|
* SP-PAD + SP-GAP on the bar; child actions own size/radius/A-STATE (Button
|
|
416
434
|
* contract). Nested under Screen, the bar bleeds Screen's inset then
|
|
417
|
-
* re-applies
|
|
418
|
-
* double-padding.
|
|
435
|
+
* re-applies it horizontally so the row shares the page line (LC-38) without
|
|
436
|
+
* double-padding. Screen already pads the top and spaces its children, so a
|
|
437
|
+
* nested bar adds no vertical padding: the title sits one section gap below.
|
|
419
438
|
*/
|
|
420
439
|
export function ScreenToolbar({ leading, trailing, children, ...rest }: ScreenToolbarProps) {
|
|
421
440
|
const { knobProps } = useResolvedKnobs({ component: "ScreenToolbar" });
|
|
422
441
|
const insetToken = usePageChromeInset();
|
|
423
442
|
const bleed = insetToken ? { marginHorizontal: negateSpaceToken(insetToken) as "$4" } : null;
|
|
443
|
+
// LC-145: a phone top bar is one row; the leading group shrinks first.
|
|
444
|
+
const oneRow = useLayoutSizeClass() === "compact";
|
|
424
445
|
return (
|
|
425
446
|
<XStack
|
|
426
447
|
data-testid="screen-toolbar"
|
|
427
448
|
justifyContent="space-between"
|
|
428
449
|
alignItems="center"
|
|
429
|
-
flexWrap="wrap"
|
|
450
|
+
flexWrap={oneRow ? "nowrap" : "wrap"}
|
|
430
451
|
minHeight={MIN_PRESS_TARGET}
|
|
431
452
|
{...bleed}
|
|
432
|
-
{...knobProps.panelPadding}
|
|
453
|
+
{...(insetToken ? { paddingHorizontal: insetToken as "$4" } : knobProps.panelPadding)}
|
|
433
454
|
{...knobProps.gap}
|
|
434
455
|
{...rest}
|
|
435
456
|
>
|
|
436
|
-
<XStack
|
|
457
|
+
<XStack
|
|
458
|
+
{...knobProps.gap}
|
|
459
|
+
alignItems="center"
|
|
460
|
+
flexWrap="wrap"
|
|
461
|
+
// Shrink weight, not a size: the back label gives way before the actions wrap.
|
|
462
|
+
flexShrink={oneRow ? 1000 : 1}
|
|
463
|
+
minWidth={0}
|
|
464
|
+
>
|
|
437
465
|
{leading}
|
|
438
466
|
</XStack>
|
|
439
467
|
{children}
|
|
@@ -450,3 +478,64 @@ export function ScreenToolbar({ leading, trailing, children, ...rest }: ScreenTo
|
|
|
450
478
|
</XStack>
|
|
451
479
|
);
|
|
452
480
|
}
|
|
481
|
+
|
|
482
|
+
// ---------------------------------------------------------------------------
|
|
483
|
+
// Top-bar controls — back and the "…" overflow (LC-145 BACK-IN-TOP-BAR)
|
|
484
|
+
// ---------------------------------------------------------------------------
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* One recipe for the quiet controls in a page's top bar: chromeless, at the
|
|
488
|
+
* page's control size, so back and "…" read as one row of the same weight
|
|
489
|
+
* and hit area.
|
|
490
|
+
*/
|
|
491
|
+
function useTopBarControl() {
|
|
492
|
+
const { knobProps } = useResolvedKnobs({ component: "ScreenToolbar" });
|
|
493
|
+
return { size: knobProps.sizeToken, chromeless: true } as const;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
export interface PageBackButtonProps extends Omit<ButtonProps, "children"> {
|
|
497
|
+
/** Where back goes, shown beside the caret (the list's name). */
|
|
498
|
+
label?: string;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* The page's back control. It sits in ScreenToolbar's leading slot, never on
|
|
503
|
+
* a row of its own, with its caret on the content gutter (Button `edge`).
|
|
504
|
+
*/
|
|
505
|
+
export function PageBackButton({ label, ...props }: PageBackButtonProps) {
|
|
506
|
+
const control = useTopBarControl();
|
|
507
|
+
const { t } = useTranslation();
|
|
508
|
+
const rtl = useDirection() === "rtl";
|
|
509
|
+
return (
|
|
510
|
+
<Button
|
|
511
|
+
{...control}
|
|
512
|
+
edge="start"
|
|
513
|
+
flexShrink={1}
|
|
514
|
+
minWidth={0}
|
|
515
|
+
icon={rtl ? CaretRightIcon : CaretLeftIcon}
|
|
516
|
+
aria-label={label ? undefined : t("Back")}
|
|
517
|
+
data-top-bar-control="back"
|
|
518
|
+
{...props}
|
|
519
|
+
>
|
|
520
|
+
{label}
|
|
521
|
+
</Button>
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* The page's "…" overflow trigger: the back control's recipe and size, icon
|
|
527
|
+
* only. Pass `edge="end"` when it is the bar's last control.
|
|
528
|
+
*/
|
|
529
|
+
export function PageMenuButton(props: Omit<ButtonProps, "children">) {
|
|
530
|
+
const control = useTopBarControl();
|
|
531
|
+
const { t } = useTranslation();
|
|
532
|
+
return (
|
|
533
|
+
<Button
|
|
534
|
+
{...control}
|
|
535
|
+
icon={DotsThreeIcon}
|
|
536
|
+
aria-label={t("More actions")}
|
|
537
|
+
data-top-bar-control="menu"
|
|
538
|
+
{...props}
|
|
539
|
+
/>
|
|
540
|
+
);
|
|
541
|
+
}
|