@42-central/ui-react 0.18.2 → 0.19.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/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/colors.css +15 -10
- 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 +5 -2
- 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 +162 -79
- 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 +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 +60 -48
- 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 +2 -2
- 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 +11 -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 +24 -2
- package/package.json +1 -1
- package/src/colors.css +15 -10
- 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 +26 -14
- 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 +121 -0
- package/src/components/data-table/data-table.tsx +37 -17
- 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/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 +56 -28
- package/src/components/schedule/now-cursor-line.tsx +30 -16
- 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/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.test.tsx +4 -1
- package/src/components/timeline/timeline.tsx +11 -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 +24 -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
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import { useFieldContext } from "@ark-ui/react/field"
|
|
4
|
-
import { PasswordInput as Ark } from "@ark-ui/react/password-input"
|
|
4
|
+
import { PasswordInput as Ark, usePasswordInputContext } from "@ark-ui/react/password-input"
|
|
5
5
|
import { Eye, EyeOff } from "lucide-react"
|
|
6
|
-
import type {
|
|
6
|
+
import type {
|
|
7
|
+
ChangeEvent,
|
|
8
|
+
ComponentPropsWithoutRef,
|
|
9
|
+
FocusEvent,
|
|
10
|
+
MouseEvent,
|
|
11
|
+
ReactNode,
|
|
12
|
+
Ref,
|
|
13
|
+
} from "react"
|
|
14
|
+
import { useEffect, useRef } from "react"
|
|
7
15
|
import { cn } from "../../lib/cn"
|
|
16
|
+
import { devWarn } from "../../lib/dev-warn"
|
|
17
|
+
import { focusStyles } from "../../lib/focus-styles"
|
|
8
18
|
import { props } from "../../lib/props"
|
|
9
19
|
import type { WithTestId } from "../../lib/test-id"
|
|
10
20
|
import { type FieldProps, FieldShell, fieldA11yProps } from "../field/field"
|
|
@@ -32,11 +42,24 @@ import {
|
|
|
32
42
|
* The toggle renders as a real `<button>` sibling of the input — NOT via the
|
|
33
43
|
* shell's decorative `endSlot`, whose wrapper span is `aria-hidden` and would
|
|
34
44
|
* hide the control from assistive tech. As a direct child it stays clickable
|
|
35
|
-
* and exposed to AT
|
|
36
|
-
*
|
|
37
|
-
*
|
|
45
|
+
* and exposed to AT, with `aria-controls` pointing at the input. It is a tab
|
|
46
|
+
* stop by default (zag ships it at `tabIndex={-1}`, which left keyboard users
|
|
47
|
+
* no way to reveal the value); `toggleTabIndex={-1}` restores that.
|
|
48
|
+
*
|
|
49
|
+
* The reveal state can be lifted out (`visible` / `defaultVisible` /
|
|
50
|
+
* `onVisibleChange`), e.g. to drive several fields from one "Show
|
|
51
|
+
* passwords" checkbox. `renderToggle` swaps what renders *inside* the kit's
|
|
52
|
+
* button — which keeps its a11y wiring — and `hideToggle` drops the button so
|
|
53
|
+
* an external control owns the state.
|
|
38
54
|
*/
|
|
39
55
|
|
|
56
|
+
/** Ark's own `translations` prop type, derived structurally rather than imported by name —
|
|
57
|
+
* `IntlTranslations` lives in `@zag-js/password-input`, a transitive dependency of the
|
|
58
|
+
* `@ark-ui/react` peer dep, not one this package declares itself. */
|
|
59
|
+
export type PasswordInputTranslations = NonNullable<
|
|
60
|
+
ComponentPropsWithoutRef<typeof Ark.Root>["translations"]
|
|
61
|
+
>
|
|
62
|
+
|
|
40
63
|
export type PasswordInputProps = Pick<FieldProps, "label" | "description" | "error" | "required"> &
|
|
41
64
|
WithTestId & {
|
|
42
65
|
/** Controlled value, forwarded to the native input. */
|
|
@@ -59,6 +82,33 @@ export type PasswordInputProps = Pick<FieldProps, "label" | "description" | "err
|
|
|
59
82
|
disabled?: boolean
|
|
60
83
|
/** Keeps full contrast but blocks edits. */
|
|
61
84
|
readOnly?: boolean
|
|
85
|
+
/** Controlled reveal state: `true` shows the value as plain text. */
|
|
86
|
+
visible?: boolean
|
|
87
|
+
/** Uncontrolled initial reveal state. */
|
|
88
|
+
defaultVisible?: boolean
|
|
89
|
+
/** Fires with the next reveal state when the toggle is pressed. */
|
|
90
|
+
onVisibleChange?: (visible: boolean) => void
|
|
91
|
+
/**
|
|
92
|
+
* Content of the reveal button, called with the current state — the button
|
|
93
|
+
* itself (and its `aria-*` wiring) stays the kit's. Its accessible name
|
|
94
|
+
* still comes from `translations`: if you render visible text, pass
|
|
95
|
+
* `translations` whose label contains that text (WCAG 2.5.3).
|
|
96
|
+
*/
|
|
97
|
+
renderToggle?: (visible: boolean) => ReactNode
|
|
98
|
+
/**
|
|
99
|
+
* Renders no reveal button at all; pair it with `visible` driven by your
|
|
100
|
+
* own control. `renderToggle` is ignored while it is set.
|
|
101
|
+
*/
|
|
102
|
+
hideToggle?: boolean
|
|
103
|
+
/**
|
|
104
|
+
* `tabIndex` of the reveal button. Defaults to `0`, so keyboard users can
|
|
105
|
+
* reach it; `-1` takes it out of the tab order, leaving it a pointer-only
|
|
106
|
+
* convenience.
|
|
107
|
+
*/
|
|
108
|
+
toggleTabIndex?: number
|
|
109
|
+
/** Localized accessible label of the reveal button. It names the button
|
|
110
|
+
* even when `renderToggle` renders text, so it must contain that text. */
|
|
111
|
+
translations?: PasswordInputTranslations
|
|
62
112
|
/** Decorative or interactive content at the inline-start of the control. */
|
|
63
113
|
startSlot?: ReactNode
|
|
64
114
|
/** Explicit id for label association. */
|
|
@@ -69,7 +119,8 @@ export type PasswordInputProps = Pick<FieldProps, "label" | "description" | "err
|
|
|
69
119
|
onBlur?: (e: FocusEvent<HTMLInputElement>) => void
|
|
70
120
|
/** Styles the shell root. */
|
|
71
121
|
className?: string
|
|
72
|
-
/** Per-part class overrides.
|
|
122
|
+
/** Per-part class overrides. `visibilityTrigger` lands on the reveal
|
|
123
|
+
* button, merged after the kit's own classes so it can override them. */
|
|
73
124
|
classNames?: { field?: string; root?: string; input?: string; visibilityTrigger?: string }
|
|
74
125
|
}
|
|
75
126
|
|
|
@@ -109,6 +160,75 @@ const PasswordInputField = ({
|
|
|
109
160
|
)
|
|
110
161
|
}
|
|
111
162
|
|
|
163
|
+
/**
|
|
164
|
+
* The reveal button. Built from the machine's trigger props rather than Ark's
|
|
165
|
+
* `VisibilityTrigger` part, because two of those props are wrong for a
|
|
166
|
+
* reveal toggle and `mergeProps` can't remove a key, only override it:
|
|
167
|
+
*
|
|
168
|
+
* - `tabIndex: -1` — overridden by `tabIndex` (default `0`).
|
|
169
|
+
* - `aria-expanded` — dropped. Showing a value isn't expanding anything, so
|
|
170
|
+
* AT announced "Hide password, expanded". The state already lives in the
|
|
171
|
+
* label, which flips between "Show password" and "Hide password"; an
|
|
172
|
+
* `aria-pressed` on top would read "Hide password, pressed", which the
|
|
173
|
+
* ARIA APG advises against for a toggle whose label changes with state.
|
|
174
|
+
*
|
|
175
|
+
* zag toggles on `pointerdown` only, so a keyboard press (Enter / Space) or an
|
|
176
|
+
* AT "click" — both a `click` with `detail === 0` — did nothing. `onClick`
|
|
177
|
+
* covers them, with the same read-only / disabled guard the machine applies.
|
|
178
|
+
*
|
|
179
|
+
* The `aria-label` always comes from `translations` (zag's English default
|
|
180
|
+
* otherwise), so it overrides whatever `renderToggle` renders. For an icon
|
|
181
|
+
* that's what you want; for visible text it fails WCAG 2.5.3 (Label in Name)
|
|
182
|
+
* unless the label contains that text — a voice-control user saying "click
|
|
183
|
+
* Afficher" can't hit a button named "Show password". Content can't be read
|
|
184
|
+
* at render time, so `custom` turns on a dev-only check of the rendered DOM.
|
|
185
|
+
*/
|
|
186
|
+
const PasswordInputToggle = ({
|
|
187
|
+
tabIndex,
|
|
188
|
+
custom,
|
|
189
|
+
className,
|
|
190
|
+
children,
|
|
191
|
+
}: {
|
|
192
|
+
tabIndex: number
|
|
193
|
+
custom: boolean
|
|
194
|
+
className: string
|
|
195
|
+
children: ReactNode
|
|
196
|
+
}) => {
|
|
197
|
+
const api = usePasswordInputContext()
|
|
198
|
+
const { "aria-expanded": _expanded, ...trigger } = api.getVisibilityTriggerProps()
|
|
199
|
+
const label = trigger["aria-label"]
|
|
200
|
+
const ref = useRef<HTMLButtonElement>(null)
|
|
201
|
+
useEffect(() => {
|
|
202
|
+
if (!custom) return
|
|
203
|
+
const text = ref.current?.textContent?.trim() ?? ""
|
|
204
|
+
// Only real words count — an icon contributes no text content.
|
|
205
|
+
if (!/\p{L}/u.test(text)) return
|
|
206
|
+
if (label?.toLocaleLowerCase().includes(text.toLocaleLowerCase())) return
|
|
207
|
+
devWarn(
|
|
208
|
+
`PasswordInput: \`renderToggle\` renders the text "${text}", but the button's accessible name is "${label}". ` +
|
|
209
|
+
"Pass `translations.visibilityTrigger` returning a label that contains the visible text (WCAG 2.5.3, Label in Name).",
|
|
210
|
+
)
|
|
211
|
+
}, [custom, label])
|
|
212
|
+
// The machine's own resolved read-only state (prop or Field) — the trigger
|
|
213
|
+
// props only carry it as an untyped `data-readonly`.
|
|
214
|
+
const interactive = !api.disabled && !api.getInputProps().readOnly
|
|
215
|
+
return (
|
|
216
|
+
<button
|
|
217
|
+
{...trigger}
|
|
218
|
+
ref={ref}
|
|
219
|
+
tabIndex={tabIndex}
|
|
220
|
+
className={className}
|
|
221
|
+
onClick={(event: MouseEvent<HTMLButtonElement>) => {
|
|
222
|
+
// Pointer clicks were already handled on pointerdown.
|
|
223
|
+
if (event.detail !== 0 || !interactive) return
|
|
224
|
+
api.toggleVisible()
|
|
225
|
+
}}
|
|
226
|
+
>
|
|
227
|
+
{children}
|
|
228
|
+
</button>
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
|
|
112
232
|
export const PasswordInput = ({
|
|
113
233
|
value,
|
|
114
234
|
defaultValue,
|
|
@@ -124,6 +244,13 @@ export const PasswordInput = ({
|
|
|
124
244
|
label,
|
|
125
245
|
description,
|
|
126
246
|
error,
|
|
247
|
+
visible,
|
|
248
|
+
defaultVisible,
|
|
249
|
+
onVisibleChange,
|
|
250
|
+
renderToggle,
|
|
251
|
+
hideToggle,
|
|
252
|
+
toggleTabIndex = 0,
|
|
253
|
+
translations,
|
|
127
254
|
startSlot,
|
|
128
255
|
id,
|
|
129
256
|
ref,
|
|
@@ -152,6 +279,10 @@ export const PasswordInput = ({
|
|
|
152
279
|
disabled={disabled}
|
|
153
280
|
readOnly={readOnly}
|
|
154
281
|
required={required}
|
|
282
|
+
visible={visible}
|
|
283
|
+
defaultVisible={defaultVisible}
|
|
284
|
+
onVisibilityChange={(details) => onVisibleChange?.(details.visible)}
|
|
285
|
+
translations={translations}
|
|
155
286
|
>
|
|
156
287
|
<InputBase
|
|
157
288
|
variant={variant}
|
|
@@ -177,13 +308,31 @@ export const PasswordInput = ({
|
|
|
177
308
|
{/* Rendered as a direct sibling — NOT via InputBase's `endSlot`, whose
|
|
178
309
|
wrapper span is `aria-hidden` — so the toggle button stays clickable
|
|
179
310
|
and keyboard-focusable / announced to assistive tech. */}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
311
|
+
{!hideToggle && (
|
|
312
|
+
<PasswordInputToggle
|
|
313
|
+
tabIndex={toggleTabIndex}
|
|
314
|
+
custom={renderToggle !== undefined}
|
|
315
|
+
className={cn(
|
|
316
|
+
inputSlot,
|
|
317
|
+
"cursor-pointer rounded-xs",
|
|
318
|
+
// Its own ring, not just the shell's: the shell's `:has()`
|
|
319
|
+
// halo is already on while the input is focused, so it can't
|
|
320
|
+
// tell a keyboard user that focus moved onto the toggle. No
|
|
321
|
+
// offset — the gap would be painted in the page color, a hole
|
|
322
|
+
// punched in the shell's own fill.
|
|
323
|
+
focusStyles({ offset: false }),
|
|
324
|
+
classNames?.visibilityTrigger,
|
|
325
|
+
)}
|
|
326
|
+
>
|
|
327
|
+
{renderToggle ? (
|
|
328
|
+
<Ark.Context>{(api) => renderToggle(api.visible)}</Ark.Context>
|
|
329
|
+
) : (
|
|
330
|
+
<Ark.Indicator fallback={<Eye />}>
|
|
331
|
+
<EyeOff />
|
|
332
|
+
</Ark.Indicator>
|
|
333
|
+
)}
|
|
334
|
+
</PasswordInputToggle>
|
|
335
|
+
)}
|
|
187
336
|
</InputBase>
|
|
188
337
|
</Ark.Root>
|
|
189
338
|
</FieldShell>
|
|
@@ -152,35 +152,6 @@ export const popoverOption = cva(
|
|
|
152
152
|
export const popoverIndicator =
|
|
153
153
|
"ms-auto inline-flex shrink-0 items-center text-(--c-solid) [&_svg]:size-4"
|
|
154
154
|
|
|
155
|
-
/** Presentational checkbox for a multi-select option row — a box that fills
|
|
156
|
-
* once its parent row carries `data-state="checked"` (needs `group/item` on
|
|
157
|
-
* the row; the check icon itself should still be an `Ark.ItemIndicator` so it
|
|
158
|
-
* only mounts when selected). Modeled on `TreeMultiSelect`'s local
|
|
159
|
-
* `treeCheckbox`, generalized off `data-state` instead of that component's own
|
|
160
|
-
* hand-rolled `data-checked`/`data-mixed` (there's no tri-state "mixed" outside
|
|
161
|
-
* a tree, so this only needs the one variant). */
|
|
162
|
-
export const popoverCheckbox = cva(
|
|
163
|
-
[
|
|
164
|
-
"inline-flex shrink-0 items-center justify-center rounded-xs border transition-colors",
|
|
165
|
-
"border-gray-light-300 dark:border-gray-dark-700",
|
|
166
|
-
"bg-gray-light-25 dark:bg-gray-dark-900",
|
|
167
|
-
"text-(--c-on-solid)",
|
|
168
|
-
"group-data-[state=checked]/item:border-(--c-solid) group-data-[state=checked]/item:bg-(--c-solid)",
|
|
169
|
-
],
|
|
170
|
-
{
|
|
171
|
-
variants: {
|
|
172
|
-
size: {
|
|
173
|
-
xs: "size-3.5 [&_svg]:size-2.5",
|
|
174
|
-
sm: "size-4 [&_svg]:size-3",
|
|
175
|
-
md: "size-4 [&_svg]:size-3",
|
|
176
|
-
lg: "size-4.5 [&_svg]:size-3.5",
|
|
177
|
-
xl: "size-5 [&_svg]:size-4",
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
defaultVariants: { size: "md" },
|
|
181
|
-
},
|
|
182
|
-
)
|
|
183
|
-
|
|
184
155
|
/** Group heading above a set of options. */
|
|
185
156
|
export const popoverGroupLabel =
|
|
186
157
|
"px-2 py-1.5 text-xs font-medium select-none text-gray-light-500 dark:text-gray-dark-400"
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
// client entries by a leading-directive regex, and React/Next need the
|
|
5
5
|
// directive as the module's first statement): Ark's Progress Root +
|
|
6
6
|
// `useProgress` run a state machine with hooks, so the component can't render in
|
|
7
|
-
// a Server Component tree. The directive
|
|
8
|
-
//
|
|
9
|
-
// `slider/index.ts`.
|
|
7
|
+
// a Server Component tree. The directive is on both the impl and this barrel:
|
|
8
|
+
// tsup classifies entries by what consumers import, which is the barrel. Same
|
|
9
|
+
// as `slider/index.ts`.
|
|
10
10
|
|
|
11
11
|
export {
|
|
12
12
|
type GradientDir,
|
|
@@ -2,7 +2,7 @@ import { render, screen } from "@testing-library/react"
|
|
|
2
2
|
import { createRef } from "react"
|
|
3
3
|
import { describe, expect, it } from "vitest"
|
|
4
4
|
import { HourGutterTick, NowCursorLabel, NowCursorLine } from "./now-cursor-line"
|
|
5
|
-
import {
|
|
5
|
+
import { timeLabel } from "./schedule-dates"
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* `NowCursorLine`/`NowCursorLabel` rendered directly (not through
|
|
@@ -14,13 +14,18 @@ import { clockTimeLabel } from "./schedule-dates"
|
|
|
14
14
|
|
|
15
15
|
const NOW = new Date(2026, 0, 15, 9, 30) // 9:30am, host-local
|
|
16
16
|
|
|
17
|
+
/** The fixtures above are host-local wall-clock instants, so these leaves are
|
|
18
|
+
* handed the host's own zone — the zone-mismatch case lives in
|
|
19
|
+
* `schedule.test.tsx`, where the whole grid is involved. */
|
|
20
|
+
const HOST = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
21
|
+
|
|
17
22
|
describe("NowCursorLine — no time label", () => {
|
|
18
23
|
it("never renders the clock-time text itself, for either variant", () => {
|
|
19
|
-
render(<NowCursorLine now={NOW} startHour={0} endHour={24} variant="marker" />)
|
|
20
|
-
expect(screen.queryByText(
|
|
24
|
+
render(<NowCursorLine timeZone={HOST} now={NOW} startHour={0} endHour={24} variant="marker" />)
|
|
25
|
+
expect(screen.queryByText(timeLabel(NOW, HOST))).toBeNull()
|
|
21
26
|
|
|
22
|
-
render(<NowCursorLine now={NOW} startHour={0} endHour={24} variant="guide" />)
|
|
23
|
-
expect(screen.queryByText(
|
|
27
|
+
render(<NowCursorLine timeZone={HOST} now={NOW} startHour={0} endHour={24} variant="guide" />)
|
|
28
|
+
expect(screen.queryByText(timeLabel(NOW, HOST))).toBeNull()
|
|
24
29
|
})
|
|
25
30
|
})
|
|
26
31
|
|
|
@@ -29,21 +34,28 @@ describe("NowCursorLine — hideDot", () => {
|
|
|
29
34
|
|
|
30
35
|
it("renders the dot by default", () => {
|
|
31
36
|
const { container } = render(
|
|
32
|
-
<NowCursorLine now={NOW} startHour={0} endHour={24} variant="marker" />,
|
|
37
|
+
<NowCursorLine timeZone={HOST} now={NOW} startHour={0} endHour={24} variant="marker" />,
|
|
33
38
|
)
|
|
34
39
|
expect(container.querySelector(dotSelector)).not.toBeNull()
|
|
35
40
|
})
|
|
36
41
|
|
|
37
42
|
it("omits the dot when hideDot is set", () => {
|
|
38
43
|
const { container } = render(
|
|
39
|
-
<NowCursorLine
|
|
44
|
+
<NowCursorLine
|
|
45
|
+
timeZone={HOST}
|
|
46
|
+
now={NOW}
|
|
47
|
+
startHour={0}
|
|
48
|
+
endHour={24}
|
|
49
|
+
variant="marker"
|
|
50
|
+
hideDot
|
|
51
|
+
/>,
|
|
40
52
|
)
|
|
41
53
|
expect(container.querySelector(dotSelector)).toBeNull()
|
|
42
54
|
})
|
|
43
55
|
|
|
44
56
|
it('never renders a dot for variant="guide", regardless of hideDot', () => {
|
|
45
57
|
const { container } = render(
|
|
46
|
-
<NowCursorLine now={NOW} startHour={0} endHour={24} variant="guide" />,
|
|
58
|
+
<NowCursorLine timeZone={HOST} now={NOW} startHour={0} endHour={24} variant="guide" />,
|
|
47
59
|
)
|
|
48
60
|
expect(container.querySelector(dotSelector)).toBeNull()
|
|
49
61
|
})
|
|
@@ -51,13 +63,13 @@ describe("NowCursorLine — hideDot", () => {
|
|
|
51
63
|
|
|
52
64
|
describe("NowCursorLabel — time label", () => {
|
|
53
65
|
it("renders the formatted current time", () => {
|
|
54
|
-
render(<NowCursorLabel now={NOW} startHour={0} endHour={24} />)
|
|
55
|
-
expect(screen.getByText(
|
|
66
|
+
render(<NowCursorLabel timeZone={HOST} now={NOW} startHour={0} endHour={24} />)
|
|
67
|
+
expect(screen.getByText(timeLabel(NOW, HOST))).toBeTruthy()
|
|
56
68
|
})
|
|
57
69
|
|
|
58
70
|
it("formats the label per the given locale", () => {
|
|
59
|
-
render(<NowCursorLabel now={NOW} startHour={0} endHour={24} locale="en-US" />)
|
|
60
|
-
expect(screen.getByText(
|
|
71
|
+
render(<NowCursorLabel timeZone={HOST} now={NOW} startHour={0} endHour={24} locale="en-US" />)
|
|
72
|
+
expect(screen.getByText(timeLabel(NOW, HOST, "en-US"))).toBeTruthy()
|
|
61
73
|
})
|
|
62
74
|
})
|
|
63
75
|
|
|
@@ -68,6 +80,7 @@ describe("HourGutterTick — decluttering the hour the label already covers", ()
|
|
|
68
80
|
const { container } = render(
|
|
69
81
|
<>
|
|
70
82
|
<HourGutterTick
|
|
83
|
+
timeZone={HOST}
|
|
71
84
|
hour={8}
|
|
72
85
|
label="08 AM"
|
|
73
86
|
now={NOW}
|
|
@@ -77,6 +90,7 @@ describe("HourGutterTick — decluttering the hour the label already covers", ()
|
|
|
77
90
|
className="row-8"
|
|
78
91
|
/>
|
|
79
92
|
<HourGutterTick
|
|
93
|
+
timeZone={HOST}
|
|
80
94
|
hour={9}
|
|
81
95
|
label="09 AM"
|
|
82
96
|
now={NOW}
|
|
@@ -102,6 +116,7 @@ describe("HourGutterTick — decluttering the hour the label already covers", ()
|
|
|
102
116
|
it("never hides anything when hideWhenCurrent is false", () => {
|
|
103
117
|
const { container } = render(
|
|
104
118
|
<HourGutterTick
|
|
119
|
+
timeZone={HOST}
|
|
105
120
|
hour={9}
|
|
106
121
|
label="09 AM"
|
|
107
122
|
now={NOW}
|
|
@@ -135,7 +150,7 @@ const DOT = '[data-schedule-part="now-indicator-dot"]'
|
|
|
135
150
|
|
|
136
151
|
describe("NowCursorLine — the painted window gates it", () => {
|
|
137
152
|
it("still draws normally inside the window", () => {
|
|
138
|
-
const { container } = render(<NowCursorLine now={INSIDE} {...WINDOW} />)
|
|
153
|
+
const { container } = render(<NowCursorLine timeZone={HOST} now={INSIDE} {...WINDOW} />)
|
|
139
154
|
const line = container.querySelector(LINE)
|
|
140
155
|
expect(line).not.toBeNull()
|
|
141
156
|
// 9:30 on a 7–13 window → 150 of 360 minutes.
|
|
@@ -144,41 +159,45 @@ describe("NowCursorLine — the painted window gates it", () => {
|
|
|
144
159
|
})
|
|
145
160
|
|
|
146
161
|
it("renders nothing — no line, no dot — past endHour", () => {
|
|
147
|
-
const { container } = render(<NowCursorLine now={AFTER_END} {...WINDOW} />)
|
|
162
|
+
const { container } = render(<NowCursorLine timeZone={HOST} now={AFTER_END} {...WINDOW} />)
|
|
148
163
|
expect(container.querySelector(LINE)).toBeNull()
|
|
149
164
|
expect(container.querySelector(DOT)).toBeNull()
|
|
150
165
|
})
|
|
151
166
|
|
|
152
167
|
it("renders nothing before startHour either", () => {
|
|
153
|
-
const { container } = render(<NowCursorLine now={BEFORE_START} {...WINDOW} />)
|
|
168
|
+
const { container } = render(<NowCursorLine timeZone={HOST} now={BEFORE_START} {...WINDOW} />)
|
|
154
169
|
expect(container.querySelector(LINE)).toBeNull()
|
|
155
170
|
expect(container.querySelector(DOT)).toBeNull()
|
|
156
171
|
})
|
|
157
172
|
|
|
158
173
|
it("pins both boundaries: startHour:00 draws, endHour:00 already doesn't", () => {
|
|
159
174
|
const { container: atStart } = render(
|
|
160
|
-
<NowCursorLine now={new Date(2026, 0, 15, 7, 0)} {...WINDOW} />,
|
|
175
|
+
<NowCursorLine timeZone={HOST} now={new Date(2026, 0, 15, 7, 0)} {...WINDOW} />,
|
|
161
176
|
)
|
|
162
177
|
expect(atStart.querySelector(LINE)).not.toBeNull()
|
|
163
178
|
expect((atStart.querySelector(LINE) as HTMLElement).style.top).toBe("0%")
|
|
164
179
|
|
|
165
180
|
const { container: atEnd } = render(
|
|
166
|
-
<NowCursorLine now={new Date(2026, 0, 15, 13, 0)} {...WINDOW} />,
|
|
181
|
+
<NowCursorLine timeZone={HOST} now={new Date(2026, 0, 15, 13, 0)} {...WINDOW} />,
|
|
167
182
|
)
|
|
168
183
|
expect(atEnd.querySelector(LINE)).toBeNull()
|
|
169
184
|
})
|
|
170
185
|
|
|
171
186
|
it("gates the guide variant on the same window as the marker", () => {
|
|
172
|
-
const { container } = render(
|
|
187
|
+
const { container } = render(
|
|
188
|
+
<NowCursorLine timeZone={HOST} now={AFTER_END} {...WINDOW} variant="guide" />,
|
|
189
|
+
)
|
|
173
190
|
expect(container.querySelector(LINE)).toBeNull()
|
|
174
191
|
})
|
|
175
192
|
|
|
176
193
|
it("leaves nowRef null once it stops rendering, so scroll-to-now can skip instead of centering on a stale node", () => {
|
|
177
194
|
const ref = createRef<HTMLDivElement>()
|
|
178
|
-
const { rerender } = render(
|
|
195
|
+
const { rerender } = render(
|
|
196
|
+
<NowCursorLine timeZone={HOST} now={INSIDE} nowRef={ref} {...WINDOW} />,
|
|
197
|
+
)
|
|
179
198
|
expect(ref.current).not.toBeNull()
|
|
180
199
|
|
|
181
|
-
rerender(<NowCursorLine now={AFTER_END} nowRef={ref} {...WINDOW} />)
|
|
200
|
+
rerender(<NowCursorLine timeZone={HOST} now={AFTER_END} nowRef={ref} {...WINDOW} />)
|
|
182
201
|
expect(ref.current).toBeNull()
|
|
183
202
|
})
|
|
184
203
|
})
|
|
@@ -188,7 +207,12 @@ describe("NowCursorLabel — stays inside the band", () => {
|
|
|
188
207
|
// half its height out of the grid, and the whole view scrolled a few px.
|
|
189
208
|
it("clamps its position to half its own height inside both edges", () => {
|
|
190
209
|
const { container } = render(
|
|
191
|
-
<NowCursorLabel
|
|
210
|
+
<NowCursorLabel
|
|
211
|
+
timeZone={HOST}
|
|
212
|
+
now={new Date(2026, 0, 1, 17, 57)}
|
|
213
|
+
startHour={8}
|
|
214
|
+
endHour={18}
|
|
215
|
+
/>,
|
|
192
216
|
)
|
|
193
217
|
const label = container.querySelector('[data-schedule-part="now-indicator-label"]')
|
|
194
218
|
const top = (label as HTMLElement).style.top
|
|
@@ -204,18 +228,18 @@ describe("NowCursorLabel — stays inside the band", () => {
|
|
|
204
228
|
|
|
205
229
|
describe("NowCursorLabel — the painted window gates it too", () => {
|
|
206
230
|
it("renders its clock text inside the window", () => {
|
|
207
|
-
render(<NowCursorLabel now={INSIDE} {...WINDOW} />)
|
|
208
|
-
expect(screen.getByText(
|
|
231
|
+
render(<NowCursorLabel timeZone={HOST} now={INSIDE} {...WINDOW} />)
|
|
232
|
+
expect(screen.getByText(timeLabel(INSIDE, HOST))).toBeTruthy()
|
|
209
233
|
})
|
|
210
234
|
|
|
211
235
|
it("renders no label outside it, rather than a clamped one naming an hour it isn't", () => {
|
|
212
|
-
const { container } = render(<NowCursorLabel now={AFTER_END} {...WINDOW} />)
|
|
213
|
-
expect(screen.queryByText(
|
|
236
|
+
const { container } = render(<NowCursorLabel timeZone={HOST} now={AFTER_END} {...WINDOW} />)
|
|
237
|
+
expect(screen.queryByText(timeLabel(AFTER_END, HOST))).toBeNull()
|
|
214
238
|
expect(container.querySelector('[data-schedule-part="now-indicator-label"]')).toBeNull()
|
|
215
239
|
})
|
|
216
240
|
|
|
217
241
|
it("marks which edge now lies past, pointing down when it is after endHour", () => {
|
|
218
|
-
const { container } = render(<NowCursorLabel now={AFTER_END} {...WINDOW} />)
|
|
242
|
+
const { container } = render(<NowCursorLabel timeZone={HOST} now={AFTER_END} {...WINDOW} />)
|
|
219
243
|
const mark = container.querySelector('[data-schedule-part="now-indicator-offscreen"]')
|
|
220
244
|
expect(mark).not.toBeNull()
|
|
221
245
|
expect(mark?.getAttribute("data-direction")).toBe("after")
|
|
@@ -225,7 +249,7 @@ describe("NowCursorLabel — the painted window gates it too", () => {
|
|
|
225
249
|
})
|
|
226
250
|
|
|
227
251
|
it("points up when now is before startHour", () => {
|
|
228
|
-
const { container } = render(<NowCursorLabel now={BEFORE_START} {...WINDOW} />)
|
|
252
|
+
const { container } = render(<NowCursorLabel timeZone={HOST} now={BEFORE_START} {...WINDOW} />)
|
|
229
253
|
expect(
|
|
230
254
|
container
|
|
231
255
|
.querySelector('[data-schedule-part="now-indicator-offscreen"]')
|
|
@@ -237,7 +261,9 @@ describe("NowCursorLabel — the painted window gates it too", () => {
|
|
|
237
261
|
// They share one clock reading and one predicate; this pins that they
|
|
238
262
|
// stay exclusive in both directions rather than by luck of ordering.
|
|
239
263
|
for (const now of [BEFORE_START, INSIDE, AFTER_END]) {
|
|
240
|
-
const { container, unmount } = render(
|
|
264
|
+
const { container, unmount } = render(
|
|
265
|
+
<NowCursorLabel timeZone={HOST} now={now} {...WINDOW} />,
|
|
266
|
+
)
|
|
241
267
|
const label = container.querySelector('[data-schedule-part="now-indicator-label"]')
|
|
242
268
|
const mark = container.querySelector('[data-schedule-part="now-indicator-offscreen"]')
|
|
243
269
|
expect([label, mark].filter(Boolean)).toHaveLength(1)
|
|
@@ -254,6 +280,7 @@ describe("HourGutterTick — never declutters for a label that isn't there", ()
|
|
|
254
280
|
// is exactly the split this gate exists to prevent.
|
|
255
281
|
const { container } = render(
|
|
256
282
|
<HourGutterTick
|
|
283
|
+
timeZone={HOST}
|
|
257
284
|
hour={7}
|
|
258
285
|
label="07 AM"
|
|
259
286
|
now={new Date(2026, 0, 15, 6, 55)}
|
|
@@ -268,6 +295,7 @@ describe("HourGutterTick — never declutters for a label that isn't there", ()
|
|
|
268
295
|
it("still fades the current hour's number while the label is on screen", () => {
|
|
269
296
|
const { container } = render(
|
|
270
297
|
<HourGutterTick
|
|
298
|
+
timeZone={HOST}
|
|
271
299
|
hour={9}
|
|
272
300
|
label="09 AM"
|
|
273
301
|
now={INSIDE}
|