@42-central/ui-react 0.18.1 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-YXE4B6X3.js → chunk-2NNZHVKD.js} +3 -3
- package/dist/{chunk-YXE4B6X3.js.map → chunk-2NNZHVKD.js.map} +1 -1
- package/dist/{chunk-5JHDSVEZ.js → chunk-4NNGTNPV.js} +10 -8
- package/dist/chunk-4NNGTNPV.js.map +1 -0
- package/dist/{chunk-7NZSTCJO.js → chunk-57BTVRRB.js} +4 -9
- package/dist/chunk-57BTVRRB.js.map +1 -0
- package/dist/{chunk-S2HWWR2H.js → chunk-64T6Z7BA.js} +3 -3
- package/dist/{chunk-S2HWWR2H.js.map → chunk-64T6Z7BA.js.map} +1 -1
- package/dist/{chunk-MI2WZRK3.js → chunk-A6MYJTJI.js} +4 -4
- package/dist/{chunk-MI2WZRK3.js.map → chunk-A6MYJTJI.js.map} +1 -1
- package/dist/{chunk-RQL7FVCS.js → chunk-BTFBBNRW.js} +11 -6
- package/dist/chunk-BTFBBNRW.js.map +1 -0
- package/dist/{chunk-OWG4BCQR.js → chunk-CYWMES5P.js} +4 -4
- package/dist/{chunk-OWG4BCQR.js.map → chunk-CYWMES5P.js.map} +1 -1
- package/dist/{chunk-YBJB7FGE.js → chunk-CZEKZ5HR.js} +6 -6
- package/dist/chunk-CZEKZ5HR.js.map +1 -0
- package/dist/{chunk-HAQJQFE6.js → chunk-DBTJEBMO.js} +11 -4
- package/dist/{chunk-HAQJQFE6.js.map → chunk-DBTJEBMO.js.map} +1 -1
- package/dist/{chunk-AE7QTLJ5.js → chunk-FAOBC4IS.js} +4 -4
- package/dist/{chunk-AE7QTLJ5.js.map → chunk-FAOBC4IS.js.map} +1 -1
- package/dist/{chunk-NF5JM2YO.js → chunk-FOMR74VE.js} +3 -3
- package/dist/{chunk-NF5JM2YO.js.map → chunk-FOMR74VE.js.map} +1 -1
- package/dist/{chunk-FZIHZT5R.js → chunk-GCGX4FEF.js} +16 -10
- package/dist/chunk-GCGX4FEF.js.map +1 -0
- package/dist/{chunk-B2YJKRNQ.js → chunk-HCYULRWT.js} +13 -9
- package/dist/chunk-HCYULRWT.js.map +1 -0
- package/dist/{chunk-B2LCHXUB.js → chunk-INJUILCN.js} +9 -4
- package/dist/chunk-INJUILCN.js.map +1 -0
- package/dist/{chunk-ZDXQ64A7.js → chunk-K5UWVH6P.js} +5 -5
- package/dist/{chunk-ZDXQ64A7.js.map → chunk-K5UWVH6P.js.map} +1 -1
- package/dist/{chunk-6GDMSENK.js → chunk-LM6F6DLR.js} +3 -24
- package/dist/chunk-LM6F6DLR.js.map +1 -0
- package/dist/{chunk-KHMFNH3X.js → chunk-MQO42HZL.js} +7 -7
- package/dist/chunk-MQO42HZL.js.map +1 -0
- package/dist/chunk-OC7I2CTA.js +8 -0
- package/dist/chunk-OC7I2CTA.js.map +1 -0
- package/dist/{chunk-O23Y5ML4.js → chunk-OGJFDNIS.js} +249 -231
- package/dist/chunk-OGJFDNIS.js.map +1 -0
- package/dist/{chunk-6OLTJYSX.js → chunk-PINENGML.js} +12 -5
- package/dist/chunk-PINENGML.js.map +1 -0
- package/dist/{chunk-NSDM3FEB.js → chunk-PS2PZFXH.js} +5 -3
- package/dist/chunk-PS2PZFXH.js.map +1 -0
- package/dist/{chunk-RAUOFTUH.js → chunk-QIDAXFKK.js} +4 -4
- package/dist/{chunk-RAUOFTUH.js.map → chunk-QIDAXFKK.js.map} +1 -1
- package/dist/{chunk-S7N4LGLZ.js → chunk-RIP5G47F.js} +4 -4
- package/dist/{chunk-S7N4LGLZ.js.map → chunk-RIP5G47F.js.map} +1 -1
- package/dist/{chunk-Z2Z5EXVT.js → chunk-RKYXG6X7.js} +3 -3
- package/dist/{chunk-Z2Z5EXVT.js.map → chunk-RKYXG6X7.js.map} +1 -1
- package/dist/{chunk-WQN64ZHG.js → chunk-SVKU3GUN.js} +10 -6
- package/dist/chunk-SVKU3GUN.js.map +1 -0
- package/dist/{chunk-FHG54IT5.js → chunk-TBTSEPGP.js} +13 -4
- package/dist/chunk-TBTSEPGP.js.map +1 -0
- package/dist/{chunk-HT5JAHR3.js → chunk-UJZIF2BA.js} +20 -9
- package/dist/chunk-UJZIF2BA.js.map +1 -0
- package/dist/{chunk-UHNRAI6V.js → chunk-VZBUQNLX.js} +68 -29
- package/dist/chunk-VZBUQNLX.js.map +1 -0
- package/dist/{chunk-JITF6I7N.js → chunk-WJOHNCYY.js} +11 -4
- package/dist/{chunk-JITF6I7N.js.map → chunk-WJOHNCYY.js.map} +1 -1
- package/dist/{chunk-EBREIC3L.js → chunk-YQHOKMSV.js} +26 -8
- package/dist/chunk-YQHOKMSV.js.map +1 -0
- package/dist/{chunk-WHKKN3ZK.js → chunk-YW6Q6ERX.js} +10 -8
- package/dist/chunk-YW6Q6ERX.js.map +1 -0
- package/dist/{chunk-PH354ECN.js → chunk-Z43YWH4R.js} +13 -4
- package/dist/chunk-Z43YWH4R.js.map +1 -0
- package/dist/{chunk-5OQLFX47.js → chunk-Z6RPMRFH.js} +3 -3
- package/dist/{chunk-5OQLFX47.js.map → chunk-Z6RPMRFH.js.map} +1 -1
- package/dist/{chunk-TCWYBVIL.js → chunk-ZB5VMGKB.js} +10 -7
- package/dist/chunk-ZB5VMGKB.js.map +1 -0
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/action-icon/index.js +3 -3
- package/dist/components/alert/index.js +3 -3
- package/dist/components/app-shell/index.js +4 -4
- package/dist/components/autocomplete/autocomplete.d.ts +8 -1
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/index.d.ts +1 -1
- package/dist/components/autocomplete/index.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +10 -7
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/button/index.js +3 -3
- package/dist/components/button-multi-select/index.js +5 -5
- package/dist/components/button-select/index.js +5 -5
- package/dist/components/calendar/calendar-zone-sync.d.ts +41 -0
- package/dist/components/calendar/calendar-zone-sync.d.ts.map +1 -0
- package/dist/components/calendar/calendar.d.ts +6 -5
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/index.js +8 -5
- package/dist/components/chart/chart.d.ts +17 -10
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/chart/index.js +50 -7
- package/dist/components/chart/index.js.map +1 -1
- package/dist/components/chart/styles.css +100 -0
- package/dist/components/checkbox/index.js +4 -4
- package/dist/components/choice-card-group/index.d.ts.map +1 -1
- package/dist/components/choice-card-group/index.js +4 -3
- package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
- package/dist/components/circular-progress/index.js.map +1 -1
- package/dist/components/clipboard/clipboard.d.ts.map +1 -1
- package/dist/components/clipboard/copy.d.ts.map +1 -1
- package/dist/components/clipboard/index.js +5 -5
- package/dist/components/clipboard/index.js.map +1 -1
- package/dist/components/code-block/chrome.js +4 -4
- package/dist/components/code-block/index.js +5 -5
- package/dist/components/combobox/combobox.d.ts +20 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/index.d.ts +1 -1
- package/dist/components/combobox/index.d.ts.map +1 -1
- package/dist/components/combobox/index.js +4 -4
- package/dist/components/combobox-list/combobox-list.d.ts +8 -1
- package/dist/components/combobox-list/combobox-list.d.ts.map +1 -1
- package/dist/components/combobox-list/index.d.ts +1 -1
- package/dist/components/combobox-list/index.d.ts.map +1 -1
- package/dist/components/combobox-list/index.js +5 -5
- package/dist/components/data-table/data-table-filter/data-table-date-filter.d.ts.map +1 -1
- package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts +4 -1
- package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts.map +1 -1
- package/dist/components/data-table/data-table-filter/data-table-select-filter.d.ts +4 -1
- package/dist/components/data-table/data-table-filter/data-table-select-filter.d.ts.map +1 -1
- package/dist/components/data-table/data-table-filter/index.d.ts +5 -1
- package/dist/components/data-table/data-table-filter/index.d.ts.map +1 -1
- package/dist/components/data-table/data-table-header-cell.d.ts +11 -15
- package/dist/components/data-table/data-table-header-cell.d.ts.map +1 -1
- package/dist/components/data-table/data-table-meta.d.ts +2 -2
- package/dist/components/data-table/data-table-meta.d.ts.map +1 -1
- package/dist/components/data-table/data-table-pagination.d.ts +3 -0
- package/dist/components/data-table/data-table-pagination.d.ts.map +1 -1
- package/dist/components/data-table/data-table-stack.d.ts +6 -3
- package/dist/components/data-table/data-table-stack.d.ts.map +1 -1
- package/dist/components/data-table/data-table-toolbar.d.ts +3 -1
- package/dist/components/data-table/data-table-toolbar.d.ts.map +1 -1
- package/dist/components/data-table/data-table-translations.d.ts +68 -0
- package/dist/components/data-table/data-table-translations.d.ts.map +1 -0
- package/dist/components/data-table/data-table.d.ts +5 -8
- package/dist/components/data-table/data-table.d.ts.map +1 -1
- package/dist/components/data-table/index.d.ts +2 -1
- package/dist/components/data-table/index.d.ts.map +1 -1
- package/dist/components/data-table/index.js +206 -84
- package/dist/components/data-table/index.js.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +13 -9
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/index.js +16 -15
- package/dist/components/date-picker/index.js.map +1 -1
- package/dist/components/drawer/drawer.d.ts +9 -1
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.d.ts.map +1 -1
- package/dist/components/drawer/index.js +4 -4
- package/dist/components/field/field.d.ts +9 -2
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/index.js +1 -1
- package/dist/components/file-upload/file-upload.d.ts +13 -2
- package/dist/components/file-upload/file-upload.d.ts.map +1 -1
- package/dist/components/file-upload/index.d.ts +1 -1
- package/dist/components/file-upload/index.d.ts.map +1 -1
- package/dist/components/file-upload/index.js +16 -7
- 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/kbd/index.js +30 -15
- package/dist/components/kbd/index.js.map +1 -1
- package/dist/components/kbd/kbd.d.ts.map +1 -1
- package/dist/components/menu/index.js +2 -2
- package/dist/components/modal/index.d.ts +1 -1
- package/dist/components/modal/index.d.ts.map +1 -1
- package/dist/components/modal/index.js +4 -4
- package/dist/components/modal/modal.d.ts +9 -1
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/multi-combobox-list/index.d.ts +1 -1
- package/dist/components/multi-combobox-list/index.d.ts.map +1 -1
- package/dist/components/multi-combobox-list/index.js +7 -5
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +8 -1
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -1
- package/dist/components/multi-select/index.d.ts +1 -1
- package/dist/components/multi-select/index.d.ts.map +1 -1
- package/dist/components/multi-select/index.js +20 -9
- package/dist/components/multi-select/index.js.map +1 -1
- package/dist/components/multi-select/multi-select.d.ts +11 -1
- package/dist/components/multi-select/multi-select.d.ts.map +1 -1
- package/dist/components/nav-link/index.d.ts +1 -1
- package/dist/components/nav-link/index.d.ts.map +1 -1
- package/dist/components/nav-link/index.js +2 -2
- package/dist/components/nav-link/nav-link.d.ts +12 -0
- package/dist/components/nav-link/nav-link.d.ts.map +1 -1
- package/dist/components/nav-link/navigation.d.ts +3 -1
- package/dist/components/nav-link/navigation.d.ts.map +1 -1
- package/dist/components/nav-link/tanstack.js +2 -2
- package/dist/components/notification/create-notifier.d.ts +12 -1
- package/dist/components/notification/create-notifier.d.ts.map +1 -1
- package/dist/components/notification/index.d.ts +2 -2
- package/dist/components/notification/index.d.ts.map +1 -1
- package/dist/components/notification/index.js +9 -6
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/notification/notification.d.ts +14 -1
- package/dist/components/notification/notification.d.ts.map +1 -1
- package/dist/components/number-input/index.d.ts +1 -1
- package/dist/components/number-input/index.d.ts.map +1 -1
- package/dist/components/number-input/index.js +4 -4
- package/dist/components/number-input/number-input.d.ts +20 -2
- package/dist/components/number-input/number-input.d.ts.map +1 -1
- package/dist/components/overlays/index.js +6 -6
- package/dist/components/password-input/index.d.ts +1 -1
- package/dist/components/password-input/index.d.ts.map +1 -1
- package/dist/components/password-input/index.js +68 -7
- package/dist/components/password-input/index.js.map +1 -1
- package/dist/components/password-input/password-input.d.ts +45 -6
- package/dist/components/password-input/password-input.d.ts.map +1 -1
- package/dist/components/pill/index.js +2 -2
- package/dist/components/pills-input/index.js +5 -5
- package/dist/components/pin-input/index.js +2 -2
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover.d.ts +0 -10
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/progress/index.js.map +1 -1
- package/dist/components/progress/progress.d.ts.map +1 -1
- package/dist/components/radio-group/index.js +3 -3
- package/dist/components/rating/index.js +2 -2
- package/dist/components/rating/index.js.map +1 -1
- package/dist/components/rating/rating.d.ts.map +1 -1
- package/dist/components/schedule/index.js +62 -49
- package/dist/components/schedule/index.js.map +1 -1
- package/dist/components/schedule/now-cursor-line.d.ts +10 -5
- package/dist/components/schedule/now-cursor-line.d.ts.map +1 -1
- package/dist/components/schedule/schedule-dates.d.ts +11 -26
- package/dist/components/schedule/schedule-dates.d.ts.map +1 -1
- package/dist/components/schedule/schedule-event-chip.d.ts +4 -1
- package/dist/components/schedule/schedule-event-chip.d.ts.map +1 -1
- package/dist/components/schedule/schedule-event-details.d.ts +3 -2
- package/dist/components/schedule/schedule-event-details.d.ts.map +1 -1
- package/dist/components/schedule/schedule-geometry.d.ts +20 -21
- package/dist/components/schedule/schedule-geometry.d.ts.map +1 -1
- package/dist/components/schedule/schedule-grid-gesture.d.ts +5 -9
- package/dist/components/schedule/schedule-grid-gesture.d.ts.map +1 -1
- package/dist/components/schedule/schedule-segments.d.ts +2 -3
- package/dist/components/schedule/schedule-segments.d.ts.map +1 -1
- package/dist/components/schedule/schedule-timed-grid.d.ts.map +1 -1
- package/dist/components/schedule/use-event-resize.d.ts.map +1 -1
- package/dist/components/segment-group/index.js +4 -3
- package/dist/components/segment-group/segment-group.d.ts +3 -2
- package/dist/components/segment-group/segment-group.d.ts.map +1 -1
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/index.d.ts.map +1 -1
- package/dist/components/select/index.js +6 -4
- package/dist/components/select/select.d.ts +12 -2
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/slider/index.js +2 -2
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/switch/index.js +3 -3
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/switch.d.ts +2 -0
- package/dist/components/switch/switch.d.ts.map +1 -1
- package/dist/components/table/index.js +1 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/tabs/index.js +4 -3
- package/dist/components/tabs/tabs.d.ts +3 -1
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tags-input/index.d.ts +1 -1
- package/dist/components/tags-input/index.d.ts.map +1 -1
- package/dist/components/tags-input/index.js +9 -7
- package/dist/components/tags-input/index.js.map +1 -1
- package/dist/components/tags-input/tags-input.d.ts +9 -2
- package/dist/components/tags-input/tags-input.d.ts.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 +2 -2
- package/dist/components/theme-icon/theme-icon.d.ts.map +1 -1
- package/dist/components/time-input/index.js +24 -8
- package/dist/components/time-input/index.js.map +1 -1
- package/dist/components/time-input/time-input.d.ts.map +1 -1
- package/dist/components/time-input/time-row.d.ts +16 -3
- package/dist/components/time-input/time-row.d.ts.map +1 -1
- package/dist/components/timeline/index.js +6 -3
- package/dist/components/timeline/index.js.map +1 -1
- package/dist/components/timeline/timeline.d.ts.map +1 -1
- package/dist/components/tooltip/index.js +2 -2
- package/dist/components/tree-multi-select/index.d.ts +1 -1
- package/dist/components/tree-multi-select/index.d.ts.map +1 -1
- package/dist/components/tree-multi-select/index.js +62 -44
- package/dist/components/tree-multi-select/index.js.map +1 -1
- package/dist/components/tree-multi-select/tree-multi-select.d.ts +10 -1
- package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
- package/dist/components/tree-select/index.d.ts +1 -1
- package/dist/components/tree-select/index.d.ts.map +1 -1
- package/dist/components/tree-select/index.js +45 -15
- package/dist/components/tree-select/index.js.map +1 -1
- package/dist/components/tree-select/tree-select.d.ts +10 -1
- package/dist/components/tree-select/tree-select.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/date-value.d.ts +14 -1
- package/dist/lib/date-value.d.ts.map +1 -1
- package/dist/lib/focus-styles.d.ts +13 -5
- package/dist/lib/focus-styles.d.ts.map +1 -1
- package/dist/theme.css +1 -2
- package/package.json +1 -1
- package/src/components/autocomplete/autocomplete.test.tsx +32 -0
- package/src/components/autocomplete/autocomplete.tsx +17 -5
- package/src/components/autocomplete/index.ts +5 -1
- package/src/components/button/button.test.tsx +6 -0
- package/src/components/calendar/calendar-zone-sync.tsx +79 -0
- package/src/components/calendar/calendar.test.tsx +134 -14
- package/src/components/calendar/calendar.tsx +36 -22
- package/src/components/chart/chart.test.tsx +115 -8
- package/src/components/chart/chart.tsx +115 -25
- package/src/components/chart/styles.css +100 -0
- package/src/components/choice-card-group/index.ts +2 -0
- package/src/components/circular-progress/circular-progress.tsx +2 -0
- package/src/components/clipboard/clipboard.test.tsx +54 -22
- package/src/components/clipboard/clipboard.tsx +2 -0
- package/src/components/clipboard/copy.tsx +2 -0
- package/src/components/clipboard/index.ts +3 -3
- package/src/components/combobox/combobox.test.tsx +22 -0
- package/src/components/combobox/combobox.tsx +20 -0
- package/src/components/combobox/index.ts +1 -0
- package/src/components/combobox-list/combobox-list.test.tsx +19 -0
- package/src/components/combobox-list/combobox-list.tsx +16 -2
- package/src/components/combobox-list/index.ts +5 -1
- package/src/components/data-table/data-table-filter/data-table-date-filter.tsx +5 -4
- package/src/components/data-table/data-table-filter/data-table-number-filter.tsx +16 -2
- package/src/components/data-table/data-table-filter/data-table-select-filter.tsx +9 -1
- package/src/components/data-table/data-table-filter/index.tsx +15 -1
- package/src/components/data-table/data-table-filter.test.tsx +33 -0
- package/src/components/data-table/data-table-header-cell.tsx +37 -22
- package/src/components/data-table/data-table-meta.ts +2 -2
- package/src/components/data-table/data-table-pagination.tsx +6 -0
- package/src/components/data-table/data-table-stack.tsx +31 -17
- package/src/components/data-table/data-table-toolbar.tsx +4 -1
- package/src/components/data-table/data-table-translations.ts +105 -0
- package/src/components/data-table/data-table.test.tsx +212 -0
- package/src/components/data-table/data-table.tsx +92 -23
- package/src/components/data-table/index.ts +9 -1
- package/src/components/date-picker/date-picker.test.tsx +197 -5
- package/src/components/date-picker/date-picker.tsx +42 -16
- package/src/components/drawer/drawer.tsx +14 -1
- package/src/components/drawer/index.ts +1 -0
- package/src/components/field/field.tsx +29 -3
- package/src/components/file-upload/file-upload.test.tsx +21 -0
- package/src/components/file-upload/file-upload.tsx +26 -3
- package/src/components/file-upload/index.ts +1 -1
- package/src/components/kbd/kbd.test.tsx +31 -0
- package/src/components/kbd/kbd.tsx +29 -14
- package/src/components/modal/index.ts +1 -0
- package/src/components/modal/modal-translations.test.tsx +27 -0
- package/src/components/modal/modal.tsx +14 -1
- package/src/components/multi-combobox-list/index.ts +5 -1
- package/src/components/multi-combobox-list/multi-combobox-list.test.tsx +19 -0
- package/src/components/multi-combobox-list/multi-combobox-list.tsx +26 -4
- package/src/components/multi-select/index.ts +1 -1
- package/src/components/multi-select/multi-select.test.tsx +38 -0
- package/src/components/multi-select/multi-select.tsx +28 -4
- package/src/components/nav-link/index.ts +6 -1
- package/src/components/nav-link/nav-link.test.tsx +16 -0
- package/src/components/nav-link/nav-link.tsx +19 -1
- package/src/components/nav-link/navigation.test.tsx +18 -0
- package/src/components/nav-link/navigation.tsx +8 -4
- package/src/components/notification/create-notifier.tsx +20 -4
- package/src/components/notification/index.ts +7 -1
- package/src/components/notification/notification.test.tsx +49 -0
- package/src/components/notification/notification.tsx +39 -5
- package/src/components/number-input/index.ts +1 -1
- package/src/components/number-input/number-input.test.tsx +37 -0
- package/src/components/number-input/number-input.tsx +33 -4
- package/src/components/password-input/index.ts +5 -1
- package/src/components/password-input/password-input.test.tsx +201 -4
- package/src/components/password-input/password-input.tsx +162 -13
- package/src/components/popover/popover.tsx +0 -29
- package/src/components/progress/index.ts +3 -3
- package/src/components/progress/progress.tsx +2 -0
- package/src/components/rating/rating.tsx +2 -0
- package/src/components/schedule/now-cursor-line.test.tsx +74 -27
- package/src/components/schedule/now-cursor-line.tsx +40 -17
- package/src/components/schedule/schedule-agenda-view.test.tsx +1 -1
- package/src/components/schedule/schedule-dates.test.ts +19 -0
- package/src/components/schedule/schedule-dates.ts +16 -30
- package/src/components/schedule/schedule-details-popover.test.tsx +77 -6
- package/src/components/schedule/schedule-event-chip.tsx +17 -6
- package/src/components/schedule/schedule-event-details.test.tsx +38 -0
- package/src/components/schedule/schedule-event-details.tsx +7 -5
- package/src/components/schedule/schedule-geometry.test.ts +21 -18
- package/src/components/schedule/schedule-geometry.ts +37 -24
- package/src/components/schedule/schedule-grid-gesture.ts +5 -9
- package/src/components/schedule/schedule-segments.ts +2 -3
- package/src/components/schedule/schedule-timed-grid.tsx +43 -20
- package/src/components/schedule/schedule.test.tsx +34 -11
- package/src/components/schedule/use-event-resize.ts +6 -13
- package/src/components/segment-group/segment-group.test.tsx +23 -0
- package/src/components/segment-group/segment-group.tsx +13 -7
- package/src/components/select/index.ts +1 -1
- package/src/components/select/select.test.tsx +32 -0
- package/src/components/select/select.tsx +15 -1
- package/src/components/spinner/spinner.test.tsx +26 -0
- package/src/components/spinner/spinner.tsx +4 -1
- package/src/components/switch/switch.test.tsx +12 -0
- package/src/components/switch/switch.tsx +3 -1
- package/src/components/table/table.test.tsx +13 -0
- package/src/components/table/table.tsx +9 -5
- package/src/components/tabs/tabs.test.tsx +11 -0
- package/src/components/tabs/tabs.tsx +6 -4
- package/src/components/tags-input/index.ts +1 -1
- package/src/components/tags-input/tags-input.test.tsx +28 -0
- package/src/components/tags-input/tags-input.tsx +17 -1
- package/src/components/theme-icon/theme-icon.tsx +8 -3
- package/src/components/time-input/time-input.test.tsx +75 -0
- package/src/components/time-input/time-input.tsx +27 -3
- package/src/components/time-input/time-row.tsx +27 -3
- package/src/components/timeline/timeline.tsx +6 -3
- package/src/components/tree-multi-select/index.ts +5 -1
- package/src/components/tree-multi-select/tree-multi-select.test.tsx +72 -0
- package/src/components/tree-multi-select/tree-multi-select.tsx +156 -115
- package/src/components/tree-select/index.ts +1 -1
- package/src/components/tree-select/tree-select.test.tsx +69 -0
- package/src/components/tree-select/tree-select.tsx +128 -74
- package/src/lib/date-value.test.ts +19 -0
- package/src/lib/date-value.ts +21 -5
- package/src/lib/focus-styles.test.ts +21 -2
- package/src/lib/focus-styles.ts +24 -5
- package/src/theme.css +1 -2
- package/src/use-client-barrels.test.ts +80 -0
- package/dist/chunk-5JHDSVEZ.js.map +0 -1
- package/dist/chunk-6GDMSENK.js.map +0 -1
- package/dist/chunk-6OLTJYSX.js.map +0 -1
- package/dist/chunk-7NZSTCJO.js.map +0 -1
- package/dist/chunk-B2LCHXUB.js.map +0 -1
- package/dist/chunk-B2YJKRNQ.js.map +0 -1
- package/dist/chunk-EBREIC3L.js.map +0 -1
- package/dist/chunk-FHG54IT5.js.map +0 -1
- package/dist/chunk-FZIHZT5R.js.map +0 -1
- package/dist/chunk-HT5JAHR3.js.map +0 -1
- package/dist/chunk-KHMFNH3X.js.map +0 -1
- package/dist/chunk-NSDM3FEB.js.map +0 -1
- package/dist/chunk-O23Y5ML4.js.map +0 -1
- package/dist/chunk-PH354ECN.js.map +0 -1
- package/dist/chunk-RQL7FVCS.js.map +0 -1
- package/dist/chunk-TCWYBVIL.js.map +0 -1
- package/dist/chunk-UHNRAI6V.js.map +0 -1
- package/dist/chunk-WHKKN3ZK.js.map +0 -1
- package/dist/chunk-WQN64ZHG.js.map +0 -1
- package/dist/chunk-YBJB7FGE.js.map +0 -1
|
@@ -5,7 +5,7 @@ import { ChevronDownIcon, ChevronUpIcon } from "lucide-react"
|
|
|
5
5
|
import type { Ref } from "react"
|
|
6
6
|
import { cn } from "../../lib/cn"
|
|
7
7
|
import { useNow } from "../../lib/use-now"
|
|
8
|
-
import {
|
|
8
|
+
import { timeLabel } from "./schedule-dates"
|
|
9
9
|
import { isNowInBand, minutesFromMidnight, nowIndicatorTop } from "./schedule-geometry"
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -56,6 +56,7 @@ export function NowCursorLine({
|
|
|
56
56
|
nowRef,
|
|
57
57
|
startHour,
|
|
58
58
|
endHour,
|
|
59
|
+
timeZone,
|
|
59
60
|
variant = "marker",
|
|
60
61
|
hideDot = false,
|
|
61
62
|
className,
|
|
@@ -77,6 +78,9 @@ export function NowCursorLine({
|
|
|
77
78
|
* line pinned to the column's own top/bottom edge, which would keep
|
|
78
79
|
* asserting "now is here" while pointing at an hour it isn't. */
|
|
79
80
|
endHour: number
|
|
81
|
+
/** The schedule's resolved zone — the one the grid's rows are cut in, so
|
|
82
|
+
* the line sits on the same axis as the chips. */
|
|
83
|
+
timeZone: string
|
|
80
84
|
variant?: "marker" | "guide"
|
|
81
85
|
/** `marker` only — set when this is the leftmost visible day column, so
|
|
82
86
|
* the dot (which spills half its width toward the gutter) would
|
|
@@ -96,8 +100,8 @@ export function NowCursorLine({
|
|
|
96
100
|
// sits open. Deciding it one level up, where `withNowIndicator`/`isToday`
|
|
97
101
|
// are resolved, would leave a stale line on screen until something
|
|
98
102
|
// unrelated happened to re-render the grid.
|
|
99
|
-
if (!isNowInBand(current, startHour, endHour)) return null
|
|
100
|
-
const top = nowIndicatorTop(current, startHour, endHour)
|
|
103
|
+
if (!isNowInBand(current, startHour, endHour, timeZone)) return null
|
|
104
|
+
const top = nowIndicatorTop(current, startHour, endHour, timeZone)
|
|
101
105
|
|
|
102
106
|
return (
|
|
103
107
|
<div
|
|
@@ -119,6 +123,9 @@ export function NowCursorLine({
|
|
|
119
123
|
)
|
|
120
124
|
}
|
|
121
125
|
|
|
126
|
+
/** Half of `NowCursorLabel`'s own height: `leading-none` (1em) plus `py-0.5`. */
|
|
127
|
+
const HALF_LABEL = "calc((1em + 0.25rem) / 2)"
|
|
128
|
+
|
|
122
129
|
/**
|
|
123
130
|
* The now-cursor's presence in the hour gutter — a leaf on its own, same
|
|
124
131
|
* isolation reasoning as `NowCursorLine` above (a per-minute tick only
|
|
@@ -148,6 +155,7 @@ export function NowCursorLabel({
|
|
|
148
155
|
now,
|
|
149
156
|
startHour,
|
|
150
157
|
endHour,
|
|
158
|
+
timeZone,
|
|
151
159
|
locale,
|
|
152
160
|
className,
|
|
153
161
|
}: {
|
|
@@ -155,8 +163,8 @@ export function NowCursorLabel({
|
|
|
155
163
|
now?: Date
|
|
156
164
|
startHour: number
|
|
157
165
|
endHour: number
|
|
158
|
-
/**
|
|
159
|
-
|
|
166
|
+
/** As `NowCursorLine`'s: the label reads the same clock the line is placed by. */
|
|
167
|
+
timeZone: string
|
|
160
168
|
locale?: string
|
|
161
169
|
className?: string
|
|
162
170
|
}) {
|
|
@@ -164,11 +172,11 @@ export function NowCursorLabel({
|
|
|
164
172
|
// Same window gate, same live reading, same reason as `NowCursorLine`
|
|
165
173
|
// above — the label and the line have to appear and disappear together,
|
|
166
174
|
// and sharing one predicate over one clock is what guarantees they do.
|
|
167
|
-
if (!isNowInBand(current, startHour, endHour)) {
|
|
168
|
-
// Which edge `now` lies past. `minutesFromMidnight` is the same
|
|
169
|
-
//
|
|
170
|
-
// never disagree with the gate that produced it.
|
|
171
|
-
const before = minutesFromMidnight(current) < startHour * 60
|
|
175
|
+
if (!isNowInBand(current, startHour, endHour, timeZone)) {
|
|
176
|
+
// Which edge `now` lies past. `minutesFromMidnight` is the same reading,
|
|
177
|
+
// in the same zone, `isNowInBand` and `nowIndicatorTop` use, so the
|
|
178
|
+
// direction can never disagree with the gate that produced it.
|
|
179
|
+
const before = minutesFromMidnight(current, timeZone) < startHour * 60
|
|
172
180
|
const Chevron = before ? ChevronUpIcon : ChevronDownIcon
|
|
173
181
|
return (
|
|
174
182
|
<Chevron
|
|
@@ -212,7 +220,7 @@ export function NowCursorLabel({
|
|
|
212
220
|
/>
|
|
213
221
|
)
|
|
214
222
|
}
|
|
215
|
-
const top = nowIndicatorTop(current, startHour, endHour)
|
|
223
|
+
const top = nowIndicatorTop(current, startHour, endHour, timeZone)
|
|
216
224
|
|
|
217
225
|
return (
|
|
218
226
|
<span
|
|
@@ -231,9 +239,15 @@ export function NowCursorLabel({
|
|
|
231
239
|
"[--sch-now-line-color:var(--color-red-500)]",
|
|
232
240
|
className,
|
|
233
241
|
)}
|
|
234
|
-
|
|
242
|
+
// Centered on the line, but never past the band's own edges: near the
|
|
243
|
+
// top or bottom it stops half its height inside, so it can't stick
|
|
244
|
+
// out of the grid (which made the whole view scroll by a few px for
|
|
245
|
+
// the minutes around `startHour`/`endHour`). Only the label nudges;
|
|
246
|
+
// the line stays exact. Half its height is derived from its own box:
|
|
247
|
+
// a 1em line (`leading-none`) plus `py-0.5` (0.125rem top and bottom).
|
|
248
|
+
style={{ top: `clamp(${HALF_LABEL}, ${top}%, calc(100% - ${HALF_LABEL}))` }}
|
|
235
249
|
>
|
|
236
|
-
{
|
|
250
|
+
{timeLabel(current, timeZone, locale)}
|
|
237
251
|
</span>
|
|
238
252
|
)
|
|
239
253
|
}
|
|
@@ -264,6 +278,7 @@ export function HourGutterTick({
|
|
|
264
278
|
now,
|
|
265
279
|
startHour,
|
|
266
280
|
endHour,
|
|
281
|
+
timeZone,
|
|
267
282
|
hideWhenCurrent,
|
|
268
283
|
className,
|
|
269
284
|
}: {
|
|
@@ -274,6 +289,8 @@ export function HourGutterTick({
|
|
|
274
289
|
/** The rendered window, `endHour` exclusive — see the note above. */
|
|
275
290
|
startHour: number
|
|
276
291
|
endHour: number
|
|
292
|
+
/** The zone `NowCursorLabel` reads, so this row hides under it exactly. */
|
|
293
|
+
timeZone: string
|
|
277
294
|
className?: string
|
|
278
295
|
hideWhenCurrent: boolean
|
|
279
296
|
}) {
|
|
@@ -284,6 +301,7 @@ export function HourGutterTick({
|
|
|
284
301
|
now={now}
|
|
285
302
|
startHour={startHour}
|
|
286
303
|
endHour={endHour}
|
|
304
|
+
timeZone={timeZone}
|
|
287
305
|
className={className}
|
|
288
306
|
/>
|
|
289
307
|
) : (
|
|
@@ -297,6 +315,7 @@ function HourGutterTickLive({
|
|
|
297
315
|
now,
|
|
298
316
|
startHour,
|
|
299
317
|
endHour,
|
|
318
|
+
timeZone,
|
|
300
319
|
className,
|
|
301
320
|
}: {
|
|
302
321
|
hour: number
|
|
@@ -304,6 +323,7 @@ function HourGutterTickLive({
|
|
|
304
323
|
now?: Date
|
|
305
324
|
startHour: number
|
|
306
325
|
endHour: number
|
|
326
|
+
timeZone: string
|
|
307
327
|
className?: string
|
|
308
328
|
}) {
|
|
309
329
|
const current = useNow(now)
|
|
@@ -316,7 +336,7 @@ function HourGutterTickLive({
|
|
|
316
336
|
return (
|
|
317
337
|
<div
|
|
318
338
|
className={cn(className, "opacity-100 transition-opacity", {
|
|
319
|
-
"opacity-0": hideOverlapHour({ hour, current, startHour, endHour }),
|
|
339
|
+
"opacity-0": hideOverlapHour({ hour, current, startHour, endHour, timeZone }),
|
|
320
340
|
})}
|
|
321
341
|
>
|
|
322
342
|
{label}
|
|
@@ -329,15 +349,18 @@ function hideOverlapHour({
|
|
|
329
349
|
current,
|
|
330
350
|
startHour,
|
|
331
351
|
endHour,
|
|
352
|
+
timeZone,
|
|
332
353
|
}: {
|
|
333
354
|
hour: number
|
|
334
355
|
current: Date
|
|
335
356
|
startHour: number
|
|
336
357
|
endHour: number
|
|
358
|
+
timeZone: string
|
|
337
359
|
}) {
|
|
338
360
|
// Nothing to declutter for once the label itself isn't on screen.
|
|
339
|
-
if (!isNowInBand(current, startHour, endHour)) return false
|
|
340
|
-
const
|
|
341
|
-
const
|
|
361
|
+
if (!isNowInBand(current, startHour, endHour, timeZone)) return false
|
|
362
|
+
const elapsed = minutesFromMidnight(current, timeZone)
|
|
363
|
+
const hours = Math.floor(elapsed / 60)
|
|
364
|
+
const minutes = Math.floor(elapsed % 60)
|
|
342
365
|
return (hours === hour && minutes <= 30) || (hours + 1 === hour && minutes > 50)
|
|
343
366
|
}
|
|
@@ -174,7 +174,7 @@ describe("AgendaView — selection", () => {
|
|
|
174
174
|
// The time is in a sibling column and a same-start stack prints it once,
|
|
175
175
|
// so the name has to carry it — resolved in the view's own `timeZone`,
|
|
176
176
|
// not the host's, or it would contradict the label printed beside it.
|
|
177
|
-
expect(controls()[0]?.getAttribute("aria-label")).toBe("standup, 09:00
|
|
177
|
+
expect(controls()[0]?.getAttribute("aria-label")).toBe("standup, 09:00–10:00")
|
|
178
178
|
})
|
|
179
179
|
|
|
180
180
|
it("reports the whole event on click", () => {
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
resolveNextUpDayLabel,
|
|
19
19
|
resolveOverlapCandidates,
|
|
20
20
|
timeLabel,
|
|
21
|
+
timeRangeLabel,
|
|
21
22
|
} from "./schedule-dates"
|
|
22
23
|
import type { ScheduleEvent, ScheduleStaticEvent } from "./schedule-types"
|
|
23
24
|
|
|
@@ -754,3 +755,21 @@ describe("isEventInVisibleRange — agenda", () => {
|
|
|
754
755
|
expect(inAgenda(at(8, 12), at(8, 16))).toBe(true)
|
|
755
756
|
})
|
|
756
757
|
})
|
|
758
|
+
|
|
759
|
+
describe("timeRangeLabel", () => {
|
|
760
|
+
const at = (h: number, m = 0) => new Date(Date.UTC(2026, 6, 15, h, m))
|
|
761
|
+
|
|
762
|
+
it("lets the locale shape the range instead of a hand-built ' – ' join", () => {
|
|
763
|
+
expect(timeRangeLabel(at(9), at(10, 30), "en-GB", "UTC")).toBe("09:00–10:30")
|
|
764
|
+
// en-US shares the day period across both ends.
|
|
765
|
+
expect(timeRangeLabel(at(9), at(10, 30), "en-US", "UTC")).toBe("9:00 – 10:30 AM")
|
|
766
|
+
})
|
|
767
|
+
|
|
768
|
+
it("resolves both ends in the given zone", () => {
|
|
769
|
+
expect(timeRangeLabel(at(9), at(10), "en-GB", "Europe/Paris")).toBe("11:00–12:00")
|
|
770
|
+
})
|
|
771
|
+
|
|
772
|
+
it("normalizes ICU's narrow and thin spaces to plain ones (SSR hydration)", () => {
|
|
773
|
+
expect(timeRangeLabel(at(9), at(13), "en-US", "UTC")).not.toMatch(/[ ]/)
|
|
774
|
+
})
|
|
775
|
+
})
|
|
@@ -488,45 +488,31 @@ export function isToday(day: Date, now: Date, timeZone: string): boolean {
|
|
|
488
488
|
export function timeRangeLabel(
|
|
489
489
|
start: Date,
|
|
490
490
|
end: Date,
|
|
491
|
-
locale
|
|
491
|
+
locale: string | undefined,
|
|
492
492
|
/**
|
|
493
|
-
*
|
|
493
|
+
* Required: every surface that prints an event's time — the timed grid's
|
|
494
|
+
* chips and their accessible names, the agenda rows, the details popover,
|
|
495
|
+
* the create announcement — reads the schedule's own resolved zone. A bare
|
|
496
|
+
* `Intl.DateTimeFormat` with no `timeZone` silently falls back to the host's
|
|
497
|
+
* zone, which used to put a 09:00 New York event on the grid's 09 row while
|
|
498
|
+
* its chip and popover printed "03:00 PM" on a Paris host.
|
|
494
499
|
*
|
|
495
|
-
* The timed grid
|
|
496
|
-
*
|
|
497
|
-
*
|
|
498
|
-
* sits on. The agenda has no such axis — its visible time comes from
|
|
499
|
-
* `timeLabel`, which does take a zone — so a row's accessible name has to
|
|
500
|
-
* pass one here or it would announce a different clock reading than the one
|
|
501
|
-
* printed next to it.
|
|
500
|
+
* The timed grid is not an exception: its rows are cut by `dayBoundary` in
|
|
501
|
+
* the schedule's zone (`schedule-segments.ts`), and its gutter only prints
|
|
502
|
+
* hour *numbers*, so the axis already reads that zone.
|
|
502
503
|
*/
|
|
503
|
-
timeZone
|
|
504
|
+
timeZone: string,
|
|
504
505
|
): string {
|
|
505
506
|
const formatter = new Intl.DateTimeFormat(locale, {
|
|
506
507
|
hour: "2-digit",
|
|
507
508
|
minute: "2-digit",
|
|
508
509
|
timeZone,
|
|
509
510
|
})
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
* (`now-cursor-line.tsx`). Deliberately **no `timeZone` option**, unlike
|
|
516
|
-
* every other formatter in this file: `schedule-timed-grid.tsx`'s hour-axis
|
|
517
|
-
* gutter labels are host-local by construction (`hourFormatter`, fed a
|
|
518
|
-
* `new Date(2000, 0, 1, hour)` with no timezone conversion involved), and so
|
|
519
|
-
* is the now-line's own pixel position (`nowIndicatorTop`, `schedule-
|
|
520
|
-
* geometry.ts`, via `minutesFromMidnight`'s `.getHours()`/`.getMinutes()`).
|
|
521
|
-
* Threading `timeZone` through here too would let this label disagree with
|
|
522
|
-
* both of those the moment a consumer sets a `timeZone` other than the
|
|
523
|
-
* host's own — the line would still point at the host-local hour, but the
|
|
524
|
-
* text next to it would claim a different one. `locale` alone is safe to
|
|
525
|
-
* thread: it only affects digit shape/ordering (and a leading zero via
|
|
526
|
-
* `"2-digit"`), never which instant gets read as "now."
|
|
527
|
-
*/
|
|
528
|
-
export function clockTimeLabel(date: Date, locale?: string): string {
|
|
529
|
-
return new Intl.DateTimeFormat(locale, { hour: "2-digit", minute: "2-digit" }).format(date)
|
|
511
|
+
// `formatRange`, not a hand-built `${a} – ${b}` join: the locale picks the separator and
|
|
512
|
+
// collapses what the two ends share ("9:00 – 10:30 AM" in en-US). `.normalize("NFKC")` for
|
|
513
|
+
// the same SSR-hydration reason as `formatScheduleTitle` below — runtimes disagree on the
|
|
514
|
+
// separator's space glyphs byte-for-byte.
|
|
515
|
+
return formatter.formatRange(start, end).normalize("NFKC")
|
|
530
516
|
}
|
|
531
517
|
|
|
532
518
|
/**
|
|
@@ -17,17 +17,20 @@ import type { ScheduleEvent, ScheduleStaticEvent } from "./schedule-types"
|
|
|
17
17
|
* attribute toggles, for the CSS exit animation to have something to
|
|
18
18
|
* animate) — `getByText` doesn't consider `hidden`, so a *closed* popover's
|
|
19
19
|
* text is still queryable; queries scope into the specific open dialog via
|
|
20
|
-
* `within` instead of relying on `getByText` alone. (2)
|
|
21
|
-
* formats in the
|
|
22
|
-
*
|
|
23
|
-
* string the same way rather than hardcoding a UTC-assuming clock time.
|
|
20
|
+
* `within` instead of relying on `getByText` alone. (2) Every schedule below
|
|
21
|
+
* is `timeZone="UTC"`, and the popover formats in the schedule's zone, not the
|
|
22
|
+
* host's — so `timeRange` pins `UTC` too and the suite passes under any `TZ`.
|
|
24
23
|
*/
|
|
25
24
|
|
|
26
25
|
const day = (y: number, m: number, d: number, h = 0, min = 0) => new Date(Date.UTC(y, m, d, h, min))
|
|
27
26
|
const NOW = day(2026, 0, 15, 12) // Thursday, noon UTC
|
|
28
27
|
const timeRange = (start: Date, end: Date) => {
|
|
29
|
-
const f = new Intl.DateTimeFormat(undefined, {
|
|
30
|
-
|
|
28
|
+
const f = new Intl.DateTimeFormat(undefined, {
|
|
29
|
+
hour: "2-digit",
|
|
30
|
+
minute: "2-digit",
|
|
31
|
+
timeZone: "UTC",
|
|
32
|
+
})
|
|
33
|
+
return f.formatRange(start, end).normalize("NFKC")
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
type Payload = { ticketId: number }
|
|
@@ -763,3 +766,71 @@ describe("Popover portal target", () => {
|
|
|
763
766
|
expect(onGridClick).not.toHaveBeenCalled()
|
|
764
767
|
})
|
|
765
768
|
})
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* A schedule whose `timeZone` is not the host's. The details popover used to
|
|
772
|
+
* format a timed event in the host's zone while every other surface read the
|
|
773
|
+
* schedule's: the chip sat on the 09 row and the agenda printed 09:00, but
|
|
774
|
+
* both popovers said 03:00 PM on a Paris host. The zone is picked to differ
|
|
775
|
+
* from whatever `TZ` the suite runs under, so this discriminates everywhere.
|
|
776
|
+
*/
|
|
777
|
+
describe("a schedule in a time zone other than the host's", () => {
|
|
778
|
+
const hostZone = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
779
|
+
const ZONE = hostZone === "America/New_York" ? "Asia/Tokyo" : "America/New_York"
|
|
780
|
+
// 09:00–09:30 on 15 Jan 2026 in ZONE: UTC-5 in New York, UTC+9 in Tokyo.
|
|
781
|
+
const offsetHours = ZONE === "America/New_York" ? -5 : 9
|
|
782
|
+
const NY_EVENT: ScheduleEvent = {
|
|
783
|
+
kind: "event",
|
|
784
|
+
id: "tz",
|
|
785
|
+
title: "Defense",
|
|
786
|
+
start: day(2026, 0, 15, 9 - offsetHours),
|
|
787
|
+
end: day(2026, 0, 15, 9 - offsetHours, 30),
|
|
788
|
+
}
|
|
789
|
+
const RANGE = "9:00 – 9:30 AM"
|
|
790
|
+
const ZONE_NOW = day(2026, 0, 15, 12 - offsetHours)
|
|
791
|
+
|
|
792
|
+
it("prints the same range on the grid chip, its accessible name and its popover", async () => {
|
|
793
|
+
render(
|
|
794
|
+
<ScheduleRoot
|
|
795
|
+
data={[NY_EVENT]}
|
|
796
|
+
now={ZONE_NOW}
|
|
797
|
+
timeZone={ZONE}
|
|
798
|
+
locale="en-US"
|
|
799
|
+
view="days"
|
|
800
|
+
visibleDays={1}
|
|
801
|
+
startHour={0}
|
|
802
|
+
endHour={24}
|
|
803
|
+
/>,
|
|
804
|
+
)
|
|
805
|
+
const chip = screen.getByTestId("tz")
|
|
806
|
+
// The row the chip sits on: 09:00 of a 0–24 axis is 37.5% down.
|
|
807
|
+
expect(chip.style.getPropertyValue("--sch-base-top")).toBe("37.5%")
|
|
808
|
+
expect(chip.getAttribute("aria-label")).toBe(`Defense, ${RANGE}`)
|
|
809
|
+
expect(within(chip).getByText(RANGE)).toBeTruthy()
|
|
810
|
+
|
|
811
|
+
fireEvent.keyDown(chip, { key: "Enter" })
|
|
812
|
+
const dialog = await screen.findByRole("dialog")
|
|
813
|
+
expect(within(dialog).getByText(RANGE)).toBeTruthy()
|
|
814
|
+
})
|
|
815
|
+
|
|
816
|
+
it("prints the same time on the agenda row, its accessible name and its popover", async () => {
|
|
817
|
+
render(
|
|
818
|
+
<ScheduleRoot
|
|
819
|
+
data={[NY_EVENT]}
|
|
820
|
+
now={ZONE_NOW}
|
|
821
|
+
timeZone={ZONE}
|
|
822
|
+
locale="en-US"
|
|
823
|
+
views={["week", "agenda"] as const}
|
|
824
|
+
view="agenda"
|
|
825
|
+
withEventDetails
|
|
826
|
+
/>,
|
|
827
|
+
)
|
|
828
|
+
const row = screen.getByRole("button", { name: `Defense, ${RANGE}` })
|
|
829
|
+
const group = row.closest("[data-schedule-part='agenda-time-group']") as HTMLElement
|
|
830
|
+
expect(within(group).getByText("09:00 AM")).toBeTruthy()
|
|
831
|
+
|
|
832
|
+
fireEvent.click(row)
|
|
833
|
+
const dialog = await screen.findByRole("dialog")
|
|
834
|
+
expect(within(dialog).getByText(RANGE)).toBeTruthy()
|
|
835
|
+
})
|
|
836
|
+
})
|
|
@@ -498,11 +498,15 @@ const detailsPositioning = (anchor: RefObject<Element | null>): PopoverProps["po
|
|
|
498
498
|
function ChipContent<P>({
|
|
499
499
|
event,
|
|
500
500
|
locale,
|
|
501
|
+
timeZone,
|
|
501
502
|
classNames,
|
|
502
503
|
reserveRemoveSpace,
|
|
503
504
|
}: {
|
|
504
505
|
event: ScheduleAnyEvent<P>
|
|
505
506
|
locale?: string
|
|
507
|
+
/** The schedule's resolved zone — the same clock the grid's rows are cut
|
|
508
|
+
* in, so the printed range matches the row the chip sits on. */
|
|
509
|
+
timeZone: string
|
|
506
510
|
classNames?: ScheduleEventChipClassNames
|
|
507
511
|
/** The remove button (`InteractiveEventChip`, whenever `editable` grants
|
|
508
512
|
* `"remove"` for this event) is absolutely positioned over the chip's own
|
|
@@ -564,7 +568,7 @@ function ChipContent<P>({
|
|
|
564
568
|
classNames?.time,
|
|
565
569
|
)}
|
|
566
570
|
>
|
|
567
|
-
{timeRangeLabel(event.start, event.end, locale)}
|
|
571
|
+
{timeRangeLabel(event.start, event.end, locale, timeZone)}
|
|
568
572
|
</p>
|
|
569
573
|
</div>
|
|
570
574
|
</div>
|
|
@@ -589,7 +593,10 @@ export type ScheduleEventChipProps<P = unknown> = {
|
|
|
589
593
|
* multi-day event's later pieces, neither `event.start` nor anything else
|
|
590
594
|
* on the event identifies the column this particular piece is painted in. */
|
|
591
595
|
day: Date
|
|
592
|
-
|
|
596
|
+
/** The schedule's resolved zone. Required: the chip's printed range, its
|
|
597
|
+
* accessible name and its details popover all format in it, and a missing
|
|
598
|
+
* zone would silently fall back to the host's. */
|
|
599
|
+
timeZone: string
|
|
593
600
|
/** The rendered window, for the drag ghost's own percentage math. */
|
|
594
601
|
startHour?: number
|
|
595
602
|
totalWindowMinutes?: number
|
|
@@ -677,6 +684,7 @@ function StaticEventChip<P = unknown>({
|
|
|
677
684
|
withEventDetails = true,
|
|
678
685
|
renderEventDetails,
|
|
679
686
|
locale,
|
|
687
|
+
timeZone,
|
|
680
688
|
classNames,
|
|
681
689
|
detailsPopoverClassName,
|
|
682
690
|
}: Omit<
|
|
@@ -723,7 +731,7 @@ function StaticEventChip<P = unknown>({
|
|
|
723
731
|
})}
|
|
724
732
|
onClick={() => onEventSelect?.(event)}
|
|
725
733
|
onAnimationEnd={motion.onAnimationEnd}
|
|
726
|
-
aria-label={`${event.title}, ${timeRangeLabel(event.start, event.end, locale)}`}
|
|
734
|
+
aria-label={`${event.title}, ${timeRangeLabel(event.start, event.end, locale, timeZone)}`}
|
|
727
735
|
{...(showDetailsPopover
|
|
728
736
|
? { "aria-haspopup": "dialog" as const, "aria-expanded": detailsOpen }
|
|
729
737
|
: {})}
|
|
@@ -737,7 +745,7 @@ function StaticEventChip<P = unknown>({
|
|
|
737
745
|
)}
|
|
738
746
|
style={chipShellStyle(top, height, insets)}
|
|
739
747
|
>
|
|
740
|
-
<ChipContent event={event} locale={locale} classNames={classNames} />
|
|
748
|
+
<ChipContent event={event} locale={locale} timeZone={timeZone} classNames={classNames} />
|
|
741
749
|
</button>
|
|
742
750
|
)
|
|
743
751
|
|
|
@@ -781,6 +789,7 @@ function StaticEventChip<P = unknown>({
|
|
|
781
789
|
<ScheduleEventDetailsContent
|
|
782
790
|
event={event}
|
|
783
791
|
locale={locale}
|
|
792
|
+
timeZone={timeZone}
|
|
784
793
|
renderEventDetails={renderEventDetails}
|
|
785
794
|
/>
|
|
786
795
|
</Popover.Body>
|
|
@@ -795,7 +804,7 @@ function InteractiveEventChip<P = unknown>({
|
|
|
795
804
|
onPaginate,
|
|
796
805
|
dayIndex = 0,
|
|
797
806
|
day,
|
|
798
|
-
timeZone
|
|
807
|
+
timeZone,
|
|
799
808
|
startHour = 0,
|
|
800
809
|
totalWindowMinutes = 1440,
|
|
801
810
|
isFirst = true,
|
|
@@ -997,7 +1006,7 @@ function InteractiveEventChip<P = unknown>({
|
|
|
997
1006
|
})}
|
|
998
1007
|
tabIndex={present ? 0 : -1}
|
|
999
1008
|
role="button"
|
|
1000
|
-
aria-label={`${event.title}, ${timeRangeLabel(event.start, event.end, locale)}`}
|
|
1009
|
+
aria-label={`${event.title}, ${timeRangeLabel(event.start, event.end, locale, timeZone)}`}
|
|
1001
1010
|
{...(showDetailsPopover
|
|
1002
1011
|
? { "aria-haspopup": "dialog" as const, "aria-expanded": detailsOpen }
|
|
1003
1012
|
: {})}
|
|
@@ -1016,6 +1025,7 @@ function InteractiveEventChip<P = unknown>({
|
|
|
1016
1025
|
<ChipContent
|
|
1017
1026
|
event={event}
|
|
1018
1027
|
locale={locale}
|
|
1028
|
+
timeZone={timeZone}
|
|
1019
1029
|
classNames={classNames}
|
|
1020
1030
|
reserveRemoveSpace={canRemove}
|
|
1021
1031
|
/>
|
|
@@ -1146,6 +1156,7 @@ function InteractiveEventChip<P = unknown>({
|
|
|
1146
1156
|
<ScheduleEventDetailsContent
|
|
1147
1157
|
event={event}
|
|
1148
1158
|
locale={locale}
|
|
1159
|
+
timeZone={timeZone}
|
|
1149
1160
|
renderEventDetails={renderEventDetails}
|
|
1150
1161
|
// The full-size removal path. The inline `(x)` is 16px wide and
|
|
1151
1162
|
// cannot reach WCAG 2.2 SC 2.5.8's 24x24 on a floored short chip
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { render, screen } from "@testing-library/react"
|
|
2
|
+
import { describe, expect, it } from "vitest"
|
|
3
|
+
import { IntlProvider } from "../../lib/intl"
|
|
4
|
+
import { ScheduleEventDetailsContent } from "./schedule-event-details"
|
|
5
|
+
import type { ScheduleStaticEvent } from "./schedule-types"
|
|
6
|
+
|
|
7
|
+
// An all-day event's label is the one place the details content reads a zone. 10:30 UTC is the
|
|
8
|
+
// 16th in Kiritimati (UTC+14) and the 14th in Midway (UTC−11), while every host this suite runs
|
|
9
|
+
// on (UTC in CI, Paris locally) reads the 15th — so each label names a day only the intended
|
|
10
|
+
// zone can produce.
|
|
11
|
+
const EVENT: ScheduleStaticEvent = {
|
|
12
|
+
kind: "static",
|
|
13
|
+
id: "a1",
|
|
14
|
+
title: "Offsite",
|
|
15
|
+
allDay: true,
|
|
16
|
+
start: new Date("2026-07-15T10:30:00Z"),
|
|
17
|
+
end: new Date("2026-07-15T10:45:00Z"),
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
describe("ScheduleEventDetailsContent — IntlProvider time zone", () => {
|
|
21
|
+
it("labels an all-day event in the provider's time zone when no prop is set", () => {
|
|
22
|
+
render(
|
|
23
|
+
<IntlProvider timeZone="Pacific/Kiritimati">
|
|
24
|
+
<ScheduleEventDetailsContent event={EVENT} locale="en-US" />
|
|
25
|
+
</IntlProvider>,
|
|
26
|
+
)
|
|
27
|
+
expect(screen.getByText("Jul 16, 2026")).toBeTruthy()
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it("lets the timeZone prop override the provider", () => {
|
|
31
|
+
render(
|
|
32
|
+
<IntlProvider timeZone="Pacific/Kiritimati">
|
|
33
|
+
<ScheduleEventDetailsContent event={EVENT} locale="en-US" timeZone="Pacific/Midway" />
|
|
34
|
+
</IntlProvider>,
|
|
35
|
+
)
|
|
36
|
+
expect(screen.getByText("Jul 14, 2026")).toBeTruthy()
|
|
37
|
+
})
|
|
38
|
+
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { getLocalTimeZone } from "@internationalized/date"
|
|
4
3
|
import type { ReactNode } from "react"
|
|
4
|
+
import { useTimeZone } from "../../lib/intl"
|
|
5
5
|
import { Button } from "../button/button"
|
|
6
6
|
import { allDayRangeLabel, timeRangeLabel } from "./schedule-dates"
|
|
7
7
|
import type { ScheduleAnyEvent } from "./schedule-types"
|
|
@@ -9,8 +9,9 @@ import type { ScheduleAnyEvent } from "./schedule-types"
|
|
|
9
9
|
export type ScheduleEventDetailsContentProps<P = unknown> = {
|
|
10
10
|
event: ScheduleAnyEvent<P>
|
|
11
11
|
locale?: string
|
|
12
|
-
/** Only actually read for an `allDay` event, to resolve `allDayRangeLabel
|
|
13
|
-
*
|
|
12
|
+
/** Only actually read for an `allDay` event, to resolve `allDayRangeLabel`.
|
|
13
|
+
* Every Schedule caller forwards its own resolved zone; when omitted it
|
|
14
|
+
* resolves through `useTimeZone` (`IntlProvider`, then the host zone). */
|
|
14
15
|
timeZone?: string
|
|
15
16
|
/** Full override — replaces the default content below entirely when set. */
|
|
16
17
|
renderEventDetails?: (event: ScheduleAnyEvent<P>) => ReactNode
|
|
@@ -48,6 +49,7 @@ export function ScheduleEventDetailsContent<P = unknown>({
|
|
|
48
49
|
onRemove,
|
|
49
50
|
removeLabel,
|
|
50
51
|
}: ScheduleEventDetailsContentProps<P>): ReactNode {
|
|
52
|
+
const resolvedTimeZone = useTimeZone(timeZone)
|
|
51
53
|
if (renderEventDetails) return renderEventDetails(event)
|
|
52
54
|
|
|
53
55
|
return (
|
|
@@ -64,8 +66,8 @@ export function ScheduleEventDetailsContent<P = unknown>({
|
|
|
64
66
|
</div>
|
|
65
67
|
<p className="text-gray-light-500 text-xs dark:text-gray-dark-400">
|
|
66
68
|
{event.allDay
|
|
67
|
-
? allDayRangeLabel(event.start, event.end,
|
|
68
|
-
: timeRangeLabel(event.start, event.end, locale)}
|
|
69
|
+
? allDayRangeLabel(event.start, event.end, resolvedTimeZone, locale)
|
|
70
|
+
: timeRangeLabel(event.start, event.end, locale, resolvedTimeZone)}
|
|
69
71
|
</p>
|
|
70
72
|
{event.description ? (
|
|
71
73
|
// `div`, not `p` — `description` is `ReactNode`, so it can carry
|
|
@@ -15,11 +15,14 @@ import {
|
|
|
15
15
|
visibleEdges,
|
|
16
16
|
} from "./schedule-geometry"
|
|
17
17
|
|
|
18
|
+
/** The fixtures here are host-local wall-clock instants. */
|
|
19
|
+
const HOST = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
20
|
+
|
|
18
21
|
describe("minutesFromMidnight", () => {
|
|
19
22
|
it("counts minutes since local midnight", () => {
|
|
20
|
-
expect(minutesFromMidnight(new Date(2026, 0, 1, 0, 0))).toBe(0)
|
|
21
|
-
expect(minutesFromMidnight(new Date(2026, 0, 1, 9, 30))).toBe(570)
|
|
22
|
-
expect(minutesFromMidnight(new Date(2026, 0, 1, 23, 59))).toBe(1439)
|
|
23
|
+
expect(minutesFromMidnight(new Date(2026, 0, 1, 0, 0), HOST)).toBe(0)
|
|
24
|
+
expect(minutesFromMidnight(new Date(2026, 0, 1, 9, 30), HOST)).toBe(570)
|
|
25
|
+
expect(minutesFromMidnight(new Date(2026, 0, 1, 23, 59), HOST)).toBe(1439)
|
|
23
26
|
})
|
|
24
27
|
})
|
|
25
28
|
|
|
@@ -56,7 +59,7 @@ describe("dateAtMinutes", () => {
|
|
|
56
59
|
it("round-trips against minutesFromMidnight", () => {
|
|
57
60
|
const day = new Date(2026, 6, 15, 13, 47) // any instant on the target day
|
|
58
61
|
const date = dateAtMinutes(day, 570) // 9:30
|
|
59
|
-
expect(minutesFromMidnight(date)).toBe(570)
|
|
62
|
+
expect(minutesFromMidnight(date, HOST)).toBe(570)
|
|
60
63
|
})
|
|
61
64
|
|
|
62
65
|
it("lands on the given day's calendar date, host-local, regardless of the input instant's own time", () => {
|
|
@@ -153,9 +156,9 @@ describe("isNowInBand", () => {
|
|
|
153
156
|
const at = (h: number, m = 0, sec = 0) => new Date(2026, 0, 15, h, m, sec)
|
|
154
157
|
|
|
155
158
|
it("is true anywhere strictly inside the painted window", () => {
|
|
156
|
-
expect(isNowInBand(at(9, 30), 7, 13)).toBe(true)
|
|
157
|
-
expect(isNowInBand(at(7, 1), 7, 13)).toBe(true)
|
|
158
|
-
expect(isNowInBand(at(12, 59), 7, 13)).toBe(true)
|
|
159
|
+
expect(isNowInBand(at(9, 30), 7, 13, HOST)).toBe(true)
|
|
160
|
+
expect(isNowInBand(at(7, 1), 7, 13, HOST)).toBe(true)
|
|
161
|
+
expect(isNowInBand(at(12, 59), 7, 13, HOST)).toBe(true)
|
|
159
162
|
})
|
|
160
163
|
|
|
161
164
|
it("includes startHour:00 exactly and excludes endHour:00 exactly", () => {
|
|
@@ -163,23 +166,23 @@ describe("isNowInBand", () => {
|
|
|
163
166
|
// (`rangesOverlap`, `disableOutsideHours`), and the now-cursor has to
|
|
164
167
|
// agree with the band it's drawn over: the 13:00 row simply isn't
|
|
165
168
|
// painted on a 7–13 grid, so there's nothing there to point at.
|
|
166
|
-
expect(isNowInBand(at(7, 0), 7, 13)).toBe(true)
|
|
167
|
-
expect(isNowInBand(at(13, 0), 7, 13)).toBe(false)
|
|
169
|
+
expect(isNowInBand(at(7, 0), 7, 13, HOST)).toBe(true)
|
|
170
|
+
expect(isNowInBand(at(13, 0), 7, 13, HOST)).toBe(false)
|
|
168
171
|
})
|
|
169
172
|
|
|
170
173
|
it("is false on either side of the window", () => {
|
|
171
|
-
expect(isNowInBand(at(6, 59), 7, 13)).toBe(false)
|
|
172
|
-
expect(isNowInBand(at(18, 50), 7, 13)).toBe(false)
|
|
174
|
+
expect(isNowInBand(at(6, 59), 7, 13, HOST)).toBe(false)
|
|
175
|
+
expect(isNowInBand(at(18, 50), 7, 13, HOST)).toBe(false)
|
|
173
176
|
})
|
|
174
177
|
|
|
175
178
|
it("counts seconds too, so the exclusive edge lands on the second, not the minute", () => {
|
|
176
|
-
expect(isNowInBand(at(12, 59, 59), 7, 13)).toBe(true)
|
|
177
|
-
expect(isNowInBand(at(13, 0, 1), 7, 13)).toBe(false)
|
|
179
|
+
expect(isNowInBand(at(12, 59, 59), 7, 13, HOST)).toBe(true)
|
|
180
|
+
expect(isNowInBand(at(13, 0, 1), 7, 13, HOST)).toBe(false)
|
|
178
181
|
})
|
|
179
182
|
|
|
180
183
|
it("covers the whole day for the default 0–24 window, midnight included", () => {
|
|
181
|
-
expect(isNowInBand(at(0, 0), 0, 24)).toBe(true)
|
|
182
|
-
expect(isNowInBand(at(23, 59, 59), 0, 24)).toBe(true)
|
|
184
|
+
expect(isNowInBand(at(0, 0), 0, 24, HOST)).toBe(true)
|
|
185
|
+
expect(isNowInBand(at(23, 59, 59), 0, 24, HOST)).toBe(true)
|
|
183
186
|
})
|
|
184
187
|
})
|
|
185
188
|
|
|
@@ -188,17 +191,17 @@ describe("nowIndicatorTop", () => {
|
|
|
188
191
|
const now = new Date(2026, 0, 1, 9, 30) // 9:30am
|
|
189
192
|
// startHour 8 → 90 minutes since the window's own top, over a 600-minute
|
|
190
193
|
// (8-18) window → 15%.
|
|
191
|
-
expect(nowIndicatorTop(now, 8, 18)).toBe(15)
|
|
194
|
+
expect(nowIndicatorTop(now, 8, 18, HOST)).toBe(15)
|
|
192
195
|
})
|
|
193
196
|
|
|
194
197
|
it("clamps to 0 when now falls before startHour", () => {
|
|
195
198
|
const now = new Date(2026, 0, 1, 6, 0) // 6am, before an 8am window start
|
|
196
|
-
expect(nowIndicatorTop(now, 8, 18)).toBe(0)
|
|
199
|
+
expect(nowIndicatorTop(now, 8, 18, HOST)).toBe(0)
|
|
197
200
|
})
|
|
198
201
|
|
|
199
202
|
it("clamps to 100 when now falls at or after endHour", () => {
|
|
200
203
|
const now = new Date(2026, 0, 1, 19, 0) // 7pm, past an 18:00 window end
|
|
201
|
-
expect(nowIndicatorTop(now, 8, 18)).toBe(100)
|
|
204
|
+
expect(nowIndicatorTop(now, 8, 18, HOST)).toBe(100)
|
|
202
205
|
})
|
|
203
206
|
})
|
|
204
207
|
|