@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,1603 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { ThemeIcon } from '../../chunk-6I4R3HR6.js';
|
|
3
|
+
import '../../chunk-ZP6EBROY.js';
|
|
4
|
+
import { Table } from '../../chunk-YBJB7FGE.js';
|
|
5
|
+
import { Text } from '../../chunk-CSCVTESP.js';
|
|
6
|
+
import { Select } from '../../chunk-MOI7B3KH.js';
|
|
7
|
+
import { Skeleton } from '../../chunk-CHTN5AHI.js';
|
|
8
|
+
import '../../chunk-R5GMMWAY.js';
|
|
9
|
+
import '../../chunk-BJZLQTAZ.js';
|
|
10
|
+
import { Root, Trigger, Content, CheckboxItem } from '../../chunk-2762HZYX.js';
|
|
11
|
+
import { MultiComboboxList } from '../../chunk-IHYFYMHJ.js';
|
|
12
|
+
import { Pill } from '../../chunk-NGAQITWP.js';
|
|
13
|
+
import { serializeDateValue, DatePicker } from '../../chunk-PJL4ZL5V.js';
|
|
14
|
+
import { resolveHourCycle } from '../../chunk-FUWSTUDM.js';
|
|
15
|
+
import '../../chunk-44OV3PNH.js';
|
|
16
|
+
import { NumberInput } from '../../chunk-3GYOIQW7.js';
|
|
17
|
+
import '../../chunk-FMMKEYHB.js';
|
|
18
|
+
import { Flex } from '../../chunk-YKUCSV34.js';
|
|
19
|
+
import { ComboboxList } from '../../chunk-3NZXWCGF.js';
|
|
20
|
+
import { resolveCalendarTranslations } from '../../chunk-TMMEJKLI.js';
|
|
21
|
+
import '../../chunk-TCWYBVIL.js';
|
|
22
|
+
import { Card } from '../../chunk-VZH6TS7M.js';
|
|
23
|
+
import { Checkbox } from '../../chunk-P7A3BCAC.js';
|
|
24
|
+
import '../../chunk-NF5JM2YO.js';
|
|
25
|
+
import '../../chunk-UVYTJQTJ.js';
|
|
26
|
+
import { Drawer } from '../../chunk-2H46IXW4.js';
|
|
27
|
+
import '../../chunk-5FDOOG4J.js';
|
|
28
|
+
import '../../chunk-TWGCWKRV.js';
|
|
29
|
+
import '../../chunk-TNNH3FVQ.js';
|
|
30
|
+
import { Input } from '../../chunk-QMW7D5GU.js';
|
|
31
|
+
import '../../chunk-UNSAA7YG.js';
|
|
32
|
+
import '../../chunk-SKPM2FRX.js';
|
|
33
|
+
import '../../chunk-ORTCK34Y.js';
|
|
34
|
+
import { Button } from '../../chunk-U5GW5EBR.js';
|
|
35
|
+
import '../../chunk-7NZSTCJO.js';
|
|
36
|
+
import { Tooltip } from '../../chunk-6SWK4XG5.js';
|
|
37
|
+
import '../../chunk-G52U24GR.js';
|
|
38
|
+
import { Popover } from '../../chunk-VZ2TPU4B.js';
|
|
39
|
+
import '../../chunk-AIQG7IIT.js';
|
|
40
|
+
import '../../chunk-7P32XCEU.js';
|
|
41
|
+
import '../../chunk-BUIHQJGE.js';
|
|
42
|
+
import '../../chunk-2GILNBZW.js';
|
|
43
|
+
import { ActionIcon } from '../../chunk-VLUKI3HL.js';
|
|
44
|
+
import { useUncontrolled } from '../../chunk-BEL75C7N.js';
|
|
45
|
+
import '../../chunk-IG7FBZVM.js';
|
|
46
|
+
import '../../chunk-NSDM3FEB.js';
|
|
47
|
+
import { props } from '../../chunk-WYCMIIRR.js';
|
|
48
|
+
import { focusStyles } from '../../chunk-B2LCHXUB.js';
|
|
49
|
+
import { cn } from '../../chunk-QP4I37PA.js';
|
|
50
|
+
import { tableFeatures, filterFn_weakEquals, filterFn_inDateRange, filterFn_arrIncludes, filterFn_equals, filterFn_inNumberRange, filterFn_includesString, sortFn_basic, sortFn_datetime, sortFn_text, sortFn_alphanumeric, columnResizingFeature, columnSizingFeature, columnVisibilityFeature, rowSelectionFeature, rowPaginationFeature, rowSortingFeature, globalFilteringFeature, columnFilteringFeature, createPaginatedRowModel, createSortedRowModel, createFilteredRowModel, useTable, flexRender, createColumnHelper as createColumnHelper$1 } from '@tanstack/react-table';
|
|
51
|
+
import { useMemo, useRef, useState, useEffect } from 'react';
|
|
52
|
+
import { match, P } from 'ts-pattern';
|
|
53
|
+
import { useLocaleContext } from '@ark-ui/react/locale';
|
|
54
|
+
import { getLocalTimeZone, parseDateTime, parseDate } from '@internationalized/date';
|
|
55
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
56
|
+
import { ServerCrashIcon, RotateCwIcon, SearchAlertIcon, EraserIcon, ChevronLeft, ChevronRight, Search, Columns3CogIcon, ListFilterIcon, ChevronsUpDownIcon, ChevronDownIcon, ChevronUpIcon, ArrowUpToLineIcon, ArrowDownToLineIcon } from 'lucide-react';
|
|
57
|
+
import { cva } from 'class-variance-authority';
|
|
58
|
+
|
|
59
|
+
var dataTableFeatures = tableFeatures({
|
|
60
|
+
columnFilteringFeature,
|
|
61
|
+
globalFilteringFeature,
|
|
62
|
+
rowSortingFeature,
|
|
63
|
+
rowPaginationFeature,
|
|
64
|
+
rowSelectionFeature,
|
|
65
|
+
columnVisibilityFeature,
|
|
66
|
+
columnSizingFeature,
|
|
67
|
+
columnResizingFeature,
|
|
68
|
+
// v8's `get*RowModel` options moved into these slots. The core row model is
|
|
69
|
+
// automatic in v9 and must not be passed.
|
|
70
|
+
filteredRowModel: createFilteredRowModel(),
|
|
71
|
+
sortedRowModel: createSortedRowModel(),
|
|
72
|
+
paginatedRowModel: createPaginatedRowModel(),
|
|
73
|
+
/* These two registries are load-bearing, and their failure mode is silent.
|
|
74
|
+
*
|
|
75
|
+
* `sortFn: "auto"` — which every sortable column in this kit uses, since
|
|
76
|
+
* nothing ever sets `sortFn` — resolves a *name* through `sortFns`. If the
|
|
77
|
+
* name is missing, v9 logs a dev-only `console.warn` and falls back to
|
|
78
|
+
* `sortFn_basic` (a raw `a > b`), so text columns quietly lose
|
|
79
|
+
* case-insensitivity and numeric chunking while every test still passes.
|
|
80
|
+
* `filterFns` is worse: an unregistered name makes the filtered row model
|
|
81
|
+
* skip that column's filter entirely and return the rows unfiltered.
|
|
82
|
+
*
|
|
83
|
+
* The names below are exactly the ones `column_getAutoSortFn` and
|
|
84
|
+
* `column_getAutoFilterFn` can produce — nothing here is speculative. */
|
|
85
|
+
sortFns: {
|
|
86
|
+
alphanumeric: sortFn_alphanumeric,
|
|
87
|
+
text: sortFn_text,
|
|
88
|
+
datetime: sortFn_datetime,
|
|
89
|
+
basic: sortFn_basic
|
|
90
|
+
},
|
|
91
|
+
filterFns: {
|
|
92
|
+
includesString: filterFn_includesString,
|
|
93
|
+
inNumberRange: filterFn_inNumberRange,
|
|
94
|
+
equals: filterFn_equals,
|
|
95
|
+
arrIncludes: filterFn_arrIncludes,
|
|
96
|
+
inDateRange: filterFn_inDateRange,
|
|
97
|
+
weakEquals: filterFn_weakEquals
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
var createColumnHelper = () => createColumnHelper$1();
|
|
101
|
+
var toDateBounds = (value) => {
|
|
102
|
+
if (!value) return ["", ""];
|
|
103
|
+
if (value.op === "between") return [value.from ?? "", value.to ?? ""];
|
|
104
|
+
if (value.op === "lt" || value.op === "lte") return ["", value.date ?? ""];
|
|
105
|
+
return [value.date ?? "", ""];
|
|
106
|
+
};
|
|
107
|
+
var parseBound = (raw, withTime) => withTime ? parseDateTime(raw) : parseDate(raw);
|
|
108
|
+
var toArkBounds = (from, to, withTime) => {
|
|
109
|
+
const values = [];
|
|
110
|
+
if (from) values.push(parseBound(from, withTime));
|
|
111
|
+
if (to) values.push(parseBound(to, withTime));
|
|
112
|
+
return values;
|
|
113
|
+
};
|
|
114
|
+
var NUM_OF_MONTHS = 2;
|
|
115
|
+
var DateFilterPopover = ({
|
|
116
|
+
bounds: [from, to],
|
|
117
|
+
withTime,
|
|
118
|
+
presets,
|
|
119
|
+
timeZone: timeZoneProp,
|
|
120
|
+
translations,
|
|
121
|
+
onCommit,
|
|
122
|
+
onClose
|
|
123
|
+
}) => {
|
|
124
|
+
const { locale } = useLocaleContext();
|
|
125
|
+
const timeZone = timeZoneProp ?? getLocalTimeZone();
|
|
126
|
+
const hourCycle = resolveHourCycle({ locale });
|
|
127
|
+
return /* @__PURE__ */ jsx(
|
|
128
|
+
DatePicker.Root,
|
|
129
|
+
{
|
|
130
|
+
inline: true,
|
|
131
|
+
selectionMode: "range",
|
|
132
|
+
locale,
|
|
133
|
+
timeZone,
|
|
134
|
+
translations: resolveCalendarTranslations(translations),
|
|
135
|
+
numOfMonths: NUM_OF_MONTHS,
|
|
136
|
+
value: toArkBounds(from, to, withTime),
|
|
137
|
+
onValueChange: (details) => {
|
|
138
|
+
onCommit(details.value);
|
|
139
|
+
if (details.value.length !== 1) onClose?.();
|
|
140
|
+
},
|
|
141
|
+
children: /* @__PURE__ */ jsx(DatePicker.Context, { children: (api) => /* @__PURE__ */ jsxs(DatePicker.Content, { className: "flex flex-row flex-wrap items-stretch", children: [
|
|
142
|
+
presets && /* @__PURE__ */ jsx(
|
|
143
|
+
DatePicker.Presets,
|
|
144
|
+
{
|
|
145
|
+
presets,
|
|
146
|
+
range: true,
|
|
147
|
+
timeZone,
|
|
148
|
+
translations: translations?.presets
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
152
|
+
/* @__PURE__ */ jsx(DatePicker.Calendar, { numOfMonths: NUM_OF_MONTHS, size: "sm", timeZone }),
|
|
153
|
+
withTime && /* @__PURE__ */ jsxs(DatePicker.Footer, { className: "flex flex-col gap-4", children: [
|
|
154
|
+
/* @__PURE__ */ jsx(
|
|
155
|
+
DatePicker.TimePanelRow,
|
|
156
|
+
{
|
|
157
|
+
value: api.value[0],
|
|
158
|
+
onSetTime: (time) => api.setTime(time, 0),
|
|
159
|
+
label: translations?.fromTime ?? "From time",
|
|
160
|
+
hourCycle,
|
|
161
|
+
locale,
|
|
162
|
+
translations,
|
|
163
|
+
size: "sm"
|
|
164
|
+
}
|
|
165
|
+
),
|
|
166
|
+
/* @__PURE__ */ jsx(
|
|
167
|
+
DatePicker.TimePanelRow,
|
|
168
|
+
{
|
|
169
|
+
value: api.value[1],
|
|
170
|
+
onSetTime: (time) => api.setTime(time, 1),
|
|
171
|
+
label: translations?.toTime ?? "To time",
|
|
172
|
+
disabled: api.value.length < 2,
|
|
173
|
+
hourCycle,
|
|
174
|
+
locale,
|
|
175
|
+
translations,
|
|
176
|
+
size: "sm"
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
] }),
|
|
180
|
+
api.value.length > 0 && /* @__PURE__ */ jsx(DatePicker.Footer, { className: "flex justify-end", children: /* @__PURE__ */ jsx(
|
|
181
|
+
"button",
|
|
182
|
+
{
|
|
183
|
+
type: "button",
|
|
184
|
+
onClick: () => api.clearValue(),
|
|
185
|
+
className: cn(
|
|
186
|
+
"cursor-pointer rounded-xs px-2 py-1 text-sm transition-colors",
|
|
187
|
+
"text-gray-light-500 hover:text-gray-light-900 dark:text-gray-dark-400 dark:hover:text-gray-dark-100"
|
|
188
|
+
),
|
|
189
|
+
children: translations?.clear ?? "Clear"
|
|
190
|
+
}
|
|
191
|
+
) })
|
|
192
|
+
] })
|
|
193
|
+
] }) })
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
};
|
|
197
|
+
var DateFilter = ({
|
|
198
|
+
column,
|
|
199
|
+
withTime,
|
|
200
|
+
presets,
|
|
201
|
+
timeZone,
|
|
202
|
+
translations,
|
|
203
|
+
onClose
|
|
204
|
+
}) => {
|
|
205
|
+
const bounds = toDateBounds(column.getFilterValue());
|
|
206
|
+
return /* @__PURE__ */ jsx(
|
|
207
|
+
DateFilterPopover,
|
|
208
|
+
{
|
|
209
|
+
bounds,
|
|
210
|
+
withTime,
|
|
211
|
+
presets,
|
|
212
|
+
timeZone,
|
|
213
|
+
translations,
|
|
214
|
+
onClose,
|
|
215
|
+
onCommit: (values) => {
|
|
216
|
+
const [start, end] = values;
|
|
217
|
+
if (!start) return column.setFilterValue(void 0);
|
|
218
|
+
if (!end)
|
|
219
|
+
return column.setFilterValue({
|
|
220
|
+
op: "gte",
|
|
221
|
+
date: serializeDateValue(start, Boolean(withTime))
|
|
222
|
+
});
|
|
223
|
+
return column.setFilterValue({
|
|
224
|
+
op: "between",
|
|
225
|
+
from: serializeDateValue(start, Boolean(withTime)),
|
|
226
|
+
to: serializeDateValue(end, Boolean(withTime))
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
};
|
|
232
|
+
var DateRangeFilter = ({
|
|
233
|
+
column,
|
|
234
|
+
withTime,
|
|
235
|
+
presets,
|
|
236
|
+
timeZone,
|
|
237
|
+
translations,
|
|
238
|
+
onClose
|
|
239
|
+
}) => {
|
|
240
|
+
const value = column.getFilterValue() ?? { from: null, to: null };
|
|
241
|
+
return /* @__PURE__ */ jsx(
|
|
242
|
+
DateFilterPopover,
|
|
243
|
+
{
|
|
244
|
+
bounds: [value.from ?? "", value.to ?? ""],
|
|
245
|
+
withTime,
|
|
246
|
+
presets,
|
|
247
|
+
timeZone,
|
|
248
|
+
translations,
|
|
249
|
+
onClose,
|
|
250
|
+
onCommit: (values) => {
|
|
251
|
+
const [start, end] = values;
|
|
252
|
+
if (!start && !end) return column.setFilterValue(void 0);
|
|
253
|
+
column.setFilterValue({
|
|
254
|
+
from: start ? serializeDateValue(start, Boolean(withTime)) : null,
|
|
255
|
+
to: end ? serializeDateValue(end, Boolean(withTime)) : null
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
);
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
// src/components/data-table/data-table-filter/utils.ts
|
|
263
|
+
var NUMBER_OP_COMPARE = {
|
|
264
|
+
eq: (left, right) => left === right,
|
|
265
|
+
gt: (left, right) => left > right,
|
|
266
|
+
gte: (left, right) => left >= right,
|
|
267
|
+
lt: (left, right) => left < right,
|
|
268
|
+
lte: (left, right) => left <= right
|
|
269
|
+
};
|
|
270
|
+
var getNumberFilterValue = (column) => column.getFilterValue();
|
|
271
|
+
var setNumberFilterValue = (column, value) => {
|
|
272
|
+
column.setFilterValue(value);
|
|
273
|
+
};
|
|
274
|
+
var parseDateValue = (value) => {
|
|
275
|
+
if (value == null) return null;
|
|
276
|
+
const time = value instanceof Date ? value.getTime() : new Date(value).getTime();
|
|
277
|
+
return Number.isNaN(time) ? null : time;
|
|
278
|
+
};
|
|
279
|
+
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
280
|
+
var dateOpMatches = (op, rowTime, filterTime, withTime) => {
|
|
281
|
+
if (withTime) {
|
|
282
|
+
return op === "eq" ? rowTime === filterTime : op === "gt" ? rowTime > filterTime : op === "gte" ? rowTime >= filterTime : op === "lt" ? rowTime < filterTime : rowTime <= filterTime;
|
|
283
|
+
}
|
|
284
|
+
const dayEnd = filterTime + DAY_MS - 1;
|
|
285
|
+
return op === "eq" ? rowTime >= filterTime && rowTime <= dayEnd : op === "gt" ? rowTime > dayEnd : op === "gte" ? rowTime >= filterTime : op === "lt" ? rowTime < filterTime : rowTime <= dayEnd;
|
|
286
|
+
};
|
|
287
|
+
var toBounds = (filter) => {
|
|
288
|
+
if (!filter) return [null, null];
|
|
289
|
+
if (filter.op === "between") return [filter.min, filter.max];
|
|
290
|
+
if (filter.op === "lt" || filter.op === "lte") return [null, filter.value];
|
|
291
|
+
return [filter.value, null];
|
|
292
|
+
};
|
|
293
|
+
var NumberFilter = ({
|
|
294
|
+
column,
|
|
295
|
+
min,
|
|
296
|
+
max
|
|
297
|
+
}) => {
|
|
298
|
+
const [lo, hi] = toBounds(getNumberFilterValue(column));
|
|
299
|
+
const commit = (nextLo, nextHi) => {
|
|
300
|
+
if (nextLo == null && nextHi == null) {
|
|
301
|
+
setNumberFilterValue(column, void 0);
|
|
302
|
+
} else if (nextLo != null && nextHi != null) {
|
|
303
|
+
setNumberFilterValue(column, { op: "between", min: nextLo, max: nextHi });
|
|
304
|
+
} else {
|
|
305
|
+
setNumberFilterValue(
|
|
306
|
+
column,
|
|
307
|
+
nextLo != null ? { op: "gte", value: nextLo } : { op: "lte", value: nextHi }
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 p-1", children: [
|
|
312
|
+
/* @__PURE__ */ jsx(
|
|
313
|
+
NumberInput,
|
|
314
|
+
{
|
|
315
|
+
size: "sm",
|
|
316
|
+
placeholder: "Max",
|
|
317
|
+
testId: "number-filter-max",
|
|
318
|
+
min,
|
|
319
|
+
max,
|
|
320
|
+
value: hi,
|
|
321
|
+
clearable: true,
|
|
322
|
+
startSlot: /* @__PURE__ */ jsx(ArrowUpToLineIcon, {}),
|
|
323
|
+
onChange: (next) => commit(lo, next)
|
|
324
|
+
}
|
|
325
|
+
),
|
|
326
|
+
/* @__PURE__ */ jsx(
|
|
327
|
+
NumberInput,
|
|
328
|
+
{
|
|
329
|
+
size: "sm",
|
|
330
|
+
placeholder: "Min",
|
|
331
|
+
testId: "number-filter-min",
|
|
332
|
+
min,
|
|
333
|
+
max,
|
|
334
|
+
value: lo,
|
|
335
|
+
clearable: true,
|
|
336
|
+
startSlot: /* @__PURE__ */ jsx(ArrowDownToLineIcon, {}),
|
|
337
|
+
onChange: (next) => commit(next, hi)
|
|
338
|
+
}
|
|
339
|
+
)
|
|
340
|
+
] });
|
|
341
|
+
};
|
|
342
|
+
var SelectFilter = ({
|
|
343
|
+
column,
|
|
344
|
+
options,
|
|
345
|
+
multiple,
|
|
346
|
+
renderItem,
|
|
347
|
+
onClose
|
|
348
|
+
}) => multiple ? /* @__PURE__ */ jsx(
|
|
349
|
+
MultiComboboxList,
|
|
350
|
+
{
|
|
351
|
+
size: "sm",
|
|
352
|
+
data: options,
|
|
353
|
+
clearable: true,
|
|
354
|
+
renderItem,
|
|
355
|
+
value: column.getFilterValue() ?? [],
|
|
356
|
+
onChange: (value) => column.setFilterValue(value.length > 0 ? value : void 0)
|
|
357
|
+
}
|
|
358
|
+
) : /* @__PURE__ */ jsx(
|
|
359
|
+
ComboboxList,
|
|
360
|
+
{
|
|
361
|
+
size: "sm",
|
|
362
|
+
data: options,
|
|
363
|
+
clearable: true,
|
|
364
|
+
renderItem,
|
|
365
|
+
value: column.getFilterValue() ?? null,
|
|
366
|
+
onChange: (value) => {
|
|
367
|
+
column.setFilterValue(value ?? void 0);
|
|
368
|
+
onClose?.();
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
);
|
|
372
|
+
function useDebouncedCommit(value, delay, onCommit) {
|
|
373
|
+
const [local, setLocal] = useState(value);
|
|
374
|
+
const onCommitRef = useRef(onCommit);
|
|
375
|
+
onCommitRef.current = onCommit;
|
|
376
|
+
const isMount = useRef(true);
|
|
377
|
+
useEffect(() => setLocal(value), [value]);
|
|
378
|
+
useEffect(() => {
|
|
379
|
+
if (isMount.current) {
|
|
380
|
+
isMount.current = false;
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
const id = setTimeout(() => onCommitRef.current(local), delay);
|
|
384
|
+
return () => clearTimeout(id);
|
|
385
|
+
}, [local, delay]);
|
|
386
|
+
return [local, setLocal];
|
|
387
|
+
}
|
|
388
|
+
var TextFilter = ({
|
|
389
|
+
column,
|
|
390
|
+
placeholder,
|
|
391
|
+
debounce = 300
|
|
392
|
+
}) => {
|
|
393
|
+
const committed = column.getFilterValue() ?? "";
|
|
394
|
+
const [value, setValue] = useDebouncedCommit(
|
|
395
|
+
committed,
|
|
396
|
+
debounce,
|
|
397
|
+
(next) => column.setFilterValue(next || void 0)
|
|
398
|
+
);
|
|
399
|
+
return /* @__PURE__ */ jsx(
|
|
400
|
+
Input,
|
|
401
|
+
{
|
|
402
|
+
size: "sm",
|
|
403
|
+
autoFocus: true,
|
|
404
|
+
placeholder,
|
|
405
|
+
value,
|
|
406
|
+
onChange: (e) => setValue(e.target.value)
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
};
|
|
410
|
+
var resolveFilterFn = (filter) => match(filter).with(
|
|
411
|
+
{ type: "text" },
|
|
412
|
+
() => (row, columnId, filterValue) => {
|
|
413
|
+
const value = row.getValue(columnId);
|
|
414
|
+
return value != null && String(value).toLowerCase().includes(String(filterValue).toLowerCase());
|
|
415
|
+
}
|
|
416
|
+
).with(
|
|
417
|
+
{ type: "select" },
|
|
418
|
+
(f) => f.multiple ? (row, columnId, filterValue) => {
|
|
419
|
+
const value = row.getValue(columnId);
|
|
420
|
+
return value != null && filterValue.some((v) => String(v).toLowerCase() === String(value).toLowerCase());
|
|
421
|
+
} : (row, columnId, filterValue) => {
|
|
422
|
+
const value = row.getValue(columnId);
|
|
423
|
+
return value != null && String(value).toLowerCase() === String(filterValue).toLowerCase();
|
|
424
|
+
}
|
|
425
|
+
).with(
|
|
426
|
+
{ type: "number" },
|
|
427
|
+
() => (row, columnId, filterValue) => {
|
|
428
|
+
const rowValue = row.getValue(columnId);
|
|
429
|
+
if (typeof rowValue !== "number" || !Number.isFinite(rowValue)) {
|
|
430
|
+
return false;
|
|
431
|
+
}
|
|
432
|
+
return match(filterValue).with(P.nullish, () => true).with({ op: "between" }, ({ min, max }) => {
|
|
433
|
+
return (min == null || rowValue >= min) && (max == null || rowValue <= max);
|
|
434
|
+
}).with(
|
|
435
|
+
{ op: P.union("eq", "gt", "gte", "lt", "lte") },
|
|
436
|
+
({ op, value }) => value != null && NUMBER_OP_COMPARE[op](rowValue, value)
|
|
437
|
+
).exhaustive();
|
|
438
|
+
}
|
|
439
|
+
).with(
|
|
440
|
+
{ type: "date" },
|
|
441
|
+
(f) => (row, columnId, filterValue) => {
|
|
442
|
+
const rowTime = parseDateValue(row.getValue(columnId));
|
|
443
|
+
if (rowTime == null) return false;
|
|
444
|
+
return match(filterValue).with(P.nullish, () => true).with({ op: "between" }, ({ from, to }) => {
|
|
445
|
+
const fromTime = from != null ? parseDateValue(from) : null;
|
|
446
|
+
const toTime = to != null ? parseDateValue(to) : null;
|
|
447
|
+
if (fromTime != null && rowTime < fromTime) return false;
|
|
448
|
+
if (toTime != null && rowTime > (f.withTime ? toTime : toTime + DAY_MS - 1))
|
|
449
|
+
return false;
|
|
450
|
+
return true;
|
|
451
|
+
}).with({ op: P.union("eq", "gt", "gte", "lt", "lte") }, ({ op, date }) => {
|
|
452
|
+
const filterTime = date != null ? parseDateValue(date) : null;
|
|
453
|
+
return filterTime != null && dateOpMatches(op, rowTime, filterTime, f.withTime);
|
|
454
|
+
}).exhaustive();
|
|
455
|
+
}
|
|
456
|
+
).with(
|
|
457
|
+
{ type: "date-range" },
|
|
458
|
+
(f) => (row, columnId, filterValue) => {
|
|
459
|
+
const rowTime = parseDateValue(row.getValue(columnId));
|
|
460
|
+
if (rowTime == null) return false;
|
|
461
|
+
if (filterValue.from != null) {
|
|
462
|
+
const from = parseDateValue(filterValue.from);
|
|
463
|
+
if (from != null && rowTime < from) return false;
|
|
464
|
+
}
|
|
465
|
+
if (filterValue.to != null) {
|
|
466
|
+
const to = parseDateValue(filterValue.to);
|
|
467
|
+
if (to != null && rowTime > (f.withTime ? to : to + DAY_MS - 1)) return false;
|
|
468
|
+
}
|
|
469
|
+
return true;
|
|
470
|
+
}
|
|
471
|
+
).exhaustive();
|
|
472
|
+
var hasActiveFilterValue = (value) => {
|
|
473
|
+
if (value == null || value === "") return false;
|
|
474
|
+
if (Array.isArray(value)) return value.some((v) => v != null && v !== "");
|
|
475
|
+
if (typeof value === "object")
|
|
476
|
+
return Object.values(value).some((v) => v != null && v !== "");
|
|
477
|
+
return true;
|
|
478
|
+
};
|
|
479
|
+
var DataTableFilterControl = ({
|
|
480
|
+
column,
|
|
481
|
+
filter,
|
|
482
|
+
onClose
|
|
483
|
+
}) => match(filter).with({ type: "text" }, (f) => /* @__PURE__ */ jsx(TextFilter, { column, placeholder: f.placeholder, debounce: f.debounce })).with({ type: "select" }, (f) => /* @__PURE__ */ jsx(
|
|
484
|
+
SelectFilter,
|
|
485
|
+
{
|
|
486
|
+
column,
|
|
487
|
+
options: f.options,
|
|
488
|
+
multiple: f.multiple,
|
|
489
|
+
renderItem: f.renderItem,
|
|
490
|
+
onClose
|
|
491
|
+
}
|
|
492
|
+
)).with({ type: "number" }, (f) => /* @__PURE__ */ jsx(NumberFilter, { column, min: f.min, max: f.max })).with({ type: "date" }, (f) => /* @__PURE__ */ jsx(
|
|
493
|
+
DateFilter,
|
|
494
|
+
{
|
|
495
|
+
column,
|
|
496
|
+
withTime: f.withTime,
|
|
497
|
+
presets: f.presets,
|
|
498
|
+
timeZone: f.timeZone,
|
|
499
|
+
translations: f.translations,
|
|
500
|
+
onClose
|
|
501
|
+
}
|
|
502
|
+
)).with({ type: "date-range" }, (f) => /* @__PURE__ */ jsx(
|
|
503
|
+
DateRangeFilter,
|
|
504
|
+
{
|
|
505
|
+
column,
|
|
506
|
+
withTime: f.withTime,
|
|
507
|
+
presets: f.presets,
|
|
508
|
+
timeZone: f.timeZone,
|
|
509
|
+
translations: f.translations,
|
|
510
|
+
onClose
|
|
511
|
+
}
|
|
512
|
+
)).exhaustive();
|
|
513
|
+
var RESIZE_STEP = 5;
|
|
514
|
+
var SORT_LOOKUP = {
|
|
515
|
+
asc: {
|
|
516
|
+
icon: ChevronUpIcon,
|
|
517
|
+
label: "ascending"
|
|
518
|
+
},
|
|
519
|
+
desc: {
|
|
520
|
+
icon: ChevronDownIcon,
|
|
521
|
+
label: "descending"
|
|
522
|
+
},
|
|
523
|
+
none: {
|
|
524
|
+
icon: ChevronsUpDownIcon,
|
|
525
|
+
label: "none"
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
var columnLabel = (column) => {
|
|
529
|
+
if (column.columnDef.meta?.label) return column.columnDef.meta.label;
|
|
530
|
+
return typeof column.columnDef.header === "string" ? column.columnDef.header : column.id;
|
|
531
|
+
};
|
|
532
|
+
var renderColumnHeader = (header, mode) => flexRender(header.column.columnDef.header, { ...header.getContext(), mode });
|
|
533
|
+
var tableHeaderCell = cva(["flex items-center gap-3"], {
|
|
534
|
+
variants: {
|
|
535
|
+
align: {
|
|
536
|
+
center: "justify-center",
|
|
537
|
+
start: "justify-start",
|
|
538
|
+
end: "justify-end"
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
function DataTableHeaderCell({
|
|
543
|
+
header,
|
|
544
|
+
truncate = true
|
|
545
|
+
}) {
|
|
546
|
+
const { column } = header;
|
|
547
|
+
const canSort = column.getCanSort();
|
|
548
|
+
const align = column.columnDef.meta?.align ?? "start";
|
|
549
|
+
const filter = column.columnDef.meta?.filter;
|
|
550
|
+
const label = renderColumnHeader(header, "table");
|
|
551
|
+
const ariaLabel = columnLabel(column);
|
|
552
|
+
const labelClassName = cn(
|
|
553
|
+
truncate && "shrink-0 truncate",
|
|
554
|
+
"flex flex-row justify-center align-center"
|
|
555
|
+
);
|
|
556
|
+
return /* @__PURE__ */ jsxs("div", { className: tableHeaderCell({ align }), children: [
|
|
557
|
+
canSort ? /* @__PURE__ */ jsx(DataTablerHeaderSort, { column, label: ariaLabel, labelClassName, children: label }) : /* @__PURE__ */ jsx("span", { className: labelClassName, children: label }),
|
|
558
|
+
filter ? /* @__PURE__ */ jsx(DataTableHeaderFilter, { column, filter, label: ariaLabel }) : null
|
|
559
|
+
] });
|
|
560
|
+
}
|
|
561
|
+
function DataTableColumnResizeHandle({
|
|
562
|
+
header
|
|
563
|
+
}) {
|
|
564
|
+
const { column } = header;
|
|
565
|
+
const ref = useRef(null);
|
|
566
|
+
const label = columnLabel(column);
|
|
567
|
+
const minSize = column.columnDef.minSize ?? 20;
|
|
568
|
+
const maxSize = column.columnDef.maxSize ?? Number.MAX_SAFE_INTEGER;
|
|
569
|
+
const handleKeyDown = (event) => {
|
|
570
|
+
if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") return;
|
|
571
|
+
event.preventDefault();
|
|
572
|
+
const delta = match({
|
|
573
|
+
shiftKey: event.shiftKey,
|
|
574
|
+
altKey: event.altKey,
|
|
575
|
+
key: event.key
|
|
576
|
+
}).with(
|
|
577
|
+
{ shiftKey: true, altKey: false },
|
|
578
|
+
({ key }) => (
|
|
579
|
+
/* Normal resize*/
|
|
580
|
+
(key === "ArrowRight" ? RESIZE_STEP : -RESIZE_STEP) * 10
|
|
581
|
+
)
|
|
582
|
+
).with({ altKey: true, shiftKey: false }, ({ key }) => key === "ArrowRight" ? 1 : -1).otherwise(
|
|
583
|
+
({ key }) => (
|
|
584
|
+
/* Normal resize*/
|
|
585
|
+
key === "ArrowRight" ? RESIZE_STEP : -RESIZE_STEP
|
|
586
|
+
)
|
|
587
|
+
);
|
|
588
|
+
ref.current?.focus({ focusVisible: true });
|
|
589
|
+
const nextSize = Math.min(maxSize, Math.max(minSize, header.getSize() + delta));
|
|
590
|
+
header.getContext().table.setColumnSizing((old) => ({ ...old, [column.id]: nextSize }));
|
|
591
|
+
};
|
|
592
|
+
return (
|
|
593
|
+
// biome-ignore lint/a11y/useSemanticElements: ARIA "window splitter" pattern (a focusable, draggable divider) — `<hr>` can't hold a resize interaction
|
|
594
|
+
/* @__PURE__ */ jsx(
|
|
595
|
+
"div",
|
|
596
|
+
{
|
|
597
|
+
ref,
|
|
598
|
+
onMouseDown: header.getResizeHandler(),
|
|
599
|
+
onTouchStart: header.getResizeHandler(),
|
|
600
|
+
onKeyDown: handleKeyDown,
|
|
601
|
+
role: "separator",
|
|
602
|
+
"aria-orientation": "vertical",
|
|
603
|
+
"aria-label": `Resize ${label} column`,
|
|
604
|
+
"aria-valuenow": header.getSize(),
|
|
605
|
+
"aria-valuemin": minSize,
|
|
606
|
+
"aria-valuemax": maxSize === Number.MAX_SAFE_INTEGER ? void 0 : maxSize,
|
|
607
|
+
tabIndex: 0,
|
|
608
|
+
className: cn(
|
|
609
|
+
"absolute inset-y-0 -inset-e-1.5 z-10 w-3 cursor-col-resize touch-none select-none",
|
|
610
|
+
"before:absolute before:inset-y-1 before:inset-s-1/2 before:-translate-x-1/2 before:w-px before:bg-brand-900/20 dark:before:bg-white/15 before:rounded-full",
|
|
611
|
+
"after:absolute after:inset-x-1/2 after:-translate-x-1/2 after:top-1/2 after:-translate-y-1/2 after:transparent after:w-1 after:h-3 after:rounded-full",
|
|
612
|
+
"hover:before:bg-brand-900/40 dark:hover:before:bg-white/30 before:transition-colors",
|
|
613
|
+
"hover:after:bg-(--c-solid) focus-visible:after:bg-(--c-solid) after:transition-colors",
|
|
614
|
+
// Matches thead's own brand-950 fill, not gray-dark-900 — the ring
|
|
615
|
+
// gap this offset simulates has to blend with the real background.
|
|
616
|
+
"after:ring-offset-1 after:ring-offset-brand-50 dark:after:ring-offset-brand-950",
|
|
617
|
+
"focus-visible:outline-none focus-visible:after:ring-(--c-solid) focus-visible:after:ring-1 focus-visible:before:bg-(--c-solid)/50",
|
|
618
|
+
column.getIsResizing() && "after:bg-(--c-solid) before:bg-brand-900/40 dark:before:bg-white/30"
|
|
619
|
+
)
|
|
620
|
+
}
|
|
621
|
+
)
|
|
622
|
+
);
|
|
623
|
+
}
|
|
624
|
+
function DataTablerHeaderSort({
|
|
625
|
+
column,
|
|
626
|
+
label,
|
|
627
|
+
labelClassName,
|
|
628
|
+
children
|
|
629
|
+
}) {
|
|
630
|
+
const sort = column.getIsSorted() || "none";
|
|
631
|
+
const { icon: Icon, label: mode } = SORT_LOOKUP[sort];
|
|
632
|
+
return /* @__PURE__ */ jsxs(
|
|
633
|
+
"button",
|
|
634
|
+
{
|
|
635
|
+
type: "button",
|
|
636
|
+
onClick: column.getToggleSortingHandler(),
|
|
637
|
+
className: cn(
|
|
638
|
+
"group",
|
|
639
|
+
"transition-colors rounded-xxs truncate",
|
|
640
|
+
"inline-flex min-w-0 cursor-pointer items-center gap-1 font-medium select-none hover:text-gray-light-950 dark:hover:text-gray-dark-50",
|
|
641
|
+
focusStyles({ offset: false }),
|
|
642
|
+
// thead is bg-brand-50/90, not the page background, so the gap
|
|
643
|
+
// has to be painted in *that* fill — hence offset: false plus a
|
|
644
|
+
// surface-matched pair rather than the helper's own offset.
|
|
645
|
+
"focus-visible:ring-offset-2 focus-visible:ring-offset-brand-50 dark:focus-visible:ring-offset-brand-950"
|
|
646
|
+
),
|
|
647
|
+
"aria-label": `Sort ${label} (${mode})`,
|
|
648
|
+
children: [
|
|
649
|
+
/* @__PURE__ */ jsx("span", { className: cn("truncate", labelClassName), children }),
|
|
650
|
+
/* @__PURE__ */ jsx(
|
|
651
|
+
Icon,
|
|
652
|
+
{
|
|
653
|
+
"aria-hidden": "true",
|
|
654
|
+
className: cn(
|
|
655
|
+
"size-3.5 shrink-0 transition-colors",
|
|
656
|
+
"text-gray-light-400 dark:text-gray-dark-500 group-hover:text-gray-light-950 dark:group-hover:text-gray-dark-50"
|
|
657
|
+
)
|
|
658
|
+
}
|
|
659
|
+
)
|
|
660
|
+
]
|
|
661
|
+
}
|
|
662
|
+
);
|
|
663
|
+
}
|
|
664
|
+
function DataTableHeaderFilter({
|
|
665
|
+
column,
|
|
666
|
+
filter,
|
|
667
|
+
label
|
|
668
|
+
}) {
|
|
669
|
+
const active = hasActiveFilterValue(column.getFilterValue());
|
|
670
|
+
const [open, setOpen] = useState(false);
|
|
671
|
+
return /* @__PURE__ */ jsxs(
|
|
672
|
+
Popover.Root,
|
|
673
|
+
{
|
|
674
|
+
width: "auto",
|
|
675
|
+
position: "bottom-start",
|
|
676
|
+
offset: {
|
|
677
|
+
mainAxis: 14,
|
|
678
|
+
crossAxis: -10
|
|
679
|
+
},
|
|
680
|
+
open,
|
|
681
|
+
onOpenChange: (details) => setOpen(details.open),
|
|
682
|
+
children: [
|
|
683
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
684
|
+
"button",
|
|
685
|
+
{
|
|
686
|
+
type: "button",
|
|
687
|
+
className: cn(
|
|
688
|
+
"transition-colors rounded-xxs size-4 shrink-0",
|
|
689
|
+
"inline-flex cursor-pointer items-center gap-1 font-medium select-none hover:text-gray-light-950 dark:hover:text-gray-dark-50",
|
|
690
|
+
"text-gray-light-400 dark:text-gray-dark-500",
|
|
691
|
+
focusStyles({ offset: false }),
|
|
692
|
+
// thead is bg-brand-50/90, not the page background, so the gap
|
|
693
|
+
// has to be painted in *that* fill — hence offset: false plus a
|
|
694
|
+
// surface-matched pair rather than the helper's own offset.
|
|
695
|
+
"focus-visible:ring-offset-2 focus-visible:ring-offset-brand-50 dark:focus-visible:ring-offset-brand-950",
|
|
696
|
+
{
|
|
697
|
+
"relative before:absolute before:-top-0.5 before:-inset-e-0.5 before:size-1 before:rounded-full dark:before:bg-gray-dark-50 before:bg-gray-light-950": active
|
|
698
|
+
}
|
|
699
|
+
),
|
|
700
|
+
"aria-label": active ? `Filter ${label} (active)` : `Filter ${label}`,
|
|
701
|
+
children: /* @__PURE__ */ jsx(ListFilterIcon, {})
|
|
702
|
+
}
|
|
703
|
+
) }),
|
|
704
|
+
/* @__PURE__ */ jsx(Popover.Content, { className: "min-w-48", children: /* @__PURE__ */ jsx(Popover.Body, { className: "overflow-visible p-0", children: /* @__PURE__ */ jsx(DataTableFilterControl, { column, filter, onClose: () => setOpen(false) }) }) })
|
|
705
|
+
]
|
|
706
|
+
}
|
|
707
|
+
);
|
|
708
|
+
}
|
|
709
|
+
var DEFAULT_TRANSLATIONS = {
|
|
710
|
+
rows: "Rows per page",
|
|
711
|
+
items: ({ totalKnown, from, hits, to }) => totalKnown ? `${from} to ${to} of ${hits}` : `${from} to ${to}`,
|
|
712
|
+
previousPage: "Previous page",
|
|
713
|
+
nextPage: "Next page"
|
|
714
|
+
};
|
|
715
|
+
function DataTablePagination({
|
|
716
|
+
table,
|
|
717
|
+
pageSizeOptions = [10, 20, 50],
|
|
718
|
+
hasNextPage,
|
|
719
|
+
className,
|
|
720
|
+
translations: translationsProp,
|
|
721
|
+
paginationMode = "page"
|
|
722
|
+
}) {
|
|
723
|
+
const { pageIndex, pageSize } = table.atoms.pagination.get();
|
|
724
|
+
const pageCount = table.getPageCount();
|
|
725
|
+
const totalKnown = pageCount >= 0;
|
|
726
|
+
const rowsOnPage = table.getRowModel().rows.length;
|
|
727
|
+
const canPrevious = table.getCanPreviousPage();
|
|
728
|
+
const canNext = totalKnown ? table.getCanNextPage() : hasNextPage ?? rowsOnPage >= pageSize;
|
|
729
|
+
const translations = { ...DEFAULT_TRANSLATIONS, ...translationsProp };
|
|
730
|
+
const rowCount = table.getRowCount();
|
|
731
|
+
const from = rowCount === 0 ? 0 : pageIndex * pageSize + 1;
|
|
732
|
+
const to = pageIndex * pageSize + rowsOnPage;
|
|
733
|
+
const sizeOptions = pageSizeOptions.includes(pageSize) ? pageSizeOptions : [...pageSizeOptions, pageSize].sort((a, b) => a - b);
|
|
734
|
+
return /* @__PURE__ */ jsxs(
|
|
735
|
+
"div",
|
|
736
|
+
{
|
|
737
|
+
className: cn(
|
|
738
|
+
// Same brand-tinted fill as thead/tfoot — this is Table's third
|
|
739
|
+
// chrome band (it renders inside the same container), not a separate
|
|
740
|
+
// opaque surface.
|
|
741
|
+
"bg-brand-50/90 dark:bg-brand-950/85",
|
|
742
|
+
// `flex-wrap`: both groups are intrinsically sized, and this band sits
|
|
743
|
+
// *outside* Table's `overflow-auto` frame under an `overflow-hidden`
|
|
744
|
+
// root — so in a container too narrow for both (a `max-w-xs` card, say)
|
|
745
|
+
// a squeeze has nowhere to go and would silently clip the controls.
|
|
746
|
+
// Dropping the page controls to a second row degrades instead.
|
|
747
|
+
// `gap-2` already covers both axes.
|
|
748
|
+
"flex shrink-0 flex-wrap items-center justify-between gap-2 border-t border-brand-900/20 px-4 py-3 dark:border-white/15",
|
|
749
|
+
className
|
|
750
|
+
),
|
|
751
|
+
children: [
|
|
752
|
+
/* @__PURE__ */ jsx(
|
|
753
|
+
Select,
|
|
754
|
+
{
|
|
755
|
+
size: "sm",
|
|
756
|
+
label: translations.rows,
|
|
757
|
+
classNames: { field: "w-auto flex-row-reverse items-center gap-3" },
|
|
758
|
+
data: sizeOptions.map(String),
|
|
759
|
+
value: String(pageSize),
|
|
760
|
+
onChange: (value) => value && table.setPageSize(Number(value)),
|
|
761
|
+
disabled: sizeOptions.length <= 1,
|
|
762
|
+
className: "w-24"
|
|
763
|
+
}
|
|
764
|
+
),
|
|
765
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
766
|
+
/* @__PURE__ */ jsx(
|
|
767
|
+
ActionIcon,
|
|
768
|
+
{
|
|
769
|
+
variant: "subtle",
|
|
770
|
+
size: "sm",
|
|
771
|
+
"aria-label": translations.previousPage,
|
|
772
|
+
disabled: !canPrevious,
|
|
773
|
+
onClick: () => table.previousPage(),
|
|
774
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, {})
|
|
775
|
+
}
|
|
776
|
+
),
|
|
777
|
+
paginationMode === "rows" ? /* @__PURE__ */ jsx(Tooltip, { label: pageIndex + 1, children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "muted", role: "status", children: translations.items({ hits: rowCount, from, to, totalKnown }) }) }) : /* @__PURE__ */ jsx(Tooltip, { label: translations.items({ hits: rowCount, from, to, totalKnown }), children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "muted", children: pageIndex + 1 }) }),
|
|
778
|
+
/* @__PURE__ */ jsx(
|
|
779
|
+
ActionIcon,
|
|
780
|
+
{
|
|
781
|
+
variant: "subtle",
|
|
782
|
+
size: "sm",
|
|
783
|
+
"aria-label": translations.nextPage,
|
|
784
|
+
disabled: !canNext,
|
|
785
|
+
onClick: () => table.nextPage(),
|
|
786
|
+
children: /* @__PURE__ */ jsx(ChevronRight, {})
|
|
787
|
+
}
|
|
788
|
+
)
|
|
789
|
+
] })
|
|
790
|
+
]
|
|
791
|
+
}
|
|
792
|
+
);
|
|
793
|
+
}
|
|
794
|
+
function RenderPlaceholder({
|
|
795
|
+
node,
|
|
796
|
+
defaultActions
|
|
797
|
+
}) {
|
|
798
|
+
return /* @__PURE__ */ jsx(
|
|
799
|
+
"div",
|
|
800
|
+
{
|
|
801
|
+
className: cn(
|
|
802
|
+
"flex flex-col gap-3 [&_data-title]:text-gray-light-900 dark:[&_data-title]:text-gray-dark-100",
|
|
803
|
+
"**:data-desc:text-gray-light-400 dark:**:data-desc:text-gray-dark-500"
|
|
804
|
+
),
|
|
805
|
+
children: match(node).when(
|
|
806
|
+
(n) => !!(n && typeof n === "object" && "title" in n),
|
|
807
|
+
({ title, description, actions }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
808
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
809
|
+
/* @__PURE__ */ jsx("span", { "data-title": true, children: title }),
|
|
810
|
+
description && /* @__PURE__ */ jsx("span", { "data-desc": true, children: description })
|
|
811
|
+
] }),
|
|
812
|
+
(actions || defaultActions) && /* @__PURE__ */ jsx("div", { className: "flex flex-row gap-1 justify-center items-center", children: actions ?? defaultActions })
|
|
813
|
+
] })
|
|
814
|
+
).otherwise((n) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
815
|
+
/* @__PURE__ */ jsx("span", { "data-title": true, children: n }),
|
|
816
|
+
defaultActions && /* @__PURE__ */ jsx("div", { className: "flex flex-row gap-1 justify-center items-center", children: defaultActions })
|
|
817
|
+
] }))
|
|
818
|
+
}
|
|
819
|
+
);
|
|
820
|
+
}
|
|
821
|
+
function DataTableStackedRows({
|
|
822
|
+
rows,
|
|
823
|
+
view,
|
|
824
|
+
error,
|
|
825
|
+
refetching,
|
|
826
|
+
empty,
|
|
827
|
+
onRowClick,
|
|
828
|
+
isInteractiveTarget: isInteractiveTarget2,
|
|
829
|
+
onRetry,
|
|
830
|
+
table,
|
|
831
|
+
className,
|
|
832
|
+
skeletonRowCount
|
|
833
|
+
}) {
|
|
834
|
+
return /* @__PURE__ */ jsx("div", { className: cn("flex flex-1 min-h-0 flex-col gap-2 overflow-y-auto p-3", className), children: match(view).with("error", () => /* @__PURE__ */ jsxs(
|
|
835
|
+
"div",
|
|
836
|
+
{
|
|
837
|
+
role: "alert",
|
|
838
|
+
className: "flex flex-col gap-3 items-center justify-center py-6 text-center min-h-48.5",
|
|
839
|
+
children: [
|
|
840
|
+
/* @__PURE__ */ jsx(ThemeIcon, { children: /* @__PURE__ */ jsx(ServerCrashIcon, {}) }),
|
|
841
|
+
/* @__PURE__ */ jsx(
|
|
842
|
+
RenderPlaceholder,
|
|
843
|
+
{
|
|
844
|
+
node: error,
|
|
845
|
+
defaultActions: onRetry && /* @__PURE__ */ jsx(
|
|
846
|
+
Button,
|
|
847
|
+
{
|
|
848
|
+
variant: "light",
|
|
849
|
+
color: "neutral",
|
|
850
|
+
size: "sm",
|
|
851
|
+
startSlot: /* @__PURE__ */ jsx(RotateCwIcon, {}),
|
|
852
|
+
onClick: onRetry,
|
|
853
|
+
children: "Retry"
|
|
854
|
+
}
|
|
855
|
+
)
|
|
856
|
+
}
|
|
857
|
+
)
|
|
858
|
+
]
|
|
859
|
+
}
|
|
860
|
+
)).with(
|
|
861
|
+
"loading",
|
|
862
|
+
() => Array.from({ length: skeletonRowCount }).map((_, cardIndex) => (
|
|
863
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: placeholder cards, no identity
|
|
864
|
+
/* @__PURE__ */ jsx(Card, { padding: "sm", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Flex, { direction: "col", gap: "xs", children: table.getVisibleLeafColumns().slice(0, 4).map((column) => /* @__PURE__ */ jsx("div", { children: column.columnDef.meta?.skeleton ?? /* @__PURE__ */ jsx(Skeleton, { shape: "rectangular", size: "md", className: "w-full" }) }, column.id)) }) }, `skeleton-${cardIndex}`)
|
|
865
|
+
))
|
|
866
|
+
).with("empty", () => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 items-center justify-center py-6 text-center min-h-48.5", children: [
|
|
867
|
+
/* @__PURE__ */ jsx(ThemeIcon, { children: /* @__PURE__ */ jsx(SearchAlertIcon, {}) }),
|
|
868
|
+
/* @__PURE__ */ jsx(
|
|
869
|
+
RenderPlaceholder,
|
|
870
|
+
{
|
|
871
|
+
node: empty,
|
|
872
|
+
defaultActions: /* @__PURE__ */ jsx(
|
|
873
|
+
Button,
|
|
874
|
+
{
|
|
875
|
+
variant: "light",
|
|
876
|
+
color: "neutral",
|
|
877
|
+
size: "sm",
|
|
878
|
+
startSlot: /* @__PURE__ */ jsx(EraserIcon, {}),
|
|
879
|
+
onClick: () => table.resetColumnFilters(),
|
|
880
|
+
children: "Clear filters"
|
|
881
|
+
}
|
|
882
|
+
)
|
|
883
|
+
}
|
|
884
|
+
)
|
|
885
|
+
] })).with("items", () => {
|
|
886
|
+
const headersByColumnId = new Map(
|
|
887
|
+
table.getFlatHeaders().map((header) => [header.column.id, header])
|
|
888
|
+
);
|
|
889
|
+
return /* @__PURE__ */ jsx(
|
|
890
|
+
"div",
|
|
891
|
+
{
|
|
892
|
+
className: cn(
|
|
893
|
+
"flex flex-col gap-2",
|
|
894
|
+
refetching && "pointer-events-none opacity-60 transition-opacity"
|
|
895
|
+
),
|
|
896
|
+
children: rows.map((row) => /* @__PURE__ */ jsx(
|
|
897
|
+
Card,
|
|
898
|
+
{
|
|
899
|
+
padding: "sm",
|
|
900
|
+
className: cn(
|
|
901
|
+
"transition-colors",
|
|
902
|
+
// Same black/white wash convention as Table's row hover/
|
|
903
|
+
// DataTable's row selection, instead of a fixed per-theme gray.
|
|
904
|
+
"hover:bg-black/5 dark:hover:bg-white/8",
|
|
905
|
+
"data-[selected=true]:bg-black/8 dark:data-[selected=true]:bg-white/16",
|
|
906
|
+
onRowClick && "cursor-pointer"
|
|
907
|
+
),
|
|
908
|
+
...props({ "data-selected": row.getIsSelected() }),
|
|
909
|
+
onClick: onRowClick ? (event) => {
|
|
910
|
+
if (!isInteractiveTarget2(event.target)) onRowClick(row.original);
|
|
911
|
+
} : void 0,
|
|
912
|
+
children: /* @__PURE__ */ jsx(Flex, { direction: "col", gap: "xs", children: row.getVisibleCells().map((cell) => {
|
|
913
|
+
const header = headersByColumnId.get(cell.column.id);
|
|
914
|
+
return /* @__PURE__ */ jsxs(Flex, { justify: "between", gap: "sm", children: [
|
|
915
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", c: "muted", children: header ? renderColumnHeader(header, "stack") : columnLabel(cell.column) }),
|
|
916
|
+
/* @__PURE__ */ jsx("div", { children: flexRender(cell.column.columnDef.cell, cell.getContext()) })
|
|
917
|
+
] }, cell.id);
|
|
918
|
+
}) })
|
|
919
|
+
},
|
|
920
|
+
row.id
|
|
921
|
+
))
|
|
922
|
+
}
|
|
923
|
+
);
|
|
924
|
+
}).exhaustive() });
|
|
925
|
+
}
|
|
926
|
+
function DataTableStackOptions({
|
|
927
|
+
table,
|
|
928
|
+
enableColumnVisibility,
|
|
929
|
+
className
|
|
930
|
+
}) {
|
|
931
|
+
const [open, setOpen] = useState(false);
|
|
932
|
+
const visibleColumns = table.getVisibleLeafColumns();
|
|
933
|
+
const sortableColumns = visibleColumns.filter((column) => column.getCanSort());
|
|
934
|
+
const filterableColumns = visibleColumns.filter((column) => column.columnDef.meta?.filter != null);
|
|
935
|
+
if (sortableColumns.length === 0 && filterableColumns.length === 0 && !enableColumnVisibility) {
|
|
936
|
+
return null;
|
|
937
|
+
}
|
|
938
|
+
const activeFilterCount = filterableColumns.filter(
|
|
939
|
+
(column) => hasActiveFilterValue(column.getFilterValue())
|
|
940
|
+
).length;
|
|
941
|
+
const activeSortCount = sortableColumns.filter((column) => column.getIsSorted()).length;
|
|
942
|
+
const isSorted = table.atoms.sorting.get().length > 0;
|
|
943
|
+
const activeCount = activeFilterCount + (isSorted ? 1 : 0);
|
|
944
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("shrink-0 px-3 pt-3", className), children: [
|
|
945
|
+
/* @__PURE__ */ jsx(
|
|
946
|
+
Button,
|
|
947
|
+
{
|
|
948
|
+
variant: "light",
|
|
949
|
+
color: "neutral",
|
|
950
|
+
size: "sm",
|
|
951
|
+
className: "w-full justify-between",
|
|
952
|
+
startSlot: /* @__PURE__ */ jsx(ListFilterIcon, {}),
|
|
953
|
+
endSlot: activeCount > 0 ? /* @__PURE__ */ jsx(Pill, { size: "xs", children: activeCount }) : void 0,
|
|
954
|
+
onClick: () => setOpen(true),
|
|
955
|
+
"aria-label": activeCount > 0 ? `Table options (${activeCount} active)` : "Table options",
|
|
956
|
+
children: "Table options"
|
|
957
|
+
}
|
|
958
|
+
),
|
|
959
|
+
/* @__PURE__ */ jsx(
|
|
960
|
+
Drawer,
|
|
961
|
+
{
|
|
962
|
+
placement: "bottom",
|
|
963
|
+
withGrabber: true,
|
|
964
|
+
size: "lg",
|
|
965
|
+
title: "Table options",
|
|
966
|
+
open,
|
|
967
|
+
onOpenChange: setOpen,
|
|
968
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
969
|
+
enableColumnVisibility && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
970
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "muted", className: "uppercase tracking-wide", children: [
|
|
971
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "// " }),
|
|
972
|
+
"Columns"
|
|
973
|
+
] }),
|
|
974
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1.5", children: table.getAllLeafColumns().filter((column) => !column.columnDef.meta?.hideFromMenu).map((column) => /* @__PURE__ */ jsx(
|
|
975
|
+
Checkbox,
|
|
976
|
+
{
|
|
977
|
+
size: "sm",
|
|
978
|
+
checked: column.getIsVisible(),
|
|
979
|
+
disabled: !column.getCanHide(),
|
|
980
|
+
onCheckedChange: () => column.toggleVisibility(),
|
|
981
|
+
label: columnLabel(column)
|
|
982
|
+
},
|
|
983
|
+
column.id
|
|
984
|
+
)) })
|
|
985
|
+
] }),
|
|
986
|
+
sortableColumns.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
987
|
+
/* @__PURE__ */ jsx("hr", { className: "mt-6 mb-2 border-0 border-t border-brand-900/20 dark:border-white/15" }),
|
|
988
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
989
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
990
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "muted", className: "uppercase tracking-wide", children: [
|
|
991
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "// " }),
|
|
992
|
+
"Sort by"
|
|
993
|
+
] }),
|
|
994
|
+
activeSortCount > 0 ? /* @__PURE__ */ jsx(
|
|
995
|
+
"button",
|
|
996
|
+
{
|
|
997
|
+
type: "button",
|
|
998
|
+
onClick: () => table.resetSorting(),
|
|
999
|
+
className: "text-xs font-medium text-gray-light-500 hover:text-gray-light-900 dark:text-gray-dark-400 dark:hover:text-gray-dark-100",
|
|
1000
|
+
children: "Clear sorts"
|
|
1001
|
+
}
|
|
1002
|
+
) : null
|
|
1003
|
+
] }),
|
|
1004
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5", children: sortableColumns.map((column) => {
|
|
1005
|
+
const sort = column.getIsSorted() || "none";
|
|
1006
|
+
const { icon: Icon, label: mode } = SORT_LOOKUP[sort];
|
|
1007
|
+
const label = columnLabel(column);
|
|
1008
|
+
return /* @__PURE__ */ jsxs(
|
|
1009
|
+
"button",
|
|
1010
|
+
{
|
|
1011
|
+
type: "button",
|
|
1012
|
+
onClick: column.getToggleSortingHandler(),
|
|
1013
|
+
className: "flex items-center justify-start gap-2 rounded-md py-1.5 text-sm font-medium hover:bg-black/5 dark:hover:bg-white/8",
|
|
1014
|
+
"aria-label": `Sort ${label} (${mode})`,
|
|
1015
|
+
children: [
|
|
1016
|
+
/* @__PURE__ */ jsx(
|
|
1017
|
+
Icon,
|
|
1018
|
+
{
|
|
1019
|
+
"aria-hidden": "true",
|
|
1020
|
+
className: "size-4 shrink-0 text-gray-light-400 dark:text-gray-dark-500"
|
|
1021
|
+
}
|
|
1022
|
+
),
|
|
1023
|
+
label
|
|
1024
|
+
]
|
|
1025
|
+
},
|
|
1026
|
+
column.id
|
|
1027
|
+
);
|
|
1028
|
+
}) })
|
|
1029
|
+
] })
|
|
1030
|
+
] }),
|
|
1031
|
+
filterableColumns.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1032
|
+
(sortableColumns.length > 0 || enableColumnVisibility) && /* @__PURE__ */ jsx("hr", { className: "mt-6 mb-2 border-0 border-t border-brand-900/20 dark:border-white/15" }),
|
|
1033
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
1034
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1035
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "muted", className: "uppercase tracking-wide", children: [
|
|
1036
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "// " }),
|
|
1037
|
+
"Filters"
|
|
1038
|
+
] }),
|
|
1039
|
+
activeFilterCount > 0 ? /* @__PURE__ */ jsx(
|
|
1040
|
+
"button",
|
|
1041
|
+
{
|
|
1042
|
+
type: "button",
|
|
1043
|
+
onClick: () => table.resetColumnFilters(),
|
|
1044
|
+
className: "text-xs font-medium text-gray-light-500 hover:text-gray-light-900 dark:text-gray-dark-400 dark:hover:text-gray-dark-100",
|
|
1045
|
+
children: "Clear filters"
|
|
1046
|
+
}
|
|
1047
|
+
) : null
|
|
1048
|
+
] }),
|
|
1049
|
+
filterableColumns.map((column) => {
|
|
1050
|
+
const filter = column.columnDef.meta?.filter;
|
|
1051
|
+
if (!filter) return null;
|
|
1052
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
1053
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", className: "font-medium", children: columnLabel(column) }),
|
|
1054
|
+
/* @__PURE__ */ jsx(DataTableFilterControl, { column, filter })
|
|
1055
|
+
] }, column.id);
|
|
1056
|
+
})
|
|
1057
|
+
] })
|
|
1058
|
+
] })
|
|
1059
|
+
] })
|
|
1060
|
+
}
|
|
1061
|
+
)
|
|
1062
|
+
] });
|
|
1063
|
+
}
|
|
1064
|
+
function DataTableGlobalFilter({
|
|
1065
|
+
value,
|
|
1066
|
+
onChange,
|
|
1067
|
+
placeholder = "Search\u2026",
|
|
1068
|
+
debounce = 300
|
|
1069
|
+
}) {
|
|
1070
|
+
const [local, setLocal] = useDebouncedCommit(value, debounce, onChange);
|
|
1071
|
+
return /* @__PURE__ */ jsx(
|
|
1072
|
+
Input,
|
|
1073
|
+
{
|
|
1074
|
+
size: "sm",
|
|
1075
|
+
placeholder,
|
|
1076
|
+
startSlot: /* @__PURE__ */ jsx(Search, { className: "size-4" }),
|
|
1077
|
+
value: local,
|
|
1078
|
+
onChange: (e) => setLocal(e.target.value),
|
|
1079
|
+
className: "max-w-64"
|
|
1080
|
+
}
|
|
1081
|
+
);
|
|
1082
|
+
}
|
|
1083
|
+
function DataTableColumnVisibilityMenu({
|
|
1084
|
+
table,
|
|
1085
|
+
className
|
|
1086
|
+
}) {
|
|
1087
|
+
const columns = table.getAllLeafColumns().filter((column) => !column.columnDef.meta?.hideFromMenu);
|
|
1088
|
+
return /* @__PURE__ */ jsxs(Root, { closeOnSelect: false, position: "bottom-end", children: [
|
|
1089
|
+
/* @__PURE__ */ jsx(Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1090
|
+
ActionIcon,
|
|
1091
|
+
{
|
|
1092
|
+
variant: "subtle",
|
|
1093
|
+
color: "neutral",
|
|
1094
|
+
size: "sm",
|
|
1095
|
+
"aria-label": "Toggle column visibility",
|
|
1096
|
+
className,
|
|
1097
|
+
children: /* @__PURE__ */ jsx(Columns3CogIcon, { strokeWidth: 1 })
|
|
1098
|
+
}
|
|
1099
|
+
) }),
|
|
1100
|
+
/* @__PURE__ */ jsx(Content, { children: columns.map((column) => /* @__PURE__ */ jsx(
|
|
1101
|
+
CheckboxItem,
|
|
1102
|
+
{
|
|
1103
|
+
value: column.id,
|
|
1104
|
+
checked: column.getIsVisible(),
|
|
1105
|
+
disabled: !column.getCanHide(),
|
|
1106
|
+
onCheckedChange: () => column.toggleVisibility(),
|
|
1107
|
+
children: columnLabel(column)
|
|
1108
|
+
},
|
|
1109
|
+
column.id
|
|
1110
|
+
)) })
|
|
1111
|
+
] });
|
|
1112
|
+
}
|
|
1113
|
+
var isInteractiveTarget = (target) => target instanceof Element && target.closest("a,button,input,label,select,textarea,summary,[role]") != null;
|
|
1114
|
+
function resolveSort(canSort, sorted) {
|
|
1115
|
+
return canSort ? sorted ? sorted === "asc" ? "ascending" : "descending" : "none" : void 0;
|
|
1116
|
+
}
|
|
1117
|
+
var tableCell = cva("", {
|
|
1118
|
+
variants: {
|
|
1119
|
+
align: {
|
|
1120
|
+
start: "text-start",
|
|
1121
|
+
end: "text-end",
|
|
1122
|
+
center: "text-center"
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
});
|
|
1126
|
+
var tableHeaderCell2 = cva("relative", {
|
|
1127
|
+
variants: {
|
|
1128
|
+
align: {
|
|
1129
|
+
start: "text-start justify-start",
|
|
1130
|
+
center: "text-center justify-center",
|
|
1131
|
+
end: "text-end justify-end"
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
});
|
|
1135
|
+
var DEFAULT_PAGINATION = { pageIndex: 0, pageSize: 20 };
|
|
1136
|
+
var DATA_TABLE_DEFAULT_EMPTY = "No results found";
|
|
1137
|
+
var defaultRowTestId = (id) => `row-${id}`;
|
|
1138
|
+
var SELECT_CHECKBOX_PX = { xs: 14, sm: 16, md: 18, lg: 20, xl: 24 };
|
|
1139
|
+
var SELECT_CELL_PADDING_PX = { xs: 8, sm: 10, md: 12, lg: 16, xl: 16 };
|
|
1140
|
+
function createSelectColumn(size) {
|
|
1141
|
+
const width = SELECT_CHECKBOX_PX[size] + SELECT_CELL_PADDING_PX[size] * 2;
|
|
1142
|
+
return {
|
|
1143
|
+
id: "__select__",
|
|
1144
|
+
enableSorting: false,
|
|
1145
|
+
enableHiding: false,
|
|
1146
|
+
enableResizing: false,
|
|
1147
|
+
size: width,
|
|
1148
|
+
minSize: width,
|
|
1149
|
+
maxSize: width,
|
|
1150
|
+
meta: {
|
|
1151
|
+
hideFromMenu: true
|
|
1152
|
+
},
|
|
1153
|
+
header: ({ table, mode }) => mode === "table" ? /* @__PURE__ */ jsx(
|
|
1154
|
+
Checkbox,
|
|
1155
|
+
{
|
|
1156
|
+
size,
|
|
1157
|
+
checked: table.getIsAllPageRowsSelected() ? true : table.getIsSomePageRowsSelected() ? "indeterminate" : false,
|
|
1158
|
+
onCheckedChange: (checked) => table.toggleAllPageRowsSelected(checked === true),
|
|
1159
|
+
label: "Select all rows",
|
|
1160
|
+
classNames: { label: "sr-only" }
|
|
1161
|
+
}
|
|
1162
|
+
) : null,
|
|
1163
|
+
cell: ({ row }) => /* @__PURE__ */ jsx("span", { className: "flex flex-row justify-center items-center", children: /* @__PURE__ */ jsx(
|
|
1164
|
+
Checkbox,
|
|
1165
|
+
{
|
|
1166
|
+
size,
|
|
1167
|
+
checked: row.getIsSelected(),
|
|
1168
|
+
onCheckedChange: (checked) => row.toggleSelected(checked === true),
|
|
1169
|
+
disabled: !row.getCanSelect(),
|
|
1170
|
+
label: `Select row ${row.id}`,
|
|
1171
|
+
classNames: { label: "sr-only" }
|
|
1172
|
+
}
|
|
1173
|
+
) })
|
|
1174
|
+
};
|
|
1175
|
+
}
|
|
1176
|
+
function DataTableComponent({
|
|
1177
|
+
data,
|
|
1178
|
+
columns,
|
|
1179
|
+
getRowId,
|
|
1180
|
+
getRowTestId,
|
|
1181
|
+
testId,
|
|
1182
|
+
sorting: sortingProp,
|
|
1183
|
+
onSortingChange,
|
|
1184
|
+
filters: filtersProp,
|
|
1185
|
+
onFiltersChange,
|
|
1186
|
+
globalFilter: globalFilterProp,
|
|
1187
|
+
onGlobalFilterChange,
|
|
1188
|
+
pagination: paginationProp,
|
|
1189
|
+
onPaginationChange,
|
|
1190
|
+
rowSelection: rowSelectionProp,
|
|
1191
|
+
onRowSelectionChange,
|
|
1192
|
+
columnVisibility: columnVisibilityProp,
|
|
1193
|
+
onColumnVisibilityChange,
|
|
1194
|
+
columnSizing: columnSizingProp,
|
|
1195
|
+
onColumnSizingChange,
|
|
1196
|
+
initialState,
|
|
1197
|
+
manualSorting,
|
|
1198
|
+
manualFiltering,
|
|
1199
|
+
manualPagination,
|
|
1200
|
+
enableMultiSort,
|
|
1201
|
+
rowCount,
|
|
1202
|
+
pageCount,
|
|
1203
|
+
hasNextPage,
|
|
1204
|
+
pageSizeOptions,
|
|
1205
|
+
translations,
|
|
1206
|
+
paginationMode,
|
|
1207
|
+
loading = false,
|
|
1208
|
+
error,
|
|
1209
|
+
onRetry,
|
|
1210
|
+
empty = DATA_TABLE_DEFAULT_EMPTY,
|
|
1211
|
+
enableRowSelection,
|
|
1212
|
+
onRowClick,
|
|
1213
|
+
title,
|
|
1214
|
+
toolbarActions,
|
|
1215
|
+
enableGlobalFilter,
|
|
1216
|
+
globalFilterPlaceholder,
|
|
1217
|
+
globalFilterDebounce,
|
|
1218
|
+
enableColumnVisibility: _enableColumnVisibility,
|
|
1219
|
+
enableColumnResizing,
|
|
1220
|
+
enablePagination = true,
|
|
1221
|
+
sizing = "fixed",
|
|
1222
|
+
fillLastColumn = true,
|
|
1223
|
+
size,
|
|
1224
|
+
striped,
|
|
1225
|
+
stickyHeader,
|
|
1226
|
+
stickyFooter,
|
|
1227
|
+
responsive = "scroll",
|
|
1228
|
+
className,
|
|
1229
|
+
classNames
|
|
1230
|
+
}) {
|
|
1231
|
+
const [pagination, handlePaginationChange] = useUncontrolled({
|
|
1232
|
+
value: paginationProp,
|
|
1233
|
+
onChange: onPaginationChange,
|
|
1234
|
+
defaultValue: initialState?.pagination ?? DEFAULT_PAGINATION
|
|
1235
|
+
});
|
|
1236
|
+
const resetPagignation = () => handlePaginationChange((old) => old.pageIndex === 0 ? old : { ...old, pageIndex: 0 });
|
|
1237
|
+
const [sorting, handleSortingChange] = useUncontrolled({
|
|
1238
|
+
value: sortingProp,
|
|
1239
|
+
onChange: (value) => {
|
|
1240
|
+
resetPagignation();
|
|
1241
|
+
onSortingChange?.(value);
|
|
1242
|
+
},
|
|
1243
|
+
defaultValue: initialState?.sorting ?? []
|
|
1244
|
+
});
|
|
1245
|
+
const [columnFilters, handleColumnFiltersChange] = useUncontrolled({
|
|
1246
|
+
value: filtersProp,
|
|
1247
|
+
onChange: (value) => {
|
|
1248
|
+
resetPagignation();
|
|
1249
|
+
onFiltersChange?.(value);
|
|
1250
|
+
},
|
|
1251
|
+
defaultValue: initialState?.filters ?? []
|
|
1252
|
+
});
|
|
1253
|
+
const [globalFilter, handleGlobalFilterChange] = useUncontrolled({
|
|
1254
|
+
value: globalFilterProp,
|
|
1255
|
+
onChange: (value) => {
|
|
1256
|
+
resetPagignation();
|
|
1257
|
+
onGlobalFilterChange?.(value);
|
|
1258
|
+
},
|
|
1259
|
+
defaultValue: initialState?.globalFilter ?? ""
|
|
1260
|
+
});
|
|
1261
|
+
const [rowSelection, handleRowSelectionChange] = useUncontrolled({
|
|
1262
|
+
value: rowSelectionProp,
|
|
1263
|
+
onChange: onRowSelectionChange,
|
|
1264
|
+
defaultValue: initialState?.rowSelection ?? {}
|
|
1265
|
+
});
|
|
1266
|
+
const [columnVisibility, handleColumnVisibilityChange] = useUncontrolled({
|
|
1267
|
+
value: columnVisibilityProp,
|
|
1268
|
+
onChange: onColumnVisibilityChange,
|
|
1269
|
+
defaultValue: initialState?.columnVisibility ?? {}
|
|
1270
|
+
});
|
|
1271
|
+
const [columnSizing, handleColumnSizingChange] = useUncontrolled({
|
|
1272
|
+
value: columnSizingProp,
|
|
1273
|
+
onChange: onColumnSizingChange,
|
|
1274
|
+
defaultValue: initialState?.columnSizing ?? {}
|
|
1275
|
+
});
|
|
1276
|
+
const tableColumns = useMemo(() => {
|
|
1277
|
+
const withFilterFns = columns.map((col) => {
|
|
1278
|
+
const filter = col.meta?.filter;
|
|
1279
|
+
if (!filter || col.filterFn != null) return col;
|
|
1280
|
+
return { ...col, filterFn: resolveFilterFn(filter) };
|
|
1281
|
+
});
|
|
1282
|
+
if (!enableRowSelection) return withFilterFns;
|
|
1283
|
+
return [createSelectColumn(size ?? "md"), ...withFilterFns];
|
|
1284
|
+
}, [columns, enableRowSelection, size]);
|
|
1285
|
+
const table = useTable({
|
|
1286
|
+
// v9 makes features opt-in; `dataTableFeatures` is the kit's registry and
|
|
1287
|
+
// also carries the three row models that used to be `get*RowModel` options.
|
|
1288
|
+
// No selector argument on purpose: the default subscribes to every slice,
|
|
1289
|
+
// and the internal `columnResizing` slice is *not* controlled by DataTable —
|
|
1290
|
+
// `column.getIsResizing()` reads it to paint the active drag handle.
|
|
1291
|
+
features: dataTableFeatures,
|
|
1292
|
+
data,
|
|
1293
|
+
columns: tableColumns,
|
|
1294
|
+
getRowId,
|
|
1295
|
+
state: {
|
|
1296
|
+
sorting,
|
|
1297
|
+
columnFilters,
|
|
1298
|
+
globalFilter,
|
|
1299
|
+
pagination,
|
|
1300
|
+
rowSelection,
|
|
1301
|
+
columnVisibility,
|
|
1302
|
+
columnSizing
|
|
1303
|
+
},
|
|
1304
|
+
onSortingChange: handleSortingChange,
|
|
1305
|
+
onColumnFiltersChange: handleColumnFiltersChange,
|
|
1306
|
+
onGlobalFilterChange: handleGlobalFilterChange,
|
|
1307
|
+
onPaginationChange: handlePaginationChange,
|
|
1308
|
+
onRowSelectionChange: handleRowSelectionChange,
|
|
1309
|
+
onColumnVisibilityChange: handleColumnVisibilityChange,
|
|
1310
|
+
onColumnSizingChange: handleColumnSizingChange,
|
|
1311
|
+
manualSorting,
|
|
1312
|
+
manualFiltering,
|
|
1313
|
+
manualPagination,
|
|
1314
|
+
enableMultiSort,
|
|
1315
|
+
enableRowSelection,
|
|
1316
|
+
// No fixed width for a drag to adjust in "auto" mode — see the `sizing` prop doc.
|
|
1317
|
+
enableColumnResizing: Boolean(enableColumnResizing) && sizing === "fixed",
|
|
1318
|
+
columnResizeMode: "onChange",
|
|
1319
|
+
rowCount,
|
|
1320
|
+
pageCount
|
|
1321
|
+
});
|
|
1322
|
+
const rows = table.getRowModel().rows;
|
|
1323
|
+
const visibleColumnCount = table.getVisibleLeafColumns().length;
|
|
1324
|
+
const showSkeleton = loading && rows.length === 0;
|
|
1325
|
+
const isRefetching = loading && rows.length > 0;
|
|
1326
|
+
const skeletonRowCount = Math.min(Math.max(pagination.pageSize, 1), 100);
|
|
1327
|
+
const handleRowClick = (row) => (event) => {
|
|
1328
|
+
if (!onRowClick || isInteractiveTarget(event.target)) return;
|
|
1329
|
+
onRowClick(row);
|
|
1330
|
+
};
|
|
1331
|
+
const enableColumnVisibility = _enableColumnVisibility && table.getAllLeafColumns().some((column) => !column.columnDef.meta?.hideFromMenu);
|
|
1332
|
+
const showToolbar = title != null || toolbarActions != null || enableGlobalFilter || enableColumnVisibility;
|
|
1333
|
+
const isStacked = responsive === "stack";
|
|
1334
|
+
const isFixedSizing = sizing === "fixed";
|
|
1335
|
+
const isFillLast = isFixedSizing && fillLastColumn;
|
|
1336
|
+
const view = match({ error, showSkeleton, items: rows.length }).with({ error: P.nonNullable }, () => "error").with({ showSkeleton: true }, () => "loading").with({ items: P.number.lte(0) }, () => "empty").otherwise(() => "items");
|
|
1337
|
+
return /* @__PURE__ */ jsxs(
|
|
1338
|
+
Table,
|
|
1339
|
+
{
|
|
1340
|
+
testId,
|
|
1341
|
+
size,
|
|
1342
|
+
striped,
|
|
1343
|
+
stickyHeader,
|
|
1344
|
+
stickyFooter,
|
|
1345
|
+
"aria-busy": loading || void 0,
|
|
1346
|
+
className: cn(
|
|
1347
|
+
isStacked && "@container",
|
|
1348
|
+
// Selected rows — black/white wash + translucent border, same
|
|
1349
|
+
// background-dependent convention as Card's own translucent border,
|
|
1350
|
+
// instead of a fixed per-theme gray.
|
|
1351
|
+
// Yeah this selector is quite hardcore but we need to select the row before as we need to change the border on select
|
|
1352
|
+
"[&_tbody_tr]:data-[selected=true]:bg-black/8! [&_tbody_tr:has(+tr[data-selected=true])_td]:border-black/15! [&_tbody_tr[data-selected=true]_td]:border-black/15!",
|
|
1353
|
+
"dark:[&_tbody_tr]:data-[selected=true]:bg-white/16! dark:[&_tbody_tr:has(+tr[data-selected=true])_td]:border-white/20! dark:[&_tbody_tr[data-selected=true]_td]:border-white/20!",
|
|
1354
|
+
className,
|
|
1355
|
+
classNames?.root
|
|
1356
|
+
),
|
|
1357
|
+
children: [
|
|
1358
|
+
showToolbar && /* @__PURE__ */ jsxs(Table.Toolbar, { className: classNames?.toolbar, children: [
|
|
1359
|
+
title != null ? /* @__PURE__ */ jsx(Table.Title, { children: title }) : /* @__PURE__ */ jsx("span", {}),
|
|
1360
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1361
|
+
enableGlobalFilter && /* @__PURE__ */ jsx(
|
|
1362
|
+
DataTableGlobalFilter,
|
|
1363
|
+
{
|
|
1364
|
+
value: globalFilter,
|
|
1365
|
+
onChange: handleGlobalFilterChange,
|
|
1366
|
+
placeholder: globalFilterPlaceholder,
|
|
1367
|
+
debounce: globalFilterDebounce
|
|
1368
|
+
}
|
|
1369
|
+
),
|
|
1370
|
+
toolbarActions,
|
|
1371
|
+
enableColumnVisibility && /* @__PURE__ */ jsx(
|
|
1372
|
+
DataTableColumnVisibilityMenu,
|
|
1373
|
+
{
|
|
1374
|
+
table,
|
|
1375
|
+
className: isStacked ? "hidden @lg:flex" : void 0
|
|
1376
|
+
}
|
|
1377
|
+
)
|
|
1378
|
+
] })
|
|
1379
|
+
] }),
|
|
1380
|
+
/* @__PURE__ */ jsxs(
|
|
1381
|
+
Table.Content,
|
|
1382
|
+
{
|
|
1383
|
+
className: cn(view !== "items" && "min-h-64", isStacked ? "hidden @lg:flex" : void 0),
|
|
1384
|
+
classNames: {
|
|
1385
|
+
table: cn(isFixedSizing ? "table-fixed" : "table-auto", classNames?.table)
|
|
1386
|
+
},
|
|
1387
|
+
style: !isFixedSizing ? void 0 : (
|
|
1388
|
+
// `w-full` (the base Table.Content class) supplies `width: 100%`; a
|
|
1389
|
+
// `min-width` floor lets the table still grow past its container for a
|
|
1390
|
+
// wide sum of column sizes, while leaving the last column's own width
|
|
1391
|
+
// unset (below) so it's the one CSS distributes 100%'s slack into.
|
|
1392
|
+
isFillLast ? { minWidth: table.getTotalSize() } : { width: table.getTotalSize() }
|
|
1393
|
+
),
|
|
1394
|
+
children: [
|
|
1395
|
+
/* @__PURE__ */ jsx(Table.Head, { className: classNames?.head, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(Table.Row, { className: classNames?.headerRow, children: headerGroup.headers.map((header, index, headers) => {
|
|
1396
|
+
const canSort = header.column.getCanSort();
|
|
1397
|
+
const sorted = header.column.getIsSorted();
|
|
1398
|
+
const isLast = index === headers.length - 1;
|
|
1399
|
+
const fillsRemaining = isFillLast && isLast;
|
|
1400
|
+
const resizable = isFixedSizing && !fillsRemaining && header.column.getCanResize();
|
|
1401
|
+
return /* @__PURE__ */ jsx(
|
|
1402
|
+
Table.HeaderCell,
|
|
1403
|
+
{
|
|
1404
|
+
testId: `header-${header.column.id}`,
|
|
1405
|
+
style: {
|
|
1406
|
+
width: isFixedSizing && !fillsRemaining ? header.getSize() : void 0
|
|
1407
|
+
},
|
|
1408
|
+
className: cn(
|
|
1409
|
+
tableHeaderCell2({ align: header.column.columnDef.meta?.align }),
|
|
1410
|
+
classNames?.headerCell
|
|
1411
|
+
),
|
|
1412
|
+
"aria-sort": resolveSort(canSort, sorted),
|
|
1413
|
+
children: !header.isPlaceholder && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1414
|
+
/* @__PURE__ */ jsx(
|
|
1415
|
+
DataTableHeaderCell,
|
|
1416
|
+
{
|
|
1417
|
+
header,
|
|
1418
|
+
truncate: isFixedSizing && header.column.id !== "__select__"
|
|
1419
|
+
}
|
|
1420
|
+
),
|
|
1421
|
+
resizable && /* @__PURE__ */ jsx(DataTableColumnResizeHandle, { header })
|
|
1422
|
+
] })
|
|
1423
|
+
},
|
|
1424
|
+
header.id
|
|
1425
|
+
);
|
|
1426
|
+
}) }, headerGroup.id)) }),
|
|
1427
|
+
/* @__PURE__ */ jsx(
|
|
1428
|
+
Table.Body,
|
|
1429
|
+
{
|
|
1430
|
+
className: cn(
|
|
1431
|
+
classNames?.body,
|
|
1432
|
+
isRefetching && "pointer-events-none opacity-60 transition-opacity"
|
|
1433
|
+
),
|
|
1434
|
+
children: match(view).with("error", () => /* @__PURE__ */ jsx(Table.Row, { "data-placeholder": true, children: /* @__PURE__ */ jsx(
|
|
1435
|
+
Table.Cell,
|
|
1436
|
+
{
|
|
1437
|
+
colSpan: visibleColumnCount,
|
|
1438
|
+
role: "alert",
|
|
1439
|
+
className: cn("py-6 text-center", classNames?.error),
|
|
1440
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 items-center justify-center min-h-48.5", children: [
|
|
1441
|
+
/* @__PURE__ */ jsx(ThemeIcon, { children: /* @__PURE__ */ jsx(ServerCrashIcon, {}) }),
|
|
1442
|
+
/* @__PURE__ */ jsx(
|
|
1443
|
+
RenderPlaceholder,
|
|
1444
|
+
{
|
|
1445
|
+
node: error,
|
|
1446
|
+
defaultActions: onRetry && /* @__PURE__ */ jsx(
|
|
1447
|
+
Button,
|
|
1448
|
+
{
|
|
1449
|
+
variant: "light",
|
|
1450
|
+
color: "neutral",
|
|
1451
|
+
size: "sm",
|
|
1452
|
+
startSlot: /* @__PURE__ */ jsx(RotateCwIcon, {}),
|
|
1453
|
+
onClick: onRetry,
|
|
1454
|
+
children: "Retry"
|
|
1455
|
+
}
|
|
1456
|
+
)
|
|
1457
|
+
}
|
|
1458
|
+
)
|
|
1459
|
+
] })
|
|
1460
|
+
}
|
|
1461
|
+
) })).with("empty", () => /* @__PURE__ */ jsx(Table.Row, { "data-placeholder": true, children: /* @__PURE__ */ jsx(
|
|
1462
|
+
Table.Cell,
|
|
1463
|
+
{
|
|
1464
|
+
colSpan: visibleColumnCount,
|
|
1465
|
+
className: cn("py-6 text-center", classNames?.empty),
|
|
1466
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 items-center justify-center min-h-48.5", children: [
|
|
1467
|
+
/* @__PURE__ */ jsx(ThemeIcon, { children: /* @__PURE__ */ jsx(SearchAlertIcon, {}) }),
|
|
1468
|
+
/* @__PURE__ */ jsx(
|
|
1469
|
+
RenderPlaceholder,
|
|
1470
|
+
{
|
|
1471
|
+
node: empty,
|
|
1472
|
+
defaultActions: /* @__PURE__ */ jsx(
|
|
1473
|
+
Button,
|
|
1474
|
+
{
|
|
1475
|
+
variant: "light",
|
|
1476
|
+
color: "neutral",
|
|
1477
|
+
size: "sm",
|
|
1478
|
+
startSlot: /* @__PURE__ */ jsx(EraserIcon, {}),
|
|
1479
|
+
onClick: () => table.resetColumnFilters(),
|
|
1480
|
+
children: "Clear filters"
|
|
1481
|
+
}
|
|
1482
|
+
)
|
|
1483
|
+
}
|
|
1484
|
+
)
|
|
1485
|
+
] })
|
|
1486
|
+
}
|
|
1487
|
+
) })).with(
|
|
1488
|
+
"loading",
|
|
1489
|
+
() => Array.from({ length: skeletonRowCount }).map((_, rowIndex) => /* @__PURE__ */ jsx(
|
|
1490
|
+
Table.Row,
|
|
1491
|
+
{
|
|
1492
|
+
testId: `skeleton-row-${rowIndex}`,
|
|
1493
|
+
"aria-hidden": "true",
|
|
1494
|
+
"data-placeholder": true,
|
|
1495
|
+
children: table.getVisibleLeafColumns().map((column) => /* @__PURE__ */ jsx(
|
|
1496
|
+
Table.Cell,
|
|
1497
|
+
{
|
|
1498
|
+
testId: `skeleton-row-${rowIndex}-cell-${column.id}`,
|
|
1499
|
+
children: column.columnDef.meta?.skeleton ?? /* @__PURE__ */ jsx(Skeleton, { shape: "rectangular", size, className: "w-full" })
|
|
1500
|
+
},
|
|
1501
|
+
column.id
|
|
1502
|
+
))
|
|
1503
|
+
},
|
|
1504
|
+
`skeleton-${rowIndex}`
|
|
1505
|
+
))
|
|
1506
|
+
).with(
|
|
1507
|
+
"items",
|
|
1508
|
+
() => rows.map((row) => {
|
|
1509
|
+
const rowTestId = getRowTestId ? getRowTestId(row.original, row.id) : defaultRowTestId(row.id);
|
|
1510
|
+
return /* @__PURE__ */ jsx(
|
|
1511
|
+
Table.Row,
|
|
1512
|
+
{
|
|
1513
|
+
testId: rowTestId,
|
|
1514
|
+
onClick: onRowClick ? handleRowClick(row.original) : void 0,
|
|
1515
|
+
className: cn(onRowClick && "cursor-pointer", classNames?.row),
|
|
1516
|
+
...props({ "data-selected": row.getIsSelected() }),
|
|
1517
|
+
children: row.getVisibleCells().map((cell, index, cells) => {
|
|
1518
|
+
const fillsRemaining = isFillLast && index === cells.length - 1;
|
|
1519
|
+
return /* @__PURE__ */ jsx(
|
|
1520
|
+
Table.Cell,
|
|
1521
|
+
{
|
|
1522
|
+
testId: `${rowTestId}-cell-${cell.column.id}`,
|
|
1523
|
+
style: {
|
|
1524
|
+
width: isFixedSizing && !fillsRemaining ? cell.column.getSize() : void 0
|
|
1525
|
+
},
|
|
1526
|
+
className: cn(
|
|
1527
|
+
tableCell({
|
|
1528
|
+
align: cell.column.columnDef.meta?.align
|
|
1529
|
+
}),
|
|
1530
|
+
isFixedSizing && cell.column.id !== "__select__" && "truncate",
|
|
1531
|
+
classNames?.cell
|
|
1532
|
+
),
|
|
1533
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
1534
|
+
},
|
|
1535
|
+
cell.id
|
|
1536
|
+
);
|
|
1537
|
+
})
|
|
1538
|
+
},
|
|
1539
|
+
row.id
|
|
1540
|
+
);
|
|
1541
|
+
})
|
|
1542
|
+
).exhaustive()
|
|
1543
|
+
}
|
|
1544
|
+
)
|
|
1545
|
+
]
|
|
1546
|
+
}
|
|
1547
|
+
),
|
|
1548
|
+
isStacked && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1549
|
+
/* @__PURE__ */ jsx(
|
|
1550
|
+
DataTableStackOptions,
|
|
1551
|
+
{
|
|
1552
|
+
table,
|
|
1553
|
+
enableColumnVisibility,
|
|
1554
|
+
className: "@lg:hidden"
|
|
1555
|
+
}
|
|
1556
|
+
),
|
|
1557
|
+
/* @__PURE__ */ jsx(
|
|
1558
|
+
DataTableStackedRows,
|
|
1559
|
+
{
|
|
1560
|
+
rows,
|
|
1561
|
+
view,
|
|
1562
|
+
error,
|
|
1563
|
+
refetching: isRefetching,
|
|
1564
|
+
empty,
|
|
1565
|
+
onRowClick,
|
|
1566
|
+
isInteractiveTarget,
|
|
1567
|
+
onRetry,
|
|
1568
|
+
table,
|
|
1569
|
+
skeletonRowCount,
|
|
1570
|
+
className: "@lg:hidden"
|
|
1571
|
+
}
|
|
1572
|
+
)
|
|
1573
|
+
] }),
|
|
1574
|
+
enablePagination && /* @__PURE__ */ jsx(
|
|
1575
|
+
DataTablePagination,
|
|
1576
|
+
{
|
|
1577
|
+
table,
|
|
1578
|
+
pageSizeOptions,
|
|
1579
|
+
hasNextPage,
|
|
1580
|
+
translations,
|
|
1581
|
+
paginationMode,
|
|
1582
|
+
className: classNames?.pagination
|
|
1583
|
+
}
|
|
1584
|
+
)
|
|
1585
|
+
]
|
|
1586
|
+
}
|
|
1587
|
+
);
|
|
1588
|
+
}
|
|
1589
|
+
var DataTable = Object.assign(DataTableComponent, {
|
|
1590
|
+
Pagination: DataTablePagination
|
|
1591
|
+
});
|
|
1592
|
+
|
|
1593
|
+
// src/components/data-table/data-table-schema.ts
|
|
1594
|
+
function columnHelperFor(_schema) {
|
|
1595
|
+
return createColumnHelper();
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
// src/components/data-table/data-table-skeleton.ts
|
|
1599
|
+
var DATA_TABLE_SKELETON_CLASS = "animate-pulse rounded-xs bg-black/15 dark:bg-white/8";
|
|
1600
|
+
|
|
1601
|
+
export { DATA_TABLE_SKELETON_CLASS, DataTable, columnHelperFor, createColumnHelper, dataTableFeatures };
|
|
1602
|
+
//# sourceMappingURL=index.js.map
|
|
1603
|
+
//# sourceMappingURL=index.js.map
|