@42-central/ui-react 0.0.0-stage → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +454 -2
- package/dist/chunk-2762HZYX.js +284 -0
- package/dist/chunk-2762HZYX.js.map +1 -0
- package/dist/chunk-2GILNBZW.js +31 -0
- package/dist/chunk-2GILNBZW.js.map +1 -0
- package/dist/chunk-2H46IXW4.js +264 -0
- package/dist/chunk-2H46IXW4.js.map +1 -0
- package/dist/chunk-2SVX3MQQ.js +78 -0
- package/dist/chunk-2SVX3MQQ.js.map +1 -0
- package/dist/chunk-3GYOIQW7.js +242 -0
- package/dist/chunk-3GYOIQW7.js.map +1 -0
- package/dist/chunk-3NZXWCGF.js +152 -0
- package/dist/chunk-3NZXWCGF.js.map +1 -0
- package/dist/chunk-44OV3PNH.js +294 -0
- package/dist/chunk-44OV3PNH.js.map +1 -0
- package/dist/chunk-5FDOOG4J.js +15 -0
- package/dist/chunk-5FDOOG4J.js.map +1 -0
- package/dist/chunk-6I4R3HR6.js +90 -0
- package/dist/chunk-6I4R3HR6.js.map +1 -0
- package/dist/chunk-6SWK4XG5.js +128 -0
- package/dist/chunk-6SWK4XG5.js.map +1 -0
- package/dist/chunk-7NZSTCJO.js +82 -0
- package/dist/chunk-7NZSTCJO.js.map +1 -0
- package/dist/chunk-7P32XCEU.js +15 -0
- package/dist/chunk-7P32XCEU.js.map +1 -0
- package/dist/chunk-ACE7FBWE.js +216 -0
- package/dist/chunk-ACE7FBWE.js.map +1 -0
- package/dist/chunk-AIQG7IIT.js +39 -0
- package/dist/chunk-AIQG7IIT.js.map +1 -0
- package/dist/chunk-B2LCHXUB.js +26 -0
- package/dist/chunk-B2LCHXUB.js.map +1 -0
- package/dist/chunk-BEL75C7N.js +35 -0
- package/dist/chunk-BEL75C7N.js.map +1 -0
- package/dist/chunk-BJZLQTAZ.js +3 -0
- package/dist/chunk-BJZLQTAZ.js.map +1 -0
- package/dist/chunk-BUIHQJGE.js +8 -0
- package/dist/chunk-BUIHQJGE.js.map +1 -0
- package/dist/chunk-CHTN5AHI.js +106 -0
- package/dist/chunk-CHTN5AHI.js.map +1 -0
- package/dist/chunk-CSCVTESP.js +58 -0
- package/dist/chunk-CSCVTESP.js.map +1 -0
- package/dist/chunk-EEMRRRYS.js +60 -0
- package/dist/chunk-EEMRRRYS.js.map +1 -0
- package/dist/chunk-FD6P6PLQ.js +153 -0
- package/dist/chunk-FD6P6PLQ.js.map +1 -0
- package/dist/chunk-FMMKEYHB.js +3 -0
- package/dist/chunk-FMMKEYHB.js.map +1 -0
- package/dist/chunk-FUWSTUDM.js +219 -0
- package/dist/chunk-FUWSTUDM.js.map +1 -0
- package/dist/chunk-G52U24GR.js +10 -0
- package/dist/chunk-G52U24GR.js.map +1 -0
- package/dist/chunk-GTKKRV5N.js +14 -0
- package/dist/chunk-GTKKRV5N.js.map +1 -0
- package/dist/chunk-HWNPXAEN.js +31 -0
- package/dist/chunk-HWNPXAEN.js.map +1 -0
- package/dist/chunk-IFWCCAQV.js +222 -0
- package/dist/chunk-IFWCCAQV.js.map +1 -0
- package/dist/chunk-IG7FBZVM.js +101 -0
- package/dist/chunk-IG7FBZVM.js.map +1 -0
- package/dist/chunk-IHYFYMHJ.js +167 -0
- package/dist/chunk-IHYFYMHJ.js.map +1 -0
- package/dist/chunk-IRXZHLUL.js +51 -0
- package/dist/chunk-IRXZHLUL.js.map +1 -0
- package/dist/chunk-IXKELBJA.js +202 -0
- package/dist/chunk-IXKELBJA.js.map +1 -0
- package/dist/chunk-J3PELDH3.js +279 -0
- package/dist/chunk-J3PELDH3.js.map +1 -0
- package/dist/chunk-JBVFWSRQ.js +21 -0
- package/dist/chunk-JBVFWSRQ.js.map +1 -0
- package/dist/chunk-MOI7B3KH.js +217 -0
- package/dist/chunk-MOI7B3KH.js.map +1 -0
- package/dist/chunk-NF5JM2YO.js +57 -0
- package/dist/chunk-NF5JM2YO.js.map +1 -0
- package/dist/chunk-NGAQITWP.js +156 -0
- package/dist/chunk-NGAQITWP.js.map +1 -0
- package/dist/chunk-NSDM3FEB.js +82 -0
- package/dist/chunk-NSDM3FEB.js.map +1 -0
- package/dist/chunk-ORTCK34Y.js +3 -0
- package/dist/chunk-ORTCK34Y.js.map +1 -0
- package/dist/chunk-P3XMBETI.js +26 -0
- package/dist/chunk-P3XMBETI.js.map +1 -0
- package/dist/chunk-P7A3BCAC.js +93 -0
- package/dist/chunk-P7A3BCAC.js.map +1 -0
- package/dist/chunk-PJL4ZL5V.js +639 -0
- package/dist/chunk-PJL4ZL5V.js.map +1 -0
- package/dist/chunk-POKDSVQT.js +223 -0
- package/dist/chunk-POKDSVQT.js.map +1 -0
- package/dist/chunk-QMW7D5GU.js +207 -0
- package/dist/chunk-QMW7D5GU.js.map +1 -0
- package/dist/chunk-QP4I37PA.js +14 -0
- package/dist/chunk-QP4I37PA.js.map +1 -0
- package/dist/chunk-R5GMMWAY.js +3 -0
- package/dist/chunk-R5GMMWAY.js.map +1 -0
- package/dist/chunk-S53FHWNG.js +30 -0
- package/dist/chunk-S53FHWNG.js.map +1 -0
- package/dist/chunk-SIG4DMNZ.js +238 -0
- package/dist/chunk-SIG4DMNZ.js.map +1 -0
- package/dist/chunk-SKPM2FRX.js +44 -0
- package/dist/chunk-SKPM2FRX.js.map +1 -0
- package/dist/chunk-TCWYBVIL.js +33 -0
- package/dist/chunk-TCWYBVIL.js.map +1 -0
- package/dist/chunk-TMMEJKLI.js +363 -0
- package/dist/chunk-TMMEJKLI.js.map +1 -0
- package/dist/chunk-TNNH3FVQ.js +155 -0
- package/dist/chunk-TNNH3FVQ.js.map +1 -0
- package/dist/chunk-TWGCWKRV.js +44 -0
- package/dist/chunk-TWGCWKRV.js.map +1 -0
- package/dist/chunk-U5GW5EBR.js +150 -0
- package/dist/chunk-U5GW5EBR.js.map +1 -0
- package/dist/chunk-UNSAA7YG.js +148 -0
- package/dist/chunk-UNSAA7YG.js.map +1 -0
- package/dist/chunk-UVYTJQTJ.js +14 -0
- package/dist/chunk-UVYTJQTJ.js.map +1 -0
- package/dist/chunk-VLUKI3HL.js +120 -0
- package/dist/chunk-VLUKI3HL.js.map +1 -0
- package/dist/chunk-VZ2TPU4B.js +348 -0
- package/dist/chunk-VZ2TPU4B.js.map +1 -0
- package/dist/chunk-VZH6TS7M.js +153 -0
- package/dist/chunk-VZH6TS7M.js.map +1 -0
- package/dist/chunk-WYCMIIRR.js +12 -0
- package/dist/chunk-WYCMIIRR.js.map +1 -0
- package/dist/chunk-WZB6LPQI.js +47 -0
- package/dist/chunk-WZB6LPQI.js.map +1 -0
- package/dist/chunk-YBJB7FGE.js +187 -0
- package/dist/chunk-YBJB7FGE.js.map +1 -0
- package/dist/chunk-YIQI2CF3.js +92 -0
- package/dist/chunk-YIQI2CF3.js.map +1 -0
- package/dist/chunk-YKUCSV34.js +72 -0
- package/dist/chunk-YKUCSV34.js.map +1 -0
- package/dist/chunk-ZP6EBROY.js +3 -0
- package/dist/chunk-ZP6EBROY.js.map +1 -0
- package/dist/colors.css +296 -0
- package/dist/components/accordion/accordion-data.d.ts +52 -0
- package/dist/components/accordion/accordion-data.d.ts.map +1 -0
- package/dist/components/accordion/accordion.d.ts +116 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/accordion/index.js +206 -0
- package/dist/components/accordion/index.js.map +1 -0
- package/dist/components/action-icon/action-icon.d.ts +51 -0
- package/dist/components/action-icon/action-icon.d.ts.map +1 -0
- package/dist/components/action-icon/index.d.ts +2 -0
- package/dist/components/action-icon/index.d.ts.map +1 -0
- package/dist/components/action-icon/index.js +8 -0
- package/dist/components/action-icon/index.js.map +1 -0
- package/dist/components/alert/alert.d.ts +82 -0
- package/dist/components/alert/alert.d.ts.map +1 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/index.d.ts.map +1 -0
- package/dist/components/alert/index.js +74 -0
- package/dist/components/alert/index.js.map +1 -0
- package/dist/components/ambient-background/ambient-background.d.ts +47 -0
- package/dist/components/ambient-background/ambient-background.d.ts.map +1 -0
- package/dist/components/ambient-background/index.d.ts +2 -0
- package/dist/components/ambient-background/index.d.ts.map +1 -0
- package/dist/components/ambient-background/index.js +35 -0
- package/dist/components/ambient-background/index.js.map +1 -0
- package/dist/components/app-shell/app-shell.d.ts +185 -0
- package/dist/components/app-shell/app-shell.d.ts.map +1 -0
- package/dist/components/app-shell/index.d.ts +2 -0
- package/dist/components/app-shell/index.d.ts.map +1 -0
- package/dist/components/app-shell/index.js +243 -0
- package/dist/components/app-shell/index.js.map +1 -0
- package/dist/components/autocomplete/autocomplete.d.ts +70 -0
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -0
- package/dist/components/autocomplete/index.d.ts +3 -0
- package/dist/components/autocomplete/index.d.ts.map +1 -0
- package/dist/components/autocomplete/index.js +149 -0
- package/dist/components/autocomplete/index.js.map +1 -0
- package/dist/components/avatar/avatar.d.ts +105 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/avatar/index.js +211 -0
- package/dist/components/avatar/index.js.map +1 -0
- package/dist/components/badge/badge.d.ts +48 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/badge/index.js +102 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +64 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.js +203 -0
- package/dist/components/breadcrumb/index.js.map +1 -0
- package/dist/components/button/button.d.ts +72 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +9 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button-group/button-group.d.ts +49 -0
- package/dist/components/button-group/button-group.d.ts.map +1 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/button-group/index.d.ts.map +1 -0
- package/dist/components/button-group/index.js +5 -0
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/components/button-multi-select/button-multi-select.d.ts +39 -0
- package/dist/components/button-multi-select/button-multi-select.d.ts.map +1 -0
- package/dist/components/button-multi-select/index.d.ts +5 -0
- package/dist/components/button-multi-select/index.d.ts.map +1 -0
- package/dist/components/button-multi-select/index.js +45 -0
- package/dist/components/button-multi-select/index.js.map +1 -0
- package/dist/components/button-select/button-select-control.d.ts +56 -0
- package/dist/components/button-select/button-select-control.d.ts.map +1 -0
- package/dist/components/button-select/button-select-data.d.ts +53 -0
- package/dist/components/button-select/button-select-data.d.ts.map +1 -0
- package/dist/components/button-select/button-select-items.d.ts +72 -0
- package/dist/components/button-select/button-select-items.d.ts.map +1 -0
- package/dist/components/button-select/button-select.d.ts +98 -0
- package/dist/components/button-select/button-select.d.ts.map +1 -0
- package/dist/components/button-select/index.d.ts +5 -0
- package/dist/components/button-select/index.d.ts.map +1 -0
- package/dist/components/button-select/index.js +45 -0
- package/dist/components/button-select/index.js.map +1 -0
- package/dist/components/calendar/calendar-body.d.ts +48 -0
- package/dist/components/calendar/calendar-body.d.ts.map +1 -0
- package/dist/components/calendar/calendar.d.ts +88 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -0
- package/dist/components/calendar/index.d.ts +4 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/calendar/index.js +11 -0
- package/dist/components/calendar/index.js.map +1 -0
- package/dist/components/card/card.d.ts +69 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/index.d.ts.map +1 -0
- package/dist/components/card/index.js +6 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/chart/chart.d.ts +103 -0
- package/dist/components/chart/chart.d.ts.map +1 -0
- package/dist/components/chart/index.d.ts +2 -0
- package/dist/components/chart/index.d.ts.map +1 -0
- package/dist/components/chart/index.js +70 -0
- package/dist/components/chart/index.js.map +1 -0
- package/dist/components/chart/styles.css +50 -0
- package/dist/components/checkbox/checkbox.d.ts +74 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/control.d.ts +28 -0
- package/dist/components/checkbox/control.d.ts.map +1 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/index.js +10 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/choice-card-group/choice-card-group.d.ts +148 -0
- package/dist/components/choice-card-group/choice-card-group.d.ts.map +1 -0
- package/dist/components/choice-card-group/index.d.ts +2 -0
- package/dist/components/choice-card-group/index.d.ts.map +1 -0
- package/dist/components/choice-card-group/index.js +280 -0
- package/dist/components/choice-card-group/index.js.map +1 -0
- package/dist/components/circular-progress/circular-progress.d.ts +49 -0
- package/dist/components/circular-progress/circular-progress.d.ts.map +1 -0
- package/dist/components/circular-progress/index.d.ts +2 -0
- package/dist/components/circular-progress/index.d.ts.map +1 -0
- package/dist/components/circular-progress/index.js +133 -0
- package/dist/components/circular-progress/index.js.map +1 -0
- package/dist/components/clipboard/clipboard.d.ts +95 -0
- package/dist/components/clipboard/clipboard.d.ts.map +1 -0
- package/dist/components/clipboard/copy.d.ts +67 -0
- package/dist/components/clipboard/copy.d.ts.map +1 -0
- package/dist/components/clipboard/index.d.ts +3 -0
- package/dist/components/clipboard/index.d.ts.map +1 -0
- package/dist/components/clipboard/index.js +86 -0
- package/dist/components/clipboard/index.js.map +1 -0
- package/dist/components/code/code.d.ts +37 -0
- package/dist/components/code/code.d.ts.map +1 -0
- package/dist/components/code/index.d.ts +2 -0
- package/dist/components/code/index.d.ts.map +1 -0
- package/dist/components/code/index.js +28 -0
- package/dist/components/code/index.js.map +1 -0
- package/dist/components/code-block/chrome.d.ts +77 -0
- package/dist/components/code-block/chrome.d.ts.map +1 -0
- package/dist/components/code-block/chrome.js +15 -0
- package/dist/components/code-block/chrome.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +99 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -0
- package/dist/components/code-block/diff.d.ts +79 -0
- package/dist/components/code-block/diff.d.ts.map +1 -0
- package/dist/components/code-block/diff.js +23 -0
- package/dist/components/code-block/diff.js.map +1 -0
- package/dist/components/code-block/gutters.d.ts +100 -0
- package/dist/components/code-block/gutters.d.ts.map +1 -0
- package/dist/components/code-block/highlighter.d.ts +84 -0
- package/dist/components/code-block/highlighter.d.ts.map +1 -0
- package/dist/components/code-block/index.d.ts +23 -0
- package/dist/components/code-block/index.d.ts.map +1 -0
- package/dist/components/code-block/index.js +463 -0
- package/dist/components/code-block/index.js.map +1 -0
- package/dist/components/code-block/notation.d.ts +126 -0
- package/dist/components/code-block/notation.d.ts.map +1 -0
- package/dist/components/code-block/presets.d.ts +23 -0
- package/dist/components/code-block/presets.d.ts.map +1 -0
- package/dist/components/code-block/static.d.ts +65 -0
- package/dist/components/code-block/static.d.ts.map +1 -0
- package/dist/components/code-block/static.js +380 -0
- package/dist/components/code-block/static.js.map +1 -0
- package/dist/components/code-block/styles.css +198 -0
- package/dist/components/collapse/collapse.d.ts +50 -0
- package/dist/components/collapse/collapse.d.ts.map +1 -0
- package/dist/components/collapse/index.d.ts +2 -0
- package/dist/components/collapse/index.d.ts.map +1 -0
- package/dist/components/collapse/index.js +5 -0
- package/dist/components/collapse/index.js.map +1 -0
- package/dist/components/combobox/combobox.d.ts +78 -0
- package/dist/components/combobox/combobox.d.ts.map +1 -0
- package/dist/components/combobox/index.d.ts +3 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/combobox/index.js +15 -0
- package/dist/components/combobox/index.js.map +1 -0
- package/dist/components/combobox-list/combobox-list.d.ts +77 -0
- package/dist/components/combobox-list/combobox-list.d.ts.map +1 -0
- package/dist/components/combobox-list/index.d.ts +2 -0
- package/dist/components/combobox-list/index.d.ts.map +1 -0
- package/dist/components/combobox-list/index.js +16 -0
- package/dist/components/combobox-list/index.js.map +1 -0
- package/dist/components/container/container.d.ts +18 -0
- package/dist/components/container/container.d.ts.map +1 -0
- package/dist/components/container/index.d.ts +2 -0
- package/dist/components/container/index.d.ts.map +1 -0
- package/dist/components/container/index.js +40 -0
- package/dist/components/container/index.js.map +1 -0
- package/dist/components/data-table/data-table-features.d.ts +80 -0
- package/dist/components/data-table/data-table-features.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/data-table-date-filter.d.ts +53 -0
- package/dist/components/data-table/data-table-filter/data-table-date-filter.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/data-table-filter-fns.d.ts +18 -0
- package/dist/components/data-table/data-table-filter/data-table-filter-fns.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts +7 -0
- package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/data-table-select-filter.d.ts +15 -0
- package/dist/components/data-table/data-table-filter/data-table-select-filter.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/data-table-text-filter.d.ts +7 -0
- package/dist/components/data-table/data-table-filter/data-table-text-filter.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/index.d.ts +15 -0
- package/dist/components/data-table/data-table-filter/index.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/utils.d.ts +52 -0
- package/dist/components/data-table/data-table-filter/utils.d.ts.map +1 -0
- package/dist/components/data-table/data-table-header-cell.d.ts +65 -0
- package/dist/components/data-table/data-table-header-cell.d.ts.map +1 -0
- package/dist/components/data-table/data-table-meta.d.ts +103 -0
- package/dist/components/data-table/data-table-meta.d.ts.map +1 -0
- package/dist/components/data-table/data-table-pagination.d.ts +56 -0
- package/dist/components/data-table/data-table-pagination.d.ts.map +1 -0
- package/dist/components/data-table/data-table-placeholder.d.ts +18 -0
- package/dist/components/data-table/data-table-placeholder.d.ts.map +1 -0
- package/dist/components/data-table/data-table-schema.d.ts +45 -0
- package/dist/components/data-table/data-table-schema.d.ts.map +1 -0
- package/dist/components/data-table/data-table-skeleton.d.ts +10 -0
- package/dist/components/data-table/data-table-skeleton.d.ts.map +1 -0
- package/dist/components/data-table/data-table-stack.d.ts +48 -0
- package/dist/components/data-table/data-table-stack.d.ts.map +1 -0
- package/dist/components/data-table/data-table-state.d.ts +10 -0
- package/dist/components/data-table/data-table-state.d.ts.map +1 -0
- package/dist/components/data-table/data-table-toolbar.d.ts +21 -0
- package/dist/components/data-table/data-table-toolbar.d.ts.map +1 -0
- package/dist/components/data-table/data-table.d.ts +194 -0
- package/dist/components/data-table/data-table.d.ts.map +1 -0
- package/dist/components/data-table/index.d.ts +14 -0
- package/dist/components/data-table/index.d.ts.map +1 -0
- package/dist/components/data-table/index.js +1603 -0
- package/dist/components/data-table/index.js.map +1 -0
- package/dist/components/date-picker/aliases.d.ts +11 -0
- package/dist/components/date-picker/aliases.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.d.ts +204 -0
- package/dist/components/date-picker/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker/date-time-text.d.ts +32 -0
- package/dist/components/date-picker/date-time-text.d.ts.map +1 -0
- package/dist/components/date-picker/index.d.ts +7 -0
- package/dist/components/date-picker/index.d.ts.map +1 -0
- package/dist/components/date-picker/index.js +48 -0
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/divider/divider.d.ts +79 -0
- package/dist/components/divider/divider.d.ts.map +1 -0
- package/dist/components/divider/index.d.ts +2 -0
- package/dist/components/divider/index.d.ts.map +1 -0
- package/dist/components/divider/index.js +5 -0
- package/dist/components/divider/index.js.map +1 -0
- package/dist/components/drawer/drawer.d.ts +103 -0
- package/dist/components/drawer/drawer.d.ts.map +1 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.d.ts.map +1 -0
- package/dist/components/drawer/index.js +13 -0
- package/dist/components/drawer/index.js.map +1 -0
- package/dist/components/field/field.d.ts +79 -0
- package/dist/components/field/field.d.ts.map +1 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/field/index.d.ts.map +1 -0
- package/dist/components/field/index.js +6 -0
- package/dist/components/field/index.js.map +1 -0
- package/dist/components/file-upload/file-upload.d.ts +68 -0
- package/dist/components/file-upload/file-upload.d.ts.map +1 -0
- package/dist/components/file-upload/index.d.ts +2 -0
- package/dist/components/file-upload/index.d.ts.map +1 -0
- package/dist/components/file-upload/index.js +189 -0
- package/dist/components/file-upload/index.js.map +1 -0
- package/dist/components/flex/flex.d.ts +25 -0
- package/dist/components/flex/flex.d.ts.map +1 -0
- package/dist/components/flex/index.d.ts +2 -0
- package/dist/components/flex/index.d.ts.map +1 -0
- package/dist/components/flex/index.js +5 -0
- package/dist/components/flex/index.js.map +1 -0
- package/dist/components/grid/grid.d.ts +21 -0
- package/dist/components/grid/grid.d.ts.map +1 -0
- package/dist/components/grid/index.d.ts +2 -0
- package/dist/components/grid/index.d.ts.map +1 -0
- package/dist/components/grid/index.js +44 -0
- package/dist/components/grid/index.js.map +1 -0
- package/dist/components/hover-card/hover-card.d.ts +122 -0
- package/dist/components/hover-card/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card/index.d.ts +2 -0
- package/dist/components/hover-card/index.d.ts.map +1 -0
- package/dist/components/hover-card/index.js +157 -0
- package/dist/components/hover-card/index.js.map +1 -0
- package/dist/components/indicator/index.d.ts +2 -0
- package/dist/components/indicator/index.d.ts.map +1 -0
- package/dist/components/indicator/index.js +152 -0
- package/dist/components/indicator/index.js.map +1 -0
- package/dist/components/indicator/indicator.d.ts +69 -0
- package/dist/components/indicator/indicator.d.ts.map +1 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.js +7 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/input.d.ts +116 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/kbd/index.d.ts +2 -0
- package/dist/components/kbd/index.d.ts.map +1 -0
- package/dist/components/kbd/index.js +65 -0
- package/dist/components/kbd/index.js.map +1 -0
- package/dist/components/kbd/kbd.d.ts +43 -0
- package/dist/components/kbd/kbd.d.ts.map +1 -0
- package/dist/components/mark/index.d.ts +2 -0
- package/dist/components/mark/index.d.ts.map +1 -0
- package/dist/components/mark/index.js +5 -0
- package/dist/components/mark/index.js.map +1 -0
- package/dist/components/mark/mark.d.ts +50 -0
- package/dist/components/mark/mark.d.ts.map +1 -0
- package/dist/components/menu/index.d.ts +3 -0
- package/dist/components/menu/index.d.ts.map +1 -0
- package/dist/components/menu/index.js +88 -0
- package/dist/components/menu/index.js.map +1 -0
- package/dist/components/menu/menu-data.d.ts +119 -0
- package/dist/components/menu/menu-data.d.ts.map +1 -0
- package/dist/components/menu/menu.d.ts +123 -0
- package/dist/components/menu/menu.d.ts.map +1 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.d.ts.map +1 -0
- package/dist/components/modal/index.js +12 -0
- package/dist/components/modal/index.js.map +1 -0
- package/dist/components/modal/modal.d.ts +100 -0
- package/dist/components/modal/modal.d.ts.map +1 -0
- package/dist/components/multi-combobox-list/index.d.ts +2 -0
- package/dist/components/multi-combobox-list/index.d.ts.map +1 -0
- package/dist/components/multi-combobox-list/index.js +16 -0
- package/dist/components/multi-combobox-list/index.js.map +1 -0
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +83 -0
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -0
- package/dist/components/multi-select/index.d.ts +3 -0
- package/dist/components/multi-select/index.d.ts.map +1 -0
- package/dist/components/multi-select/index.js +203 -0
- package/dist/components/multi-select/index.js.map +1 -0
- package/dist/components/multi-select/multi-select.d.ts +83 -0
- package/dist/components/multi-select/multi-select.d.ts.map +1 -0
- package/dist/components/nav-link/index.d.ts +3 -0
- package/dist/components/nav-link/index.d.ts.map +1 -0
- package/dist/components/nav-link/index.js +11 -0
- package/dist/components/nav-link/index.js.map +1 -0
- package/dist/components/nav-link/nav-link.d.ts +40 -0
- package/dist/components/nav-link/nav-link.d.ts.map +1 -0
- package/dist/components/nav-link/navigation.d.ts +45 -0
- package/dist/components/nav-link/navigation.d.ts.map +1 -0
- package/dist/components/nav-link/tanstack.d.ts +38 -0
- package/dist/components/nav-link/tanstack.d.ts.map +1 -0
- package/dist/components/nav-link/tanstack.js +21 -0
- package/dist/components/nav-link/tanstack.js.map +1 -0
- package/dist/components/notification/create-notifier.d.ts +117 -0
- package/dist/components/notification/create-notifier.d.ts.map +1 -0
- package/dist/components/notification/index.d.ts +5 -0
- package/dist/components/notification/index.d.ts.map +1 -0
- package/dist/components/notification/index.js +388 -0
- package/dist/components/notification/index.js.map +1 -0
- package/dist/components/notification/notification.d.ts +124 -0
- package/dist/components/notification/notification.d.ts.map +1 -0
- package/dist/components/notification/store.d.ts +42 -0
- package/dist/components/notification/store.d.ts.map +1 -0
- package/dist/components/notification/types.d.ts +62 -0
- package/dist/components/notification/types.d.ts.map +1 -0
- package/dist/components/number-input/index.d.ts +2 -0
- package/dist/components/number-input/index.d.ts.map +1 -0
- package/dist/components/number-input/index.js +16 -0
- package/dist/components/number-input/index.js.map +1 -0
- package/dist/components/number-input/number-input.d.ts +105 -0
- package/dist/components/number-input/number-input.d.ts.map +1 -0
- package/dist/components/overlays/create-overlays.d.ts +77 -0
- package/dist/components/overlays/create-overlays.d.ts.map +1 -0
- package/dist/components/overlays/index.d.ts +4 -0
- package/dist/components/overlays/index.d.ts.map +1 -0
- package/dist/components/overlays/index.js +332 -0
- package/dist/components/overlays/index.js.map +1 -0
- package/dist/components/overlays/renderer.d.ts +30 -0
- package/dist/components/overlays/renderer.d.ts.map +1 -0
- package/dist/components/overlays/store.d.ts +33 -0
- package/dist/components/overlays/store.d.ts.map +1 -0
- package/dist/components/overlays/types.d.ts +119 -0
- package/dist/components/overlays/types.d.ts.map +1 -0
- package/dist/components/password-input/index.d.ts +2 -0
- package/dist/components/password-input/index.d.ts.map +1 -0
- package/dist/components/password-input/index.js +125 -0
- package/dist/components/password-input/index.js.map +1 -0
- package/dist/components/password-input/password-input.d.ts +65 -0
- package/dist/components/password-input/password-input.d.ts.map +1 -0
- package/dist/components/pill/index.d.ts +2 -0
- package/dist/components/pill/index.d.ts.map +1 -0
- package/dist/components/pill/index.js +8 -0
- package/dist/components/pill/index.js.map +1 -0
- package/dist/components/pill/pill.d.ts +69 -0
- package/dist/components/pill/pill.d.ts.map +1 -0
- package/dist/components/pills-input/index.d.ts +2 -0
- package/dist/components/pills-input/index.d.ts.map +1 -0
- package/dist/components/pills-input/index.js +10 -0
- package/dist/components/pills-input/index.js.map +1 -0
- package/dist/components/pills-input/pills-input.d.ts +146 -0
- package/dist/components/pills-input/pills-input.d.ts.map +1 -0
- package/dist/components/pin-input/index.d.ts +2 -0
- package/dist/components/pin-input/index.d.ts.map +1 -0
- package/dist/components/pin-input/index.js +107 -0
- package/dist/components/pin-input/index.js.map +1 -0
- package/dist/components/pin-input/pin-input.d.ts +80 -0
- package/dist/components/pin-input/pin-input.d.ts.map +1 -0
- package/dist/components/popover/icons.d.ts +24 -0
- package/dist/components/popover/icons.d.ts.map +1 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.d.ts.map +1 -0
- package/dist/components/popover/index.js +10 -0
- package/dist/components/popover/index.js.map +1 -0
- package/dist/components/popover/popover.d.ts +190 -0
- package/dist/components/popover/popover.d.ts.map +1 -0
- package/dist/components/progress/index.d.ts +2 -0
- package/dist/components/progress/index.d.ts.map +1 -0
- package/dist/components/progress/index.js +111 -0
- package/dist/components/progress/index.js.map +1 -0
- package/dist/components/progress/progress.d.ts +47 -0
- package/dist/components/progress/progress.d.ts.map +1 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/index.d.ts.map +1 -0
- package/dist/components/radio-group/index.js +104 -0
- package/dist/components/radio-group/index.js.map +1 -0
- package/dist/components/radio-group/radio-group.d.ts +86 -0
- package/dist/components/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/rating/icons.d.ts +19 -0
- package/dist/components/rating/icons.d.ts.map +1 -0
- package/dist/components/rating/index.d.ts +2 -0
- package/dist/components/rating/index.d.ts.map +1 -0
- package/dist/components/rating/index.js +194 -0
- package/dist/components/rating/index.js.map +1 -0
- package/dist/components/rating/rating.d.ts +119 -0
- package/dist/components/rating/rating.d.ts.map +1 -0
- package/dist/components/schedule/index.d.ts +98 -0
- package/dist/components/schedule/index.d.ts.map +1 -0
- package/dist/components/schedule/index.js +6582 -0
- package/dist/components/schedule/index.js.map +1 -0
- package/dist/components/schedule/now-cursor-line.d.ts +97 -0
- package/dist/components/schedule/now-cursor-line.d.ts.map +1 -0
- package/dist/components/schedule/schedule-agenda-list.d.ts +55 -0
- package/dist/components/schedule/schedule-agenda-list.d.ts.map +1 -0
- package/dist/components/schedule/schedule-agenda-view.d.ts +48 -0
- package/dist/components/schedule/schedule-agenda-view.d.ts.map +1 -0
- package/dist/components/schedule/schedule-all-day-row.d.ts +100 -0
- package/dist/components/schedule/schedule-all-day-row.d.ts.map +1 -0
- package/dist/components/schedule/schedule-create-draft.d.ts +29 -0
- package/dist/components/schedule/schedule-create-draft.d.ts.map +1 -0
- package/dist/components/schedule/schedule-dates.d.ts +359 -0
- package/dist/components/schedule/schedule-dates.d.ts.map +1 -0
- package/dist/components/schedule/schedule-day-view.d.ts +24 -0
- package/dist/components/schedule/schedule-day-view.d.ts.map +1 -0
- package/dist/components/schedule/schedule-days-view.d.ts +60 -0
- package/dist/components/schedule/schedule-days-view.d.ts.map +1 -0
- package/dist/components/schedule/schedule-disabled-overlay.d.ts +34 -0
- package/dist/components/schedule/schedule-disabled-overlay.d.ts.map +1 -0
- package/dist/components/schedule/schedule-drag-ghost.d.ts +24 -0
- package/dist/components/schedule/schedule-drag-ghost.d.ts.map +1 -0
- package/dist/components/schedule/schedule-event-chip.d.ts +101 -0
- package/dist/components/schedule/schedule-event-chip.d.ts.map +1 -0
- package/dist/components/schedule/schedule-event-details.d.ts +37 -0
- package/dist/components/schedule/schedule-event-details.d.ts.map +1 -0
- package/dist/components/schedule/schedule-event-list-popover-content.d.ts +41 -0
- package/dist/components/schedule/schedule-event-list-popover-content.d.ts.map +1 -0
- package/dist/components/schedule/schedule-event-styles.d.ts +58 -0
- package/dist/components/schedule/schedule-event-styles.d.ts.map +1 -0
- package/dist/components/schedule/schedule-geometry.d.ts +291 -0
- package/dist/components/schedule/schedule-geometry.d.ts.map +1 -0
- package/dist/components/schedule/schedule-grid-gesture.d.ts +288 -0
- package/dist/components/schedule/schedule-grid-gesture.d.ts.map +1 -0
- package/dist/components/schedule/schedule-layout.d.ts +83 -0
- package/dist/components/schedule/schedule-layout.d.ts.map +1 -0
- package/dist/components/schedule/schedule-month-view.d.ts +44 -0
- package/dist/components/schedule/schedule-month-view.d.ts.map +1 -0
- package/dist/components/schedule/schedule-next-up-grouping.d.ts +37 -0
- package/dist/components/schedule/schedule-next-up-grouping.d.ts.map +1 -0
- package/dist/components/schedule/schedule-next-up.d.ts +79 -0
- package/dist/components/schedule/schedule-next-up.d.ts.map +1 -0
- package/dist/components/schedule/schedule-overflow-chip.d.ts +45 -0
- package/dist/components/schedule/schedule-overflow-chip.d.ts.map +1 -0
- package/dist/components/schedule/schedule-overflow-popover.d.ts +57 -0
- package/dist/components/schedule/schedule-overflow-popover.d.ts.map +1 -0
- package/dist/components/schedule/schedule-segments.d.ts +89 -0
- package/dist/components/schedule/schedule-segments.d.ts.map +1 -0
- package/dist/components/schedule/schedule-snap.d.ts +204 -0
- package/dist/components/schedule/schedule-snap.d.ts.map +1 -0
- package/dist/components/schedule/schedule-timed-grid.d.ts +78 -0
- package/dist/components/schedule/schedule-timed-grid.d.ts.map +1 -0
- package/dist/components/schedule/schedule-toolbar.d.ts +107 -0
- package/dist/components/schedule/schedule-toolbar.d.ts.map +1 -0
- package/dist/components/schedule/schedule-types.d.ts +841 -0
- package/dist/components/schedule/schedule-types.d.ts.map +1 -0
- package/dist/components/schedule/schedule-views.d.ts +197 -0
- package/dist/components/schedule/schedule-views.d.ts.map +1 -0
- package/dist/components/schedule/schedule-week-view.d.ts +19 -0
- package/dist/components/schedule/schedule-week-view.d.ts.map +1 -0
- package/dist/components/schedule/schedule-year-view.d.ts +38 -0
- package/dist/components/schedule/schedule-year-view.d.ts.map +1 -0
- package/dist/components/schedule/schedule.d.ts +163 -0
- package/dist/components/schedule/schedule.d.ts.map +1 -0
- package/dist/components/schedule/use-event-create.d.ts +54 -0
- package/dist/components/schedule/use-event-create.d.ts.map +1 -0
- package/dist/components/schedule/use-event-drag.d.ts +95 -0
- package/dist/components/schedule/use-event-drag.d.ts.map +1 -0
- package/dist/components/schedule/use-event-resize.d.ts +63 -0
- package/dist/components/schedule/use-event-resize.d.ts.map +1 -0
- package/dist/components/schedule/use-schedule-selection.d.ts +74 -0
- package/dist/components/schedule/use-schedule-selection.d.ts.map +1 -0
- package/dist/components/schedule/use-schedule.d.ts +78 -0
- package/dist/components/schedule/use-schedule.d.ts.map +1 -0
- package/dist/components/segment-group/index.d.ts +2 -0
- package/dist/components/segment-group/index.d.ts.map +1 -0
- package/dist/components/segment-group/index.js +10 -0
- package/dist/components/segment-group/index.js.map +1 -0
- package/dist/components/segment-group/segment-group.d.ts +187 -0
- package/dist/components/segment-group/segment-group.d.ts.map +1 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/index.js +17 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/select/select.d.ts +83 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.d.ts.map +1 -0
- package/dist/components/skeleton/index.js +5 -0
- package/dist/components/skeleton/index.js.map +1 -0
- package/dist/components/skeleton/skeleton.d.ts +83 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/slider/index.d.ts.map +1 -0
- package/dist/components/slider/index.js +258 -0
- package/dist/components/slider/index.js.map +1 -0
- package/dist/components/slider/slider.d.ts +90 -0
- package/dist/components/slider/slider.d.ts.map +1 -0
- package/dist/components/slider/sliderThumb.d.ts +1 -0
- package/dist/components/slider/sliderThumb.d.ts.map +1 -0
- package/dist/components/spinner/index.d.ts +2 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/spinner/index.js +5 -0
- package/dist/components/spinner/index.js.map +1 -0
- package/dist/components/spinner/spinner.d.ts +61 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.d.ts.map +1 -0
- package/dist/components/switch/index.js +140 -0
- package/dist/components/switch/index.js.map +1 -0
- package/dist/components/switch/switch.d.ts +48 -0
- package/dist/components/switch/switch.d.ts.map +1 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/table/index.js +5 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/table/table.d.ts +113 -0
- package/dist/components/table/table.d.ts.map +1 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/index.js +8 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/tabs/tabs-data.d.ts +67 -0
- package/dist/components/tabs/tabs-data.d.ts.map +1 -0
- package/dist/components/tabs/tabs.d.ts +96 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tags-input/index.d.ts +2 -0
- package/dist/components/tags-input/index.d.ts.map +1 -0
- package/dist/components/tags-input/index.js +203 -0
- package/dist/components/tags-input/index.js.map +1 -0
- package/dist/components/tags-input/tags-input.d.ts +68 -0
- package/dist/components/tags-input/tags-input.d.ts.map +1 -0
- package/dist/components/text/index.d.ts +2 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/components/text/index.js +6 -0
- package/dist/components/text/index.js.map +1 -0
- package/dist/components/text/text.d.ts +50 -0
- package/dist/components/text/text.d.ts.map +1 -0
- package/dist/components/text-input/index.d.ts +2 -0
- package/dist/components/text-input/index.d.ts.map +1 -0
- package/dist/components/text-input/index.js +34 -0
- package/dist/components/text-input/index.js.map +1 -0
- package/dist/components/text-input/text-input.d.ts +56 -0
- package/dist/components/text-input/text-input.d.ts.map +1 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/index.d.ts.map +1 -0
- package/dist/components/textarea/index.js +116 -0
- package/dist/components/textarea/index.js.map +1 -0
- package/dist/components/textarea/textarea.d.ts +48 -0
- package/dist/components/textarea/textarea.d.ts.map +1 -0
- package/dist/components/theme-icon/index.d.ts +2 -0
- package/dist/components/theme-icon/index.d.ts.map +1 -0
- package/dist/components/theme-icon/index.js +6 -0
- package/dist/components/theme-icon/index.js.map +1 -0
- package/dist/components/theme-icon/theme-icon.d.ts +34 -0
- package/dist/components/theme-icon/theme-icon.d.ts.map +1 -0
- package/dist/components/theme-script/index.d.ts +2 -0
- package/dist/components/theme-script/index.d.ts.map +1 -0
- package/dist/components/theme-script/index.js +29 -0
- package/dist/components/theme-script/index.js.map +1 -0
- package/dist/components/theme-script/theme-script.d.ts +41 -0
- package/dist/components/theme-script/theme-script.d.ts.map +1 -0
- package/dist/components/time-input/hour-cycle.d.ts +32 -0
- package/dist/components/time-input/hour-cycle.d.ts.map +1 -0
- package/dist/components/time-input/index.d.ts +3 -0
- package/dist/components/time-input/index.d.ts.map +1 -0
- package/dist/components/time-input/index.js +125 -0
- package/dist/components/time-input/index.js.map +1 -0
- package/dist/components/time-input/time-input.d.ts +63 -0
- package/dist/components/time-input/time-input.d.ts.map +1 -0
- package/dist/components/time-input/time-row.d.ts +72 -0
- package/dist/components/time-input/time-row.d.ts.map +1 -0
- package/dist/components/timeline/index.d.ts +2 -0
- package/dist/components/timeline/index.d.ts.map +1 -0
- package/dist/components/timeline/index.js +372 -0
- package/dist/components/timeline/index.js.map +1 -0
- package/dist/components/timeline/timeline.d.ts +194 -0
- package/dist/components/timeline/timeline.d.ts.map +1 -0
- package/dist/components/title/index.d.ts +2 -0
- package/dist/components/title/index.d.ts.map +1 -0
- package/dist/components/title/index.js +6 -0
- package/dist/components/title/index.js.map +1 -0
- package/dist/components/title/title.d.ts +47 -0
- package/dist/components/title/title.d.ts.map +1 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/index.js +10 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +70 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tree-multi-select/index.d.ts +3 -0
- package/dist/components/tree-multi-select/index.d.ts.map +1 -0
- package/dist/components/tree-multi-select/index.js +424 -0
- package/dist/components/tree-multi-select/index.js.map +1 -0
- package/dist/components/tree-multi-select/tree-multi-select.d.ts +72 -0
- package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -0
- package/dist/components/tree-select/index.d.ts +3 -0
- package/dist/components/tree-select/index.d.ts.map +1 -0
- package/dist/components/tree-select/index.js +425 -0
- package/dist/components/tree-select/index.js.map +1 -0
- package/dist/components/tree-select/tree-select.d.ts +68 -0
- package/dist/components/tree-select/tree-select.d.ts.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +269 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/align.d.ts +7 -0
- package/dist/lib/align.d.ts.map +1 -0
- package/dist/lib/available-if.d.ts +114 -0
- package/dist/lib/available-if.d.ts.map +1 -0
- package/dist/lib/brand.d.ts +22 -0
- package/dist/lib/brand.d.ts.map +1 -0
- package/dist/lib/cn.d.ts +14 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +3 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/lib/colors.d.ts +14 -0
- package/dist/lib/colors.d.ts.map +1 -0
- package/dist/lib/control-open.d.ts +28 -0
- package/dist/lib/control-open.d.ts.map +1 -0
- package/dist/lib/date-predicates.d.ts +28 -0
- package/dist/lib/date-predicates.d.ts.map +1 -0
- package/dist/lib/date-value.d.ts +45 -0
- package/dist/lib/date-value.d.ts.map +1 -0
- package/dist/lib/dev-warn.d.ts +2 -0
- package/dist/lib/dev-warn.d.ts.map +1 -0
- package/dist/lib/focus-styles.d.ts +102 -0
- package/dist/lib/focus-styles.d.ts.map +1 -0
- package/dist/lib/form-control.d.ts +72 -0
- package/dist/lib/form-control.d.ts.map +1 -0
- package/dist/lib/gradient.d.ts +31 -0
- package/dist/lib/gradient.d.ts.map +1 -0
- package/dist/lib/intl.d.ts +77 -0
- package/dist/lib/intl.d.ts.map +1 -0
- package/dist/lib/link-component.d.ts +13 -0
- package/dist/lib/link-component.d.ts.map +1 -0
- package/dist/lib/merge-refs.d.ts +12 -0
- package/dist/lib/merge-refs.d.ts.map +1 -0
- package/dist/lib/overlay-container.d.ts +14 -0
- package/dist/lib/overlay-container.d.ts.map +1 -0
- package/dist/lib/overlay-layer.d.ts +51 -0
- package/dist/lib/overlay-layer.d.ts.map +1 -0
- package/dist/lib/placement.d.ts +16 -0
- package/dist/lib/placement.d.ts.map +1 -0
- package/dist/lib/props.d.ts +40 -0
- package/dist/lib/props.d.ts.map +1 -0
- package/dist/lib/required-if.d.ts +46 -0
- package/dist/lib/required-if.d.ts.map +1 -0
- package/dist/lib/schedule-predicates.d.ts +72 -0
- package/dist/lib/schedule-predicates.d.ts.map +1 -0
- package/dist/lib/select-data.d.ts +135 -0
- package/dist/lib/select-data.d.ts.map +1 -0
- package/dist/lib/sizes.d.ts +20 -0
- package/dist/lib/sizes.d.ts.map +1 -0
- package/dist/lib/test-id.d.ts +30 -0
- package/dist/lib/test-id.d.ts.map +1 -0
- package/dist/lib/theme-init-runtime.d.ts +26 -0
- package/dist/lib/theme-init-runtime.d.ts.map +1 -0
- package/dist/lib/theme.d.ts +93 -0
- package/dist/lib/theme.d.ts.map +1 -0
- package/dist/lib/tree-data.d.ts +99 -0
- package/dist/lib/tree-data.d.ts.map +1 -0
- package/dist/lib/typography-size.d.ts +49 -0
- package/dist/lib/typography-size.d.ts.map +1 -0
- package/dist/lib/use-container-query.d.ts +19 -0
- package/dist/lib/use-container-query.d.ts.map +1 -0
- package/dist/lib/use-disclosure.d.ts +35 -0
- package/dist/lib/use-disclosure.d.ts.map +1 -0
- package/dist/lib/use-isomorphic-layout-effect.d.ts +12 -0
- package/dist/lib/use-isomorphic-layout-effect.d.ts.map +1 -0
- package/dist/lib/use-local-storage.d.ts +45 -0
- package/dist/lib/use-local-storage.d.ts.map +1 -0
- package/dist/lib/use-logger.d.ts +2 -0
- package/dist/lib/use-logger.d.ts.map +1 -0
- package/dist/lib/use-media-query.d.ts +11 -0
- package/dist/lib/use-media-query.d.ts.map +1 -0
- package/dist/lib/use-now.d.ts +7 -0
- package/dist/lib/use-now.d.ts.map +1 -0
- package/dist/lib/use-theme.d.ts +101 -0
- package/dist/lib/use-theme.d.ts.map +1 -0
- package/dist/lib/use-uncontrolled.d.ts +45 -0
- package/dist/lib/use-uncontrolled.d.ts.map +1 -0
- package/dist/styles.css +17 -0
- package/dist/test-setup.d.ts +2 -0
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/theme-init-script.d.ts +2 -0
- package/dist/theme-init-script.d.ts.map +1 -0
- package/dist/theme-init.js +2 -0
- package/dist/theme-init.js.map +1 -0
- package/dist/theme.css +1275 -0
- package/package.json +100 -4
- package/src/colors.css +296 -0
- package/src/components/accordion/accordion-data.tsx +86 -0
- package/src/components/accordion/accordion.test.tsx +234 -0
- package/src/components/accordion/accordion.tsx +336 -0
- package/src/components/accordion/index.ts +18 -0
- package/src/components/action-icon/action-icon.test.tsx +57 -0
- package/src/components/action-icon/action-icon.tsx +180 -0
- package/src/components/action-icon/index.ts +12 -0
- package/src/components/alert/alert.test.tsx +125 -0
- package/src/components/alert/alert.tsx +158 -0
- package/src/components/alert/index.ts +3 -0
- package/src/components/ambient-background/ambient-background.test.tsx +64 -0
- package/src/components/ambient-background/ambient-background.tsx +76 -0
- package/src/components/ambient-background/index.ts +1 -0
- package/src/components/app-shell/app-shell.test.tsx +271 -0
- package/src/components/app-shell/app-shell.tsx +492 -0
- package/src/components/app-shell/index.ts +17 -0
- package/src/components/autocomplete/autocomplete.test.tsx +120 -0
- package/src/components/autocomplete/autocomplete.tsx +249 -0
- package/src/components/autocomplete/index.ts +11 -0
- package/src/components/avatar/avatar.test.tsx +345 -0
- package/src/components/avatar/avatar.tsx +456 -0
- package/src/components/avatar/index.ts +12 -0
- package/src/components/badge/badge.test.tsx +51 -0
- package/src/components/badge/badge.tsx +148 -0
- package/src/components/badge/index.ts +6 -0
- package/src/components/breadcrumb/breadcrumb.test.tsx +238 -0
- package/src/components/breadcrumb/breadcrumb.tsx +348 -0
- package/src/components/breadcrumb/index.ts +9 -0
- package/src/components/button/button.test.tsx +87 -0
- package/src/components/button/button.tsx +253 -0
- package/src/components/button/index.ts +12 -0
- package/src/components/button-group/button-group.test.tsx +168 -0
- package/src/components/button-group/button-group.tsx +121 -0
- package/src/components/button-group/index.ts +1 -0
- package/src/components/button-multi-select/button-multi-select.test.tsx +146 -0
- package/src/components/button-multi-select/button-multi-select.tsx +76 -0
- package/src/components/button-multi-select/index.ts +17 -0
- package/src/components/button-select/button-select-control.tsx +153 -0
- package/src/components/button-select/button-select-data.tsx +96 -0
- package/src/components/button-select/button-select-items.ts +103 -0
- package/src/components/button-select/button-select.test.tsx +239 -0
- package/src/components/button-select/button-select.tsx +323 -0
- package/src/components/button-select/index.ts +14 -0
- package/src/components/calendar/calendar-body.tsx +403 -0
- package/src/components/calendar/calendar.test.tsx +278 -0
- package/src/components/calendar/calendar.tsx +220 -0
- package/src/components/calendar/index.ts +10 -0
- package/src/components/card/card.tsx +211 -0
- package/src/components/card/index.ts +12 -0
- package/src/components/chart/chart.test.tsx +98 -0
- package/src/components/chart/chart.tsx +192 -0
- package/src/components/chart/index.ts +8 -0
- package/src/components/chart/styles.css +50 -0
- package/src/components/checkbox/checkbox.test.tsx +113 -0
- package/src/components/checkbox/checkbox.tsx +182 -0
- package/src/components/checkbox/control.ts +76 -0
- package/src/components/checkbox/index.ts +3 -0
- package/src/components/choice-card-group/choice-card-group.test.tsx +250 -0
- package/src/components/choice-card-group/choice-card-group.tsx +549 -0
- package/src/components/choice-card-group/index.ts +9 -0
- package/src/components/circular-progress/circular-progress.test.tsx +120 -0
- package/src/components/circular-progress/circular-progress.tsx +214 -0
- package/src/components/circular-progress/index.ts +15 -0
- package/src/components/clipboard/clipboard.test.tsx +229 -0
- package/src/components/clipboard/clipboard.tsx +128 -0
- package/src/components/clipboard/copy.tsx +127 -0
- package/src/components/clipboard/index.ts +12 -0
- package/src/components/code/code.test.tsx +57 -0
- package/src/components/code/code.tsx +54 -0
- package/src/components/code/index.ts +1 -0
- package/src/components/code-block/chrome.tsx +347 -0
- package/src/components/code-block/code-block.test.tsx +252 -0
- package/src/components/code-block/code-block.tsx +254 -0
- package/src/components/code-block/diff.test.ts +177 -0
- package/src/components/code-block/diff.ts +114 -0
- package/src/components/code-block/gutters.test.ts +280 -0
- package/src/components/code-block/gutters.ts +260 -0
- package/src/components/code-block/highlighter.test.ts +261 -0
- package/src/components/code-block/highlighter.ts +290 -0
- package/src/components/code-block/index.ts +53 -0
- package/src/components/code-block/notation.test.ts +166 -0
- package/src/components/code-block/notation.ts +233 -0
- package/src/components/code-block/presets.test.ts +43 -0
- package/src/components/code-block/presets.ts +28 -0
- package/src/components/code-block/static.tsx +130 -0
- package/src/components/code-block/styles.css +198 -0
- package/src/components/collapse/collapse.test.tsx +96 -0
- package/src/components/collapse/collapse.tsx +81 -0
- package/src/components/collapse/index.ts +1 -0
- package/src/components/combobox/combobox.tsx +317 -0
- package/src/components/combobox/index.ts +15 -0
- package/src/components/combobox-list/combobox-list.test.tsx +148 -0
- package/src/components/combobox-list/combobox-list.tsx +276 -0
- package/src/components/combobox-list/index.ts +3 -0
- package/src/components/container/container.tsx +47 -0
- package/src/components/container/index.ts +1 -0
- package/src/components/data-table/data-table-features.ts +127 -0
- package/src/components/data-table/data-table-filter/data-table-date-filter.tsx +275 -0
- package/src/components/data-table/data-table-filter/data-table-filter-fns.ts +126 -0
- package/src/components/data-table/data-table-filter/data-table-number-filter.tsx +74 -0
- package/src/components/data-table/data-table-filter/data-table-select-filter.tsx +47 -0
- package/src/components/data-table/data-table-filter/data-table-text-filter.tsx +29 -0
- package/src/components/data-table/data-table-filter/index.tsx +62 -0
- package/src/components/data-table/data-table-filter/utils.ts +112 -0
- package/src/components/data-table/data-table-filter-fns.test.tsx +145 -0
- package/src/components/data-table/data-table-filter.test.tsx +365 -0
- package/src/components/data-table/data-table-header-cell.tsx +292 -0
- package/src/components/data-table/data-table-meta.ts +102 -0
- package/src/components/data-table/data-table-pagination.tsx +175 -0
- package/src/components/data-table/data-table-placeholder.tsx +61 -0
- package/src/components/data-table/data-table-schema.test.tsx +22 -0
- package/src/components/data-table/data-table-schema.ts +23 -0
- package/src/components/data-table/data-table-skeleton.ts +9 -0
- package/src/components/data-table/data-table-stack.tsx +376 -0
- package/src/components/data-table/data-table-state.ts +35 -0
- package/src/components/data-table/data-table-toolbar.tsx +81 -0
- package/src/components/data-table/data-table.test.tsx +1143 -0
- package/src/components/data-table/data-table.tsx +829 -0
- package/src/components/data-table/index.ts +46 -0
- package/src/components/date-picker/aliases.tsx +15 -0
- package/src/components/date-picker/date-picker.test.tsx +699 -0
- package/src/components/date-picker/date-picker.tsx +1000 -0
- package/src/components/date-picker/date-time-text.test.ts +68 -0
- package/src/components/date-picker/date-time-text.ts +103 -0
- package/src/components/date-picker/index.ts +32 -0
- package/src/components/divider/divider.test.tsx +106 -0
- package/src/components/divider/divider.tsx +162 -0
- package/src/components/divider/index.ts +8 -0
- package/src/components/drawer/drawer.tsx +405 -0
- package/src/components/drawer/index.ts +21 -0
- package/src/components/field/field.tsx +235 -0
- package/src/components/field/index.ts +3 -0
- package/src/components/file-upload/file-upload.test.tsx +47 -0
- package/src/components/file-upload/file-upload.tsx +280 -0
- package/src/components/file-upload/index.ts +3 -0
- package/src/components/flex/flex.tsx +81 -0
- package/src/components/flex/index.ts +1 -0
- package/src/components/grid/grid.tsx +52 -0
- package/src/components/grid/index.ts +1 -0
- package/src/components/hover-card/hover-card.test.tsx +192 -0
- package/src/components/hover-card/hover-card.tsx +376 -0
- package/src/components/hover-card/index.ts +9 -0
- package/src/components/indicator/index.ts +6 -0
- package/src/components/indicator/indicator.test.tsx +241 -0
- package/src/components/indicator/indicator.tsx +275 -0
- package/src/components/input/index.ts +12 -0
- package/src/components/input/input.test.tsx +111 -0
- package/src/components/input/input.tsx +320 -0
- package/src/components/kbd/index.ts +1 -0
- package/src/components/kbd/kbd.test.tsx +20 -0
- package/src/components/kbd/kbd.tsx +98 -0
- package/src/components/mark/index.ts +1 -0
- package/src/components/mark/mark.test.tsx +85 -0
- package/src/components/mark/mark.tsx +79 -0
- package/src/components/menu/index.ts +27 -0
- package/src/components/menu/menu-data.tsx +230 -0
- package/src/components/menu/menu.test.tsx +547 -0
- package/src/components/menu/menu.tsx +514 -0
- package/src/components/modal/index.ts +14 -0
- package/src/components/modal/modal.tsx +420 -0
- package/src/components/multi-combobox-list/index.ts +3 -0
- package/src/components/multi-combobox-list/multi-combobox-list.test.tsx +190 -0
- package/src/components/multi-combobox-list/multi-combobox-list.tsx +308 -0
- package/src/components/multi-select/index.ts +12 -0
- package/src/components/multi-select/multi-select.test.tsx +248 -0
- package/src/components/multi-select/multi-select.tsx +355 -0
- package/src/components/nav-link/index.ts +4 -0
- package/src/components/nav-link/nav-link.test.tsx +107 -0
- package/src/components/nav-link/nav-link.tsx +205 -0
- package/src/components/nav-link/navigation.test.tsx +117 -0
- package/src/components/nav-link/navigation.tsx +81 -0
- package/src/components/nav-link/tanstack.tsx +67 -0
- package/src/components/notification/create-notifier.tsx +517 -0
- package/src/components/notification/index.ts +20 -0
- package/src/components/notification/notification.test.tsx +306 -0
- package/src/components/notification/notification.tsx +353 -0
- package/src/components/notification/store.ts +159 -0
- package/src/components/notification/types.ts +67 -0
- package/src/components/number-input/index.ts +3 -0
- package/src/components/number-input/number-input.test.tsx +291 -0
- package/src/components/number-input/number-input.tsx +407 -0
- package/src/components/overlays/create-overlays.tsx +267 -0
- package/src/components/overlays/index.ts +25 -0
- package/src/components/overlays/renderer.tsx +214 -0
- package/src/components/overlays/store.ts +103 -0
- package/src/components/overlays/types.ts +150 -0
- package/src/components/password-input/index.ts +3 -0
- package/src/components/password-input/password-input.test.tsx +94 -0
- package/src/components/password-input/password-input.tsx +191 -0
- package/src/components/pill/index.ts +9 -0
- package/src/components/pill/pill.test.tsx +22 -0
- package/src/components/pill/pill.tsx +221 -0
- package/src/components/pills-input/index.ts +12 -0
- package/src/components/pills-input/pills-input.test.ts +136 -0
- package/src/components/pills-input/pills-input.tsx +422 -0
- package/src/components/pin-input/index.ts +3 -0
- package/src/components/pin-input/pin-input.test.tsx +74 -0
- package/src/components/pin-input/pin-input.tsx +186 -0
- package/src/components/popover/icons.tsx +129 -0
- package/src/components/popover/index.ts +8 -0
- package/src/components/popover/popover.test.tsx +223 -0
- package/src/components/popover/popover.tsx +635 -0
- package/src/components/progress/index.ts +18 -0
- package/src/components/progress/progress.test.tsx +112 -0
- package/src/components/progress/progress.tsx +194 -0
- package/src/components/radio-group/index.ts +9 -0
- package/src/components/radio-group/radio-group.test.tsx +107 -0
- package/src/components/radio-group/radio-group.tsx +207 -0
- package/src/components/rating/icons.tsx +35 -0
- package/src/components/rating/index.ts +9 -0
- package/src/components/rating/rating.test.tsx +288 -0
- package/src/components/rating/rating.tsx +389 -0
- package/src/components/schedule/index.ts +170 -0
- package/src/components/schedule/now-cursor-line.test.tsx +262 -0
- package/src/components/schedule/now-cursor-line.tsx +343 -0
- package/src/components/schedule/schedule-agenda-list.tsx +480 -0
- package/src/components/schedule/schedule-agenda-view.test.tsx +333 -0
- package/src/components/schedule/schedule-agenda-view.tsx +209 -0
- package/src/components/schedule/schedule-all-day-row.test.ts +187 -0
- package/src/components/schedule/schedule-all-day-row.tsx +616 -0
- package/src/components/schedule/schedule-create-draft.tsx +181 -0
- package/src/components/schedule/schedule-dates.test.ts +771 -0
- package/src/components/schedule/schedule-dates.ts +721 -0
- package/src/components/schedule/schedule-day-view.tsx +30 -0
- package/src/components/schedule/schedule-days-view.tsx +277 -0
- package/src/components/schedule/schedule-details-popover.test.tsx +765 -0
- package/src/components/schedule/schedule-disabled-overlay.tsx +51 -0
- package/src/components/schedule/schedule-drag-ghost.tsx +157 -0
- package/src/components/schedule/schedule-event-chip.tsx +1176 -0
- package/src/components/schedule/schedule-event-details.tsx +101 -0
- package/src/components/schedule/schedule-event-list-popover-content.tsx +149 -0
- package/src/components/schedule/schedule-event-styles.ts +60 -0
- package/src/components/schedule/schedule-geometry.test.ts +426 -0
- package/src/components/schedule/schedule-geometry.ts +461 -0
- package/src/components/schedule/schedule-grid-gesture.test.ts +153 -0
- package/src/components/schedule/schedule-grid-gesture.ts +567 -0
- package/src/components/schedule/schedule-layout.test.ts +260 -0
- package/src/components/schedule/schedule-layout.ts +270 -0
- package/src/components/schedule/schedule-month-view.test.tsx +193 -0
- package/src/components/schedule/schedule-month-view.tsx +688 -0
- package/src/components/schedule/schedule-next-up-grouping.test.ts +95 -0
- package/src/components/schedule/schedule-next-up-grouping.ts +69 -0
- package/src/components/schedule/schedule-next-up.test.tsx +189 -0
- package/src/components/schedule/schedule-next-up.tsx +136 -0
- package/src/components/schedule/schedule-overflow-chip.tsx +156 -0
- package/src/components/schedule/schedule-overflow-popover.tsx +173 -0
- package/src/components/schedule/schedule-segments.test.ts +201 -0
- package/src/components/schedule/schedule-segments.ts +120 -0
- package/src/components/schedule/schedule-snap.test.ts +546 -0
- package/src/components/schedule/schedule-snap.ts +380 -0
- package/src/components/schedule/schedule-timed-grid.tsx +1609 -0
- package/src/components/schedule/schedule-toolbar.tsx +264 -0
- package/src/components/schedule/schedule-type-cost.test.ts +104 -0
- package/src/components/schedule/schedule-types.test.ts +64 -0
- package/src/components/schedule/schedule-types.ts +1149 -0
- package/src/components/schedule/schedule-views.test.ts +263 -0
- package/src/components/schedule/schedule-views.ts +293 -0
- package/src/components/schedule/schedule-week-view.tsx +25 -0
- package/src/components/schedule/schedule-year-view.test.tsx +105 -0
- package/src/components/schedule/schedule-year-view.tsx +305 -0
- package/src/components/schedule/schedule.test.tsx +4268 -0
- package/src/components/schedule/schedule.tsx +1038 -0
- package/src/components/schedule/use-event-create.ts +590 -0
- package/src/components/schedule/use-event-drag.ts +504 -0
- package/src/components/schedule/use-event-resize.ts +563 -0
- package/src/components/schedule/use-schedule-selection.ts +119 -0
- package/src/components/schedule/use-schedule.test.ts +91 -0
- package/src/components/schedule/use-schedule.ts +135 -0
- package/src/components/segment-group/index.ts +15 -0
- package/src/components/segment-group/segment-group.test.tsx +172 -0
- package/src/components/segment-group/segment-group.tsx +570 -0
- package/src/components/select/index.ts +12 -0
- package/src/components/select/select.test.tsx +173 -0
- package/src/components/select/select.tsx +405 -0
- package/src/components/skeleton/index.ts +7 -0
- package/src/components/skeleton/skeleton.test.tsx +96 -0
- package/src/components/skeleton/skeleton.tsx +178 -0
- package/src/components/slider/index.ts +3 -0
- package/src/components/slider/slider.test.tsx +136 -0
- package/src/components/slider/slider.tsx +390 -0
- package/src/components/slider/sliderThumb.tsx +0 -0
- package/src/components/spinner/index.ts +6 -0
- package/src/components/spinner/spinner.tsx +136 -0
- package/src/components/switch/index.ts +3 -0
- package/src/components/switch/switch.test.tsx +98 -0
- package/src/components/switch/switch.tsx +234 -0
- package/src/components/table/index.ts +14 -0
- package/src/components/table/table.test.tsx +262 -0
- package/src/components/table/table.tsx +309 -0
- package/src/components/tabs/index.ts +17 -0
- package/src/components/tabs/tabs-data.tsx +125 -0
- package/src/components/tabs/tabs.test.tsx +172 -0
- package/src/components/tabs/tabs.tsx +292 -0
- package/src/components/tags-input/index.ts +3 -0
- package/src/components/tags-input/tags-input.test.tsx +85 -0
- package/src/components/tags-input/tags-input.tsx +294 -0
- package/src/components/text/index.ts +1 -0
- package/src/components/text/text.test.tsx +73 -0
- package/src/components/text/text.tsx +107 -0
- package/src/components/text-input/index.ts +3 -0
- package/src/components/text-input/text-input.test.tsx +129 -0
- package/src/components/text-input/text-input.tsx +88 -0
- package/src/components/textarea/index.ts +3 -0
- package/src/components/textarea/textarea.test.tsx +88 -0
- package/src/components/textarea/textarea.tsx +205 -0
- package/src/components/theme-icon/index.ts +7 -0
- package/src/components/theme-icon/theme-icon.test.tsx +20 -0
- package/src/components/theme-icon/theme-icon.tsx +114 -0
- package/src/components/theme-script/index.ts +1 -0
- package/src/components/theme-script/theme-script.tsx +68 -0
- package/src/components/time-input/hour-cycle.ts +61 -0
- package/src/components/time-input/index.ts +4 -0
- package/src/components/time-input/time-input.test.tsx +292 -0
- package/src/components/time-input/time-input.tsx +196 -0
- package/src/components/time-input/time-row.tsx +305 -0
- package/src/components/timeline/index.ts +11 -0
- package/src/components/timeline/timeline.test.tsx +701 -0
- package/src/components/timeline/timeline.tsx +720 -0
- package/src/components/title/index.ts +1 -0
- package/src/components/title/title.test.tsx +68 -0
- package/src/components/title/title.tsx +95 -0
- package/src/components/tooltip/index.ts +9 -0
- package/src/components/tooltip/tooltip.test.tsx +96 -0
- package/src/components/tooltip/tooltip.tsx +255 -0
- package/src/components/tree-multi-select/index.ts +11 -0
- package/src/components/tree-multi-select/tree-multi-select.test.tsx +327 -0
- package/src/components/tree-multi-select/tree-multi-select.tsx +626 -0
- package/src/components/tree-select/index.ts +11 -0
- package/src/components/tree-select/tree-select.test.tsx +376 -0
- package/src/components/tree-select/tree-select.tsx +634 -0
- package/src/index.ts +64 -0
- package/src/lib/align.ts +6 -0
- package/src/lib/available-if.test.ts +76 -0
- package/src/lib/available-if.ts +114 -0
- package/src/lib/brand.ts +19 -0
- package/src/lib/cn.test.ts +13 -0
- package/src/lib/cn.ts +28 -0
- package/src/lib/colors.ts +31 -0
- package/src/lib/control-open.ts +38 -0
- package/src/lib/date-predicates.test.ts +149 -0
- package/src/lib/date-predicates.ts +83 -0
- package/src/lib/date-value.test.ts +107 -0
- package/src/lib/date-value.ts +76 -0
- package/src/lib/dev-warn.ts +18 -0
- package/src/lib/focus-styles.test.ts +138 -0
- package/src/lib/focus-styles.ts +145 -0
- package/src/lib/form-control.ts +72 -0
- package/src/lib/gradient.ts +81 -0
- package/src/lib/intl-direction.test.tsx +96 -0
- package/src/lib/intl.test.tsx +162 -0
- package/src/lib/intl.tsx +210 -0
- package/src/lib/link-component.test.tsx +46 -0
- package/src/lib/link-component.tsx +32 -0
- package/src/lib/merge-refs.ts +20 -0
- package/src/lib/overlay-container.test.tsx +69 -0
- package/src/lib/overlay-container.tsx +64 -0
- package/src/lib/overlay-layer.test.tsx +139 -0
- package/src/lib/overlay-layer.tsx +81 -0
- package/src/lib/placement.ts +23 -0
- package/src/lib/props.ts +48 -0
- package/src/lib/required-if.ts +57 -0
- package/src/lib/schedule-predicates.test.ts +230 -0
- package/src/lib/schedule-predicates.ts +193 -0
- package/src/lib/select-data.ts +227 -0
- package/src/lib/sizes.ts +20 -0
- package/src/lib/test-id.ts +27 -0
- package/src/lib/theme-init-runtime.test.ts +152 -0
- package/src/lib/theme-init-runtime.ts +79 -0
- package/src/lib/theme.test.ts +223 -0
- package/src/lib/theme.ts +153 -0
- package/src/lib/tree-data.ts +159 -0
- package/src/lib/typography-size.ts +59 -0
- package/src/lib/use-container-query.test.ts +83 -0
- package/src/lib/use-container-query.ts +44 -0
- package/src/lib/use-disclosure.test.ts +85 -0
- package/src/lib/use-disclosure.ts +77 -0
- package/src/lib/use-isomorphic-layout-effect.ts +12 -0
- package/src/lib/use-local-storage.test.ts +165 -0
- package/src/lib/use-local-storage.ts +178 -0
- package/src/lib/use-logger.ts +39 -0
- package/src/lib/use-media-query.test.ts +77 -0
- package/src/lib/use-media-query.ts +35 -0
- package/src/lib/use-now.ts +59 -0
- package/src/lib/use-theme.test.ts +305 -0
- package/src/lib/use-theme.ts +279 -0
- package/src/lib/use-uncontrolled.test.ts +207 -0
- package/src/lib/use-uncontrolled.ts +85 -0
- package/src/styles.css +17 -0
- package/src/test-setup.ts +130 -0
- package/src/theme-init-script.ts +10 -0
- package/src/theme.css +1275 -0
- package/src/theme.forced-colors.test.tsx +215 -0
- package/src/theme.test.ts +221 -0
- package/src/visually-hidden-containment.test.tsx +98 -0
|
@@ -0,0 +1,1609 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import type { CSSProperties, ReactNode, Ref } from "react"
|
|
4
|
+
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react"
|
|
5
|
+
import { cn } from "../../lib/cn"
|
|
6
|
+
import { devWarn } from "../../lib/dev-warn"
|
|
7
|
+
import { mergeRefs } from "../../lib/merge-refs"
|
|
8
|
+
import { OverlayContainerProvider } from "../../lib/overlay-container"
|
|
9
|
+
import type { ScheduleSlotPredicate } from "../../lib/schedule-predicates"
|
|
10
|
+
import { useNow } from "../../lib/use-now"
|
|
11
|
+
import { HourGutterTick, NowCursorLabel, NowCursorLine } from "./now-cursor-line"
|
|
12
|
+
import { ScheduleAllDayRow } from "./schedule-all-day-row"
|
|
13
|
+
import { ScheduleCreateDraft } from "./schedule-create-draft"
|
|
14
|
+
import {
|
|
15
|
+
dayBoundaries,
|
|
16
|
+
dayBoundary,
|
|
17
|
+
dayKey,
|
|
18
|
+
eventOccursOnDay,
|
|
19
|
+
paginateDate,
|
|
20
|
+
rangesOverlap,
|
|
21
|
+
resolveOverlapCandidates,
|
|
22
|
+
timeRangeLabel,
|
|
23
|
+
} from "./schedule-dates"
|
|
24
|
+
import { ScheduleDisabledOverlay } from "./schedule-disabled-overlay"
|
|
25
|
+
import { ScheduleDragGhost } from "./schedule-drag-ghost"
|
|
26
|
+
import { ScheduleEventChip } from "./schedule-event-chip"
|
|
27
|
+
import {
|
|
28
|
+
columnInsets,
|
|
29
|
+
defaultHourHeight,
|
|
30
|
+
minutesToPercent,
|
|
31
|
+
visualFloorMs,
|
|
32
|
+
} from "./schedule-geometry"
|
|
33
|
+
import { layoutEventColumnsCapped } from "./schedule-layout"
|
|
34
|
+
import { ScheduleOverflowChip } from "./schedule-overflow-chip"
|
|
35
|
+
import { type ScheduleSegment, segmentEvents } from "./schedule-segments"
|
|
36
|
+
import { resolveSlotDurations } from "./schedule-snap"
|
|
37
|
+
import type {
|
|
38
|
+
ScheduleAnyEvent,
|
|
39
|
+
ScheduleClassNames,
|
|
40
|
+
ScheduleCollision,
|
|
41
|
+
ScheduleEditGesture,
|
|
42
|
+
ScheduleEvent,
|
|
43
|
+
ScheduleEventChangeHandler,
|
|
44
|
+
ScheduleEventCreateHandler,
|
|
45
|
+
ScheduleEventRemoveHandler,
|
|
46
|
+
ScheduleOverflowProps,
|
|
47
|
+
ScheduleOverlapPreventionOptions,
|
|
48
|
+
ScheduleStaticEvent,
|
|
49
|
+
ScheduleTranslations,
|
|
50
|
+
} from "./schedule-types"
|
|
51
|
+
import {
|
|
52
|
+
eventEditGestureExceedsSchedule,
|
|
53
|
+
isEditGestureEnabled,
|
|
54
|
+
isOverlapGestureEnabled,
|
|
55
|
+
resolveOverlapPrevention,
|
|
56
|
+
} from "./schedule-types"
|
|
57
|
+
import { useEventCreate } from "./use-event-create"
|
|
58
|
+
import { chipSelection, usePieceAnchor } from "./use-schedule-selection"
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* RFC §5 (`docs/rfcs/schedule.md`) shared timed-grid primitive — `DaysView`
|
|
62
|
+
* wraps this for any window size (1 day, 7 days, or anything else) so
|
|
63
|
+
* coordinate math is written once. `hourHeight` is a *floor*, not a fixed
|
|
64
|
+
* height: it sets the timed row's `minmax(floor, 1fr)` track size, so the
|
|
65
|
+
* row (and every day-column stretched to match it via the grid's default
|
|
66
|
+
* `align-self: stretch`) fills whatever space its own definite-height
|
|
67
|
+
* ancestor actually gives it, scrolling only once the floor itself exceeds
|
|
68
|
+
* that space — **correction after v1 shipped**: this used to be a plain
|
|
69
|
+
* fixed px height (`(endHour-startHour) * hourHeight`, no CSS involvement),
|
|
70
|
+
* with chip/overlay/now-line positions baked to matching fixed pixels at
|
|
71
|
+
* render time. Absent, `hourHeight` defaults to `defaultHourHeight
|
|
72
|
+
* (slotDuration)` (`schedule-geometry.ts`) — scaled by `slotDuration` rather
|
|
73
|
+
* than a flat constant, so a finer slot spacing renders as a taller hour by
|
|
74
|
+
* default; this floor-vs-fixed change doesn't affect that default at all.
|
|
75
|
+
* Chip/overlay/overflow/now-line positions are percentages of the
|
|
76
|
+
* day-column's own (possibly-stretched) height instead, via
|
|
77
|
+
* `minutesToPercent` — see that function's own comment.
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
const DEFAULT_MAX_OVERLAP_COLUMNS = 4
|
|
81
|
+
const DEFAULT_MAX_ALL_DAY_ROWS = 2
|
|
82
|
+
|
|
83
|
+
/** `--sch-column-overlap` default for a single day-column (`DaysView` with
|
|
84
|
+
* `visibleDays={1}`, or a standalone `ScheduleTimedGrid` given one day) —
|
|
85
|
+
* plenty of width to spare per column already, so a modest cascade is
|
|
86
|
+
* enough. */
|
|
87
|
+
const DEFAULT_COLUMN_OVERLAP_PX = 10
|
|
88
|
+
/** Bigger cascade once multiple day-columns share the width (`DaysView`
|
|
89
|
+
* with `visibleDays > 1`, `days.length > 1`) — each column starts out much narrower (down to a few
|
|
90
|
+
* dozen px on a busy cluster at the default `--sch-day-min-width: 9rem`),
|
|
91
|
+
* so leaning further into the cascade recovers more legible title/time text
|
|
92
|
+
* on the frontmost, most-overlapping card than the single-day default
|
|
93
|
+
* would. Tuned by hand against a real 5-way overlap cluster at the default
|
|
94
|
+
* day-min-width: high enough to matter, short of letting a deep cascade
|
|
95
|
+
* spill past its own day-column's edge into the next one. */
|
|
96
|
+
const DEFAULT_COLUMN_OVERLAP_PX_MULTI_DAY = 20
|
|
97
|
+
|
|
98
|
+
export type ScheduleTimedGridProps<P = unknown> = Pick<
|
|
99
|
+
ScheduleOverflowProps<P>,
|
|
100
|
+
"onOverflowClick" | "withOverflowDetails" | "renderOverflowDetails"
|
|
101
|
+
> & {
|
|
102
|
+
/** Page the visible range by one step, requested while a drag is held
|
|
103
|
+
* against an edge the grid can no longer scroll. Internal — `DaysView`
|
|
104
|
+
* supplies it from the same anchor-date state the toolbar's Prev/Next
|
|
105
|
+
* triggers use, so there is no new public prop. Omitted (e.g. a bare
|
|
106
|
+
* `ScheduleTimedGrid`) simply means the gesture never pages. */
|
|
107
|
+
onPaginate?: (direction: -1 | 1) => void
|
|
108
|
+
days: Date[]
|
|
109
|
+
data: ScheduleEvent<P>[]
|
|
110
|
+
staticEvents: ScheduleStaticEvent<P>[]
|
|
111
|
+
startHour: number
|
|
112
|
+
endHour: number
|
|
113
|
+
slotDuration: number
|
|
114
|
+
minDuration?: number
|
|
115
|
+
resizeCollision: ScheduleCollision
|
|
116
|
+
maxDuration?: number
|
|
117
|
+
slotDisabled?: ScheduleSlotPredicate
|
|
118
|
+
now?: Date
|
|
119
|
+
withNowIndicator: boolean
|
|
120
|
+
selected?: readonly string[]
|
|
121
|
+
onEventSelect?: (event: ScheduleAnyEvent<P> | null) => void
|
|
122
|
+
withEventDetails?: boolean
|
|
123
|
+
onEventChange?: ScheduleEventChangeHandler<P>
|
|
124
|
+
onEventRemove?: ScheduleEventRemoveHandler<P>
|
|
125
|
+
/** RFC — click-drag-to-create on empty grid space. */
|
|
126
|
+
onEventCreate?: ScheduleEventCreateHandler
|
|
127
|
+
/**
|
|
128
|
+
* Fires on a plain click (no discernible drag) that lands on empty
|
|
129
|
+
* day-column space — not on an event/overflow chip, and never alongside a
|
|
130
|
+
* committed create-drag (the same click-vs-drag resolution that decides
|
|
131
|
+
* `onEventCreate` decides this too, mutually exclusively). Independent of
|
|
132
|
+
* `editable`'s `"create"` grant. Formerly `onEventDismiss` — see
|
|
133
|
+
* `ScheduleTimedProps.onGridClick` for why it was renamed and what it no
|
|
134
|
+
* longer does.
|
|
135
|
+
*/
|
|
136
|
+
onGridClick?: (date: Date) => void
|
|
137
|
+
/** Which gestures are possible at all — see `ScheduleTimedProps.editable`. */
|
|
138
|
+
editable?: boolean | readonly ScheduleEditGesture[]
|
|
139
|
+
/** See `ScheduleTimedProps.preventOverlap`. */
|
|
140
|
+
preventOverlap?: boolean | ScheduleOverlapPreventionOptions
|
|
141
|
+
/** Cap on side-by-side columns before excess concurrent events collapse
|
|
142
|
+
* into a "+N" overflow indicator. Default `4`. */
|
|
143
|
+
maxOverlapColumns?: number
|
|
144
|
+
/** Cap on visible concurrent all-day lanes before excess all-day events
|
|
145
|
+
* collapse into a per-day "+N" overflow indicator. Default `2`. */
|
|
146
|
+
maxAllDayRows?: number
|
|
147
|
+
/**
|
|
148
|
+
* Overrides the built-in "+N" overflow disclosure popover entirely —
|
|
149
|
+
* gated by presence, like `onDayClick`. Applies to both
|
|
150
|
+
* the timed grid's own column overflow and the all-day row's per-day
|
|
151
|
+
* overflow. Absent (default): clicking "+N" opens the built-in popover
|
|
152
|
+
* (a list of hidden events, each opening into its own full details).
|
|
153
|
+
*/
|
|
154
|
+
onDayClick?: (date: Date) => void
|
|
155
|
+
renderEventDetails?: (event: ScheduleAnyEvent<P>) => ReactNode
|
|
156
|
+
locale?: string
|
|
157
|
+
timeZone: string
|
|
158
|
+
translations: Required<ScheduleTranslations>
|
|
159
|
+
classNames?: ScheduleClassNames
|
|
160
|
+
empty?: ReactNode
|
|
161
|
+
/** Absent: defaults to `defaultHourHeight(slotDuration)`. */
|
|
162
|
+
hourHeight?: number
|
|
163
|
+
/** Exposes the scrollable root (`data-schedule-part="timed-grid"`) —
|
|
164
|
+
* `DaysView`'s own scroll-to-now wiring (RFC §14) needs a real DOM node
|
|
165
|
+
* to call `scrollElementToCenter` (`schedule-geometry.ts`) on. Plain
|
|
166
|
+
* `ref` prop, no `forwardRef` — same idiom `alert.tsx`/`tree-select.tsx`
|
|
167
|
+
* already use on React 19. */
|
|
168
|
+
ref?: Ref<HTMLDivElement>
|
|
169
|
+
/** Forwarded to today's own `NowCursorLine` `marker` instance (via
|
|
170
|
+
* `DayColumn`) — the other DOM node that same scroll-to-now wiring
|
|
171
|
+
* needs, alongside `ref` above. */
|
|
172
|
+
nowRef?: Ref<HTMLDivElement>
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Disabled slots merged into contiguous runs, at `slotDuration` granularity.
|
|
177
|
+
*
|
|
178
|
+
* Deliberately the *same* unit the grid snaps gestures to, which is what makes
|
|
179
|
+
* the tint and the commit gate agree: a boundary finer than `slotDuration` is
|
|
180
|
+
* one no gesture can land on anyway, so there is nothing left for the shading
|
|
181
|
+
* to round away. This used to walk whole hours — a v1 simplification that was
|
|
182
|
+
* invisible while every example disabled a round number of hours, and plainly
|
|
183
|
+
* wrong as soon as one didn't. A schedule that opens at 08:45 painted its tint
|
|
184
|
+
* to 09:00, so the 08:45-09:00 strip looked blocked while booking perfectly
|
|
185
|
+
* well; enforcement was exact the whole time, only the picture of it was not.
|
|
186
|
+
*
|
|
187
|
+
* Probed in the schedule's own `timeZone` rather than host-local: these runs
|
|
188
|
+
* are positioned against `bandStart`, itself `dayBoundary(day, startHour,
|
|
189
|
+
* timeZone)`, so a host-local probe would ask about one time and paint the
|
|
190
|
+
* answer at another. `dayBoundaries` walks the whole band from one zone
|
|
191
|
+
* conversion, and closes exactly on `endHour` even when the band isn't a whole
|
|
192
|
+
* number of slots.
|
|
193
|
+
*/
|
|
194
|
+
function disabledSlotRuns(
|
|
195
|
+
day: Date,
|
|
196
|
+
startHour: number,
|
|
197
|
+
endHour: number,
|
|
198
|
+
slotDuration: number,
|
|
199
|
+
timeZone: string,
|
|
200
|
+
slotDisabled: ScheduleSlotPredicate,
|
|
201
|
+
): { startMinute: number; endMinute: number }[] {
|
|
202
|
+
const fromMinute = startHour * 60
|
|
203
|
+
const toMinute = endHour * 60
|
|
204
|
+
const boundaries = dayBoundaries(day, fromMinute, toMinute, slotDuration, timeZone)
|
|
205
|
+
const runs: { startMinute: number; endMinute: number }[] = []
|
|
206
|
+
let runStart: number | null = null
|
|
207
|
+
for (let i = 0; i < boundaries.length - 1; i++) {
|
|
208
|
+
const start = boundaries[i] as Date
|
|
209
|
+
const end = boundaries[i + 1] as Date
|
|
210
|
+
const startMinute = Math.min(fromMinute + i * slotDuration, toMinute)
|
|
211
|
+
const disabled = slotDisabled({ start, end }, timeZone)
|
|
212
|
+
if (disabled && runStart === null) runStart = startMinute
|
|
213
|
+
if (!disabled && runStart !== null) {
|
|
214
|
+
runs.push({ startMinute: runStart, endMinute: startMinute })
|
|
215
|
+
runStart = null
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
if (runStart !== null) runs.push({ startMinute: runStart, endMinute: toMinute })
|
|
219
|
+
return runs
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
type DayColumnProps<P = unknown> = Pick<
|
|
223
|
+
ScheduleOverflowProps<P>,
|
|
224
|
+
"onOverflowClick" | "withOverflowDetails" | "renderOverflowDetails"
|
|
225
|
+
> & {
|
|
226
|
+
day: Date
|
|
227
|
+
/** This column's pieces of `data`, already clipped to its own painted band
|
|
228
|
+
* by `segmentEvents` — never whole events. A chip's `top`/`height` come
|
|
229
|
+
* from the piece; every gesture still reads `segment.event`. */
|
|
230
|
+
/** Ids of events that have left `data` and are playing their exit — excluded
|
|
231
|
+
* from the packing below so the survivors reflow *while* they fade. */
|
|
232
|
+
exitingIds?: ReadonlySet<string>
|
|
233
|
+
onExitComplete?: (event: ScheduleEvent<P>) => void
|
|
234
|
+
daySegments: ScheduleSegment<P>[]
|
|
235
|
+
/** As `daySegments`, for `staticEvents`. */
|
|
236
|
+
dayStaticSegments: ScheduleSegment<P>[]
|
|
237
|
+
startHour: number
|
|
238
|
+
endHour: number
|
|
239
|
+
/** `(endHour - startHour) * 60` — the percent-math denominator for every
|
|
240
|
+
* chip/overlay/overflow-chip position in this column. */
|
|
241
|
+
totalWindowMinutes: number
|
|
242
|
+
slotDuration: number
|
|
243
|
+
/** Already resolved to a whole number of slots — see `resolveSlotDurations`. */
|
|
244
|
+
minDuration: number
|
|
245
|
+
resizeCollision: ScheduleCollision
|
|
246
|
+
maxDuration?: number
|
|
247
|
+
slotDisabled?: ScheduleSlotPredicate
|
|
248
|
+
editableCreate: boolean
|
|
249
|
+
editableDrag: boolean
|
|
250
|
+
editableResize: boolean
|
|
251
|
+
editableRemove: boolean
|
|
252
|
+
preventOverlapOnCreate: boolean
|
|
253
|
+
preventOverlapOnDrag: boolean
|
|
254
|
+
preventOverlapOnResize: boolean
|
|
255
|
+
/** RFC §12a axis B, already applied — the grid resolves this **once over the
|
|
256
|
+
* whole visible window** rather than per column. A candidate on another day
|
|
257
|
+
* simply never overlaps the proposed range (`rangeOverlapsAny` compares real
|
|
258
|
+
* `Date`s), so the old per-day narrowing was a no-op for correctness; it
|
|
259
|
+
* only mattered as a micro-optimisation over a trivial array scan. Resolving
|
|
260
|
+
* window-wide is also what keeps these candidates **unclipped** — a segment
|
|
261
|
+
* stops at midnight, so validating a commit against segments would let an
|
|
262
|
+
* overnight event silently overlap whatever sits across the boundary. */
|
|
263
|
+
overlapCandidates: { id: string; start: Date; end: Date }[]
|
|
264
|
+
maxOverlapColumns: number
|
|
265
|
+
/** Minimum duration each event is packed as — `visualFloorMs`. */
|
|
266
|
+
layoutFloorMs: number
|
|
267
|
+
selected?: readonly string[]
|
|
268
|
+
/** This column holds the piece of the anchor event that owns its details
|
|
269
|
+
* popover — see `usePieceAnchor`. The event's other pieces, in other
|
|
270
|
+
* columns, are painted selected but never open one. */
|
|
271
|
+
ownsAnchor?: boolean
|
|
272
|
+
onEventSelect?: (event: ScheduleAnyEvent<P> | null) => void
|
|
273
|
+
withEventDetails?: boolean
|
|
274
|
+
onEventChange?: (
|
|
275
|
+
event: ScheduleEvent<P>,
|
|
276
|
+
next: { start: Date; end: Date },
|
|
277
|
+
reason: "drag" | "resize",
|
|
278
|
+
) => void
|
|
279
|
+
onEventRemove?: (event: ScheduleEvent<P>) => void
|
|
280
|
+
onEventCreate?: ScheduleEventCreateHandler
|
|
281
|
+
onGridClick?: (date: Date) => void
|
|
282
|
+
renderEventDetails?: (event: ScheduleAnyEvent<P>) => ReactNode
|
|
283
|
+
locale?: string
|
|
284
|
+
timeZone: string
|
|
285
|
+
translations: Required<ScheduleTranslations>
|
|
286
|
+
classNames?: ScheduleClassNames
|
|
287
|
+
isToday: boolean
|
|
288
|
+
/** Whether `day` is the leftmost visible column — no other day column
|
|
289
|
+
* sits between it and the gutter, so its own now-marker's dot (which
|
|
290
|
+
* otherwise spills half its width into whatever's to its start) would
|
|
291
|
+
* spill straight into `NowCursorLabel` instead. */
|
|
292
|
+
isFirstDayColumn: boolean
|
|
293
|
+
now?: Date
|
|
294
|
+
nowRef?: Ref<HTMLDivElement>
|
|
295
|
+
withNowIndicator: boolean
|
|
296
|
+
/** 0-based position among `days` — resolves to an explicit
|
|
297
|
+
* `gridColumn: columnIndex + 2` (column 1 is the gutter). Previously
|
|
298
|
+
* left to auto-placement, which was fine until the now-guide-line's own
|
|
299
|
+
* wrapper (`ScheduleTimedGrid`, see its own comment) needed an *explicit*
|
|
300
|
+
* `col-[2/-1]` span for correct height resolution — an explicitly-placed
|
|
301
|
+
* item reserves its cells for the auto-placement algorithm, which pushed
|
|
302
|
+
* every auto-placed day-column that used to land in those same cells
|
|
303
|
+
* into new implicit (unsized, ~0px) columns instead. Making day-columns
|
|
304
|
+
* explicit too avoids the conflict outright: explicit-vs-explicit
|
|
305
|
+
* placements are allowed to (intentionally) overlap the same cells. */
|
|
306
|
+
columnIndex: number
|
|
307
|
+
onPaginate?: (direction: -1 | 1) => void
|
|
308
|
+
/** Which side of a page turn this column belongs to, while one is running.
|
|
309
|
+
* The outgoing copy is fully inert: it is a picture of the range you just
|
|
310
|
+
* left, not something to interact with. */
|
|
311
|
+
pageState?: "entering" | "exiting"
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* One day's column — its own component (not inlined in a `.map()` callback
|
|
316
|
+
* the way it was before click-drag-to-create) because `useEventCreate` is a
|
|
317
|
+
* hook: calling it inside a bare loop callback in `ScheduleTimedGrid` would
|
|
318
|
+
* violate the Rules of Hooks (a hook must be called from a real component
|
|
319
|
+
* instance, once per mount, not once per loop iteration of a parent render).
|
|
320
|
+
*/
|
|
321
|
+
function DayColumn<P = unknown>({
|
|
322
|
+
day,
|
|
323
|
+
columnIndex,
|
|
324
|
+
onPaginate,
|
|
325
|
+
pageState,
|
|
326
|
+
exitingIds,
|
|
327
|
+
onExitComplete,
|
|
328
|
+
daySegments,
|
|
329
|
+
dayStaticSegments,
|
|
330
|
+
startHour,
|
|
331
|
+
endHour,
|
|
332
|
+
totalWindowMinutes,
|
|
333
|
+
slotDuration,
|
|
334
|
+
minDuration,
|
|
335
|
+
resizeCollision,
|
|
336
|
+
maxDuration,
|
|
337
|
+
slotDisabled,
|
|
338
|
+
editableCreate,
|
|
339
|
+
editableDrag,
|
|
340
|
+
editableResize,
|
|
341
|
+
editableRemove,
|
|
342
|
+
preventOverlapOnCreate,
|
|
343
|
+
preventOverlapOnDrag,
|
|
344
|
+
preventOverlapOnResize,
|
|
345
|
+
overlapCandidates,
|
|
346
|
+
maxOverlapColumns,
|
|
347
|
+
layoutFloorMs,
|
|
348
|
+
selected = [],
|
|
349
|
+
ownsAnchor = false,
|
|
350
|
+
onEventSelect,
|
|
351
|
+
withEventDetails,
|
|
352
|
+
onEventChange,
|
|
353
|
+
onEventRemove,
|
|
354
|
+
onEventCreate,
|
|
355
|
+
onGridClick,
|
|
356
|
+
onOverflowClick,
|
|
357
|
+
withOverflowDetails,
|
|
358
|
+
renderOverflowDetails,
|
|
359
|
+
renderEventDetails,
|
|
360
|
+
locale,
|
|
361
|
+
timeZone,
|
|
362
|
+
translations,
|
|
363
|
+
classNames,
|
|
364
|
+
isToday,
|
|
365
|
+
isFirstDayColumn,
|
|
366
|
+
now,
|
|
367
|
+
nowRef,
|
|
368
|
+
withNowIndicator,
|
|
369
|
+
}: DayColumnProps<P>) {
|
|
370
|
+
// Events and static events are packed into ONE shared column space (not
|
|
371
|
+
// two independent ones) so a real event and a static event overlapping in
|
|
372
|
+
// time get distinct columns instead of silently rendering at the same
|
|
373
|
+
// position. Events first in the input array: `layoutEventColumnsCapped`'s
|
|
374
|
+
// sort is stable, so a tie at the exact same instant gives the real event
|
|
375
|
+
// the lower (and, once overflow exists, the visible) column.
|
|
376
|
+
const byId = new Map<string, ScheduleAnyEvent<P>>()
|
|
377
|
+
for (const segment of daySegments) byId.set(segment.id, segment.event)
|
|
378
|
+
for (const segment of dayStaticSegments) byId.set(segment.id, segment.event)
|
|
379
|
+
// Segments are structurally `LayoutInput` (`{ id, start, end }`) and an event
|
|
380
|
+
// has at most one piece per column, so they feed the packer directly — no
|
|
381
|
+
// mapping, and no change to `schedule-layout.ts`, whose own file header has
|
|
382
|
+
// always documented that the caller pre-clips to one day-column. Until
|
|
383
|
+
// `segmentEvents` existed that contract was aspirational: the caller passed
|
|
384
|
+
// whole events, so a spanning event was packed against a range mostly
|
|
385
|
+
// outside this column.
|
|
386
|
+
// The exiting event is packed out immediately, so every neighbour takes its
|
|
387
|
+
// new width/offset on the same frame the fade starts — `chipShell`'s own
|
|
388
|
+
// `left`/`width` transition then carries them there. Leaving it in until the
|
|
389
|
+
// consumer's `data` update landed is what made a removal read as two beats:
|
|
390
|
+
// ~140ms of fade, *then* a slide.
|
|
391
|
+
const hasExiting = exitingIds != null && exitingIds.size > 0
|
|
392
|
+
const activeSegments = hasExiting ? daySegments.filter((s) => !exitingIds.has(s.id)) : daySegments
|
|
393
|
+
// Packed by *painted* extent, not real duration (`layoutFloorMs`): a burst
|
|
394
|
+
// of second-long events never overlaps in time, yet each chip is floored to
|
|
395
|
+
// a line of text, so packing by time alone stacks them on one another.
|
|
396
|
+
const { layout, overflow } = layoutEventColumnsCapped(
|
|
397
|
+
[...activeSegments, ...dayStaticSegments],
|
|
398
|
+
maxOverlapColumns,
|
|
399
|
+
layoutFloorMs,
|
|
400
|
+
)
|
|
401
|
+
// ...and a second pass *including* it, purely to recover the geometry it had
|
|
402
|
+
// before it was packed out, so the fading chip holds its position instead of
|
|
403
|
+
// jumping to wherever the reflowed layout would now put it — or vanishing
|
|
404
|
+
// outright, since a piece with no layout entry renders nothing at all.
|
|
405
|
+
const exitingLayout = hasExiting
|
|
406
|
+
? layoutEventColumnsCapped(
|
|
407
|
+
[...daySegments, ...dayStaticSegments],
|
|
408
|
+
maxOverlapColumns,
|
|
409
|
+
layoutFloorMs,
|
|
410
|
+
).layout
|
|
411
|
+
: null
|
|
412
|
+
const layoutFor = (id: string) =>
|
|
413
|
+
layout.get(id) ?? (exitingIds?.has(id) ? exitingLayout?.get(id) : undefined)
|
|
414
|
+
// This column's own band start, in the schedule's `timeZone` — the origin
|
|
415
|
+
// every position in this column is measured from.
|
|
416
|
+
const bandStart = dayBoundary(day, startHour, timeZone).getTime()
|
|
417
|
+
const disabledRuns = slotDisabled
|
|
418
|
+
? disabledSlotRuns(day, startHour, endHour, slotDuration, timeZone, slotDisabled)
|
|
419
|
+
: []
|
|
420
|
+
const create = useEventCreate({
|
|
421
|
+
day,
|
|
422
|
+
dayIndex: columnIndex,
|
|
423
|
+
timeZone,
|
|
424
|
+
startHour,
|
|
425
|
+
endHour,
|
|
426
|
+
slotDuration,
|
|
427
|
+
minDurationMinutes: minDuration,
|
|
428
|
+
maxDurationMinutes: maxDuration,
|
|
429
|
+
slotDisabled,
|
|
430
|
+
editableCreate,
|
|
431
|
+
preventOverlap: preventOverlapOnCreate,
|
|
432
|
+
overlapCandidates,
|
|
433
|
+
onEventCreate,
|
|
434
|
+
onGridClick,
|
|
435
|
+
onPaginate,
|
|
436
|
+
locale,
|
|
437
|
+
})
|
|
438
|
+
|
|
439
|
+
const renderChip = (
|
|
440
|
+
segment: ScheduleSegment<P>,
|
|
441
|
+
insets: { left: string; width: string; zIndex: number },
|
|
442
|
+
) => {
|
|
443
|
+
const event = segment.event
|
|
444
|
+
// Straight from the piece's own distance into the band, which
|
|
445
|
+
// `segmentEvents` measured in the schedule's `timeZone`. Deliberately not
|
|
446
|
+
// `minutesFromMidnight`, which reads the *host's* clock — that would put a
|
|
447
|
+
// chip at a different offset than the band it was clipped against whenever
|
|
448
|
+
// `timeZone` isn't the host's. Both values are within [0, 100] by
|
|
449
|
+
// construction, so the negative `top` and past-the-bottom `height` an
|
|
450
|
+
// unclipped event used to produce are no longer representable.
|
|
451
|
+
const top = minutesToPercent(segment.offsetMinutes, totalWindowMinutes)
|
|
452
|
+
const durationMinutes = segment.durationMinutes
|
|
453
|
+
const height = minutesToPercent(durationMinutes, totalWindowMinutes)
|
|
454
|
+
return (
|
|
455
|
+
<ScheduleEventChip
|
|
456
|
+
key={event.id}
|
|
457
|
+
event={event}
|
|
458
|
+
isFirst={segment.isFirst}
|
|
459
|
+
isLast={segment.isLast}
|
|
460
|
+
dayIndex={columnIndex}
|
|
461
|
+
day={day}
|
|
462
|
+
onPaginate={onPaginate}
|
|
463
|
+
timeZone={timeZone}
|
|
464
|
+
startHour={startHour}
|
|
465
|
+
totalWindowMinutes={totalWindowMinutes}
|
|
466
|
+
top={top}
|
|
467
|
+
height={height}
|
|
468
|
+
insets={insets}
|
|
469
|
+
slotDuration={slotDuration}
|
|
470
|
+
minDuration={minDuration}
|
|
471
|
+
resizeCollision={resizeCollision}
|
|
472
|
+
maxDuration={maxDuration}
|
|
473
|
+
slotDisabled={slotDisabled}
|
|
474
|
+
editableDrag={editableDrag}
|
|
475
|
+
editableResize={editableResize}
|
|
476
|
+
editableRemove={editableRemove}
|
|
477
|
+
preventOverlapOnDrag={preventOverlapOnDrag}
|
|
478
|
+
preventOverlapOnResize={preventOverlapOnResize}
|
|
479
|
+
overlapCandidates={overlapCandidates}
|
|
480
|
+
{...chipSelection(selected, event.id, ownsAnchor)}
|
|
481
|
+
onEventSelect={onEventSelect}
|
|
482
|
+
withEventDetails={withEventDetails}
|
|
483
|
+
present={!exitingIds?.has(segment.id)}
|
|
484
|
+
onExitComplete={onExitComplete}
|
|
485
|
+
onEventChange={onEventChange}
|
|
486
|
+
onEventRemove={onEventRemove}
|
|
487
|
+
renderEventDetails={renderEventDetails}
|
|
488
|
+
locale={locale}
|
|
489
|
+
translations={translations}
|
|
490
|
+
classNames={classNames?.event}
|
|
491
|
+
detailsPopoverClassName={classNames?.eventDetailsPopover}
|
|
492
|
+
/>
|
|
493
|
+
)
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
const totalHours = endHour - startHour
|
|
497
|
+
|
|
498
|
+
// Every chip below is its own independent `tabIndex={0}` stop
|
|
499
|
+
// (`schedule-event-chip.tsx`), and native Tab/screen-reader order always
|
|
500
|
+
// follows DOM order — never a chip's own percent-based `top`/`left`. So
|
|
501
|
+
// DOM order has to be *derived* from the same visual position each chip is
|
|
502
|
+
// painted at (top-to-bottom by `start`, then left-to-right by `column`),
|
|
503
|
+
// not inherited from `dayStatic`/`dayEvents`' own caller-supplied array
|
|
504
|
+
// order or `overflow`'s own append-last position — same "sort what you're
|
|
505
|
+
// about to `.map()` into JSX by its own visual key" move
|
|
506
|
+
// `schedule-month-view.tsx`'s day-cell pill order already uses.
|
|
507
|
+
// `layoutEventColumnsCapped`'s own column-packing order (and
|
|
508
|
+
// `dayEvents`/`dayStatic`'s tie-break priority within it) is untouched —
|
|
509
|
+
// only the render order of its already-computed output changes here.
|
|
510
|
+
const eventChips = [...dayStaticSegments, ...daySegments].flatMap((segment) => {
|
|
511
|
+
// A missing entry means this piece overflowed — it's rendered via the
|
|
512
|
+
// "+N" indicator below instead, never with a stale fallback position
|
|
513
|
+
// (that would silently re-stack it under something else).
|
|
514
|
+
const entry = layoutFor(segment.id)
|
|
515
|
+
if (!entry) return []
|
|
516
|
+
return [
|
|
517
|
+
{
|
|
518
|
+
key: segment.id,
|
|
519
|
+
// The *clipped* start, so DOM order follows the position this piece is
|
|
520
|
+
// actually painted at. A spanning event's later pieces start at the
|
|
521
|
+
// band's top, which is exactly where they appear.
|
|
522
|
+
start: segment.start.getTime(),
|
|
523
|
+
column: entry.column,
|
|
524
|
+
node: renderChip(segment, columnInsets(entry)),
|
|
525
|
+
},
|
|
526
|
+
]
|
|
527
|
+
})
|
|
528
|
+
const overflowChips = overflow.map((segment) => {
|
|
529
|
+
const insets = columnInsets({
|
|
530
|
+
column: maxOverlapColumns,
|
|
531
|
+
columnSpan: 1,
|
|
532
|
+
columnCount: maxOverlapColumns + 1,
|
|
533
|
+
})
|
|
534
|
+
const overflowEvents = segment.ids
|
|
535
|
+
.map((id) => byId.get(id))
|
|
536
|
+
.filter((event): event is ScheduleAnyEvent<P> => event != null)
|
|
537
|
+
// Same band-relative measure the chips use — `layoutEventColumnsCapped`
|
|
538
|
+
// was fed segments, so these spans are already clipped to it.
|
|
539
|
+
const top = minutesToPercent((segment.start.getTime() - bandStart) / 60_000, totalWindowMinutes)
|
|
540
|
+
const height = minutesToPercent(
|
|
541
|
+
(segment.end.getTime() - segment.start.getTime()) / 60_000,
|
|
542
|
+
totalWindowMinutes,
|
|
543
|
+
)
|
|
544
|
+
const key = `${segment.start.getTime()}-${segment.end.getTime()}`
|
|
545
|
+
return {
|
|
546
|
+
key,
|
|
547
|
+
start: segment.start.getTime(),
|
|
548
|
+
// Always the reserved last column (see `insets` above) — the "+N"
|
|
549
|
+
// indicator is always the rightmost card in its own cluster.
|
|
550
|
+
column: maxOverlapColumns,
|
|
551
|
+
node: (
|
|
552
|
+
// No "lone overflow renders as a real chip instead of a wasteful
|
|
553
|
+
// +1" special case here (unlike the all-day row's own overflow,
|
|
554
|
+
// which keeps one): `layoutEventColumnsCapped` only ever overflows a
|
|
555
|
+
// cluster by retrying at one fewer real column once *any* overflow
|
|
556
|
+
// occurs at the original cap, and that retry's own overflow count
|
|
557
|
+
// is provably always >= 2 (never exactly 1) — reducing by exactly
|
|
558
|
+
// one column can only free up room for one *fewer* real event, so
|
|
559
|
+
// whichever event the un-reduced pass had already overflowed stays
|
|
560
|
+
// overflowed, plus whichever one the reduction just displaced joins
|
|
561
|
+
// it. A "+1" here would mean this branch is literally unreachable,
|
|
562
|
+
// not just rare.
|
|
563
|
+
<ScheduleOverflowChip
|
|
564
|
+
key={key}
|
|
565
|
+
top={top}
|
|
566
|
+
height={height}
|
|
567
|
+
insets={insets}
|
|
568
|
+
events={overflowEvents}
|
|
569
|
+
date={day}
|
|
570
|
+
selectedId={ownsAnchor ? (selected[0] ?? null) : null}
|
|
571
|
+
onEventSelect={onEventSelect}
|
|
572
|
+
withEventDetails={withEventDetails}
|
|
573
|
+
onOverflowClick={onOverflowClick}
|
|
574
|
+
withOverflowDetails={withOverflowDetails}
|
|
575
|
+
renderOverflowDetails={renderOverflowDetails}
|
|
576
|
+
renderEventDetails={renderEventDetails}
|
|
577
|
+
locale={locale}
|
|
578
|
+
timeZone={timeZone}
|
|
579
|
+
translations={translations}
|
|
580
|
+
classNames={classNames?.overflow}
|
|
581
|
+
testId={`overflow-${key}`}
|
|
582
|
+
/>
|
|
583
|
+
),
|
|
584
|
+
}
|
|
585
|
+
})
|
|
586
|
+
const chips = [...eventChips, ...overflowChips].sort(
|
|
587
|
+
(a, b) => a.start - b.start || a.column - b.column,
|
|
588
|
+
)
|
|
589
|
+
|
|
590
|
+
return (
|
|
591
|
+
<div
|
|
592
|
+
{...create.getColumnProps()}
|
|
593
|
+
data-schedule-part="day-column"
|
|
594
|
+
data-day-index={columnIndex}
|
|
595
|
+
// This column's own calendar day, in the schedule's `timeZone`. How the
|
|
596
|
+
// day reveal (`schedule.tsx`) finds the column it was pointed at without
|
|
597
|
+
// re-deriving `getVisibleRange` + `enumerateDays` a second time — the
|
|
598
|
+
// exact duplication `isEventInVisibleRange`'s own comment argues against.
|
|
599
|
+
// `data-day-index` cannot stand in for it: an index is relative to
|
|
600
|
+
// whatever range happens to be rendered, which is the thing being
|
|
601
|
+
// resolved. Also gives Days the day-addressability Month and Year
|
|
602
|
+
// already have through their `data-testid="day-<key>"` cells.
|
|
603
|
+
data-day-key={dayKey(day, timeZone)}
|
|
604
|
+
{...(pageState === "exiting"
|
|
605
|
+
? // `data-page-exiting` is both the animation hook and the predicate
|
|
606
|
+
// every gesture query filters on (`schedule-grid-gesture.ts`).
|
|
607
|
+
// Deliberately not `data-state="closed"` — see `theme.css`.
|
|
608
|
+
{ "data-page-exiting": "true", inert: true, "aria-hidden": true }
|
|
609
|
+
: {})}
|
|
610
|
+
className={cn(
|
|
611
|
+
// `h-full` — stretches to fill the shared timed row's own resolved
|
|
612
|
+
// height (the row's `minmax(floor, 1fr)` track, see
|
|
613
|
+
// `ScheduleTimedGrid`'s inner grid wrapper), not a fixed height of
|
|
614
|
+
// its own; `align-self: stretch` (the grid default) is what makes
|
|
615
|
+
// that stretch actually apply here.
|
|
616
|
+
"relative row-2 h-full",
|
|
617
|
+
// `overflow-y-clip` contains the create draft's own scale overshoot.
|
|
618
|
+
// The draft rests at `scale-105` and transitions to `scale-100` on
|
|
619
|
+
// enter (see `schedule-create-draft.tsx` — the >1 resting scale is
|
|
620
|
+
// deliberate, so its *leave* expands outward where it can be seen
|
|
621
|
+
// instead of shrinking away behind the grid). A transform still
|
|
622
|
+
// contributes to an ancestor's scrollable overflow, so for the ~11
|
|
623
|
+
// frames of that transition a full-height draft stood 15px proud of
|
|
624
|
+
// the column at each end and the grid grew a vertical scrollbar that
|
|
625
|
+
// flashed and vanished. Measured: `scrollHeight` 885 -> 900 on a grid
|
|
626
|
+
// that fits exactly at rest.
|
|
627
|
+
//
|
|
628
|
+
// `y` only, and on the column rather than the grid: the now-cursor's
|
|
629
|
+
// marker dot is deliberately centred on the column's own inline-start
|
|
630
|
+
// edge and spills half its width outward, so clipping x would cut it
|
|
631
|
+
// in half. Measured during a gesture, `create-draft` is the only part
|
|
632
|
+
// that exceeds a column vertically (11px top, 21px bottom) — the
|
|
633
|
+
// draft's own time readout and every chip stay inside, so nothing
|
|
634
|
+
// else loses paint to this.
|
|
635
|
+
"overflow-y-clip",
|
|
636
|
+
// Only *between* day columns, not on the first one — that edge
|
|
637
|
+
// borders the gutter, not a sibling cell, and the gutter already
|
|
638
|
+
// reads as its own distinct region (sticky, opaque surface) without
|
|
639
|
+
// a redundant hairline restating the boundary.
|
|
640
|
+
!isFirstDayColumn && "border-s border-brand-900/20 dark:border-white/15",
|
|
641
|
+
pageState === "entering" && "animate-schedule-page-enter",
|
|
642
|
+
pageState === "exiting" && "pointer-events-none animate-schedule-page-leave",
|
|
643
|
+
)}
|
|
644
|
+
style={{ gridColumn: columnIndex + 2 }}
|
|
645
|
+
>
|
|
646
|
+
{/* Hour gridlines — a repeating background naturally draws a line at
|
|
647
|
+
* the *start* of every period, so applied directly to this column
|
|
648
|
+
* (from its own y=0) the first one would land exactly on the seam
|
|
649
|
+
* with the sticky header above, not between two peer rows. Offset
|
|
650
|
+
* onto its own element starting one hour's percentage-of-column-
|
|
651
|
+
* height down instead (spanning to the column's own bottom, no
|
|
652
|
+
* further offset needed there — a repeating pattern never draws a
|
|
653
|
+
* line at the *end* of its own painting area, only at each period's
|
|
654
|
+
* start, so the column's bottom edge stays clean on its own): the
|
|
655
|
+
* same repeat then lands its lines exactly on every remaining
|
|
656
|
+
* internal hour boundary and nowhere else. Percentage-based (not
|
|
657
|
+
* `--sch-hour-height`-driven, as it used to be — correction after v1
|
|
658
|
+
* shipped): `top` is a fraction of *this* column's own height, but
|
|
659
|
+
* the gradient's own repeat-length is a fraction of the *shorter* box
|
|
660
|
+
* this element itself occupies (column height minus that same `top`
|
|
661
|
+
* offset) — one hour's share of `totalHours - 1` equal parts, not
|
|
662
|
+
* `totalHours`, since this element doesn't include the first hour's
|
|
663
|
+
* worth of space at all. Skipped below 2 hours entirely: there's no
|
|
664
|
+
* internal boundary to draw in a 1-hour window, and this element's
|
|
665
|
+
* own height would be exactly 0 anyway. */}
|
|
666
|
+
<div
|
|
667
|
+
aria-hidden
|
|
668
|
+
data-schedule-part="hour-gridlines"
|
|
669
|
+
className={cn(
|
|
670
|
+
"pointer-events-none absolute inset-x-0 bottom-0",
|
|
671
|
+
"[--sch-gridline-color:color-mix(in_oklab,var(--color-brand-900)_10%,transparent)]",
|
|
672
|
+
"dark:[--sch-gridline-color:rgb(255_255_255/0.08)]",
|
|
673
|
+
)}
|
|
674
|
+
style={{
|
|
675
|
+
top: `calc(100% / ${totalHours})`,
|
|
676
|
+
backgroundImage:
|
|
677
|
+
totalHours > 1
|
|
678
|
+
? `repeating-linear-gradient(to bottom, var(--sch-gridline-color) 0 1px, transparent 1px calc(100% / ${totalHours - 1}))`
|
|
679
|
+
: undefined,
|
|
680
|
+
}}
|
|
681
|
+
/>
|
|
682
|
+
{disabledRuns.map((run) => (
|
|
683
|
+
<ScheduleDisabledOverlay
|
|
684
|
+
key={run.startMinute}
|
|
685
|
+
style={{
|
|
686
|
+
top: `${minutesToPercent(run.startMinute - startHour * 60, totalWindowMinutes)}%`,
|
|
687
|
+
height: `${minutesToPercent(run.endMinute - run.startMinute, totalWindowMinutes)}%`,
|
|
688
|
+
}}
|
|
689
|
+
/>
|
|
690
|
+
))}
|
|
691
|
+
<ScheduleCreateDraft className={classNames?.createDraft} />
|
|
692
|
+
<ScheduleDragGhost className={classNames?.dragGhost} />
|
|
693
|
+
{chips.map((chip) => chip.node)}
|
|
694
|
+
{withNowIndicator && isToday ? (
|
|
695
|
+
<NowCursorLine
|
|
696
|
+
now={now}
|
|
697
|
+
nowRef={nowRef}
|
|
698
|
+
startHour={startHour}
|
|
699
|
+
endHour={endHour}
|
|
700
|
+
hideDot={isFirstDayColumn}
|
|
701
|
+
className={classNames?.nowIndicator}
|
|
702
|
+
/>
|
|
703
|
+
) : null}
|
|
704
|
+
</div>
|
|
705
|
+
)
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
// Sticky background for anything pinned by `position: sticky` (the corner
|
|
709
|
+
// cell, the day headers, the hour gutter) — needs to be opaque(-ish) so
|
|
710
|
+
// scrolled content doesn't show through underneath it as the grid scrolls
|
|
711
|
+
// past. Matches AppShell's own sticky-chrome recipe (Header/Sidebar) — the
|
|
712
|
+
// kit's own precedent for "a pinned bar over scrolled content" already
|
|
713
|
+
// accepts 90%/85% alpha as opaque enough for this purpose. `backdrop-blur`
|
|
714
|
+
// on top mirrors `Table`'s own sticky thead/tfoot treatment, so scrolled
|
|
715
|
+
// event chips read as a soft blur rather than a flat tint showing through.
|
|
716
|
+
const stickySurface = "bg-brand-50/90 backdrop-blur-lg dark:bg-brand-950/85"
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* A page turn keeps the outgoing range mounted for one animation so the day
|
|
720
|
+
* band can travel rather than swap — the approach Vanilla Calendar Pro takes
|
|
721
|
+
* (an `inert` ghost layer) rather than the View Transitions API, which cannot
|
|
722
|
+
* clip a snapshot to a scroll container and is only stable in React 19.3.
|
|
723
|
+
*
|
|
724
|
+
* Only the band is duplicated. The hour gutter, the gridlines and the
|
|
725
|
+
* now-cursor are outside it and stay put by construction, which is what makes
|
|
726
|
+
* a page turn read as the days moving rather than the whole view lurching.
|
|
727
|
+
*/
|
|
728
|
+
type PageTransition = { days: Date[]; key: string; direction: -1 | 1 }
|
|
729
|
+
|
|
730
|
+
/** Roughly the token duration (220ms) plus headroom, as a backstop for the
|
|
731
|
+
* `animationend` that normally clears the outgoing band. */
|
|
732
|
+
const PAGE_ANIMATION_MS = 400
|
|
733
|
+
|
|
734
|
+
const bandKeyOf = (days: Date[]) =>
|
|
735
|
+
days.length > 0 ? `${(days[0] as Date).getTime()}:${days.length}` : ""
|
|
736
|
+
|
|
737
|
+
/** Live, not cached — a consumer can toggle the OS setting mid-session, and
|
|
738
|
+
* reading it here is the same thing `scrollElementToCenter` already does. */
|
|
739
|
+
const prefersReducedMotion = () =>
|
|
740
|
+
typeof window !== "undefined" &&
|
|
741
|
+
typeof window.matchMedia === "function" &&
|
|
742
|
+
window.matchMedia("(prefers-reduced-motion: reduce)").matches
|
|
743
|
+
|
|
744
|
+
export function ScheduleTimedGrid<P = unknown>({
|
|
745
|
+
days,
|
|
746
|
+
data,
|
|
747
|
+
staticEvents,
|
|
748
|
+
startHour,
|
|
749
|
+
endHour,
|
|
750
|
+
slotDuration: slotDurationProp,
|
|
751
|
+
minDuration: minDurationProp,
|
|
752
|
+
resizeCollision,
|
|
753
|
+
maxDuration: maxDurationProp,
|
|
754
|
+
slotDisabled,
|
|
755
|
+
now,
|
|
756
|
+
withNowIndicator,
|
|
757
|
+
selected = [],
|
|
758
|
+
onEventSelect,
|
|
759
|
+
withEventDetails,
|
|
760
|
+
onEventChange,
|
|
761
|
+
onEventRemove,
|
|
762
|
+
onEventCreate,
|
|
763
|
+
onGridClick,
|
|
764
|
+
editable,
|
|
765
|
+
preventOverlap,
|
|
766
|
+
maxOverlapColumns = DEFAULT_MAX_OVERLAP_COLUMNS,
|
|
767
|
+
maxAllDayRows = DEFAULT_MAX_ALL_DAY_ROWS,
|
|
768
|
+
onOverflowClick,
|
|
769
|
+
withOverflowDetails,
|
|
770
|
+
renderOverflowDetails,
|
|
771
|
+
onDayClick,
|
|
772
|
+
renderEventDetails,
|
|
773
|
+
locale,
|
|
774
|
+
timeZone,
|
|
775
|
+
translations,
|
|
776
|
+
classNames,
|
|
777
|
+
empty,
|
|
778
|
+
hourHeight,
|
|
779
|
+
ref,
|
|
780
|
+
nowRef,
|
|
781
|
+
onPaginate,
|
|
782
|
+
}: ScheduleTimedGridProps<P>) {
|
|
783
|
+
// The one place the slot props are normalised; everything below — the
|
|
784
|
+
// create hook, every chip's resize — reads these resolved values.
|
|
785
|
+
const {
|
|
786
|
+
slotDuration,
|
|
787
|
+
minDuration,
|
|
788
|
+
maxDuration,
|
|
789
|
+
issues: slotIssues,
|
|
790
|
+
} = resolveSlotDurations({
|
|
791
|
+
slotDuration: slotDurationProp,
|
|
792
|
+
minDuration: minDurationProp,
|
|
793
|
+
maxDuration: maxDurationProp,
|
|
794
|
+
})
|
|
795
|
+
const slotIssueKey = slotIssues.join("\n")
|
|
796
|
+
useEffect(() => {
|
|
797
|
+
for (const issue of slotIssueKey ? slotIssueKey.split("\n") : []) devWarn(`Schedule: ${issue}`)
|
|
798
|
+
}, [slotIssueKey])
|
|
799
|
+
// Screen-reader announcer for create/remove: the chip's own fade/scale
|
|
800
|
+
// animation (`schedule-event-chip.tsx`) is purely visual, so a non-sighted
|
|
801
|
+
// user gets nothing today without this. Wraps `onEventRemove`/
|
|
802
|
+
// `onEventCreate` right here — the one place that already owns both and
|
|
803
|
+
// forwards them straight down to `DayColumn` — rather than threading a new
|
|
804
|
+
// prop through `ScheduleEventChip`/`use-event-create.ts`.
|
|
805
|
+
const [announcement, setAnnouncement] = useState("")
|
|
806
|
+
const announce = useCallback((text: string) => {
|
|
807
|
+
setAnnouncement("")
|
|
808
|
+
// Clear, then set on the next frame: if the same text is announced twice
|
|
809
|
+
// in a row (e.g. removing two same-titled events back to back), a
|
|
810
|
+
// screen reader only re-announces a live region on an actual content
|
|
811
|
+
// change — without the intermediate empty frame, the second, identical
|
|
812
|
+
// announcement would silently be swallowed.
|
|
813
|
+
requestAnimationFrame(() => setAnnouncement(text))
|
|
814
|
+
}, [])
|
|
815
|
+
/**
|
|
816
|
+
* A plain click on empty grid space clears the selection, and separately
|
|
817
|
+
* reports the gesture.
|
|
818
|
+
*
|
|
819
|
+
* Composed here rather than inside `use-event-create.ts` because that hook
|
|
820
|
+
* already owns the one thing that is hard — resolving click-vs-drag — and
|
|
821
|
+
* layering a second responsibility into it would put selection behind the
|
|
822
|
+
* same `CLICK_SLOP` logic it has no business knowing about. This is the same
|
|
823
|
+
* place `handleEventRemove`/`handleEventCreate` below wrap a consumer
|
|
824
|
+
* callback with internal behaviour, for the same reason.
|
|
825
|
+
*
|
|
826
|
+
* Both fire: `onSelect(null)` reports the state change, `onGridClick` the raw
|
|
827
|
+
* gesture. They are not synonyms — `onGridClick` fires whether or not
|
|
828
|
+
* anything was selected, which is the one thing the former `onEventDismiss`
|
|
829
|
+
* did that selection does not cover.
|
|
830
|
+
*/
|
|
831
|
+
const handleGridClick = useCallback(
|
|
832
|
+
(date: Date) => {
|
|
833
|
+
onEventSelect?.(null)
|
|
834
|
+
onGridClick?.(date)
|
|
835
|
+
},
|
|
836
|
+
[onEventSelect, onGridClick],
|
|
837
|
+
)
|
|
838
|
+
/**
|
|
839
|
+
* Events that were in `data` last render and are not in it now — kept
|
|
840
|
+
* mounted just long enough to play their exit.
|
|
841
|
+
*
|
|
842
|
+
* Derived from `data` rather than from who clicked what, which is the whole
|
|
843
|
+
* point: a removal animates however it happened. The built-in `x`, a
|
|
844
|
+
* consumer's own delete button, an undo, a server push — all of them are
|
|
845
|
+
* "the event left `data`", and all of them now animate. The previous design
|
|
846
|
+
* knew only about its own button.
|
|
847
|
+
*
|
|
848
|
+
* State is unavoidable here and is not redundant: once React unmounts a node
|
|
849
|
+
* no CSS can animate it, so *something* has to outlive `data`, and this is
|
|
850
|
+
* the only record of an event that by definition is no longer in it. It is
|
|
851
|
+
* the same thing `AnimatePresence` holds, for the same reason. React 19.3's
|
|
852
|
+
* `<ViewTransition>` could do it with no state at all, but the RFC already
|
|
853
|
+
* rejected that API for this surface (§14): it cannot handle an element
|
|
854
|
+
* clipped by an `overflow` ancestor, which is exactly what this grid is.
|
|
855
|
+
*/
|
|
856
|
+
const [exiting, setExiting] = useState<ScheduleEvent<P>[]>([])
|
|
857
|
+
const [previousData, setPreviousData] = useState(data)
|
|
858
|
+
// Derived **during render**, not in an effect — React's documented "adjust
|
|
859
|
+
// state when a prop changes" escape hatch, and the same call the page-turn
|
|
860
|
+
// animation makes for the same reason. An effect runs a commit too late: the
|
|
861
|
+
// render that drops the event from `data` would unmount its chips, and the
|
|
862
|
+
// outgoing copy would then *remount* on the next commit already closed, with
|
|
863
|
+
// no open state to animate away from. Measured in a browser — the copy came
|
|
864
|
+
// back `display: none` at full opacity and simply sat there.
|
|
865
|
+
if (previousData !== data) {
|
|
866
|
+
const gone = previousData.filter((event) => !data.some((live) => live.id === event.id))
|
|
867
|
+
setPreviousData(data)
|
|
868
|
+
if (gone.length > 0) {
|
|
869
|
+
setExiting((current) => [
|
|
870
|
+
// An event can leave, be restored, and leave again before the first
|
|
871
|
+
// exit has finished; keying by id keeps one outgoing copy, not two.
|
|
872
|
+
...current.filter((event) => !gone.some((g) => g.id === event.id)),
|
|
873
|
+
...gone,
|
|
874
|
+
])
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
// An event that comes *back* must stop being an outgoing copy, or it would
|
|
878
|
+
// render twice — once live, once mid-fade.
|
|
879
|
+
const exitingIds = useMemo(() => {
|
|
880
|
+
const live = new Set(data.map((event) => event.id))
|
|
881
|
+
return new Set(exiting.map((event) => event.id).filter((id) => !live.has(id)))
|
|
882
|
+
}, [exiting, data])
|
|
883
|
+
const handleExitComplete = useCallback((event: ScheduleEvent<P>) => {
|
|
884
|
+
setExiting((current) => current.filter((e) => e.id !== event.id))
|
|
885
|
+
}, [])
|
|
886
|
+
|
|
887
|
+
const handleEventRemove = useCallback(
|
|
888
|
+
(event: ScheduleEvent<P>) => {
|
|
889
|
+
// Fired straight from the click now, not after the exit — the consumer
|
|
890
|
+
// drops it from `data`, and the animation follows from that.
|
|
891
|
+
announce(translations.eventRemoved.replace("{title}", event.title))
|
|
892
|
+
onEventRemove?.(event)
|
|
893
|
+
},
|
|
894
|
+
[onEventRemove, translations, announce],
|
|
895
|
+
)
|
|
896
|
+
const handleEventCreate = useCallback<ScheduleEventCreateHandler>(
|
|
897
|
+
(ranges) => {
|
|
898
|
+
// One announcement per gesture, however many events it made.
|
|
899
|
+
announce(
|
|
900
|
+
translations.eventCreated.replace(
|
|
901
|
+
"{range}",
|
|
902
|
+
ranges.map((range) => timeRangeLabel(range.start, range.end, locale)).join(", "),
|
|
903
|
+
),
|
|
904
|
+
)
|
|
905
|
+
onEventCreate?.(ranges)
|
|
906
|
+
},
|
|
907
|
+
[onEventCreate, translations, locale, announce],
|
|
908
|
+
)
|
|
909
|
+
|
|
910
|
+
// An explicit `hourHeight` prop always wins; absent, it scales with
|
|
911
|
+
// `slotDuration` (see `defaultHourHeight`'s own comment).
|
|
912
|
+
const resolvedHourHeight = hourHeight ?? defaultHourHeight(slotDuration)
|
|
913
|
+
const layoutFloorMs = visualFloorMs(resolvedHourHeight)
|
|
914
|
+
const internalGridRef = useRef<HTMLDivElement>(null)
|
|
915
|
+
/** Set by the gesture-driven `onPaginate` below, read and cleared by the
|
|
916
|
+
* next band swap. A page turn the user reached by *holding a drag at the
|
|
917
|
+
* edge* must not animate: `measureColumns` re-measures one frame later
|
|
918
|
+
* (`schedule-grid-gesture.ts`), and mid-animation columns would hand it
|
|
919
|
+
* transformed rects to cache for the rest of the gesture. */
|
|
920
|
+
const pagedByGestureRef = useRef(false)
|
|
921
|
+
/** The band's rendered width, refreshed every commit. Read during the
|
|
922
|
+
* render that *starts* an animation, so the offset is already in the DOM on
|
|
923
|
+
* the animation's first frame rather than one layout effect too late. */
|
|
924
|
+
const bandWidthRef = useRef(0)
|
|
925
|
+
|
|
926
|
+
const [band, setBand] = useState<{ key: string; days: Date[] }>(() => ({
|
|
927
|
+
key: bandKeyOf(days),
|
|
928
|
+
days,
|
|
929
|
+
}))
|
|
930
|
+
const [pageOut, setPageOut] = useState<PageTransition | null>(null)
|
|
931
|
+
|
|
932
|
+
// Adjusting state directly during render when a prop changes — React's own
|
|
933
|
+
// documented escape hatch, and the only way the outgoing copy can mount in
|
|
934
|
+
// the *same* commit as the incoming one. A frame later would show the new
|
|
935
|
+
// band alone before the old one appeared to leave.
|
|
936
|
+
const daysKey = bandKeyOf(days)
|
|
937
|
+
if (band.key !== daysKey) {
|
|
938
|
+
const previous = band.days
|
|
939
|
+
const byGesture = pagedByGestureRef.current
|
|
940
|
+
pagedByGestureRef.current = false
|
|
941
|
+
// Only a real page turn slides. `paginateDate` always steps by exactly
|
|
942
|
+
// `visibleDays`, so anything else — the Now button, a consumer setting
|
|
943
|
+
// `date` to an arbitrary day — is a jump, and sliding it one band's width
|
|
944
|
+
// would claim a distance it did not travel.
|
|
945
|
+
const stepDays = Math.round(
|
|
946
|
+
(((days[0] as Date | undefined)?.getTime() ?? 0) -
|
|
947
|
+
((previous[0] as Date | undefined)?.getTime() ?? 0)) /
|
|
948
|
+
86_400_000,
|
|
949
|
+
)
|
|
950
|
+
const isOnePageTurn =
|
|
951
|
+
previous.length === days.length && days.length > 0 && Math.abs(stepDays) === days.length
|
|
952
|
+
setPageOut(
|
|
953
|
+
isOnePageTurn && !byGesture && !prefersReducedMotion()
|
|
954
|
+
? { days: previous, key: band.key, direction: stepDays > 0 ? 1 : -1 }
|
|
955
|
+
: null,
|
|
956
|
+
)
|
|
957
|
+
setBand({ key: daysKey, days })
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
useLayoutEffect(() => {
|
|
961
|
+
const column = internalGridRef.current?.querySelector<HTMLElement>(
|
|
962
|
+
"[data-schedule-part='day-column'][data-day-index]:not([data-page-exiting])",
|
|
963
|
+
)
|
|
964
|
+
if (column) bandWidthRef.current = column.getBoundingClientRect().width * days.length
|
|
965
|
+
})
|
|
966
|
+
|
|
967
|
+
useEffect(() => {
|
|
968
|
+
if (!pageOut) return
|
|
969
|
+
const timer = setTimeout(() => setPageOut(null), PAGE_ANIMATION_MS)
|
|
970
|
+
return () => clearTimeout(timer)
|
|
971
|
+
}, [pageOut])
|
|
972
|
+
|
|
973
|
+
/** Wraps the gesture-driven page turn so the swap above can tell it apart
|
|
974
|
+
* from a toolbar click. */
|
|
975
|
+
const handlePaginate = useCallback(
|
|
976
|
+
(direction: -1 | 1) => {
|
|
977
|
+
pagedByGestureRef.current = true
|
|
978
|
+
onPaginate?.(direction)
|
|
979
|
+
},
|
|
980
|
+
[onPaginate],
|
|
981
|
+
)
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* One band of day columns. Rendered twice while a page turn runs: the
|
|
985
|
+
* incoming range, and a fully inert copy of the one it replaced.
|
|
986
|
+
*
|
|
987
|
+
* The outgoing copy deliberately carries **no now-cursor** — `nowRef` is a
|
|
988
|
+
* merged ref pointing at a single rendered marker, and a second marker would
|
|
989
|
+
* clobber whichever one `Now` later scrolls to.
|
|
990
|
+
*/
|
|
991
|
+
const renderBand = (
|
|
992
|
+
bandDays: Date[],
|
|
993
|
+
segs: ScheduleSegment<P>[][],
|
|
994
|
+
staticSegs: ScheduleSegment<P>[][],
|
|
995
|
+
role: "entering" | "exiting" | undefined,
|
|
996
|
+
keyPrefix: string,
|
|
997
|
+
) =>
|
|
998
|
+
bandDays.map((day, columnIndex) => {
|
|
999
|
+
const isToday = eventOccursOnDay(
|
|
1000
|
+
{ start: todayRef, end: new Date(todayRef.getTime() + 1) },
|
|
1001
|
+
day,
|
|
1002
|
+
timeZone,
|
|
1003
|
+
)
|
|
1004
|
+
return (
|
|
1005
|
+
<DayColumn
|
|
1006
|
+
key={`${keyPrefix}${day.toISOString()}`}
|
|
1007
|
+
day={day}
|
|
1008
|
+
pageState={role}
|
|
1009
|
+
columnIndex={columnIndex}
|
|
1010
|
+
onPaginate={role === "exiting" ? undefined : handlePaginate}
|
|
1011
|
+
isFirstDayColumn={columnIndex === 0}
|
|
1012
|
+
daySegments={segs[columnIndex] ?? []}
|
|
1013
|
+
dayStaticSegments={staticSegs[columnIndex] ?? []}
|
|
1014
|
+
startHour={startHour}
|
|
1015
|
+
endHour={endHour}
|
|
1016
|
+
totalWindowMinutes={totalWindowMinutes}
|
|
1017
|
+
slotDuration={slotDuration}
|
|
1018
|
+
minDuration={minDuration}
|
|
1019
|
+
resizeCollision={resizeCollision}
|
|
1020
|
+
maxDuration={maxDuration}
|
|
1021
|
+
slotDisabled={slotDisabled}
|
|
1022
|
+
editableCreate={editableCreate}
|
|
1023
|
+
editableDrag={editableDrag}
|
|
1024
|
+
editableResize={editableResize}
|
|
1025
|
+
editableRemove={editableRemove}
|
|
1026
|
+
preventOverlapOnCreate={preventOverlapOnCreate}
|
|
1027
|
+
preventOverlapOnDrag={preventOverlapOnDrag}
|
|
1028
|
+
preventOverlapOnResize={preventOverlapOnResize}
|
|
1029
|
+
overlapCandidates={overlapCandidates}
|
|
1030
|
+
maxOverlapColumns={maxOverlapColumns}
|
|
1031
|
+
layoutFloorMs={layoutFloorMs}
|
|
1032
|
+
selected={selected}
|
|
1033
|
+
// The outgoing band is an inert copy: it keeps the selected fill so
|
|
1034
|
+
// nothing flickers mid-slide, but never a second popover.
|
|
1035
|
+
ownsAnchor={role !== "exiting" && anchorPiece.key === day.toISOString()}
|
|
1036
|
+
onEventSelect={
|
|
1037
|
+
onEventSelect &&
|
|
1038
|
+
((event: ScheduleAnyEvent<P> | null) => {
|
|
1039
|
+
anchorPiece.press(day.toISOString(), event)
|
|
1040
|
+
onEventSelect(event)
|
|
1041
|
+
})
|
|
1042
|
+
}
|
|
1043
|
+
withEventDetails={withEventDetails}
|
|
1044
|
+
exitingIds={exitingIds}
|
|
1045
|
+
onExitComplete={handleExitComplete}
|
|
1046
|
+
onEventChange={onEventChange}
|
|
1047
|
+
onEventRemove={handleEventRemove}
|
|
1048
|
+
onEventCreate={handleEventCreate}
|
|
1049
|
+
onGridClick={handleGridClick}
|
|
1050
|
+
onOverflowClick={onOverflowClick}
|
|
1051
|
+
withOverflowDetails={withOverflowDetails}
|
|
1052
|
+
renderOverflowDetails={renderOverflowDetails}
|
|
1053
|
+
renderEventDetails={renderEventDetails}
|
|
1054
|
+
locale={locale}
|
|
1055
|
+
timeZone={timeZone}
|
|
1056
|
+
translations={translations}
|
|
1057
|
+
classNames={classNames}
|
|
1058
|
+
isToday={role === "exiting" ? false : isToday}
|
|
1059
|
+
now={now}
|
|
1060
|
+
nowRef={role === "exiting" ? undefined : nowRef}
|
|
1061
|
+
withNowIndicator={role === "exiting" ? false : withNowIndicator}
|
|
1062
|
+
/>
|
|
1063
|
+
)
|
|
1064
|
+
})
|
|
1065
|
+
|
|
1066
|
+
const paging = pageOut !== null
|
|
1067
|
+
const enterClass = paging ? "animate-schedule-page-enter" : undefined
|
|
1068
|
+
|
|
1069
|
+
const totalWindowMinutes = (endHour - startHour) * 60
|
|
1070
|
+
// The timed row's own floor — `minmax(minTimedHeightPx, 1fr)` below lets it
|
|
1071
|
+
// stretch past this to fill real leftover space, scrolling only once this
|
|
1072
|
+
// floor itself exceeds what's available.
|
|
1073
|
+
const minTimedHeightPx = (endHour - startHour) * resolvedHourHeight
|
|
1074
|
+
const hours = Array.from({ length: endHour - startHour }, (_, i) => startHour + i)
|
|
1075
|
+
const hasAnyEvent = data.length > 0 || staticEvents.length > 0
|
|
1076
|
+
const dayFormatter = new Intl.DateTimeFormat(locale, { weekday: "short", day: "numeric" })
|
|
1077
|
+
// `"2-digit"`, not `"numeric"` — same SSR-hydration reasoning as
|
|
1078
|
+
// `schedule-dates.ts`'s `timeRangeLabel`.
|
|
1079
|
+
const hourFormatter = new Intl.DateTimeFormat(locale, { hour: "2-digit" })
|
|
1080
|
+
// `useNow`, not a bare `new Date()`: this feeds `isToday` below and
|
|
1081
|
+
// `anyDayIsToday`, which is the gate on `NowCursorLine` — and that line
|
|
1082
|
+
// reads the clock through `useNow` itself. A raw `new Date()` here made the
|
|
1083
|
+
// gate and the thing it gates disagree during SSR: the gate opened on the
|
|
1084
|
+
// server's real date while the cursor rendered `useNow`'s epoch server
|
|
1085
|
+
// snapshot, painting a now-marker at 01:00 on a day that isn't today. Going
|
|
1086
|
+
// through the same hook means both sides see the epoch on the server and the
|
|
1087
|
+
// first client render (so hydration matches), then the real time together.
|
|
1088
|
+
// It also costs a re-render a minute, which is what moves the today column
|
|
1089
|
+
// across midnight rather than leaving it on yesterday.
|
|
1090
|
+
const todayRef = useNow(now)
|
|
1091
|
+
const columnsTemplate = `var(--sch-gutter-width) repeat(${days.length}, minmax(var(--sch-day-min-width), 1fr))`
|
|
1092
|
+
const anyDayIsToday = days.some((day) =>
|
|
1093
|
+
eventOccursOnDay({ start: todayRef, end: new Date(todayRef.getTime() + 1) }, day, timeZone),
|
|
1094
|
+
)
|
|
1095
|
+
// The all-day row's own input: every all-day event overlapping the whole
|
|
1096
|
+
// visible window (not per-day — a multi-day bar needs the events it spans
|
|
1097
|
+
// even where it doesn't literally start/end), day-columns' own timed
|
|
1098
|
+
// events excluded below via `!event.allDay`.
|
|
1099
|
+
const visibleWindowEnd = paginateDate("days", days[days.length - 1] as Date, 1, {
|
|
1100
|
+
timeZone,
|
|
1101
|
+
visibleDays: 1,
|
|
1102
|
+
})
|
|
1103
|
+
const allDayEvents = [...data, ...staticEvents].filter(
|
|
1104
|
+
(event) =>
|
|
1105
|
+
event.allDay && rangesOverlap(event, { start: days[0] as Date, end: visibleWindowEnd }),
|
|
1106
|
+
)
|
|
1107
|
+
const outDays = pageOut?.days ?? []
|
|
1108
|
+
const outAllDayEvents = pageOut
|
|
1109
|
+
? [...data, ...staticEvents].filter(
|
|
1110
|
+
(event) =>
|
|
1111
|
+
event.allDay &&
|
|
1112
|
+
rangesOverlap(event, {
|
|
1113
|
+
start: outDays[0] as Date,
|
|
1114
|
+
end: paginateDate("days", outDays[outDays.length - 1] as Date, 1, { timeZone }),
|
|
1115
|
+
}),
|
|
1116
|
+
)
|
|
1117
|
+
: []
|
|
1118
|
+
// Resolved once — doesn't vary per day-column. `gestures` feeds axis A
|
|
1119
|
+
// (`isOverlapGestureEnabled`, per gesture below); `against` feeds axis B,
|
|
1120
|
+
// consumed immediately below.
|
|
1121
|
+
const { gestures: preventOverlapGestures, against: overlapAgainst } =
|
|
1122
|
+
resolveOverlapPrevention(preventOverlap)
|
|
1123
|
+
// The timed events, split into one piece per day column. Hoisted out of
|
|
1124
|
+
// `days.map` below — which used to re-filter `data`/`staticEvents` once per
|
|
1125
|
+
// column — and computed for the whole window at once, so a column's pieces
|
|
1126
|
+
// are just `[columnIndex]`. `!event.allDay`: all-day events render in the
|
|
1127
|
+
// sticky spanning row above, never positioned by time-of-day here.
|
|
1128
|
+
// Outgoing copies ride along through segmentation and layout so a fading chip
|
|
1129
|
+
// still has real geometry — but never through `overlapCandidates` below: an
|
|
1130
|
+
// event that has left `data` no longer occupies its slot, so a drag landing
|
|
1131
|
+
// where it used to be must not be rejected.
|
|
1132
|
+
const liveTimedData = data.filter((event) => !event.allDay)
|
|
1133
|
+
const timedData =
|
|
1134
|
+
exiting.length === 0
|
|
1135
|
+
? liveTimedData
|
|
1136
|
+
: [...liveTimedData, ...exiting.filter((event) => !event.allDay && exitingIds.has(event.id))]
|
|
1137
|
+
const timedStatic = staticEvents.filter((event) => !event.allDay)
|
|
1138
|
+
// The outgoing band is a real render of the *previous* range, so it needs
|
|
1139
|
+
// its own segmentation — the same events, clipped to different days. Only
|
|
1140
|
+
// computed while a page turn is actually running.
|
|
1141
|
+
const outDataSegments = pageOut
|
|
1142
|
+
? segmentEvents(timedData, outDays, { startHour, endHour, timeZone })
|
|
1143
|
+
: []
|
|
1144
|
+
const outStaticSegments = pageOut
|
|
1145
|
+
? segmentEvents(timedStatic, outDays, { startHour, endHour, timeZone })
|
|
1146
|
+
: []
|
|
1147
|
+
const dataSegments = segmentEvents(timedData, days, { startHour, endHour, timeZone })
|
|
1148
|
+
const staticSegments = segmentEvents(timedStatic, days, { startHour, endHour, timeZone })
|
|
1149
|
+
// A multi-day event has a piece in every column it touches, all sharing its
|
|
1150
|
+
// id; exactly one of them may open the details popover.
|
|
1151
|
+
const anchorId = selected[0] ?? null
|
|
1152
|
+
const anchorPiece = usePieceAnchor(
|
|
1153
|
+
anchorId,
|
|
1154
|
+
days
|
|
1155
|
+
.filter((_, i) =>
|
|
1156
|
+
[...(dataSegments[i] ?? []), ...(staticSegments[i] ?? [])].some((s) => s.id === anchorId),
|
|
1157
|
+
)
|
|
1158
|
+
.map((day) => day.toISOString()),
|
|
1159
|
+
)
|
|
1160
|
+
// RFC §12a axis B, resolved **window-wide** rather than per day-column — see
|
|
1161
|
+
// `DayColumnProps.overlapCandidates`. Built from the *unclipped* events on
|
|
1162
|
+
// purpose: a segment stops at midnight, so validating against segments would
|
|
1163
|
+
// let an overnight event overlap whatever sits across the boundary.
|
|
1164
|
+
const overlapCandidates = resolveOverlapCandidates(liveTimedData, timedStatic, overlapAgainst)
|
|
1165
|
+
const preventOverlapOnCreate = isOverlapGestureEnabled(preventOverlapGestures, "create")
|
|
1166
|
+
const preventOverlapOnDrag = isOverlapGestureEnabled(preventOverlapGestures, "drag")
|
|
1167
|
+
const preventOverlapOnResize = isOverlapGestureEnabled(preventOverlapGestures, "resize")
|
|
1168
|
+
// The schedule-level `editable` grant, resolved once — a per-event
|
|
1169
|
+
// `editable` can only narrow this further (`isEventGestureEnabled`,
|
|
1170
|
+
// applied inside `ScheduleEventChip`), never widen it.
|
|
1171
|
+
const editableCreate = isEditGestureEnabled(editable, "create")
|
|
1172
|
+
const editableDrag = isEditGestureEnabled(editable, "drag")
|
|
1173
|
+
const editableResize = isEditGestureEnabled(editable, "resize")
|
|
1174
|
+
const editableRemove = isEditGestureEnabled(editable, "remove")
|
|
1175
|
+
|
|
1176
|
+
// Dev-mode only: warn on every render a mismatch is present, so a
|
|
1177
|
+
// granted-but-inert gesture (or an event trying to widen past the
|
|
1178
|
+
// schedule-level grant) doesn't fail silently. `devWarn` strips itself
|
|
1179
|
+
// entirely in production builds.
|
|
1180
|
+
useEffect(() => {
|
|
1181
|
+
if (editableDrag && !onEventChange) {
|
|
1182
|
+
devWarn(
|
|
1183
|
+
'Schedule: `editable` grants "drag" but `onEventChange` is missing — the affordance will render but committing it will do nothing.',
|
|
1184
|
+
)
|
|
1185
|
+
}
|
|
1186
|
+
if (editableResize && !onEventChange) {
|
|
1187
|
+
devWarn(
|
|
1188
|
+
'Schedule: `editable` grants "resize" but `onEventChange` is missing — the affordance will render but committing it will do nothing.',
|
|
1189
|
+
)
|
|
1190
|
+
}
|
|
1191
|
+
if (editableRemove && !onEventRemove) {
|
|
1192
|
+
devWarn(
|
|
1193
|
+
'Schedule: `editable` grants "remove" but `onEventRemove` is missing — the affordance will render but committing it will do nothing.',
|
|
1194
|
+
)
|
|
1195
|
+
}
|
|
1196
|
+
if (editableCreate && !onEventCreate) {
|
|
1197
|
+
devWarn(
|
|
1198
|
+
'Schedule: `editable` grants "create" but `onEventCreate` is missing — the affordance will render but committing it will do nothing.',
|
|
1199
|
+
)
|
|
1200
|
+
}
|
|
1201
|
+
// Segmentation makes an event outside `[startHour, endHour)` render
|
|
1202
|
+
// *nothing* — the right outcome for the user (it used to draw at a
|
|
1203
|
+
// negative `top`, i.e. off-grid), but the one clipping result a developer
|
|
1204
|
+
// can't diagnose from the screen. Only reachable with a partial window;
|
|
1205
|
+
// silent under the default `0..24`.
|
|
1206
|
+
if (startHour > 0 || endHour < 24) {
|
|
1207
|
+
const rendered = new Set<string>()
|
|
1208
|
+
for (const column of [...dataSegments, ...staticSegments]) {
|
|
1209
|
+
for (const segment of column) rendered.add(segment.id)
|
|
1210
|
+
}
|
|
1211
|
+
for (const event of [...timedData, ...timedStatic]) {
|
|
1212
|
+
if (
|
|
1213
|
+
!rendered.has(event.id) &&
|
|
1214
|
+
rangesOverlap(event, { start: days[0] as Date, end: visibleWindowEnd })
|
|
1215
|
+
) {
|
|
1216
|
+
devWarn(
|
|
1217
|
+
`Schedule: event "${event.id}" falls on a visible day but entirely outside ` +
|
|
1218
|
+
`[startHour, endHour) (${startHour}..${endHour}) on every one of them, so it ` +
|
|
1219
|
+
"renders nothing. Widen the window, or check the event's start/end.",
|
|
1220
|
+
)
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
for (const event of data) {
|
|
1225
|
+
for (const gesture of eventEditGestureExceedsSchedule(editable, event)) {
|
|
1226
|
+
devWarn(
|
|
1227
|
+
`Schedule: event "${event.id}" sets editable to include "${gesture}", but the ` +
|
|
1228
|
+
"schedule-level `editable` doesn't grant it — an event's `editable` can only narrow " +
|
|
1229
|
+
"the schedule-level grant, never widen it, so this has no effect.",
|
|
1230
|
+
)
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
}, [
|
|
1234
|
+
editableDrag,
|
|
1235
|
+
editableResize,
|
|
1236
|
+
editableRemove,
|
|
1237
|
+
editableCreate,
|
|
1238
|
+
onEventChange,
|
|
1239
|
+
onEventRemove,
|
|
1240
|
+
onEventCreate,
|
|
1241
|
+
editable,
|
|
1242
|
+
data,
|
|
1243
|
+
dataSegments,
|
|
1244
|
+
staticSegments,
|
|
1245
|
+
timedData,
|
|
1246
|
+
timedStatic,
|
|
1247
|
+
days,
|
|
1248
|
+
visibleWindowEnd,
|
|
1249
|
+
startHour,
|
|
1250
|
+
endHour,
|
|
1251
|
+
])
|
|
1252
|
+
const columnOverlapPx =
|
|
1253
|
+
days.length > 1 ? DEFAULT_COLUMN_OVERLAP_PX_MULTI_DAY : DEFAULT_COLUMN_OVERLAP_PX
|
|
1254
|
+
|
|
1255
|
+
return (
|
|
1256
|
+
<div
|
|
1257
|
+
ref={mergeRefs(ref, internalGridRef)}
|
|
1258
|
+
data-schedule-part="timed-grid"
|
|
1259
|
+
className={cn(
|
|
1260
|
+
// `relative` so the popovers portalled in here (see the provider
|
|
1261
|
+
// below) take this scroller as their containing block: they scroll
|
|
1262
|
+
// with the grid and are clipped by it. Without it their absolute
|
|
1263
|
+
// positioner resolves against an ancestor outside the scroller and
|
|
1264
|
+
// floats over the page as if it were still portalled to the body.
|
|
1265
|
+
"relative h-full min-w-0 overflow-auto",
|
|
1266
|
+
// An inline-size container so those same popovers can cap their width
|
|
1267
|
+
// at what the grid can actually show (`100cqw` in their classes) — on
|
|
1268
|
+
// a phone the visible band beside the gutter is narrower than a
|
|
1269
|
+
// panel's usual 16rem, and the scroller would clip the rest. The root
|
|
1270
|
+
// already takes its width from its parent (`min-w-0`, never from its
|
|
1271
|
+
// `min-w-max` content), so containment changes nothing about its size.
|
|
1272
|
+
"@container",
|
|
1273
|
+
// The whole grid, not just the chips. Every surface a gesture starts
|
|
1274
|
+
// on was already `select-none` individually (chips, grips, the ghost,
|
|
1275
|
+
// the create draft) — but press-dragging on *empty* space, which is
|
|
1276
|
+
// exactly how an event is created, began a text selection that ran
|
|
1277
|
+
// through the hour labels and day headers as the pointer moved. One
|
|
1278
|
+
// declaration here covers every current and future child. The
|
|
1279
|
+
// details popovers are portalled *into* this subtree, so their panels
|
|
1280
|
+
// opt back in with `select-text`.
|
|
1281
|
+
"select-none",
|
|
1282
|
+
classNames?.grid,
|
|
1283
|
+
)}
|
|
1284
|
+
style={
|
|
1285
|
+
{
|
|
1286
|
+
"--sch-window-minutes": `${totalWindowMinutes}`,
|
|
1287
|
+
"--sch-gutter-width": "3.5rem",
|
|
1288
|
+
"--sch-day-min-width": "9rem",
|
|
1289
|
+
"--sch-column-gap": "3px",
|
|
1290
|
+
"--sch-column-overlap": `${columnOverlapPx}px`,
|
|
1291
|
+
"--sch-column-fraction": 0.7,
|
|
1292
|
+
// How far the band travels, as one measured length for every piece
|
|
1293
|
+
// of it — see the `schedule-page-*` keyframes in `theme.css` for why
|
|
1294
|
+
// this can't be a percentage. Written only while a page turn runs.
|
|
1295
|
+
...(pageOut
|
|
1296
|
+
? {
|
|
1297
|
+
"--sch-page-from": `${pageOut.direction === 1 ? bandWidthRef.current : -bandWidthRef.current}px`,
|
|
1298
|
+
"--sch-page-to": `${pageOut.direction === 1 ? -bandWidthRef.current : bandWidthRef.current}px`,
|
|
1299
|
+
}
|
|
1300
|
+
: {}),
|
|
1301
|
+
} as CSSProperties
|
|
1302
|
+
}
|
|
1303
|
+
>
|
|
1304
|
+
<OverlayContainerProvider value={internalGridRef}>
|
|
1305
|
+
<div
|
|
1306
|
+
// `relative` so this grid is the containing block for the
|
|
1307
|
+
// full-width now-guide below — an absolutely-positioned grid item
|
|
1308
|
+
// resolves its containing block to its own grid area (per the CSS
|
|
1309
|
+
// Grid spec) only when the grid container itself is positioned;
|
|
1310
|
+
// without it, `top` was resolving against the page instead. `h-full`
|
|
1311
|
+
// gives this grid a real, definite height (resolving against this
|
|
1312
|
+
// component's own `h-full overflow-auto` root, itself resolving
|
|
1313
|
+
// against a definite-height ancestor further up — the same chain
|
|
1314
|
+
// that already makes scrolling work today) — without it, the timed
|
|
1315
|
+
// row's `1fr` track below has nothing to distribute and is sized as
|
|
1316
|
+
// `auto` instead (CSS Grid: an indefinite container gives `fr` tracks
|
|
1317
|
+
// nothing to fill). `minmax(floor, 1fr)` is the actual "min-height
|
|
1318
|
+
// for the slot, CSS resizes to fill" behavior: at least the floor,
|
|
1319
|
+
// else however much real space is left.
|
|
1320
|
+
// `min-w-max` is what lets the hour gutter (and the header block's
|
|
1321
|
+
// corner cell) stay pinned across a horizontal scroll. Without it this
|
|
1322
|
+
// wrapper is `width: 100%` of the scrollport while its own tracks
|
|
1323
|
+
// overflow it, so a `position: sticky` grid item can only travel to
|
|
1324
|
+
// the edge of *this box* — the gutter detached and scrolled away the
|
|
1325
|
+
// moment `scrollLeft` passed `clientWidth - gutterWidth`, leaving the
|
|
1326
|
+
// hour axis behind the day columns. Sizing the wrapper to its content
|
|
1327
|
+
// makes the sticky containing block the full scrollable width. It
|
|
1328
|
+
// changes nothing when the band already fits: `min-width` cannot cap
|
|
1329
|
+
// the box, so the `1fr` half of `minmax(var(--sch-day-min-width), 1fr)`
|
|
1330
|
+
// still expands the columns to fill a wider container exactly as
|
|
1331
|
+
// before.
|
|
1332
|
+
// `overflow-clip` contains the page-turn animation's own overflow.
|
|
1333
|
+
// `schedule-page-enter` starts the incoming band a whole band-width
|
|
1334
|
+
// away under `translateX`, and a transform still contributes to an
|
|
1335
|
+
// ancestor's *scrollable* overflow even though it changes no layout —
|
|
1336
|
+
// so the scroller's `scrollWidth` inflated for the length of every
|
|
1337
|
+
// page turn (measured: 1064 -> 2041 -> 1064 over ~14 frames at 1440px)
|
|
1338
|
+
// and the horizontal scrollbar appeared and vanished with it. Worse
|
|
1339
|
+
// than the flicker, that resizes the scrollport mid-gesture, which
|
|
1340
|
+
// moves every day column out from under a drag that measured them at
|
|
1341
|
+
// `pointerdown`.
|
|
1342
|
+
//
|
|
1343
|
+
// `clip` rather than `hidden` on purpose: `hidden` would make this a
|
|
1344
|
+
// scroll container, and the hour gutter's `position: sticky` resolves
|
|
1345
|
+
// against the *outer* `overflow-auto` root — the `min-w-max` above is
|
|
1346
|
+
// what lets it pin across a horizontal scroll, and a nested scrollport
|
|
1347
|
+
// here would take that away. `clip` establishes no scrollport, so the
|
|
1348
|
+
// gutter keeps sticking to the real one and only the painting is cut.
|
|
1349
|
+
//
|
|
1350
|
+
// `overflow-x` alone, not both axes: this wrapper is `h-full`, so the
|
|
1351
|
+
// hours overflow it vertically by design and the outer root scrolls
|
|
1352
|
+
// them. Clipping both axes silently removed the grid's vertical
|
|
1353
|
+
// scrollbar (measured: `scrollHeight` collapsed to `clientHeight`),
|
|
1354
|
+
// which is the entire timed grid. `clip` on one axis and `visible` on
|
|
1355
|
+
// the other is well-defined and stays scrollport-free — unlike
|
|
1356
|
+
// `hidden`, where a `visible` counterpart would compute to `auto`.
|
|
1357
|
+
//
|
|
1358
|
+
// The animation itself is unchanged: the band still travels the same
|
|
1359
|
+
// distance on the same curve. It is only clipped at the edge it was
|
|
1360
|
+
// already sliding in from, which is what it looked like anyway.
|
|
1361
|
+
className="relative grid h-full min-w-max overflow-x-clip"
|
|
1362
|
+
style={{
|
|
1363
|
+
gridTemplateColumns: columnsTemplate,
|
|
1364
|
+
gridTemplateRows: `auto minmax(${minTimedHeightPx}px, 1fr)`,
|
|
1365
|
+
}}
|
|
1366
|
+
>
|
|
1367
|
+
{/* Header + all-day block — ONE sticky, ONE blurred surface for both
|
|
1368
|
+
* the day-header row and the all-day lanes underneath it, not two
|
|
1369
|
+
* (or N+1) separately-positioned pieces: `backdrop-blur` samples
|
|
1370
|
+
* only the pixels directly behind its own element and can't borrow
|
|
1371
|
+
* samples across an element boundary, so blurring the day-header
|
|
1372
|
+
* buttons individually — or blurring the header and the all-day row
|
|
1373
|
+
* as two stacked-but-separate elements — both produced a visible
|
|
1374
|
+
* seam right at the boundary. Folding everything into one `sticky
|
|
1375
|
+
* top-0` wrapper with an inner grid (same `columnsTemplate`, so
|
|
1376
|
+
* columns line up exactly with the timed grid below) also drops the
|
|
1377
|
+
* old `--sch-header-height` bookkeeping entirely: with one sticky
|
|
1378
|
+
* block instead of two independently-positioned ones, there's no
|
|
1379
|
+
* second element that needs to know where the first one ends —
|
|
1380
|
+
* ordinary grid flow stacks the header row and each all-day lane
|
|
1381
|
+
* (both left `auto`-sized) for free. `row-1`/`col-[1/-1]` place this
|
|
1382
|
+
* block in the *outer* grid; `gridTemplateColumns` only (no
|
|
1383
|
+
* `gridTemplateRows`) on the inner grid lets it grow implicit
|
|
1384
|
+
* `auto` rows as `ScheduleAllDayRow` below adds lanes.
|
|
1385
|
+
* z-40 ties the top sticky tier — above the gutter's z-30 (which
|
|
1386
|
+
* does scroll into this block's screen space, see the gutter's own
|
|
1387
|
+
* comment below), below nothing. */}
|
|
1388
|
+
<div
|
|
1389
|
+
// Measured by the reveal (`schedule.tsx`) to know how much of the
|
|
1390
|
+
// scroll viewport this block occludes: an element level with the
|
|
1391
|
+
// grid's top edge is inside the scroll box but behind this.
|
|
1392
|
+
data-schedule-part="header-block"
|
|
1393
|
+
className={cn(
|
|
1394
|
+
"sticky top-0 z-40 col-span-full row-1 grid border-b border-brand-900/20 dark:border-white/15",
|
|
1395
|
+
stickySurface,
|
|
1396
|
+
)}
|
|
1397
|
+
style={{ gridTemplateColumns: columnsTemplate }}
|
|
1398
|
+
>
|
|
1399
|
+
{/* Corner cell — additionally pinned on the inline axis, so it
|
|
1400
|
+
* never scrolls under the day headers or the gutter as the grid
|
|
1401
|
+
* scrolls horizontally (this block's own `sticky` above only
|
|
1402
|
+
* pins the vertical axis). `stickySurface` matches the hour
|
|
1403
|
+
* gutter and the all-day label directly below it — without it,
|
|
1404
|
+
* a horizontally-scrolled day-header button could show through
|
|
1405
|
+
* this cell exactly the way an all-day event bar used to show
|
|
1406
|
+
* through the unstyled label (see that file's own comment);
|
|
1407
|
+
* applying it to only one of these adjacent sticky pieces reads
|
|
1408
|
+
* as a seam, so all three share the identical treatment. */}
|
|
1409
|
+
<div className={cn("sticky inset-s-0", stickySurface)} />
|
|
1410
|
+
{/* Explicitly placed, not auto-flowed: during a page turn there are
|
|
1411
|
+
* two sets of headers in this grid, and auto-placement would push
|
|
1412
|
+
* the second set into the all-day lanes' rows below. */}
|
|
1413
|
+
{days.map((day, columnIndex) => (
|
|
1414
|
+
<button
|
|
1415
|
+
key={day.toISOString()}
|
|
1416
|
+
type="button"
|
|
1417
|
+
onClick={() => onDayClick?.(day)}
|
|
1418
|
+
style={{ gridColumn: columnIndex + 2, gridRow: 1 }}
|
|
1419
|
+
className={cn(
|
|
1420
|
+
"truncate px-2 py-2 text-center text-sm font-medium hover:bg-black/5 dark:hover:bg-white/8",
|
|
1421
|
+
enterClass,
|
|
1422
|
+
)}
|
|
1423
|
+
>
|
|
1424
|
+
{dayFormatter.format(day)}
|
|
1425
|
+
</button>
|
|
1426
|
+
))}
|
|
1427
|
+
{outDays.map((day, columnIndex) => (
|
|
1428
|
+
<button
|
|
1429
|
+
key={`exit-${day.toISOString()}`}
|
|
1430
|
+
type="button"
|
|
1431
|
+
inert
|
|
1432
|
+
aria-hidden
|
|
1433
|
+
data-page-exiting="true"
|
|
1434
|
+
style={{ gridColumn: columnIndex + 2, gridRow: 1 }}
|
|
1435
|
+
className={cn(
|
|
1436
|
+
"truncate px-2 py-2 text-center text-sm font-medium",
|
|
1437
|
+
"pointer-events-none animate-schedule-page-leave",
|
|
1438
|
+
)}
|
|
1439
|
+
>
|
|
1440
|
+
{dayFormatter.format(day)}
|
|
1441
|
+
</button>
|
|
1442
|
+
))}
|
|
1443
|
+
{/* All-day lanes — RFC's all-day addendum. Its own component (not
|
|
1444
|
+
* inlined here) since it needs its own lane-packing/overflow
|
|
1445
|
+
* logic, but it renders directly into *this* grid (via
|
|
1446
|
+
* `rowOffset`, starting right after the header's own row 1), not
|
|
1447
|
+
* a nested grid of its own — one shared grid means one shared
|
|
1448
|
+
* sticky/blurred surface, the whole point of merging the two.
|
|
1449
|
+
* Renders nothing when there's no all-day event in view, so this
|
|
1450
|
+
* block cleanly collapses to just the header's own height. */}
|
|
1451
|
+
<ScheduleAllDayRow
|
|
1452
|
+
days={days}
|
|
1453
|
+
events={allDayEvents}
|
|
1454
|
+
maxAllDayRows={maxAllDayRows}
|
|
1455
|
+
rowOffset={2}
|
|
1456
|
+
timeZone={timeZone}
|
|
1457
|
+
selected={selected}
|
|
1458
|
+
onEventSelect={onEventSelect}
|
|
1459
|
+
withEventDetails={withEventDetails}
|
|
1460
|
+
onOverflowClick={onOverflowClick}
|
|
1461
|
+
withOverflowDetails={withOverflowDetails}
|
|
1462
|
+
renderOverflowDetails={renderOverflowDetails}
|
|
1463
|
+
renderEventDetails={renderEventDetails}
|
|
1464
|
+
locale={locale}
|
|
1465
|
+
translations={translations}
|
|
1466
|
+
classNames={classNames}
|
|
1467
|
+
pageClassName={enterClass}
|
|
1468
|
+
/>
|
|
1469
|
+
{pageOut ? (
|
|
1470
|
+
<ScheduleAllDayRow
|
|
1471
|
+
days={outDays}
|
|
1472
|
+
events={outAllDayEvents}
|
|
1473
|
+
maxAllDayRows={maxAllDayRows}
|
|
1474
|
+
rowOffset={2}
|
|
1475
|
+
timeZone={timeZone}
|
|
1476
|
+
renderEventDetails={renderEventDetails}
|
|
1477
|
+
locale={locale}
|
|
1478
|
+
translations={translations}
|
|
1479
|
+
classNames={classNames}
|
|
1480
|
+
hideLabel
|
|
1481
|
+
pageExiting
|
|
1482
|
+
pageClassName="pointer-events-none animate-schedule-page-leave"
|
|
1483
|
+
/>
|
|
1484
|
+
) : null}
|
|
1485
|
+
</div>
|
|
1486
|
+
|
|
1487
|
+
{/* Hour gutter — pinned to the start edge, so it stays visible while
|
|
1488
|
+
* the days scroll horizontally; z-30, above both now-line variants
|
|
1489
|
+
* (z-10/z-20), so the hour labels always stay legible over a
|
|
1490
|
+
* horizontally-scrolled-under now-line or day column. But *below*
|
|
1491
|
+
* the header/all-day block's z-40: on any vertical scroll, the
|
|
1492
|
+
* gutter (unpinned on that axis, unlike that block) visually creeps
|
|
1493
|
+
* up into its screen space by however many pixels you've scrolled —
|
|
1494
|
+
* without a lower z-index here, that scrolled-up sliver would paint
|
|
1495
|
+
* over the sticky header/all-day block instead of staying tucked
|
|
1496
|
+
* behind it. Explicit `row-2`, same reasoning as `DayColumn`'s own
|
|
1497
|
+
* comment. */}
|
|
1498
|
+
<div
|
|
1499
|
+
// Measured by the reveal (`schedule.tsx`) exactly the way
|
|
1500
|
+
// `header-block` above is: `inset-s-0` pins this over the scroll
|
|
1501
|
+
// viewport's inline-start edge, so a day column level with the grid's
|
|
1502
|
+
// own start edge is inside the scroll box but behind this.
|
|
1503
|
+
data-schedule-part="hour-gutter"
|
|
1504
|
+
className={cn("sticky inset-s-0 z-30 row-2 flex flex-col border-e", stickySurface)}
|
|
1505
|
+
>
|
|
1506
|
+
{hours.map((hour) => (
|
|
1507
|
+
<HourGutterTick
|
|
1508
|
+
key={hour}
|
|
1509
|
+
hour={hour}
|
|
1510
|
+
label={hourFormatter.format(new Date(2000, 0, 1, hour))}
|
|
1511
|
+
now={now}
|
|
1512
|
+
startHour={startHour}
|
|
1513
|
+
endHour={endHour}
|
|
1514
|
+
// Declutters the hour that `NowCursorLabel` already covers —
|
|
1515
|
+
// same gate as the label itself, so the number only ever
|
|
1516
|
+
// disappears while its stand-in is actually on screen.
|
|
1517
|
+
hideWhenCurrent={withNowIndicator && anyDayIsToday}
|
|
1518
|
+
// `flex-1` (not a fixed `h-(--sch-hour-height)`, correction
|
|
1519
|
+
// after v1 shipped) — the gutter is already `flex flex-col` and
|
|
1520
|
+
// stretches to match the shared timed row's own resolved
|
|
1521
|
+
// height (same as `DayColumn`'s `h-full`), so evenly splitting
|
|
1522
|
+
// *that* across N ticks inherits the row's own floor "for
|
|
1523
|
+
// free," with no separate per-tick minimum needed.
|
|
1524
|
+
className="flex-1 shrink-0 pe-2 text-end text-[10px] text-gray-light-500 dark:text-gray-dark-500"
|
|
1525
|
+
/>
|
|
1526
|
+
))}
|
|
1527
|
+
{/* The now-cursor's own clock-time label — floats over this
|
|
1528
|
+
* gutter's hour axis, not over today's event content. Gated on
|
|
1529
|
+
* `anyDayIsToday` (not a per-column `isToday`): the gutter is one
|
|
1530
|
+
* shared column regardless of which day column today is, so its
|
|
1531
|
+
* visibility should match the cross-day `guide` line below, not
|
|
1532
|
+
* any single `DayColumn`. `position: sticky` above already forms
|
|
1533
|
+
* the containing block this `absolute`-positioned label resolves
|
|
1534
|
+
* against, same as `position: relative` would. */}
|
|
1535
|
+
{withNowIndicator && anyDayIsToday ? (
|
|
1536
|
+
<NowCursorLabel
|
|
1537
|
+
now={now}
|
|
1538
|
+
startHour={startHour}
|
|
1539
|
+
endHour={endHour}
|
|
1540
|
+
locale={locale}
|
|
1541
|
+
className={classNames?.nowIndicator}
|
|
1542
|
+
/>
|
|
1543
|
+
) : null}
|
|
1544
|
+
</div>
|
|
1545
|
+
|
|
1546
|
+
{/* Spans every day column (not the gutter) at today's current-time
|
|
1547
|
+
* row, so the hour it lines up with stays easy to trace even when
|
|
1548
|
+
* today isn't the column you're looking at — faint on purpose, the
|
|
1549
|
+
* real indicator is the opaque marker in today's own column below.
|
|
1550
|
+
* Explicit `row-2`, same reasoning as `DayColumn`'s own comment.
|
|
1551
|
+
*
|
|
1552
|
+
* Wrapped in a plain, non-positioned `col-[2/-1] row-2` div rather
|
|
1553
|
+
* than putting that grid placement directly on `NowCursorLine`'s own
|
|
1554
|
+
* (`position: absolute`) root — correction after the fill-height
|
|
1555
|
+
* refactor shipped: an absolutely-positioned grid item's containing
|
|
1556
|
+
* block resolves against the grid *container's own* definite size
|
|
1557
|
+
* (this grid's `h-full`, which stays pinned to whatever's actually
|
|
1558
|
+
* visible), not the row's real `minmax(floor, 1fr)`-resolved track
|
|
1559
|
+
* size that in-flow items (`DayColumn`, the gutter) correctly
|
|
1560
|
+
* stretch to and can overflow past — so once the floor exceeds the
|
|
1561
|
+
* visible area (forcing a scroll), the guide line drifted to a
|
|
1562
|
+
* different `top%` basis than the marker/label inside those in-flow
|
|
1563
|
+
* items, even though all three call the exact same
|
|
1564
|
+
* `nowIndicatorTop`. This wrapper is itself a normal, in-flow grid
|
|
1565
|
+
* item (default `align-self: stretch`, same as `DayColumn`/the
|
|
1566
|
+
* gutter), so it resolves to the row's real height too — and being
|
|
1567
|
+
* `position: relative`, it becomes `NowCursorLine`'s containing
|
|
1568
|
+
* block instead of the grid container. `min-w-0` is load-bearing,
|
|
1569
|
+
* not decorative: an in-flow grid item's default `min-width: auto`
|
|
1570
|
+
* still contributes to how the multiple `1fr` day-column tracks it
|
|
1571
|
+
* spans (`col-[2/-1]`) get sized — without it, its (empty but for
|
|
1572
|
+
* an absolutely-positioned child) auto min-content size distorted
|
|
1573
|
+
* that distribution, collapsing every spanned column past the
|
|
1574
|
+
* first one to 0 width. */}
|
|
1575
|
+
{withNowIndicator && anyDayIsToday ? (
|
|
1576
|
+
<div className="relative col-[2/-1] row-2 min-w-0">
|
|
1577
|
+
<NowCursorLine
|
|
1578
|
+
now={now}
|
|
1579
|
+
startHour={startHour}
|
|
1580
|
+
endHour={endHour}
|
|
1581
|
+
variant="guide"
|
|
1582
|
+
className={classNames?.nowIndicator}
|
|
1583
|
+
/>
|
|
1584
|
+
</div>
|
|
1585
|
+
) : null}
|
|
1586
|
+
|
|
1587
|
+
{renderBand(days, dataSegments, staticSegments, paging ? "entering" : undefined, "")}
|
|
1588
|
+
{pageOut
|
|
1589
|
+
? renderBand(outDays, outDataSegments, outStaticSegments, "exiting", "exit-")
|
|
1590
|
+
: null}
|
|
1591
|
+
</div>
|
|
1592
|
+
|
|
1593
|
+
{!hasAnyEvent && empty !== null ? (
|
|
1594
|
+
<div className="p-6 text-center text-sm text-gray-light-500 dark:text-gray-dark-500">
|
|
1595
|
+
{empty ?? translations.empty}
|
|
1596
|
+
</div>
|
|
1597
|
+
) : null}
|
|
1598
|
+
|
|
1599
|
+
{/* Visually-hidden create/remove announcer — `role="status"` implies
|
|
1600
|
+
* `aria-live="polite"` + `aria-atomic="true"`, so a screen-reader
|
|
1601
|
+
* user hears what the chip's own fade/scale animation otherwise only
|
|
1602
|
+
* shows. */}
|
|
1603
|
+
<div role="status" className="sr-only">
|
|
1604
|
+
{announcement}
|
|
1605
|
+
</div>
|
|
1606
|
+
</OverlayContainerProvider>
|
|
1607
|
+
</div>
|
|
1608
|
+
)
|
|
1609
|
+
}
|