sparkdesign 0.4.5 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AI_README.md +60 -0
- package/README.md +74 -22
- package/cli/dist/commands/add.js +23 -13
- package/cli/dist/commands/diff.js +8 -4
- package/cli/dist/commands/init.js +85 -10
- package/cli/dist/commands/list.js +8 -4
- package/cli/dist/index.js +9 -6
- package/cli/dist/utils/config.js +16 -8
- package/cli/dist/utils/package-manager.js +75 -0
- package/cli/dist/utils/registry.js +8 -4
- package/cli/dist/utils/tokens.js +33 -25
- package/cli/dist/utils/transform.js +9 -5
- package/cli/dist/utils/tsconfig.js +182 -0
- package/cli/registry/AGENTS.md +25 -0
- package/cli/registry/__tests__/chat/thinking-indicator.test.tsx +2 -2
- package/cli/registry/agent-manifest.json +794 -0
- package/cli/registry/basic/alert.tsx +76 -0
- package/cli/registry/basic/aspect-ratio.tsx +8 -0
- package/cli/registry/basic/breadcrumb.tsx +117 -0
- package/cli/registry/basic/button-group.tsx +79 -0
- package/cli/registry/basic/button.tsx +1 -1
- package/cli/registry/basic/calendar.tsx +221 -0
- package/cli/registry/basic/card.tsx +103 -0
- package/cli/registry/basic/carousel.tsx +241 -0
- package/cli/registry/basic/chart.tsx +372 -0
- package/cli/registry/basic/checkbox.tsx +42 -0
- package/cli/registry/basic/collapsible-card.tsx +2 -2
- package/cli/registry/basic/combobox.tsx +75 -0
- package/cli/registry/basic/command.tsx +184 -0
- package/cli/registry/basic/context-menu.tsx +239 -0
- package/cli/registry/basic/data-table.tsx +73 -0
- package/cli/registry/basic/date-picker.tsx +13 -0
- package/cli/registry/basic/dialog.tsx +169 -0
- package/cli/registry/basic/direction.tsx +25 -0
- package/cli/registry/basic/drawer.tsx +164 -0
- package/cli/registry/basic/dropdown-menu.tsx +0 -4
- package/cli/registry/basic/empty.tsx +104 -0
- package/cli/registry/basic/field.tsx +248 -0
- package/cli/registry/basic/hover-card.tsx +58 -0
- package/cli/registry/basic/input-group.tsx +168 -0
- package/cli/registry/basic/input-otp.tsx +75 -0
- package/cli/registry/basic/input.tsx +27 -0
- package/cli/registry/basic/item.tsx +204 -0
- package/cli/registry/basic/label.tsx +24 -0
- package/cli/registry/basic/menubar.tsx +274 -0
- package/cli/registry/basic/native-select.tsx +62 -0
- package/cli/registry/basic/navigation-menu.tsx +168 -0
- package/cli/registry/basic/popover.tsx +59 -0
- package/cli/registry/basic/scroll-area.tsx +58 -0
- package/cli/registry/basic/select.tsx +2 -1
- package/cli/registry/basic/separator.tsx +26 -0
- package/cli/registry/basic/sheet.tsx +18 -0
- package/cli/registry/basic/textarea.tsx +25 -0
- package/cli/registry/basic/toggle.tsx +1 -1
- package/cli/registry/basic/typography.tsx +1 -1
- package/cli/registry/chat/chat-input/chat-input-folder-selector.tsx +1 -1
- package/cli/registry/chat/chat-input/chat-input-textarea.tsx +1 -1
- package/cli/registry/chat/chat-input/compound.tsx +4 -3
- package/cli/registry/chat/chat-input/context.tsx +4 -1
- package/cli/registry/chat/chat-input/folder-permission-dialog.tsx +2 -2
- package/cli/registry/chat/code-block-part.tsx +1 -1
- package/cli/registry/chat/conversation-anchor-nav.tsx +349 -0
- package/cli/registry/chat/file-attachment.tsx +2 -1
- package/cli/registry/chat/file-review-part.tsx +21 -21
- package/cli/registry/chat/image-generating.tsx +1 -1
- package/cli/registry/chat/markdown.tsx +2 -2
- package/cli/registry/chat/queue-indicator.tsx +1 -0
- package/cli/registry/chat/response/context.tsx +1 -1
- package/cli/registry/chat/streaming-markdown-block.tsx +12 -8
- package/cli/registry/chat/thinking-indicator.tsx +1 -1
- package/cli/registry/chat/tool-invocation-card.tsx +4 -1
- package/cli/registry/lib/file-icon-maps.ts +22 -22
- package/cli/registry/meta.json +518 -0
- package/cli/registry/tokens/index.css +8 -5
- package/cli/registry/tokens/ontology.json +404 -0
- package/cli/registry/tokens/scale/presets/compact.css +16 -5
- package/cli/registry/tokens/scale/presets/dense.css +13 -2
- package/cli/registry/tokens/scale/presets/sharp.css +18 -6
- package/cli/registry/tokens/scale/presets/soft.css +23 -1
- package/cli/registry/tokens/theme-base.css +235 -0
- package/{dist/tokens/themes/dark-qoder.css → cli/registry/tokens/themes/dark-mint.css} +1 -1
- package/cli/registry/tokens/themes/dark-parchment.css +104 -103
- package/{dist/tokens/themes/light-qoder.css → cli/registry/tokens/themes/light-mint.css} +1 -1
- package/cli/registry/tokens/themes/light-parchment.css +103 -102
- package/dist/registry/basic/alert-dialog.d.ts +7 -5
- package/dist/registry/basic/alert.d.ts +24 -0
- package/dist/registry/basic/aspect-ratio.d.ts +16 -0
- package/dist/registry/basic/avatar.d.ts +7 -5
- package/dist/registry/basic/breadcrumb.d.ts +24 -0
- package/dist/registry/basic/button-group.d.ts +26 -0
- package/dist/registry/basic/button.d.ts +1 -1
- package/dist/registry/basic/calendar.d.ts +22 -0
- package/dist/registry/basic/card.d.ts +27 -0
- package/dist/registry/basic/carousel.d.ts +19 -0
- package/dist/registry/basic/chart.d.ts +55 -0
- package/dist/registry/basic/checkbox.d.ts +21 -0
- package/dist/registry/basic/collapse.d.ts +7 -5
- package/dist/registry/basic/collapsible-card.d.ts +7 -6
- package/dist/registry/basic/collapsible.d.ts +7 -5
- package/dist/registry/basic/combobox.d.ts +26 -0
- package/dist/registry/basic/command.d.ts +18 -0
- package/dist/registry/basic/context-menu.d.ts +44 -0
- package/dist/registry/basic/data-table.d.ts +26 -0
- package/dist/registry/basic/date-picker.d.ts +18 -0
- package/dist/registry/basic/dialog.d.ts +39 -0
- package/dist/registry/basic/direction.d.ts +19 -0
- package/dist/registry/basic/drawer.d.ts +37 -0
- package/dist/registry/basic/dropdown-menu.d.ts +7 -5
- package/dist/registry/basic/empty.d.ts +22 -0
- package/dist/registry/basic/field.d.ts +24 -0
- package/dist/registry/basic/hover-card.d.ts +22 -0
- package/dist/registry/basic/icons-inline.d.ts +7 -5
- package/dist/registry/basic/input-group.d.ts +27 -0
- package/dist/registry/basic/input-otp.d.ts +22 -0
- package/dist/registry/basic/input.d.ts +15 -0
- package/dist/registry/basic/item.d.ts +34 -0
- package/dist/registry/basic/kbd.d.ts +7 -5
- package/dist/registry/basic/label.d.ts +16 -0
- package/dist/registry/basic/menubar.d.ts +37 -0
- package/dist/registry/basic/native-select.d.ts +18 -0
- package/dist/registry/basic/navigation-menu.d.ts +25 -0
- package/dist/registry/basic/pagination.d.ts +7 -5
- package/dist/registry/basic/popover.d.ts +23 -0
- package/dist/registry/basic/progress.d.ts +7 -5
- package/dist/registry/basic/radio-group.d.ts +7 -5
- package/dist/registry/basic/resizable.d.ts +7 -5
- package/dist/registry/basic/scroll-area.d.ts +5 -0
- package/dist/registry/basic/select.d.ts +7 -5
- package/dist/registry/basic/separator.d.ts +16 -0
- package/dist/registry/basic/sheet.d.ts +13 -0
- package/dist/registry/basic/slider.d.ts +7 -5
- package/dist/registry/basic/sonner.d.ts +7 -5
- package/dist/registry/basic/switch.d.ts +7 -5
- package/dist/registry/basic/tabs.d.ts +7 -5
- package/dist/registry/basic/tag.d.ts +7 -5
- package/dist/registry/basic/textarea.d.ts +15 -0
- package/dist/registry/basic/theme-from-document.d.ts +7 -5
- package/dist/registry/basic/toggle.d.ts +1 -1
- package/dist/registry/basic/tooltip.d.ts +7 -5
- package/dist/registry/basic/typography.d.ts +7 -5
- package/dist/registry/chat/ask-user-part.d.ts +9 -3
- package/dist/registry/chat/browser-action-part.d.ts +9 -3
- package/dist/registry/chat/chat-input/compound.d.ts +7 -5
- package/dist/registry/chat/chat-input/context.d.ts +10 -6
- package/dist/registry/chat/chat-input/index.d.ts +7 -5
- package/dist/registry/chat/chat-input/types.d.ts +9 -3
- package/dist/registry/chat/chat-input/useAutoResizeTextarea.d.ts +9 -3
- package/dist/registry/chat/code-block-part.d.ts +9 -3
- package/dist/registry/chat/conversation-anchor-nav.d.ts +72 -0
- package/dist/registry/chat/file-attachment.d.ts +7 -5
- package/dist/registry/chat/file-review-part.d.ts +9 -4
- package/dist/registry/chat/generated-images-grid.d.ts +9 -3
- package/dist/registry/chat/generation-status-bar.d.ts +8 -4
- package/dist/registry/chat/hint-banner.d.ts +9 -3
- package/dist/registry/chat/mermaid-part.d.ts +9 -3
- package/dist/registry/chat/plan-part.d.ts +9 -3
- package/dist/registry/chat/reasoning-step/index.d.ts +8 -6
- package/dist/registry/chat/reasoning-step/types.d.ts +9 -3
- package/dist/registry/chat/related-prompts.d.ts +9 -3
- package/dist/registry/chat/response/index.d.ts +8 -6
- package/dist/registry/chat/response/types.d.ts +9 -3
- package/dist/registry/chat/task-part.d.ts +9 -3
- package/dist/registry/chat/terminal-code-block-part.d.ts +9 -3
- package/dist/registry/chat/tool-invocation-card.d.ts +2 -0
- package/dist/registry/chat/user-question/UserQuestionCard.d.ts +9 -3
- package/dist/registry/chat/user-question/UserQuestionFooter.d.ts +9 -3
- package/dist/registry/chat/user-question/UserQuestionHeader.d.ts +9 -3
- package/dist/registry/chat/user-question/types.d.ts +8 -5
- package/dist/registry/lib/file-icon-maps.d.ts +7 -7
- package/dist/registry/lib/utils.d.ts +8 -6
- package/dist/scale/presets/compact.css +16 -5
- package/dist/scale/presets/dense.css +13 -2
- package/dist/scale/presets/sharp.css +18 -6
- package/dist/scale/presets/soft.css +23 -1
- package/dist/spark-design.cjs.js +40 -36
- package/dist/spark-design.es.js +8653 -8663
- package/dist/sparkdesign.css +2 -0
- package/dist/src/components/basic/Alert/index.d.ts +13 -0
- package/dist/src/components/basic/AlertDialog/index.d.ts +7 -5
- package/dist/src/components/basic/AspectRatio/index.d.ts +13 -0
- package/dist/src/components/basic/Avatar/index.d.ts +9 -3
- package/dist/src/components/basic/Breadcrumb/index.d.ts +12 -0
- package/dist/src/components/basic/Button/index.d.ts +9 -3
- package/dist/src/components/basic/ButtonGroup/index.d.ts +13 -0
- package/dist/src/components/basic/Calendar/index.d.ts +13 -0
- package/dist/src/components/basic/Card/index.d.ts +13 -0
- package/dist/src/components/basic/Carousel/index.d.ts +12 -0
- package/dist/src/components/basic/Chart/index.d.ts +13 -0
- package/dist/src/components/basic/Checkbox/index.d.ts +13 -0
- package/dist/src/components/basic/Collapse/index.d.ts +7 -4
- package/dist/src/components/basic/Collapsible/index.d.ts +9 -4
- package/dist/src/components/basic/CollapsibleCard/index.d.ts +9 -3
- package/dist/src/components/basic/CollapsibleSection/index.d.ts +7 -7
- package/dist/src/components/basic/Combobox/index.d.ts +13 -0
- package/dist/src/components/basic/Command/index.d.ts +12 -0
- package/dist/src/components/basic/ContextMenu/index.d.ts +19 -0
- package/dist/src/components/basic/DataTable/index.d.ts +13 -0
- package/dist/src/components/basic/DatePicker/index.d.ts +13 -0
- package/dist/src/components/basic/Dialog/index.d.ts +16 -0
- package/dist/src/components/basic/Direction/index.d.ts +13 -0
- package/dist/src/components/basic/Drawer/index.d.ts +16 -0
- package/dist/src/components/basic/DropdownMenu/index.d.ts +7 -5
- package/dist/src/components/basic/EllipsisText/index.d.ts +7 -15
- package/dist/src/components/basic/Empty/index.d.ts +12 -0
- package/dist/src/components/basic/Field/index.d.ts +12 -0
- package/dist/src/components/basic/HoverCard/index.d.ts +16 -0
- package/dist/src/components/basic/IconButton/index.d.ts +9 -3
- package/dist/src/components/basic/Input/index.d.ts +13 -0
- package/dist/src/components/basic/InputGroup/index.d.ts +12 -0
- package/dist/src/components/basic/InputOTP/index.d.ts +12 -0
- package/dist/src/components/basic/Item/index.d.ts +12 -0
- package/dist/src/components/basic/Kbd/index.d.ts +9 -3
- package/dist/src/components/basic/Label/index.d.ts +13 -0
- package/dist/src/components/basic/Menubar/index.d.ts +12 -0
- package/dist/src/components/basic/NativeSelect/index.d.ts +12 -0
- package/dist/src/components/basic/NavigationMenu/index.d.ts +12 -0
- package/dist/src/components/basic/OptionList/index.d.ts +9 -3
- package/dist/src/components/basic/Pagination/index.d.ts +9 -3
- package/dist/src/components/basic/Popover/index.d.ts +16 -0
- package/dist/src/components/basic/Progress/index.d.ts +9 -3
- package/dist/src/components/basic/RadioGroup/index.d.ts +9 -3
- package/dist/src/components/basic/Resizable/index.d.ts +9 -3
- package/dist/src/components/basic/ScrollArea/index.d.ts +12 -0
- package/dist/src/components/basic/Scrollbar/index.d.ts +9 -3
- package/dist/src/components/basic/Select/index.d.ts +7 -4
- package/dist/src/components/basic/Separator/index.d.ts +13 -0
- package/dist/src/components/basic/Sheet/index.d.ts +13 -0
- package/dist/src/components/basic/ShimmeringText/index.d.ts +9 -3
- package/dist/src/components/basic/Skeleton/index.d.ts +9 -3
- package/dist/src/components/basic/Slider/index.d.ts +9 -3
- package/dist/src/components/basic/Spinner/index.d.ts +9 -3
- package/dist/src/components/basic/Switch/index.d.ts +8 -5
- package/dist/src/components/basic/Table/index.d.ts +9 -3
- package/dist/src/components/basic/Tabs/index.d.ts +9 -3
- package/dist/src/components/basic/Tag/index.d.ts +7 -4
- package/dist/src/components/basic/Textarea/index.d.ts +13 -0
- package/dist/src/components/basic/Toggle/index.d.ts +9 -3
- package/dist/src/components/basic/Tooltip/index.d.ts +7 -4
- package/dist/src/components/basic/Typography/index.d.ts +9 -3
- package/dist/src/components/chat/ConversationAnchorNav/index.d.ts +13 -0
- package/dist/src/components/chat/GeneratedImagesGrid/index.d.ts +9 -3
- package/dist/src/components/chat/GenerationStatusBar/index.d.ts +9 -3
- package/dist/src/components/chat/Markdown/demo-content.d.ts +1 -1
- package/dist/src/components/chat/Markdown/index.d.ts +9 -3
- package/dist/src/components/chat/Response/StreamingMarkdownBlock.d.ts +9 -3
- package/dist/src/components/chat/Response/index.d.ts +8 -6
- package/dist/src/components/chat/StreamingMarkdownBlock/index.d.ts +13 -0
- package/dist/src/components/chat/UserMessage/index.d.ts +9 -3
- package/dist/src/components/index.d.ts +64 -9
- package/dist/src/icons/context.d.ts +7 -6
- package/dist/src/icons/types.d.ts +7 -5
- package/dist/src/lib/ThemeStyleContext.d.ts +9 -9
- package/dist/src/lib/file-icon.d.ts +7 -6
- package/dist/src/lib/i18n.d.ts +7 -6
- package/dist/src/lib/index.d.ts +9 -3
- package/dist/src/lib/utils.d.ts +7 -5
- package/dist/theme-base.css +7 -8
- package/dist/theme.css +2 -2
- package/dist/themes/{dark-qoder.css → dark-mint.css} +1 -1
- package/dist/themes/{light-qoder.css → light-mint.css} +1 -1
- package/dist/tokens/AGENTS.md +48 -0
- package/dist/tokens/index.css +10 -19
- package/dist/tokens/scale/presets/compact.css +16 -5
- package/dist/tokens/scale/presets/dense.css +13 -2
- package/dist/tokens/scale/presets/sharp.css +18 -6
- package/dist/tokens/scale/presets/soft.css +23 -1
- package/dist/tokens/theme-base.css +7 -8
- package/dist/tokens/theme.css +2 -2
- package/dist/tokens/themes/dark-mint.css +133 -0
- package/dist/tokens/themes/light-mint.css +132 -0
- package/docs/agent/component-selection.md +60 -0
- package/docs/agent/token-ontology.md +37 -0
- package/package.json +41 -9
- package/registry/agent-manifest.json +794 -0
- package/registry/tokens/ontology.json +404 -0
- package/cli/registry/tokens/themes/dark-qoder.css +0 -132
- package/cli/registry/tokens/themes/light-qoder.css +0 -131
- package/dist/_basePickBy-DnQN8w3y.js +0 -151
- package/dist/_basePickBy-a-kPMlkg.cjs +0 -1
- package/dist/_baseUniq-B-N2NQ50.js +0 -614
- package/dist/_baseUniq-Cc_zbSif.cjs +0 -1
- package/dist/arc-BQBhijZ6.js +0 -83
- package/dist/arc-mWQt0Yph.cjs +0 -1
- package/dist/architectureDiagram-VXUJARFQ-BMZEucno.cjs +0 -36
- package/dist/architectureDiagram-VXUJARFQ-DTdjD3Bp.js +0 -4661
- package/dist/blockDiagram-VD42YOAC-CzHn0yob.js +0 -2256
- package/dist/blockDiagram-VD42YOAC-DDxdHAlz.cjs +0 -122
- package/dist/c4Diagram-YG6GDRKO-4Gz0I4gj.cjs +0 -10
- package/dist/c4Diagram-YG6GDRKO-BIy--yVN.js +0 -1580
- package/dist/channel-BQn0o8bs.js +0 -5
- package/dist/channel-DaN7XniJ.cjs +0 -1
- package/dist/chunk-4BX2VUAB-BlQFTQqz.cjs +0 -1
- package/dist/chunk-4BX2VUAB-Czitj3Kc.js +0 -8
- package/dist/chunk-55IACEB6-DXacNZbO.js +0 -8
- package/dist/chunk-55IACEB6-DnDxpye9.cjs +0 -1
- package/dist/chunk-B4BG7PRW-CBdN0q_V.js +0 -1375
- package/dist/chunk-B4BG7PRW-DbGvUkGO.cjs +0 -165
- package/dist/chunk-DI55MBZ5-D1YJMs6x.cjs +0 -220
- package/dist/chunk-DI55MBZ5-NCQTvayw.js +0 -1370
- package/dist/chunk-FMBD7UC4-CsGMbrtr.js +0 -19
- package/dist/chunk-FMBD7UC4-Di7cUUh5.cjs +0 -15
- package/dist/chunk-QN33PNHL-0j5LC8Lm.cjs +0 -1
- package/dist/chunk-QN33PNHL-3GERZBRm.js +0 -19
- package/dist/chunk-QZHKN3VN-AVEY9ImQ.js +0 -15
- package/dist/chunk-QZHKN3VN-s8Z0a8mc.cjs +0 -1
- package/dist/chunk-TZMSLE5B-CAf87HPt.cjs +0 -1
- package/dist/chunk-TZMSLE5B-sbiflal0.js +0 -64
- package/dist/classDiagram-2ON5EDUG-Ct9JLIN2.cjs +0 -1
- package/dist/classDiagram-2ON5EDUG-Dzfrft3a.js +0 -16
- package/dist/classDiagram-v2-WZHVMYZB-Ct9JLIN2.cjs +0 -1
- package/dist/classDiagram-v2-WZHVMYZB-Dzfrft3a.js +0 -16
- package/dist/clone-Cde_NQ8V.js +0 -8
- package/dist/clone-DCNjWuM2.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-0uLijMro.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-Bb08N431.js +0 -2608
- package/dist/cytoscape.esm-CNUX3VTg.cjs +0 -321
- package/dist/cytoscape.esm-Cvf3sx9F.js +0 -18704
- package/dist/dagre-6UL2VRFP-CY_Wz5Zd.js +0 -444
- package/dist/dagre-6UL2VRFP-Dxe7_qZc.cjs +0 -4
- package/dist/defaultLocale-BgPVtth8.js +0 -171
- package/dist/defaultLocale-C4wbwF1n.cjs +0 -1
- package/dist/diagram-PSM6KHXK-D2bdb7MT.js +0 -531
- package/dist/diagram-PSM6KHXK-YF69SUjY.cjs +0 -24
- package/dist/diagram-QEK2KX5R-BpUSoh0-.js +0 -217
- package/dist/diagram-QEK2KX5R-DZPGteon.cjs +0 -43
- package/dist/diagram-S2PKOQOG-ht-zdvFG.cjs +0 -24
- package/dist/diagram-S2PKOQOG-zFeLJ50Z.js +0 -142
- package/dist/erDiagram-Q2GNP2WA-B38iJ6ts.js +0 -841
- package/dist/erDiagram-Q2GNP2WA-RgS80DDU.cjs +0 -60
- package/dist/flowDiagram-NV44I4VS-BHilOs2p.cjs +0 -162
- package/dist/flowDiagram-NV44I4VS-BrBJcoce.js +0 -1620
- package/dist/ganttDiagram-JELNMOA3-pZiJeFio.cjs +0 -267
- package/dist/ganttDiagram-JELNMOA3-tw6FhkWJ.js +0 -2670
- package/dist/gitGraphDiagram-V2S2FVAM-BWn5uIK5.js +0 -699
- package/dist/gitGraphDiagram-V2S2FVAM-DKKeG-9R.cjs +0 -65
- package/dist/graph-DIbblrZP.cjs +0 -1
- package/dist/graph-DPcK91G3.js +0 -247
- package/dist/infoDiagram-HS3SLOUP-B8gwwhct.cjs +0 -2
- package/dist/infoDiagram-HS3SLOUP-D47PNcP_.js +0 -24
- package/dist/init-CHZsXQcr.cjs +0 -1
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/journeyDiagram-XKPGCS4Q-BG3cfhyU.js +0 -834
- package/dist/journeyDiagram-XKPGCS4Q-D8DVLJof.cjs +0 -139
- package/dist/kanban-definition-3W4ZIXB7-4OCnEouP.cjs +0 -89
- package/dist/kanban-definition-3W4ZIXB7-CWi_ssF9.js +0 -719
- package/dist/layout-Byuh8f-J.cjs +0 -1
- package/dist/layout-CdLdvj1j.js +0 -1335
- package/dist/linear-C2Q_PI9B.js +0 -259
- package/dist/linear-C69aPBW1.cjs +0 -1
- package/dist/mermaid.core-DBwAx_jp.cjs +0 -249
- package/dist/mermaid.core-gFR0XUlD.js +0 -15300
- package/dist/mindmap-definition-VGOIOE7T-8P7obVV4.cjs +0 -68
- package/dist/mindmap-definition-VGOIOE7T-DnOa7WJ9.js +0 -784
- package/dist/ordinal-B6-f3MAq.js +0 -61
- package/dist/ordinal-CagbB1m8.cjs +0 -1
- package/dist/pieDiagram-ADFJNKIX-5NAlvhMo.js +0 -161
- package/dist/pieDiagram-ADFJNKIX-CQBG4yR9.cjs +0 -30
- package/dist/qoder-design.css +0 -2
- package/dist/quadrantDiagram-AYHSOK5B-Oe4y7RZ0.cjs +0 -7
- package/dist/quadrantDiagram-AYHSOK5B-rh2DPEP1.js +0 -1022
- package/dist/requirementDiagram-UZGBJVZJ-DcWaCuXr.js +0 -850
- package/dist/requirementDiagram-UZGBJVZJ-gfdlrFiq.cjs +0 -64
- package/dist/sankeyDiagram-TZEHDZUN-CQIKFwD0.js +0 -810
- package/dist/sankeyDiagram-TZEHDZUN-DvPtzQvC.cjs +0 -10
- package/dist/sequenceDiagram-WL72ISMW-BNrsMagL.cjs +0 -145
- package/dist/sequenceDiagram-WL72ISMW-iCX3ckKx.js +0 -2511
- package/dist/stateDiagram-FKZM4ZOC-DBvJ_eeL.cjs +0 -1
- package/dist/stateDiagram-FKZM4ZOC-ZVsJlaHJ.js +0 -263
- package/dist/stateDiagram-v2-4FDKWEC3-CB_nTHcE.js +0 -16
- package/dist/stateDiagram-v2-4FDKWEC3-Xkx17v6T.cjs +0 -1
- package/dist/timeline-definition-IT6M3QCI-BmGkYQiz.cjs +0 -61
- package/dist/timeline-definition-IT6M3QCI-Ck8zTt6w.js +0 -795
- package/dist/tokens/CLAUDE.md +0 -305
- package/dist/treemap-GDKQZRPO-B9sfERx8.js +0 -17922
- package/dist/treemap-GDKQZRPO-BVfJRs0Z.cjs +0 -160
- package/dist/xychartDiagram-PRI3JC2R-By_S8NzN.js +0 -1340
- package/dist/xychartDiagram-PRI3JC2R-CNfDrGxM.cjs +0 -7
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
|
+
|
|
5
|
+
const alertVariants = cva(
|
|
6
|
+
'relative grid w-full items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm',
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: 'border-border-tertiary bg-bg-container text-text [&>svg]:text-text-secondary',
|
|
11
|
+
info: 'border-primary-border bg-primary-bg text-text [&>svg]:text-primary',
|
|
12
|
+
success: 'border-success-border bg-success-bg text-text [&>svg]:text-success',
|
|
13
|
+
warning: 'border-warning-border bg-warning-bg text-text [&>svg]:text-warning',
|
|
14
|
+
destructive: 'border-error-border bg-error-bg text-text [&>svg]:text-error',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: { variant: 'default' },
|
|
18
|
+
},
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
export interface AlertProps
|
|
22
|
+
extends React.HTMLAttributes<HTMLDivElement>,
|
|
23
|
+
VariantProps<typeof alertVariants> {}
|
|
24
|
+
|
|
25
|
+
const Alert = React.forwardRef<HTMLDivElement, AlertProps>(
|
|
26
|
+
({ className, variant, ...props }, ref) => (
|
|
27
|
+
<div
|
|
28
|
+
ref={ref}
|
|
29
|
+
role="alert"
|
|
30
|
+
className={cn(
|
|
31
|
+
alertVariants({ variant }),
|
|
32
|
+
'has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-3',
|
|
33
|
+
'[&>svg]:size-4 [&>svg]:translate-y-0.5',
|
|
34
|
+
className,
|
|
35
|
+
)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
),
|
|
39
|
+
)
|
|
40
|
+
Alert.displayName = 'Alert'
|
|
41
|
+
|
|
42
|
+
const AlertTitle = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
43
|
+
({ className, ...props }, ref) => (
|
|
44
|
+
<div
|
|
45
|
+
ref={ref}
|
|
46
|
+
className={cn(
|
|
47
|
+
'col-start-2 min-h-4 font-medium leading-5 tracking-tight text-text',
|
|
48
|
+
'line-clamp-1',
|
|
49
|
+
className,
|
|
50
|
+
)}
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
),
|
|
54
|
+
)
|
|
55
|
+
AlertTitle.displayName = 'AlertTitle'
|
|
56
|
+
|
|
57
|
+
const AlertDescription = React.forwardRef<
|
|
58
|
+
HTMLDivElement,
|
|
59
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
60
|
+
>(({ className, ...props }, ref) => (
|
|
61
|
+
<div
|
|
62
|
+
ref={ref}
|
|
63
|
+
className={cn(
|
|
64
|
+
'col-start-2 grid justify-items-start gap-1 text-sm leading-6 text-text-secondary',
|
|
65
|
+
'[&_p]:leading-6',
|
|
66
|
+
className,
|
|
67
|
+
)}
|
|
68
|
+
{...props}
|
|
69
|
+
/>
|
|
70
|
+
))
|
|
71
|
+
AlertDescription.displayName = 'AlertDescription'
|
|
72
|
+
|
|
73
|
+
export type AlertTitleProps = React.HTMLAttributes<HTMLDivElement>
|
|
74
|
+
export type AlertDescriptionProps = React.HTMLAttributes<HTMLDivElement>
|
|
75
|
+
|
|
76
|
+
export { Alert, AlertTitle, AlertDescription, alertVariants }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as React from 'react'
|
|
2
|
+
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio'
|
|
3
|
+
|
|
4
|
+
const AspectRatio = AspectRatioPrimitive.Root
|
|
5
|
+
|
|
6
|
+
export type AspectRatioProps = React.ComponentPropsWithoutRef<typeof AspectRatioPrimitive.Root>
|
|
7
|
+
|
|
8
|
+
export { AspectRatio }
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
import { MoreLine } from './icons-inline'
|
|
4
|
+
|
|
5
|
+
const Breadcrumb = React.forwardRef<
|
|
6
|
+
HTMLElement,
|
|
7
|
+
React.ComponentPropsWithoutRef<'nav'> & { separator?: React.ReactNode }
|
|
8
|
+
>(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />)
|
|
9
|
+
Breadcrumb.displayName = 'Breadcrumb'
|
|
10
|
+
|
|
11
|
+
const BreadcrumbList = React.forwardRef<HTMLOListElement, React.ComponentPropsWithoutRef<'ol'>>(
|
|
12
|
+
({ className, ...props }, ref) => (
|
|
13
|
+
<ol
|
|
14
|
+
ref={ref}
|
|
15
|
+
className={cn(
|
|
16
|
+
'flex flex-wrap items-center gap-1.5 text-sm text-text-tertiary break-words sm:gap-2.5',
|
|
17
|
+
className,
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
),
|
|
22
|
+
)
|
|
23
|
+
BreadcrumbList.displayName = 'BreadcrumbList'
|
|
24
|
+
|
|
25
|
+
const BreadcrumbItem = React.forwardRef<HTMLLIElement, React.ComponentPropsWithoutRef<'li'>>(
|
|
26
|
+
({ className, ...props }, ref) => (
|
|
27
|
+
<li ref={ref} className={cn('inline-flex items-center gap-1.5', className)} {...props} />
|
|
28
|
+
),
|
|
29
|
+
)
|
|
30
|
+
BreadcrumbItem.displayName = 'BreadcrumbItem'
|
|
31
|
+
|
|
32
|
+
const BreadcrumbLink = React.forwardRef<
|
|
33
|
+
HTMLAnchorElement,
|
|
34
|
+
React.ComponentPropsWithoutRef<'a'> & { asChild?: boolean }
|
|
35
|
+
>(({ className, asChild, ...props }, ref) => {
|
|
36
|
+
if (asChild) {
|
|
37
|
+
return (
|
|
38
|
+
<span
|
|
39
|
+
className={cn('transition-colors hover:text-text', className)}
|
|
40
|
+
{...(props as React.HTMLAttributes<HTMLSpanElement>)}
|
|
41
|
+
/>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
return (
|
|
45
|
+
<a
|
|
46
|
+
ref={ref}
|
|
47
|
+
className={cn('transition-colors hover:text-text', className)}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
50
|
+
)
|
|
51
|
+
})
|
|
52
|
+
BreadcrumbLink.displayName = 'BreadcrumbLink'
|
|
53
|
+
|
|
54
|
+
const BreadcrumbPage = React.forwardRef<HTMLSpanElement, React.ComponentPropsWithoutRef<'span'>>(
|
|
55
|
+
({ className, ...props }, ref) => (
|
|
56
|
+
<span
|
|
57
|
+
ref={ref}
|
|
58
|
+
role="link"
|
|
59
|
+
aria-disabled="true"
|
|
60
|
+
aria-current="page"
|
|
61
|
+
className={cn('font-normal text-text', className)}
|
|
62
|
+
{...props}
|
|
63
|
+
/>
|
|
64
|
+
),
|
|
65
|
+
)
|
|
66
|
+
BreadcrumbPage.displayName = 'BreadcrumbPage'
|
|
67
|
+
|
|
68
|
+
const BreadcrumbSeparator: React.FC<React.ComponentPropsWithoutRef<'li'>> = ({
|
|
69
|
+
children,
|
|
70
|
+
className,
|
|
71
|
+
...props
|
|
72
|
+
}) => (
|
|
73
|
+
<li
|
|
74
|
+
role="presentation"
|
|
75
|
+
aria-hidden="true"
|
|
76
|
+
className={cn('[&>svg]:size-3.5 text-text-tertiary', className)}
|
|
77
|
+
{...props}
|
|
78
|
+
>
|
|
79
|
+
{children ?? (
|
|
80
|
+
<svg
|
|
81
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
82
|
+
viewBox="0 0 24 24"
|
|
83
|
+
fill="currentColor"
|
|
84
|
+
aria-hidden
|
|
85
|
+
>
|
|
86
|
+
<path d="M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z" />
|
|
87
|
+
</svg>
|
|
88
|
+
)}
|
|
89
|
+
</li>
|
|
90
|
+
)
|
|
91
|
+
BreadcrumbSeparator.displayName = 'BreadcrumbSeparator'
|
|
92
|
+
|
|
93
|
+
const BreadcrumbEllipsis: React.FC<React.ComponentPropsWithoutRef<'span'>> = ({
|
|
94
|
+
className,
|
|
95
|
+
...props
|
|
96
|
+
}) => (
|
|
97
|
+
<span
|
|
98
|
+
role="presentation"
|
|
99
|
+
aria-hidden="true"
|
|
100
|
+
className={cn('flex size-9 items-center justify-center', className)}
|
|
101
|
+
{...props}
|
|
102
|
+
>
|
|
103
|
+
<MoreLine className="size-4" />
|
|
104
|
+
<span className="sr-only">More</span>
|
|
105
|
+
</span>
|
|
106
|
+
)
|
|
107
|
+
BreadcrumbEllipsis.displayName = 'BreadcrumbEllipsis'
|
|
108
|
+
|
|
109
|
+
export {
|
|
110
|
+
Breadcrumb,
|
|
111
|
+
BreadcrumbList,
|
|
112
|
+
BreadcrumbItem,
|
|
113
|
+
BreadcrumbLink,
|
|
114
|
+
BreadcrumbPage,
|
|
115
|
+
BreadcrumbSeparator,
|
|
116
|
+
BreadcrumbEllipsis,
|
|
117
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
|
+
|
|
5
|
+
const buttonGroupVariants = cva(
|
|
6
|
+
// isolate + z-10 on focused child keeps focus ring from being clipped by siblings.
|
|
7
|
+
'inline-flex isolate [&>*]:focus-visible:relative [&>*]:focus-visible:z-10',
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
orientation: {
|
|
11
|
+
horizontal:
|
|
12
|
+
'flex-row items-stretch [&>*:not(:first-child)]:-ml-px [&>*:not(:first-child)]:rounded-l-none [&>*:not(:last-child)]:rounded-r-none',
|
|
13
|
+
vertical:
|
|
14
|
+
'flex-col [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:rounded-t-none [&>*:not(:last-child)]:rounded-b-none',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
orientation: 'horizontal',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
export interface ButtonGroupProps
|
|
24
|
+
extends React.HTMLAttributes<HTMLDivElement>,
|
|
25
|
+
VariantProps<typeof buttonGroupVariants> {}
|
|
26
|
+
|
|
27
|
+
const ButtonGroup = React.forwardRef<HTMLDivElement, ButtonGroupProps>(
|
|
28
|
+
({ className, orientation = 'horizontal', ...props }, ref) => (
|
|
29
|
+
<div
|
|
30
|
+
ref={ref}
|
|
31
|
+
role="group"
|
|
32
|
+
data-orientation={orientation ?? 'horizontal'}
|
|
33
|
+
className={cn(buttonGroupVariants({ orientation }), className)}
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
),
|
|
37
|
+
)
|
|
38
|
+
ButtonGroup.displayName = 'ButtonGroup'
|
|
39
|
+
|
|
40
|
+
export type ButtonGroupTextProps = React.HTMLAttributes<HTMLDivElement>
|
|
41
|
+
|
|
42
|
+
const ButtonGroupText = React.forwardRef<HTMLDivElement, ButtonGroupTextProps>(
|
|
43
|
+
({ className, ...props }, ref) => (
|
|
44
|
+
<div
|
|
45
|
+
ref={ref}
|
|
46
|
+
className={cn(
|
|
47
|
+
'inline-flex h-9 shrink-0 items-center gap-1.5 rounded bg-fill-secondary px-3 text-sm font-medium text-text select-none',
|
|
48
|
+
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
49
|
+
className,
|
|
50
|
+
)}
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
),
|
|
54
|
+
)
|
|
55
|
+
ButtonGroupText.displayName = 'ButtonGroupText'
|
|
56
|
+
|
|
57
|
+
export interface ButtonGroupSeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
58
|
+
orientation?: 'horizontal' | 'vertical'
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const ButtonGroupSeparator = React.forwardRef<HTMLDivElement, ButtonGroupSeparatorProps>(
|
|
62
|
+
({ className, orientation = 'vertical', ...props }, ref) => (
|
|
63
|
+
<div
|
|
64
|
+
ref={ref}
|
|
65
|
+
role="separator"
|
|
66
|
+
aria-orientation={orientation}
|
|
67
|
+
data-orientation={orientation}
|
|
68
|
+
className={cn(
|
|
69
|
+
'shrink-0 self-stretch bg-border-tertiary',
|
|
70
|
+
orientation === 'vertical' ? 'w-px' : 'h-px w-full',
|
|
71
|
+
className,
|
|
72
|
+
)}
|
|
73
|
+
{...props}
|
|
74
|
+
/>
|
|
75
|
+
),
|
|
76
|
+
)
|
|
77
|
+
ButtonGroupSeparator.displayName = 'ButtonGroupSeparator'
|
|
78
|
+
|
|
79
|
+
export { ButtonGroup, ButtonGroupText, ButtonGroupSeparator, buttonGroupVariants }
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { forwardRef } from 'react'
|
|
2
2
|
import type { ButtonHTMLAttributes, ReactNode } from 'react'
|
|
3
3
|
import { cva, type VariantProps } from 'class-variance-authority'
|
|
4
|
-
import { cn } from '@/lib/utils'
|
|
5
4
|
|
|
6
5
|
const buttonVariants = cva(
|
|
7
6
|
'inline-flex items-center justify-center gap-1.5 font-medium transition-colors duration-200 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer',
|
|
@@ -11,6 +10,7 @@ const buttonVariants = cva(
|
|
|
11
10
|
primary: 'bg-primary text-text-on-primary hover:bg-primary-hover',
|
|
12
11
|
secondary: 'bg-bg-highlight text-text-on-primary hover:bg-bg-highlight-hover',
|
|
13
12
|
tertiary: 'bg-fill-secondary text-text hover:bg-fill',
|
|
13
|
+
outline: 'border border-border-tertiary bg-bg-container text-text hover:bg-fill-secondary',
|
|
14
14
|
ghost: 'bg-transparent text-text-secondary hover:bg-fill-secondary hover:text-text',
|
|
15
15
|
text: 'bg-transparent text-text-secondary hover:text-text',
|
|
16
16
|
},
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import {
|
|
3
|
+
ChevronDownIcon,
|
|
4
|
+
ChevronLeftIcon,
|
|
5
|
+
ChevronRightIcon,
|
|
6
|
+
} from "lucide-react"
|
|
7
|
+
import {
|
|
8
|
+
DayPicker,
|
|
9
|
+
getDefaultClassNames,
|
|
10
|
+
type DayButton,
|
|
11
|
+
} from "react-day-picker"
|
|
12
|
+
|
|
13
|
+
import { cn } from "@/lib/utils"
|
|
14
|
+
import { Button, buttonVariants } from "./button"
|
|
15
|
+
|
|
16
|
+
function Calendar({
|
|
17
|
+
className,
|
|
18
|
+
classNames,
|
|
19
|
+
showOutsideDays = true,
|
|
20
|
+
captionLayout = "label",
|
|
21
|
+
buttonVariant = "ghost",
|
|
22
|
+
formatters,
|
|
23
|
+
components,
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<typeof DayPicker> & {
|
|
26
|
+
buttonVariant?: React.ComponentProps<typeof Button>["variant"]
|
|
27
|
+
}) {
|
|
28
|
+
const defaultClassNames = getDefaultClassNames()
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<DayPicker
|
|
32
|
+
showOutsideDays={showOutsideDays}
|
|
33
|
+
className={cn(
|
|
34
|
+
"group/calendar bg-bg-base p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
35
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
36
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
37
|
+
className
|
|
38
|
+
)}
|
|
39
|
+
captionLayout={captionLayout}
|
|
40
|
+
formatters={{
|
|
41
|
+
formatMonthDropdown: (date) =>
|
|
42
|
+
date.toLocaleString("default", { month: "short" }),
|
|
43
|
+
...formatters,
|
|
44
|
+
}}
|
|
45
|
+
classNames={{
|
|
46
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
47
|
+
months: cn(
|
|
48
|
+
"relative flex flex-col gap-4 md:flex-row",
|
|
49
|
+
defaultClassNames.months
|
|
50
|
+
),
|
|
51
|
+
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
52
|
+
nav: cn(
|
|
53
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
54
|
+
defaultClassNames.nav
|
|
55
|
+
),
|
|
56
|
+
button_previous: cn(
|
|
57
|
+
buttonVariants({ variant: buttonVariant }),
|
|
58
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
59
|
+
defaultClassNames.button_previous
|
|
60
|
+
),
|
|
61
|
+
button_next: cn(
|
|
62
|
+
buttonVariants({ variant: buttonVariant }),
|
|
63
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
64
|
+
defaultClassNames.button_next
|
|
65
|
+
),
|
|
66
|
+
month_caption: cn(
|
|
67
|
+
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
68
|
+
defaultClassNames.month_caption
|
|
69
|
+
),
|
|
70
|
+
dropdowns: cn(
|
|
71
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
72
|
+
defaultClassNames.dropdowns
|
|
73
|
+
),
|
|
74
|
+
dropdown_root: cn(
|
|
75
|
+
"relative rounded-md border border-border-tertiary shadow-sm has-focus:border-primary-border has-focus:ring-[3px] has-focus:ring-primary-border/50",
|
|
76
|
+
defaultClassNames.dropdown_root
|
|
77
|
+
),
|
|
78
|
+
dropdown: cn(
|
|
79
|
+
"absolute inset-0 bg-bg-container opacity-0",
|
|
80
|
+
defaultClassNames.dropdown
|
|
81
|
+
),
|
|
82
|
+
caption_label: cn(
|
|
83
|
+
"font-medium select-none",
|
|
84
|
+
captionLayout === "label"
|
|
85
|
+
? "text-sm"
|
|
86
|
+
: "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-text-tertiary",
|
|
87
|
+
defaultClassNames.caption_label
|
|
88
|
+
),
|
|
89
|
+
table: "w-full border-collapse",
|
|
90
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
91
|
+
weekday: cn(
|
|
92
|
+
"flex-1 rounded-md text-[0.8rem] font-normal text-text-tertiary select-none",
|
|
93
|
+
defaultClassNames.weekday
|
|
94
|
+
),
|
|
95
|
+
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
96
|
+
week_number_header: cn(
|
|
97
|
+
"w-(--cell-size) select-none",
|
|
98
|
+
defaultClassNames.week_number_header
|
|
99
|
+
),
|
|
100
|
+
week_number: cn(
|
|
101
|
+
"text-[0.8rem] text-text-tertiary select-none",
|
|
102
|
+
defaultClassNames.week_number
|
|
103
|
+
),
|
|
104
|
+
day: cn(
|
|
105
|
+
"group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md",
|
|
106
|
+
props.showWeekNumber
|
|
107
|
+
? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md"
|
|
108
|
+
: "[&:first-child[data-selected=true]_button]:rounded-l-md",
|
|
109
|
+
defaultClassNames.day
|
|
110
|
+
),
|
|
111
|
+
range_start: cn(
|
|
112
|
+
"rounded-l-md bg-fill-secondary",
|
|
113
|
+
defaultClassNames.range_start
|
|
114
|
+
),
|
|
115
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
116
|
+
range_end: cn("rounded-r-md bg-fill-secondary", defaultClassNames.range_end),
|
|
117
|
+
today: cn(
|
|
118
|
+
"rounded-md bg-fill-secondary text-text data-[selected=true]:rounded-none",
|
|
119
|
+
defaultClassNames.today
|
|
120
|
+
),
|
|
121
|
+
outside: cn(
|
|
122
|
+
"text-text-tertiary aria-selected:text-text-tertiary",
|
|
123
|
+
defaultClassNames.outside
|
|
124
|
+
),
|
|
125
|
+
disabled: cn(
|
|
126
|
+
"text-text-tertiary opacity-50",
|
|
127
|
+
defaultClassNames.disabled
|
|
128
|
+
),
|
|
129
|
+
hidden: cn("invisible", defaultClassNames.hidden),
|
|
130
|
+
...classNames,
|
|
131
|
+
}}
|
|
132
|
+
components={{
|
|
133
|
+
Root: ({ className, rootRef, ...props }) => {
|
|
134
|
+
return (
|
|
135
|
+
<div
|
|
136
|
+
data-slot="calendar"
|
|
137
|
+
ref={rootRef}
|
|
138
|
+
className={cn(className)}
|
|
139
|
+
{...props}
|
|
140
|
+
/>
|
|
141
|
+
)
|
|
142
|
+
},
|
|
143
|
+
Chevron: ({ className, orientation, ...props }) => {
|
|
144
|
+
if (orientation === "left") {
|
|
145
|
+
return (
|
|
146
|
+
<ChevronLeftIcon className={cn("size-4", className)} {...props} />
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (orientation === "right") {
|
|
151
|
+
return (
|
|
152
|
+
<ChevronRightIcon
|
|
153
|
+
className={cn("size-4", className)}
|
|
154
|
+
{...props}
|
|
155
|
+
/>
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return (
|
|
160
|
+
<ChevronDownIcon className={cn("size-4", className)} {...props} />
|
|
161
|
+
)
|
|
162
|
+
},
|
|
163
|
+
DayButton: CalendarDayButton,
|
|
164
|
+
WeekNumber: ({ children, ...props }) => {
|
|
165
|
+
return (
|
|
166
|
+
<td {...props}>
|
|
167
|
+
<div className="flex size-(--cell-size) items-center justify-center text-center">
|
|
168
|
+
{children}
|
|
169
|
+
</div>
|
|
170
|
+
</td>
|
|
171
|
+
)
|
|
172
|
+
},
|
|
173
|
+
...components,
|
|
174
|
+
}}
|
|
175
|
+
{...props}
|
|
176
|
+
/>
|
|
177
|
+
)
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export type CalendarProps = React.ComponentProps<typeof DayPicker> & {
|
|
181
|
+
buttonVariant?: React.ComponentProps<typeof Button>["variant"]
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function CalendarDayButton({
|
|
185
|
+
className,
|
|
186
|
+
day,
|
|
187
|
+
modifiers,
|
|
188
|
+
...props
|
|
189
|
+
}: React.ComponentProps<typeof DayButton>) {
|
|
190
|
+
const defaultClassNames = getDefaultClassNames()
|
|
191
|
+
|
|
192
|
+
const ref = React.useRef<HTMLButtonElement>(null)
|
|
193
|
+
React.useEffect(() => {
|
|
194
|
+
if (modifiers.focused) ref.current?.focus()
|
|
195
|
+
}, [modifiers.focused])
|
|
196
|
+
|
|
197
|
+
return (
|
|
198
|
+
<button
|
|
199
|
+
ref={ref}
|
|
200
|
+
data-day={day.date.toLocaleDateString()}
|
|
201
|
+
data-selected-single={
|
|
202
|
+
modifiers.selected &&
|
|
203
|
+
!modifiers.range_start &&
|
|
204
|
+
!modifiers.range_end &&
|
|
205
|
+
!modifiers.range_middle
|
|
206
|
+
}
|
|
207
|
+
data-range-start={modifiers.range_start}
|
|
208
|
+
data-range-end={modifiers.range_end}
|
|
209
|
+
data-range-middle={modifiers.range_middle}
|
|
210
|
+
className={cn(
|
|
211
|
+
"inline-flex items-center justify-center transition-colors hover:bg-fill-secondary hover:text-text",
|
|
212
|
+
"flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 px-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-primary-border group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-primary-border/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-text-on-primary data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-fill-secondary data-[range-middle=true]:text-text data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-text-on-primary data-[selected-single=true]:bg-primary data-[selected-single=true]:text-text-on-primary dark:hover:text-text [&>span]:text-xs [&>span]:opacity-70",
|
|
213
|
+
defaultClassNames.day,
|
|
214
|
+
className
|
|
215
|
+
)}
|
|
216
|
+
{...props}
|
|
217
|
+
/>
|
|
218
|
+
)
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export { Calendar, CalendarDayButton }
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
|
|
4
|
+
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
5
|
+
({ className, ...props }, ref) => (
|
|
6
|
+
<div
|
|
7
|
+
ref={ref}
|
|
8
|
+
className={cn(
|
|
9
|
+
'flex flex-col gap-4 rounded-xl border border-border-tertiary bg-bg-container text-text shadow-sm',
|
|
10
|
+
'py-6',
|
|
11
|
+
className,
|
|
12
|
+
)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
),
|
|
16
|
+
)
|
|
17
|
+
Card.displayName = 'Card'
|
|
18
|
+
|
|
19
|
+
const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
20
|
+
({ className, ...props }, ref) => (
|
|
21
|
+
<div
|
|
22
|
+
ref={ref}
|
|
23
|
+
className={cn(
|
|
24
|
+
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6',
|
|
25
|
+
'has-data-[slot=card-action]:grid-cols-[1fr_auto]',
|
|
26
|
+
'[.border-b]:pb-4',
|
|
27
|
+
className,
|
|
28
|
+
)}
|
|
29
|
+
{...props}
|
|
30
|
+
/>
|
|
31
|
+
),
|
|
32
|
+
)
|
|
33
|
+
CardHeader.displayName = 'CardHeader'
|
|
34
|
+
|
|
35
|
+
const CardTitle = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
36
|
+
({ className, ...props }, ref) => (
|
|
37
|
+
<div
|
|
38
|
+
ref={ref}
|
|
39
|
+
className={cn('text-base font-semibold leading-none text-text', className)}
|
|
40
|
+
{...props}
|
|
41
|
+
/>
|
|
42
|
+
),
|
|
43
|
+
)
|
|
44
|
+
CardTitle.displayName = 'CardTitle'
|
|
45
|
+
|
|
46
|
+
const CardDescription = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
47
|
+
({ className, ...props }, ref) => (
|
|
48
|
+
<div
|
|
49
|
+
ref={ref}
|
|
50
|
+
className={cn('text-sm leading-6 text-text-tertiary', className)}
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
),
|
|
54
|
+
)
|
|
55
|
+
CardDescription.displayName = 'CardDescription'
|
|
56
|
+
|
|
57
|
+
const CardAction = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
58
|
+
({ className, ...props }, ref) => (
|
|
59
|
+
<div
|
|
60
|
+
ref={ref}
|
|
61
|
+
data-slot="card-action"
|
|
62
|
+
className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}
|
|
63
|
+
{...props}
|
|
64
|
+
/>
|
|
65
|
+
),
|
|
66
|
+
)
|
|
67
|
+
CardAction.displayName = 'CardAction'
|
|
68
|
+
|
|
69
|
+
const CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
70
|
+
({ className, ...props }, ref) => (
|
|
71
|
+
<div ref={ref} className={cn('px-6', className)} {...props} />
|
|
72
|
+
),
|
|
73
|
+
)
|
|
74
|
+
CardContent.displayName = 'CardContent'
|
|
75
|
+
|
|
76
|
+
const CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
77
|
+
({ className, ...props }, ref) => (
|
|
78
|
+
<div
|
|
79
|
+
ref={ref}
|
|
80
|
+
className={cn('flex items-center px-6 [.border-t]:pt-4', className)}
|
|
81
|
+
{...props}
|
|
82
|
+
/>
|
|
83
|
+
),
|
|
84
|
+
)
|
|
85
|
+
CardFooter.displayName = 'CardFooter'
|
|
86
|
+
|
|
87
|
+
export type CardProps = React.HTMLAttributes<HTMLDivElement>
|
|
88
|
+
export type CardHeaderProps = React.HTMLAttributes<HTMLDivElement>
|
|
89
|
+
export type CardTitleProps = React.HTMLAttributes<HTMLDivElement>
|
|
90
|
+
export type CardDescriptionProps = React.HTMLAttributes<HTMLDivElement>
|
|
91
|
+
export type CardActionProps = React.HTMLAttributes<HTMLDivElement>
|
|
92
|
+
export type CardContentProps = React.HTMLAttributes<HTMLDivElement>
|
|
93
|
+
export type CardFooterProps = React.HTMLAttributes<HTMLDivElement>
|
|
94
|
+
|
|
95
|
+
export {
|
|
96
|
+
Card,
|
|
97
|
+
CardHeader,
|
|
98
|
+
CardTitle,
|
|
99
|
+
CardDescription,
|
|
100
|
+
CardAction,
|
|
101
|
+
CardContent,
|
|
102
|
+
CardFooter,
|
|
103
|
+
}
|