@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
package/src/views/Gantt.tsx
CHANGED
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
useChartPalette,
|
|
14
14
|
useResolvedKnobs,
|
|
15
15
|
wasKeyboardFocus,
|
|
16
|
-
sizeTokenStop,
|
|
17
16
|
} from "@multiplatform.one/theme";
|
|
18
17
|
import { componentColors, sectionHeading } from "../componentColors";
|
|
19
18
|
import { AsyncBoundary } from "../layouts/AsyncBoundary";
|
|
@@ -23,11 +22,24 @@ import { useDirection } from "../hooks/useDirection";
|
|
|
23
22
|
import { withInterp } from "../shared/t";
|
|
24
23
|
|
|
25
24
|
import { Button } from "@multiplatform.one/forms";
|
|
26
|
-
import React, {
|
|
25
|
+
import React, {
|
|
26
|
+
useCallback,
|
|
27
|
+
useEffect,
|
|
28
|
+
useLayoutEffect,
|
|
29
|
+
useMemo,
|
|
30
|
+
useRef,
|
|
31
|
+
useState,
|
|
32
|
+
type ReactNode,
|
|
33
|
+
} from "react";
|
|
27
34
|
import { useTranslation } from "../shared/i18n";
|
|
28
35
|
import { ScrollView as RNScrollView } from "react-native";
|
|
29
|
-
import { SizableText, Text, XStack, YStack, isWeb, type YStackProps } from "tamagui";
|
|
36
|
+
import { SizableText, Text as TamaguiText, XStack, YStack, isWeb, type YStackProps } from "tamagui";
|
|
30
37
|
import { ScrollView } from "../ScrollView";
|
|
38
|
+
import { LinearGradient } from "tamagui/linear-gradient";
|
|
39
|
+
import { getRgba } from "@tamagui/core";
|
|
40
|
+
import { useTheme, getTokenValue } from "tamagui";
|
|
41
|
+
import { GanttDateGrip } from "./GanttDateGrip";
|
|
42
|
+
import { intervalViewport, intervalEdgeX, type GanttSnapUnit } from "./ganttIntervals";
|
|
31
43
|
import {
|
|
32
44
|
addDays,
|
|
33
45
|
barGeometry,
|
|
@@ -58,6 +70,7 @@ import {
|
|
|
58
70
|
type GanttSpan,
|
|
59
71
|
type GanttZoom,
|
|
60
72
|
} from "./ganttMath";
|
|
73
|
+
import { Text } from "../Text";
|
|
61
74
|
|
|
62
75
|
// The chart canvas needs real scroll events to drive the pinned axis follower,
|
|
63
76
|
// but Tamagui's styled ScrollView does not deliver onScroll on native — use the
|
|
@@ -67,27 +80,12 @@ const CanvasScroller = (isWeb ? ScrollView : RNScrollView) as typeof ScrollView;
|
|
|
67
80
|
/**
|
|
68
81
|
* One drawn span on a Gantt row: a duration bar, or an open-ended one.
|
|
69
82
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* | `start` | `end` | drawn as |
|
|
75
|
-
* |---|---|---|
|
|
76
|
-
* | set | set | a capped bar between the two dates (inclusive whole days) |
|
|
77
|
-
* | set | absent | a bar from `start`, uncapped, running off the chart's end edge with a `»` |
|
|
78
|
-
* | absent | set | a bar to `end`, uncapped, running off the chart's start edge with a `«` |
|
|
79
|
-
* | absent | absent | a thin half-height RAIL across the whole chart, `«` and `»` at both ends |
|
|
80
|
-
*
|
|
81
|
-
* The rail is a different SHAPE on purpose. Painting an eternal span as a
|
|
82
|
-
* full-width BAR would put two capped edges on screen at the chart's own
|
|
83
|
-
* padding, and the reader would take that padding for a decision.
|
|
84
|
-
*
|
|
85
|
-
* Rescheduling needs both bounds. A span missing either one gets no drag
|
|
86
|
-
* session, no resize handles and no keyboard moves — there is no second
|
|
87
|
-
* edge to preserve a duration against. `progress` is likewise ignored on an
|
|
88
|
-
* open span: a percentage of an unknown duration says nothing.
|
|
83
|
+
* Missing bounds fade to the visible range edge. Date grips set or clear
|
|
84
|
+
* either bound through onIntervalChange. Whole-bar moves and progress
|
|
85
|
+
* require both dates because an open span has no known duration.
|
|
89
86
|
*/
|
|
90
87
|
export interface GanttTaskSpan {
|
|
88
|
+
ghost?: boolean;
|
|
91
89
|
/**
|
|
92
90
|
* Stable id, unique within the task. Used as the React key, the drag
|
|
93
91
|
* session key and the `data-gantt-bar` attribute. Optional: a row's spans
|
|
@@ -196,6 +194,8 @@ export interface GanttViewProps extends Omit<YStackProps, "children"> {
|
|
|
196
194
|
* resize (default: enabled when onItemMove is provided).
|
|
197
195
|
*/
|
|
198
196
|
enableItemDrag?: boolean;
|
|
197
|
+
onIntervalChange?: (task: GanttTask, range: GanttOpenSpan, span: GanttSpanRef) => void;
|
|
198
|
+
snapUnit?: GanttSnapUnit;
|
|
199
199
|
/** Whether data is loading (skeleton shows only while there are no tasks) */
|
|
200
200
|
isLoading?: boolean;
|
|
201
201
|
/**
|
|
@@ -415,7 +415,7 @@ function GanttBarLabel({ title, fill }: { title: string; fill: string }) {
|
|
|
415
415
|
const { knobProps } = useResolvedKnobs();
|
|
416
416
|
const ink = useReadableTextOn(fill);
|
|
417
417
|
return (
|
|
418
|
-
<
|
|
418
|
+
<TamaguiText
|
|
419
419
|
color={ink ?? "$color1"}
|
|
420
420
|
{...knobProps.label}
|
|
421
421
|
numberOfLines={1}
|
|
@@ -425,37 +425,73 @@ function GanttBarLabel({ title, fill }: { title: string; fill: string }) {
|
|
|
425
425
|
aria-hidden
|
|
426
426
|
>
|
|
427
427
|
{`${title}\u200b`}
|
|
428
|
-
</
|
|
428
|
+
</TamaguiText>
|
|
429
429
|
);
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
-
|
|
433
|
-
function GanttOpenEdgeMark({
|
|
432
|
+
function GanttIntervalFill({
|
|
434
433
|
fill,
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
434
|
+
openStart,
|
|
435
|
+
openEnd,
|
|
436
|
+
width,
|
|
437
|
+
rtl,
|
|
438
|
+
ghost,
|
|
438
439
|
}: {
|
|
439
440
|
fill: string;
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
441
|
+
openStart: boolean;
|
|
442
|
+
openEnd: boolean;
|
|
443
|
+
width: number;
|
|
444
|
+
rtl: boolean;
|
|
445
|
+
ghost: boolean;
|
|
443
446
|
}) {
|
|
444
447
|
const { knobProps } = useResolvedKnobs();
|
|
445
|
-
const
|
|
448
|
+
const theme = useTheme();
|
|
449
|
+
const color =
|
|
450
|
+
theme[fill]?.val ?? (fill.startsWith("$") ? getTokenValue(fill as any, "color") : fill);
|
|
451
|
+
const rgba = getRgba(String(color));
|
|
452
|
+
const clear = rgba ? `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, 0)` : "transparent";
|
|
453
|
+
const fadeWidth = Math.min(Number(knobProps.control.height), width / 2);
|
|
454
|
+
const leftOpen = rtl ? openEnd : openStart;
|
|
455
|
+
const rightOpen = rtl ? openStart : openEnd;
|
|
446
456
|
return (
|
|
447
|
-
<
|
|
457
|
+
<YStack
|
|
448
458
|
position="absolute"
|
|
449
|
-
{
|
|
450
|
-
{
|
|
451
|
-
|
|
452
|
-
|
|
459
|
+
top={0}
|
|
460
|
+
bottom={0}
|
|
461
|
+
left={0}
|
|
462
|
+
right={0}
|
|
453
463
|
pointerEvents="none"
|
|
454
|
-
|
|
455
|
-
|
|
464
|
+
opacity={ghost ? 0.25 : 1}
|
|
465
|
+
overflow="hidden"
|
|
466
|
+
{...knobProps.borderRadius}
|
|
456
467
|
>
|
|
457
|
-
|
|
458
|
-
|
|
468
|
+
<YStack
|
|
469
|
+
position="absolute"
|
|
470
|
+
top={0}
|
|
471
|
+
bottom={0}
|
|
472
|
+
left={leftOpen ? fadeWidth : 0}
|
|
473
|
+
right={rightOpen ? fadeWidth : 0}
|
|
474
|
+
backgroundColor={fill as any}
|
|
475
|
+
/>
|
|
476
|
+
{(["start", "end"] as const).map((edge) => {
|
|
477
|
+
if (edge === "start" ? !openStart : !openEnd) return null;
|
|
478
|
+
const left = (edge === "start") !== rtl;
|
|
479
|
+
return (
|
|
480
|
+
<LinearGradient
|
|
481
|
+
key={edge}
|
|
482
|
+
position="absolute"
|
|
483
|
+
top={0}
|
|
484
|
+
bottom={0}
|
|
485
|
+
{...(left ? { left: 0 } : { right: 0 })}
|
|
486
|
+
width={fadeWidth}
|
|
487
|
+
colors={left ? [clear, String(color)] : [String(color), clear]}
|
|
488
|
+
start={[0, 0]}
|
|
489
|
+
end={[1, 0]}
|
|
490
|
+
{...{ "data-gantt-open-fade": edge, [`data-gantt-open-${edge}`]: "true" }}
|
|
491
|
+
/>
|
|
492
|
+
);
|
|
493
|
+
})}
|
|
494
|
+
</YStack>
|
|
459
495
|
);
|
|
460
496
|
}
|
|
461
497
|
|
|
@@ -470,9 +506,13 @@ function GanttTaskName({
|
|
|
470
506
|
body: object;
|
|
471
507
|
}) {
|
|
472
508
|
return (
|
|
473
|
-
<
|
|
509
|
+
<TamaguiText
|
|
510
|
+
{...body}
|
|
511
|
+
numberOfLines={1}
|
|
512
|
+
color={selected ? componentColors.selection.ink : "$color"}
|
|
513
|
+
>
|
|
474
514
|
{title}
|
|
475
|
-
</
|
|
515
|
+
</TamaguiText>
|
|
476
516
|
);
|
|
477
517
|
}
|
|
478
518
|
|
|
@@ -544,6 +584,8 @@ export function GanttView({
|
|
|
544
584
|
onItemPress,
|
|
545
585
|
onItemMove,
|
|
546
586
|
enableItemDrag,
|
|
587
|
+
onIntervalChange,
|
|
588
|
+
snapUnit = "day",
|
|
547
589
|
isLoading = false,
|
|
548
590
|
error = null,
|
|
549
591
|
onRetry,
|
|
@@ -584,37 +626,15 @@ export function GanttView({
|
|
|
584
626
|
const [barKeyboardRing, setBarKeyboardRing] = useState(false);
|
|
585
627
|
|
|
586
628
|
// ── Knob-derived geometry (LC-18: size/space step the density) ──────────
|
|
587
|
-
const
|
|
588
|
-
const
|
|
589
|
-
|
|
590
|
-
const rowHeight = Math.max(MIN_PRESS_TARGET,
|
|
591
|
-
|
|
592
|
-
const
|
|
593
|
-
const
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
? 48
|
|
597
|
-
: sz === "$5"
|
|
598
|
-
? 80
|
|
599
|
-
: 64
|
|
600
|
-
: zoom === "week"
|
|
601
|
-
? sz === "$3"
|
|
602
|
-
? 18
|
|
603
|
-
: sz === "$5"
|
|
604
|
-
? 30
|
|
605
|
-
: 24
|
|
606
|
-
: sz === "$3"
|
|
607
|
-
? 6
|
|
608
|
-
: sz === "$5"
|
|
609
|
-
? 10
|
|
610
|
-
: 8;
|
|
611
|
-
const space = sizeTokenStop(knobProps.sizeToken);
|
|
612
|
-
const barInset = space === "small" ? 4 : space === "large" ? 9 : 6;
|
|
613
|
-
const barHeight = Math.max(10, rowHeight - barInset * 2);
|
|
614
|
-
// An eternal span is a RAIL, not a bar: half the height, no caps. The
|
|
615
|
-
// shape is the message — a full-width capped bar would put two chosen-
|
|
616
|
-
// looking edges on the chart's own padding.
|
|
617
|
-
const railHeight = Math.max(4, Math.round(barHeight / 2));
|
|
629
|
+
const controlHeight = Number(knobProps.control.height);
|
|
630
|
+
const controlGap = Number(knobProps.control.gap);
|
|
631
|
+
const height = heightProp ?? controlHeight * 12;
|
|
632
|
+
const rowHeight = Math.max(MIN_PRESS_TARGET, controlHeight + controlGap);
|
|
633
|
+
const axisHeight = controlHeight + controlGap;
|
|
634
|
+
const pxPerDay = controlHeight * (zoom === "day" ? 1.6 : zoom === "week" ? 0.6 : 0.2);
|
|
635
|
+
const barInset = controlGap;
|
|
636
|
+
const barHeight = rowHeight - barInset * 2;
|
|
637
|
+
const railHeight = barHeight / 2;
|
|
618
638
|
const transition = knobProps.motion.slide.transition;
|
|
619
639
|
// Layout props (left) only tween on web — the RN driver cannot animate
|
|
620
640
|
// layout, so native keeps committed jumps instant (Axiom 4 note).
|
|
@@ -658,6 +678,21 @@ export function GanttView({
|
|
|
658
678
|
const hScrollRef = useRef<any>(null);
|
|
659
679
|
const axisScrollRef = useRef<any>(null);
|
|
660
680
|
const canvasViewportRef = useRef<number | null>(null);
|
|
681
|
+
const [viewportMeasure, setViewportMeasure] = useState<{ offset: number; width: number | null }>({
|
|
682
|
+
offset: 0,
|
|
683
|
+
width: null,
|
|
684
|
+
});
|
|
685
|
+
const visibleWindow = intervalViewport(
|
|
686
|
+
viewportMeasure.offset,
|
|
687
|
+
viewportMeasure.width,
|
|
688
|
+
chartWidth,
|
|
689
|
+
rtl,
|
|
690
|
+
);
|
|
691
|
+
const [intervalPreview, setIntervalPreview] = useState<{
|
|
692
|
+
key: string;
|
|
693
|
+
span: GanttOpenSpan;
|
|
694
|
+
} | null>(null);
|
|
695
|
+
const intervalEditing = onIntervalChange !== undefined && enableItemDrag !== false;
|
|
661
696
|
// Re-anchor in either direction once the canvas viewport has been measured.
|
|
662
697
|
const pendingAnchorRef = useRef<Date | null>(null);
|
|
663
698
|
|
|
@@ -671,6 +706,7 @@ export function GanttView({
|
|
|
671
706
|
viewportWidth,
|
|
672
707
|
rtl,
|
|
673
708
|
});
|
|
709
|
+
setViewportMeasure((previous) => ({ ...previous, offset: x }));
|
|
674
710
|
hScrollRef.current?.scrollTo?.({ x, animated });
|
|
675
711
|
// Keep the pinned axis strip in step even where programmatic scrolls
|
|
676
712
|
// don't emit onScroll.
|
|
@@ -678,6 +714,26 @@ export function GanttView({
|
|
|
678
714
|
},
|
|
679
715
|
[range.start, pxPerDay, labelWidth, rtl, chartWidth],
|
|
680
716
|
);
|
|
717
|
+
const previousRange = useRef({ start: range.start, end: range.end, pxPerDay, rtl });
|
|
718
|
+
useLayoutEffect(() => {
|
|
719
|
+
const previous = previousRange.current;
|
|
720
|
+
previousRange.current = { start: range.start, end: range.end, pxPerDay, rtl };
|
|
721
|
+
if (previous.pxPerDay !== pxPerDay || previous.rtl !== rtl) return;
|
|
722
|
+
const delta = rtl ? dayDiff(previous.end, range.end) : dayDiff(range.start, previous.start);
|
|
723
|
+
if (!delta) return;
|
|
724
|
+
setViewportMeasure((measurement) => {
|
|
725
|
+
const offset = Math.max(
|
|
726
|
+
0,
|
|
727
|
+
Math.min(
|
|
728
|
+
measurement.offset + delta * pxPerDay,
|
|
729
|
+
Math.max(0, chartWidth - (measurement.width ?? 0)),
|
|
730
|
+
),
|
|
731
|
+
);
|
|
732
|
+
hScrollRef.current?.scrollTo?.({ x: offset, animated: false });
|
|
733
|
+
axisScrollRef.current?.scrollTo?.({ x: offset, animated: false });
|
|
734
|
+
return { ...measurement, offset };
|
|
735
|
+
});
|
|
736
|
+
}, [range.start, range.end, pxPerDay, rtl, chartWidth]);
|
|
681
737
|
const scrollToDateRef = useRef(scrollToDate);
|
|
682
738
|
scrollToDateRef.current = scrollToDate;
|
|
683
739
|
|
|
@@ -691,6 +747,7 @@ export function GanttView({
|
|
|
691
747
|
/** Canvas scroll drives the pinned axis strip (follower is not scrollable). */
|
|
692
748
|
const handleCanvasScroll = useCallback((event: any) => {
|
|
693
749
|
const x = event?.nativeEvent?.contentOffset?.x ?? 0;
|
|
750
|
+
setViewportMeasure((previous) => ({ ...previous, offset: x }));
|
|
694
751
|
axisScrollRef.current?.scrollTo?.({ x, animated: false });
|
|
695
752
|
}, []);
|
|
696
753
|
|
|
@@ -698,6 +755,7 @@ export function GanttView({
|
|
|
698
755
|
const width = event?.nativeEvent?.layout?.width;
|
|
699
756
|
if (typeof width !== "number" || !Number.isFinite(width) || width <= 0) return;
|
|
700
757
|
canvasViewportRef.current = width;
|
|
758
|
+
setViewportMeasure((previous) => ({ ...previous, width }));
|
|
701
759
|
const pending = pendingAnchorRef.current;
|
|
702
760
|
if (pending) {
|
|
703
761
|
pendingAnchorRef.current = null;
|
|
@@ -1251,10 +1309,21 @@ export function GanttView({
|
|
|
1251
1309
|
};
|
|
1252
1310
|
|
|
1253
1311
|
const renderBar = (task: GanttTask, ref: GanttSpanRef) => {
|
|
1254
|
-
const span =
|
|
1312
|
+
const span =
|
|
1313
|
+
intervalPreview?.key === ref.key ? { ...ref.span, ...intervalPreview.span } : ref.span;
|
|
1255
1314
|
const barKey = ref.key;
|
|
1256
1315
|
const bounded = boundedSpan(ref);
|
|
1257
1316
|
const geom = openBarGeometry(span, range, pxPerDay);
|
|
1317
|
+
const startX = intervalEdgeX(span, "start", range, pxPerDay, visibleWindow);
|
|
1318
|
+
const endX = intervalEdgeX(span, "end", range, pxPerDay, visibleWindow);
|
|
1319
|
+
const activeInterval = intervalPreview?.key === ref.key;
|
|
1320
|
+
const outsideWindow =
|
|
1321
|
+
endX <= visibleWindow.start || startX >= visibleWindow.end || endX <= startX;
|
|
1322
|
+
if ((geom.openStart || geom.openEnd) && (!outsideWindow || activeInterval)) {
|
|
1323
|
+
geom.x = startX;
|
|
1324
|
+
geom.width = Math.max(0, endX - startX);
|
|
1325
|
+
}
|
|
1326
|
+
const ghost = ref.span.ghost ?? task.ghost ?? false;
|
|
1258
1327
|
const activeDrag = drag && drag.key === barKey ? drag : null;
|
|
1259
1328
|
const dragging = activeDrag !== null;
|
|
1260
1329
|
const activeResize = resize && resize.key === barKey ? resize : null;
|
|
@@ -1289,7 +1358,7 @@ export function GanttView({
|
|
|
1289
1358
|
const fill = barColor ?? (barIntent && barIntent !== "accent" ? "$color9" : identity);
|
|
1290
1359
|
// Progress is a fraction of a DURATION; an open span has none, so a bar
|
|
1291
1360
|
// that claimed 40% of forever would be inventing the denominator.
|
|
1292
|
-
const progress = bounded ? clampProgress(span.progress ?? task.progress) : null;
|
|
1361
|
+
const progress = bounded && !ghost ? clampProgress(span.progress ?? task.progress) : null;
|
|
1293
1362
|
const showLabel = !geom.eternal && liveWidth >= 44;
|
|
1294
1363
|
const isBarFocused = focusedBarId === barKey;
|
|
1295
1364
|
const showHandles = hoveredId === task.id || sessionLive;
|
|
@@ -1299,8 +1368,6 @@ export function GanttView({
|
|
|
1299
1368
|
const physicalRightEdge: GanttResizeEdge = rtl ? "start" : "end";
|
|
1300
1369
|
// An open END is physically on the right in LTR and on the left in RTL —
|
|
1301
1370
|
// the chevron follows the mirror, and so does which glyph it is.
|
|
1302
|
-
const openStartSide = rtl ? { right: 2 } : { left: 2 };
|
|
1303
|
-
const openEndSide = rtl ? { left: 2 } : { right: 2 };
|
|
1304
1371
|
const squareStart = rtl
|
|
1305
1372
|
? { borderTopRightRadius: 0, borderBottomRightRadius: 0 }
|
|
1306
1373
|
: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 };
|
|
@@ -1339,7 +1406,10 @@ export function GanttView({
|
|
|
1339
1406
|
{...knobProps.borderRadius}
|
|
1340
1407
|
{...(geom.openStart ? squareStart : null)}
|
|
1341
1408
|
{...(geom.openEnd ? squareEnd : null)}
|
|
1342
|
-
backgroundColor=
|
|
1409
|
+
backgroundColor="transparent"
|
|
1410
|
+
{...(ghost
|
|
1411
|
+
? { borderStyle: "dashed", borderWidth: hairlineWidth, borderColor: fill as any }
|
|
1412
|
+
: {})}
|
|
1343
1413
|
// A rail reads as chrome, not as a duration somebody set.
|
|
1344
1414
|
opacity={sessionLive ? 0.85 : geom.eternal ? 0.55 : 1}
|
|
1345
1415
|
hoverStyle={{ opacity: sessionLive ? 0.85 : geom.eternal ? 0.7 : 0.9 }}
|
|
@@ -1358,7 +1428,11 @@ export function GanttView({
|
|
|
1358
1428
|
)}
|
|
1359
1429
|
role="button"
|
|
1360
1430
|
tabIndex={0}
|
|
1361
|
-
aria-label={
|
|
1431
|
+
aria-label={
|
|
1432
|
+
ghost
|
|
1433
|
+
? `${spanAccessibleName(barTitle, span)}, ${t("Proposed")}`
|
|
1434
|
+
: spanAccessibleName(barTitle, span)
|
|
1435
|
+
}
|
|
1362
1436
|
// LC-71: one ring on the bar (the perceived control), keyboard-only.
|
|
1363
1437
|
{...(isBarFocused && barKeyboardRing ? keyboardFocusRingProps : { outlineWidth: 0 })}
|
|
1364
1438
|
onFocus={() => {
|
|
@@ -1390,7 +1464,7 @@ export function GanttView({
|
|
|
1390
1464
|
}
|
|
1391
1465
|
}) as any
|
|
1392
1466
|
}
|
|
1393
|
-
{...{ "data-gantt-bar": barKey }}
|
|
1467
|
+
{...{ "data-gantt-bar": barKey, "data-gantt-ghost": ghost ? "true" : undefined }}
|
|
1394
1468
|
{...(geom.eternal ? { "data-gantt-rail": "true" } : null)}
|
|
1395
1469
|
{...(geom.openStart || geom.openEnd
|
|
1396
1470
|
? {
|
|
@@ -1409,6 +1483,14 @@ export function GanttView({
|
|
|
1409
1483
|
}
|
|
1410
1484
|
}
|
|
1411
1485
|
>
|
|
1486
|
+
<GanttIntervalFill
|
|
1487
|
+
fill={fill}
|
|
1488
|
+
openStart={geom.openStart}
|
|
1489
|
+
openEnd={geom.openEnd}
|
|
1490
|
+
width={liveWidth}
|
|
1491
|
+
rtl={rtl}
|
|
1492
|
+
ghost={ghost}
|
|
1493
|
+
/>
|
|
1412
1494
|
{progress != null && progress > 0 && (
|
|
1413
1495
|
<YStack
|
|
1414
1496
|
position="absolute"
|
|
@@ -1422,20 +1504,14 @@ export function GanttView({
|
|
|
1422
1504
|
{...{ "data-gantt-progress": String(progress) }}
|
|
1423
1505
|
/>
|
|
1424
1506
|
)}
|
|
1425
|
-
{showLabel &&
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
edge="start"
|
|
1434
|
-
/>
|
|
1435
|
-
)}
|
|
1436
|
-
{geom.openEnd && (
|
|
1437
|
-
<GanttOpenEdgeMark fill={fill} glyph={rtl ? "«" : "»"} side={openEndSide} edge="end" />
|
|
1438
|
-
)}
|
|
1507
|
+
{showLabel &&
|
|
1508
|
+
(ghost ? (
|
|
1509
|
+
<Text {...knobProps.label} color="$color" numberOfLines={1} pointerEvents="none">
|
|
1510
|
+
{barTitle}
|
|
1511
|
+
</Text>
|
|
1512
|
+
) : (
|
|
1513
|
+
<GanttBarLabel title={barTitle} fill={fill} />
|
|
1514
|
+
))}
|
|
1439
1515
|
|
|
1440
1516
|
{/* Live date label while dragging (honest preview of the commit). */}
|
|
1441
1517
|
{previewSpan && (
|
|
@@ -1452,14 +1528,14 @@ export function GanttView({
|
|
|
1452
1528
|
zIndex={4}
|
|
1453
1529
|
{...{ "data-gantt-drag-label": "true" }}
|
|
1454
1530
|
>
|
|
1455
|
-
<
|
|
1531
|
+
<TamaguiText {...knobProps.label} color="$color" numberOfLines={1}>
|
|
1456
1532
|
{formatSpanLabel(previewSpan)}
|
|
1457
|
-
</
|
|
1533
|
+
</TamaguiText>
|
|
1458
1534
|
</XStack>
|
|
1459
1535
|
)}
|
|
1460
1536
|
|
|
1461
1537
|
{/* Edge-resize handles (web pointer; native resize deferred). */}
|
|
1462
|
-
{webDragEnabled && handleWidth > 0 && (
|
|
1538
|
+
{webDragEnabled && !intervalEditing && handleWidth > 0 && (
|
|
1463
1539
|
<>
|
|
1464
1540
|
<YStack
|
|
1465
1541
|
position="absolute"
|
|
@@ -1503,12 +1579,60 @@ export function GanttView({
|
|
|
1503
1579
|
/>
|
|
1504
1580
|
)}
|
|
1505
1581
|
</YStack>
|
|
1582
|
+
{intervalEditing &&
|
|
1583
|
+
(["start", "end"] as const).map((edge) => {
|
|
1584
|
+
const edgeX = intervalEdgeX(span, edge, range, pxPerDay, visibleWindow);
|
|
1585
|
+
if (
|
|
1586
|
+
!activeInterval &&
|
|
1587
|
+
(outsideWindow || edgeX < visibleWindow.start || edgeX > visibleWindow.end)
|
|
1588
|
+
)
|
|
1589
|
+
return null;
|
|
1590
|
+
return (
|
|
1591
|
+
<GanttDateGrip
|
|
1592
|
+
key={`${ref.key}-${edge}`}
|
|
1593
|
+
span={ref.span}
|
|
1594
|
+
displayX={edgeX}
|
|
1595
|
+
edge={edge}
|
|
1596
|
+
range={range}
|
|
1597
|
+
viewport={visibleWindow}
|
|
1598
|
+
pxPerDay={pxPerDay}
|
|
1599
|
+
rowHeight={rowHeight}
|
|
1600
|
+
chartWidth={chartWidth}
|
|
1601
|
+
rtl={rtl}
|
|
1602
|
+
snapUnit={snapUnit}
|
|
1603
|
+
firstDayOfWeek={firstDayOfWeek}
|
|
1604
|
+
label={`${barTitle}: ${edge === "start" ? t("Start") : t("End")}`}
|
|
1605
|
+
valueText={
|
|
1606
|
+
span[edge]
|
|
1607
|
+
? formatAbsoluteDate(span[edge]!)
|
|
1608
|
+
: edge === "start"
|
|
1609
|
+
? t("No start")
|
|
1610
|
+
: t("No end")
|
|
1611
|
+
}
|
|
1612
|
+
onPreview={(next) =>
|
|
1613
|
+
setIntervalPreview((previous) =>
|
|
1614
|
+
next
|
|
1615
|
+
? { key: ref.key, span: next }
|
|
1616
|
+
: previous?.key === ref.key
|
|
1617
|
+
? null
|
|
1618
|
+
: previous,
|
|
1619
|
+
)
|
|
1620
|
+
}
|
|
1621
|
+
onCommit={(next) => {
|
|
1622
|
+
suppressNextClick();
|
|
1623
|
+
onIntervalChange?.(task, next, ref);
|
|
1624
|
+
setAnnouncement(spanAccessibleName(barTitle, next));
|
|
1625
|
+
}}
|
|
1626
|
+
/>
|
|
1627
|
+
);
|
|
1628
|
+
})}
|
|
1506
1629
|
</BarIntentWrap>
|
|
1507
1630
|
);
|
|
1508
1631
|
};
|
|
1509
1632
|
|
|
1510
1633
|
// ── Render ────────────────────────────────────────────────────────────────
|
|
1511
|
-
const scrollLocked =
|
|
1634
|
+
const scrollLocked =
|
|
1635
|
+
drag !== null || resize !== null || markerDragging || intervalPreview !== null;
|
|
1512
1636
|
const majorGridColor = "$borderColor";
|
|
1513
1637
|
const minorGridColor = componentColors.divider;
|
|
1514
1638
|
// Manual mirroring owns RTL inside the horizontal scrollers: force their
|
|
@@ -1598,9 +1722,9 @@ export function GanttView({
|
|
|
1598
1722
|
borderColor="$borderColor"
|
|
1599
1723
|
{...{ backgroundColor: componentColors.surface.background }}
|
|
1600
1724
|
>
|
|
1601
|
-
<
|
|
1725
|
+
<TamaguiText {...knobProps.label} color={knobProps.textAccentColor} numberOfLines={1}>
|
|
1602
1726
|
{t("Task")}
|
|
1603
|
-
</
|
|
1727
|
+
</TamaguiText>
|
|
1604
1728
|
</XStack>
|
|
1605
1729
|
<ScrollView
|
|
1606
1730
|
ref={axisScrollRef}
|
|
@@ -1646,7 +1770,7 @@ export function GanttView({
|
|
|
1646
1770
|
)}
|
|
1647
1771
|
{months.map((band) =>
|
|
1648
1772
|
band.width < 36 ? null : (
|
|
1649
|
-
<
|
|
1773
|
+
<TamaguiText
|
|
1650
1774
|
key={band.key}
|
|
1651
1775
|
position="absolute"
|
|
1652
1776
|
{...(rtl ? { right: band.x + 4 } : { left: band.x + 4 })}
|
|
@@ -1657,11 +1781,11 @@ export function GanttView({
|
|
|
1657
1781
|
numberOfLines={1}
|
|
1658
1782
|
>
|
|
1659
1783
|
{band.label}
|
|
1660
|
-
</
|
|
1784
|
+
</TamaguiText>
|
|
1661
1785
|
),
|
|
1662
1786
|
)}
|
|
1663
1787
|
{ticks.map((tick) => (
|
|
1664
|
-
<
|
|
1788
|
+
<TamaguiText
|
|
1665
1789
|
key={tick.date.toISOString()}
|
|
1666
1790
|
position="absolute"
|
|
1667
1791
|
{...(rtl ? { right: tick.x + 4 } : { left: tick.x + 4 })}
|
|
@@ -1671,7 +1795,7 @@ export function GanttView({
|
|
|
1671
1795
|
numberOfLines={1}
|
|
1672
1796
|
>
|
|
1673
1797
|
{formatDayOfMonth(tick.date)}
|
|
1674
|
-
</
|
|
1798
|
+
</TamaguiText>
|
|
1675
1799
|
))}
|
|
1676
1800
|
<YStack
|
|
1677
1801
|
position="absolute"
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { act, createElement, type ComponentProps } from "react";
|
|
2
|
+
import { cleanup, render } from "@testing-library/react";
|
|
3
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
4
|
+
|
|
5
|
+
const hosts = vi.hoisted(() => ({ props: {} as Record<string, any> }));
|
|
6
|
+
vi.mock("react-native-web", () => ({
|
|
7
|
+
View: (props: Record<string, any>) => {
|
|
8
|
+
hosts.props = props;
|
|
9
|
+
return createElement("div", null, props.children);
|
|
10
|
+
},
|
|
11
|
+
}));
|
|
12
|
+
vi.mock("tamagui", () => ({
|
|
13
|
+
isWeb: false,
|
|
14
|
+
YStack: ({ children }: any) => createElement("div", null, children),
|
|
15
|
+
}));
|
|
16
|
+
vi.mock("@multiplatform.one/theme", () => ({
|
|
17
|
+
MIN_PRESS_TARGET: 44,
|
|
18
|
+
hairlineWidth: 1,
|
|
19
|
+
keyboardFocusRingProps: {},
|
|
20
|
+
useResolvedKnobs: () => ({
|
|
21
|
+
knobProps: { controlIcon: { width: 16, height: 16 }, containerRadius: {}, inputSurface: {} },
|
|
22
|
+
}),
|
|
23
|
+
}));
|
|
24
|
+
const { GanttDateGrip } = await import("./GanttDateGrip");
|
|
25
|
+
afterEach(cleanup);
|
|
26
|
+
const day = (n: number) => new Date(2026, 2, n);
|
|
27
|
+
|
|
28
|
+
function setup(overrides: Partial<ComponentProps<typeof GanttDateGrip>> = {}) {
|
|
29
|
+
const onCommit = vi.fn();
|
|
30
|
+
const onPreview = vi.fn();
|
|
31
|
+
const result = render(
|
|
32
|
+
<GanttDateGrip
|
|
33
|
+
span={{ start: day(5) }}
|
|
34
|
+
edge="end"
|
|
35
|
+
displayX={720}
|
|
36
|
+
range={{ start: day(1), end: day(31) }}
|
|
37
|
+
viewport={{ start: 0, end: 720 }}
|
|
38
|
+
pxPerDay={24}
|
|
39
|
+
rowHeight={48}
|
|
40
|
+
chartWidth={720}
|
|
41
|
+
rtl={false}
|
|
42
|
+
snapUnit="day"
|
|
43
|
+
firstDayOfWeek={0}
|
|
44
|
+
label="Policy: End"
|
|
45
|
+
valueText="No end"
|
|
46
|
+
onCommit={onCommit}
|
|
47
|
+
onPreview={onPreview}
|
|
48
|
+
{...overrides}
|
|
49
|
+
/>,
|
|
50
|
+
);
|
|
51
|
+
const call = (name: string, x = 0) => act(() => hosts.props[name]({ nativeEvent: { pageX: x } }));
|
|
52
|
+
return { ...result, onCommit, onPreview, call };
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
describe("native date grip responder", () => {
|
|
56
|
+
it("keeps the last date before the glyph reaches the edge", () => {
|
|
57
|
+
const { call, onCommit } = setup({ span: { start: day(5), end: day(20) }, displayX: 480 });
|
|
58
|
+
call("onResponderGrant", 488);
|
|
59
|
+
call("onResponderMove", 711);
|
|
60
|
+
call("onResponderRelease", 711);
|
|
61
|
+
expect(onCommit).toHaveBeenCalledWith({ start: day(5), end: day(29) });
|
|
62
|
+
});
|
|
63
|
+
it("allows inward movement for a bound already in the edge zone", () => {
|
|
64
|
+
const { call, onCommit } = setup({
|
|
65
|
+
span: { start: day(5), end: day(29) },
|
|
66
|
+
displayX: 696,
|
|
67
|
+
viewport: { start: 0, end: 710 },
|
|
68
|
+
});
|
|
69
|
+
call("onResponderGrant", 700);
|
|
70
|
+
call("onResponderMove", 676);
|
|
71
|
+
call("onResponderRelease", 676);
|
|
72
|
+
expect(onCommit).toHaveBeenCalledWith({ start: day(5), end: day(28) });
|
|
73
|
+
});
|
|
74
|
+
it.each([false, true])("reopens either bound at the visible glyph edge, rtl=%s", (rtl) => {
|
|
75
|
+
for (const edge of ["start", "end"] as const) {
|
|
76
|
+
const span = { start: day(3), end: day(28) };
|
|
77
|
+
const logicalX = edge === "start" ? 48 : 672;
|
|
78
|
+
const glyphX = logicalX + (edge === "start" ? -8 : 8);
|
|
79
|
+
const edgeX = edge === "start" ? 8 : 712;
|
|
80
|
+
const physical = (x: number) => (rtl ? 720 - x : x);
|
|
81
|
+
const { call, onCommit, unmount } = setup({ span, edge, displayX: logicalX, rtl });
|
|
82
|
+
call("onResponderGrant", physical(glyphX));
|
|
83
|
+
call("onResponderMove", physical(edgeX));
|
|
84
|
+
call("onResponderRelease", physical(edgeX));
|
|
85
|
+
expect(onCommit).toHaveBeenCalledWith({ ...span, [edge]: undefined });
|
|
86
|
+
unmount();
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
it("locks on grant, tracks touch and commits the optional bound on release", () => {
|
|
91
|
+
const { call, onCommit, onPreview } = setup();
|
|
92
|
+
expect(hosts.props.onStartShouldSetResponder()).toBe(true);
|
|
93
|
+
call("onResponderGrant", 300);
|
|
94
|
+
expect(onPreview).toHaveBeenCalledWith({ start: day(5) });
|
|
95
|
+
expect(hosts.props.onResponderTerminationRequest()).toBe(false);
|
|
96
|
+
call("onResponderMove", 252);
|
|
97
|
+
call("onResponderRelease", 252);
|
|
98
|
+
expect(onCommit).toHaveBeenCalledWith({ start: day(5), end: day(28) });
|
|
99
|
+
expect(onPreview).toHaveBeenLastCalledWith(null);
|
|
100
|
+
});
|
|
101
|
+
it("cancels termination and leaves a stationary press unchanged", () => {
|
|
102
|
+
const { call, onCommit } = setup();
|
|
103
|
+
call("onResponderGrant", 300);
|
|
104
|
+
call("onResponderMove", 252);
|
|
105
|
+
call("onResponderTerminate");
|
|
106
|
+
expect(onCommit).not.toHaveBeenCalled();
|
|
107
|
+
call("onResponderGrant", 300);
|
|
108
|
+
call("onResponderRelease", 300);
|
|
109
|
+
expect(onCommit).not.toHaveBeenCalled();
|
|
110
|
+
});
|
|
111
|
+
it("does not commit a drag that returns to its original edge", () => {
|
|
112
|
+
const { call, onCommit } = setup();
|
|
113
|
+
call("onResponderGrant", 300);
|
|
114
|
+
call("onResponderMove", 252);
|
|
115
|
+
call("onResponderRelease", 300);
|
|
116
|
+
expect(onCommit).not.toHaveBeenCalled();
|
|
117
|
+
});
|
|
118
|
+
});
|