@42-central/ui-react 0.17.0 → 0.18.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 +36 -175
- package/dist/{chunk-FD6P6PLQ.js → chunk-5JHDSVEZ.js} +3 -3
- package/dist/{chunk-FD6P6PLQ.js.map → chunk-5JHDSVEZ.js.map} +1 -1
- package/dist/{chunk-QMW7D5GU.js → chunk-5OQLFX47.js} +4 -3
- package/dist/chunk-5OQLFX47.js.map +1 -0
- package/dist/{chunk-VZ2TPU4B.js → chunk-6GDMSENK.js} +3 -2
- package/dist/chunk-6GDMSENK.js.map +1 -0
- package/dist/{chunk-TNNH3FVQ.js → chunk-6OLTJYSX.js} +24 -8
- package/dist/chunk-6OLTJYSX.js.map +1 -0
- package/dist/{chunk-POKDSVQT.js → chunk-AE7QTLJ5.js} +5 -4
- package/dist/chunk-AE7QTLJ5.js.map +1 -0
- package/dist/{chunk-44OV3PNH.js → chunk-B2YJKRNQ.js} +3 -3
- package/dist/{chunk-44OV3PNH.js.map → chunk-B2YJKRNQ.js.map} +1 -1
- package/dist/{chunk-YIQI2CF3.js → chunk-CTSO6V72.js} +3 -2
- package/dist/chunk-CTSO6V72.js.map +1 -0
- package/dist/{chunk-ACE7FBWE.js → chunk-EBREIC3L.js} +5 -4
- package/dist/chunk-EBREIC3L.js.map +1 -0
- package/dist/{chunk-UNSAA7YG.js → chunk-FHG54IT5.js} +3 -2
- package/dist/chunk-FHG54IT5.js.map +1 -0
- package/dist/{chunk-3GYOIQW7.js → chunk-FZIHZT5R.js} +5 -5
- package/dist/{chunk-3GYOIQW7.js.map → chunk-FZIHZT5R.js.map} +1 -1
- package/dist/{chunk-2H46IXW4.js → chunk-HAQJQFE6.js} +28 -8
- package/dist/chunk-HAQJQFE6.js.map +1 -0
- package/dist/{chunk-IHYFYMHJ.js → chunk-HT5JAHR3.js} +6 -6
- package/dist/{chunk-IHYFYMHJ.js.map → chunk-HT5JAHR3.js.map} +1 -1
- package/dist/chunk-I4SQQIP5.js +12 -0
- package/dist/chunk-I4SQQIP5.js.map +1 -0
- package/dist/{chunk-J3PELDH3.js → chunk-JITF6I7N.js} +22 -6
- package/dist/chunk-JITF6I7N.js.map +1 -0
- package/dist/{chunk-IFWCCAQV.js → chunk-KHMFNH3X.js} +3 -2
- package/dist/chunk-KHMFNH3X.js.map +1 -0
- package/dist/{chunk-SIG4DMNZ.js → chunk-MI2WZRK3.js} +4 -4
- package/dist/{chunk-SIG4DMNZ.js.map → chunk-MI2WZRK3.js.map} +1 -1
- package/dist/{chunk-PJL4ZL5V.js → chunk-O23Y5ML4.js} +8 -8
- package/dist/{chunk-PJL4ZL5V.js.map → chunk-O23Y5ML4.js.map} +1 -1
- package/dist/{chunk-P7A3BCAC.js → chunk-OWG4BCQR.js} +3 -3
- package/dist/{chunk-P7A3BCAC.js.map → chunk-OWG4BCQR.js.map} +1 -1
- package/dist/{chunk-FUWSTUDM.js → chunk-PH354ECN.js} +4 -4
- package/dist/{chunk-FUWSTUDM.js.map → chunk-PH354ECN.js.map} +1 -1
- package/dist/{chunk-U5GW5EBR.js → chunk-RAUOFTUH.js} +12 -20
- package/dist/chunk-RAUOFTUH.js.map +1 -0
- package/dist/{chunk-2762HZYX.js → chunk-S2HWWR2H.js} +47 -25
- package/dist/chunk-S2HWWR2H.js.map +1 -0
- package/dist/{chunk-VLUKI3HL.js → chunk-S7N4LGLZ.js} +6 -13
- package/dist/chunk-S7N4LGLZ.js.map +1 -0
- package/dist/{chunk-TMMEJKLI.js → chunk-UHNRAI6V.js} +17 -4
- package/dist/chunk-UHNRAI6V.js.map +1 -0
- package/dist/{chunk-3NZXWCGF.js → chunk-WHKKN3ZK.js} +6 -6
- package/dist/{chunk-3NZXWCGF.js.map → chunk-WHKKN3ZK.js.map} +1 -1
- package/dist/{chunk-MOI7B3KH.js → chunk-WQN64ZHG.js} +5 -5
- package/dist/{chunk-MOI7B3KH.js.map → chunk-WQN64ZHG.js.map} +1 -1
- package/dist/chunk-WSIVRDRB.js +34 -0
- package/dist/chunk-WSIVRDRB.js.map +1 -0
- package/dist/{chunk-6SWK4XG5.js → chunk-YXE4B6X3.js} +2 -2
- package/dist/chunk-YXE4B6X3.js.map +1 -0
- package/dist/{chunk-NGAQITWP.js → chunk-Z2Z5EXVT.js} +10 -7
- package/dist/chunk-Z2Z5EXVT.js.map +1 -0
- package/dist/{chunk-IXKELBJA.js → chunk-ZDXQ64A7.js} +63 -44
- package/dist/chunk-ZDXQ64A7.js.map +1 -0
- package/dist/components/accordion/accordion-data.d.ts +3 -2
- package/dist/components/accordion/accordion-data.d.ts.map +1 -1
- package/dist/components/accordion/accordion.d.ts +2 -2
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/index.js +20 -8
- package/dist/components/accordion/index.js.map +1 -1
- package/dist/components/action-icon/action-icon.d.ts +3 -4
- package/dist/components/action-icon/action-icon.d.ts.map +1 -1
- package/dist/components/action-icon/index.js +2 -1
- package/dist/components/alert/alert.d.ts +18 -10
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/index.js +17 -5
- package/dist/components/alert/index.js.map +1 -1
- package/dist/components/app-shell/app-shell.d.ts +3 -2
- package/dist/components/app-shell/app-shell.d.ts.map +1 -1
- package/dist/components/app-shell/index.js +4 -2
- package/dist/components/app-shell/index.js.map +1 -1
- package/dist/components/autocomplete/index.js +5 -4
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts +3 -2
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/index.js +11 -5
- package/dist/components/breadcrumb/index.js.map +1 -1
- package/dist/components/button/button.d.ts +4 -4
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/index.js +2 -1
- package/dist/components/button-multi-select/index.js +4 -3
- package/dist/components/button-multi-select/index.js.map +1 -1
- package/dist/components/button-select/index.js +4 -3
- package/dist/components/button-select/index.js.map +1 -1
- package/dist/components/calendar/calendar-body.d.ts.map +1 -1
- package/dist/components/calendar/index.js +3 -2
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/choice-card-group/index.js +1 -1
- package/dist/components/circular-progress/circular-progress.d.ts +3 -2
- package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
- package/dist/components/circular-progress/index.js +1 -0
- package/dist/components/circular-progress/index.js.map +1 -1
- package/dist/components/clipboard/clipboard.d.ts +1 -1
- package/dist/components/clipboard/clipboard.d.ts.map +1 -1
- package/dist/components/clipboard/index.js +9 -5
- package/dist/components/clipboard/index.js.map +1 -1
- package/dist/components/code-block/chrome.d.ts +4 -1
- package/dist/components/code-block/chrome.d.ts.map +1 -1
- package/dist/components/code-block/chrome.js +5 -4
- package/dist/components/code-block/code-block.d.ts +7 -1
- package/dist/components/code-block/code-block.d.ts.map +1 -1
- package/dist/components/code-block/index.d.ts +1 -1
- package/dist/components/code-block/index.js +12 -10
- package/dist/components/code-block/index.js.map +1 -1
- package/dist/components/code-block/notation.d.ts +5 -2
- package/dist/components/code-block/notation.d.ts.map +1 -1
- package/dist/components/code-block/static.d.ts +4 -1
- package/dist/components/code-block/static.d.ts.map +1 -1
- package/dist/components/code-block/static.js +5 -4
- package/dist/components/code-block/static.js.map +1 -1
- package/dist/components/collapse/collapse.d.ts +7 -3
- package/dist/components/collapse/collapse.d.ts.map +1 -1
- package/dist/components/collapse/index.js +2 -1
- package/dist/components/combobox/combobox.d.ts +11 -10
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/index.js +5 -4
- package/dist/components/combobox-list/index.js +6 -5
- package/dist/components/data-table/index.js +20 -19
- package/dist/components/data-table/index.js.map +1 -1
- package/dist/components/date-picker/index.js +12 -11
- package/dist/components/date-picker/index.js.map +1 -1
- package/dist/components/divider/divider.d.ts +3 -2
- package/dist/components/divider/divider.d.ts.map +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/drawer/drawer.d.ts +6 -5
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/index.js +3 -2
- package/dist/components/field/field.d.ts +7 -4
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/index.js +1 -1
- package/dist/components/file-upload/index.js +3 -2
- package/dist/components/file-upload/index.js.map +1 -1
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/input/index.js +2 -2
- package/dist/components/input/input.d.ts +3 -2
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/menu/index.js +3 -2
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/menu/menu-data.d.ts +6 -1
- package/dist/components/menu/menu-data.d.ts.map +1 -1
- package/dist/components/menu/menu.d.ts +5 -5
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/modal/index.js +3 -2
- package/dist/components/modal/modal.d.ts +4 -3
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/multi-combobox-list/index.js +6 -5
- package/dist/components/multi-select/index.js +7 -6
- package/dist/components/multi-select/index.js.map +1 -1
- package/dist/components/nav-link/index.js +3 -2
- package/dist/components/nav-link/tanstack.js +3 -2
- package/dist/components/nav-link/tanstack.js.map +1 -1
- package/dist/components/notification/create-notifier.d.ts.map +1 -1
- package/dist/components/notification/index.js +8 -7
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/notification/notification.d.ts +7 -6
- package/dist/components/notification/notification.d.ts.map +1 -1
- package/dist/components/number-input/index.js +4 -4
- package/dist/components/overlays/index.js +5 -4
- package/dist/components/overlays/index.js.map +1 -1
- package/dist/components/password-input/index.js +2 -2
- package/dist/components/pill/index.js +2 -1
- package/dist/components/pill/pill.d.ts +4 -2
- package/dist/components/pill/pill.d.ts.map +1 -1
- package/dist/components/pills-input/index.js +5 -4
- package/dist/components/pills-input/pills-input.d.ts +3 -2
- package/dist/components/pills-input/pills-input.d.ts.map +1 -1
- package/dist/components/pin-input/index.js +2 -2
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover.d.ts +3 -2
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/progress/index.js +1 -0
- package/dist/components/progress/index.js.map +1 -1
- package/dist/components/progress/progress.d.ts +3 -2
- package/dist/components/progress/progress.d.ts.map +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/rating/index.js +2 -1
- package/dist/components/rating/index.js.map +1 -1
- package/dist/components/rating/rating.d.ts +3 -2
- package/dist/components/rating/rating.d.ts.map +1 -1
- package/dist/components/schedule/index.d.ts +4 -4
- package/dist/components/schedule/index.js +211 -110
- package/dist/components/schedule/index.js.map +1 -1
- package/dist/components/schedule/schedule-agenda-list.d.ts +6 -7
- package/dist/components/schedule/schedule-agenda-list.d.ts.map +1 -1
- package/dist/components/schedule/schedule-agenda-view.d.ts +19 -16
- package/dist/components/schedule/schedule-agenda-view.d.ts.map +1 -1
- package/dist/components/schedule/schedule-create-draft.d.ts +3 -2
- package/dist/components/schedule/schedule-create-draft.d.ts.map +1 -1
- package/dist/components/schedule/schedule-dates.d.ts.map +1 -1
- package/dist/components/schedule/schedule-days-view.d.ts +3 -2
- package/dist/components/schedule/schedule-days-view.d.ts.map +1 -1
- package/dist/components/schedule/schedule-drag-ghost.d.ts +12 -5
- package/dist/components/schedule/schedule-drag-ghost.d.ts.map +1 -1
- package/dist/components/schedule/schedule-event-chip.d.ts.map +1 -1
- package/dist/components/schedule/schedule-geometry.d.ts +16 -0
- package/dist/components/schedule/schedule-geometry.d.ts.map +1 -1
- package/dist/components/schedule/schedule-grid-gesture.d.ts +29 -6
- package/dist/components/schedule/schedule-grid-gesture.d.ts.map +1 -1
- package/dist/components/schedule/schedule-month-view.d.ts +3 -2
- package/dist/components/schedule/schedule-month-view.d.ts.map +1 -1
- package/dist/components/schedule/schedule-next-up.d.ts +4 -3
- package/dist/components/schedule/schedule-next-up.d.ts.map +1 -1
- package/dist/components/schedule/schedule-timed-grid.d.ts.map +1 -1
- package/dist/components/schedule/schedule-toolbar.d.ts +3 -3
- package/dist/components/schedule/schedule-toolbar.d.ts.map +1 -1
- package/dist/components/schedule/schedule-types.d.ts +9 -4
- package/dist/components/schedule/schedule-types.d.ts.map +1 -1
- package/dist/components/schedule/schedule-views.d.ts +2 -2
- package/dist/components/schedule/schedule-views.d.ts.map +1 -1
- package/dist/components/schedule/schedule-year-view.d.ts +3 -2
- package/dist/components/schedule/schedule-year-view.d.ts.map +1 -1
- package/dist/components/schedule/schedule.d.ts +9 -6
- package/dist/components/schedule/schedule.d.ts.map +1 -1
- package/dist/components/schedule/use-event-create.d.ts.map +1 -1
- package/dist/components/schedule/use-event-drag.d.ts.map +1 -1
- package/dist/components/schedule/use-event-resize.d.ts.map +1 -1
- package/dist/components/segment-group/index.js +2 -2
- package/dist/components/select/index.js +4 -4
- package/dist/components/slider/index.js +2 -1
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/slider/slider.d.ts +3 -2
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/tabs-data.d.ts +3 -2
- package/dist/components/tabs/tabs-data.d.ts.map +1 -1
- package/dist/components/tags-input/index.js +6 -5
- package/dist/components/tags-input/index.js.map +1 -1
- package/dist/components/text-input/index.js +2 -2
- package/dist/components/textarea/index.js +2 -2
- package/dist/components/time-input/index.js +6 -6
- package/dist/components/timeline/index.js +8 -5
- package/dist/components/timeline/index.js.map +1 -1
- package/dist/components/timeline/timeline.d.ts +1 -1
- package/dist/components/timeline/timeline.d.ts.map +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +2 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tree-multi-select/index.js +6 -5
- package/dist/components/tree-multi-select/index.js.map +1 -1
- package/dist/components/tree-select/index.js +3 -3
- package/dist/lib/as-child.d.ts +104 -0
- package/dist/lib/as-child.d.ts.map +1 -0
- package/dist/theme.css +9 -3
- package/package.json +1 -1
- package/src/as-child.contract.test.tsx +809 -0
- package/src/components/accordion/accordion-data.tsx +8 -5
- package/src/components/accordion/accordion.test.tsx +40 -0
- package/src/components/accordion/accordion.tsx +23 -6
- package/src/components/action-icon/action-icon.tsx +9 -24
- package/src/components/alert/alert.test.tsx +25 -2
- package/src/components/alert/alert.tsx +39 -13
- package/src/components/app-shell/app-shell.tsx +3 -1
- package/src/components/breadcrumb/breadcrumb.test.tsx +30 -0
- package/src/components/breadcrumb/breadcrumb.tsx +21 -12
- package/src/components/button/button.tsx +21 -50
- package/src/components/calendar/calendar-body.tsx +8 -1
- package/src/components/circular-progress/circular-progress.tsx +4 -1
- package/src/components/clipboard/clipboard.test.tsx +18 -0
- package/src/components/clipboard/clipboard.tsx +8 -2
- package/src/components/code-block/chrome.tsx +60 -36
- package/src/components/code-block/code-block.test.tsx +27 -0
- package/src/components/code-block/code-block.tsx +13 -3
- package/src/components/code-block/notation.test.ts +8 -0
- package/src/components/code-block/notation.ts +6 -3
- package/src/components/code-block/static.tsx +8 -2
- package/src/components/collapse/collapse.tsx +33 -15
- package/src/components/combobox/combobox.test.tsx +38 -0
- package/src/components/combobox/combobox.tsx +24 -10
- package/src/components/divider/divider.tsx +3 -1
- package/src/components/drawer/drawer.tsx +37 -16
- package/src/components/field/field.tsx +7 -3
- package/src/components/input/input.tsx +3 -1
- package/src/components/menu/menu-data.tsx +8 -1
- package/src/components/menu/menu.test.tsx +52 -0
- package/src/components/menu/menu.tsx +83 -35
- package/src/components/modal/close-trigger.test.tsx +38 -0
- package/src/components/modal/modal.tsx +29 -13
- package/src/components/notification/create-notifier.tsx +6 -5
- package/src/components/notification/notification.test.tsx +15 -0
- package/src/components/notification/notification.tsx +8 -5
- package/src/components/pill/pill.tsx +29 -20
- package/src/components/pills-input/pills-input.tsx +3 -1
- package/src/components/popover/popover.tsx +3 -1
- package/src/components/progress/progress.tsx +4 -1
- package/src/components/rating/rating.tsx +27 -23
- package/src/components/schedule/index.ts +1 -1
- package/src/components/schedule/now-cursor-line.tsx +1 -1
- package/src/components/schedule/schedule-agenda-list.tsx +6 -7
- package/src/components/schedule/schedule-agenda-view.test.tsx +105 -28
- package/src/components/schedule/schedule-agenda-view.tsx +46 -31
- package/src/components/schedule/schedule-all-day-row.tsx +1 -1
- package/src/components/schedule/schedule-create-draft.tsx +14 -5
- package/src/components/schedule/schedule-dates.test.ts +37 -52
- package/src/components/schedule/schedule-dates.ts +25 -27
- package/src/components/schedule/schedule-days-view.tsx +9 -5
- package/src/components/schedule/schedule-drag-ghost.tsx +27 -12
- package/src/components/schedule/schedule-event-chip.tsx +9 -2
- package/src/components/schedule/schedule-event-list-popover-content.tsx +1 -1
- package/src/components/schedule/schedule-geometry.ts +21 -0
- package/src/components/schedule/schedule-grid-gesture.test.ts +83 -1
- package/src/components/schedule/schedule-grid-gesture.ts +67 -28
- package/src/components/schedule/schedule-month-view.tsx +10 -6
- package/src/components/schedule/schedule-next-up.tsx +11 -5
- package/src/components/schedule/schedule-timed-grid.tsx +41 -3
- package/src/components/schedule/schedule-toolbar.test.tsx +26 -0
- package/src/components/schedule/schedule-toolbar.tsx +35 -17
- package/src/components/schedule/schedule-types.ts +9 -4
- package/src/components/schedule/schedule-views.ts +4 -5
- package/src/components/schedule/schedule-year-view.tsx +10 -6
- package/src/components/schedule/schedule.test.tsx +198 -36
- package/src/components/schedule/schedule.tsx +28 -17
- package/src/components/schedule/use-event-create.ts +7 -6
- package/src/components/schedule/use-event-drag.ts +10 -4
- package/src/components/schedule/use-event-resize.ts +4 -2
- package/src/components/slider/slider.tsx +4 -0
- package/src/components/tabs/tabs-data.tsx +17 -14
- package/src/components/timeline/timeline.tsx +102 -95
- package/src/components/tooltip/tooltip.tsx +2 -1
- package/src/lib/as-child.test.tsx +70 -0
- package/src/lib/as-child.ts +119 -0
- package/src/theme.css +9 -3
- package/dist/chunk-2762HZYX.js.map +0 -1
- package/dist/chunk-2H46IXW4.js.map +0 -1
- package/dist/chunk-6SWK4XG5.js.map +0 -1
- package/dist/chunk-ACE7FBWE.js.map +0 -1
- package/dist/chunk-HWNPXAEN.js +0 -31
- package/dist/chunk-HWNPXAEN.js.map +0 -1
- package/dist/chunk-IFWCCAQV.js.map +0 -1
- package/dist/chunk-IXKELBJA.js.map +0 -1
- package/dist/chunk-J3PELDH3.js.map +0 -1
- package/dist/chunk-NGAQITWP.js.map +0 -1
- package/dist/chunk-POKDSVQT.js.map +0 -1
- package/dist/chunk-QMW7D5GU.js.map +0 -1
- package/dist/chunk-TMMEJKLI.js.map +0 -1
- package/dist/chunk-TNNH3FVQ.js.map +0 -1
- package/dist/chunk-U5GW5EBR.js.map +0 -1
- package/dist/chunk-UNSAA7YG.js.map +0 -1
- package/dist/chunk-VLUKI3HL.js.map +0 -1
- package/dist/chunk-VZ2TPU4B.js.map +0 -1
- package/dist/chunk-YIQI2CF3.js.map +0 -1
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Tabs } from '../../chunk-
|
|
3
|
-
import { Divider } from '../../chunk-
|
|
2
|
+
import { Tabs } from '../../chunk-KHMFNH3X.js';
|
|
3
|
+
import { Divider } from '../../chunk-CTSO6V72.js';
|
|
4
4
|
import { Text } from '../../chunk-CSCVTESP.js';
|
|
5
5
|
import { calendarValueToDate, dateToCalendarValue } from '../../chunk-TCWYBVIL.js';
|
|
6
6
|
import { mergeRefs } from '../../chunk-UVYTJQTJ.js';
|
|
7
|
-
import { Button } from '../../chunk-
|
|
8
|
-
import { devWarn } from '../../chunk-7NZSTCJO.js';
|
|
9
|
-
import { Popover } from '../../chunk-
|
|
7
|
+
import { Button } from '../../chunk-RAUOFTUH.js';
|
|
8
|
+
import { useLocale, useTimeZone, devWarn, DEFAULT_LOCALE } from '../../chunk-7NZSTCJO.js';
|
|
9
|
+
import { Popover } from '../../chunk-6GDMSENK.js';
|
|
10
10
|
import '../../chunk-AIQG7IIT.js';
|
|
11
11
|
import { OverlayContainerProvider } from '../../chunk-7P32XCEU.js';
|
|
12
12
|
import '../../chunk-BUIHQJGE.js';
|
|
13
13
|
import '../../chunk-2GILNBZW.js';
|
|
14
|
-
import { ActionIcon } from '../../chunk-
|
|
14
|
+
import { ActionIcon } from '../../chunk-S7N4LGLZ.js';
|
|
15
15
|
import { useUncontrolled } from '../../chunk-BEL75C7N.js';
|
|
16
16
|
import '../../chunk-NSDM3FEB.js';
|
|
17
|
+
import { withAsChildContent } from '../../chunk-I4SQQIP5.js';
|
|
17
18
|
import { props } from '../../chunk-WYCMIIRR.js';
|
|
18
19
|
import { focusStyles } from '../../chunk-B2LCHXUB.js';
|
|
19
20
|
import { cn } from '../../chunk-QP4I37PA.js';
|
|
20
|
-
import {
|
|
21
|
+
import { startOfWeek, getDayOfWeek, startOfMonth, endOfWeek, endOfMonth, startOfYear, endOfYear, getLocalTimeZone, isWeekend } from '@internationalized/date';
|
|
21
22
|
import { ark } from '@ark-ui/react';
|
|
22
23
|
import { useEffect, useRef, useCallback, useSyncExternalStore, useId, useState, useMemo, useLayoutEffect, Fragment as Fragment$1 } from 'react';
|
|
23
24
|
import { match } from 'ts-pattern';
|
|
24
25
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
25
26
|
import { ChevronRightIcon, ChevronLeftIcon, ChevronUpIcon, ChevronDownIcon, ArrowLeftIcon, XIcon } from 'lucide-react';
|
|
26
27
|
import { cva } from 'class-variance-authority';
|
|
28
|
+
import { useLocaleContext } from '@ark-ui/react/locale';
|
|
27
29
|
import { usePresence } from '@ark-ui/react/presence';
|
|
28
30
|
|
|
29
31
|
var WEEKEND_LOCALE = "en-US";
|
|
@@ -134,9 +136,8 @@ function getVisibleRange(view, date, options) {
|
|
|
134
136
|
const end = midnightOf(endOfYear(value)).add({ days: 1 });
|
|
135
137
|
return { start, end };
|
|
136
138
|
}).with("agenda", () => {
|
|
137
|
-
const start = midnightOf(
|
|
138
|
-
|
|
139
|
-
return { start, end };
|
|
139
|
+
const start = midnightOf(value);
|
|
140
|
+
return { start, end: start.add({ days: visibleDays }) };
|
|
140
141
|
}).exhaustive();
|
|
141
142
|
return {
|
|
142
143
|
start: calendarValueToDate(range.start, timeZone),
|
|
@@ -145,7 +146,7 @@ function getVisibleRange(view, date, options) {
|
|
|
145
146
|
}
|
|
146
147
|
function paginateDate(view, date, direction, options) {
|
|
147
148
|
const value = toZoned(date, options.timeZone);
|
|
148
|
-
const duration = match(view).with("days", () => ({ days: options.visibleDays ?? 7 })).with("month",
|
|
149
|
+
const duration = match(view).with("days", "agenda", () => ({ days: options.visibleDays ?? 7 })).with("month", () => ({ months: 1 })).with("year", () => ({ years: 1 })).exhaustive();
|
|
149
150
|
const next = direction === 1 ? value.add(duration) : value.subtract(duration);
|
|
150
151
|
return calendarValueToDate(next, options.timeZone);
|
|
151
152
|
}
|
|
@@ -257,15 +258,15 @@ function allDayRangeLabel(start, end, timeZone, locale) {
|
|
|
257
258
|
return formatter.formatRange(start, lastDay).normalize("NFKC");
|
|
258
259
|
}
|
|
259
260
|
function formatScheduleTitle(view, date, options) {
|
|
260
|
-
const { timeZone, locale, startOfWeek, visibleDays } = options;
|
|
261
|
-
return match(view).with("days", () => {
|
|
261
|
+
const { timeZone, locale = DEFAULT_LOCALE, startOfWeek, visibleDays } = options;
|
|
262
|
+
return match(view).with("days", "agenda", (v) => {
|
|
262
263
|
const days = visibleDays ?? 7;
|
|
263
264
|
if (days === 1) {
|
|
264
265
|
return new Intl.DateTimeFormat(locale, { dateStyle: "long", timeZone }).format(date);
|
|
265
266
|
}
|
|
266
|
-
const range = getVisibleRange(
|
|
267
|
+
const range = getVisibleRange(v, date, {
|
|
267
268
|
timeZone,
|
|
268
|
-
locale
|
|
269
|
+
locale,
|
|
269
270
|
startOfWeek,
|
|
270
271
|
visibleDays: days
|
|
271
272
|
});
|
|
@@ -273,7 +274,6 @@ function formatScheduleTitle(view, date, options) {
|
|
|
273
274
|
return new Intl.DateTimeFormat(locale, { dateStyle: "medium", timeZone }).formatRange(range.start, lastDay).normalize("NFKC");
|
|
274
275
|
}).with(
|
|
275
276
|
"month",
|
|
276
|
-
"agenda",
|
|
277
277
|
() => new Intl.DateTimeFormat(locale, { month: "long", year: "numeric", timeZone }).format(date)
|
|
278
278
|
).with(
|
|
279
279
|
"year",
|
|
@@ -793,9 +793,8 @@ var SHORTHANDS = {
|
|
|
793
793
|
days: { id: "days", view: "days" },
|
|
794
794
|
month: { id: "month", view: "month" },
|
|
795
795
|
year: { id: "year", view: "year" },
|
|
796
|
-
// Pins no `visibleDays
|
|
797
|
-
//
|
|
798
|
-
// the agenda is month-scoped, exactly like `month` and `year`.
|
|
796
|
+
// Pins no `visibleDays`, for the same reason `"days"` doesn't: it inherits
|
|
797
|
+
// the consumer's window, so a week-sized Days and the agenda step in sync.
|
|
799
798
|
agenda: { id: "agenda", view: "agenda" }
|
|
800
799
|
};
|
|
801
800
|
var isShorthand = (id) => id in SHORTHANDS;
|
|
@@ -847,13 +846,14 @@ var ScheduleToolbarPrevTrigger = ({
|
|
|
847
846
|
view,
|
|
848
847
|
date,
|
|
849
848
|
onDateChange,
|
|
850
|
-
timeZone
|
|
849
|
+
timeZone: timeZoneProp,
|
|
851
850
|
translations,
|
|
852
851
|
size = "sm",
|
|
853
852
|
className,
|
|
854
853
|
testId,
|
|
855
854
|
visibleDays
|
|
856
855
|
}) => {
|
|
856
|
+
const timeZone = useTimeZone(timeZoneProp);
|
|
857
857
|
const t = resolveScheduleTranslations(translations);
|
|
858
858
|
return /* @__PURE__ */ jsx(
|
|
859
859
|
ActionIcon,
|
|
@@ -865,7 +865,7 @@ var ScheduleToolbarPrevTrigger = ({
|
|
|
865
865
|
onClick: () => onDateChange?.(paginateDate(view, date, -1, { timeZone, visibleDays })),
|
|
866
866
|
className,
|
|
867
867
|
testId,
|
|
868
|
-
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
868
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, { className: "rtl:rotate-180" })
|
|
869
869
|
}
|
|
870
870
|
);
|
|
871
871
|
};
|
|
@@ -873,13 +873,14 @@ var ScheduleToolbarNextTrigger = ({
|
|
|
873
873
|
view,
|
|
874
874
|
date,
|
|
875
875
|
onDateChange,
|
|
876
|
-
timeZone
|
|
876
|
+
timeZone: timeZoneProp,
|
|
877
877
|
translations,
|
|
878
878
|
size = "sm",
|
|
879
879
|
className,
|
|
880
880
|
testId,
|
|
881
881
|
visibleDays
|
|
882
882
|
}) => {
|
|
883
|
+
const timeZone = useTimeZone(timeZoneProp);
|
|
883
884
|
const t = resolveScheduleTranslations(translations);
|
|
884
885
|
return /* @__PURE__ */ jsx(
|
|
885
886
|
ActionIcon,
|
|
@@ -891,7 +892,7 @@ var ScheduleToolbarNextTrigger = ({
|
|
|
891
892
|
onClick: () => onDateChange?.(paginateDate(view, date, 1, { timeZone, visibleDays })),
|
|
892
893
|
className,
|
|
893
894
|
testId,
|
|
894
|
-
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
895
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, { className: "rtl:rotate-180" })
|
|
895
896
|
}
|
|
896
897
|
);
|
|
897
898
|
};
|
|
@@ -920,23 +921,36 @@ var ScheduleToolbarNowTrigger = ({
|
|
|
920
921
|
var ScheduleToolbarTitle = ({
|
|
921
922
|
view,
|
|
922
923
|
date,
|
|
923
|
-
timeZone
|
|
924
|
-
locale,
|
|
924
|
+
timeZone: timeZoneProp,
|
|
925
|
+
locale: localeProp,
|
|
925
926
|
align,
|
|
926
927
|
visibleDays,
|
|
927
928
|
className,
|
|
928
929
|
testId,
|
|
930
|
+
asChild,
|
|
931
|
+
children,
|
|
929
932
|
...rest
|
|
930
|
-
}) =>
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
}
|
|
939
|
-
|
|
933
|
+
}) => {
|
|
934
|
+
const locale = useLocale(localeProp);
|
|
935
|
+
const timeZone = useTimeZone(timeZoneProp);
|
|
936
|
+
const title = formatScheduleTitle(view, date, {
|
|
937
|
+
timeZone,
|
|
938
|
+
locale,
|
|
939
|
+
startOfWeek: align,
|
|
940
|
+
visibleDays
|
|
941
|
+
});
|
|
942
|
+
return /* @__PURE__ */ jsx(
|
|
943
|
+
ark.h2,
|
|
944
|
+
{
|
|
945
|
+
asChild,
|
|
946
|
+
"data-schedule-part": "toolbar-title",
|
|
947
|
+
className: cn("truncate font-semibold text-sm", className),
|
|
948
|
+
...props({ "data-testid": testId }),
|
|
949
|
+
...rest,
|
|
950
|
+
children: asChild ? withAsChildContent(children, (own) => own ?? title) : title
|
|
951
|
+
}
|
|
952
|
+
);
|
|
953
|
+
};
|
|
940
954
|
var ScheduleToolbarViewSwitcher = ({
|
|
941
955
|
view,
|
|
942
956
|
onViewChange,
|
|
@@ -976,10 +990,13 @@ function AgendaView({
|
|
|
976
990
|
defaultSelected,
|
|
977
991
|
onSelect,
|
|
978
992
|
withSelection = true,
|
|
979
|
-
withEventDetails = true,
|
|
980
993
|
renderEventDetails,
|
|
981
|
-
|
|
982
|
-
|
|
994
|
+
// Off by default — a row already shows everything the popover would. Passing
|
|
995
|
+
// `renderEventDetails` alone opts back in: it asks for a popover's content,
|
|
996
|
+
// which is only meaningful with a popover to put it in.
|
|
997
|
+
withEventDetails = renderEventDetails !== void 0,
|
|
998
|
+
locale: localeProp,
|
|
999
|
+
timeZone: timeZoneProp,
|
|
983
1000
|
translations,
|
|
984
1001
|
classNames,
|
|
985
1002
|
className,
|
|
@@ -991,9 +1008,13 @@ function AgendaView({
|
|
|
991
1008
|
now,
|
|
992
1009
|
empty,
|
|
993
1010
|
renderEvent,
|
|
1011
|
+
visibleDays = 7,
|
|
994
1012
|
testId,
|
|
1013
|
+
asChild: _asChild,
|
|
995
1014
|
...rest
|
|
996
1015
|
}) {
|
|
1016
|
+
const locale = useLocale(localeProp);
|
|
1017
|
+
const timeZone = useTimeZone(timeZoneProp);
|
|
997
1018
|
const [currentDate, setCurrentDate] = useUncontrolled({
|
|
998
1019
|
value: date,
|
|
999
1020
|
defaultValue: defaultDate,
|
|
@@ -1008,12 +1029,16 @@ function AgendaView({
|
|
|
1008
1029
|
});
|
|
1009
1030
|
const t = resolveScheduleTranslations(translations);
|
|
1010
1031
|
const current = useNow(now);
|
|
1011
|
-
const range = getVisibleRange("agenda", currentDate, { timeZone, locale
|
|
1032
|
+
const range = getVisibleRange("agenda", currentDate, { timeZone, locale, visibleDays });
|
|
1012
1033
|
const groups = groupUpcomingEvents(
|
|
1013
1034
|
[...data, ...staticEvents].filter((event) => rangesOverlap(event, range)),
|
|
1014
1035
|
timeZone
|
|
1015
1036
|
);
|
|
1016
1037
|
const scrollerRef = useRef(null);
|
|
1038
|
+
const windowStart = range.start.getTime();
|
|
1039
|
+
useEffect(() => {
|
|
1040
|
+
scrollerRef.current?.scrollTo({ top: 0 });
|
|
1041
|
+
}, [windowStart]);
|
|
1017
1042
|
return /* @__PURE__ */ jsxs(
|
|
1018
1043
|
ark.div,
|
|
1019
1044
|
{
|
|
@@ -1031,7 +1056,8 @@ function AgendaView({
|
|
|
1031
1056
|
date: currentDate,
|
|
1032
1057
|
onDateChange: setCurrentDate,
|
|
1033
1058
|
timeZone,
|
|
1034
|
-
translations: t
|
|
1059
|
+
translations: t,
|
|
1060
|
+
visibleDays
|
|
1035
1061
|
}
|
|
1036
1062
|
),
|
|
1037
1063
|
/* @__PURE__ */ jsx(
|
|
@@ -1041,7 +1067,8 @@ function AgendaView({
|
|
|
1041
1067
|
date: currentDate,
|
|
1042
1068
|
onDateChange: setCurrentDate,
|
|
1043
1069
|
timeZone,
|
|
1044
|
-
translations: t
|
|
1070
|
+
translations: t,
|
|
1071
|
+
visibleDays
|
|
1045
1072
|
}
|
|
1046
1073
|
)
|
|
1047
1074
|
] }) : null,
|
|
@@ -1121,6 +1148,14 @@ function columnInsets({ column, columnCount }) {
|
|
|
1121
1148
|
zIndex: Math.min(column + 1, MAX_CASCADE_Z_INDEX)
|
|
1122
1149
|
};
|
|
1123
1150
|
}
|
|
1151
|
+
function poolPieceInsets(columnVar) {
|
|
1152
|
+
const col = `var(${columnVar}, 0)`;
|
|
1153
|
+
const hairline = `min(${col}, 1) * 1px`;
|
|
1154
|
+
return {
|
|
1155
|
+
insetInlineStart: `calc(${col} * 100% / var(--sch-pool-columns, 1) + ${hairline})`,
|
|
1156
|
+
width: `calc(100% / var(--sch-pool-columns, 1) - ${hairline})`
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1124
1159
|
function resolvePxPerMinute(dayColumnEl, rect) {
|
|
1125
1160
|
const totalMinutes = Number(
|
|
1126
1161
|
getComputedStyle(dayColumnEl).getPropertyValue("--sch-window-minutes")
|
|
@@ -1240,7 +1275,7 @@ function NowCursorLine({
|
|
|
1240
1275
|
"div",
|
|
1241
1276
|
{
|
|
1242
1277
|
"data-schedule-part": "now-indicator-dot",
|
|
1243
|
-
className: "absolute top-0 inset-s-0 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-(--sch-now-line-color)"
|
|
1278
|
+
className: "absolute top-0 inset-s-0 size-2 -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 rounded-full bg-(--sch-now-line-color)"
|
|
1244
1279
|
}
|
|
1245
1280
|
) : null
|
|
1246
1281
|
]
|
|
@@ -1375,7 +1410,7 @@ function ScheduleEventListPopoverContent({
|
|
|
1375
1410
|
"aria-label": translations.back,
|
|
1376
1411
|
className: "-ms-1 flex items-center gap-1 rounded-sm px-1 py-0.5 text-gray-light-500 text-xs hover:bg-black/5 dark:text-gray-dark-400 dark:hover:bg-white/8",
|
|
1377
1412
|
children: [
|
|
1378
|
-
/* @__PURE__ */ jsx(ArrowLeftIcon, { className: "size-3.5" }),
|
|
1413
|
+
/* @__PURE__ */ jsx(ArrowLeftIcon, { className: "size-3.5 rtl:rotate-180" }),
|
|
1379
1414
|
translations.back
|
|
1380
1415
|
]
|
|
1381
1416
|
}
|
|
@@ -1603,7 +1638,7 @@ function AllDayEventBar({
|
|
|
1603
1638
|
className
|
|
1604
1639
|
),
|
|
1605
1640
|
children: [
|
|
1606
|
-
event.icon != null ? /* @__PURE__ */ jsx("span", { className: "
|
|
1641
|
+
event.icon != null ? /* @__PURE__ */ jsx("span", { className: "me-1 inline-flex align-[-1px] [&_svg]:size-3", children: event.icon }) : null,
|
|
1607
1642
|
event.title
|
|
1608
1643
|
]
|
|
1609
1644
|
}
|
|
@@ -1820,7 +1855,7 @@ function ScheduleCreateDraft({ className }) {
|
|
|
1820
1855
|
"aria-hidden": true,
|
|
1821
1856
|
"data-schedule-part": "create-draft",
|
|
1822
1857
|
className: cn(
|
|
1823
|
-
"group pointer-events-none absolute
|
|
1858
|
+
"group pointer-events-none absolute hidden rounded-sm border-2",
|
|
1824
1859
|
// `select-none`, like every other chip surface in the grid. The label
|
|
1825
1860
|
// rides the box's top edge, which during an upward drag *is* the
|
|
1826
1861
|
// pointer position — so the browser extended a text selection straight
|
|
@@ -1903,9 +1938,15 @@ function ScheduleCreateDraft({ className }) {
|
|
|
1903
1938
|
* Easing per direction comes from whichever state the transition heads
|
|
1904
1939
|
* *to*, so the base carries `ease-in` (the leave) and `data-active` the
|
|
1905
1940
|
* `ease-out` (the enter). `allow-discrete` rides on `display` alone.
|
|
1941
|
+
*
|
|
1942
|
+
* `inset-inline-start` is the drag ghost's day-change slide. A draft
|
|
1943
|
+
* piece is keyed by its own column (create and resize are pinned where
|
|
1944
|
+
* they began, and only grow or shrink), so it never changes column
|
|
1945
|
+
* mid-gesture; it is listed so the two previews stay one declaration
|
|
1946
|
+
* apart, as `height` is on the ghost.
|
|
1906
1947
|
*/
|
|
1907
|
-
"[transition:opacity_200ms_ease-in,scale_200ms_ease-in,display_200ms_ease-in_allow-discrete,top_45ms_ease-out,height_45ms_ease-out]",
|
|
1908
|
-
"data-active:[transition:opacity_200ms_ease-out,scale_200ms_ease-out,display_200ms_ease-out_allow-discrete,top_45ms_ease-out,height_45ms_ease-out]",
|
|
1948
|
+
"[transition:opacity_200ms_ease-in,scale_200ms_ease-in,display_200ms_ease-in_allow-discrete,top_45ms_ease-out,height_45ms_ease-out,inset-inline-start_70ms_ease-out]",
|
|
1949
|
+
"data-active:[transition:opacity_200ms_ease-out,scale_200ms_ease-out,display_200ms_ease-out_allow-discrete,top_45ms_ease-out,height_45ms_ease-out,inset-inline-start_70ms_ease-out]",
|
|
1909
1950
|
// `!` and the full shorthand, not `transition-none`: the `data-active`
|
|
1910
1951
|
// rule above is a class *and* an attribute selector, so a plain
|
|
1911
1952
|
// `motion-reduce:transition-none` loses to it and the preview kept
|
|
@@ -1926,7 +1967,8 @@ function ScheduleCreateDraft({ className }) {
|
|
|
1926
1967
|
// an 18px floor) a minimum-duration draft was drawn 6px short.
|
|
1927
1968
|
// Safe for the inactive pieces this component also renders: they are
|
|
1928
1969
|
// `display: none` without `data-active`, so their height never paints.
|
|
1929
|
-
height: "max(var(--sch-create-height, 0px), calc(1rem + 2px))"
|
|
1970
|
+
height: "max(var(--sch-create-height, 0px), calc(1rem + 2px))",
|
|
1971
|
+
...poolPieceInsets("--sch-create-col")
|
|
1930
1972
|
},
|
|
1931
1973
|
children: /* @__PURE__ */ jsx(
|
|
1932
1974
|
"span",
|
|
@@ -1988,7 +2030,7 @@ function ScheduleDragGhost({ className }) {
|
|
|
1988
2030
|
"aria-hidden": true,
|
|
1989
2031
|
"data-schedule-part": "drag-ghost",
|
|
1990
2032
|
className: cn(
|
|
1991
|
-
"group pointer-events-none absolute
|
|
2033
|
+
"group pointer-events-none absolute z-26 hidden select-none rounded-sm",
|
|
1992
2034
|
// The piece carrying the readout paints above its siblings — same
|
|
1993
2035
|
// collision the create draft has, for the same reason: the label is
|
|
1994
2036
|
// deliberately wider than its own column so a cross-day range is not
|
|
@@ -2052,12 +2094,15 @@ function ScheduleDragGhost({ className }) {
|
|
|
2052
2094
|
* during a move (a move preserves duration) and is listed only so the
|
|
2053
2095
|
* two previews stay one declaration apart.
|
|
2054
2096
|
*
|
|
2055
|
-
*
|
|
2056
|
-
*
|
|
2057
|
-
*
|
|
2097
|
+
* `inset-inline-start` eases a move onto another day the same way. The
|
|
2098
|
+
* piece stays one element across the change (`paintPieces` keys it by
|
|
2099
|
+
* its offset from the pointer's column), so this slides it rather than
|
|
2100
|
+
* fading one column's piece out and the next one's in. Longer than the
|
|
2101
|
+
* vertical step because the distance is: a column is a hundred-odd
|
|
2102
|
+
* pixels where a slot is a dozen.
|
|
2058
2103
|
*/
|
|
2059
|
-
"[transition:opacity_200ms_ease-in,scale_200ms_ease-in,display_200ms_ease-in_allow-discrete,top_45ms_ease-out,height_45ms_ease-out]",
|
|
2060
|
-
"data-active:[transition:opacity_200ms_ease-out,scale_200ms_ease-out,display_200ms_ease-out_allow-discrete,top_45ms_ease-out,height_45ms_ease-out]",
|
|
2104
|
+
"[transition:opacity_200ms_ease-in,scale_200ms_ease-in,display_200ms_ease-in_allow-discrete,top_45ms_ease-out,height_45ms_ease-out,inset-inline-start_70ms_ease-out]",
|
|
2105
|
+
"data-active:[transition:opacity_200ms_ease-out,scale_200ms_ease-out,display_200ms_ease-out_allow-discrete,top_45ms_ease-out,height_45ms_ease-out,inset-inline-start_70ms_ease-out]",
|
|
2061
2106
|
"starting:data-active:opacity-0 starting:data-active:scale-105",
|
|
2062
2107
|
// `!` and the full shorthand, not `transition-none`: the `data-active`
|
|
2063
2108
|
// rule above is a class *and* an attribute selector, so a plain
|
|
@@ -2074,7 +2119,11 @@ function ScheduleDragGhost({ className }) {
|
|
|
2074
2119
|
"data-continues-after:rounded-b-none data-continues-after:border-b-0",
|
|
2075
2120
|
className
|
|
2076
2121
|
),
|
|
2077
|
-
style: {
|
|
2122
|
+
style: {
|
|
2123
|
+
top: "var(--sch-ghost-top, 0%)",
|
|
2124
|
+
height: "var(--sch-ghost-height, 0%)",
|
|
2125
|
+
...poolPieceInsets("--sch-ghost-col")
|
|
2126
|
+
},
|
|
2078
2127
|
children: /* @__PURE__ */ jsx(
|
|
2079
2128
|
"span",
|
|
2080
2129
|
{
|
|
@@ -2309,16 +2358,20 @@ var tickEdges = (state, options) => {
|
|
|
2309
2358
|
const rect = grid.getBoundingClientRect();
|
|
2310
2359
|
const hx = edgePressure(state.clientX, rect.left, rect.right);
|
|
2311
2360
|
const vy = edgePressure(state.clientY, rect.top, rect.bottom);
|
|
2312
|
-
const
|
|
2361
|
+
const rtl = options.dir === "rtl";
|
|
2362
|
+
const [minLeft, maxLeft] = rtl ? [-state.maxScrollLeft, 0] : [0, state.maxScrollLeft];
|
|
2313
2363
|
const maxTop = state.maxScrollTop;
|
|
2314
2364
|
const beforeLeft = grid.scrollLeft;
|
|
2315
2365
|
if (hx !== 0) {
|
|
2316
|
-
grid.scrollLeft = Math.max(
|
|
2366
|
+
grid.scrollLeft = Math.max(
|
|
2367
|
+
minLeft,
|
|
2368
|
+
Math.min(maxLeft, grid.scrollLeft + hx * MAX_SCROLL_PX_PER_FRAME)
|
|
2369
|
+
);
|
|
2317
2370
|
}
|
|
2318
2371
|
if (vy !== 0) {
|
|
2319
2372
|
grid.scrollTop = Math.max(0, Math.min(maxTop, grid.scrollTop + vy * MAX_SCROLL_PX_PER_FRAME));
|
|
2320
2373
|
}
|
|
2321
|
-
const direction = hx
|
|
2374
|
+
const direction = hx === 0 ? null : hx > 0 !== rtl ? 1 : -1;
|
|
2322
2375
|
const stuck = hx !== 0 && grid.scrollLeft === beforeLeft;
|
|
2323
2376
|
if (direction !== null && stuck && options.onPaginate) {
|
|
2324
2377
|
if (state.paginateDirection !== direction) {
|
|
@@ -2352,25 +2405,23 @@ var CREATE_DRAFT = {
|
|
|
2352
2405
|
part: "create-draft",
|
|
2353
2406
|
topVar: "--sch-create-top",
|
|
2354
2407
|
heightVar: "--sch-create-height",
|
|
2408
|
+
columnVar: "--sch-create-col",
|
|
2355
2409
|
labelPart: "create-draft-label"
|
|
2356
2410
|
};
|
|
2357
2411
|
var DRAG_GHOST = {
|
|
2358
2412
|
part: "drag-ghost",
|
|
2359
2413
|
topVar: "--sch-ghost-top",
|
|
2360
2414
|
heightVar: "--sch-ghost-height",
|
|
2415
|
+
columnVar: "--sch-ghost-col",
|
|
2361
2416
|
labelPart: "drag-ghost-label"
|
|
2362
2417
|
};
|
|
2363
|
-
var collectPieces = (grid, preview) =>
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
if (draft) drafts.set(Number(column.dataset["dayIndex"]), draft);
|
|
2371
|
-
}
|
|
2372
|
-
return drafts;
|
|
2373
|
-
};
|
|
2418
|
+
var collectPieces = (grid, preview) => new Map(
|
|
2419
|
+
[
|
|
2420
|
+
...grid.querySelectorAll(
|
|
2421
|
+
`[data-schedule-part='piece-pool'] > [data-schedule-part='${preview.part}']`
|
|
2422
|
+
)
|
|
2423
|
+
].map((piece, slot) => [slot, piece])
|
|
2424
|
+
);
|
|
2374
2425
|
var pieceLabel = (piece, preview) => piece.querySelector(`[data-schedule-part='${preview.labelPart}']`);
|
|
2375
2426
|
var clearDraft = (draft) => {
|
|
2376
2427
|
delete draft.dataset["active"];
|
|
@@ -2404,11 +2455,12 @@ var paintPieces = ({
|
|
|
2404
2455
|
columnIndices,
|
|
2405
2456
|
bandOfColumn,
|
|
2406
2457
|
candidates,
|
|
2407
|
-
totalWindowMinutes
|
|
2458
|
+
totalWindowMinutes,
|
|
2459
|
+
anchor = 0
|
|
2408
2460
|
}) => {
|
|
2409
2461
|
const labelled = /* @__PURE__ */ new Set();
|
|
2410
2462
|
for (const index of columnIndices) {
|
|
2411
|
-
const draft = pieces.get(index);
|
|
2463
|
+
const draft = pieces.get(((index - anchor) % pieces.size + pieces.size) % pieces.size);
|
|
2412
2464
|
if (!draft) continue;
|
|
2413
2465
|
const band = bandOfColumn(index);
|
|
2414
2466
|
const candidate = candidates.find(
|
|
@@ -2425,6 +2477,7 @@ var paintPieces = ({
|
|
|
2425
2477
|
const height = (pieceEnd - pieceStart) / 6e4 / totalWindowMinutes * 100;
|
|
2426
2478
|
draft.style.setProperty(preview.topVar, `${top}%`);
|
|
2427
2479
|
draft.style.setProperty(preview.heightVar, `${height}%`);
|
|
2480
|
+
draft.style.setProperty(preview.columnVar, `${index}`);
|
|
2428
2481
|
draft.dataset["active"] = "true";
|
|
2429
2482
|
if (candidate.invalid) draft.dataset["invalid"] = "true";
|
|
2430
2483
|
else delete draft.dataset["invalid"];
|
|
@@ -2486,6 +2539,7 @@ function useEventDrag({
|
|
|
2486
2539
|
locale
|
|
2487
2540
|
}) {
|
|
2488
2541
|
const dragRef = useRef(null);
|
|
2542
|
+
const { dir } = useLocaleContext();
|
|
2489
2543
|
const latest = useRef({
|
|
2490
2544
|
event,
|
|
2491
2545
|
dayIndex,
|
|
@@ -2502,7 +2556,8 @@ function useEventDrag({
|
|
|
2502
2556
|
onEventChange,
|
|
2503
2557
|
onEventClick,
|
|
2504
2558
|
onPaginate,
|
|
2505
|
-
locale
|
|
2559
|
+
locale,
|
|
2560
|
+
dir
|
|
2506
2561
|
});
|
|
2507
2562
|
latest.current = {
|
|
2508
2563
|
event,
|
|
@@ -2520,7 +2575,8 @@ function useEventDrag({
|
|
|
2520
2575
|
onEventChange,
|
|
2521
2576
|
onEventClick,
|
|
2522
2577
|
onPaginate,
|
|
2523
|
-
locale
|
|
2578
|
+
locale,
|
|
2579
|
+
dir
|
|
2524
2580
|
};
|
|
2525
2581
|
const resolveCandidate = useCallback((state, clientX, clientY) => {
|
|
2526
2582
|
const o = latest.current;
|
|
@@ -2560,7 +2616,7 @@ function useEventDrag({
|
|
|
2560
2616
|
const paint = useCallback(
|
|
2561
2617
|
(state) => {
|
|
2562
2618
|
const o = latest.current;
|
|
2563
|
-
const { next, result } = resolveCandidate(state, state.clientX, state.clientY);
|
|
2619
|
+
const { next, result, renderedIndex } = resolveCandidate(state, state.clientX, state.clientY);
|
|
2564
2620
|
setChipsDragging(state.chips, true);
|
|
2565
2621
|
paintPieces({
|
|
2566
2622
|
pieces: state.ghosts,
|
|
@@ -2577,7 +2633,11 @@ function useEventDrag({
|
|
|
2577
2633
|
label: formatCandidate(next, o.locale, o.timeZone)
|
|
2578
2634
|
}
|
|
2579
2635
|
],
|
|
2580
|
-
totalWindowMinutes: o.totalWindowMinutes
|
|
2636
|
+
totalWindowMinutes: o.totalWindowMinutes,
|
|
2637
|
+
// Pieces keyed from the pointer's column: the candidate moves as one,
|
|
2638
|
+
// so each piece keeps its element when the day changes and the ghost
|
|
2639
|
+
// slides there rather than fading out of one column and into the next.
|
|
2640
|
+
anchor: renderedIndex
|
|
2581
2641
|
});
|
|
2582
2642
|
setInvalid(state.chips, !result.ok);
|
|
2583
2643
|
},
|
|
@@ -2588,13 +2648,12 @@ function useEventDrag({
|
|
|
2588
2648
|
tickEdges(state, {
|
|
2589
2649
|
paint: () => paint(state),
|
|
2590
2650
|
isLive: () => dragRef.current === state,
|
|
2651
|
+
dir: latest.current.dir,
|
|
2591
2652
|
onPaginate: (direction) => latest.current.onPaginate?.(direction),
|
|
2592
2653
|
onAfterPaginate: () => {
|
|
2593
2654
|
const refreshed = liveChipsFor(state.grid, latest.current.event.id);
|
|
2594
2655
|
setChipsDragging(state.chips, false);
|
|
2595
2656
|
state.chips = refreshed;
|
|
2596
|
-
hidePieces(state.ghosts, DRAG_GHOST);
|
|
2597
|
-
state.ghosts = collectPieces(state.grid, DRAG_GHOST);
|
|
2598
2657
|
}
|
|
2599
2658
|
});
|
|
2600
2659
|
},
|
|
@@ -2767,6 +2826,7 @@ function useEventResize({
|
|
|
2767
2826
|
locale
|
|
2768
2827
|
}) {
|
|
2769
2828
|
const resizeRef = useRef(null);
|
|
2829
|
+
const { dir } = useLocaleContext();
|
|
2770
2830
|
const options = {
|
|
2771
2831
|
event,
|
|
2772
2832
|
edge,
|
|
@@ -2784,7 +2844,8 @@ function useEventResize({
|
|
|
2784
2844
|
overlapCandidates,
|
|
2785
2845
|
onEventChange,
|
|
2786
2846
|
onPaginate,
|
|
2787
|
-
locale
|
|
2847
|
+
locale,
|
|
2848
|
+
dir
|
|
2788
2849
|
};
|
|
2789
2850
|
const latest = useRef(options);
|
|
2790
2851
|
latest.current = options;
|
|
@@ -2900,10 +2961,9 @@ function useEventResize({
|
|
|
2900
2961
|
tickEdges(state, {
|
|
2901
2962
|
paint: () => paint(state),
|
|
2902
2963
|
isLive: () => resizeRef.current === state,
|
|
2964
|
+
dir: latest.current.dir,
|
|
2903
2965
|
onPaginate: (direction) => latest.current.onPaginate?.(direction),
|
|
2904
2966
|
onAfterPaginate: () => {
|
|
2905
|
-
hidePieces(state.drafts, CREATE_DRAFT);
|
|
2906
|
-
state.drafts = collectPieces(state.grid, CREATE_DRAFT);
|
|
2907
2967
|
setChipsDimmed(state.chips, false);
|
|
2908
2968
|
const refreshed = liveChipsFor(state.grid, latest.current.event.id);
|
|
2909
2969
|
state.chips = refreshed;
|
|
@@ -3577,6 +3637,7 @@ function InteractiveEventChip({
|
|
|
3577
3637
|
onEventChange: resolvedOnEventChange,
|
|
3578
3638
|
locale
|
|
3579
3639
|
});
|
|
3640
|
+
const { dir } = useLocaleContext();
|
|
3580
3641
|
const handleBodyKeyDown = (e) => {
|
|
3581
3642
|
if (!present) return;
|
|
3582
3643
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -3590,7 +3651,7 @@ function InteractiveEventChip({
|
|
|
3590
3651
|
if (!isVertical && !isHorizontal) return;
|
|
3591
3652
|
e.preventDefault();
|
|
3592
3653
|
const step = e.shiftKey ? slotDuration * 4 : slotDuration;
|
|
3593
|
-
const delta = isHorizontal ? { days: e.key === "ArrowLeft" ?
|
|
3654
|
+
const delta = isHorizontal ? { days: e.key === "ArrowLeft" === (dir === "rtl") ? 1 : -1, minutes: 0 } : { days: 0, minutes: e.key === "ArrowUp" ? -step : step };
|
|
3594
3655
|
const next = { ...moveRange(event, delta, { timeZone, slotDuration }) };
|
|
3595
3656
|
const result = checkRangeCommit(next, {
|
|
3596
3657
|
slotDisabled,
|
|
@@ -4056,6 +4117,7 @@ function useEventCreate({
|
|
|
4056
4117
|
const stateRef = useRef(null);
|
|
4057
4118
|
const pendingRef = useRef(null);
|
|
4058
4119
|
const armTimerRef = useRef(null);
|
|
4120
|
+
const { dir } = useLocaleContext();
|
|
4059
4121
|
const latest = useRef({
|
|
4060
4122
|
day,
|
|
4061
4123
|
dayIndex,
|
|
@@ -4072,7 +4134,8 @@ function useEventCreate({
|
|
|
4072
4134
|
onEventCreate,
|
|
4073
4135
|
onGridClick,
|
|
4074
4136
|
onPaginate,
|
|
4075
|
-
locale
|
|
4137
|
+
locale,
|
|
4138
|
+
dir
|
|
4076
4139
|
});
|
|
4077
4140
|
latest.current = {
|
|
4078
4141
|
day,
|
|
@@ -4090,7 +4153,8 @@ function useEventCreate({
|
|
|
4090
4153
|
onEventCreate,
|
|
4091
4154
|
onGridClick,
|
|
4092
4155
|
onPaginate,
|
|
4093
|
-
locale
|
|
4156
|
+
locale,
|
|
4157
|
+
dir
|
|
4094
4158
|
};
|
|
4095
4159
|
const clearPending = useCallback(() => {
|
|
4096
4160
|
if (armTimerRef.current != null) clearTimeout(armTimerRef.current);
|
|
@@ -4157,11 +4221,8 @@ function useEventCreate({
|
|
|
4157
4221
|
tickEdges(state, {
|
|
4158
4222
|
paint: () => paint(state),
|
|
4159
4223
|
isLive: () => stateRef.current === state,
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
hidePieces(state.drafts, CREATE_DRAFT);
|
|
4163
|
-
state.drafts = collectPieces(state.grid, CREATE_DRAFT);
|
|
4164
|
-
}
|
|
4224
|
+
dir: latest.current.dir,
|
|
4225
|
+
onPaginate: (direction) => latest.current.onPaginate?.(direction)
|
|
4165
4226
|
});
|
|
4166
4227
|
},
|
|
4167
4228
|
[paint]
|
|
@@ -4586,7 +4647,9 @@ function DayColumn({
|
|
|
4586
4647
|
// its own; `align-self: stretch` (the grid default) is what makes
|
|
4587
4648
|
// that stretch actually apply here.
|
|
4588
4649
|
"relative row-2 h-full",
|
|
4589
|
-
// `overflow-y-clip`
|
|
4650
|
+
// `overflow-y-clip` contained the create draft's own scale overshoot
|
|
4651
|
+
// when the draft was mounted in here; it now lives in the grid's
|
|
4652
|
+
// `piece-pool` layer, which carries the same clip for the same reason.
|
|
4590
4653
|
// The draft rests at `scale-105` and transitions to `scale-100` on
|
|
4591
4654
|
// enter (see `schedule-create-draft.tsx` — the >1 resting scale is
|
|
4592
4655
|
// deliberate, so its *leave* expands outward where it can be seen
|
|
@@ -4641,8 +4704,6 @@ function DayColumn({
|
|
|
4641
4704
|
},
|
|
4642
4705
|
run.startMinute
|
|
4643
4706
|
)),
|
|
4644
|
-
/* @__PURE__ */ jsx(ScheduleCreateDraft, { className: classNames?.createDraft }),
|
|
4645
|
-
/* @__PURE__ */ jsx(ScheduleDragGhost, { className: classNames?.dragGhost }),
|
|
4646
4707
|
chips.map((chip) => chip.node),
|
|
4647
4708
|
withNowIndicator && isToday2 ? /* @__PURE__ */ jsx(
|
|
4648
4709
|
NowCursorLine,
|
|
@@ -5012,6 +5073,8 @@ function ScheduleTimedGrid({
|
|
|
5012
5073
|
// details popovers are portalled *into* this subtree, so their panels
|
|
5013
5074
|
// opt back in with `select-text`.
|
|
5014
5075
|
"select-none",
|
|
5076
|
+
// Mirrors the page-turn slide: see the `schedule-page-*` keyframes.
|
|
5077
|
+
"rtl:[--sch-inline-dir:-1]",
|
|
5015
5078
|
classNames?.grid
|
|
5016
5079
|
),
|
|
5017
5080
|
style: {
|
|
@@ -5163,6 +5226,25 @@ function ScheduleTimedGrid({
|
|
|
5163
5226
|
className: classNames?.nowIndicator
|
|
5164
5227
|
}
|
|
5165
5228
|
) }) : null,
|
|
5229
|
+
/* @__PURE__ */ jsxs(
|
|
5230
|
+
"div",
|
|
5231
|
+
{
|
|
5232
|
+
"aria-hidden": true,
|
|
5233
|
+
"data-schedule-part": "piece-pool",
|
|
5234
|
+
className: "pointer-events-none relative col-[2/-1] row-2 min-w-0 overflow-y-clip",
|
|
5235
|
+
style: { "--sch-pool-columns": `${days.length}` },
|
|
5236
|
+
children: [
|
|
5237
|
+
days.map((_, slot) => (
|
|
5238
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: pool slots, not days — keyed by date, a page turn would remount the pool mid-gesture.
|
|
5239
|
+
/* @__PURE__ */ jsx(ScheduleCreateDraft, { className: classNames?.createDraft }, slot)
|
|
5240
|
+
)),
|
|
5241
|
+
days.map((_, slot) => (
|
|
5242
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: pool slots, not days — keyed by date, a page turn would remount the pool mid-gesture.
|
|
5243
|
+
/* @__PURE__ */ jsx(ScheduleDragGhost, { className: classNames?.dragGhost }, slot)
|
|
5244
|
+
))
|
|
5245
|
+
]
|
|
5246
|
+
}
|
|
5247
|
+
),
|
|
5166
5248
|
renderBand(days, dataSegments, staticSegments, paging ? "entering" : void 0, ""),
|
|
5167
5249
|
pageOut ? renderBand(outDays, outDataSegments, outStaticSegments, "exiting", "exit-") : null
|
|
5168
5250
|
]
|
|
@@ -5184,8 +5266,8 @@ function DaysViewBody({
|
|
|
5184
5266
|
withEventDetails = true,
|
|
5185
5267
|
onDayClick,
|
|
5186
5268
|
renderEventDetails,
|
|
5187
|
-
locale,
|
|
5188
|
-
timeZone
|
|
5269
|
+
locale: localeProp,
|
|
5270
|
+
timeZone: timeZoneProp,
|
|
5189
5271
|
translations,
|
|
5190
5272
|
classNames,
|
|
5191
5273
|
className,
|
|
@@ -5221,8 +5303,11 @@ function DaysViewBody({
|
|
|
5221
5303
|
gridRef,
|
|
5222
5304
|
nowRef,
|
|
5223
5305
|
testId,
|
|
5306
|
+
asChild: _asChild,
|
|
5224
5307
|
...rest
|
|
5225
5308
|
}) {
|
|
5309
|
+
const locale = useLocale(localeProp);
|
|
5310
|
+
const timeZone = useTimeZone(timeZoneProp);
|
|
5226
5311
|
const [anchorDate, setAnchorDate] = useUncontrolled({
|
|
5227
5312
|
value: date,
|
|
5228
5313
|
defaultValue: defaultDate,
|
|
@@ -5240,7 +5325,7 @@ function DaysViewBody({
|
|
|
5240
5325
|
const t = resolveScheduleTranslations(translations);
|
|
5241
5326
|
const range = getVisibleRange("days", anchorDate, {
|
|
5242
5327
|
timeZone,
|
|
5243
|
-
locale
|
|
5328
|
+
locale,
|
|
5244
5329
|
startOfWeek: align,
|
|
5245
5330
|
visibleDays
|
|
5246
5331
|
});
|
|
@@ -5397,7 +5482,7 @@ function MonthEventPill({
|
|
|
5397
5482
|
focusStyles({ ring: "palette", offset: false })
|
|
5398
5483
|
),
|
|
5399
5484
|
children: [
|
|
5400
|
-
event.icon != null ? /* @__PURE__ */ jsx("span", { className: "
|
|
5485
|
+
event.icon != null ? /* @__PURE__ */ jsx("span", { className: "me-1 inline-flex align-[-1px] [&_svg]:size-3", children: event.icon }) : null,
|
|
5401
5486
|
event.title
|
|
5402
5487
|
]
|
|
5403
5488
|
}
|
|
@@ -5609,8 +5694,8 @@ function MonthView({
|
|
|
5609
5694
|
onOverflowClick,
|
|
5610
5695
|
withOverflowDetails,
|
|
5611
5696
|
renderOverflowDetails,
|
|
5612
|
-
locale,
|
|
5613
|
-
timeZone
|
|
5697
|
+
locale: localeProp,
|
|
5698
|
+
timeZone: timeZoneProp,
|
|
5614
5699
|
translations,
|
|
5615
5700
|
classNames,
|
|
5616
5701
|
className,
|
|
@@ -5624,8 +5709,11 @@ function MonthView({
|
|
|
5624
5709
|
dayDisabled,
|
|
5625
5710
|
maxEventsPerDay = 3,
|
|
5626
5711
|
testId,
|
|
5712
|
+
asChild: _asChild,
|
|
5627
5713
|
...rest
|
|
5628
5714
|
}) {
|
|
5715
|
+
const locale = useLocale(localeProp);
|
|
5716
|
+
const timeZone = useTimeZone(timeZoneProp);
|
|
5629
5717
|
const [currentDate, setCurrentDate] = useUncontrolled({
|
|
5630
5718
|
value: date,
|
|
5631
5719
|
defaultValue: defaultDate,
|
|
@@ -5642,7 +5730,7 @@ function MonthView({
|
|
|
5642
5730
|
const todayRef = now ?? /* @__PURE__ */ new Date();
|
|
5643
5731
|
const range = getVisibleRange("month", currentDate, {
|
|
5644
5732
|
timeZone,
|
|
5645
|
-
locale
|
|
5733
|
+
locale,
|
|
5646
5734
|
startOfWeek
|
|
5647
5735
|
});
|
|
5648
5736
|
const days = enumerateDays(range, timeZone);
|
|
@@ -5792,8 +5880,8 @@ function YearView({
|
|
|
5792
5880
|
staticEvents = [],
|
|
5793
5881
|
onDayClick,
|
|
5794
5882
|
onMonthClick,
|
|
5795
|
-
locale,
|
|
5796
|
-
timeZone
|
|
5883
|
+
locale: localeProp,
|
|
5884
|
+
timeZone: timeZoneProp,
|
|
5797
5885
|
translations,
|
|
5798
5886
|
classNames,
|
|
5799
5887
|
className,
|
|
@@ -5805,8 +5893,11 @@ function YearView({
|
|
|
5805
5893
|
now,
|
|
5806
5894
|
dayDisabled,
|
|
5807
5895
|
testId,
|
|
5896
|
+
asChild: _asChild,
|
|
5808
5897
|
...rest
|
|
5809
5898
|
}) {
|
|
5899
|
+
const locale = useLocale(localeProp);
|
|
5900
|
+
const timeZone = useTimeZone(timeZoneProp);
|
|
5810
5901
|
const [currentDate, setCurrentDate] = useUncontrolled({
|
|
5811
5902
|
value: date,
|
|
5812
5903
|
defaultValue: defaultDate,
|
|
@@ -5815,7 +5906,7 @@ function YearView({
|
|
|
5815
5906
|
});
|
|
5816
5907
|
const t = resolveScheduleTranslations(translations);
|
|
5817
5908
|
const todayRef = now ?? /* @__PURE__ */ new Date();
|
|
5818
|
-
const yearRange = getVisibleRange("year", currentDate, { timeZone, locale
|
|
5909
|
+
const yearRange = getVisibleRange("year", currentDate, { timeZone, locale });
|
|
5819
5910
|
const monthStarts = enumerateMonths(yearRange, timeZone);
|
|
5820
5911
|
const allEvents = [...data, ...staticEvents];
|
|
5821
5912
|
return /* @__PURE__ */ jsxs(
|
|
@@ -5868,7 +5959,7 @@ function YearView({
|
|
|
5868
5959
|
children: monthStarts.map((monthStart) => {
|
|
5869
5960
|
const monthGrid = getVisibleRange("month", monthStart, {
|
|
5870
5961
|
timeZone,
|
|
5871
|
-
locale
|
|
5962
|
+
locale
|
|
5872
5963
|
});
|
|
5873
5964
|
const nextMonthStart = monthStarts.find((m) => m.getTime() > monthStart.getTime());
|
|
5874
5965
|
const monthEnd = nextMonthStart ?? yearRange.end;
|
|
@@ -6023,7 +6114,7 @@ var PROP_RENDERERS = {
|
|
|
6023
6114
|
onOverflowClick: ["days", "month"],
|
|
6024
6115
|
withOverflowDetails: ["days", "month"],
|
|
6025
6116
|
renderOverflowDetails: ["days", "month"],
|
|
6026
|
-
visibleDays: ["days"],
|
|
6117
|
+
visibleDays: ["days", "agenda"],
|
|
6027
6118
|
revealBehavior: ["days"],
|
|
6028
6119
|
editable: ["days"],
|
|
6029
6120
|
onEventChange: ["days"],
|
|
@@ -6044,11 +6135,14 @@ function ScheduleRoot(allProps) {
|
|
|
6044
6135
|
defaultSelected,
|
|
6045
6136
|
onSelect,
|
|
6046
6137
|
withSelection = true,
|
|
6047
|
-
|
|
6138
|
+
// No default here: each renderer owns its own — `true` for the grids,
|
|
6139
|
+
// whose chips can't show a description, `false` for the agenda, whose
|
|
6140
|
+
// rows already do.
|
|
6141
|
+
withEventDetails,
|
|
6048
6142
|
onDayClick,
|
|
6049
6143
|
renderEventDetails,
|
|
6050
|
-
locale,
|
|
6051
|
-
timeZone
|
|
6144
|
+
locale: localeProp,
|
|
6145
|
+
timeZone: timeZoneProp,
|
|
6052
6146
|
translations,
|
|
6053
6147
|
classNames,
|
|
6054
6148
|
className,
|
|
@@ -6090,8 +6184,11 @@ function ScheduleRoot(allProps) {
|
|
|
6090
6184
|
onMonthClick,
|
|
6091
6185
|
renderEvent,
|
|
6092
6186
|
testId,
|
|
6187
|
+
asChild: _asChild,
|
|
6093
6188
|
...rest
|
|
6094
6189
|
} = allProps;
|
|
6190
|
+
const locale = useLocale(localeProp);
|
|
6191
|
+
const timeZone = useTimeZone(timeZoneProp);
|
|
6095
6192
|
const [currentDate, setCurrentDate] = useUncontrolled({
|
|
6096
6193
|
value: date,
|
|
6097
6194
|
defaultValue: defaultDate,
|
|
@@ -6224,7 +6321,7 @@ function ScheduleRoot(allProps) {
|
|
|
6224
6321
|
}
|
|
6225
6322
|
if (!isEventInVisibleRange(event, currentView, currentDate, {
|
|
6226
6323
|
timeZone,
|
|
6227
|
-
locale
|
|
6324
|
+
locale,
|
|
6228
6325
|
// The wide `align` value, deliberately un-narrowed: `getVisibleRange`
|
|
6229
6326
|
// calls `resolveWeekStartDay` itself and the days branch needs the raw
|
|
6230
6327
|
// `"relative"`.
|
|
@@ -6459,7 +6556,8 @@ function ScheduleRoot(allProps) {
|
|
|
6459
6556
|
onDateChange: setCurrentDate,
|
|
6460
6557
|
withPagination: false,
|
|
6461
6558
|
withNowButton: false,
|
|
6462
|
-
now
|
|
6559
|
+
now,
|
|
6560
|
+
visibleDays: activeVisibleDays
|
|
6463
6561
|
}
|
|
6464
6562
|
)).exhaustive() })
|
|
6465
6563
|
]
|
|
@@ -6473,16 +6571,19 @@ function ScheduleNextUp({
|
|
|
6473
6571
|
data,
|
|
6474
6572
|
now,
|
|
6475
6573
|
pastEventsOffset = 30,
|
|
6476
|
-
locale,
|
|
6477
|
-
timeZone
|
|
6574
|
+
locale: localeProp,
|
|
6575
|
+
timeZone: timeZoneProp,
|
|
6478
6576
|
translations,
|
|
6479
6577
|
empty,
|
|
6480
6578
|
renderEvent,
|
|
6481
6579
|
classNames,
|
|
6482
6580
|
className,
|
|
6483
6581
|
testId,
|
|
6582
|
+
asChild: _asChild,
|
|
6484
6583
|
...rest
|
|
6485
6584
|
}) {
|
|
6585
|
+
const locale = useLocale(localeProp);
|
|
6586
|
+
const timeZone = useTimeZone(timeZoneProp);
|
|
6486
6587
|
const current = useNow(now);
|
|
6487
6588
|
const agenda = buildNextUpAgenda(data, current, { pastEventsOffset, timeZone });
|
|
6488
6589
|
const t = resolveScheduleTranslations(translations);
|