@logicplanes/kaeso-ui 0.7.5-rc.9 → 0.7.6
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/AGENTS.md +2 -2
- package/ai/component-guides.md +37 -8
- package/ai/component-registry.json +19 -12
- package/ai/component-registry.md +10 -9
- package/ai/icons.md +1 -1
- package/ai/tokens.md +1 -1
- package/dist/chunks/{app-frame-DPIr7C6C.js → app-frame-COfWg7wS.js} +3 -3
- package/dist/chunks/app-frame-COfWg7wS.js.map +1 -0
- package/dist/chunks/arrow-focus-D9q8rMct.js.map +1 -1
- package/dist/chunks/avatar-C4r7x_uJ.js.map +1 -1
- package/dist/chunks/avatar-CQNbSj8X.js.map +1 -1
- package/dist/chunks/badge-CU9K-wA1.js.map +1 -1
- package/dist/chunks/banner-R5GIFExf.js.map +1 -1
- package/dist/chunks/button-CXdEDVSI.js.map +1 -1
- package/dist/chunks/button-group-CbzjByVu.js.map +1 -1
- package/dist/chunks/calendar-BpY2J5Qf.js.map +1 -1
- package/dist/chunks/{checkbox-6GPT3xkr.js → checkbox-D2MWvFlH.js} +2 -2
- package/dist/chunks/checkbox-D2MWvFlH.js.map +1 -0
- package/dist/chunks/cn-Cim5WXyu.js.map +1 -1
- package/dist/chunks/code-CGPiBqzu.js.map +1 -1
- package/dist/chunks/code-block-Dkedqh94.js.map +1 -1
- package/dist/chunks/{code-block-DYODgIka.js → code-block-RYsP7P22.js} +2 -2
- package/dist/chunks/code-block-RYsP7P22.js.map +1 -0
- package/dist/chunks/collapsible-BwQBF1wX.js.map +1 -1
- package/dist/chunks/{combobox-DkWaZ-v_.js → combobox-DlIGL6fh.js} +3 -3
- package/dist/chunks/combobox-DlIGL6fh.js.map +1 -0
- package/dist/chunks/{command-list-98lB5cP5.js → command-list-D7wBlyDt.js} +3 -3
- package/dist/chunks/command-list-D7wBlyDt.js.map +1 -0
- package/dist/chunks/{command-palette-BoL0MoxB.js → command-palette-DhHS-XXz.js} +3 -3
- package/dist/chunks/command-palette-DhHS-XXz.js.map +1 -0
- package/dist/chunks/context-B2nNL7Im.js.map +1 -1
- package/dist/chunks/copy-button-BjfGRgZi.js.map +1 -1
- package/dist/chunks/{core-Dtlb6S1k.js → core-DZ_ZGFjd.js} +6 -6
- package/dist/chunks/core-DZ_ZGFjd.js.map +1 -0
- package/dist/chunks/dashboard-BOeVNKwA.js.map +1 -1
- package/dist/chunks/{data-table-CoiHkxAQ.js → data-table-DLqzrTF8.js} +254 -222
- package/dist/chunks/data-table-DLqzrTF8.js.map +1 -0
- package/dist/chunks/date-picker-CiLNpsSh.js.map +1 -1
- package/dist/chunks/date-popup-Bp0d8U6H.js.map +1 -1
- package/dist/chunks/{de-CdlagGzS.js → de-BsTWV__5.js} +5 -4
- package/dist/chunks/de-BsTWV__5.js.map +1 -0
- package/dist/chunks/delta-Dspg6LP2.js.map +1 -1
- package/dist/chunks/dev-CRNODF1J.js.map +1 -1
- package/dist/chunks/dialog-wy5nNxfE.js.map +1 -1
- package/dist/chunks/disclosure-CmuBms1J.js.map +1 -1
- package/dist/chunks/{display-options-DSUfHF5n.js → display-options-CPo4Pn5F.js} +2 -2
- package/dist/chunks/display-options-CPo4Pn5F.js.map +1 -0
- package/dist/chunks/{domain-CyQb3nHF.js → domain-Cfyk1vCK.js} +3 -3
- package/dist/chunks/{domain-CyQb3nHF.js.map → domain-Cfyk1vCK.js.map} +1 -1
- package/dist/chunks/empty-JZwT3C6e.js +81 -0
- package/dist/chunks/empty-JZwT3C6e.js.map +1 -0
- package/dist/chunks/field-DG61eK8Z.js.map +1 -1
- package/dist/chunks/figure-BI0eP7S-.js.map +1 -1
- package/dist/chunks/figures-D_Tsrwwj.js.map +1 -1
- package/dist/chunks/{filter-chip-DE2j5Vyj.js → filter-chip-DY-gZVYb.js} +4 -4
- package/dist/chunks/filter-chip-DY-gZVYb.js.map +1 -0
- package/dist/chunks/filter-row-CPO_SEYy.js.map +1 -1
- package/dist/chunks/flow-B8DRLw6-.js.map +1 -1
- package/dist/chunks/formatters-Be5AdLB2.js.map +1 -1
- package/dist/chunks/heading-CkCOztRO.js.map +1 -1
- package/dist/chunks/icon-B9UXhFTF.js.map +1 -1
- package/dist/chunks/icon-DOwC1bbC.js.map +1 -1
- package/dist/chunks/identity-CAvHnogN.js.map +1 -1
- package/dist/chunks/input-6tVIiN3-.js.map +1 -1
- package/dist/chunks/input-BVheeeEI.js.map +1 -1
- package/dist/chunks/input-group-ClNtr_Gm.js.map +1 -1
- package/dist/chunks/inset-BTAjcK6a.js.map +1 -1
- package/dist/chunks/iso-field-C29xji-V.js.map +1 -1
- package/dist/chunks/json-view-BVTEkhgz.js.map +1 -1
- package/dist/chunks/{kaeso-MWzqLOiV.js → kaeso-CaMYkbqJ.js} +5 -5
- package/dist/chunks/kaeso-CaMYkbqJ.js.map +1 -0
- package/dist/chunks/kaeso-theme-C9rnRKq2.js.map +1 -1
- package/dist/chunks/kbd-CmhJfU_8.js.map +1 -1
- package/dist/chunks/key-value-tPKtCSOn.js.map +1 -1
- package/dist/chunks/labelled-DJa09XRF.js.map +1 -1
- package/dist/chunks/linear-scale-B5A7yNr7.js.map +1 -1
- package/dist/chunks/link-CZ1h1ksk.js.map +1 -1
- package/dist/chunks/link-provider-DSF9bbO3.js.map +1 -1
- package/dist/chunks/list-zQrK77Dx.js +698 -0
- package/dist/chunks/list-zQrK77Dx.js.map +1 -0
- package/dist/chunks/loader-BbKL8cW_.js.map +1 -1
- package/dist/chunks/loader-DBk2HCOh.js.map +1 -1
- package/dist/chunks/logo-DqjYySTX.js.map +1 -1
- package/dist/chunks/{markdown-BCG1Kkph.js → markdown-Ds1mSbGa.js} +2 -2
- package/dist/chunks/markdown-Ds1mSbGa.js.map +1 -0
- package/dist/chunks/{menu-DT4G6X7s.js → menu-CKlz_Dp4.js} +2 -2
- package/dist/chunks/menu-CKlz_Dp4.js.map +1 -0
- package/dist/chunks/merge-refs-SiVVoQsO.js.map +1 -1
- package/dist/chunks/message-DpD9D1Dj.js.map +1 -1
- package/dist/chunks/{meter-D_c3jawb.js → meter-d2wMKjVU.js} +2 -2
- package/dist/chunks/meter-d2wMKjVU.js.map +1 -0
- package/dist/chunks/{nav-sheet-DuqCp7cS.js → nav-sheet--ycVeOvo.js} +2 -2
- package/dist/chunks/nav-sheet--ycVeOvo.js.map +1 -0
- package/dist/chunks/nav-wordmark-CPDxGU5t.js.map +1 -1
- package/dist/chunks/observe-resize-Bubv5_wX.js.map +1 -1
- package/dist/chunks/option-checkbox-wA9L8Nxo.js.map +1 -1
- package/dist/chunks/over-sheet-CMUXcIMV.js.map +1 -1
- package/dist/chunks/{page-header-B6lKcMlr.js → page-header-DRi-hKtt.js} +4 -4
- package/dist/chunks/page-header-DRi-hKtt.js.map +1 -0
- package/dist/chunks/pagination-DvPIXuoj.js.map +1 -1
- package/dist/chunks/{picker-popover-6ISVxMYv.js → picker-popover-B-zhsNiS.js} +3 -3
- package/dist/chunks/picker-popover-B-zhsNiS.js.map +1 -0
- package/dist/chunks/popover-Dw7iTUNg.js.map +1 -1
- package/dist/chunks/popover-root-BI54wuLi.js.map +1 -1
- package/dist/chunks/portal-context-Z2xSIPsc.js.map +1 -1
- package/dist/chunks/provider-marks-DmonWRb5.js.map +1 -1
- package/dist/chunks/qr-code-ClT_2Xa9.js.map +1 -1
- package/dist/chunks/radio-DJES13fj.js.map +1 -1
- package/dist/chunks/range-popup-CiCBpRfH.js.map +1 -1
- package/dist/chunks/reasoning-frame-DnTFGrD_.js.map +1 -1
- package/dist/chunks/{release-art-CgszffGH.js → release-art-CQjO2Ewv.js} +2 -2
- package/dist/chunks/release-art-CQjO2Ewv.js.map +1 -0
- package/dist/chunks/resize-motion-CMR1x5Kw.js.map +1 -1
- package/dist/chunks/{rights-BKkbkESE.js → rights-B0LWKkB2.js} +117 -111
- package/dist/chunks/rights-B0LWKkB2.js.map +1 -0
- package/dist/chunks/{rolldown-runtime-CGnMp29N.js → rolldown-runtime-BMBA7GOT.js} +2 -2
- package/dist/chunks/rolling-number-uNjki3hn.js.map +1 -1
- package/dist/chunks/row-control-DlHLdthx.js.map +1 -1
- package/dist/chunks/safe-href-CWHpspUx.js.map +1 -1
- package/dist/chunks/scroll-area-CjokFhH6.js.map +1 -1
- package/dist/chunks/section-DJgejMMh.js.map +1 -1
- package/dist/chunks/segmented-UnR1L-kk.js.map +1 -1
- package/dist/chunks/{select-CvpwZaeF.js → select-BDwDI8L3.js} +2 -2
- package/dist/chunks/select-BDwDI8L3.js.map +1 -0
- package/dist/chunks/selects-text-CYQ11JVI.js +46 -0
- package/dist/chunks/selects-text-CYQ11JVI.js.map +1 -0
- package/dist/chunks/separator-3RcDNFzM.js.map +1 -1
- package/dist/chunks/settings-CcNjQm1D.js.map +1 -1
- package/dist/chunks/sheet-CsN1uy5N.js.map +1 -1
- package/dist/chunks/shiki-Drii10ai.js.map +1 -1
- package/dist/chunks/{sidebar-5-2Nqm-H.js → sidebar-Cz0KdApZ.js} +2 -2
- package/dist/chunks/sidebar-Cz0KdApZ.js.map +1 -0
- package/dist/chunks/{sidebar-menu-D0y3wpvD.js → sidebar-menu-CTaQhVTv.js} +2 -2
- package/dist/chunks/sidebar-menu-CTaQhVTv.js.map +1 -0
- package/dist/chunks/skeleton-GuivuiOP.js.map +1 -1
- package/dist/chunks/slider-XvStaacJ.js.map +1 -1
- package/dist/chunks/stat-BJ4otTGc.js.map +1 -1
- package/dist/chunks/status-BkW_rVAX.js.map +1 -1
- package/dist/chunks/{styles-CN0ovMB2.js → styles-BsZZml1H.js} +2 -2
- package/dist/chunks/{styles-CN0ovMB2.js.map → styles-BsZZml1H.js.map} +1 -1
- package/dist/chunks/swap-text-Crb3uzrK.js.map +1 -1
- package/dist/chunks/swap-value-BKrH58Iv.js.map +1 -1
- package/dist/chunks/switch-CzmZ6gLD.js.map +1 -1
- package/dist/chunks/table-ppZE7fYt.js.map +1 -1
- package/dist/chunks/tabs-DPA2zGfY.js.map +1 -1
- package/dist/chunks/tag-CnULig9p.js.map +1 -1
- package/dist/chunks/text-BC4rusw7.js.map +1 -1
- package/dist/chunks/textarea-K4ojoshs.js.map +1 -1
- package/dist/chunks/theme-image-C9p959Kv.js.map +1 -1
- package/dist/chunks/{theme-menu-CanR1L9T.js → theme-menu-Tdl7fdTt.js} +3 -3
- package/dist/chunks/theme-menu-Tdl7fdTt.js.map +1 -0
- package/dist/chunks/{theme-provider-DaD8hlXu.js → theme-provider-CD0AF5UZ.js} +5 -3
- package/dist/chunks/theme-provider-CD0AF5UZ.js.map +1 -0
- package/dist/chunks/thumbnail-CUa0JXLG.js.map +1 -1
- package/dist/chunks/thumbnail-KtBHleQk.js.map +1 -1
- package/dist/chunks/timeline-hMJEN3ZB.js.map +1 -1
- package/dist/chunks/{timeseries-B1h0RRhx.js → timeseries-BUL9zITH.js} +5 -5
- package/dist/chunks/timeseries-BUL9zITH.js.map +1 -0
- package/dist/chunks/toast-4PyK7GS1.js.map +1 -1
- package/dist/chunks/toc-CUh8jCiJ.js.map +1 -1
- package/dist/chunks/toolbar-w3ZPxEoW.js.map +1 -1
- package/dist/chunks/tooltip-D0jdTWyX.js.map +1 -1
- package/dist/chunks/{tooltip-iKeKjr7J.js → tooltip-DpUVorD8.js} +3 -3
- package/dist/chunks/tooltip-DpUVorD8.js.map +1 -0
- package/dist/chunks/tooltip-root-Ka27-TrV.js.map +1 -1
- package/dist/chunks/tooltip-uRgNOzW_.js.map +1 -1
- package/dist/chunks/truncated-CcpJk_3e.js.map +1 -1
- package/dist/chunks/use-controllable-rN5Fg5EJ.js.map +1 -1
- package/dist/chunks/use-copy-DtUCUOlR.js.map +1 -1
- package/dist/chunks/use-cut-off-Cx1Nn5uF.js.map +1 -1
- package/dist/chunks/use-delayed-loading-Chh5dI7E.js.map +1 -1
- package/dist/chunks/use-hydrating-Dth8POSk.js.map +1 -1
- package/dist/chunks/use-indicator-C1pEv290.js.map +1 -1
- package/dist/chunks/use-layout-width-DbMAv4mR.js.map +1 -1
- package/dist/chunks/use-scroll-fade-BwpKEWY0.js.map +1 -1
- package/dist/chunks/use-scroll-margin-LcRbT78-.js.map +1 -1
- package/dist/chunks/use-truncated-Dn60-ubK.js.map +1 -1
- package/dist/chunks/use-utc-while-hydrating-PP48Tcfz.js.map +1 -1
- package/dist/chunks/virtual-rows-D-ZT6V6B.js.map +1 -1
- package/dist/chunks/visually-hidden-Di2pLhE3.js.map +1 -1
- package/dist/chunks/when-idle-DXKwyOLB.js.map +1 -1
- package/dist/chunks/{zh-CN-BjoJbfdJ.js → zh-CN-C4aFUWpC.js} +2 -1
- package/dist/chunks/{zh-CN-BjoJbfdJ.js.map → zh-CN-C4aFUWpC.js.map} +1 -1
- package/dist/components/app-frame.js +1 -1
- package/dist/components/charts/bar.js +5 -5
- package/dist/components/charts/bar.js.map +1 -1
- package/dist/components/charts/donut.js +2 -2
- package/dist/components/charts/donut.js.map +1 -1
- package/dist/components/charts/heatmap.js +2 -2
- package/dist/components/charts/heatmap.js.map +1 -1
- package/dist/components/charts/sankey.js +3 -3
- package/dist/components/charts/sankey.js.map +1 -1
- package/dist/components/charts/sparkline.js +1 -1
- package/dist/components/charts/sparkline.js.map +1 -1
- package/dist/components/charts/swatches.js.map +1 -1
- package/dist/components/charts/timeseries.js +1 -1
- package/dist/components/charts.js +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/code-block.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command-palette.js +1 -1
- package/dist/components/dashboard/about-header.js.map +1 -1
- package/dist/components/dashboard/legend.js.map +1 -1
- package/dist/components/dashboard/metric-tabs.js.map +1 -1
- package/dist/components/dashboard/model-card.js.map +1 -1
- package/dist/components/dashboard/rank-list.js +13 -5
- package/dist/components/dashboard/rank-list.js.map +1 -1
- package/dist/components/data-table.js +1 -1
- package/dist/components/display-options.js +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/filter-chip.js +1 -1
- package/dist/components/flow-canvas.js +4 -4
- package/dist/components/flow-canvas.js.map +1 -1
- package/dist/components/kaeso/conversation.js +1 -1
- package/dist/components/kaeso/conversation.js.map +1 -1
- package/dist/components/kaeso/moments.js.map +1 -1
- package/dist/components/kaeso/rights.js +1 -1
- package/dist/components/kaeso/usage.js +3 -3
- package/dist/components/kaeso/usage.js.map +1 -1
- package/dist/components/kaeso.js +2 -2
- package/dist/components/list.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/menu.js +2 -2
- package/dist/components/meter.js +1 -1
- package/dist/components/page-header.js +1 -1
- package/dist/components/playground.js +6 -6
- package/dist/components/playground.js.map +1 -1
- package/dist/components/release-art.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/theme-menu.js +1 -1
- package/dist/format.js.map +1 -1
- package/dist/i18n-locales.js.map +1 -1
- package/dist/i18n-provider.js +1 -1
- package/dist/i18n-provider.js.map +1 -1
- package/dist/index.js +24 -24
- package/dist/kaeso.css +36 -4
- package/dist/styles.css +1 -1
- package/dist/theme.js +1 -1
- package/dist/types/components/empty/empty.d.ts +10 -8
- package/dist/types/components/empty/ghost.d.ts +9 -0
- package/dist/types/components/list/docs.d.ts +1 -0
- package/dist/types/components/list/index.d.ts +1 -1
- package/dist/types/components/list/list.d.ts +12 -0
- package/foundations/icons.md +1 -1
- package/foundations/motion.md +2 -2
- package/foundations/psychology.md +1 -1
- package/foundations/writing.md +2 -2
- package/package.json +10 -10
- package/dist/chunks/app-frame-DPIr7C6C.js.map +0 -1
- package/dist/chunks/checkbox-6GPT3xkr.js.map +0 -1
- package/dist/chunks/code-block-DYODgIka.js.map +0 -1
- package/dist/chunks/combobox-DkWaZ-v_.js.map +0 -1
- package/dist/chunks/command-list-98lB5cP5.js.map +0 -1
- package/dist/chunks/command-palette-BoL0MoxB.js.map +0 -1
- package/dist/chunks/core-Dtlb6S1k.js.map +0 -1
- package/dist/chunks/data-table-CoiHkxAQ.js.map +0 -1
- package/dist/chunks/de-CdlagGzS.js.map +0 -1
- package/dist/chunks/display-options-DSUfHF5n.js.map +0 -1
- package/dist/chunks/empty-DsN9jTVb.js +0 -83
- package/dist/chunks/empty-DsN9jTVb.js.map +0 -1
- package/dist/chunks/filter-chip-DE2j5Vyj.js.map +0 -1
- package/dist/chunks/kaeso-MWzqLOiV.js.map +0 -1
- package/dist/chunks/list-Bq7vGhxI.js +0 -643
- package/dist/chunks/list-Bq7vGhxI.js.map +0 -1
- package/dist/chunks/markdown-BCG1Kkph.js.map +0 -1
- package/dist/chunks/menu-DT4G6X7s.js.map +0 -1
- package/dist/chunks/meter-D_c3jawb.js.map +0 -1
- package/dist/chunks/nav-sheet-DuqCp7cS.js.map +0 -1
- package/dist/chunks/page-header-B6lKcMlr.js.map +0 -1
- package/dist/chunks/picker-popover-6ISVxMYv.js.map +0 -1
- package/dist/chunks/release-art-CgszffGH.js.map +0 -1
- package/dist/chunks/rights-BKkbkESE.js.map +0 -1
- package/dist/chunks/select-CvpwZaeF.js.map +0 -1
- package/dist/chunks/selects-text-kRMTsm4s.js +0 -32
- package/dist/chunks/selects-text-kRMTsm4s.js.map +0 -1
- package/dist/chunks/sidebar-5-2Nqm-H.js.map +0 -1
- package/dist/chunks/sidebar-menu-D0y3wpvD.js.map +0 -1
- package/dist/chunks/theme-menu-CanR1L9T.js.map +0 -1
- package/dist/chunks/theme-provider-DaD8hlXu.js.map +0 -1
- package/dist/chunks/timeseries-B1h0RRhx.js.map +0 -1
- package/dist/chunks/tooltip-iKeKjr7J.js.map +0 -1
|
@@ -6,58 +6,58 @@ import { ChevronDown as o } from "../icons/chevron-down.js";
|
|
|
6
6
|
import { ChevronUp as s } from "../icons/chevron-up.js";
|
|
7
7
|
import { Loop as c } from "../icons/loop.js";
|
|
8
8
|
import { t as l } from "./icon-B9UXhFTF.js";
|
|
9
|
-
import { n as u } from "./checkbox-
|
|
10
|
-
import { r as
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { t as
|
|
18
|
-
import {
|
|
19
|
-
import { t as
|
|
20
|
-
import { a as
|
|
9
|
+
import { n as u } from "./checkbox-D2MWvFlH.js";
|
|
10
|
+
import { r as d } from "./skeleton-GuivuiOP.js";
|
|
11
|
+
import { t as ee } from "./empty-JZwT3C6e.js";
|
|
12
|
+
import { a as te, i as ne, n as re, r as ie, t as ae } from "./selects-text-CYQ11JVI.js";
|
|
13
|
+
import { n as oe } from "./button-CXdEDVSI.js";
|
|
14
|
+
import { r as se } from "./pagination-DvPIXuoj.js";
|
|
15
|
+
import { t as f } from "./menu-CKlz_Dp4.js";
|
|
16
|
+
import { r as ce } from "./text-BC4rusw7.js";
|
|
17
|
+
import { t as le } from "./truncated-CcpJk_3e.js";
|
|
18
|
+
import { t as ue } from "./tone-CF_XXfiq.js";
|
|
19
|
+
import { t as de } from "./use-scroll-margin-LcRbT78-.js";
|
|
20
|
+
import { a as fe } from "./context-B2nNL7Im.js";
|
|
21
21
|
import { t as p } from "./formatters-Be5AdLB2.js";
|
|
22
|
-
import { t as
|
|
23
|
-
import { r as
|
|
22
|
+
import { t as pe } from "./use-scroll-fade-BwpKEWY0.js";
|
|
23
|
+
import { r as me } from "./status-BkW_rVAX.js";
|
|
24
24
|
import { t as m } from "./avatar-C4r7x_uJ.js";
|
|
25
25
|
import { r as h } from "./tooltip-uRgNOzW_.js";
|
|
26
26
|
import { t as g } from "./use-hydrating-Dth8POSk.js";
|
|
27
27
|
import { t as _ } from "./use-utc-while-hydrating-PP48Tcfz.js";
|
|
28
|
-
import { forwardRef as
|
|
29
|
-
import { Fragment as
|
|
30
|
-
import { useVirtualizer as
|
|
31
|
-
import { flexRender as
|
|
28
|
+
import { forwardRef as he, useLayoutEffect as v, useMemo as ge, useRef as y, useState as b } from "react";
|
|
29
|
+
import { Fragment as _e, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
30
|
+
import { useVirtualizer as ve } from "@tanstack/react-virtual";
|
|
31
|
+
import { flexRender as ye, getCoreRowModel as be, getSortedRowModel as xe, useReactTable as Se } from "@tanstack/react-table";
|
|
32
32
|
// src/hooks/use-sticky-top.ts
|
|
33
33
|
var C = /(auto|scroll|hidden|overlay)/;
|
|
34
|
-
function
|
|
34
|
+
function Ce(e) {
|
|
35
35
|
for (let t = e.parentElement; t; t = t.parentElement) {
|
|
36
36
|
let e = getComputedStyle(t);
|
|
37
37
|
if (C.test(e.overflowY) || C.test(e.overflowX)) return t;
|
|
38
38
|
}
|
|
39
39
|
return null;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function we(e) {
|
|
42
42
|
let [t, n] = b(0);
|
|
43
43
|
return v(() => {
|
|
44
|
-
let t = e.current, r = t &&
|
|
44
|
+
let t = e.current, r = t && Ce(t);
|
|
45
45
|
if (!r) return;
|
|
46
46
|
let i = () => n(-(Number.parseFloat(getComputedStyle(r).paddingTop) || 0));
|
|
47
47
|
return i(), window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
|
|
48
48
|
}, [e]), t;
|
|
49
49
|
}
|
|
50
50
|
// src/components/data-table/time-columns.ts
|
|
51
|
-
var w = /* @__PURE__ */ new WeakSet(),
|
|
51
|
+
var w = /* @__PURE__ */ new WeakSet(), T = { density: {
|
|
52
52
|
compact: { classes: "h-36 coarse:h-44" },
|
|
53
53
|
default: { classes: "h-40 coarse:h-44" },
|
|
54
54
|
comfortable: { classes: "h-48" }
|
|
55
|
-
} },
|
|
55
|
+
} }, Te = { density: "default" }, Ee = {
|
|
56
56
|
compact: 36,
|
|
57
57
|
default: 40,
|
|
58
58
|
comfortable: 48
|
|
59
59
|
};
|
|
60
|
-
function
|
|
60
|
+
function De(e, t, n = 48) {
|
|
61
61
|
if (!t) return {
|
|
62
62
|
hidden: [],
|
|
63
63
|
tight: !1,
|
|
@@ -65,7 +65,7 @@ function Ee(e, t, n = 48) {
|
|
|
65
65
|
};
|
|
66
66
|
let r = [...e].sort((e, t) => e.priority - t.priority), i = n, a = /* @__PURE__ */ new Set();
|
|
67
67
|
for (let e of r) i += e.size, (i <= t || e.priority <= 1 || e.fixed) && a.add(e.id);
|
|
68
|
-
let o = e.filter((e) => a.has(e.id)), s = o.reduce((e, t) => e + t.size, n), c = o.reduce((e, t) => e + (t.grow ?
|
|
68
|
+
let o = e.filter((e) => a.has(e.id)), s = o.reduce((e, t) => e + t.size, n), c = o.reduce((e, t) => e + (t.grow ? Ie(t) : t.size), 0);
|
|
69
69
|
if (c > t && o.some((e) => e.grow)) {
|
|
70
70
|
let e = o[o.length - 1];
|
|
71
71
|
for (let n of [...o].reverse()) {
|
|
@@ -79,24 +79,24 @@ function Ee(e, t, n = 48) {
|
|
|
79
79
|
overflow: c > t
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Oe(e) {
|
|
83
83
|
let t = getComputedStyle(e);
|
|
84
84
|
return e.getBoundingClientRect().width - (parseFloat(t.paddingLeft) || 0) - (parseFloat(t.paddingRight) || 0);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function ke(e) {
|
|
87
87
|
let t = e.filter((e) => e.id && e.meta?.text && e.meta.align !== "end");
|
|
88
88
|
return t.find((e) => !w.has(e)) ?? t[0] ?? e[0];
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function Ae(e, t, n) {
|
|
91
91
|
if (!e?.id) return;
|
|
92
92
|
let r = e.meta?.text?.(t.original, n);
|
|
93
93
|
if (r) return r;
|
|
94
94
|
let i = t.getValue(e.id);
|
|
95
95
|
return typeof i == "string" && i ? i : void 0;
|
|
96
96
|
}
|
|
97
|
-
var
|
|
98
|
-
function
|
|
99
|
-
return [...e.querySelectorAll(
|
|
97
|
+
var je = "a[href], button, input, select, textarea, [tabindex], [contenteditable=true]", Me = "input:not([type=checkbox]):not([type=radio]), textarea, select, [contenteditable=true]";
|
|
98
|
+
function Ne(e) {
|
|
99
|
+
return [...e.querySelectorAll(je)].filter((e) => !e.closest("[role=checkbox], [aria-hidden=true], [hidden]") && !e.matches(":disabled, input[type=checkbox]"));
|
|
100
100
|
}
|
|
101
101
|
function E(e) {
|
|
102
102
|
return e ? [...e.querySelectorAll("[role=columnheader]")].flatMap((e) => {
|
|
@@ -104,12 +104,23 @@ function E(e) {
|
|
|
104
104
|
return t ? [t] : [];
|
|
105
105
|
}) : [];
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Pe(t, n) {
|
|
108
108
|
return n ? e("controls-on-fill", t ? "bg-raised-pressed hover:raised-selected-hover active:raised-selected-hover" : "bg-fill-2 hover:bg-fill-3 active:bg-fill-3") : t ? "hover:bg-raised-hover active:bg-raised-pressed hover:controls-on-fill" : "hover:bg-fill-1 active:bg-fill-2 hover:controls-on-fill";
|
|
109
109
|
}
|
|
110
|
-
var
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
var Fe = [
|
|
111
|
+
0,
|
|
112
|
+
1,
|
|
113
|
+
2,
|
|
114
|
+
3,
|
|
115
|
+
4,
|
|
116
|
+
5,
|
|
117
|
+
6,
|
|
118
|
+
7,
|
|
119
|
+
8,
|
|
120
|
+
9
|
|
121
|
+
], Ie = (e) => Math.min(e.size, e.minWidth ?? 136);
|
|
122
|
+
function Le({ data: me, columns: m, getRowId: h, density: g = "default", onRowClick: _, rowMenu: he, selectable: C, canSelectRow: Ce, selection: w, onSelectionChange: Te, sorting: Le, onSortingChange: Re, manualSorting: ze, loading: D, error: O, onRetry: k, empty: Be, hasMore: Ve, loadingMore: A, onLoadMore: j, stickyFirstColumn: He, virtualizeAbove: Ue = 50, className: We, activeRowId: Ge, freshRowIds: Ke, onHiddenColumnsChange: qe, "aria-label": Je, "data-force-row": Ye }, M) {
|
|
123
|
+
let N = n(), Xe = i(), Ze = r(), P = fe(), Qe = p(), [$e, et] = b([]), [tt, nt] = b({}), [rt, it] = b(0), [at, F] = b("body"), [ot, st] = b(0), I = y(null), ct = Le ?? $e, L = w ?? tt, lt = ge(() => C ? [{
|
|
113
124
|
id: "__select",
|
|
114
125
|
size: 44,
|
|
115
126
|
enableSorting: !1,
|
|
@@ -122,7 +133,7 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
122
133
|
onCheckedChange: (t) => e.toggleAllRowsSelected(t)
|
|
123
134
|
}),
|
|
124
135
|
cell: ({ row: e }) => {
|
|
125
|
-
let t = ke(
|
|
136
|
+
let t = Ae(ke(m), e, Qe);
|
|
126
137
|
return /* @__PURE__ */ x(u, {
|
|
127
138
|
"aria-label": t ? P("dataTable.selectNamed", "Select {name}", { name: t }) : P("dataTable.selectRow", "Select row"),
|
|
128
139
|
checked: e.getIsSelected(),
|
|
@@ -134,26 +145,26 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
134
145
|
m,
|
|
135
146
|
C,
|
|
136
147
|
P,
|
|
137
|
-
|
|
138
|
-
]), R =
|
|
139
|
-
data:
|
|
140
|
-
columns:
|
|
148
|
+
Qe
|
|
149
|
+
]), R = Se({
|
|
150
|
+
data: me,
|
|
151
|
+
columns: lt,
|
|
141
152
|
state: {
|
|
142
|
-
sorting:
|
|
153
|
+
sorting: ct,
|
|
143
154
|
rowSelection: L
|
|
144
155
|
},
|
|
145
156
|
onSortingChange: (e) => {
|
|
146
|
-
let t = typeof e == "function" ? e(
|
|
147
|
-
I.current = null,
|
|
157
|
+
let t = typeof e == "function" ? e(ct) : e;
|
|
158
|
+
I.current = null, Le || et(t), Re?.(t);
|
|
148
159
|
},
|
|
149
160
|
onRowSelectionChange: (e) => {
|
|
150
161
|
let t = typeof e == "function" ? e(L) : e;
|
|
151
|
-
w ||
|
|
162
|
+
w || nt(t), Te?.(t);
|
|
152
163
|
},
|
|
153
|
-
getCoreRowModel:
|
|
154
|
-
getSortedRowModel:
|
|
155
|
-
manualSorting: !!
|
|
156
|
-
enableRowSelection: C ?
|
|
164
|
+
getCoreRowModel: be(),
|
|
165
|
+
getSortedRowModel: xe(),
|
|
166
|
+
manualSorting: !!ze,
|
|
167
|
+
enableRowSelection: C ? Ce ? (e) => Ce(e.original) : !0 : !1,
|
|
157
168
|
columnResizeMode: "onChange",
|
|
158
169
|
...h ? { getRowId: (e) => h(e) } : {},
|
|
159
170
|
defaultColumn: {
|
|
@@ -161,93 +172,100 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
161
172
|
minSize: 64,
|
|
162
173
|
maxSize: 640
|
|
163
174
|
}
|
|
164
|
-
}), z = y(null), B = y(null), V = y(null),
|
|
175
|
+
}), z = y(null), B = y(null), V = y(null), ut = R.getVisibleLeafColumns(), dt = ut.map((e) => ({
|
|
165
176
|
id: e.id,
|
|
166
177
|
size: e.getSize(),
|
|
167
178
|
priority: e.columnDef.meta?.priority ?? 2,
|
|
168
179
|
grow: !!e.columnDef.meta?.grow,
|
|
169
180
|
minWidth: e.columnDef.meta?.minWidth,
|
|
170
181
|
fixed: e.id === "__select"
|
|
171
|
-
})),
|
|
172
|
-
let t =
|
|
182
|
+
})), ft = JSON.stringify(dt), pt = (e) => {
|
|
183
|
+
let t = De(dt, e, N ? 48 : 0);
|
|
173
184
|
return `${t.tight ? "!" : ""}${t.overflow ? ">" : ""}|${t.hidden.join(" ")}`;
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
let [
|
|
185
|
+
}, mt = y(pt);
|
|
186
|
+
mt.current = pt;
|
|
187
|
+
let [ht, gt] = b("|");
|
|
177
188
|
v(() => {
|
|
178
189
|
let e = z.current;
|
|
179
|
-
if (e) return t([e], ([e]) =>
|
|
190
|
+
if (e) return t([e], ([e]) => gt(mt.current(Math.round(e?.contentRect.width ?? 0))));
|
|
180
191
|
}, []), v(() => {
|
|
181
|
-
z.current &&
|
|
182
|
-
}, [
|
|
183
|
-
let [
|
|
184
|
-
|
|
185
|
-
|
|
192
|
+
z.current && gt(mt.current(Math.round(Oe(z.current))));
|
|
193
|
+
}, [ft]);
|
|
194
|
+
let [_t = "", vt = ""] = ht.split("|"), yt = _t.includes("!"), bt = _t.includes(">"), H = ge(() => new Set(vt.split(" ").filter(Boolean)), [vt]), xt = y(qe);
|
|
195
|
+
xt.current = qe, v(() => {
|
|
196
|
+
xt.current?.([...H]);
|
|
186
197
|
}, [H]);
|
|
187
|
-
let U =
|
|
198
|
+
let U = ut.filter((e) => !H.has(e.id)), St = (e) => e.columnDef.meta?.grow && yt ? Ie({
|
|
188
199
|
size: e.getSize(),
|
|
189
200
|
minWidth: e.columnDef.meta.minWidth
|
|
190
|
-
}) : e.getSize(),
|
|
191
|
-
gridTemplateColumns: U.map((e) => e.columnDef.meta?.grow ? `minmax(${
|
|
192
|
-
minWidth: U.reduce((e, t) => e +
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
201
|
+
}) : e.getSize(), W = {
|
|
202
|
+
gridTemplateColumns: U.map((e) => e.columnDef.meta?.grow ? `minmax(${St(e)}px, 1fr)` : `${e.getSize()}px`).join(" "),
|
|
203
|
+
minWidth: U.reduce((e, t) => e + St(t), 0)
|
|
204
|
+
}, Ct = bt && U.length > 1 && !U[U.length - 1]?.columnDef.meta?.grow, G = R.getRowModel().rows, wt = bt && G.length === 0 && !D && !O, K = G.length > Ue, Tt = Math.max(Ee[g], re() ? 44 : 0), Et = y(null), q = () => {
|
|
205
|
+
if (z.current && Et.current?.rows === G.length) return Et.current.el;
|
|
206
|
+
let e = ie(z.current);
|
|
207
|
+
return Et.current = z.current && e && e !== document.scrollingElement ? {
|
|
208
|
+
rows: G.length,
|
|
209
|
+
el: e
|
|
210
|
+
} : null, e;
|
|
211
|
+
}, Dt = de(V, q, G.length, K), Ot = we(B), kt = ve({
|
|
212
|
+
count: G.length,
|
|
213
|
+
getScrollElement: q,
|
|
214
|
+
estimateSize: () => Tt,
|
|
197
215
|
overscan: 16,
|
|
198
|
-
enabled:
|
|
199
|
-
scrollMargin:
|
|
200
|
-
initialOffset: () =>
|
|
201
|
-
}),
|
|
202
|
-
|
|
216
|
+
enabled: K,
|
|
217
|
+
scrollMargin: Dt,
|
|
218
|
+
initialOffset: () => q()?.scrollTop ?? 0
|
|
219
|
+
}), J = (t) => e("flex min-w-0 items-center px-12", N && t === 0 && "pl-20", N && t === U.length - 1 && "pr-20"), Y = N || Xe, At = (t, n = !1, r = !1) => (He && t === 0 || Ct && t === U.length - 1) && e("sticky z-10", n ? Y ? "bg-raised" : "bg-panel" : r ? "bg-inherit" : Y ? "bg-raised group-hover/tr:bg-raised-hover group-active/tr:bg-raised-pressed" : "bg-panel group-hover/tr:bg-fill-1 group-active/tr:bg-fill-2", t === 0 ? "left-0" : "right-0", !N && !n && "row-rule"), X = !!_ || !!C, Z = X ? "gridcell" : "cell", jt = X && G.length > 0 && at === "body", Mt = Math.min(rt, Math.max(G.length - 1, 0)), Nt = (e) => {
|
|
220
|
+
K && kt.scrollToIndex(e, { align: "auto" });
|
|
203
221
|
let t = () => V.current?.querySelector(`[data-row-index="${e}"]`), n = t();
|
|
204
222
|
n ? n.focus() : requestAnimationFrame(() => t()?.focus());
|
|
205
|
-
},
|
|
206
|
-
let t = Math.max(0, Math.min(
|
|
207
|
-
F("body"),
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
seen:
|
|
223
|
+
}, Pt = (e) => {
|
|
224
|
+
let t = Math.max(0, Math.min(G.length - 1, e));
|
|
225
|
+
F("body"), it(t), Nt(t);
|
|
226
|
+
}, Ft = y(null), Q = y(null), [$, It] = b(null), [Lt, Rt] = b(""), zt = () => new Set(G.map((e) => e.id)), Bt = () => {
|
|
227
|
+
Q.current = {
|
|
228
|
+
seen: zt(),
|
|
211
229
|
pressed: !0
|
|
212
|
-
},
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
let e =
|
|
216
|
-
if (
|
|
217
|
-
|
|
218
|
-
seen:
|
|
219
|
-
pressed:
|
|
220
|
-
},
|
|
230
|
+
}, Rt(""), j?.();
|
|
231
|
+
}, Vt = y(!1), Ht = y(() => {});
|
|
232
|
+
Ht.current = () => {
|
|
233
|
+
let e = Vt.current && !A;
|
|
234
|
+
if (Vt.current = !!A, A) {
|
|
235
|
+
Q.current = {
|
|
236
|
+
seen: zt(),
|
|
237
|
+
pressed: Q.current?.pressed ?? !1
|
|
238
|
+
}, Q.current.pressed || Rt("");
|
|
221
239
|
return;
|
|
222
240
|
}
|
|
223
|
-
let t =
|
|
241
|
+
let t = Q.current;
|
|
224
242
|
if (!t) return;
|
|
225
|
-
let n =
|
|
226
|
-
if (n < 0 && !e || (
|
|
227
|
-
let r =
|
|
228
|
-
|
|
229
|
-
let i = document.activeElement, a = !!
|
|
230
|
-
t.pressed && (a || !i || i === document.body) ?
|
|
231
|
-
}, v(() =>
|
|
232
|
-
let
|
|
233
|
-
|
|
234
|
-
let e =
|
|
235
|
-
e >= 0 &&
|
|
236
|
-
}, v(() =>
|
|
237
|
-
let
|
|
243
|
+
let n = G.findIndex((e) => !t.seen.has(e.id));
|
|
244
|
+
if (n < 0 && !e || (Q.current = null, n < 0)) return;
|
|
245
|
+
let r = G.reduce((e, n) => t.seen.has(n.id) ? e : e + 1, 0);
|
|
246
|
+
Rt(Ve ? P("dataTable.moreRows", "{count, plural, one {# more row loaded} other {# more rows loaded}}", { count: r }) : P("dataTable.moreRowsAll", "{count, plural, one {# more row loaded; all rows shown} other {# more rows loaded; all rows shown}}", { count: r }));
|
|
247
|
+
let i = document.activeElement, a = !!Ft.current?.contains(i);
|
|
248
|
+
t.pressed && (a || !i || i === document.body) ? X ? Pt(n) : It(G[n].id) : a && Ft.current?.scrollIntoView({ block: "nearest" });
|
|
249
|
+
}, v(() => Ht.current(), [A, G]);
|
|
250
|
+
let Ut = y(() => {});
|
|
251
|
+
Ut.current = () => {
|
|
252
|
+
let e = $ === null ? -1 : G.findIndex((e) => e.id === $);
|
|
253
|
+
e >= 0 && Nt(e);
|
|
254
|
+
}, v(() => Ut.current(), [$]);
|
|
255
|
+
let Wt = (e) => {
|
|
238
256
|
let t = E(B.current), n = t[Math.max(0, Math.min(t.length - 1, e))];
|
|
239
|
-
return n ? (F("head"),
|
|
240
|
-
},
|
|
241
|
-
|
|
242
|
-
let e = E(B.current), t = Math.min(
|
|
243
|
-
for (let n of B.current?.querySelectorAll(
|
|
244
|
-
let r = e.indexOf(n) === t && !
|
|
257
|
+
return n ? (F("head"), st(t.indexOf(n)), n.focus(), !0) : !1;
|
|
258
|
+
}, Gt = y(() => {});
|
|
259
|
+
Gt.current = () => {
|
|
260
|
+
let e = E(B.current), t = Math.min(ot, e.length - 1);
|
|
261
|
+
for (let n of B.current?.querySelectorAll(je) ?? []) {
|
|
262
|
+
let r = e.indexOf(n) === t && !jt ? "0" : "-1";
|
|
245
263
|
n.getAttribute("tabindex") !== r && n.setAttribute("tabindex", r);
|
|
246
264
|
}
|
|
247
|
-
}, v(() =>
|
|
265
|
+
}, v(() => Gt.current()), v(() => {
|
|
248
266
|
let e = B.current;
|
|
249
267
|
if (!e) return;
|
|
250
|
-
let t = new MutationObserver(() =>
|
|
268
|
+
let t = new MutationObserver(() => Gt.current());
|
|
251
269
|
return t.observe(e, {
|
|
252
270
|
subtree: !0,
|
|
253
271
|
childList: !0,
|
|
@@ -256,9 +274,9 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
256
274
|
}), () => t.disconnect();
|
|
257
275
|
}, []), v(() => {
|
|
258
276
|
let e = V.current;
|
|
259
|
-
if (!e || !
|
|
277
|
+
if (!e || !X) return;
|
|
260
278
|
let t = () => {
|
|
261
|
-
for (let t of e.querySelectorAll("[data-row-index]")) for (let e of t.querySelectorAll(
|
|
279
|
+
for (let t of e.querySelectorAll("[data-row-index]")) for (let e of t.querySelectorAll(je)) e.getAttribute("tabindex") !== "-1" && e.setAttribute("tabindex", "-1");
|
|
262
280
|
};
|
|
263
281
|
t();
|
|
264
282
|
let n = new MutationObserver(t);
|
|
@@ -268,8 +286,8 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
268
286
|
attributes: !0,
|
|
269
287
|
attributeFilter: ["tabindex"]
|
|
270
288
|
}), () => n.disconnect();
|
|
271
|
-
}, [
|
|
272
|
-
let
|
|
289
|
+
}, [X]), pe(V, "[role=row]");
|
|
290
|
+
let Kt = (e, t) => {
|
|
273
291
|
let n = e ? R.getColumn(e) : void 0;
|
|
274
292
|
if (!n?.getCanResize()) return !1;
|
|
275
293
|
let r = n.columnDef.minSize ?? 64, i = n.columnDef.maxSize ?? 640;
|
|
@@ -277,7 +295,7 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
277
295
|
...e,
|
|
278
296
|
[n.id]: Math.max(r, Math.min(i, n.getSize() + t))
|
|
279
297
|
})), !0;
|
|
280
|
-
},
|
|
298
|
+
}, qt = (e) => {
|
|
281
299
|
if (e.altKey || e.metaKey || e.ctrlKey) return;
|
|
282
300
|
let t = E(B.current), n = t.indexOf(e.target);
|
|
283
301
|
if (n < 0) return;
|
|
@@ -286,7 +304,7 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
286
304
|
ArrowRight: 16
|
|
287
305
|
}[e.key];
|
|
288
306
|
if (e.shiftKey) {
|
|
289
|
-
r !== void 0 &&
|
|
307
|
+
r !== void 0 && Kt(e.target.closest("[role=columnheader]")?.dataset.col, r) && e.preventDefault();
|
|
290
308
|
return;
|
|
291
309
|
}
|
|
292
310
|
let i = {
|
|
@@ -295,21 +313,21 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
295
313
|
Home: 0,
|
|
296
314
|
End: t.length - 1
|
|
297
315
|
}[e.key];
|
|
298
|
-
i === void 0 ? e.key === "ArrowDown" &&
|
|
299
|
-
},
|
|
300
|
-
let n = I.current ?
|
|
316
|
+
i === void 0 ? e.key === "ArrowDown" && X && G.length && (e.preventDefault(), Pt(Mt)) : (e.preventDefault(), i >= 0 && i < t.length && Wt(i));
|
|
317
|
+
}, Jt = () => Math.max(1, Math.floor((q()?.clientHeight ?? 400) / Tt) - 1), Yt = (e, t) => {
|
|
318
|
+
let n = I.current ? G.findIndex((e) => e.id === I.current?.id) : -1;
|
|
301
319
|
n < 0 && (I.current = {
|
|
302
|
-
id:
|
|
320
|
+
id: G[e].id,
|
|
303
321
|
base: L
|
|
304
322
|
});
|
|
305
323
|
let r = n < 0 ? e : n, i = { ...I.current?.base };
|
|
306
|
-
for (let e of
|
|
324
|
+
for (let e of G.slice(Math.min(r, t), Math.max(r, t) + 1)) e.getCanSelect() && (i[e.id] = !0);
|
|
307
325
|
R.setRowSelection(i);
|
|
308
|
-
},
|
|
326
|
+
}, Xt = (e, t, n) => {
|
|
309
327
|
let r = e.currentTarget, i = e.target;
|
|
310
328
|
if (i !== r) {
|
|
311
|
-
if (e.altKey || e.metaKey || e.ctrlKey || i.closest(
|
|
312
|
-
let t =
|
|
329
|
+
if (e.altKey || e.metaKey || e.ctrlKey || i.closest(Me)) return;
|
|
330
|
+
let t = Ne(r), n = t.indexOf(i);
|
|
313
331
|
if (n < 0) return;
|
|
314
332
|
if (e.key === "Escape" && !i.closest("[data-popup-open], [aria-expanded=true]")) e.preventDefault(), r.focus();
|
|
315
333
|
else if (e.defaultPrevented) return;
|
|
@@ -325,73 +343,73 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
325
343
|
ArrowDown: n + 1,
|
|
326
344
|
ArrowUp: n - 1,
|
|
327
345
|
Home: 0,
|
|
328
|
-
End:
|
|
329
|
-
PageDown: n +
|
|
330
|
-
PageUp: n -
|
|
346
|
+
End: G.length - 1,
|
|
347
|
+
PageDown: n + Jt(),
|
|
348
|
+
PageUp: n - Jt()
|
|
331
349
|
}[e.key];
|
|
332
350
|
if (a !== void 0) {
|
|
333
|
-
if (e.preventDefault(), e.key === "ArrowUp" && !e.shiftKey && a < 0 &&
|
|
334
|
-
let t = Math.max(0, Math.min(
|
|
335
|
-
e.shiftKey && C ?
|
|
351
|
+
if (e.preventDefault(), e.key === "ArrowUp" && !e.shiftKey && a < 0 && Wt(ot)) return;
|
|
352
|
+
let t = Math.max(0, Math.min(G.length - 1, a));
|
|
353
|
+
e.shiftKey && C ? Yt(n, t) : I.current = null, Pt(t);
|
|
336
354
|
} else if (e.shiftKey) return;
|
|
337
355
|
else if (e.key === "ArrowRight") {
|
|
338
|
-
let t =
|
|
356
|
+
let t = Ne(r)[0];
|
|
339
357
|
if (!t) return;
|
|
340
358
|
e.preventDefault(), t.focus();
|
|
341
359
|
} else e.key === "Enter" ? (e.preventDefault(), _?.(t.original)) : (e.key === " " || e.key === "x") && C ? (e.preventDefault(), I.current = null, t.getCanSelect() && t.toggleSelected()) : e.key === "Escape" && C && Object.keys(L).length && (e.preventDefault(), I.current = null, R.toggleAllRowsSelected(!1));
|
|
342
|
-
},
|
|
343
|
-
|
|
360
|
+
}, Zt = [
|
|
361
|
+
lt,
|
|
344
362
|
U.map((e) => e.id).join(" "),
|
|
345
363
|
N,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
],
|
|
351
|
-
(
|
|
352
|
-
deps:
|
|
364
|
+
Ct,
|
|
365
|
+
He,
|
|
366
|
+
Y,
|
|
367
|
+
Z
|
|
368
|
+
], Qt = y(null);
|
|
369
|
+
(!Qt.current || Zt.some((e, t) => e !== Qt.current?.deps[t])) && (Qt.current = {
|
|
370
|
+
deps: Zt,
|
|
353
371
|
rows: /* @__PURE__ */ new WeakMap()
|
|
354
372
|
});
|
|
355
|
-
let
|
|
356
|
-
let i = t.id ===
|
|
357
|
-
|
|
373
|
+
let $t = Qt.current.rows, en = (t, n, r) => {
|
|
374
|
+
let i = t.id === Ge, a = !!C && t.getIsSelected(), o = i || a, s = `${i} ${a}`, c = Object(t.original) === t.original ? t.original : t, l = $t.get(c), u = l?.state === s ? l.cells : tn(t, o);
|
|
375
|
+
l?.state !== s && $t.set(c, {
|
|
358
376
|
state: s,
|
|
359
|
-
cells:
|
|
377
|
+
cells: u
|
|
360
378
|
});
|
|
361
|
-
let
|
|
379
|
+
let d = /* @__PURE__ */ x("div", {
|
|
362
380
|
role: "row",
|
|
363
381
|
"aria-rowindex": n + 2,
|
|
364
382
|
"aria-selected": C ? t.getIsSelected() : void 0,
|
|
365
383
|
"aria-current": i || void 0,
|
|
366
384
|
"data-active": i || void 0,
|
|
367
|
-
"data-fresh":
|
|
385
|
+
"data-fresh": Ke?.has(t.id) || void 0,
|
|
368
386
|
"data-row-index": n,
|
|
369
|
-
...
|
|
370
|
-
tabIndex:
|
|
371
|
-
|
|
387
|
+
...Ye && n === 0 ? { "data-force": Ye } : {},
|
|
388
|
+
tabIndex: X ? jt && n === Mt ? 0 : -1 : $ === t.id ? -1 : void 0,
|
|
389
|
+
...$ === t.id ? { onBlur: () => It(null) } : {},
|
|
372
390
|
onFocus: (e) => {
|
|
373
|
-
e.target === e.currentTarget && (F("body"), n !==
|
|
391
|
+
e.target === e.currentTarget && (F("body"), n !== rt && it(n));
|
|
374
392
|
},
|
|
375
393
|
onClick: (e) => {
|
|
376
|
-
I.current = null, e.target.closest("button, a, [role=checkbox]") ||
|
|
394
|
+
I.current = null, e.target.closest("button, a, [role=checkbox]") || ae(e.currentTarget) || _?.(t.original);
|
|
377
395
|
},
|
|
378
|
-
onKeyDown: (e) =>
|
|
396
|
+
onKeyDown: (e) => Xt(e, t, n),
|
|
379
397
|
style: {
|
|
380
|
-
...
|
|
398
|
+
...W,
|
|
381
399
|
...r
|
|
382
400
|
},
|
|
383
|
-
className: e("group/tr grid w-full text-body text-fg transition-control focus-ring-inset", !N && "row-rule",
|
|
384
|
-
children:
|
|
401
|
+
className: e("group/tr grid w-full text-body text-fg transition-control focus-ring-inset", !N && "row-rule", T.density[g].classes, _ && "cursor-pointer", Pe(Y, o), "data-fresh:animate-row-fresh", r?.transform !== void 0 && "[transition-property:background-color,color,box-shadow,opacity]", "forced-colors:data-active:outline-2 forced-colors:data-active:-outline-offset-2 forced-colors:data-active:outline-solid"),
|
|
402
|
+
children: u
|
|
385
403
|
});
|
|
386
|
-
return
|
|
404
|
+
return he ? /* @__PURE__ */ S(f, { children: [/* @__PURE__ */ x(f.Trigger, { children: d }), /* @__PURE__ */ x(f.Content, { children: he(t.original) })] }, t.id) : /* @__PURE__ */ x("div", { children: d }, t.id);
|
|
387
405
|
};
|
|
388
|
-
function
|
|
406
|
+
function tn(t, n) {
|
|
389
407
|
return t.getVisibleCells().filter((e) => !H.has(e.column.id)).map((r, i) => {
|
|
390
|
-
let a = r.column.columnDef.meta, o =
|
|
408
|
+
let a = r.column.columnDef.meta, o = ye(r.column.columnDef.cell, r.getContext()), s = r.getValue(), c = a?.text ? a.text(t.original, Qe) : typeof s == "string" ? s : void 0, l = a?.tone?.(t.original);
|
|
391
409
|
return /* @__PURE__ */ x("div", {
|
|
392
|
-
role:
|
|
393
|
-
className: e(
|
|
394
|
-
children: c !== void 0 && typeof o != "object" ? /* @__PURE__ */ x(
|
|
410
|
+
role: Z,
|
|
411
|
+
className: e(J(i), a?.align === "end" && "justify-end text-right tabular", a?.mono && "mono text-small", l && ue[l], At(i, !1, n)),
|
|
412
|
+
children: c !== void 0 && typeof o != "object" ? /* @__PURE__ */ x(ce, {
|
|
395
413
|
truncate: !0,
|
|
396
414
|
tone: l ?? "default",
|
|
397
415
|
className: e("min-w-0", a?.mono && "text-small"),
|
|
@@ -400,24 +418,24 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
400
418
|
}) : r.column.id === "__select" ? /* @__PURE__ */ x("span", {
|
|
401
419
|
className: "flex",
|
|
402
420
|
children: o
|
|
403
|
-
}) : /* @__PURE__ */ x(
|
|
421
|
+
}) : /* @__PURE__ */ x(le, {
|
|
404
422
|
className: e("min-w-0 cell-fit", a?.grow && "flex-1"),
|
|
405
423
|
children: o
|
|
406
424
|
})
|
|
407
425
|
}, r.id);
|
|
408
426
|
});
|
|
409
427
|
}
|
|
410
|
-
let
|
|
411
|
-
let r = t.column.columnDef.meta, i = t.column.getCanSort(), a = t.column.getCanResize(), c = t.column.getIsSorted(), u =
|
|
428
|
+
let nn = (t, n) => {
|
|
429
|
+
let r = t.column.columnDef.meta, i = t.column.getCanSort(), a = t.column.getCanResize(), c = t.column.getIsSorted(), u = ye(t.column.columnDef.header, t.getContext()), d = /* @__PURE__ */ S(_e, { children: [i ? /* @__PURE__ */ S("button", {
|
|
412
430
|
type: "button",
|
|
413
431
|
onClick: t.column.getToggleSortingHandler(),
|
|
414
|
-
className: e("relative -mx-6 inline-flex h-28 min-w-0 cursor-pointer items-center gap-4 rounded-pill px-6 text-caption font-medium transition-control focus-ring tap-target",
|
|
415
|
-
children: [/* @__PURE__ */ x(
|
|
432
|
+
className: e("relative -mx-6 inline-flex h-28 min-w-0 cursor-pointer items-center gap-4 rounded-pill px-6 text-caption font-medium transition-control focus-ring tap-target", Y ? "hover:bg-raised-hover active:bg-raised-pressed" : "hover:bg-fill-1 active:bg-fill-2", "hover:text-fg", c ? "text-fg" : "text-fg-secondary", r?.align === "end" && "flex-row-reverse"),
|
|
433
|
+
children: [/* @__PURE__ */ x(le, { children: u }), /* @__PURE__ */ x(l, {
|
|
416
434
|
icon: c === "desc" ? o : s,
|
|
417
435
|
size: "xs",
|
|
418
436
|
className: e("shrink-0 transition-control", c ? "opacity-100" : "opacity-0 group-hover/th:opacity-60")
|
|
419
437
|
})]
|
|
420
|
-
}) : /* @__PURE__ */ x(
|
|
438
|
+
}) : /* @__PURE__ */ x(le, {
|
|
421
439
|
className: "text-caption font-medium text-fg-secondary",
|
|
422
440
|
children: u
|
|
423
441
|
}), a && /* @__PURE__ */ x("div", {
|
|
@@ -437,49 +455,49 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
437
455
|
role: "columnheader",
|
|
438
456
|
"data-col": t.column.id,
|
|
439
457
|
"aria-sort": c === "asc" ? "ascending" : c === "desc" ? "descending" : i ? "none" : void 0,
|
|
440
|
-
className: e("group/th relative",
|
|
441
|
-
children: a ? /* @__PURE__ */ S(
|
|
458
|
+
className: e("group/th relative", J(n), r?.align === "end" && "justify-end", At(n, !0), At(n, !0) && "rule-b"),
|
|
459
|
+
children: a ? /* @__PURE__ */ S(f, { children: [/* @__PURE__ */ x(f.Trigger, {
|
|
442
460
|
className: e("flex min-w-0 flex-1 items-center self-stretch", r?.align === "end" && "justify-end"),
|
|
443
|
-
children:
|
|
444
|
-
}), /* @__PURE__ */ S(
|
|
445
|
-
/* @__PURE__ */ x(
|
|
446
|
-
onClick: () =>
|
|
461
|
+
children: d
|
|
462
|
+
}), /* @__PURE__ */ S(f.Content, { children: [
|
|
463
|
+
/* @__PURE__ */ x(f.Item, {
|
|
464
|
+
onClick: () => Kt(t.column.id, 32),
|
|
447
465
|
children: P("dataTable.widenColumn", "Widen column")
|
|
448
466
|
}),
|
|
449
|
-
/* @__PURE__ */ x(
|
|
450
|
-
onClick: () =>
|
|
467
|
+
/* @__PURE__ */ x(f.Item, {
|
|
468
|
+
onClick: () => Kt(t.column.id, -32),
|
|
451
469
|
children: P("dataTable.narrowColumn", "Narrow column")
|
|
452
470
|
}),
|
|
453
|
-
/* @__PURE__ */ x(
|
|
471
|
+
/* @__PURE__ */ x(f.Item, {
|
|
454
472
|
onClick: () => t.column.resetSize(),
|
|
455
473
|
children: P("dataTable.resetWidth", "Reset width")
|
|
456
474
|
})
|
|
457
|
-
] })] }) :
|
|
475
|
+
] })] }) : d
|
|
458
476
|
}, t.id);
|
|
459
477
|
};
|
|
460
478
|
return /* @__PURE__ */ S("div", {
|
|
461
479
|
ref: (e) => {
|
|
462
480
|
z.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
|
|
463
481
|
},
|
|
464
|
-
className: e("relative w-full min-w-0", !N && !
|
|
482
|
+
className: e("relative w-full min-w-0", !N && !Ze && "px-gutter", We),
|
|
465
483
|
children: [
|
|
466
484
|
/* @__PURE__ */ S("div", {
|
|
467
|
-
role:
|
|
468
|
-
"aria-label":
|
|
469
|
-
"aria-rowcount":
|
|
485
|
+
role: X ? "grid" : "table",
|
|
486
|
+
"aria-label": Je,
|
|
487
|
+
"aria-rowcount": G.length + +!wt,
|
|
470
488
|
"aria-multiselectable": C || void 0,
|
|
471
489
|
"aria-busy": D || void 0,
|
|
472
490
|
className: e("w-full overflow-clip", N && "rounded-group bg-raised shadow-xs"),
|
|
473
491
|
children: [/* @__PURE__ */ x("div", {
|
|
474
492
|
ref: B,
|
|
475
493
|
role: "rowgroup",
|
|
476
|
-
hidden:
|
|
477
|
-
className: e("sticky top-0 z-20 overflow-hidden",
|
|
478
|
-
...
|
|
479
|
-
onKeyDown:
|
|
494
|
+
hidden: wt,
|
|
495
|
+
className: e("sticky top-0 z-20 overflow-hidden", Y ? "bg-raised" : "bg-panel"),
|
|
496
|
+
...Ot ? { style: { top: Ot } } : {},
|
|
497
|
+
onKeyDown: qt,
|
|
480
498
|
onFocus: (e) => {
|
|
481
499
|
let t = E(B.current).indexOf(e.target);
|
|
482
|
-
t < 0 || (I.current = null, F("head"),
|
|
500
|
+
t < 0 || (I.current = null, F("head"), st(t));
|
|
483
501
|
},
|
|
484
502
|
onScroll: (e) => {
|
|
485
503
|
V.current && V.current.scrollLeft !== e.currentTarget.scrollLeft && (V.current.scrollLeft = e.currentTarget.scrollLeft);
|
|
@@ -488,8 +506,8 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
488
506
|
role: "row",
|
|
489
507
|
"aria-rowindex": 1,
|
|
490
508
|
className: "grid h-36 rule-b",
|
|
491
|
-
style:
|
|
492
|
-
children: e.headers.filter((e) => !H.has(e.column.id)).map(
|
|
509
|
+
style: W,
|
|
510
|
+
children: e.headers.filter((e) => !H.has(e.column.id)).map(nn)
|
|
493
511
|
}, e.id))
|
|
494
512
|
}), /* @__PURE__ */ x("div", {
|
|
495
513
|
ref: V,
|
|
@@ -501,15 +519,15 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
501
519
|
children: O ? /* @__PURE__ */ x("div", {
|
|
502
520
|
role: "row",
|
|
503
521
|
children: /* @__PURE__ */ x("div", {
|
|
504
|
-
role:
|
|
522
|
+
role: Z,
|
|
505
523
|
"aria-colspan": U.length,
|
|
506
524
|
className: "block",
|
|
507
|
-
children: /* @__PURE__ */ x("div", { children: /* @__PURE__ */ x(a, { children: /* @__PURE__ */ x(
|
|
525
|
+
children: /* @__PURE__ */ x("div", { children: /* @__PURE__ */ x(a, { children: /* @__PURE__ */ x(ee, {
|
|
508
526
|
size: "compact",
|
|
509
527
|
tone: "error",
|
|
510
528
|
title: typeof O == "string" ? O : P("dataTable.loadFailed", "Couldn't load these rows"),
|
|
511
529
|
...k ? {} : { description: P("dataTable.reloadToRetry", "Reload the page to try again.") },
|
|
512
|
-
actions: k && /* @__PURE__ */ x(
|
|
530
|
+
actions: k && /* @__PURE__ */ x(oe, {
|
|
513
531
|
size: "sm",
|
|
514
532
|
leadingIcon: c,
|
|
515
533
|
onClick: k,
|
|
@@ -517,59 +535,73 @@ function Pe({ data: fe, columns: m, getRowId: h, density: g = "default", onRowCl
|
|
|
517
535
|
})
|
|
518
536
|
}) }) })
|
|
519
537
|
})
|
|
520
|
-
}) : D &&
|
|
538
|
+
}) : D && G.length === 0 ? Array.from({ length: 8 }, (t, n) => /* @__PURE__ */ x("div", {
|
|
521
539
|
role: "row",
|
|
522
|
-
className: e("grid",
|
|
523
|
-
style:
|
|
540
|
+
className: e("grid", T.density[g].classes),
|
|
541
|
+
style: W,
|
|
524
542
|
children: U.map((t, r) => /* @__PURE__ */ x("div", {
|
|
525
|
-
role:
|
|
526
|
-
className: e(
|
|
527
|
-
children: /* @__PURE__ */ x(
|
|
543
|
+
role: Z,
|
|
544
|
+
className: e(J(r), t.columnDef.meta?.align === "end" && "justify-end"),
|
|
545
|
+
children: /* @__PURE__ */ x(d, {
|
|
528
546
|
shape: "line",
|
|
529
547
|
style: { width: `${40 + (n * 7 + r * 13) % 45}%` }
|
|
530
548
|
})
|
|
531
549
|
}, t.id))
|
|
532
|
-
}, n)) :
|
|
550
|
+
}, n)) : G.length === 0 ? /* @__PURE__ */ x("div", {
|
|
533
551
|
role: "row",
|
|
534
552
|
children: /* @__PURE__ */ x("div", {
|
|
535
|
-
role:
|
|
553
|
+
role: Z,
|
|
536
554
|
"aria-colspan": U.length,
|
|
537
555
|
className: "block",
|
|
538
|
-
children: /* @__PURE__ */ x(a, { children:
|
|
556
|
+
children: /* @__PURE__ */ x(a, { children: N || !Ze ? ne(Fe.slice(0, N ? 3 : 10).map((t, n, r) => /* @__PURE__ */ x("div", {
|
|
557
|
+
"aria-hidden": !0,
|
|
558
|
+
className: e("grid", !N && "row-rule", T.density[g].classes),
|
|
559
|
+
style: {
|
|
560
|
+
...W,
|
|
561
|
+
opacity: te(t, r.length)
|
|
562
|
+
},
|
|
563
|
+
children: U.map((n, r) => /* @__PURE__ */ x("div", {
|
|
564
|
+
className: e(J(r), n.columnDef.meta?.align === "end" && "justify-end"),
|
|
565
|
+
children: /* @__PURE__ */ x("span", {
|
|
566
|
+
className: "h-8 rounded-bar bg-fill-2",
|
|
567
|
+
style: { width: `${30 + (t * 7 + r * 13) % 40}%` }
|
|
568
|
+
})
|
|
569
|
+
}, n.id))
|
|
570
|
+
}, t)), Be ?? /* @__PURE__ */ x(ee, { title: P("dataTable.noRows", "No rows") })) : Be ?? /* @__PURE__ */ x(ee, {
|
|
539
571
|
size: "compact",
|
|
540
572
|
title: P("dataTable.noRows", "No rows")
|
|
541
573
|
}) })
|
|
542
574
|
})
|
|
543
|
-
}) :
|
|
575
|
+
}) : K ? /* @__PURE__ */ x("div", {
|
|
544
576
|
className: "relative",
|
|
545
|
-
style: { height:
|
|
546
|
-
children:
|
|
577
|
+
style: { height: kt.getTotalSize() },
|
|
578
|
+
children: kt.getVirtualItems().map((e) => en(G[e.index], e.index, {
|
|
547
579
|
position: "absolute",
|
|
548
580
|
top: 0,
|
|
549
581
|
left: 0,
|
|
550
|
-
transform: `translateY(${Math.round(e.start -
|
|
582
|
+
transform: `translateY(${Math.round(e.start - Dt)}px)`
|
|
551
583
|
}))
|
|
552
|
-
}) :
|
|
584
|
+
}) : G.map((e, t) => en(e, t))
|
|
553
585
|
})]
|
|
554
586
|
}),
|
|
555
|
-
/* @__PURE__ */ x(
|
|
556
|
-
ref:
|
|
587
|
+
/* @__PURE__ */ x(se, {
|
|
588
|
+
ref: Ft,
|
|
557
589
|
variant: "load-more",
|
|
558
|
-
hasMore: !!
|
|
590
|
+
hasMore: !!Ve,
|
|
559
591
|
loading: A,
|
|
560
|
-
...j ? { onLoadMore:
|
|
592
|
+
...j ? { onLoadMore: Bt } : {}
|
|
561
593
|
}),
|
|
562
594
|
j && /* @__PURE__ */ x("span", {
|
|
563
595
|
role: "status",
|
|
564
596
|
className: "sr-only",
|
|
565
|
-
children:
|
|
597
|
+
children: Lt
|
|
566
598
|
})
|
|
567
599
|
]
|
|
568
600
|
});
|
|
569
601
|
}
|
|
570
|
-
var
|
|
571
|
-
process.env.NODE_ENV !== "production" && (
|
|
572
|
-
var
|
|
602
|
+
var Re = /* @__PURE__ */ he(Le);
|
|
603
|
+
process.env.NODE_ENV !== "production" && (Re.displayName = "DataTable");
|
|
604
|
+
var ze = Re;
|
|
573
605
|
// src/components/data-table/columns.tsx
|
|
574
606
|
function D(e) {
|
|
575
607
|
return w.add(e), e;
|
|
@@ -594,8 +626,8 @@ function O(e, t, n, r = {}, i) {
|
|
|
594
626
|
function k({ format: e }) {
|
|
595
627
|
return e(p());
|
|
596
628
|
}
|
|
597
|
-
function
|
|
598
|
-
let t =
|
|
629
|
+
function Be({ value: e }) {
|
|
630
|
+
let t = fe(), { formatNumber: n, formatTokens: r } = p(), i = t("dataTable.tokenCount", "{count} tokens", { count: n(e) });
|
|
599
631
|
return /* @__PURE__ */ x(h, {
|
|
600
632
|
content: i,
|
|
601
633
|
children: /* @__PURE__ */ S("span", { children: [/* @__PURE__ */ x("span", {
|
|
@@ -607,7 +639,7 @@ function Le({ value: e }) {
|
|
|
607
639
|
})] })
|
|
608
640
|
});
|
|
609
641
|
}
|
|
610
|
-
function
|
|
642
|
+
function Ve({ value: e }) {
|
|
611
643
|
let t = _(), { formatDate: n } = p();
|
|
612
644
|
return /* @__PURE__ */ x("time", {
|
|
613
645
|
dateTime: new Date(e).toISOString(),
|
|
@@ -655,15 +687,15 @@ var j = {
|
|
|
655
687
|
align: "end",
|
|
656
688
|
mono: !1
|
|
657
689
|
}, (e, t, n) => Number(e.getValue(n)) - Number(t.getValue(n))),
|
|
658
|
-
tokens: (e, t) => O(e, t, (e) => /* @__PURE__ */ x(
|
|
690
|
+
tokens: (e, t) => O(e, t, (e) => /* @__PURE__ */ x(Be, { value: e }), { align: "end" }),
|
|
659
691
|
duration: (e, t) => O(e, t, (e) => /* @__PURE__ */ x(k, { format: (t) => t.formatDuration(e) }), { align: "end" }),
|
|
660
|
-
date: (e, t) => D(O(e, t, (e) => /* @__PURE__ */ x(
|
|
692
|
+
date: (e, t) => D(O(e, t, (e) => /* @__PURE__ */ x(Ve, { value: e }), { text: (e, n) => n.formatDate(t(e), { time: !0 }) }, "datetime")),
|
|
661
693
|
relative: (e, t, n = {}) => D(O(e, t, (e) => /* @__PURE__ */ x(A, {
|
|
662
694
|
value: e,
|
|
663
695
|
now: n.now ?? Date.now(),
|
|
664
696
|
live: n.now === void 0
|
|
665
697
|
}), { text: (e, n) => n.formatDate(t(e), { time: !0 }) }, (e, t, n) => new Date(e.getValue(n)).getTime() - new Date(t.getValue(n)).getTime())),
|
|
666
|
-
status: (e, t) => O(e, t, (e) => /* @__PURE__ */ x(
|
|
698
|
+
status: (e, t) => O(e, t, (e) => /* @__PURE__ */ x(me, {
|
|
667
699
|
tone: e.tone,
|
|
668
700
|
children: e.label
|
|
669
701
|
}), { text: void 0 }),
|
|
@@ -674,10 +706,10 @@ var j = {
|
|
|
674
706
|
...e.src ? { src: e.src } : {},
|
|
675
707
|
size: 24,
|
|
676
708
|
decorative: !0
|
|
677
|
-
}), /* @__PURE__ */ x(
|
|
709
|
+
}), /* @__PURE__ */ x(le, { children: e.name })]
|
|
678
710
|
}), { text: (e) => t(e).name }),
|
|
679
711
|
custom: (e, t, n, r = {}) => O(e, t, n, r)
|
|
680
712
|
};
|
|
681
|
-
export {
|
|
713
|
+
export { T as i, ze as n, Te as r, j as t };
|
|
682
714
|
|
|
683
|
-
//# sourceMappingURL=data-table-
|
|
715
|
+
//# sourceMappingURL=data-table-DLqzrTF8.js.map
|