@signalflare-ai/ui 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +154 -1
- package/ai/component-registry.json +208 -550
- package/ai/component-registry.md +3042 -3115
- package/ai/schemas.ts +504 -96
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts.map +1 -1
- package/dist/{ai-actions-BdUZI3Gk.js → ai-actions-CBfz5XEf.js} +4 -4
- package/dist/{ai-actions-BdUZI3Gk.js.map → ai-actions-CBfz5XEf.js.map} +1 -1
- package/dist/{ai-agent-card-BR2NIYhi.js → ai-agent-card-CByAUe0q.js} +3 -3
- package/dist/ai-agent-card-CByAUe0q.js.map +1 -0
- package/dist/{ai-approval-Ba7mrKba.js → ai-approval-Ci8N70a7.js} +4 -3
- package/dist/{ai-approval-Ba7mrKba.js.map → ai-approval-Ci8N70a7.js.map} +1 -1
- package/dist/{ai-code-block-CZtoL73R.js → ai-code-block-P9TJHvaC.js} +37 -39
- package/dist/ai-code-block-P9TJHvaC.js.map +1 -0
- package/dist/{ai-conversation-Cc7WlaBg.js → ai-conversation-Qslfdi1t.js} +28 -42
- package/dist/ai-conversation-Qslfdi1t.js.map +1 -0
- package/dist/{ai-info-banner-C7EWPBj7.js → ai-info-banner-B_9vtGK3.js} +3 -3
- package/dist/{ai-info-banner-C7EWPBj7.js.map → ai-info-banner-B_9vtGK3.js.map} +1 -1
- package/dist/{ai-message-Bp7L68U_.js → ai-message-Ci3gwM7G.js} +6 -6
- package/dist/{ai-message-Bp7L68U_.js.map → ai-message-Ci3gwM7G.js.map} +1 -1
- package/dist/{ai-mission-header-TiCJfTNt.js → ai-mission-header-CaBc19-t.js} +2 -2
- package/dist/{ai-mission-header-TiCJfTNt.js.map → ai-mission-header-CaBc19-t.js.map} +1 -1
- package/dist/{ai-part-group-DNb9I446.js → ai-part-group-Dx1Mr92B.js} +5 -4
- package/dist/ai-part-group-Dx1Mr92B.js.map +1 -0
- package/dist/{ai-prompt-input-BVvov_KF.js → ai-prompt-input-Bm4XoSj2.js} +19 -17
- package/dist/ai-prompt-input-Bm4XoSj2.js.map +1 -0
- package/dist/{ai-question-GPPMk7YM.js → ai-question-OyJovxGe.js} +4 -3
- package/dist/{ai-question-GPPMk7YM.js.map → ai-question-OyJovxGe.js.map} +1 -1
- package/dist/{ai-reasoning-_feFjk56.js → ai-reasoning-BLfBXx3F.js} +9 -5
- package/dist/ai-reasoning-BLfBXx3F.js.map +1 -0
- package/dist/{ai-response-CvjV3WhV.js → ai-response-hbVCZJmo.js} +2 -2
- package/dist/{ai-response-CvjV3WhV.js.map → ai-response-hbVCZJmo.js.map} +1 -1
- package/dist/{ai-shimmer-j6lKIrjj.js → ai-shimmer-BamNMNK3.js} +2 -2
- package/dist/{ai-shimmer-j6lKIrjj.js.map → ai-shimmer-BamNMNK3.js.map} +1 -1
- package/dist/{ai-status-badge-CSU_QOdz.js → ai-status-badge-BZLczdkI.js} +2 -2
- package/dist/{ai-status-badge-CSU_QOdz.js.map → ai-status-badge-BZLczdkI.js.map} +1 -1
- package/dist/{ai-streaming-text-IWW1BhvZ.js → ai-streaming-text-DgYu64UH.js} +1 -1
- package/dist/{ai-streaming-text-IWW1BhvZ.js.map → ai-streaming-text-DgYu64UH.js.map} +1 -1
- package/dist/{ai-subagent-JA4iIMW3.js → ai-subagent-p97AI1h9.js} +3 -3
- package/dist/{ai-subagent-JA4iIMW3.js.map → ai-subagent-p97AI1h9.js.map} +1 -1
- package/dist/{ai-suggestion-BdO6MBuH.js → ai-suggestion-Bj6vF7CT.js} +3 -3
- package/dist/{ai-suggestion-BdO6MBuH.js.map → ai-suggestion-Bj6vF7CT.js.map} +1 -1
- package/dist/{ai-task-list-DYw4R1FA.js → ai-task-list-C_UQYpk9.js} +6 -4
- package/dist/{ai-task-list-DYw4R1FA.js.map → ai-task-list-C_UQYpk9.js.map} +1 -1
- package/dist/{ai-timeline-C42tOUT8.js → ai-timeline-CePL1LOU.js} +3 -3
- package/dist/ai-timeline-CePL1LOU.js.map +1 -0
- package/dist/{ai-tool-03jOTwUI.js → ai-tool-CfRcwmHT.js} +17 -11
- package/dist/ai-tool-CfRcwmHT.js.map +1 -0
- package/dist/{ai-usage-bar-BRf5LC_b.js → ai-usage-bar-45pVRCGA.js} +2 -2
- package/dist/{ai-usage-bar-BRf5LC_b.js.map → ai-usage-bar-45pVRCGA.js.map} +1 -1
- package/dist/{badge-BheXjMc8.js → badge-Beb-6uut.js} +5 -5
- package/dist/{badge-BheXjMc8.js.map → badge-Beb-6uut.js.map} +1 -1
- package/dist/{banner-CcsjunJg.js → banner-CCEksxPg.js} +3 -3
- package/dist/{banner-CcsjunJg.js.map → banner-CCEksxPg.js.map} +1 -1
- package/dist/{breadcrumbs-CouSyy3H.js → breadcrumbs-HiTmgaZ4.js} +5 -5
- package/dist/{breadcrumbs-CouSyy3H.js.map → breadcrumbs-HiTmgaZ4.js.map} +1 -1
- package/dist/{button-CO6-qPax.js → button-BHOgXJRU.js} +4 -4
- package/dist/{button-CO6-qPax.js.map → button-BHOgXJRU.js.map} +1 -1
- package/dist/catalog.js +1 -1
- package/dist/catalog.js.map +1 -1
- package/dist/{chart-Dg0qUeSc.js → chart-B9FfZdKs.js} +7 -7
- package/dist/chart-B9FfZdKs.js.map +1 -0
- package/dist/{checkbox-D7p4QKsC.js → checkbox-Cy_OCyay.js} +3 -3
- package/dist/{checkbox-D7p4QKsC.js.map → checkbox-Cy_OCyay.js.map} +1 -1
- package/dist/{clipboard-text-kLaMogs3.js → clipboard-text-CKSvNp9L.js} +6 -5
- package/dist/clipboard-text-CKSvNp9L.js.map +1 -0
- package/dist/{cn-YROP2_ox.js → cn-CmAOpn49.js} +2 -2
- package/dist/{cn-YROP2_ox.js.map → cn-CmAOpn49.js.map} +1 -1
- package/dist/{code-BN8InC0G.js → code-JsQz-0G_.js} +4 -4
- package/dist/{code-BN8InC0G.js.map → code-JsQz-0G_.js.map} +1 -1
- package/dist/{collapsible-D_ueZ0jz.js → collapsible-1kOZ-89L.js} +2 -2
- package/dist/{collapsible-D_ueZ0jz.js.map → collapsible-1kOZ-89L.js.map} +1 -1
- package/dist/{combobox-B7TOK0U2.js → combobox-CQwDmqgA.js} +4 -4
- package/dist/{combobox-B7TOK0U2.js.map → combobox-CQwDmqgA.js.map} +1 -1
- package/dist/command-line/cli.js +3 -3
- package/dist/{command-palette-CuNUyJca.js → command-palette-Bkuv3e6o.js} +20 -5
- package/dist/command-palette-Bkuv3e6o.js.map +1 -0
- package/dist/components/ai-actions.js +1 -1
- package/dist/components/ai-agent-card.js +1 -1
- package/dist/components/ai-approval.js +1 -1
- package/dist/components/ai-code-block.js +1 -1
- package/dist/components/ai-conversation.js +1 -1
- package/dist/components/ai-info-banner.js +1 -1
- package/dist/components/ai-message.js +1 -1
- package/dist/components/ai-mission-header.js +1 -1
- package/dist/components/ai-part-group.js +1 -1
- package/dist/components/ai-prompt-input.js +1 -1
- package/dist/components/ai-question.js +1 -1
- package/dist/components/ai-reasoning.js +1 -1
- package/dist/components/ai-response.js +1 -1
- package/dist/components/ai-shimmer.js +1 -1
- package/dist/components/ai-status-badge.js +1 -1
- package/dist/components/ai-streaming-text.js +1 -1
- package/dist/components/ai-subagent.js +1 -1
- package/dist/components/ai-suggestion.js +1 -1
- package/dist/components/ai-task-list.js +1 -1
- package/dist/components/ai-timeline.js +1 -1
- package/dist/components/ai-tool.js +1 -1
- package/dist/components/ai-usage-bar.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/banner.js +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/chart.js +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/clipboard-text.js +1 -1
- package/dist/components/code.js +1 -1
- package/dist/components/collapsible.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command-palette.js +1 -1
- package/dist/components/data-grid.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/filters.js +1 -1
- package/dist/components/flow.js +1 -1
- package/dist/components/grid.js +1 -1
- package/dist/components/input.js +2 -2
- package/dist/components/label.js +1 -1
- package/dist/components/layer-card.js +1 -1
- package/dist/components/link.js +3 -3
- package/dist/components/link.js.map +1 -1
- package/dist/components/loader.js +2 -2
- package/dist/components/menubar.js +1 -1
- package/dist/components/meter.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sensitive-input.js +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/signalflare-ai-logo.js +1 -1
- package/dist/components/sparkline.js +1 -1
- package/dist/components/stat-card.js +1 -1
- package/dist/components/surface.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/text-roll.js +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/theme-toggle.js +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/use-agent-harness.js +1 -1
- package/dist/data-grid-DrguJq_H.js +395 -0
- package/dist/data-grid-DrguJq_H.js.map +1 -0
- package/dist/{date-picker--ox89RBy.js → date-picker-O34AqG3f.js} +2 -2
- package/dist/{date-picker--ox89RBy.js.map → date-picker-O34AqG3f.js.map} +1 -1
- package/dist/{date-range-picker-DVa7QBqE.js → date-range-picker-YKYvum_r.js} +29 -39
- package/dist/{date-range-picker-DVa7QBqE.js.map → date-range-picker-YKYvum_r.js.map} +1 -1
- package/dist/{dialog-Bv1oSFOd.js → dialog-DYqu4aDO.js} +3 -3
- package/dist/{dialog-Bv1oSFOd.js.map → dialog-DYqu4aDO.js.map} +1 -1
- package/dist/{dist-B6iWiWwp.js → dist-6AtBsaJE.js} +153 -47
- package/dist/dist-6AtBsaJE.js.map +1 -0
- package/dist/{dropdown-B_nrGXjV.js → dropdown-XzbnRLYR.js} +15 -5
- package/dist/dropdown-XzbnRLYR.js.map +1 -0
- package/dist/{echart-CdOUaT-r.js → echart-DGBIVAv1.js} +23 -57
- package/dist/{echart-CdOUaT-r.js.map → echart-DGBIVAv1.js.map} +1 -1
- package/dist/{empty-DZnN0zKX.js → empty-C1tAkawe.js} +6 -6
- package/dist/{empty-DZnN0zKX.js.map → empty-C1tAkawe.js.map} +1 -1
- package/dist/{field-B_yVof52.js → field-DBpFzzBS.js} +3 -3
- package/dist/{field-B_yVof52.js.map → field-DBpFzzBS.js.map} +1 -1
- package/dist/{filters-cpJCY21R.js → filters-SmEl93za.js} +10 -10
- package/dist/filters-SmEl93za.js.map +1 -0
- package/dist/{flow-B4v198ot.js → flow-BLzgbq1T.js} +6 -6
- package/dist/flow-BLzgbq1T.js.map +1 -0
- package/dist/genui.js +2 -2
- package/dist/genui.js.map +1 -1
- package/dist/{grid-CEd64Lnh.js → grid-CifjQL-5.js} +2 -2
- package/dist/{grid-CEd64Lnh.js.map → grid-CifjQL-5.js.map} +1 -1
- package/dist/{highlight-to-react-D0Yav4jk.js → highlight-to-react-DN9dUCS2.js} +9 -15
- package/dist/highlight-to-react-DN9dUCS2.js.map +1 -0
- package/dist/index.js +71 -71
- package/dist/index.js.map +1 -1
- package/dist/{input-ClB_E4Lb.js → input-COmx2M_R.js} +5 -5
- package/dist/{input-ClB_E4Lb.js.map → input-COmx2M_R.js.map} +1 -1
- package/dist/{input-B2bbijRh.js → input-GkfMQZC_.js} +3 -3
- package/dist/{input-B2bbijRh.js.map → input-GkfMQZC_.js.map} +1 -1
- package/dist/{label-DUv_urO1.js → label-CiGZ464N.js} +3 -3
- package/dist/{label-DUv_urO1.js.map → label-CiGZ464N.js.map} +1 -1
- package/dist/{layer-card-BK7eYfwn.js → layer-card-8l8GuLQr.js} +2 -2
- package/dist/{layer-card-BK7eYfwn.js.map → layer-card-8l8GuLQr.js.map} +1 -1
- package/dist/{layout-DJHMMap2.js → layout-CWBE0qwx.js} +258 -154
- package/dist/layout-CWBE0qwx.js.map +1 -0
- package/dist/{link-provider-BUZKXaNE.js → link-provider-BSn8YJon.js} +2 -2
- package/dist/link-provider-BSn8YJon.js.map +1 -0
- package/dist/{loader-DAcc-Uag.js → loader-BEMz8pJO.js} +1 -1
- package/dist/{loader-DAcc-Uag.js.map → loader-BEMz8pJO.js.map} +1 -1
- package/dist/{measured-text-BI3dTJmH.js → measured-text-CXkdw9Yr.js} +45 -30
- package/dist/measured-text-CXkdw9Yr.js.map +1 -0
- package/dist/{menubar-Cxf3xeAt.js → menubar-CoOr4ocj.js} +3 -3
- package/dist/{menubar-Cxf3xeAt.js.map → menubar-CoOr4ocj.js.map} +1 -1
- package/dist/{meter-BFFe9l5b.js → meter-Pf_VOl59.js} +2 -2
- package/dist/{meter-BFFe9l5b.js.map → meter-Pf_VOl59.js.map} +1 -1
- package/dist/{pagination-yS372Tr4.js → pagination-DSY279Ta.js} +2 -2
- package/dist/{pagination-yS372Tr4.js.map → pagination-DSY279Ta.js.map} +1 -1
- package/dist/{popover-SRoJaCZr.js → popover-BY-e9co1.js} +2 -2
- package/dist/{popover-SRoJaCZr.js.map → popover-BY-e9co1.js.map} +1 -1
- package/dist/{radio-BcwhwYNB.js → radio-DZwL13j0.js} +2 -2
- package/dist/{radio-BcwhwYNB.js.map → radio-DZwL13j0.js.map} +1 -1
- package/dist/{select-DMhdoHMa.js → select-BFifYqHA.js} +6 -6
- package/dist/{select-DMhdoHMa.js.map → select-BFifYqHA.js.map} +1 -1
- package/dist/{sensitive-input-CJUpIRal.js → sensitive-input-DHLZcM73.js} +4 -4
- package/dist/{sensitive-input-CJUpIRal.js.map → sensitive-input-DHLZcM73.js.map} +1 -1
- package/dist/{sidebar-D4zrlYpn.js → sidebar-odGsdvG4.js} +6 -7
- package/dist/sidebar-odGsdvG4.js.map +1 -0
- package/dist/{signalflare-ai-logo-Bipogceq.js → signalflare-ai-logo-CNaDT_w8.js} +2 -2
- package/dist/{signalflare-ai-logo-Bipogceq.js.map → signalflare-ai-logo-CNaDT_w8.js.map} +1 -1
- package/dist/{skeleton-line-CH1-h6e2.js → skeleton-line-CxxYVTO2.js} +2 -2
- package/dist/{skeleton-line-CH1-h6e2.js.map → skeleton-line-CxxYVTO2.js.map} +1 -1
- package/dist/{sparkline-DHmgj1d0.js → sparkline-BQ-4j2W2.js} +2 -2
- package/dist/{sparkline-DHmgj1d0.js.map → sparkline-BQ-4j2W2.js.map} +1 -1
- package/dist/src/blocks/agent-harness/agent-harness.tsx +11 -11
- package/dist/src/blocks/commander/commander.tsx +15 -15
- package/dist/src/blocks/map-block/map-block.d.ts.map +1 -1
- package/dist/src/blocks/map-block/map-block.tsx +11 -7
- package/dist/src/components/ai-approval/ai-approval.d.ts.map +1 -1
- package/dist/src/components/ai-code-block/ai-code-block.d.ts +14 -13
- package/dist/src/components/ai-code-block/ai-code-block.d.ts.map +1 -1
- package/dist/src/components/ai-conversation/ai-conversation.d.ts.map +1 -1
- package/dist/src/components/ai-part-group/ai-part-group.d.ts.map +1 -1
- package/dist/src/components/ai-prompt-input/ai-prompt-input.d.ts.map +1 -1
- package/dist/src/components/ai-prompt-input/controller.d.ts.map +1 -1
- package/dist/src/components/ai-prompt-input/types.d.ts.map +1 -1
- package/dist/src/components/ai-question/ai-question.d.ts.map +1 -1
- package/dist/src/components/ai-reasoning/ai-reasoning.d.ts.map +1 -1
- package/dist/src/components/ai-response/ai-response.d.ts.map +1 -1
- package/dist/src/components/ai-subagent/ai-subagent.d.ts.map +1 -1
- package/dist/src/components/ai-tool/ai-tool.d.ts.map +1 -1
- package/dist/src/components/chart/echart.d.ts.map +1 -1
- package/dist/src/components/clipboard-text/clipboard-text.d.ts.map +1 -1
- package/dist/src/components/data-grid/data-grid.d.ts +2 -1
- package/dist/src/components/data-grid/data-grid.d.ts.map +1 -1
- package/dist/src/components/data-grid/features.d.ts +20 -0
- package/dist/src/components/data-grid/features.d.ts.map +1 -0
- package/dist/src/components/data-grid/types.d.ts +38 -7
- package/dist/src/components/data-grid/types.d.ts.map +1 -1
- package/dist/src/components/filters/filters.d.ts.map +1 -1
- package/dist/src/components/flow/use-children.d.ts +1 -1
- package/dist/src/components/link/link.d.ts.map +1 -1
- package/dist/src/components/sidebar/sidebar.d.ts +1 -1
- package/dist/src/components/signalflare-ai-logo/signalflare-ai-logo.d.ts.map +1 -1
- package/dist/src/components/text/text.d.ts +2 -1
- package/dist/src/components/text/text.d.ts.map +1 -1
- package/dist/src/components/text-roll/text-roll.d.ts.map +1 -1
- package/dist/src/components/theme-toggle/theme-toggle.d.ts.map +1 -1
- package/dist/src/components/toast/toast.d.ts.map +1 -1
- package/dist/src/utils/highlight-to-react.d.ts.map +1 -1
- package/dist/src/utils/measured-text.d.ts.map +1 -1
- package/dist/src/utils/use-measured-text.d.ts.map +1 -1
- package/dist/{stat-card-Ew-ofzEm.js → stat-card-Bspk4XFr.js} +4 -4
- package/dist/stat-card-Bspk4XFr.js.map +1 -0
- package/dist/styles/sf-standalone.css +1 -1
- package/dist/styles/theme-fedramp.css +3 -12
- package/dist/styles/theme-minimal.css +26 -104
- package/dist/styles/theme-sf.css +37 -142
- package/dist/{surface-DGwRlC0o.js → surface-CWdSFVUx.js} +3 -3
- package/dist/{surface-DGwRlC0o.js.map → surface-CWdSFVUx.js.map} +1 -1
- package/dist/{switch-BxAMfHdt.js → switch-TA4cByCJ.js} +5 -5
- package/dist/switch-TA4cByCJ.js.map +1 -0
- package/dist/{table-BBeAtYVZ.js → table-BM8JBGBs.js} +3 -3
- package/dist/{table-BBeAtYVZ.js.map → table-BM8JBGBs.js.map} +1 -1
- package/dist/{tabs-CeHu7Scn.js → tabs-bnH2vGLv.js} +2 -2
- package/dist/{tabs-CeHu7Scn.js.map → tabs-bnH2vGLv.js.map} +1 -1
- package/dist/{text-Cqryz7rk.js → text-iQ0YUFNg.js} +4 -5
- package/dist/{text-Cqryz7rk.js.map → text-iQ0YUFNg.js.map} +1 -1
- package/dist/{text-roll-Ch52hcQj.js → text-roll-C3U2jd2u.js} +5 -2
- package/dist/text-roll-C3U2jd2u.js.map +1 -0
- package/dist/{theme-toggle-LDfIKEqx.js → theme-toggle-BTVxD-fD.js} +10 -9
- package/dist/theme-toggle-BTVxD-fD.js.map +1 -0
- package/dist/{toast-CaFQNYng.js → toast-CgZVaAkw.js} +3 -3
- package/dist/{toast-CaFQNYng.js.map → toast-CgZVaAkw.js.map} +1 -1
- package/dist/{tooltip-g9lFsvcT.js → tooltip-uobk6Oh-.js} +3 -3
- package/dist/{tooltip-g9lFsvcT.js.map → tooltip-uobk6Oh-.js.map} +1 -1
- package/dist/{use-agent-harness-BTcNJdw4.js → use-agent-harness-Dl8w6X5O.js} +3 -3
- package/dist/{use-agent-harness-BTcNJdw4.js.map → use-agent-harness-Dl8w6X5O.js.map} +1 -1
- package/dist/utils.js +3 -3
- package/package.json +27 -25
- package/scripts/component-registry/discovery.ts +11 -10
- package/scripts/component-registry/example-cleanup.ts +8 -8
- package/scripts/component-registry/index.ts +6 -6
- package/scripts/component-registry/schema-generator.ts +1 -1
- package/scripts/component-registry/sub-components.ts +35 -23
- package/scripts/component-registry/utils.ts +11 -11
- package/scripts/component-registry/variant-parser.ts +17 -15
- package/scripts/convert-demos-to-stories.ts +5 -5
- package/scripts/theme-generator/config.ts +1 -5
- package/scripts/theme-generator/generate-css.ts +1 -1
- package/scripts/theme-generator/migrate.ts +3 -3
- package/dist/ai-agent-card-BR2NIYhi.js.map +0 -1
- package/dist/ai-code-block-CZtoL73R.js.map +0 -1
- package/dist/ai-conversation-Cc7WlaBg.js.map +0 -1
- package/dist/ai-part-group-DNb9I446.js.map +0 -1
- package/dist/ai-prompt-input-BVvov_KF.js.map +0 -1
- package/dist/ai-reasoning-_feFjk56.js.map +0 -1
- package/dist/ai-timeline-C42tOUT8.js.map +0 -1
- package/dist/ai-tool-03jOTwUI.js.map +0 -1
- package/dist/chart-Dg0qUeSc.js.map +0 -1
- package/dist/clipboard-text-kLaMogs3.js.map +0 -1
- package/dist/command-palette-CuNUyJca.js.map +0 -1
- package/dist/data-grid-DGHmU0w3.js +0 -305
- package/dist/data-grid-DGHmU0w3.js.map +0 -1
- package/dist/dist-B6iWiWwp.js.map +0 -1
- package/dist/dropdown-B_nrGXjV.js.map +0 -1
- package/dist/filters-cpJCY21R.js.map +0 -1
- package/dist/flow-B4v198ot.js.map +0 -1
- package/dist/highlight-to-react-D0Yav4jk.js.map +0 -1
- package/dist/layout-DJHMMap2.js.map +0 -1
- package/dist/link-provider-BUZKXaNE.js.map +0 -1
- package/dist/measured-text-BI3dTJmH.js.map +0 -1
- package/dist/sidebar-D4zrlYpn.js.map +0 -1
- package/dist/stat-card-Ew-ofzEm.js.map +0 -1
- package/dist/switch-BxAMfHdt.js.map +0 -1
- package/dist/text-roll-Ch52hcQj.js.map +0 -1
- package/dist/theme-toggle-LDfIKEqx.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","names":[],"sources":["../../src/components/link/link.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { forwardRef, type SVGProps } from \"react\";\n\nimport { cn } from \"../../utils/cn\";\nimport {\n useLinkComponent,\n type LinkComponentProps,\n} from \"../../utils/link-provider\";\n\n/**\n * ExternalIcon - Visual indicator for links that open in a new tab/window.\n *\n * Use this as a child of Link to indicate external navigation:\n * ```tsx\n * <Link href=\"https://example.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n * Visit Example <Link.ExternalIcon />\n * </Link>\n * ```\n */\nconst ExternalIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n className=\"link-external-icon\"\n {...props}\n >\n <path d=\"M9 4H8.8C7.11984 4 6.27976 4 5.63803 4.32698C5.07354 4.6146 4.6146 5.07354 4.32698 5.63803C4 6.27976 4 7.11984 4 8.8V15.2C4 16.8802 4 17.7202 4.32698 18.362C4.6146 18.9265 5.07354 19.3854 5.63803 19.673C6.27976 20 7.11984 20 8.8 20H15.2C16.8802 20 17.7202 20 18.362 19.673C18.9265 19.3854 19.3854 18.9265 19.673 18.362C20 17.7202 20 16.8802 20 15.2V15\" />\n <path d=\"M14 4H20M20 4V10M20 4L11 13\" />\n </svg>\n);\n\nExternalIcon.displayName = \"Link.ExternalIcon\";\n\n/** Link variant definitions mapping variant names to their Tailwind classes. */\nexport const SF_LINK_VARIANTS = {\n variant: {\n inline: {\n classes:\n \"text-primary underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors\",\n description: \"Inline text link that flows with content\",\n },\n current: {\n classes:\n \"text-current underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors\",\n description: \"Link that inherits color from parent text\",\n },\n plain: {\n classes: \"text-primary hover:text-primary/70 transition-colors\",\n description: \"Link without underline decoration\",\n },\n },\n} as const;\n\nexport const SF_LINK_DEFAULT_VARIANTS = {\n variant: \"inline\",\n} as const;\n\nexport type SFLinkVariant = keyof typeof SF_LINK_VARIANTS.variant;\n\nexport interface SFLinkVariantsProps {\n /**\n * Visual style of the link.\n * - `\"inline\"` — Inline text link that flows with content\n * - `\"current\"` — Link that inherits color from parent text\n * - `\"plain\"` — Link without underline decoration\n * @default \"inline\"\n */\n variant?: SFLinkVariant;\n}\n\nexport function linkVariants({\n variant = SF_LINK_DEFAULT_VARIANTS.variant,\n}: SFLinkVariantsProps = {}) {\n return cn(SF_LINK_VARIANTS.variant[variant].classes);\n}\n\n/**\n * Link component props.\n *\n * @example\n * ```tsx\n * <Link href=\"/docs\">Learn more</Link>\n * <Link href=\"https://signalflare.ai\" target=\"_blank\" rel=\"noopener noreferrer\">\n * Visit SignalFlare <Link.ExternalIcon />\n * </Link>\n * <Link render={<RouterLink to=\"/dashboard\" />}>Dashboard</Link>\n * ```\n */\nexport type LinkProps = useRender.ComponentProps<\"a\"> &\n LinkComponentProps &\n SFLinkVariantsProps;\n\n/**\n * Link component for consistent inline text links.\n *\n * Supports composition via `render` prop for framework-specific routing:\n * - Without render: renders via LinkProvider (default anchor or configured component)\n * - With render: merges props onto the provided element with proper ref/event handling\n *\n * @example Basic usage\n * ```tsx\n * <Link href=\"/docs\">Learn more</Link>\n * ```\n *\n * @example External link with icon\n * ```tsx\n * <Link href=\"https://signalflare.ai\" target=\"_blank\" rel=\"noopener noreferrer\">\n * Visit SignalFlare <Link.ExternalIcon />\n * </Link>\n * ```\n *\n * @example Composition with React Router\n * ```tsx\n * <Link render={<RouterLink to=\"/dashboard\" />} variant=\"inline\">\n * Dashboard\n * </Link>\n * ```\n */\nconst LinkBase = forwardRef<HTMLAnchorElement, LinkProps>(
|
|
1
|
+
{"version":3,"file":"link.js","names":[],"sources":["../../src/components/link/link.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { forwardRef, type SVGProps } from \"react\";\n\nimport { cn } from \"../../utils/cn\";\nimport {\n useLinkComponent,\n type LinkComponentProps,\n} from \"../../utils/link-provider\";\n\n/**\n * ExternalIcon - Visual indicator for links that open in a new tab/window.\n *\n * Use this as a child of Link to indicate external navigation:\n * ```tsx\n * <Link href=\"https://example.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n * Visit Example <Link.ExternalIcon />\n * </Link>\n * ```\n */\nconst ExternalIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n className=\"link-external-icon\"\n {...props}\n >\n <path d=\"M9 4H8.8C7.11984 4 6.27976 4 5.63803 4.32698C5.07354 4.6146 4.6146 5.07354 4.32698 5.63803C4 6.27976 4 7.11984 4 8.8V15.2C4 16.8802 4 17.7202 4.32698 18.362C4.6146 18.9265 5.07354 19.3854 5.63803 19.673C6.27976 20 7.11984 20 8.8 20H15.2C16.8802 20 17.7202 20 18.362 19.673C18.9265 19.3854 19.3854 18.9265 19.673 18.362C20 17.7202 20 16.8802 20 15.2V15\" />\n <path d=\"M14 4H20M20 4V10M20 4L11 13\" />\n </svg>\n);\n\nExternalIcon.displayName = \"Link.ExternalIcon\";\n\n/** Link variant definitions mapping variant names to their Tailwind classes. */\nexport const SF_LINK_VARIANTS = {\n variant: {\n inline: {\n classes:\n \"text-primary underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors\",\n description: \"Inline text link that flows with content\",\n },\n current: {\n classes:\n \"text-current underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors\",\n description: \"Link that inherits color from parent text\",\n },\n plain: {\n classes: \"text-primary hover:text-primary/70 transition-colors\",\n description: \"Link without underline decoration\",\n },\n },\n} as const;\n\nexport const SF_LINK_DEFAULT_VARIANTS = {\n variant: \"inline\",\n} as const;\n\nexport type SFLinkVariant = keyof typeof SF_LINK_VARIANTS.variant;\n\nexport interface SFLinkVariantsProps {\n /**\n * Visual style of the link.\n * - `\"inline\"` — Inline text link that flows with content\n * - `\"current\"` — Link that inherits color from parent text\n * - `\"plain\"` — Link without underline decoration\n * @default \"inline\"\n */\n variant?: SFLinkVariant;\n}\n\nexport function linkVariants({\n variant = SF_LINK_DEFAULT_VARIANTS.variant,\n}: SFLinkVariantsProps = {}) {\n return cn(SF_LINK_VARIANTS.variant[variant].classes);\n}\n\n/**\n * Link component props.\n *\n * @example\n * ```tsx\n * <Link href=\"/docs\">Learn more</Link>\n * <Link href=\"https://signalflare.ai\" target=\"_blank\" rel=\"noopener noreferrer\">\n * Visit SignalFlare <Link.ExternalIcon />\n * </Link>\n * <Link render={<RouterLink to=\"/dashboard\" />}>Dashboard</Link>\n * ```\n */\nexport type LinkProps = useRender.ComponentProps<\"a\"> &\n LinkComponentProps &\n SFLinkVariantsProps;\n\n/**\n * Link component for consistent inline text links.\n *\n * Supports composition via `render` prop for framework-specific routing:\n * - Without render: renders via LinkProvider (default anchor or configured component)\n * - With render: merges props onto the provided element with proper ref/event handling\n *\n * @example Basic usage\n * ```tsx\n * <Link href=\"/docs\">Learn more</Link>\n * ```\n *\n * @example External link with icon\n * ```tsx\n * <Link href=\"https://signalflare.ai\" target=\"_blank\" rel=\"noopener noreferrer\">\n * Visit SignalFlare <Link.ExternalIcon />\n * </Link>\n * ```\n *\n * @example Composition with React Router\n * ```tsx\n * <Link render={<RouterLink to=\"/dashboard\" />} variant=\"inline\">\n * Dashboard\n * </Link>\n * ```\n */\nconst LinkBase = forwardRef<HTMLAnchorElement, LinkProps>(\n ({ className, variant = \"inline\", render, ...props }, ref) => {\n const LinkComponent = useLinkComponent();\n\n const defaultProps: useRender.ElementProps<\"a\"> = {\n className: cn(\n linkVariants({ variant }),\n \"group/link inline-flex items-center gap-[0.1875em]\"\n ),\n };\n\n const element = useRender({\n render: render ?? <LinkComponent />,\n ref,\n props: mergeProps<\"a\">(defaultProps, props, { className }),\n });\n\n return element;\n }\n);\n\nLinkBase.displayName = \"Link\";\n\n// Compound component with ExternalIcon subcomponent\nexport const Link = Object.assign(LinkBase, {\n ExternalIcon,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAoBA,IAAM,gBAAgB,UACpB,qBAAC,OAAD;CACE,OAAM;CACN,QAAO;CACP,SAAQ;CACR,MAAK;CACL,QAAO;CACP,eAAc;CACd,gBAAe;CACf,eAAY;CACZ,WAAU;CACV,GAAI;WAVN,CAYE,oBAAC,QAAD,EAAM,GAAE,kWAAmW,CAAA,GAC3W,oBAAC,QAAD,EAAM,GAAE,8BAA+B,CAAA,CACpC;;AAGP,aAAa,cAAc;;AAG3B,IAAa,mBAAmB,EAC9B,SAAS;CACP,QAAQ;EACN,SACE;EACF,aAAa;CACf;CACA,SAAS;EACP,SACE;EACF,aAAa;CACf;CACA,OAAO;EACL,SAAS;EACT,aAAa;CACf;AACF,EACF;AAEA,IAAa,2BAA2B,EACtC,SAAS,SACX;AAeA,SAAgB,aAAa,EAC3B,UAAU,yBAAyB,YACZ,CAAC,GAAG;CAC3B,OAAO,GAAG,iBAAiB,QAAQ,SAAS,OAAO;AACrD;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAM,WAAW,YACd,EAAE,WAAW,UAAU,UAAU,QAAQ,GAAG,SAAS,QAAQ;CAC5D,MAAM,gBAAgB,iBAAiB;CAEvC,MAAM,eAA4C,EAChD,WAAW,GACT,aAAa,EAAE,QAAQ,CAAC,GACxB,oDACF,EACF;CAQA,OANgB,UAAU;EACxB,QAAQ,UAAU,oBAAC,eAAD,CAAgB,CAAA;EAClC;EACA,OAAO,WAAgB,cAAc,OAAO,EAAE,UAAU,CAAC;CAC3D,CAEO;AACT,CACF;AAEA,SAAS,cAAc;AAGvB,IAAa,OAAO,OAAO,OAAO,UAAU,EAC1C,aACF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as Loader } from "../loader-
|
|
3
|
-
import { t as SkeletonLine } from "../skeleton-line-
|
|
2
|
+
import { t as Loader } from "../loader-BEMz8pJO.js";
|
|
3
|
+
import { t as SkeletonLine } from "../skeleton-line-CxxYVTO2.js";
|
|
4
4
|
export { Loader, SkeletonLine };
|
package/dist/components/meter.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as PopoverRoot, c as SF_POPOVER_DEFAULT_VARIANTS, i as PopoverDescription, l as SF_POPOVER_VARIANTS, n as PopoverClose, o as PopoverTitle, r as PopoverContent, s as PopoverTrigger, t as Popover } from "../popover-
|
|
2
|
+
import { a as PopoverRoot, c as SF_POPOVER_DEFAULT_VARIANTS, i as PopoverDescription, l as SF_POPOVER_VARIANTS, n as PopoverClose, o as PopoverTitle, r as PopoverContent, s as PopoverTrigger, t as Popover } from "../popover-BY-e9co1.js";
|
|
3
3
|
export { Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverRoot, PopoverTitle, PopoverTrigger, SF_POPOVER_DEFAULT_VARIANTS, SF_POPOVER_VARIANTS };
|
package/dist/components/radio.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as radioVariants, i as SF_RADIO_VARIANTS, n as RadioGroup, r as SF_RADIO_DEFAULT_VARIANTS, t as Radio } from "../radio-
|
|
2
|
+
import { a as radioVariants, i as SF_RADIO_VARIANTS, n as RadioGroup, r as SF_RADIO_DEFAULT_VARIANTS, t as Radio } from "../radio-DZwL13j0.js";
|
|
3
3
|
export { Radio, RadioGroup, SF_RADIO_DEFAULT_VARIANTS, SF_RADIO_VARIANTS, radioVariants };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as SF_SENSITIVE_INPUT_VARIANTS, r as SensitiveInput, t as SF_SENSITIVE_INPUT_DEFAULT_VARIANTS } from "../sensitive-input-
|
|
2
|
+
import { n as SF_SENSITIVE_INPUT_VARIANTS, r as SensitiveInput, t as SF_SENSITIVE_INPUT_DEFAULT_VARIANTS } from "../sensitive-input-DHLZcM73.js";
|
|
3
3
|
export { SF_SENSITIVE_INPUT_DEFAULT_VARIANTS, SF_SENSITIVE_INPUT_VARIANTS, SensitiveInput };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { A as useSidebar, C as SidebarMenuSubItem, D as SidebarRoot, E as SidebarResizeHandle, O as SidebarSeparator, S as SidebarMenuSubButton, T as SidebarRail, _ as SidebarMenuBadge, a as SidebarCollapsible, b as SidebarMenuItem, c as SidebarContent, d as SidebarGroupContent, f as SidebarGroupLabel, g as SidebarMenuAction, h as SidebarMenu, i as Sidebar, k as SidebarTrigger, l as SidebarFooter, m as SidebarInput, n as SF_SIDEBAR_STYLING, o as SidebarCollapsibleContent, p as SidebarHeader, r as SF_SIDEBAR_VARIANTS, s as SidebarCollapsibleTrigger, t as SF_SIDEBAR_DEFAULT_VARIANTS, u as SidebarGroup, v as SidebarMenuButton, w as SidebarProvider, x as SidebarMenuSub, y as SidebarMenuChevron } from "../sidebar-
|
|
2
|
+
import { A as useSidebar, C as SidebarMenuSubItem, D as SidebarRoot, E as SidebarResizeHandle, O as SidebarSeparator, S as SidebarMenuSubButton, T as SidebarRail, _ as SidebarMenuBadge, a as SidebarCollapsible, b as SidebarMenuItem, c as SidebarContent, d as SidebarGroupContent, f as SidebarGroupLabel, g as SidebarMenuAction, h as SidebarMenu, i as Sidebar, k as SidebarTrigger, l as SidebarFooter, m as SidebarInput, n as SF_SIDEBAR_STYLING, o as SidebarCollapsibleContent, p as SidebarHeader, r as SF_SIDEBAR_VARIANTS, s as SidebarCollapsibleTrigger, t as SF_SIDEBAR_DEFAULT_VARIANTS, u as SidebarGroup, v as SidebarMenuButton, w as SidebarProvider, x as SidebarMenuSub, y as SidebarMenuChevron } from "../sidebar-odGsdvG4.js";
|
|
3
3
|
export { SF_SIDEBAR_DEFAULT_VARIANTS, SF_SIDEBAR_STYLING, SF_SIDEBAR_VARIANTS, Sidebar, SidebarCollapsible, SidebarCollapsibleContent, SidebarCollapsibleTrigger, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuChevron, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarResizeHandle, SidebarRoot, SidebarSeparator, SidebarTrigger, useSidebar };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as SignalFlareAILogo, i as SF_SIGNALFLARE_AI_LOGO_VARIANTS, n as PoweredBySignalFlareAI, o as SignalflareAiLogo, r as SF_SIGNALFLARE_AI_LOGO_DEFAULT_VARIANTS, s as generateSignalFlareAILogoSvg, t as PoweredByNavigator } from "../signalflare-ai-logo-
|
|
2
|
+
import { a as SignalFlareAILogo, i as SF_SIGNALFLARE_AI_LOGO_VARIANTS, n as PoweredBySignalFlareAI, o as SignalflareAiLogo, r as SF_SIGNALFLARE_AI_LOGO_DEFAULT_VARIANTS, s as generateSignalFlareAILogoSvg, t as PoweredByNavigator } from "../signalflare-ai-logo-CNaDT_w8.js";
|
|
3
3
|
export { PoweredByNavigator, PoweredBySignalFlareAI, SF_SIGNALFLARE_AI_LOGO_DEFAULT_VARIANTS, SF_SIGNALFLARE_AI_LOGO_VARIANTS, SignalFlareAILogo, SignalflareAiLogo, generateSignalFlareAILogoSvg };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as SF_SPARKLINE_VARIANTS, r as Sparkline, t as SF_SPARKLINE_DEFAULT_VARIANTS } from "../sparkline-
|
|
2
|
+
import { n as SF_SPARKLINE_VARIANTS, r as Sparkline, t as SF_SPARKLINE_DEFAULT_VARIANTS } from "../sparkline-BQ-4j2W2.js";
|
|
3
3
|
export { SF_SPARKLINE_DEFAULT_VARIANTS, SF_SPARKLINE_VARIANTS, Sparkline };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as SF_STAT_CARD_VARIANTS, r as StatCard, t as SF_STAT_CARD_DEFAULT_VARIANTS } from "../stat-card-
|
|
2
|
+
import { n as SF_STAT_CARD_VARIANTS, r as StatCard, t as SF_STAT_CARD_DEFAULT_VARIANTS } from "../stat-card-Bspk4XFr.js";
|
|
3
3
|
export { SF_STAT_CARD_DEFAULT_VARIANTS, SF_STAT_CARD_VARIANTS, StatCard };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as SF_SWITCH_VARIANTS, r as Switch, t as SF_SWITCH_DEFAULT_VARIANTS } from "../switch-
|
|
2
|
+
import { n as SF_SWITCH_VARIANTS, r as Switch, t as SF_SWITCH_DEFAULT_VARIANTS } from "../switch-TA4cByCJ.js";
|
|
3
3
|
export { SF_SWITCH_DEFAULT_VARIANTS, SF_SWITCH_VARIANTS, Switch };
|
package/dist/components/table.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as SF_TABLE_VARIANTS, r as Table, t as SF_TABLE_DEFAULT_VARIANTS } from "../table-
|
|
2
|
+
import { n as SF_TABLE_VARIANTS, r as Table, t as SF_TABLE_DEFAULT_VARIANTS } from "../table-BM8JBGBs.js";
|
|
3
3
|
export { SF_TABLE_DEFAULT_VARIANTS, SF_TABLE_VARIANTS, Table };
|
package/dist/components/tabs.js
CHANGED
package/dist/components/text.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { i as getStoredThemeMode, n as SF_THEME_TOGGLE_VARIANTS, r as ThemeToggle, t as SF_THEME_TOGGLE_DEFAULT_VARIANTS } from "../theme-toggle-
|
|
2
|
+
import { i as getStoredThemeMode, n as SF_THEME_TOGGLE_VARIANTS, r as ThemeToggle, t as SF_THEME_TOGGLE_DEFAULT_VARIANTS } from "../theme-toggle-BTVxD-fD.js";
|
|
3
3
|
export { SF_THEME_TOGGLE_DEFAULT_VARIANTS, SF_THEME_TOGGLE_VARIANTS, ThemeToggle, getStoredThemeMode };
|
package/dist/components/toast.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as useSFToastManager, i as createSFToastManager, n as ToastProvider, r as Toasty, t as Toast } from "../toast-
|
|
2
|
+
import { a as useSFToastManager, i as createSFToastManager, n as ToastProvider, r as Toasty, t as Toast } from "../toast-CgZVaAkw.js";
|
|
3
3
|
export { Toast, ToastProvider, Toasty, createSFToastManager, useSFToastManager };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as useAgentHarness, i as fromMastraHarness, n as SF_USE_AGENT_HARNESS_VARIANTS, r as createAgentHarnessState, t as SF_USE_AGENT_HARNESS_DEFAULT_VARIANTS } from "../use-agent-harness-
|
|
2
|
+
import { a as useAgentHarness, i as fromMastraHarness, n as SF_USE_AGENT_HARNESS_VARIANTS, r as createAgentHarnessState, t as SF_USE_AGENT_HARNESS_DEFAULT_VARIANTS } from "../use-agent-harness-Dl8w6X5O.js";
|
|
3
3
|
export { SF_USE_AGENT_HARNESS_DEFAULT_VARIANTS, SF_USE_AGENT_HARNESS_VARIANTS, createAgentHarnessState, fromMastraHarness, useAgentHarness };
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as cn } from "./cn-CmAOpn49.js";
|
|
3
|
+
import { t as Loader } from "./loader-BEMz8pJO.js";
|
|
4
|
+
import { t as Button } from "./button-BHOgXJRU.js";
|
|
5
|
+
import { t as Checkbox } from "./checkbox-Cy_OCyay.js";
|
|
6
|
+
import { t as DropdownMenu } from "./dropdown-XzbnRLYR.js";
|
|
7
|
+
import { t as Pagination } from "./pagination-DSY279Ta.js";
|
|
8
|
+
import { r as Table } from "./table-BM8JBGBs.js";
|
|
9
|
+
import { t as Filters } from "./filters-SmEl93za.js";
|
|
10
|
+
import { t as Empty } from "./empty-C1tAkawe.js";
|
|
11
|
+
import { createContext, useContext, useMemo, useRef } from "react";
|
|
12
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { CaretDownIcon, CaretUpDownIcon, CaretUpIcon, ColumnsIcon, FadersHorizontalIcon } from "@phosphor-icons/react";
|
|
14
|
+
import { columnFilteringFeature, columnResizingFeature, columnSizingFeature, columnVisibilityFeature, createFilteredRowModel, createPaginatedRowModel, createSortedRowModel, filterFns, flexRender, rowPaginationFeature, rowSelectionFeature, rowSortingFeature, sortFns, tableFeatures, useTable } from "@tanstack/react-table";
|
|
15
|
+
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
16
|
+
//#region src/components/data-grid/features.ts
|
|
17
|
+
/**
|
|
18
|
+
* The TanStack Table v9 feature set used by DataGrid.
|
|
19
|
+
*
|
|
20
|
+
* v9 is modular/tree-shakeable: features must be opted into explicitly via
|
|
21
|
+
* `_features` rather than being bundled into `useReactTable` like v8. This set
|
|
22
|
+
* mirrors the capabilities the v8 DataGrid relied on: sorting, filtering,
|
|
23
|
+
* pagination, row selection, column visibility, and column resizing/sizing.
|
|
24
|
+
*/
|
|
25
|
+
var dataGridFeatures = tableFeatures({
|
|
26
|
+
columnFilteringFeature,
|
|
27
|
+
columnResizingFeature,
|
|
28
|
+
columnSizingFeature,
|
|
29
|
+
columnVisibilityFeature,
|
|
30
|
+
rowPaginationFeature,
|
|
31
|
+
rowSelectionFeature,
|
|
32
|
+
rowSortingFeature
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/components/data-grid/data-grid.tsx
|
|
36
|
+
/** DataGrid layout variant definitions */
|
|
37
|
+
var SF_DATA_GRID_VARIANTS = { layout: {
|
|
38
|
+
auto: {
|
|
39
|
+
classes: "",
|
|
40
|
+
description: "Auto column sizing - columns resize based on content"
|
|
41
|
+
},
|
|
42
|
+
fixed: {
|
|
43
|
+
classes: "table-fixed",
|
|
44
|
+
description: "Fixed column sizing - columns have equal width"
|
|
45
|
+
}
|
|
46
|
+
} };
|
|
47
|
+
/** Default variants for DataGrid */
|
|
48
|
+
var SF_DATA_GRID_DEFAULT_VARIANTS = { layout: "auto" };
|
|
49
|
+
var DataGridContext = createContext(null);
|
|
50
|
+
var DEFAULT_PAGE_SIZE_OPTIONS = [
|
|
51
|
+
10,
|
|
52
|
+
25,
|
|
53
|
+
50,
|
|
54
|
+
100
|
|
55
|
+
];
|
|
56
|
+
function useDataGridContext() {
|
|
57
|
+
const context = useContext(DataGridContext);
|
|
58
|
+
if (!context) throw new Error("DataGrid compound components must be used within a DataGrid");
|
|
59
|
+
return context;
|
|
60
|
+
}
|
|
61
|
+
function SortIcon({ sorted }) {
|
|
62
|
+
if (sorted === "asc") return /* @__PURE__ */ jsx(CaretUpIcon, { className: "size-3.5 text-sf-brand" });
|
|
63
|
+
if (sorted === "desc") return /* @__PURE__ */ jsx(CaretDownIcon, { className: "size-3.5 text-sf-brand" });
|
|
64
|
+
return /* @__PURE__ */ jsx(CaretUpDownIcon, { className: "size-3.5 text-sf-subtle" });
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Toolbar component for DataGrid.
|
|
68
|
+
* Shows filters, column visibility toggle, and custom actions.
|
|
69
|
+
*/
|
|
70
|
+
function DataGridToolbar({ className, children }) {
|
|
71
|
+
return /* @__PURE__ */ jsx("div", {
|
|
72
|
+
className: cn("flex items-center gap-2 border-b border-sf-line p-3", className),
|
|
73
|
+
children
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
DataGridToolbar.displayName = "DataGrid.Toolbar";
|
|
77
|
+
/**
|
|
78
|
+
* Column visibility toggle dropdown.
|
|
79
|
+
* Shows checkboxes for each hideable column.
|
|
80
|
+
*/
|
|
81
|
+
function DataGridColumnToggle({ className, trigger, label = "Columns" }) {
|
|
82
|
+
const { table } = useDataGridContext();
|
|
83
|
+
const hideableColumns = useMemo(() => {
|
|
84
|
+
return table.getAllColumns().filter((col) => col.getCanHide() && (col.columnDef.enableHiding !== false || col.getCanHide()));
|
|
85
|
+
}, [table]);
|
|
86
|
+
if (hideableColumns.length === 0) return null;
|
|
87
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenu.Trigger, { children: trigger ?? /* @__PURE__ */ jsxs(Button, {
|
|
88
|
+
variant: "secondary",
|
|
89
|
+
size: "sm",
|
|
90
|
+
className,
|
|
91
|
+
children: [/* @__PURE__ */ jsx(ColumnsIcon, { className: "mr-1.5 size-4" }), label]
|
|
92
|
+
}) }), /* @__PURE__ */ jsx(DropdownMenu.Content, {
|
|
93
|
+
className: "w-48",
|
|
94
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
95
|
+
className: "flex flex-col gap-1 p-1",
|
|
96
|
+
children: [hideableColumns.map((column) => /* @__PURE__ */ jsxs("label", {
|
|
97
|
+
className: "flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-sf-tint",
|
|
98
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
99
|
+
checked: column.getIsVisible(),
|
|
100
|
+
onCheckedChange: (checked) => column.toggleVisibility(!!checked)
|
|
101
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
102
|
+
className: "flex-1",
|
|
103
|
+
children: typeof column.columnDef.header === "string" ? column.columnDef.header : column.id
|
|
104
|
+
})]
|
|
105
|
+
}, column.id)), hideableColumns.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
106
|
+
/* @__PURE__ */ jsx("div", { className: "my-1 h-px bg-sf-line" }),
|
|
107
|
+
/* @__PURE__ */ jsx(DropdownMenu.Item, {
|
|
108
|
+
onClick: () => hideableColumns.forEach((col) => col.toggleVisibility(true)),
|
|
109
|
+
children: "Show all"
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ jsx(DropdownMenu.Item, {
|
|
112
|
+
onClick: () => hideableColumns.forEach((col) => col.toggleVisibility(false)),
|
|
113
|
+
children: "Hide all"
|
|
114
|
+
})
|
|
115
|
+
] })]
|
|
116
|
+
})
|
|
117
|
+
})] });
|
|
118
|
+
}
|
|
119
|
+
DataGridColumnToggle.displayName = "DataGrid.ColumnToggle";
|
|
120
|
+
/**
|
|
121
|
+
* Main table content component.
|
|
122
|
+
* Renders the table with headers, rows, and cells.
|
|
123
|
+
*/
|
|
124
|
+
function DataGridContent({ className }) {
|
|
125
|
+
const { table, loading, loadingRows, enableColumnResizing, virtualized, estimatedRowHeight = 44, overscan = 8, maxHeight } = useDataGridContext();
|
|
126
|
+
const scrollRef = useRef(null);
|
|
127
|
+
const rows = table.getRowModel().rows;
|
|
128
|
+
const virtualizer = useVirtualizer({
|
|
129
|
+
count: rows.length,
|
|
130
|
+
getScrollElement: () => scrollRef.current,
|
|
131
|
+
estimateSize: () => estimatedRowHeight,
|
|
132
|
+
overscan,
|
|
133
|
+
enabled: Boolean(virtualized),
|
|
134
|
+
getItemKey: (index) => rows[index]?.id ?? index
|
|
135
|
+
});
|
|
136
|
+
if (loading) return /* @__PURE__ */ jsx("div", {
|
|
137
|
+
className: "p-4",
|
|
138
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
139
|
+
className: "space-y-2",
|
|
140
|
+
children: Array.from({ length: loadingRows ?? 5 }).map((_, i) => /* @__PURE__ */ jsx(Loader, { className: "h-10 w-full" }, i))
|
|
141
|
+
})
|
|
142
|
+
});
|
|
143
|
+
const renderCells = (row) => row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(Table.Cell, {
|
|
144
|
+
className: cell.column.columnDef.cellClassName,
|
|
145
|
+
style: enableColumnResizing ? { width: cell.column.getSize() } : void 0,
|
|
146
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
147
|
+
}, cell.id));
|
|
148
|
+
const headerRows = table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(Table.Row, { children: headerGroup.headers.map((header) => {
|
|
149
|
+
const canSort = header.column.getCanSort();
|
|
150
|
+
const sorted = header.column.getIsSorted();
|
|
151
|
+
const canResize = enableColumnResizing && header.column.getCanResize();
|
|
152
|
+
const isResizing = header.column.getIsResizing();
|
|
153
|
+
return /* @__PURE__ */ jsxs(Table.Head, {
|
|
154
|
+
className: cn("bg-sf-base relative group", canSort && "cursor-pointer select-none hover:bg-sf-overlay", header.column.columnDef.headerClassName),
|
|
155
|
+
style: canResize ? { width: header.getSize() } : void 0,
|
|
156
|
+
onClick: canSort ? () => header.column.toggleSorting() : void 0,
|
|
157
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
158
|
+
className: "flex items-center gap-1.5",
|
|
159
|
+
children: [header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()), canSort && /* @__PURE__ */ jsx(SortIcon, { sorted })]
|
|
160
|
+
}), canResize && /* @__PURE__ */ jsx(Table.ResizeHandle, {
|
|
161
|
+
onMouseDown: header.getResizeHandler(),
|
|
162
|
+
onTouchStart: header.getResizeHandler(),
|
|
163
|
+
onDoubleClick: () => header.column.resetSize(),
|
|
164
|
+
className: cn(isResizing && "visible bg-sf-brand/20")
|
|
165
|
+
})]
|
|
166
|
+
}, header.id);
|
|
167
|
+
}) }, headerGroup.id));
|
|
168
|
+
const tableElement = /* @__PURE__ */ jsxs(Table, {
|
|
169
|
+
className,
|
|
170
|
+
children: [/* @__PURE__ */ jsx(Table.Header, { children: headerRows }), /* @__PURE__ */ jsx(Table.Body, { children: rows.map((row) => /* @__PURE__ */ jsx(Table.Row, {
|
|
171
|
+
variant: row.getIsSelected() ? "selected" : "default",
|
|
172
|
+
className: cn(row.getIsSelected() && "bg-sf-tint", "hover:bg-sf-overlay"),
|
|
173
|
+
children: renderCells(row)
|
|
174
|
+
}, row.id)) })]
|
|
175
|
+
});
|
|
176
|
+
if (!virtualized) return tableElement;
|
|
177
|
+
const virtualRows = virtualizer.getVirtualItems();
|
|
178
|
+
const totalSize = virtualizer.getTotalSize();
|
|
179
|
+
const colSpan = table.getVisibleLeafColumns().length;
|
|
180
|
+
const paddingTop = virtualRows[0]?.start ?? 0;
|
|
181
|
+
const paddingBottom = totalSize - (virtualRows.at(-1)?.end ?? 0);
|
|
182
|
+
return /* @__PURE__ */ jsx("div", {
|
|
183
|
+
ref: scrollRef,
|
|
184
|
+
className: "relative overflow-auto",
|
|
185
|
+
style: { maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight },
|
|
186
|
+
children: /* @__PURE__ */ jsxs(Table, {
|
|
187
|
+
className,
|
|
188
|
+
children: [/* @__PURE__ */ jsx(Table.Header, {
|
|
189
|
+
className: "sticky top-0 z-10",
|
|
190
|
+
children: headerRows
|
|
191
|
+
}), /* @__PURE__ */ jsxs(Table.Body, { children: [
|
|
192
|
+
paddingTop > 0 && /* @__PURE__ */ jsx("tr", {
|
|
193
|
+
"aria-hidden": "true",
|
|
194
|
+
children: /* @__PURE__ */ jsx("td", {
|
|
195
|
+
colSpan,
|
|
196
|
+
style: { height: paddingTop }
|
|
197
|
+
})
|
|
198
|
+
}),
|
|
199
|
+
virtualRows.map((virtualRow) => {
|
|
200
|
+
const row = rows[virtualRow.index];
|
|
201
|
+
if (!row) return null;
|
|
202
|
+
return /* @__PURE__ */ jsx(Table.Row, {
|
|
203
|
+
"data-index": virtualRow.index,
|
|
204
|
+
ref: virtualizer.measureElement,
|
|
205
|
+
variant: row.getIsSelected() ? "selected" : "default",
|
|
206
|
+
className: cn(row.getIsSelected() && "bg-sf-tint", "hover:bg-sf-overlay"),
|
|
207
|
+
children: renderCells(row)
|
|
208
|
+
}, row.id);
|
|
209
|
+
}),
|
|
210
|
+
paddingBottom > 0 && /* @__PURE__ */ jsx("tr", {
|
|
211
|
+
"aria-hidden": "true",
|
|
212
|
+
children: /* @__PURE__ */ jsx("td", {
|
|
213
|
+
colSpan,
|
|
214
|
+
style: { height: paddingBottom }
|
|
215
|
+
})
|
|
216
|
+
})
|
|
217
|
+
] })]
|
|
218
|
+
})
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
DataGridContent.displayName = "DataGrid.Content";
|
|
222
|
+
/**
|
|
223
|
+
* Pagination controls for DataGrid.
|
|
224
|
+
* Wraps the Pagination component with table state.
|
|
225
|
+
*/
|
|
226
|
+
function DataGridPagination({ className }) {
|
|
227
|
+
const { table, pageSize: _pageSize, pageIndex: _pageIndex, totalCount, manualPagination } = useDataGridContext();
|
|
228
|
+
const paginationState = table.state.pagination;
|
|
229
|
+
const currentPageIndex = paginationState.pageIndex;
|
|
230
|
+
const currentPageSize = paginationState.pageSize;
|
|
231
|
+
const startRow = currentPageIndex * currentPageSize + 1;
|
|
232
|
+
const endRow = Math.min((currentPageIndex + 1) * currentPageSize, manualPagination ? totalCount : table.getCoreRowModel().rows.length);
|
|
233
|
+
if (table.getPageCount() <= 1 && !manualPagination) return null;
|
|
234
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
235
|
+
className: cn("flex items-center justify-between border-t border-sf-line p-3", className),
|
|
236
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
237
|
+
className: "text-sm text-sf-subtle",
|
|
238
|
+
children: [
|
|
239
|
+
"Showing ",
|
|
240
|
+
startRow,
|
|
241
|
+
"–",
|
|
242
|
+
endRow,
|
|
243
|
+
" of",
|
|
244
|
+
" ",
|
|
245
|
+
manualPagination ? totalCount : table.getCoreRowModel().rows.length
|
|
246
|
+
]
|
|
247
|
+
}), /* @__PURE__ */ jsx(Pagination, {
|
|
248
|
+
page: currentPageIndex + 1,
|
|
249
|
+
setPage: (page) => table.setPageIndex(page - 1),
|
|
250
|
+
perPage: currentPageSize,
|
|
251
|
+
totalCount: manualPagination ? totalCount : table.getCoreRowModel().rows.length,
|
|
252
|
+
text: ({ pageShowingRange, totalCount: total }) => `Showing ${pageShowingRange} of ${total}`
|
|
253
|
+
})]
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
DataGridPagination.displayName = "DataGrid.Pagination";
|
|
257
|
+
/**
|
|
258
|
+
* Empty state component for DataGrid.
|
|
259
|
+
* Shown when there are no rows to display.
|
|
260
|
+
*/
|
|
261
|
+
function DataGridEmpty({ className, children, title = "No results", description = "No data to display." }) {
|
|
262
|
+
const { table } = useDataGridContext();
|
|
263
|
+
if (table.getCoreRowModel().rows.length > 0) return null;
|
|
264
|
+
return /* @__PURE__ */ jsx("div", {
|
|
265
|
+
className: cn("p-8", className),
|
|
266
|
+
children: children ?? /* @__PURE__ */ jsx(Empty, {
|
|
267
|
+
icon: /* @__PURE__ */ jsx(FadersHorizontalIcon, { className: "size-10 text-sf-subtle" }),
|
|
268
|
+
title,
|
|
269
|
+
description
|
|
270
|
+
})
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
DataGridEmpty.displayName = "DataGrid.Empty";
|
|
274
|
+
/**
|
|
275
|
+
* DataGrid root component.
|
|
276
|
+
* Sets up the react-table instance and provides context to child components.
|
|
277
|
+
*/
|
|
278
|
+
function DataGridRoot({ data, columns, sorting: controlledSorting, onSortingChange, enableSorting = true, columnVisibility: controlledColumnVisibility, onColumnVisibilityChange, enableColumnVisibility = true, rowSelection: controlledRowSelection, onRowSelectionChange, enableRowSelection, pageSize = 10, pageIndex = 0, onPaginationChange, totalCount, manualPagination = false, pageSizeOptions: _pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS, filters, onFiltersChange, filterFields, enableFiltering, layout: _layout = SF_DATA_GRID_DEFAULT_VARIANTS.layout, className, tableClassName, emptyState, loading, loadingRows, toolbar, showToolbar = true, showPagination = true, pagination: customPagination, enableColumnResizing, columnResizeMode = "onEnd", virtualized = false, estimatedRowHeight = 44, overscan = 8, maxHeight, children }) {
|
|
279
|
+
const isSortingControlled = controlledSorting !== void 0;
|
|
280
|
+
const isColumnVisibilityControlled = controlledColumnVisibility !== void 0;
|
|
281
|
+
const isRowSelectionControlled = controlledRowSelection !== void 0;
|
|
282
|
+
const isPaginationControlled = manualPagination;
|
|
283
|
+
const controlledState = {};
|
|
284
|
+
if (isSortingControlled) controlledState.sorting = controlledSorting;
|
|
285
|
+
if (isColumnVisibilityControlled) controlledState.columnVisibility = controlledColumnVisibility;
|
|
286
|
+
if (isRowSelectionControlled) controlledState.rowSelection = controlledRowSelection;
|
|
287
|
+
if (isPaginationControlled) controlledState.pagination = {
|
|
288
|
+
pageIndex,
|
|
289
|
+
pageSize
|
|
290
|
+
};
|
|
291
|
+
const handleSortingChange = (updater) => {
|
|
292
|
+
const next = typeof updater === "function" ? updater(table.state.sorting) : updater;
|
|
293
|
+
if (!isSortingControlled) table.setSorting(next);
|
|
294
|
+
onSortingChange?.(next);
|
|
295
|
+
};
|
|
296
|
+
const handleColumnVisibilityChange = (updater) => {
|
|
297
|
+
const current = table.state.columnVisibility ?? {};
|
|
298
|
+
const next = typeof updater === "function" ? updater(current) : updater;
|
|
299
|
+
if (!isColumnVisibilityControlled) table.setColumnVisibility(next);
|
|
300
|
+
onColumnVisibilityChange?.(next);
|
|
301
|
+
};
|
|
302
|
+
const handleRowSelectionChange = (updater) => {
|
|
303
|
+
const current = table.state.rowSelection ?? {};
|
|
304
|
+
const next = typeof updater === "function" ? updater(current) : updater;
|
|
305
|
+
if (!isRowSelectionControlled) table.setRowSelection(next);
|
|
306
|
+
onRowSelectionChange?.(next);
|
|
307
|
+
};
|
|
308
|
+
const handlePaginationChange = (updater) => {
|
|
309
|
+
const current = table.state.pagination ?? {
|
|
310
|
+
pageIndex,
|
|
311
|
+
pageSize
|
|
312
|
+
};
|
|
313
|
+
const next = typeof updater === "function" ? updater(current) : updater;
|
|
314
|
+
if (!isPaginationControlled) table.setPagination(next);
|
|
315
|
+
onPaginationChange?.({
|
|
316
|
+
pageIndex: next.pageIndex,
|
|
317
|
+
pageSize: next.pageSize
|
|
318
|
+
});
|
|
319
|
+
};
|
|
320
|
+
const table = useTable({
|
|
321
|
+
features: dataGridFeatures,
|
|
322
|
+
rowModels: {
|
|
323
|
+
sortedRowModel: createSortedRowModel(sortFns),
|
|
324
|
+
filteredRowModel: createFilteredRowModel(filterFns),
|
|
325
|
+
paginatedRowModel: createPaginatedRowModel()
|
|
326
|
+
},
|
|
327
|
+
data,
|
|
328
|
+
columns,
|
|
329
|
+
initialState: { pagination: {
|
|
330
|
+
pageIndex,
|
|
331
|
+
pageSize
|
|
332
|
+
} },
|
|
333
|
+
state: controlledState,
|
|
334
|
+
...isSortingControlled || onSortingChange ? { onSortingChange: handleSortingChange } : {},
|
|
335
|
+
...isColumnVisibilityControlled || onColumnVisibilityChange ? { onColumnVisibilityChange: handleColumnVisibilityChange } : {},
|
|
336
|
+
...isRowSelectionControlled || onRowSelectionChange ? { onRowSelectionChange: handleRowSelectionChange } : {},
|
|
337
|
+
...isPaginationControlled || onPaginationChange ? { onPaginationChange: handlePaginationChange } : {},
|
|
338
|
+
enableSorting,
|
|
339
|
+
enableRowSelection: enableRowSelection !== false,
|
|
340
|
+
enableColumnResizing,
|
|
341
|
+
columnResizeMode,
|
|
342
|
+
manualPagination,
|
|
343
|
+
pageCount: manualPagination ? Math.ceil((totalCount ?? data.length) / pageSize) : void 0,
|
|
344
|
+
enableMultiRowSelection: true
|
|
345
|
+
});
|
|
346
|
+
const contextValue = {
|
|
347
|
+
table,
|
|
348
|
+
pageSize,
|
|
349
|
+
pageIndex,
|
|
350
|
+
totalCount: totalCount ?? data.length,
|
|
351
|
+
manualPagination,
|
|
352
|
+
loading,
|
|
353
|
+
loadingRows,
|
|
354
|
+
enableColumnResizing,
|
|
355
|
+
columnResizeMode,
|
|
356
|
+
virtualized,
|
|
357
|
+
estimatedRowHeight,
|
|
358
|
+
overscan,
|
|
359
|
+
maxHeight
|
|
360
|
+
};
|
|
361
|
+
return /* @__PURE__ */ jsx(DataGridContext.Provider, {
|
|
362
|
+
value: contextValue,
|
|
363
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
364
|
+
className: cn("flex flex-col overflow-hidden rounded-lg border border-sf-line bg-sf-base", className),
|
|
365
|
+
children: children || /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
366
|
+
showToolbar && /* @__PURE__ */ jsx(DataGridToolbar, { children: toolbar ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [enableFiltering && filterFields && /* @__PURE__ */ jsx(Filters, {
|
|
367
|
+
filters: filters ?? [],
|
|
368
|
+
fields: filterFields,
|
|
369
|
+
onChange: onFiltersChange ?? (() => {}),
|
|
370
|
+
size: "sm"
|
|
371
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
372
|
+
className: "ml-auto flex items-center gap-2",
|
|
373
|
+
children: enableColumnVisibility && /* @__PURE__ */ jsx(DataGridColumnToggle, {})
|
|
374
|
+
})] }) }),
|
|
375
|
+
/* @__PURE__ */ jsxs("div", {
|
|
376
|
+
className: cn("flex-1", !virtualized && "overflow-auto"),
|
|
377
|
+
children: [/* @__PURE__ */ jsx(DataGridContent, { className: tableClassName }), /* @__PURE__ */ jsx(DataGridEmpty, { children: emptyState })]
|
|
378
|
+
}),
|
|
379
|
+
showPagination && (customPagination ?? /* @__PURE__ */ jsx(DataGridPagination, {}))
|
|
380
|
+
] })
|
|
381
|
+
})
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
DataGridRoot.displayName = "DataGrid";
|
|
385
|
+
var DataGrid = Object.assign(DataGridRoot, {
|
|
386
|
+
Toolbar: DataGridToolbar,
|
|
387
|
+
Content: DataGridContent,
|
|
388
|
+
Pagination: DataGridPagination,
|
|
389
|
+
ColumnToggle: DataGridColumnToggle,
|
|
390
|
+
Empty: DataGridEmpty
|
|
391
|
+
});
|
|
392
|
+
//#endregion
|
|
393
|
+
export { SF_DATA_GRID_DEFAULT_VARIANTS as n, SF_DATA_GRID_VARIANTS as r, DataGrid as t };
|
|
394
|
+
|
|
395
|
+
//# sourceMappingURL=data-grid-DrguJq_H.js.map
|