@42-central/ui-react 0.17.1 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/biome/no-gray-color.grit +18 -0
- 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-EVVMHTCL.js → chunk-EBREIC3L.js} +4 -3
- 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-YON5Y336.js → chunk-O23Y5ML4.js} +8 -8
- package/dist/{chunk-YON5Y336.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-6I4R3HR6.js → chunk-RQL7FVCS.js} +3 -3
- package/dist/{chunk-6I4R3HR6.js.map → chunk-RQL7FVCS.js.map} +1 -1
- 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-NSOA3GMZ.js → chunk-UHNRAI6V.js} +3 -3
- package/dist/{chunk-NSOA3GMZ.js.map → chunk-UHNRAI6V.js.map} +1 -1
- package/dist/{chunk-JBVFWSRQ.js → chunk-VIYVN4WF.js} +6 -4
- package/dist/chunk-VIYVN4WF.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-S53FHWNG.js → chunk-YWRBG23W.js} +3 -3
- package/dist/chunk-YWRBG23W.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/colors.css +12 -26
- 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 +1 -1
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/index.js +16 -4
- 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/avatar/avatar.d.ts +3 -3
- package/dist/components/avatar/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/index.js +3 -2
- package/dist/components/chart/chart.d.ts +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chart/index.js.map +1 -1
- 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/index.js +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 +21 -20
- 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/mark/index.js +1 -1
- package/dist/components/mark/mark.d.ts +2 -2
- 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/index.js +4 -3
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/notification/notification.d.ts +3 -2
- 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 +2 -2
- package/dist/components/schedule/index.js +50 -23
- 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-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-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-toolbar.d.ts +1 -1
- package/dist/components/schedule/schedule-toolbar.d.ts.map +1 -1
- package/dist/components/schedule/schedule-types.d.ts +6 -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/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/theme-icon/index.js +1 -1
- 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/index.js +1 -1
- package/dist/lib/as-child.d.ts +104 -0
- package/dist/lib/as-child.d.ts.map +1 -0
- package/dist/lib/colors.d.ts +1 -1
- package/dist/lib/colors.d.ts.map +1 -1
- package/dist/theme.css +0 -33
- package/package.json +2 -1
- package/src/as-child.contract.test.tsx +809 -0
- package/src/biome-plugins.test.ts +61 -0
- package/src/colors.css +12 -26
- 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 +17 -0
- package/src/components/alert/alert.tsx +21 -2
- package/src/components/app-shell/app-shell.tsx +3 -1
- package/src/components/avatar/avatar.tsx +3 -3
- 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/chart/chart.test.tsx +1 -2
- package/src/components/chart/chart.tsx +1 -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/gutters.test.ts +2 -2
- 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/mark/mark.test.tsx +4 -4
- package/src/components/mark/mark.tsx +3 -3
- 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/notification.tsx +4 -1
- 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/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 +41 -28
- package/src/components/schedule/schedule-dates.test.ts +37 -52
- package/src/components/schedule/schedule-dates.ts +22 -25
- package/src/components/schedule/schedule-days-view.tsx +3 -1
- package/src/components/schedule/schedule-month-view.tsx +3 -1
- package/src/components/schedule/schedule-next-up.tsx +6 -2
- package/src/components/schedule/schedule-toolbar.test.tsx +26 -0
- package/src/components/schedule/schedule-toolbar.tsx +13 -1
- package/src/components/schedule/schedule-types.ts +6 -4
- package/src/components/schedule/schedule-views.ts +4 -5
- package/src/components/schedule/schedule-year-view.tsx +3 -1
- package/src/components/schedule/schedule.test.tsx +66 -22
- package/src/components/schedule/schedule.tsx +22 -13
- package/src/components/slider/slider.tsx +4 -0
- package/src/components/tabs/tabs-data.tsx +17 -14
- package/src/components/theme-icon/theme-icon.tsx +1 -1
- 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/lib/colors.ts +4 -2
- package/src/theme.css +0 -33
- 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-EVVMHTCL.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-JBVFWSRQ.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-S53FHWNG.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
|
@@ -55,7 +55,7 @@ import { YearView as _YearView } from "./schedule-year-view";
|
|
|
55
55
|
* namespace later without a breaking change. `DayView`/`WeekView` are thin
|
|
56
56
|
* preconfigured `DaysView` wrappers (RFC §17a), not independent
|
|
57
57
|
* implementations — reinstated for convenience after the `DaysView` merge.
|
|
58
|
-
* `AgendaView` is the
|
|
58
|
+
* `AgendaView` is the date-anchored agenda and *is* toolbar-switchable —
|
|
59
59
|
* put `"agenda"` in `views` to give it a tab. `NextUp` renders the same list
|
|
60
60
|
* (`schedule-agenda-list.tsx`) over an unbounded from-now window, with no
|
|
61
61
|
* chrome and no selection, and is deliberately still not a switcher entry:
|
|
@@ -90,7 +90,7 @@ export declare const Schedule: typeof _ScheduleRoot & {
|
|
|
90
90
|
visibleDays?: number;
|
|
91
91
|
}) => import("react").JSX.Element;
|
|
92
92
|
NowTrigger: ({ onDateChange, now, translations, size, className, testId, }: import("./schedule-toolbar").ScheduleToolbarNowTriggerProps) => import("react").JSX.Element;
|
|
93
|
-
Title: ({ view, date, timeZone: timeZoneProp, locale: localeProp, align, visibleDays, className, testId, ...rest }: import("./schedule-toolbar").ScheduleToolbarTitleProps) => import("react").JSX.Element;
|
|
93
|
+
Title: ({ view, date, timeZone: timeZoneProp, locale: localeProp, align, visibleDays, className, testId, asChild, children, ...rest }: import("./schedule-toolbar").ScheduleToolbarTitleProps) => import("react").JSX.Element;
|
|
94
94
|
ViewSwitcher: <const V extends import("./schedule-views").ScheduleViews = readonly ["days", "month", "year"]>({ view, onViewChange, views, translations, size, className, testId, }: import("./schedule-toolbar").ScheduleToolbarViewSwitcherProps<V>) => import("react").JSX.Element;
|
|
95
95
|
};
|
|
96
96
|
NextUp: typeof _ScheduleNextUp;
|
|
@@ -1,19 +1,20 @@
|
|
|
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-
|
|
7
|
+
import { Button } from '../../chunk-RAUOFTUH.js';
|
|
8
8
|
import { useLocale, useTimeZone, devWarn, DEFAULT_LOCALE } from '../../chunk-7NZSTCJO.js';
|
|
9
|
-
import { Popover } from '../../chunk-
|
|
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';
|
|
@@ -135,9 +136,8 @@ function getVisibleRange(view, date, options) {
|
|
|
135
136
|
const end = midnightOf(endOfYear(value)).add({ days: 1 });
|
|
136
137
|
return { start, end };
|
|
137
138
|
}).with("agenda", () => {
|
|
138
|
-
const start = midnightOf(
|
|
139
|
-
|
|
140
|
-
return { start, end };
|
|
139
|
+
const start = midnightOf(value);
|
|
140
|
+
return { start, end: start.add({ days: visibleDays }) };
|
|
141
141
|
}).exhaustive();
|
|
142
142
|
return {
|
|
143
143
|
start: calendarValueToDate(range.start, timeZone),
|
|
@@ -146,7 +146,7 @@ function getVisibleRange(view, date, options) {
|
|
|
146
146
|
}
|
|
147
147
|
function paginateDate(view, date, direction, options) {
|
|
148
148
|
const value = toZoned(date, options.timeZone);
|
|
149
|
-
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();
|
|
150
150
|
const next = direction === 1 ? value.add(duration) : value.subtract(duration);
|
|
151
151
|
return calendarValueToDate(next, options.timeZone);
|
|
152
152
|
}
|
|
@@ -259,12 +259,12 @@ function allDayRangeLabel(start, end, timeZone, locale) {
|
|
|
259
259
|
}
|
|
260
260
|
function formatScheduleTitle(view, date, options) {
|
|
261
261
|
const { timeZone, locale = DEFAULT_LOCALE, startOfWeek, visibleDays } = options;
|
|
262
|
-
return match(view).with("days", () => {
|
|
262
|
+
return match(view).with("days", "agenda", (v) => {
|
|
263
263
|
const days = visibleDays ?? 7;
|
|
264
264
|
if (days === 1) {
|
|
265
265
|
return new Intl.DateTimeFormat(locale, { dateStyle: "long", timeZone }).format(date);
|
|
266
266
|
}
|
|
267
|
-
const range = getVisibleRange(
|
|
267
|
+
const range = getVisibleRange(v, date, {
|
|
268
268
|
timeZone,
|
|
269
269
|
locale,
|
|
270
270
|
startOfWeek,
|
|
@@ -274,7 +274,6 @@ function formatScheduleTitle(view, date, options) {
|
|
|
274
274
|
return new Intl.DateTimeFormat(locale, { dateStyle: "medium", timeZone }).formatRange(range.start, lastDay).normalize("NFKC");
|
|
275
275
|
}).with(
|
|
276
276
|
"month",
|
|
277
|
-
"agenda",
|
|
278
277
|
() => new Intl.DateTimeFormat(locale, { month: "long", year: "numeric", timeZone }).format(date)
|
|
279
278
|
).with(
|
|
280
279
|
"year",
|
|
@@ -794,9 +793,8 @@ var SHORTHANDS = {
|
|
|
794
793
|
days: { id: "days", view: "days" },
|
|
795
794
|
month: { id: "month", view: "month" },
|
|
796
795
|
year: { id: "year", view: "year" },
|
|
797
|
-
// Pins no `visibleDays
|
|
798
|
-
//
|
|
799
|
-
// 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.
|
|
800
798
|
agenda: { id: "agenda", view: "agenda" }
|
|
801
799
|
};
|
|
802
800
|
var isShorthand = (id) => id in SHORTHANDS;
|
|
@@ -929,18 +927,27 @@ var ScheduleToolbarTitle = ({
|
|
|
929
927
|
visibleDays,
|
|
930
928
|
className,
|
|
931
929
|
testId,
|
|
930
|
+
asChild,
|
|
931
|
+
children,
|
|
932
932
|
...rest
|
|
933
933
|
}) => {
|
|
934
934
|
const locale = useLocale(localeProp);
|
|
935
935
|
const timeZone = useTimeZone(timeZoneProp);
|
|
936
|
+
const title = formatScheduleTitle(view, date, {
|
|
937
|
+
timeZone,
|
|
938
|
+
locale,
|
|
939
|
+
startOfWeek: align,
|
|
940
|
+
visibleDays
|
|
941
|
+
});
|
|
936
942
|
return /* @__PURE__ */ jsx(
|
|
937
943
|
ark.h2,
|
|
938
944
|
{
|
|
945
|
+
asChild,
|
|
939
946
|
"data-schedule-part": "toolbar-title",
|
|
940
947
|
className: cn("truncate font-semibold text-sm", className),
|
|
941
948
|
...props({ "data-testid": testId }),
|
|
942
949
|
...rest,
|
|
943
|
-
children:
|
|
950
|
+
children: asChild ? withAsChildContent(children, (own) => own ?? title) : title
|
|
944
951
|
}
|
|
945
952
|
);
|
|
946
953
|
};
|
|
@@ -983,8 +990,11 @@ function AgendaView({
|
|
|
983
990
|
defaultSelected,
|
|
984
991
|
onSelect,
|
|
985
992
|
withSelection = true,
|
|
986
|
-
withEventDetails = true,
|
|
987
993
|
renderEventDetails,
|
|
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,
|
|
988
998
|
locale: localeProp,
|
|
989
999
|
timeZone: timeZoneProp,
|
|
990
1000
|
translations,
|
|
@@ -998,7 +1008,9 @@ function AgendaView({
|
|
|
998
1008
|
now,
|
|
999
1009
|
empty,
|
|
1000
1010
|
renderEvent,
|
|
1011
|
+
visibleDays = 7,
|
|
1001
1012
|
testId,
|
|
1013
|
+
asChild: _asChild,
|
|
1002
1014
|
...rest
|
|
1003
1015
|
}) {
|
|
1004
1016
|
const locale = useLocale(localeProp);
|
|
@@ -1017,12 +1029,16 @@ function AgendaView({
|
|
|
1017
1029
|
});
|
|
1018
1030
|
const t = resolveScheduleTranslations(translations);
|
|
1019
1031
|
const current = useNow(now);
|
|
1020
|
-
const range = getVisibleRange("agenda", currentDate, { timeZone, locale });
|
|
1032
|
+
const range = getVisibleRange("agenda", currentDate, { timeZone, locale, visibleDays });
|
|
1021
1033
|
const groups = groupUpcomingEvents(
|
|
1022
1034
|
[...data, ...staticEvents].filter((event) => rangesOverlap(event, range)),
|
|
1023
1035
|
timeZone
|
|
1024
1036
|
);
|
|
1025
1037
|
const scrollerRef = useRef(null);
|
|
1038
|
+
const windowStart = range.start.getTime();
|
|
1039
|
+
useEffect(() => {
|
|
1040
|
+
scrollerRef.current?.scrollTo({ top: 0 });
|
|
1041
|
+
}, [windowStart]);
|
|
1026
1042
|
return /* @__PURE__ */ jsxs(
|
|
1027
1043
|
ark.div,
|
|
1028
1044
|
{
|
|
@@ -1040,7 +1056,8 @@ function AgendaView({
|
|
|
1040
1056
|
date: currentDate,
|
|
1041
1057
|
onDateChange: setCurrentDate,
|
|
1042
1058
|
timeZone,
|
|
1043
|
-
translations: t
|
|
1059
|
+
translations: t,
|
|
1060
|
+
visibleDays
|
|
1044
1061
|
}
|
|
1045
1062
|
),
|
|
1046
1063
|
/* @__PURE__ */ jsx(
|
|
@@ -1050,7 +1067,8 @@ function AgendaView({
|
|
|
1050
1067
|
date: currentDate,
|
|
1051
1068
|
onDateChange: setCurrentDate,
|
|
1052
1069
|
timeZone,
|
|
1053
|
-
translations: t
|
|
1070
|
+
translations: t,
|
|
1071
|
+
visibleDays
|
|
1054
1072
|
}
|
|
1055
1073
|
)
|
|
1056
1074
|
] }) : null,
|
|
@@ -5285,6 +5303,7 @@ function DaysViewBody({
|
|
|
5285
5303
|
gridRef,
|
|
5286
5304
|
nowRef,
|
|
5287
5305
|
testId,
|
|
5306
|
+
asChild: _asChild,
|
|
5288
5307
|
...rest
|
|
5289
5308
|
}) {
|
|
5290
5309
|
const locale = useLocale(localeProp);
|
|
@@ -5690,6 +5709,7 @@ function MonthView({
|
|
|
5690
5709
|
dayDisabled,
|
|
5691
5710
|
maxEventsPerDay = 3,
|
|
5692
5711
|
testId,
|
|
5712
|
+
asChild: _asChild,
|
|
5693
5713
|
...rest
|
|
5694
5714
|
}) {
|
|
5695
5715
|
const locale = useLocale(localeProp);
|
|
@@ -5873,6 +5893,7 @@ function YearView({
|
|
|
5873
5893
|
now,
|
|
5874
5894
|
dayDisabled,
|
|
5875
5895
|
testId,
|
|
5896
|
+
asChild: _asChild,
|
|
5876
5897
|
...rest
|
|
5877
5898
|
}) {
|
|
5878
5899
|
const locale = useLocale(localeProp);
|
|
@@ -6093,7 +6114,7 @@ var PROP_RENDERERS = {
|
|
|
6093
6114
|
onOverflowClick: ["days", "month"],
|
|
6094
6115
|
withOverflowDetails: ["days", "month"],
|
|
6095
6116
|
renderOverflowDetails: ["days", "month"],
|
|
6096
|
-
visibleDays: ["days"],
|
|
6117
|
+
visibleDays: ["days", "agenda"],
|
|
6097
6118
|
revealBehavior: ["days"],
|
|
6098
6119
|
editable: ["days"],
|
|
6099
6120
|
onEventChange: ["days"],
|
|
@@ -6114,7 +6135,10 @@ function ScheduleRoot(allProps) {
|
|
|
6114
6135
|
defaultSelected,
|
|
6115
6136
|
onSelect,
|
|
6116
6137
|
withSelection = true,
|
|
6117
|
-
|
|
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,
|
|
6118
6142
|
onDayClick,
|
|
6119
6143
|
renderEventDetails,
|
|
6120
6144
|
locale: localeProp,
|
|
@@ -6160,6 +6184,7 @@ function ScheduleRoot(allProps) {
|
|
|
6160
6184
|
onMonthClick,
|
|
6161
6185
|
renderEvent,
|
|
6162
6186
|
testId,
|
|
6187
|
+
asChild: _asChild,
|
|
6163
6188
|
...rest
|
|
6164
6189
|
} = allProps;
|
|
6165
6190
|
const locale = useLocale(localeProp);
|
|
@@ -6531,7 +6556,8 @@ function ScheduleRoot(allProps) {
|
|
|
6531
6556
|
onDateChange: setCurrentDate,
|
|
6532
6557
|
withPagination: false,
|
|
6533
6558
|
withNowButton: false,
|
|
6534
|
-
now
|
|
6559
|
+
now,
|
|
6560
|
+
visibleDays: activeVisibleDays
|
|
6535
6561
|
}
|
|
6536
6562
|
)).exhaustive() })
|
|
6537
6563
|
]
|
|
@@ -6553,6 +6579,7 @@ function ScheduleNextUp({
|
|
|
6553
6579
|
classNames,
|
|
6554
6580
|
className,
|
|
6555
6581
|
testId,
|
|
6582
|
+
asChild: _asChild,
|
|
6556
6583
|
...rest
|
|
6557
6584
|
}) {
|
|
6558
6585
|
const locale = useLocale(localeProp);
|