@multiplatform.one/components 6.1.0 → 6.4.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/README.md +70 -0
- package/dist/cjs/Accordion/index.cjs +332 -0
- package/dist/cjs/Accordion/index.native.js +353 -0
- package/dist/cjs/Accordion/index.native.js.map +1 -0
- package/dist/cjs/Alert/index.cjs +217 -0
- package/dist/cjs/Alert/index.native.js +233 -0
- package/dist/cjs/Alert/index.native.js.map +1 -0
- package/dist/cjs/Avatar/getInitials.cjs +38 -0
- package/dist/cjs/Avatar/getInitials.native.js +42 -0
- package/dist/cjs/Avatar/getInitials.native.js.map +1 -0
- package/dist/cjs/Avatar/index.cjs +119 -0
- package/dist/cjs/Avatar/index.native.js +129 -0
- package/dist/cjs/Avatar/index.native.js.map +1 -0
- package/dist/cjs/Badge/index.cjs +42 -9
- package/dist/cjs/Badge/index.native.js +45 -10
- package/dist/cjs/Badge/index.native.js.map +1 -1
- package/dist/cjs/Carousel/index.cjs +86 -28
- package/dist/cjs/Carousel/index.native.js +86 -28
- package/dist/cjs/Carousel/index.native.js.map +1 -1
- package/dist/cjs/Chip/index.cjs +4 -1
- package/dist/cjs/Chip/index.native.js +4 -1
- package/dist/cjs/Chip/index.native.js.map +1 -1
- package/dist/cjs/DotIndicator/index.cjs +81 -12
- package/dist/cjs/DotIndicator/index.native.js +85 -14
- package/dist/cjs/DotIndicator/index.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/index.cjs +507 -0
- package/dist/cjs/DropdownMenu/index.native.js +537 -0
- package/dist/cjs/DropdownMenu/index.native.js.map +1 -0
- package/dist/cjs/ErrorBoundary/index.cjs +20 -9
- package/dist/cjs/ErrorBoundary/index.native.js +23 -11
- package/dist/cjs/ErrorBoundary/index.native.js.map +1 -1
- package/dist/cjs/Pagination.cjs +198 -18
- package/dist/cjs/Pagination.native.js +220 -18
- package/dist/cjs/Pagination.native.js.map +1 -1
- package/dist/cjs/ProgressSteps/index.cjs +239 -0
- package/dist/cjs/ProgressSteps/index.native.js +249 -0
- package/dist/cjs/ProgressSteps/index.native.js.map +1 -0
- package/dist/cjs/Quote/index.cjs +90 -0
- package/dist/cjs/Quote/index.native.js +100 -0
- package/dist/cjs/Quote/index.native.js.map +1 -0
- package/dist/cjs/SheetModal/index.cjs +67 -0
- package/dist/cjs/SheetModal/index.native.js +143 -0
- package/dist/cjs/SheetModal/index.native.js.map +1 -0
- package/dist/cjs/SkipLink/index.cjs +134 -0
- package/dist/cjs/SkipLink/index.native.js +156 -0
- package/dist/cjs/SkipLink/index.native.js.map +1 -0
- package/dist/cjs/Tabs/index.cjs +409 -0
- package/dist/cjs/Tabs/index.native.js +446 -0
- package/dist/cjs/Tabs/index.native.js.map +1 -0
- package/dist/cjs/Toast/index.cjs +422 -0
- package/dist/cjs/Toast/index.native.js +447 -0
- package/dist/cjs/Toast/index.native.js.map +1 -0
- package/dist/cjs/Toast/store.cjs +106 -0
- package/dist/cjs/Toast/store.native.js +179 -0
- package/dist/cjs/Toast/store.native.js.map +1 -0
- package/dist/cjs/Tooltip/index.cjs +58 -1
- package/dist/cjs/Tooltip/index.native.js +51 -2
- package/dist/cjs/Tooltip/index.native.js.map +1 -1
- package/dist/cjs/Video/VideoFrame.cjs +46 -0
- package/dist/cjs/Video/VideoFrame.native.js +50 -0
- package/dist/cjs/Video/VideoFrame.native.js.map +1 -0
- package/dist/cjs/Video/index.cjs +72 -0
- package/dist/cjs/Video/index.native.js +172 -0
- package/dist/cjs/Video/index.native.js.map +1 -0
- package/dist/cjs/Video/types.cjs +18 -0
- package/dist/cjs/Video/types.native.js +21 -0
- package/dist/cjs/Video/types.native.js.map +1 -0
- package/dist/cjs/Wheel/index.cjs +603 -2
- package/dist/cjs/Wheel/index.native.js +626 -2
- package/dist/cjs/Wheel/index.native.js.map +1 -1
- package/dist/cjs/actions/ActionBar.cjs +148 -0
- package/dist/cjs/actions/ActionBar.native.js +154 -0
- package/dist/cjs/actions/ActionBar.native.js.map +1 -0
- package/dist/cjs/actions/DestructiveAction.cjs +216 -0
- package/dist/cjs/actions/DestructiveAction.native.js +227 -0
- package/dist/cjs/actions/DestructiveAction.native.js.map +1 -0
- package/dist/cjs/actions/devWarn.cjs +38 -0
- package/dist/cjs/actions/devWarn.native.js +42 -0
- package/dist/cjs/actions/devWarn.native.js.map +1 -0
- package/dist/cjs/actions/index.cjs +39 -0
- package/dist/cjs/actions/index.native.js +42 -0
- package/dist/cjs/actions/index.native.js.map +1 -0
- package/dist/cjs/actions/severity.cjs +42 -0
- package/dist/cjs/actions/severity.native.js +46 -0
- package/dist/cjs/actions/severity.native.js.map +1 -0
- package/dist/cjs/charts/Axis.cjs +152 -0
- package/dist/cjs/charts/Axis.native.js +159 -0
- package/dist/cjs/charts/Axis.native.js.map +1 -0
- package/dist/cjs/charts/BarChart.cjs +132 -0
- package/dist/cjs/charts/BarChart.native.js +150 -0
- package/dist/cjs/charts/BarChart.native.js.map +1 -0
- package/dist/cjs/charts/ChartSurface.cjs +73 -0
- package/dist/cjs/charts/ChartSurface.native.js +79 -0
- package/dist/cjs/charts/ChartSurface.native.js.map +1 -0
- package/dist/cjs/charts/LineChart.cjs +152 -0
- package/dist/cjs/charts/LineChart.native.js +173 -0
- package/dist/cjs/charts/LineChart.native.js.map +1 -0
- package/dist/cjs/charts/PieChart.cjs +152 -0
- package/dist/cjs/charts/PieChart.native.js +166 -0
- package/dist/cjs/charts/PieChart.native.js.map +1 -0
- package/dist/cjs/charts/Sparkline.cjs +103 -0
- package/dist/cjs/charts/Sparkline.native.js +116 -0
- package/dist/cjs/charts/Sparkline.native.js.map +1 -0
- package/dist/cjs/charts/accessibility.cjs +62 -0
- package/dist/cjs/charts/accessibility.native.js +86 -0
- package/dist/cjs/charts/accessibility.native.js.map +1 -0
- package/dist/cjs/charts/composeChart.cjs +69 -0
- package/dist/cjs/charts/composeChart.native.js +79 -0
- package/dist/cjs/charts/composeChart.native.js.map +1 -0
- package/dist/cjs/charts/index.cjs +66 -0
- package/dist/cjs/charts/index.native.js +69 -0
- package/dist/cjs/charts/index.native.js.map +1 -0
- package/dist/cjs/charts/math.cjs +145 -0
- package/dist/cjs/charts/math.native.js +170 -0
- package/dist/cjs/charts/math.native.js.map +1 -0
- package/dist/cjs/charts/series.cjs +180 -0
- package/dist/cjs/charts/series.native.js +199 -0
- package/dist/cjs/charts/series.native.js.map +1 -0
- package/dist/cjs/charts/svg.cjs +94 -0
- package/dist/cjs/charts/svg.native.js +97 -0
- package/dist/cjs/charts/svg.native.js.map +1 -0
- package/dist/cjs/charts/types.cjs +18 -0
- package/dist/cjs/charts/types.native.js +21 -0
- package/dist/cjs/charts/types.native.js.map +1 -0
- package/dist/cjs/charts/useChartTheme.cjs +97 -0
- package/dist/cjs/charts/useChartTheme.native.js +106 -0
- package/dist/cjs/charts/useChartTheme.native.js.map +1 -0
- package/dist/cjs/code/Code/index.cjs +22 -4
- package/dist/cjs/code/Code/index.native.js +22 -4
- package/dist/cjs/code/Code/index.native.js.map +1 -1
- package/dist/cjs/code/CodeBlock/index.cjs +14 -7
- package/dist/cjs/code/CodeBlock/index.native.js +14 -7
- package/dist/cjs/code/CodeBlock/index.native.js.map +1 -1
- package/dist/cjs/code/HighlightedCode/index.cjs +9 -8
- package/dist/cjs/code/HighlightedCode/index.native.js +12 -8
- package/dist/cjs/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/cjs/code/Highlighter/index.cjs +24 -7
- package/dist/cjs/code/Highlighter/index.native.js +27 -7
- package/dist/cjs/code/Highlighter/index.native.js.map +1 -1
- package/dist/cjs/componentColors.cjs +25 -13
- package/dist/cjs/componentColors.native.js +25 -13
- package/dist/cjs/componentColors.native.js.map +1 -1
- package/dist/cjs/feedback/ConfirmDialog.cjs +140 -0
- package/dist/cjs/feedback/ConfirmDialog.native.js +154 -0
- package/dist/cjs/feedback/ConfirmDialog.native.js.map +1 -0
- package/dist/cjs/feedback/NotifyHost.cjs +134 -0
- package/dist/cjs/feedback/NotifyHost.native.js +166 -0
- package/dist/cjs/feedback/NotifyHost.native.js.map +1 -0
- package/dist/cjs/feedback/index.cjs +42 -0
- package/dist/cjs/feedback/index.native.js +45 -0
- package/dist/cjs/feedback/index.native.js.map +1 -0
- package/dist/cjs/feedback/notify.cjs +69 -0
- package/dist/cjs/feedback/notify.native.js +72 -0
- package/dist/cjs/feedback/notify.native.js.map +1 -0
- package/dist/cjs/feedback/route.cjs +92 -0
- package/dist/cjs/feedback/route.native.js +97 -0
- package/dist/cjs/feedback/route.native.js.map +1 -0
- package/dist/cjs/feedback/store.cjs +76 -0
- package/dist/cjs/feedback/store.native.js +107 -0
- package/dist/cjs/feedback/store.native.js.map +1 -0
- package/dist/cjs/hooks/index.cjs +3 -1
- package/dist/cjs/hooks/index.native.js +2 -0
- package/dist/cjs/hooks/index.native.js.map +1 -1
- package/dist/cjs/hooks/useClipboard.cjs +10 -5
- package/dist/cjs/hooks/useClipboard.native.js +12 -5
- package/dist/cjs/hooks/useClipboard.native.js.map +1 -1
- package/dist/cjs/hooks/useDirection.cjs +53 -0
- package/dist/cjs/hooks/useDirection.native.js +34 -0
- package/dist/cjs/hooks/useDirection.native.js.map +1 -0
- package/dist/cjs/hooks/useDocumentTitle.cjs +49 -0
- package/dist/cjs/hooks/useDocumentTitle.native.js +61 -0
- package/dist/cjs/hooks/useDocumentTitle.native.js.map +1 -0
- package/dist/cjs/icons/index.cjs +2 -1
- package/dist/cjs/icons/index.native.js +1 -0
- package/dist/cjs/icons/index.native.js.map +1 -1
- package/dist/cjs/icons/lucide.cjs +34 -0
- package/dist/cjs/icons/lucide.native.js +37 -0
- package/dist/cjs/icons/lucide.native.js.map +1 -0
- package/dist/cjs/images/Image/index.cjs +10 -0
- package/dist/cjs/index.cjs +40 -2
- package/dist/cjs/index.native.js +40 -2
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/layouts/AsyncBoundary.cjs +347 -0
- package/dist/cjs/layouts/AsyncBoundary.native.js +374 -0
- package/dist/cjs/layouts/AsyncBoundary.native.js.map +1 -0
- package/dist/cjs/layouts/PageTemplates.cjs +141 -0
- package/dist/cjs/layouts/PageTemplates.native.js +148 -0
- package/dist/cjs/layouts/PageTemplates.native.js.map +1 -0
- package/dist/cjs/layouts/PaneScaffold.cjs +157 -0
- package/dist/cjs/layouts/PaneScaffold.native.js +167 -0
- package/dist/cjs/layouts/PaneScaffold.native.js.map +1 -0
- package/dist/cjs/layouts/ViewSwitcher.cjs +68 -11
- package/dist/cjs/layouts/ViewSwitcher.native.js +81 -11
- package/dist/cjs/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/cjs/layouts/attachments.cjs +130 -33
- package/dist/cjs/layouts/attachments.native.js +147 -34
- package/dist/cjs/layouts/attachments.native.js.map +1 -1
- package/dist/cjs/layouts/breadcrumbs.cjs +62 -29
- package/dist/cjs/layouts/breadcrumbs.native.js +70 -32
- package/dist/cjs/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/cjs/layouts/index.cjs +19 -1
- package/dist/cjs/layouts/index.native.js +18 -0
- package/dist/cjs/layouts/index.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +132 -27
- package/dist/cjs/layouts/page.native.js +150 -28
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/pageHeadingScope.cjs +74 -0
- package/dist/cjs/layouts/pageHeadingScope.native.js +80 -0
- package/dist/cjs/layouts/pageHeadingScope.native.js.map +1 -0
- package/dist/cjs/layouts/sidebar.cjs +48 -10
- package/dist/cjs/layouts/sidebar.native.js +70 -10
- package/dist/cjs/layouts/sidebar.native.js.map +1 -1
- package/dist/cjs/layouts/tags.cjs +86 -88
- package/dist/cjs/layouts/tags.native.js +103 -91
- package/dist/cjs/layouts/tags.native.js.map +1 -1
- package/dist/cjs/layouts/timeline.cjs +503 -183
- package/dist/cjs/layouts/timeline.native.js +611 -186
- package/dist/cjs/layouts/timeline.native.js.map +1 -1
- package/dist/cjs/layouts/toolbar.cjs +111 -35
- package/dist/cjs/layouts/toolbar.native.js +172 -38
- package/dist/cjs/layouts/toolbar.native.js.map +1 -1
- package/dist/cjs/shared/actionScan.cjs +53 -0
- package/dist/cjs/shared/actionScan.native.js +56 -0
- package/dist/cjs/shared/actionScan.native.js.map +1 -0
- package/dist/cjs/shared/t.cjs +36 -0
- package/dist/cjs/shared/t.native.js +41 -0
- package/dist/cjs/shared/t.native.js.map +1 -0
- package/dist/cjs/shared/useReturnFocusOnClose.cjs +56 -0
- package/dist/cjs/shared/useReturnFocusOnClose.native.js +63 -0
- package/dist/cjs/shared/useReturnFocusOnClose.native.js.map +1 -0
- package/dist/cjs/surfaces.cjs +68 -27
- package/dist/cjs/surfaces.native.js +67 -26
- package/dist/cjs/surfaces.native.js.map +1 -1
- package/dist/cjs/tamagui.cjs +94 -0
- package/dist/cjs/tamagui.native.js +97 -0
- package/dist/cjs/tamagui.native.js.map +1 -0
- package/dist/cjs/views/Calendar.cjs +1547 -155
- package/dist/cjs/views/Calendar.native.js +1713 -180
- package/dist/cjs/views/Calendar.native.js.map +1 -1
- package/dist/cjs/views/Dashboard.cjs +108 -303
- package/dist/cjs/views/Dashboard.native.js +113 -327
- package/dist/cjs/views/Dashboard.native.js.map +1 -1
- package/dist/cjs/views/Gantt.cjs +882 -0
- package/dist/cjs/views/Gantt.native.js +980 -0
- package/dist/cjs/views/Gantt.native.js.map +1 -0
- package/dist/cjs/views/ImageGrid.cjs +131 -64
- package/dist/cjs/views/ImageGrid.native.js +143 -65
- package/dist/cjs/views/ImageGrid.native.js.map +1 -1
- package/dist/cjs/views/Kanban.cjs +840 -41
- package/dist/cjs/views/Kanban.native.js +688 -58
- package/dist/cjs/views/Kanban.native.js.map +1 -1
- package/dist/cjs/views/List.cjs +33 -26
- package/dist/cjs/views/List.native.js +39 -26
- package/dist/cjs/views/List.native.js.map +1 -1
- package/dist/cjs/views/ReportBuilder.cjs +63 -61
- package/dist/cjs/views/ReportBuilder.native.js +69 -65
- package/dist/cjs/views/ReportBuilder.native.js.map +1 -1
- package/dist/cjs/views/TreeView.cjs +830 -80
- package/dist/cjs/views/TreeView.native.js +912 -91
- package/dist/cjs/views/TreeView.native.js.map +1 -1
- package/dist/cjs/views/calendarMath.cjs +154 -0
- package/dist/cjs/views/calendarMath.native.js +203 -0
- package/dist/cjs/views/calendarMath.native.js.map +1 -0
- package/dist/cjs/views/ganttMath.cjs +239 -0
- package/dist/cjs/views/ganttMath.native.js +266 -0
- package/dist/cjs/views/ganttMath.native.js.map +1 -0
- package/dist/cjs/views/index.cjs +30 -2
- package/dist/cjs/views/index.native.js +29 -1
- package/dist/cjs/views/index.native.js.map +1 -1
- package/dist/cjs/views/kanbanDnd.cjs +200 -0
- package/dist/cjs/views/kanbanDnd.native.js +242 -0
- package/dist/cjs/views/kanbanDnd.native.js.map +1 -0
- package/dist/cjs/views/treeViewDnd.cjs +376 -0
- package/dist/cjs/views/treeViewDnd.native.js +453 -0
- package/dist/cjs/views/treeViewDnd.native.js.map +1 -0
- package/dist/cjs/views/treeViewMotion.cjs +70 -0
- package/dist/cjs/views/treeViewMotion.native.js +130 -0
- package/dist/cjs/views/treeViewMotion.native.js.map +1 -0
- package/dist/esm/Accordion/index.mjs +307 -0
- package/dist/esm/Accordion/index.mjs.map +1 -0
- package/dist/esm/Accordion/index.native.js +325 -0
- package/dist/esm/Accordion/index.native.js.map +1 -0
- package/dist/esm/Alert/index.mjs +192 -0
- package/dist/esm/Alert/index.mjs.map +1 -0
- package/dist/esm/Alert/index.native.js +205 -0
- package/dist/esm/Alert/index.native.js.map +1 -0
- package/dist/esm/Avatar/getInitials.mjs +13 -0
- package/dist/esm/Avatar/getInitials.mjs.map +1 -0
- package/dist/esm/Avatar/getInitials.native.js +14 -0
- package/dist/esm/Avatar/getInitials.native.js.map +1 -0
- package/dist/esm/Avatar/index.mjs +93 -0
- package/dist/esm/Avatar/index.mjs.map +1 -0
- package/dist/esm/Avatar/index.native.js +100 -0
- package/dist/esm/Avatar/index.native.js.map +1 -0
- package/dist/esm/Badge/index.mjs +42 -9
- package/dist/esm/Badge/index.mjs.map +1 -1
- package/dist/esm/Badge/index.native.js +45 -10
- package/dist/esm/Badge/index.native.js.map +1 -1
- package/dist/esm/Carousel/index.mjs +88 -30
- package/dist/esm/Carousel/index.mjs.map +1 -1
- package/dist/esm/Carousel/index.native.js +88 -30
- package/dist/esm/Carousel/index.native.js.map +1 -1
- package/dist/esm/Chip/index.mjs +2 -2
- package/dist/esm/Chip/index.mjs.map +1 -1
- package/dist/esm/Chip/index.native.js +2 -2
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/DotIndicator/index.mjs +83 -14
- package/dist/esm/DotIndicator/index.mjs.map +1 -1
- package/dist/esm/DotIndicator/index.native.js +87 -16
- package/dist/esm/DotIndicator/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.mjs +482 -0
- package/dist/esm/DropdownMenu/index.mjs.map +1 -0
- package/dist/esm/DropdownMenu/index.native.js +509 -0
- package/dist/esm/DropdownMenu/index.native.js.map +1 -0
- package/dist/esm/ErrorBoundary/index.mjs +20 -9
- package/dist/esm/ErrorBoundary/index.mjs.map +1 -1
- package/dist/esm/ErrorBoundary/index.native.js +23 -11
- package/dist/esm/ErrorBoundary/index.native.js.map +1 -1
- package/dist/esm/Pagination.mjs +200 -21
- package/dist/esm/Pagination.mjs.map +1 -1
- package/dist/esm/Pagination.native.js +222 -21
- package/dist/esm/Pagination.native.js.map +1 -1
- package/dist/esm/ProgressSteps/index.mjs +214 -0
- package/dist/esm/ProgressSteps/index.mjs.map +1 -0
- package/dist/esm/ProgressSteps/index.native.js +221 -0
- package/dist/esm/ProgressSteps/index.native.js.map +1 -0
- package/dist/esm/Quote/index.mjs +65 -0
- package/dist/esm/Quote/index.mjs.map +1 -0
- package/dist/esm/Quote/index.native.js +72 -0
- package/dist/esm/Quote/index.native.js.map +1 -0
- package/dist/esm/SheetModal/index.mjs +42 -0
- package/dist/esm/SheetModal/index.mjs.map +1 -0
- package/dist/esm/SheetModal/index.native.js +115 -0
- package/dist/esm/SheetModal/index.native.js.map +1 -0
- package/dist/esm/SkipLink/index.mjs +109 -0
- package/dist/esm/SkipLink/index.mjs.map +1 -0
- package/dist/esm/SkipLink/index.native.js +128 -0
- package/dist/esm/SkipLink/index.native.js.map +1 -0
- package/dist/esm/Tabs/index.mjs +373 -0
- package/dist/esm/Tabs/index.mjs.map +1 -0
- package/dist/esm/Tabs/index.native.js +407 -0
- package/dist/esm/Tabs/index.native.js.map +1 -0
- package/dist/esm/Toast/index.mjs +391 -0
- package/dist/esm/Toast/index.mjs.map +1 -0
- package/dist/esm/Toast/index.native.js +413 -0
- package/dist/esm/Toast/index.native.js.map +1 -0
- package/dist/esm/Toast/store.mjs +74 -0
- package/dist/esm/Toast/store.mjs.map +1 -0
- package/dist/esm/Toast/store.native.js +144 -0
- package/dist/esm/Toast/store.native.js.map +1 -0
- package/dist/esm/Tooltip/index.mjs +48 -2
- package/dist/esm/Tooltip/index.mjs.map +1 -1
- package/dist/esm/Tooltip/index.native.js +52 -3
- package/dist/esm/Tooltip/index.native.js.map +1 -1
- package/dist/esm/Video/VideoFrame.mjs +20 -0
- package/dist/esm/Video/VideoFrame.mjs.map +1 -0
- package/dist/esm/Video/VideoFrame.native.js +21 -0
- package/dist/esm/Video/VideoFrame.native.js.map +1 -0
- package/dist/esm/Video/index.mjs +47 -0
- package/dist/esm/Video/index.mjs.map +1 -0
- package/dist/esm/Video/index.native.js +144 -0
- package/dist/esm/Video/index.native.js.map +1 -0
- package/dist/esm/Video/types.mjs +2 -0
- package/dist/esm/Video/types.mjs.map +1 -0
- package/dist/esm/Video/types.native.js +2 -0
- package/dist/esm/Video/types.native.js.map +1 -0
- package/dist/esm/Wheel/index.mjs +602 -1
- package/dist/esm/Wheel/index.mjs.map +1 -1
- package/dist/esm/Wheel/index.native.js +625 -1
- package/dist/esm/Wheel/index.native.js.map +1 -1
- package/dist/esm/actions/ActionBar.mjs +123 -0
- package/dist/esm/actions/ActionBar.mjs.map +1 -0
- package/dist/esm/actions/ActionBar.native.js +126 -0
- package/dist/esm/actions/ActionBar.native.js.map +1 -0
- package/dist/esm/actions/DestructiveAction.mjs +191 -0
- package/dist/esm/actions/DestructiveAction.mjs.map +1 -0
- package/dist/esm/actions/DestructiveAction.native.js +199 -0
- package/dist/esm/actions/DestructiveAction.native.js.map +1 -0
- package/dist/esm/actions/devWarn.mjs +10 -0
- package/dist/esm/actions/devWarn.mjs.map +1 -0
- package/dist/esm/actions/devWarn.native.js +11 -0
- package/dist/esm/actions/devWarn.native.js.map +1 -0
- package/dist/esm/actions/index.mjs +7 -0
- package/dist/esm/actions/index.mjs.map +1 -0
- package/dist/esm/actions/index.native.js +7 -0
- package/dist/esm/actions/index.native.js.map +1 -0
- package/dist/esm/actions/severity.mjs +15 -0
- package/dist/esm/actions/severity.mjs.map +1 -0
- package/dist/esm/actions/severity.native.js +16 -0
- package/dist/esm/actions/severity.native.js.map +1 -0
- package/dist/esm/charts/Axis.mjs +124 -0
- package/dist/esm/charts/Axis.mjs.map +1 -0
- package/dist/esm/charts/Axis.native.js +128 -0
- package/dist/esm/charts/Axis.native.js.map +1 -0
- package/dist/esm/charts/BarChart.mjs +107 -0
- package/dist/esm/charts/BarChart.mjs.map +1 -0
- package/dist/esm/charts/BarChart.native.js +122 -0
- package/dist/esm/charts/BarChart.native.js.map +1 -0
- package/dist/esm/charts/ChartSurface.mjs +48 -0
- package/dist/esm/charts/ChartSurface.mjs.map +1 -0
- package/dist/esm/charts/ChartSurface.native.js +51 -0
- package/dist/esm/charts/ChartSurface.native.js.map +1 -0
- package/dist/esm/charts/LineChart.mjs +126 -0
- package/dist/esm/charts/LineChart.mjs.map +1 -0
- package/dist/esm/charts/LineChart.native.js +144 -0
- package/dist/esm/charts/LineChart.native.js.map +1 -0
- package/dist/esm/charts/PieChart.mjs +127 -0
- package/dist/esm/charts/PieChart.mjs.map +1 -0
- package/dist/esm/charts/PieChart.native.js +138 -0
- package/dist/esm/charts/PieChart.native.js.map +1 -0
- package/dist/esm/charts/Sparkline.mjs +78 -0
- package/dist/esm/charts/Sparkline.mjs.map +1 -0
- package/dist/esm/charts/Sparkline.native.js +88 -0
- package/dist/esm/charts/Sparkline.native.js.map +1 -0
- package/dist/esm/charts/accessibility.mjs +36 -0
- package/dist/esm/charts/accessibility.mjs.map +1 -0
- package/dist/esm/charts/accessibility.native.js +57 -0
- package/dist/esm/charts/accessibility.native.js.map +1 -0
- package/dist/esm/charts/composeChart.mjs +42 -0
- package/dist/esm/charts/composeChart.mjs.map +1 -0
- package/dist/esm/charts/composeChart.native.js +49 -0
- package/dist/esm/charts/composeChart.native.js.map +1 -0
- package/dist/esm/charts/index.mjs +12 -0
- package/dist/esm/charts/index.mjs.map +1 -0
- package/dist/esm/charts/index.native.js +12 -0
- package/dist/esm/charts/index.native.js.map +1 -0
- package/dist/esm/charts/math.mjs +106 -0
- package/dist/esm/charts/math.mjs.map +1 -0
- package/dist/esm/charts/math.native.js +128 -0
- package/dist/esm/charts/math.native.js.map +1 -0
- package/dist/esm/charts/series.mjs +152 -0
- package/dist/esm/charts/series.mjs.map +1 -0
- package/dist/esm/charts/series.native.js +168 -0
- package/dist/esm/charts/series.native.js.map +1 -0
- package/dist/esm/charts/svg.mjs +61 -0
- package/dist/esm/charts/svg.mjs.map +1 -0
- package/dist/esm/charts/svg.native.js +61 -0
- package/dist/esm/charts/svg.native.js.map +1 -0
- package/dist/esm/charts/types.mjs +2 -0
- package/dist/esm/charts/types.mjs.map +1 -0
- package/dist/esm/charts/types.native.js +2 -0
- package/dist/esm/charts/types.native.js.map +1 -0
- package/dist/esm/charts/useChartTheme.mjs +61 -0
- package/dist/esm/charts/useChartTheme.mjs.map +1 -0
- package/dist/esm/charts/useChartTheme.native.js +67 -0
- package/dist/esm/charts/useChartTheme.native.js.map +1 -0
- package/dist/esm/code/Code/index.mjs +22 -4
- package/dist/esm/code/Code/index.mjs.map +1 -1
- package/dist/esm/code/Code/index.native.js +22 -4
- package/dist/esm/code/Code/index.native.js.map +1 -1
- package/dist/esm/code/CodeBlock/index.mjs +15 -8
- package/dist/esm/code/CodeBlock/index.mjs.map +1 -1
- package/dist/esm/code/CodeBlock/index.native.js +15 -8
- package/dist/esm/code/CodeBlock/index.native.js.map +1 -1
- package/dist/esm/code/HighlightedCode/index.mjs +10 -9
- package/dist/esm/code/HighlightedCode/index.mjs.map +1 -1
- package/dist/esm/code/HighlightedCode/index.native.js +13 -9
- package/dist/esm/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/esm/code/Highlighter/index.mjs +24 -7
- package/dist/esm/code/Highlighter/index.mjs.map +1 -1
- package/dist/esm/code/Highlighter/index.native.js +27 -7
- package/dist/esm/code/Highlighter/index.native.js.map +1 -1
- package/dist/esm/componentColors.mjs +24 -13
- package/dist/esm/componentColors.mjs.map +1 -1
- package/dist/esm/componentColors.native.js +24 -13
- package/dist/esm/componentColors.native.js.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.mjs +115 -0
- package/dist/esm/feedback/ConfirmDialog.mjs.map +1 -0
- package/dist/esm/feedback/ConfirmDialog.native.js +126 -0
- package/dist/esm/feedback/ConfirmDialog.native.js.map +1 -0
- package/dist/esm/feedback/NotifyHost.mjs +108 -0
- package/dist/esm/feedback/NotifyHost.mjs.map +1 -0
- package/dist/esm/feedback/NotifyHost.native.js +137 -0
- package/dist/esm/feedback/NotifyHost.native.js.map +1 -0
- package/dist/esm/feedback/index.mjs +7 -0
- package/dist/esm/feedback/index.mjs.map +1 -0
- package/dist/esm/feedback/index.native.js +7 -0
- package/dist/esm/feedback/index.native.js.map +1 -0
- package/dist/esm/feedback/notify.mjs +44 -0
- package/dist/esm/feedback/notify.mjs.map +1 -0
- package/dist/esm/feedback/notify.native.js +44 -0
- package/dist/esm/feedback/notify.native.js.map +1 -0
- package/dist/esm/feedback/route.mjs +67 -0
- package/dist/esm/feedback/route.mjs.map +1 -0
- package/dist/esm/feedback/route.native.js +69 -0
- package/dist/esm/feedback/route.native.js.map +1 -0
- package/dist/esm/feedback/store.mjs +46 -0
- package/dist/esm/feedback/store.mjs.map +1 -0
- package/dist/esm/feedback/store.native.js +74 -0
- package/dist/esm/feedback/store.native.js.map +1 -0
- package/dist/esm/hooks/index.mjs +2 -0
- package/dist/esm/hooks/index.mjs.map +1 -1
- package/dist/esm/hooks/index.native.js +2 -0
- package/dist/esm/hooks/index.native.js.map +1 -1
- package/dist/esm/hooks/useClipboard.mjs +10 -5
- package/dist/esm/hooks/useClipboard.mjs.map +1 -1
- package/dist/esm/hooks/useClipboard.native.js +12 -5
- package/dist/esm/hooks/useClipboard.native.js.map +1 -1
- package/dist/esm/hooks/useDirection.mjs +28 -0
- package/dist/esm/hooks/useDirection.mjs.map +1 -0
- package/dist/esm/hooks/useDirection.native.js +6 -0
- package/dist/esm/hooks/useDirection.native.js.map +1 -0
- package/dist/esm/hooks/useDocumentTitle.mjs +22 -0
- package/dist/esm/hooks/useDocumentTitle.mjs.map +1 -0
- package/dist/esm/hooks/useDocumentTitle.native.js +31 -0
- package/dist/esm/hooks/useDocumentTitle.native.js.map +1 -0
- package/dist/esm/icons/index.mjs +1 -0
- package/dist/esm/icons/index.mjs.map +1 -1
- package/dist/esm/icons/index.native.js +1 -0
- package/dist/esm/icons/index.native.js.map +1 -1
- package/dist/esm/icons/lucide.mjs +4 -0
- package/dist/esm/icons/lucide.mjs.map +1 -0
- package/dist/esm/icons/lucide.native.js +4 -0
- package/dist/esm/icons/lucide.native.js.map +1 -0
- package/dist/esm/images/Image/index.mjs +10 -0
- package/dist/esm/images/Image/index.mjs.map +1 -1
- package/dist/esm/index.mjs +20 -3
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +20 -3
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.mjs +317 -0
- package/dist/esm/layouts/AsyncBoundary.mjs.map +1 -0
- package/dist/esm/layouts/AsyncBoundary.native.js +341 -0
- package/dist/esm/layouts/AsyncBoundary.native.js.map +1 -0
- package/dist/esm/layouts/PageTemplates.mjs +114 -0
- package/dist/esm/layouts/PageTemplates.mjs.map +1 -0
- package/dist/esm/layouts/PageTemplates.native.js +118 -0
- package/dist/esm/layouts/PageTemplates.native.js.map +1 -0
- package/dist/esm/layouts/PaneScaffold.mjs +128 -0
- package/dist/esm/layouts/PaneScaffold.mjs.map +1 -0
- package/dist/esm/layouts/PaneScaffold.native.js +135 -0
- package/dist/esm/layouts/PaneScaffold.native.js.map +1 -0
- package/dist/esm/layouts/ViewSwitcher.mjs +70 -13
- package/dist/esm/layouts/ViewSwitcher.mjs.map +1 -1
- package/dist/esm/layouts/ViewSwitcher.native.js +83 -13
- package/dist/esm/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/esm/layouts/attachments.mjs +133 -36
- package/dist/esm/layouts/attachments.mjs.map +1 -1
- package/dist/esm/layouts/attachments.native.js +150 -37
- package/dist/esm/layouts/attachments.native.js.map +1 -1
- package/dist/esm/layouts/breadcrumbs.mjs +64 -31
- package/dist/esm/layouts/breadcrumbs.mjs.map +1 -1
- package/dist/esm/layouts/breadcrumbs.native.js +72 -34
- package/dist/esm/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/esm/layouts/index.mjs +5 -0
- package/dist/esm/layouts/index.mjs.map +1 -1
- package/dist/esm/layouts/index.native.js +5 -0
- package/dist/esm/layouts/index.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +135 -31
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +153 -32
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/pageHeadingScope.mjs +48 -0
- package/dist/esm/layouts/pageHeadingScope.mjs.map +1 -0
- package/dist/esm/layouts/pageHeadingScope.native.js +51 -0
- package/dist/esm/layouts/pageHeadingScope.native.js.map +1 -0
- package/dist/esm/layouts/sidebar.mjs +50 -12
- package/dist/esm/layouts/sidebar.mjs.map +1 -1
- package/dist/esm/layouts/sidebar.native.js +72 -12
- package/dist/esm/layouts/sidebar.native.js.map +1 -1
- package/dist/esm/layouts/tags.mjs +89 -91
- package/dist/esm/layouts/tags.mjs.map +1 -1
- package/dist/esm/layouts/tags.native.js +106 -94
- package/dist/esm/layouts/tags.native.js.map +1 -1
- package/dist/esm/layouts/timeline.mjs +503 -187
- package/dist/esm/layouts/timeline.mjs.map +1 -1
- package/dist/esm/layouts/timeline.native.js +612 -191
- package/dist/esm/layouts/timeline.native.js.map +1 -1
- package/dist/esm/layouts/toolbar.mjs +114 -38
- package/dist/esm/layouts/toolbar.mjs.map +1 -1
- package/dist/esm/layouts/toolbar.native.js +175 -41
- package/dist/esm/layouts/toolbar.native.js.map +1 -1
- package/dist/esm/shared/actionScan.mjs +27 -0
- package/dist/esm/shared/actionScan.mjs.map +1 -0
- package/dist/esm/shared/actionScan.native.js +27 -0
- package/dist/esm/shared/actionScan.native.js.map +1 -0
- package/dist/esm/shared/t.mjs +10 -0
- package/dist/esm/shared/t.mjs.map +1 -0
- package/dist/esm/shared/t.native.js +12 -0
- package/dist/esm/shared/t.native.js.map +1 -0
- package/dist/esm/shared/useReturnFocusOnClose.mjs +31 -0
- package/dist/esm/shared/useReturnFocusOnClose.mjs.map +1 -0
- package/dist/esm/shared/useReturnFocusOnClose.native.js +35 -0
- package/dist/esm/shared/useReturnFocusOnClose.native.js.map +1 -0
- package/dist/esm/surfaces.mjs +61 -31
- package/dist/esm/surfaces.mjs.map +1 -1
- package/dist/esm/surfaces.native.js +61 -31
- package/dist/esm/surfaces.native.js.map +1 -1
- package/dist/esm/tamagui.mjs +10 -0
- package/dist/esm/tamagui.mjs.map +1 -0
- package/dist/esm/tamagui.native.js +10 -0
- package/dist/esm/tamagui.native.js.map +1 -0
- package/dist/esm/views/Calendar.mjs +1538 -160
- package/dist/esm/views/Calendar.mjs.map +1 -1
- package/dist/esm/views/Calendar.native.js +1716 -186
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/Dashboard.mjs +110 -306
- package/dist/esm/views/Dashboard.mjs.map +1 -1
- package/dist/esm/views/Dashboard.native.js +115 -330
- package/dist/esm/views/Dashboard.native.js.map +1 -1
- package/dist/esm/views/Gantt.mjs +857 -0
- package/dist/esm/views/Gantt.mjs.map +1 -0
- package/dist/esm/views/Gantt.native.js +941 -0
- package/dist/esm/views/Gantt.native.js.map +1 -0
- package/dist/esm/views/ImageGrid.mjs +134 -67
- package/dist/esm/views/ImageGrid.mjs.map +1 -1
- package/dist/esm/views/ImageGrid.native.js +146 -68
- package/dist/esm/views/ImageGrid.native.js.map +1 -1
- package/dist/esm/views/Kanban.mjs +841 -42
- package/dist/esm/views/Kanban.mjs.map +1 -1
- package/dist/esm/views/Kanban.native.js +690 -60
- package/dist/esm/views/Kanban.native.js.map +1 -1
- package/dist/esm/views/List.mjs +33 -26
- package/dist/esm/views/List.mjs.map +1 -1
- package/dist/esm/views/List.native.js +39 -26
- package/dist/esm/views/List.native.js.map +1 -1
- package/dist/esm/views/ReportBuilder.mjs +62 -60
- package/dist/esm/views/ReportBuilder.mjs.map +1 -1
- package/dist/esm/views/ReportBuilder.native.js +68 -64
- package/dist/esm/views/ReportBuilder.native.js.map +1 -1
- package/dist/esm/views/TreeView.mjs +834 -84
- package/dist/esm/views/TreeView.mjs.map +1 -1
- package/dist/esm/views/TreeView.native.js +916 -95
- package/dist/esm/views/TreeView.native.js.map +1 -1
- package/dist/esm/views/calendarMath.mjs +116 -0
- package/dist/esm/views/calendarMath.mjs.map +1 -0
- package/dist/esm/views/calendarMath.native.js +162 -0
- package/dist/esm/views/calendarMath.native.js.map +1 -0
- package/dist/esm/views/ganttMath.mjs +195 -0
- package/dist/esm/views/ganttMath.mjs.map +1 -0
- package/dist/esm/views/ganttMath.native.js +219 -0
- package/dist/esm/views/ganttMath.native.js.map +1 -0
- package/dist/esm/views/index.mjs +7 -3
- package/dist/esm/views/index.mjs.map +1 -1
- package/dist/esm/views/index.native.js +7 -3
- package/dist/esm/views/index.native.js.map +1 -1
- package/dist/esm/views/kanbanDnd.mjs +165 -0
- package/dist/esm/views/kanbanDnd.mjs.map +1 -0
- package/dist/esm/views/kanbanDnd.native.js +204 -0
- package/dist/esm/views/kanbanDnd.native.js.map +1 -0
- package/dist/esm/views/treeViewDnd.mjs +336 -0
- package/dist/esm/views/treeViewDnd.mjs.map +1 -0
- package/dist/esm/views/treeViewDnd.native.js +410 -0
- package/dist/esm/views/treeViewDnd.native.js.map +1 -0
- package/dist/esm/views/treeViewMotion.mjs +43 -0
- package/dist/esm/views/treeViewMotion.mjs.map +1 -0
- package/dist/esm/views/treeViewMotion.native.js +100 -0
- package/dist/esm/views/treeViewMotion.native.js.map +1 -0
- package/dist/jsx/Accordion/index.mjs +307 -0
- package/dist/jsx/Accordion/index.mjs.map +1 -0
- package/dist/jsx/Accordion/index.native.js +353 -0
- package/dist/jsx/Accordion/index.native.js.map +1 -0
- package/dist/jsx/Alert/index.mjs +192 -0
- package/dist/jsx/Alert/index.mjs.map +1 -0
- package/dist/jsx/Alert/index.native.js +233 -0
- package/dist/jsx/Alert/index.native.js.map +1 -0
- package/dist/jsx/Avatar/getInitials.mjs +13 -0
- package/dist/jsx/Avatar/getInitials.mjs.map +1 -0
- package/dist/jsx/Avatar/getInitials.native.js +42 -0
- package/dist/jsx/Avatar/getInitials.native.js.map +1 -0
- package/dist/jsx/Avatar/index.mjs +93 -0
- package/dist/jsx/Avatar/index.mjs.map +1 -0
- package/dist/jsx/Avatar/index.native.js +129 -0
- package/dist/jsx/Avatar/index.native.js.map +1 -0
- package/dist/jsx/Badge/index.mjs +42 -9
- package/dist/jsx/Badge/index.mjs.map +1 -1
- package/dist/jsx/Badge/index.native.js +45 -10
- package/dist/jsx/Badge/index.native.js.map +1 -1
- package/dist/jsx/Carousel/index.mjs +88 -30
- package/dist/jsx/Carousel/index.mjs.map +1 -1
- package/dist/jsx/Carousel/index.native.js +86 -28
- package/dist/jsx/Carousel/index.native.js.map +1 -1
- package/dist/jsx/Chip/index.mjs +2 -2
- package/dist/jsx/Chip/index.mjs.map +1 -1
- package/dist/jsx/Chip/index.native.js +4 -1
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/DotIndicator/index.mjs +83 -14
- package/dist/jsx/DotIndicator/index.mjs.map +1 -1
- package/dist/jsx/DotIndicator/index.native.js +85 -14
- package/dist/jsx/DotIndicator/index.native.js.map +1 -1
- package/dist/jsx/DropdownMenu/index.mjs +482 -0
- package/dist/jsx/DropdownMenu/index.mjs.map +1 -0
- package/dist/jsx/DropdownMenu/index.native.js +537 -0
- package/dist/jsx/DropdownMenu/index.native.js.map +1 -0
- package/dist/jsx/ErrorBoundary/index.mjs +20 -9
- package/dist/jsx/ErrorBoundary/index.mjs.map +1 -1
- package/dist/jsx/ErrorBoundary/index.native.js +23 -11
- package/dist/jsx/ErrorBoundary/index.native.js.map +1 -1
- package/dist/jsx/Pagination.mjs +200 -21
- package/dist/jsx/Pagination.mjs.map +1 -1
- package/dist/jsx/Pagination.native.js +220 -18
- package/dist/jsx/Pagination.native.js.map +1 -1
- package/dist/jsx/ProgressSteps/index.mjs +214 -0
- package/dist/jsx/ProgressSteps/index.mjs.map +1 -0
- package/dist/jsx/ProgressSteps/index.native.js +249 -0
- package/dist/jsx/ProgressSteps/index.native.js.map +1 -0
- package/dist/jsx/Quote/index.mjs +65 -0
- package/dist/jsx/Quote/index.mjs.map +1 -0
- package/dist/jsx/Quote/index.native.js +100 -0
- package/dist/jsx/Quote/index.native.js.map +1 -0
- package/dist/jsx/SheetModal/index.mjs +42 -0
- package/dist/jsx/SheetModal/index.mjs.map +1 -0
- package/dist/jsx/SheetModal/index.native.js +143 -0
- package/dist/jsx/SheetModal/index.native.js.map +1 -0
- package/dist/jsx/SkipLink/index.mjs +109 -0
- package/dist/jsx/SkipLink/index.mjs.map +1 -0
- package/dist/jsx/SkipLink/index.native.js +156 -0
- package/dist/jsx/SkipLink/index.native.js.map +1 -0
- package/dist/jsx/Tabs/index.mjs +373 -0
- package/dist/jsx/Tabs/index.mjs.map +1 -0
- package/dist/jsx/Tabs/index.native.js +446 -0
- package/dist/jsx/Tabs/index.native.js.map +1 -0
- package/dist/jsx/Toast/index.mjs +391 -0
- package/dist/jsx/Toast/index.mjs.map +1 -0
- package/dist/jsx/Toast/index.native.js +447 -0
- package/dist/jsx/Toast/index.native.js.map +1 -0
- package/dist/jsx/Toast/store.mjs +74 -0
- package/dist/jsx/Toast/store.mjs.map +1 -0
- package/dist/jsx/Toast/store.native.js +179 -0
- package/dist/jsx/Toast/store.native.js.map +1 -0
- package/dist/jsx/Tooltip/index.mjs +48 -2
- package/dist/jsx/Tooltip/index.mjs.map +1 -1
- package/dist/jsx/Tooltip/index.native.js +51 -2
- package/dist/jsx/Tooltip/index.native.js.map +1 -1
- package/dist/jsx/Video/VideoFrame.mjs +20 -0
- package/dist/jsx/Video/VideoFrame.mjs.map +1 -0
- package/dist/jsx/Video/VideoFrame.native.js +50 -0
- package/dist/jsx/Video/VideoFrame.native.js.map +1 -0
- package/dist/jsx/Video/index.mjs +47 -0
- package/dist/jsx/Video/index.mjs.map +1 -0
- package/dist/jsx/Video/index.native.js +172 -0
- package/dist/jsx/Video/index.native.js.map +1 -0
- package/dist/jsx/Video/types.mjs +2 -0
- package/dist/jsx/Video/types.mjs.map +1 -0
- package/dist/jsx/Video/types.native.js +21 -0
- package/dist/jsx/Video/types.native.js.map +1 -0
- package/dist/jsx/Wheel/index.mjs +602 -1
- package/dist/jsx/Wheel/index.mjs.map +1 -1
- package/dist/jsx/Wheel/index.native.js +626 -2
- package/dist/jsx/Wheel/index.native.js.map +1 -1
- package/dist/jsx/actions/ActionBar.mjs +123 -0
- package/dist/jsx/actions/ActionBar.mjs.map +1 -0
- package/dist/jsx/actions/ActionBar.native.js +154 -0
- package/dist/jsx/actions/ActionBar.native.js.map +1 -0
- package/dist/jsx/actions/DestructiveAction.mjs +191 -0
- package/dist/jsx/actions/DestructiveAction.mjs.map +1 -0
- package/dist/jsx/actions/DestructiveAction.native.js +227 -0
- package/dist/jsx/actions/DestructiveAction.native.js.map +1 -0
- package/dist/jsx/actions/devWarn.mjs +10 -0
- package/dist/jsx/actions/devWarn.mjs.map +1 -0
- package/dist/jsx/actions/devWarn.native.js +42 -0
- package/dist/jsx/actions/devWarn.native.js.map +1 -0
- package/dist/jsx/actions/index.mjs +7 -0
- package/dist/jsx/actions/index.mjs.map +1 -0
- package/dist/jsx/actions/index.native.js +42 -0
- package/dist/jsx/actions/index.native.js.map +1 -0
- package/dist/jsx/actions/severity.mjs +15 -0
- package/dist/jsx/actions/severity.mjs.map +1 -0
- package/dist/jsx/actions/severity.native.js +46 -0
- package/dist/jsx/actions/severity.native.js.map +1 -0
- package/dist/jsx/charts/Axis.mjs +124 -0
- package/dist/jsx/charts/Axis.mjs.map +1 -0
- package/dist/jsx/charts/Axis.native.js +159 -0
- package/dist/jsx/charts/Axis.native.js.map +1 -0
- package/dist/jsx/charts/BarChart.mjs +107 -0
- package/dist/jsx/charts/BarChart.mjs.map +1 -0
- package/dist/jsx/charts/BarChart.native.js +150 -0
- package/dist/jsx/charts/BarChart.native.js.map +1 -0
- package/dist/jsx/charts/ChartSurface.mjs +48 -0
- package/dist/jsx/charts/ChartSurface.mjs.map +1 -0
- package/dist/jsx/charts/ChartSurface.native.js +79 -0
- package/dist/jsx/charts/ChartSurface.native.js.map +1 -0
- package/dist/jsx/charts/LineChart.mjs +126 -0
- package/dist/jsx/charts/LineChart.mjs.map +1 -0
- package/dist/jsx/charts/LineChart.native.js +173 -0
- package/dist/jsx/charts/LineChart.native.js.map +1 -0
- package/dist/jsx/charts/PieChart.mjs +127 -0
- package/dist/jsx/charts/PieChart.mjs.map +1 -0
- package/dist/jsx/charts/PieChart.native.js +166 -0
- package/dist/jsx/charts/PieChart.native.js.map +1 -0
- package/dist/jsx/charts/Sparkline.mjs +78 -0
- package/dist/jsx/charts/Sparkline.mjs.map +1 -0
- package/dist/jsx/charts/Sparkline.native.js +116 -0
- package/dist/jsx/charts/Sparkline.native.js.map +1 -0
- package/dist/jsx/charts/accessibility.mjs +36 -0
- package/dist/jsx/charts/accessibility.mjs.map +1 -0
- package/dist/jsx/charts/accessibility.native.js +86 -0
- package/dist/jsx/charts/accessibility.native.js.map +1 -0
- package/dist/jsx/charts/composeChart.mjs +42 -0
- package/dist/jsx/charts/composeChart.mjs.map +1 -0
- package/dist/jsx/charts/composeChart.native.js +79 -0
- package/dist/jsx/charts/composeChart.native.js.map +1 -0
- package/dist/jsx/charts/index.mjs +12 -0
- package/dist/jsx/charts/index.mjs.map +1 -0
- package/dist/jsx/charts/index.native.js +69 -0
- package/dist/jsx/charts/index.native.js.map +1 -0
- package/dist/jsx/charts/math.mjs +106 -0
- package/dist/jsx/charts/math.mjs.map +1 -0
- package/dist/jsx/charts/math.native.js +170 -0
- package/dist/jsx/charts/math.native.js.map +1 -0
- package/dist/jsx/charts/series.mjs +152 -0
- package/dist/jsx/charts/series.mjs.map +1 -0
- package/dist/jsx/charts/series.native.js +199 -0
- package/dist/jsx/charts/series.native.js.map +1 -0
- package/dist/jsx/charts/svg.mjs +61 -0
- package/dist/jsx/charts/svg.mjs.map +1 -0
- package/dist/jsx/charts/svg.native.js +97 -0
- package/dist/jsx/charts/svg.native.js.map +1 -0
- package/dist/jsx/charts/types.mjs +2 -0
- package/dist/jsx/charts/types.mjs.map +1 -0
- package/dist/jsx/charts/types.native.js +21 -0
- package/dist/jsx/charts/types.native.js.map +1 -0
- package/dist/jsx/charts/useChartTheme.mjs +61 -0
- package/dist/jsx/charts/useChartTheme.mjs.map +1 -0
- package/dist/jsx/charts/useChartTheme.native.js +106 -0
- package/dist/jsx/charts/useChartTheme.native.js.map +1 -0
- package/dist/jsx/code/Code/index.mjs +22 -4
- package/dist/jsx/code/Code/index.mjs.map +1 -1
- package/dist/jsx/code/Code/index.native.js +22 -4
- package/dist/jsx/code/Code/index.native.js.map +1 -1
- package/dist/jsx/code/CodeBlock/index.mjs +15 -8
- package/dist/jsx/code/CodeBlock/index.mjs.map +1 -1
- package/dist/jsx/code/CodeBlock/index.native.js +14 -7
- package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
- package/dist/jsx/code/HighlightedCode/index.mjs +10 -9
- package/dist/jsx/code/HighlightedCode/index.mjs.map +1 -1
- package/dist/jsx/code/HighlightedCode/index.native.js +12 -8
- package/dist/jsx/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/index.mjs +24 -7
- package/dist/jsx/code/Highlighter/index.mjs.map +1 -1
- package/dist/jsx/code/Highlighter/index.native.js +27 -7
- package/dist/jsx/code/Highlighter/index.native.js.map +1 -1
- package/dist/jsx/componentColors.mjs +24 -13
- package/dist/jsx/componentColors.mjs.map +1 -1
- package/dist/jsx/componentColors.native.js +25 -13
- package/dist/jsx/componentColors.native.js.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.mjs +115 -0
- package/dist/jsx/feedback/ConfirmDialog.mjs.map +1 -0
- package/dist/jsx/feedback/ConfirmDialog.native.js +154 -0
- package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -0
- package/dist/jsx/feedback/NotifyHost.mjs +108 -0
- package/dist/jsx/feedback/NotifyHost.mjs.map +1 -0
- package/dist/jsx/feedback/NotifyHost.native.js +166 -0
- package/dist/jsx/feedback/NotifyHost.native.js.map +1 -0
- package/dist/jsx/feedback/index.mjs +7 -0
- package/dist/jsx/feedback/index.mjs.map +1 -0
- package/dist/jsx/feedback/index.native.js +45 -0
- package/dist/jsx/feedback/index.native.js.map +1 -0
- package/dist/jsx/feedback/notify.mjs +44 -0
- package/dist/jsx/feedback/notify.mjs.map +1 -0
- package/dist/jsx/feedback/notify.native.js +72 -0
- package/dist/jsx/feedback/notify.native.js.map +1 -0
- package/dist/jsx/feedback/route.mjs +67 -0
- package/dist/jsx/feedback/route.mjs.map +1 -0
- package/dist/jsx/feedback/route.native.js +97 -0
- package/dist/jsx/feedback/route.native.js.map +1 -0
- package/dist/jsx/feedback/store.mjs +46 -0
- package/dist/jsx/feedback/store.mjs.map +1 -0
- package/dist/jsx/feedback/store.native.js +107 -0
- package/dist/jsx/feedback/store.native.js.map +1 -0
- package/dist/jsx/hooks/index.mjs +2 -0
- package/dist/jsx/hooks/index.mjs.map +1 -1
- package/dist/jsx/hooks/index.native.js +2 -0
- package/dist/jsx/hooks/index.native.js.map +1 -1
- package/dist/jsx/hooks/useClipboard.mjs +10 -5
- package/dist/jsx/hooks/useClipboard.mjs.map +1 -1
- package/dist/jsx/hooks/useClipboard.native.js +12 -5
- package/dist/jsx/hooks/useClipboard.native.js.map +1 -1
- package/dist/jsx/hooks/useDirection.mjs +28 -0
- package/dist/jsx/hooks/useDirection.mjs.map +1 -0
- package/dist/jsx/hooks/useDirection.native.js +34 -0
- package/dist/jsx/hooks/useDirection.native.js.map +1 -0
- package/dist/jsx/hooks/useDocumentTitle.mjs +22 -0
- package/dist/jsx/hooks/useDocumentTitle.mjs.map +1 -0
- package/dist/jsx/hooks/useDocumentTitle.native.js +61 -0
- package/dist/jsx/hooks/useDocumentTitle.native.js.map +1 -0
- package/dist/jsx/icons/index.mjs +1 -0
- package/dist/jsx/icons/index.mjs.map +1 -1
- package/dist/jsx/icons/index.native.js +1 -0
- package/dist/jsx/icons/index.native.js.map +1 -1
- package/dist/jsx/icons/lucide.mjs +4 -0
- package/dist/jsx/icons/lucide.mjs.map +1 -0
- package/dist/jsx/icons/lucide.native.js +37 -0
- package/dist/jsx/icons/lucide.native.js.map +1 -0
- package/dist/jsx/images/Image/index.mjs +10 -0
- package/dist/jsx/images/Image/index.mjs.map +1 -1
- package/dist/jsx/index.js +20 -3
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +20 -3
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +40 -2
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/layouts/AsyncBoundary.mjs +317 -0
- package/dist/jsx/layouts/AsyncBoundary.mjs.map +1 -0
- package/dist/jsx/layouts/AsyncBoundary.native.js +374 -0
- package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -0
- package/dist/jsx/layouts/PageTemplates.mjs +114 -0
- package/dist/jsx/layouts/PageTemplates.mjs.map +1 -0
- package/dist/jsx/layouts/PageTemplates.native.js +148 -0
- package/dist/jsx/layouts/PageTemplates.native.js.map +1 -0
- package/dist/jsx/layouts/PaneScaffold.mjs +128 -0
- package/dist/jsx/layouts/PaneScaffold.mjs.map +1 -0
- package/dist/jsx/layouts/PaneScaffold.native.js +167 -0
- package/dist/jsx/layouts/PaneScaffold.native.js.map +1 -0
- package/dist/jsx/layouts/ViewSwitcher.mjs +70 -13
- package/dist/jsx/layouts/ViewSwitcher.mjs.map +1 -1
- package/dist/jsx/layouts/ViewSwitcher.native.js +81 -11
- package/dist/jsx/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/jsx/layouts/attachments.mjs +133 -36
- package/dist/jsx/layouts/attachments.mjs.map +1 -1
- package/dist/jsx/layouts/attachments.native.js +147 -34
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.mjs +64 -31
- package/dist/jsx/layouts/breadcrumbs.mjs.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.native.js +70 -32
- package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/jsx/layouts/index.mjs +5 -0
- package/dist/jsx/layouts/index.mjs.map +1 -1
- package/dist/jsx/layouts/index.native.js +18 -0
- package/dist/jsx/layouts/index.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +135 -31
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +150 -28
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/pageHeadingScope.mjs +48 -0
- package/dist/jsx/layouts/pageHeadingScope.mjs.map +1 -0
- package/dist/jsx/layouts/pageHeadingScope.native.js +80 -0
- package/dist/jsx/layouts/pageHeadingScope.native.js.map +1 -0
- package/dist/jsx/layouts/sidebar.mjs +50 -12
- package/dist/jsx/layouts/sidebar.mjs.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js +70 -10
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/dist/jsx/layouts/tags.mjs +89 -91
- package/dist/jsx/layouts/tags.mjs.map +1 -1
- package/dist/jsx/layouts/tags.native.js +103 -91
- package/dist/jsx/layouts/tags.native.js.map +1 -1
- package/dist/jsx/layouts/timeline.mjs +503 -187
- package/dist/jsx/layouts/timeline.mjs.map +1 -1
- package/dist/jsx/layouts/timeline.native.js +611 -186
- package/dist/jsx/layouts/timeline.native.js.map +1 -1
- package/dist/jsx/layouts/toolbar.mjs +114 -38
- package/dist/jsx/layouts/toolbar.mjs.map +1 -1
- package/dist/jsx/layouts/toolbar.native.js +172 -38
- package/dist/jsx/layouts/toolbar.native.js.map +1 -1
- package/dist/jsx/shared/actionScan.mjs +27 -0
- package/dist/jsx/shared/actionScan.mjs.map +1 -0
- package/dist/jsx/shared/actionScan.native.js +56 -0
- package/dist/jsx/shared/actionScan.native.js.map +1 -0
- package/dist/jsx/shared/t.mjs +10 -0
- package/dist/jsx/shared/t.mjs.map +1 -0
- package/dist/jsx/shared/t.native.js +41 -0
- package/dist/jsx/shared/t.native.js.map +1 -0
- package/dist/jsx/shared/useReturnFocusOnClose.mjs +31 -0
- package/dist/jsx/shared/useReturnFocusOnClose.mjs.map +1 -0
- package/dist/jsx/shared/useReturnFocusOnClose.native.js +63 -0
- package/dist/jsx/shared/useReturnFocusOnClose.native.js.map +1 -0
- package/dist/jsx/surfaces.mjs +61 -31
- package/dist/jsx/surfaces.mjs.map +1 -1
- package/dist/jsx/surfaces.native.js +67 -26
- package/dist/jsx/surfaces.native.js.map +1 -1
- package/dist/jsx/tamagui.mjs +10 -0
- package/dist/jsx/tamagui.mjs.map +1 -0
- package/dist/jsx/tamagui.native.js +97 -0
- package/dist/jsx/tamagui.native.js.map +1 -0
- package/dist/jsx/views/Calendar.mjs +1538 -160
- package/dist/jsx/views/Calendar.mjs.map +1 -1
- package/dist/jsx/views/Calendar.native.js +1713 -180
- package/dist/jsx/views/Calendar.native.js.map +1 -1
- package/dist/jsx/views/Dashboard.mjs +110 -306
- package/dist/jsx/views/Dashboard.mjs.map +1 -1
- package/dist/jsx/views/Dashboard.native.js +113 -327
- package/dist/jsx/views/Dashboard.native.js.map +1 -1
- package/dist/jsx/views/Gantt.mjs +857 -0
- package/dist/jsx/views/Gantt.mjs.map +1 -0
- package/dist/jsx/views/Gantt.native.js +980 -0
- package/dist/jsx/views/Gantt.native.js.map +1 -0
- package/dist/jsx/views/ImageGrid.mjs +134 -67
- package/dist/jsx/views/ImageGrid.mjs.map +1 -1
- package/dist/jsx/views/ImageGrid.native.js +143 -65
- package/dist/jsx/views/ImageGrid.native.js.map +1 -1
- package/dist/jsx/views/Kanban.mjs +841 -42
- package/dist/jsx/views/Kanban.mjs.map +1 -1
- package/dist/jsx/views/Kanban.native.js +688 -58
- package/dist/jsx/views/Kanban.native.js.map +1 -1
- package/dist/jsx/views/List.mjs +33 -26
- package/dist/jsx/views/List.mjs.map +1 -1
- package/dist/jsx/views/List.native.js +39 -26
- package/dist/jsx/views/List.native.js.map +1 -1
- package/dist/jsx/views/ReportBuilder.mjs +62 -60
- package/dist/jsx/views/ReportBuilder.mjs.map +1 -1
- package/dist/jsx/views/ReportBuilder.native.js +69 -65
- package/dist/jsx/views/ReportBuilder.native.js.map +1 -1
- package/dist/jsx/views/TreeView.mjs +834 -84
- package/dist/jsx/views/TreeView.mjs.map +1 -1
- package/dist/jsx/views/TreeView.native.js +912 -91
- package/dist/jsx/views/TreeView.native.js.map +1 -1
- package/dist/jsx/views/calendarMath.mjs +116 -0
- package/dist/jsx/views/calendarMath.mjs.map +1 -0
- package/dist/jsx/views/calendarMath.native.js +203 -0
- package/dist/jsx/views/calendarMath.native.js.map +1 -0
- package/dist/jsx/views/ganttMath.mjs +195 -0
- package/dist/jsx/views/ganttMath.mjs.map +1 -0
- package/dist/jsx/views/ganttMath.native.js +266 -0
- package/dist/jsx/views/ganttMath.native.js.map +1 -0
- package/dist/jsx/views/index.mjs +7 -3
- package/dist/jsx/views/index.mjs.map +1 -1
- package/dist/jsx/views/index.native.js +29 -1
- package/dist/jsx/views/index.native.js.map +1 -1
- package/dist/jsx/views/kanbanDnd.mjs +165 -0
- package/dist/jsx/views/kanbanDnd.mjs.map +1 -0
- package/dist/jsx/views/kanbanDnd.native.js +242 -0
- package/dist/jsx/views/kanbanDnd.native.js.map +1 -0
- package/dist/jsx/views/treeViewDnd.mjs +336 -0
- package/dist/jsx/views/treeViewDnd.mjs.map +1 -0
- package/dist/jsx/views/treeViewDnd.native.js +453 -0
- package/dist/jsx/views/treeViewDnd.native.js.map +1 -0
- package/dist/jsx/views/treeViewMotion.mjs +43 -0
- package/dist/jsx/views/treeViewMotion.mjs.map +1 -0
- package/dist/jsx/views/treeViewMotion.native.js +130 -0
- package/dist/jsx/views/treeViewMotion.native.js.map +1 -0
- package/package.json +51 -15
- package/src/Accordion/Accordion.spec.tsx +114 -0
- package/src/Accordion/Accordion.stories.tsx +187 -0
- package/src/Accordion/index.tsx +419 -0
- package/src/Alert/Alert.spec.tsx +83 -0
- package/src/Alert/Alert.stories.tsx +207 -0
- package/src/Alert/index.tsx +282 -0
- package/src/Avatar/Avatar.spec.tsx +45 -0
- package/src/Avatar/Avatar.stories.tsx +79 -0
- package/src/Avatar/getInitials.ts +15 -0
- package/src/Avatar/index.tsx +158 -0
- package/src/Badge/Badge.stories.tsx +37 -2
- package/src/Badge/index.tsx +39 -9
- package/src/Card.stories.tsx +96 -0
- package/src/CardFooter.stories.tsx +69 -0
- package/src/CardHeader.stories.tsx +67 -0
- package/src/Carousel/Carousel.stories.tsx +15 -16
- package/src/Carousel/index.tsx +92 -24
- package/src/Chip/index.tsx +3 -0
- package/src/DialogContent.stories.tsx +76 -0
- package/src/DotIndicator/DotIndicator.stories.tsx +12 -0
- package/src/DotIndicator/dotIndicator.spec.tsx +75 -0
- package/src/DotIndicator/index.tsx +94 -15
- package/src/DropdownMenu/DropdownMenu.spec.tsx +222 -0
- package/src/DropdownMenu/DropdownMenu.stories.tsx +198 -0
- package/src/DropdownMenu/index.tsx +696 -0
- package/src/ErrorBoundary/index.tsx +12 -6
- package/src/Pagination.spec.tsx +158 -0
- package/src/Pagination.stories.tsx +120 -4
- package/src/Pagination.tsx +309 -29
- package/src/Panel.stories.tsx +72 -0
- package/src/PopoverContent.stories.tsx +67 -0
- package/src/ProgressSteps/ProgressSteps.spec.tsx +31 -0
- package/src/ProgressSteps/ProgressSteps.stories.tsx +87 -0
- package/src/ProgressSteps/index.tsx +291 -0
- package/src/Quote/Quote.spec.tsx +17 -0
- package/src/Quote/Quote.stories.tsx +50 -0
- package/src/Quote/index.tsx +100 -0
- package/src/SheetFrame.stories.tsx +78 -0
- package/src/SheetModal/index.native.tsx +140 -0
- package/src/SheetModal/index.tsx +66 -0
- package/src/Skeleton/SkeletonCircle.stories.tsx +55 -0
- package/src/Skeleton/SkeletonText.stories.tsx +107 -0
- package/src/SkipLink/SkipLink.spec.tsx +45 -0
- package/src/SkipLink/SkipLink.stories.tsx +89 -0
- package/src/SkipLink/index.tsx +147 -0
- package/src/Tabs/Tabs.spec.tsx +70 -0
- package/src/Tabs/Tabs.stories.tsx +249 -0
- package/src/Tabs/index.tsx +541 -0
- package/src/Toast/Toast.spec.tsx +223 -0
- package/src/Toast/Toast.stories.tsx +210 -0
- package/src/Toast/index.tsx +478 -0
- package/src/Toast/store.ts +142 -0
- package/src/Tooltip/Tooltip.devWarn.spec.tsx +43 -0
- package/src/Tooltip/index.tsx +68 -6
- package/src/Video/Video.spec.tsx +78 -0
- package/src/Video/Video.stories.tsx +75 -0
- package/src/Video/VideoFrame.tsx +15 -0
- package/src/Video/index.native.tsx +181 -0
- package/src/Video/index.tsx +50 -0
- package/src/Video/types.ts +17 -0
- package/src/Wheel/Wheel.spec.tsx +30 -0
- package/src/Wheel/Wheel.stories.tsx +1 -1
- package/src/Wheel/index.tsx +862 -7
- package/src/actions/ActionBar.spec.tsx +166 -0
- package/src/actions/ActionBar.tsx +207 -0
- package/src/actions/DestructiveAction.spec.tsx +254 -0
- package/src/actions/DestructiveAction.stories.tsx +113 -0
- package/src/actions/DestructiveAction.tsx +281 -0
- package/src/actions/devWarn.ts +33 -0
- package/src/actions/index.ts +24 -0
- package/src/actions/severity.ts +40 -0
- package/src/charts/Axis.tsx +180 -0
- package/src/charts/BarChart.tsx +138 -0
- package/src/charts/ChartSurface.tsx +70 -0
- package/src/charts/Charts.stories.tsx +187 -0
- package/src/charts/LineChart.tsx +172 -0
- package/src/charts/PieChart.tsx +153 -0
- package/src/charts/Sparkline.tsx +98 -0
- package/src/charts/accessibility.ts +75 -0
- package/src/charts/charts.spec.tsx +321 -0
- package/src/charts/composeChart.ts +86 -0
- package/src/charts/index.ts +69 -0
- package/src/charts/math.spec.ts +184 -0
- package/src/charts/math.ts +275 -0
- package/src/charts/series.tsx +245 -0
- package/src/charts/svg.ts +84 -0
- package/src/charts/types.ts +54 -0
- package/src/charts/useChartTheme.ts +128 -0
- package/src/code/Code/index.tsx +38 -4
- package/src/code/CodeBlock/index.tsx +25 -9
- package/src/code/CodeInline.stories.tsx +74 -0
- package/src/code/HighlightedCode/HighlightedCode.stories.tsx +36 -5
- package/src/code/HighlightedCode/index.tsx +15 -10
- package/src/code/Highlighter/Highlighter.spec.ts +35 -0
- package/src/code/Highlighter/index.ts +40 -11
- package/src/code/highlightedCode.spec.tsx +97 -0
- package/src/componentColors.ts +40 -12
- package/src/feedback/ConfirmDialog.spec.tsx +331 -0
- package/src/feedback/ConfirmDialog.stories.tsx +160 -0
- package/src/feedback/ConfirmDialog.tsx +186 -0
- package/src/feedback/Notify.stories.tsx +175 -0
- package/src/feedback/NotifyHost.tsx +139 -0
- package/src/feedback/index.ts +22 -0
- package/src/feedback/notify.spec.ts +180 -0
- package/src/feedback/notify.ts +54 -0
- package/src/feedback/route.ts +118 -0
- package/src/feedback/store.ts +71 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useClipboard.spec.tsx +26 -0
- package/src/hooks/useClipboard.ts +16 -9
- package/src/hooks/useDirection.native.ts +16 -0
- package/src/hooks/useDirection.spec.tsx +89 -0
- package/src/hooks/useDirection.ts +67 -0
- package/src/hooks/useDocumentTitle.spec.tsx +88 -0
- package/src/hooks/useDocumentTitle.ts +76 -0
- package/src/icons/CheckRegular.stories.tsx +75 -0
- package/src/icons/MinusRegular.stories.tsx +84 -0
- package/src/icons/index.ts +1 -0
- package/src/icons/lucide.ts +5 -0
- package/src/images/Image/index.tsx +15 -0
- package/src/images/SvgUri/SvgUri.stories.tsx +22 -7
- package/src/index.ts +65 -3
- package/src/layouts/AsyncBoundary.spec.tsx +142 -0
- package/src/layouts/AsyncBoundary.stories.tsx +147 -0
- package/src/layouts/AsyncBoundary.tsx +400 -0
- package/src/layouts/Attachments.stories.tsx +29 -0
- package/src/layouts/Debug/debug.spec.tsx +58 -3
- package/src/layouts/EmptyState.stories.tsx +96 -0
- package/src/layouts/PageHeader.stories.tsx +90 -0
- package/src/layouts/PageSection.stories.tsx +85 -0
- package/src/layouts/PageTemplates.spec.tsx +136 -0
- package/src/layouts/PageTemplates.stories.tsx +107 -0
- package/src/layouts/PageTemplates.tsx +203 -0
- package/src/layouts/PaneScaffold.spec.tsx +139 -0
- package/src/layouts/PaneScaffold.stories.tsx +132 -0
- package/src/layouts/PaneScaffold.tsx +249 -0
- package/src/layouts/Screen.stories.tsx +104 -0
- package/src/layouts/ScreenToolbar.stories.tsx +81 -0
- package/src/layouts/Sidebar.stories.tsx +40 -34
- package/src/layouts/Timeline.stories.tsx +123 -0
- package/src/layouts/Toolbar.stories.tsx +31 -2
- package/src/layouts/ViewSwitcher.stories.tsx +42 -4
- package/src/layouts/ViewSwitcher.tsx +98 -6
- package/src/layouts/attachments.tsx +186 -48
- package/src/layouts/breadcrumbs.tsx +64 -13
- package/src/layouts/index.tsx +15 -0
- package/src/layouts/layouts.spec.tsx +164 -1
- package/src/layouts/page.tsx +257 -41
- package/src/layouts/pageHeadingScope.tsx +87 -0
- package/src/layouts/pageHeadings.spec.tsx +151 -0
- package/src/layouts/sidebar.tsx +95 -20
- package/src/layouts/tags-trigger.spec.tsx +87 -0
- package/src/layouts/tags.tsx +147 -91
- package/src/layouts/timeline-comments.spec.tsx +243 -0
- package/src/layouts/timeline-radius.spec.tsx +57 -0
- package/src/layouts/timeline.tsx +671 -232
- package/src/layouts/toolbar.tsx +161 -38
- package/src/shared/actionScan.ts +40 -0
- package/src/shared/t.ts +29 -0
- package/src/shared/useReturnFocusOnClose.ts +51 -0
- package/src/surfaces.spec.tsx +51 -0
- package/src/surfaces.tsx +152 -58
- package/src/tamagui.spec.ts +182 -0
- package/src/tamagui.ts +126 -0
- package/src/views/Calendar.motion.spec.tsx +204 -0
- package/src/views/Calendar.stories.tsx +252 -4
- package/src/views/Calendar.tsx +2156 -156
- package/src/views/Dashboard.stories.tsx +52 -3
- package/src/views/Dashboard.tsx +200 -359
- package/src/views/Gantt.spec.tsx +611 -0
- package/src/views/Gantt.stories.tsx +209 -0
- package/src/views/Gantt.tsx +1191 -0
- package/src/views/ImageGrid.stories.tsx +56 -2
- package/src/views/ImageGrid.tsx +172 -43
- package/src/views/Kanban.native.tsx +801 -72
- package/src/views/Kanban.stories.tsx +187 -1
- package/src/views/Kanban.tsx +1188 -69
- package/src/views/List.stories.tsx +54 -2
- package/src/views/List.tsx +118 -78
- package/src/views/ReportBuilder.stories.tsx +38 -2
- package/src/views/ReportBuilder.tsx +102 -81
- package/src/views/TreeView.stories.tsx +98 -5
- package/src/views/TreeView.tsx +1099 -93
- package/src/views/calendarMath.spec.ts +197 -0
- package/src/views/calendarMath.ts +229 -0
- package/src/views/ganttMath.ts +333 -0
- package/src/views/index.ts +48 -1
- package/src/views/kanbanDnd.spec.ts +259 -0
- package/src/views/kanbanDnd.ts +323 -0
- package/src/views/treeViewDnd.spec.ts +353 -0
- package/src/views/treeViewDnd.ts +503 -0
- package/src/views/treeViewMotion.spec.ts +108 -0
- package/src/views/treeViewMotion.ts +100 -0
- package/src/views/tz-verify.spec.tsx +81 -0
- package/src/views/views.spec.tsx +602 -25
- package/types/Accordion/index.d.ts +59 -0
- package/types/Accordion/index.d.ts.map +1 -0
- package/types/Alert/index.d.ts +43 -0
- package/types/Alert/index.d.ts.map +1 -0
- package/types/Avatar/getInitials.d.ts +6 -0
- package/types/Avatar/getInitials.d.ts.map +1 -0
- package/types/Avatar/index.d.ts +55 -0
- package/types/Avatar/index.d.ts.map +1 -0
- package/types/Badge/index.d.ts +34 -0
- package/types/Badge/index.d.ts.map +1 -0
- package/types/Carousel/index.d.ts +29 -0
- package/types/Carousel/index.d.ts.map +1 -0
- package/types/Chip/index.d.ts +2 -0
- package/types/Chip/index.d.ts.map +1 -0
- package/types/DotIndicator/index.d.ts +31 -0
- package/types/DotIndicator/index.d.ts.map +1 -0
- package/types/DropdownMenu/index.d.ts +115 -0
- package/types/DropdownMenu/index.d.ts.map +1 -0
- package/types/ErrorBoundary/index.d.ts +18 -0
- package/types/ErrorBoundary/index.d.ts.map +1 -0
- package/types/Pagination.d.ts +48 -0
- package/types/Pagination.d.ts.map +1 -0
- package/types/ProgressSteps/index.d.ts +40 -0
- package/types/ProgressSteps/index.d.ts.map +1 -0
- package/types/Quote/index.d.ts +21 -0
- package/types/Quote/index.d.ts.map +1 -0
- package/types/SheetModal/index.d.ts +27 -0
- package/types/SheetModal/index.d.ts.map +1 -0
- package/types/SheetModal/index.native.d.ts +22 -0
- package/types/SheetModal/index.native.d.ts.map +1 -0
- package/types/Skeleton/index.d.ts +2 -0
- package/types/Skeleton/index.d.ts.map +1 -0
- package/types/SkipLink/index.d.ts +30 -0
- package/types/SkipLink/index.d.ts.map +1 -0
- package/types/Tabs/index.d.ts +394 -0
- package/types/Tabs/index.d.ts.map +1 -0
- package/types/Toast/index.d.ts +75 -0
- package/types/Toast/index.d.ts.map +1 -0
- package/types/Toast/store.d.ts +61 -0
- package/types/Toast/store.d.ts.map +1 -0
- package/types/Tooltip/index.d.ts +62 -0
- package/types/Tooltip/index.d.ts.map +1 -0
- package/types/Video/VideoFrame.d.ts +9 -0
- package/types/Video/VideoFrame.d.ts.map +1 -0
- package/types/Video/index.d.ts +9 -0
- package/types/Video/index.d.ts.map +1 -0
- package/types/Video/index.native.d.ts +8 -0
- package/types/Video/index.native.d.ts.map +1 -0
- package/types/Video/types.d.ts +17 -0
- package/types/Video/types.d.ts.map +1 -0
- package/types/Wheel/index.d.ts +41 -0
- package/types/Wheel/index.d.ts.map +1 -0
- package/types/actions/ActionBar.d.ts +34 -0
- package/types/actions/ActionBar.d.ts.map +1 -0
- package/types/actions/DestructiveAction.d.ts +49 -0
- package/types/actions/DestructiveAction.d.ts.map +1 -0
- package/types/actions/devWarn.d.ts +12 -0
- package/types/actions/devWarn.d.ts.map +1 -0
- package/types/actions/index.d.ts +6 -0
- package/types/actions/index.d.ts.map +1 -0
- package/types/actions/severity.d.ts +24 -0
- package/types/actions/severity.d.ts.map +1 -0
- package/types/charts/Axis.d.ts +43 -0
- package/types/charts/Axis.d.ts.map +1 -0
- package/types/charts/BarChart.d.ts +35 -0
- package/types/charts/BarChart.d.ts.map +1 -0
- package/types/charts/ChartSurface.d.ts +34 -0
- package/types/charts/ChartSurface.d.ts.map +1 -0
- package/types/charts/LineChart.d.ts +39 -0
- package/types/charts/LineChart.d.ts.map +1 -0
- package/types/charts/PieChart.d.ts +37 -0
- package/types/charts/PieChart.d.ts.map +1 -0
- package/types/charts/Sparkline.d.ts +27 -0
- package/types/charts/Sparkline.d.ts.map +1 -0
- package/types/charts/accessibility.d.ts +39 -0
- package/types/charts/accessibility.d.ts.map +1 -0
- package/types/charts/composeChart.d.ts +41 -0
- package/types/charts/composeChart.d.ts.map +1 -0
- package/types/charts/index.d.ts +12 -0
- package/types/charts/index.d.ts.map +1 -0
- package/types/charts/math.d.ts +115 -0
- package/types/charts/math.d.ts.map +1 -0
- package/types/charts/series.d.ts +85 -0
- package/types/charts/series.d.ts.map +1 -0
- package/types/charts/svg.d.ts +42 -0
- package/types/charts/svg.d.ts.map +1 -0
- package/types/charts/types.d.ts +49 -0
- package/types/charts/types.d.ts.map +1 -0
- package/types/charts/useChartTheme.d.ts +44 -0
- package/types/charts/useChartTheme.d.ts.map +1 -0
- package/types/code/Code/index.d.ts +30 -0
- package/types/code/Code/index.d.ts.map +1 -0
- package/types/code/CodeBlock/index.d.ts +25 -0
- package/types/code/CodeBlock/index.d.ts.map +1 -0
- package/types/code/HighlightedCode/index.d.ts +24 -0
- package/types/code/HighlightedCode/index.d.ts.map +1 -0
- package/types/code/Highlighter/index.d.ts +33 -0
- package/types/code/Highlighter/index.d.ts.map +1 -0
- package/types/code/Pre/index.d.ts +8 -0
- package/types/code/Pre/index.d.ts.map +1 -0
- package/types/code/index.d.ts +6 -0
- package/types/code/index.d.ts.map +1 -0
- package/types/componentColors.d.ts +98 -0
- package/types/componentColors.d.ts.map +1 -0
- package/types/feedback/ConfirmDialog.d.ts +62 -0
- package/types/feedback/ConfirmDialog.d.ts.map +1 -0
- package/types/feedback/NotifyHost.d.ts +26 -0
- package/types/feedback/NotifyHost.d.ts.map +1 -0
- package/types/feedback/index.d.ts +6 -0
- package/types/feedback/index.d.ts.map +1 -0
- package/types/feedback/notify.d.ts +16 -0
- package/types/feedback/notify.d.ts.map +1 -0
- package/types/feedback/route.d.ts +67 -0
- package/types/feedback/route.d.ts.map +1 -0
- package/types/feedback/store.d.ts +25 -0
- package/types/feedback/store.d.ts.map +1 -0
- package/types/hooks/index.d.ts +5 -0
- package/types/hooks/index.d.ts.map +1 -0
- package/types/hooks/useAssets/index.d.ts +3 -0
- package/types/hooks/useAssets/index.d.ts.map +1 -0
- package/types/hooks/useAssets/index.native.d.ts +4 -0
- package/types/hooks/useAssets/index.native.d.ts.map +1 -0
- package/types/hooks/useClipboard.d.ts +23 -0
- package/types/hooks/useClipboard.d.ts.map +1 -0
- package/types/hooks/useDirection.d.ts +29 -0
- package/types/hooks/useDirection.d.ts.map +1 -0
- package/types/hooks/useDirection.native.d.ts +11 -0
- package/types/hooks/useDirection.native.d.ts.map +1 -0
- package/types/hooks/useDocumentTitle.d.ts +41 -0
- package/types/hooks/useDocumentTitle.d.ts.map +1 -0
- package/types/icons/CheckRegular.d.ts +11 -0
- package/types/icons/CheckRegular.d.ts.map +1 -0
- package/types/icons/MinusRegular.d.ts +11 -0
- package/types/icons/MinusRegular.d.ts.map +1 -0
- package/types/icons/index.d.ts +4 -0
- package/types/icons/index.d.ts.map +1 -0
- package/types/icons/lucide.d.ts +4 -0
- package/types/icons/lucide.d.ts.map +1 -0
- package/types/icons/themed.d.ts +3 -0
- package/types/icons/themed.d.ts.map +1 -0
- package/types/images/Image/index.d.ts +4 -0
- package/types/images/Image/index.d.ts.map +1 -0
- package/types/images/Image/index.native.d.ts +4 -0
- package/types/images/Image/index.native.d.ts.map +1 -0
- package/types/images/Image/types.d.ts +8 -0
- package/types/images/Image/types.d.ts.map +1 -0
- package/types/images/Svg/index.d.ts +5 -0
- package/types/images/Svg/index.d.ts.map +1 -0
- package/types/images/Svg/index.native.d.ts +4 -0
- package/types/images/Svg/index.native.d.ts.map +1 -0
- package/types/images/SvgUri/index.d.ts +12 -0
- package/types/images/SvgUri/index.d.ts.map +1 -0
- package/types/images/SvgUri/index.native.d.ts +5 -0
- package/types/images/SvgUri/index.native.d.ts.map +1 -0
- package/types/images/index.d.ts +4 -0
- package/types/images/index.d.ts.map +1 -0
- package/types/index.d.ts +52 -0
- package/types/index.d.ts.map +1 -0
- package/types/layouts/AsyncBoundary.d.ts +94 -0
- package/types/layouts/AsyncBoundary.d.ts.map +1 -0
- package/types/layouts/Debug/index.d.ts +17 -0
- package/types/layouts/Debug/index.d.ts.map +1 -0
- package/types/layouts/KeyboardAvoidingWrapper/index.d.ts +29 -0
- package/types/layouts/KeyboardAvoidingWrapper/index.d.ts.map +1 -0
- package/types/layouts/KeyboardAvoidingWrapper/index.native.d.ts +29 -0
- package/types/layouts/KeyboardAvoidingWrapper/index.native.d.ts.map +1 -0
- package/types/layouts/PageTemplates.d.ts +94 -0
- package/types/layouts/PageTemplates.d.ts.map +1 -0
- package/types/layouts/PaneScaffold.d.ts +83 -0
- package/types/layouts/PaneScaffold.d.ts.map +1 -0
- package/types/layouts/SafeAreaWrapper/index.d.ts +24 -0
- package/types/layouts/SafeAreaWrapper/index.d.ts.map +1 -0
- package/types/layouts/SafeAreaWrapper/index.native.d.ts +25 -0
- package/types/layouts/SafeAreaWrapper/index.native.d.ts.map +1 -0
- package/types/layouts/ViewSwitcher.d.ts +27 -0
- package/types/layouts/ViewSwitcher.d.ts.map +1 -0
- package/types/layouts/attachments.d.ts +91 -0
- package/types/layouts/attachments.d.ts.map +1 -0
- package/types/layouts/breadcrumbs.d.ts +17 -0
- package/types/layouts/breadcrumbs.d.ts.map +1 -0
- package/types/layouts/index.d.ts +16 -0
- package/types/layouts/index.d.ts.map +1 -0
- package/types/layouts/page.d.ts +138 -0
- package/types/layouts/page.d.ts.map +1 -0
- package/types/layouts/pageHeadingScope.d.ts +43 -0
- package/types/layouts/pageHeadingScope.d.ts.map +1 -0
- package/types/layouts/sidebar.d.ts +25 -0
- package/types/layouts/sidebar.d.ts.map +1 -0
- package/types/layouts/tags.d.ts +72 -0
- package/types/layouts/tags.d.ts.map +1 -0
- package/types/layouts/timeline.d.ts +148 -0
- package/types/layouts/timeline.d.ts.map +1 -0
- package/types/layouts/toolbar.d.ts +33 -0
- package/types/layouts/toolbar.d.ts.map +1 -0
- package/types/shared/actionScan.d.ts +16 -0
- package/types/shared/actionScan.d.ts.map +1 -0
- package/types/shared/t.d.ts +18 -0
- package/types/shared/t.d.ts.map +1 -0
- package/types/shared/useReturnFocusOnClose.d.ts +18 -0
- package/types/shared/useReturnFocusOnClose.d.ts.map +1 -0
- package/types/surfaces.d.ts +294 -0
- package/types/surfaces.d.ts.map +1 -0
- package/types/tamagui.d.ts +10 -0
- package/types/tamagui.d.ts.map +1 -0
- package/types/testSetup.d.ts +2 -0
- package/types/testSetup.d.ts.map +1 -0
- package/types/utils/setTinted.d.ts +5 -0
- package/types/utils/setTinted.d.ts.map +1 -0
- package/types/utils/unwrapText.d.ts +3 -0
- package/types/utils/unwrapText.d.ts.map +1 -0
- package/types/views/Calendar.d.ts +135 -0
- package/types/views/Calendar.d.ts.map +1 -0
- package/types/views/Dashboard.d.ts +175 -0
- package/types/views/Dashboard.d.ts.map +1 -0
- package/types/views/Gantt.d.ts +121 -0
- package/types/views/Gantt.d.ts.map +1 -0
- package/types/views/ImageGrid.d.ts +82 -0
- package/types/views/ImageGrid.d.ts.map +1 -0
- package/types/views/Kanban.d.ts +123 -0
- package/types/views/Kanban.d.ts.map +1 -0
- package/types/views/Kanban.native.d.ts +102 -0
- package/types/views/Kanban.native.d.ts.map +1 -0
- package/types/views/List.d.ts +82 -0
- package/types/views/List.d.ts.map +1 -0
- package/types/views/ReportBuilder.d.ts +83 -0
- package/types/views/ReportBuilder.d.ts.map +1 -0
- package/types/views/TreeView.d.ts +110 -0
- package/types/views/TreeView.d.ts.map +1 -0
- package/types/views/calendarMath.d.ts +95 -0
- package/types/views/calendarMath.d.ts.map +1 -0
- package/types/views/ganttMath.d.ts +122 -0
- package/types/views/ganttMath.d.ts.map +1 -0
- package/types/views/index.d.ts +12 -0
- package/types/views/index.d.ts.map +1 -0
- package/types/views/kanbanDnd.d.ts +170 -0
- package/types/views/kanbanDnd.d.ts.map +1 -0
- package/types/views/treeViewDnd.d.ts +164 -0
- package/types/views/treeViewDnd.d.ts.map +1 -0
- package/types/views/treeViewMotion.d.ts +51 -0
- package/types/views/treeViewMotion.d.ts.map +1 -0
- package/dist/cjs/Badge/Badge.stories.cjs +0 -495
- package/dist/cjs/Badge/Badge.stories.native.js +0 -525
- package/dist/cjs/Badge/Badge.stories.native.js.map +0 -1
- package/dist/cjs/Carousel/Carousel.stories.cjs +0 -336
- package/dist/cjs/Carousel/Carousel.stories.native.js +0 -396
- package/dist/cjs/Carousel/Carousel.stories.native.js.map +0 -1
- package/dist/cjs/Chip/Chip.stories.cjs +0 -257
- package/dist/cjs/Chip/Chip.stories.native.js +0 -286
- package/dist/cjs/Chip/Chip.stories.native.js.map +0 -1
- package/dist/cjs/DotIndicator/DotIndicator.stories.cjs +0 -284
- package/dist/cjs/DotIndicator/DotIndicator.stories.native.js +0 -308
- package/dist/cjs/DotIndicator/DotIndicator.stories.native.js.map +0 -1
- package/dist/cjs/ErrorBoundary/ErrorBoundary.spec.cjs +0 -48
- package/dist/cjs/ErrorBoundary/ErrorBoundary.spec.native.js +0 -51
- package/dist/cjs/ErrorBoundary/ErrorBoundary.spec.native.js.map +0 -1
- package/dist/cjs/ErrorBoundary/ErrorBoundary.stories.cjs +0 -164
- package/dist/cjs/ErrorBoundary/ErrorBoundary.stories.native.js +0 -181
- package/dist/cjs/ErrorBoundary/ErrorBoundary.stories.native.js.map +0 -1
- package/dist/cjs/Pagination.stories.cjs +0 -178
- package/dist/cjs/Pagination.stories.native.js +0 -197
- package/dist/cjs/Pagination.stories.native.js.map +0 -1
- package/dist/cjs/Skeleton/Skeleton.stories.cjs +0 -434
- package/dist/cjs/Skeleton/Skeleton.stories.native.js +0 -465
- package/dist/cjs/Skeleton/Skeleton.stories.native.js.map +0 -1
- package/dist/cjs/Tooltip/Tooltip.stories.cjs +0 -105
- package/dist/cjs/Tooltip/Tooltip.stories.native.js +0 -114
- package/dist/cjs/Tooltip/Tooltip.stories.native.js.map +0 -1
- package/dist/cjs/Wheel/Wheel.stories.cjs +0 -353
- package/dist/cjs/Wheel/Wheel.stories.native.js +0 -382
- package/dist/cjs/Wheel/Wheel.stories.native.js.map +0 -1
- package/dist/cjs/code/Code/Code.stories.cjs +0 -46
- package/dist/cjs/code/Code/Code.stories.native.js +0 -49
- package/dist/cjs/code/Code/Code.stories.native.js.map +0 -1
- package/dist/cjs/code/Code/code.spec.cjs +0 -65
- package/dist/cjs/code/Code/code.spec.native.js +0 -68
- package/dist/cjs/code/Code/code.spec.native.js.map +0 -1
- package/dist/cjs/code/CodeBlock/CodeBlock.spec.cjs +0 -73
- package/dist/cjs/code/CodeBlock/CodeBlock.spec.native.js +0 -76
- package/dist/cjs/code/CodeBlock/CodeBlock.spec.native.js.map +0 -1
- package/dist/cjs/code/CodeBlock/codeBlock.stories.cjs +0 -57
- package/dist/cjs/code/CodeBlock/codeBlock.stories.native.js +0 -60
- package/dist/cjs/code/CodeBlock/codeBlock.stories.native.js.map +0 -1
- package/dist/cjs/code/HighlightedCode/HighlightedCode.stories.cjs +0 -123
- package/dist/cjs/code/HighlightedCode/HighlightedCode.stories.native.js +0 -134
- package/dist/cjs/code/HighlightedCode/HighlightedCode.stories.native.js.map +0 -1
- package/dist/cjs/code/Pre/Pre.stories.cjs +0 -135
- package/dist/cjs/code/Pre/Pre.stories.native.js +0 -148
- package/dist/cjs/code/Pre/Pre.stories.native.js.map +0 -1
- package/dist/cjs/code/Pre/pre.spec.cjs +0 -139
- package/dist/cjs/code/Pre/pre.spec.native.js +0 -145
- package/dist/cjs/code/Pre/pre.spec.native.js.map +0 -1
- package/dist/cjs/code/code.spec.cjs +0 -46
- package/dist/cjs/code/code.spec.native.js +0 -49
- package/dist/cjs/code/code.spec.native.js.map +0 -1
- package/dist/cjs/hooks/useAssets/useAssets.spec.cjs +0 -200
- package/dist/cjs/hooks/useAssets/useAssets.spec.native.js +0 -249
- package/dist/cjs/hooks/useAssets/useAssets.spec.native.js.map +0 -1
- package/dist/cjs/hooks/useClipboard.spec.cjs +0 -165
- package/dist/cjs/hooks/useClipboard.spec.native.js +0 -184
- package/dist/cjs/hooks/useClipboard.spec.native.js.map +0 -1
- package/dist/cjs/icons/icons.spec.cjs +0 -33
- package/dist/cjs/icons/icons.spec.native.js +0 -36
- package/dist/cjs/icons/icons.spec.native.js.map +0 -1
- package/dist/cjs/images/Image/Image.spec.cjs +0 -238
- package/dist/cjs/images/Image/Image.spec.native.js +0 -241
- package/dist/cjs/images/Image/Image.spec.native.js.map +0 -1
- package/dist/cjs/images/Image/Image.stories.cjs +0 -184
- package/dist/cjs/images/Image/Image.stories.native.js +0 -191
- package/dist/cjs/images/Image/Image.stories.native.js.map +0 -1
- package/dist/cjs/images/Svg/Svg.stories.cjs +0 -54
- package/dist/cjs/images/Svg/Svg.stories.native.js +0 -59
- package/dist/cjs/images/Svg/Svg.stories.native.js.map +0 -1
- package/dist/cjs/images/Svg/svg.spec.cjs +0 -186
- package/dist/cjs/images/Svg/svg.spec.native.js +0 -189
- package/dist/cjs/images/Svg/svg.spec.native.js.map +0 -1
- package/dist/cjs/images/SvgUri/SvgUri.spec.cjs +0 -160
- package/dist/cjs/images/SvgUri/SvgUri.spec.native.js +0 -168
- package/dist/cjs/images/SvgUri/SvgUri.spec.native.js.map +0 -1
- package/dist/cjs/images/SvgUri/SvgUri.stories.cjs +0 -123
- package/dist/cjs/images/SvgUri/SvgUri.stories.native.js +0 -136
- package/dist/cjs/images/SvgUri/SvgUri.stories.native.js.map +0 -1
- package/dist/cjs/images/images.spec.cjs +0 -104
- package/dist/cjs/images/images.spec.native.js +0 -107
- package/dist/cjs/images/images.spec.native.js.map +0 -1
- package/dist/cjs/layouts/Attachments.stories.cjs +0 -192
- package/dist/cjs/layouts/Attachments.stories.native.js +0 -217
- package/dist/cjs/layouts/Attachments.stories.native.js.map +0 -1
- package/dist/cjs/layouts/Breadcrumbs.stories.cjs +0 -67
- package/dist/cjs/layouts/Breadcrumbs.stories.native.js +0 -76
- package/dist/cjs/layouts/Breadcrumbs.stories.native.js.map +0 -1
- package/dist/cjs/layouts/Debug/DebugLayout.stories.cjs +0 -48
- package/dist/cjs/layouts/Debug/DebugLayout.stories.native.js +0 -55
- package/dist/cjs/layouts/Debug/DebugLayout.stories.native.js.map +0 -1
- package/dist/cjs/layouts/Debug/debug.spec.cjs +0 -198
- package/dist/cjs/layouts/Debug/debug.spec.native.js +0 -233
- package/dist/cjs/layouts/Debug/debug.spec.native.js.map +0 -1
- package/dist/cjs/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.cjs +0 -62
- package/dist/cjs/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.native.js +0 -67
- package/dist/cjs/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.native.js.map +0 -1
- package/dist/cjs/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.cjs +0 -58
- package/dist/cjs/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.native.js +0 -63
- package/dist/cjs/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.native.js.map +0 -1
- package/dist/cjs/layouts/Sidebar.stories.cjs +0 -98
- package/dist/cjs/layouts/Sidebar.stories.native.js +0 -103
- package/dist/cjs/layouts/Sidebar.stories.native.js.map +0 -1
- package/dist/cjs/layouts/Tags.stories.cjs +0 -205
- package/dist/cjs/layouts/Tags.stories.native.js +0 -232
- package/dist/cjs/layouts/Tags.stories.native.js.map +0 -1
- package/dist/cjs/layouts/Timeline.stories.cjs +0 -212
- package/dist/cjs/layouts/Timeline.stories.native.js +0 -241
- package/dist/cjs/layouts/Timeline.stories.native.js.map +0 -1
- package/dist/cjs/layouts/Toolbar.stories.cjs +0 -90
- package/dist/cjs/layouts/Toolbar.stories.native.js +0 -97
- package/dist/cjs/layouts/Toolbar.stories.native.js.map +0 -1
- package/dist/cjs/layouts/ViewSwitcher.stories.cjs +0 -70
- package/dist/cjs/layouts/ViewSwitcher.stories.native.js +0 -75
- package/dist/cjs/layouts/ViewSwitcher.stories.native.js.map +0 -1
- package/dist/cjs/layouts/layouts.spec.cjs +0 -249
- package/dist/cjs/layouts/layouts.spec.native.js +0 -272
- package/dist/cjs/layouts/layouts.spec.native.js.map +0 -1
- package/dist/cjs/src.spec.cjs +0 -6
- package/dist/cjs/src.spec.native.js +0 -9
- package/dist/cjs/src.spec.native.js.map +0 -1
- package/dist/cjs/utils/utils.spec.cjs +0 -58
- package/dist/cjs/utils/utils.spec.native.js +0 -61
- package/dist/cjs/utils/utils.spec.native.js.map +0 -1
- package/dist/cjs/views/Calendar.stories.cjs +0 -66
- package/dist/cjs/views/Calendar.stories.native.js +0 -73
- package/dist/cjs/views/Calendar.stories.native.js.map +0 -1
- package/dist/cjs/views/Dashboard.stories.cjs +0 -95
- package/dist/cjs/views/Dashboard.stories.native.js +0 -100
- package/dist/cjs/views/Dashboard.stories.native.js.map +0 -1
- package/dist/cjs/views/ImageGrid.stories.cjs +0 -68
- package/dist/cjs/views/ImageGrid.stories.native.js +0 -79
- package/dist/cjs/views/ImageGrid.stories.native.js.map +0 -1
- package/dist/cjs/views/Kanban.stories.cjs +0 -82
- package/dist/cjs/views/Kanban.stories.native.js +0 -91
- package/dist/cjs/views/Kanban.stories.native.js.map +0 -1
- package/dist/cjs/views/List.stories.cjs +0 -74
- package/dist/cjs/views/List.stories.native.js +0 -85
- package/dist/cjs/views/List.stories.native.js.map +0 -1
- package/dist/cjs/views/ReportBuilder.stories.cjs +0 -89
- package/dist/cjs/views/ReportBuilder.stories.native.js +0 -96
- package/dist/cjs/views/ReportBuilder.stories.native.js.map +0 -1
- package/dist/cjs/views/TreeView.stories.cjs +0 -94
- package/dist/cjs/views/TreeView.stories.native.js +0 -101
- package/dist/cjs/views/TreeView.stories.native.js.map +0 -1
- package/dist/cjs/views/hotkeys.spec.cjs +0 -210
- package/dist/cjs/views/hotkeys.spec.native.js +0 -253
- package/dist/cjs/views/hotkeys.spec.native.js.map +0 -1
- package/dist/cjs/views/views.spec.cjs +0 -313
- package/dist/cjs/views/views.spec.native.js +0 -344
- package/dist/cjs/views/views.spec.native.js.map +0 -1
- package/dist/esm/Badge/Badge.stories.mjs +0 -459
- package/dist/esm/Badge/Badge.stories.mjs.map +0 -1
- package/dist/esm/Badge/Badge.stories.native.js +0 -486
- package/dist/esm/Badge/Badge.stories.native.js.map +0 -1
- package/dist/esm/Carousel/Carousel.stories.mjs +0 -299
- package/dist/esm/Carousel/Carousel.stories.mjs.map +0 -1
- package/dist/esm/Carousel/Carousel.stories.native.js +0 -356
- package/dist/esm/Carousel/Carousel.stories.native.js.map +0 -1
- package/dist/esm/Chip/Chip.stories.mjs +0 -225
- package/dist/esm/Chip/Chip.stories.mjs.map +0 -1
- package/dist/esm/Chip/Chip.stories.native.js +0 -251
- package/dist/esm/Chip/Chip.stories.native.js.map +0 -1
- package/dist/esm/DotIndicator/DotIndicator.stories.mjs +0 -252
- package/dist/esm/DotIndicator/DotIndicator.stories.mjs.map +0 -1
- package/dist/esm/DotIndicator/DotIndicator.stories.native.js +0 -273
- package/dist/esm/DotIndicator/DotIndicator.stories.native.js.map +0 -1
- package/dist/esm/ErrorBoundary/ErrorBoundary.spec.mjs +0 -49
- package/dist/esm/ErrorBoundary/ErrorBoundary.spec.mjs.map +0 -1
- package/dist/esm/ErrorBoundary/ErrorBoundary.spec.native.js +0 -49
- package/dist/esm/ErrorBoundary/ErrorBoundary.spec.native.js.map +0 -1
- package/dist/esm/ErrorBoundary/ErrorBoundary.stories.mjs +0 -134
- package/dist/esm/ErrorBoundary/ErrorBoundary.stories.mjs.map +0 -1
- package/dist/esm/ErrorBoundary/ErrorBoundary.stories.native.js +0 -148
- package/dist/esm/ErrorBoundary/ErrorBoundary.stories.native.js.map +0 -1
- package/dist/esm/Pagination.stories.mjs +0 -145
- package/dist/esm/Pagination.stories.mjs.map +0 -1
- package/dist/esm/Pagination.stories.native.js +0 -161
- package/dist/esm/Pagination.stories.native.js.map +0 -1
- package/dist/esm/Skeleton/Skeleton.stories.mjs +0 -398
- package/dist/esm/Skeleton/Skeleton.stories.mjs.map +0 -1
- package/dist/esm/Skeleton/Skeleton.stories.native.js +0 -426
- package/dist/esm/Skeleton/Skeleton.stories.native.js.map +0 -1
- package/dist/esm/Tooltip/Tooltip.stories.mjs +0 -77
- package/dist/esm/Tooltip/Tooltip.stories.mjs.map +0 -1
- package/dist/esm/Tooltip/Tooltip.stories.native.js +0 -83
- package/dist/esm/Tooltip/Tooltip.stories.native.js.map +0 -1
- package/dist/esm/Wheel/Wheel.stories.mjs +0 -319
- package/dist/esm/Wheel/Wheel.stories.mjs.map +0 -1
- package/dist/esm/Wheel/Wheel.stories.native.js +0 -345
- package/dist/esm/Wheel/Wheel.stories.native.js.map +0 -1
- package/dist/esm/code/Code/Code.stories.mjs +0 -20
- package/dist/esm/code/Code/Code.stories.mjs.map +0 -1
- package/dist/esm/code/Code/Code.stories.native.js +0 -20
- package/dist/esm/code/Code/Code.stories.native.js.map +0 -1
- package/dist/esm/code/Code/code.spec.mjs +0 -66
- package/dist/esm/code/Code/code.spec.mjs.map +0 -1
- package/dist/esm/code/Code/code.spec.native.js +0 -66
- package/dist/esm/code/Code/code.spec.native.js.map +0 -1
- package/dist/esm/code/CodeBlock/CodeBlock.spec.mjs +0 -74
- package/dist/esm/code/CodeBlock/CodeBlock.spec.mjs.map +0 -1
- package/dist/esm/code/CodeBlock/CodeBlock.spec.native.js +0 -74
- package/dist/esm/code/CodeBlock/CodeBlock.spec.native.js.map +0 -1
- package/dist/esm/code/CodeBlock/codeBlock.stories.mjs +0 -31
- package/dist/esm/code/CodeBlock/codeBlock.stories.mjs.map +0 -1
- package/dist/esm/code/CodeBlock/codeBlock.stories.native.js +0 -31
- package/dist/esm/code/CodeBlock/codeBlock.stories.native.js.map +0 -1
- package/dist/esm/code/HighlightedCode/HighlightedCode.stories.mjs +0 -94
- package/dist/esm/code/HighlightedCode/HighlightedCode.stories.mjs.map +0 -1
- package/dist/esm/code/HighlightedCode/HighlightedCode.stories.native.js +0 -102
- package/dist/esm/code/HighlightedCode/HighlightedCode.stories.native.js.map +0 -1
- package/dist/esm/code/Pre/Pre.stories.mjs +0 -105
- package/dist/esm/code/Pre/Pre.stories.mjs.map +0 -1
- package/dist/esm/code/Pre/Pre.stories.native.js +0 -115
- package/dist/esm/code/Pre/Pre.stories.native.js.map +0 -1
- package/dist/esm/code/Pre/pre.spec.mjs +0 -140
- package/dist/esm/code/Pre/pre.spec.mjs.map +0 -1
- package/dist/esm/code/Pre/pre.spec.native.js +0 -143
- package/dist/esm/code/Pre/pre.spec.native.js.map +0 -1
- package/dist/esm/code/code.spec.mjs +0 -47
- package/dist/esm/code/code.spec.mjs.map +0 -1
- package/dist/esm/code/code.spec.native.js +0 -47
- package/dist/esm/code/code.spec.native.js.map +0 -1
- package/dist/esm/hooks/useAssets/useAssets.spec.mjs +0 -177
- package/dist/esm/hooks/useAssets/useAssets.spec.mjs.map +0 -1
- package/dist/esm/hooks/useAssets/useAssets.spec.native.js +0 -223
- package/dist/esm/hooks/useAssets/useAssets.spec.native.js.map +0 -1
- package/dist/esm/hooks/useClipboard.spec.mjs +0 -166
- package/dist/esm/hooks/useClipboard.spec.mjs.map +0 -1
- package/dist/esm/hooks/useClipboard.spec.native.js +0 -182
- package/dist/esm/hooks/useClipboard.spec.native.js.map +0 -1
- package/dist/esm/icons/icons.spec.mjs +0 -34
- package/dist/esm/icons/icons.spec.mjs.map +0 -1
- package/dist/esm/icons/icons.spec.native.js +0 -34
- package/dist/esm/icons/icons.spec.native.js.map +0 -1
- package/dist/esm/images/Image/Image.spec.mjs +0 -239
- package/dist/esm/images/Image/Image.spec.mjs.map +0 -1
- package/dist/esm/images/Image/Image.spec.native.js +0 -239
- package/dist/esm/images/Image/Image.spec.native.js.map +0 -1
- package/dist/esm/images/Image/Image.stories.mjs +0 -147
- package/dist/esm/images/Image/Image.stories.mjs.map +0 -1
- package/dist/esm/images/Image/Image.stories.native.js +0 -151
- package/dist/esm/images/Image/Image.stories.native.js.map +0 -1
- package/dist/esm/images/Svg/Svg.stories.mjs +0 -28
- package/dist/esm/images/Svg/Svg.stories.mjs.map +0 -1
- package/dist/esm/images/Svg/Svg.stories.native.js +0 -30
- package/dist/esm/images/Svg/Svg.stories.native.js.map +0 -1
- package/dist/esm/images/Svg/svg.spec.mjs +0 -187
- package/dist/esm/images/Svg/svg.spec.mjs.map +0 -1
- package/dist/esm/images/Svg/svg.spec.native.js +0 -187
- package/dist/esm/images/Svg/svg.spec.native.js.map +0 -1
- package/dist/esm/images/SvgUri/SvgUri.spec.mjs +0 -161
- package/dist/esm/images/SvgUri/SvgUri.spec.mjs.map +0 -1
- package/dist/esm/images/SvgUri/SvgUri.spec.native.js +0 -166
- package/dist/esm/images/SvgUri/SvgUri.spec.native.js.map +0 -1
- package/dist/esm/images/SvgUri/SvgUri.stories.mjs +0 -93
- package/dist/esm/images/SvgUri/SvgUri.stories.mjs.map +0 -1
- package/dist/esm/images/SvgUri/SvgUri.stories.native.js +0 -103
- package/dist/esm/images/SvgUri/SvgUri.stories.native.js.map +0 -1
- package/dist/esm/images/images.spec.mjs +0 -81
- package/dist/esm/images/images.spec.mjs.map +0 -1
- package/dist/esm/images/images.spec.native.js +0 -81
- package/dist/esm/images/images.spec.native.js.map +0 -1
- package/dist/esm/layouts/Attachments.stories.mjs +0 -162
- package/dist/esm/layouts/Attachments.stories.mjs.map +0 -1
- package/dist/esm/layouts/Attachments.stories.native.js +0 -184
- package/dist/esm/layouts/Attachments.stories.native.js.map +0 -1
- package/dist/esm/layouts/Breadcrumbs.stories.mjs +0 -41
- package/dist/esm/layouts/Breadcrumbs.stories.mjs.map +0 -1
- package/dist/esm/layouts/Breadcrumbs.stories.native.js +0 -47
- package/dist/esm/layouts/Breadcrumbs.stories.native.js.map +0 -1
- package/dist/esm/layouts/Debug/DebugLayout.stories.mjs +0 -22
- package/dist/esm/layouts/Debug/DebugLayout.stories.mjs.map +0 -1
- package/dist/esm/layouts/Debug/DebugLayout.stories.native.js +0 -26
- package/dist/esm/layouts/Debug/DebugLayout.stories.native.js.map +0 -1
- package/dist/esm/layouts/Debug/debug.spec.mjs +0 -199
- package/dist/esm/layouts/Debug/debug.spec.mjs.map +0 -1
- package/dist/esm/layouts/Debug/debug.spec.native.js +0 -231
- package/dist/esm/layouts/Debug/debug.spec.native.js.map +0 -1
- package/dist/esm/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.mjs +0 -36
- package/dist/esm/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.mjs.map +0 -1
- package/dist/esm/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.native.js +0 -38
- package/dist/esm/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.native.js.map +0 -1
- package/dist/esm/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.mjs +0 -32
- package/dist/esm/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.mjs.map +0 -1
- package/dist/esm/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.native.js +0 -34
- package/dist/esm/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.native.js.map +0 -1
- package/dist/esm/layouts/Sidebar.stories.mjs +0 -72
- package/dist/esm/layouts/Sidebar.stories.mjs.map +0 -1
- package/dist/esm/layouts/Sidebar.stories.native.js +0 -74
- package/dist/esm/layouts/Sidebar.stories.native.js.map +0 -1
- package/dist/esm/layouts/Tags.stories.mjs +0 -175
- package/dist/esm/layouts/Tags.stories.mjs.map +0 -1
- package/dist/esm/layouts/Tags.stories.native.js +0 -199
- package/dist/esm/layouts/Tags.stories.native.js.map +0 -1
- package/dist/esm/layouts/Timeline.stories.mjs +0 -181
- package/dist/esm/layouts/Timeline.stories.mjs.map +0 -1
- package/dist/esm/layouts/Timeline.stories.native.js +0 -207
- package/dist/esm/layouts/Timeline.stories.native.js.map +0 -1
- package/dist/esm/layouts/Toolbar.stories.mjs +0 -63
- package/dist/esm/layouts/Toolbar.stories.mjs.map +0 -1
- package/dist/esm/layouts/Toolbar.stories.native.js +0 -67
- package/dist/esm/layouts/Toolbar.stories.native.js.map +0 -1
- package/dist/esm/layouts/ViewSwitcher.stories.mjs +0 -44
- package/dist/esm/layouts/ViewSwitcher.stories.mjs.map +0 -1
- package/dist/esm/layouts/ViewSwitcher.stories.native.js +0 -46
- package/dist/esm/layouts/ViewSwitcher.stories.native.js.map +0 -1
- package/dist/esm/layouts/layouts.spec.mjs +0 -226
- package/dist/esm/layouts/layouts.spec.mjs.map +0 -1
- package/dist/esm/layouts/layouts.spec.native.js +0 -246
- package/dist/esm/layouts/layouts.spec.native.js.map +0 -1
- package/dist/esm/src.spec.mjs +0 -7
- package/dist/esm/src.spec.mjs.map +0 -1
- package/dist/esm/src.spec.native.js +0 -7
- package/dist/esm/src.spec.native.js.map +0 -1
- package/dist/esm/utils/utils.spec.mjs +0 -59
- package/dist/esm/utils/utils.spec.mjs.map +0 -1
- package/dist/esm/utils/utils.spec.native.js +0 -59
- package/dist/esm/utils/utils.spec.native.js.map +0 -1
- package/dist/esm/views/Calendar.stories.mjs +0 -40
- package/dist/esm/views/Calendar.stories.mjs.map +0 -1
- package/dist/esm/views/Calendar.stories.native.js +0 -44
- package/dist/esm/views/Calendar.stories.native.js.map +0 -1
- package/dist/esm/views/Dashboard.stories.mjs +0 -69
- package/dist/esm/views/Dashboard.stories.mjs.map +0 -1
- package/dist/esm/views/Dashboard.stories.native.js +0 -71
- package/dist/esm/views/Dashboard.stories.native.js.map +0 -1
- package/dist/esm/views/ImageGrid.stories.mjs +0 -42
- package/dist/esm/views/ImageGrid.stories.mjs.map +0 -1
- package/dist/esm/views/ImageGrid.stories.native.js +0 -50
- package/dist/esm/views/ImageGrid.stories.native.js.map +0 -1
- package/dist/esm/views/Kanban.stories.mjs +0 -56
- package/dist/esm/views/Kanban.stories.mjs.map +0 -1
- package/dist/esm/views/Kanban.stories.native.js +0 -62
- package/dist/esm/views/Kanban.stories.native.js.map +0 -1
- package/dist/esm/views/List.stories.mjs +0 -48
- package/dist/esm/views/List.stories.mjs.map +0 -1
- package/dist/esm/views/List.stories.native.js +0 -56
- package/dist/esm/views/List.stories.native.js.map +0 -1
- package/dist/esm/views/ReportBuilder.stories.mjs +0 -63
- package/dist/esm/views/ReportBuilder.stories.mjs.map +0 -1
- package/dist/esm/views/ReportBuilder.stories.native.js +0 -67
- package/dist/esm/views/ReportBuilder.stories.native.js.map +0 -1
- package/dist/esm/views/TreeView.stories.mjs +0 -68
- package/dist/esm/views/TreeView.stories.mjs.map +0 -1
- package/dist/esm/views/TreeView.stories.native.js +0 -72
- package/dist/esm/views/TreeView.stories.native.js.map +0 -1
- package/dist/esm/views/hotkeys.spec.mjs +0 -211
- package/dist/esm/views/hotkeys.spec.mjs.map +0 -1
- package/dist/esm/views/hotkeys.spec.native.js +0 -227
- package/dist/esm/views/hotkeys.spec.native.js.map +0 -1
- package/dist/esm/views/views.spec.mjs +0 -290
- package/dist/esm/views/views.spec.mjs.map +0 -1
- package/dist/esm/views/views.spec.native.js +0 -318
- package/dist/esm/views/views.spec.native.js.map +0 -1
- package/dist/jsx/Badge/Badge.stories.mjs +0 -459
- package/dist/jsx/Badge/Badge.stories.mjs.map +0 -1
- package/dist/jsx/Badge/Badge.stories.native.js +0 -525
- package/dist/jsx/Badge/Badge.stories.native.js.map +0 -1
- package/dist/jsx/Carousel/Carousel.stories.mjs +0 -299
- package/dist/jsx/Carousel/Carousel.stories.mjs.map +0 -1
- package/dist/jsx/Carousel/Carousel.stories.native.js +0 -396
- package/dist/jsx/Carousel/Carousel.stories.native.js.map +0 -1
- package/dist/jsx/Chip/Chip.stories.mjs +0 -225
- package/dist/jsx/Chip/Chip.stories.mjs.map +0 -1
- package/dist/jsx/Chip/Chip.stories.native.js +0 -286
- package/dist/jsx/Chip/Chip.stories.native.js.map +0 -1
- package/dist/jsx/DotIndicator/DotIndicator.stories.mjs +0 -252
- package/dist/jsx/DotIndicator/DotIndicator.stories.mjs.map +0 -1
- package/dist/jsx/DotIndicator/DotIndicator.stories.native.js +0 -308
- package/dist/jsx/DotIndicator/DotIndicator.stories.native.js.map +0 -1
- package/dist/jsx/ErrorBoundary/ErrorBoundary.spec.mjs +0 -49
- package/dist/jsx/ErrorBoundary/ErrorBoundary.spec.mjs.map +0 -1
- package/dist/jsx/ErrorBoundary/ErrorBoundary.spec.native.js +0 -51
- package/dist/jsx/ErrorBoundary/ErrorBoundary.spec.native.js.map +0 -1
- package/dist/jsx/ErrorBoundary/ErrorBoundary.stories.mjs +0 -134
- package/dist/jsx/ErrorBoundary/ErrorBoundary.stories.mjs.map +0 -1
- package/dist/jsx/ErrorBoundary/ErrorBoundary.stories.native.js +0 -181
- package/dist/jsx/ErrorBoundary/ErrorBoundary.stories.native.js.map +0 -1
- package/dist/jsx/Pagination.stories.mjs +0 -145
- package/dist/jsx/Pagination.stories.mjs.map +0 -1
- package/dist/jsx/Pagination.stories.native.js +0 -197
- package/dist/jsx/Pagination.stories.native.js.map +0 -1
- package/dist/jsx/Skeleton/Skeleton.stories.mjs +0 -398
- package/dist/jsx/Skeleton/Skeleton.stories.mjs.map +0 -1
- package/dist/jsx/Skeleton/Skeleton.stories.native.js +0 -465
- package/dist/jsx/Skeleton/Skeleton.stories.native.js.map +0 -1
- package/dist/jsx/Tooltip/Tooltip.stories.mjs +0 -77
- package/dist/jsx/Tooltip/Tooltip.stories.mjs.map +0 -1
- package/dist/jsx/Tooltip/Tooltip.stories.native.js +0 -114
- package/dist/jsx/Tooltip/Tooltip.stories.native.js.map +0 -1
- package/dist/jsx/Wheel/Wheel.stories.mjs +0 -319
- package/dist/jsx/Wheel/Wheel.stories.mjs.map +0 -1
- package/dist/jsx/Wheel/Wheel.stories.native.js +0 -382
- package/dist/jsx/Wheel/Wheel.stories.native.js.map +0 -1
- package/dist/jsx/code/Code/Code.stories.mjs +0 -20
- package/dist/jsx/code/Code/Code.stories.mjs.map +0 -1
- package/dist/jsx/code/Code/Code.stories.native.js +0 -49
- package/dist/jsx/code/Code/Code.stories.native.js.map +0 -1
- package/dist/jsx/code/Code/code.spec.mjs +0 -66
- package/dist/jsx/code/Code/code.spec.mjs.map +0 -1
- package/dist/jsx/code/Code/code.spec.native.js +0 -68
- package/dist/jsx/code/Code/code.spec.native.js.map +0 -1
- package/dist/jsx/code/CodeBlock/CodeBlock.spec.mjs +0 -74
- package/dist/jsx/code/CodeBlock/CodeBlock.spec.mjs.map +0 -1
- package/dist/jsx/code/CodeBlock/CodeBlock.spec.native.js +0 -76
- package/dist/jsx/code/CodeBlock/CodeBlock.spec.native.js.map +0 -1
- package/dist/jsx/code/CodeBlock/codeBlock.stories.mjs +0 -31
- package/dist/jsx/code/CodeBlock/codeBlock.stories.mjs.map +0 -1
- package/dist/jsx/code/CodeBlock/codeBlock.stories.native.js +0 -60
- package/dist/jsx/code/CodeBlock/codeBlock.stories.native.js.map +0 -1
- package/dist/jsx/code/HighlightedCode/HighlightedCode.stories.mjs +0 -94
- package/dist/jsx/code/HighlightedCode/HighlightedCode.stories.mjs.map +0 -1
- package/dist/jsx/code/HighlightedCode/HighlightedCode.stories.native.js +0 -134
- package/dist/jsx/code/HighlightedCode/HighlightedCode.stories.native.js.map +0 -1
- package/dist/jsx/code/Pre/Pre.stories.mjs +0 -105
- package/dist/jsx/code/Pre/Pre.stories.mjs.map +0 -1
- package/dist/jsx/code/Pre/Pre.stories.native.js +0 -148
- package/dist/jsx/code/Pre/Pre.stories.native.js.map +0 -1
- package/dist/jsx/code/Pre/pre.spec.mjs +0 -140
- package/dist/jsx/code/Pre/pre.spec.mjs.map +0 -1
- package/dist/jsx/code/Pre/pre.spec.native.js +0 -145
- package/dist/jsx/code/Pre/pre.spec.native.js.map +0 -1
- package/dist/jsx/code/code.spec.mjs +0 -47
- package/dist/jsx/code/code.spec.mjs.map +0 -1
- package/dist/jsx/code/code.spec.native.js +0 -49
- package/dist/jsx/code/code.spec.native.js.map +0 -1
- package/dist/jsx/hooks/useAssets/useAssets.spec.mjs +0 -177
- package/dist/jsx/hooks/useAssets/useAssets.spec.mjs.map +0 -1
- package/dist/jsx/hooks/useAssets/useAssets.spec.native.js +0 -249
- package/dist/jsx/hooks/useAssets/useAssets.spec.native.js.map +0 -1
- package/dist/jsx/hooks/useClipboard.spec.mjs +0 -166
- package/dist/jsx/hooks/useClipboard.spec.mjs.map +0 -1
- package/dist/jsx/hooks/useClipboard.spec.native.js +0 -184
- package/dist/jsx/hooks/useClipboard.spec.native.js.map +0 -1
- package/dist/jsx/icons/icons.spec.mjs +0 -34
- package/dist/jsx/icons/icons.spec.mjs.map +0 -1
- package/dist/jsx/icons/icons.spec.native.js +0 -36
- package/dist/jsx/icons/icons.spec.native.js.map +0 -1
- package/dist/jsx/images/Image/Image.spec.mjs +0 -239
- package/dist/jsx/images/Image/Image.spec.mjs.map +0 -1
- package/dist/jsx/images/Image/Image.spec.native.js +0 -241
- package/dist/jsx/images/Image/Image.spec.native.js.map +0 -1
- package/dist/jsx/images/Image/Image.stories.mjs +0 -147
- package/dist/jsx/images/Image/Image.stories.mjs.map +0 -1
- package/dist/jsx/images/Image/Image.stories.native.js +0 -191
- package/dist/jsx/images/Image/Image.stories.native.js.map +0 -1
- package/dist/jsx/images/Svg/Svg.stories.mjs +0 -28
- package/dist/jsx/images/Svg/Svg.stories.mjs.map +0 -1
- package/dist/jsx/images/Svg/Svg.stories.native.js +0 -59
- package/dist/jsx/images/Svg/Svg.stories.native.js.map +0 -1
- package/dist/jsx/images/Svg/svg.spec.mjs +0 -187
- package/dist/jsx/images/Svg/svg.spec.mjs.map +0 -1
- package/dist/jsx/images/Svg/svg.spec.native.js +0 -189
- package/dist/jsx/images/Svg/svg.spec.native.js.map +0 -1
- package/dist/jsx/images/SvgUri/SvgUri.spec.mjs +0 -161
- package/dist/jsx/images/SvgUri/SvgUri.spec.mjs.map +0 -1
- package/dist/jsx/images/SvgUri/SvgUri.spec.native.js +0 -168
- package/dist/jsx/images/SvgUri/SvgUri.spec.native.js.map +0 -1
- package/dist/jsx/images/SvgUri/SvgUri.stories.mjs +0 -93
- package/dist/jsx/images/SvgUri/SvgUri.stories.mjs.map +0 -1
- package/dist/jsx/images/SvgUri/SvgUri.stories.native.js +0 -136
- package/dist/jsx/images/SvgUri/SvgUri.stories.native.js.map +0 -1
- package/dist/jsx/images/images.spec.mjs +0 -81
- package/dist/jsx/images/images.spec.mjs.map +0 -1
- package/dist/jsx/images/images.spec.native.js +0 -107
- package/dist/jsx/images/images.spec.native.js.map +0 -1
- package/dist/jsx/layouts/Attachments.stories.mjs +0 -162
- package/dist/jsx/layouts/Attachments.stories.mjs.map +0 -1
- package/dist/jsx/layouts/Attachments.stories.native.js +0 -217
- package/dist/jsx/layouts/Attachments.stories.native.js.map +0 -1
- package/dist/jsx/layouts/Breadcrumbs.stories.mjs +0 -41
- package/dist/jsx/layouts/Breadcrumbs.stories.mjs.map +0 -1
- package/dist/jsx/layouts/Breadcrumbs.stories.native.js +0 -76
- package/dist/jsx/layouts/Breadcrumbs.stories.native.js.map +0 -1
- package/dist/jsx/layouts/Debug/DebugLayout.stories.mjs +0 -22
- package/dist/jsx/layouts/Debug/DebugLayout.stories.mjs.map +0 -1
- package/dist/jsx/layouts/Debug/DebugLayout.stories.native.js +0 -55
- package/dist/jsx/layouts/Debug/DebugLayout.stories.native.js.map +0 -1
- package/dist/jsx/layouts/Debug/debug.spec.mjs +0 -199
- package/dist/jsx/layouts/Debug/debug.spec.mjs.map +0 -1
- package/dist/jsx/layouts/Debug/debug.spec.native.js +0 -233
- package/dist/jsx/layouts/Debug/debug.spec.native.js.map +0 -1
- package/dist/jsx/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.mjs +0 -36
- package/dist/jsx/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.mjs.map +0 -1
- package/dist/jsx/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.native.js +0 -67
- package/dist/jsx/layouts/KeyboardAvoidingWrapper/KeyboardAvoidingWrapper.stories.native.js.map +0 -1
- package/dist/jsx/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.mjs +0 -32
- package/dist/jsx/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.mjs.map +0 -1
- package/dist/jsx/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.native.js +0 -63
- package/dist/jsx/layouts/SafeAreaWrapper/SafeAreaWrapper.stories.native.js.map +0 -1
- package/dist/jsx/layouts/Sidebar.stories.mjs +0 -72
- package/dist/jsx/layouts/Sidebar.stories.mjs.map +0 -1
- package/dist/jsx/layouts/Sidebar.stories.native.js +0 -103
- package/dist/jsx/layouts/Sidebar.stories.native.js.map +0 -1
- package/dist/jsx/layouts/Tags.stories.mjs +0 -175
- package/dist/jsx/layouts/Tags.stories.mjs.map +0 -1
- package/dist/jsx/layouts/Tags.stories.native.js +0 -232
- package/dist/jsx/layouts/Tags.stories.native.js.map +0 -1
- package/dist/jsx/layouts/Timeline.stories.mjs +0 -181
- package/dist/jsx/layouts/Timeline.stories.mjs.map +0 -1
- package/dist/jsx/layouts/Timeline.stories.native.js +0 -241
- package/dist/jsx/layouts/Timeline.stories.native.js.map +0 -1
- package/dist/jsx/layouts/Toolbar.stories.mjs +0 -63
- package/dist/jsx/layouts/Toolbar.stories.mjs.map +0 -1
- package/dist/jsx/layouts/Toolbar.stories.native.js +0 -97
- package/dist/jsx/layouts/Toolbar.stories.native.js.map +0 -1
- package/dist/jsx/layouts/ViewSwitcher.stories.mjs +0 -44
- package/dist/jsx/layouts/ViewSwitcher.stories.mjs.map +0 -1
- package/dist/jsx/layouts/ViewSwitcher.stories.native.js +0 -75
- package/dist/jsx/layouts/ViewSwitcher.stories.native.js.map +0 -1
- package/dist/jsx/layouts/layouts.spec.mjs +0 -226
- package/dist/jsx/layouts/layouts.spec.mjs.map +0 -1
- package/dist/jsx/layouts/layouts.spec.native.js +0 -272
- package/dist/jsx/layouts/layouts.spec.native.js.map +0 -1
- package/dist/jsx/src.spec.mjs +0 -7
- package/dist/jsx/src.spec.mjs.map +0 -1
- package/dist/jsx/src.spec.native.js +0 -9
- package/dist/jsx/src.spec.native.js.map +0 -1
- package/dist/jsx/utils/utils.spec.mjs +0 -59
- package/dist/jsx/utils/utils.spec.mjs.map +0 -1
- package/dist/jsx/utils/utils.spec.native.js +0 -61
- package/dist/jsx/utils/utils.spec.native.js.map +0 -1
- package/dist/jsx/views/Calendar.stories.mjs +0 -40
- package/dist/jsx/views/Calendar.stories.mjs.map +0 -1
- package/dist/jsx/views/Calendar.stories.native.js +0 -73
- package/dist/jsx/views/Calendar.stories.native.js.map +0 -1
- package/dist/jsx/views/Dashboard.stories.mjs +0 -69
- package/dist/jsx/views/Dashboard.stories.mjs.map +0 -1
- package/dist/jsx/views/Dashboard.stories.native.js +0 -100
- package/dist/jsx/views/Dashboard.stories.native.js.map +0 -1
- package/dist/jsx/views/ImageGrid.stories.mjs +0 -42
- package/dist/jsx/views/ImageGrid.stories.mjs.map +0 -1
- package/dist/jsx/views/ImageGrid.stories.native.js +0 -79
- package/dist/jsx/views/ImageGrid.stories.native.js.map +0 -1
- package/dist/jsx/views/Kanban.stories.mjs +0 -56
- package/dist/jsx/views/Kanban.stories.mjs.map +0 -1
- package/dist/jsx/views/Kanban.stories.native.js +0 -91
- package/dist/jsx/views/Kanban.stories.native.js.map +0 -1
- package/dist/jsx/views/List.stories.mjs +0 -48
- package/dist/jsx/views/List.stories.mjs.map +0 -1
- package/dist/jsx/views/List.stories.native.js +0 -85
- package/dist/jsx/views/List.stories.native.js.map +0 -1
- package/dist/jsx/views/ReportBuilder.stories.mjs +0 -63
- package/dist/jsx/views/ReportBuilder.stories.mjs.map +0 -1
- package/dist/jsx/views/ReportBuilder.stories.native.js +0 -96
- package/dist/jsx/views/ReportBuilder.stories.native.js.map +0 -1
- package/dist/jsx/views/TreeView.stories.mjs +0 -68
- package/dist/jsx/views/TreeView.stories.mjs.map +0 -1
- package/dist/jsx/views/TreeView.stories.native.js +0 -101
- package/dist/jsx/views/TreeView.stories.native.js.map +0 -1
- package/dist/jsx/views/hotkeys.spec.mjs +0 -211
- package/dist/jsx/views/hotkeys.spec.mjs.map +0 -1
- package/dist/jsx/views/hotkeys.spec.native.js +0 -253
- package/dist/jsx/views/hotkeys.spec.native.js.map +0 -1
- package/dist/jsx/views/views.spec.mjs +0 -290
- package/dist/jsx/views/views.spec.mjs.map +0 -1
- package/dist/jsx/views/views.spec.native.js +0 -344
- package/dist/jsx/views/views.spec.native.js.map +0 -1
package/src/views/Calendar.tsx
CHANGED
|
@@ -1,8 +1,43 @@
|
|
|
1
|
-
import { componentColors } from "../componentColors";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { componentColors, sectionHeading } from "../componentColors";
|
|
2
|
+
import { ViewSwitcher } from "../layouts/ViewSwitcher";
|
|
3
|
+
import { withInterp } from "../shared/t";
|
|
4
|
+
import {
|
|
5
|
+
MINUTES_PER_DAY,
|
|
6
|
+
computeResizeRange,
|
|
7
|
+
createRangeFromDrag,
|
|
8
|
+
eventAccessibleLabel,
|
|
9
|
+
formatTimeRangeLabel,
|
|
10
|
+
layoutDayBlocks,
|
|
11
|
+
minutesOfDay,
|
|
12
|
+
minutesToY,
|
|
13
|
+
moveFocusDate,
|
|
14
|
+
moveFocusSlot,
|
|
15
|
+
moveRangeToSlot,
|
|
16
|
+
snapMinutes,
|
|
17
|
+
yToMinutes,
|
|
18
|
+
type CalendarRange,
|
|
19
|
+
} from "./calendarMath";
|
|
20
|
+
import {
|
|
21
|
+
hairline,
|
|
22
|
+
hairlineWidth,
|
|
23
|
+
pressTargetHitSlop,
|
|
24
|
+
useReadableTextOn,
|
|
25
|
+
useResolvedKnobs,
|
|
26
|
+
} from "@multiplatform.one/theme";
|
|
27
|
+
import React, { useState, useMemo, useCallback, useEffect, useId, useRef } from "react";
|
|
28
|
+
import { useTranslation } from "react-i18next";
|
|
29
|
+
import { Button, FloatingPanel, Input, zIndex } from "@multiplatform.one/forms";
|
|
30
|
+
import {
|
|
31
|
+
AnimatePresence,
|
|
32
|
+
ScrollView,
|
|
33
|
+
Text,
|
|
34
|
+
XStack,
|
|
35
|
+
YStack,
|
|
36
|
+
isWeb,
|
|
37
|
+
styled,
|
|
38
|
+
type YStackProps,
|
|
39
|
+
} from "tamagui";
|
|
40
|
+
import { useDirection } from "../hooks/useDirection";
|
|
6
41
|
|
|
7
42
|
/**
|
|
8
43
|
* Calendar view type.
|
|
@@ -27,6 +62,84 @@ export interface CalendarEvent {
|
|
|
27
62
|
[key: string]: unknown;
|
|
28
63
|
}
|
|
29
64
|
|
|
65
|
+
/**
|
|
66
|
+
* New start/end range produced by an event drag-move.
|
|
67
|
+
*/
|
|
68
|
+
export interface CalendarEventMoveRange {
|
|
69
|
+
start: Date;
|
|
70
|
+
end: Date;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Draft payload emitted when a drag-to-create editor commits. */
|
|
74
|
+
export interface CalendarEventDraft {
|
|
75
|
+
title: string;
|
|
76
|
+
start: Date;
|
|
77
|
+
end: Date;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Readable chip text for an arbitrary consumer-supplied event color.
|
|
82
|
+
* White text on mid-tone brand hexes (#10b981, #f59e0b) measures 2-3.7:1 —
|
|
83
|
+
* pick black/white by WCAG relative luminance instead. Theme tokens fall
|
|
84
|
+
* back to $accentColor, the guaranteed pair for $accentBackground.
|
|
85
|
+
*
|
|
86
|
+
* The dark candidate is pure black: the old #1a1a1a candidate was scored
|
|
87
|
+
* against ideal black (L=0) but rendered at L=0.0103, overstating its own
|
|
88
|
+
* contrast — measured 4.11:1 on #8B5CF6 while claiming 4.96 (Axiom 15:
|
|
89
|
+
* foreground on fills is luminance-COMPUTED, and the computation must match
|
|
90
|
+
* the rendered pixels). Black keeps every sanctioned step-9 solid ≥ 4.5:1.
|
|
91
|
+
*/
|
|
92
|
+
/**
|
|
93
|
+
* Inline-END hairline rule (P-16 RTL mirroring): grid column separators sit
|
|
94
|
+
* on the logical end edge so the grid mirrors with the writing direction.
|
|
95
|
+
* Web needs the CSS-logical props + the low-DPI fallback class (tamagui's RN
|
|
96
|
+
* borderEndWidth does not compile to working CSS on web — SB-M-1215 pattern,
|
|
97
|
+
* same as Sidebar); native takes the RN logical prop.
|
|
98
|
+
*/
|
|
99
|
+
const hairlineEnd = isWeb
|
|
100
|
+
? {
|
|
101
|
+
borderInlineEndWidth: hairlineWidth,
|
|
102
|
+
borderInlineEndStyle: "solid" as any,
|
|
103
|
+
className: "mp-hairline-ie",
|
|
104
|
+
}
|
|
105
|
+
: { borderEndWidth: hairlineWidth };
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Interior grid-cell separators as OPTICS hairlines (device-pixel rules with
|
|
109
|
+
* the low-DPI fallback classes from the theme's hairline treatment). Edges
|
|
110
|
+
* are LOGICAL: `end` draws the inline-end rule, so interior-only separators
|
|
111
|
+
* stay interior under RTL (no doubled rule against the panel frame).
|
|
112
|
+
*/
|
|
113
|
+
function gridCellEdges(end: boolean, bottom: boolean) {
|
|
114
|
+
const className =
|
|
115
|
+
[end && "mp-hairline-ie", bottom && "mp-hairline-b"].filter(Boolean).join(" ") || undefined;
|
|
116
|
+
return {
|
|
117
|
+
...(end ? hairlineEnd : null),
|
|
118
|
+
borderBottomWidth: bottom ? hairlineWidth : 0,
|
|
119
|
+
...(isWeb && className ? { className } : null),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function eventChipTextColor(bg?: string): string {
|
|
124
|
+
if (!bg || !bg.startsWith("#")) return "$accentColor";
|
|
125
|
+
const hex = bg.slice(1);
|
|
126
|
+
const full =
|
|
127
|
+
hex.length === 3
|
|
128
|
+
? hex
|
|
129
|
+
.split("")
|
|
130
|
+
.map((c) => c + c)
|
|
131
|
+
.join("")
|
|
132
|
+
: hex.slice(0, 6);
|
|
133
|
+
const [r, g, b] = [0, 2, 4].map((i) => {
|
|
134
|
+
const c = Number.parseInt(full.slice(i, i + 2), 16) / 255;
|
|
135
|
+
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
136
|
+
});
|
|
137
|
+
const luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
138
|
+
const contrastWhite = 1.05 / (luminance + 0.05);
|
|
139
|
+
const contrastBlack = (luminance + 0.05) / 0.05;
|
|
140
|
+
return contrastWhite >= contrastBlack ? "#ffffff" : "#000000";
|
|
141
|
+
}
|
|
142
|
+
|
|
30
143
|
/**
|
|
31
144
|
* Props for the generic Calendar component.
|
|
32
145
|
*/
|
|
@@ -39,6 +152,28 @@ export interface CalendarProps extends Omit<YStackProps, "children"> {
|
|
|
39
152
|
onDateSelect?: (date: Date) => void;
|
|
40
153
|
/** Called when an event is clicked */
|
|
41
154
|
onEventClick?: (event: CalendarEvent) => void;
|
|
155
|
+
/**
|
|
156
|
+
* Called when an event chip is dragged onto another day (month view /
|
|
157
|
+
* all-day strip) or another time slot (week/day time grid).
|
|
158
|
+
* Web uses pointer + DOM hit-testing; native uses the responder system +
|
|
159
|
+
* measureInWindow hit-testing (best-effort — see calendar native DnD notes).
|
|
160
|
+
* Day-level moves preserve the event's time-of-day and calendar-day span
|
|
161
|
+
* (see {@link computeEventMoveRange}); slot-level moves preserve duration.
|
|
162
|
+
*/
|
|
163
|
+
onEventMove?: (event: CalendarEvent, range: CalendarEventMoveRange) => void;
|
|
164
|
+
/**
|
|
165
|
+
* Called when an event is resized from its top/bottom handle in the
|
|
166
|
+
* week/day time grid (web pointer only). Enables the resize handles.
|
|
167
|
+
*/
|
|
168
|
+
onEventResize?: (event: CalendarEvent, range: CalendarEventMoveRange) => void;
|
|
169
|
+
/**
|
|
170
|
+
* Called when a drag-to-create editor commits (outside click / Escape —
|
|
171
|
+
* live-commit, no Apply button; LC-21). Enables press-drag on the empty
|
|
172
|
+
* time grid and Enter-to-create on the focused slot.
|
|
173
|
+
*/
|
|
174
|
+
onEventCreate?: (draft: CalendarEventDraft) => void;
|
|
175
|
+
/** Enable drag of event chips (default: enabled when onEventMove is provided) */
|
|
176
|
+
enableEventDrag?: boolean;
|
|
42
177
|
/** Calendar view type (default: 'month') */
|
|
43
178
|
viewType?: CalendarViewType;
|
|
44
179
|
/** Initial date to display (defaults to today) */
|
|
@@ -51,6 +186,8 @@ export interface CalendarProps extends Omit<YStackProps, "children"> {
|
|
|
51
186
|
showViewSwitcher?: boolean;
|
|
52
187
|
/** First day of week: 0 = Sunday, 1 = Monday (default: 0) */
|
|
53
188
|
firstDayOfWeek?: 0 | 1;
|
|
189
|
+
/** Time-grid snap increment in minutes (default: 30) */
|
|
190
|
+
slotMinutes?: number;
|
|
54
191
|
}
|
|
55
192
|
|
|
56
193
|
// ---------------------------------------------------------------------------
|
|
@@ -95,7 +232,19 @@ function getWeekDays(date: Date, firstDayOfWeek: 0 | 1): Date[] {
|
|
|
95
232
|
}
|
|
96
233
|
|
|
97
234
|
function formatDateKey(date: Date): string {
|
|
98
|
-
|
|
235
|
+
const year = date.getFullYear();
|
|
236
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
237
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
238
|
+
return `${year}-${month}-${day}`;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function addMonths(date: Date, delta: number): Date {
|
|
242
|
+
const next = new Date(date);
|
|
243
|
+
next.setDate(1);
|
|
244
|
+
next.setMonth(next.getMonth() + delta);
|
|
245
|
+
const lastDay = new Date(next.getFullYear(), next.getMonth() + 1, 0).getDate();
|
|
246
|
+
next.setDate(Math.min(date.getDate(), lastDay));
|
|
247
|
+
return next;
|
|
99
248
|
}
|
|
100
249
|
|
|
101
250
|
function isSameDay(d1: Date, d2: Date): boolean {
|
|
@@ -110,6 +259,136 @@ function isToday(date: Date): boolean {
|
|
|
110
259
|
return isSameDay(date, new Date());
|
|
111
260
|
}
|
|
112
261
|
|
|
262
|
+
const MS_PER_DAY = 86_400_000;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Compute the new start/end range for an event dropped on `targetDay`.
|
|
266
|
+
*
|
|
267
|
+
* Shifts the event by whole calendar days: time-of-day of both start and end
|
|
268
|
+
* is preserved, and multi-day events keep their day span. (Across a DST
|
|
269
|
+
* boundary this preserves wall-clock times rather than exact millisecond
|
|
270
|
+
* duration.) Events without an `end` get a zero-duration range
|
|
271
|
+
* (`end` equals `start`).
|
|
272
|
+
*/
|
|
273
|
+
export function computeEventMoveRange(
|
|
274
|
+
event: CalendarEvent,
|
|
275
|
+
targetDay: Date,
|
|
276
|
+
): CalendarEventMoveRange {
|
|
277
|
+
const startOfDay = (d: Date) => new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
278
|
+
// Round: start-of-day deltas are not exact multiples of 24h across DST.
|
|
279
|
+
const dayDelta = Math.round(
|
|
280
|
+
(startOfDay(targetDay).getTime() - startOfDay(event.start).getTime()) / MS_PER_DAY,
|
|
281
|
+
);
|
|
282
|
+
const shiftDays = (d: Date) =>
|
|
283
|
+
new Date(
|
|
284
|
+
d.getFullYear(),
|
|
285
|
+
d.getMonth(),
|
|
286
|
+
d.getDate() + dayDelta,
|
|
287
|
+
d.getHours(),
|
|
288
|
+
d.getMinutes(),
|
|
289
|
+
d.getSeconds(),
|
|
290
|
+
d.getMilliseconds(),
|
|
291
|
+
);
|
|
292
|
+
const start = shiftDays(event.start);
|
|
293
|
+
const end = event.end ? shiftDays(event.end) : new Date(start.getTime());
|
|
294
|
+
return { start, end };
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/** Window-space rect for a day cell used by native drag hit-testing. */
|
|
298
|
+
export interface CalendarDayLayout {
|
|
299
|
+
key: string;
|
|
300
|
+
x: number;
|
|
301
|
+
y: number;
|
|
302
|
+
width: number;
|
|
303
|
+
height: number;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Find the day key whose layout contains `(pageX, pageY)`.
|
|
308
|
+
* Used by native drag (no `document.elementFromPoint`).
|
|
309
|
+
*/
|
|
310
|
+
export function findDayKeyAtPoint(
|
|
311
|
+
pageX: number,
|
|
312
|
+
pageY: number,
|
|
313
|
+
layouts: readonly CalendarDayLayout[],
|
|
314
|
+
): string | null {
|
|
315
|
+
// Half-open intervals so shared edges between adjacent cells don't double-hit.
|
|
316
|
+
for (const layout of layouts) {
|
|
317
|
+
if (
|
|
318
|
+
pageX >= layout.x &&
|
|
319
|
+
pageX < layout.x + layout.width &&
|
|
320
|
+
pageY >= layout.y &&
|
|
321
|
+
pageY < layout.y + layout.height
|
|
322
|
+
) {
|
|
323
|
+
return layout.key;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
return null;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
type MeasurableDayNode = {
|
|
330
|
+
measureInWindow?: (cb: (x: number, y: number, width: number, height: number) => void) => void;
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
function measureDayLayouts(
|
|
334
|
+
refs: Map<string, MeasurableDayNode>,
|
|
335
|
+
cb: (layouts: CalendarDayLayout[]) => void,
|
|
336
|
+
) {
|
|
337
|
+
const entries = [...refs.entries()];
|
|
338
|
+
if (entries.length === 0) {
|
|
339
|
+
cb([]);
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
const layouts: CalendarDayLayout[] = [];
|
|
343
|
+
let remaining = entries.length;
|
|
344
|
+
for (const [key, node] of entries) {
|
|
345
|
+
if (typeof node.measureInWindow !== "function") {
|
|
346
|
+
if (--remaining === 0) cb(layouts);
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
node.measureInWindow((x, y, width, height) => {
|
|
350
|
+
layouts.push({ key, x, y, width, height });
|
|
351
|
+
if (--remaining === 0) cb(layouts);
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
function dayKeyToDate(key: string): Date {
|
|
357
|
+
const [ty, tm, td] = key.split("-").map(Number);
|
|
358
|
+
return new Date(ty, tm - 1, td);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
function dateAtMinutes(day: Date, minutes: number): Date {
|
|
362
|
+
return new Date(day.getFullYear(), day.getMonth(), day.getDate(), 0, minutes);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/** Timed events render as positioned blocks; untimed live in day/all-day rows. */
|
|
366
|
+
function isTimedEvent(event: CalendarEvent): boolean {
|
|
367
|
+
return (
|
|
368
|
+
event.end !== undefined &&
|
|
369
|
+
event.end.getTime() > event.start.getTime() &&
|
|
370
|
+
isSameDay(event.start, event.end) &&
|
|
371
|
+
event.allDay !== true
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/** Pixels of pointer travel before a press becomes a drag (clicks stay clicks below this). */
|
|
376
|
+
const DRAG_THRESHOLD_PX = 4;
|
|
377
|
+
/** Touch pointers lift after a hold instead of a travel threshold. */
|
|
378
|
+
const TOUCH_LONG_PRESS_MS = 300;
|
|
379
|
+
/** Touch travel allowed before a pending long-press yields to scrolling. */
|
|
380
|
+
const TOUCH_SLOP_PX = 8;
|
|
381
|
+
/** Single-light lift shadow shared with FloatingPanel (Axiom 14 overlay tier). */
|
|
382
|
+
const LIFT_SHADOW = "0px 8px 28px rgba(0,0,0,0.18), 0px 2px 6px rgba(0,0,0,0.08)";
|
|
383
|
+
/** Minimum rendered height for a timed block (short events stay visible). */
|
|
384
|
+
const MIN_BLOCK_PX = 18;
|
|
385
|
+
/** Resize handle hit zone (Axiom 12 touch-target floor). */
|
|
386
|
+
const RESIZE_ZONE_PX = 44;
|
|
387
|
+
/** Month-view day-number disc diameter (pill-by-anatomy, like Badge). */
|
|
388
|
+
const DAY_DISC_PX = 22;
|
|
389
|
+
/** Month-view chip visual floor (hit slop fills the 44px target, DG-LAY-04). */
|
|
390
|
+
const MONTH_CHIP_MIN_PX = 24;
|
|
391
|
+
|
|
113
392
|
function getWeekdayNames(): string[] {
|
|
114
393
|
const formatter = new Intl.DateTimeFormat(undefined, { weekday: "short" });
|
|
115
394
|
return Array.from({ length: 7 }, (_, i) => formatter.format(new Date(2004, 0, 4 + i)));
|
|
@@ -132,14 +411,270 @@ function formatHour(hour: number): string {
|
|
|
132
411
|
}).format(date);
|
|
133
412
|
}
|
|
134
413
|
|
|
414
|
+
function formatDayLong(date: Date): string {
|
|
415
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
416
|
+
weekday: "long",
|
|
417
|
+
month: "long",
|
|
418
|
+
day: "numeric",
|
|
419
|
+
}).format(date);
|
|
420
|
+
}
|
|
421
|
+
|
|
135
422
|
const weekdayNames = getWeekdayNames();
|
|
136
423
|
const monthNames = getMonthNames();
|
|
424
|
+
const hours = getHours();
|
|
425
|
+
|
|
426
|
+
// ---------------------------------------------------------------------------
|
|
427
|
+
// Shared web pointer session runner
|
|
428
|
+
// ---------------------------------------------------------------------------
|
|
429
|
+
|
|
430
|
+
interface WebPointerSessionOptions {
|
|
431
|
+
pointerType?: string;
|
|
432
|
+
startX: number;
|
|
433
|
+
startY: number;
|
|
434
|
+
/** Travel needed before the session activates (mouse/pen). */
|
|
435
|
+
thresholdPx?: number;
|
|
436
|
+
/** Session became live (lift). */
|
|
437
|
+
onActivate: (pt: { x: number; y: number }) => void;
|
|
438
|
+
/** Pointer moved while live. */
|
|
439
|
+
onMove: (pt: { x: number; y: number }) => void;
|
|
440
|
+
/** Pointer released while live. */
|
|
441
|
+
onCommit: (pt: { x: number; y: number }) => void;
|
|
442
|
+
/** Escape pressed while live (pointer may still be down). */
|
|
443
|
+
onCancel: () => void;
|
|
444
|
+
/** Pointer released before the session activated (plain tap/click). */
|
|
445
|
+
onTapInstead?: () => void;
|
|
446
|
+
/** Session fully torn down (always fires exactly once). */
|
|
447
|
+
onSettled?: (activated: boolean, escaped: boolean) => void;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Window-level pointer session with threshold (mouse/pen) or long-press
|
|
452
|
+
* (touch) activation, Escape cancellation, and text-selection locking.
|
|
453
|
+
* Returns a cleanup that cancels the session.
|
|
454
|
+
*/
|
|
455
|
+
function startWebPointerSession(options: WebPointerSessionOptions): () => void {
|
|
456
|
+
const threshold = options.thresholdPx ?? DRAG_THRESHOLD_PX;
|
|
457
|
+
const isTouch = options.pointerType === "touch";
|
|
458
|
+
let active = false;
|
|
459
|
+
let ended = false;
|
|
460
|
+
let escaped = false;
|
|
461
|
+
let liftArmed = !isTouch;
|
|
462
|
+
let last = { x: options.startX, y: options.startY };
|
|
463
|
+
let prevUserSelect = "";
|
|
464
|
+
let longPressTimer: ReturnType<typeof setTimeout> | null = null;
|
|
465
|
+
|
|
466
|
+
const preventTouchScroll = (te: TouchEvent) => {
|
|
467
|
+
if (active) te.preventDefault();
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
const activate = (pt: { x: number; y: number }) => {
|
|
471
|
+
if (active) return;
|
|
472
|
+
active = true;
|
|
473
|
+
prevUserSelect = document.body.style.userSelect;
|
|
474
|
+
document.body.style.userSelect = "none";
|
|
475
|
+
options.onActivate(pt);
|
|
476
|
+
};
|
|
477
|
+
|
|
478
|
+
const teardown = () => {
|
|
479
|
+
if (ended) return;
|
|
480
|
+
ended = true;
|
|
481
|
+
if (longPressTimer) clearTimeout(longPressTimer);
|
|
482
|
+
window.removeEventListener("pointermove", onMove);
|
|
483
|
+
window.removeEventListener("pointerup", onUp);
|
|
484
|
+
window.removeEventListener("keydown", onKey, true);
|
|
485
|
+
window.removeEventListener("touchmove", preventTouchScroll);
|
|
486
|
+
if (active) document.body.style.userSelect = prevUserSelect;
|
|
487
|
+
options.onSettled?.(active, escaped);
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
const onMove = (me: PointerEvent) => {
|
|
491
|
+
last = { x: me.clientX, y: me.clientY };
|
|
492
|
+
if (!active) {
|
|
493
|
+
const travel = Math.hypot(me.clientX - options.startX, me.clientY - options.startY);
|
|
494
|
+
if (isTouch && !liftArmed) {
|
|
495
|
+
// Still waiting on the long press — a real swipe yields to scrolling.
|
|
496
|
+
if (travel > TOUCH_SLOP_PX) teardown();
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
if (travel < threshold) return;
|
|
500
|
+
activate(last);
|
|
501
|
+
}
|
|
502
|
+
options.onMove(last);
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
const onUp = (ue: PointerEvent) => {
|
|
506
|
+
last = { x: ue.clientX, y: ue.clientY };
|
|
507
|
+
const wasActive = active;
|
|
508
|
+
teardown();
|
|
509
|
+
if (wasActive) options.onCommit(last);
|
|
510
|
+
else options.onTapInstead?.();
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
const onKey = (ke: KeyboardEvent) => {
|
|
514
|
+
if (ke.key !== "Escape" || !active) return;
|
|
515
|
+
ke.stopPropagation();
|
|
516
|
+
escaped = true;
|
|
517
|
+
const cancel = options.onCancel;
|
|
518
|
+
teardown();
|
|
519
|
+
cancel();
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
if (isTouch) {
|
|
523
|
+
longPressTimer = setTimeout(() => {
|
|
524
|
+
liftArmed = true;
|
|
525
|
+
activate(last);
|
|
526
|
+
}, TOUCH_LONG_PRESS_MS);
|
|
527
|
+
window.addEventListener("touchmove", preventTouchScroll, { passive: false });
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
window.addEventListener("pointermove", onMove);
|
|
531
|
+
window.addEventListener("pointerup", onUp);
|
|
532
|
+
window.addEventListener("keydown", onKey, true);
|
|
533
|
+
return teardown;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
// ---------------------------------------------------------------------------
|
|
537
|
+
// Now indicator (week/day time grid)
|
|
538
|
+
// ---------------------------------------------------------------------------
|
|
539
|
+
|
|
540
|
+
function NowIndicator({ hourHeight }: { hourHeight: number }) {
|
|
541
|
+
const [now, setNow] = useState(() => new Date());
|
|
542
|
+
// The dot anchors the line's inline START (the hour-gutter side): a
|
|
543
|
+
// JS-positioned physical inset, mirrored via the direction source.
|
|
544
|
+
const isRTL = useDirection() === "rtl";
|
|
545
|
+
useEffect(() => {
|
|
546
|
+
const id = setInterval(() => setNow(new Date()), 60_000);
|
|
547
|
+
return () => clearInterval(id);
|
|
548
|
+
}, []);
|
|
549
|
+
const y = minutesToY(minutesOfDay(now), hourHeight);
|
|
550
|
+
return (
|
|
551
|
+
<XStack
|
|
552
|
+
position="absolute"
|
|
553
|
+
left={0}
|
|
554
|
+
right={0}
|
|
555
|
+
top={y - 1}
|
|
556
|
+
height={2}
|
|
557
|
+
backgroundColor="$accentBackground"
|
|
558
|
+
pointerEvents="none"
|
|
559
|
+
zIndex={3}
|
|
560
|
+
{...{ "data-calendar-now": "true" }}
|
|
561
|
+
>
|
|
562
|
+
<YStack
|
|
563
|
+
position="absolute"
|
|
564
|
+
{...(isRTL ? { right: -3 } : { left: -3 })}
|
|
565
|
+
top={-3}
|
|
566
|
+
width={8}
|
|
567
|
+
height={8}
|
|
568
|
+
borderRadius={4}
|
|
569
|
+
backgroundColor="$accentBackground"
|
|
570
|
+
/>
|
|
571
|
+
</XStack>
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// ---------------------------------------------------------------------------
|
|
576
|
+
// FLIP-settle ghost (drop / cancel tween back)
|
|
577
|
+
// ---------------------------------------------------------------------------
|
|
578
|
+
|
|
579
|
+
interface SettleGhostState {
|
|
580
|
+
key: number;
|
|
581
|
+
title: string;
|
|
582
|
+
color?: string;
|
|
583
|
+
from: { x: number; y: number };
|
|
584
|
+
to: { x: number; y: number };
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
function SettleGhost({
|
|
588
|
+
settle,
|
|
589
|
+
transition,
|
|
590
|
+
borderRadius,
|
|
591
|
+
onDone,
|
|
592
|
+
}: {
|
|
593
|
+
settle: SettleGhostState;
|
|
594
|
+
transition: string | undefined;
|
|
595
|
+
borderRadius: Record<string, unknown>;
|
|
596
|
+
onDone: () => void;
|
|
597
|
+
}) {
|
|
598
|
+
const [moved, setMoved] = useState(false);
|
|
599
|
+
useEffect(() => {
|
|
600
|
+
// Double rAF so the ghost paints at `from` before the tween retargets it
|
|
601
|
+
// (LC-25: the drop is a discrete jump — it animates).
|
|
602
|
+
let raf2 = 0;
|
|
603
|
+
const raf1 = requestAnimationFrame(() => {
|
|
604
|
+
raf2 = requestAnimationFrame(() => setMoved(true));
|
|
605
|
+
});
|
|
606
|
+
const timer = setTimeout(onDone, 480);
|
|
607
|
+
return () => {
|
|
608
|
+
cancelAnimationFrame(raf1);
|
|
609
|
+
cancelAnimationFrame(raf2);
|
|
610
|
+
clearTimeout(timer);
|
|
611
|
+
};
|
|
612
|
+
}, [onDone]);
|
|
613
|
+
return (
|
|
614
|
+
<YStack
|
|
615
|
+
pointerEvents="none"
|
|
616
|
+
{...borderRadius}
|
|
617
|
+
backgroundColor={(settle.color || "$accentBackground") as any}
|
|
618
|
+
padding="$1"
|
|
619
|
+
transition={transition as any}
|
|
620
|
+
x={moved ? settle.to.x - settle.from.x : 0}
|
|
621
|
+
y={moved ? settle.to.y - settle.from.y : 0}
|
|
622
|
+
scale={moved ? 1 : 1.03}
|
|
623
|
+
opacity={moved ? 0.6 : 0.95}
|
|
624
|
+
{...({
|
|
625
|
+
"data-calendar-settle-ghost": "true",
|
|
626
|
+
style: {
|
|
627
|
+
position: "fixed",
|
|
628
|
+
left: settle.from.x,
|
|
629
|
+
top: settle.from.y,
|
|
630
|
+
zIndex: zIndex.sheet,
|
|
631
|
+
maxWidth: 220,
|
|
632
|
+
boxShadow: LIFT_SHADOW,
|
|
633
|
+
},
|
|
634
|
+
} as any)}
|
|
635
|
+
>
|
|
636
|
+
<Text fontSize="$2" numberOfLines={1} color={eventChipTextColor(settle.color)}>
|
|
637
|
+
{settle.title}
|
|
638
|
+
</Text>
|
|
639
|
+
</YStack>
|
|
640
|
+
);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
// ---------------------------------------------------------------------------
|
|
644
|
+
// Directional slide surface (view/period switches)
|
|
645
|
+
// ---------------------------------------------------------------------------
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Slide-capable body surface for view/period switches. AnimatePresence picks
|
|
649
|
+
* the variant per transition (`enterVariant`/`exitVariant`) so enter and exit
|
|
650
|
+
* are PAIRED (LC-24) and the exiting period animates with the direction
|
|
651
|
+
* chosen at nav time — not a stale style captured on its own render.
|
|
652
|
+
* Offsets are physical px; the caller mirrors them with `useDirection` so
|
|
653
|
+
* "next" always enters from the reading-direction end (RTL-correct).
|
|
654
|
+
*/
|
|
655
|
+
const CalendarSlide = styled(YStack, {
|
|
656
|
+
variants: {
|
|
657
|
+
fromStart: { true: { x: -24, opacity: 0 } },
|
|
658
|
+
fromEnd: { true: { x: 24, opacity: 0 } },
|
|
659
|
+
fade: { true: { opacity: 0 } },
|
|
660
|
+
} as const,
|
|
661
|
+
});
|
|
662
|
+
|
|
663
|
+
// ---------------------------------------------------------------------------
|
|
664
|
+
// Calendar
|
|
665
|
+
// ---------------------------------------------------------------------------
|
|
137
666
|
|
|
138
667
|
/**
|
|
139
668
|
* Generic calendar component.
|
|
140
669
|
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
670
|
+
* Month view is a day grid with honest "+N more" overflow (Axiom 6); week and
|
|
671
|
+
* day views are real time grids with a now indicator, event drag (A-GESTURE
|
|
672
|
+
* 1:1 tracking with FLIP settle on drop — LC-25), edge resize with grid
|
|
673
|
+
* snapping, and drag-to-create that opens a live-commit FloatingPanel editor
|
|
674
|
+
* (LC-06/LC-21 — no Apply button). View and period switches animate with
|
|
675
|
+
* `knobProps.transition` (Axiom 4); `animation: none` renders every switch
|
|
676
|
+
* instantly. Keyboard: arrows move day/slot focus, Enter opens or creates
|
|
677
|
+
* (Axiom 12); an aria-live region announces period changes.
|
|
143
678
|
*
|
|
144
679
|
* @example
|
|
145
680
|
* ```tsx
|
|
@@ -147,6 +682,9 @@ const monthNames = getMonthNames();
|
|
|
147
682
|
* events={events}
|
|
148
683
|
* onDateSelect={(date) => console.log(date)}
|
|
149
684
|
* onEventClick={(event) => console.log(event)}
|
|
685
|
+
* onEventMove={(event, range) => reschedule(event, range)}
|
|
686
|
+
* onEventResize={(event, range) => reschedule(event, range)}
|
|
687
|
+
* onEventCreate={(draft) => createEvent(draft)}
|
|
150
688
|
* />
|
|
151
689
|
* ```
|
|
152
690
|
*/
|
|
@@ -155,18 +693,653 @@ export function Calendar({
|
|
|
155
693
|
renderEvent,
|
|
156
694
|
onDateSelect,
|
|
157
695
|
onEventClick,
|
|
696
|
+
onEventMove,
|
|
697
|
+
onEventResize,
|
|
698
|
+
onEventCreate,
|
|
699
|
+
enableEventDrag,
|
|
158
700
|
viewType: initialViewType = "month",
|
|
159
701
|
initialDate,
|
|
160
702
|
height = 600,
|
|
161
703
|
showNavigation = true,
|
|
162
704
|
showViewSwitcher = true,
|
|
163
705
|
firstDayOfWeek = 0,
|
|
706
|
+
slotMinutes = 30,
|
|
164
707
|
...stackProps
|
|
165
708
|
}: CalendarProps) {
|
|
709
|
+
const { t } = useTranslation();
|
|
166
710
|
const { knobProps } = useResolvedKnobs();
|
|
711
|
+
// UX-P03 / Axiom 15: the today/selected disc paints `$accentBackground`, so
|
|
712
|
+
// its date glyph needs a luminance-computed foreground — `$accentColor` (the
|
|
713
|
+
// deep on-page accent) measured 1.76:1 on the accent fill.
|
|
714
|
+
const onAccent = useReadableTextOn("$accentBackground");
|
|
715
|
+
const calendarId = useId();
|
|
716
|
+
// Directional glyph/geometry source (RTL): slide offsets are physical px,
|
|
717
|
+
// so "next" must be mirrored to enter from the reading-direction end.
|
|
718
|
+
const isRTL = useDirection() === "rtl";
|
|
167
719
|
const [currentDate, setCurrentDate] = useState<Date>(initialDate ?? new Date());
|
|
168
720
|
const [view, setView] = useState<CalendarViewType>(initialViewType);
|
|
169
721
|
|
|
722
|
+
const sz = knobProps.sizeToken as string;
|
|
723
|
+
const hourHeight = sz === "$3" ? 48 : sz === "$5" ? 80 : 64;
|
|
724
|
+
// Week-row COMFORT floor, not fixed height: rows flex to share the panel
|
|
725
|
+
// height so a month fits without slicing its last row mid-cell; the floor
|
|
726
|
+
// steps density with the size knob and relaxes before the grid ever
|
|
727
|
+
// slices (see monthRowMinHeight below).
|
|
728
|
+
const monthCellMinHeight = sz === "$3" ? 64 : sz === "$5" ? 96 : 76;
|
|
729
|
+
// Grid-cell inset and chip gap follow the space knob (LC-18 KNOB-TOTALITY /
|
|
730
|
+
// SP-PAD: the 2px hardcoded inset read as chips bleeding into hairlines).
|
|
731
|
+
const space = knobProps.space;
|
|
732
|
+
const cellPad = space === "small" ? 2 : space === "large" ? 7 : 4;
|
|
733
|
+
const chipGap = space === "small" ? 2 : space === "large" ? 5 : 3;
|
|
734
|
+
// Hard per-row floor: a day cell must fit its day disc plus one event chip
|
|
735
|
+
// (content-derived, not a raw px dial — LC-28).
|
|
736
|
+
const monthRowHardFloor = cellPad * 2 + DAY_DISC_PX + chipGap + MONTH_CHIP_MIN_PX;
|
|
737
|
+
// Measured month-grid viewport (ScrollView onLayout) drives the fit logic.
|
|
738
|
+
const [monthBodyHeight, setMonthBodyHeight] = useState(0);
|
|
739
|
+
// Positioned time-grid overlays (blocks, handles, sketches, cursor) keep a
|
|
740
|
+
// 2px breathing gap on the INLINE END (toward the next day's separator).
|
|
741
|
+
// They are JS-positioned absolutes, so the physical pair mirrors via the
|
|
742
|
+
// direction source rather than CSS logical props (rtl-audit rule-of-thumb).
|
|
743
|
+
const overlayInset = isRTL ? { left: 2, right: 0 } : { left: 0, right: 2 };
|
|
744
|
+
const transition = knobProps.transition;
|
|
745
|
+
// Layout props (top/height) only tween on web — the RN driver cannot
|
|
746
|
+
// animate layout, so native keeps those jumps instant (Axiom 4 note).
|
|
747
|
+
const webLayoutTransition = isWeb ? transition : undefined;
|
|
748
|
+
|
|
749
|
+
// -------------------------------------------------------------------------
|
|
750
|
+
// View / period transition state (Axiom 4: discrete jumps animate)
|
|
751
|
+
// -------------------------------------------------------------------------
|
|
752
|
+
const navDirectionRef = useRef(0);
|
|
753
|
+
const hasNavigatedRef = useRef(false);
|
|
754
|
+
|
|
755
|
+
const periodKey =
|
|
756
|
+
view === "month"
|
|
757
|
+
? `${currentDate.getFullYear()}-${currentDate.getMonth()}`
|
|
758
|
+
: view === "week"
|
|
759
|
+
? formatDateKey(getWeekDays(currentDate, firstDayOfWeek)[0])
|
|
760
|
+
: formatDateKey(currentDate);
|
|
761
|
+
const motionKey = `${view}:${periodKey}`;
|
|
762
|
+
|
|
763
|
+
// -------------------------------------------------------------------------
|
|
764
|
+
// Event drag-and-drop
|
|
765
|
+
// Web: window pointer listeners + document.elementFromPoint
|
|
766
|
+
// Native: RN responder system + measureInWindow day-cell hit testing
|
|
767
|
+
// -------------------------------------------------------------------------
|
|
768
|
+
const dragEnabled = enableEventDrag ?? onEventMove !== undefined;
|
|
769
|
+
// Web still needs a DOM for hit-testing / window listeners.
|
|
770
|
+
const hasDom = isWeb && typeof window !== "undefined" && typeof document !== "undefined";
|
|
771
|
+
const webDragEnabled = dragEnabled && hasDom;
|
|
772
|
+
const nativeDragEnabled = dragEnabled && !isWeb;
|
|
773
|
+
const webResizeEnabled = onEventResize !== undefined && hasDom;
|
|
774
|
+
const webCreateEnabled = onEventCreate !== undefined && hasDom;
|
|
775
|
+
|
|
776
|
+
const [dragGhost, setDragGhost] = useState<{
|
|
777
|
+
event: CalendarEvent;
|
|
778
|
+
x: number;
|
|
779
|
+
y: number;
|
|
780
|
+
} | null>(null);
|
|
781
|
+
const [dropTargetKey, setDropTargetKey] = useState<string | null>(null);
|
|
782
|
+
const [slotTarget, setSlotTarget] = useState<{
|
|
783
|
+
dayKey: string;
|
|
784
|
+
startMin: number;
|
|
785
|
+
durationMin: number;
|
|
786
|
+
} | null>(null);
|
|
787
|
+
const [settle, setSettle] = useState<SettleGhostState | null>(null);
|
|
788
|
+
const [resizePreview, setResizePreview] = useState<{
|
|
789
|
+
id: string;
|
|
790
|
+
start: Date;
|
|
791
|
+
end: Date;
|
|
792
|
+
} | null>(null);
|
|
793
|
+
const [createDraft, setCreateDraft] = useState<{
|
|
794
|
+
dayKey: string;
|
|
795
|
+
start: Date;
|
|
796
|
+
end: Date;
|
|
797
|
+
} | null>(null);
|
|
798
|
+
const [editorState, setEditorState] = useState<{
|
|
799
|
+
dayKey: string;
|
|
800
|
+
start: Date;
|
|
801
|
+
end: Date;
|
|
802
|
+
} | null>(null);
|
|
803
|
+
const [draftTitle, setDraftTitle] = useState("");
|
|
804
|
+
const [overflowDayKey, setOverflowDayKey] = useState<string | null>(null);
|
|
805
|
+
const [scrollLocked, setScrollLocked] = useState(false);
|
|
806
|
+
const [draggingEventId, setDraggingEventId] = useState<string | null>(null);
|
|
807
|
+
|
|
808
|
+
// Set after a drag ends so the trailing click doesn't fire onEventClick/onDateSelect.
|
|
809
|
+
const suppressClickRef = useRef(false);
|
|
810
|
+
const dragSessionCleanupRef = useRef<(() => void) | null>(null);
|
|
811
|
+
const slotTargetRef = useRef<typeof slotTarget>(null);
|
|
812
|
+
const resizePreviewRef = useRef<typeof resizePreview>(null);
|
|
813
|
+
const editorStateRef = useRef<typeof editorState>(null);
|
|
814
|
+
const draftTitleRef = useRef("");
|
|
815
|
+
const dayRefs = useRef(new Map<string, MeasurableDayNode>());
|
|
816
|
+
const containerNodeRef = useRef<MeasurableDayNode | null>(null);
|
|
817
|
+
const containerOffsetRef = useRef({ x: 0, y: 0 });
|
|
818
|
+
const nativeSessionRef = useRef<{
|
|
819
|
+
event: CalendarEvent;
|
|
820
|
+
startX: number;
|
|
821
|
+
startY: number;
|
|
822
|
+
dragging: boolean;
|
|
823
|
+
layouts: CalendarDayLayout[];
|
|
824
|
+
} | null>(null);
|
|
825
|
+
|
|
826
|
+
slotTargetRef.current = slotTarget;
|
|
827
|
+
resizePreviewRef.current = resizePreview;
|
|
828
|
+
editorStateRef.current = editorState;
|
|
829
|
+
draftTitleRef.current = draftTitle;
|
|
830
|
+
|
|
831
|
+
const registerDayRef = useCallback((key: string, node: MeasurableDayNode | null) => {
|
|
832
|
+
if (node) dayRefs.current.set(key, node);
|
|
833
|
+
else dayRefs.current.delete(key);
|
|
834
|
+
}, []);
|
|
835
|
+
|
|
836
|
+
const refreshContainerOffset = useCallback(() => {
|
|
837
|
+
containerNodeRef.current?.measureInWindow?.((x, y) => {
|
|
838
|
+
containerOffsetRef.current = { x, y };
|
|
839
|
+
});
|
|
840
|
+
}, []);
|
|
841
|
+
|
|
842
|
+
useEffect(() => () => dragSessionCleanupRef.current?.(), []);
|
|
843
|
+
|
|
844
|
+
const clearSettle = useCallback(() => setSettle(null), []);
|
|
845
|
+
|
|
846
|
+
const suppressNextClick = useCallback(() => {
|
|
847
|
+
suppressClickRef.current = true;
|
|
848
|
+
setTimeout(() => {
|
|
849
|
+
suppressClickRef.current = false;
|
|
850
|
+
}, 0);
|
|
851
|
+
}, []);
|
|
852
|
+
|
|
853
|
+
const beginSettle = useCallback(
|
|
854
|
+
(event: CalendarEvent, from: { x: number; y: number }, to: { x: number; y: number }) => {
|
|
855
|
+
if (!transition || !hasDom) return;
|
|
856
|
+
setSettle({
|
|
857
|
+
key: Date.now(),
|
|
858
|
+
title: event.title,
|
|
859
|
+
color: event.color,
|
|
860
|
+
from,
|
|
861
|
+
to,
|
|
862
|
+
});
|
|
863
|
+
},
|
|
864
|
+
[transition, hasDom],
|
|
865
|
+
);
|
|
866
|
+
|
|
867
|
+
const commitMoveToKey = useCallback(
|
|
868
|
+
(event: CalendarEvent, key: string | null) => {
|
|
869
|
+
if (!key) return;
|
|
870
|
+
const targetDay = dayKeyToDate(key);
|
|
871
|
+
if (!isSameDay(targetDay, event.start)) {
|
|
872
|
+
onEventMove?.(event, computeEventMoveRange(event, targetDay));
|
|
873
|
+
}
|
|
874
|
+
},
|
|
875
|
+
[onEventMove],
|
|
876
|
+
);
|
|
877
|
+
|
|
878
|
+
// ── Web event move drag (day mode: month cells / all-day strip; ──────────
|
|
879
|
+
// ── slot mode: time-grid columns) ─────────────────────────────────────────
|
|
880
|
+
const handleEventPointerDown = useCallback(
|
|
881
|
+
(
|
|
882
|
+
event: CalendarEvent,
|
|
883
|
+
e: {
|
|
884
|
+
button?: number;
|
|
885
|
+
clientX: number;
|
|
886
|
+
clientY: number;
|
|
887
|
+
pointerType?: string;
|
|
888
|
+
currentTarget?: unknown;
|
|
889
|
+
stopPropagation?: () => void;
|
|
890
|
+
},
|
|
891
|
+
mode: "day" | "slot",
|
|
892
|
+
) => {
|
|
893
|
+
if (!webDragEnabled) return;
|
|
894
|
+
if (e.button !== undefined && e.button !== 0) return;
|
|
895
|
+
// Don't let a chip/block press start the column's drag-to-create session.
|
|
896
|
+
e.stopPropagation?.();
|
|
897
|
+
dragSessionCleanupRef.current?.();
|
|
898
|
+
|
|
899
|
+
const chipEl = e.currentTarget as HTMLElement | undefined;
|
|
900
|
+
const originRect = chipEl?.getBoundingClientRect?.() ?? null;
|
|
901
|
+
const durationMin = event.end
|
|
902
|
+
? Math.max(slotMinutes, (event.end.getTime() - event.start.getTime()) / 60000)
|
|
903
|
+
: slotMinutes;
|
|
904
|
+
const grabOffsetMin =
|
|
905
|
+
mode === "slot" && originRect ? yToMinutes(e.clientY - originRect.top, hourHeight) : 0;
|
|
906
|
+
|
|
907
|
+
const findDayKey = (x: number, y: number): string | null => {
|
|
908
|
+
const el = document.elementFromPoint?.(x, y) as Element | null;
|
|
909
|
+
const dayEl = el?.closest?.("[data-calendar-day]");
|
|
910
|
+
return dayEl?.getAttribute("data-calendar-day") ?? null;
|
|
911
|
+
};
|
|
912
|
+
|
|
913
|
+
const findSlotTarget = (x: number, y: number) => {
|
|
914
|
+
const el = document.elementFromPoint?.(x, y) as Element | null;
|
|
915
|
+
const colEl = el?.closest?.("[data-calendar-timecol]") as HTMLElement | null;
|
|
916
|
+
if (!colEl) return null;
|
|
917
|
+
const dayKey = colEl.getAttribute("data-calendar-timecol");
|
|
918
|
+
if (!dayKey) return null;
|
|
919
|
+
const rect = colEl.getBoundingClientRect();
|
|
920
|
+
const raw = yToMinutes(y - rect.top, hourHeight) - grabOffsetMin;
|
|
921
|
+
const startMin = Math.max(
|
|
922
|
+
0,
|
|
923
|
+
Math.min(MINUTES_PER_DAY - durationMin, snapMinutes(raw, slotMinutes, "round")),
|
|
924
|
+
);
|
|
925
|
+
return { dayKey, startMin, durationMin, rect };
|
|
926
|
+
};
|
|
927
|
+
|
|
928
|
+
const endVisuals = () => {
|
|
929
|
+
setDragGhost(null);
|
|
930
|
+
setDropTargetKey(null);
|
|
931
|
+
setSlotTarget(null);
|
|
932
|
+
setDraggingEventId(null);
|
|
933
|
+
setScrollLocked(false);
|
|
934
|
+
dragSessionCleanupRef.current = null;
|
|
935
|
+
};
|
|
936
|
+
|
|
937
|
+
let lastPoint = { x: e.clientX, y: e.clientY };
|
|
938
|
+
const cleanup = startWebPointerSession({
|
|
939
|
+
pointerType: e.pointerType,
|
|
940
|
+
startX: e.clientX,
|
|
941
|
+
startY: e.clientY,
|
|
942
|
+
onActivate: (pt) => {
|
|
943
|
+
lastPoint = pt;
|
|
944
|
+
setDraggingEventId(event.id);
|
|
945
|
+
setScrollLocked(true);
|
|
946
|
+
setDragGhost({ event, x: pt.x, y: pt.y });
|
|
947
|
+
},
|
|
948
|
+
onMove: (pt) => {
|
|
949
|
+
lastPoint = pt;
|
|
950
|
+
setDragGhost({ event, x: pt.x, y: pt.y });
|
|
951
|
+
if (mode === "slot") {
|
|
952
|
+
const target = findSlotTarget(pt.x, pt.y);
|
|
953
|
+
setSlotTarget(
|
|
954
|
+
target ? { dayKey: target.dayKey, startMin: target.startMin, durationMin } : null,
|
|
955
|
+
);
|
|
956
|
+
setDropTargetKey(target ? null : findDayKey(pt.x, pt.y));
|
|
957
|
+
} else {
|
|
958
|
+
setDropTargetKey(findDayKey(pt.x, pt.y));
|
|
959
|
+
}
|
|
960
|
+
},
|
|
961
|
+
onCommit: (pt) => {
|
|
962
|
+
endVisuals();
|
|
963
|
+
suppressNextClick();
|
|
964
|
+
const ghostFrom = { x: pt.x + 12, y: pt.y + 12 };
|
|
965
|
+
if (mode === "slot") {
|
|
966
|
+
const target = findSlotTarget(pt.x, pt.y);
|
|
967
|
+
if (target) {
|
|
968
|
+
const targetDay = dayKeyToDate(target.dayKey);
|
|
969
|
+
const range = moveRangeToSlot(event, targetDay, target.startMin);
|
|
970
|
+
if (range.start.getTime() !== event.start.getTime()) {
|
|
971
|
+
onEventMove?.(event, range);
|
|
972
|
+
}
|
|
973
|
+
beginSettle(event, ghostFrom, {
|
|
974
|
+
x: target.rect.left + 2,
|
|
975
|
+
y: target.rect.top + minutesToY(target.startMin, hourHeight),
|
|
976
|
+
});
|
|
977
|
+
return;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
const dayKey = findDayKey(pt.x, pt.y);
|
|
981
|
+
if (dayKey) {
|
|
982
|
+
commitMoveToKey(event, dayKey);
|
|
983
|
+
const cellEl = document.querySelector(`[data-calendar-day="${dayKey}"]`);
|
|
984
|
+
const rect = cellEl?.getBoundingClientRect?.();
|
|
985
|
+
if (rect) beginSettle(event, ghostFrom, { x: rect.left + 4, y: rect.top + 24 });
|
|
986
|
+
return;
|
|
987
|
+
}
|
|
988
|
+
// No target: animate back home (same as cancel).
|
|
989
|
+
if (originRect) beginSettle(event, ghostFrom, { x: originRect.left, y: originRect.top });
|
|
990
|
+
},
|
|
991
|
+
onCancel: () => {
|
|
992
|
+
const ghost = { x: lastPoint.x + 12, y: lastPoint.y + 12 };
|
|
993
|
+
endVisuals();
|
|
994
|
+
// Escape cancel: pointer is still down — keep suppressing until release.
|
|
995
|
+
suppressClickRef.current = true;
|
|
996
|
+
window.addEventListener(
|
|
997
|
+
"pointerup",
|
|
998
|
+
() =>
|
|
999
|
+
setTimeout(() => {
|
|
1000
|
+
suppressClickRef.current = false;
|
|
1001
|
+
}, 0),
|
|
1002
|
+
{ once: true },
|
|
1003
|
+
);
|
|
1004
|
+
if (originRect) {
|
|
1005
|
+
beginSettle(event, ghost, { x: originRect.left, y: originRect.top });
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
onSettled: (activated) => {
|
|
1009
|
+
if (!activated) {
|
|
1010
|
+
endVisuals();
|
|
1011
|
+
}
|
|
1012
|
+
},
|
|
1013
|
+
});
|
|
1014
|
+
dragSessionCleanupRef.current = cleanup;
|
|
1015
|
+
},
|
|
1016
|
+
[
|
|
1017
|
+
webDragEnabled,
|
|
1018
|
+
slotMinutes,
|
|
1019
|
+
hourHeight,
|
|
1020
|
+
onEventMove,
|
|
1021
|
+
commitMoveToKey,
|
|
1022
|
+
beginSettle,
|
|
1023
|
+
suppressNextClick,
|
|
1024
|
+
],
|
|
1025
|
+
);
|
|
1026
|
+
|
|
1027
|
+
// ── Web event resize (time grid; LC-25 snap jumps tween) ─────────────────
|
|
1028
|
+
const handleResizePointerDown = useCallback(
|
|
1029
|
+
(
|
|
1030
|
+
event: CalendarEvent,
|
|
1031
|
+
edge: "start" | "end",
|
|
1032
|
+
e: {
|
|
1033
|
+
button?: number;
|
|
1034
|
+
clientX: number;
|
|
1035
|
+
clientY: number;
|
|
1036
|
+
pointerType?: string;
|
|
1037
|
+
currentTarget?: unknown;
|
|
1038
|
+
stopPropagation?: () => void;
|
|
1039
|
+
},
|
|
1040
|
+
) => {
|
|
1041
|
+
if (!webResizeEnabled) return;
|
|
1042
|
+
if (e.button !== undefined && e.button !== 0) return;
|
|
1043
|
+
e.stopPropagation?.();
|
|
1044
|
+
dragSessionCleanupRef.current?.();
|
|
1045
|
+
|
|
1046
|
+
const handleEl = e.currentTarget as HTMLElement | undefined;
|
|
1047
|
+
const colEl = handleEl?.closest?.("[data-calendar-timecol]") as HTMLElement | null;
|
|
1048
|
+
const colRect = colEl?.getBoundingClientRect?.();
|
|
1049
|
+
if (!colRect) return;
|
|
1050
|
+
|
|
1051
|
+
const applyPreview = (pt: { x: number; y: number }) => {
|
|
1052
|
+
const raw = yToMinutes(pt.y - colRect.top, hourHeight);
|
|
1053
|
+
const range = computeResizeRange(event, edge, raw, slotMinutes);
|
|
1054
|
+
setResizePreview({ id: event.id, start: range.start, end: range.end });
|
|
1055
|
+
};
|
|
1056
|
+
|
|
1057
|
+
const cleanup = startWebPointerSession({
|
|
1058
|
+
pointerType: e.pointerType,
|
|
1059
|
+
startX: e.clientX,
|
|
1060
|
+
startY: e.clientY,
|
|
1061
|
+
thresholdPx: 1,
|
|
1062
|
+
onActivate: (pt) => {
|
|
1063
|
+
setScrollLocked(true);
|
|
1064
|
+
applyPreview(pt);
|
|
1065
|
+
},
|
|
1066
|
+
onMove: applyPreview,
|
|
1067
|
+
onCommit: () => {
|
|
1068
|
+
const preview = resizePreviewRef.current;
|
|
1069
|
+
setResizePreview(null);
|
|
1070
|
+
setScrollLocked(false);
|
|
1071
|
+
dragSessionCleanupRef.current = null;
|
|
1072
|
+
suppressNextClick();
|
|
1073
|
+
if (!preview) return;
|
|
1074
|
+
const prevEnd = event.end ?? event.start;
|
|
1075
|
+
if (
|
|
1076
|
+
preview.start.getTime() !== event.start.getTime() ||
|
|
1077
|
+
preview.end.getTime() !== prevEnd.getTime()
|
|
1078
|
+
) {
|
|
1079
|
+
onEventResize?.(event, { start: preview.start, end: preview.end });
|
|
1080
|
+
}
|
|
1081
|
+
},
|
|
1082
|
+
onCancel: () => {
|
|
1083
|
+
// Preview reverts — the block tweens back to its committed geometry.
|
|
1084
|
+
setResizePreview(null);
|
|
1085
|
+
setScrollLocked(false);
|
|
1086
|
+
dragSessionCleanupRef.current = null;
|
|
1087
|
+
suppressClickRef.current = true;
|
|
1088
|
+
window.addEventListener(
|
|
1089
|
+
"pointerup",
|
|
1090
|
+
() =>
|
|
1091
|
+
setTimeout(() => {
|
|
1092
|
+
suppressClickRef.current = false;
|
|
1093
|
+
}, 0),
|
|
1094
|
+
{ once: true },
|
|
1095
|
+
);
|
|
1096
|
+
},
|
|
1097
|
+
onSettled: (activated) => {
|
|
1098
|
+
if (!activated) {
|
|
1099
|
+
setResizePreview(null);
|
|
1100
|
+
setScrollLocked(false);
|
|
1101
|
+
dragSessionCleanupRef.current = null;
|
|
1102
|
+
}
|
|
1103
|
+
},
|
|
1104
|
+
});
|
|
1105
|
+
dragSessionCleanupRef.current = cleanup;
|
|
1106
|
+
},
|
|
1107
|
+
[webResizeEnabled, hourHeight, slotMinutes, onEventResize, suppressNextClick],
|
|
1108
|
+
);
|
|
1109
|
+
|
|
1110
|
+
// ── Editor (drag-to-create; LC-06 FloatingPanel, LC-21 live commit) ───────
|
|
1111
|
+
const openEditor = useCallback((dayKey: string, range: CalendarRange) => {
|
|
1112
|
+
setCreateDraft(null);
|
|
1113
|
+
setDraftTitle("");
|
|
1114
|
+
setEditorState({ dayKey, start: range.start, end: range.end });
|
|
1115
|
+
}, []);
|
|
1116
|
+
|
|
1117
|
+
const commitEditor = useCallback(() => {
|
|
1118
|
+
const state = editorStateRef.current;
|
|
1119
|
+
if (!state) return;
|
|
1120
|
+
setEditorState(null);
|
|
1121
|
+
setCreateDraft(null);
|
|
1122
|
+
setDraftTitle("");
|
|
1123
|
+
onEventCreate?.({
|
|
1124
|
+
title: draftTitleRef.current.trim() || t("New event"),
|
|
1125
|
+
start: state.start,
|
|
1126
|
+
end: state.end,
|
|
1127
|
+
});
|
|
1128
|
+
}, [onEventCreate, t]);
|
|
1129
|
+
|
|
1130
|
+
// ── Web drag-to-create on the empty time grid ─────────────────────────────
|
|
1131
|
+
const handleGridPointerDown = useCallback(
|
|
1132
|
+
(
|
|
1133
|
+
day: Date,
|
|
1134
|
+
e: {
|
|
1135
|
+
button?: number;
|
|
1136
|
+
clientX: number;
|
|
1137
|
+
clientY: number;
|
|
1138
|
+
pointerType?: string;
|
|
1139
|
+
currentTarget?: unknown;
|
|
1140
|
+
},
|
|
1141
|
+
) => {
|
|
1142
|
+
if (!hasDom) return;
|
|
1143
|
+
if (e.button !== undefined && e.button !== 0) return;
|
|
1144
|
+
if (editorStateRef.current) return;
|
|
1145
|
+
dragSessionCleanupRef.current?.();
|
|
1146
|
+
|
|
1147
|
+
const colEl = e.currentTarget as HTMLElement | undefined;
|
|
1148
|
+
const colRect = colEl?.getBoundingClientRect?.();
|
|
1149
|
+
if (!colRect) return;
|
|
1150
|
+
const dayKey = formatDateKey(day);
|
|
1151
|
+
const anchorRaw = yToMinutes(e.clientY - colRect.top, hourHeight);
|
|
1152
|
+
let created = false;
|
|
1153
|
+
// The session closure owns the latest sketched range — state updaters
|
|
1154
|
+
// must stay pure, so the commit path never reads it back from state.
|
|
1155
|
+
let lastRange: CalendarRange | null = null;
|
|
1156
|
+
|
|
1157
|
+
const cleanup = startWebPointerSession({
|
|
1158
|
+
pointerType: e.pointerType,
|
|
1159
|
+
startX: e.clientX,
|
|
1160
|
+
startY: e.clientY,
|
|
1161
|
+
onActivate: (pt) => {
|
|
1162
|
+
if (!webCreateEnabled) return;
|
|
1163
|
+
created = true;
|
|
1164
|
+
setScrollLocked(true);
|
|
1165
|
+
const raw = yToMinutes(pt.y - colRect.top, hourHeight);
|
|
1166
|
+
const range = createRangeFromDrag(day, anchorRaw, raw, slotMinutes);
|
|
1167
|
+
lastRange = range;
|
|
1168
|
+
setCreateDraft({ dayKey, start: range.start, end: range.end });
|
|
1169
|
+
},
|
|
1170
|
+
onMove: (pt) => {
|
|
1171
|
+
if (!webCreateEnabled) return;
|
|
1172
|
+
const raw = yToMinutes(pt.y - colRect.top, hourHeight);
|
|
1173
|
+
const range = createRangeFromDrag(day, anchorRaw, raw, slotMinutes);
|
|
1174
|
+
lastRange = range;
|
|
1175
|
+
setCreateDraft({ dayKey, start: range.start, end: range.end });
|
|
1176
|
+
},
|
|
1177
|
+
onCommit: () => {
|
|
1178
|
+
setScrollLocked(false);
|
|
1179
|
+
dragSessionCleanupRef.current = null;
|
|
1180
|
+
suppressNextClick();
|
|
1181
|
+
if (!created) return;
|
|
1182
|
+
const range = lastRange ?? createRangeFromDrag(day, anchorRaw, anchorRaw, slotMinutes);
|
|
1183
|
+
// Defer past the release's trailing click: the live-commit panel
|
|
1184
|
+
// dismisses on outside press (LC-21), and the drag's own click
|
|
1185
|
+
// would otherwise flash-commit the editor before it can be used.
|
|
1186
|
+
// The sketch stays mounted until openEditor swaps it in.
|
|
1187
|
+
setTimeout(() => openEditor(dayKey, range), 0);
|
|
1188
|
+
},
|
|
1189
|
+
onCancel: () => {
|
|
1190
|
+
setCreateDraft(null);
|
|
1191
|
+
setScrollLocked(false);
|
|
1192
|
+
dragSessionCleanupRef.current = null;
|
|
1193
|
+
},
|
|
1194
|
+
onTapInstead: () => {
|
|
1195
|
+
dragSessionCleanupRef.current = null;
|
|
1196
|
+
if (suppressClickRef.current) return;
|
|
1197
|
+
const startMin = snapMinutes(anchorRaw, slotMinutes, "floor");
|
|
1198
|
+
onDateSelect?.(dateAtMinutes(day, startMin));
|
|
1199
|
+
},
|
|
1200
|
+
onSettled: (activated) => {
|
|
1201
|
+
if (!activated) dragSessionCleanupRef.current = null;
|
|
1202
|
+
},
|
|
1203
|
+
});
|
|
1204
|
+
dragSessionCleanupRef.current = cleanup;
|
|
1205
|
+
},
|
|
1206
|
+
[
|
|
1207
|
+
hasDom,
|
|
1208
|
+
webCreateEnabled,
|
|
1209
|
+
hourHeight,
|
|
1210
|
+
slotMinutes,
|
|
1211
|
+
onDateSelect,
|
|
1212
|
+
openEditor,
|
|
1213
|
+
suppressNextClick,
|
|
1214
|
+
],
|
|
1215
|
+
);
|
|
1216
|
+
|
|
1217
|
+
// ── Native drag (best-effort responder path, day granularity) ────────────
|
|
1218
|
+
const endNativeSession = useCallback(
|
|
1219
|
+
(opts: { commit: boolean; pageX?: number; pageY?: number }) => {
|
|
1220
|
+
const session = nativeSessionRef.current;
|
|
1221
|
+
nativeSessionRef.current = null;
|
|
1222
|
+
setScrollLocked(false);
|
|
1223
|
+
setDragGhost(null);
|
|
1224
|
+
setDropTargetKey(null);
|
|
1225
|
+
setDraggingEventId(null);
|
|
1226
|
+
if (!session?.dragging) return;
|
|
1227
|
+
suppressClickRef.current = true;
|
|
1228
|
+
setTimeout(() => {
|
|
1229
|
+
suppressClickRef.current = false;
|
|
1230
|
+
}, 0);
|
|
1231
|
+
if (!opts.commit || opts.pageX === undefined || opts.pageY === undefined) return;
|
|
1232
|
+
// Remeasure on release — layouts can be stale if anything shifted.
|
|
1233
|
+
measureDayLayouts(dayRefs.current, (layouts) => {
|
|
1234
|
+
const key =
|
|
1235
|
+
findDayKeyAtPoint(opts.pageX!, opts.pageY!, layouts) ??
|
|
1236
|
+
findDayKeyAtPoint(opts.pageX!, opts.pageY!, session.layouts);
|
|
1237
|
+
commitMoveToKey(session.event, key);
|
|
1238
|
+
});
|
|
1239
|
+
},
|
|
1240
|
+
[commitMoveToKey],
|
|
1241
|
+
);
|
|
1242
|
+
|
|
1243
|
+
const handleNativeGrant = useCallback(
|
|
1244
|
+
(event: CalendarEvent, e: { nativeEvent?: { pageX?: number; pageY?: number } }) => {
|
|
1245
|
+
if (!nativeDragEnabled) return;
|
|
1246
|
+
const pageX = e.nativeEvent?.pageX ?? 0;
|
|
1247
|
+
const pageY = e.nativeEvent?.pageY ?? 0;
|
|
1248
|
+
nativeSessionRef.current = {
|
|
1249
|
+
event,
|
|
1250
|
+
startX: pageX,
|
|
1251
|
+
startY: pageY,
|
|
1252
|
+
dragging: false,
|
|
1253
|
+
layouts: [],
|
|
1254
|
+
};
|
|
1255
|
+
},
|
|
1256
|
+
[nativeDragEnabled],
|
|
1257
|
+
);
|
|
1258
|
+
|
|
1259
|
+
const handleNativeMove = useCallback(
|
|
1260
|
+
(e: { nativeEvent?: { pageX?: number; pageY?: number } }) => {
|
|
1261
|
+
const session = nativeSessionRef.current;
|
|
1262
|
+
if (!session) return;
|
|
1263
|
+
const pageX = e.nativeEvent?.pageX ?? 0;
|
|
1264
|
+
const pageY = e.nativeEvent?.pageY ?? 0;
|
|
1265
|
+
if (!session.dragging) {
|
|
1266
|
+
if (Math.hypot(pageX - session.startX, pageY - session.startY) < DRAG_THRESHOLD_PX) return;
|
|
1267
|
+
session.dragging = true;
|
|
1268
|
+
setScrollLocked(true);
|
|
1269
|
+
setDraggingEventId(session.event.id);
|
|
1270
|
+
refreshContainerOffset();
|
|
1271
|
+
measureDayLayouts(dayRefs.current, (layouts) => {
|
|
1272
|
+
if (nativeSessionRef.current) nativeSessionRef.current.layouts = layouts;
|
|
1273
|
+
});
|
|
1274
|
+
}
|
|
1275
|
+
setDragGhost({
|
|
1276
|
+
event: session.event,
|
|
1277
|
+
x: pageX - containerOffsetRef.current.x + 12,
|
|
1278
|
+
y: pageY - containerOffsetRef.current.y + 12,
|
|
1279
|
+
});
|
|
1280
|
+
setDropTargetKey(findDayKeyAtPoint(pageX, pageY, session.layouts));
|
|
1281
|
+
},
|
|
1282
|
+
[refreshContainerOffset],
|
|
1283
|
+
);
|
|
1284
|
+
|
|
1285
|
+
const handleNativeRelease = useCallback(
|
|
1286
|
+
(e: { nativeEvent?: { pageX?: number; pageY?: number } }) => {
|
|
1287
|
+
const session = nativeSessionRef.current;
|
|
1288
|
+
if (!session) return;
|
|
1289
|
+
if (!session.dragging) {
|
|
1290
|
+
// Treat as a tap — responders steal onPress when drag is enabled.
|
|
1291
|
+
nativeSessionRef.current = null;
|
|
1292
|
+
onEventClick?.(session.event);
|
|
1293
|
+
return;
|
|
1294
|
+
}
|
|
1295
|
+
endNativeSession({
|
|
1296
|
+
commit: true,
|
|
1297
|
+
pageX: e.nativeEvent?.pageX,
|
|
1298
|
+
pageY: e.nativeEvent?.pageY,
|
|
1299
|
+
});
|
|
1300
|
+
},
|
|
1301
|
+
[endNativeSession, onEventClick],
|
|
1302
|
+
);
|
|
1303
|
+
|
|
1304
|
+
const handleNativeTerminate = useCallback(() => {
|
|
1305
|
+
endNativeSession({ commit: false });
|
|
1306
|
+
}, [endNativeSession]);
|
|
1307
|
+
|
|
1308
|
+
const getEventDragProps = useCallback(
|
|
1309
|
+
(event: CalendarEvent, mode: "day" | "slot" = "day") => {
|
|
1310
|
+
const base = { "data-calendar-event": event.id } as Record<string, unknown>;
|
|
1311
|
+
if (webDragEnabled) {
|
|
1312
|
+
return {
|
|
1313
|
+
...base,
|
|
1314
|
+
onPointerDown: (e: any) => handleEventPointerDown(event, e, mode),
|
|
1315
|
+
};
|
|
1316
|
+
}
|
|
1317
|
+
if (nativeDragEnabled) {
|
|
1318
|
+
return {
|
|
1319
|
+
...base,
|
|
1320
|
+
// Claim the touch so moves continue outside the chip (ScrollView-safe once dragging).
|
|
1321
|
+
onStartShouldSetResponder: () => true,
|
|
1322
|
+
onMoveShouldSetResponder: () => true,
|
|
1323
|
+
onResponderTerminationRequest: () => !nativeSessionRef.current?.dragging,
|
|
1324
|
+
onResponderGrant: (e: any) => handleNativeGrant(event, e),
|
|
1325
|
+
onResponderMove: handleNativeMove,
|
|
1326
|
+
onResponderRelease: handleNativeRelease,
|
|
1327
|
+
onResponderTerminate: handleNativeTerminate,
|
|
1328
|
+
};
|
|
1329
|
+
}
|
|
1330
|
+
return base;
|
|
1331
|
+
},
|
|
1332
|
+
[
|
|
1333
|
+
webDragEnabled,
|
|
1334
|
+
nativeDragEnabled,
|
|
1335
|
+
handleEventPointerDown,
|
|
1336
|
+
handleNativeGrant,
|
|
1337
|
+
handleNativeMove,
|
|
1338
|
+
handleNativeRelease,
|
|
1339
|
+
handleNativeTerminate,
|
|
1340
|
+
],
|
|
1341
|
+
);
|
|
1342
|
+
|
|
170
1343
|
// Group events by date key
|
|
171
1344
|
const eventsByDate = useMemo(() => {
|
|
172
1345
|
const grouped: Record<string, CalendarEvent[]> = {};
|
|
@@ -178,31 +1351,45 @@ export function Calendar({
|
|
|
178
1351
|
return grouped;
|
|
179
1352
|
}, [events]);
|
|
180
1353
|
|
|
181
|
-
//
|
|
1354
|
+
// -------------------------------------------------------------------------
|
|
1355
|
+
// Navigation (direction feeds the slide transition)
|
|
1356
|
+
// -------------------------------------------------------------------------
|
|
182
1357
|
const goToPrevious = useCallback(() => {
|
|
1358
|
+
navDirectionRef.current = -1;
|
|
1359
|
+
hasNavigatedRef.current = true;
|
|
183
1360
|
setCurrentDate((prev) => {
|
|
1361
|
+
if (view === "month") return addMonths(prev, -1);
|
|
184
1362
|
const next = new Date(prev);
|
|
185
|
-
if (view === "
|
|
186
|
-
else if (view === "week") next.setDate(prev.getDate() - 7);
|
|
1363
|
+
if (view === "week") next.setDate(prev.getDate() - 7);
|
|
187
1364
|
else next.setDate(prev.getDate() - 1);
|
|
188
1365
|
return next;
|
|
189
1366
|
});
|
|
190
1367
|
}, [view]);
|
|
191
1368
|
|
|
192
1369
|
const goToNext = useCallback(() => {
|
|
1370
|
+
navDirectionRef.current = 1;
|
|
1371
|
+
hasNavigatedRef.current = true;
|
|
193
1372
|
setCurrentDate((prev) => {
|
|
1373
|
+
if (view === "month") return addMonths(prev, 1);
|
|
194
1374
|
const next = new Date(prev);
|
|
195
|
-
if (view === "
|
|
196
|
-
else if (view === "week") next.setDate(prev.getDate() + 7);
|
|
1375
|
+
if (view === "week") next.setDate(prev.getDate() + 7);
|
|
197
1376
|
else next.setDate(prev.getDate() + 1);
|
|
198
1377
|
return next;
|
|
199
1378
|
});
|
|
200
1379
|
}, [view]);
|
|
201
1380
|
|
|
202
1381
|
const goToToday = useCallback(() => {
|
|
1382
|
+
navDirectionRef.current = 0;
|
|
1383
|
+
hasNavigatedRef.current = true;
|
|
203
1384
|
setCurrentDate(new Date());
|
|
204
1385
|
}, []);
|
|
205
1386
|
|
|
1387
|
+
const changeView = useCallback((next: CalendarViewType) => {
|
|
1388
|
+
navDirectionRef.current = 0;
|
|
1389
|
+
hasNavigatedRef.current = true;
|
|
1390
|
+
setView(next);
|
|
1391
|
+
}, []);
|
|
1392
|
+
|
|
206
1393
|
// Title
|
|
207
1394
|
const displayTitle = useMemo(() => {
|
|
208
1395
|
if (view === "month") {
|
|
@@ -220,37 +1407,234 @@ export function Calendar({
|
|
|
220
1407
|
return `${weekdayNames[currentDate.getDay()]}, ${monthNames[currentDate.getMonth()]} ${currentDate.getDate()}, ${currentDate.getFullYear()}`;
|
|
221
1408
|
}, [currentDate, view, firstDayOfWeek]);
|
|
222
1409
|
|
|
1410
|
+
// -------------------------------------------------------------------------
|
|
1411
|
+
// Keyboard focus + screen-reader announcements (Axiom 12)
|
|
1412
|
+
// -------------------------------------------------------------------------
|
|
1413
|
+
const [focusedDate, setFocusedDate] = useState<Date | null>(null);
|
|
1414
|
+
const [focusedSlotMin, setFocusedSlotMin] = useState(9 * 60);
|
|
1415
|
+
const [announcement, setAnnouncement] = useState("");
|
|
1416
|
+
|
|
1417
|
+
useEffect(() => {
|
|
1418
|
+
// aria-live: announce period/view changes only after user navigation.
|
|
1419
|
+
if (hasNavigatedRef.current) setAnnouncement(displayTitle);
|
|
1420
|
+
}, [displayTitle]);
|
|
1421
|
+
|
|
1422
|
+
const focusedDayKey = focusedDate ? formatDateKey(focusedDate) : null;
|
|
1423
|
+
|
|
1424
|
+
const focusCellId = focusedDayKey
|
|
1425
|
+
? view === "month"
|
|
1426
|
+
? `${calendarId}-day-${focusedDayKey}`
|
|
1427
|
+
: `${calendarId}-slot-cursor`
|
|
1428
|
+
: undefined;
|
|
1429
|
+
|
|
1430
|
+
const handleBodyKeyDown = useCallback(
|
|
1431
|
+
(e: { key: string; preventDefault?: () => void; stopPropagation?: () => void }) => {
|
|
1432
|
+
if (editorStateRef.current) return;
|
|
1433
|
+
const key = e.key;
|
|
1434
|
+
const arrows = ["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"];
|
|
1435
|
+
if (arrows.includes(key)) {
|
|
1436
|
+
e.preventDefault?.();
|
|
1437
|
+
const base = focusedDate ?? currentDate;
|
|
1438
|
+
if (!focusedDate) {
|
|
1439
|
+
setFocusedDate(base);
|
|
1440
|
+
setAnnouncement(formatDayLong(base));
|
|
1441
|
+
return;
|
|
1442
|
+
}
|
|
1443
|
+
if (view !== "month" && (key === "ArrowUp" || key === "ArrowDown")) {
|
|
1444
|
+
const nextMin = moveFocusSlot(
|
|
1445
|
+
focusedSlotMin,
|
|
1446
|
+
key as "ArrowUp" | "ArrowDown",
|
|
1447
|
+
slotMinutes,
|
|
1448
|
+
);
|
|
1449
|
+
setFocusedSlotMin(nextMin);
|
|
1450
|
+
setAnnouncement(
|
|
1451
|
+
`${formatDayLong(base)}, ${formatTimeRangeLabel(
|
|
1452
|
+
dateAtMinutes(base, nextMin),
|
|
1453
|
+
dateAtMinutes(base, nextMin + slotMinutes),
|
|
1454
|
+
)}`,
|
|
1455
|
+
);
|
|
1456
|
+
return;
|
|
1457
|
+
}
|
|
1458
|
+
// Horizontal arrows follow the VISUAL axis (WAI-ARIA grid pattern):
|
|
1459
|
+
// under RTL the next day sits to the LEFT, so swap left/right before
|
|
1460
|
+
// the direction-agnostic date math in moveFocusDate.
|
|
1461
|
+
const logicalKey =
|
|
1462
|
+
isRTL && key === "ArrowLeft"
|
|
1463
|
+
? "ArrowRight"
|
|
1464
|
+
: isRTL && key === "ArrowRight"
|
|
1465
|
+
? "ArrowLeft"
|
|
1466
|
+
: key;
|
|
1467
|
+
const next = moveFocusDate(base, logicalKey as any, view);
|
|
1468
|
+
setFocusedDate(next);
|
|
1469
|
+
setAnnouncement(formatDayLong(next));
|
|
1470
|
+
// Crossing the visible period navigates it (direction-aware slide).
|
|
1471
|
+
const delta = next.getTime() - base.getTime();
|
|
1472
|
+
if (view === "month" && next.getMonth() !== currentDate.getMonth()) {
|
|
1473
|
+
navDirectionRef.current = delta > 0 ? 1 : -1;
|
|
1474
|
+
hasNavigatedRef.current = true;
|
|
1475
|
+
setCurrentDate(next);
|
|
1476
|
+
} else if (view === "week") {
|
|
1477
|
+
const visible = getWeekDays(currentDate, firstDayOfWeek).map(formatDateKey);
|
|
1478
|
+
if (!visible.includes(formatDateKey(next))) {
|
|
1479
|
+
navDirectionRef.current = delta > 0 ? 1 : -1;
|
|
1480
|
+
hasNavigatedRef.current = true;
|
|
1481
|
+
setCurrentDate(next);
|
|
1482
|
+
}
|
|
1483
|
+
} else if (view === "day" && !isSameDay(next, currentDate)) {
|
|
1484
|
+
navDirectionRef.current = delta > 0 ? 1 : -1;
|
|
1485
|
+
hasNavigatedRef.current = true;
|
|
1486
|
+
setCurrentDate(next);
|
|
1487
|
+
}
|
|
1488
|
+
return;
|
|
1489
|
+
}
|
|
1490
|
+
if (key === "Enter" && focusedDate) {
|
|
1491
|
+
e.preventDefault?.();
|
|
1492
|
+
if (view === "month") {
|
|
1493
|
+
onDateSelect?.(focusedDate);
|
|
1494
|
+
return;
|
|
1495
|
+
}
|
|
1496
|
+
const start = dateAtMinutes(focusedDate, focusedSlotMin);
|
|
1497
|
+
if (onEventCreate) {
|
|
1498
|
+
openEditor(formatDateKey(focusedDate), {
|
|
1499
|
+
start,
|
|
1500
|
+
end: dateAtMinutes(focusedDate, focusedSlotMin + slotMinutes),
|
|
1501
|
+
});
|
|
1502
|
+
} else {
|
|
1503
|
+
onDateSelect?.(start);
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
},
|
|
1507
|
+
[
|
|
1508
|
+
focusedDate,
|
|
1509
|
+
currentDate,
|
|
1510
|
+
view,
|
|
1511
|
+
focusedSlotMin,
|
|
1512
|
+
slotMinutes,
|
|
1513
|
+
firstDayOfWeek,
|
|
1514
|
+
isRTL,
|
|
1515
|
+
onDateSelect,
|
|
1516
|
+
onEventCreate,
|
|
1517
|
+
openEditor,
|
|
1518
|
+
],
|
|
1519
|
+
);
|
|
1520
|
+
|
|
1521
|
+
// -------------------------------------------------------------------------
|
|
1522
|
+
// Shared event chip / block a11y + press wiring
|
|
1523
|
+
// -------------------------------------------------------------------------
|
|
1524
|
+
const eventA11yProps = useCallback(
|
|
1525
|
+
(event: CalendarEvent) =>
|
|
1526
|
+
({
|
|
1527
|
+
role: "button",
|
|
1528
|
+
tabIndex: 0,
|
|
1529
|
+
"aria-label": eventAccessibleLabel(event),
|
|
1530
|
+
onKeyDown: (ke: any) => {
|
|
1531
|
+
if (ke.key === "Enter" || ke.key === " ") {
|
|
1532
|
+
ke.preventDefault?.();
|
|
1533
|
+
ke.stopPropagation?.();
|
|
1534
|
+
onEventClick?.(event);
|
|
1535
|
+
}
|
|
1536
|
+
},
|
|
1537
|
+
}) as Record<string, unknown>,
|
|
1538
|
+
[onEventClick],
|
|
1539
|
+
);
|
|
1540
|
+
|
|
223
1541
|
const renderEventBadge = useCallback(
|
|
224
1542
|
(event: CalendarEvent, compact = false) => {
|
|
225
|
-
|
|
1543
|
+
const dragProps = getEventDragProps(event, "day") as any;
|
|
1544
|
+
const lifted = draggingEventId === event.id;
|
|
1545
|
+
if (renderEvent) {
|
|
1546
|
+
if (!dragEnabled) {
|
|
1547
|
+
// Custom renderers often return fragments/arrays; keep a stable key here.
|
|
1548
|
+
return <React.Fragment key={event.id}>{renderEvent(event)}</React.Fragment>;
|
|
1549
|
+
}
|
|
1550
|
+
// Wrap custom content so it stays draggable (FrappeCalendar always
|
|
1551
|
+
// bridges renderEvent, so drag must not depend on the default chip).
|
|
1552
|
+
return (
|
|
1553
|
+
<YStack
|
|
1554
|
+
key={event.id}
|
|
1555
|
+
cursor={webDragEnabled ? "grab" : undefined}
|
|
1556
|
+
opacity={lifted ? 0.4 : 1}
|
|
1557
|
+
{...dragProps}
|
|
1558
|
+
>
|
|
1559
|
+
{renderEvent(event)}
|
|
1560
|
+
</YStack>
|
|
1561
|
+
);
|
|
1562
|
+
}
|
|
226
1563
|
return (
|
|
227
1564
|
<YStack
|
|
228
1565
|
key={event.id}
|
|
229
1566
|
{...knobProps.borderRadius}
|
|
230
1567
|
backgroundColor={(event.color || "$accentBackground") as any}
|
|
231
1568
|
padding={compact ? "$1" : "$2"}
|
|
232
|
-
|
|
1569
|
+
// DG-LAY-04: month-view chips measured 23px tall — floor the visual
|
|
1570
|
+
// box at 24 and fill the rest of the 44 target with hit slop (real
|
|
1571
|
+
// 44 chips would break stacked chips inside month cells).
|
|
1572
|
+
minHeight={MONTH_CHIP_MIN_PX}
|
|
1573
|
+
justifyContent="center"
|
|
1574
|
+
hitSlop={pressTargetHitSlop(compact ? MONTH_CHIP_MIN_PX : 32)}
|
|
1575
|
+
opacity={lifted ? 0.4 : 1}
|
|
1576
|
+
hoverStyle={{ opacity: lifted ? 0.4 : 0.9 }}
|
|
233
1577
|
pressStyle={{ opacity: 0.8 }}
|
|
234
|
-
cursor="pointer"
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
1578
|
+
cursor={webDragEnabled ? "grab" : "pointer"}
|
|
1579
|
+
{...eventA11yProps(event)}
|
|
1580
|
+
{...dragProps}
|
|
1581
|
+
// Native drag responders own the tap → click is handled on release.
|
|
1582
|
+
onPress={
|
|
1583
|
+
nativeDragEnabled
|
|
1584
|
+
? undefined
|
|
1585
|
+
: (e) => {
|
|
1586
|
+
(e as any)?.stopPropagation?.();
|
|
1587
|
+
if (suppressClickRef.current) return;
|
|
1588
|
+
onEventClick?.(event);
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
239
1591
|
>
|
|
240
|
-
<Text
|
|
1592
|
+
<Text
|
|
1593
|
+
{...knobProps.body}
|
|
1594
|
+
fontSize={compact ? "$1" : "$2"}
|
|
1595
|
+
numberOfLines={compact ? 1 : 2}
|
|
1596
|
+
color={eventChipTextColor(event.color)}
|
|
1597
|
+
>
|
|
241
1598
|
{event.title}
|
|
242
1599
|
</Text>
|
|
243
1600
|
</YStack>
|
|
244
1601
|
);
|
|
245
1602
|
},
|
|
246
|
-
[
|
|
1603
|
+
[
|
|
1604
|
+
renderEvent,
|
|
1605
|
+
onEventClick,
|
|
1606
|
+
knobProps.borderRadius,
|
|
1607
|
+
dragEnabled,
|
|
1608
|
+
webDragEnabled,
|
|
1609
|
+
nativeDragEnabled,
|
|
1610
|
+
getEventDragProps,
|
|
1611
|
+
eventA11yProps,
|
|
1612
|
+
draggingEventId,
|
|
1613
|
+
],
|
|
247
1614
|
);
|
|
248
1615
|
|
|
249
1616
|
// -------------------------------------------------------------------------
|
|
250
1617
|
// Month view
|
|
251
1618
|
// -------------------------------------------------------------------------
|
|
1619
|
+
const MONTH_VISIBLE_EVENTS = 3;
|
|
1620
|
+
|
|
252
1621
|
const renderMonthView = () => {
|
|
253
1622
|
const monthDays = getMonthDays(currentDate, firstDayOfWeek);
|
|
1623
|
+
const totalWeeks = Math.ceil(monthDays.length / 7);
|
|
1624
|
+
|
|
1625
|
+
// Fit-first row floor (LC-10 FRAME-CONTAINMENT): the comfort floor
|
|
1626
|
+
// (size-stepped density) holds while the whole month fits the measured
|
|
1627
|
+
// body; when it would slice the last week at the panel edge, rows relax
|
|
1628
|
+
// to the hard floor so the month fits whole. Only below the hard floor
|
|
1629
|
+
// does the grid scroll — and then the window is sized to a whole-row
|
|
1630
|
+
// boundary, so no week row is sliced mid-row at rest.
|
|
1631
|
+
let monthRowMinHeight = monthCellMinHeight;
|
|
1632
|
+
if (monthBodyHeight > 0 && totalWeeks * monthCellMinHeight > monthBodyHeight) {
|
|
1633
|
+
monthRowMinHeight =
|
|
1634
|
+
totalWeeks * monthRowHardFloor <= monthBodyHeight
|
|
1635
|
+
? monthRowHardFloor
|
|
1636
|
+
: monthBodyHeight / Math.max(1, Math.floor(monthBodyHeight / monthRowHardFloor));
|
|
1637
|
+
}
|
|
254
1638
|
|
|
255
1639
|
const weekdayHeaders: string[] = [];
|
|
256
1640
|
for (let i = 0; i < 7; i++) {
|
|
@@ -258,71 +1642,194 @@ export function Calendar({
|
|
|
258
1642
|
}
|
|
259
1643
|
|
|
260
1644
|
return (
|
|
261
|
-
<YStack
|
|
262
|
-
|
|
1645
|
+
<YStack
|
|
1646
|
+
flex={1}
|
|
1647
|
+
role="grid"
|
|
1648
|
+
aria-label={t("Calendar")}
|
|
1649
|
+
tabIndex={0}
|
|
1650
|
+
aria-activedescendant={focusCellId}
|
|
1651
|
+
onKeyDown={handleBodyKeyDown as any}
|
|
1652
|
+
outlineWidth={0}
|
|
1653
|
+
focusVisibleStyle={{
|
|
1654
|
+
outlineWidth: 2,
|
|
1655
|
+
outlineColor: "$accentBackground",
|
|
1656
|
+
outlineStyle: "solid",
|
|
1657
|
+
}}
|
|
1658
|
+
{...{ "data-calendar-body": view }}
|
|
1659
|
+
>
|
|
1660
|
+
<XStack {...hairline.bottom} borderColor="$borderColor" role="row">
|
|
263
1661
|
{weekdayHeaders.map((day) => (
|
|
264
1662
|
<YStack
|
|
265
1663
|
key={day}
|
|
266
1664
|
flex={1}
|
|
267
1665
|
padding="$2"
|
|
268
1666
|
alignItems="center"
|
|
1667
|
+
role="columnheader"
|
|
269
1668
|
{...{ backgroundColor: componentColors.surface.background }}
|
|
270
1669
|
>
|
|
271
|
-
<Text
|
|
1670
|
+
<Text
|
|
1671
|
+
{...knobProps.body}
|
|
1672
|
+
fontWeight="500"
|
|
1673
|
+
fontSize="$2"
|
|
1674
|
+
color={componentColors.text.muted}
|
|
1675
|
+
>
|
|
272
1676
|
{day}
|
|
273
1677
|
</Text>
|
|
274
1678
|
</YStack>
|
|
275
1679
|
))}
|
|
276
1680
|
</XStack>
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
1681
|
+
{/* flexGrow content: week rows stretch to share the panel height so a
|
|
1682
|
+
5/6-week month fits without slicing the last row; scroll engages
|
|
1683
|
+
only below the per-row hard floor. */}
|
|
1684
|
+
<ScrollView
|
|
1685
|
+
flex={1}
|
|
1686
|
+
scrollEnabled={!scrollLocked}
|
|
1687
|
+
contentContainerStyle={{ flexGrow: 1 }}
|
|
1688
|
+
onLayout={(e) => {
|
|
1689
|
+
const next = e.nativeEvent.layout.height;
|
|
1690
|
+
setMonthBodyHeight((prev) => (prev === next ? prev : next));
|
|
1691
|
+
}}
|
|
1692
|
+
>
|
|
1693
|
+
<YStack flex={1}>
|
|
1694
|
+
{Array.from({ length: totalWeeks }).map((_, weekIndex, weeks) => (
|
|
1695
|
+
// basis:auto (not flex={1}): rows grow from their content and
|
|
1696
|
+
// share only the EXTRA space, so a crowded cell can never be
|
|
1697
|
+
// sliced by a fixed row share; scroll engages past the floor.
|
|
1698
|
+
<XStack
|
|
1699
|
+
key={weekIndex}
|
|
1700
|
+
flexGrow={1}
|
|
1701
|
+
flexShrink={0}
|
|
1702
|
+
flexBasis="auto"
|
|
1703
|
+
minHeight={monthRowMinHeight}
|
|
1704
|
+
role="row"
|
|
1705
|
+
>
|
|
1706
|
+
{monthDays.slice(weekIndex * 7, (weekIndex + 1) * 7).map((day, dayIndex) => {
|
|
282
1707
|
const isCurrentMonth = day.getMonth() === currentDate.getMonth();
|
|
283
|
-
const
|
|
1708
|
+
const dayKey = formatDateKey(day);
|
|
1709
|
+
const dayEvents = eventsByDate[dayKey] || [];
|
|
1710
|
+
const isDropTarget = dragGhost !== null && dropTargetKey === dayKey;
|
|
1711
|
+
const isFocused = focusedDayKey === dayKey;
|
|
1712
|
+
const hiddenCount = dayEvents.length - MONTH_VISIBLE_EVENTS;
|
|
1713
|
+
const today = isToday(day);
|
|
284
1714
|
|
|
285
1715
|
return (
|
|
286
1716
|
<YStack
|
|
287
1717
|
key={day.toISOString()}
|
|
1718
|
+
id={`${calendarId}-day-${dayKey}`}
|
|
1719
|
+
{...({ role: "gridcell" } as any)}
|
|
1720
|
+
aria-selected={isFocused || undefined}
|
|
1721
|
+
aria-label={
|
|
1722
|
+
dayEvents.length > 0
|
|
1723
|
+
? `${formatDayLong(day)}, ${withInterp(t("{{count}} events"), {
|
|
1724
|
+
count: dayEvents.length,
|
|
1725
|
+
})}`
|
|
1726
|
+
: formatDayLong(day)
|
|
1727
|
+
}
|
|
1728
|
+
ref={
|
|
1729
|
+
nativeDragEnabled
|
|
1730
|
+
? (node: MeasurableDayNode | null) => registerDayRef(dayKey, node)
|
|
1731
|
+
: undefined
|
|
1732
|
+
}
|
|
288
1733
|
flex={1}
|
|
289
|
-
minHeight={
|
|
290
|
-
|
|
291
|
-
|
|
1734
|
+
minHeight={monthRowMinHeight}
|
|
1735
|
+
// Interior hairline separators only — the panel frame
|
|
1736
|
+
// owns the outer edge (OPTICS: one device pixel, no
|
|
1737
|
+
// doubled rules at the last column/row).
|
|
1738
|
+
{...gridCellEdges(dayIndex < 6, weekIndex < weeks.length - 1)}
|
|
292
1739
|
borderColor="$borderColor"
|
|
293
1740
|
backgroundColor={
|
|
294
|
-
|
|
295
|
-
?
|
|
1741
|
+
isDropTarget
|
|
1742
|
+
? "$accentBackground"
|
|
296
1743
|
: isCurrentMonth
|
|
297
1744
|
? "$background"
|
|
298
1745
|
: componentColors.surface.background
|
|
299
1746
|
}
|
|
300
|
-
padding=
|
|
301
|
-
|
|
1747
|
+
padding={cellPad}
|
|
1748
|
+
{...(isFocused && {
|
|
1749
|
+
outlineWidth: 2,
|
|
1750
|
+
outlineColor: "$accentBackground",
|
|
1751
|
+
outlineStyle: "solid",
|
|
1752
|
+
outlineOffset: -2,
|
|
1753
|
+
})}
|
|
1754
|
+
{...{ "data-calendar-day": dayKey }}
|
|
1755
|
+
onPress={() => {
|
|
1756
|
+
if (suppressClickRef.current) return;
|
|
1757
|
+
onDateSelect?.(day);
|
|
1758
|
+
}}
|
|
302
1759
|
cursor="pointer"
|
|
303
1760
|
hoverStyle={{ backgroundColor: componentColors.surface.background }}
|
|
304
1761
|
>
|
|
305
|
-
<
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
1762
|
+
<XStack justifyContent="flex-end" paddingInlineEnd="$1">
|
|
1763
|
+
{/* Today marker: accent disc (pill-by-anatomy, like Badge). */}
|
|
1764
|
+
<YStack
|
|
1765
|
+
width={DAY_DISC_PX}
|
|
1766
|
+
height={DAY_DISC_PX}
|
|
1767
|
+
borderRadius={DAY_DISC_PX / 2}
|
|
1768
|
+
alignItems="center"
|
|
1769
|
+
justifyContent="center"
|
|
1770
|
+
backgroundColor={today ? "$accentBackground" : "transparent"}
|
|
1771
|
+
{...(today && { "data-calendar-today": "true" })}
|
|
1772
|
+
>
|
|
1773
|
+
<Text
|
|
1774
|
+
{...knobProps.body}
|
|
1775
|
+
fontSize="$2"
|
|
1776
|
+
fontWeight={today ? "700" : "400"}
|
|
1777
|
+
color={
|
|
1778
|
+
today
|
|
1779
|
+
? (onAccent ?? "$accentColor")
|
|
1780
|
+
: isCurrentMonth
|
|
1781
|
+
? "$color"
|
|
1782
|
+
: // muted, not subtle: adjacent-month days are
|
|
1783
|
+
// clickable text — $color8 measured 1.79:1
|
|
1784
|
+
componentColors.text.muted
|
|
1785
|
+
}
|
|
1786
|
+
textAlign="center"
|
|
1787
|
+
>
|
|
1788
|
+
{day.getDate()}
|
|
325
1789
|
</Text>
|
|
1790
|
+
</YStack>
|
|
1791
|
+
</XStack>
|
|
1792
|
+
<YStack gap={chipGap} marginTop={chipGap}>
|
|
1793
|
+
{dayEvents
|
|
1794
|
+
.slice(0, MONTH_VISIBLE_EVENTS)
|
|
1795
|
+
.map((event) => renderEventBadge(event, true))}
|
|
1796
|
+
{hiddenCount > 0 && (
|
|
1797
|
+
<FloatingPanel
|
|
1798
|
+
open={overflowDayKey === dayKey}
|
|
1799
|
+
onOpenChange={(open) => setOverflowDayKey(open ? dayKey : null)}
|
|
1800
|
+
fitContent
|
|
1801
|
+
trigger={
|
|
1802
|
+
<XStack
|
|
1803
|
+
role="button"
|
|
1804
|
+
aria-label={withInterp(t("Show all {{count}} events"), {
|
|
1805
|
+
count: dayEvents.length,
|
|
1806
|
+
})}
|
|
1807
|
+
cursor="pointer"
|
|
1808
|
+
paddingInlineStart="$1"
|
|
1809
|
+
// Web: keep the "+N more" press from also selecting
|
|
1810
|
+
// the day cell. Native must not stop propagation —
|
|
1811
|
+
// the sheet trigger's own press lives on a parent.
|
|
1812
|
+
onPress={isWeb ? (e: any) => e?.stopPropagation?.() : undefined}
|
|
1813
|
+
hoverStyle={{ opacity: 0.7 }}
|
|
1814
|
+
{...{ "data-calendar-overflow": String(hiddenCount) }}
|
|
1815
|
+
>
|
|
1816
|
+
<Text fontSize="$1" color={componentColors.text.muted}>
|
|
1817
|
+
{withInterp(t("+{{count}} more"), { count: hiddenCount })}
|
|
1818
|
+
</Text>
|
|
1819
|
+
</XStack>
|
|
1820
|
+
}
|
|
1821
|
+
>
|
|
1822
|
+
<YStack
|
|
1823
|
+
gap="$1"
|
|
1824
|
+
minWidth={220}
|
|
1825
|
+
{...{ "data-calendar-overflow-panel": dayKey }}
|
|
1826
|
+
>
|
|
1827
|
+
<Text {...knobProps.heading} fontSize="$3">
|
|
1828
|
+
{formatDayLong(day)}
|
|
1829
|
+
</Text>
|
|
1830
|
+
{dayEvents.map((event) => renderEventBadge(event, false))}
|
|
1831
|
+
</YStack>
|
|
1832
|
+
</FloatingPanel>
|
|
326
1833
|
)}
|
|
327
1834
|
</YStack>
|
|
328
1835
|
</YStack>
|
|
@@ -337,15 +1844,188 @@ export function Calendar({
|
|
|
337
1844
|
};
|
|
338
1845
|
|
|
339
1846
|
// -------------------------------------------------------------------------
|
|
340
|
-
//
|
|
1847
|
+
// Time grid (week + day views)
|
|
341
1848
|
// -------------------------------------------------------------------------
|
|
342
|
-
const
|
|
343
|
-
|
|
1849
|
+
const timeGridScrollRef = useRef<any>(null);
|
|
1850
|
+
const gridHeight = 24 * hourHeight;
|
|
1851
|
+
|
|
1852
|
+
useEffect(() => {
|
|
1853
|
+
if (view === "month") return;
|
|
1854
|
+
// Land on the working morning (or the now line) instead of midnight.
|
|
1855
|
+
const target = Math.max(0, minutesToY(7 * 60, hourHeight) - 8);
|
|
1856
|
+
timeGridScrollRef.current?.scrollTo?.({ y: target, animated: false });
|
|
1857
|
+
}, [view, hourHeight]);
|
|
1858
|
+
|
|
1859
|
+
const renderTimedBlock = (event: CalendarEvent, layout: { column: number; columns: number }) => {
|
|
1860
|
+
const preview = resizePreview?.id === event.id ? resizePreview : null;
|
|
1861
|
+
const start = preview ? preview.start : event.start;
|
|
1862
|
+
const end = preview ? preview.end : (event.end ?? event.start);
|
|
1863
|
+
const startMin = minutesOfDay(start);
|
|
1864
|
+
const endMin = Math.max(
|
|
1865
|
+
startMin + slotMinutes,
|
|
1866
|
+
startMin + (end.getTime() - start.getTime()) / 60000,
|
|
1867
|
+
);
|
|
1868
|
+
const top = minutesToY(startMin, hourHeight);
|
|
1869
|
+
const blockHeight = Math.max(MIN_BLOCK_PX, minutesToY(endMin - startMin, hourHeight));
|
|
1870
|
+
const widthPct = 100 / layout.columns;
|
|
1871
|
+
// Overlap columns progress in READING direction (P-16): the physical
|
|
1872
|
+
// left offset is JS-computed %, so mirror it from the direction source.
|
|
1873
|
+
const leftPct = (isRTL ? layout.columns - 1 - layout.column : layout.column) * widthPct;
|
|
1874
|
+
const lifted = draggingEventId === event.id;
|
|
1875
|
+
const zoneInner = Math.min(RESIZE_ZONE_PX / 2, blockHeight / 2);
|
|
1876
|
+
const dragProps = getEventDragProps(event, "slot") as any;
|
|
344
1877
|
|
|
345
1878
|
return (
|
|
346
|
-
<YStack
|
|
347
|
-
|
|
348
|
-
|
|
1879
|
+
<YStack
|
|
1880
|
+
key={event.id}
|
|
1881
|
+
position="absolute"
|
|
1882
|
+
top={top}
|
|
1883
|
+
height={blockHeight}
|
|
1884
|
+
left={`${leftPct}%` as any}
|
|
1885
|
+
width={`${widthPct}%` as any}
|
|
1886
|
+
paddingInlineEnd={2}
|
|
1887
|
+
zIndex={preview ? 4 : 2}
|
|
1888
|
+
// LC-25: committed/reverted/snapped geometry jumps tween on web.
|
|
1889
|
+
transition={webLayoutTransition as any}
|
|
1890
|
+
>
|
|
1891
|
+
<YStack
|
|
1892
|
+
flex={1}
|
|
1893
|
+
{...knobProps.borderRadius}
|
|
1894
|
+
backgroundColor={(event.color || "$accentBackground") as any}
|
|
1895
|
+
padding="$1"
|
|
1896
|
+
overflow="hidden"
|
|
1897
|
+
opacity={lifted ? 0.4 : 1}
|
|
1898
|
+
borderWidth={1}
|
|
1899
|
+
borderColor="$background"
|
|
1900
|
+
cursor={webDragEnabled ? "grab" : "pointer"}
|
|
1901
|
+
{...eventA11yProps(event)}
|
|
1902
|
+
{...dragProps}
|
|
1903
|
+
onPress={
|
|
1904
|
+
nativeDragEnabled
|
|
1905
|
+
? undefined
|
|
1906
|
+
: (e) => {
|
|
1907
|
+
(e as any)?.stopPropagation?.();
|
|
1908
|
+
if (suppressClickRef.current) return;
|
|
1909
|
+
onEventClick?.(event);
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
>
|
|
1913
|
+
{renderEvent ? (
|
|
1914
|
+
renderEvent(event)
|
|
1915
|
+
) : (
|
|
1916
|
+
<>
|
|
1917
|
+
<Text
|
|
1918
|
+
fontSize="$1"
|
|
1919
|
+
fontWeight="600"
|
|
1920
|
+
numberOfLines={1}
|
|
1921
|
+
color={eventChipTextColor(event.color)}
|
|
1922
|
+
>
|
|
1923
|
+
{event.title}
|
|
1924
|
+
</Text>
|
|
1925
|
+
{blockHeight >= 34 && (
|
|
1926
|
+
<Text fontSize="$1" numberOfLines={1} color={eventChipTextColor(event.color)}>
|
|
1927
|
+
{formatTimeRangeLabel(start, end)}
|
|
1928
|
+
</Text>
|
|
1929
|
+
)}
|
|
1930
|
+
</>
|
|
1931
|
+
)}
|
|
1932
|
+
</YStack>
|
|
1933
|
+
|
|
1934
|
+
{/* Resize handles: 44px hit zones straddling each edge (Axiom 12). */}
|
|
1935
|
+
{webResizeEnabled && (
|
|
1936
|
+
<>
|
|
1937
|
+
<YStack
|
|
1938
|
+
position="absolute"
|
|
1939
|
+
{...overlayInset}
|
|
1940
|
+
top={-RESIZE_ZONE_PX / 2}
|
|
1941
|
+
height={RESIZE_ZONE_PX / 2 + zoneInner}
|
|
1942
|
+
cursor="ns-resize"
|
|
1943
|
+
zIndex={3}
|
|
1944
|
+
justifyContent="flex-end"
|
|
1945
|
+
alignItems="center"
|
|
1946
|
+
opacity={0}
|
|
1947
|
+
hoverStyle={{ opacity: 1 }}
|
|
1948
|
+
onPointerDown={(e: any) => handleResizePointerDown(event, "start", e)}
|
|
1949
|
+
{...{ "data-calendar-resize": `start:${event.id}` }}
|
|
1950
|
+
>
|
|
1951
|
+
<YStack
|
|
1952
|
+
width={28}
|
|
1953
|
+
height={3}
|
|
1954
|
+
borderRadius={2}
|
|
1955
|
+
backgroundColor="$accentColor"
|
|
1956
|
+
marginBottom={2}
|
|
1957
|
+
/>
|
|
1958
|
+
</YStack>
|
|
1959
|
+
<YStack
|
|
1960
|
+
position="absolute"
|
|
1961
|
+
{...overlayInset}
|
|
1962
|
+
bottom={-RESIZE_ZONE_PX / 2}
|
|
1963
|
+
height={RESIZE_ZONE_PX / 2 + zoneInner}
|
|
1964
|
+
cursor="ns-resize"
|
|
1965
|
+
zIndex={3}
|
|
1966
|
+
justifyContent="flex-start"
|
|
1967
|
+
alignItems="center"
|
|
1968
|
+
opacity={0}
|
|
1969
|
+
hoverStyle={{ opacity: 1 }}
|
|
1970
|
+
onPointerDown={(e: any) => handleResizePointerDown(event, "end", e)}
|
|
1971
|
+
{...{ "data-calendar-resize": `end:${event.id}` }}
|
|
1972
|
+
>
|
|
1973
|
+
<YStack
|
|
1974
|
+
width={28}
|
|
1975
|
+
height={3}
|
|
1976
|
+
borderRadius={2}
|
|
1977
|
+
backgroundColor="$accentColor"
|
|
1978
|
+
marginTop={2}
|
|
1979
|
+
/>
|
|
1980
|
+
</YStack>
|
|
1981
|
+
</>
|
|
1982
|
+
)}
|
|
1983
|
+
|
|
1984
|
+
{/* Live duration label while resizing. */}
|
|
1985
|
+
{preview && (
|
|
1986
|
+
<YStack
|
|
1987
|
+
position="absolute"
|
|
1988
|
+
top={-26}
|
|
1989
|
+
alignSelf="center"
|
|
1990
|
+
backgroundColor="$background"
|
|
1991
|
+
{...knobProps.borderRadius}
|
|
1992
|
+
borderWidth={1}
|
|
1993
|
+
borderColor="$borderColor"
|
|
1994
|
+
paddingHorizontal="$2"
|
|
1995
|
+
zIndex={5}
|
|
1996
|
+
pointerEvents="none"
|
|
1997
|
+
{...{ "data-calendar-resize-label": "true" }}
|
|
1998
|
+
>
|
|
1999
|
+
<Text fontSize="$1" color="$color">
|
|
2000
|
+
{formatTimeRangeLabel(preview.start, preview.end)}
|
|
2001
|
+
</Text>
|
|
2002
|
+
</YStack>
|
|
2003
|
+
)}
|
|
2004
|
+
</YStack>
|
|
2005
|
+
);
|
|
2006
|
+
};
|
|
2007
|
+
|
|
2008
|
+
const renderTimeGrid = (days: Date[]) => {
|
|
2009
|
+
return (
|
|
2010
|
+
<YStack
|
|
2011
|
+
flex={1}
|
|
2012
|
+
role="grid"
|
|
2013
|
+
aria-label={t("Calendar")}
|
|
2014
|
+
tabIndex={0}
|
|
2015
|
+
aria-activedescendant={focusCellId}
|
|
2016
|
+
onKeyDown={handleBodyKeyDown as any}
|
|
2017
|
+
outlineWidth={0}
|
|
2018
|
+
focusVisibleStyle={{
|
|
2019
|
+
outlineWidth: 2,
|
|
2020
|
+
outlineColor: "$accentBackground",
|
|
2021
|
+
outlineStyle: "solid",
|
|
2022
|
+
}}
|
|
2023
|
+
{...{ "data-calendar-body": view }}
|
|
2024
|
+
>
|
|
2025
|
+
{/* Day headers */}
|
|
2026
|
+
<XStack {...hairline.bottom} borderColor="$borderColor">
|
|
2027
|
+
<YStack width={56} />
|
|
2028
|
+
{days.map((day) => (
|
|
349
2029
|
<YStack
|
|
350
2030
|
key={day.toISOString()}
|
|
351
2031
|
flex={1}
|
|
@@ -354,10 +2034,16 @@ export function Calendar({
|
|
|
354
2034
|
{...{ backgroundColor: componentColors.surface.background }}
|
|
355
2035
|
{...(isToday(day) && { backgroundColor: componentColors.interactive.background })}
|
|
356
2036
|
>
|
|
357
|
-
<Text
|
|
2037
|
+
<Text
|
|
2038
|
+
{...knobProps.body}
|
|
2039
|
+
fontWeight="500"
|
|
2040
|
+
fontSize="$2"
|
|
2041
|
+
color={componentColors.text.muted}
|
|
2042
|
+
>
|
|
358
2043
|
{weekdayNames[day.getDay()]}
|
|
359
2044
|
</Text>
|
|
360
2045
|
<Text
|
|
2046
|
+
{...knobProps.body}
|
|
361
2047
|
fontWeight={isToday(day) ? "700" : "400"}
|
|
362
2048
|
fontSize={knobProps.sizeToken}
|
|
363
2049
|
color={isToday(day) ? "$accentColor" : "$color"}
|
|
@@ -367,24 +2053,260 @@ export function Calendar({
|
|
|
367
2053
|
</YStack>
|
|
368
2054
|
))}
|
|
369
2055
|
</XStack>
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
2056
|
+
|
|
2057
|
+
{/* All-day / untimed strip (also the day-granularity drop row) */}
|
|
2058
|
+
<XStack {...hairline.bottom} borderColor="$borderColor" minHeight={30}>
|
|
2059
|
+
<YStack width={56} justifyContent="center" alignItems="flex-end" paddingInlineEnd="$2">
|
|
2060
|
+
<Text fontSize="$1" color={componentColors.text.muted}>
|
|
2061
|
+
{t("All day")}
|
|
2062
|
+
</Text>
|
|
2063
|
+
</YStack>
|
|
2064
|
+
{days.map((day) => {
|
|
2065
|
+
const dayKey = formatDateKey(day);
|
|
2066
|
+
const dayEvents = (eventsByDate[dayKey] || []).filter((ev) => !isTimedEvent(ev));
|
|
2067
|
+
const isDropTarget = dragGhost !== null && dropTargetKey === dayKey;
|
|
2068
|
+
return (
|
|
2069
|
+
<YStack
|
|
2070
|
+
key={day.toISOString()}
|
|
2071
|
+
flex={1}
|
|
2072
|
+
{...hairlineEnd}
|
|
2073
|
+
borderColor="$borderColor"
|
|
2074
|
+
padding="$1"
|
|
2075
|
+
gap="$1"
|
|
2076
|
+
backgroundColor={isDropTarget ? "$accentBackground" : undefined}
|
|
2077
|
+
{...{ "data-calendar-day": dayKey }}
|
|
2078
|
+
ref={
|
|
2079
|
+
nativeDragEnabled
|
|
2080
|
+
? (node: MeasurableDayNode | null) => registerDayRef(`allday:${dayKey}`, node)
|
|
2081
|
+
: undefined
|
|
2082
|
+
}
|
|
2083
|
+
onPress={() => {
|
|
2084
|
+
if (suppressClickRef.current) return;
|
|
2085
|
+
onDateSelect?.(day);
|
|
2086
|
+
}}
|
|
2087
|
+
>
|
|
2088
|
+
{dayEvents.map((event) => renderEventBadge(event, true))}
|
|
2089
|
+
</YStack>
|
|
2090
|
+
);
|
|
2091
|
+
})}
|
|
2092
|
+
</XStack>
|
|
2093
|
+
|
|
2094
|
+
{/* Time grid body */}
|
|
2095
|
+
<ScrollView ref={timeGridScrollRef} flex={1} scrollEnabled={!scrollLocked}>
|
|
2096
|
+
<XStack>
|
|
2097
|
+
{/* Hour gutter */}
|
|
2098
|
+
<YStack width={56}>
|
|
2099
|
+
{hours.map((hour) => (
|
|
2100
|
+
<YStack key={hour} height={hourHeight} alignItems="flex-end" paddingInlineEnd="$2">
|
|
2101
|
+
<Text fontSize="$1" color={componentColors.text.muted}>
|
|
2102
|
+
{formatHour(hour)}
|
|
2103
|
+
</Text>
|
|
2104
|
+
</YStack>
|
|
2105
|
+
))}
|
|
2106
|
+
</YStack>
|
|
2107
|
+
|
|
2108
|
+
{days.map((day) => {
|
|
2109
|
+
const dayKey = formatDateKey(day);
|
|
2110
|
+
const dayEvents = (eventsByDate[dayKey] || []).filter(isTimedEvent);
|
|
2111
|
+
const blocks = layoutDayBlocks(
|
|
2112
|
+
dayEvents.map((ev) => ({
|
|
2113
|
+
id: ev.id,
|
|
2114
|
+
startMin: minutesOfDay(ev.start),
|
|
2115
|
+
endMin: Math.min(
|
|
2116
|
+
MINUTES_PER_DAY,
|
|
2117
|
+
Math.max(
|
|
2118
|
+
minutesOfDay(ev.start) + slotMinutes,
|
|
2119
|
+
minutesOfDay(ev.start) +
|
|
2120
|
+
((ev.end?.getTime() ?? ev.start.getTime()) - ev.start.getTime()) / 60000,
|
|
2121
|
+
),
|
|
2122
|
+
),
|
|
2123
|
+
})),
|
|
2124
|
+
);
|
|
2125
|
+
const byId = new Map(dayEvents.map((ev) => [ev.id, ev]));
|
|
2126
|
+
const isSlotTargetDay = slotTarget?.dayKey === dayKey;
|
|
2127
|
+
const draftHere = createDraft?.dayKey === dayKey ? createDraft : null;
|
|
2128
|
+
const editorHere = editorState?.dayKey === dayKey ? editorState : null;
|
|
2129
|
+
const focusHere = view !== "month" && focusedDayKey === dayKey;
|
|
2130
|
+
|
|
374
2131
|
return (
|
|
375
2132
|
<YStack
|
|
376
2133
|
key={day.toISOString()}
|
|
377
2134
|
flex={1}
|
|
378
|
-
|
|
2135
|
+
height={gridHeight}
|
|
2136
|
+
position="relative"
|
|
2137
|
+
{...hairlineEnd}
|
|
379
2138
|
borderColor="$borderColor"
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
2139
|
+
{...{ "data-calendar-timecol": dayKey }}
|
|
2140
|
+
ref={
|
|
2141
|
+
nativeDragEnabled
|
|
2142
|
+
? (node: MeasurableDayNode | null) => registerDayRef(dayKey, node)
|
|
2143
|
+
: undefined
|
|
2144
|
+
}
|
|
2145
|
+
onPointerDown={hasDom ? (e: any) => handleGridPointerDown(day, e) : undefined}
|
|
384
2146
|
>
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
2147
|
+
{/* Hour lines */}
|
|
2148
|
+
{hours.map((hour) => (
|
|
2149
|
+
<YStack
|
|
2150
|
+
key={hour}
|
|
2151
|
+
height={hourHeight}
|
|
2152
|
+
{...hairline.bottom}
|
|
2153
|
+
borderColor={componentColors.divider}
|
|
2154
|
+
pointerEvents="none"
|
|
2155
|
+
/>
|
|
2156
|
+
))}
|
|
2157
|
+
|
|
2158
|
+
{/* Timed events */}
|
|
2159
|
+
{blocks.map((block) => {
|
|
2160
|
+
const event = byId.get(block.id);
|
|
2161
|
+
if (!event) return null;
|
|
2162
|
+
return renderTimedBlock(event, block);
|
|
2163
|
+
})}
|
|
2164
|
+
|
|
2165
|
+
{/* Drop-target slot highlight (ramp tint) */}
|
|
2166
|
+
{isSlotTargetDay && slotTarget && (
|
|
2167
|
+
<YStack
|
|
2168
|
+
position="absolute"
|
|
2169
|
+
{...overlayInset}
|
|
2170
|
+
top={minutesToY(slotTarget.startMin, hourHeight)}
|
|
2171
|
+
height={Math.max(
|
|
2172
|
+
MIN_BLOCK_PX,
|
|
2173
|
+
minutesToY(slotTarget.durationMin, hourHeight),
|
|
2174
|
+
)}
|
|
2175
|
+
backgroundColor="$accentBackground"
|
|
2176
|
+
opacity={0.25}
|
|
2177
|
+
{...knobProps.borderRadius}
|
|
2178
|
+
borderWidth={1}
|
|
2179
|
+
borderColor="$accentColor"
|
|
2180
|
+
pointerEvents="none"
|
|
2181
|
+
zIndex={1}
|
|
2182
|
+
{...{ "data-calendar-slot-target": "true" }}
|
|
2183
|
+
/>
|
|
2184
|
+
)}
|
|
2185
|
+
|
|
2186
|
+
{/* Drag-to-create sketch */}
|
|
2187
|
+
{draftHere && !editorHere && (
|
|
2188
|
+
<YStack
|
|
2189
|
+
position="absolute"
|
|
2190
|
+
{...overlayInset}
|
|
2191
|
+
top={minutesToY(minutesOfDay(draftHere.start), hourHeight)}
|
|
2192
|
+
height={Math.max(
|
|
2193
|
+
MIN_BLOCK_PX,
|
|
2194
|
+
minutesToY(
|
|
2195
|
+
(draftHere.end.getTime() - draftHere.start.getTime()) / 60000,
|
|
2196
|
+
hourHeight,
|
|
2197
|
+
),
|
|
2198
|
+
)}
|
|
2199
|
+
backgroundColor="$accentBackground"
|
|
2200
|
+
opacity={0.45}
|
|
2201
|
+
{...knobProps.borderRadius}
|
|
2202
|
+
borderWidth={1}
|
|
2203
|
+
borderColor="$accentColor"
|
|
2204
|
+
pointerEvents="none"
|
|
2205
|
+
zIndex={4}
|
|
2206
|
+
transition={webLayoutTransition as any}
|
|
2207
|
+
{...{ "data-calendar-create-draft": "true" }}
|
|
2208
|
+
>
|
|
2209
|
+
<Text fontSize="$1" color="$accentColor" padding="$1" numberOfLines={1}>
|
|
2210
|
+
{formatTimeRangeLabel(draftHere.start, draftHere.end)}
|
|
2211
|
+
</Text>
|
|
2212
|
+
</YStack>
|
|
2213
|
+
)}
|
|
2214
|
+
|
|
2215
|
+
{/* Draft block + live-commit editor (LC-06 / LC-21) */}
|
|
2216
|
+
{editorHere && (
|
|
2217
|
+
<YStack
|
|
2218
|
+
position="absolute"
|
|
2219
|
+
{...overlayInset}
|
|
2220
|
+
top={minutesToY(minutesOfDay(editorHere.start), hourHeight)}
|
|
2221
|
+
height={Math.max(
|
|
2222
|
+
MIN_BLOCK_PX + 6,
|
|
2223
|
+
minutesToY(
|
|
2224
|
+
(editorHere.end.getTime() - editorHere.start.getTime()) / 60000,
|
|
2225
|
+
hourHeight,
|
|
2226
|
+
),
|
|
2227
|
+
)}
|
|
2228
|
+
zIndex={5}
|
|
2229
|
+
>
|
|
2230
|
+
<FloatingPanel
|
|
2231
|
+
open
|
|
2232
|
+
onOpenChange={(open) => {
|
|
2233
|
+
if (!open) commitEditor();
|
|
2234
|
+
}}
|
|
2235
|
+
fitContent
|
|
2236
|
+
trigger={
|
|
2237
|
+
<YStack
|
|
2238
|
+
{...knobProps.borderRadius}
|
|
2239
|
+
height="100%"
|
|
2240
|
+
backgroundColor="$accentBackground"
|
|
2241
|
+
opacity={0.9}
|
|
2242
|
+
borderWidth={1}
|
|
2243
|
+
borderColor="$accentColor"
|
|
2244
|
+
padding="$1"
|
|
2245
|
+
overflow="hidden"
|
|
2246
|
+
{...{ "data-calendar-editor-block": "true" }}
|
|
2247
|
+
>
|
|
2248
|
+
<Text
|
|
2249
|
+
fontSize="$1"
|
|
2250
|
+
fontWeight="600"
|
|
2251
|
+
color="$accentColor"
|
|
2252
|
+
numberOfLines={1}
|
|
2253
|
+
>
|
|
2254
|
+
{draftTitle || t("New event")}
|
|
2255
|
+
</Text>
|
|
2256
|
+
</YStack>
|
|
2257
|
+
}
|
|
2258
|
+
>
|
|
2259
|
+
<YStack
|
|
2260
|
+
gap="$2"
|
|
2261
|
+
minWidth={240}
|
|
2262
|
+
{...{ "data-calendar-create-editor": "true" }}
|
|
2263
|
+
>
|
|
2264
|
+
<Input
|
|
2265
|
+
label={t("Title")}
|
|
2266
|
+
placeholder={t("New event")}
|
|
2267
|
+
value={draftTitle}
|
|
2268
|
+
onChangeText={setDraftTitle}
|
|
2269
|
+
inputProps={{ autoFocus: true } as any}
|
|
2270
|
+
/>
|
|
2271
|
+
<Text fontSize="$2" color={componentColors.text.muted}>
|
|
2272
|
+
{`${formatDayLong(editorHere.start)}, ${formatTimeRangeLabel(
|
|
2273
|
+
editorHere.start,
|
|
2274
|
+
editorHere.end,
|
|
2275
|
+
)}`}
|
|
2276
|
+
</Text>
|
|
2277
|
+
<Text fontSize="$1" color={componentColors.text.muted}>
|
|
2278
|
+
{t("Changes apply when the editor closes")}
|
|
2279
|
+
</Text>
|
|
2280
|
+
</YStack>
|
|
2281
|
+
</FloatingPanel>
|
|
2282
|
+
</YStack>
|
|
2283
|
+
)}
|
|
2284
|
+
|
|
2285
|
+
{/* Keyboard slot cursor (discrete moves tween — Axiom 4) */}
|
|
2286
|
+
{focusHere && (
|
|
2287
|
+
<YStack
|
|
2288
|
+
id={`${calendarId}-slot-cursor`}
|
|
2289
|
+
{...({ role: "gridcell" } as any)}
|
|
2290
|
+
aria-label={`${formatDayLong(day)}, ${formatTimeRangeLabel(
|
|
2291
|
+
dateAtMinutes(day, focusedSlotMin),
|
|
2292
|
+
dateAtMinutes(day, focusedSlotMin + slotMinutes),
|
|
2293
|
+
)}`}
|
|
2294
|
+
position="absolute"
|
|
2295
|
+
{...overlayInset}
|
|
2296
|
+
top={minutesToY(focusedSlotMin, hourHeight)}
|
|
2297
|
+
height={minutesToY(slotMinutes, hourHeight)}
|
|
2298
|
+
{...knobProps.borderRadius}
|
|
2299
|
+
borderWidth={2}
|
|
2300
|
+
borderColor="$accentBackground"
|
|
2301
|
+
pointerEvents="none"
|
|
2302
|
+
zIndex={3}
|
|
2303
|
+
transition={webLayoutTransition as any}
|
|
2304
|
+
{...{ "data-calendar-slot-cursor": "true" }}
|
|
2305
|
+
/>
|
|
2306
|
+
)}
|
|
2307
|
+
|
|
2308
|
+
{/* Now indicator */}
|
|
2309
|
+
{isToday(day) && <NowIndicator hourHeight={hourHeight} />}
|
|
388
2310
|
</YStack>
|
|
389
2311
|
);
|
|
390
2312
|
})}
|
|
@@ -394,117 +2316,195 @@ export function Calendar({
|
|
|
394
2316
|
);
|
|
395
2317
|
};
|
|
396
2318
|
|
|
2319
|
+
const renderWeekView = () => renderTimeGrid(getWeekDays(currentDate, firstDayOfWeek));
|
|
2320
|
+
const renderDayView = () => renderTimeGrid([currentDate]);
|
|
2321
|
+
|
|
397
2322
|
// -------------------------------------------------------------------------
|
|
398
|
-
//
|
|
2323
|
+
// Render
|
|
399
2324
|
// -------------------------------------------------------------------------
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
{hours.map((hour) => (
|
|
421
|
-
<XStack
|
|
422
|
-
key={hour}
|
|
423
|
-
minHeight={60}
|
|
424
|
-
borderBottomWidth={1}
|
|
425
|
-
borderColor="$borderColor"
|
|
426
|
-
onPress={() => {
|
|
427
|
-
const date = new Date(currentDate);
|
|
428
|
-
date.setHours(hour, 0, 0, 0);
|
|
429
|
-
onDateSelect?.(date);
|
|
430
|
-
}}
|
|
431
|
-
hoverStyle={{ backgroundColor: componentColors.surface.background }}
|
|
432
|
-
cursor="pointer"
|
|
433
|
-
>
|
|
434
|
-
<YStack width={60} paddingRight="$2" alignItems="flex-end" paddingTop="$1">
|
|
435
|
-
<Text fontSize="$2" color={componentColors.text.muted}>
|
|
436
|
-
{formatHour(hour)}
|
|
437
|
-
</Text>
|
|
438
|
-
</YStack>
|
|
439
|
-
<YStack flex={1} borderLeftWidth={1} borderColor="$borderColor" padding="$2" />
|
|
440
|
-
</XStack>
|
|
441
|
-
))}
|
|
442
|
-
</YStack>
|
|
443
|
-
</ScrollView>
|
|
444
|
-
);
|
|
445
|
-
};
|
|
2325
|
+
// LC-24: enter/exit variants need a live transition token — at
|
|
2326
|
+
// animation:none we omit all three so switches are instant (AnimatePresence
|
|
2327
|
+
// then unmounts the leaving period between frames). Physical direction
|
|
2328
|
+
// mirrors under RTL so "next" enters from the reading end.
|
|
2329
|
+
// `initial={false}` keeps first paint settled (mount is not a jump).
|
|
2330
|
+
const physicalDir = navDirectionRef.current * (isRTL ? -1 : 1);
|
|
2331
|
+
const bodyEnterVariant = !transition
|
|
2332
|
+
? undefined
|
|
2333
|
+
: physicalDir > 0
|
|
2334
|
+
? "fromEnd"
|
|
2335
|
+
: physicalDir < 0
|
|
2336
|
+
? "fromStart"
|
|
2337
|
+
: "fade";
|
|
2338
|
+
const bodyExitVariant = !transition
|
|
2339
|
+
? undefined
|
|
2340
|
+
: physicalDir > 0
|
|
2341
|
+
? "fromStart"
|
|
2342
|
+
: physicalDir < 0
|
|
2343
|
+
? "fromEnd"
|
|
2344
|
+
: "fade";
|
|
446
2345
|
|
|
447
2346
|
return (
|
|
448
|
-
<YStack
|
|
2347
|
+
<YStack
|
|
2348
|
+
height={height}
|
|
2349
|
+
position="relative"
|
|
2350
|
+
overflow="hidden"
|
|
2351
|
+
backgroundColor="$background"
|
|
2352
|
+
// Panel-tier lift follows the elevation knob (LC-18: the calendar frame
|
|
2353
|
+
// is a themed surface, same as Dashboard cards / Kanban columns).
|
|
2354
|
+
elevation={knobProps.elevation}
|
|
2355
|
+
ref={
|
|
2356
|
+
nativeDragEnabled
|
|
2357
|
+
? (node: MeasurableDayNode | null) => {
|
|
2358
|
+
containerNodeRef.current = node;
|
|
2359
|
+
refreshContainerOffset();
|
|
2360
|
+
}
|
|
2361
|
+
: undefined
|
|
2362
|
+
}
|
|
2363
|
+
onLayout={nativeDragEnabled ? refreshContainerOffset : undefined}
|
|
2364
|
+
{...stackProps}
|
|
2365
|
+
>
|
|
449
2366
|
{/* Header */}
|
|
450
2367
|
{(showNavigation || showViewSwitcher) && (
|
|
451
2368
|
<XStack
|
|
452
2369
|
{...knobProps.panelPadding}
|
|
453
2370
|
alignItems="center"
|
|
454
2371
|
justifyContent="space-between"
|
|
455
|
-
|
|
2372
|
+
{...hairline.bottom}
|
|
456
2373
|
borderColor="$borderColor"
|
|
457
2374
|
>
|
|
458
2375
|
{showNavigation && (
|
|
459
2376
|
<XStack gap="$2" alignItems="center">
|
|
460
|
-
<Button size={knobProps.sizeToken} onPress={goToPrevious} aria-label="Previous">
|
|
2377
|
+
<Button size={knobProps.sizeToken} onPress={goToPrevious} aria-label={t("Previous")}>
|
|
461
2378
|
{"<"}
|
|
462
2379
|
</Button>
|
|
463
2380
|
<Button size={knobProps.sizeToken} onPress={goToToday}>
|
|
464
|
-
Today
|
|
2381
|
+
{t("Today")}
|
|
465
2382
|
</Button>
|
|
466
|
-
<Button size={knobProps.sizeToken} onPress={goToNext} aria-label="Next">
|
|
2383
|
+
<Button size={knobProps.sizeToken} onPress={goToNext} aria-label={t("Next")}>
|
|
467
2384
|
{">"}
|
|
468
2385
|
</Button>
|
|
469
2386
|
</XStack>
|
|
470
2387
|
)}
|
|
471
2388
|
|
|
472
|
-
|
|
2389
|
+
{/* Period title is the panel's section heading — shared scale
|
|
2390
|
+
(LC-17), family still follows the heading font knob. */}
|
|
2391
|
+
<Text {...knobProps.heading} {...sectionHeading}>
|
|
473
2392
|
{displayTitle}
|
|
474
2393
|
</Text>
|
|
475
2394
|
|
|
476
2395
|
{showViewSwitcher && (
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
{
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
<Text fontSize={knobProps.sizeToken}>Month</Text>
|
|
490
|
-
</ToggleGroup.Item>
|
|
491
|
-
<ToggleGroup.Item value="week" size={knobProps.sizeToken}>
|
|
492
|
-
<Text fontSize={knobProps.sizeToken}>Week</Text>
|
|
493
|
-
</ToggleGroup.Item>
|
|
494
|
-
<ToggleGroup.Item value="day" size={knobProps.sizeToken}>
|
|
495
|
-
<Text fontSize={knobProps.sizeToken}>Day</Text>
|
|
496
|
-
</ToggleGroup.Item>
|
|
497
|
-
</ToggleGroup>
|
|
2396
|
+
/* Canonical fused view picker (LC-16 ONE-IMPLEMENTATION): brings
|
|
2397
|
+
the 44px press-target floor + hitSlop (SP-FIXED) and the
|
|
2398
|
+
keyboard focus ring the hand-rolled ToggleGroup lacked. */
|
|
2399
|
+
<ViewSwitcher
|
|
2400
|
+
views={[
|
|
2401
|
+
{ type: "month", label: t("Month") },
|
|
2402
|
+
{ type: "week", label: t("Week") },
|
|
2403
|
+
{ type: "day", label: t("Day") },
|
|
2404
|
+
]}
|
|
2405
|
+
currentView={view}
|
|
2406
|
+
onViewChange={(val) => changeView(val as CalendarViewType)}
|
|
2407
|
+
/>
|
|
498
2408
|
)}
|
|
499
2409
|
</XStack>
|
|
500
2410
|
)}
|
|
501
2411
|
|
|
502
|
-
{/*
|
|
503
|
-
<YStack
|
|
504
|
-
|
|
505
|
-
{
|
|
506
|
-
{
|
|
2412
|
+
{/* aria-live region: period + focus announcements (visually hidden) */}
|
|
2413
|
+
<YStack
|
|
2414
|
+
position="absolute"
|
|
2415
|
+
width={1}
|
|
2416
|
+
height={1}
|
|
2417
|
+
overflow="hidden"
|
|
2418
|
+
opacity={0}
|
|
2419
|
+
pointerEvents="none"
|
|
2420
|
+
aria-live="polite"
|
|
2421
|
+
{...{ "data-calendar-live": "true" }}
|
|
2422
|
+
>
|
|
2423
|
+
<Text>{announcement}</Text>
|
|
2424
|
+
</YStack>
|
|
2425
|
+
|
|
2426
|
+
{/* Calendar Body — view/period switches slide+fade with PAIRED
|
|
2427
|
+
enter/exit (LC-24): the leaving period exits toward where it came
|
|
2428
|
+
from while the new one slides in from the reading-direction end.
|
|
2429
|
+
Children are keyed per period inside one persistent AnimatePresence
|
|
2430
|
+
(keying the presence itself would drop the exit — the old wrapper
|
|
2431
|
+
unmounts before it can animate). `fullscreen` keeps both periods
|
|
2432
|
+
overlaid during the crossfade instead of stacking in flow. */}
|
|
2433
|
+
<YStack flex={1} overflow="hidden" position="relative">
|
|
2434
|
+
<AnimatePresence
|
|
2435
|
+
initial={false}
|
|
2436
|
+
enterVariant={bodyEnterVariant}
|
|
2437
|
+
exitVariant={bodyExitVariant}
|
|
2438
|
+
>
|
|
2439
|
+
<CalendarSlide
|
|
2440
|
+
key={motionKey}
|
|
2441
|
+
fullscreen
|
|
2442
|
+
x={0}
|
|
2443
|
+
opacity={1}
|
|
2444
|
+
transition={transition as any}
|
|
2445
|
+
{...{ "data-calendar-motion": motionKey }}
|
|
2446
|
+
>
|
|
2447
|
+
{view === "month" && renderMonthView()}
|
|
2448
|
+
{view === "week" && renderWeekView()}
|
|
2449
|
+
{view === "day" && renderDayView()}
|
|
2450
|
+
</CalendarSlide>
|
|
2451
|
+
</AnimatePresence>
|
|
507
2452
|
</YStack>
|
|
2453
|
+
|
|
2454
|
+
{/* Drag ghost following the pointer / finger (lifted: shadow + scale) */}
|
|
2455
|
+
{dragGhost && (
|
|
2456
|
+
<YStack
|
|
2457
|
+
pointerEvents="none"
|
|
2458
|
+
{...knobProps.borderRadius}
|
|
2459
|
+
backgroundColor={(dragGhost.event.color || "$accentBackground") as any}
|
|
2460
|
+
padding="$1"
|
|
2461
|
+
opacity={0.95}
|
|
2462
|
+
scale={1.03}
|
|
2463
|
+
{...({
|
|
2464
|
+
"data-calendar-drag-ghost": true,
|
|
2465
|
+
...(isWeb
|
|
2466
|
+
? {
|
|
2467
|
+
style: {
|
|
2468
|
+
position: "fixed",
|
|
2469
|
+
left: dragGhost.x + 12,
|
|
2470
|
+
top: dragGhost.y + 12,
|
|
2471
|
+
// Sheet tier (Axiom 14): the ghost tracks the pointer
|
|
2472
|
+
// above page content and sticky chrome.
|
|
2473
|
+
zIndex: zIndex.sheet,
|
|
2474
|
+
maxWidth: 220,
|
|
2475
|
+
boxShadow: LIFT_SHADOW,
|
|
2476
|
+
},
|
|
2477
|
+
}
|
|
2478
|
+
: {
|
|
2479
|
+
position: "absolute",
|
|
2480
|
+
left: dragGhost.x,
|
|
2481
|
+
top: dragGhost.y,
|
|
2482
|
+
zIndex: zIndex.sheet,
|
|
2483
|
+
maxWidth: 220,
|
|
2484
|
+
shadowColor: "$shadowColor",
|
|
2485
|
+
shadowOffset: { width: 0, height: 6 },
|
|
2486
|
+
shadowRadius: 12,
|
|
2487
|
+
shadowOpacity: 0.3,
|
|
2488
|
+
elevation: 8,
|
|
2489
|
+
}),
|
|
2490
|
+
} as any)}
|
|
2491
|
+
>
|
|
2492
|
+
<Text fontSize="$2" numberOfLines={1} color={eventChipTextColor(dragGhost.event.color)}>
|
|
2493
|
+
{dragGhost.event.title}
|
|
2494
|
+
</Text>
|
|
2495
|
+
</YStack>
|
|
2496
|
+
)}
|
|
2497
|
+
|
|
2498
|
+
{/* FLIP settle: drop/cancel tweens the ghost into its final slot (LC-25) */}
|
|
2499
|
+
{settle && isWeb && (
|
|
2500
|
+
<SettleGhost
|
|
2501
|
+
key={settle.key}
|
|
2502
|
+
settle={settle}
|
|
2503
|
+
transition={transition as any}
|
|
2504
|
+
borderRadius={knobProps.borderRadius as any}
|
|
2505
|
+
onDone={clearSettle}
|
|
2506
|
+
/>
|
|
2507
|
+
)}
|
|
508
2508
|
</YStack>
|
|
509
2509
|
);
|
|
510
2510
|
}
|