@42-central/ui-react 0.0.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +453 -1
- package/dist/chunk-2762HZYX.js +284 -0
- package/dist/chunk-2762HZYX.js.map +1 -0
- package/dist/chunk-2GILNBZW.js +31 -0
- package/dist/chunk-2GILNBZW.js.map +1 -0
- package/dist/chunk-2H46IXW4.js +264 -0
- package/dist/chunk-2H46IXW4.js.map +1 -0
- package/dist/chunk-2SVX3MQQ.js +78 -0
- package/dist/chunk-2SVX3MQQ.js.map +1 -0
- package/dist/chunk-3GYOIQW7.js +242 -0
- package/dist/chunk-3GYOIQW7.js.map +1 -0
- package/dist/chunk-3NZXWCGF.js +152 -0
- package/dist/chunk-3NZXWCGF.js.map +1 -0
- package/dist/chunk-44OV3PNH.js +294 -0
- package/dist/chunk-44OV3PNH.js.map +1 -0
- package/dist/chunk-5FDOOG4J.js +15 -0
- package/dist/chunk-5FDOOG4J.js.map +1 -0
- package/dist/chunk-6I4R3HR6.js +90 -0
- package/dist/chunk-6I4R3HR6.js.map +1 -0
- package/dist/chunk-6SWK4XG5.js +128 -0
- package/dist/chunk-6SWK4XG5.js.map +1 -0
- package/dist/chunk-7NZSTCJO.js +82 -0
- package/dist/chunk-7NZSTCJO.js.map +1 -0
- package/dist/chunk-7P32XCEU.js +15 -0
- package/dist/chunk-7P32XCEU.js.map +1 -0
- package/dist/chunk-ACE7FBWE.js +216 -0
- package/dist/chunk-ACE7FBWE.js.map +1 -0
- package/dist/chunk-AIQG7IIT.js +39 -0
- package/dist/chunk-AIQG7IIT.js.map +1 -0
- package/dist/chunk-B2LCHXUB.js +26 -0
- package/dist/chunk-B2LCHXUB.js.map +1 -0
- package/dist/chunk-BEL75C7N.js +35 -0
- package/dist/chunk-BEL75C7N.js.map +1 -0
- package/dist/chunk-BJZLQTAZ.js +3 -0
- package/dist/chunk-BJZLQTAZ.js.map +1 -0
- package/dist/chunk-BUIHQJGE.js +8 -0
- package/dist/chunk-BUIHQJGE.js.map +1 -0
- package/dist/chunk-CHTN5AHI.js +106 -0
- package/dist/chunk-CHTN5AHI.js.map +1 -0
- package/dist/chunk-CSCVTESP.js +58 -0
- package/dist/chunk-CSCVTESP.js.map +1 -0
- package/dist/chunk-EEMRRRYS.js +60 -0
- package/dist/chunk-EEMRRRYS.js.map +1 -0
- package/dist/chunk-FD6P6PLQ.js +153 -0
- package/dist/chunk-FD6P6PLQ.js.map +1 -0
- package/dist/chunk-FMMKEYHB.js +3 -0
- package/dist/chunk-FMMKEYHB.js.map +1 -0
- package/dist/chunk-FUWSTUDM.js +219 -0
- package/dist/chunk-FUWSTUDM.js.map +1 -0
- package/dist/chunk-G52U24GR.js +10 -0
- package/dist/chunk-G52U24GR.js.map +1 -0
- package/dist/chunk-GTKKRV5N.js +14 -0
- package/dist/chunk-GTKKRV5N.js.map +1 -0
- package/dist/chunk-HWNPXAEN.js +31 -0
- package/dist/chunk-HWNPXAEN.js.map +1 -0
- package/dist/chunk-IFWCCAQV.js +222 -0
- package/dist/chunk-IFWCCAQV.js.map +1 -0
- package/dist/chunk-IG7FBZVM.js +101 -0
- package/dist/chunk-IG7FBZVM.js.map +1 -0
- package/dist/chunk-IHYFYMHJ.js +167 -0
- package/dist/chunk-IHYFYMHJ.js.map +1 -0
- package/dist/chunk-IRXZHLUL.js +51 -0
- package/dist/chunk-IRXZHLUL.js.map +1 -0
- package/dist/chunk-IXKELBJA.js +202 -0
- package/dist/chunk-IXKELBJA.js.map +1 -0
- package/dist/chunk-J3PELDH3.js +279 -0
- package/dist/chunk-J3PELDH3.js.map +1 -0
- package/dist/chunk-JBVFWSRQ.js +21 -0
- package/dist/chunk-JBVFWSRQ.js.map +1 -0
- package/dist/chunk-MOI7B3KH.js +217 -0
- package/dist/chunk-MOI7B3KH.js.map +1 -0
- package/dist/chunk-NF5JM2YO.js +57 -0
- package/dist/chunk-NF5JM2YO.js.map +1 -0
- package/dist/chunk-NGAQITWP.js +156 -0
- package/dist/chunk-NGAQITWP.js.map +1 -0
- package/dist/chunk-NSDM3FEB.js +82 -0
- package/dist/chunk-NSDM3FEB.js.map +1 -0
- package/dist/chunk-ORTCK34Y.js +3 -0
- package/dist/chunk-ORTCK34Y.js.map +1 -0
- package/dist/chunk-P3XMBETI.js +26 -0
- package/dist/chunk-P3XMBETI.js.map +1 -0
- package/dist/chunk-P7A3BCAC.js +93 -0
- package/dist/chunk-P7A3BCAC.js.map +1 -0
- package/dist/chunk-PJL4ZL5V.js +639 -0
- package/dist/chunk-PJL4ZL5V.js.map +1 -0
- package/dist/chunk-POKDSVQT.js +223 -0
- package/dist/chunk-POKDSVQT.js.map +1 -0
- package/dist/chunk-QMW7D5GU.js +207 -0
- package/dist/chunk-QMW7D5GU.js.map +1 -0
- package/dist/chunk-QP4I37PA.js +14 -0
- package/dist/chunk-QP4I37PA.js.map +1 -0
- package/dist/chunk-R5GMMWAY.js +3 -0
- package/dist/chunk-R5GMMWAY.js.map +1 -0
- package/dist/chunk-S53FHWNG.js +30 -0
- package/dist/chunk-S53FHWNG.js.map +1 -0
- package/dist/chunk-SIG4DMNZ.js +238 -0
- package/dist/chunk-SIG4DMNZ.js.map +1 -0
- package/dist/chunk-SKPM2FRX.js +44 -0
- package/dist/chunk-SKPM2FRX.js.map +1 -0
- package/dist/chunk-TCWYBVIL.js +33 -0
- package/dist/chunk-TCWYBVIL.js.map +1 -0
- package/dist/chunk-TMMEJKLI.js +363 -0
- package/dist/chunk-TMMEJKLI.js.map +1 -0
- package/dist/chunk-TNNH3FVQ.js +155 -0
- package/dist/chunk-TNNH3FVQ.js.map +1 -0
- package/dist/chunk-TWGCWKRV.js +44 -0
- package/dist/chunk-TWGCWKRV.js.map +1 -0
- package/dist/chunk-U5GW5EBR.js +150 -0
- package/dist/chunk-U5GW5EBR.js.map +1 -0
- package/dist/chunk-UNSAA7YG.js +148 -0
- package/dist/chunk-UNSAA7YG.js.map +1 -0
- package/dist/chunk-UVYTJQTJ.js +14 -0
- package/dist/chunk-UVYTJQTJ.js.map +1 -0
- package/dist/chunk-VLUKI3HL.js +120 -0
- package/dist/chunk-VLUKI3HL.js.map +1 -0
- package/dist/chunk-VZ2TPU4B.js +348 -0
- package/dist/chunk-VZ2TPU4B.js.map +1 -0
- package/dist/chunk-VZH6TS7M.js +153 -0
- package/dist/chunk-VZH6TS7M.js.map +1 -0
- package/dist/chunk-WYCMIIRR.js +12 -0
- package/dist/chunk-WYCMIIRR.js.map +1 -0
- package/dist/chunk-WZB6LPQI.js +47 -0
- package/dist/chunk-WZB6LPQI.js.map +1 -0
- package/dist/chunk-YBJB7FGE.js +187 -0
- package/dist/chunk-YBJB7FGE.js.map +1 -0
- package/dist/chunk-YIQI2CF3.js +92 -0
- package/dist/chunk-YIQI2CF3.js.map +1 -0
- package/dist/chunk-YKUCSV34.js +72 -0
- package/dist/chunk-YKUCSV34.js.map +1 -0
- package/dist/chunk-ZP6EBROY.js +3 -0
- package/dist/chunk-ZP6EBROY.js.map +1 -0
- package/dist/colors.css +296 -0
- package/dist/components/accordion/accordion-data.d.ts +52 -0
- package/dist/components/accordion/accordion-data.d.ts.map +1 -0
- package/dist/components/accordion/accordion.d.ts +116 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/accordion/index.js +206 -0
- package/dist/components/accordion/index.js.map +1 -0
- package/dist/components/action-icon/action-icon.d.ts +51 -0
- package/dist/components/action-icon/action-icon.d.ts.map +1 -0
- package/dist/components/action-icon/index.d.ts +2 -0
- package/dist/components/action-icon/index.d.ts.map +1 -0
- package/dist/components/action-icon/index.js +8 -0
- package/dist/components/action-icon/index.js.map +1 -0
- package/dist/components/alert/alert.d.ts +82 -0
- package/dist/components/alert/alert.d.ts.map +1 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/index.d.ts.map +1 -0
- package/dist/components/alert/index.js +74 -0
- package/dist/components/alert/index.js.map +1 -0
- package/dist/components/ambient-background/ambient-background.d.ts +47 -0
- package/dist/components/ambient-background/ambient-background.d.ts.map +1 -0
- package/dist/components/ambient-background/index.d.ts +2 -0
- package/dist/components/ambient-background/index.d.ts.map +1 -0
- package/dist/components/ambient-background/index.js +35 -0
- package/dist/components/ambient-background/index.js.map +1 -0
- package/dist/components/app-shell/app-shell.d.ts +185 -0
- package/dist/components/app-shell/app-shell.d.ts.map +1 -0
- package/dist/components/app-shell/index.d.ts +2 -0
- package/dist/components/app-shell/index.d.ts.map +1 -0
- package/dist/components/app-shell/index.js +243 -0
- package/dist/components/app-shell/index.js.map +1 -0
- package/dist/components/autocomplete/autocomplete.d.ts +70 -0
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -0
- package/dist/components/autocomplete/index.d.ts +3 -0
- package/dist/components/autocomplete/index.d.ts.map +1 -0
- package/dist/components/autocomplete/index.js +149 -0
- package/dist/components/autocomplete/index.js.map +1 -0
- package/dist/components/avatar/avatar.d.ts +105 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/avatar/index.js +211 -0
- package/dist/components/avatar/index.js.map +1 -0
- package/dist/components/badge/badge.d.ts +48 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/badge/index.js +102 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +64 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.js +203 -0
- package/dist/components/breadcrumb/index.js.map +1 -0
- package/dist/components/button/button.d.ts +72 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +9 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button-group/button-group.d.ts +49 -0
- package/dist/components/button-group/button-group.d.ts.map +1 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/button-group/index.d.ts.map +1 -0
- package/dist/components/button-group/index.js +5 -0
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/components/button-multi-select/button-multi-select.d.ts +39 -0
- package/dist/components/button-multi-select/button-multi-select.d.ts.map +1 -0
- package/dist/components/button-multi-select/index.d.ts +5 -0
- package/dist/components/button-multi-select/index.d.ts.map +1 -0
- package/dist/components/button-multi-select/index.js +45 -0
- package/dist/components/button-multi-select/index.js.map +1 -0
- package/dist/components/button-select/button-select-control.d.ts +56 -0
- package/dist/components/button-select/button-select-control.d.ts.map +1 -0
- package/dist/components/button-select/button-select-data.d.ts +53 -0
- package/dist/components/button-select/button-select-data.d.ts.map +1 -0
- package/dist/components/button-select/button-select-items.d.ts +72 -0
- package/dist/components/button-select/button-select-items.d.ts.map +1 -0
- package/dist/components/button-select/button-select.d.ts +98 -0
- package/dist/components/button-select/button-select.d.ts.map +1 -0
- package/dist/components/button-select/index.d.ts +5 -0
- package/dist/components/button-select/index.d.ts.map +1 -0
- package/dist/components/button-select/index.js +45 -0
- package/dist/components/button-select/index.js.map +1 -0
- package/dist/components/calendar/calendar-body.d.ts +48 -0
- package/dist/components/calendar/calendar-body.d.ts.map +1 -0
- package/dist/components/calendar/calendar.d.ts +88 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -0
- package/dist/components/calendar/index.d.ts +4 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/calendar/index.js +11 -0
- package/dist/components/calendar/index.js.map +1 -0
- package/dist/components/card/card.d.ts +69 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/index.d.ts.map +1 -0
- package/dist/components/card/index.js +6 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/chart/chart.d.ts +103 -0
- package/dist/components/chart/chart.d.ts.map +1 -0
- package/dist/components/chart/index.d.ts +2 -0
- package/dist/components/chart/index.d.ts.map +1 -0
- package/dist/components/chart/index.js +70 -0
- package/dist/components/chart/index.js.map +1 -0
- package/dist/components/chart/styles.css +50 -0
- package/dist/components/checkbox/checkbox.d.ts +74 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/control.d.ts +28 -0
- package/dist/components/checkbox/control.d.ts.map +1 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/index.js +10 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/choice-card-group/choice-card-group.d.ts +148 -0
- package/dist/components/choice-card-group/choice-card-group.d.ts.map +1 -0
- package/dist/components/choice-card-group/index.d.ts +2 -0
- package/dist/components/choice-card-group/index.d.ts.map +1 -0
- package/dist/components/choice-card-group/index.js +280 -0
- package/dist/components/choice-card-group/index.js.map +1 -0
- package/dist/components/circular-progress/circular-progress.d.ts +49 -0
- package/dist/components/circular-progress/circular-progress.d.ts.map +1 -0
- package/dist/components/circular-progress/index.d.ts +2 -0
- package/dist/components/circular-progress/index.d.ts.map +1 -0
- package/dist/components/circular-progress/index.js +133 -0
- package/dist/components/circular-progress/index.js.map +1 -0
- package/dist/components/clipboard/clipboard.d.ts +95 -0
- package/dist/components/clipboard/clipboard.d.ts.map +1 -0
- package/dist/components/clipboard/copy.d.ts +67 -0
- package/dist/components/clipboard/copy.d.ts.map +1 -0
- package/dist/components/clipboard/index.d.ts +3 -0
- package/dist/components/clipboard/index.d.ts.map +1 -0
- package/dist/components/clipboard/index.js +86 -0
- package/dist/components/clipboard/index.js.map +1 -0
- package/dist/components/code/code.d.ts +37 -0
- package/dist/components/code/code.d.ts.map +1 -0
- package/dist/components/code/index.d.ts +2 -0
- package/dist/components/code/index.d.ts.map +1 -0
- package/dist/components/code/index.js +28 -0
- package/dist/components/code/index.js.map +1 -0
- package/dist/components/code-block/chrome.d.ts +77 -0
- package/dist/components/code-block/chrome.d.ts.map +1 -0
- package/dist/components/code-block/chrome.js +15 -0
- package/dist/components/code-block/chrome.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +99 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -0
- package/dist/components/code-block/diff.d.ts +79 -0
- package/dist/components/code-block/diff.d.ts.map +1 -0
- package/dist/components/code-block/diff.js +23 -0
- package/dist/components/code-block/diff.js.map +1 -0
- package/dist/components/code-block/gutters.d.ts +100 -0
- package/dist/components/code-block/gutters.d.ts.map +1 -0
- package/dist/components/code-block/highlighter.d.ts +84 -0
- package/dist/components/code-block/highlighter.d.ts.map +1 -0
- package/dist/components/code-block/index.d.ts +23 -0
- package/dist/components/code-block/index.d.ts.map +1 -0
- package/dist/components/code-block/index.js +463 -0
- package/dist/components/code-block/index.js.map +1 -0
- package/dist/components/code-block/notation.d.ts +126 -0
- package/dist/components/code-block/notation.d.ts.map +1 -0
- package/dist/components/code-block/presets.d.ts +23 -0
- package/dist/components/code-block/presets.d.ts.map +1 -0
- package/dist/components/code-block/static.d.ts +65 -0
- package/dist/components/code-block/static.d.ts.map +1 -0
- package/dist/components/code-block/static.js +380 -0
- package/dist/components/code-block/static.js.map +1 -0
- package/dist/components/code-block/styles.css +198 -0
- package/dist/components/collapse/collapse.d.ts +50 -0
- package/dist/components/collapse/collapse.d.ts.map +1 -0
- package/dist/components/collapse/index.d.ts +2 -0
- package/dist/components/collapse/index.d.ts.map +1 -0
- package/dist/components/collapse/index.js +5 -0
- package/dist/components/collapse/index.js.map +1 -0
- package/dist/components/combobox/combobox.d.ts +78 -0
- package/dist/components/combobox/combobox.d.ts.map +1 -0
- package/dist/components/combobox/index.d.ts +3 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/combobox/index.js +15 -0
- package/dist/components/combobox/index.js.map +1 -0
- package/dist/components/combobox-list/combobox-list.d.ts +77 -0
- package/dist/components/combobox-list/combobox-list.d.ts.map +1 -0
- package/dist/components/combobox-list/index.d.ts +2 -0
- package/dist/components/combobox-list/index.d.ts.map +1 -0
- package/dist/components/combobox-list/index.js +16 -0
- package/dist/components/combobox-list/index.js.map +1 -0
- package/dist/components/container/container.d.ts +18 -0
- package/dist/components/container/container.d.ts.map +1 -0
- package/dist/components/container/index.d.ts +2 -0
- package/dist/components/container/index.d.ts.map +1 -0
- package/dist/components/container/index.js +40 -0
- package/dist/components/container/index.js.map +1 -0
- package/dist/components/data-table/data-table-features.d.ts +80 -0
- package/dist/components/data-table/data-table-features.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/data-table-date-filter.d.ts +53 -0
- package/dist/components/data-table/data-table-filter/data-table-date-filter.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/data-table-filter-fns.d.ts +18 -0
- package/dist/components/data-table/data-table-filter/data-table-filter-fns.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts +7 -0
- package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/data-table-select-filter.d.ts +15 -0
- package/dist/components/data-table/data-table-filter/data-table-select-filter.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/data-table-text-filter.d.ts +7 -0
- package/dist/components/data-table/data-table-filter/data-table-text-filter.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/index.d.ts +15 -0
- package/dist/components/data-table/data-table-filter/index.d.ts.map +1 -0
- package/dist/components/data-table/data-table-filter/utils.d.ts +52 -0
- package/dist/components/data-table/data-table-filter/utils.d.ts.map +1 -0
- package/dist/components/data-table/data-table-header-cell.d.ts +65 -0
- package/dist/components/data-table/data-table-header-cell.d.ts.map +1 -0
- package/dist/components/data-table/data-table-meta.d.ts +103 -0
- package/dist/components/data-table/data-table-meta.d.ts.map +1 -0
- package/dist/components/data-table/data-table-pagination.d.ts +56 -0
- package/dist/components/data-table/data-table-pagination.d.ts.map +1 -0
- package/dist/components/data-table/data-table-placeholder.d.ts +18 -0
- package/dist/components/data-table/data-table-placeholder.d.ts.map +1 -0
- package/dist/components/data-table/data-table-schema.d.ts +45 -0
- package/dist/components/data-table/data-table-schema.d.ts.map +1 -0
- package/dist/components/data-table/data-table-skeleton.d.ts +10 -0
- package/dist/components/data-table/data-table-skeleton.d.ts.map +1 -0
- package/dist/components/data-table/data-table-stack.d.ts +48 -0
- package/dist/components/data-table/data-table-stack.d.ts.map +1 -0
- package/dist/components/data-table/data-table-state.d.ts +10 -0
- package/dist/components/data-table/data-table-state.d.ts.map +1 -0
- package/dist/components/data-table/data-table-toolbar.d.ts +21 -0
- package/dist/components/data-table/data-table-toolbar.d.ts.map +1 -0
- package/dist/components/data-table/data-table.d.ts +194 -0
- package/dist/components/data-table/data-table.d.ts.map +1 -0
- package/dist/components/data-table/index.d.ts +14 -0
- package/dist/components/data-table/index.d.ts.map +1 -0
- package/dist/components/data-table/index.js +1603 -0
- package/dist/components/data-table/index.js.map +1 -0
- package/dist/components/date-picker/aliases.d.ts +11 -0
- package/dist/components/date-picker/aliases.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.d.ts +204 -0
- package/dist/components/date-picker/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker/date-time-text.d.ts +32 -0
- package/dist/components/date-picker/date-time-text.d.ts.map +1 -0
- package/dist/components/date-picker/index.d.ts +7 -0
- package/dist/components/date-picker/index.d.ts.map +1 -0
- package/dist/components/date-picker/index.js +48 -0
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/divider/divider.d.ts +79 -0
- package/dist/components/divider/divider.d.ts.map +1 -0
- package/dist/components/divider/index.d.ts +2 -0
- package/dist/components/divider/index.d.ts.map +1 -0
- package/dist/components/divider/index.js +5 -0
- package/dist/components/divider/index.js.map +1 -0
- package/dist/components/drawer/drawer.d.ts +103 -0
- package/dist/components/drawer/drawer.d.ts.map +1 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.d.ts.map +1 -0
- package/dist/components/drawer/index.js +13 -0
- package/dist/components/drawer/index.js.map +1 -0
- package/dist/components/field/field.d.ts +79 -0
- package/dist/components/field/field.d.ts.map +1 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/field/index.d.ts.map +1 -0
- package/dist/components/field/index.js +6 -0
- package/dist/components/field/index.js.map +1 -0
- package/dist/components/file-upload/file-upload.d.ts +68 -0
- package/dist/components/file-upload/file-upload.d.ts.map +1 -0
- package/dist/components/file-upload/index.d.ts +2 -0
- package/dist/components/file-upload/index.d.ts.map +1 -0
- package/dist/components/file-upload/index.js +189 -0
- package/dist/components/file-upload/index.js.map +1 -0
- package/dist/components/flex/flex.d.ts +25 -0
- package/dist/components/flex/flex.d.ts.map +1 -0
- package/dist/components/flex/index.d.ts +2 -0
- package/dist/components/flex/index.d.ts.map +1 -0
- package/dist/components/flex/index.js +5 -0
- package/dist/components/flex/index.js.map +1 -0
- package/dist/components/grid/grid.d.ts +21 -0
- package/dist/components/grid/grid.d.ts.map +1 -0
- package/dist/components/grid/index.d.ts +2 -0
- package/dist/components/grid/index.d.ts.map +1 -0
- package/dist/components/grid/index.js +44 -0
- package/dist/components/grid/index.js.map +1 -0
- package/dist/components/hover-card/hover-card.d.ts +122 -0
- package/dist/components/hover-card/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card/index.d.ts +2 -0
- package/dist/components/hover-card/index.d.ts.map +1 -0
- package/dist/components/hover-card/index.js +157 -0
- package/dist/components/hover-card/index.js.map +1 -0
- package/dist/components/indicator/index.d.ts +2 -0
- package/dist/components/indicator/index.d.ts.map +1 -0
- package/dist/components/indicator/index.js +152 -0
- package/dist/components/indicator/index.js.map +1 -0
- package/dist/components/indicator/indicator.d.ts +69 -0
- package/dist/components/indicator/indicator.d.ts.map +1 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.js +7 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/input.d.ts +116 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/kbd/index.d.ts +2 -0
- package/dist/components/kbd/index.d.ts.map +1 -0
- package/dist/components/kbd/index.js +65 -0
- package/dist/components/kbd/index.js.map +1 -0
- package/dist/components/kbd/kbd.d.ts +43 -0
- package/dist/components/kbd/kbd.d.ts.map +1 -0
- package/dist/components/mark/index.d.ts +2 -0
- package/dist/components/mark/index.d.ts.map +1 -0
- package/dist/components/mark/index.js +5 -0
- package/dist/components/mark/index.js.map +1 -0
- package/dist/components/mark/mark.d.ts +50 -0
- package/dist/components/mark/mark.d.ts.map +1 -0
- package/dist/components/menu/index.d.ts +3 -0
- package/dist/components/menu/index.d.ts.map +1 -0
- package/dist/components/menu/index.js +88 -0
- package/dist/components/menu/index.js.map +1 -0
- package/dist/components/menu/menu-data.d.ts +119 -0
- package/dist/components/menu/menu-data.d.ts.map +1 -0
- package/dist/components/menu/menu.d.ts +123 -0
- package/dist/components/menu/menu.d.ts.map +1 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.d.ts.map +1 -0
- package/dist/components/modal/index.js +12 -0
- package/dist/components/modal/index.js.map +1 -0
- package/dist/components/modal/modal.d.ts +100 -0
- package/dist/components/modal/modal.d.ts.map +1 -0
- package/dist/components/multi-combobox-list/index.d.ts +2 -0
- package/dist/components/multi-combobox-list/index.d.ts.map +1 -0
- package/dist/components/multi-combobox-list/index.js +16 -0
- package/dist/components/multi-combobox-list/index.js.map +1 -0
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +83 -0
- package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -0
- package/dist/components/multi-select/index.d.ts +3 -0
- package/dist/components/multi-select/index.d.ts.map +1 -0
- package/dist/components/multi-select/index.js +203 -0
- package/dist/components/multi-select/index.js.map +1 -0
- package/dist/components/multi-select/multi-select.d.ts +83 -0
- package/dist/components/multi-select/multi-select.d.ts.map +1 -0
- package/dist/components/nav-link/index.d.ts +3 -0
- package/dist/components/nav-link/index.d.ts.map +1 -0
- package/dist/components/nav-link/index.js +11 -0
- package/dist/components/nav-link/index.js.map +1 -0
- package/dist/components/nav-link/nav-link.d.ts +40 -0
- package/dist/components/nav-link/nav-link.d.ts.map +1 -0
- package/dist/components/nav-link/navigation.d.ts +45 -0
- package/dist/components/nav-link/navigation.d.ts.map +1 -0
- package/dist/components/nav-link/tanstack.d.ts +38 -0
- package/dist/components/nav-link/tanstack.d.ts.map +1 -0
- package/dist/components/nav-link/tanstack.js +21 -0
- package/dist/components/nav-link/tanstack.js.map +1 -0
- package/dist/components/notification/create-notifier.d.ts +117 -0
- package/dist/components/notification/create-notifier.d.ts.map +1 -0
- package/dist/components/notification/index.d.ts +5 -0
- package/dist/components/notification/index.d.ts.map +1 -0
- package/dist/components/notification/index.js +388 -0
- package/dist/components/notification/index.js.map +1 -0
- package/dist/components/notification/notification.d.ts +124 -0
- package/dist/components/notification/notification.d.ts.map +1 -0
- package/dist/components/notification/store.d.ts +42 -0
- package/dist/components/notification/store.d.ts.map +1 -0
- package/dist/components/notification/types.d.ts +62 -0
- package/dist/components/notification/types.d.ts.map +1 -0
- package/dist/components/number-input/index.d.ts +2 -0
- package/dist/components/number-input/index.d.ts.map +1 -0
- package/dist/components/number-input/index.js +16 -0
- package/dist/components/number-input/index.js.map +1 -0
- package/dist/components/number-input/number-input.d.ts +105 -0
- package/dist/components/number-input/number-input.d.ts.map +1 -0
- package/dist/components/overlays/create-overlays.d.ts +77 -0
- package/dist/components/overlays/create-overlays.d.ts.map +1 -0
- package/dist/components/overlays/index.d.ts +4 -0
- package/dist/components/overlays/index.d.ts.map +1 -0
- package/dist/components/overlays/index.js +332 -0
- package/dist/components/overlays/index.js.map +1 -0
- package/dist/components/overlays/renderer.d.ts +30 -0
- package/dist/components/overlays/renderer.d.ts.map +1 -0
- package/dist/components/overlays/store.d.ts +33 -0
- package/dist/components/overlays/store.d.ts.map +1 -0
- package/dist/components/overlays/types.d.ts +119 -0
- package/dist/components/overlays/types.d.ts.map +1 -0
- package/dist/components/password-input/index.d.ts +2 -0
- package/dist/components/password-input/index.d.ts.map +1 -0
- package/dist/components/password-input/index.js +125 -0
- package/dist/components/password-input/index.js.map +1 -0
- package/dist/components/password-input/password-input.d.ts +65 -0
- package/dist/components/password-input/password-input.d.ts.map +1 -0
- package/dist/components/pill/index.d.ts +2 -0
- package/dist/components/pill/index.d.ts.map +1 -0
- package/dist/components/pill/index.js +8 -0
- package/dist/components/pill/index.js.map +1 -0
- package/dist/components/pill/pill.d.ts +69 -0
- package/dist/components/pill/pill.d.ts.map +1 -0
- package/dist/components/pills-input/index.d.ts +2 -0
- package/dist/components/pills-input/index.d.ts.map +1 -0
- package/dist/components/pills-input/index.js +10 -0
- package/dist/components/pills-input/index.js.map +1 -0
- package/dist/components/pills-input/pills-input.d.ts +146 -0
- package/dist/components/pills-input/pills-input.d.ts.map +1 -0
- package/dist/components/pin-input/index.d.ts +2 -0
- package/dist/components/pin-input/index.d.ts.map +1 -0
- package/dist/components/pin-input/index.js +107 -0
- package/dist/components/pin-input/index.js.map +1 -0
- package/dist/components/pin-input/pin-input.d.ts +80 -0
- package/dist/components/pin-input/pin-input.d.ts.map +1 -0
- package/dist/components/popover/icons.d.ts +24 -0
- package/dist/components/popover/icons.d.ts.map +1 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.d.ts.map +1 -0
- package/dist/components/popover/index.js +10 -0
- package/dist/components/popover/index.js.map +1 -0
- package/dist/components/popover/popover.d.ts +190 -0
- package/dist/components/popover/popover.d.ts.map +1 -0
- package/dist/components/progress/index.d.ts +2 -0
- package/dist/components/progress/index.d.ts.map +1 -0
- package/dist/components/progress/index.js +111 -0
- package/dist/components/progress/index.js.map +1 -0
- package/dist/components/progress/progress.d.ts +47 -0
- package/dist/components/progress/progress.d.ts.map +1 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/index.d.ts.map +1 -0
- package/dist/components/radio-group/index.js +104 -0
- package/dist/components/radio-group/index.js.map +1 -0
- package/dist/components/radio-group/radio-group.d.ts +86 -0
- package/dist/components/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/rating/icons.d.ts +19 -0
- package/dist/components/rating/icons.d.ts.map +1 -0
- package/dist/components/rating/index.d.ts +2 -0
- package/dist/components/rating/index.d.ts.map +1 -0
- package/dist/components/rating/index.js +194 -0
- package/dist/components/rating/index.js.map +1 -0
- package/dist/components/rating/rating.d.ts +119 -0
- package/dist/components/rating/rating.d.ts.map +1 -0
- package/dist/components/schedule/index.d.ts +98 -0
- package/dist/components/schedule/index.d.ts.map +1 -0
- package/dist/components/schedule/index.js +6582 -0
- package/dist/components/schedule/index.js.map +1 -0
- package/dist/components/schedule/now-cursor-line.d.ts +97 -0
- package/dist/components/schedule/now-cursor-line.d.ts.map +1 -0
- package/dist/components/schedule/schedule-agenda-list.d.ts +55 -0
- package/dist/components/schedule/schedule-agenda-list.d.ts.map +1 -0
- package/dist/components/schedule/schedule-agenda-view.d.ts +48 -0
- package/dist/components/schedule/schedule-agenda-view.d.ts.map +1 -0
- package/dist/components/schedule/schedule-all-day-row.d.ts +100 -0
- package/dist/components/schedule/schedule-all-day-row.d.ts.map +1 -0
- package/dist/components/schedule/schedule-create-draft.d.ts +29 -0
- package/dist/components/schedule/schedule-create-draft.d.ts.map +1 -0
- package/dist/components/schedule/schedule-dates.d.ts +359 -0
- package/dist/components/schedule/schedule-dates.d.ts.map +1 -0
- package/dist/components/schedule/schedule-day-view.d.ts +24 -0
- package/dist/components/schedule/schedule-day-view.d.ts.map +1 -0
- package/dist/components/schedule/schedule-days-view.d.ts +60 -0
- package/dist/components/schedule/schedule-days-view.d.ts.map +1 -0
- package/dist/components/schedule/schedule-disabled-overlay.d.ts +34 -0
- package/dist/components/schedule/schedule-disabled-overlay.d.ts.map +1 -0
- package/dist/components/schedule/schedule-drag-ghost.d.ts +24 -0
- package/dist/components/schedule/schedule-drag-ghost.d.ts.map +1 -0
- package/dist/components/schedule/schedule-event-chip.d.ts +101 -0
- package/dist/components/schedule/schedule-event-chip.d.ts.map +1 -0
- package/dist/components/schedule/schedule-event-details.d.ts +37 -0
- package/dist/components/schedule/schedule-event-details.d.ts.map +1 -0
- package/dist/components/schedule/schedule-event-list-popover-content.d.ts +41 -0
- package/dist/components/schedule/schedule-event-list-popover-content.d.ts.map +1 -0
- package/dist/components/schedule/schedule-event-styles.d.ts +58 -0
- package/dist/components/schedule/schedule-event-styles.d.ts.map +1 -0
- package/dist/components/schedule/schedule-geometry.d.ts +291 -0
- package/dist/components/schedule/schedule-geometry.d.ts.map +1 -0
- package/dist/components/schedule/schedule-grid-gesture.d.ts +288 -0
- package/dist/components/schedule/schedule-grid-gesture.d.ts.map +1 -0
- package/dist/components/schedule/schedule-layout.d.ts +83 -0
- package/dist/components/schedule/schedule-layout.d.ts.map +1 -0
- package/dist/components/schedule/schedule-month-view.d.ts +44 -0
- package/dist/components/schedule/schedule-month-view.d.ts.map +1 -0
- package/dist/components/schedule/schedule-next-up-grouping.d.ts +37 -0
- package/dist/components/schedule/schedule-next-up-grouping.d.ts.map +1 -0
- package/dist/components/schedule/schedule-next-up.d.ts +79 -0
- package/dist/components/schedule/schedule-next-up.d.ts.map +1 -0
- package/dist/components/schedule/schedule-overflow-chip.d.ts +45 -0
- package/dist/components/schedule/schedule-overflow-chip.d.ts.map +1 -0
- package/dist/components/schedule/schedule-overflow-popover.d.ts +57 -0
- package/dist/components/schedule/schedule-overflow-popover.d.ts.map +1 -0
- package/dist/components/schedule/schedule-segments.d.ts +89 -0
- package/dist/components/schedule/schedule-segments.d.ts.map +1 -0
- package/dist/components/schedule/schedule-snap.d.ts +204 -0
- package/dist/components/schedule/schedule-snap.d.ts.map +1 -0
- package/dist/components/schedule/schedule-timed-grid.d.ts +78 -0
- package/dist/components/schedule/schedule-timed-grid.d.ts.map +1 -0
- package/dist/components/schedule/schedule-toolbar.d.ts +107 -0
- package/dist/components/schedule/schedule-toolbar.d.ts.map +1 -0
- package/dist/components/schedule/schedule-types.d.ts +841 -0
- package/dist/components/schedule/schedule-types.d.ts.map +1 -0
- package/dist/components/schedule/schedule-views.d.ts +197 -0
- package/dist/components/schedule/schedule-views.d.ts.map +1 -0
- package/dist/components/schedule/schedule-week-view.d.ts +19 -0
- package/dist/components/schedule/schedule-week-view.d.ts.map +1 -0
- package/dist/components/schedule/schedule-year-view.d.ts +38 -0
- package/dist/components/schedule/schedule-year-view.d.ts.map +1 -0
- package/dist/components/schedule/schedule.d.ts +163 -0
- package/dist/components/schedule/schedule.d.ts.map +1 -0
- package/dist/components/schedule/use-event-create.d.ts +54 -0
- package/dist/components/schedule/use-event-create.d.ts.map +1 -0
- package/dist/components/schedule/use-event-drag.d.ts +95 -0
- package/dist/components/schedule/use-event-drag.d.ts.map +1 -0
- package/dist/components/schedule/use-event-resize.d.ts +63 -0
- package/dist/components/schedule/use-event-resize.d.ts.map +1 -0
- package/dist/components/schedule/use-schedule-selection.d.ts +74 -0
- package/dist/components/schedule/use-schedule-selection.d.ts.map +1 -0
- package/dist/components/schedule/use-schedule.d.ts +78 -0
- package/dist/components/schedule/use-schedule.d.ts.map +1 -0
- package/dist/components/segment-group/index.d.ts +2 -0
- package/dist/components/segment-group/index.d.ts.map +1 -0
- package/dist/components/segment-group/index.js +10 -0
- package/dist/components/segment-group/index.js.map +1 -0
- package/dist/components/segment-group/segment-group.d.ts +187 -0
- package/dist/components/segment-group/segment-group.d.ts.map +1 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/index.js +17 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/select/select.d.ts +83 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.d.ts.map +1 -0
- package/dist/components/skeleton/index.js +5 -0
- package/dist/components/skeleton/index.js.map +1 -0
- package/dist/components/skeleton/skeleton.d.ts +83 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/slider/index.d.ts.map +1 -0
- package/dist/components/slider/index.js +258 -0
- package/dist/components/slider/index.js.map +1 -0
- package/dist/components/slider/slider.d.ts +90 -0
- package/dist/components/slider/slider.d.ts.map +1 -0
- package/dist/components/slider/sliderThumb.d.ts +1 -0
- package/dist/components/slider/sliderThumb.d.ts.map +1 -0
- package/dist/components/spinner/index.d.ts +2 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/spinner/index.js +5 -0
- package/dist/components/spinner/index.js.map +1 -0
- package/dist/components/spinner/spinner.d.ts +61 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.d.ts.map +1 -0
- package/dist/components/switch/index.js +140 -0
- package/dist/components/switch/index.js.map +1 -0
- package/dist/components/switch/switch.d.ts +48 -0
- package/dist/components/switch/switch.d.ts.map +1 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/table/index.js +5 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/table/table.d.ts +113 -0
- package/dist/components/table/table.d.ts.map +1 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/index.js +8 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/tabs/tabs-data.d.ts +67 -0
- package/dist/components/tabs/tabs-data.d.ts.map +1 -0
- package/dist/components/tabs/tabs.d.ts +96 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tags-input/index.d.ts +2 -0
- package/dist/components/tags-input/index.d.ts.map +1 -0
- package/dist/components/tags-input/index.js +203 -0
- package/dist/components/tags-input/index.js.map +1 -0
- package/dist/components/tags-input/tags-input.d.ts +68 -0
- package/dist/components/tags-input/tags-input.d.ts.map +1 -0
- package/dist/components/text/index.d.ts +2 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/components/text/index.js +6 -0
- package/dist/components/text/index.js.map +1 -0
- package/dist/components/text/text.d.ts +50 -0
- package/dist/components/text/text.d.ts.map +1 -0
- package/dist/components/text-input/index.d.ts +2 -0
- package/dist/components/text-input/index.d.ts.map +1 -0
- package/dist/components/text-input/index.js +34 -0
- package/dist/components/text-input/index.js.map +1 -0
- package/dist/components/text-input/text-input.d.ts +56 -0
- package/dist/components/text-input/text-input.d.ts.map +1 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/index.d.ts.map +1 -0
- package/dist/components/textarea/index.js +116 -0
- package/dist/components/textarea/index.js.map +1 -0
- package/dist/components/textarea/textarea.d.ts +48 -0
- package/dist/components/textarea/textarea.d.ts.map +1 -0
- package/dist/components/theme-icon/index.d.ts +2 -0
- package/dist/components/theme-icon/index.d.ts.map +1 -0
- package/dist/components/theme-icon/index.js +6 -0
- package/dist/components/theme-icon/index.js.map +1 -0
- package/dist/components/theme-icon/theme-icon.d.ts +34 -0
- package/dist/components/theme-icon/theme-icon.d.ts.map +1 -0
- package/dist/components/theme-script/index.d.ts +2 -0
- package/dist/components/theme-script/index.d.ts.map +1 -0
- package/dist/components/theme-script/index.js +29 -0
- package/dist/components/theme-script/index.js.map +1 -0
- package/dist/components/theme-script/theme-script.d.ts +41 -0
- package/dist/components/theme-script/theme-script.d.ts.map +1 -0
- package/dist/components/time-input/hour-cycle.d.ts +32 -0
- package/dist/components/time-input/hour-cycle.d.ts.map +1 -0
- package/dist/components/time-input/index.d.ts +3 -0
- package/dist/components/time-input/index.d.ts.map +1 -0
- package/dist/components/time-input/index.js +125 -0
- package/dist/components/time-input/index.js.map +1 -0
- package/dist/components/time-input/time-input.d.ts +63 -0
- package/dist/components/time-input/time-input.d.ts.map +1 -0
- package/dist/components/time-input/time-row.d.ts +72 -0
- package/dist/components/time-input/time-row.d.ts.map +1 -0
- package/dist/components/timeline/index.d.ts +2 -0
- package/dist/components/timeline/index.d.ts.map +1 -0
- package/dist/components/timeline/index.js +372 -0
- package/dist/components/timeline/index.js.map +1 -0
- package/dist/components/timeline/timeline.d.ts +194 -0
- package/dist/components/timeline/timeline.d.ts.map +1 -0
- package/dist/components/title/index.d.ts +2 -0
- package/dist/components/title/index.d.ts.map +1 -0
- package/dist/components/title/index.js +6 -0
- package/dist/components/title/index.js.map +1 -0
- package/dist/components/title/title.d.ts +47 -0
- package/dist/components/title/title.d.ts.map +1 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/index.js +10 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +70 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tree-multi-select/index.d.ts +3 -0
- package/dist/components/tree-multi-select/index.d.ts.map +1 -0
- package/dist/components/tree-multi-select/index.js +424 -0
- package/dist/components/tree-multi-select/index.js.map +1 -0
- package/dist/components/tree-multi-select/tree-multi-select.d.ts +72 -0
- package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -0
- package/dist/components/tree-select/index.d.ts +3 -0
- package/dist/components/tree-select/index.d.ts.map +1 -0
- package/dist/components/tree-select/index.js +425 -0
- package/dist/components/tree-select/index.js.map +1 -0
- package/dist/components/tree-select/tree-select.d.ts +68 -0
- package/dist/components/tree-select/tree-select.d.ts.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +269 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/align.d.ts +7 -0
- package/dist/lib/align.d.ts.map +1 -0
- package/dist/lib/available-if.d.ts +114 -0
- package/dist/lib/available-if.d.ts.map +1 -0
- package/dist/lib/brand.d.ts +22 -0
- package/dist/lib/brand.d.ts.map +1 -0
- package/dist/lib/cn.d.ts +14 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +3 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/lib/colors.d.ts +14 -0
- package/dist/lib/colors.d.ts.map +1 -0
- package/dist/lib/control-open.d.ts +28 -0
- package/dist/lib/control-open.d.ts.map +1 -0
- package/dist/lib/date-predicates.d.ts +28 -0
- package/dist/lib/date-predicates.d.ts.map +1 -0
- package/dist/lib/date-value.d.ts +45 -0
- package/dist/lib/date-value.d.ts.map +1 -0
- package/dist/lib/dev-warn.d.ts +2 -0
- package/dist/lib/dev-warn.d.ts.map +1 -0
- package/dist/lib/focus-styles.d.ts +102 -0
- package/dist/lib/focus-styles.d.ts.map +1 -0
- package/dist/lib/form-control.d.ts +72 -0
- package/dist/lib/form-control.d.ts.map +1 -0
- package/dist/lib/gradient.d.ts +31 -0
- package/dist/lib/gradient.d.ts.map +1 -0
- package/dist/lib/intl.d.ts +77 -0
- package/dist/lib/intl.d.ts.map +1 -0
- package/dist/lib/link-component.d.ts +13 -0
- package/dist/lib/link-component.d.ts.map +1 -0
- package/dist/lib/merge-refs.d.ts +12 -0
- package/dist/lib/merge-refs.d.ts.map +1 -0
- package/dist/lib/overlay-container.d.ts +14 -0
- package/dist/lib/overlay-container.d.ts.map +1 -0
- package/dist/lib/overlay-layer.d.ts +51 -0
- package/dist/lib/overlay-layer.d.ts.map +1 -0
- package/dist/lib/placement.d.ts +16 -0
- package/dist/lib/placement.d.ts.map +1 -0
- package/dist/lib/props.d.ts +40 -0
- package/dist/lib/props.d.ts.map +1 -0
- package/dist/lib/required-if.d.ts +46 -0
- package/dist/lib/required-if.d.ts.map +1 -0
- package/dist/lib/schedule-predicates.d.ts +72 -0
- package/dist/lib/schedule-predicates.d.ts.map +1 -0
- package/dist/lib/select-data.d.ts +135 -0
- package/dist/lib/select-data.d.ts.map +1 -0
- package/dist/lib/sizes.d.ts +20 -0
- package/dist/lib/sizes.d.ts.map +1 -0
- package/dist/lib/test-id.d.ts +30 -0
- package/dist/lib/test-id.d.ts.map +1 -0
- package/dist/lib/theme-init-runtime.d.ts +26 -0
- package/dist/lib/theme-init-runtime.d.ts.map +1 -0
- package/dist/lib/theme.d.ts +93 -0
- package/dist/lib/theme.d.ts.map +1 -0
- package/dist/lib/tree-data.d.ts +99 -0
- package/dist/lib/tree-data.d.ts.map +1 -0
- package/dist/lib/typography-size.d.ts +49 -0
- package/dist/lib/typography-size.d.ts.map +1 -0
- package/dist/lib/use-container-query.d.ts +19 -0
- package/dist/lib/use-container-query.d.ts.map +1 -0
- package/dist/lib/use-disclosure.d.ts +35 -0
- package/dist/lib/use-disclosure.d.ts.map +1 -0
- package/dist/lib/use-isomorphic-layout-effect.d.ts +12 -0
- package/dist/lib/use-isomorphic-layout-effect.d.ts.map +1 -0
- package/dist/lib/use-local-storage.d.ts +45 -0
- package/dist/lib/use-local-storage.d.ts.map +1 -0
- package/dist/lib/use-logger.d.ts +2 -0
- package/dist/lib/use-logger.d.ts.map +1 -0
- package/dist/lib/use-media-query.d.ts +11 -0
- package/dist/lib/use-media-query.d.ts.map +1 -0
- package/dist/lib/use-now.d.ts +7 -0
- package/dist/lib/use-now.d.ts.map +1 -0
- package/dist/lib/use-theme.d.ts +101 -0
- package/dist/lib/use-theme.d.ts.map +1 -0
- package/dist/lib/use-uncontrolled.d.ts +45 -0
- package/dist/lib/use-uncontrolled.d.ts.map +1 -0
- package/dist/styles.css +17 -0
- package/dist/test-setup.d.ts +2 -0
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/theme-init-script.d.ts +2 -0
- package/dist/theme-init-script.d.ts.map +1 -0
- package/dist/theme-init.js +2 -0
- package/dist/theme-init.js.map +1 -0
- package/dist/theme.css +1275 -0
- package/package.json +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 +125 -0
- package/src/components/alert/alert.tsx +158 -0
- package/src/components/alert/index.ts +3 -0
- package/src/components/ambient-background/ambient-background.test.tsx +64 -0
- package/src/components/ambient-background/ambient-background.tsx +76 -0
- package/src/components/ambient-background/index.ts +1 -0
- package/src/components/app-shell/app-shell.test.tsx +271 -0
- package/src/components/app-shell/app-shell.tsx +492 -0
- package/src/components/app-shell/index.ts +17 -0
- package/src/components/autocomplete/autocomplete.test.tsx +120 -0
- package/src/components/autocomplete/autocomplete.tsx +249 -0
- package/src/components/autocomplete/index.ts +11 -0
- package/src/components/avatar/avatar.test.tsx +345 -0
- package/src/components/avatar/avatar.tsx +456 -0
- package/src/components/avatar/index.ts +12 -0
- package/src/components/badge/badge.test.tsx +51 -0
- package/src/components/badge/badge.tsx +148 -0
- package/src/components/badge/index.ts +6 -0
- package/src/components/breadcrumb/breadcrumb.test.tsx +238 -0
- package/src/components/breadcrumb/breadcrumb.tsx +348 -0
- package/src/components/breadcrumb/index.ts +9 -0
- package/src/components/button/button.test.tsx +87 -0
- package/src/components/button/button.tsx +253 -0
- package/src/components/button/index.ts +12 -0
- package/src/components/button-group/button-group.test.tsx +168 -0
- package/src/components/button-group/button-group.tsx +121 -0
- package/src/components/button-group/index.ts +1 -0
- package/src/components/button-multi-select/button-multi-select.test.tsx +146 -0
- package/src/components/button-multi-select/button-multi-select.tsx +76 -0
- package/src/components/button-multi-select/index.ts +17 -0
- package/src/components/button-select/button-select-control.tsx +153 -0
- package/src/components/button-select/button-select-data.tsx +96 -0
- package/src/components/button-select/button-select-items.ts +103 -0
- package/src/components/button-select/button-select.test.tsx +239 -0
- package/src/components/button-select/button-select.tsx +323 -0
- package/src/components/button-select/index.ts +14 -0
- package/src/components/calendar/calendar-body.tsx +403 -0
- package/src/components/calendar/calendar.test.tsx +278 -0
- package/src/components/calendar/calendar.tsx +220 -0
- package/src/components/calendar/index.ts +10 -0
- package/src/components/card/card.tsx +211 -0
- package/src/components/card/index.ts +12 -0
- package/src/components/chart/chart.test.tsx +98 -0
- package/src/components/chart/chart.tsx +192 -0
- package/src/components/chart/index.ts +8 -0
- package/src/components/chart/styles.css +50 -0
- package/src/components/checkbox/checkbox.test.tsx +113 -0
- package/src/components/checkbox/checkbox.tsx +182 -0
- package/src/components/checkbox/control.ts +76 -0
- package/src/components/checkbox/index.ts +3 -0
- package/src/components/choice-card-group/choice-card-group.test.tsx +250 -0
- package/src/components/choice-card-group/choice-card-group.tsx +549 -0
- package/src/components/choice-card-group/index.ts +9 -0
- package/src/components/circular-progress/circular-progress.test.tsx +120 -0
- package/src/components/circular-progress/circular-progress.tsx +214 -0
- package/src/components/circular-progress/index.ts +15 -0
- package/src/components/clipboard/clipboard.test.tsx +229 -0
- package/src/components/clipboard/clipboard.tsx +128 -0
- package/src/components/clipboard/copy.tsx +127 -0
- package/src/components/clipboard/index.ts +12 -0
- package/src/components/code/code.test.tsx +57 -0
- package/src/components/code/code.tsx +54 -0
- package/src/components/code/index.ts +1 -0
- package/src/components/code-block/chrome.tsx +347 -0
- package/src/components/code-block/code-block.test.tsx +252 -0
- package/src/components/code-block/code-block.tsx +254 -0
- package/src/components/code-block/diff.test.ts +177 -0
- package/src/components/code-block/diff.ts +114 -0
- package/src/components/code-block/gutters.test.ts +280 -0
- package/src/components/code-block/gutters.ts +260 -0
- package/src/components/code-block/highlighter.test.ts +261 -0
- package/src/components/code-block/highlighter.ts +290 -0
- package/src/components/code-block/index.ts +53 -0
- package/src/components/code-block/notation.test.ts +166 -0
- package/src/components/code-block/notation.ts +233 -0
- package/src/components/code-block/presets.test.ts +43 -0
- package/src/components/code-block/presets.ts +28 -0
- package/src/components/code-block/static.tsx +130 -0
- package/src/components/code-block/styles.css +198 -0
- package/src/components/collapse/collapse.test.tsx +96 -0
- package/src/components/collapse/collapse.tsx +81 -0
- package/src/components/collapse/index.ts +1 -0
- package/src/components/combobox/combobox.tsx +317 -0
- package/src/components/combobox/index.ts +15 -0
- package/src/components/combobox-list/combobox-list.test.tsx +148 -0
- package/src/components/combobox-list/combobox-list.tsx +276 -0
- package/src/components/combobox-list/index.ts +3 -0
- package/src/components/container/container.tsx +47 -0
- package/src/components/container/index.ts +1 -0
- package/src/components/data-table/data-table-features.ts +127 -0
- package/src/components/data-table/data-table-filter/data-table-date-filter.tsx +275 -0
- package/src/components/data-table/data-table-filter/data-table-filter-fns.ts +126 -0
- package/src/components/data-table/data-table-filter/data-table-number-filter.tsx +74 -0
- package/src/components/data-table/data-table-filter/data-table-select-filter.tsx +47 -0
- package/src/components/data-table/data-table-filter/data-table-text-filter.tsx +29 -0
- package/src/components/data-table/data-table-filter/index.tsx +62 -0
- package/src/components/data-table/data-table-filter/utils.ts +112 -0
- package/src/components/data-table/data-table-filter-fns.test.tsx +145 -0
- package/src/components/data-table/data-table-filter.test.tsx +365 -0
- package/src/components/data-table/data-table-header-cell.tsx +292 -0
- package/src/components/data-table/data-table-meta.ts +102 -0
- package/src/components/data-table/data-table-pagination.tsx +175 -0
- package/src/components/data-table/data-table-placeholder.tsx +61 -0
- package/src/components/data-table/data-table-schema.test.tsx +22 -0
- package/src/components/data-table/data-table-schema.ts +23 -0
- package/src/components/data-table/data-table-skeleton.ts +9 -0
- package/src/components/data-table/data-table-stack.tsx +376 -0
- package/src/components/data-table/data-table-state.ts +35 -0
- package/src/components/data-table/data-table-toolbar.tsx +81 -0
- package/src/components/data-table/data-table.test.tsx +1143 -0
- package/src/components/data-table/data-table.tsx +829 -0
- package/src/components/data-table/index.ts +46 -0
- package/src/components/date-picker/aliases.tsx +15 -0
- package/src/components/date-picker/date-picker.test.tsx +699 -0
- package/src/components/date-picker/date-picker.tsx +1000 -0
- package/src/components/date-picker/date-time-text.test.ts +68 -0
- package/src/components/date-picker/date-time-text.ts +103 -0
- package/src/components/date-picker/index.ts +32 -0
- package/src/components/divider/divider.test.tsx +106 -0
- package/src/components/divider/divider.tsx +162 -0
- package/src/components/divider/index.ts +8 -0
- package/src/components/drawer/drawer.tsx +405 -0
- package/src/components/drawer/index.ts +21 -0
- package/src/components/field/field.tsx +235 -0
- package/src/components/field/index.ts +3 -0
- package/src/components/file-upload/file-upload.test.tsx +47 -0
- package/src/components/file-upload/file-upload.tsx +280 -0
- package/src/components/file-upload/index.ts +3 -0
- package/src/components/flex/flex.tsx +81 -0
- package/src/components/flex/index.ts +1 -0
- package/src/components/grid/grid.tsx +52 -0
- package/src/components/grid/index.ts +1 -0
- package/src/components/hover-card/hover-card.test.tsx +192 -0
- package/src/components/hover-card/hover-card.tsx +376 -0
- package/src/components/hover-card/index.ts +9 -0
- package/src/components/indicator/index.ts +6 -0
- package/src/components/indicator/indicator.test.tsx +241 -0
- package/src/components/indicator/indicator.tsx +275 -0
- package/src/components/input/index.ts +12 -0
- package/src/components/input/input.test.tsx +111 -0
- package/src/components/input/input.tsx +320 -0
- package/src/components/kbd/index.ts +1 -0
- package/src/components/kbd/kbd.test.tsx +20 -0
- package/src/components/kbd/kbd.tsx +98 -0
- package/src/components/mark/index.ts +1 -0
- package/src/components/mark/mark.test.tsx +85 -0
- package/src/components/mark/mark.tsx +79 -0
- package/src/components/menu/index.ts +27 -0
- package/src/components/menu/menu-data.tsx +230 -0
- package/src/components/menu/menu.test.tsx +547 -0
- package/src/components/menu/menu.tsx +514 -0
- package/src/components/modal/index.ts +14 -0
- package/src/components/modal/modal.tsx +420 -0
- package/src/components/multi-combobox-list/index.ts +3 -0
- package/src/components/multi-combobox-list/multi-combobox-list.test.tsx +190 -0
- package/src/components/multi-combobox-list/multi-combobox-list.tsx +308 -0
- package/src/components/multi-select/index.ts +12 -0
- package/src/components/multi-select/multi-select.test.tsx +248 -0
- package/src/components/multi-select/multi-select.tsx +355 -0
- package/src/components/nav-link/index.ts +4 -0
- package/src/components/nav-link/nav-link.test.tsx +107 -0
- package/src/components/nav-link/nav-link.tsx +205 -0
- package/src/components/nav-link/navigation.test.tsx +117 -0
- package/src/components/nav-link/navigation.tsx +81 -0
- package/src/components/nav-link/tanstack.tsx +67 -0
- package/src/components/notification/create-notifier.tsx +517 -0
- package/src/components/notification/index.ts +20 -0
- package/src/components/notification/notification.test.tsx +306 -0
- package/src/components/notification/notification.tsx +353 -0
- package/src/components/notification/store.ts +159 -0
- package/src/components/notification/types.ts +67 -0
- package/src/components/number-input/index.ts +3 -0
- package/src/components/number-input/number-input.test.tsx +291 -0
- package/src/components/number-input/number-input.tsx +407 -0
- package/src/components/overlays/create-overlays.tsx +267 -0
- package/src/components/overlays/index.ts +25 -0
- package/src/components/overlays/renderer.tsx +214 -0
- package/src/components/overlays/store.ts +103 -0
- package/src/components/overlays/types.ts +150 -0
- package/src/components/password-input/index.ts +3 -0
- package/src/components/password-input/password-input.test.tsx +94 -0
- package/src/components/password-input/password-input.tsx +191 -0
- package/src/components/pill/index.ts +9 -0
- package/src/components/pill/pill.test.tsx +22 -0
- package/src/components/pill/pill.tsx +221 -0
- package/src/components/pills-input/index.ts +12 -0
- package/src/components/pills-input/pills-input.test.ts +136 -0
- package/src/components/pills-input/pills-input.tsx +422 -0
- package/src/components/pin-input/index.ts +3 -0
- package/src/components/pin-input/pin-input.test.tsx +74 -0
- package/src/components/pin-input/pin-input.tsx +186 -0
- package/src/components/popover/icons.tsx +129 -0
- package/src/components/popover/index.ts +8 -0
- package/src/components/popover/popover.test.tsx +223 -0
- package/src/components/popover/popover.tsx +635 -0
- package/src/components/progress/index.ts +18 -0
- package/src/components/progress/progress.test.tsx +112 -0
- package/src/components/progress/progress.tsx +194 -0
- package/src/components/radio-group/index.ts +9 -0
- package/src/components/radio-group/radio-group.test.tsx +107 -0
- package/src/components/radio-group/radio-group.tsx +207 -0
- package/src/components/rating/icons.tsx +35 -0
- package/src/components/rating/index.ts +9 -0
- package/src/components/rating/rating.test.tsx +288 -0
- package/src/components/rating/rating.tsx +389 -0
- package/src/components/schedule/index.ts +170 -0
- package/src/components/schedule/now-cursor-line.test.tsx +262 -0
- package/src/components/schedule/now-cursor-line.tsx +343 -0
- package/src/components/schedule/schedule-agenda-list.tsx +480 -0
- package/src/components/schedule/schedule-agenda-view.test.tsx +333 -0
- package/src/components/schedule/schedule-agenda-view.tsx +209 -0
- package/src/components/schedule/schedule-all-day-row.test.ts +187 -0
- package/src/components/schedule/schedule-all-day-row.tsx +616 -0
- package/src/components/schedule/schedule-create-draft.tsx +181 -0
- package/src/components/schedule/schedule-dates.test.ts +771 -0
- package/src/components/schedule/schedule-dates.ts +721 -0
- package/src/components/schedule/schedule-day-view.tsx +30 -0
- package/src/components/schedule/schedule-days-view.tsx +277 -0
- package/src/components/schedule/schedule-details-popover.test.tsx +765 -0
- package/src/components/schedule/schedule-disabled-overlay.tsx +51 -0
- package/src/components/schedule/schedule-drag-ghost.tsx +157 -0
- package/src/components/schedule/schedule-event-chip.tsx +1176 -0
- package/src/components/schedule/schedule-event-details.tsx +101 -0
- package/src/components/schedule/schedule-event-list-popover-content.tsx +149 -0
- package/src/components/schedule/schedule-event-styles.ts +60 -0
- package/src/components/schedule/schedule-geometry.test.ts +426 -0
- package/src/components/schedule/schedule-geometry.ts +461 -0
- package/src/components/schedule/schedule-grid-gesture.test.ts +153 -0
- package/src/components/schedule/schedule-grid-gesture.ts +567 -0
- package/src/components/schedule/schedule-layout.test.ts +260 -0
- package/src/components/schedule/schedule-layout.ts +270 -0
- package/src/components/schedule/schedule-month-view.test.tsx +193 -0
- package/src/components/schedule/schedule-month-view.tsx +688 -0
- package/src/components/schedule/schedule-next-up-grouping.test.ts +95 -0
- package/src/components/schedule/schedule-next-up-grouping.ts +69 -0
- package/src/components/schedule/schedule-next-up.test.tsx +189 -0
- package/src/components/schedule/schedule-next-up.tsx +136 -0
- package/src/components/schedule/schedule-overflow-chip.tsx +156 -0
- package/src/components/schedule/schedule-overflow-popover.tsx +173 -0
- package/src/components/schedule/schedule-segments.test.ts +201 -0
- package/src/components/schedule/schedule-segments.ts +120 -0
- package/src/components/schedule/schedule-snap.test.ts +546 -0
- package/src/components/schedule/schedule-snap.ts +380 -0
- package/src/components/schedule/schedule-timed-grid.tsx +1609 -0
- package/src/components/schedule/schedule-toolbar.tsx +264 -0
- package/src/components/schedule/schedule-type-cost.test.ts +104 -0
- package/src/components/schedule/schedule-types.test.ts +64 -0
- package/src/components/schedule/schedule-types.ts +1149 -0
- package/src/components/schedule/schedule-views.test.ts +263 -0
- package/src/components/schedule/schedule-views.ts +293 -0
- package/src/components/schedule/schedule-week-view.tsx +25 -0
- package/src/components/schedule/schedule-year-view.test.tsx +105 -0
- package/src/components/schedule/schedule-year-view.tsx +305 -0
- package/src/components/schedule/schedule.test.tsx +4268 -0
- package/src/components/schedule/schedule.tsx +1038 -0
- package/src/components/schedule/use-event-create.ts +590 -0
- package/src/components/schedule/use-event-drag.ts +504 -0
- package/src/components/schedule/use-event-resize.ts +563 -0
- package/src/components/schedule/use-schedule-selection.ts +119 -0
- package/src/components/schedule/use-schedule.test.ts +91 -0
- package/src/components/schedule/use-schedule.ts +135 -0
- package/src/components/segment-group/index.ts +15 -0
- package/src/components/segment-group/segment-group.test.tsx +172 -0
- package/src/components/segment-group/segment-group.tsx +570 -0
- package/src/components/select/index.ts +12 -0
- package/src/components/select/select.test.tsx +173 -0
- package/src/components/select/select.tsx +405 -0
- package/src/components/skeleton/index.ts +7 -0
- package/src/components/skeleton/skeleton.test.tsx +96 -0
- package/src/components/skeleton/skeleton.tsx +178 -0
- package/src/components/slider/index.ts +3 -0
- package/src/components/slider/slider.test.tsx +136 -0
- package/src/components/slider/slider.tsx +390 -0
- package/src/components/slider/sliderThumb.tsx +0 -0
- package/src/components/spinner/index.ts +6 -0
- package/src/components/spinner/spinner.tsx +136 -0
- package/src/components/switch/index.ts +3 -0
- package/src/components/switch/switch.test.tsx +98 -0
- package/src/components/switch/switch.tsx +234 -0
- package/src/components/table/index.ts +14 -0
- package/src/components/table/table.test.tsx +262 -0
- package/src/components/table/table.tsx +309 -0
- package/src/components/tabs/index.ts +17 -0
- package/src/components/tabs/tabs-data.tsx +125 -0
- package/src/components/tabs/tabs.test.tsx +172 -0
- package/src/components/tabs/tabs.tsx +292 -0
- package/src/components/tags-input/index.ts +3 -0
- package/src/components/tags-input/tags-input.test.tsx +85 -0
- package/src/components/tags-input/tags-input.tsx +294 -0
- package/src/components/text/index.ts +1 -0
- package/src/components/text/text.test.tsx +73 -0
- package/src/components/text/text.tsx +107 -0
- package/src/components/text-input/index.ts +3 -0
- package/src/components/text-input/text-input.test.tsx +129 -0
- package/src/components/text-input/text-input.tsx +88 -0
- package/src/components/textarea/index.ts +3 -0
- package/src/components/textarea/textarea.test.tsx +88 -0
- package/src/components/textarea/textarea.tsx +205 -0
- package/src/components/theme-icon/index.ts +7 -0
- package/src/components/theme-icon/theme-icon.test.tsx +20 -0
- package/src/components/theme-icon/theme-icon.tsx +114 -0
- package/src/components/theme-script/index.ts +1 -0
- package/src/components/theme-script/theme-script.tsx +68 -0
- package/src/components/time-input/hour-cycle.ts +61 -0
- package/src/components/time-input/index.ts +4 -0
- package/src/components/time-input/time-input.test.tsx +292 -0
- package/src/components/time-input/time-input.tsx +196 -0
- package/src/components/time-input/time-row.tsx +305 -0
- package/src/components/timeline/index.ts +11 -0
- package/src/components/timeline/timeline.test.tsx +701 -0
- package/src/components/timeline/timeline.tsx +720 -0
- package/src/components/title/index.ts +1 -0
- package/src/components/title/title.test.tsx +68 -0
- package/src/components/title/title.tsx +95 -0
- package/src/components/tooltip/index.ts +9 -0
- package/src/components/tooltip/tooltip.test.tsx +96 -0
- package/src/components/tooltip/tooltip.tsx +255 -0
- package/src/components/tree-multi-select/index.ts +11 -0
- package/src/components/tree-multi-select/tree-multi-select.test.tsx +327 -0
- package/src/components/tree-multi-select/tree-multi-select.tsx +626 -0
- package/src/components/tree-select/index.ts +11 -0
- package/src/components/tree-select/tree-select.test.tsx +376 -0
- package/src/components/tree-select/tree-select.tsx +634 -0
- package/src/index.ts +64 -0
- package/src/lib/align.ts +6 -0
- package/src/lib/available-if.test.ts +76 -0
- package/src/lib/available-if.ts +114 -0
- package/src/lib/brand.ts +19 -0
- package/src/lib/cn.test.ts +13 -0
- package/src/lib/cn.ts +28 -0
- package/src/lib/colors.ts +31 -0
- package/src/lib/control-open.ts +38 -0
- package/src/lib/date-predicates.test.ts +149 -0
- package/src/lib/date-predicates.ts +83 -0
- package/src/lib/date-value.test.ts +107 -0
- package/src/lib/date-value.ts +76 -0
- package/src/lib/dev-warn.ts +18 -0
- package/src/lib/focus-styles.test.ts +138 -0
- package/src/lib/focus-styles.ts +145 -0
- package/src/lib/form-control.ts +72 -0
- package/src/lib/gradient.ts +81 -0
- package/src/lib/intl-direction.test.tsx +96 -0
- package/src/lib/intl.test.tsx +162 -0
- package/src/lib/intl.tsx +210 -0
- package/src/lib/link-component.test.tsx +46 -0
- package/src/lib/link-component.tsx +32 -0
- package/src/lib/merge-refs.ts +20 -0
- package/src/lib/overlay-container.test.tsx +69 -0
- package/src/lib/overlay-container.tsx +64 -0
- package/src/lib/overlay-layer.test.tsx +139 -0
- package/src/lib/overlay-layer.tsx +81 -0
- package/src/lib/placement.ts +23 -0
- package/src/lib/props.ts +48 -0
- package/src/lib/required-if.ts +57 -0
- package/src/lib/schedule-predicates.test.ts +230 -0
- package/src/lib/schedule-predicates.ts +193 -0
- package/src/lib/select-data.ts +227 -0
- package/src/lib/sizes.ts +20 -0
- package/src/lib/test-id.ts +27 -0
- package/src/lib/theme-init-runtime.test.ts +152 -0
- package/src/lib/theme-init-runtime.ts +79 -0
- package/src/lib/theme.test.ts +223 -0
- package/src/lib/theme.ts +153 -0
- package/src/lib/tree-data.ts +159 -0
- package/src/lib/typography-size.ts +59 -0
- package/src/lib/use-container-query.test.ts +83 -0
- package/src/lib/use-container-query.ts +44 -0
- package/src/lib/use-disclosure.test.ts +85 -0
- package/src/lib/use-disclosure.ts +77 -0
- package/src/lib/use-isomorphic-layout-effect.ts +12 -0
- package/src/lib/use-local-storage.test.ts +165 -0
- package/src/lib/use-local-storage.ts +178 -0
- package/src/lib/use-logger.ts +39 -0
- package/src/lib/use-media-query.test.ts +77 -0
- package/src/lib/use-media-query.ts +35 -0
- package/src/lib/use-now.ts +59 -0
- package/src/lib/use-theme.test.ts +305 -0
- package/src/lib/use-theme.ts +279 -0
- package/src/lib/use-uncontrolled.test.ts +207 -0
- package/src/lib/use-uncontrolled.ts +85 -0
- package/src/styles.css +17 -0
- package/src/test-setup.ts +130 -0
- package/src/theme-init-script.ts +10 -0
- package/src/theme.css +1275 -0
- package/src/theme.forced-colors.test.tsx +215 -0
- package/src/theme.test.ts +221 -0
- package/src/visually-hidden-containment.test.tsx +98 -0
|
@@ -0,0 +1,1176 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { usePresence } from "@ark-ui/react/presence"
|
|
4
|
+
import { cva } from "class-variance-authority"
|
|
5
|
+
import { XIcon } from "lucide-react"
|
|
6
|
+
import type {
|
|
7
|
+
CSSProperties,
|
|
8
|
+
AnimationEvent as ReactAnimationEvent,
|
|
9
|
+
KeyboardEvent as ReactKeyboardEvent,
|
|
10
|
+
ReactNode,
|
|
11
|
+
RefObject,
|
|
12
|
+
} from "react"
|
|
13
|
+
import { useLayoutEffect, useRef, useState } from "react"
|
|
14
|
+
import { cn } from "../../lib/cn"
|
|
15
|
+
import { focusStyles } from "../../lib/focus-styles"
|
|
16
|
+
import { mergeRefs } from "../../lib/merge-refs"
|
|
17
|
+
import { props as dataProps } from "../../lib/props"
|
|
18
|
+
import type { ScheduleSlotPredicate } from "../../lib/schedule-predicates"
|
|
19
|
+
import { Popover, type PopoverProps } from "../popover/popover"
|
|
20
|
+
import { checkRangeCommit, timeRangeLabel } from "./schedule-dates"
|
|
21
|
+
import { ScheduleEventDetailsContent } from "./schedule-event-details"
|
|
22
|
+
import {
|
|
23
|
+
EVENT_COLOR_CLASSES,
|
|
24
|
+
EVENT_SELECTED_CLASSES,
|
|
25
|
+
gridPanelMaxWidth,
|
|
26
|
+
} from "./schedule-event-styles"
|
|
27
|
+
import { timedGridViewport } from "./schedule-geometry"
|
|
28
|
+
import { moveRange } from "./schedule-snap"
|
|
29
|
+
import type {
|
|
30
|
+
ScheduleAnyEvent,
|
|
31
|
+
ScheduleCollision,
|
|
32
|
+
ScheduleEvent,
|
|
33
|
+
ScheduleEventChipClassNames,
|
|
34
|
+
ScheduleStaticEvent,
|
|
35
|
+
ScheduleTranslations,
|
|
36
|
+
} from "./schedule-types"
|
|
37
|
+
import { isEventGestureEnabled } from "./schedule-types"
|
|
38
|
+
import { useEventDrag } from "./use-event-drag"
|
|
39
|
+
import { useEventResize } from "./use-event-resize"
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* RFC §11 (`docs/rfcs/schedule.md`) event chip. `kind === "static"` is a hard
|
|
43
|
+
* structural gate: `ScheduleEventChip` dispatches to one of two genuinely
|
|
44
|
+
* separate components below, so a static event's render never calls the
|
|
45
|
+
* drag/resize hooks at all (not just "calls them but never wires the
|
|
46
|
+
* result") — the only way to honor that literally, since React's rules of
|
|
47
|
+
* hooks require a single component instance to call the same hooks on every
|
|
48
|
+
* render.
|
|
49
|
+
*
|
|
50
|
+
* Both chip kinds own a built-in event-details popover, gated by
|
|
51
|
+
* `withEventDetails` and opened for whichever chip is the selection's anchor
|
|
52
|
+
* (see `ScheduleEventProps.selected`'s own doc — no local open state).
|
|
53
|
+
* `StaticEventChip` fires a single real click, so it wraps its button
|
|
54
|
+
* in `Popover.Trigger` — the same per-instance controlled-open shape
|
|
55
|
+
* `DataTableHeaderFilter` already uses. `InteractiveEventChip` can't: its
|
|
56
|
+
* drag preview is a CSS transform only, so a genuine native `click` fires on
|
|
57
|
+
* *every* pointer release regardless of drag distance, which would make
|
|
58
|
+
* `Popover.Trigger`'s own click-toggle open the popover on every drag too.
|
|
59
|
+
* It uses `Popover.Anchor` (pure positioning, no click semantics) instead,
|
|
60
|
+
* driving `open` imperatively from the gesture's own already-correct
|
|
61
|
+
* click-vs-drag resolution (`use-event-drag.ts`'s `CLICK_SLOP` check and the
|
|
62
|
+
* keyboard Enter/Space branch below).
|
|
63
|
+
*
|
|
64
|
+
* `editable` is a separate, orthogonal restriction layered on top of
|
|
65
|
+
* `kind` — never conflated with it. `kind:"static"` stays the hard
|
|
66
|
+
* structural gate it always was (a genuinely different, externally-supplied
|
|
67
|
+
* data source that never even calls the drag/resize hooks); a `kind:"event"`
|
|
68
|
+
* item with every gesture currently disallowed by `editable` still goes
|
|
69
|
+
* through `InteractiveEventChip` (the hooks are still called, per Rules of
|
|
70
|
+
* Hooks — they just aren't wired to any rendered affordance) and keeps its
|
|
71
|
+
* normal look — it is still the consumer's own event, just not editable right
|
|
72
|
+
* now. (This used to say "not the dashed/reduced-opacity static treatment";
|
|
73
|
+
* `chipShell`'s `kind` variant has only ever differed by `cursor-default`, so
|
|
74
|
+
* there is no such treatment to contrast with.)
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The chip's whole vertical box math, stated once. Every threshold below is a
|
|
79
|
+
* *content-box* figure because that is what a `@container` size query
|
|
80
|
+
* measures — with no `py-*` on the chip root, the queried box is exactly
|
|
81
|
+
* `height - 2px` of border, independent of `ChipContent`'s own padding, so
|
|
82
|
+
* there is no circularity.
|
|
83
|
+
*
|
|
84
|
+
* one line of content = 1rem (`text-xs` is 0.75rem at Tailwind's paired
|
|
85
|
+
* 1.3333 ratio -> exactly 1rem at *any*
|
|
86
|
+
* root font-size; measured at root 12/16/20px)
|
|
87
|
+
* two lines of content = 2rem
|
|
88
|
+
* chip border = 2px (1px each side, from `EVENT_COLOR_CLASSES`,
|
|
89
|
+
* inside the box — preflight is `border-box`)
|
|
90
|
+
*
|
|
91
|
+
* so the floor is `calc(1rem + 2px)` (18px at a 16px root) and the time row
|
|
92
|
+
* needs `calc(2rem + 8px)` of content box once `py-1` is back on.
|
|
93
|
+
*
|
|
94
|
+
* These are literals in the class strings on purpose and cannot be hoisted
|
|
95
|
+
* into a custom property: CSS never substitutes `var()` inside an at-rule
|
|
96
|
+
* prelude, and Tailwind additionally rejects arbitrary values containing
|
|
97
|
+
* `var(`. `rem` rather than `px` so the whole scale tracks the root font-size
|
|
98
|
+
* — the old hard-coded `18px` floor clipped the title outright on a page with
|
|
99
|
+
* a 20px root.
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
/** Same scale-pulse `use-event-drag.ts`/`use-event-resize.ts` each keep their
|
|
103
|
+
* own private copy of — `handleBodyKeyDown` below is an independent
|
|
104
|
+
* keyboard-move commit path that doesn't go through either hook, so it
|
|
105
|
+
* can't reuse theirs. */
|
|
106
|
+
const flashRejected = (el: HTMLElement, reason: "disabled" | "overlap") => {
|
|
107
|
+
el.style.transition = "transform 120ms ease-out"
|
|
108
|
+
el.style.transform = "scale(0.98)"
|
|
109
|
+
el.dataset["scheduleRejectReason"] = reason
|
|
110
|
+
requestAnimationFrame(() => {
|
|
111
|
+
el.style.transform = ""
|
|
112
|
+
// Reset, not left dangling: an inline `transition` beats any class-based
|
|
113
|
+
// one for the same property, so leaving this set would silently kill
|
|
114
|
+
// `chipShell`'s own `transition-[left,width]` on this chip from its
|
|
115
|
+
// first rejected gesture onward.
|
|
116
|
+
el.style.transition = ""
|
|
117
|
+
delete el.dataset["scheduleRejectReason"]
|
|
118
|
+
})
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** Grip hit area: ~8px on a fine pointer, 44px (WCAG 2.5.5 / Apple HIG) on a
|
|
122
|
+
* coarse one — CSS-only via `[@media(pointer:coarse)]`, never resized by
|
|
123
|
+
* JS, and the small/precise size is the default for ambiguous/hybrid input.
|
|
124
|
+
* The hit area itself straddles the chip's edge (half in, half out, so a
|
|
125
|
+
* coarse pointer gets a bigger target than the chip's own edge), but the
|
|
126
|
+
* *visible* dash is aligned to whichever half sits inside the chip — see
|
|
127
|
+
* `top`/`bottom` variants below — so nothing appears to float outside the
|
|
128
|
+
* chip's own box. */
|
|
129
|
+
const gripBase = cn(
|
|
130
|
+
"absolute inset-x-0 z-10 flex h-(--sch-handle-hit-size) touch-none justify-center select-none",
|
|
131
|
+
"[--sch-handle-hit-size:8px] [@media(pointer:coarse)]:[--sch-handle-hit-size:44px]",
|
|
132
|
+
"cursor-ns-resize",
|
|
133
|
+
|
|
134
|
+
"before:h-0.5 before:w-16 before:max-w-[70%] before:rounded-full",
|
|
135
|
+
// `--c-text`, not `current`. The strip sits entirely OUTSIDE the chip's box
|
|
136
|
+
// (its bottom edge is the chip's top edge, and focus translates the dash a
|
|
137
|
+
// further 2px away), so the dash is always drawn on the grid, never on the
|
|
138
|
+
// chip. Inheriting `color` therefore breaks the moment the chip is selected:
|
|
139
|
+
// the fill flips the chip's text to `--c-on-solid` for legibility *on* the
|
|
140
|
+
// fill, which is near-black, and the dash would take that colour out onto a
|
|
141
|
+
// dark grid and vanish. The palette's `--c-text` is the value that tracks the
|
|
142
|
+
// surface the dash actually sits on.
|
|
143
|
+
"before:bg-(--c-text)/50 before:opacity-0 before:transition-[opacity,transform]",
|
|
144
|
+
|
|
145
|
+
"group-hover:before:opacity-100",
|
|
146
|
+
"group-focus-within:before:opacity-100",
|
|
147
|
+
"focus-visible:before:opacity-100",
|
|
148
|
+
// Opaque on focus, against the resting 50% above. This used to read
|
|
149
|
+
// `bg-primary`, which is not a color this kit defines — Tailwind emitted
|
|
150
|
+
// nothing for it, so a focused grip silently kept the resting fill.
|
|
151
|
+
"focus-visible:before:bg-(--c-text)",
|
|
152
|
+
/**
|
|
153
|
+
* The ring is deliberately a hand-written mirror of
|
|
154
|
+
* `focusStyles({ ring: "palette" })` rather than a call to it: that helper
|
|
155
|
+
* rings the *element*, and this element is an invisible full-width hit strip
|
|
156
|
+
* (`inset-x-0`, 8px / 44px coarse) — ringing it would draw a rectangle across
|
|
157
|
+
* the whole chip instead of around the dash, which is the actual affordance.
|
|
158
|
+
* So the ring has to live on `::before`, and the helper's strings cannot be
|
|
159
|
+
* mechanically prefixed (its own doc explains why they must stay whole
|
|
160
|
+
* literals for Tailwind's scanner).
|
|
161
|
+
*
|
|
162
|
+
* Everything else is kept in lockstep with it on purpose — 2px, same offset
|
|
163
|
+
* colors, `outline-none`, and `--c-text` rather than `--c-solid`. That last
|
|
164
|
+
* one was the drift: `focusStyles` rejects `--c-solid` explicitly (it is 500
|
|
165
|
+
* in both themes, so it has nowhere to go), and measured on these chips it
|
|
166
|
+
* ringed 2.69:1 against the grid and 1.80:1 against the chip border, versus
|
|
167
|
+
* `--c-text`'s 5.41:1 and 3.62:1. One of the hand-inlined declarations #148
|
|
168
|
+
* tracks; corrected here because the selected state below made it acute.
|
|
169
|
+
*/
|
|
170
|
+
"focus-visible:before:ring-2 focus-visible:before:ring-(--c-text) focus-visible:before:ring-offset-2 focus-visible:before:ring-offset-brand-50 dark:focus-visible:before:ring-offset-brand-950",
|
|
171
|
+
// Deliberately no `data-selected` override here, unlike the chip itself: the
|
|
172
|
+
// chip's own ring needs one because a selected chip fills with `--c-solid`
|
|
173
|
+
// and is the surface its ring is drawn on, whereas this ring is drawn on the
|
|
174
|
+
// grid in both states. `--c-text` against the page background is exactly the
|
|
175
|
+
// case `focusStyles({ ring: "palette" })` is specified for.
|
|
176
|
+
"focus-visible:outline-none",
|
|
177
|
+
)
|
|
178
|
+
// The dash sits flush at the edge (opacity-0) at rest; on hover/focus it
|
|
179
|
+
// fades in *and* slides further outward from the chip — up for the top
|
|
180
|
+
// handle, down for the bottom one — so it reads as emerging from the
|
|
181
|
+
// border rather than just appearing in place. Uses an arbitrary
|
|
182
|
+
// `transform-[translateY(...)]` rather than Tailwind's own `translate-y-*`
|
|
183
|
+
// utility: that utility drives the standalone `translate` CSS property via
|
|
184
|
+
// a `--tw-translate-y` custom property registered with `syntax: "*"`, which
|
|
185
|
+
// is non-interpolable — a transition on it (or on `transform`, which it
|
|
186
|
+
// never touches) doesn't tween, it just jumps partway through the
|
|
187
|
+
// duration. Same reason `chipShell`'s drag preview above already goes
|
|
188
|
+
// through `transform-[translateY(...)]` instead.
|
|
189
|
+
const gripTop =
|
|
190
|
+
"-top-0.25 -translate-y-full items-end pb-px group-hover:before:transform-[translateY(-2px)] group-focus-within:before:transform-[translateY(-2px)] focus-visible:before:transform-[translateY(-2px)]"
|
|
191
|
+
const gripBottom =
|
|
192
|
+
"-bottom-0.25 translate-y-full items-start pt-px group-hover:before:transform-[translateY(2px)] group-focus-within:before:transform-[translateY(2px)] focus-visible:before:transform-[translateY(2px)]"
|
|
193
|
+
|
|
194
|
+
// Deliberately no `overflow-hidden` on the root: the resize grips straddle
|
|
195
|
+
// the chip's own top/bottom edge (half in, half out) so their touch hitbox
|
|
196
|
+
// can be bigger than the visible chip on a coarse pointer — clipping the
|
|
197
|
+
// root would silently make that outer half unclickable. Title/time text
|
|
198
|
+
// truncate individually via their own `truncate` class instead.
|
|
199
|
+
const chipShell = cva(
|
|
200
|
+
[
|
|
201
|
+
// No `py-*` here on purpose — the vertical padding lives on `ChipContent`'s
|
|
202
|
+
// own row so a container query can collapse it as the chip shrinks (a
|
|
203
|
+
// query may never style its own container). Keeping it here would also
|
|
204
|
+
// make the queried *content* box depend on the very padding being set,
|
|
205
|
+
// which is circular. `@container-size/sch-chip` makes the chip a size
|
|
206
|
+
// container so those queries read its real rendered height instead of the
|
|
207
|
+
// floor-derived estimate this file used to guess with — matching
|
|
208
|
+
// `DataTable`'s own `@container` precedent. Size containment has no
|
|
209
|
+
// clipping clause (only `contain: paint` clips), so the grips below still
|
|
210
|
+
// straddle the edge; verified in a browser, see the note above.
|
|
211
|
+
"@container-size/sch-chip absolute select-none rounded-sm px-2 text-start text-xs",
|
|
212
|
+
// An explicit display, because the two kinds are different elements: the
|
|
213
|
+
// static chip is a native `<button>`, and a button centres its content
|
|
214
|
+
// box vertically inside whatever height it is given, so a tall static
|
|
215
|
+
// chip floated its title mid-block while the `<div role="button">` beside
|
|
216
|
+
// it kept its own at the top. A flex container has no such centring, and
|
|
217
|
+
// for the interactive chip it changes nothing — `ChipContent` is the only
|
|
218
|
+
// in-flow child and still stretches to full width; the grips and the
|
|
219
|
+
// remove button are absolute and pinned on both axes they care about.
|
|
220
|
+
"flex flex-col",
|
|
221
|
+
EVENT_COLOR_CLASSES,
|
|
222
|
+
// A soft card-like shadow — cheap depth cue that reads as "layered" once
|
|
223
|
+
// `--sch-chip-z`/`columnInsets` below actually overlap two chips'
|
|
224
|
+
// boxes; harmless (barely visible) on a lone, non-overlapping event.
|
|
225
|
+
// Lifts slightly further on hover — the kit's own micro-interaction
|
|
226
|
+
// idiom elsewhere is a background/border-color shift (Button, ActionIcon,
|
|
227
|
+
// ChoiceCardGroup), never geometry, so a shadow bump (not a scale/
|
|
228
|
+
// translate) is what stays "classy and sober" here while still reading
|
|
229
|
+
// as a distinct hover cue.
|
|
230
|
+
EVENT_SELECTED_CLASSES,
|
|
231
|
+
"shadow-sm shadow-black/10 dark:shadow-black/30",
|
|
232
|
+
"hover:shadow-md hover:shadow-black/15 dark:hover:shadow-black/40",
|
|
233
|
+
// Scoped to `left`/`width` only — the overlap-cascade's own outputs
|
|
234
|
+
// (`columnInsets`, recomputed fresh every render whenever a sibling
|
|
235
|
+
// event is created/removed/moved). Deliberately excludes `top`/`height`
|
|
236
|
+
// (driven *live*, every pointermove, by drag/resize's own transform/
|
|
237
|
+
// calc() preview vars below — a transition there would lag the pointer)
|
|
238
|
+
// and z-index (paint-order only, not worth animating). Reuses the same
|
|
239
|
+
// ease-out curve `schedule-chip-in`/`popover-in`/`toast-in` already
|
|
240
|
+
// share, so this reads as the same family of motion, not a mismatched
|
|
241
|
+
// one-off.
|
|
242
|
+
//
|
|
243
|
+
// One declaration, in the CSS shorthand, because `transition-property` can
|
|
244
|
+
// only be set once: this used to be a `transition-[left,width]` utility
|
|
245
|
+
// *plus* a `transition-shadow duration-150` one a few lines up, and
|
|
246
|
+
// tailwind-merge (correctly) collapsed them to the last — so the hover
|
|
247
|
+
// shadow lift documented above has never actually animated. Writing every
|
|
248
|
+
// property here keeps that from silently recurring, and lets the geometry
|
|
249
|
+
// keep its own 200ms expo while the colors take the kit's usual 150ms.
|
|
250
|
+
//
|
|
251
|
+
// The color half is what the selected state needs: `EVENT_SELECTED_CLASSES`
|
|
252
|
+
// swaps `bg`/`border`/`text` between the palette's light and filled
|
|
253
|
+
// variants, and without this the chip would snap between them.
|
|
254
|
+
//
|
|
255
|
+
// `top`/`height` stay excluded for the reason above, and so does anything
|
|
256
|
+
// written live during a gesture — see the `data-dragging`/`data-resizing`
|
|
257
|
+
// escape below, which is the same "never animate what the pointer is
|
|
258
|
+
// driving" rule applied to the invalid tint.
|
|
259
|
+
"[transition:left_200ms_cubic-bezier(0.16,1,0.3,1),width_200ms_cubic-bezier(0.16,1,0.3,1),box-shadow_150ms_ease-out,background-color_150ms_ease-out,border-color_150ms_ease-out,color_150ms_ease-out]",
|
|
260
|
+
// `data-invalid` repaints the chip red on *every* pointermove while a drag
|
|
261
|
+
// or resize is live. Fading that in would blur a validity signal the user
|
|
262
|
+
// is actively steering, so gestures opt out of the transition entirely —
|
|
263
|
+
// exactly the call the comment above makes for `top`/`height`.
|
|
264
|
+
"data-dragging:transition-none data-resizing:transition-none",
|
|
265
|
+
"motion-reduce:transition-none",
|
|
266
|
+
"transform-[translateY(var(--sch-drag-offset-y,0px))] top-(--sch-base-top)",
|
|
267
|
+
"h-[max(var(--sch-base-height),calc(1rem+2px))]",
|
|
268
|
+
// One delta per edge, not one delta plus "which edge is moving".
|
|
269
|
+
//
|
|
270
|
+
// The old contract was `--sch-resize-delta-y` + `data-resizing-edge`,
|
|
271
|
+
// with a separate `calc()` per edge. It assumed exactly one edge moves,
|
|
272
|
+
// which `resizeCollision: "push"`/`"swap"` breaks outright: a push slides both
|
|
273
|
+
// edges, and a swap needs `top` to stop while `height` keeps growing past
|
|
274
|
+
// where the other edge used to be. Neither is expressible as a signed
|
|
275
|
+
// delta on one edge.
|
|
276
|
+
//
|
|
277
|
+
// Two vars, both defaulting to `0px`, subsume the old behaviour exactly
|
|
278
|
+
// rather than sitting beside it: an ordinary start resize writes only
|
|
279
|
+
// `--sch-resize-delta-start` and reduces to `top + dy` / `height - dy`;
|
|
280
|
+
// an ordinary end resize writes only `--sch-resize-delta-end` and reduces
|
|
281
|
+
// to `height + dy`. Push and swap are then simply "both are set".
|
|
282
|
+
//
|
|
283
|
+
// `data-resizing` gates the pair. `data-resizing-edge` survives, but now
|
|
284
|
+
// means only "which grip the user grabbed" — it no longer implies which
|
|
285
|
+
// edge is *moving*, since under `"push"`/`"swap"` both do.
|
|
286
|
+
"data-resizing:top-[calc(var(--sch-base-top)+var(--sch-resize-delta-start,0px))]",
|
|
287
|
+
// The floor is applied *here*, to the result, and never to the input.
|
|
288
|
+
//
|
|
289
|
+
// `--sch-base-height` is the chip's true height; the deltas below are true
|
|
290
|
+
// pixel displacements (`use-event-resize.ts` measures them against the real
|
|
291
|
+
// clipped span). Mixing a floored base with true deltas is wrong in both
|
|
292
|
+
// directions wherever one slot renders shorter than a line of content — on
|
|
293
|
+
// a 624px column showing 13 hours a 15-minute slot is 12px against an 18px
|
|
294
|
+
// floor, so a chip already at the minimum starts 6px inflated and every
|
|
295
|
+
// subsequent size inherits that error. Shrinking drew a box that jumped up
|
|
296
|
+
// on release; growing drew one that jumped down.
|
|
297
|
+
"data-resizing:h-[max(calc(var(--sch-base-height)-var(--sch-resize-delta-start,0px)+var(--sch-resize-delta-end,0px)),calc(1rem+2px))]",
|
|
298
|
+
focusStyles({ ring: "palette", offset: false }),
|
|
299
|
+
// `columnInsets` (`schedule-geometry.ts`) hands every chip a cascade
|
|
300
|
+
// z-index via `--sch-chip-z` (higher `column` = further overlapping =
|
|
301
|
+
// painted in front) instead of relying on DOM order, since overlapping
|
|
302
|
+
// columns now genuinely intrude on each other's boxes instead of
|
|
303
|
+
// sitting flush side by side.
|
|
304
|
+
"z-(--sch-chip-z)",
|
|
305
|
+
// The always-on `transform` above already makes every chip its own
|
|
306
|
+
// stacking context (regardless of whether it's actually mid-drag), so a
|
|
307
|
+
// later-starting event that begins right where an earlier one ends
|
|
308
|
+
// paints entirely on top of it in plain DOM order — including that
|
|
309
|
+
// earlier chip's resize-handle hit area, which straddles past its own
|
|
310
|
+
// edge into exactly that shared boundary (see `gripBase`'s comment).
|
|
311
|
+
// Promote the chip whenever it's actually being interacted with, so its
|
|
312
|
+
// handles are always reachable regardless of the cascade's own z-index
|
|
313
|
+
// (`MAX_CASCADE_Z_INDEX` in `schedule-geometry.ts` stays under this).
|
|
314
|
+
// Still well under the gutter/header's z-30/z-40, so sticky chrome stays
|
|
315
|
+
// on top.
|
|
316
|
+
"hover:z-25 focus-within:z-25 data-resizing:z-25 data-selected:z-25",
|
|
317
|
+
"w-(--sch-chip-w)",
|
|
318
|
+
// Live drag/resize invalidity (`use-event-drag.ts`/`use-event-resize.ts`
|
|
319
|
+
// write this on every `pointermove`) — overrides the event's own
|
|
320
|
+
// `data-color` tint with red regardless of which color it is, the same
|
|
321
|
+
// "one status signal" role `schedule-create-draft.tsx`'s own
|
|
322
|
+
// `data-invalid:` variant plays for the create-drag ghost box.
|
|
323
|
+
"data-invalid:bg-red-500/10 data-invalid:text-red-700 dark:data-invalid:text-red-400",
|
|
324
|
+
// Continuation cue for an event drawn as several per-day pieces: square
|
|
325
|
+
// off the cut edge and drop its border, so the piece visibly runs off the
|
|
326
|
+
// end of its own day instead of reading as a self-contained event that
|
|
327
|
+
// happens to sit at 22:00. Rounded corners are a chip's strongest "this
|
|
328
|
+
// object is complete" signal, so removing them on exactly one side reads
|
|
329
|
+
// instantly with no legend — and the chip has no room for a glyph (it is
|
|
330
|
+
// `text-xs`, 18px minimum, with `pe-5` already reserved for the remove
|
|
331
|
+
// button). FullCalendar draws the same distinction structurally, via its
|
|
332
|
+
// own `fc-event-start`/`fc-event-end` classes.
|
|
333
|
+
// While its event is being dragged, every piece of it dims together — a
|
|
334
|
+
// half-moving multi-day event would visibly contradict "this is one
|
|
335
|
+
// event" at the exact moment that matters most. The ghost carries the
|
|
336
|
+
// live position; these stay put until the commit re-renders them.
|
|
337
|
+
"data-dragging:opacity-40",
|
|
338
|
+
"data-continues-before:rounded-t-none data-continues-before:border-t-0",
|
|
339
|
+
"data-continues-after:rounded-b-none data-continues-after:border-b-0",
|
|
340
|
+
],
|
|
341
|
+
{
|
|
342
|
+
// Static and data chips are meant to look identical (see the `color` note
|
|
343
|
+
// in `schedule-types.ts`) — the only intended distinction is behavioral: a
|
|
344
|
+
// static event is read-only, so it never shows a grab cursor. They are
|
|
345
|
+
// still different elements, though, which is what the `flex flex-col`
|
|
346
|
+
// above is for.
|
|
347
|
+
variants: {
|
|
348
|
+
kind: {
|
|
349
|
+
// No cursor class here — an interactive chip's cursor depends on
|
|
350
|
+
// whether it's actually draggable right now (`editable`), not on
|
|
351
|
+
// `kind` alone, so `InteractiveEventChip` applies it separately.
|
|
352
|
+
event: "",
|
|
353
|
+
static: "cursor-default",
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
const chipShellStyle = (
|
|
360
|
+
top: number,
|
|
361
|
+
height: number,
|
|
362
|
+
insets: { left: string; width: string; zIndex: number },
|
|
363
|
+
): CSSProperties =>
|
|
364
|
+
({
|
|
365
|
+
"--sch-base-top": `${top}%`,
|
|
366
|
+
// `max(...)`, not a JS `Math.max` on a px number (correction after v1
|
|
367
|
+
// shipped) — `height` is a percentage of the day-column's own real
|
|
368
|
+
// (possibly-stretched) height now, so "at least one line of content" can
|
|
369
|
+
// only be expressed as a CSS floor, not a flat number computed once at
|
|
370
|
+
// render time. `calc()` throughout this file's own resize-preview formulas
|
|
371
|
+
// (`chipShell`'s `data-[resizing-edge=...]` variants) already mix
|
|
372
|
+
// `%`/`px` operands freely, so nesting `max()` inside them needs no
|
|
373
|
+
// further change there.
|
|
374
|
+
//
|
|
375
|
+
// The floor is one line of content plus the border (see the box-math note
|
|
376
|
+
// at the top of this file) — it used to be a bare `18px`, which is the
|
|
377
|
+
// same number at a 16px root but broke on any other, and which the fixed
|
|
378
|
+
// `py-1` then ate 8px of, leaving 8px of content box for a 16px line. That
|
|
379
|
+
// is what painted a 15-minute event's title *below* its own bottom border
|
|
380
|
+
// (the root is deliberately `overflow: visible`, so nothing clipped it).
|
|
381
|
+
//
|
|
382
|
+
// Deliberately cosmetic-only: `resolvePxPerMinute` (`schedule-geometry.ts`)
|
|
383
|
+
// and both gesture hooks measure the *day column*, never the chip, so a
|
|
384
|
+
// 15-minute chip drawn taller than its true duration still commits exact
|
|
385
|
+
// minutes, and its `top` edge — the one a user reads a start time off the
|
|
386
|
+
// gutter with — stays pixel-honest. Only the bottom edge inflates.
|
|
387
|
+
// The chip's *true* height, unfloored. The `max(..., calc(1rem + 2px))`
|
|
388
|
+
// floor lives at each use site above instead, because the resize preview
|
|
389
|
+
// has to do its arithmetic on the real value and floor the result — see its
|
|
390
|
+
// own comment. Baking the floor in here made the preview compound the
|
|
391
|
+
// error whenever a chip was already at or under one line of content.
|
|
392
|
+
"--sch-base-height": `${height}%`,
|
|
393
|
+
"--sch-chip-z": insets.zIndex,
|
|
394
|
+
"--sch-chip-w": insets.width,
|
|
395
|
+
left: insets.left,
|
|
396
|
+
}) as CSSProperties
|
|
397
|
+
|
|
398
|
+
/** The details popover's panel width is content-driven, not trigger-matched
|
|
399
|
+
* — an event chip can be a narrow sliver, which would make a `"target"`-
|
|
400
|
+
* width panel absurdly cramped. Capped so a long description can't sprawl,
|
|
401
|
+
* and so it fits the grid it portals into (`gridPanelMaxWidth`).
|
|
402
|
+
* `select-text` because the panel portals into the timed grid, which is
|
|
403
|
+
* `select-none` as a whole. */
|
|
404
|
+
const detailsPopoverContent = cn("select-text", gridPanelMaxWidth)
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Where the details panel opens: *beside* the chip, top-aligned, never above
|
|
408
|
+
* or below it. A timed chip can be as tall as the whole grid (a whole-day
|
|
409
|
+
* event), and then neither end has any room — a `bottom` panel landed below
|
|
410
|
+
* 24:00, off the bottom of the scroll area.
|
|
411
|
+
*
|
|
412
|
+
* - `flip` to the other side when this one is full (the last day columns).
|
|
413
|
+
* - `slide` keeps the panel inside the visible grid along the chip's length,
|
|
414
|
+
* so a whole-day event's panel stays in view while the grid scrolls;
|
|
415
|
+
* Floating UI's `limitShift` stops it at the chip's own ends.
|
|
416
|
+
* - `overlap` covers the case where neither side fits (Day view, or any
|
|
417
|
+
* column as wide as the grid): the panel is pushed back inside the grid,
|
|
418
|
+
* over the chip's visible part, rather than off its edge.
|
|
419
|
+
* - `boundary` is the grid minus its sticky header and gutter, so sliding
|
|
420
|
+
* stops where the panel would tuck under them.
|
|
421
|
+
*/
|
|
422
|
+
/** The duration (ms) and easing CSS would transition `property` with, from
|
|
423
|
+
* the element's computed `transition` lists — `undefined` when it wouldn't
|
|
424
|
+
* (`transition-none`: dragging, resizing, reduced motion). */
|
|
425
|
+
const cssTransitionOf = (el: Element, property: string) => {
|
|
426
|
+
const style = getComputedStyle(el)
|
|
427
|
+
const index = style.transitionProperty.split(", ").indexOf(property)
|
|
428
|
+
if (index < 0) return undefined
|
|
429
|
+
// The lists repeat to the property list's length; commas inside
|
|
430
|
+
// `cubic-bezier(...)` are not separators.
|
|
431
|
+
const at = (list: string[]) => list[index % list.length] ?? ""
|
|
432
|
+
const duration = Number.parseFloat(at(style.transitionDuration.split(", "))) * 1000
|
|
433
|
+
const easing = at(style.transitionTimingFunction.split(/,\s*(?![^(]*\))/))
|
|
434
|
+
return duration > 0 ? { duration, easing } : undefined
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Keeps a chip's CSS motion working when React *moves* its node.
|
|
439
|
+
*
|
|
440
|
+
* The timed grid orders chips by start (so tab order follows the picture), and
|
|
441
|
+
* when two chips swap order React `insertBefore`s one of them. A browser treats
|
|
442
|
+
* that as a re-insertion: it restarts the node's CSS animations and drops its
|
|
443
|
+
* transitions (#237). So the moved chip used to replay its entrance — popping
|
|
444
|
+
* in from 92% scale, its open details popover flinching along — and never got
|
|
445
|
+
* the `left`/`width` slide its sibling did.
|
|
446
|
+
*
|
|
447
|
+
* - **Entrance**: dropped once it has played, so a move has nothing to
|
|
448
|
+
* restart. Only the chip's own `animationend` counts (React bubbles it
|
|
449
|
+
* through portals, so a child's or the popover's would end it early), and
|
|
450
|
+
* under any name — reduced motion swaps the keyframes for `fade-in`.
|
|
451
|
+
* - **Slide**: when `left`/`width` changed but the browser started no
|
|
452
|
+
* transition for it, the node was moved; the same slide is played from the
|
|
453
|
+
* old values instead, with the duration and easing read off the chip's own
|
|
454
|
+
* CSS, so `chipShell` stays the one place they are defined.
|
|
455
|
+
*/
|
|
456
|
+
function useChipMotion(
|
|
457
|
+
ref: RefObject<HTMLElement | null>,
|
|
458
|
+
insets: { left: string; width: string },
|
|
459
|
+
) {
|
|
460
|
+
const [entered, setEntered] = useState(false)
|
|
461
|
+
const onAnimationEnd = (e: ReactAnimationEvent<HTMLElement>) => {
|
|
462
|
+
if (e.target === e.currentTarget) setEntered(true)
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
const { left, width } = insets
|
|
466
|
+
const previous = useRef({ left, width })
|
|
467
|
+
useLayoutEffect(() => {
|
|
468
|
+
const from = previous.current
|
|
469
|
+
previous.current = { left, width }
|
|
470
|
+
const el = ref.current
|
|
471
|
+
if (!el || (from.left === left && from.width === width)) return
|
|
472
|
+
// `getAnimations()` flushes style first, so a node that stayed put already
|
|
473
|
+
// shows the transition CSS started for it.
|
|
474
|
+
const transitioned = el
|
|
475
|
+
.getAnimations()
|
|
476
|
+
.some(
|
|
477
|
+
(a) =>
|
|
478
|
+
a instanceof CSSTransition &&
|
|
479
|
+
(a.transitionProperty === "left" || a.transitionProperty === "width"),
|
|
480
|
+
)
|
|
481
|
+
const slide = cssTransitionOf(el, "left")
|
|
482
|
+
if (transitioned || !slide) return
|
|
483
|
+
el.animate([{ left: from.left, width: from.width }, {}], slide)
|
|
484
|
+
}, [ref, left, width])
|
|
485
|
+
|
|
486
|
+
return { entered, onAnimationEnd }
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
const detailsPositioning = (anchor: RefObject<Element | null>): PopoverProps["positioning"] => ({
|
|
490
|
+
placement: "right-start",
|
|
491
|
+
flip: ["left-start"],
|
|
492
|
+
slide: true,
|
|
493
|
+
overlap: true,
|
|
494
|
+
boundary: () => timedGridViewport(anchor.current),
|
|
495
|
+
})
|
|
496
|
+
|
|
497
|
+
function ChipContent<P>({
|
|
498
|
+
event,
|
|
499
|
+
locale,
|
|
500
|
+
classNames,
|
|
501
|
+
reserveRemoveSpace,
|
|
502
|
+
}: {
|
|
503
|
+
event: ScheduleAnyEvent<P>
|
|
504
|
+
locale?: string
|
|
505
|
+
classNames?: ScheduleEventChipClassNames
|
|
506
|
+
/** The remove button (`InteractiveEventChip`, whenever `editable` grants
|
|
507
|
+
* `"remove"` for this event) is absolutely positioned over the chip's own
|
|
508
|
+
* content instead of laid out beside it — so a title/time line long enough
|
|
509
|
+
* to truncate at the chip's full width would otherwise render right under
|
|
510
|
+
* it, unreadable. Reserves just enough end-inset to clear the button's
|
|
511
|
+
* *hit* area before text starts truncating: 24px wide, ending 0px from the
|
|
512
|
+
* padding box's inline end, against which the root's own `px-2` already
|
|
513
|
+
* supplies 8px — hence `pe-5` (20px) on this column rather than the 24px
|
|
514
|
+
* the hit area itself spans.
|
|
515
|
+
*
|
|
516
|
+
* Must be driven by the same condition that renders the button, i.e.
|
|
517
|
+
* `canRemove`, and NOT by `onEventRemove != null`: every chip is handed
|
|
518
|
+
* `ScheduleTimedGrid`'s own `handleEventRemove` (an unconditional
|
|
519
|
+
* `useCallback` that announces, then optional-chains the consumer's
|
|
520
|
+
* handler), so that test is a constant `true` and used to reserve 20px on
|
|
521
|
+
* every interactive chip for a button that a default, read-only
|
|
522
|
+
* `Schedule` never renders. */
|
|
523
|
+
reserveRemoveSpace?: boolean
|
|
524
|
+
}) {
|
|
525
|
+
return (
|
|
526
|
+
// The chip root's vertical padding lives here (see `chipShell`), stepping
|
|
527
|
+
// 0 -> 2px -> 4px as the chip's own content box clears one line, one line
|
|
528
|
+
// plus half the padding, then one line plus all of it. A 15-minute event
|
|
529
|
+
// at the default density only has ~16px of content box to work with, so
|
|
530
|
+
// giving that box entirely to the single title line is what makes it read;
|
|
531
|
+
// anything taller gets the normal `py-1` back.
|
|
532
|
+
<div
|
|
533
|
+
className={cn(
|
|
534
|
+
"flex items-start gap-1 py-0",
|
|
535
|
+
"[@container_sch-chip_(height>=calc(1rem+4px))]:py-0.5",
|
|
536
|
+
"[@container_sch-chip_(height>=calc(1rem+8px))]:py-1",
|
|
537
|
+
)}
|
|
538
|
+
>
|
|
539
|
+
{event.icon != null ? (
|
|
540
|
+
<span className={cn("mt-0.5 shrink-0 [&_svg]:size-3", classNames?.icon)}>{event.icon}</span>
|
|
541
|
+
) : null}
|
|
542
|
+
<div className={cn("min-w-0 flex-1", reserveRemoveSpace && "pe-5")}>
|
|
543
|
+
<p className={cn("truncate font-medium", classNames?.title)}>{event.title}</p>
|
|
544
|
+
{/* Always rendered, revealed by a size query on the chip's *real*
|
|
545
|
+
height rather than the floor-derived estimate this used to guess
|
|
546
|
+
with — which under-read a stretched column and so withheld the row
|
|
547
|
+
from chips that had room, and over-read nothing, which is why a
|
|
548
|
+
45-minute event used to render a second line ~6px past its own
|
|
549
|
+
bottom border. `hidden` is the default so an engine without
|
|
550
|
+
container queries fails *closed*, with the title still readable.
|
|
551
|
+
Hiding it costs assistive tech nothing: the chip's own `aria-label`
|
|
552
|
+
always carries the full range. */}
|
|
553
|
+
<p
|
|
554
|
+
className={cn(
|
|
555
|
+
// `group-data-selected:` tracks the chip's filled state — the
|
|
556
|
+
// plain `--c-text` below is dark-on-dark once the root paints
|
|
557
|
+
// `--c-solid`.
|
|
558
|
+
"hidden truncate text-(--c-text)/80 group-data-selected:text-(--c-on-solid)/80",
|
|
559
|
+
// Follows the root's own color transition, or the label would snap
|
|
560
|
+
// while the fill behind it fades.
|
|
561
|
+
"transition-colors duration-150 ease-out motion-reduce:transition-none",
|
|
562
|
+
"[@container_sch-chip_(height>=calc(2rem+8px))]:block",
|
|
563
|
+
classNames?.time,
|
|
564
|
+
)}
|
|
565
|
+
>
|
|
566
|
+
{timeRangeLabel(event.start, event.end, locale)}
|
|
567
|
+
</p>
|
|
568
|
+
</div>
|
|
569
|
+
</div>
|
|
570
|
+
)
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
export type ScheduleEventChipProps<P = unknown> = {
|
|
574
|
+
event: ScheduleAnyEvent<P>
|
|
575
|
+
/** Whether this chip is the piece carrying the event's **real** start —
|
|
576
|
+
* false for a piece that begins at a midnight cut, at `startHour`, or at
|
|
577
|
+
* the visible window's first day (`ScheduleSegment.isFirst`). Only the
|
|
578
|
+
* piece that owns an edge renders that edge's resize grip: a grip on a
|
|
579
|
+
* clipped edge would drag a boundary that isn't on screen. */
|
|
580
|
+
isFirst?: boolean
|
|
581
|
+
/** As `isFirst`, for the end edge. */
|
|
582
|
+
isLast?: boolean
|
|
583
|
+
/** 0-based column this piece is painted in — a drag's day delta is measured
|
|
584
|
+
* from the grabbed piece, not from the event's own start. */
|
|
585
|
+
dayIndex?: number
|
|
586
|
+
/** The date of that column — the origin a resize offsets calendar days from
|
|
587
|
+
* once its edge leaves the column. Required rather than derived: for a
|
|
588
|
+
* multi-day event's later pieces, neither `event.start` nor anything else
|
|
589
|
+
* on the event identifies the column this particular piece is painted in. */
|
|
590
|
+
day: Date
|
|
591
|
+
timeZone?: string
|
|
592
|
+
/** The rendered window, for the drag ghost's own percentage math. */
|
|
593
|
+
startHour?: number
|
|
594
|
+
totalWindowMinutes?: number
|
|
595
|
+
/** Page the view by one range, while a drag is held against a grid edge
|
|
596
|
+
* that can no longer scroll. Internal — never a public Schedule prop. */
|
|
597
|
+
onPaginate?: (direction: -1 | 1) => void
|
|
598
|
+
/** Percentage (0–100) of the day-column's own total height. */
|
|
599
|
+
top: number
|
|
600
|
+
/** Percentage (0–100) of the day-column's own total height. Consumers
|
|
601
|
+
* apply a `max(height%, calc(1rem + 2px))` CSS floor, not a JS one — a
|
|
602
|
+
* percentage can't express "at least one line of content" as a flat number
|
|
603
|
+
* once the column's real rendered height can vary. */
|
|
604
|
+
height: number
|
|
605
|
+
insets: { left: string; width: string; zIndex: number }
|
|
606
|
+
slotDuration: number
|
|
607
|
+
/** Already resolved to a whole number of slots — see `resolveSlotDurations`. */
|
|
608
|
+
minDuration: number
|
|
609
|
+
resizeCollision: ScheduleCollision
|
|
610
|
+
maxDuration?: number
|
|
611
|
+
slotDisabled?: ScheduleSlotPredicate
|
|
612
|
+
/** Schedule-level `editable` grant, already resolved per-gesture by the
|
|
613
|
+
* caller (`isEditGestureEnabled`) — composed here with the event's own
|
|
614
|
+
* `editable` (narrow-only) via `isEventGestureEnabled`. */
|
|
615
|
+
editableDrag?: boolean
|
|
616
|
+
editableResize?: boolean
|
|
617
|
+
editableRemove?: boolean
|
|
618
|
+
/** RFC §12a, axis A already resolved per-gesture by the caller. */
|
|
619
|
+
preventOverlapOnDrag?: boolean
|
|
620
|
+
preventOverlapOnResize?: boolean
|
|
621
|
+
/** RFC §12a, axis B already resolved by the caller for this day. */
|
|
622
|
+
overlapCandidates?: { id: string; start: Date; end: Date }[]
|
|
623
|
+
/** Already resolved by the caller against the schedule's `selected` ids. */
|
|
624
|
+
selected?: boolean
|
|
625
|
+
/** Selected *and* first in the list — the one chip whose details popover
|
|
626
|
+
* opens. Defaults to `selected`, the single-id case. */
|
|
627
|
+
anchor?: boolean
|
|
628
|
+
/** Fires with the event on a resolved click, or `null` when the details
|
|
629
|
+
* popover is dismissed. Named `onEventSelect`, not `onSelect`, so it can
|
|
630
|
+
* never collide with the DOM prop of that name if a chip ever moves onto an
|
|
631
|
+
* `ark.*` root. */
|
|
632
|
+
onEventSelect?: (event: ScheduleAnyEvent<P> | null) => void
|
|
633
|
+
/** Whether the built-in details popover mounts for this chip when selected. */
|
|
634
|
+
withEventDetails?: boolean
|
|
635
|
+
/**
|
|
636
|
+
* Whether this chip is still in `data`, or is an outgoing copy playing its
|
|
637
|
+
* exit.
|
|
638
|
+
*
|
|
639
|
+
* Derived by `ScheduleTimedGrid` from `data` itself — an event that was there
|
|
640
|
+
* last render and is not there now — so removal animates however it happened:
|
|
641
|
+
* the `x`, a consumer's own delete button, a server push. The chip is told,
|
|
642
|
+
* it never decides.
|
|
643
|
+
*/
|
|
644
|
+
present?: boolean
|
|
645
|
+
/** The exit animation finished, so this outgoing copy can be dropped. */
|
|
646
|
+
onExitComplete?: (event: ScheduleEvent<P>) => void
|
|
647
|
+
onEventChange?: (
|
|
648
|
+
event: ScheduleEvent<P>,
|
|
649
|
+
next: { start: Date; end: Date },
|
|
650
|
+
reason: "drag" | "resize",
|
|
651
|
+
) => void
|
|
652
|
+
onEventRemove?: (event: ScheduleEvent<P>) => void
|
|
653
|
+
/** Overrides the built-in event-details popover's content. */
|
|
654
|
+
renderEventDetails?: (event: ScheduleAnyEvent<P>) => ReactNode
|
|
655
|
+
locale?: string
|
|
656
|
+
translations: Required<ScheduleTranslations>
|
|
657
|
+
classNames?: ScheduleEventChipClassNames
|
|
658
|
+
/** `ScheduleClassNames.eventDetailsPopover` — the popover panel itself,
|
|
659
|
+
* not a chip part, so it's threaded separately from `classNames` above. */
|
|
660
|
+
detailsPopoverClassName?: string
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
/** Read-only: a plain, real `<button>` (no nested interactive children, so
|
|
664
|
+
* the native element is valid) — native keyboard/click semantics for free,
|
|
665
|
+
* no drag/resize hooks called at all. */
|
|
666
|
+
function StaticEventChip<P = unknown>({
|
|
667
|
+
event,
|
|
668
|
+
isFirst = true,
|
|
669
|
+
isLast = true,
|
|
670
|
+
top,
|
|
671
|
+
height,
|
|
672
|
+
insets,
|
|
673
|
+
selected = false,
|
|
674
|
+
anchor = selected,
|
|
675
|
+
onEventSelect,
|
|
676
|
+
withEventDetails = true,
|
|
677
|
+
renderEventDetails,
|
|
678
|
+
locale,
|
|
679
|
+
classNames,
|
|
680
|
+
detailsPopoverClassName,
|
|
681
|
+
}: Omit<
|
|
682
|
+
ScheduleEventChipProps<P>,
|
|
683
|
+
| "slotDuration"
|
|
684
|
+
| "minDuration"
|
|
685
|
+
| "slotDisabled"
|
|
686
|
+
| "editableDrag"
|
|
687
|
+
| "editableResize"
|
|
688
|
+
| "editableRemove"
|
|
689
|
+
| "preventOverlapOnDrag"
|
|
690
|
+
| "preventOverlapOnResize"
|
|
691
|
+
| "overlapCandidates"
|
|
692
|
+
| "onEventChange"
|
|
693
|
+
| "onEventRemove"
|
|
694
|
+
| "translations"
|
|
695
|
+
> & { event: ScheduleStaticEvent<P> }) {
|
|
696
|
+
// The selection decides both, so there is no local open state to drift from
|
|
697
|
+
// it: a chip's popover is open exactly when that chip is the anchor.
|
|
698
|
+
const showDetailsPopover = withEventDetails
|
|
699
|
+
const detailsOpen = showDetailsPopover && anchor
|
|
700
|
+
const buttonRef = useRef<HTMLButtonElement>(null)
|
|
701
|
+
const motion = useChipMotion(buttonRef, insets)
|
|
702
|
+
|
|
703
|
+
const button = (
|
|
704
|
+
<button
|
|
705
|
+
ref={buttonRef}
|
|
706
|
+
type="button"
|
|
707
|
+
data-schedule-part="event-chip"
|
|
708
|
+
data-kind={event.kind}
|
|
709
|
+
data-color={event.color ?? "pink"}
|
|
710
|
+
{...dataProps({
|
|
711
|
+
"data-testid": event.testId ?? event.id,
|
|
712
|
+
// Stable identity for the drag gesture, which collects every piece of
|
|
713
|
+
// one event across columns. Can't reuse `data-testid` — a consumer can
|
|
714
|
+
// override that per event via `event.testId`.
|
|
715
|
+
"data-event-id": event.id,
|
|
716
|
+
// `props()` drops JS-falsy entries, so an ordinary single-day chip
|
|
717
|
+
// (isFirst && isLast) emits neither attribute and its DOM stays
|
|
718
|
+
// byte-identical to before segmentation.
|
|
719
|
+
"data-continues-before": !isFirst,
|
|
720
|
+
"data-continues-after": !isLast,
|
|
721
|
+
"data-selected": selected,
|
|
722
|
+
})}
|
|
723
|
+
onClick={() => onEventSelect?.(event)}
|
|
724
|
+
onAnimationEnd={motion.onAnimationEnd}
|
|
725
|
+
aria-label={`${event.title}, ${timeRangeLabel(event.start, event.end, locale)}`}
|
|
726
|
+
{...(showDetailsPopover
|
|
727
|
+
? { "aria-haspopup": "dialog" as const, "aria-expanded": detailsOpen }
|
|
728
|
+
: {})}
|
|
729
|
+
className={cn(
|
|
730
|
+
chipShell({ kind: "static" }),
|
|
731
|
+
// `group` so `ChipContent`'s own descendants can track the selected
|
|
732
|
+
// fill (`group-data-selected:`); the interactive chip already has one.
|
|
733
|
+
"group",
|
|
734
|
+
!motion.entered && "animate-schedule-chip-in",
|
|
735
|
+
classNames?.root,
|
|
736
|
+
)}
|
|
737
|
+
style={chipShellStyle(top, height, insets)}
|
|
738
|
+
>
|
|
739
|
+
<ChipContent event={event} locale={locale} classNames={classNames} />
|
|
740
|
+
</button>
|
|
741
|
+
)
|
|
742
|
+
|
|
743
|
+
if (!showDetailsPopover) return button
|
|
744
|
+
|
|
745
|
+
return (
|
|
746
|
+
<Popover.Root
|
|
747
|
+
// Every Schedule popover is `lazyMount`: a grid holds one per chip, and
|
|
748
|
+
// mounting them all closed cost a hidden panel each. It is also what
|
|
749
|
+
// lets the panel portal straight into the scroller on its first render
|
|
750
|
+
// — by the time one opens, the grid's ref is attached (see
|
|
751
|
+
// `lib/overlay-container.tsx`).
|
|
752
|
+
lazyMount
|
|
753
|
+
open={detailsOpen}
|
|
754
|
+
onOpenChange={(d) => {
|
|
755
|
+
// Closing is a deselect: dismissing the popover (outside click, Escape)
|
|
756
|
+
// has to clear the state that opened it, or the chip would stay painted
|
|
757
|
+
// selected with nothing showing and be unable to reopen.
|
|
758
|
+
if (!d.open) onEventSelect?.(null)
|
|
759
|
+
}}
|
|
760
|
+
width="auto"
|
|
761
|
+
positioning={detailsPositioning(buttonRef)}
|
|
762
|
+
>
|
|
763
|
+
<Popover.Trigger asChild>{button}</Popover.Trigger>
|
|
764
|
+
<Popover.Content
|
|
765
|
+
className={cn(detailsPopoverContent, detailsPopoverClassName)}
|
|
766
|
+
// React portals propagate events through the *React* tree, not the DOM
|
|
767
|
+
// tree, so a pointerdown anywhere in this popover still reaches the day
|
|
768
|
+
// column's own `onPointerDown` — which arms click-drag-to-create and
|
|
769
|
+
// calls `setPointerCapture`. The capture then retargets pointerup and
|
|
770
|
+
// click to the column, and the control the user actually pressed never
|
|
771
|
+
// receives its click. (Verified in Chromium: pointerdown lands on the
|
|
772
|
+
// button, pointerup and click on `[data-schedule-part="day-column"]`.)
|
|
773
|
+
// The inline remove button already stops propagation for exactly this
|
|
774
|
+
// reason; doing it here covers every interactive thing the popover can
|
|
775
|
+
// contain — the Remove action, a link inside `description`, and
|
|
776
|
+
// whatever a consumer renders through `renderEventDetails`.
|
|
777
|
+
onPointerDown={(e) => e.stopPropagation()}
|
|
778
|
+
>
|
|
779
|
+
<Popover.Body>
|
|
780
|
+
<ScheduleEventDetailsContent
|
|
781
|
+
event={event}
|
|
782
|
+
locale={locale}
|
|
783
|
+
renderEventDetails={renderEventDetails}
|
|
784
|
+
/>
|
|
785
|
+
</Popover.Body>
|
|
786
|
+
</Popover.Content>
|
|
787
|
+
</Popover.Root>
|
|
788
|
+
)
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
/** Draggable, resizable, removable. */
|
|
792
|
+
function InteractiveEventChip<P = unknown>({
|
|
793
|
+
event,
|
|
794
|
+
onPaginate,
|
|
795
|
+
dayIndex = 0,
|
|
796
|
+
day,
|
|
797
|
+
timeZone = "UTC",
|
|
798
|
+
startHour = 0,
|
|
799
|
+
totalWindowMinutes = 1440,
|
|
800
|
+
isFirst = true,
|
|
801
|
+
isLast = true,
|
|
802
|
+
top,
|
|
803
|
+
height,
|
|
804
|
+
insets,
|
|
805
|
+
slotDuration,
|
|
806
|
+
minDuration,
|
|
807
|
+
resizeCollision,
|
|
808
|
+
maxDuration,
|
|
809
|
+
slotDisabled,
|
|
810
|
+
editableDrag,
|
|
811
|
+
editableResize,
|
|
812
|
+
editableRemove,
|
|
813
|
+
preventOverlapOnDrag,
|
|
814
|
+
preventOverlapOnResize,
|
|
815
|
+
overlapCandidates,
|
|
816
|
+
selected = false,
|
|
817
|
+
anchor = selected,
|
|
818
|
+
onEventSelect,
|
|
819
|
+
withEventDetails = true,
|
|
820
|
+
present = true,
|
|
821
|
+
onExitComplete,
|
|
822
|
+
onEventChange,
|
|
823
|
+
onEventRemove,
|
|
824
|
+
renderEventDetails,
|
|
825
|
+
locale,
|
|
826
|
+
translations,
|
|
827
|
+
classNames,
|
|
828
|
+
detailsPopoverClassName,
|
|
829
|
+
}: ScheduleEventChipProps<P> & { event: ScheduleEvent<P> }) {
|
|
830
|
+
const showDetailsPopover = withEventDetails
|
|
831
|
+
const detailsOpen = showDetailsPopover && anchor
|
|
832
|
+
const chipRef = useRef<HTMLDivElement>(null)
|
|
833
|
+
const motion = useChipMotion(chipRef, insets)
|
|
834
|
+
// The remove button commits immediately; the *animation* is driven by `data`
|
|
835
|
+
// afterwards. `ScheduleTimedGrid` keeps an outgoing copy of any event that
|
|
836
|
+
// has left `data` and renders it with `present: false`, so Ark's presence
|
|
837
|
+
// machine plays `data-[state=closed]:animate-schedule-chip-out`, waits for
|
|
838
|
+
// that animation's real `animationend`, and reports back so the copy can be
|
|
839
|
+
// dropped.
|
|
840
|
+
//
|
|
841
|
+
// This used to be inverted — the button deferred `onEventRemove` until the
|
|
842
|
+
// exit finished — which meant only the built-in button could animate a
|
|
843
|
+
// removal, and a consumer who ignored the callback left the chip invisible
|
|
844
|
+
// forever. Schedule never mutates `data` (`schedule-types.ts`), so an
|
|
845
|
+
// outgoing copy is still the only way to animate an exit at all; it is just
|
|
846
|
+
// derived from the data now rather than from who clicked what. No
|
|
847
|
+
// `unmountOnExit`/`lazyMount`: `presence.unmounted` is never read.
|
|
848
|
+
const presence = usePresence({ present, onExitComplete: () => onExitComplete?.(event) })
|
|
849
|
+
// The event's own `editable`, composed with the already-resolved
|
|
850
|
+
// schedule-level grant — narrow-only, see `isEventGestureEnabled`.
|
|
851
|
+
const canDrag = isEventGestureEnabled(editableDrag ?? false, event, "drag")
|
|
852
|
+
const canResize = isEventGestureEnabled(editableResize ?? false, event, "resize")
|
|
853
|
+
const canRemove = isEventGestureEnabled(editableRemove ?? false, event, "remove")
|
|
854
|
+
// The one resolved-click call site both the pointer gesture and the keyboard
|
|
855
|
+
// path below funnel through — so selection behaves identically per input
|
|
856
|
+
// method. Crucially this is NOT a DOM `onClick`: the pointer path only
|
|
857
|
+
// reaches it from `use-event-drag.ts`'s `maxAbsDelta < CLICK_SLOP` branch, so
|
|
858
|
+
// hanging selection here inherits that already-correct click-vs-drag
|
|
859
|
+
// resolution for free. A real drag takes the commit branch and never selects.
|
|
860
|
+
const resolvedOnEventClick = ((selectedEvent: ScheduleEvent<P>) =>
|
|
861
|
+
onEventSelect?.(selectedEvent)) as (event: ScheduleEvent<P>) => void
|
|
862
|
+
// `use-event-drag.ts`/`use-event-resize.ts` are non-generic (their
|
|
863
|
+
// `event`/`onEventChange` are typed `ScheduleEvent` = `ScheduleEvent<unknown>`)
|
|
864
|
+
// — safe in practice, since each hook only ever forwards back the same
|
|
865
|
+
// `ScheduleEvent<P>` object it was given, but not provable structurally
|
|
866
|
+
// through a contravariant function-parameter position. Cast once, same
|
|
867
|
+
// precedent as the resolved click handler above.
|
|
868
|
+
const resolvedOnEventChange = onEventChange as
|
|
869
|
+
| ((event: ScheduleEvent, next: { start: Date; end: Date }, reason: "drag" | "resize") => void)
|
|
870
|
+
| undefined
|
|
871
|
+
|
|
872
|
+
const drag = useEventDrag({
|
|
873
|
+
event,
|
|
874
|
+
dayIndex,
|
|
875
|
+
day,
|
|
876
|
+
endHour: startHour + totalWindowMinutes / 60,
|
|
877
|
+
timeZone,
|
|
878
|
+
startHour,
|
|
879
|
+
totalWindowMinutes,
|
|
880
|
+
onPaginate,
|
|
881
|
+
locale,
|
|
882
|
+
enabled: canDrag,
|
|
883
|
+
slotDuration,
|
|
884
|
+
slotDisabled,
|
|
885
|
+
preventOverlap: preventOverlapOnDrag,
|
|
886
|
+
overlapCandidates,
|
|
887
|
+
onEventChange: resolvedOnEventChange,
|
|
888
|
+
onEventClick: resolvedOnEventClick as (event: ScheduleEvent) => void,
|
|
889
|
+
})
|
|
890
|
+
const resizeStart = useEventResize({
|
|
891
|
+
event,
|
|
892
|
+
edge: "start",
|
|
893
|
+
day,
|
|
894
|
+
dayIndex,
|
|
895
|
+
timeZone,
|
|
896
|
+
startHour,
|
|
897
|
+
endHour: startHour + totalWindowMinutes / 60,
|
|
898
|
+
onPaginate,
|
|
899
|
+
slotDuration,
|
|
900
|
+
// `useEventResize` only ever resizes, so the prefix is redundant inside it.
|
|
901
|
+
collision: resizeCollision,
|
|
902
|
+
minDurationMinutes: minDuration,
|
|
903
|
+
maxDurationMinutes: maxDuration,
|
|
904
|
+
slotDisabled,
|
|
905
|
+
preventOverlap: preventOverlapOnResize,
|
|
906
|
+
overlapCandidates,
|
|
907
|
+
onEventChange: resolvedOnEventChange,
|
|
908
|
+
locale,
|
|
909
|
+
})
|
|
910
|
+
const resizeEnd = useEventResize({
|
|
911
|
+
event,
|
|
912
|
+
edge: "end",
|
|
913
|
+
day,
|
|
914
|
+
dayIndex,
|
|
915
|
+
timeZone,
|
|
916
|
+
startHour,
|
|
917
|
+
endHour: startHour + totalWindowMinutes / 60,
|
|
918
|
+
onPaginate,
|
|
919
|
+
slotDuration,
|
|
920
|
+
// `useEventResize` only ever resizes, so the prefix is redundant inside it.
|
|
921
|
+
collision: resizeCollision,
|
|
922
|
+
minDurationMinutes: minDuration,
|
|
923
|
+
maxDurationMinutes: maxDuration,
|
|
924
|
+
slotDisabled,
|
|
925
|
+
preventOverlap: preventOverlapOnResize,
|
|
926
|
+
overlapCandidates,
|
|
927
|
+
onEventChange: resolvedOnEventChange,
|
|
928
|
+
locale,
|
|
929
|
+
})
|
|
930
|
+
|
|
931
|
+
const handleBodyKeyDown = (e: ReactKeyboardEvent<HTMLDivElement>) => {
|
|
932
|
+
if (!present) return
|
|
933
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
934
|
+
e.preventDefault()
|
|
935
|
+
resolvedOnEventClick(event)
|
|
936
|
+
return
|
|
937
|
+
}
|
|
938
|
+
if (!canDrag) return
|
|
939
|
+
const isVertical = e.key === "ArrowUp" || e.key === "ArrowDown"
|
|
940
|
+
const isHorizontal = e.key === "ArrowLeft" || e.key === "ArrowRight"
|
|
941
|
+
if (!isVertical && !isHorizontal) return
|
|
942
|
+
// Mandatory: the grid root is `overflow-auto`, so an unhandled arrow
|
|
943
|
+
// scrolls it instead of moving anything.
|
|
944
|
+
e.preventDefault()
|
|
945
|
+
// Left/Right move by a whole day, with no modifier variants — the
|
|
946
|
+
// keyboard counterpart of dragging sideways. Up/Down keep their existing
|
|
947
|
+
// `slotDuration` step (Shift ×4). Both go through the same displacement
|
|
948
|
+
// primitive as the pointer path, so "a move never changes duration" is one
|
|
949
|
+
// rule rather than two implementations of it.
|
|
950
|
+
const step = e.shiftKey ? slotDuration * 4 : slotDuration
|
|
951
|
+
const delta = isHorizontal
|
|
952
|
+
? { days: e.key === "ArrowLeft" ? -1 : 1, minutes: 0 }
|
|
953
|
+
: { days: 0, minutes: e.key === "ArrowUp" ? -step : step }
|
|
954
|
+
const next = { ...moveRange(event, delta, { timeZone, slotDuration }) }
|
|
955
|
+
const result = checkRangeCommit(next, {
|
|
956
|
+
slotDisabled,
|
|
957
|
+
timeZone,
|
|
958
|
+
preventOverlap: preventOverlapOnDrag,
|
|
959
|
+
overlapCandidates,
|
|
960
|
+
excludeId: event.id,
|
|
961
|
+
})
|
|
962
|
+
if (!result.ok) {
|
|
963
|
+
flashRejected(e.currentTarget, result.reason)
|
|
964
|
+
return
|
|
965
|
+
}
|
|
966
|
+
onEventChange?.(event, next, "drag")
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
const chipBody = (
|
|
970
|
+
// biome-ignore lint/a11y/useSemanticElements: no native element supports both a drag/resize gesture and a nested remove <button> — a <button> can't contain interactive children
|
|
971
|
+
<div
|
|
972
|
+
ref={mergeRefs(presence.ref, chipRef)}
|
|
973
|
+
{...drag.getBodyProps()}
|
|
974
|
+
{...presence.getPresenceProps()}
|
|
975
|
+
data-schedule-part="event-chip"
|
|
976
|
+
data-kind={event.kind}
|
|
977
|
+
data-color={event.color ?? "pink"}
|
|
978
|
+
{...dataProps({
|
|
979
|
+
"data-testid": event.testId ?? event.id,
|
|
980
|
+
// Stable identity for the drag gesture, which collects every piece of
|
|
981
|
+
// one event across columns. Can't reuse `data-testid` — a consumer can
|
|
982
|
+
// override that per event via `event.testId`.
|
|
983
|
+
"data-event-id": event.id,
|
|
984
|
+
// `props()` drops JS-falsy entries, so an ordinary single-day chip
|
|
985
|
+
// (isFirst && isLast) emits neither attribute and its DOM stays
|
|
986
|
+
// byte-identical to before segmentation.
|
|
987
|
+
"data-continues-before": !isFirst,
|
|
988
|
+
"data-continues-after": !isLast,
|
|
989
|
+
"data-selected": selected,
|
|
990
|
+
})}
|
|
991
|
+
tabIndex={present ? 0 : -1}
|
|
992
|
+
role="button"
|
|
993
|
+
aria-label={`${event.title}, ${timeRangeLabel(event.start, event.end, locale)}`}
|
|
994
|
+
{...(showDetailsPopover
|
|
995
|
+
? { "aria-haspopup": "dialog" as const, "aria-expanded": detailsOpen }
|
|
996
|
+
: {})}
|
|
997
|
+
onKeyDown={handleBodyKeyDown}
|
|
998
|
+
onAnimationEnd={motion.onAnimationEnd}
|
|
999
|
+
className={cn(
|
|
1000
|
+
"group",
|
|
1001
|
+
chipShell({ kind: "event" }),
|
|
1002
|
+
canDrag ? "cursor-grab active:cursor-grabbing touch-none" : "cursor-default",
|
|
1003
|
+
!motion.entered && "data-[state=open]:animate-schedule-chip-in",
|
|
1004
|
+
"data-[state=closed]:animate-schedule-chip-out data-[state=closed]:pointer-events-none",
|
|
1005
|
+
classNames?.root,
|
|
1006
|
+
)}
|
|
1007
|
+
style={chipShellStyle(top, height, insets)}
|
|
1008
|
+
>
|
|
1009
|
+
<ChipContent
|
|
1010
|
+
event={event}
|
|
1011
|
+
locale={locale}
|
|
1012
|
+
classNames={classNames}
|
|
1013
|
+
reserveRemoveSpace={canRemove}
|
|
1014
|
+
/>
|
|
1015
|
+
|
|
1016
|
+
{/* A grip renders only on the piece that actually owns that edge, so a
|
|
1017
|
+
* three-day event shows a top grip on day 1, a bottom grip on day 3,
|
|
1018
|
+
* and none at all on day 2. The same rule covers a piece clipped by
|
|
1019
|
+
* `startHour`/`endHour` or by the window's edge — `isFirst`/`isLast`
|
|
1020
|
+
* make all of those one fact, not three cases. */}
|
|
1021
|
+
{canResize && isFirst ? (
|
|
1022
|
+
<div
|
|
1023
|
+
{...resizeStart.getHandleProps()}
|
|
1024
|
+
className={cn(gripBase, gripTop, classNames?.grip)}
|
|
1025
|
+
/>
|
|
1026
|
+
) : null}
|
|
1027
|
+
{canResize && isLast ? (
|
|
1028
|
+
<div
|
|
1029
|
+
{...resizeEnd.getHandleProps()}
|
|
1030
|
+
className={cn(gripBase, gripBottom, classNames?.grip)}
|
|
1031
|
+
/>
|
|
1032
|
+
) : null}
|
|
1033
|
+
|
|
1034
|
+
{canRemove ? (
|
|
1035
|
+
<button
|
|
1036
|
+
type="button"
|
|
1037
|
+
data-schedule-part="remove"
|
|
1038
|
+
aria-label={translations.removeEvent}
|
|
1039
|
+
onClick={(e) => {
|
|
1040
|
+
e.stopPropagation()
|
|
1041
|
+
onEventRemove?.(event)
|
|
1042
|
+
}}
|
|
1043
|
+
onPointerDown={(e) => e.stopPropagation()}
|
|
1044
|
+
className={cn(
|
|
1045
|
+
// The button's own box is exactly one line tall — `p-0.5` (0.125rem
|
|
1046
|
+
// x2) around a `size-3` (0.75rem) icon is `1rem`, the same height
|
|
1047
|
+
// as a `text-xs` line box — so it belongs on the *same* baseline
|
|
1048
|
+
// grid as the title's first line, and its top offset has to track
|
|
1049
|
+
// `ChipContent`'s `py-*` bands rather than sit at a fixed `top-1`.
|
|
1050
|
+
// Each band's lower bound is `1rem + 2*py`, so with `top == py` the
|
|
1051
|
+
// button ends at `py + 1rem <= 1rem + 2*py <= H` at *every* height,
|
|
1052
|
+
// fractional ones included — where the old fixed `top-1` needed
|
|
1053
|
+
// `1.25rem` of content box and a floored 15-minute chip only has
|
|
1054
|
+
// `1rem`, leaving the button hanging 3px past the bottom border
|
|
1055
|
+
// (the root is `overflow: visible`, so it painted outside).
|
|
1056
|
+
// Keep these two thresholds byte-identical to the `py-*` pair on
|
|
1057
|
+
// `ChipContent`'s row above — `schedule.test.tsx` asserts the two
|
|
1058
|
+
// encode the same bands, since Tailwind orders equal-specificity
|
|
1059
|
+
// at-rule variants by source order alone.
|
|
1060
|
+
"absolute top-0 inset-e-1 z-10 rounded-full p-0.5 text-(--c-text)",
|
|
1061
|
+
// Same reason as `ChipContent`'s time row: both the glyph and its
|
|
1062
|
+
// hover fill have to follow the selected chip's own surface.
|
|
1063
|
+
"group-data-selected:text-(--c-on-solid) group-data-selected:hover:bg-(--c-solid-hover)",
|
|
1064
|
+
"transition-colors duration-150 ease-out motion-reduce:transition-none",
|
|
1065
|
+
"[@container_sch-chip_(height>=calc(1rem+4px))]:top-0.5",
|
|
1066
|
+
"[@container_sch-chip_(height>=calc(1rem+8px))]:top-1",
|
|
1067
|
+
"hover:bg-(--c-soft-hover)",
|
|
1068
|
+
// Hit area, not visual: the circle the user sees is this button's
|
|
1069
|
+
// own `hover:bg-*`, so growing the button would grow the circle.
|
|
1070
|
+
// A pseudo-element instead — 24px wide always (`-inset-x-1` lands
|
|
1071
|
+
// its outer edge exactly on the padding box's inline end, and the
|
|
1072
|
+
// root's `px-2` keeps it clear of the `pe-5` text column), and
|
|
1073
|
+
// 24px tall once the chip can actually hold that.
|
|
1074
|
+
//
|
|
1075
|
+
// It must never reach outside the chip. `gripTop`/`gripBottom`
|
|
1076
|
+
// park their own hit strips immediately above and below the chip
|
|
1077
|
+
// across its full width — 44px of them under `pointer: coarse` —
|
|
1078
|
+
// at the same `z-10`, and this button renders after them, so any
|
|
1079
|
+
// vertical overhang here would win the hit test and quietly eat
|
|
1080
|
+
// the resize targets. Trading a resize gesture for a bigger
|
|
1081
|
+
// *destructive* target, on a strip that sits over a neighbouring
|
|
1082
|
+
// event, is a bad bargain in both directions.
|
|
1083
|
+
//
|
|
1084
|
+
// Hence both halves of the condition, neither redundant: the
|
|
1085
|
+
// `calc(1rem+8px)` band is what puts the button at `top-1`, i.e.
|
|
1086
|
+
// guarantees the 0.25rem above it that `-inset-y-1` spends, while
|
|
1087
|
+
// `1.5rem` is the total the expander occupies. They coincide at a
|
|
1088
|
+
// 16px root and diverge either side of it — `calc(1rem+8px)` is
|
|
1089
|
+
// the larger below 16px, `1.5rem` above — so requiring both is
|
|
1090
|
+
// what keeps this correct at 12/16/20px alike.
|
|
1091
|
+
"after:absolute after:-inset-x-1 after:inset-y-0 after:content-['']",
|
|
1092
|
+
"[@container_sch-chip_(height>=1.5rem)_and_(height>=calc(1rem+8px))]:after:-inset-y-1",
|
|
1093
|
+
focusStyles({ ring: "palette", offset: false }),
|
|
1094
|
+
// A small, isolated scale micro-interaction — safe here (unlike
|
|
1095
|
+
// the chip root) since this button has no other `transform` to
|
|
1096
|
+
// compose with or fight.
|
|
1097
|
+
"transition-transform duration-150 motion-reduce:transition-none",
|
|
1098
|
+
"hover:transform-[scale(1.08)] active:transform-[scale(0.92)]",
|
|
1099
|
+
classNames?.removeButton,
|
|
1100
|
+
)}
|
|
1101
|
+
>
|
|
1102
|
+
<XIcon className="size-3" />
|
|
1103
|
+
</button>
|
|
1104
|
+
) : null}
|
|
1105
|
+
</div>
|
|
1106
|
+
)
|
|
1107
|
+
|
|
1108
|
+
if (!showDetailsPopover) return chipBody
|
|
1109
|
+
|
|
1110
|
+
return (
|
|
1111
|
+
<Popover.Root
|
|
1112
|
+
lazyMount
|
|
1113
|
+
open={detailsOpen}
|
|
1114
|
+
onOpenChange={(d) => {
|
|
1115
|
+
// Closing is a deselect — see `StaticEventChip`'s own note.
|
|
1116
|
+
if (!d.open) onEventSelect?.(null)
|
|
1117
|
+
}}
|
|
1118
|
+
finalFocusEl={() => chipRef.current}
|
|
1119
|
+
width="auto"
|
|
1120
|
+
positioning={detailsPositioning(chipRef)}
|
|
1121
|
+
>
|
|
1122
|
+
<Popover.Anchor asChild>{chipBody}</Popover.Anchor>
|
|
1123
|
+
<Popover.Content
|
|
1124
|
+
className={cn(detailsPopoverContent, detailsPopoverClassName)}
|
|
1125
|
+
// React portals propagate events through the *React* tree, not the DOM
|
|
1126
|
+
// tree, so a pointerdown anywhere in this popover still reaches the day
|
|
1127
|
+
// column's own `onPointerDown` — which arms click-drag-to-create and
|
|
1128
|
+
// calls `setPointerCapture`. The capture then retargets pointerup and
|
|
1129
|
+
// click to the column, and the control the user actually pressed never
|
|
1130
|
+
// receives its click. (Verified in Chromium: pointerdown lands on the
|
|
1131
|
+
// button, pointerup and click on `[data-schedule-part="day-column"]`.)
|
|
1132
|
+
// The inline remove button already stops propagation for exactly this
|
|
1133
|
+
// reason; doing it here covers every interactive thing the popover can
|
|
1134
|
+
// contain — the Remove action, a link inside `description`, and
|
|
1135
|
+
// whatever a consumer renders through `renderEventDetails`.
|
|
1136
|
+
onPointerDown={(e) => e.stopPropagation()}
|
|
1137
|
+
>
|
|
1138
|
+
<Popover.Body>
|
|
1139
|
+
<ScheduleEventDetailsContent
|
|
1140
|
+
event={event}
|
|
1141
|
+
locale={locale}
|
|
1142
|
+
renderEventDetails={renderEventDetails}
|
|
1143
|
+
// The full-size removal path. The inline `(x)` is 16px wide and
|
|
1144
|
+
// cannot reach WCAG 2.2 SC 2.5.8's 24x24 on a floored short chip
|
|
1145
|
+
// without overhanging the chip and eating the resize grips' hit
|
|
1146
|
+
// strips, so the criterion is met for the *function* instead, via
|
|
1147
|
+
// its "bypass" exception: the same removal reachable from a
|
|
1148
|
+
// control that does clear the minimum. Routed through the same
|
|
1149
|
+
// callback the inline button uses, not a second one — closing the
|
|
1150
|
+
// popover first so focus returns to the chip before `data` drops it
|
|
1151
|
+
// and the exit starts.
|
|
1152
|
+
onRemove={
|
|
1153
|
+
canRemove
|
|
1154
|
+
? () => {
|
|
1155
|
+
// Deselect to close — the popover's open state IS the
|
|
1156
|
+
// selection now, so there is no separate flag to lower.
|
|
1157
|
+
onEventSelect?.(null)
|
|
1158
|
+
onEventRemove?.(event)
|
|
1159
|
+
}
|
|
1160
|
+
: undefined
|
|
1161
|
+
}
|
|
1162
|
+
removeLabel={translations.removeEvent}
|
|
1163
|
+
/>
|
|
1164
|
+
</Popover.Body>
|
|
1165
|
+
</Popover.Content>
|
|
1166
|
+
</Popover.Root>
|
|
1167
|
+
)
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
export function ScheduleEventChip<P = unknown>(props: ScheduleEventChipProps<P>): ReactNode {
|
|
1171
|
+
return props.event.kind === "event" ? (
|
|
1172
|
+
<InteractiveEventChip {...props} event={props.event} />
|
|
1173
|
+
) : (
|
|
1174
|
+
<StaticEventChip {...props} event={props.event} />
|
|
1175
|
+
)
|
|
1176
|
+
}
|