sparkdesign 0.0.1 → 0.2.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/README.md +279 -5
- package/cli/dist/commands/add.js +84 -0
- package/cli/dist/commands/diff.js +54 -0
- package/cli/dist/commands/init.js +96 -0
- package/cli/dist/commands/list.js +25 -0
- package/cli/dist/index.js +37 -0
- package/cli/dist/utils/config.js +53 -0
- package/cli/dist/utils/registry.js +34 -0
- package/cli/dist/utils/tokens.js +90 -0
- package/cli/dist/utils/transform.js +19 -0
- package/cli/registry/basic/alert-dialog.tsx +180 -0
- package/cli/registry/basic/avatar.tsx +120 -0
- package/cli/registry/basic/button.tsx +100 -0
- package/cli/registry/basic/collapse.tsx +94 -0
- package/cli/registry/basic/collapsible-card.tsx +230 -0
- package/cli/registry/basic/collapsible.tsx +21 -0
- package/cli/registry/basic/dropdown-menu.tsx +254 -0
- package/cli/registry/basic/icon-button.tsx +66 -0
- package/cli/registry/basic/icons-inline.tsx +206 -0
- package/cli/registry/basic/kbd.tsx +50 -0
- package/cli/registry/basic/option-list.tsx +125 -0
- package/cli/registry/basic/pagination.tsx +132 -0
- package/cli/registry/basic/progress.tsx +42 -0
- package/cli/registry/basic/radio-group.tsx +69 -0
- package/cli/registry/basic/resizable.tsx +67 -0
- package/cli/registry/basic/scrollbar.tsx +114 -0
- package/cli/registry/basic/select.tsx +177 -0
- package/cli/registry/basic/skeleton.tsx +33 -0
- package/cli/registry/basic/slider.tsx +55 -0
- package/cli/registry/basic/sonner.tsx +104 -0
- package/cli/registry/basic/spinner.tsx +17 -0
- package/cli/registry/basic/switch.tsx +49 -0
- package/cli/registry/basic/table.tsx +117 -0
- package/cli/registry/basic/tabs.tsx +85 -0
- package/cli/registry/basic/tag.tsx +161 -0
- package/cli/registry/basic/theme-from-document.ts +10 -0
- package/cli/registry/basic/toggle.tsx +223 -0
- package/cli/registry/basic/tooltip.tsx +80 -0
- package/cli/registry/basic/typography.tsx +201 -0
- package/cli/registry/chat/browser-use-part.tsx +166 -0
- package/cli/registry/chat/chat-input/chat-input-folder-selector.tsx +185 -0
- package/cli/registry/chat/chat-input/chat-input-model-switcher.tsx +131 -0
- package/cli/registry/chat/chat-input/chat-input-textarea.tsx +67 -0
- package/cli/registry/chat/chat-input/compound.tsx +334 -0
- package/cli/registry/chat/chat-input/context.tsx +189 -0
- package/cli/registry/chat/chat-input/folder-permission-dialog.tsx +61 -0
- package/cli/registry/chat/chat-input/index.tsx +123 -0
- package/cli/registry/chat/chat-input/types.ts +77 -0
- package/cli/registry/chat/chat-input/useAutoResizeTextarea.ts +20 -0
- package/cli/registry/chat/code-block-part.tsx +151 -0
- package/cli/registry/chat/file-attachment.tsx +44 -0
- package/cli/registry/chat/file-card.tsx +68 -0
- package/cli/registry/chat/file-review-part.tsx +259 -0
- package/cli/registry/chat/folder-button.tsx +169 -0
- package/cli/registry/chat/generated-images-grid.tsx +56 -0
- package/cli/registry/chat/generation-status-bar.tsx +72 -0
- package/cli/registry/chat/image-attachment.tsx +166 -0
- package/cli/registry/chat/image-generating.tsx +281 -0
- package/cli/registry/chat/markdown.tsx +146 -0
- package/cli/registry/chat/mermaid-part.tsx +90 -0
- package/cli/registry/chat/permission-card.tsx +178 -0
- package/cli/registry/chat/plan-part.tsx +168 -0
- package/cli/registry/chat/question-part.tsx +70 -0
- package/cli/registry/chat/queue-indicator.tsx +234 -0
- package/cli/registry/chat/reasoning-step.tsx +358 -0
- package/cli/registry/chat/related-prompts.tsx +91 -0
- package/cli/registry/chat/request.tsx +38 -0
- package/cli/registry/chat/response.tsx +271 -0
- package/cli/registry/chat/send-button.tsx +94 -0
- package/cli/registry/chat/sidebar-menu.tsx +177 -0
- package/cli/registry/chat/streaming-markdown-block.tsx +111 -0
- package/cli/registry/chat/suggestion-part.tsx +165 -0
- package/cli/registry/chat/task-part.tsx +109 -0
- package/cli/registry/chat/terminal-code-block-part.tsx +69 -0
- package/cli/registry/chat/thinking-indicator.tsx +91 -0
- package/cli/registry/chat/tool-invocation-card.tsx +132 -0
- package/cli/registry/chat/user-question/UserQuestionCard.tsx +198 -0
- package/cli/registry/chat/user-question/UserQuestionFooter.tsx +66 -0
- package/cli/registry/chat/user-question/UserQuestionHeader.tsx +64 -0
- package/cli/registry/chat/user-question/index.tsx +340 -0
- package/cli/registry/chat/user-question/types.ts +61 -0
- package/cli/registry/chat/user-question/useUserQuestionKeyboard.ts +127 -0
- package/cli/registry/chat/user-question/useUserQuestionState.ts +165 -0
- package/cli/registry/chat/user-question-answer.tsx +62 -0
- package/cli/registry/lib/file-icon-maps.ts +150 -0
- package/cli/registry/lib/use-mermaid-render.ts +76 -0
- package/cli/registry/lib/utils.ts +6 -0
- package/cli/registry/meta.json +1 -0
- package/cli/registry/tokens/scale.css +299 -0
- package/cli/registry/tokens/theme.css +633 -0
- package/dist/_basePickBy-DnQN8w3y.js +151 -0
- package/dist/_basePickBy-a-kPMlkg.cjs +1 -0
- package/dist/_baseUniq-B-N2NQ50.js +614 -0
- package/dist/_baseUniq-Cc_zbSif.cjs +1 -0
- package/dist/arc-BQBhijZ6.js +83 -0
- package/dist/arc-mWQt0Yph.cjs +1 -0
- package/dist/architectureDiagram-VXUJARFQ-BMZEucno.cjs +36 -0
- package/dist/architectureDiagram-VXUJARFQ-DTdjD3Bp.js +4661 -0
- package/dist/blockDiagram-VD42YOAC-CzHn0yob.js +2256 -0
- package/dist/blockDiagram-VD42YOAC-DDxdHAlz.cjs +122 -0
- package/dist/c4Diagram-YG6GDRKO-4Gz0I4gj.cjs +10 -0
- package/dist/c4Diagram-YG6GDRKO-BIy--yVN.js +1580 -0
- package/dist/channel-BQn0o8bs.js +5 -0
- package/dist/channel-DaN7XniJ.cjs +1 -0
- package/dist/chunk-4BX2VUAB-BlQFTQqz.cjs +1 -0
- package/dist/chunk-4BX2VUAB-Czitj3Kc.js +8 -0
- package/dist/chunk-55IACEB6-DXacNZbO.js +8 -0
- package/dist/chunk-55IACEB6-DnDxpye9.cjs +1 -0
- package/dist/chunk-B4BG7PRW-CBdN0q_V.js +1375 -0
- package/dist/chunk-B4BG7PRW-DbGvUkGO.cjs +165 -0
- package/dist/chunk-DI55MBZ5-D1YJMs6x.cjs +220 -0
- package/dist/chunk-DI55MBZ5-NCQTvayw.js +1370 -0
- package/dist/chunk-FMBD7UC4-CsGMbrtr.js +19 -0
- package/dist/chunk-FMBD7UC4-Di7cUUh5.cjs +15 -0
- package/dist/chunk-QN33PNHL-0j5LC8Lm.cjs +1 -0
- package/dist/chunk-QN33PNHL-3GERZBRm.js +19 -0
- package/dist/chunk-QZHKN3VN-AVEY9ImQ.js +15 -0
- package/dist/chunk-QZHKN3VN-s8Z0a8mc.cjs +1 -0
- package/dist/chunk-TZMSLE5B-CAf87HPt.cjs +1 -0
- package/dist/chunk-TZMSLE5B-sbiflal0.js +64 -0
- package/dist/classDiagram-2ON5EDUG-Ct9JLIN2.cjs +1 -0
- package/dist/classDiagram-2ON5EDUG-Dzfrft3a.js +16 -0
- package/dist/classDiagram-v2-WZHVMYZB-Ct9JLIN2.cjs +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-Dzfrft3a.js +16 -0
- package/dist/clone-Cde_NQ8V.js +8 -0
- package/dist/clone-DCNjWuM2.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-0uLijMro.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-Bb08N431.js +2608 -0
- package/dist/cytoscape.esm-CNUX3VTg.cjs +321 -0
- package/dist/cytoscape.esm-Cvf3sx9F.js +18704 -0
- package/dist/dagre-6UL2VRFP-CY_Wz5Zd.js +444 -0
- package/dist/dagre-6UL2VRFP-Dxe7_qZc.cjs +4 -0
- package/dist/defaultLocale-BgPVtth8.js +171 -0
- package/dist/defaultLocale-C4wbwF1n.cjs +1 -0
- package/dist/diagram-PSM6KHXK-D2bdb7MT.js +531 -0
- package/dist/diagram-PSM6KHXK-YF69SUjY.cjs +24 -0
- package/dist/diagram-QEK2KX5R-BpUSoh0-.js +217 -0
- package/dist/diagram-QEK2KX5R-DZPGteon.cjs +43 -0
- package/dist/diagram-S2PKOQOG-ht-zdvFG.cjs +24 -0
- package/dist/diagram-S2PKOQOG-zFeLJ50Z.js +142 -0
- package/dist/erDiagram-Q2GNP2WA-B38iJ6ts.js +841 -0
- package/dist/erDiagram-Q2GNP2WA-RgS80DDU.cjs +60 -0
- package/dist/flowDiagram-NV44I4VS-BHilOs2p.cjs +162 -0
- package/dist/flowDiagram-NV44I4VS-BrBJcoce.js +1620 -0
- package/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/ganttDiagram-JELNMOA3-pZiJeFio.cjs +267 -0
- package/dist/ganttDiagram-JELNMOA3-tw6FhkWJ.js +2670 -0
- package/dist/gitGraphDiagram-V2S2FVAM-BWn5uIK5.js +699 -0
- package/dist/gitGraphDiagram-V2S2FVAM-DKKeG-9R.cjs +65 -0
- package/dist/graph-DIbblrZP.cjs +1 -0
- package/dist/graph-DPcK91G3.js +247 -0
- package/dist/infoDiagram-HS3SLOUP-B8gwwhct.cjs +2 -0
- package/dist/infoDiagram-HS3SLOUP-D47PNcP_.js +24 -0
- package/dist/init-CHZsXQcr.cjs +1 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/journeyDiagram-XKPGCS4Q-BG3cfhyU.js +834 -0
- package/dist/journeyDiagram-XKPGCS4Q-D8DVLJof.cjs +139 -0
- package/dist/kanban-definition-3W4ZIXB7-4OCnEouP.cjs +89 -0
- package/dist/kanban-definition-3W4ZIXB7-CWi_ssF9.js +719 -0
- package/dist/katex.css +1 -0
- package/dist/layout-Byuh8f-J.cjs +1 -0
- package/dist/layout-CdLdvj1j.js +1335 -0
- package/dist/linear-C2Q_PI9B.js +259 -0
- package/dist/linear-C69aPBW1.cjs +1 -0
- package/dist/mermaid.core-DBwAx_jp.cjs +249 -0
- package/dist/mermaid.core-gFR0XUlD.js +15300 -0
- package/dist/mindmap-definition-VGOIOE7T-8P7obVV4.cjs +68 -0
- package/dist/mindmap-definition-VGOIOE7T-DnOa7WJ9.js +784 -0
- package/dist/ordinal-B6-f3MAq.js +61 -0
- package/dist/ordinal-CagbB1m8.cjs +1 -0
- package/dist/pieDiagram-ADFJNKIX-5NAlvhMo.js +161 -0
- package/dist/pieDiagram-ADFJNKIX-CQBG4yR9.cjs +30 -0
- package/dist/qoder-design.css +2 -0
- package/dist/quadrantDiagram-AYHSOK5B-Oe4y7RZ0.cjs +7 -0
- package/dist/quadrantDiagram-AYHSOK5B-rh2DPEP1.js +1022 -0
- package/dist/registry/basic/alert-dialog.d.ts +40 -0
- package/dist/registry/basic/avatar.d.ts +30 -0
- package/dist/registry/basic/button.d.ts +16 -0
- package/dist/registry/basic/collapse.d.ts +22 -0
- package/dist/registry/basic/collapsible-card.d.ts +34 -0
- package/dist/registry/basic/collapsible.d.ts +15 -0
- package/dist/registry/basic/dropdown-menu.d.ts +52 -0
- package/dist/registry/basic/icon-button.d.ts +12 -0
- package/dist/registry/basic/icons-inline.d.ts +51 -0
- package/dist/registry/basic/kbd.d.ts +23 -0
- package/dist/registry/basic/option-list.d.ts +16 -0
- package/dist/registry/basic/pagination.d.ts +33 -0
- package/dist/registry/basic/progress.d.ts +18 -0
- package/dist/registry/basic/radio-group.d.ts +25 -0
- package/dist/registry/basic/resizable.d.ts +318 -0
- package/dist/registry/basic/scrollbar.d.ts +12 -0
- package/dist/registry/basic/select.d.ts +35 -0
- package/dist/registry/basic/skeleton.d.ts +10 -0
- package/dist/registry/basic/slider.d.ts +16 -0
- package/dist/registry/basic/sonner.d.ts +23 -0
- package/dist/registry/basic/spinner.d.ts +5 -0
- package/dist/registry/basic/switch.d.ts +20 -0
- package/dist/registry/basic/table.d.ts +18 -0
- package/dist/registry/basic/tabs.d.ts +29 -0
- package/dist/registry/basic/tag.d.ts +23 -0
- package/dist/registry/basic/theme-from-document.d.ts +10 -0
- package/dist/registry/basic/toggle.d.ts +29 -0
- package/dist/registry/basic/tooltip.d.ts +34 -0
- package/dist/registry/basic/typography.d.ts +76 -0
- package/dist/registry/chat/browser-use-part.d.ts +28 -0
- package/dist/registry/chat/chat-input/chat-input-folder-selector.d.ts +22 -0
- package/dist/registry/chat/chat-input/chat-input-model-switcher.d.ts +12 -0
- package/dist/registry/chat/chat-input/chat-input-textarea.d.ts +9 -0
- package/dist/registry/chat/chat-input/compound.d.ts +97 -0
- package/dist/registry/chat/chat-input/context.d.ts +64 -0
- package/dist/registry/chat/chat-input/folder-permission-dialog.d.ts +11 -0
- package/dist/registry/chat/chat-input/index.d.ts +34 -0
- package/dist/registry/chat/chat-input/types.d.ts +79 -0
- package/dist/registry/chat/chat-input/useAutoResizeTextarea.d.ts +7 -0
- package/dist/registry/chat/code-block-part.d.ts +23 -0
- package/dist/registry/chat/file-attachment.d.ts +19 -0
- package/dist/registry/chat/file-card.d.ts +10 -0
- package/dist/registry/chat/file-review-part.d.ts +30 -0
- package/dist/registry/chat/folder-button.d.ts +20 -0
- package/dist/registry/chat/generated-images-grid.d.ts +15 -0
- package/dist/registry/chat/generation-status-bar.d.ts +19 -0
- package/dist/registry/chat/image-attachment.d.ts +19 -0
- package/dist/registry/chat/image-generating.d.ts +15 -0
- package/dist/registry/chat/markdown.d.ts +8 -0
- package/dist/registry/chat/mermaid-part.d.ts +17 -0
- package/dist/registry/chat/permission-card.d.ts +24 -0
- package/dist/registry/chat/plan-part.d.ts +30 -0
- package/dist/registry/chat/question-part.d.ts +24 -0
- package/dist/registry/chat/queue-indicator.d.ts +27 -0
- package/dist/registry/chat/reasoning-step.d.ts +35 -0
- package/dist/registry/chat/related-prompts.d.ts +23 -0
- package/dist/registry/chat/request.d.ts +6 -0
- package/dist/registry/chat/response.d.ts +28 -0
- package/dist/registry/chat/send-button.d.ts +17 -0
- package/dist/registry/chat/sidebar-menu.d.ts +23 -0
- package/dist/registry/chat/streaming-markdown-block.d.ts +8 -0
- package/dist/registry/chat/suggestion-part.d.ts +28 -0
- package/dist/registry/chat/task-part.d.ts +28 -0
- package/dist/registry/chat/terminal-code-block-part.d.ts +18 -0
- package/dist/registry/chat/thinking-indicator.d.ts +14 -0
- package/dist/registry/chat/tool-invocation-card.d.ts +20 -0
- package/dist/registry/chat/user-question/UserQuestionCard.d.ts +30 -0
- package/dist/registry/chat/user-question/UserQuestionFooter.d.ts +18 -0
- package/dist/registry/chat/user-question/UserQuestionHeader.d.ts +20 -0
- package/dist/registry/chat/user-question/index.d.ts +7 -0
- package/dist/registry/chat/user-question/types.d.ts +52 -0
- package/dist/registry/chat/user-question/useUserQuestionKeyboard.d.ts +18 -0
- package/dist/registry/chat/user-question/useUserQuestionState.d.ts +26 -0
- package/dist/registry/chat/user-question-answer.d.ts +13 -0
- package/dist/registry/lib/file-icon-maps.d.ts +20 -0
- package/dist/registry/lib/use-mermaid-render.d.ts +5 -0
- package/dist/registry/lib/utils.d.ts +11 -0
- package/dist/requirementDiagram-UZGBJVZJ-DcWaCuXr.js +850 -0
- package/dist/requirementDiagram-UZGBJVZJ-gfdlrFiq.cjs +64 -0
- package/dist/sankeyDiagram-TZEHDZUN-CQIKFwD0.js +810 -0
- package/dist/sankeyDiagram-TZEHDZUN-DvPtzQvC.cjs +10 -0
- package/dist/scale.css +307 -0
- package/dist/sequenceDiagram-WL72ISMW-BNrsMagL.cjs +145 -0
- package/dist/sequenceDiagram-WL72ISMW-iCX3ckKx.js +2511 -0
- package/dist/spark-design.cjs.js +265 -0
- package/dist/spark-design.es.js +13207 -0
- package/dist/src/components/chat/BrowserUsePart/index.d.ts +7 -0
- package/dist/src/components/chat/ChatInput/index.d.ts +29 -0
- package/dist/src/components/chat/CodeBlockPart/index.d.ts +7 -0
- package/dist/src/components/chat/CollapsibleCard/index.d.ts +7 -0
- package/dist/src/components/chat/FileAttachment/index.d.ts +3 -0
- package/dist/src/components/chat/FileCard/index.d.ts +3 -0
- package/dist/src/components/chat/FileReviewPart/index.d.ts +7 -0
- package/dist/src/components/chat/FolderButton/index.d.ts +5 -0
- package/dist/src/components/chat/GeneratedImagesGrid/index.d.ts +7 -0
- package/dist/src/components/chat/GenerationStatusBar/index.d.ts +7 -0
- package/dist/src/components/chat/ImageAttachment/index.d.ts +3 -0
- package/dist/src/components/chat/ImageGenerating/index.d.ts +6 -0
- package/dist/src/components/chat/Markdown/demo-content.d.ts +1 -0
- package/dist/src/components/chat/Markdown/index.d.ts +7 -0
- package/dist/src/components/chat/MermaidPart/index.d.ts +6 -0
- package/dist/src/components/chat/PermissionCard/index.d.ts +4 -0
- package/dist/src/components/chat/PlanPart/index.d.ts +6 -0
- package/dist/src/components/chat/QuestionPart/index.d.ts +6 -0
- package/dist/src/components/chat/QueueIndicator/index.d.ts +4 -0
- package/dist/src/components/chat/ReasoningStep/index.d.ts +7 -0
- package/dist/src/components/chat/RelatedPrompts/index.d.ts +6 -0
- package/dist/src/components/chat/Request/index.d.ts +7 -0
- package/dist/src/components/chat/Response/StreamingMarkdownBlock.d.ts +6 -0
- package/dist/src/components/chat/Response/index.d.ts +6 -0
- package/dist/src/components/chat/SendButton/index.d.ts +5 -0
- package/dist/src/components/chat/SidebarMenu/index.d.ts +4 -0
- package/dist/src/components/chat/SuggestionPart/index.d.ts +6 -0
- package/dist/src/components/chat/TaskPart/index.d.ts +7 -0
- package/dist/src/components/chat/TerminalCodeBlockPart/index.d.ts +6 -0
- package/dist/src/components/chat/ThinkingIndicator/index.d.ts +6 -0
- package/dist/src/components/chat/ToolInvocationCard/index.d.ts +4 -0
- package/dist/src/components/chat/UserQuestion/index.d.ts +5 -0
- package/dist/src/components/chat/UserQuestionAnswer/index.d.ts +3 -0
- package/dist/src/components/foundation/AlertDialog/index.d.ts +20 -0
- package/dist/src/components/foundation/Avatar/index.d.ts +7 -0
- package/dist/src/components/foundation/Button/index.d.ts +7 -0
- package/dist/src/components/foundation/Collapse/index.d.ts +15 -0
- package/dist/src/components/foundation/Collapsible/index.d.ts +7 -0
- package/dist/src/components/foundation/CollapsibleSection/index.d.ts +43 -0
- package/dist/src/components/foundation/DropdownMenu/index.d.ts +19 -0
- package/dist/src/components/foundation/EllipsisText/index.d.ts +53 -0
- package/dist/src/components/foundation/IconButton/index.d.ts +7 -0
- package/dist/src/components/foundation/Kbd/index.d.ts +7 -0
- package/dist/src/components/foundation/OptionList/index.d.ts +7 -0
- package/dist/src/components/foundation/Pagination/index.d.ts +7 -0
- package/dist/src/components/foundation/Progress/index.d.ts +7 -0
- package/dist/src/components/foundation/RadioGroup/index.d.ts +7 -0
- package/dist/src/components/foundation/Resizable/index.d.ts +7 -0
- package/dist/src/components/foundation/Scrollbar/index.d.ts +7 -0
- package/dist/src/components/foundation/Select/index.d.ts +17 -0
- package/dist/src/components/foundation/Skeleton/index.d.ts +7 -0
- package/dist/src/components/foundation/Slider/index.d.ts +7 -0
- package/dist/src/components/foundation/Spinner/index.d.ts +7 -0
- package/dist/src/components/foundation/Switch/index.d.ts +38 -0
- package/dist/src/components/foundation/Table/index.d.ts +7 -0
- package/dist/src/components/foundation/Tabs/index.d.ts +7 -0
- package/dist/src/components/foundation/Tag/index.d.ts +10 -0
- package/dist/src/components/foundation/Toast/index.d.ts +12 -0
- package/dist/src/components/foundation/Toggle/index.d.ts +7 -0
- package/dist/src/components/foundation/Tooltip/index.d.ts +21 -0
- package/dist/src/components/foundation/Typography/index.d.ts +7 -0
- package/dist/src/components/index.d.ts +136 -0
- package/dist/src/icons/context.d.ts +26 -0
- package/dist/src/icons/types.d.ts +18 -0
- package/dist/src/lib/ThemeStyleContext.d.ts +21 -0
- package/dist/src/lib/file-icon.d.ts +16 -0
- package/dist/src/lib/i18n.d.ts +12 -0
- package/dist/src/lib/index.d.ts +10 -0
- package/dist/src/lib/motion.d.ts +22 -0
- package/dist/src/lib/utils.d.ts +11 -0
- package/dist/stateDiagram-FKZM4ZOC-DBvJ_eeL.cjs +1 -0
- package/dist/stateDiagram-FKZM4ZOC-ZVsJlaHJ.js +263 -0
- package/dist/stateDiagram-v2-4FDKWEC3-CB_nTHcE.js +16 -0
- package/dist/stateDiagram-v2-4FDKWEC3-Xkx17v6T.cjs +1 -0
- package/dist/theme.css +804 -0
- package/dist/timeline-definition-IT6M3QCI-BmGkYQiz.cjs +61 -0
- package/dist/timeline-definition-IT6M3QCI-Ck8zTt6w.js +795 -0
- package/dist/treemap-GDKQZRPO-B9sfERx8.js +17922 -0
- package/dist/treemap-GDKQZRPO-BVfJRs0Z.cjs +160 -0
- package/dist/xychartDiagram-PRI3JC2R-By_S8NzN.js +1340 -0
- package/dist/xychartDiagram-PRI3JC2R-CNfDrGxM.cjs +7 -0
- package/package.json +111 -9
- package/index.js +0 -5
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
|
|
3
|
+
const viewBox = '0 0 24 24'
|
|
4
|
+
|
|
5
|
+
export interface InlineIconProps extends React.SVGAttributes<SVGSVGElement> {
|
|
6
|
+
className?: string
|
|
7
|
+
size?: number | string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const defaultSize = '1em'
|
|
11
|
+
|
|
12
|
+
function createIcon(pathD: string, displayName: string) {
|
|
13
|
+
const Icon = React.forwardRef<SVGSVGElement, InlineIconProps>(
|
|
14
|
+
({ className, size = defaultSize, ...props }, ref) => (
|
|
15
|
+
<svg
|
|
16
|
+
ref={ref}
|
|
17
|
+
viewBox={viewBox}
|
|
18
|
+
width={size}
|
|
19
|
+
height={size}
|
|
20
|
+
fill="currentColor"
|
|
21
|
+
className={className}
|
|
22
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
+
aria-hidden
|
|
24
|
+
{...props}
|
|
25
|
+
>
|
|
26
|
+
<path d={pathD} />
|
|
27
|
+
</svg>
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
Icon.displayName = displayName
|
|
31
|
+
return Icon
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Arrows(与 @ali/qoder-icon 一致;向下展开/折叠/下拉请用 ArrowDownSLine,勿用 ArrowDownLine)
|
|
35
|
+
export const ArrowDownLine = createIcon(
|
|
36
|
+
'M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z',
|
|
37
|
+
'ArrowDownLine'
|
|
38
|
+
)
|
|
39
|
+
export const ArrowUpLine = createIcon(
|
|
40
|
+
'M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z',
|
|
41
|
+
'ArrowUpLine'
|
|
42
|
+
)
|
|
43
|
+
export const ArrowRightLine = createIcon(
|
|
44
|
+
'M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z',
|
|
45
|
+
'ArrowRightLine'
|
|
46
|
+
)
|
|
47
|
+
export const ArrowLeftLine = createIcon(
|
|
48
|
+
'M7.82843 10.9999H20V12.9999H7.82843L13.1924 18.3638L11.7782 19.778L4 11.9999L11.7782 4.22168L13.1924 5.63589L7.82843 10.9999Z',
|
|
49
|
+
'ArrowLeftLine'
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
// Check
|
|
53
|
+
export const CheckLine = createIcon(
|
|
54
|
+
'M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z',
|
|
55
|
+
'CheckLine'
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
// Close
|
|
59
|
+
export const CloseLine = createIcon(
|
|
60
|
+
'M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z',
|
|
61
|
+
'CloseLine'
|
|
62
|
+
)
|
|
63
|
+
export const CloseLargeLine = createIcon(
|
|
64
|
+
'M10.5859 12L2.79297 4.20706L4.20718 2.79285L12.0001 10.5857L19.793 2.79285L21.2072 4.20706L13.4143 12L21.2072 19.7928L19.793 21.2071L12.0001 13.4142L4.20718 21.2071L2.79297 19.7928L10.5859 12Z',
|
|
65
|
+
'CloseLargeLine'
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
// Code / Eye (Switch segment, etc.)
|
|
69
|
+
export const CodeSSlashLine = createIcon(
|
|
70
|
+
'M24 12L18.3431 17.6569L16.9289 16.2426L21.1716 12L16.9289 7.75736L18.3431 6.34315L24 12ZM2.82843 12L7.07107 16.2426L5.65685 17.6569L0 12L5.65685 6.34315L7.07107 7.75736L2.82843 12ZM9.78845 21H7.66009L14.2116 3H16.3399L9.78845 21Z',
|
|
71
|
+
'CodeSSlashLine'
|
|
72
|
+
)
|
|
73
|
+
export const EyeLine = createIcon(
|
|
74
|
+
'M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z',
|
|
75
|
+
'EyeLine'
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
// Loader (Spinner) - bar style, use animate-spin on parent or className
|
|
79
|
+
export const LoaderLine = createIcon(
|
|
80
|
+
'M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z',
|
|
81
|
+
'LoaderLine'
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
// Chat: Send, Stop, Mic (Remix-style paths)
|
|
85
|
+
export const SendPlaneLine = createIcon(
|
|
86
|
+
'M1.946 9.315c-.946-.35-.946-1.09 0-1.436l18.108-6.732c.946-.35 1.704.21 1.573 1.236L20.1 21.894c-.117.932-.93 1.636 1.897 1.636.967 0 1.754-.704 1.636-1.636l-.527-4.18L10 12 20.073 7.264l-.527-4.18c-.117-.932.67-1.636 1.637-1.636.967 0 2.014.704 1.897 1.636L21.627 18.57c-.131 1.026-.627 1.586-1.573 1.236L1.946 9.315Z',
|
|
87
|
+
'SendPlaneLine'
|
|
88
|
+
)
|
|
89
|
+
export const StopLine = createIcon(
|
|
90
|
+
'M6 6h12v12H6V6Zm2 2v8h8V8H8Z',
|
|
91
|
+
'StopLine'
|
|
92
|
+
)
|
|
93
|
+
export const MicLine = createIcon(
|
|
94
|
+
'M12 3a3 3 0 0 1 3 3v6a3 3 0 0 1-6 0V6a3 3 0 0 1 3-3Zm0 14a5 5 0 0 0 5-5v-1a1 1 0 1 1 2 0v1a7 7 0 0 1-14 0v-1a1 1 0 1 1 2 0v1a5 5 0 0 0 5 5Z',
|
|
95
|
+
'MicLine'
|
|
96
|
+
)
|
|
97
|
+
// Folder (outline / fill)
|
|
98
|
+
export const FolderLine = createIcon(
|
|
99
|
+
'M3 3h8.828l2 2H21a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm2 2v12h14V7h-8.414l-2-2H5Z',
|
|
100
|
+
'FolderLine'
|
|
101
|
+
)
|
|
102
|
+
export const FolderFillLine = createIcon(
|
|
103
|
+
'M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414l2 2Z',
|
|
104
|
+
'FolderFillLine'
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
// File (generic placeholder for FileAttachment / FileCard)
|
|
108
|
+
export const FileLine = createIcon(
|
|
109
|
+
'M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm4 18H6V4h7v5h5v11z',
|
|
110
|
+
'FileLine'
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
// Chat (RelatedPrompts)
|
|
114
|
+
export const Chat3Line = createIcon(
|
|
115
|
+
'M12 2C6.477 2 2 6.477 2 12c0 1.5.328 2.932.917 4.215L1.5 21l4.785-1.417A9.966 9.966 0 0 0 12 22c5.523 0 10-4.477 10-10S17.523 2 12 2zm0 2a8 8 0 1 1 0 16 7.99 7.99 0 0 1-3.918-1.018l-.26-.15-2.683.795.795-2.683-.15-.26A7.99 7.99 0 0 1 4 12a8 8 0 0 1 8-8z',
|
|
116
|
+
'Chat3Line'
|
|
117
|
+
)
|
|
118
|
+
// Warning
|
|
119
|
+
export const WarningLine = createIcon(
|
|
120
|
+
'M12 7a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V8a1 1 0 0 1 1-1zm0 10a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5z',
|
|
121
|
+
'WarningLine'
|
|
122
|
+
)
|
|
123
|
+
// Arrow down small(与 @ali/qoder-icon QoderArrowDownSLine 一致,用于展开/折叠/下拉)
|
|
124
|
+
export const ArrowDownSLine = createIcon(
|
|
125
|
+
'M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z',
|
|
126
|
+
'ArrowDownSLine'
|
|
127
|
+
)
|
|
128
|
+
// Sparkling / AI
|
|
129
|
+
export const SparklingLine = createIcon(
|
|
130
|
+
'M14 2l.5 2.5L17 5l-2.5.5L14 8l-.5-2.5L11 5l2.5-.5L14 2zM6 12l1 4 4 1 1-4-4-1-1-4zm8-2l.5 2.5 2.5.5-2.5.5-.5 2.5-.5-2.5-2.5-.5 2.5-.5.5-2.5z',
|
|
131
|
+
'SparklingLine'
|
|
132
|
+
)
|
|
133
|
+
// QueueIndicator / ToolInvocationCard
|
|
134
|
+
export const TimeLine = createIcon(
|
|
135
|
+
'M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm1 2v5.586l3.707 3.707-1.414 1.414L11 11.414V6h2z',
|
|
136
|
+
'TimeLine'
|
|
137
|
+
)
|
|
138
|
+
export const CheckboxCircleLine = createIcon(
|
|
139
|
+
'M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm3.536 5.536l-4.95 4.95-2.121-2.122-1.414 1.414 3.535 3.536 6.364-6.364-1.414-1.414z',
|
|
140
|
+
'CheckboxCircleLine'
|
|
141
|
+
)
|
|
142
|
+
export const CloseCircleLine = createIcon(
|
|
143
|
+
'M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm3.536 2.464l-1.414 1.414L12 10.586 9.878 8.464 8.464 9.878 10.586 12l-2.122 2.121 1.414 1.415L12 13.414l2.121 2.122 1.415-1.414L13.414 12l2.122-2.121z',
|
|
144
|
+
'CloseCircleLine'
|
|
145
|
+
)
|
|
146
|
+
// SidebarMenu / 更多操作(横排三点,与 QoderMoreLine 一致)
|
|
147
|
+
export const MoreLine = createIcon(
|
|
148
|
+
'M6 12c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z',
|
|
149
|
+
'MoreLine'
|
|
150
|
+
)
|
|
151
|
+
// UserQuestionAnswer 问答
|
|
152
|
+
export const QuestionAnswerLine = createIcon(
|
|
153
|
+
'M5.763 17H20V5H4v13.385L5.763 17zm.692 2L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455z',
|
|
154
|
+
'QuestionAnswerLine'
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
// Chat parts: FileReview, Task, Plan, Mermaid, Terminal, Browser, Question
|
|
158
|
+
export const RequestChangesLine = createIcon(
|
|
159
|
+
'M7 14h10v2H7v-2zm0-4h10v2H7v-2zm0-4h10v2H7V6zm-4 12h2v2H3v-2zm0-4h2v2H3v-2zm0-4h2v2H3v-2zm0-4h2v2H3V6z',
|
|
160
|
+
'RequestChangesLine'
|
|
161
|
+
)
|
|
162
|
+
export const CatalogLine = createIcon(
|
|
163
|
+
'M3 5h2v2H3V5zm4 0h14v2H7V5zm-4 6h2v2H3v-2zm4 0h14v2H7v-2zm-4 6h2v2H3v-2zm4 0h14v2H7v-2z',
|
|
164
|
+
'CatalogLine'
|
|
165
|
+
)
|
|
166
|
+
export const CircleLine = createIcon(
|
|
167
|
+
'M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16z',
|
|
168
|
+
'CircleLine'
|
|
169
|
+
)
|
|
170
|
+
export const IndeterminateCircleLine = createIcon(
|
|
171
|
+
'M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm4 5v2H8V9h8z',
|
|
172
|
+
'IndeterminateCircleLine'
|
|
173
|
+
)
|
|
174
|
+
// TaskPart 进行中(圆内右箭头,面性;与 QoderArrowRightCircleFill 语义一致)
|
|
175
|
+
export const ArrowRightCircleFillLine = createIcon(
|
|
176
|
+
'M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm4 10l-4-4v3H6v2h6v3l4-4z',
|
|
177
|
+
'ArrowRightCircleFillLine'
|
|
178
|
+
)
|
|
179
|
+
export const FileList2Line = createIcon(
|
|
180
|
+
'M3 4h14v2H3V4zm0 4h14v2H3V8zm0 4h10v2H3v-2zm0 4h8v2H3v-2z',
|
|
181
|
+
'FileList2Line'
|
|
182
|
+
)
|
|
183
|
+
export const DownloadLine = createIcon(
|
|
184
|
+
'M13 10h5l-6 6-6-6h5V3h2v7zM4 19h16v2H4v-2z',
|
|
185
|
+
'DownloadLine'
|
|
186
|
+
)
|
|
187
|
+
export const QuestionnaireLine = createIcon(
|
|
188
|
+
'M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm1 5v6h-2V9h2zm0-4v2h-2V6h2z',
|
|
189
|
+
'QuestionnaireLine'
|
|
190
|
+
)
|
|
191
|
+
export const TerminalBoxLine = createIcon(
|
|
192
|
+
'M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm2 2v12h14V5H5zm2 2h2v2H7V7zm4 0h6v2h-6V7zm-4 4h2v2H7v-2zm4 0h6v2h-6v-2z',
|
|
193
|
+
'TerminalBoxLine'
|
|
194
|
+
)
|
|
195
|
+
export const ExternalLinkLine = createIcon(
|
|
196
|
+
'M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v8h-2V6.413l-7.793 7.794-1.414-1.414L17.585 5H13V3h8z',
|
|
197
|
+
'ExternalLinkLine'
|
|
198
|
+
)
|
|
199
|
+
export const GlobalLine = createIcon(
|
|
200
|
+
'M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm1 2.05v1.9c.93.13 1.8.44 2.57.9L14.5 7.2c-.55-.36-1.15-.65-1.78-.9L13 6.05zM6.05 11H4.1c.13.93.44 1.8.9 2.57L7.2 9.5c-.36-.55-.65-1.15-.9-1.78L6.05 11zm1.25 4.5L4.6 16.33c.77.57 1.64.88 2.57 1.01v1.9c.63-.25 1.23-.54 1.78-.9L7.3 15.5zm7.4 0c.55.36 1.15.65 1.78.9v1.9a8.1 8.1 0 0 1-2.57-.9L16.8 15.5l-1.25-1.25zM17.9 13h-1.95c-.25-.63-.54-1.23-.9-1.78L16.8 14.5c.57.77.88 1.64 1.01 2.57zm-5.4-5.4c-.36.55-.65 1.15-.9 1.78H6.05c.13-.93.44-1.8.9-2.57L9.5 7.2l1.25 1.25zm-.9 6.8l1.25 1.25c.77-.57 1.64-.88 2.57-1.01v1.95c-.63.25-1.23.54-1.78.9L9.5 16.8zm4.5-4.5l1.25 1.25L16.8 9.5c-.36-.55-.65-1.15-.9-1.78h1.95c.13.93.44 1.8.9 2.57z',
|
|
201
|
+
'GlobalLine'
|
|
202
|
+
)
|
|
203
|
+
export const Forbid2Line = createIcon(
|
|
204
|
+
'M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm3.536 2.464l-9.072 9.072a8 8 0 0 1 9.072-9.072zM8.464 17.536a8 8 0 0 1 9.072-9.072l-9.072 9.072z',
|
|
205
|
+
'Forbid2Line'
|
|
206
|
+
)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
|
|
4
|
+
export type KbdProps = React.ComponentProps<'kbd'>
|
|
5
|
+
|
|
6
|
+
function Kbd({ className, ...props }: KbdProps) {
|
|
7
|
+
return (
|
|
8
|
+
<kbd
|
|
9
|
+
className={cn(
|
|
10
|
+
'pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm px-1 !font-sans text-xs font-medium',
|
|
11
|
+
'bg-fill-secondary text-text-secondary',
|
|
12
|
+
'[.tooltip-content_&]:bg-bg-highlight-hover [.tooltip-content_&]:text-text-on-primary',
|
|
13
|
+
'dark:[.tooltip-content_&]:bg-[color:var(--color-bg-base)]/10 dark:[.tooltip-content_&]:text-[var(--color-bg-base)]',
|
|
14
|
+
className
|
|
15
|
+
)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
Kbd.displayName = 'Kbd'
|
|
21
|
+
|
|
22
|
+
export interface KbdGroupProps extends React.ComponentProps<'span'> {
|
|
23
|
+
separator?: React.ReactNode
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function KbdGroup({
|
|
27
|
+
className,
|
|
28
|
+
children,
|
|
29
|
+
separator = '+',
|
|
30
|
+
...props
|
|
31
|
+
}: KbdGroupProps) {
|
|
32
|
+
const items = React.Children.toArray(children)
|
|
33
|
+
return (
|
|
34
|
+
<span className={cn('inline-flex items-center gap-1', className)} {...props}>
|
|
35
|
+
{items.map((child, index) => (
|
|
36
|
+
<React.Fragment key={index}>
|
|
37
|
+
{child}
|
|
38
|
+
{index < items.length - 1 && (
|
|
39
|
+
<span className="select-none !font-sans text-xs font-medium text-text-secondary">
|
|
40
|
+
{separator}
|
|
41
|
+
</span>
|
|
42
|
+
)}
|
|
43
|
+
</React.Fragment>
|
|
44
|
+
))}
|
|
45
|
+
</span>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
KbdGroup.displayName = 'KbdGroup'
|
|
49
|
+
|
|
50
|
+
export { Kbd, KbdGroup }
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { forwardRef } from 'react'
|
|
2
|
+
import type { HTMLAttributes } from 'react'
|
|
3
|
+
import { cva } from 'class-variance-authority'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const LIST_BASE = 'flex flex-col gap-1'
|
|
7
|
+
|
|
8
|
+
const itemVariants = cva(
|
|
9
|
+
'w-full flex flex-col gap-0.5 items-start p-2 text-sm rounded text-left transition-colors outline-none focus-visible:bg-fill-tertiary focus-visible:ring-0',
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
selected: { true: '', false: '' },
|
|
13
|
+
disabled: {
|
|
14
|
+
true: 'opacity-50 cursor-not-allowed',
|
|
15
|
+
false: 'cursor-pointer hover:bg-fill-tertiary',
|
|
16
|
+
},
|
|
17
|
+
dimmed: { true: 'opacity-40', false: '' },
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: { selected: false, disabled: false, dimmed: false },
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
const prefixVariants = cva(
|
|
24
|
+
'flex-shrink-0 w-5 h-5 rounded-full flex items-center justify-center text-xs font-mono font-medium transition-colors',
|
|
25
|
+
{
|
|
26
|
+
variants: {
|
|
27
|
+
selected: {
|
|
28
|
+
true: 'bg-primary-active text-text-on-primary',
|
|
29
|
+
false: 'bg-fill-secondary text-text-tertiary',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: { selected: false },
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
export interface OptionItem {
|
|
37
|
+
id: string
|
|
38
|
+
label: string
|
|
39
|
+
description?: string
|
|
40
|
+
disabled?: boolean
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface OptionListProps extends HTMLAttributes<HTMLDivElement> {
|
|
44
|
+
items: OptionItem[]
|
|
45
|
+
selectedIds?: string[]
|
|
46
|
+
focusedId?: string
|
|
47
|
+
onItemClick?: (item: OptionItem, index: number) => void
|
|
48
|
+
showPrefix?: boolean
|
|
49
|
+
disabled?: boolean
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const OptionList = forwardRef<HTMLDivElement, OptionListProps>(
|
|
53
|
+
(
|
|
54
|
+
{
|
|
55
|
+
items,
|
|
56
|
+
selectedIds = [],
|
|
57
|
+
focusedId,
|
|
58
|
+
onItemClick,
|
|
59
|
+
showPrefix = true,
|
|
60
|
+
disabled = false,
|
|
61
|
+
className,
|
|
62
|
+
...props
|
|
63
|
+
},
|
|
64
|
+
ref
|
|
65
|
+
) => {
|
|
66
|
+
const getOptionNumber = (index: number) => String(index + 1)
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<div
|
|
70
|
+
ref={ref}
|
|
71
|
+
role="listbox"
|
|
72
|
+
aria-multiselectable={selectedIds.length > 1}
|
|
73
|
+
className={cn(LIST_BASE, className)}
|
|
74
|
+
{...props}
|
|
75
|
+
>
|
|
76
|
+
{items.map((item, index) => {
|
|
77
|
+
const isSelected = selectedIds.includes(item.id)
|
|
78
|
+
const isFocused = focusedId === item.id
|
|
79
|
+
const isDisabled = disabled || item.disabled
|
|
80
|
+
const hasSelection = selectedIds.length > 0
|
|
81
|
+
const dimmed = hasSelection && !isSelected && !isDisabled
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<button
|
|
85
|
+
key={item.id}
|
|
86
|
+
type="button"
|
|
87
|
+
role="option"
|
|
88
|
+
aria-selected={isSelected}
|
|
89
|
+
aria-disabled={isDisabled}
|
|
90
|
+
onClick={() => {
|
|
91
|
+
if (!isDisabled) onItemClick?.(item, index)
|
|
92
|
+
}}
|
|
93
|
+
disabled={isDisabled}
|
|
94
|
+
className={cn(
|
|
95
|
+
itemVariants({
|
|
96
|
+
selected: isSelected,
|
|
97
|
+
disabled: isDisabled,
|
|
98
|
+
dimmed,
|
|
99
|
+
}),
|
|
100
|
+
// 键盘焦点态:仅底色,无 ring
|
|
101
|
+
isFocused && 'bg-fill-tertiary'
|
|
102
|
+
)}
|
|
103
|
+
>
|
|
104
|
+
<div className="flex items-center gap-3">
|
|
105
|
+
{showPrefix && (
|
|
106
|
+
<div className={prefixVariants({ selected: isSelected })}>
|
|
107
|
+
{getOptionNumber(index)}
|
|
108
|
+
</div>
|
|
109
|
+
)}
|
|
110
|
+
<span className="font-medium text-text">{item.label}</span>
|
|
111
|
+
</div>
|
|
112
|
+
{item.description && (
|
|
113
|
+
<div className="ml-8 text-xs text-text-tertiary">
|
|
114
|
+
{item.description}
|
|
115
|
+
</div>
|
|
116
|
+
)}
|
|
117
|
+
</button>
|
|
118
|
+
)
|
|
119
|
+
})}
|
|
120
|
+
</div>
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
OptionList.displayName = 'OptionList'
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
import { ArrowLeftLine, ArrowRightLine } from './icons-inline'
|
|
4
|
+
|
|
5
|
+
const Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => (
|
|
6
|
+
<nav
|
|
7
|
+
role="navigation"
|
|
8
|
+
aria-label="pagination"
|
|
9
|
+
className={cn('flex w-full justify-center', className)}
|
|
10
|
+
{...props}
|
|
11
|
+
/>
|
|
12
|
+
)
|
|
13
|
+
Pagination.displayName = 'Pagination'
|
|
14
|
+
|
|
15
|
+
const PaginationContent = React.forwardRef<HTMLUListElement, React.ComponentProps<'ul'>>(
|
|
16
|
+
({ className, ...props }, ref) => (
|
|
17
|
+
<ul
|
|
18
|
+
ref={ref}
|
|
19
|
+
className={cn('flex flex-row flex-wrap items-center gap-2', className)}
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
)
|
|
23
|
+
)
|
|
24
|
+
PaginationContent.displayName = 'PaginationContent'
|
|
25
|
+
|
|
26
|
+
const PaginationItem = React.forwardRef<HTMLLIElement, React.ComponentProps<'li'>>(
|
|
27
|
+
({ className, ...props }, ref) => (
|
|
28
|
+
<li ref={ref} className={cn('list-none', className)} {...props} />
|
|
29
|
+
)
|
|
30
|
+
)
|
|
31
|
+
PaginationItem.displayName = 'PaginationItem'
|
|
32
|
+
|
|
33
|
+
export interface PaginationLinkProps extends React.ComponentProps<'a'> {
|
|
34
|
+
isActive?: boolean
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const PaginationLink = React.forwardRef<HTMLAnchorElement, PaginationLinkProps>(
|
|
38
|
+
({ className, isActive, ...props }, ref) => (
|
|
39
|
+
<a
|
|
40
|
+
ref={ref}
|
|
41
|
+
aria-current={isActive ? 'page' : undefined}
|
|
42
|
+
className={cn(
|
|
43
|
+
'inline-flex min-w-9 h-9 items-center justify-center rounded-md border text-sm font-medium transition-colors',
|
|
44
|
+
'border-border-tertiary bg-bg-container text-text',
|
|
45
|
+
'hover:bg-fill-secondary hover:text-text hover:border-border-tertiary',
|
|
46
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base',
|
|
47
|
+
'disabled:pointer-events-none disabled:opacity-50',
|
|
48
|
+
isActive && 'bg-fill-secondary border-border-tertiary text-text',
|
|
49
|
+
className
|
|
50
|
+
)}
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
)
|
|
54
|
+
)
|
|
55
|
+
PaginationLink.displayName = 'PaginationLink'
|
|
56
|
+
|
|
57
|
+
export interface PaginationPreviousProps extends React.ComponentProps<'a'> {
|
|
58
|
+
text?: string
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const PaginationPrevious = React.forwardRef<HTMLAnchorElement, PaginationPreviousProps>(
|
|
62
|
+
({ className, text = 'Previous', ...props }, ref) => (
|
|
63
|
+
<a
|
|
64
|
+
ref={ref}
|
|
65
|
+
aria-label="Go to previous page"
|
|
66
|
+
className={cn(
|
|
67
|
+
'inline-flex h-9 min-w-9 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium transition-colors',
|
|
68
|
+
'border-border-tertiary bg-bg-container text-text',
|
|
69
|
+
'hover:bg-fill-secondary hover:text-text hover:border-border-tertiary',
|
|
70
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base',
|
|
71
|
+
'disabled:pointer-events-none disabled:opacity-50',
|
|
72
|
+
className
|
|
73
|
+
)}
|
|
74
|
+
{...props}
|
|
75
|
+
>
|
|
76
|
+
<ArrowLeftLine className="h-4 w-4 shrink-0" />
|
|
77
|
+
<span className="hidden sm:inline">{text}</span>
|
|
78
|
+
</a>
|
|
79
|
+
)
|
|
80
|
+
)
|
|
81
|
+
PaginationPrevious.displayName = 'PaginationPrevious'
|
|
82
|
+
|
|
83
|
+
export interface PaginationNextProps extends React.ComponentProps<'a'> {
|
|
84
|
+
text?: string
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const PaginationNext = React.forwardRef<HTMLAnchorElement, PaginationNextProps>(
|
|
88
|
+
({ className, text = 'Next', ...props }, ref) => (
|
|
89
|
+
<a
|
|
90
|
+
ref={ref}
|
|
91
|
+
aria-label="Go to next page"
|
|
92
|
+
className={cn(
|
|
93
|
+
'inline-flex h-9 min-w-9 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium transition-colors',
|
|
94
|
+
'border-border-tertiary bg-bg-container text-text',
|
|
95
|
+
'hover:bg-fill-secondary hover:text-text hover:border-border-tertiary',
|
|
96
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-border focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base',
|
|
97
|
+
'disabled:pointer-events-none disabled:opacity-50',
|
|
98
|
+
className
|
|
99
|
+
)}
|
|
100
|
+
{...props}
|
|
101
|
+
>
|
|
102
|
+
<span className="hidden sm:inline">{text}</span>
|
|
103
|
+
<ArrowRightLine className="h-4 w-4 shrink-0" />
|
|
104
|
+
</a>
|
|
105
|
+
)
|
|
106
|
+
)
|
|
107
|
+
PaginationNext.displayName = 'PaginationNext'
|
|
108
|
+
|
|
109
|
+
const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<'span'>) => (
|
|
110
|
+
<span
|
|
111
|
+
role="presentation"
|
|
112
|
+
aria-hidden
|
|
113
|
+
className={cn(
|
|
114
|
+
'flex h-9 w-9 shrink-0 items-center justify-center text-text-secondary',
|
|
115
|
+
className
|
|
116
|
+
)}
|
|
117
|
+
{...props}
|
|
118
|
+
>
|
|
119
|
+
…
|
|
120
|
+
</span>
|
|
121
|
+
)
|
|
122
|
+
PaginationEllipsis.displayName = 'PaginationEllipsis'
|
|
123
|
+
|
|
124
|
+
export {
|
|
125
|
+
Pagination,
|
|
126
|
+
PaginationContent,
|
|
127
|
+
PaginationItem,
|
|
128
|
+
PaginationLink,
|
|
129
|
+
PaginationNext,
|
|
130
|
+
PaginationPrevious,
|
|
131
|
+
PaginationEllipsis,
|
|
132
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress'
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
|
+
|
|
5
|
+
export interface ProgressProps
|
|
6
|
+
extends Omit<
|
|
7
|
+
React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>,
|
|
8
|
+
'value'
|
|
9
|
+
> {
|
|
10
|
+
value?: number | null
|
|
11
|
+
max?: number
|
|
12
|
+
className?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const Progress = React.forwardRef<HTMLDivElement, ProgressProps>(
|
|
16
|
+
({ className, value, max = 100, ...rootProps }, ref) => {
|
|
17
|
+
const percent = value != null ? Math.min(max, Math.max(0, value)) : undefined
|
|
18
|
+
return (
|
|
19
|
+
<ProgressPrimitive.Root
|
|
20
|
+
ref={ref as React.RefObject<HTMLDivElement>}
|
|
21
|
+
value={percent ?? null}
|
|
22
|
+
max={max}
|
|
23
|
+
className={cn(
|
|
24
|
+
'relative h-1 w-full overflow-hidden rounded-full bg-fill-secondary',
|
|
25
|
+
className
|
|
26
|
+
)}
|
|
27
|
+
style={{ height: 4 }}
|
|
28
|
+
{...rootProps}
|
|
29
|
+
>
|
|
30
|
+
<ProgressPrimitive.Indicator
|
|
31
|
+
className="h-full rounded-full bg-success transition-[width] duration-200 ease-out"
|
|
32
|
+
style={{
|
|
33
|
+
width: percent != null ? `${(percent / max) * 100}%` : '0%',
|
|
34
|
+
}}
|
|
35
|
+
/>
|
|
36
|
+
</ProgressPrimitive.Root>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
Progress.displayName = 'Progress'
|
|
41
|
+
|
|
42
|
+
export { Progress }
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group'
|
|
3
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const rootVariants = cva('grid gap-2', {
|
|
7
|
+
variants: {
|
|
8
|
+
orientation: {
|
|
9
|
+
vertical: 'grid-flow-row',
|
|
10
|
+
horizontal: 'grid-flow-col auto-cols-max',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: { orientation: 'vertical' },
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const itemVariants = cva(
|
|
17
|
+
'shrink-0 rounded-full border border-border-tertiary outline-offset-2 cursor-pointer transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary-border disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-text data-[state=checked]:bg-text data-[state=checked]:text-bg-base',
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
size: { sm: 'size-3.5', md: 'size-4', lg: 'size-5' },
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: { size: 'md' },
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
const indicatorSizeMap: Record<'sm' | 'md' | 'lg', string> = {
|
|
27
|
+
sm: 'size-1.5',
|
|
28
|
+
md: 'size-2',
|
|
29
|
+
lg: 'size-2.5',
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface RadioGroupProps
|
|
33
|
+
extends Omit<React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, 'orientation'>,
|
|
34
|
+
VariantProps<typeof rootVariants> {}
|
|
35
|
+
|
|
36
|
+
export interface RadioGroupItemProps
|
|
37
|
+
extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,
|
|
38
|
+
VariantProps<typeof itemVariants> {}
|
|
39
|
+
|
|
40
|
+
const RadioGroup = React.forwardRef<
|
|
41
|
+
React.ElementRef<typeof RadioGroupPrimitive.Root>,
|
|
42
|
+
RadioGroupProps
|
|
43
|
+
>(({ className, orientation = 'vertical', ...props }, ref) => (
|
|
44
|
+
<RadioGroupPrimitive.Root
|
|
45
|
+
ref={ref}
|
|
46
|
+
className={cn(rootVariants({ orientation, className }))}
|
|
47
|
+
orientation={orientation ?? 'vertical'}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
50
|
+
))
|
|
51
|
+
RadioGroup.displayName = 'RadioGroup'
|
|
52
|
+
|
|
53
|
+
const RadioGroupItem = React.forwardRef<
|
|
54
|
+
React.ElementRef<typeof RadioGroupPrimitive.Item>,
|
|
55
|
+
RadioGroupItemProps
|
|
56
|
+
>(({ className, size = 'md', ...props }, ref) => (
|
|
57
|
+
<RadioGroupPrimitive.Item
|
|
58
|
+
ref={ref}
|
|
59
|
+
className={cn(itemVariants({ size, className }))}
|
|
60
|
+
{...props}
|
|
61
|
+
>
|
|
62
|
+
<RadioGroupPrimitive.Indicator className="flex items-center justify-center">
|
|
63
|
+
<span className={cn('rounded-full bg-current', indicatorSizeMap[size ?? 'md'])} />
|
|
64
|
+
</RadioGroupPrimitive.Indicator>
|
|
65
|
+
</RadioGroupPrimitive.Item>
|
|
66
|
+
))
|
|
67
|
+
RadioGroupItem.displayName = 'RadioGroupItem'
|
|
68
|
+
|
|
69
|
+
export { RadioGroup, RadioGroupItem, rootVariants as radioGroupVariants, itemVariants as radioGroupItemVariants }
|