@multiplatform.one/components 7.45.1 → 7.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Alert/index.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/DropdownMenu/index.cjs +5 -1
- package/dist/cjs/DropdownMenu/index.native.js +5 -1
- package/dist/cjs/DropdownMenu/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 +1 -0
- package/dist/cjs/OverflowRow/index.native.js +1 -0
- 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/Popover.cjs +145 -0
- package/dist/cjs/Popover.native.js +174 -0
- package/dist/cjs/Popover.native.js.map +1 -0
- 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/Tooltip/index.cjs +6 -0
- 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/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/knobImmuneExports.cjs +0 -1
- package/dist/cjs/knobImmuneExports.native.js +0 -1
- package/dist/cjs/knobImmuneExports.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/tamagui.cjs +2 -1
- package/dist/cjs/tamagui.native.js +2 -1
- package/dist/cjs/tamagui.native.js.map +1 -1
- 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/DropdownMenu/index.mjs +5 -1
- package/dist/esm/DropdownMenu/index.mjs.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js +5 -1
- package/dist/esm/DropdownMenu/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.map +1 -1
- 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/Popover.mjs +120 -0
- package/dist/esm/Popover.mjs.map +1 -0
- package/dist/esm/Popover.native.js +146 -0
- package/dist/esm/Popover.native.js.map +1 -0
- 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/Tooltip/index.mjs +6 -0
- package/dist/esm/Tooltip/index.mjs.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/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/knobImmuneExports.mjs +0 -1
- package/dist/esm/knobImmuneExports.mjs.map +1 -1
- package/dist/esm/knobImmuneExports.native.js +0 -1
- package/dist/esm/knobImmuneExports.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/tamagui.mjs +2 -1
- package/dist/esm/tamagui.mjs.map +1 -1
- package/dist/esm/tamagui.native.js +2 -1
- package/dist/esm/tamagui.native.js.map +1 -1
- 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/DropdownMenu/index.mjs +5 -1
- package/dist/jsx/DropdownMenu/index.mjs.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js +5 -1
- package/dist/jsx/DropdownMenu/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.map +1 -1
- package/dist/jsx/OverflowRow/index.native.js +1 -0
- 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/Popover.mjs +120 -0
- package/dist/jsx/Popover.mjs.map +1 -0
- package/dist/jsx/Popover.native.js +174 -0
- package/dist/jsx/Popover.native.js.map +1 -0
- 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/Tooltip/index.mjs +6 -0
- package/dist/jsx/Tooltip/index.mjs.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/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/knobImmuneExports.mjs +0 -1
- package/dist/jsx/knobImmuneExports.mjs.map +1 -1
- package/dist/jsx/knobImmuneExports.native.js +0 -1
- package/dist/jsx/knobImmuneExports.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/tamagui.mjs +2 -1
- package/dist/jsx/tamagui.mjs.map +1 -1
- package/dist/jsx/tamagui.native.js +2 -1
- package/dist/jsx/tamagui.native.js.map +1 -1
- 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 +21 -1
- package/src/DropdownMenu/index.tsx +6 -0
- 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/index.tsx +1 -0
- package/src/Pagination.stories.tsx +2 -1
- package/src/Pagination.tsx +9 -1
- package/src/Panel.stories.tsx +2 -1
- package/src/Popover.coverTrigger.spec.tsx +99 -0
- package/src/Popover.tsx +180 -0
- package/src/PopoverContent.stories.tsx +23 -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 +14 -1
- package/src/Tooltip/index.tsx +7 -0
- 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/CodeInline.stories.tsx +3 -1
- 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/knobImmuneExports.ts +0 -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/tamagui.spec.ts +2 -3
- package/src/tamagui.ts +2 -2
- 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/DropdownMenu/index.d.ts +3 -1
- package/types/DropdownMenu/index.d.ts.map +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/Popover.d.ts +114 -0
- package/types/Popover.d.ts.map +1 -0
- 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/Tooltip/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/knobImmuneExports.d.ts.map +1 -1
- 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/tamagui.d.ts +3 -2
- package/types/tamagui.d.ts.map +1 -1
- 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,266 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
import { View as NativeView } from "react-native";
|
|
3
|
+
import { YStack, isWeb } from "tamagui";
|
|
4
|
+
import {
|
|
5
|
+
MIN_PRESS_TARGET,
|
|
6
|
+
hairlineWidth,
|
|
7
|
+
keyboardFocusRingProps,
|
|
8
|
+
useResolvedKnobs,
|
|
9
|
+
} from "@multiplatform.one/theme";
|
|
10
|
+
import {
|
|
11
|
+
dayDiff,
|
|
12
|
+
xToDate,
|
|
13
|
+
type GanttOpenSpan,
|
|
14
|
+
type GanttRange,
|
|
15
|
+
type GanttResizeEdge,
|
|
16
|
+
} from "./ganttMath";
|
|
17
|
+
import {
|
|
18
|
+
editIntervalEdge,
|
|
19
|
+
intervalEdgeX,
|
|
20
|
+
sameInterval,
|
|
21
|
+
type GanttSnapUnit,
|
|
22
|
+
type IntervalViewport,
|
|
23
|
+
} from "./ganttIntervals";
|
|
24
|
+
|
|
25
|
+
interface GanttDateGripProps {
|
|
26
|
+
span: GanttOpenSpan;
|
|
27
|
+
displayX: number;
|
|
28
|
+
edge: GanttResizeEdge;
|
|
29
|
+
range: GanttRange;
|
|
30
|
+
viewport: IntervalViewport;
|
|
31
|
+
pxPerDay: number;
|
|
32
|
+
rowHeight: number;
|
|
33
|
+
chartWidth: number;
|
|
34
|
+
rtl: boolean;
|
|
35
|
+
snapUnit: GanttSnapUnit;
|
|
36
|
+
firstDayOfWeek: 0 | 1;
|
|
37
|
+
label: string;
|
|
38
|
+
valueText: string;
|
|
39
|
+
onPreview: (span: GanttOpenSpan | null) => void;
|
|
40
|
+
onCommit: (span: GanttOpenSpan) => void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function GanttDateGrip(props: GanttDateGripProps) {
|
|
44
|
+
const { knobProps } = useResolvedKnobs();
|
|
45
|
+
const [focused, setFocused] = useState(false);
|
|
46
|
+
const session = useRef<{
|
|
47
|
+
move: (x: number) => void;
|
|
48
|
+
end: (x: number, cancel?: boolean) => void;
|
|
49
|
+
} | null>(null);
|
|
50
|
+
const cleanup = useRef<(() => void) | null>(null);
|
|
51
|
+
const previewRef = useRef(props.onPreview);
|
|
52
|
+
previewRef.current = props.onPreview;
|
|
53
|
+
useEffect(
|
|
54
|
+
() => () => {
|
|
55
|
+
cleanup.current?.();
|
|
56
|
+
previewRef.current(null);
|
|
57
|
+
},
|
|
58
|
+
[],
|
|
59
|
+
);
|
|
60
|
+
const { span, edge, range, viewport, pxPerDay, rtl, rowHeight, chartWidth, label, valueText } =
|
|
61
|
+
props;
|
|
62
|
+
const x = props.displayX;
|
|
63
|
+
useEffect(
|
|
64
|
+
() => () => {
|
|
65
|
+
session.current?.end(0, true);
|
|
66
|
+
},
|
|
67
|
+
[
|
|
68
|
+
span.start?.getTime(),
|
|
69
|
+
span.end?.getTime(),
|
|
70
|
+
range.start.getTime(),
|
|
71
|
+
range.end.getTime(),
|
|
72
|
+
pxPerDay,
|
|
73
|
+
rtl,
|
|
74
|
+
],
|
|
75
|
+
);
|
|
76
|
+
const width = Math.min(MIN_PRESS_TARGET, Math.max(0, viewport.end - viewport.start));
|
|
77
|
+
const logicalLeft = Math.max(
|
|
78
|
+
viewport.start,
|
|
79
|
+
Math.min(edge === "start" ? x - width : x, viewport.end - width),
|
|
80
|
+
);
|
|
81
|
+
const left = rtl ? chartWidth - logicalLeft - width : logicalLeft;
|
|
82
|
+
|
|
83
|
+
const glyphWidth = Number(knobProps.controlIcon.width);
|
|
84
|
+
const glyphLeft = Math.max(
|
|
85
|
+
0,
|
|
86
|
+
Math.min((rtl ? chartWidth - x : x) - left - glyphWidth / 2, width - glyphWidth),
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
const begin = (startX: number) => {
|
|
90
|
+
cleanup.current?.();
|
|
91
|
+
const frozen = props;
|
|
92
|
+
const base = intervalEdgeX(
|
|
93
|
+
frozen.span,
|
|
94
|
+
frozen.edge,
|
|
95
|
+
frozen.range,
|
|
96
|
+
frozen.pxPerDay,
|
|
97
|
+
frozen.viewport,
|
|
98
|
+
);
|
|
99
|
+
let moved = false;
|
|
100
|
+
const nextAt = (physicalX: number) => {
|
|
101
|
+
const target = base + (physicalX - startX) * (frozen.rtl ? -1 : 1);
|
|
102
|
+
// The bounded and open glyph centres sit half a glyph either side of the date edge.
|
|
103
|
+
const reopen =
|
|
104
|
+
frozen.edge === "end"
|
|
105
|
+
? target > base && target >= frozen.viewport.end - glyphWidth
|
|
106
|
+
: target < base && target <= frozen.viewport.start + glyphWidth;
|
|
107
|
+
return editIntervalEdge(
|
|
108
|
+
frozen.span,
|
|
109
|
+
frozen.edge,
|
|
110
|
+
reopen ? frozen.viewport[frozen.edge] : target,
|
|
111
|
+
frozen.range,
|
|
112
|
+
frozen.pxPerDay,
|
|
113
|
+
frozen.viewport,
|
|
114
|
+
frozen.snapUnit,
|
|
115
|
+
frozen.firstDayOfWeek,
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
frozen.onPreview(frozen.span);
|
|
119
|
+
session.current = {
|
|
120
|
+
move: (physicalX) => {
|
|
121
|
+
if (Math.abs(physicalX - startX) >= 4) moved = true;
|
|
122
|
+
if (moved) frozen.onPreview(nextAt(physicalX));
|
|
123
|
+
},
|
|
124
|
+
end: (physicalX, cancel = false) => {
|
|
125
|
+
const next = Math.abs(physicalX - startX) < 4 ? frozen.span : nextAt(physicalX);
|
|
126
|
+
cleanup.current?.();
|
|
127
|
+
session.current = null;
|
|
128
|
+
frozen.onPreview(null);
|
|
129
|
+
if (!cancel && moved && !sameInterval(frozen.span, next)) frozen.onCommit(next);
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const pointerDown = (event: any) => {
|
|
135
|
+
if (!isWeb) return;
|
|
136
|
+
if (event.button !== undefined && event.button !== 0) return;
|
|
137
|
+
event.stopPropagation?.();
|
|
138
|
+
event.preventDefault?.();
|
|
139
|
+
const id = event.pointerId;
|
|
140
|
+
begin(event.clientX);
|
|
141
|
+
const previous = document.body.style.userSelect;
|
|
142
|
+
document.body.style.userSelect = "none";
|
|
143
|
+
const own = (e: PointerEvent) => id === undefined || e.pointerId === id;
|
|
144
|
+
const move = (e: PointerEvent) => {
|
|
145
|
+
if (own(e)) {
|
|
146
|
+
e.preventDefault();
|
|
147
|
+
session.current?.move(e.clientX);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const up = (e: PointerEvent) => {
|
|
151
|
+
if (own(e)) session.current?.end(e.clientX);
|
|
152
|
+
};
|
|
153
|
+
const cancel = (e: PointerEvent) => {
|
|
154
|
+
if (own(e)) session.current?.end(event.clientX, true);
|
|
155
|
+
};
|
|
156
|
+
const key = (e: KeyboardEvent) => {
|
|
157
|
+
if (e.key === "Escape") {
|
|
158
|
+
e.stopPropagation();
|
|
159
|
+
session.current?.end(event.clientX, true);
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
window.addEventListener("pointermove", move, { passive: false });
|
|
163
|
+
window.addEventListener("pointerup", up);
|
|
164
|
+
window.addEventListener("pointercancel", cancel);
|
|
165
|
+
window.addEventListener("keydown", key, true);
|
|
166
|
+
cleanup.current = () => {
|
|
167
|
+
window.removeEventListener("pointermove", move);
|
|
168
|
+
window.removeEventListener("pointerup", up);
|
|
169
|
+
window.removeEventListener("pointercancel", cancel);
|
|
170
|
+
window.removeEventListener("keydown", key, true);
|
|
171
|
+
document.body.style.userSelect = previous;
|
|
172
|
+
cleanup.current = null;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
const step = (direction: number) => {
|
|
177
|
+
const date = xToDate(x, range.start, pxPerDay);
|
|
178
|
+
const days =
|
|
179
|
+
props.snapUnit === "month"
|
|
180
|
+
? dayDiff(date, new Date(date.getFullYear(), date.getMonth() + direction, 1))
|
|
181
|
+
: direction * (props.snapUnit === "week" ? 7 : 1);
|
|
182
|
+
const next = editIntervalEdge(
|
|
183
|
+
span,
|
|
184
|
+
edge,
|
|
185
|
+
x + days * pxPerDay,
|
|
186
|
+
range,
|
|
187
|
+
pxPerDay,
|
|
188
|
+
viewport,
|
|
189
|
+
props.snapUnit,
|
|
190
|
+
props.firstDayOfWeek,
|
|
191
|
+
);
|
|
192
|
+
if (!sameInterval(span, next)) props.onCommit(next);
|
|
193
|
+
};
|
|
194
|
+
const surfaceProps = isWeb
|
|
195
|
+
? {
|
|
196
|
+
onPointerDown: pointerDown,
|
|
197
|
+
onKeyDown: (event: any) => {
|
|
198
|
+
if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") return;
|
|
199
|
+
event.preventDefault?.();
|
|
200
|
+
event.stopPropagation?.();
|
|
201
|
+
step((event.key === "ArrowRight" ? 1 : -1) * (rtl ? -1 : 1));
|
|
202
|
+
},
|
|
203
|
+
onFocus: () => setFocused(true),
|
|
204
|
+
onBlur: () => setFocused(false),
|
|
205
|
+
tabIndex: 0,
|
|
206
|
+
role: "slider",
|
|
207
|
+
"aria-label": label,
|
|
208
|
+
"aria-valuetext": valueText,
|
|
209
|
+
"aria-valuenow": Math.round(x / pxPerDay),
|
|
210
|
+
"aria-valuemin": Math.floor(viewport.start / pxPerDay),
|
|
211
|
+
"aria-valuemax": Math.ceil(viewport.end / pxPerDay),
|
|
212
|
+
"data-gantt-date-grip": edge,
|
|
213
|
+
}
|
|
214
|
+
: {
|
|
215
|
+
accessible: true,
|
|
216
|
+
accessibilityRole: "adjustable",
|
|
217
|
+
accessibilityLabel: label,
|
|
218
|
+
accessibilityValue: { text: valueText },
|
|
219
|
+
accessibilityActions: [{ name: "increment" }, { name: "decrement" }],
|
|
220
|
+
onAccessibilityAction: (event: any) =>
|
|
221
|
+
step(event.nativeEvent.actionName === "increment" ? 1 : -1),
|
|
222
|
+
onStartShouldSetResponder: () => true,
|
|
223
|
+
onMoveShouldSetResponder: () => true,
|
|
224
|
+
onResponderTerminationRequest: () => false,
|
|
225
|
+
onResponderGrant: (event: any) => {
|
|
226
|
+
event.stopPropagation?.();
|
|
227
|
+
begin(event.nativeEvent.pageX);
|
|
228
|
+
},
|
|
229
|
+
onResponderMove: (event: any) => session.current?.move(event.nativeEvent.pageX),
|
|
230
|
+
onResponderRelease: (event: any) => session.current?.end(event.nativeEvent.pageX),
|
|
231
|
+
onResponderTerminate: () => session.current?.end(0, true),
|
|
232
|
+
};
|
|
233
|
+
const Surface = (isWeb ? YStack : NativeView) as typeof YStack;
|
|
234
|
+
return (
|
|
235
|
+
<Surface
|
|
236
|
+
{...(surfaceProps as any)}
|
|
237
|
+
testID={`gantt-date-grip-${edge}`}
|
|
238
|
+
style={
|
|
239
|
+
{
|
|
240
|
+
position: "absolute",
|
|
241
|
+
left,
|
|
242
|
+
top: 0,
|
|
243
|
+
width,
|
|
244
|
+
height: rowHeight,
|
|
245
|
+
zIndex: 6,
|
|
246
|
+
alignItems: "center",
|
|
247
|
+
justifyContent: "center",
|
|
248
|
+
...(isWeb ? { touchAction: "none", cursor: "ew-resize" } : {}),
|
|
249
|
+
} as any
|
|
250
|
+
}
|
|
251
|
+
>
|
|
252
|
+
<YStack
|
|
253
|
+
position="absolute"
|
|
254
|
+
left={glyphLeft}
|
|
255
|
+
width={knobProps.controlIcon.width}
|
|
256
|
+
height={knobProps.controlIcon.height}
|
|
257
|
+
{...knobProps.containerRadius}
|
|
258
|
+
backgroundColor="$background"
|
|
259
|
+
borderColor="$color12"
|
|
260
|
+
borderWidth={hairlineWidth}
|
|
261
|
+
pointerEvents="none"
|
|
262
|
+
{...(focused ? keyboardFocusRingProps : {})}
|
|
263
|
+
/>
|
|
264
|
+
</Surface>
|
|
265
|
+
);
|
|
266
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { action } from "@multiplatform.one/storybook";
|
|
2
2
|
import { resolveChartPalette } from "@multiplatform.one/theme";
|
|
3
3
|
import type { Meta } from "@storybook/react-native-web-vite";
|
|
4
|
-
import {
|
|
4
|
+
import { YStack } from "tamagui";
|
|
5
5
|
import { Image } from "../images/Image";
|
|
6
6
|
import { ImageGrid } from "./ImageGrid";
|
|
7
|
+
import { Text } from "../Text";
|
|
7
8
|
|
|
8
9
|
interface ImageItem {
|
|
9
10
|
id: string;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
2
|
+
import { Preset } from "@multiplatform.one/theme";
|
|
3
|
+
import { cleanup } from "@testing-library/react";
|
|
4
|
+
import type { ReactNode } from "react";
|
|
5
|
+
import { Fragment } from "react";
|
|
6
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* FZ-7740: the native board's cards drew no shadow at elevation medium or
|
|
10
|
+
* large. They passed the bare `elevation` number to the Card, whose stack
|
|
11
|
+
* variant writes the shadow without its opacity (iOS then squares the
|
|
12
|
+
* colour's alpha), and the card clipped itself, which on iOS masks the
|
|
13
|
+
* layer's own shadow. Cards now spread the theme's `elevationChrome` recipe,
|
|
14
|
+
* as Button and the input box do, and drop the clip while elevated.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
vi.mock("@multiplatform.one/platform", async (importOriginal) => ({
|
|
18
|
+
...(await importOriginal<typeof import("@multiplatform.one/platform")>()),
|
|
19
|
+
isWeb: false,
|
|
20
|
+
isNative: true,
|
|
21
|
+
}));
|
|
22
|
+
|
|
23
|
+
vi.mock("@shopify/flash-list", () => ({
|
|
24
|
+
FlashList: ({
|
|
25
|
+
data,
|
|
26
|
+
renderItem,
|
|
27
|
+
}: {
|
|
28
|
+
data: readonly unknown[];
|
|
29
|
+
renderItem: (info: { item: unknown; index: number }) => ReactNode;
|
|
30
|
+
}) => (
|
|
31
|
+
<>
|
|
32
|
+
{data.map((item, index) => (
|
|
33
|
+
<Fragment key={index}>{renderItem({ item, index })}</Fragment>
|
|
34
|
+
))}
|
|
35
|
+
</>
|
|
36
|
+
),
|
|
37
|
+
}));
|
|
38
|
+
|
|
39
|
+
const cards = vi.hoisted(() => [] as Record<string, unknown>[]);
|
|
40
|
+
vi.mock("../surfaces", () => ({
|
|
41
|
+
Card: ({ children, ...props }: Record<string, unknown> & { children?: ReactNode }) => {
|
|
42
|
+
cards.push(props);
|
|
43
|
+
return <div>{children}</div>;
|
|
44
|
+
},
|
|
45
|
+
}));
|
|
46
|
+
|
|
47
|
+
import { Kanban, type KanbanColumn } from "./Kanban.native";
|
|
48
|
+
|
|
49
|
+
const columns: KanbanColumn<{ id: string; title: string }>[] = [
|
|
50
|
+
{ id: "todo", title: "To Do", items: [{ id: "1", title: "Review documentation" }] },
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
function renderBoard(elevation?: "none" | "small" | "medium" | "large") {
|
|
54
|
+
cards.length = 0;
|
|
55
|
+
renderWithProviders(
|
|
56
|
+
<Preset overrides={elevation ? { elevation } : undefined}>
|
|
57
|
+
<Kanban columns={columns} renderCard={(item) => item.title} />
|
|
58
|
+
</Preset>,
|
|
59
|
+
);
|
|
60
|
+
const card = cards.find((props) => props["data-kanban-card"] !== undefined);
|
|
61
|
+
if (!card) throw new Error("the board rendered no card");
|
|
62
|
+
return card;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
beforeEach(() => {
|
|
66
|
+
cards.length = 0;
|
|
67
|
+
});
|
|
68
|
+
afterEach(cleanup);
|
|
69
|
+
|
|
70
|
+
describe("native Kanban card elevation (FZ-7740)", () => {
|
|
71
|
+
for (const stop of ["medium", "large"] as const) {
|
|
72
|
+
it(`paints the theme elevation recipe at ${stop} and keeps the shadow unclipped`, () => {
|
|
73
|
+
const card = renderBoard(stop);
|
|
74
|
+
expect(card.shadowColor).toBe("$shadowColor");
|
|
75
|
+
expect(card.shadowOpacity).toBe(1);
|
|
76
|
+
expect(card.shadowRadius).toBeGreaterThan(0);
|
|
77
|
+
expect(card.elevation).toBeGreaterThan(0);
|
|
78
|
+
expect(card.overflow).toBe("visible");
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
it("grows the shadow from medium to large", () => {
|
|
83
|
+
const medium = renderBoard("medium");
|
|
84
|
+
cleanup();
|
|
85
|
+
const large = renderBoard("large");
|
|
86
|
+
expect(large.shadowRadius as number).toBeGreaterThan(medium.shadowRadius as number);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
for (const stop of [undefined, "none", "small"] as const) {
|
|
90
|
+
it(`stays flat and clipped at ${stop ?? "the default"}`, () => {
|
|
91
|
+
const card = renderBoard(stop);
|
|
92
|
+
expect(card.shadowColor).toBeUndefined();
|
|
93
|
+
expect(card.shadowOpacity).toBeUndefined();
|
|
94
|
+
expect(card.elevation).toBeUndefined();
|
|
95
|
+
expect(card.overflow).toBe("hidden");
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
});
|
|
@@ -957,7 +957,7 @@ function KanbanColumnView<T>({
|
|
|
957
957
|
>
|
|
958
958
|
<Card
|
|
959
959
|
id={`${kanbanId}-col-${columnIndex}-card-${index}`}
|
|
960
|
-
|
|
960
|
+
{...knobProps.elevationChrome}
|
|
961
961
|
minHeight={MIN_PRESS_TARGET}
|
|
962
962
|
{...(ghost
|
|
963
963
|
? {
|
|
@@ -968,7 +968,8 @@ function KanbanColumnView<T>({
|
|
|
968
968
|
: undefined)}
|
|
969
969
|
hoverStyle={{ backgroundColor: componentColors.interactive.background }}
|
|
970
970
|
pressStyle={{ scale: 0.98 }}
|
|
971
|
-
|
|
971
|
+
// iOS clips a layer's own shadow with it, so an elevated card drops the clip (MPO-69).
|
|
972
|
+
overflow={knobProps.elevation == null ? "hidden" : "visible"}
|
|
972
973
|
data-kanban-card={String(
|
|
973
974
|
getItemKey ? getItemKey(item, index) : `${column.id}-${index}`,
|
|
974
975
|
)}
|
|
@@ -4,8 +4,9 @@ import { Button } from "@multiplatform.one/forms";
|
|
|
4
4
|
import { PlusIcon } from "@phosphor-icons/react";
|
|
5
5
|
import type { Meta } from "@storybook/react-native-web-vite";
|
|
6
6
|
import { useCallback, useState } from "react";
|
|
7
|
-
import {
|
|
7
|
+
import { XStack, YStack } from "tamagui";
|
|
8
8
|
import { Kanban, type KanbanColumn } from "./Kanban";
|
|
9
|
+
import { Text } from "../Text";
|
|
9
10
|
|
|
10
11
|
interface Task {
|
|
11
12
|
id: string;
|
package/src/views/Kanban.tsx
CHANGED
|
@@ -23,7 +23,15 @@ import React, {
|
|
|
23
23
|
useState,
|
|
24
24
|
type ReactNode,
|
|
25
25
|
} from "react";
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
AnimatePresence,
|
|
28
|
+
ListItem,
|
|
29
|
+
Text as TamaguiText,
|
|
30
|
+
View,
|
|
31
|
+
XStack,
|
|
32
|
+
YStack,
|
|
33
|
+
type YStackProps,
|
|
34
|
+
} from "tamagui";
|
|
27
35
|
import { ScrollView } from "../ScrollView";
|
|
28
36
|
import { componentColors } from "../componentColors";
|
|
29
37
|
import { AsyncBoundary, useAsyncCount } from "../layouts/AsyncBoundary";
|
|
@@ -45,6 +53,7 @@ import {
|
|
|
45
53
|
type KanbanDropTarget,
|
|
46
54
|
type RenderedCardMeasurement,
|
|
47
55
|
} from "./kanbanDnd";
|
|
56
|
+
import { Text } from "../Text";
|
|
48
57
|
|
|
49
58
|
/**
|
|
50
59
|
* A column definition for the Kanban board.
|
|
@@ -1359,14 +1368,14 @@ function KanbanColumnView<T>({
|
|
|
1359
1368
|
itemCount !== undefined || renderColumnActions ? (
|
|
1360
1369
|
<XStack alignItems="center" {...knobProps.gap}>
|
|
1361
1370
|
{itemCount !== undefined && (
|
|
1362
|
-
<
|
|
1371
|
+
<TamaguiText
|
|
1363
1372
|
color={knobProps.textAccentColor}
|
|
1364
1373
|
{...knobProps.label}
|
|
1365
1374
|
{...knobProps.textWeight}
|
|
1366
1375
|
data-async-count
|
|
1367
1376
|
>
|
|
1368
1377
|
{itemCount}
|
|
1369
|
-
</
|
|
1378
|
+
</TamaguiText>
|
|
1370
1379
|
)}
|
|
1371
1380
|
{renderColumnActions?.(column)}
|
|
1372
1381
|
</XStack>
|
|
@@ -1461,7 +1470,7 @@ function KanbanColumnView<T>({
|
|
|
1461
1470
|
>
|
|
1462
1471
|
<Card
|
|
1463
1472
|
id={`${kanbanId}-col-${columnIndex}-card-${virtualItem.index}`}
|
|
1464
|
-
|
|
1473
|
+
{...knobProps.elevationChrome}
|
|
1465
1474
|
minHeight={MIN_PRESS_TARGET}
|
|
1466
1475
|
{...transitionProps(knobProps.motion.slide, [
|
|
1467
1476
|
"backgroundColor",
|
|
@@ -1571,9 +1580,9 @@ function KanbanColumnView<T>({
|
|
|
1571
1580
|
justifyContent="center"
|
|
1572
1581
|
>
|
|
1573
1582
|
{isEmpty && (
|
|
1574
|
-
<
|
|
1583
|
+
<TamaguiText color={knobProps.textAccentColor} {...knobProps.label}>
|
|
1575
1584
|
{t("Drop here")}
|
|
1576
|
-
</
|
|
1585
|
+
</TamaguiText>
|
|
1577
1586
|
)}
|
|
1578
1587
|
</View>
|
|
1579
1588
|
</View>
|
package/src/views/List.spec.tsx
CHANGED
|
@@ -5,6 +5,8 @@ import { afterEach, describe, expect, it } from "vitest";
|
|
|
5
5
|
import {
|
|
6
6
|
List,
|
|
7
7
|
listLeadingIconSize,
|
|
8
|
+
listRowPressDelayMs,
|
|
9
|
+
listRowTouchProps,
|
|
8
10
|
ListRow,
|
|
9
11
|
ListRowMeta,
|
|
10
12
|
useListItemState,
|
|
@@ -93,6 +95,22 @@ describe("List row inset — panelPadding across, $2 down, no desktop 44 floor",
|
|
|
93
95
|
});
|
|
94
96
|
});
|
|
95
97
|
|
|
98
|
+
describe("List rows on touch (LC-147)", () => {
|
|
99
|
+
it("adds the 44 floor on touch and nothing on desktop", () => {
|
|
100
|
+
expect(listRowTouchProps(false, true)).toEqual({});
|
|
101
|
+
expect(listRowTouchProps(false, false)).toEqual({});
|
|
102
|
+
expect(listRowTouchProps(true, false)).toEqual({ minHeight: 44 });
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it("holds a native row's press paint until a scroll has had its chance to claim the touch", () => {
|
|
106
|
+
expect(listRowPressDelayMs).toBeGreaterThanOrEqual(130);
|
|
107
|
+
expect(listRowTouchProps(true, true)).toEqual({
|
|
108
|
+
minHeight: 44,
|
|
109
|
+
delayPressIn: listRowPressDelayMs,
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
96
114
|
describe("List keyboard selection chrome (LC-71)", () => {
|
|
97
115
|
it("marks the filled row data-selected and the keyboard row data-focused", () => {
|
|
98
116
|
renderWithProviders(
|
package/src/views/List.tsx
CHANGED
|
@@ -33,7 +33,7 @@ import React, {
|
|
|
33
33
|
type ReactNode,
|
|
34
34
|
} from "react";
|
|
35
35
|
import { useTranslation } from "../shared/i18n";
|
|
36
|
-
import { Text, View, XStack, YStack, type SizeTokens, type YStackProps } from "tamagui";
|
|
36
|
+
import { Text, View, XStack, YStack, isWeb, type SizeTokens, type YStackProps } from "tamagui";
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Configurable hotkey bindings for the List component.
|
|
@@ -218,6 +218,21 @@ export function ListRow({ icon, title, subtitle, meta }: ListRowProps) {
|
|
|
218
218
|
);
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
+
/**
|
|
222
|
+
* A row in a scroller waits this long before it paints its press, the delay
|
|
223
|
+
* UIScrollView gives its content: a touch that becomes a scroll never fills
|
|
224
|
+
* the row it started on (LC-147).
|
|
225
|
+
*/
|
|
226
|
+
export const listRowPressDelayMs = 150;
|
|
227
|
+
|
|
228
|
+
/** What a touch surface adds to a row: the 44 floor and, on native, the press delay. */
|
|
229
|
+
export function listRowTouchProps(touch: boolean, native = !isWeb) {
|
|
230
|
+
if (!touch) return {};
|
|
231
|
+
return native
|
|
232
|
+
? { minHeight: MIN_PRESS_TARGET, delayPressIn: listRowPressDelayMs }
|
|
233
|
+
: { minHeight: MIN_PRESS_TARGET };
|
|
234
|
+
}
|
|
235
|
+
|
|
221
236
|
/**
|
|
222
237
|
* Props for the generic List component.
|
|
223
238
|
*
|
|
@@ -539,7 +554,7 @@ export function List<T>({
|
|
|
539
554
|
...(isSelected ? { "data-selected": true } : {}),
|
|
540
555
|
...(isSelected && containerKeyboardFocused ? { "data-focused": true } : {}),
|
|
541
556
|
} as Record<string, unknown>)}
|
|
542
|
-
{...(touch
|
|
557
|
+
{...listRowTouchProps(touch)}
|
|
543
558
|
paddingHorizontal={rowPad}
|
|
544
559
|
paddingVertical="$2"
|
|
545
560
|
alignItems="center"
|
package/src/views/Matrix.tsx
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import React, { useCallback, useMemo, useRef, useState, type ReactNode } from "react";
|
|
20
20
|
import { useTranslation } from "../shared/i18n";
|
|
21
21
|
import { ScrollView as RNScrollView } from "react-native";
|
|
22
|
-
import { SizableText, Text, XStack, YStack, isWeb, type YStackProps } from "tamagui";
|
|
22
|
+
import { SizableText, Text as TamaguiText, XStack, YStack, isWeb, type YStackProps } from "tamagui";
|
|
23
23
|
import { ScrollView } from "../ScrollView";
|
|
24
24
|
import { formatRangeLabel } from "./ganttMath";
|
|
25
25
|
import {
|
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
type MatrixIntent,
|
|
38
38
|
type MatrixRange,
|
|
39
39
|
} from "./matrixMath";
|
|
40
|
+
import { Text } from "../Text";
|
|
40
41
|
|
|
41
42
|
// Same split as the Gantt: the grid canvas needs real scroll events to drive
|
|
42
43
|
// the pinned axis follower, and Tamagui's styled ScrollView does not deliver
|
|
@@ -241,7 +242,7 @@ function MatrixCellBox({
|
|
|
241
242
|
{...{ "data-matrix-fill": String(intensity) }}
|
|
242
243
|
/>
|
|
243
244
|
)}
|
|
244
|
-
<
|
|
245
|
+
<TamaguiText
|
|
245
246
|
{...knobProps.label}
|
|
246
247
|
color={empty ? componentColors.text.subtle : ink}
|
|
247
248
|
numberOfLines={1}
|
|
@@ -250,7 +251,7 @@ function MatrixCellBox({
|
|
|
250
251
|
aria-hidden
|
|
251
252
|
>
|
|
252
253
|
{empty ? "·" : text}
|
|
253
|
-
</
|
|
254
|
+
</TamaguiText>
|
|
254
255
|
</YStack>
|
|
255
256
|
);
|
|
256
257
|
}
|
|
@@ -571,9 +572,9 @@ export function MatrixView({
|
|
|
571
572
|
borderColor="$borderColor"
|
|
572
573
|
{...{ backgroundColor: componentColors.surface.background }}
|
|
573
574
|
>
|
|
574
|
-
<
|
|
575
|
+
<TamaguiText {...knobProps.label} color={knobProps.textAccentColor} numberOfLines={1}>
|
|
575
576
|
{subjectLabel ?? t("Subject")}
|
|
576
|
-
</
|
|
577
|
+
</TamaguiText>
|
|
577
578
|
</XStack>
|
|
578
579
|
<ScrollView
|
|
579
580
|
ref={axisScrollRef}
|
|
@@ -603,9 +604,13 @@ export function MatrixView({
|
|
|
603
604
|
aria-label={bucket.name}
|
|
604
605
|
{...{ "data-matrix-column": bucket.key }}
|
|
605
606
|
>
|
|
606
|
-
<
|
|
607
|
+
<TamaguiText
|
|
608
|
+
{...knobProps.label}
|
|
609
|
+
color={knobProps.textAccentColor}
|
|
610
|
+
numberOfLines={1}
|
|
611
|
+
>
|
|
607
612
|
{bucket.label}
|
|
608
|
-
</
|
|
613
|
+
</TamaguiText>
|
|
609
614
|
</XStack>
|
|
610
615
|
))}
|
|
611
616
|
</XStack>
|
|
@@ -633,9 +638,9 @@ export function MatrixView({
|
|
|
633
638
|
borderColor={componentColors.divider}
|
|
634
639
|
{...{ "data-matrix-row-label": row.id }}
|
|
635
640
|
>
|
|
636
|
-
<
|
|
641
|
+
<TamaguiText {...knobProps.body} numberOfLines={1} color="$color">
|
|
637
642
|
{row.label}
|
|
638
|
-
</
|
|
643
|
+
</TamaguiText>
|
|
639
644
|
</XStack>
|
|
640
645
|
))}
|
|
641
646
|
</YStack>
|
|
@@ -710,20 +715,20 @@ export function MatrixView({
|
|
|
710
715
|
>
|
|
711
716
|
<XStack alignItems="center" gap="$1.5">
|
|
712
717
|
<LegendSwatch empty />
|
|
713
|
-
<
|
|
718
|
+
<TamaguiText {...knobProps.label} color={knobProps.textAccentColor}>
|
|
714
719
|
{t("No data")}
|
|
715
|
-
</
|
|
720
|
+
</TamaguiText>
|
|
716
721
|
</XStack>
|
|
717
722
|
<XStack alignItems="center" gap="$1.5">
|
|
718
|
-
<
|
|
723
|
+
<TamaguiText {...knobProps.label} color={knobProps.textAccentColor}>
|
|
719
724
|
{t("Less")}
|
|
720
|
-
</
|
|
725
|
+
</TamaguiText>
|
|
721
726
|
{LEGEND_STEPS.map((step) => (
|
|
722
727
|
<LegendSwatch key={step} intensity={step} />
|
|
723
728
|
))}
|
|
724
|
-
<
|
|
729
|
+
<TamaguiText {...knobProps.label} color={knobProps.textAccentColor}>
|
|
725
730
|
{t("More")}
|
|
726
|
-
</
|
|
731
|
+
</TamaguiText>
|
|
727
732
|
</XStack>
|
|
728
733
|
{legendItems?.map((item, index) => (
|
|
729
734
|
<CellIntentWrap
|
|
@@ -732,9 +737,9 @@ export function MatrixView({
|
|
|
732
737
|
>
|
|
733
738
|
<XStack alignItems="center" gap="$1.5">
|
|
734
739
|
<LegendSwatch fill={resolveFill(item.color, item.intent, identity)} />
|
|
735
|
-
<
|
|
740
|
+
<TamaguiText {...knobProps.label} color={knobProps.textAccentColor}>
|
|
736
741
|
{item.label}
|
|
737
|
-
</
|
|
742
|
+
</TamaguiText>
|
|
738
743
|
</XStack>
|
|
739
744
|
</CellIntentWrap>
|
|
740
745
|
))}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
import { Button } from "@multiplatform.one/forms";
|
|
3
3
|
import { useRef, useState } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { XStack, YStack } from "tamagui";
|
|
5
5
|
import { TreeView, type TreeNode, type TreeViewProps } from "./TreeView";
|
|
6
|
+
import { Text } from "../Text";
|
|
6
7
|
|
|
7
8
|
const folders: TreeNode[] = [
|
|
8
9
|
{
|