@42-central/ui-react 0.0.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +315 -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-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-EVVMHTCL.js +216 -0
- package/dist/chunk-EVVMHTCL.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-NSOA3GMZ.js +376 -0
- package/dist/chunk-NSOA3GMZ.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-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-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-YON5Y336.js +639 -0
- package/dist/chunk-YON5Y336.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 +90 -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 +6656 -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 +30 -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 +31 -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 +307 -0
- package/dist/components/schedule/schedule-geometry.d.ts.map +1 -0
- package/dist/components/schedule/schedule-grid-gesture.d.ts +311 -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 +844 -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 +1281 -0
- package/package.json +99 -3
- 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 +131 -0
- package/src/components/alert/alert.tsx +165 -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 +410 -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 +518 -0
- package/src/components/notification/index.ts +20 -0
- package/src/components/notification/notification.test.tsx +321 -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 +211 -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 +190 -0
- package/src/components/schedule/schedule-dates.test.ts +771 -0
- package/src/components/schedule/schedule-dates.ts +722 -0
- package/src/components/schedule/schedule-day-view.tsx +30 -0
- package/src/components/schedule/schedule-days-view.tsx +279 -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 +172 -0
- package/src/components/schedule/schedule-event-chip.tsx +1183 -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 +482 -0
- package/src/components/schedule/schedule-grid-gesture.test.ts +235 -0
- package/src/components/schedule/schedule-grid-gesture.ts +606 -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 +690 -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 +138 -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 +1647 -0
- package/src/components/schedule/schedule-toolbar.tsx +270 -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 +1152 -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 +307 -0
- package/src/components/schedule/schedule.test.tsx +4386 -0
- package/src/components/schedule/schedule.tsx +1040 -0
- package/src/components/schedule/use-event-create.ts +591 -0
- package/src/components/schedule/use-event-drag.ts +510 -0
- package/src/components/schedule/use-event-resize.ts +565 -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 +1281 -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,1040 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { ark, type HTMLArkProps } from "@ark-ui/react"
|
|
4
|
+
import { type ReactNode, useEffect, useRef } from "react"
|
|
5
|
+
import { match } from "ts-pattern"
|
|
6
|
+
import type { AvailableIf, UnavailableProps } from "../../lib/available-if"
|
|
7
|
+
import { cn } from "../../lib/cn"
|
|
8
|
+
import { devWarn } from "../../lib/dev-warn"
|
|
9
|
+
import { useLocale, useTimeZone } from "../../lib/intl"
|
|
10
|
+
import { props } from "../../lib/props"
|
|
11
|
+
import type { WithTestId } from "../../lib/test-id"
|
|
12
|
+
import { useUncontrolled } from "../../lib/use-uncontrolled"
|
|
13
|
+
import { AgendaView, type ScheduleAgendaOnlyProps } from "./schedule-agenda-view"
|
|
14
|
+
import { dayKey, isEventInVisibleRange, resolveWeekStartDay } from "./schedule-dates"
|
|
15
|
+
import { DaysViewBody } from "./schedule-days-view"
|
|
16
|
+
import { isElementInScrollViewport, scrollElementToCenter } from "./schedule-geometry"
|
|
17
|
+
import { liveChipsFor, liveDayColumnFor } from "./schedule-grid-gesture"
|
|
18
|
+
import { MonthView, type ScheduleMonthOnlyProps } from "./schedule-month-view"
|
|
19
|
+
import { ScheduleToolbar } from "./schedule-toolbar"
|
|
20
|
+
import type {
|
|
21
|
+
AnchorDateProps,
|
|
22
|
+
EditableCallbacks,
|
|
23
|
+
FirstDayOfWeek,
|
|
24
|
+
ScheduleAlign,
|
|
25
|
+
ScheduleDayClickProps,
|
|
26
|
+
ScheduleDayDisabledProps,
|
|
27
|
+
ScheduleEditGesture,
|
|
28
|
+
ScheduleEmptyProps,
|
|
29
|
+
ScheduleEventProps,
|
|
30
|
+
ScheduleOverflowProps,
|
|
31
|
+
ScheduleSharedProps,
|
|
32
|
+
ScheduleSlotProps,
|
|
33
|
+
ScheduleSlotValues,
|
|
34
|
+
ScheduleTimedProps,
|
|
35
|
+
ScheduleView,
|
|
36
|
+
} from "./schedule-types"
|
|
37
|
+
import { resolveScheduleTranslations } from "./schedule-types"
|
|
38
|
+
import type {
|
|
39
|
+
DefaultScheduleViews,
|
|
40
|
+
ResolvedScheduleView,
|
|
41
|
+
ScheduleRenderers,
|
|
42
|
+
ScheduleViewId,
|
|
43
|
+
ScheduleViews,
|
|
44
|
+
} from "./schedule-views"
|
|
45
|
+
import {
|
|
46
|
+
findScheduleView,
|
|
47
|
+
findScheduleViewByRenderer,
|
|
48
|
+
resolveScheduleViews,
|
|
49
|
+
} from "./schedule-views"
|
|
50
|
+
import { type ScheduleYearOnlyProps, YearView } from "./schedule-year-view"
|
|
51
|
+
import { useScheduleSelection } from "./use-schedule-selection"
|
|
52
|
+
|
|
53
|
+
/** Only reachable via `views={[]}`, which `devWarn` flags. Rendering the
|
|
54
|
+
* historical default beats rendering nothing at all. */
|
|
55
|
+
const FALLBACK_VIEW: ResolvedScheduleView = { id: "days", view: "days" }
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Which renderers can act on each view-scoped prop — the runtime twin of
|
|
59
|
+
* `ScheduleProps`' `AvailableIf` gates, and the only check that reaches the
|
|
60
|
+
* case the compile layer deliberately gives up on: a `views` array built at
|
|
61
|
+
* runtime, where `ScheduleRenderers` widens to every renderer so that working
|
|
62
|
+
* code keeps compiling.
|
|
63
|
+
*
|
|
64
|
+
* `satisfies` keys it against the real prop names, so renaming a prop without
|
|
65
|
+
* updating this table is a compile error rather than a warning that quietly
|
|
66
|
+
* stops firing. Props every renderer reads are deliberately absent.
|
|
67
|
+
*/
|
|
68
|
+
const PROP_RENDERERS = {
|
|
69
|
+
onDayClick: ["days", "month", "year"],
|
|
70
|
+
selected: ["days", "month", "agenda"],
|
|
71
|
+
defaultSelected: ["days", "month", "agenda"],
|
|
72
|
+
onSelect: ["days", "month", "agenda"],
|
|
73
|
+
withSelection: ["days", "month", "agenda"],
|
|
74
|
+
withEventDetails: ["days", "month", "agenda"],
|
|
75
|
+
renderEventDetails: ["days", "month", "agenda"],
|
|
76
|
+
empty: ["days", "agenda"],
|
|
77
|
+
align: ["days", "month"],
|
|
78
|
+
startHour: ["days"],
|
|
79
|
+
endHour: ["days"],
|
|
80
|
+
slotDuration: ["days"],
|
|
81
|
+
minDuration: ["days"],
|
|
82
|
+
resizeCollision: ["days"],
|
|
83
|
+
maxDuration: ["days"],
|
|
84
|
+
hourHeight: ["days"],
|
|
85
|
+
slotDisabled: ["days"],
|
|
86
|
+
withNowIndicator: ["days"],
|
|
87
|
+
onGridClick: ["days"],
|
|
88
|
+
preventOverlap: ["days"],
|
|
89
|
+
maxOverlapColumns: ["days"],
|
|
90
|
+
maxAllDayRows: ["days"],
|
|
91
|
+
onOverflowClick: ["days", "month"],
|
|
92
|
+
withOverflowDetails: ["days", "month"],
|
|
93
|
+
renderOverflowDetails: ["days", "month"],
|
|
94
|
+
visibleDays: ["days"],
|
|
95
|
+
revealBehavior: ["days"],
|
|
96
|
+
editable: ["days"],
|
|
97
|
+
onEventChange: ["days"],
|
|
98
|
+
onEventRemove: ["days"],
|
|
99
|
+
onEventCreate: ["days"],
|
|
100
|
+
maxEventsPerDay: ["month"],
|
|
101
|
+
dayDisabled: ["month", "year"],
|
|
102
|
+
onMonthClick: ["year"],
|
|
103
|
+
renderEvent: ["agenda"],
|
|
104
|
+
} as const satisfies Partial<Record<keyof ScheduleAllProps, readonly ScheduleView[]>>
|
|
105
|
+
|
|
106
|
+
const SCOPED_PROP_NAMES = Object.keys(PROP_RENDERERS) as (keyof typeof PROP_RENDERERS)[]
|
|
107
|
+
|
|
108
|
+
/** English list: "a", "a and b", "a, b and c". */
|
|
109
|
+
const listPhrase = (items: string[]) =>
|
|
110
|
+
items.length < 2 ? (items[0] ?? "") : `${items.slice(0, -1).join(", ")} and ${items.at(-1)}`
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* What the reveal effect is currently armed to bring into view. One slot, two
|
|
114
|
+
* kinds: a selected event (its date axis, then both scroll axes onto its
|
|
115
|
+
* chip), or a day that was navigated to (the inline axis only — a day column
|
|
116
|
+
* is the full height of the timed row, so the block axis has no meaningful
|
|
117
|
+
* "already visible" state, and moving it would throw away whatever time of day
|
|
118
|
+
* the reader was looking at).
|
|
119
|
+
*/
|
|
120
|
+
type ScheduleReveal = { kind: "event"; id: string } | { kind: "day"; date: Date }
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* RFC §1/§3 (`docs/rfcs/schedule.md`) — `Schedule` (`Root`): orchestrates
|
|
124
|
+
* view-switching and the shared anchor date via `Schedule.Toolbar`,
|
|
125
|
+
* delegating all rendering to whichever view is active
|
|
126
|
+
* (`ts-pattern match(view).exhaustive()`). Composed by intersection from the
|
|
127
|
+
* views' own prop slices, never a context provider — the same "share
|
|
128
|
+
* via a superset type, not context" mechanism the RFC establishes
|
|
129
|
+
* throughout. Passes `withPagination={false} withNowButton={false}` to
|
|
130
|
+
* whichever view it renders, since `Root`'s own toolbar already covers both
|
|
131
|
+
* — a standalone view keeps its own built-in chrome exactly as before.
|
|
132
|
+
*
|
|
133
|
+
* `Editable` (inferred from a literal `editable` at the call site — see
|
|
134
|
+
* `EditableCallbacks`) makes a granted gesture's matching callback a compile
|
|
135
|
+
* error to omit, on top of the existing dev-mode runtime warning
|
|
136
|
+
* (`ScheduleTimedProps.editable`'s own doc comment). `Root`-only: the
|
|
137
|
+
* standalone `DaysView`/`DayView`/`WeekView` don't get this generic, for the
|
|
138
|
+
* reason `EditableCallbacks` explains.
|
|
139
|
+
*/
|
|
140
|
+
/**
|
|
141
|
+
* Is any renderer in `R` among the ones `V` actually puts on screen?
|
|
142
|
+
*
|
|
143
|
+
* Three distribution decisions, each load-bearing and each proved against the
|
|
144
|
+
* repo's own tsc before this shipped:
|
|
145
|
+
*
|
|
146
|
+
* - `Extract<R, …>` **distributes over `R`**, which is what makes this "any
|
|
147
|
+
* of" rather than "all of". `[R] extends [ScheduleRenderers<V>]` reads as
|
|
148
|
+
* ALL of `R` and would forbid `dayDisabled` under `views={["days","month"]}`
|
|
149
|
+
* — Month is rendering, so it is plainly legal there.
|
|
150
|
+
* - `[…] extends [never]` **must** be tuple-wrapped. A naked
|
|
151
|
+
* `Active extends never` distributes, `never` in gives `never` out, and
|
|
152
|
+
* `X & never` is `never` — collapsing the whole props type so that every
|
|
153
|
+
* attribute errors, including the ones the caller got right.
|
|
154
|
+
* - `ScheduleRenderers<V>` must itself stay distributive; see its own note.
|
|
155
|
+
*/
|
|
156
|
+
type HasRenderer<V extends ScheduleViews, R extends ScheduleView> = [
|
|
157
|
+
Extract<R, ScheduleRenderers<V>>,
|
|
158
|
+
] extends [never]
|
|
159
|
+
? false
|
|
160
|
+
: true
|
|
161
|
+
|
|
162
|
+
/** `align`'s type narrows with `V` as well as its availability: `"relative"`
|
|
163
|
+
* is a rolling *days* window, and `MonthView` has no use for one —
|
|
164
|
+
* `resolveWeekStartDay` drops it on the floor. With `views={["month"]}`,
|
|
165
|
+
* `align="relative"` is therefore a compile error rather than a silent
|
|
166
|
+
* no-op, which is the one silent drop that lives inside a prop's value
|
|
167
|
+
* rather than in the prop itself. */
|
|
168
|
+
type ScheduleAlignFor<V extends ScheduleViews> =
|
|
169
|
+
HasRenderer<V, "days"> extends true ? ScheduleAlign : FirstDayOfWeek
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* RFC §1/§3 (`docs/rfcs/schedule.md`) — `Schedule` (`Root`): orchestrates
|
|
173
|
+
* view-switching and the shared anchor date via `Schedule.Toolbar`,
|
|
174
|
+
* delegating all rendering to whichever view is active
|
|
175
|
+
* (`ts-pattern match(view).exhaustive()`). Composed by intersection from the
|
|
176
|
+
* views' own prop slices, never a context provider — the same "share via a
|
|
177
|
+
* superset type, not context" mechanism the RFC establishes throughout.
|
|
178
|
+
* Passes `withPagination={false} withNowButton={false}` to whichever view it
|
|
179
|
+
* renders, since `Root`'s own toolbar already covers both — a standalone view
|
|
180
|
+
* keeps its own built-in chrome exactly as before.
|
|
181
|
+
*
|
|
182
|
+
* **Each slice is gated on `views` actually configuring a renderer that reads
|
|
183
|
+
* it** (`lib/available-if.ts`). `<Schedule views={["month","year"]}
|
|
184
|
+
* slotDuration={30} />` used to typecheck and do nothing; it is now a compile
|
|
185
|
+
* error that says which renderer it wanted. The RFC already claimed this
|
|
186
|
+
* invariant — "structurally absent elsewhere, enforcing the view restriction
|
|
187
|
+
* at the type level" — and it held for every view *except* `Root`, which
|
|
188
|
+
* intersected the days slice unconditionally.
|
|
189
|
+
*
|
|
190
|
+
* Omitting `views` leaves `V` at `DefaultScheduleViews`, which configures
|
|
191
|
+
* days, month and year, so the default call site keeps every prop it had.
|
|
192
|
+
* Anything `views` cannot be resolved to — a `ScheduleViewOption[]` variable,
|
|
193
|
+
* a ternary between two tuples — widens to every renderer and likewise
|
|
194
|
+
* changes nothing; see `ScheduleRenderers`.
|
|
195
|
+
*
|
|
196
|
+
* `Editable` (inferred from a literal `editable` at the call site — see
|
|
197
|
+
* `EditableCallbacks`) makes a granted gesture's matching callback a compile
|
|
198
|
+
* error to omit, on top of the existing dev-mode runtime warning
|
|
199
|
+
* (`ScheduleTimedProps.editable`'s own doc comment). `Root`-only: the
|
|
200
|
+
* standalone `DaysView`/`DayView`/`WeekView` don't get this generic, for the
|
|
201
|
+
* reason `EditableCallbacks` explains.
|
|
202
|
+
*/
|
|
203
|
+
export type ScheduleProps<
|
|
204
|
+
P = unknown,
|
|
205
|
+
Editable extends boolean | readonly ScheduleEditGesture[] = false,
|
|
206
|
+
V extends ScheduleViews = DefaultScheduleViews,
|
|
207
|
+
> = ScheduleSharedProps<P> &
|
|
208
|
+
AnchorDateProps &
|
|
209
|
+
// `ScheduleEventProps` contributes `onSelect`, and React's own DOM props
|
|
210
|
+
// carry an `onSelect` (text-selection) of their own. Without this `Omit` the
|
|
211
|
+
// two intersect into a handler that has to satisfy *both* signatures, so the
|
|
212
|
+
// declaration compiles and every call site fails. The kit already uses this
|
|
213
|
+
// treatment for other redefined natives.
|
|
214
|
+
Omit<HTMLArkProps<"div">, "onSelect"> &
|
|
215
|
+
WithTestId &
|
|
216
|
+
// ─── days · month · year ───────────────────────────────────────────────
|
|
217
|
+
AvailableIf<
|
|
218
|
+
HasRenderer<V, "days" | "month" | "year">,
|
|
219
|
+
ScheduleDayClickProps,
|
|
220
|
+
"requires a days, month or year renderer in `views` — an agenda has no day to click"
|
|
221
|
+
> &
|
|
222
|
+
// ─── days · month · agenda ─────────────────────────────────────────────
|
|
223
|
+
AvailableIf<
|
|
224
|
+
HasRenderer<V, "days" | "month" | "agenda">,
|
|
225
|
+
ScheduleEventProps<P>,
|
|
226
|
+
"requires a days, month or agenda renderer in `views` — year draws density dots, never an event to select"
|
|
227
|
+
> &
|
|
228
|
+
// ─── days · agenda ─────────────────────────────────────────────────────
|
|
229
|
+
AvailableIf<
|
|
230
|
+
HasRenderer<V, "days" | "agenda">,
|
|
231
|
+
ScheduleEmptyProps,
|
|
232
|
+
"requires a days or agenda renderer in `views` — month and year always draw a calendar, so they have no empty state"
|
|
233
|
+
> &
|
|
234
|
+
// ─── days · month ──────────────────────────────────────────────────────
|
|
235
|
+
AvailableIf<
|
|
236
|
+
HasRenderer<V, "days" | "month">,
|
|
237
|
+
ScheduleOverflowProps<P>,
|
|
238
|
+
'requires a days or month renderer in `views` — year and agenda cap nothing, so they have no "+N" to disclose'
|
|
239
|
+
> &
|
|
240
|
+
AvailableIf<
|
|
241
|
+
HasRenderer<V, "days" | "month">,
|
|
242
|
+
{
|
|
243
|
+
/**
|
|
244
|
+
* Locale default when omitted; `"relative"` starts the days-window at
|
|
245
|
+
* the anchor date itself instead of snapping to a calendar-week
|
|
246
|
+
* boundary. Named `align`, not `startOfWeek` — this same value also
|
|
247
|
+
* governs Month's window, and Root's own days-window isn't necessarily
|
|
248
|
+
* a week (`visibleDays` can be anything), so a literal "start of week"
|
|
249
|
+
* name would mislead here. Declared on `Root` rather than reused from
|
|
250
|
+
* `MonthViewProps.startOfWeek`, which is both narrower and differently
|
|
251
|
+
* named; it is narrowed via `resolveWeekStartDay` when forwarded to
|
|
252
|
+
* `MonthView` below.
|
|
253
|
+
*
|
|
254
|
+
* Its **type** follows `views` as well as its availability:
|
|
255
|
+
* `"relative"` is a rolling days window, so with no days renderer
|
|
256
|
+
* configured this is `FirstDayOfWeek` and `align="relative"` is a
|
|
257
|
+
* compile error rather than a silent no-op — see `ScheduleAlignFor`.
|
|
258
|
+
*/
|
|
259
|
+
align?: ScheduleAlignFor<V>
|
|
260
|
+
},
|
|
261
|
+
"requires a days or month renderer in `views`"
|
|
262
|
+
> &
|
|
263
|
+
// ─── days ──────────────────────────────────────────────────────────────
|
|
264
|
+
AvailableIf<
|
|
265
|
+
HasRenderer<V, "days">,
|
|
266
|
+
Omit<
|
|
267
|
+
ScheduleTimedProps<P>,
|
|
268
|
+
"editable" | "onEventChange" | "onEventRemove" | "onEventCreate"
|
|
269
|
+
> & {
|
|
270
|
+
/** Fallback window size, in days, for the `"days"` renderer. Default `7`.
|
|
271
|
+
* An active entry that pins its own `visibleDays` (`"day"` and `"week"`
|
|
272
|
+
* do) overrides this; `"days"` deliberately does not, so this prop keeps
|
|
273
|
+
* working exactly as before under the default entries. */
|
|
274
|
+
visibleDays?: number
|
|
275
|
+
/**
|
|
276
|
+
* How a **reveal** scrolls the days grid — the day brought into view by
|
|
277
|
+
* navigating to it, and the chip brought into view by selecting it.
|
|
278
|
+
* Default `"auto"`, i.e. no animation.
|
|
279
|
+
*
|
|
280
|
+
* Replaces the former `scrollBehavior`, which borrowed the name of a CSS
|
|
281
|
+
* property whose job it does not do — it never governed the Now button
|
|
282
|
+
* (which always animates) nor a page turn (CSS keyframes), only reveals.
|
|
283
|
+
*
|
|
284
|
+
* A reveal is a side effect of going somewhere, not a gesture of its own,
|
|
285
|
+
* and an animated one reads as the grid drifting rather than as feedback
|
|
286
|
+
* — so it is opt-in, unlike the Now button, whose scroll answers a press
|
|
287
|
+
* and keeps animating. `"auto"` defers to the platform (and to any CSS
|
|
288
|
+
* `scroll-behavior` you have set, which is the right way to turn this on
|
|
289
|
+
* globally); `"instant"` refuses to animate whatever the CSS says.
|
|
290
|
+
*
|
|
291
|
+
* `"smooth"` still yields to `prefers-reduced-motion` — this can ask for
|
|
292
|
+
* motion, it cannot override someone asking for none.
|
|
293
|
+
*/
|
|
294
|
+
revealBehavior?: ScrollBehavior
|
|
295
|
+
},
|
|
296
|
+
"requires a days renderer in `views` — only a timed grid has hours, slots and gestures"
|
|
297
|
+
> &
|
|
298
|
+
// Its own gate, not part of the slice above: `ScheduleSlotProps` is a union
|
|
299
|
+
// keyed on `slotDuration`, which that slice's `Omit` would collapse.
|
|
300
|
+
// `AvailableIf` maps over it member by member, so the union survives.
|
|
301
|
+
AvailableIf<
|
|
302
|
+
HasRenderer<V, "days">,
|
|
303
|
+
ScheduleSlotProps,
|
|
304
|
+
"requires a days renderer in `views` — only a timed grid has slots"
|
|
305
|
+
> &
|
|
306
|
+
// `editable` and its three callbacks are gated **as one unit**, and the
|
|
307
|
+
// forbidden branch deliberately drops `EditableCallbacks` rather than
|
|
308
|
+
// keeping it alongside a forbidden `editable`. `RequiredIfGranted` can make
|
|
309
|
+
// `onEventChange` *required*, and a required property intersected with a
|
|
310
|
+
// forbid-shape reduces the entire props object to `never` — at which point
|
|
311
|
+
// every attribute errors, `data` included. Splitting them is the trap.
|
|
312
|
+
(HasRenderer<V, "days"> extends true
|
|
313
|
+
? { editable?: Editable } & EditableCallbacks<P, Editable>
|
|
314
|
+
: UnavailableProps<
|
|
315
|
+
Record<"editable" | "onEventChange" | "onEventRemove" | "onEventCreate", unknown>,
|
|
316
|
+
"requires a days renderer in `views` — only a timed grid has gestures to permit"
|
|
317
|
+
>) &
|
|
318
|
+
// ─── month ─────────────────────────────────────────────────────────────
|
|
319
|
+
AvailableIf<
|
|
320
|
+
HasRenderer<V, "month">,
|
|
321
|
+
ScheduleMonthOnlyProps,
|
|
322
|
+
"requires a month renderer in `views`"
|
|
323
|
+
> &
|
|
324
|
+
// ─── month · year ──────────────────────────────────────────────────────
|
|
325
|
+
AvailableIf<
|
|
326
|
+
HasRenderer<V, "month" | "year">,
|
|
327
|
+
ScheduleDayDisabledProps,
|
|
328
|
+
"requires a month or year renderer in `views` — the days grid restricts by time range, via `slotDisabled`"
|
|
329
|
+
> &
|
|
330
|
+
// ─── year ──────────────────────────────────────────────────────────────
|
|
331
|
+
AvailableIf<
|
|
332
|
+
HasRenderer<V, "year">,
|
|
333
|
+
ScheduleYearOnlyProps,
|
|
334
|
+
"requires a year renderer in `views`"
|
|
335
|
+
> &
|
|
336
|
+
// ─── agenda ────────────────────────────────────────────────────────────
|
|
337
|
+
AvailableIf<
|
|
338
|
+
HasRenderer<V, "agenda">,
|
|
339
|
+
ScheduleAgendaOnlyProps<P>,
|
|
340
|
+
"requires an agenda renderer in `views` — note the default `views` does not include one"
|
|
341
|
+
> & {
|
|
342
|
+
/**
|
|
343
|
+
* Which entries the view switcher offers, in order. Default
|
|
344
|
+
* `["days", "month", "year"]` — exactly the pre-`views` behaviour.
|
|
345
|
+
*
|
|
346
|
+
* Entries are `"day"`/`"week"`/`"days"`/`"month"`/`"year"` shorthands or
|
|
347
|
+
* `{ id, view, visibleDays, label }` objects; see `schedule-views.ts` for
|
|
348
|
+
* the id-vs-renderer distinction. `Schedule` is generic over this array,
|
|
349
|
+
* so `view`/`defaultView`/`onViewChange` below carry the exact union of
|
|
350
|
+
* ids you pass — hoist it with `as const` to keep that narrowing.
|
|
351
|
+
*/
|
|
352
|
+
views?: V
|
|
353
|
+
/** The active entry's **id**. Note an entry's own `view` field names its
|
|
354
|
+
* *renderer*; these three props carry the *identity*. They coincide under
|
|
355
|
+
* the default entries. */
|
|
356
|
+
view?: ScheduleViewId<V>
|
|
357
|
+
defaultView?: ScheduleViewId<V>
|
|
358
|
+
onViewChange?: (view: ScheduleViewId<V>) => void
|
|
359
|
+
/** Default `true` — the standalone-view default is `false`, since a bare
|
|
360
|
+
* `DaysView`/... has no toolbar row of its own to put it in unless
|
|
361
|
+
* `withPagination` is also on; `Root` always has one. */
|
|
362
|
+
withNowButton?: boolean
|
|
363
|
+
/** Fallback window size, in days, for the `"days"` renderer. Default `7`.
|
|
364
|
+
* An active entry that pins its own `visibleDays` (`"day"` and `"week"`
|
|
365
|
+
* do) overrides this; `"days"` deliberately does not, so this prop keeps
|
|
366
|
+
* working exactly as before under the default entries. */
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Every prop, flat and fully optional — what the implementation destructures.
|
|
371
|
+
*
|
|
372
|
+
* `ScheduleProps` is a pile of conditionals in `V`, and inside the body `V` is
|
|
373
|
+
* an unresolved type parameter, so none of them can be evaluated to find a
|
|
374
|
+
* property. The public overload above keeps the gating; this is what the
|
|
375
|
+
* function actually sees. Internal, and deliberately not exported from the
|
|
376
|
+
* barrel.
|
|
377
|
+
*/
|
|
378
|
+
type ScheduleAllProps<P = unknown> = ScheduleSharedProps<P> &
|
|
379
|
+
ScheduleEventProps<P> &
|
|
380
|
+
ScheduleDayClickProps &
|
|
381
|
+
ScheduleEmptyProps &
|
|
382
|
+
ScheduleOverflowProps<P> &
|
|
383
|
+
ScheduleTimedProps<P> &
|
|
384
|
+
ScheduleSlotValues &
|
|
385
|
+
ScheduleDayDisabledProps &
|
|
386
|
+
ScheduleMonthOnlyProps &
|
|
387
|
+
ScheduleYearOnlyProps &
|
|
388
|
+
ScheduleAgendaOnlyProps<P> &
|
|
389
|
+
AnchorDateProps &
|
|
390
|
+
Omit<HTMLArkProps<"div">, "onSelect"> &
|
|
391
|
+
WithTestId & {
|
|
392
|
+
views?: ScheduleViews
|
|
393
|
+
view?: string
|
|
394
|
+
defaultView?: string
|
|
395
|
+
onViewChange?: (view: string) => void
|
|
396
|
+
withNowButton?: boolean
|
|
397
|
+
visibleDays?: number
|
|
398
|
+
align?: ScheduleAlign
|
|
399
|
+
revealBehavior?: ScrollBehavior
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* The public, view-gated signature. `const Editable`/`const V` are what let a
|
|
404
|
+
* call site's own literals narrow — an inline `views={["month","year"]}` in
|
|
405
|
+
* JSX narrows `V` with no `as const` needed (a *hoisted* variable still does;
|
|
406
|
+
* see the docs page).
|
|
407
|
+
*/
|
|
408
|
+
export function ScheduleRoot<
|
|
409
|
+
P = unknown,
|
|
410
|
+
const Editable extends boolean | readonly ScheduleEditGesture[] = false,
|
|
411
|
+
const V extends ScheduleViews = DefaultScheduleViews,
|
|
412
|
+
>(props: ScheduleProps<P, Editable, V>): ReactNode
|
|
413
|
+
/** Implementation signature — the flat superset (`ScheduleAllProps`), so the
|
|
414
|
+
* body never has to resolve a conditional against an unbound `V`. Not part
|
|
415
|
+
* of the public type: only the overload above is emitted. */
|
|
416
|
+
export function ScheduleRoot<P = unknown>(allProps: ScheduleAllProps<P>) {
|
|
417
|
+
const {
|
|
418
|
+
data,
|
|
419
|
+
staticEvents = [],
|
|
420
|
+
selected,
|
|
421
|
+
defaultSelected,
|
|
422
|
+
onSelect,
|
|
423
|
+
withSelection = true,
|
|
424
|
+
withEventDetails = true,
|
|
425
|
+
onDayClick,
|
|
426
|
+
renderEventDetails,
|
|
427
|
+
locale: localeProp,
|
|
428
|
+
timeZone: timeZoneProp,
|
|
429
|
+
translations,
|
|
430
|
+
classNames,
|
|
431
|
+
className,
|
|
432
|
+
startHour = 0,
|
|
433
|
+
endHour = 24,
|
|
434
|
+
slotDuration = 15,
|
|
435
|
+
minDuration,
|
|
436
|
+
resizeCollision = "none",
|
|
437
|
+
maxDuration,
|
|
438
|
+
hourHeight,
|
|
439
|
+
slotDisabled,
|
|
440
|
+
now,
|
|
441
|
+
withNowIndicator = true,
|
|
442
|
+
onEventChange,
|
|
443
|
+
onEventRemove,
|
|
444
|
+
onEventCreate,
|
|
445
|
+
onGridClick,
|
|
446
|
+
editable,
|
|
447
|
+
preventOverlap,
|
|
448
|
+
maxOverlapColumns,
|
|
449
|
+
maxAllDayRows,
|
|
450
|
+
onOverflowClick,
|
|
451
|
+
withOverflowDetails,
|
|
452
|
+
renderOverflowDetails,
|
|
453
|
+
empty,
|
|
454
|
+
date,
|
|
455
|
+
defaultDate,
|
|
456
|
+
onDateChange,
|
|
457
|
+
views,
|
|
458
|
+
view,
|
|
459
|
+
defaultView,
|
|
460
|
+
onViewChange,
|
|
461
|
+
withNowButton = true,
|
|
462
|
+
align,
|
|
463
|
+
revealBehavior = "auto",
|
|
464
|
+
visibleDays = 7,
|
|
465
|
+
dayDisabled,
|
|
466
|
+
maxEventsPerDay,
|
|
467
|
+
onMonthClick,
|
|
468
|
+
renderEvent,
|
|
469
|
+
testId,
|
|
470
|
+
...rest
|
|
471
|
+
} = allProps
|
|
472
|
+
const locale = useLocale(localeProp)
|
|
473
|
+
const timeZone = useTimeZone(timeZoneProp)
|
|
474
|
+
|
|
475
|
+
const [currentDate, setCurrentDate] = useUncontrolled<Date>({
|
|
476
|
+
value: date,
|
|
477
|
+
defaultValue: defaultDate,
|
|
478
|
+
finalValue: now ?? new Date(),
|
|
479
|
+
onChange: onDateChange,
|
|
480
|
+
})
|
|
481
|
+
const { selected: selectedIds, onEventSelect } = useScheduleSelection<P>({
|
|
482
|
+
selected,
|
|
483
|
+
defaultSelected,
|
|
484
|
+
onSelect,
|
|
485
|
+
withSelection,
|
|
486
|
+
})
|
|
487
|
+
// The one id the reveal below chases: the popover's chip. Keyed on this
|
|
488
|
+
// rather than the list, which a consumer re-creates on every render — a
|
|
489
|
+
// list compare would re-arm the reveal each commit.
|
|
490
|
+
const selectedId = selectedIds[0] ?? null
|
|
491
|
+
const resolvedViews = resolveScheduleViews(views)
|
|
492
|
+
// State is a plain `string`: the generic id union exists only at the public
|
|
493
|
+
// boundary (the cast below, and `ScheduleProps`' own fields), exactly as
|
|
494
|
+
// `Tabs` does with `d.value as TabsValue<Data>`. Threading `ScheduleViewId<V>`
|
|
495
|
+
// through the internals would buy nothing and fight every resolver, which all
|
|
496
|
+
// legitimately work in plain strings.
|
|
497
|
+
const [currentId, setCurrentId] = useUncontrolled<string>({
|
|
498
|
+
value: view,
|
|
499
|
+
defaultValue: defaultView,
|
|
500
|
+
// `views[0]`, not a hard-coded `"days"` — with `views={["month","year"]}`
|
|
501
|
+
// the old default named a view that has no tab, so the switcher would show
|
|
502
|
+
// nothing selected while Month rendered.
|
|
503
|
+
finalValue: resolvedViews[0]?.id ?? "days",
|
|
504
|
+
onChange: onViewChange,
|
|
505
|
+
})
|
|
506
|
+
// Chain: the id the consumer asked for, else the first configured entry, else
|
|
507
|
+
// a hard fallback for the degenerate `views={[]}` (warned about below —
|
|
508
|
+
// rendering *something* beats rendering nothing).
|
|
509
|
+
const active: ResolvedScheduleView =
|
|
510
|
+
findScheduleView(resolvedViews, currentId) ?? resolvedViews[0] ?? FALLBACK_VIEW
|
|
511
|
+
// The *renderer* — what `match` switches on, and what every date helper wants.
|
|
512
|
+
const currentView = active.view
|
|
513
|
+
// An entry that pins a window wins; otherwise the consumer's own prop. Only
|
|
514
|
+
// `"day"`/`"week"` pin one, so under the default entries this is always just
|
|
515
|
+
// `visibleDays` — which is what keeps existing call sites identical.
|
|
516
|
+
const activeVisibleDays = active.visibleDays ?? visibleDays
|
|
517
|
+
|
|
518
|
+
const viewIds = resolvedViews.map((v) => v.id)
|
|
519
|
+
const viewIdKey = viewIds.join("\u0000")
|
|
520
|
+
const activeRenderers = new Set<ScheduleView>(resolvedViews.map((v) => v.view))
|
|
521
|
+
const activeRendererKey = [...activeRenderers].sort().join("\u0000")
|
|
522
|
+
const presentScopedKey = SCOPED_PROP_NAMES.filter((n) => allProps[n] !== undefined).join("\u0000")
|
|
523
|
+
/**
|
|
524
|
+
* Dev-only configuration checks, the runtime half of the same two-layer
|
|
525
|
+
* scheme `editable` uses (`code-style.md`, "Capability flag + required
|
|
526
|
+
* callback"). The `view`/`defaultView` check in particular can *only* fire
|
|
527
|
+
* where the compile layer provably cannot reach: for a literal `views` it is
|
|
528
|
+
* already a type error, so this is for the genuinely dynamic
|
|
529
|
+
* `ScheduleViewOption[]` case, where `ScheduleViewId<V>` degrades to
|
|
530
|
+
* `string`.
|
|
531
|
+
*
|
|
532
|
+
* Keyed on the joined id list rather than `resolvedViews`' identity: an
|
|
533
|
+
* inline `views` literal is a fresh array every render, which would re-fire
|
|
534
|
+
* every warning below on each one.
|
|
535
|
+
*/
|
|
536
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: keyed on the joined id list, not the per-render array identity — see the comment above.
|
|
537
|
+
useEffect(() => {
|
|
538
|
+
if (viewIds.length === 0) {
|
|
539
|
+
devWarn(
|
|
540
|
+
'Schedule: `views` is empty — falling back to the "days" view, and no view switcher will render.',
|
|
541
|
+
)
|
|
542
|
+
return
|
|
543
|
+
}
|
|
544
|
+
const duplicates = [...new Set(viewIds.filter((id, i) => viewIds.indexOf(id) !== i))]
|
|
545
|
+
if (duplicates.length > 0) {
|
|
546
|
+
devWarn(
|
|
547
|
+
`Schedule: duplicate \`views\` id${duplicates.length > 1 ? "s" : ""} ${duplicates
|
|
548
|
+
.map((id) => `"${id}"`)
|
|
549
|
+
.join(
|
|
550
|
+
", ",
|
|
551
|
+
)} — only the first entry with each id is reachable, and the switcher's indicator cannot track the rest.`,
|
|
552
|
+
)
|
|
553
|
+
}
|
|
554
|
+
for (const [prop, value] of [
|
|
555
|
+
["view", view],
|
|
556
|
+
["defaultView", defaultView],
|
|
557
|
+
] as const) {
|
|
558
|
+
if (value != null && !viewIds.includes(value)) {
|
|
559
|
+
devWarn(
|
|
560
|
+
`Schedule: \`${prop}\` is "${value}", which is not one of \`views\` (${viewIds
|
|
561
|
+
.map((id) => `"${id}"`)
|
|
562
|
+
.join(", ")}) — falling back to "${viewIds[0]}".`,
|
|
563
|
+
)
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
// Props no configured renderer can act on. A literal `views` makes these a
|
|
567
|
+
// type error already (`ScheduleProps`), so in practice this fires for a
|
|
568
|
+
// `views` array built at runtime — exactly the case the gates widen open
|
|
569
|
+
// for, on purpose, so that working code keeps compiling.
|
|
570
|
+
const ignoredByRenderers = new Map<string, string[]>()
|
|
571
|
+
for (const name of SCOPED_PROP_NAMES) {
|
|
572
|
+
if (allProps[name] === undefined) continue
|
|
573
|
+
const needed = PROP_RENDERERS[name]
|
|
574
|
+
if (needed.some((renderer) => activeRenderers.has(renderer))) continue
|
|
575
|
+
const key = needed.join("|")
|
|
576
|
+
ignoredByRenderers.set(key, [...(ignoredByRenderers.get(key) ?? []), `\`${name}\``])
|
|
577
|
+
}
|
|
578
|
+
for (const [key, names] of ignoredByRenderers) {
|
|
579
|
+
const renderers = key.split("|")
|
|
580
|
+
devWarn(
|
|
581
|
+
`Schedule: ${listPhrase(names)} ${names.length > 1 ? "are" : "is"} ignored — no \`views\` entry renders the ${listPhrase(
|
|
582
|
+
renderers.map((r) => `\`${r}\``),
|
|
583
|
+
)} view${renderers.length > 1 ? "s" : ""}, which ${renderers.length > 1 ? "are" : "is"} what reads ${names.length > 1 ? "them" : "it"}.`,
|
|
584
|
+
)
|
|
585
|
+
}
|
|
586
|
+
// Keyed on which scoped props are *present*, not on `allProps` itself: an
|
|
587
|
+
// inline object prop makes that a fresh reference every render, and
|
|
588
|
+
// `devWarn` does not dedupe.
|
|
589
|
+
}, [viewIdKey, view, defaultView, activeRendererKey, presentScopedKey])
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Reveal: bring the thing that was just asked for into view, but only when
|
|
593
|
+
* it isn't already there.
|
|
594
|
+
*
|
|
595
|
+
* Two arming sources, one slot (`revealRef`). A **selection** change arms the
|
|
596
|
+
* selected event. A **date** change that is not navigation arms the anchor
|
|
597
|
+
* day — which is what makes drill-down work with no new props at all: the
|
|
598
|
+
* anchor already *is* the day that was clicked, whether it got there through
|
|
599
|
+
* the built-in `drillTo("days")` below or a consumer's own
|
|
600
|
+
* `useSchedule().goTo("days")`.
|
|
601
|
+
*
|
|
602
|
+
* Neither is armed by the view moving on its own, and the date axis is armed
|
|
603
|
+
* only for a *jump* — paging away and being dragged back would be exactly
|
|
604
|
+
* the yank this rule exists to avoid.
|
|
605
|
+
*
|
|
606
|
+
* DOM focus is deliberately never moved here: a chip click focuses on its
|
|
607
|
+
* own, and stealing focus in response to a *prop* change would fight
|
|
608
|
+
* whatever the user is actually doing.
|
|
609
|
+
*/
|
|
610
|
+
const revealRef = useRef<ScheduleReveal | null>(
|
|
611
|
+
selectedId == null ? null : { kind: "event", id: selectedId },
|
|
612
|
+
)
|
|
613
|
+
/** Previous *committed* values, for the arming effect below. Refs rather
|
|
614
|
+
* than a dependency array: the effect has to run on every commit to clear
|
|
615
|
+
* `navigatedRef`, and `currentDate` is an object a controlled consumer is
|
|
616
|
+
* free to re-create on every render. */
|
|
617
|
+
const previousSelectedRef = useRef(selectedId)
|
|
618
|
+
/** `null` until the first commit records one, which is what keeps a day
|
|
619
|
+
* reveal from firing on mount: the grid opens at `scrollLeft: 0` having
|
|
620
|
+
* been asked to go nowhere. The *event* reveal deliberately does fire on
|
|
621
|
+
* mount (`revealRef` is seeded from `selectedId` above) — a `selected` id
|
|
622
|
+
* is an explicit target, an anchor date is just where the calendar starts. */
|
|
623
|
+
const previousDateRef = useRef<Date | null>(null)
|
|
624
|
+
/** Seeded with the view we mount on, so the first commit never counts as a
|
|
625
|
+
* change — the same "mount is silent" reasoning as `previousDateRef`. */
|
|
626
|
+
const previousViewRef = useRef(currentView)
|
|
627
|
+
/**
|
|
628
|
+
* Set immediately before a `setCurrentDate` that came from a control which
|
|
629
|
+
* already owns its own scroll behaviour: Prev/Next, the Now button, and
|
|
630
|
+
* `DaysView`'s drag-to-edge pagination. None of those may arm a day reveal.
|
|
631
|
+
*
|
|
632
|
+
* The Now button is the one that actively breaks without this — it calls
|
|
633
|
+
* `scrollElementToCenter` on both axes synchronously, and a competing reveal
|
|
634
|
+
* on the next commit would abort that smooth scroll partway through.
|
|
635
|
+
*
|
|
636
|
+
* Cleared unconditionally on every commit, not only on those where the date
|
|
637
|
+
* actually moved: a controlled consumer may clamp or reject an
|
|
638
|
+
* `onDateChange`, and a flag whose date change never arrives would stay
|
|
639
|
+
* stuck and silently swallow the next genuine drill-down. (A consumer
|
|
640
|
+
* wrapping their `setDate` in `startTransition` can still lose the
|
|
641
|
+
* suppression, since React may commit an intermediate tree first; the cost
|
|
642
|
+
* is one unwanted re-centre on a page turn.)
|
|
643
|
+
*/
|
|
644
|
+
const navigatedRef = useRef(false)
|
|
645
|
+
/** Marks a date change as navigation, then performs it. */
|
|
646
|
+
const navigateTo = (target: Date) => {
|
|
647
|
+
navigatedRef.current = true
|
|
648
|
+
setCurrentDate(target)
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
useEffect(() => {
|
|
652
|
+
const previousSelected = previousSelectedRef.current
|
|
653
|
+
const previousDate = previousDateRef.current
|
|
654
|
+
const previousView = previousViewRef.current
|
|
655
|
+
const navigated = navigatedRef.current
|
|
656
|
+
previousSelectedRef.current = selectedId
|
|
657
|
+
previousDateRef.current = currentDate
|
|
658
|
+
previousViewRef.current = currentView
|
|
659
|
+
navigatedRef.current = false
|
|
660
|
+
|
|
661
|
+
// Selection wins outright, and returns. It is the more specific target — a
|
|
662
|
+
// chip, not the whole column it sits in — and it carries a date axis of
|
|
663
|
+
// its own, so a `goTo` that sets `selected` + `date` + `view` in one commit
|
|
664
|
+
// must reveal the chip rather than the day underneath it.
|
|
665
|
+
if (selectedId !== previousSelected) {
|
|
666
|
+
revealRef.current = selectedId == null ? null : { kind: "event", id: selectedId }
|
|
667
|
+
return
|
|
668
|
+
}
|
|
669
|
+
if (navigated || currentView !== "days") return
|
|
670
|
+
// Never clobber a reveal still in flight: the event branch's own date axis
|
|
671
|
+
// moves the anchor and deliberately *stays* armed for the commit that
|
|
672
|
+
// renders the new band, as does its page-turn re-arm. Both land here on the
|
|
673
|
+
// very next commit with the date changed, and this effect runs first.
|
|
674
|
+
if (revealRef.current !== null) return
|
|
675
|
+
// Two independent reasons to reveal, and the second is not optional: a
|
|
676
|
+
// Schedule anchors on *today* by default, so drilling into today — the
|
|
677
|
+
// likeliest first click there is — moves no date at all. Arming on the
|
|
678
|
+
// date alone left that case, and every "click the day we are already
|
|
679
|
+
// anchored on", silently doing nothing while the column sat off screen.
|
|
680
|
+
// Arriving in the days view is itself the event worth reacting to, because
|
|
681
|
+
// the grid mounts at `scrollLeft: 0` regardless of which column the anchor
|
|
682
|
+
// is.
|
|
683
|
+
//
|
|
684
|
+
// The day comparison is by calendar day, never by identity: a controlled
|
|
685
|
+
// consumer may hand back a fresh object every render (`date={new
|
|
686
|
+
// Date(iso)}`), and re-arming on that would re-scroll on every parent
|
|
687
|
+
// render. `getTime()` short-circuits before `dayKey` builds an `Intl`
|
|
688
|
+
// formatter.
|
|
689
|
+
const arrivedInDays = previousView !== "days"
|
|
690
|
+
const dayChanged =
|
|
691
|
+
previousDate !== null &&
|
|
692
|
+
previousDate.getTime() !== currentDate.getTime() &&
|
|
693
|
+
dayKey(previousDate, timeZone) !== dayKey(currentDate, timeZone)
|
|
694
|
+
if (!arrivedInDays && !dayChanged) return
|
|
695
|
+
revealRef.current = { kind: "day", date: currentDate }
|
|
696
|
+
})
|
|
697
|
+
|
|
698
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: armed by the effect above; `data`/`staticEvents` are read through the ref-gated branch below and must not re-trigger a reveal on every parent render.
|
|
699
|
+
useEffect(() => {
|
|
700
|
+
const reveal = revealRef.current
|
|
701
|
+
if (reveal == null) return
|
|
702
|
+
const grid = gridRef.current
|
|
703
|
+
|
|
704
|
+
if (reveal.kind === "day") {
|
|
705
|
+
// Consumed up front: a day reveal that lands anywhere but a mounted days
|
|
706
|
+
// grid is dropped, never left armed to fire the next time one opens.
|
|
707
|
+
revealRef.current = null
|
|
708
|
+
if (currentView !== "days" || !grid) return
|
|
709
|
+
// A page turn is mid-flight — same guard, same reason, as the event
|
|
710
|
+
// branch below.
|
|
711
|
+
if (grid.querySelector("[data-page-exiting]")) {
|
|
712
|
+
revealRef.current = reveal
|
|
713
|
+
return
|
|
714
|
+
}
|
|
715
|
+
const column = liveDayColumnFor(grid, dayKey(reveal.date, timeZone))
|
|
716
|
+
// No column: nothing on screen to centre. Reachable when a consumer
|
|
717
|
+
// anchors outside the rendered window by other means; a no-op, not an
|
|
718
|
+
// error, exactly as a missing chip is below.
|
|
719
|
+
if (!column) return
|
|
720
|
+
const gutter = grid.querySelector<HTMLElement>("[data-schedule-part='hour-gutter']")
|
|
721
|
+
if (isElementInScrollViewport(grid, column, { axis: "inline", inlineOccluder: gutter })) {
|
|
722
|
+
return
|
|
723
|
+
}
|
|
724
|
+
scrollElementToCenter(grid, column, { axis: "inline", behavior: revealBehavior })
|
|
725
|
+
return
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
const { id } = reveal
|
|
729
|
+
const event = [...data, ...staticEvents].find((e) => e.id === id)
|
|
730
|
+
// A `selected` id naming nothing is a no-op, not an error — the consumer
|
|
731
|
+
// may be mid-fetch, or have removed the event while it was selected.
|
|
732
|
+
if (!event) {
|
|
733
|
+
revealRef.current = null
|
|
734
|
+
return
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
// Date axis. Testing the whole range, not just `start`, is what makes a
|
|
738
|
+
// long multi-day event behave: it is on screen every day of the window, so
|
|
739
|
+
// anchoring to its start would page *away* from what we are revealing.
|
|
740
|
+
if (
|
|
741
|
+
!isEventInVisibleRange(event, currentView, currentDate, {
|
|
742
|
+
timeZone,
|
|
743
|
+
locale,
|
|
744
|
+
// The wide `align` value, deliberately un-narrowed: `getVisibleRange`
|
|
745
|
+
// calls `resolveWeekStartDay` itself and the days branch needs the raw
|
|
746
|
+
// `"relative"`.
|
|
747
|
+
startOfWeek: align,
|
|
748
|
+
visibleDays: activeVisibleDays,
|
|
749
|
+
})
|
|
750
|
+
) {
|
|
751
|
+
// Deliberately not `navigateTo`: the armed-reveal guard above already
|
|
752
|
+
// stops this from arming a day reveal, and calling it navigation would
|
|
753
|
+
// be a lie.
|
|
754
|
+
setCurrentDate(event.start)
|
|
755
|
+
return // stay armed; the next commit scrolls
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
revealRef.current = null
|
|
759
|
+
// Month/Year have no scrollable grid — they get the date axis only.
|
|
760
|
+
if (currentView !== "days" || !grid) return
|
|
761
|
+
// A page turn is mid-flight: the incoming band is itself under a
|
|
762
|
+
// `translateX`, so its rects describe a position it is only passing
|
|
763
|
+
// through. Vertical would still be right (the keyframes are X-only) but
|
|
764
|
+
// horizontal would land a full band off. Leave it armed and let the commit
|
|
765
|
+
// that clears the animation do it.
|
|
766
|
+
if (grid.querySelector("[data-page-exiting]")) {
|
|
767
|
+
revealRef.current = reveal
|
|
768
|
+
return
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
const chip =
|
|
772
|
+
liveChipsFor(grid, id)[0] ??
|
|
773
|
+
grid.querySelector<HTMLElement>(
|
|
774
|
+
`[data-schedule-part='all-day-event'][data-event-id="${CSS.escape(id)}"]:not([data-page-exiting])`,
|
|
775
|
+
)
|
|
776
|
+
// No chip: clipped by `startHour`/`endHour`, or collapsed into a "+N".
|
|
777
|
+
if (!chip) return
|
|
778
|
+
// The grid's own sticky header occludes the top of its scroll viewport, and
|
|
779
|
+
// its hour gutter the inline-start edge, so "inside the scroll box" is not
|
|
780
|
+
// the same as "visible" on either axis.
|
|
781
|
+
const topInset =
|
|
782
|
+
grid
|
|
783
|
+
.querySelector<HTMLElement>("[data-schedule-part='header-block']")
|
|
784
|
+
?.getBoundingClientRect().height ?? 0
|
|
785
|
+
const gutter = grid.querySelector<HTMLElement>("[data-schedule-part='hour-gutter']")
|
|
786
|
+
if (isElementInScrollViewport(grid, chip, { topInset, inlineOccluder: gutter })) return
|
|
787
|
+
scrollElementToCenter(grid, chip, { behavior: revealBehavior })
|
|
788
|
+
}, [
|
|
789
|
+
selectedId,
|
|
790
|
+
currentDate,
|
|
791
|
+
currentView,
|
|
792
|
+
activeVisibleDays,
|
|
793
|
+
align,
|
|
794
|
+
timeZone,
|
|
795
|
+
locale,
|
|
796
|
+
revealBehavior,
|
|
797
|
+
])
|
|
798
|
+
// Private — never surfaced on `ScheduleProps` (see `DaysViewProps.gridRef`'s
|
|
799
|
+
// own doc comment for why `ScheduleTimedProps` itself can't carry this).
|
|
800
|
+
// Only meaningful while `currentView === "days"`; Month/Year get date-change
|
|
801
|
+
// only, no scroll, since neither has a timed grid to scroll.
|
|
802
|
+
const gridRef = useRef<HTMLDivElement>(null)
|
|
803
|
+
// Paired with `gridRef` above for `scrollElementToCenter` below — same
|
|
804
|
+
// "private, DaysView's own `nowRef` doc comment explains why" reasoning.
|
|
805
|
+
const nowRef = useRef<HTMLDivElement>(null)
|
|
806
|
+
const t = resolveScheduleTranslations(translations)
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* RFC §9/§10's drill-down, finally wired: a day click in Month or Year
|
|
810
|
+
* lands on that date in Days, a Year month-header click on that month in
|
|
811
|
+
* Month — the Google/Apple Calendar default, and the only place in the
|
|
812
|
+
* component tree where both the anchor date *and* the view are in scope
|
|
813
|
+
* (Schedule has no context, by RFC §3, so a view can't reach these itself).
|
|
814
|
+
*
|
|
815
|
+
* Presence-gated like every other Schedule callback: a consumer's own
|
|
816
|
+
* `onDayClick`/`onMonthClick` replaces the drill-down rather than firing
|
|
817
|
+
* alongside it. Both setters come from `useUncontrolled`, so this works
|
|
818
|
+
* identically whether `date`/`view` are controlled or not.
|
|
819
|
+
*
|
|
820
|
+
* `visibleDays` is deliberately untouched — drilling in moves the anchor,
|
|
821
|
+
* it doesn't resize the window, so a 5-day Schedule stays a 5-day Schedule
|
|
822
|
+
* with the clicked day inside it rather than silently becoming a Day view.
|
|
823
|
+
*/
|
|
824
|
+
const drillTo = (renderer: ScheduleView) => (target: Date) => {
|
|
825
|
+
setCurrentDate(target)
|
|
826
|
+
// Drill-down is specified in renderers ("a day click lands in the days
|
|
827
|
+
// grid"), but it has to *set* an id, and with a configurable `views` those
|
|
828
|
+
// are no longer the same string — `views={["day","week","month"]}` has no
|
|
829
|
+
// entry called "days" at all. Resolve to the first entry using that
|
|
830
|
+
// renderer; `views={["month","year"]}` legitimately has none, in which case
|
|
831
|
+
// the anchor still moves and the view does not.
|
|
832
|
+
const entry = findScheduleViewByRenderer(resolvedViews, renderer)
|
|
833
|
+
if (entry) {
|
|
834
|
+
setCurrentId(entry.id)
|
|
835
|
+
return
|
|
836
|
+
}
|
|
837
|
+
devWarn(
|
|
838
|
+
`Schedule: a drill-down targeted the "${renderer}" view, but no \`views\` entry renders it — the date moved and the view did not.`,
|
|
839
|
+
)
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
return (
|
|
843
|
+
<ark.div
|
|
844
|
+
className={cn(
|
|
845
|
+
"flex h-full flex-col overflow-hidden rounded-sm",
|
|
846
|
+
// Days already closes its own frame — a `border-b` under the
|
|
847
|
+
// header+all-day block and a `border-s` on each day column (which
|
|
848
|
+
// also separates the hour gutter from day column 0) — so a second,
|
|
849
|
+
// wrapping card border here would just be a redundant outer box.
|
|
850
|
+
// Month/Year don't: `MonthView` deliberately skips its own outer-edge
|
|
851
|
+
// cell borders and relies on this wrapper border to close its frame
|
|
852
|
+
// (see its own comment), so only they keep it.
|
|
853
|
+
"border border-brand-900/20 dark:border-white/15",
|
|
854
|
+
className,
|
|
855
|
+
)}
|
|
856
|
+
data-schedule-part="root"
|
|
857
|
+
{...props({ "data-testid": testId })}
|
|
858
|
+
{...rest}
|
|
859
|
+
>
|
|
860
|
+
<ScheduleToolbar className={classNames?.toolbar}>
|
|
861
|
+
<ScheduleToolbar.Title
|
|
862
|
+
view={currentView}
|
|
863
|
+
date={currentDate}
|
|
864
|
+
timeZone={timeZone}
|
|
865
|
+
locale={locale}
|
|
866
|
+
align={align}
|
|
867
|
+
visibleDays={activeVisibleDays}
|
|
868
|
+
/>
|
|
869
|
+
<div className="flex items-center gap-1">
|
|
870
|
+
{withNowButton ? (
|
|
871
|
+
<ScheduleToolbar.NowTrigger
|
|
872
|
+
onDateChange={(d) => {
|
|
873
|
+
// Navigation: this button does its own scrolling, both axes,
|
|
874
|
+
// onto the now-marker itself — which also brings today's
|
|
875
|
+
// column into view. A day reveal armed by the same date change
|
|
876
|
+
// would fire on the next commit and abort that scroll partway.
|
|
877
|
+
navigateTo(d)
|
|
878
|
+
if (currentView === "days" && gridRef.current && nowRef.current) {
|
|
879
|
+
scrollElementToCenter(gridRef.current, nowRef.current)
|
|
880
|
+
}
|
|
881
|
+
}}
|
|
882
|
+
now={now}
|
|
883
|
+
translations={t}
|
|
884
|
+
/>
|
|
885
|
+
) : null}
|
|
886
|
+
<ScheduleToolbar.PrevTrigger
|
|
887
|
+
view={currentView}
|
|
888
|
+
date={currentDate}
|
|
889
|
+
onDateChange={navigateTo}
|
|
890
|
+
timeZone={timeZone}
|
|
891
|
+
translations={t}
|
|
892
|
+
visibleDays={activeVisibleDays}
|
|
893
|
+
/>
|
|
894
|
+
<ScheduleToolbar.NextTrigger
|
|
895
|
+
view={currentView}
|
|
896
|
+
date={currentDate}
|
|
897
|
+
onDateChange={navigateTo}
|
|
898
|
+
timeZone={timeZone}
|
|
899
|
+
translations={t}
|
|
900
|
+
visibleDays={activeVisibleDays}
|
|
901
|
+
/>
|
|
902
|
+
{/* Composed only when there is a choice to offer. A one-tab tablist
|
|
903
|
+
is dead chrome, and announcing a tablist a user cannot move within
|
|
904
|
+
is worse than announcing none — but that is this layout's call to
|
|
905
|
+
make, not something `ViewSwitcher` should decide by returning
|
|
906
|
+
`null` from under whoever placed it. */}
|
|
907
|
+
{resolvedViews.length > 1 ? (
|
|
908
|
+
<ScheduleToolbar.ViewSwitcher
|
|
909
|
+
view={currentId}
|
|
910
|
+
views={resolvedViews}
|
|
911
|
+
onViewChange={setCurrentId}
|
|
912
|
+
translations={t}
|
|
913
|
+
className="ms-1"
|
|
914
|
+
/>
|
|
915
|
+
) : null}
|
|
916
|
+
</div>
|
|
917
|
+
</ScheduleToolbar>
|
|
918
|
+
<div className="min-h-0 flex-1">
|
|
919
|
+
{match(currentView)
|
|
920
|
+
.with("days", () => (
|
|
921
|
+
<DaysViewBody
|
|
922
|
+
data={data}
|
|
923
|
+
staticEvents={staticEvents}
|
|
924
|
+
selected={selectedIds}
|
|
925
|
+
onSelect={(event) => onEventSelect?.(event)}
|
|
926
|
+
withSelection={withSelection}
|
|
927
|
+
withEventDetails={withEventDetails}
|
|
928
|
+
onDayClick={onDayClick}
|
|
929
|
+
renderEventDetails={renderEventDetails}
|
|
930
|
+
locale={locale}
|
|
931
|
+
timeZone={timeZone}
|
|
932
|
+
translations={t}
|
|
933
|
+
classNames={classNames}
|
|
934
|
+
startHour={startHour}
|
|
935
|
+
endHour={endHour}
|
|
936
|
+
slotDuration={slotDuration}
|
|
937
|
+
minDuration={minDuration}
|
|
938
|
+
resizeCollision={resizeCollision}
|
|
939
|
+
maxDuration={maxDuration}
|
|
940
|
+
hourHeight={hourHeight}
|
|
941
|
+
slotDisabled={slotDisabled}
|
|
942
|
+
now={now}
|
|
943
|
+
withNowIndicator={withNowIndicator}
|
|
944
|
+
onEventChange={onEventChange}
|
|
945
|
+
onEventRemove={onEventRemove}
|
|
946
|
+
onEventCreate={onEventCreate}
|
|
947
|
+
onGridClick={onGridClick}
|
|
948
|
+
editable={editable}
|
|
949
|
+
preventOverlap={preventOverlap}
|
|
950
|
+
maxOverlapColumns={maxOverlapColumns}
|
|
951
|
+
maxAllDayRows={maxAllDayRows}
|
|
952
|
+
onOverflowClick={onOverflowClick}
|
|
953
|
+
withOverflowDetails={withOverflowDetails}
|
|
954
|
+
renderOverflowDetails={renderOverflowDetails}
|
|
955
|
+
empty={empty}
|
|
956
|
+
date={currentDate}
|
|
957
|
+
// Under `Root`, `withPagination`/`withNowButton` are both off, so
|
|
958
|
+
// drag-to-edge pagination is the only thing that reaches this —
|
|
959
|
+
// navigation, and not a request to re-centre anything.
|
|
960
|
+
onDateChange={navigateTo}
|
|
961
|
+
withPagination={false}
|
|
962
|
+
withNowButton={false}
|
|
963
|
+
visibleDays={activeVisibleDays}
|
|
964
|
+
align={align}
|
|
965
|
+
gridRef={gridRef}
|
|
966
|
+
nowRef={nowRef}
|
|
967
|
+
/>
|
|
968
|
+
))
|
|
969
|
+
.with("month", () => (
|
|
970
|
+
<MonthView
|
|
971
|
+
data={data}
|
|
972
|
+
staticEvents={staticEvents}
|
|
973
|
+
selected={selectedIds}
|
|
974
|
+
onSelect={(event) => onEventSelect?.(event)}
|
|
975
|
+
withSelection={withSelection}
|
|
976
|
+
withEventDetails={withEventDetails}
|
|
977
|
+
onDayClick={onDayClick ?? drillTo("days")}
|
|
978
|
+
renderEventDetails={renderEventDetails}
|
|
979
|
+
locale={locale}
|
|
980
|
+
timeZone={timeZone}
|
|
981
|
+
translations={t}
|
|
982
|
+
classNames={classNames}
|
|
983
|
+
date={currentDate}
|
|
984
|
+
onDateChange={setCurrentDate}
|
|
985
|
+
withPagination={false}
|
|
986
|
+
withNowButton={false}
|
|
987
|
+
startOfWeek={resolveWeekStartDay(align)}
|
|
988
|
+
now={now}
|
|
989
|
+
dayDisabled={dayDisabled}
|
|
990
|
+
maxEventsPerDay={maxEventsPerDay}
|
|
991
|
+
/>
|
|
992
|
+
))
|
|
993
|
+
.with("year", () => (
|
|
994
|
+
<YearView
|
|
995
|
+
data={data}
|
|
996
|
+
staticEvents={staticEvents}
|
|
997
|
+
onDayClick={onDayClick ?? drillTo("days")}
|
|
998
|
+
onMonthClick={onMonthClick ?? drillTo("month")}
|
|
999
|
+
locale={locale}
|
|
1000
|
+
timeZone={timeZone}
|
|
1001
|
+
translations={t}
|
|
1002
|
+
classNames={classNames}
|
|
1003
|
+
date={currentDate}
|
|
1004
|
+
onDateChange={setCurrentDate}
|
|
1005
|
+
withPagination={false}
|
|
1006
|
+
withNowButton={false}
|
|
1007
|
+
now={now}
|
|
1008
|
+
dayDisabled={dayDisabled}
|
|
1009
|
+
/>
|
|
1010
|
+
))
|
|
1011
|
+
.with("agenda", () => (
|
|
1012
|
+
<AgendaView
|
|
1013
|
+
data={data}
|
|
1014
|
+
staticEvents={staticEvents}
|
|
1015
|
+
selected={selectedIds}
|
|
1016
|
+
onSelect={(event) => onEventSelect?.(event)}
|
|
1017
|
+
withSelection={withSelection}
|
|
1018
|
+
withEventDetails={withEventDetails}
|
|
1019
|
+
renderEventDetails={renderEventDetails}
|
|
1020
|
+
renderEvent={renderEvent}
|
|
1021
|
+
locale={locale}
|
|
1022
|
+
timeZone={timeZone}
|
|
1023
|
+
translations={t}
|
|
1024
|
+
classNames={classNames}
|
|
1025
|
+
empty={empty}
|
|
1026
|
+
date={currentDate}
|
|
1027
|
+
// `setCurrentDate`, not `navigateTo`: like Month and Year, the
|
|
1028
|
+
// agenda has no scroll of its own for a competing day-reveal to
|
|
1029
|
+
// abort, so there is nothing to suppress.
|
|
1030
|
+
onDateChange={setCurrentDate}
|
|
1031
|
+
withPagination={false}
|
|
1032
|
+
withNowButton={false}
|
|
1033
|
+
now={now}
|
|
1034
|
+
/>
|
|
1035
|
+
))
|
|
1036
|
+
.exhaustive()}
|
|
1037
|
+
</div>
|
|
1038
|
+
</ark.div>
|
|
1039
|
+
)
|
|
1040
|
+
}
|