@logicplanes/kaeso-ui 0.4.4 → 0.4.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/ai/component-guides.md +250 -98
- package/ai/component-registry.json +264 -236
- package/ai/component-registry.md +222 -218
- package/ai/icons.md +1 -1
- package/ai/tokens.md +18 -14
- package/dist/blocks/delete-resource.js +3 -3
- package/dist/blocks/delete-resource.js.map +1 -1
- package/dist/blocks/pages.js +47 -42
- package/dist/blocks/pages.js.map +1 -1
- package/dist/blocks/resource-list.js +68 -55
- package/dist/blocks/resource-list.js.map +1 -1
- package/dist/chunks/agent-avatar-DHieggHK.js +188 -0
- package/dist/chunks/agent-avatar-DHieggHK.js.map +1 -0
- package/dist/chunks/app-frame-DysOel2X.js +232 -0
- package/dist/chunks/app-frame-DysOel2X.js.map +1 -0
- package/dist/chunks/arrow-focus-B0KdRFX8.js +20 -0
- package/dist/chunks/arrow-focus-B0KdRFX8.js.map +1 -0
- package/dist/chunks/avatar-CYNMK7uY.js +110 -0
- package/dist/chunks/avatar-CYNMK7uY.js.map +1 -0
- package/dist/chunks/badge-C0GC3B9X.js +27 -0
- package/dist/chunks/badge-C0GC3B9X.js.map +1 -0
- package/dist/chunks/banner-B3DGLTBu.js +88 -0
- package/dist/chunks/banner-B3DGLTBu.js.map +1 -0
- package/dist/chunks/button-IblhXUyZ.js +202 -0
- package/dist/chunks/button-IblhXUyZ.js.map +1 -0
- package/dist/chunks/{calendar-BWaf2MXc.js → calendar-Dc6_dl0f.js} +4 -4
- package/dist/chunks/calendar-Dc6_dl0f.js.map +1 -0
- package/dist/chunks/checkbox-9tbimmF3.js +141 -0
- package/dist/chunks/checkbox-9tbimmF3.js.map +1 -0
- package/dist/chunks/{cn-Dj6sRgkF.js → cn-BjnOAUrA.js} +45 -4
- package/dist/chunks/cn-BjnOAUrA.js.map +1 -0
- package/dist/chunks/code-block-64e-Cy1S.js +346 -0
- package/dist/chunks/code-block-64e-Cy1S.js.map +1 -0
- package/dist/chunks/{code-block-DdNPHEzI.js → code-block-KIvuE8jg.js} +122 -114
- package/dist/chunks/code-block-KIvuE8jg.js.map +1 -0
- package/dist/chunks/{code-tqj0uhBL.js → code-xqjww4Pv.js} +5 -6
- package/dist/chunks/code-xqjww4Pv.js.map +1 -0
- package/dist/chunks/combobox-DkcjkWc6.js +352 -0
- package/dist/chunks/combobox-DkcjkWc6.js.map +1 -0
- package/dist/chunks/command-list-CypqsC4T.js +456 -0
- package/dist/chunks/command-list-CypqsC4T.js.map +1 -0
- package/dist/chunks/{copy-button-FJvPJn72.js → copy-button-CwU8t_9_.js} +22 -15
- package/dist/chunks/copy-button-CwU8t_9_.js.map +1 -0
- package/dist/chunks/core-CmK-8ObW.js +505 -0
- package/dist/chunks/core-CmK-8ObW.js.map +1 -0
- package/dist/chunks/data-table-CqY8_6IS.js +581 -0
- package/dist/chunks/data-table-CqY8_6IS.js.map +1 -0
- package/dist/chunks/date-popup-DAnjptFt.js +58 -0
- package/dist/chunks/date-popup-DAnjptFt.js.map +1 -0
- package/dist/chunks/{de-D_0mmG-k.js → de-CqC4aSIV.js} +74 -40
- package/dist/chunks/de-CqC4aSIV.js.map +1 -0
- package/dist/chunks/{dialog-Cg9A_6SF.js → dialog-2zb6ClNR.js} +156 -134
- package/dist/chunks/dialog-2zb6ClNR.js.map +1 -0
- package/dist/chunks/disclosure-BtYRTDO3.js +22 -0
- package/dist/chunks/disclosure-BtYRTDO3.js.map +1 -0
- package/dist/chunks/domain-obd_w9xk.js +28 -0
- package/dist/chunks/domain-obd_w9xk.js.map +1 -0
- package/dist/chunks/{empty-DvhyMXQq.js → empty-BpiUgGzm.js} +2 -2
- package/dist/chunks/{empty-DvhyMXQq.js.map → empty-BpiUgGzm.js.map} +1 -1
- package/dist/chunks/{field-TviMvYa2.js → field-D7m-yl-D.js} +37 -34
- package/dist/chunks/field-D7m-yl-D.js.map +1 -0
- package/dist/chunks/{icon-D7ja-_Yk.js → icon-CBzOwqrX.js} +7 -6
- package/dist/chunks/{icon-D7ja-_Yk.js.map → icon-CBzOwqrX.js.map} +1 -1
- package/dist/chunks/{icon-button-CrdF_eMG.js → icon-button-Dfwpvmav.js} +7 -6
- package/dist/chunks/icon-button-Dfwpvmav.js.map +1 -0
- package/dist/chunks/{identity-BmhQ6BQ-.js → identity-3Foi5F8w.js} +7 -7
- package/dist/chunks/{identity-BmhQ6BQ-.js.map → identity-3Foi5F8w.js.map} +1 -1
- package/dist/chunks/{input-2VJuj_M4.js → input-Bo5-UZg2.js} +15 -9
- package/dist/chunks/input-Bo5-UZg2.js.map +1 -0
- package/dist/chunks/{input-group-DQ_4DoXg.js → input-group-jPcK9T_a.js} +42 -29
- package/dist/chunks/input-group-jPcK9T_a.js.map +1 -0
- package/dist/chunks/iso-field-DoqHBg8n.js +52 -0
- package/dist/chunks/iso-field-DoqHBg8n.js.map +1 -0
- package/dist/chunks/json-view-DZ2nL2Ir.js +253 -0
- package/dist/chunks/json-view-DZ2nL2Ir.js.map +1 -0
- package/dist/chunks/{kbd-BF1vKXJf.js → kbd-8A0ML_up.js} +30 -28
- package/dist/chunks/kbd-8A0ML_up.js.map +1 -0
- package/dist/chunks/label-DW24Aj0Z.js +26 -0
- package/dist/chunks/label-DW24Aj0Z.js.map +1 -0
- package/dist/chunks/{link-KWI7PevW.js → link-CMjkcLQK.js} +14 -14
- package/dist/chunks/link-CMjkcLQK.js.map +1 -0
- package/dist/chunks/list-B4G-sWwV.js +540 -0
- package/dist/chunks/list-B4G-sWwV.js.map +1 -0
- package/dist/chunks/{loader-DCfPndXa.js → loader-zo8CCIGJ.js} +2 -2
- package/dist/chunks/{loader-DCfPndXa.js.map → loader-zo8CCIGJ.js.map} +1 -1
- package/dist/chunks/markdown-C565aBR7.js +338 -0
- package/dist/chunks/markdown-C565aBR7.js.map +1 -0
- package/dist/chunks/menu-Clvv6ftq.js +485 -0
- package/dist/chunks/menu-Clvv6ftq.js.map +1 -0
- package/dist/chunks/merge-refs-BN1FyQt9.js +20 -0
- package/dist/chunks/merge-refs-BN1FyQt9.js.map +1 -0
- package/dist/chunks/meter-CASMHlxl.js +100 -0
- package/dist/chunks/meter-CASMHlxl.js.map +1 -0
- package/dist/chunks/nav-sheet-Dt6JSvzX.js +67 -0
- package/dist/chunks/nav-sheet-Dt6JSvzX.js.map +1 -0
- package/dist/chunks/{nav-wordmark-_pjheAsZ.js → nav-wordmark-J4pB_vjr.js} +4 -8
- package/dist/chunks/nav-wordmark-J4pB_vjr.js.map +1 -0
- package/dist/chunks/page-header-kS5tdmvb.js +45 -0
- package/dist/chunks/page-header-kS5tdmvb.js.map +1 -0
- package/dist/chunks/pagination-D7fAm8qg.js +147 -0
- package/dist/chunks/pagination-D7fAm8qg.js.map +1 -0
- package/dist/chunks/picker-popover-1FHb1LQG.js +119 -0
- package/dist/chunks/picker-popover-1FHb1LQG.js.map +1 -0
- package/dist/chunks/popover-Bl5QYqnh.js +51 -0
- package/dist/chunks/popover-Bl5QYqnh.js.map +1 -0
- package/dist/chunks/{portal-context-BBbzDKmY.js → portal-context-CTatR2Z8.js} +14 -4
- package/dist/chunks/portal-context-CTatR2Z8.js.map +1 -0
- package/dist/chunks/{radio-CDDFpdtL.js → radio-C6GtzF_t.js} +38 -23
- package/dist/chunks/radio-C6GtzF_t.js.map +1 -0
- package/dist/chunks/range-popup-lGiZsG3s.js +160 -0
- package/dist/chunks/range-popup-lGiZsG3s.js.map +1 -0
- package/dist/chunks/reasoning-frame-C3HdQRRS.js +51 -0
- package/dist/chunks/reasoning-frame-C3HdQRRS.js.map +1 -0
- package/dist/chunks/release-art-ChiT4T2S.js +582 -0
- package/dist/chunks/release-art-ChiT4T2S.js.map +1 -0
- package/dist/chunks/rights-B68ocZuq.js +312 -0
- package/dist/chunks/rights-B68ocZuq.js.map +1 -0
- package/dist/chunks/{scroll-area-D8MD7Vpo.js → scroll-area-_Ljh4-bG.js} +11 -6
- package/dist/chunks/scroll-area-_Ljh4-bG.js.map +1 -0
- package/dist/chunks/section-CFBYhsUi.js +77 -0
- package/dist/chunks/section-CFBYhsUi.js.map +1 -0
- package/dist/chunks/section-header-DU1Q4Tdf.js +28 -0
- package/dist/chunks/section-header-DU1Q4Tdf.js.map +1 -0
- package/dist/chunks/segmented-D9i1avik.js +119 -0
- package/dist/chunks/segmented-D9i1avik.js.map +1 -0
- package/dist/chunks/select-BqjmQOqx.js +222 -0
- package/dist/chunks/select-BqjmQOqx.js.map +1 -0
- package/dist/chunks/{separator-D7TzNHmX.js → separator-BNWf6BBj.js} +13 -8
- package/dist/chunks/separator-BNWf6BBj.js.map +1 -0
- package/dist/chunks/sidebar-Dq7oGOje.js +664 -0
- package/dist/chunks/sidebar-Dq7oGOje.js.map +1 -0
- package/dist/chunks/{sidebar-menu-BN3jkTlK.js → sidebar-menu-QSSNu1jJ.js} +2 -2
- package/dist/chunks/{sidebar-menu-BN3jkTlK.js.map → sidebar-menu-QSSNu1jJ.js.map} +1 -1
- package/dist/chunks/{skeleton-Dcz57Zyp.js → skeleton-D-qk3mes.js} +3 -3
- package/dist/chunks/skeleton-D-qk3mes.js.map +1 -0
- package/dist/chunks/slider-CcE8GtuV.js +58 -0
- package/dist/chunks/slider-CcE8GtuV.js.map +1 -0
- package/dist/chunks/{status-dot-QJTF0Yv4.js → status-dot-CP6runiC.js} +4 -4
- package/dist/chunks/{status-dot-QJTF0Yv4.js.map → status-dot-CP6runiC.js.map} +1 -1
- package/dist/chunks/{styles-CVJU9t9v.js → styles-hkFkoBbi.js} +2 -2
- package/dist/chunks/{styles-CVJU9t9v.js.map → styles-hkFkoBbi.js.map} +1 -1
- package/dist/chunks/{swap-text-Dr0Irxz6.js → swap-text-SlUjrTlG.js} +3 -3
- package/dist/chunks/swap-text-SlUjrTlG.js.map +1 -0
- package/dist/chunks/switch-ngywMQdl.js +76 -0
- package/dist/chunks/switch-ngywMQdl.js.map +1 -0
- package/dist/chunks/table-CTK5E0J7.js +102 -0
- package/dist/chunks/table-CTK5E0J7.js.map +1 -0
- package/dist/chunks/tag-BGr6lTSV.js +100 -0
- package/dist/chunks/tag-BGr6lTSV.js.map +1 -0
- package/dist/chunks/{text-CIXH8rmT.js → text-DkKdTVUf.js} +9 -9
- package/dist/chunks/text-DkKdTVUf.js.map +1 -0
- package/dist/chunks/{textarea--4FRL3Pb.js → textarea-CO0HP6fK.js} +47 -36
- package/dist/chunks/textarea-CO0HP6fK.js.map +1 -0
- package/dist/chunks/timeseries-Ck-q0wWn.js +381 -0
- package/dist/chunks/timeseries-Ck-q0wWn.js.map +1 -0
- package/dist/chunks/toolbar-u0Gm7Q7-.js +61 -0
- package/dist/chunks/toolbar-u0Gm7Q7-.js.map +1 -0
- package/dist/chunks/tooltip-Tkm-urbi.js +202 -0
- package/dist/chunks/tooltip-Tkm-urbi.js.map +1 -0
- package/dist/chunks/tooltip-root-BC_RNNiP.js +70 -0
- package/dist/chunks/tooltip-root-BC_RNNiP.js.map +1 -0
- package/dist/chunks/truncated-d1afmUJT.js +33 -0
- package/dist/chunks/truncated-d1afmUJT.js.map +1 -0
- package/dist/chunks/use-coarse-pointer-Ml5oE6oX.js +28 -0
- package/dist/chunks/use-coarse-pointer-Ml5oE6oX.js.map +1 -0
- package/dist/chunks/use-hydrating-COtYVRo4.js +8 -0
- package/dist/chunks/use-hydrating-COtYVRo4.js.map +1 -0
- package/dist/chunks/use-scroll-fade-uc8mWSDX.js +30 -0
- package/dist/chunks/use-scroll-fade-uc8mWSDX.js.map +1 -0
- package/dist/chunks/{zh-CN-Bm6UPIbW.js → zh-CN-BlpsT6d_.js} +73 -39
- package/dist/chunks/zh-CN-BlpsT6d_.js.map +1 -0
- package/dist/components/agent-avatar.js +1 -1
- package/dist/components/app-frame.js +2 -2
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/banner.js +1 -1
- package/dist/components/button-group.js +22 -22
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/charts/bar.js +235 -160
- package/dist/components/charts/bar.js.map +1 -1
- package/dist/components/charts/donut.js +144 -99
- package/dist/components/charts/donut.js.map +1 -1
- package/dist/components/charts/gauge.js +61 -49
- package/dist/components/charts/gauge.js.map +1 -1
- package/dist/components/charts/heatmap.js +179 -70
- package/dist/components/charts/heatmap.js.map +1 -1
- package/dist/components/charts/sankey.js +144 -77
- package/dist/components/charts/sankey.js.map +1 -1
- package/dist/components/charts/sparkline.js +54 -38
- package/dist/components/charts/sparkline.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 +3 -3
- package/dist/components/code.js +1 -1
- package/dist/components/collapsible.js +77 -1
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/combobox.js +1 -1
- package/dist/components/command-list.js +2 -2
- package/dist/components/command-palette.js +89 -66
- package/dist/components/command-palette.js.map +1 -1
- package/dist/components/copy-button.js +1 -1
- package/dist/components/data-table.js +1 -459
- package/dist/components/date-picker.js +162 -151
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/dialog.js +74 -63
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/display-options.js +76 -64
- package/dist/components/display-options.js.map +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/figure.js +2 -2
- package/dist/components/filter-chip.js +36 -27
- package/dist/components/filter-chip.js.map +1 -1
- package/dist/components/filter-row.js +4 -4
- package/dist/components/filter-row.js.map +1 -1
- package/dist/components/flow.js +94 -63
- package/dist/components/flow.js.map +1 -1
- package/dist/components/heading.js +1 -1
- package/dist/components/icon-button.js +1 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/input.js +176 -98
- package/dist/components/input.js.map +1 -1
- package/dist/components/kaeso/conversation.js +51 -46
- package/dist/components/kaeso/conversation.js.map +1 -1
- package/dist/components/kaeso/identity.js +1 -1
- package/dist/components/kaeso/moments.js +23 -20
- package/dist/components/kaeso/moments.js.map +1 -1
- package/dist/components/kaeso/rights.js +1 -1
- package/dist/components/kaeso/usage.js +90 -74
- package/dist/components/kaeso/usage.js.map +1 -1
- package/dist/components/kaeso.js +200 -187
- package/dist/components/kaeso.js.map +1 -1
- package/dist/components/kbd.js +1 -1
- package/dist/components/key-value.js +32 -47
- package/dist/components/key-value.js.map +1 -1
- package/dist/components/label.js +1 -25
- package/dist/components/layout.js +2 -2
- package/dist/components/layout.js.map +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/list.js +1 -1
- package/dist/components/loader.js +11 -10
- package/dist/components/loader.js.map +1 -1
- package/dist/components/logo.js +2 -2
- 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/pagination.js +1 -1
- package/dist/components/playground.js +644 -529
- package/dist/components/playground.js.map +1 -1
- package/dist/components/popover.js +4 -4
- package/dist/components/popover.js.map +1 -1
- package/dist/components/portal.js +1 -1
- package/dist/components/qr-code.js +2 -2
- package/dist/components/qr-code.js.map +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/release-art.js +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/section.js +1 -1
- package/dist/components/segmented.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/settings.js +39 -46
- package/dist/components/settings.js.map +1 -1
- package/dist/components/sheet.js +10 -9
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/stat.js +98 -84
- package/dist/components/stat.js.map +1 -1
- package/dist/components/status-dot.js +1 -1
- package/dist/components/surface.js +1 -1
- package/dist/components/swap-text.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.js +73 -55
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tag.js +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/theme-image.js +1 -1
- package/dist/components/theme-menu.js +5 -2
- package/dist/components/theme-menu.js.map +1 -1
- package/dist/components/theme-select.js +1 -1
- package/dist/components/thumbnail.js +35 -24
- package/dist/components/thumbnail.js.map +1 -1
- package/dist/components/timeline.js +51 -35
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/toast.js +76 -66
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toc.js +14 -8
- package/dist/components/toc.js.map +1 -1
- package/dist/components/toolbar.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/visually-hidden.js +1 -1
- package/dist/i18n-provider.js +1 -1
- package/dist/index.js +100 -100
- package/dist/kaeso.css +605 -67
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/types/blocks/delete-resource/delete-resource.d.ts +2 -2
- package/dist/types/components/agent-avatar/agent-avatar.d.ts +24 -19
- package/dist/types/components/badge/badge.d.ts +3 -3
- package/dist/types/components/banner/banner.d.ts +3 -3
- package/dist/types/components/button/button.d.ts +2 -2
- package/dist/types/components/button-group/button-group.d.ts +1 -1
- package/dist/types/components/charts/domain.d.ts +11 -0
- package/dist/types/components/charts/marks.d.ts +1 -0
- package/dist/types/components/code/code.d.ts +3 -3
- package/dist/types/components/code-block/json-view.d.ts +2 -1
- package/dist/types/components/code-block/numbers.d.ts +1 -0
- package/dist/types/components/collapsible/collapsible.d.ts +2 -2
- package/dist/types/components/collapsible/disclosure.d.ts +2 -0
- package/dist/types/components/data-table/data-table.d.ts +6 -5
- package/dist/types/components/data-table/docs.d.ts +1 -0
- package/dist/types/components/data-table/time-columns.d.ts +1 -0
- package/dist/types/components/date-picker/focus-day.d.ts +1 -0
- package/dist/types/components/date-picker/iso-field.d.ts +8 -1
- package/dist/types/components/dialog/dialog.d.ts +7 -7
- package/dist/types/components/field/field.d.ts +1 -1
- package/dist/types/components/flow/flow.d.ts +1 -1
- package/dist/types/components/icon-button/icon-button.d.ts +1 -1
- package/dist/types/components/input/input-group.d.ts +2 -0
- package/dist/types/components/input/number-input.d.ts +4 -4
- package/dist/types/components/input/otp-input.d.ts +3 -3
- package/dist/types/components/kaeso/client-button.d.ts +2 -1
- package/dist/types/components/kaeso/provider-picker.d.ts +1 -0
- package/dist/types/components/kaeso/rights.d.ts +1 -1
- package/dist/types/components/kaeso/role-picker.d.ts +1 -0
- package/dist/types/components/key-value/key-value.d.ts +2 -2
- package/dist/types/components/layout/layout.d.ts +2 -2
- package/dist/types/components/link/link.d.ts +4 -4
- package/dist/types/components/list/list.d.ts +2 -2
- package/dist/types/components/menu/menu.d.ts +2 -1
- package/dist/types/components/menu/styles.d.ts +3 -3
- package/dist/types/components/meter/meter.d.ts +3 -3
- package/dist/types/components/page-header/page-header.d.ts +1 -1
- package/dist/types/components/pagination/pagination.d.ts +2 -2
- package/dist/types/components/playground/prompt-suggestions.d.ts +1 -0
- package/dist/types/components/playground/reasoning-frame.d.ts +14 -0
- package/dist/types/components/playground/reasoning.d.ts +1 -0
- package/dist/types/components/popover/popover.d.ts +1 -1
- package/dist/types/components/scroll-area/scroll-area.d.ts +2 -2
- package/dist/types/components/section/section-header.d.ts +6 -0
- package/dist/types/components/segmented/segmented.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +1 -1
- package/dist/types/components/sheet/sheet.d.ts +3 -3
- package/dist/types/components/sidebar/sidebar.d.ts +1 -0
- package/dist/types/components/slider/slider.d.ts +2 -2
- package/dist/types/components/stat/stat.d.ts +1 -1
- package/dist/types/components/tabs/tabs.d.ts +6 -4
- package/dist/types/components/text/truncated.d.ts +7 -0
- package/dist/types/components/timeline/timeline.d.ts +5 -5
- package/dist/types/components/toc/toc.d.ts +1 -1
- package/dist/types/components/toolbar/toolbar.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.d.ts +2 -2
- package/dist/types/components/tooltip/trigger-props.d.ts +1 -0
- package/dist/types/hooks/use-coarse-pointer.d.ts +1 -0
- package/dist/types/hooks/use-hydrating.d.ts +1 -0
- package/dist/types/utils/arrow-focus.d.ts +4 -1
- package/dist/types/utils/cn.d.ts +33 -0
- package/dist/types/utils/portal-context.d.ts +7 -1
- package/dist/utils.js +2 -2
- package/foundations/accessibility.md +3 -2
- package/foundations/color.md +5 -1
- package/foundations/elevation.md +1 -0
- package/foundations/motion.md +1 -1
- package/foundations/shape.md +2 -2
- package/foundations/typography.md +12 -12
- package/package.json +2 -2
- package/dist/chunks/agent-avatar-0pdBTWkR.js +0 -171
- package/dist/chunks/agent-avatar-0pdBTWkR.js.map +0 -1
- package/dist/chunks/app-frame-DogGRmsu.js +0 -221
- package/dist/chunks/app-frame-DogGRmsu.js.map +0 -1
- package/dist/chunks/arrow-focus-BcySmwwU.js +0 -11
- package/dist/chunks/arrow-focus-BcySmwwU.js.map +0 -1
- package/dist/chunks/avatar-CWbdwbJv.js +0 -83
- package/dist/chunks/avatar-CWbdwbJv.js.map +0 -1
- package/dist/chunks/badge-C2KtxCLB.js +0 -26
- package/dist/chunks/badge-C2KtxCLB.js.map +0 -1
- package/dist/chunks/banner-BA2ALw9M.js +0 -85
- package/dist/chunks/banner-BA2ALw9M.js.map +0 -1
- package/dist/chunks/button-CzuxqawA.js +0 -164
- package/dist/chunks/button-CzuxqawA.js.map +0 -1
- package/dist/chunks/calendar-BWaf2MXc.js.map +0 -1
- package/dist/chunks/checkbox-CQjwCPkc.js +0 -126
- package/dist/chunks/checkbox-CQjwCPkc.js.map +0 -1
- package/dist/chunks/cn-Dj6sRgkF.js.map +0 -1
- package/dist/chunks/code-block-BZIe_B9l.js +0 -334
- package/dist/chunks/code-block-BZIe_B9l.js.map +0 -1
- package/dist/chunks/code-block-DdNPHEzI.js.map +0 -1
- package/dist/chunks/code-tqj0uhBL.js.map +0 -1
- package/dist/chunks/collapsible-CKrCX_T9.js +0 -87
- package/dist/chunks/collapsible-CKrCX_T9.js.map +0 -1
- package/dist/chunks/combobox-DjDI7SUC.js +0 -319
- package/dist/chunks/combobox-DjDI7SUC.js.map +0 -1
- package/dist/chunks/command-list-C2Y7V_lt.js +0 -418
- package/dist/chunks/command-list-C2Y7V_lt.js.map +0 -1
- package/dist/chunks/copy-button-FJvPJn72.js.map +0 -1
- package/dist/chunks/core-BYns5ytV.js +0 -472
- package/dist/chunks/core-BYns5ytV.js.map +0 -1
- package/dist/chunks/date-popup-CPA_zt6o.js +0 -35
- package/dist/chunks/date-popup-CPA_zt6o.js.map +0 -1
- package/dist/chunks/de-D_0mmG-k.js.map +0 -1
- package/dist/chunks/dialog-Cg9A_6SF.js.map +0 -1
- package/dist/chunks/field-TviMvYa2.js.map +0 -1
- package/dist/chunks/hidden-description-B2zSmLcn.js +0 -23
- package/dist/chunks/hidden-description-B2zSmLcn.js.map +0 -1
- package/dist/chunks/icon-button-CrdF_eMG.js.map +0 -1
- package/dist/chunks/input-2VJuj_M4.js.map +0 -1
- package/dist/chunks/input-group-DQ_4DoXg.js.map +0 -1
- package/dist/chunks/iso-field-B2rTwiBo.js +0 -33
- package/dist/chunks/iso-field-B2rTwiBo.js.map +0 -1
- package/dist/chunks/json-view-Dqd2TDkc.js +0 -175
- package/dist/chunks/json-view-Dqd2TDkc.js.map +0 -1
- package/dist/chunks/kbd-BF1vKXJf.js.map +0 -1
- package/dist/chunks/link-KWI7PevW.js.map +0 -1
- package/dist/chunks/list-M1csq-d4.js +0 -494
- package/dist/chunks/list-M1csq-d4.js.map +0 -1
- package/dist/chunks/markdown-BupwFOae.js +0 -313
- package/dist/chunks/markdown-BupwFOae.js.map +0 -1
- package/dist/chunks/menu-DEmBfdPm.js +0 -450
- package/dist/chunks/menu-DEmBfdPm.js.map +0 -1
- package/dist/chunks/meter-Bj4N3Xuh.js +0 -84
- package/dist/chunks/meter-Bj4N3Xuh.js.map +0 -1
- package/dist/chunks/nav-sheet-CzgIwgAm.js +0 -60
- package/dist/chunks/nav-sheet-CzgIwgAm.js.map +0 -1
- package/dist/chunks/nav-wordmark-_pjheAsZ.js.map +0 -1
- package/dist/chunks/page-header-DL2y2iZp.js +0 -41
- package/dist/chunks/page-header-DL2y2iZp.js.map +0 -1
- package/dist/chunks/pagination-Cn_qF4cg.js +0 -86
- package/dist/chunks/pagination-Cn_qF4cg.js.map +0 -1
- package/dist/chunks/picker-popover-BxyU1U9F.js +0 -106
- package/dist/chunks/picker-popover-BxyU1U9F.js.map +0 -1
- package/dist/chunks/popover-DNN4S47w.js +0 -50
- package/dist/chunks/popover-DNN4S47w.js.map +0 -1
- package/dist/chunks/portal-context-BBbzDKmY.js.map +0 -1
- package/dist/chunks/radio-CDDFpdtL.js.map +0 -1
- package/dist/chunks/range-popup-CRyWYUB1.js +0 -128
- package/dist/chunks/range-popup-CRyWYUB1.js.map +0 -1
- package/dist/chunks/release-art-ZwfFQImt.js +0 -561
- package/dist/chunks/release-art-ZwfFQImt.js.map +0 -1
- package/dist/chunks/rights-Cyp0Pzp-.js +0 -279
- package/dist/chunks/rights-Cyp0Pzp-.js.map +0 -1
- package/dist/chunks/scroll-area-D8MD7Vpo.js.map +0 -1
- package/dist/chunks/scroll-parent-WXvzQcUo.js +0 -14
- package/dist/chunks/scroll-parent-WXvzQcUo.js.map +0 -1
- package/dist/chunks/section-Ce1efbsP.js +0 -87
- package/dist/chunks/section-Ce1efbsP.js.map +0 -1
- package/dist/chunks/segmented-CErcoxwi.js +0 -114
- package/dist/chunks/segmented-CErcoxwi.js.map +0 -1
- package/dist/chunks/select-x4XVsdCI.js +0 -210
- package/dist/chunks/select-x4XVsdCI.js.map +0 -1
- package/dist/chunks/separator-D7TzNHmX.js.map +0 -1
- package/dist/chunks/sidebar-3r1ZRXlN.js +0 -621
- package/dist/chunks/sidebar-3r1ZRXlN.js.map +0 -1
- package/dist/chunks/skeleton-Dcz57Zyp.js.map +0 -1
- package/dist/chunks/slider-Ci83PGtj.js +0 -57
- package/dist/chunks/slider-Ci83PGtj.js.map +0 -1
- package/dist/chunks/swap-text-Dr0Irxz6.js.map +0 -1
- package/dist/chunks/switch-BNMq_kGt.js +0 -59
- package/dist/chunks/switch-BNMq_kGt.js.map +0 -1
- package/dist/chunks/table-BeOSKl_3.js +0 -84
- package/dist/chunks/table-BeOSKl_3.js.map +0 -1
- package/dist/chunks/tag-D_M1s2qS.js +0 -87
- package/dist/chunks/tag-D_M1s2qS.js.map +0 -1
- package/dist/chunks/text-CIXH8rmT.js.map +0 -1
- package/dist/chunks/textarea--4FRL3Pb.js.map +0 -1
- package/dist/chunks/timeseries-D1xjRXfk.js +0 -339
- package/dist/chunks/timeseries-D1xjRXfk.js.map +0 -1
- package/dist/chunks/toolbar-WA_oZgu-.js +0 -37
- package/dist/chunks/toolbar-WA_oZgu-.js.map +0 -1
- package/dist/chunks/tooltip-OcwO0VUT.js +0 -154
- package/dist/chunks/tooltip-OcwO0VUT.js.map +0 -1
- package/dist/chunks/tooltip-root-DzahJDVj.js +0 -60
- package/dist/chunks/tooltip-root-DzahJDVj.js.map +0 -1
- package/dist/chunks/zh-CN-Bm6UPIbW.js.map +0 -1
- package/dist/components/data-table.js.map +0 -1
- package/dist/components/label.js.map +0 -1
|
@@ -1,460 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import { a as t, i as n, o as r } from "../chunks/inset-BUzyXLK4.js";
|
|
4
|
-
import { i } from "../chunks/context-BELWW79w.js";
|
|
5
|
-
import { formatDate as a, formatDuration as o, formatNumber as s, formatRelative as c, formatTokens as l, formatUSD as u } from "../format.js";
|
|
6
|
-
import { t as ee } from "../chunks/icon-D7ja-_Yk.js";
|
|
7
|
-
import { r as d } from "../chunks/tooltip-OcwO0VUT.js";
|
|
8
|
-
import { t as te } from "../chunks/observe-resize-DhxhmoyB.js";
|
|
9
|
-
import { r as ne } from "../chunks/text-CIXH8rmT.js";
|
|
10
|
-
import { n as re } from "../chunks/button-CzuxqawA.js";
|
|
11
|
-
import { n as ie } from "../chunks/checkbox-CQjwCPkc.js";
|
|
12
|
-
import { t as f } from "../chunks/menu-DEmBfdPm.js";
|
|
13
|
-
import { r as ae } from "../chunks/skeleton-Dcz57Zyp.js";
|
|
14
|
-
import { r as oe } from "../chunks/pagination-Cn_qF4cg.js";
|
|
15
|
-
import { t as se } from "../chunks/empty-DvhyMXQq.js";
|
|
16
|
-
import { i as p } from "../chunks/status-dot-QJTF0Yv4.js";
|
|
17
|
-
import { t as m } from "../chunks/avatar-CWbdwbJv.js";
|
|
18
|
-
import { t as ce } from "../chunks/scroll-parent-WXvzQcUo.js";
|
|
19
|
-
import { t as le } from "../chunks/tone-CWpsHPb6.js";
|
|
20
|
-
import { t as ue } from "../chunks/use-scroll-margin-atRtf0v_.js";
|
|
21
|
-
import { forwardRef as h, useLayoutEffect as g, useMemo as de, useRef as _, useState as v } from "react";
|
|
22
|
-
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
23
|
-
import { ArrowDown01Icon as fe, ArrowUp01Icon as pe } from "@hugeicons/core-free-icons";
|
|
24
|
-
import { useVirtualizer as me } from "@tanstack/react-virtual";
|
|
25
|
-
import { flexRender as x, getCoreRowModel as he, getSortedRowModel as ge, useReactTable as _e } from "@tanstack/react-table";
|
|
26
|
-
//#region src/components/data-table/data-table.tsx
|
|
27
|
-
var S = { density: {
|
|
28
|
-
compact: { classes: "h-36" },
|
|
29
|
-
default: { classes: "h-40" },
|
|
30
|
-
comfortable: { classes: "h-48" }
|
|
31
|
-
} }, C = { density: "default" }, ve = {
|
|
32
|
-
compact: 36,
|
|
33
|
-
default: 40,
|
|
34
|
-
comfortable: 48
|
|
35
|
-
}, w = 136;
|
|
36
|
-
function T(e, t, n = 48) {
|
|
37
|
-
if (!t) return {
|
|
38
|
-
hidden: [],
|
|
39
|
-
tight: !1,
|
|
40
|
-
overflow: !1
|
|
41
|
-
};
|
|
42
|
-
let r = [...e].sort((e, t) => e.priority - t.priority), i = n, a = /* @__PURE__ */ new Set();
|
|
43
|
-
for (let e of r) i += e.size, (i <= t || e.priority <= 1 || e.fixed) && a.add(e.id);
|
|
44
|
-
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 ? xe(t) : t.size), 0);
|
|
45
|
-
if (c > t && o.some((e) => e.grow)) {
|
|
46
|
-
let e = o[o.length - 1];
|
|
47
|
-
for (let n of [...o].reverse()) {
|
|
48
|
-
if (c <= t) break;
|
|
49
|
-
n.grow || n.fixed || n === e || (a.delete(n.id), c -= n.size);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
hidden: e.filter((e) => !a.has(e.id)).map((e) => e.id),
|
|
54
|
-
tight: s > t,
|
|
55
|
-
overflow: c > t
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
function ye(e) {
|
|
59
|
-
let t = getComputedStyle(e);
|
|
60
|
-
return e.getBoundingClientRect().width - (parseFloat(t.paddingLeft) || 0) - (parseFloat(t.paddingRight) || 0);
|
|
61
|
-
}
|
|
62
|
-
function be(e, t) {
|
|
63
|
-
if (!e?.id) return;
|
|
64
|
-
let n = e.meta?.text?.(t.original);
|
|
65
|
-
if (n) return n;
|
|
66
|
-
let r = t.getValue(e.id);
|
|
67
|
-
return typeof r == "string" && r ? r : void 0;
|
|
68
|
-
}
|
|
69
|
-
var xe = (e) => Math.min(e.size, e.minWidth ?? 136);
|
|
70
|
-
function E({ data: a, columns: o, getRowId: s, density: c = "default", onRowClick: l, rowMenu: u, selectable: d, canSelectRow: p, selection: m, onSelectionChange: h, sorting: C, onSortingChange: w, manualSorting: E, loading: D, error: O, onRetry: k, empty: A, hasMore: j, loadingMore: M, onLoadMore: Se, stickyFirstColumn: Ce, virtualizeAbove: we = 100, className: Te, activeRowId: Ee, freshRowIds: De, onHiddenColumnsChange: N, "aria-label": Oe }, P) {
|
|
71
|
-
let F = t(), I = r(), ke = n(), L = i(), [Ae, je] = v([]), [Me, Ne] = v({}), [R, Pe] = v(0), Fe = C ?? Ae, Ie = m ?? Me, Le = de(() => d ? [{
|
|
72
|
-
id: "__select",
|
|
73
|
-
size: 44,
|
|
74
|
-
enableSorting: !1,
|
|
75
|
-
enableResizing: !1,
|
|
76
|
-
meta: { priority: 1 },
|
|
77
|
-
header: ({ table: e }) => /* @__PURE__ */ y(ie, {
|
|
78
|
-
"aria-label": L("dataTable.selectAllRows", "Select all rows"),
|
|
79
|
-
checked: e.getIsAllRowsSelected(),
|
|
80
|
-
indeterminate: e.getIsSomeRowsSelected() && !e.getIsAllRowsSelected(),
|
|
81
|
-
onCheckedChange: (t) => e.toggleAllRowsSelected(t)
|
|
82
|
-
}),
|
|
83
|
-
cell: ({ row: e }) => {
|
|
84
|
-
let t = be(o[0], e);
|
|
85
|
-
return /* @__PURE__ */ y(ie, {
|
|
86
|
-
"aria-label": t ? L("dataTable.selectNamed", "Select {name}", { name: t }) : L("dataTable.selectRow", "Select row"),
|
|
87
|
-
checked: e.getIsSelected(),
|
|
88
|
-
disabled: !e.getCanSelect(),
|
|
89
|
-
onCheckedChange: (t) => e.toggleSelected(t)
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
}, ...o] : o, [
|
|
93
|
-
o,
|
|
94
|
-
d,
|
|
95
|
-
L
|
|
96
|
-
]), z = _e({
|
|
97
|
-
data: a,
|
|
98
|
-
columns: Le,
|
|
99
|
-
state: {
|
|
100
|
-
sorting: Fe,
|
|
101
|
-
rowSelection: Ie
|
|
102
|
-
},
|
|
103
|
-
onSortingChange: (e) => {
|
|
104
|
-
let t = typeof e == "function" ? e(Fe) : e;
|
|
105
|
-
C || je(t), w?.(t);
|
|
106
|
-
},
|
|
107
|
-
onRowSelectionChange: (e) => {
|
|
108
|
-
let t = typeof e == "function" ? e(Ie) : e;
|
|
109
|
-
m || Ne(t), h?.(t);
|
|
110
|
-
},
|
|
111
|
-
getCoreRowModel: he(),
|
|
112
|
-
getSortedRowModel: ge(),
|
|
113
|
-
manualSorting: !!E,
|
|
114
|
-
enableRowSelection: d ? p ? (e) => p(e.original) : !0 : !1,
|
|
115
|
-
columnResizeMode: "onChange",
|
|
116
|
-
...s ? { getRowId: (e) => s(e) } : {},
|
|
117
|
-
defaultColumn: {
|
|
118
|
-
size: 140,
|
|
119
|
-
minSize: 64,
|
|
120
|
-
maxSize: 640
|
|
121
|
-
}
|
|
122
|
-
}), B = _(null), V = _(null), H = _(null), Re = z.getVisibleLeafColumns(), ze = Re.map((e) => ({
|
|
123
|
-
id: e.id,
|
|
124
|
-
size: e.getSize(),
|
|
125
|
-
priority: e.columnDef.meta?.priority ?? 2,
|
|
126
|
-
grow: !!e.columnDef.meta?.grow,
|
|
127
|
-
minWidth: e.columnDef.meta?.minWidth,
|
|
128
|
-
fixed: e.id === "__select"
|
|
129
|
-
})), Be = JSON.stringify(ze), Ve = (e) => {
|
|
130
|
-
let t = T(ze, e, F ? 48 : 0);
|
|
131
|
-
return `${t.tight ? "!" : ""}${t.overflow ? ">" : ""}|${t.hidden.join(" ")}`;
|
|
132
|
-
}, U = _(Ve);
|
|
133
|
-
U.current = Ve;
|
|
134
|
-
let [He, Ue] = v("|");
|
|
135
|
-
g(() => {
|
|
136
|
-
let e = B.current;
|
|
137
|
-
if (e) return te([e], ([e]) => Ue(U.current(Math.round(e?.contentRect.width ?? 0))));
|
|
138
|
-
}, []), g(() => {
|
|
139
|
-
B.current && Ue(U.current(Math.round(ye(B.current))));
|
|
140
|
-
}, [Be]);
|
|
141
|
-
let [We = "", Ge = ""] = He.split("|"), Ke = We.includes("!"), qe = We.includes(">"), W = de(() => new Set(Ge.split(" ").filter(Boolean)), [Ge]), Je = _(N);
|
|
142
|
-
Je.current = N, g(() => {
|
|
143
|
-
Je.current?.([...W]);
|
|
144
|
-
}, [W]);
|
|
145
|
-
let G = Re.filter((e) => !W.has(e.id)), K = (e) => e.columnDef.meta?.grow && Ke ? xe({
|
|
146
|
-
size: e.getSize(),
|
|
147
|
-
minWidth: e.columnDef.meta.minWidth
|
|
148
|
-
}) : e.getSize(), q = {
|
|
149
|
-
gridTemplateColumns: G.map((e) => e.columnDef.meta?.grow ? `minmax(${K(e)}px, 1fr)` : `${e.getSize()}px`).join(" "),
|
|
150
|
-
minWidth: G.reduce((e, t) => e + K(t), 0)
|
|
151
|
-
}, Ye = qe && G.length > 1 && !G[G.length - 1]?.columnDef.meta?.grow, J = z.getRowModel().rows, Y = J.length > we, X = () => ce(B.current), Xe = ue(H, X, J.length, Y), Z = me({
|
|
152
|
-
count: J.length,
|
|
153
|
-
getScrollElement: X,
|
|
154
|
-
estimateSize: () => ve[c],
|
|
155
|
-
overscan: 16,
|
|
156
|
-
enabled: Y,
|
|
157
|
-
scrollMargin: Xe
|
|
158
|
-
}), Q = (t) => e("flex min-w-0 items-center px-12", F && t === 0 && "pl-20", F && t === G.length - 1 && "pr-20"), $ = (t, n = !1) => (Ce && t === 0 || Ye && t === G.length - 1) && e("sticky z-10 group-hover/tr:bg-fill-1 group-aria-selected/tr:bg-fill-2 group-data-active/tr:bg-fill-2", t === 0 ? "left-0" : "right-0", F ? "bg-raised" : e(I ? "bg-raised" : "bg-panel", !n && (t === 0 ? "rounded-l-item" : "rounded-r-item"))), Ze = !!l || !!d, Qe = Math.min(R, Math.max(J.length - 1, 0)), $e = (e) => {
|
|
159
|
-
let t = Math.max(0, Math.min(J.length - 1, e));
|
|
160
|
-
Pe(t), Y && Z.scrollToIndex(t, { align: "auto" });
|
|
161
|
-
let n = () => H.current?.querySelector(`[data-row-index="${t}"]`), r = n();
|
|
162
|
-
r ? r.focus() : requestAnimationFrame(() => n()?.focus());
|
|
163
|
-
}, et = () => Math.max(1, Math.floor((X()?.clientHeight ?? 400) / ve[c]) - 1), tt = (e, t, n) => {
|
|
164
|
-
if (e.target !== e.currentTarget || e.altKey || e.metaKey || e.ctrlKey) return;
|
|
165
|
-
let r = {
|
|
166
|
-
ArrowDown: n + 1,
|
|
167
|
-
ArrowUp: n - 1,
|
|
168
|
-
Home: 0,
|
|
169
|
-
End: J.length - 1,
|
|
170
|
-
PageDown: n + et(),
|
|
171
|
-
PageUp: n - et()
|
|
172
|
-
}[e.key];
|
|
173
|
-
r === void 0 ? e.key === "Enter" ? (e.preventDefault(), l?.(t.original)) : e.key === " " && d && (e.preventDefault(), t.toggleSelected()) : (e.preventDefault(), $e(r));
|
|
174
|
-
}, nt = (t, n, r) => {
|
|
175
|
-
let i = t.getVisibleCells().filter((e) => !W.has(e.column.id)), a = /* @__PURE__ */ y("div", {
|
|
176
|
-
role: "row",
|
|
177
|
-
"aria-rowindex": n + 2,
|
|
178
|
-
"aria-selected": d ? t.getIsSelected() : void 0,
|
|
179
|
-
"data-active": t.id === Ee || void 0,
|
|
180
|
-
"data-fresh": De?.has(t.id) || void 0,
|
|
181
|
-
"data-row-index": n,
|
|
182
|
-
tabIndex: Ze ? n === Qe ? 0 : -1 : void 0,
|
|
183
|
-
onFocus: (e) => {
|
|
184
|
-
e.target === e.currentTarget && n !== R && Pe(n);
|
|
185
|
-
},
|
|
186
|
-
onClick: (e) => {
|
|
187
|
-
e.target.closest("button, a, [role=checkbox]") || l?.(t.original);
|
|
188
|
-
},
|
|
189
|
-
onKeyDown: (e) => tt(e, t, n),
|
|
190
|
-
style: {
|
|
191
|
-
...q,
|
|
192
|
-
...r
|
|
193
|
-
},
|
|
194
|
-
className: e("group/tr grid w-full text-body text-fg transition-control focus-ring-inset", !F && "rounded-item", S.density[c].classes, l && "cursor-pointer", "hover:bg-fill-1 aria-selected:bg-fill-2 data-active:bg-fill-2 data-fresh:animate-row-fresh", "hover:controls-on-fill aria-selected:controls-on-fill data-active:controls-on-fill"),
|
|
195
|
-
children: i.map((n, r) => {
|
|
196
|
-
let i = n.column.columnDef.meta, a = x(n.column.columnDef.cell, n.getContext()), o = n.getValue(), s = i?.text ? i.text(t.original) : typeof o == "string" ? o : void 0, c = i?.tone?.(t.original);
|
|
197
|
-
return /* @__PURE__ */ y("div", {
|
|
198
|
-
role: "cell",
|
|
199
|
-
className: e(Q(r), i?.align === "end" && "justify-end text-right tabular", i?.mono && "mono text-small", c && le[c], $(r)),
|
|
200
|
-
children: s !== void 0 && typeof a != "object" ? /* @__PURE__ */ y(ne, {
|
|
201
|
-
truncate: !0,
|
|
202
|
-
tone: c ?? "default",
|
|
203
|
-
className: e("min-w-0", i?.mono && "text-small"),
|
|
204
|
-
mono: !!i?.mono,
|
|
205
|
-
children: s
|
|
206
|
-
}) : n.column.id === "__select" ? /* @__PURE__ */ y("span", {
|
|
207
|
-
className: "flex",
|
|
208
|
-
children: a
|
|
209
|
-
}) : /* @__PURE__ */ y("span", {
|
|
210
|
-
className: e("min-w-0 truncate cell-fit", i?.grow && "flex-1"),
|
|
211
|
-
children: a
|
|
212
|
-
})
|
|
213
|
-
}, n.id);
|
|
214
|
-
})
|
|
215
|
-
});
|
|
216
|
-
return u ? /* @__PURE__ */ b(f, { children: [/* @__PURE__ */ y(f.Trigger, { children: a }), /* @__PURE__ */ y(f.Content, { children: u(t.original) })] }, t.id) : /* @__PURE__ */ y("div", { children: a }, t.id);
|
|
217
|
-
};
|
|
218
|
-
return /* @__PURE__ */ b("div", {
|
|
219
|
-
ref: (e) => {
|
|
220
|
-
B.current = e, typeof P == "function" ? P(e) : P && (P.current = e);
|
|
221
|
-
},
|
|
222
|
-
className: e("relative w-full min-w-0", !F && !ke && "px-24", Te),
|
|
223
|
-
children: [/* @__PURE__ */ b("div", {
|
|
224
|
-
role: "table",
|
|
225
|
-
"aria-label": Oe,
|
|
226
|
-
"aria-rowcount": J.length + 1,
|
|
227
|
-
"aria-busy": D || void 0,
|
|
228
|
-
className: e("w-full overflow-clip", F && "rounded-group bg-raised shadow-xs"),
|
|
229
|
-
children: [/* @__PURE__ */ y("div", {
|
|
230
|
-
ref: V,
|
|
231
|
-
role: "rowgroup",
|
|
232
|
-
className: e("sticky top-0 z-20 overflow-hidden", F || I ? "bg-raised" : "bg-panel"),
|
|
233
|
-
onScroll: (e) => {
|
|
234
|
-
H.current && H.current.scrollLeft !== e.currentTarget.scrollLeft && (H.current.scrollLeft = e.currentTarget.scrollLeft);
|
|
235
|
-
},
|
|
236
|
-
children: z.getHeaderGroups().map((t) => /* @__PURE__ */ y("div", {
|
|
237
|
-
role: "row",
|
|
238
|
-
"aria-rowindex": 1,
|
|
239
|
-
className: "grid h-36 hairline-b-strong",
|
|
240
|
-
style: q,
|
|
241
|
-
children: t.headers.filter((e) => !W.has(e.column.id)).map((t, n) => {
|
|
242
|
-
let r = t.column.columnDef.meta, i = t.column.getCanSort(), a = t.column.getIsSorted();
|
|
243
|
-
return /* @__PURE__ */ b("div", {
|
|
244
|
-
role: "columnheader",
|
|
245
|
-
"aria-sort": a === "asc" ? "ascending" : a === "desc" ? "descending" : i ? "none" : void 0,
|
|
246
|
-
className: e("group/th relative", Q(n), r?.align === "end" && "justify-end", $(n, !0), $(n, !0) && "hairline-b-strong"),
|
|
247
|
-
children: [i ? /* @__PURE__ */ b("button", {
|
|
248
|
-
type: "button",
|
|
249
|
-
onClick: t.column.getToggleSortingHandler(),
|
|
250
|
-
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 hover:bg-fill-1 hover:text-fg focus-ring tap-target", a ? "text-fg" : "text-fg-secondary", r?.align === "end" && "flex-row-reverse"),
|
|
251
|
-
children: [/* @__PURE__ */ y("span", {
|
|
252
|
-
className: "truncate",
|
|
253
|
-
children: x(t.column.columnDef.header, t.getContext())
|
|
254
|
-
}), /* @__PURE__ */ y(ee, {
|
|
255
|
-
icon: a === "desc" ? fe : pe,
|
|
256
|
-
size: "xs",
|
|
257
|
-
className: e("shrink-0 transition-control", a ? "opacity-100" : "opacity-0 group-hover/th:opacity-60")
|
|
258
|
-
})]
|
|
259
|
-
}) : /* @__PURE__ */ y("span", {
|
|
260
|
-
className: "truncate text-caption font-medium text-fg-secondary",
|
|
261
|
-
children: x(t.column.columnDef.header, t.getContext())
|
|
262
|
-
}), t.column.getCanResize() && /* @__PURE__ */ y("div", {
|
|
263
|
-
role: "separator",
|
|
264
|
-
"aria-orientation": "vertical",
|
|
265
|
-
"aria-label": L("dataTable.resizeColumn", "Resize column"),
|
|
266
|
-
"aria-valuenow": t.column.getSize(),
|
|
267
|
-
"aria-valuemin": t.column.columnDef.minSize ?? 64,
|
|
268
|
-
"aria-valuemax": t.column.columnDef.maxSize ?? 640,
|
|
269
|
-
tabIndex: 0,
|
|
270
|
-
onKeyDown: (e) => {
|
|
271
|
-
let n = {
|
|
272
|
-
ArrowLeft: -16,
|
|
273
|
-
ArrowRight: 16
|
|
274
|
-
}[e.key];
|
|
275
|
-
if (n === void 0) return;
|
|
276
|
-
e.preventDefault();
|
|
277
|
-
let r = t.column.id, i = t.column.columnDef.minSize ?? 64, a = t.column.columnDef.maxSize ?? 640;
|
|
278
|
-
z.setColumnSizing((e) => ({
|
|
279
|
-
...e,
|
|
280
|
-
[r]: Math.max(i, Math.min(a, t.column.getSize() + n))
|
|
281
|
-
}));
|
|
282
|
-
},
|
|
283
|
-
onMouseDown: t.getResizeHandler(),
|
|
284
|
-
onTouchStart: t.getResizeHandler(),
|
|
285
|
-
onDoubleClick: () => t.column.resetSize(),
|
|
286
|
-
className: "absolute top-8 right-0 bottom-8 w-8 cursor-col-resize rounded-pill after:absolute after:inset-y-0 after:right-0 after:w-1 after:bg-transparent after:transition-control group-hover/th:after:bg-line-strong focus-ring-inset"
|
|
287
|
-
})]
|
|
288
|
-
}, t.id);
|
|
289
|
-
})
|
|
290
|
-
}, t.id))
|
|
291
|
-
}), /* @__PURE__ */ y("div", {
|
|
292
|
-
ref: H,
|
|
293
|
-
role: "rowgroup",
|
|
294
|
-
className: "overflow-x-auto scrollbar-quiet",
|
|
295
|
-
onScroll: (e) => {
|
|
296
|
-
V.current && V.current.scrollLeft !== e.currentTarget.scrollLeft && (V.current.scrollLeft = e.currentTarget.scrollLeft);
|
|
297
|
-
},
|
|
298
|
-
children: O ? /* @__PURE__ */ y("div", {
|
|
299
|
-
role: "row",
|
|
300
|
-
children: /* @__PURE__ */ y("div", {
|
|
301
|
-
role: "cell",
|
|
302
|
-
"aria-colspan": G.length,
|
|
303
|
-
className: "block",
|
|
304
|
-
children: /* @__PURE__ */ y("div", {
|
|
305
|
-
role: "alert",
|
|
306
|
-
children: /* @__PURE__ */ y(se, {
|
|
307
|
-
size: "compact",
|
|
308
|
-
title: L("dataTable.loadFailed", "Couldn't load these rows"),
|
|
309
|
-
actions: k && /* @__PURE__ */ y(re, {
|
|
310
|
-
size: "sm",
|
|
311
|
-
onClick: k,
|
|
312
|
-
children: L("dataTable.tryAgain", "Try again")
|
|
313
|
-
})
|
|
314
|
-
})
|
|
315
|
-
})
|
|
316
|
-
})
|
|
317
|
-
}) : D && J.length === 0 ? Array.from({ length: 8 }, (t, n) => /* @__PURE__ */ y("div", {
|
|
318
|
-
role: "row",
|
|
319
|
-
className: e("grid", S.density[c].classes),
|
|
320
|
-
style: q,
|
|
321
|
-
children: G.map((t, r) => /* @__PURE__ */ y("div", {
|
|
322
|
-
role: "cell",
|
|
323
|
-
className: e(Q(r), t.columnDef.meta?.align === "end" && "justify-end"),
|
|
324
|
-
children: /* @__PURE__ */ y(ae, {
|
|
325
|
-
shape: "line",
|
|
326
|
-
style: { width: `${40 + (n * 7 + r * 13) % 45}%` }
|
|
327
|
-
})
|
|
328
|
-
}, t.id))
|
|
329
|
-
}, n)) : J.length === 0 ? /* @__PURE__ */ y("div", {
|
|
330
|
-
role: "row",
|
|
331
|
-
children: /* @__PURE__ */ y("div", {
|
|
332
|
-
role: "cell",
|
|
333
|
-
"aria-colspan": G.length,
|
|
334
|
-
className: "block",
|
|
335
|
-
children: A ?? /* @__PURE__ */ y(se, {
|
|
336
|
-
size: "compact",
|
|
337
|
-
title: L("dataTable.noRows", "No rows"),
|
|
338
|
-
description: L("dataTable.noMatches", "Nothing matches these filters.")
|
|
339
|
-
})
|
|
340
|
-
})
|
|
341
|
-
}) : Y ? /* @__PURE__ */ y("div", {
|
|
342
|
-
className: "relative",
|
|
343
|
-
style: { height: Z.getTotalSize() },
|
|
344
|
-
children: Z.getVirtualItems().map((e) => nt(J[e.index], e.index, {
|
|
345
|
-
position: "absolute",
|
|
346
|
-
top: 0,
|
|
347
|
-
left: 0,
|
|
348
|
-
transform: `translateY(${Math.round(e.start - Xe)}px)`
|
|
349
|
-
}))
|
|
350
|
-
}) : J.map((e, t) => nt(e, t))
|
|
351
|
-
})]
|
|
352
|
-
}), j && /* @__PURE__ */ y(oe, {
|
|
353
|
-
variant: "load-more",
|
|
354
|
-
hasMore: !0,
|
|
355
|
-
loading: M,
|
|
356
|
-
onLoadMore: Se
|
|
357
|
-
})]
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
var D = /* @__PURE__ */ h(E);
|
|
361
|
-
process.env.NODE_ENV !== "production" && (D.displayName = "DataTable");
|
|
362
|
-
var O = D;
|
|
363
|
-
//#endregion
|
|
364
|
-
//#region src/components/data-table/columns.tsx
|
|
365
|
-
function k(e, t, n, r = {}, i) {
|
|
366
|
-
return {
|
|
367
|
-
id: e.id,
|
|
368
|
-
header: () => e.header,
|
|
369
|
-
accessorFn: t,
|
|
370
|
-
cell: (e) => n(e.getValue(), e.row.original),
|
|
371
|
-
...e.size ? { size: e.size } : {},
|
|
372
|
-
...i ? { sortingFn: i } : {},
|
|
373
|
-
meta: {
|
|
374
|
-
...e.priority === void 0 ? {} : { priority: e.priority },
|
|
375
|
-
...e.grow ? { grow: !0 } : {},
|
|
376
|
-
...e.minWidth === void 0 ? {} : { minWidth: e.minWidth },
|
|
377
|
-
...e.tone ? { tone: e.tone } : {},
|
|
378
|
-
...r
|
|
379
|
-
}
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
|
-
function A({ value: e }) {
|
|
383
|
-
let t = i()("dataTable.tokenCount", "{count} tokens", { count: s(e) });
|
|
384
|
-
return /* @__PURE__ */ y(d, {
|
|
385
|
-
content: t,
|
|
386
|
-
children: /* @__PURE__ */ b("span", { children: [/* @__PURE__ */ y("span", {
|
|
387
|
-
"aria-hidden": !0,
|
|
388
|
-
children: l(e)
|
|
389
|
-
}), /* @__PURE__ */ y("span", {
|
|
390
|
-
className: "sr-only",
|
|
391
|
-
children: t
|
|
392
|
-
})] })
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
function j({ value: e, now: t }) {
|
|
396
|
-
let n = a(e, {
|
|
397
|
-
time: !0,
|
|
398
|
-
seconds: !0
|
|
399
|
-
});
|
|
400
|
-
return /* @__PURE__ */ y(d, {
|
|
401
|
-
content: `${n} · ${a(e, {
|
|
402
|
-
time: !0,
|
|
403
|
-
utc: !0
|
|
404
|
-
})}`,
|
|
405
|
-
shape: "multiline",
|
|
406
|
-
children: /* @__PURE__ */ b("span", {
|
|
407
|
-
className: "text-fg-secondary",
|
|
408
|
-
children: [/* @__PURE__ */ y("time", {
|
|
409
|
-
dateTime: new Date(e).toISOString(),
|
|
410
|
-
children: c(e, t)
|
|
411
|
-
}), /* @__PURE__ */ b("span", {
|
|
412
|
-
className: "sr-only",
|
|
413
|
-
children: [" ", n]
|
|
414
|
-
})]
|
|
415
|
-
})
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
var M = {
|
|
419
|
-
text: (e, t) => k(e, t, (e) => e, { text: (e) => t(e) }),
|
|
420
|
-
mono: (e, t) => k(e, t, (e) => e, {
|
|
421
|
-
mono: !0,
|
|
422
|
-
text: (e) => t(e)
|
|
423
|
-
}),
|
|
424
|
-
number: (e, t) => k(e, t, (e) => s(e), { align: "end" }),
|
|
425
|
-
money: (e, t, n = {}) => k(e, t, (e) => u(e, n.decimals === void 0 ? {} : { decimals: n.decimals }), {
|
|
426
|
-
align: "end",
|
|
427
|
-
mono: !1
|
|
428
|
-
}, (e, t, n) => Number(e.getValue(n)) - Number(t.getValue(n))),
|
|
429
|
-
tokens: (e, t) => k(e, t, (e) => /* @__PURE__ */ y(A, { value: e }), { align: "end" }),
|
|
430
|
-
duration: (e, t) => k(e, t, (e) => o(e), { align: "end" }),
|
|
431
|
-
date: (e, t) => k(e, t, (e) => /* @__PURE__ */ y("time", {
|
|
432
|
-
dateTime: new Date(e).toISOString(),
|
|
433
|
-
children: a(e, { time: !0 })
|
|
434
|
-
}), {}, "datetime"),
|
|
435
|
-
relative: (e, t, n = {}) => k(e, t, (e) => /* @__PURE__ */ y(j, {
|
|
436
|
-
value: e,
|
|
437
|
-
now: n.now ?? Date.now()
|
|
438
|
-
}), {}, (e, t, n) => new Date(e.getValue(n)).getTime() - new Date(t.getValue(n)).getTime()),
|
|
439
|
-
status: (e, t) => k(e, t, (e) => /* @__PURE__ */ y(p, {
|
|
440
|
-
tone: e.tone,
|
|
441
|
-
children: e.label
|
|
442
|
-
}), { text: void 0 }),
|
|
443
|
-
avatar: (e, t) => k(e, t, (e) => /* @__PURE__ */ b("span", {
|
|
444
|
-
className: "inline-flex min-w-0 items-center gap-8",
|
|
445
|
-
children: [/* @__PURE__ */ y(m, {
|
|
446
|
-
name: e.name,
|
|
447
|
-
...e.src ? { src: e.src } : {},
|
|
448
|
-
size: 24,
|
|
449
|
-
decorative: !0
|
|
450
|
-
}), /* @__PURE__ */ y("span", {
|
|
451
|
-
className: "truncate",
|
|
452
|
-
children: e.name
|
|
453
|
-
})]
|
|
454
|
-
})),
|
|
455
|
-
custom: (e, t, n, r = {}) => k(e, t, n, r)
|
|
456
|
-
};
|
|
457
|
-
//#endregion
|
|
458
|
-
export { w as DATA_TABLE_GROW_MIN, O as DataTable, C as KAESO_DATA_TABLE_DEFAULT_VARIANTS, S as KAESO_DATA_TABLE_VARIANTS, M as col, T as fitColumns };
|
|
459
|
-
|
|
460
|
-
//# sourceMappingURL=data-table.js.map
|
|
2
|
+
export { n as DATA_TABLE_GROW_MIN, r as DataTable, i as KAESO_DATA_TABLE_DEFAULT_VARIANTS, a as KAESO_DATA_TABLE_VARIANTS, t as col, o as fitColumns } from "../chunks/data-table-CqY8_6IS.js";
|