@conscience-technology/ovenn 0.0.0-stage → 0.6.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/README.md +189 -2
- package/assets/components/AIMessage/AIMessage.module.css +149 -0
- package/assets/components/AIMessage/AIMessage.tsx +106 -0
- package/assets/components/AIMessage/index.ts +2 -0
- package/assets/components/Accordion/Accordion.module.css +262 -0
- package/assets/components/Accordion/Accordion.tsx +209 -0
- package/assets/components/Accordion/index.ts +7 -0
- package/assets/components/AppFrame/AppFrame.module.css +198 -0
- package/assets/components/AppFrame/AppFrame.tsx +93 -0
- package/assets/components/AppFrame/index.ts +6 -0
- package/assets/components/AttachmentItem/AttachmentItem.module.css +118 -0
- package/assets/components/AttachmentItem/AttachmentItem.tsx +185 -0
- package/assets/components/AttachmentItem/index.ts +6 -0
- package/assets/components/AttachmentThumb/AttachmentThumb.module.css +137 -0
- package/assets/components/AttachmentThumb/AttachmentThumb.tsx +102 -0
- package/assets/components/AttachmentThumb/index.ts +2 -0
- package/assets/components/Avatar/Avatar.module.css +201 -0
- package/assets/components/Avatar/Avatar.tsx +283 -0
- package/assets/components/Avatar/index.ts +9 -0
- package/assets/components/AvatarUpload/AvatarUpload.module.css +82 -0
- package/assets/components/AvatarUpload/AvatarUpload.tsx +155 -0
- package/assets/components/AvatarUpload/index.ts +2 -0
- package/assets/components/Badge/Badge.module.css +152 -0
- package/assets/components/Badge/Badge.tsx +109 -0
- package/assets/components/Badge/index.ts +2 -0
- package/assets/components/BrandSet/BrandSetController.tsx +56 -0
- package/assets/components/BrandSet/index.ts +14 -0
- package/assets/components/BrandSet/resolve.ts +10 -0
- package/assets/components/BrandSet/types.ts +43 -0
- package/assets/components/Breadcrumb/Breadcrumb.module.css +277 -0
- package/assets/components/Breadcrumb/Breadcrumb.tsx +352 -0
- package/assets/components/Breadcrumb/index.ts +8 -0
- package/assets/components/Bubble/Bubble.module.css +65 -0
- package/assets/components/Bubble/Bubble.tsx +63 -0
- package/assets/components/Bubble/index.ts +2 -0
- package/assets/components/Button/Button.module.css +336 -0
- package/assets/components/Button/Button.tsx +217 -0
- package/assets/components/Button/index.ts +2 -0
- package/assets/components/ButtonGroup/ButtonGroup.tsx +22 -0
- package/assets/components/ButtonGroup/index.ts +5 -0
- package/assets/components/Callout/Callout.module.css +146 -0
- package/assets/components/Callout/Callout.tsx +207 -0
- package/assets/components/Callout/index.ts +2 -0
- package/assets/components/CanvasNode/CanvasNode.module.css +110 -0
- package/assets/components/CanvasNode/CanvasNode.tsx +77 -0
- package/assets/components/CanvasNode/index.ts +2 -0
- package/assets/components/CanvasNode/tokens.css +26 -0
- package/assets/components/Card/Card.module.css +122 -0
- package/assets/components/Card/Card.tsx +88 -0
- package/assets/components/Card/index.ts +2 -0
- package/assets/components/ChatInput/ChatInput.module.css +373 -0
- package/assets/components/ChatInput/ChatInput.tsx +362 -0
- package/assets/components/ChatInput/ModelSelector.tsx +48 -0
- package/assets/components/ChatInput/SendButton.tsx +72 -0
- package/assets/components/ChatInput/index.ts +12 -0
- package/assets/components/Checkbox/Checkbox.module.css +147 -0
- package/assets/components/Checkbox/Checkbox.tsx +44 -0
- package/assets/components/Checkbox/index.ts +2 -0
- package/assets/components/CheckboxCard/CheckboxCard.module.css +177 -0
- package/assets/components/CheckboxCard/CheckboxCard.tsx +83 -0
- package/assets/components/CheckboxCard/index.ts +2 -0
- package/assets/components/Chip/Chip.module.css +219 -0
- package/assets/components/Chip/Chip.tsx +219 -0
- package/assets/components/Chip/index.ts +2 -0
- package/assets/components/Code/Code.module.css +25 -0
- package/assets/components/Code/Code.tsx +26 -0
- package/assets/components/Code/index.ts +2 -0
- package/assets/components/CodeBlock/CodeBlock.module.css +255 -0
- package/assets/components/CodeBlock/CodeBlock.tsx +283 -0
- package/assets/components/CodeBlock/copy-code.ts +15 -0
- package/assets/components/CodeBlock/index.ts +2 -0
- package/assets/components/ColorArea/ColorArea.module.css +145 -0
- package/assets/components/ColorArea/ColorArea.tsx +156 -0
- package/assets/components/ColorArea/index.ts +2 -0
- package/assets/components/ColorField/ColorField.module.css +195 -0
- package/assets/components/ColorField/ColorField.tsx +372 -0
- package/assets/components/ColorField/index.ts +2 -0
- package/assets/components/ColorSlider/ColorSlider.module.css +167 -0
- package/assets/components/ColorSlider/ColorSlider.tsx +165 -0
- package/assets/components/ColorSlider/index.ts +15 -0
- package/assets/components/ColorSwatch/ColorSwatch.module.css +35 -0
- package/assets/components/ColorSwatch/ColorSwatch.tsx +69 -0
- package/assets/components/ColorSwatch/index.ts +2 -0
- package/assets/components/ColorSwatchPicker/ColorSwatchPicker.module.css +114 -0
- package/assets/components/ColorSwatchPicker/ColorSwatchPicker.tsx +183 -0
- package/assets/components/ColorSwatchPicker/index.ts +15 -0
- package/assets/components/Combobox/Combobox.module.css +13 -0
- package/assets/components/Combobox/Combobox.tsx +107 -0
- package/assets/components/Combobox/index.ts +2 -0
- package/assets/components/CommandPalette/CommandPalette.module.css +269 -0
- package/assets/components/CommandPalette/CommandPalette.tsx +423 -0
- package/assets/components/CommandPalette/index.ts +9 -0
- package/assets/components/CommandPalette/useCommandPaletteHotkey.ts +49 -0
- package/assets/components/ContextMenu/ContextMenu.module.css +118 -0
- package/assets/components/ContextMenu/ContextMenu.tsx +415 -0
- package/assets/components/ContextMenu/index.ts +9 -0
- package/assets/components/ControlGroup/ControlGroup.module.css +313 -0
- package/assets/components/ControlGroup/ControlGroup.tsx +69 -0
- package/assets/components/ControlGroup/context.tsx +12 -0
- package/assets/components/ControlGroup/index.ts +3 -0
- package/assets/components/ControlGroup/size.ts +9 -0
- package/assets/components/DataTable/DataTable.module.css +55 -0
- package/assets/components/DataTable/DataTable.tsx +137 -0
- package/assets/components/DataTable/index.ts +4 -0
- package/assets/components/DataTable/state.ts +34 -0
- package/assets/components/DatePicker/Calendar.tsx +485 -0
- package/assets/components/DatePicker/DESIGN_NOTES.md +106 -0
- package/assets/components/DatePicker/DESIGN_NOTES_TIME.md +125 -0
- package/assets/components/DatePicker/DateField.tsx +303 -0
- package/assets/components/DatePicker/DatePicker.module.css +590 -0
- package/assets/components/DatePicker/DatePicker.tsx +520 -0
- package/assets/components/DatePicker/TimeSelector.tsx +77 -0
- package/assets/components/DatePicker/index.ts +11 -0
- package/assets/components/DatePicker/presets.ts +84 -0
- package/assets/components/DatePicker/utils.ts +214 -0
- package/assets/components/Disclosure/Disclosure.module.css +73 -0
- package/assets/components/Disclosure/Disclosure.tsx +129 -0
- package/assets/components/Disclosure/index.ts +6 -0
- package/assets/components/Drawer/Drawer.module.css +190 -0
- package/assets/components/Drawer/Drawer.tsx +226 -0
- package/assets/components/Drawer/index.ts +15 -0
- package/assets/components/DropdownMenu/DropdownMenu.module.css +26 -0
- package/assets/components/DropdownMenu/DropdownMenu.tsx +395 -0
- package/assets/components/DropdownMenu/index.ts +9 -0
- package/assets/components/EmptyState/EmptyState.module.css +102 -0
- package/assets/components/EmptyState/EmptyState.tsx +80 -0
- package/assets/components/EmptyState/index.ts +2 -0
- package/assets/components/EventChip/EventChip.module.css +76 -0
- package/assets/components/EventChip/EventChip.tsx +47 -0
- package/assets/components/EventChip/index.ts +2 -0
- package/assets/components/EventListItem/EventListItem.module.css +220 -0
- package/assets/components/EventListItem/EventListItem.tsx +226 -0
- package/assets/components/EventListItem/index.ts +8 -0
- package/assets/components/FileIcon/FileIcon.module.css +76 -0
- package/assets/components/FileIcon/FileIcon.tsx +142 -0
- package/assets/components/FileIcon/fileExtMap.ts +166 -0
- package/assets/components/FileIcon/index.ts +9 -0
- package/assets/components/FileUpload/FileUpload.module.css +12 -0
- package/assets/components/FileUpload/FileUpload.tsx +100 -0
- package/assets/components/FileUpload/index.ts +2 -0
- package/assets/components/FileUpload/utils.ts +8 -0
- package/assets/components/GalleryItem/GalleryItem.module.css +220 -0
- package/assets/components/GalleryItem/GalleryItem.tsx +163 -0
- package/assets/components/GalleryItem/index.ts +7 -0
- package/assets/components/GeneratedImage/GeneratedImage.module.css +91 -0
- package/assets/components/GeneratedImage/GeneratedImage.tsx +84 -0
- package/assets/components/GeneratedImage/index.ts +5 -0
- package/assets/components/Hint/Hint.module.css +75 -0
- package/assets/components/Hint/Hint.tsx +89 -0
- package/assets/components/Hint/index.ts +2 -0
- package/assets/components/Icon/Icon.tsx +1478 -0
- package/assets/components/Icon/context.tsx +39 -0
- package/assets/components/Icon/index.ts +4 -0
- package/assets/components/IconButton/IconButton.module.css +116 -0
- package/assets/components/IconButton/IconButton.tsx +113 -0
- package/assets/components/IconButton/index.ts +2 -0
- package/assets/components/Input/Input.module.css +357 -0
- package/assets/components/Input/Input.tsx +424 -0
- package/assets/components/Input/index.ts +2 -0
- package/assets/components/Kanban/Kanban.module.css +347 -0
- package/assets/components/Kanban/Kanban.tsx +371 -0
- package/assets/components/Kanban/index.ts +10 -0
- package/assets/components/ListItem/ListItem.module.css +232 -0
- package/assets/components/ListItem/ListItem.tsx +262 -0
- package/assets/components/ListItem/index.ts +9 -0
- package/assets/components/MenuItem/MenuItem.module.css +601 -0
- package/assets/components/MenuItem/MenuItem.tsx +704 -0
- package/assets/components/MenuItem/index.ts +8 -0
- package/assets/components/MessageActions/MessageActions.module.css +43 -0
- package/assets/components/MessageActions/MessageActions.tsx +114 -0
- package/assets/components/MessageActions/index.ts +6 -0
- package/assets/components/MessageQuote/MessageQuote.module.css +29 -0
- package/assets/components/MessageQuote/MessageQuote.tsx +33 -0
- package/assets/components/MessageQuote/index.ts +2 -0
- package/assets/components/MessageSources/MessageSources.module.css +58 -0
- package/assets/components/MessageSources/MessageSources.tsx +60 -0
- package/assets/components/MessageSources/index.ts +2 -0
- package/assets/components/MessageState/MessageState.module.css +118 -0
- package/assets/components/MessageState/MessageState.tsx +150 -0
- package/assets/components/MessageState/index.ts +2 -0
- package/assets/components/MessageTable/MessageTable.module.css +59 -0
- package/assets/components/MessageTable/MessageTable.tsx +21 -0
- package/assets/components/MessageTable/index.ts +2 -0
- package/assets/components/MetricCard/MetricCard.module.css +153 -0
- package/assets/components/MetricCard/MetricCard.tsx +140 -0
- package/assets/components/MetricCard/index.ts +2 -0
- package/assets/components/Modal/Modal.module.css +285 -0
- package/assets/components/Modal/Modal.tsx +398 -0
- package/assets/components/Modal/index.ts +22 -0
- package/assets/components/MultiSelect/MultiSelect.tsx +7 -0
- package/assets/components/MultiSelect/index.ts +2 -0
- package/assets/components/Onboarding/DocsIndex.tsx +102 -0
- package/assets/components/Onboarding/LayoutBuilder.tsx +204 -0
- package/assets/components/Onboarding/Onboarding.module.css +1561 -0
- package/assets/components/Onboarding/OnboardingAxisPanel.tsx +516 -0
- package/assets/components/Onboarding/OnboardingPage.tsx +1481 -0
- package/assets/components/Onboarding/PresetsGallery.tsx +56 -0
- package/assets/components/Onboarding/actions.ts +524 -0
- package/assets/components/Onboarding/index.ts +8 -0
- package/assets/components/Onboarding/palette.css +40 -0
- package/assets/components/Onboarding/wizardData.ts +529 -0
- package/assets/components/PageHeader/PageHeader.module.css +119 -0
- package/assets/components/PageHeader/PageHeader.tsx +126 -0
- package/assets/components/PageHeader/index.ts +2 -0
- package/assets/components/Pagination/Pagination.module.css +132 -0
- package/assets/components/Pagination/Pagination.tsx +294 -0
- package/assets/components/Pagination/index.ts +6 -0
- package/assets/components/ProgressBar/ProgressBar.module.css +127 -0
- package/assets/components/ProgressBar/ProgressBar.tsx +90 -0
- package/assets/components/ProgressBar/index.ts +7 -0
- package/assets/components/QuotationBar/QuotationBar.module.css +61 -0
- package/assets/components/QuotationBar/QuotationBar.tsx +60 -0
- package/assets/components/QuotationBar/index.ts +2 -0
- package/assets/components/Radio/Radio.module.css +123 -0
- package/assets/components/Radio/Radio.tsx +39 -0
- package/assets/components/Radio/index.ts +2 -0
- package/assets/components/RadioCard/RadioCard.module.css +208 -0
- package/assets/components/RadioCard/RadioCard.tsx +164 -0
- package/assets/components/RadioCard/index.ts +2 -0
- package/assets/components/SegmentedChart/SegmentedChart.module.css +221 -0
- package/assets/components/SegmentedChart/SegmentedChart.tsx +104 -0
- package/assets/components/SegmentedChart/index.ts +2 -0
- package/assets/components/Select/Select.module.css +161 -0
- package/assets/components/Select/Select.tsx +450 -0
- package/assets/components/Select/index.ts +10 -0
- package/assets/components/Shortcut/Shortcut.module.css +77 -0
- package/assets/components/Shortcut/Shortcut.tsx +206 -0
- package/assets/components/Shortcut/index.ts +2 -0
- package/assets/components/Sidebar/Sidebar.module.css +406 -0
- package/assets/components/Sidebar/Sidebar.tsx +585 -0
- package/assets/components/Sidebar/index.ts +7 -0
- package/assets/components/Slider/Slider.module.css +134 -0
- package/assets/components/Slider/Slider.tsx +99 -0
- package/assets/components/Slider/index.ts +2 -0
- package/assets/components/Spinner/LottiePlayer.tsx +179 -0
- package/assets/components/Spinner/Spinner.module.css +205 -0
- package/assets/components/Spinner/Spinner.tsx +133 -0
- package/assets/components/Spinner/index.ts +10 -0
- package/assets/components/Spinner/lottieColor.ts +166 -0
- package/assets/components/Spinner/lottieManifest.ts +100 -0
- package/assets/components/Stepper/Stepper.module.css +330 -0
- package/assets/components/Stepper/Stepper.tsx +244 -0
- package/assets/components/Stepper/index.ts +2 -0
- package/assets/components/Switch/Switch.module.css +163 -0
- package/assets/components/Switch/Switch.tsx +73 -0
- package/assets/components/Switch/index.ts +2 -0
- package/assets/components/TabStrip/TabStrip.module.css +358 -0
- package/assets/components/TabStrip/TabStrip.tsx +404 -0
- package/assets/components/TabStrip/index.ts +7 -0
- package/assets/components/TableCell/TableCell.module.css +130 -0
- package/assets/components/TableCell/TableCellAvatar.tsx +66 -0
- package/assets/components/TableCell/TableCellBadge.tsx +26 -0
- package/assets/components/TableCell/TableCellImage.tsx +49 -0
- package/assets/components/TableCell/TableCellMeter.tsx +55 -0
- package/assets/components/TableCell/TableCellNumber.tsx +43 -0
- package/assets/components/TableCell/TableCellText.tsx +33 -0
- package/assets/components/TableCell/index.ts +19 -0
- package/assets/components/TableHeader/TableHeader.module.css +351 -0
- package/assets/components/TableHeader/TableHeader.tsx +658 -0
- package/assets/components/TableHeader/index.ts +9 -0
- package/assets/components/TableRow/TableRow.module.css +352 -0
- package/assets/components/TableRow/TableRow.tsx +292 -0
- package/assets/components/TableRow/index.ts +8 -0
- package/assets/components/TableRowEdit/TableRowEdit.module.css +162 -0
- package/assets/components/TableRowEdit/TableRowEdit.tsx +279 -0
- package/assets/components/TableRowEdit/index.ts +2 -0
- package/assets/components/TableRowSelect/TableRowSelect.module.css +23 -0
- package/assets/components/TableRowSelect/TableRowSelect.tsx +173 -0
- package/assets/components/TableRowSelect/index.ts +2 -0
- package/assets/components/TableToolbar/TableToolbar.module.css +37 -0
- package/assets/components/TableToolbar/TableToolbar.tsx +105 -0
- package/assets/components/TableToolbar/index.ts +5 -0
- package/assets/components/Tabs/Tabs.module.css +372 -0
- package/assets/components/Tabs/Tabs.tsx +517 -0
- package/assets/components/Tabs/index.ts +9 -0
- package/assets/components/TemplateBoundary/TemplateBoundary.module.css +4 -0
- package/assets/components/TemplateBoundary/TemplateBoundary.tsx +50 -0
- package/assets/components/TemplateBoundary/index.ts +3 -0
- package/assets/components/TemplateBoundary/types.ts +23 -0
- package/assets/components/Textarea/Textarea.module.css +343 -0
- package/assets/components/Textarea/Textarea.tsx +438 -0
- package/assets/components/Textarea/index.ts +7 -0
- package/assets/components/ThemeController.tsx +369 -0
- package/assets/components/TimePicker/TimePicker.module.css +112 -0
- package/assets/components/TimePicker/TimePicker.tsx +403 -0
- package/assets/components/TimePicker/index.ts +8 -0
- package/assets/components/TimePicker/utils.ts +116 -0
- package/assets/components/Toast/Toast.module.css +332 -0
- package/assets/components/Toast/Toast.tsx +310 -0
- package/assets/components/Toast/index.ts +16 -0
- package/assets/components/Toolbar/Toolbar.module.css +128 -0
- package/assets/components/Toolbar/Toolbar.tsx +186 -0
- package/assets/components/Toolbar/index.ts +7 -0
- package/assets/components/Tooltip/Tooltip.module.css +42 -0
- package/assets/components/Tooltip/Tooltip.tsx +332 -0
- package/assets/components/Tooltip/index.ts +2 -0
- package/assets/components/TopLoader/TopLoader.module.css +64 -0
- package/assets/components/TopLoader/TopLoader.tsx +58 -0
- package/assets/components/TopLoader/index.ts +2 -0
- package/assets/components/Topbar/Topbar.module.css +54 -0
- package/assets/components/Topbar/Topbar.tsx +102 -0
- package/assets/components/Topbar/index.ts +2 -0
- package/assets/components/TreeNav/TreeNav.module.css +32 -0
- package/assets/components/TreeNav/TreeNav.tsx +130 -0
- package/assets/components/TreeNav/index.ts +2 -0
- package/assets/components/UserMessage/UserMessage.module.css +47 -0
- package/assets/components/UserMessage/UserMessage.tsx +66 -0
- package/assets/components/UserMessage/index.ts +2 -0
- package/assets/components/_cn.ts +3 -0
- package/assets/components/_color.ts +75 -0
- package/assets/components/_data.ts +607 -0
- package/assets/components/_rowInteraction.ts +16 -0
- package/assets/components/_utils.css +130 -0
- package/assets/components/app-shell.css +17 -0
- package/assets/components/axisOptions.ts +15 -0
- package/assets/components/component-registry.json +914 -0
- package/assets/components/index.ts +102 -0
- package/assets/components/reset.css +77 -0
- package/assets/components/themeBootScript.ts +124 -0
- package/assets/components/tokens.css +1121 -0
- package/assets/prompts/ASSEMBLY.md +70 -0
- package/assets/prompts/CASCADE.md +49 -0
- package/assets/prompts/CATALOG.md +127 -0
- package/assets/prompts/GUIDE.md +307 -0
- package/assets/prompts/MEMORY.md +202 -0
- package/assets/prompts/OVERRIDE.md +30 -0
- package/assets/prompts/PRINCIPLES.md +114 -0
- package/assets/prompts/SLOTS.md +194 -0
- package/assets/prompts/WORKFLOW_DESIGN.md +156 -0
- package/assets/prompts/axes/density.md +42 -0
- package/assets/prompts/axes/font.md +30 -0
- package/assets/prompts/axes/icon.md +57 -0
- package/assets/prompts/axes/mode.md +52 -0
- package/assets/prompts/axes/motion.md +77 -0
- package/assets/prompts/axes/palette.md +50 -0
- package/assets/prompts/axes/shape.md +33 -0
- package/assets/prompts/axes/voice.md +57 -0
- package/assets/prompts/brand-sets/_SCHEMA.md +27 -0
- package/assets/prompts/components/README.md +84 -0
- package/assets/prompts/components/_variants.md +86 -0
- package/assets/prompts/components/accordion.md +151 -0
- package/assets/prompts/components/ai-message.md +53 -0
- package/assets/prompts/components/app-frame.md +141 -0
- package/assets/prompts/components/attachment-item.md +88 -0
- package/assets/prompts/components/attachment-thumb.md +54 -0
- package/assets/prompts/components/avatar-upload.md +62 -0
- package/assets/prompts/components/avatar.md +106 -0
- package/assets/prompts/components/badge.md +123 -0
- package/assets/prompts/components/breadcrumb.md +123 -0
- package/assets/prompts/components/bubble.md +61 -0
- package/assets/prompts/components/button-group.md +35 -0
- package/assets/prompts/components/button.md +133 -0
- package/assets/prompts/components/callout.md +98 -0
- package/assets/prompts/components/canvas-node.md +63 -0
- package/assets/prompts/components/card.md +167 -0
- package/assets/prompts/components/chat-input.md +103 -0
- package/assets/prompts/components/checkbox-card.md +72 -0
- package/assets/prompts/components/checkbox.md +98 -0
- package/assets/prompts/components/chip.md +163 -0
- package/assets/prompts/components/code-block.md +94 -0
- package/assets/prompts/components/code.md +62 -0
- package/assets/prompts/components/color-area.md +95 -0
- package/assets/prompts/components/color-field.md +108 -0
- package/assets/prompts/components/color-slider.md +108 -0
- package/assets/prompts/components/color-swatch-picker.md +96 -0
- package/assets/prompts/components/color-swatch.md +85 -0
- package/assets/prompts/components/combobox.md +35 -0
- package/assets/prompts/components/command-palette.md +193 -0
- package/assets/prompts/components/context-menu.md +150 -0
- package/assets/prompts/components/control-group.md +67 -0
- package/assets/prompts/components/data-table.md +81 -0
- package/assets/prompts/components/date-picker.md +146 -0
- package/assets/prompts/components/disclosure.md +55 -0
- package/assets/prompts/components/drawer.md +141 -0
- package/assets/prompts/components/dropdown-menu.md +165 -0
- package/assets/prompts/components/empty-state.md +74 -0
- package/assets/prompts/components/event-chip.md +81 -0
- package/assets/prompts/components/event-list-item.md +108 -0
- package/assets/prompts/components/file-icon.md +83 -0
- package/assets/prompts/components/file-upload.md +35 -0
- package/assets/prompts/components/gallery-item.md +163 -0
- package/assets/prompts/components/generated-image.md +85 -0
- package/assets/prompts/components/hint.md +94 -0
- package/assets/prompts/components/icon-button.md +99 -0
- package/assets/prompts/components/icon.md +79 -0
- package/assets/prompts/components/input.md +134 -0
- package/assets/prompts/components/kanban.md +172 -0
- package/assets/prompts/components/list-item.md +325 -0
- package/assets/prompts/components/menu-item.md +247 -0
- package/assets/prompts/components/message-actions.md +54 -0
- package/assets/prompts/components/message-quote.md +34 -0
- package/assets/prompts/components/message-sources.md +46 -0
- package/assets/prompts/components/message-state.md +61 -0
- package/assets/prompts/components/message-table.md +42 -0
- package/assets/prompts/components/metric-card.md +137 -0
- package/assets/prompts/components/modal.md +235 -0
- package/assets/prompts/components/multi-select.md +31 -0
- package/assets/prompts/components/onboarding.md +51 -0
- package/assets/prompts/components/page-header.md +161 -0
- package/assets/prompts/components/pagination.md +99 -0
- package/assets/prompts/components/progress-bar.md +75 -0
- package/assets/prompts/components/quotation-bar.md +44 -0
- package/assets/prompts/components/radio-card.md +146 -0
- package/assets/prompts/components/radio.md +56 -0
- package/assets/prompts/components/segmented-chart.md +65 -0
- package/assets/prompts/components/select.md +145 -0
- package/assets/prompts/components/shortcut.md +81 -0
- package/assets/prompts/components/sidebar.md +528 -0
- package/assets/prompts/components/slider.md +111 -0
- package/assets/prompts/components/spinner.md +124 -0
- package/assets/prompts/components/stepper.md +108 -0
- package/assets/prompts/components/switch.md +103 -0
- package/assets/prompts/components/tab-strip.md +162 -0
- package/assets/prompts/components/table-cell.md +65 -0
- package/assets/prompts/components/table-header.md +181 -0
- package/assets/prompts/components/table-row-edit.md +144 -0
- package/assets/prompts/components/table-row-select.md +90 -0
- package/assets/prompts/components/table-row.md +175 -0
- package/assets/prompts/components/table-toolbar.md +94 -0
- package/assets/prompts/components/tabs.md +134 -0
- package/assets/prompts/components/textarea.md +114 -0
- package/assets/prompts/components/time-picker.md +86 -0
- package/assets/prompts/components/toast.md +155 -0
- package/assets/prompts/components/toolbar.md +86 -0
- package/assets/prompts/components/tooltip.md +76 -0
- package/assets/prompts/components/top-loader.md +64 -0
- package/assets/prompts/components/topbar.md +177 -0
- package/assets/prompts/components/tree-nav.md +77 -0
- package/assets/prompts/components/user-message.md +50 -0
- package/assets/prompts/design-examples/README.md +57 -0
- package/assets/prompts/design-examples/catalog.json +1 -0
- package/assets/prompts/primitives/emerge.md +43 -0
- package/assets/prompts/primitives/fade.md +31 -0
- package/assets/prompts/primitives/mobile.md +53 -0
- package/assets/prompts/primitives/scale.md +32 -0
- package/assets/prompts/primitives/scroll.md +170 -0
- package/assets/prompts/primitives/slide.md +31 -0
- package/assets/prompts/recipes/README.md +104 -0
- package/assets/prompts/recipes/card-row.md +39 -0
- package/assets/prompts/recipes/form-footer.md +76 -0
- package/assets/prompts/recipes/meta-line.md +61 -0
- package/assets/prompts/recipes/page-banner.md +121 -0
- package/assets/prompts/recipes/page-header.md +107 -0
- package/assets/prompts/recipes/section-header.md +90 -0
- package/assets/prompts/templates/README.md +9 -0
- package/assets/prompts/templates/ains.md +630 -0
- package/assets/prompts/templates/aurora.md +439 -0
- package/assets/prompts/templates/glass-button.md +336 -0
- package/assets/prompts/templates/minimal.md +207 -0
- package/assets/prompts/templates/workspace.md +346 -0
- package/assets/prompts/themes/_SCHEMA.md +135 -0
- package/assets/prompts/themes/_TEMPLATE.md +73 -0
- package/assets/prompts/themes/expressive.md +118 -0
- package/assets/prompts/themes/pure.md +87 -0
- package/assets/prompts/themes/spare.md +73 -0
- package/assets/prompts/tokens/breakpoint.md +29 -0
- package/assets/prompts/tokens/color.md +103 -0
- package/assets/prompts/tokens/radius.md +33 -0
- package/assets/prompts/tokens/shadow.md +35 -0
- package/assets/prompts/tokens/spacing.md +96 -0
- package/assets/prompts/tokens/typography.md +67 -0
- package/assets/prompts/tokens/z-index.md +35 -0
- package/assets/public/expressive.png +0 -0
- package/assets/public/pure.png +0 -0
- package/assets/public/spare.png +0 -0
- package/assets/skills/ovenn/SKILL.md +12 -0
- package/assets/skills/ovenn-component/SKILL.md +12 -0
- package/assets/skills/ovenn-page/SKILL.md +12 -0
- package/assets/skills/ovenn-theme/SKILL.md +12 -0
- package/assets/skills/ovenn-validate/SKILL.md +14 -0
- package/assets/skills/ovenn-validate/fixtures/clean/Clean.module.css +12 -0
- package/assets/skills/ovenn-validate/fixtures/clean/Clean.tsx +9 -0
- package/assets/skills/ovenn-validate/scripts/lib/component-usage.js +112 -0
- package/assets/skills/ovenn-validate/scripts/lib/source-graph.js +15 -0
- package/assets/skills/ovenn-validate/scripts/lib/source-utils.mjs +25 -0
- package/assets/skills/ovenn-validate/scripts/lib/source-utils.test.mjs +52 -0
- package/assets/skills/ovenn-validate/scripts/rules/doc-sync.mjs +151 -0
- package/assets/skills/ovenn-validate/scripts/rules/doc-sync.test.mjs +91 -0
- package/assets/skills/ovenn-validate/scripts/rules/ghost-tokens.mjs +69 -0
- package/assets/skills/ovenn-validate/scripts/rules/ghost-tokens.test.mjs +52 -0
- package/assets/skills/ovenn-validate/scripts/rules/hardcoded.mjs +145 -0
- package/assets/skills/ovenn-validate/scripts/rules/hardcoded.test.mjs +83 -0
- package/assets/skills/ovenn-validate/scripts/rules/memory-rules.mjs +252 -0
- package/assets/skills/ovenn-validate/scripts/rules/memory-rules.test.mjs +131 -0
- package/assets/skills/ovenn-validate/scripts/validate.mjs +169 -0
- package/assets/skills/ovenn-wireframe/SKILL.md +12 -0
- package/bin/ovenn.js +85 -0
- package/package.json +139 -4
- package/src/commands/info.js +217 -0
- package/src/commands/init.js +386 -0
- package/src/commands/update.js +65 -0
- package/src/utils/agents.js +83 -0
- package/src/utils/assets.js +51 -0
- package/src/utils/client-bridges.js +32 -0
- package/src/utils/component-usage.js +112 -0
- package/src/utils/deps.js +59 -0
- package/src/utils/design-examples.js +101 -0
- package/src/utils/design-workflow.js +155 -0
- package/src/utils/detect.js +59 -0
- package/src/utils/diff.js +52 -0
- package/src/utils/doctor.js +47 -0
- package/src/utils/hash.js +16 -0
- package/src/utils/launch.js +94 -0
- package/src/utils/log.js +41 -0
- package/src/utils/managed-assets.js +50 -0
- package/src/utils/mcp-client.js +47 -0
- package/src/utils/meta.js +73 -0
- package/src/utils/patch.js +334 -0
- package/src/utils/prompt.js +28 -0
- package/src/utils/source-graph.js +15 -0
- package/src/utils/update-transaction.js +79 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
텍스트 액션의 최소 단위. 클릭 시 무언가 **일어나는** 컨트롤 — 페이지 이동은 [[components/link]]. size는 [[axes/density]] 축과 연동되고, variant는 semantic 역할(강조 위계)만 담당한다.
|
|
5
|
+
|
|
6
|
+
### Do
|
|
7
|
+
- `loading`은 접근 가능한 이름을 유지하고 `aria-busy`를 전달한다. 기본 Spinner는 Motion 축을 따르며 모션 축소에서도 정적인 로딩 표시를 유지한다. `asChild`의 disabled/loading도 클릭·키보드 활성화를 차단하고 탭 순서에서 제외한다.
|
|
8
|
+
- **중요=`primary`, 서브=`outline`**이 기본 쌍이다. 모달 하단, 폼 하단, 페이지 액션 영역 등 "확정 + 취소/이전" 구조의 기본값. `secondary`는 primary tint가 섞인 색조 액션이 필요한 특별 맥락에서만 — 중립 서브 액션엔 `outline`이 먼저다.
|
|
9
|
+
- **버튼 사이 gap은 언제나 `space-1`(4px) 고정.** footer action 쌍, 툴바 액션 묶음, 폼 하단 등 어느 자리든 동일. `space-2` 이상 금지 — 두 버튼이 하나의 액션 묶음으로 묶여 읽히는 밀도를 유지.
|
|
10
|
+
- **기본은 `size="md"`**. 90% 이상의 경우 md. 다른 사이즈로 갈 명확한 이유가 있을 때만 바꾼다.
|
|
11
|
+
- **폼·컨트롤과 나란히 놓일 때는 그 컨트롤의 size와 맞춘다** — Input md 옆엔 Button md, Input sm 옆엔 Button sm. 미묘한 높이 차이가 정렬을 무너뜨린다.
|
|
12
|
+
- 한 작업 문맥의 대표 행동을 primary로 한다. 별도 모달과 같은 행동의 모바일 고정 CTA는 각 문맥에서 판단한다.
|
|
13
|
+
- **아이콘만 있는 버튼도 Button으로 처리** — label 없이 `leftIcon`만 넣으면 자동으로 정사각(width = height = `--control-h-*`), `leftIcon` + `rightIcon`(예: 아이콘 + `caret-down`)이면 텍스트 없이 좁은 대칭 패딩. 어느 쪽이든 `aria-label` 필수. 별도 [[components/icon-button]] 컴포넌트는 legacy — 신규 사용은 지양.
|
|
14
|
+
- **파괴적 액션은 위계로 2단 분리한다.**
|
|
15
|
+
- `destructive` — **강한 위계.** 확인 모달의 "정말 삭제하시겠습니까?" 최종 확인, 되돌릴 수 없는 결정적 순간. 평상시 옅은 빨강 배경 + 빨강 텍스트, hover 시 solid 빨강으로 전환되며 위험을 예고.
|
|
16
|
+
- `destructive-ghost` — **약한 위계.** 테이블 행/헤더의 삭제, 페이지에 그냥 노출된 삭제 버튼 등 일상적 목록 조작. 평상시 fg(검정) 텍스트로 눈에 띄지 않다가 hover 시에만 빨강 톤(8% 배경 + 빨강 텍스트)이 나타남.
|
|
17
|
+
|
|
18
|
+
### Don't
|
|
19
|
+
- 같은 작업 문맥에서 경쟁하는 primary를 불필요하게 늘리지 않는다.
|
|
20
|
+
- 버튼 사이 gap에 `space-2`(8px) 이상 금지 — 반드시 `space-1`(4px).
|
|
21
|
+
- height를 CSS로 덮어쓰지 않는다. `size` prop 경유.
|
|
22
|
+
- 페이지 이동에 Button 쓰지 않는다 — 시맨틱은 `<a>`.
|
|
23
|
+
- disabled 색을 variant별로 다르게 덮어쓰지 않는다. **모든 variant는 disabled 시 회색 배경(`--bg-muted`) + 실버 텍스트(`--fg-disabled`) + 투명 보더로 통일** — "지금은 못 누른다"가 variant 위계보다 우선 읽혀야 한다.
|
|
24
|
+
|
|
25
|
+
### 인터랙션
|
|
26
|
+
- **Press 피드백은 size별 scale 비율**로 다름. xs/sm은 `scale(0.98)`, md는 `scale(0.97)`, lg는 `scale(0.96)` — 큰 버튼일수록 더 많이 눌리는 체감으로 사이즈 리듬을 보조한다. translateY 금지 — layout 흔들림·사이즈별 체감 균일 문제를 피하기 위해 scale로 통일.
|
|
27
|
+
- **`prefers-reduced-motion: reduce` 자동 대응** — 시스템에서 모션 축소를 켜면 transition·transform 전부 off된다. 접근성 요구를 꺾지 않도록 override 금지.
|
|
28
|
+
- **Hover 시 아이콘 opacity 0.75 → 1.0** — 평상시 Silver 톤이 hover 때만 완전 선명. 아이콘 fill을 다른 색으로 바꾸지 말고 이 투명도 리듬을 그대로 활용.
|
|
29
|
+
|
|
30
|
+
### Fallback
|
|
31
|
+
size 애매하면 `md`, variant 애매하면 서브 자리에선 `outline`·대표 자리에선 `primary`.
|
|
32
|
+
|
|
33
|
+
### 관련
|
|
34
|
+
- [[components/split-button]] — 메인 액션 + 부가 옵션(caret) 2-part 버튼
|
|
35
|
+
- [[components/icon-button]] — legacy, 신규는 Button icon-only 사용
|
|
36
|
+
- [[components/input]] · [[components/select]] — 같은 화면에서 size 맞춤
|
|
37
|
+
- [[axes/density]] — `--control-h-*`가 size에 매핑
|
|
38
|
+
- [[axes/shape]] — radius가 Shape 축에 반응
|
|
39
|
+
- [[tokens/color]] — `--primary`, `--destructive` 등 variant 매핑
|
|
40
|
+
|
|
41
|
+
### Props 시그니처
|
|
42
|
+
```tsx
|
|
43
|
+
<Button
|
|
44
|
+
size="xs | sm | md | lg | xl" // default: md
|
|
45
|
+
variant="primary | inverse | secondary | neutral | elevated | outline | ghost | destructive | destructive-ghost" // default: primary
|
|
46
|
+
leftIcon={ReactNode} rightIcon={ReactNode}
|
|
47
|
+
loading={boolean} disabled={boolean}
|
|
48
|
+
fullWidth={boolean}
|
|
49
|
+
asChild={boolean} // Radix Slot 패턴
|
|
50
|
+
/>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Variant 매트릭스
|
|
54
|
+
| variant | 용도 | 금지 조합 |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| `primary` | **중요 액션의 기본값.** 페이지 대표 액션(가입·제출·확인·다음) | 한 화면 2개 이상 금지 |
|
|
57
|
+
| `inverse` | 현재 Mode의 반대편 `elevated`. 라이트에서는 다크 elevated, 다크에서는 라이트 elevated | Palette와 무관 |
|
|
58
|
+
| `outline` | **서브 액션의 기본값.** 취소·이전 등 primary와 짝 이루는 중립 액션. 툴바·필터에도 사용. 글자·아이콘은 `--fg-muted`로 조용하게, hover 시 `--fg`로 올라와 primary가 또렷하게 먼저 읽히도록 톤을 낮춘다 | — |
|
|
59
|
+
| `secondary` | primary tint가 섞인 색조 액션이 필요할 때만. 중립 서브엔 `outline`이 먼저 | — |
|
|
60
|
+
| `neutral` | **중성 솔리드** — 눈에 많이 안 튀는 서브 액션. `bg-subtle` 톤 + 중립 fg. 브랜드 색이 자리를 지배하면 안 되는 "조용한 보조 버튼" (코드 blocks·툴바·메타 액션)에 적합. secondary보다 더 중립. | — |
|
|
61
|
+
| `elevated` | **표면 위로 은은히 떠 있는 느낌.** 솔리드 `bg-elev-1`(라이트=흰, 다크=어두움) + `shadow-md`. 본문 위에 "뜬 알림"처럼 올라앉은 자리 — 닥스 CodeBlock 안 Expand 버튼, floating action, 카드 위 토글 등. | 평평한 UI 흐름 안엔 과함 — 서브 액션엔 `outline`·`neutral` 먼저 |
|
|
62
|
+
| `ghost` | 최소 시각 무게. 인라인·툴바. | — |
|
|
63
|
+
| `destructive` | **강한** 위험 위계 — 확인 모달의 최종 삭제 버튼, 되돌릴 수 없는 결정 | 목록·툴바의 일상 삭제엔 과함 → `destructive-ghost` 사용 |
|
|
64
|
+
| `destructive-ghost` | **약한** 위험 위계 — 테이블/페이지에 노출된 일상적 삭제 | 최종 확인 자리엔 부족 → `destructive` 사용 |
|
|
65
|
+
|
|
66
|
+
### Size 가이드
|
|
67
|
+
| size | height | 언제 |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| `xs` | 24 | **거의 쓸 일 없음.** 극한 밀도가 정말 필요한 예외적 상황(인라인 태그 액션, 셀 내부 미니 컨트롤)에서만. 쓴다면 **`variant="ghost"` 강력 권장** — filled/outline은 이 크기에서 시각 무게가 과해 튀고 답답함. |
|
|
70
|
+
| `sm` | 32 | 밀도 높은 관리 UI, 툴바, 테이블 행 액션 |
|
|
71
|
+
| `md` | 36 | **기본.** 폼·모달·페이지 액션 대부분 |
|
|
72
|
+
| `lg` | 40 | 랜딩·온보딩의 대표 CTA. 손가락 hitbox 필요한 터치 |
|
|
73
|
+
| `xl` | 48 | 히어로·대형 CTA. 텍스트 한 단계 더 큰 자리 (text-lg). 랜딩 첫 화면 "지금 시작" 류 |
|
|
74
|
+
|
|
75
|
+
> **`xs` 사용 전 재고**: 밀도가 부족하다고 느껴진다면 먼저 Density 축(`--space-scale`)을 조이는 게 옳다. 페이지에 `xs`가 튀어나온다면 대부분 `sm` + Density 축 조정으로 해결된다.
|
|
76
|
+
|
|
77
|
+
### 조합 예시
|
|
78
|
+
```tsx
|
|
79
|
+
// 폼 하단: outline(서브) + primary(중요) 나란히, Input과 같은 size
|
|
80
|
+
<div style={{ display: "flex", gap: "var(--space-1)" }}>
|
|
81
|
+
<Button variant="outline">취소</Button>
|
|
82
|
+
<Button variant="primary" leftIcon={<CheckIcon />}>저장</Button>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
// 테이블 행 액션: sm ghost로 밀도 확보
|
|
86
|
+
<Button size="sm" variant="ghost" leftIcon={<PencilIcon />}>수정</Button>
|
|
87
|
+
|
|
88
|
+
// 테이블/페이지의 일상적 삭제: destructive-ghost (약한 위계, hover에만 빨강)
|
|
89
|
+
<Button size="sm" variant="destructive-ghost" leftIcon={<TrashIcon />}>삭제</Button>
|
|
90
|
+
|
|
91
|
+
// 확인 모달의 최종 삭제 버튼: destructive (강한 위계)
|
|
92
|
+
<Modal>
|
|
93
|
+
<p>정말 삭제하시겠습니까?</p>
|
|
94
|
+
<Button variant="outline" onClick={close}>취소</Button>
|
|
95
|
+
<Button variant="destructive" onClick={confirmDelete}>삭제</Button>
|
|
96
|
+
</Modal>
|
|
97
|
+
|
|
98
|
+
// 아이콘만: 정사각 (aria-label 필수)
|
|
99
|
+
<Button variant="ghost" aria-label="검색" leftIcon={<Icon name="search" />} />
|
|
100
|
+
|
|
101
|
+
// 아이콘 + caret: 드롭다운 트리거 (텍스트 없이 좁은 대칭 패딩)
|
|
102
|
+
<Button
|
|
103
|
+
variant="outline"
|
|
104
|
+
aria-label="사용자 메뉴"
|
|
105
|
+
leftIcon={<Icon name="user" />}
|
|
106
|
+
rightIcon={<Icon name="caret-down" />}
|
|
107
|
+
/>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### data-slot
|
|
111
|
+
|
|
112
|
+
[[SLOTS]] 참고. 외부 참조·테스트·MCP 쿼리용 공식 API.
|
|
113
|
+
|
|
114
|
+
- `button-root` — `<button>` 자체
|
|
115
|
+
- `button-icon-start` — leftIcon 슬롯
|
|
116
|
+
- `button-label` — children 담는 span
|
|
117
|
+
- `button-badge` — badge 슬롯
|
|
118
|
+
- `button-icon-end` — rightIcon 슬롯
|
|
119
|
+
- `button-spinner` — loading 상태 Spinner overlay
|
|
120
|
+
|
|
121
|
+
### state attributes
|
|
122
|
+
|
|
123
|
+
- `data-loading="true"` — 로딩 중 (label·icon 숨기고 Spinner overlay). `disabled` 자동 세팅됨
|
|
124
|
+
- `data-variant` — `primary|inverse|secondary|outline|ghost|destructive|destructive-ghost` 중 하나
|
|
125
|
+
- `data-icon-only="true"` — 아이콘만 (children 없음)
|
|
126
|
+
|
|
127
|
+
<!-- component-contract -->
|
|
128
|
+
```json
|
|
129
|
+
{"roles":["action"],"native":["button"],"hints":["primary","iconButton","export"],"requires":[]}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### ControlGroup 조합
|
|
133
|
+
[[components/control-group]] 안에서는 그룹의 sm/md/lg 크기를 공유한다. 라벨·설명·오류와 각 컨트롤의 행동은 유지하며, 팝오버 콘텐츠는 그룹에서 분리한다.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Callout
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
사이드바·리스트 끝·설정 패널의 여백에 상주하는 소형 안내 카드. 페이지 흐름을 끊지 않고 새 기능·이동 경로를 제시한다. hover가 없는 [[components/tooltip]], 휘발되는 Toast, 페이지 폭 전체를 덮는 [[recipes/page-banner]]와 구분된다.
|
|
5
|
+
|
|
6
|
+
### Do
|
|
7
|
+
- 표면은 `fill` 하나 — tone tint 배경 + 투명 border 로 신호를 담는다. 색 테두리 없음.
|
|
8
|
+
- 강조 색은 `tone` 으로 제어한다.
|
|
9
|
+
- `dismissible=true`면 `onDismiss`와 함께 부모가 숨김 상태를 저장한다.
|
|
10
|
+
- `actions`는 [[components/button]] slot이다 — variant는 자유, size는 `xs`(기본) 또는 `sm`만.
|
|
11
|
+
- 액션 Button의 색은 `tone`을 따라간다 — solid/soft 버튼이면 같은 tone(warning엔 warning 버튼, destructive엔 destructive 버튼), 아니면 `ghost`/`outline` 중립. tone과 다른 색 solid 버튼으로 신호를 깨지 않는다.
|
|
12
|
+
- 좁은 컨테이너에선 `actionsPlacement="bottom"` 유지, `right`는 본문이 짧고 카드가 가로로 넓을 때만.
|
|
13
|
+
- `warning`/`destructive` tone은 `icon` 미지정 시 각각 `warning-circle`(주의) / `warning`(위험)이 자동. 다른 의미 아이콘이 필요할 때만 override한다.
|
|
14
|
+
- 톤을 "비권장" 수준으로 낮추고 싶으면 Callout 자체를 쓰지 않는다 — [[components/callout]] 대신 `fg-muted` 색 **인라인 텍스트 한 줄**로 처리.
|
|
15
|
+
|
|
16
|
+
### Don't
|
|
17
|
+
- 페이지 폭 전역 경고에 쓰지 않는다 — [[recipes/page-banner]] 영역.
|
|
18
|
+
- 임시 피드백에 쓰지 않는다 — Toast를 쓴다.
|
|
19
|
+
- 본문을 4줄 넘게 채우지 않는다.
|
|
20
|
+
- `tone`을 임의 색상으로 확장하지 않는다.
|
|
21
|
+
- `variant="outline"`은 폐기된 API이므로 사용하지 않는다. 현재 `fill`에 scoped skin으로 테두리를 더할 때는 배경과 아주 미세한 표시 색 차이만 허용한다 ([[PRINCIPLES]] §5b). 진한 스트로크로 이중 강조하지 않는다. 비권장 메시지는 muted 인라인 텍스트로.
|
|
22
|
+
|
|
23
|
+
### Fallback
|
|
24
|
+
`variant` 는 `fill` 하나뿐. `tone` 애매하면 `brand`. `actionsPlacement` 애매하면 `bottom`.
|
|
25
|
+
|
|
26
|
+
### 관련
|
|
27
|
+
- [[recipes/page-banner]] — 페이지 폭 전면 경고. Callout은 국소 카드.
|
|
28
|
+
- [[components/button]] — actions 슬롯의 실제 요소이며 variant 규칙 원본.
|
|
29
|
+
- [[components/badge]] — title 옆 상태 라벨.
|
|
30
|
+
- [[axes/palette]] — brand와 tone별 강조 색을 스왑.
|
|
31
|
+
|
|
32
|
+
### Props 시그니처
|
|
33
|
+
```tsx
|
|
34
|
+
<Callout
|
|
35
|
+
title={ReactNode} // optional (compound 쓰면 생략 가능)
|
|
36
|
+
icon={IconName | ReactNode} // 문자열은 Icon 자동 wrap, Avatar·Badge 등도 수용
|
|
37
|
+
tone="neutral | brand | success | warning | destructive" // default: brand
|
|
38
|
+
actions={ReactNode}
|
|
39
|
+
actionsPlacement="bottom | right" // default: bottom
|
|
40
|
+
dismissible={boolean} // default: false
|
|
41
|
+
onDismiss={() => void}
|
|
42
|
+
dismissLabel={string}
|
|
43
|
+
>{children}</Callout>
|
|
44
|
+
|
|
45
|
+
// Compound 패턴 — title에 heading 레벨(h2/h3 등)이 필요할 때
|
|
46
|
+
<Callout tone="brand" icon="info">
|
|
47
|
+
<Callout.Title as="h2">저장됨</Callout.Title>
|
|
48
|
+
<Callout.Description>서버에 반영됐어요.</Callout.Description>
|
|
49
|
+
</Callout>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
> `variant` prop 은 폐기됨. 과거 코드는 자동으로 `fill` 로 동작하지만, 신규 작성 시 명시하지 않는다.
|
|
53
|
+
|
|
54
|
+
### Variant 매트릭스
|
|
55
|
+
`variant` 는 `fill` 하나로 고정. tone 별 표면 색만 바뀐다.
|
|
56
|
+
|
|
57
|
+
| tone | fill (유일 variant) | 용도 |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| `neutral` | 회색 표면(`bg-subtle`) + `fg-muted` 아이콘 | 톤 없는 기본 안내·중립 컨텍스트 |
|
|
60
|
+
| `brand` | tone 8% tint 표면 + brand 아이콘 | 신기능·프로모션·마이그레이션 유도 |
|
|
61
|
+
| `success` | success 8% tint + success 아이콘 | 완료·다음 스텝 제안 |
|
|
62
|
+
| `warning` | warning 8% tint + warning 아이콘 | 만료·용량 임박·설정 누락 |
|
|
63
|
+
| `destructive` | destructive 8% tint + destructive 아이콘 | 삭제 예정·비가역 상태 |
|
|
64
|
+
|
|
65
|
+
모든 tone 에서 border 는 `transparent` — 색 테두리는 fill 표면과 신호가 겹쳐 소음만 더한다. 영역 분리가 필요하면 외부 레이아웃 gap 으로 해결, Callout 자체는 테두리를 그리지 않음.
|
|
66
|
+
|
|
67
|
+
**금지 조합**
|
|
68
|
+
tone이 톤 신호를 쥐고 있으므로, 그 안의 요소들(액션 버튼·아이콘)도 같은 신호를 유지해야 한다. 색이 어긋나면 사용자는 어느 쪽을 믿어야 할지 결정하지 못한다.
|
|
69
|
+
|
|
70
|
+
- `tone`과 다른 색상 CTA Button을 섞지 않는다 — `warning` 콜아웃 안에 `brand`(파랑) solid 버튼, `destructive` 콜아웃 안에 `success`(초록) 버튼처럼 신호가 어긋나는 조합은 금지. 액션 Button은 같은 tone의 색을 쓰거나(`solid`/`soft`), 색 신호를 비우는 `ghost`/`outline` 중립 버튼만 허용.
|
|
71
|
+
- `brand` tone 콜아웃에 `secondary` 톤 solid 버튼으로 메인 CTA를 두지 않는다 — 톤이 brand면 주 액션도 brand solid, 보조 액션만 ghost.
|
|
72
|
+
- `tone=success` + 파괴 액션(`destructive` Button) — 긍정 맥락 안의 비가역 액션은 사용자를 속인다.
|
|
73
|
+
- `tone=destructive` + `success` 아이콘(check 등) — 아이콘이 톤을 뒤집는다.
|
|
74
|
+
- `tone=warning` + `success` 아이콘, `tone=warning` + brand solid 버튼 등 톤↔요소 신호 역전 금지.
|
|
75
|
+
- 한 콜아웃 안에 서로 다른 tone의 solid 버튼 둘을 나란히 두지 않는다 — primary 1개 + 중립(ghost/outline) 1개 패턴만.
|
|
76
|
+
|
|
77
|
+
### 조합 예시
|
|
78
|
+
```tsx
|
|
79
|
+
<Callout
|
|
80
|
+
icon="stack"
|
|
81
|
+
title="Import Issues"
|
|
82
|
+
dismissible
|
|
83
|
+
onDismiss={() => setHidden(true)}
|
|
84
|
+
dismissLabel="Dismiss"
|
|
85
|
+
actions={
|
|
86
|
+
<Button variant="ghost" size="sm" rightIcon={<Icon name="arrow-right" />}>
|
|
87
|
+
Try Now
|
|
88
|
+
</Button>
|
|
89
|
+
}
|
|
90
|
+
>
|
|
91
|
+
Use our Migration Assistant to copy issues from another service.
|
|
92
|
+
</Callout>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
<!-- component-contract -->
|
|
96
|
+
```json
|
|
97
|
+
{"roles":["persistent-notice"],"native":[],"hints":["teamNote","monthNote"],"requires":[]}
|
|
98
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# CanvasNode
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
캔버스 위의 범용 노드. 카드·타일·원형으로 정보 배치만 바꾸며 도메인·실행 엔진·연결선을 내장하지 않는다.
|
|
5
|
+
|
|
6
|
+
### 형태 선택
|
|
7
|
+
- `card`: 아이콘·제목·보조 정보를 표면 내부에 배치한다.
|
|
8
|
+
- `tile`: 정사각 표면 내부에는 아이콘, 아래에는 제목·보조 정보를 배치한다. 아이콘을 생략하면 제목을 표면 안에 배치한다.
|
|
9
|
+
- `circle`: 원형 표면을 사용한다. 아이콘이 있으면 제목은 바깥, 없으면 안쪽에 배치한다.
|
|
10
|
+
|
|
11
|
+
### Props
|
|
12
|
+
- `title: string`: 필수 이름, 선택 버튼의 접근 가능한 이름.
|
|
13
|
+
- `media?: ReactNode`: SVG·이미지·텍스트·커스텀 시각 요소. 조작 요소는 넣지 않는다. SVG의 stroke-width를 강제하지 않는다.
|
|
14
|
+
- `icon?: ReactNode`: 기존 호환 슬롯. media가 있으면 media를 우선한다.
|
|
15
|
+
- `children?: ReactNode`: 선택 버튼 바깥의 본문. 카드에서는 surface 안, 타일·원형에서는 표면 아래에 표시한다. 버튼·입력 등 조작 요소도 여기에 넣는다.
|
|
16
|
+
- `description?: string`: 선택 보조 정보.
|
|
17
|
+
- `shape?: 'card' | 'tile' | 'circle'`: 기본 card.
|
|
18
|
+
- `status?: 'idle' | 'running' | 'success' | 'error'`: 기본 idle. 선택과 독립적이다.
|
|
19
|
+
- `statusLabel?: string`: 현지화된 상태 텍스트. 기본 idle에는 텍스트가 없고 나머지는 영어 기본값을 제공한다.
|
|
20
|
+
- `selected?: boolean`, `onSelect?: () => void`: 호스트가 선택 상태를 제어한다. Enter/Space로 선택 가능하다.
|
|
21
|
+
- `disabled?: boolean`: 선택 비활성화.
|
|
22
|
+
- `ports?: readonly ('left' | 'right' | 'top' | 'bottom')[]`: 기본 좌우. 빈 배열로 숨기며 중복은 제거한다. **표시 전용**이며 연결 행동과 hit target은 그래프 어댑터가 담당한다.
|
|
23
|
+
- `connectedPorts?: readonly CanvasNodePortSide[]`: 기본 빈 배열. ports에 구성된 방향 중 연결된 핸들만 상시 표시한다. 나머지는 노드/핸들 hover에서 표시한다. 비활성 노드는 hover 표시를 생략하되 연결 표시는 유지한다.
|
|
24
|
+
- 나머지 HTMLDivElement 속성과 ref는 바깥 wrapper에 전달한다.
|
|
25
|
+
|
|
26
|
+
### 조합
|
|
27
|
+
아이콘 없는 카드의 좌우 패딩은 한 단계 넓다. 핸들은 테두리 있는 원의 중심을 노드 경계선 중심에 걸쳐 배치한다. 핸들의 테두리는 surface의 실제 표시 색을 상속하고 채움은 라이트에서는 순백색(fixed-white), 다크에서는 현재 노드 표면의 배경색을 상속해 선택 상태에서도 채움이 표면과 일치하게 한다. 다크에서 흰색으로 고정하지 않는다. 별도 선을 추가하지 않는다. 호버 오버레이는 옅은2%이며 오버레이와 핸들 opacity는 motion-scale을 따르는 부드러운 전환을 사용한다. 레이아웃 크기는 바꾸지 않는다. Card가 표면, Button이 선택을 담당한다. 포트와 상태 아이콘은 선택 버튼 바깥에 둔다. 연결선·팬·줌·드래그·실행은 호스트 책임이다. `tokens.css`의 `--node-*` 변수로 크기·표면을 변경한다. 테마 색은 Core 토큰을 참조한다.
|
|
28
|
+
|
|
29
|
+
### Do
|
|
30
|
+
- 선택과 실행 상태를 독립적으로 유지한다. 오류 노드도 선택할 수 있다.
|
|
31
|
+
- 실행 상태는 아이콘과 현지화 텍스트를 함께 제공한다.
|
|
32
|
+
- 긴 이름·아이콘 없음·비활성·좁은 화면을 검수한다.
|
|
33
|
+
- reduced-motion에서는 실행 아이콘 회전을 멈춘다.
|
|
34
|
+
|
|
35
|
+
### Don't
|
|
36
|
+
- Agent·Tool 등 제품별 종류를 공용 shape로 추가하지 않는다.
|
|
37
|
+
- 표시 전용 포트를 동작하는 연결 컨트롤로 설명하지 않는다.
|
|
38
|
+
- media/icon 안에 버튼·링크·입력을 넣지 않는다. children 본문에 배치해 선택 버튼과 분리한다.
|
|
39
|
+
|
|
40
|
+
### Fallback
|
|
41
|
+
형태가 애매하면 기본 `card`. 실행 상태를 모르면 기본 `idle`(상태 텍스트 없음)로 둔다. 포트는 기본 좌우를 유지하고, 연결이 확정된 방향만 `connectedPorts`로 표시한다. 제품별 종류 구분이 필요해 보이면 shape를 늘리지 말고 `media`·`description`으로 구분한다.
|
|
42
|
+
|
|
43
|
+
### 예시
|
|
44
|
+
```tsx
|
|
45
|
+
<CanvasNode
|
|
46
|
+
shape="tile"
|
|
47
|
+
title="데이터 변환"
|
|
48
|
+
icon={<Box />}
|
|
49
|
+
selected={selected}
|
|
50
|
+
onSelect={() => setSelected(!selected)}
|
|
51
|
+
status="running"
|
|
52
|
+
statusLabel="실행 중"
|
|
53
|
+
/>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 관련
|
|
57
|
+
- [[components/card]] — 표면
|
|
58
|
+
- [[components/button]] — 선택 행동
|
|
59
|
+
|
|
60
|
+
<!-- component-contract -->
|
|
61
|
+
```json
|
|
62
|
+
{"requires":[],"customPatterns":[]}
|
|
63
|
+
```
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Card
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
콘텐츠 묶음의 **표면**. 역할은 셋뿐 — 배경 · radius · padding. 안쪽에 뭐가 들어가든 Card는 모르고 소비처가 자유롭게 조립한다. 제목·설명·액션 같은 **안쪽 구조는 전용 어휘**(PageHeader·ListItem·MetricCard 등)가 담당한다 — Card는 그걸 담는 상자일 뿐이다.
|
|
5
|
+
|
|
6
|
+
compound(Header/Title/Content 등)를 두지 않는다. shadcn/HeroUI 등 외부 시스템에선 compound를 두지만, Ovenn은 **표면 역할만** 담당하고 안쪽 레이아웃은 소비처 책임이다. 벤더가 안쪽 구조를 강제하면 다른 벤더(PageHeader/ListItem 등)와 역할이 겹치고 학습 비용만 늘어난다.
|
|
7
|
+
|
|
8
|
+
### variant 선택
|
|
9
|
+
line·soft는 각각 선·배경 중심의 기본형이다. 모든 variant와 scoped skin의 배경·테두리 조합은 [[PRINCIPLES]] §5b의 미세한 색 차이 기준을 따른다. elevated/framed는 shadow가 주인공.
|
|
10
|
+
|
|
11
|
+
- **line** (기본): hairline border만. 가장 자주. 조용한 묶음.
|
|
12
|
+
- **soft**: `bg-subtle` 배경만. 톤 차이로 분리. 섹션·보조 영역.
|
|
13
|
+
- **elevated**: `bg` + `shadow-md`만. **border 없음** — "들어올림/띄워진" 어휘. 랜딩·주목 블록. 라이트 모드에서 border 없이도 선명하게 보이게 shadow-md로 공급.
|
|
14
|
+
- **framed**: `bg` + hairline border + `shadow-sm`. shadow가 라이트 모드에서 애매해지는 자리에서 border가 가장자리를 미세하게 보조한다. 배경과 선의 표시 색 차이는 §5b 예시 수준으로 유지한다.
|
|
15
|
+
|
|
16
|
+
**elevated vs framed 결정**:
|
|
17
|
+
- "띄워진 느낌이 중요하다" → **elevated** (shadow만, 더 극적)
|
|
18
|
+
- "미세한 경계 보조가 필요하다" → **framed** (border가 보조)
|
|
19
|
+
- 애매하면 **framed**가 안전 (라이트 모드 보존성 좋음)
|
|
20
|
+
|
|
21
|
+
애매하면 `line`. 배경을 더할 때는 테두리와 실제 표시 색 차이가 아주 미세한지 확인한다 ([[PRINCIPLES]] §5b).
|
|
22
|
+
|
|
23
|
+
### size 선택
|
|
24
|
+
padding + radius 세트. 안쪽 레이아웃용 gap은 **소비처가 직접 공급** (Card는 안쪽 간격을 모른다).
|
|
25
|
+
|
|
26
|
+
- **sm**: `space-3` padding. 리스트 반복·compact 자리.
|
|
27
|
+
- **md** (기본): `space-4` padding. 일반 섹션 ([[feedback_default_size_md]]).
|
|
28
|
+
- **lg**: `space-6` padding. 랜딩·주요 블록.
|
|
29
|
+
- **xl**: `space-8` padding. 히어로·온보딩 등 "크게 보여야 할" 자리.
|
|
30
|
+
|
|
31
|
+
### Do
|
|
32
|
+
- 같은 대시보드의 동급 카드 제목은 크기·줄 높이·굵기를 통일한다. 업무 목록·거래 파이프라인 사용사례는 모두 `text-base` + `lh-tight` + `font-weight-semibold`를 사용한다. 표면 크기나 내부 콘텐츠 종류와 별개로 같은 제목 위계를 유지한다.
|
|
33
|
+
- Card children은 자유. `<h3>` + `<p>` + 어떤 ReactNode든.
|
|
34
|
+
- 안쪽에 "제목 + 설명 + 액션"이 필요하면 [[components/page-header]]를 Card children으로 넣는 쪽을 먼저 고려.
|
|
35
|
+
- 반복 아이템 리스트는 [[components/list-item]]을 Card 안에 넣는다.
|
|
36
|
+
- KPI 전용은 [[components/metric-card]]. Card에 직접 수치 조립하지 말고.
|
|
37
|
+
- 전체가 링크·버튼이면 `interactive` prop. hover·active·focus 피드백 자동.
|
|
38
|
+
- 안쪽 세로 리듬이 필요하면 소비처가 `display: flex; flex-direction: column; gap: ...`를 Card children 또는 Card 안쪽 wrapper에 공급.
|
|
39
|
+
- **sm Card 안 텍스트는 한 단계 작게** — Title은 `--label-sm-size` (또는 `--text-sm`), Description은 `--text-xs`. sm은 좁은 자리라 기본 폰트 크기를 그대로 쓰면 콘텐츠가 가장자리에 눌려 "답답"하게 보인다. md/lg/xl은 소비처 자유.
|
|
40
|
+
- **sm Card 안 세로 gap도 한 단계 작게** — Title ↔ Description 사이는 `--space-0_5`, 블록 사이는 `--space-1_5` 정도. md 이상은 기본 `--space-1` ~ `--space-2`가 자연. sm의 좁은 어휘와 안쪽 간격이 어긋나면 "답답하거나 vs 너무 벌어진" 양극단으로 보임.
|
|
41
|
+
|
|
42
|
+
### Don't
|
|
43
|
+
- `line`의 배경 또는 `soft`의 border를 변형할 때 뚜렷한 이중 경계를 만들지 않는다. 아주 미세한 색 차이만 허용한다 ([[PRINCIPLES]] §5b).
|
|
44
|
+
- 내부에 `<section>`·`<article>`·`<nav>` 금지 — 전역 `.content section`이 80px padding 꽂음 ([[feedback_no_semantic_tags_in_components]]).
|
|
45
|
+
- Card를 모달·다이얼로그로 쓰지 않는다 — 흐름 끊고 집중시키는 자리는 [[components/modal]].
|
|
46
|
+
- Card에 안쪽 "제목" slot을 내장 compound로 추가하지 말 것 — 벤더 역할 분리가 깨진다. 안쪽 구조가 반복되면 그건 **PageHeader·ListItem 등 전용 어휘**에 추가하는 쪽이 맞다.
|
|
47
|
+
|
|
48
|
+
### Fallback
|
|
49
|
+
variant 애매하면 `line`. size 애매하면 `md`. 안쪽 구조 애매하면 PageHeader 또는 그냥 `<h3>` + `<p>`.
|
|
50
|
+
|
|
51
|
+
### 관련
|
|
52
|
+
- [[components/page-header]] — Card 안에 넣어 "제목 + 설명 + 액션" 자리 담당.
|
|
53
|
+
- [[components/list-item]] — Card 안에 반복 아이템을 담을 때.
|
|
54
|
+
- [[components/metric-card]] — KPI 전용 preset. Card와 역할 겹치지 않음.
|
|
55
|
+
- [[components/callout]] — 안내·상태 메시지 전용. Card와 다름.
|
|
56
|
+
- [[tokens/radius]] — size별 radius 매핑.
|
|
57
|
+
- [[tokens/shadow]] — elevated variant가 쓰는 shadow.
|
|
58
|
+
|
|
59
|
+
### Props 시그니처
|
|
60
|
+
```tsx
|
|
61
|
+
<Card
|
|
62
|
+
variant="line | soft | elevated" // default: "line"
|
|
63
|
+
size="sm | md | lg | xl" // default: "md"
|
|
64
|
+
interactive={boolean} // default: false
|
|
65
|
+
>
|
|
66
|
+
{/* 자유. 어떤 ReactNode든. */}
|
|
67
|
+
</Card>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 상태 매트릭스
|
|
71
|
+
| variant | 평상시 | hover (interactive) | focus-visible (interactive) |
|
|
72
|
+
|---|---|---|---|
|
|
73
|
+
| line | 투명 + hairline border | `--hover` bg + border-strong | ring-action |
|
|
74
|
+
| soft | bg-subtle | `--hover` 겹침 | ring-action |
|
|
75
|
+
| elevated | bg + shadow-md | shadow-lg 승격 | ring-action |
|
|
76
|
+
| framed | bg + hairline border + shadow-sm | shadow-md 승격 | ring-action |
|
|
77
|
+
|
|
78
|
+
### Size 가이드
|
|
79
|
+
Card는 **폭을 결정하지 않는다** — 폭은 바깥 레이아웃(grid·flex·부모)이 공급한다. size는 **"안쪽 밀도"**만 담당: padding + radius가 세트로 스왑되어, 같은 콘텐츠가 더 꽉차게 vs 더 숨돌림 있게 보인다.
|
|
80
|
+
|
|
81
|
+
| size | padding | radius | 추천 바깥 폭 | 전형적 자리 |
|
|
82
|
+
|---|---|---|---|---|
|
|
83
|
+
| **sm** | `--space-3` | `--radius-sm` | ~ 240px | compact 리스트 아이템, 좁은 사이드 패널, 다중 컬럼 그리드 |
|
|
84
|
+
| **md** (기본) | `--space-4` | `--radius-md` | 240 ~ 480px | 일반 섹션 블록, 2~3컬럼 대시보드 카드 |
|
|
85
|
+
| **lg** | `--space-6` | `--radius-lg` | 480 ~ 720px | 단독 섹션, 1컬럼 대시보드 블록, 설정 패널 |
|
|
86
|
+
| **xl** | `--space-8` | `--radius-xl` | 720px+ | 히어로, 랜딩 섹션, 온보딩 중앙 블록 |
|
|
87
|
+
|
|
88
|
+
**"추천 바깥 폭"은 강제가 아니다** — 똑같은 lg Card를 모바일에서 100% 폭으로 써도 되고, 데스크톱에서 좁은 자리에 넣어도 된다. 다만 padding이 "그 바깥 폭 범위에서 자연스럽게 보이는" 기준이므로:
|
|
89
|
+
- **좁은 자리에 큰 size → "꽉찬 안쪽에 숨돌림만 큼"**: 어색하지 않지만 공간 낭비.
|
|
90
|
+
- **넓은 자리에 작은 size → "콘텐츠가 가장자리에 붙음"**: 랜딩 블록 자리에서는 안 어울림.
|
|
91
|
+
|
|
92
|
+
애매하면 `md`. padding이 "너무 꽉찬다" 싶으면 `lg`, "너무 비어 보인다" 싶으면 `sm`.
|
|
93
|
+
|
|
94
|
+
### 조합 예시
|
|
95
|
+
```tsx
|
|
96
|
+
// 1. 가장 기본 — line + md, 소비처가 자유롭게
|
|
97
|
+
<Card>
|
|
98
|
+
<h3>알림 설정</h3>
|
|
99
|
+
<p>이메일로 받을 알림 종류를 관리합니다.</p>
|
|
100
|
+
<Checkbox>새 멘션</Checkbox>
|
|
101
|
+
<Checkbox>주간 요약</Checkbox>
|
|
102
|
+
</Card>
|
|
103
|
+
|
|
104
|
+
// 2. 섹션 어휘 — PageHeader를 Card 안에
|
|
105
|
+
<Card variant="soft">
|
|
106
|
+
<PageHeader
|
|
107
|
+
title="이번 주 요약"
|
|
108
|
+
description="최근 7일간 수치입니다."
|
|
109
|
+
actions={<IconButton icon={<Icon name="dots-three" />} aria-label="더보기" />}
|
|
110
|
+
/>
|
|
111
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "var(--space-2)" }}>
|
|
112
|
+
<MetricRow label="신규 가입" value="124" />
|
|
113
|
+
<MetricRow label="활성 사용자" value="2,480" />
|
|
114
|
+
</div>
|
|
115
|
+
</Card>
|
|
116
|
+
|
|
117
|
+
// 3. 리스트 어휘 — ListItem을 Card 안에
|
|
118
|
+
<Card>
|
|
119
|
+
{projects.map((p) => (
|
|
120
|
+
<ListItem key={p.id} title={p.name} description={p.summary} />
|
|
121
|
+
))}
|
|
122
|
+
</Card>
|
|
123
|
+
|
|
124
|
+
// 4. 랜딩 — elevated + xl
|
|
125
|
+
<Card variant="elevated" size="xl">
|
|
126
|
+
<h2>프리미엄 플랜</h2>
|
|
127
|
+
<p>팀 공동 작업과 고급 분석까지.</p>
|
|
128
|
+
<PlanFeatures items={features} />
|
|
129
|
+
<Button>업그레이드</Button>
|
|
130
|
+
</Card>
|
|
131
|
+
|
|
132
|
+
// 5. 선택 가능한 카드 그리드 — interactive
|
|
133
|
+
<div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: "var(--space-2)" }}>
|
|
134
|
+
{workspaces.map((w) => (
|
|
135
|
+
<Card key={w.id} size="sm" interactive onClick={() => router.push(`/w/${w.id}`)}>
|
|
136
|
+
<strong>{w.name}</strong>
|
|
137
|
+
<p>{w.summary}</p>
|
|
138
|
+
</Card>
|
|
139
|
+
))}
|
|
140
|
+
</div>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 사용 사례 — 업무 목록 카드
|
|
144
|
+
대시보드에서 기한별 업무를 확인하고 완료 처리하는 조합. 실제 동작 예제는 닥스 Card 페이지의 **사용 사례 → 업무 목록 카드**에 있다 (`web/examples/TaskListCardExample.tsx`).
|
|
145
|
+
|
|
146
|
+
- Card는 바깥 표면을 담당하며, 제목 아래에 전체 업무 목록을 표시한다.
|
|
147
|
+
- ListItem의 leading에는 Checkbox를 넣는다. 첫 줄은 할 일명 Title과 기한 Badge, 둘째 줄은 회사명 Description과 우측 Meta(`전화 / 김민준`)로 구성한다. 연락 아이콘·Avatar는 사용하지 않는다.
|
|
148
|
+
- 기본 4건을 보여주며 Button으로 전체 목록을 펼친다. 완료 항목은 취소할 수 있도록 유지한다. 헤더에는 제목만 두며 남은 수나 슬로건 설명을 덧붙이지 않는다.
|
|
149
|
+
- 세그먼트 카드처럼 제목·하단 버튼의 줄 높이를 고려해 위 `space-6`·좌우 `space-5`·아래 `space-4`로 보정한다. 루트 gap은 0, 헤더 아래는 `space-3`, 푸터 선 아래는 `space-1`로 관리한다. 작은 묶음은 `space-1`, 행 사이 gap은 0으로 두고 ListItem padding으로 리듬을 만든다.
|
|
150
|
+
- 체크박스는 할 일명 첫 줄의 linebox 중앙에 맞춘다. 업무 문구는 `fg`, 연락 정보는 `fg-subtle`로 구분한다. 필터·탭은 두지 않는다.
|
|
151
|
+
- 공용 Card API를 늘리지 않고 소비처의 scoped CSS로 조합한다.
|
|
152
|
+
|
|
153
|
+
### 사용 사례 — 거래 파이프라인 카드 (여백·밸런스 참고)
|
|
154
|
+
사용자가 SegmentedChart 닥스의 기존 Card 조합을 **여백감·텍스트 여백 보정·전체 균형의 모범 사례**로 지정했다. Card와 SegmentedChart 닥스의 사용 사례 모두 공유 예제 `web/examples/PipelineCardExample.tsx`를 렌더한다. 여백 원본은 `web/examples/PipelineCardExample.module.css`의 `.card.pipelineCard`이다.
|
|
155
|
+
|
|
156
|
+
- Card md의 좌우 `space-5`·아래 `space-4`를 유지하고, 위는 `space-6`으로 보정한다. 제목·큰 합계·범례가 만드는 line box와 시각적 무게를 포함해 균형을 판단한 조합이다.
|
|
157
|
+
- 수치상 네 면이 같다는 이유만으로 더 균형 잡힌 것은 아니다. 이 사례의 상하 보정을 일괄 대칭 padding으로 되돌리지 않는다.
|
|
158
|
+
- 다른 콘텐츠에는 같은 수치를 강제하지 않는다. 실제 렌더의 텍스트 높이·첫/마지막 요소·전체 비례를 보고 보정한다.
|
|
159
|
+
- SegmentedChart 자체는 표면이 없는 차트이며 Card는 소비처의 조합이다. 기본 사용·Playground와 카드 조합 사례를 구별한다.
|
|
160
|
+
|
|
161
|
+
### Brand Set renderer
|
|
162
|
+
- Card renderer는 동일 Props·ref·접근성 계약을 유지한다. CoreCard를 재사용해 재귀를 피하고, 미지원 표현은 Core로 fallback한다. TemplateBoundary에서는 renderer를 억제한다.
|
|
163
|
+
|
|
164
|
+
<!-- component-contract -->
|
|
165
|
+
```json
|
|
166
|
+
{"roles":["surface"],"native":[],"hints":[],"requires":[]}
|
|
167
|
+
```
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Chat Input
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
AI 채팅의 입력 영역. **첨부물 바 → 인용 바 → 입력 본문**(textarea 또는 input)의 세 층 구성. 모델 선택·전송·중지·파일첨부를 전부 담당. 하위 레이어 [[components/file-icon]]·[[components/attachment-thumb]]·[[components/attachment-item]]·[[components/quotation-bar]]를 **조립**하는 상위 블록 — 자체 primitive 추가 금지.
|
|
5
|
+
|
|
6
|
+
### Do
|
|
7
|
+
- Shape은 두 가지 — `multi`(기본, 긴 입력·오버레이 UI), `single`(토픽바·검색봉 느낌).
|
|
8
|
+
- Variant는 두 가지 — `framed`(기본, radius·border·shadow 가진 떠있는 블록), `flush`(radius·border·shadow 모두 제거, shell 바닥에 edge-to-edge).
|
|
9
|
+
- 외곽 radius는 Shape 축 토큰이 직접 결정 — prop으로 받지 않음.
|
|
10
|
+
- `models` + `selectedModel` + `onSelectModel` 셋이 다 있을 때만 모델 selector 노출.
|
|
11
|
+
- 전송은 `Enter`로 — multi에선 `Shift+Enter`가 줄바꿈. 스트리밍 중엔 `Enter`나 send 클릭이 `onStop`을 호출.
|
|
12
|
+
- 첨부·인용은 전부 **외부 상태** — ChatInput은 표시·삭제 콜백만 중계. 업로드 로직·중복 체크는 소비처 책임.
|
|
13
|
+
- `onAttach`에 File[]이 들어옴. 소비처가 kind 판정(image/file)해서 attachments에 매핑.
|
|
14
|
+
|
|
15
|
+
### Don't
|
|
16
|
+
- 첨부·인용·메시지 상태를 ChatInput 안에서 관리하지 않는다 — controlled 전용.
|
|
17
|
+
- 모델 선택 메뉴를 내부에서 열지 않는다 — 현재는 라벨 클릭 시 다음 모델로 토글만. 실제 ContextMenu는 소비처에서 조립 (ChatInput의 책임 과잉 방지).
|
|
18
|
+
- SingleLine에서 모델 라벨을 끝까지 노출하지 않는다 — 10자 넘으면 자동 compact(아이콘만).
|
|
19
|
+
- Send 버튼 색을 임의로 override하지 않는다 — 톤 조정은 `sendVariant` prop(`solid` | `ghost` | `soft`)으로만. 각 variant 안에서 비활성→활성 색 전환은 고정 규약.
|
|
20
|
+
- `flush`를 떠있는 자리(페이지 중앙·오버레이)에 쓰지 않는다 — 외곽선 없이 공중에 뜨면 영역이 흐려짐. 반드시 shell 바닥·바텀바처럼 바깥 경계가 이미 존재하는 자리에만.
|
|
21
|
+
|
|
22
|
+
### Send 버튼 variant
|
|
23
|
+
- `sendVariant="solid"` *(기본)* — 비활성=`bg-subtle` / 활성·스트리밍=`primary` + `primary-fg` 아이콘. ChatGPT·Claude 류 떠있는 네모 버튼.
|
|
24
|
+
- `sendVariant="ghost"` — 배경 투명, 아이콘만. 비활성=`fg-disabled` / 활성=`fg-strong`. hover에서만 `bg-subtle` 살짝. 흰 캔버스에 녹아드는 깔끔한 자리(가벼운 질문창·검색봉·툴 안쪽 작은 입력).
|
|
25
|
+
- `sendVariant="soft"` — 늘 `bg-subtle` 배경, 활성이어도 색 강조 없이 fg만 진해짐. 조용한 자리(사이드바 바닥 flush, 패널 바텀바)에서 send 존재감을 낮추고 싶을 때.
|
|
26
|
+
- `sendIcon="arrow-up"` *(기본)* — 전송 뉘앙스, 범용. `"return"`(↵) — 폼 submit·키보드 힌트. `"paper-plane"` — 메신저 느낌(iMessage/카톡 류). 스트리밍 중엔 아이콘 선택과 무관하게 자동으로 square로 교체.
|
|
27
|
+
- 셋 다 활성 상태의 **아이콘 색 규약**은 고정 — ghost·soft는 fg-strong, solid는 primary-fg. 임의로 primary 색 아이콘 넣지 않는다.
|
|
28
|
+
|
|
29
|
+
### Fallback
|
|
30
|
+
shape 애매하면 `multi`. variant 애매하면 `framed`. sendVariant 애매하면 `solid`. sendIcon 애매하면 `arrow-up`. maxRows 애매하면 `8`.
|
|
31
|
+
|
|
32
|
+
### 관련
|
|
33
|
+
- [[components/file-icon]] / [[components/attachment-thumb]] / [[components/attachment-item]] / [[components/quotation-bar]] — 조립 요소
|
|
34
|
+
- [[components/message-bubble]] — 짝 컴포넌트 (후속)
|
|
35
|
+
- [[components/context-menu]] — 모델 선택 메뉴를 소비처에서 조립할 때
|
|
36
|
+
- [[primitives/scroll]] — "Textarea / 단일 콘텐츠 스크롤" 섹션. 긴 글 스크롤 시 글이 root border에서 clip되도록 wrapper padding-top + textarea padding-bottom 패턴 사용. 레이아웃 변경 시 반드시 그 규약 유지.
|
|
37
|
+
|
|
38
|
+
### Props 시그니처
|
|
39
|
+
```tsx
|
|
40
|
+
<ChatInput
|
|
41
|
+
shape="multi | single" // default: multi
|
|
42
|
+
variant="framed | flush" // default: framed
|
|
43
|
+
|
|
44
|
+
value={string}
|
|
45
|
+
onChange={(v) => void}
|
|
46
|
+
|
|
47
|
+
onSend={() => void} // canSend일 때만 호출
|
|
48
|
+
onStop={() => void} // isStreaming일 때 send 자리에 stop
|
|
49
|
+
isStreaming={boolean}
|
|
50
|
+
|
|
51
|
+
attachments={ChatAttachment[]} // image/file 섞어 전달
|
|
52
|
+
onRemoveAttachment={(id) => void}
|
|
53
|
+
onAttach={(files: File[]) => void}
|
|
54
|
+
|
|
55
|
+
quotation={{ text, onRemove? }}
|
|
56
|
+
|
|
57
|
+
models={{ id, label }[]}
|
|
58
|
+
selectedModel={string}
|
|
59
|
+
onSelectModel={(id) => void}
|
|
60
|
+
|
|
61
|
+
sendVariant="solid | ghost | soft" // default: solid
|
|
62
|
+
sendIcon="arrow-up | return | paper-plane" // default: arrow-up
|
|
63
|
+
|
|
64
|
+
placeholder="Ask me anything…"
|
|
65
|
+
disabled={boolean}
|
|
66
|
+
maxRows={number} // multi 전용, default 8
|
|
67
|
+
/>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### ChatAttachment 타입
|
|
71
|
+
```tsx
|
|
72
|
+
type ChatAttachment =
|
|
73
|
+
| { id, kind: "image", src?, alt?, loading? }
|
|
74
|
+
| { id, kind: "file", filename }
|
|
75
|
+
```
|
|
76
|
+
- `kind: "image"`에 `src` 없거나 `loading: true`면 AttachmentThumb이 placeholder/pulse 자동.
|
|
77
|
+
- `kind: "file"`은 AttachmentItem이 filename 확장자로 FileIcon을 자동 결정.
|
|
78
|
+
|
|
79
|
+
### 레이아웃
|
|
80
|
+
- 외곽(framed): hairline border, `var(--bg)`, radius=Shape 축, `--shadow-md`
|
|
81
|
+
- 외곽(flush): border·radius·shadow 전부 0 — bg만 유지. 바깥 shell(사이드바 바닥·바텀바)이 경계를 책임지는 자리 전용
|
|
82
|
+
- **스크롤 룰**: root `padding: 0; overflow: hidden`. textarea에 상·하·좌·우 padding 전부 → 긴 글 스크롤 시 글이 root border까지 흘러 자연스레 clip. (wrapper에 padding 두면 scroll 시 "빈 띠"가 남아 어색 — [[primitives/scroll]])
|
|
83
|
+
- focus-within에서 ring
|
|
84
|
+
- 내부 세로 gap: `--space-2`, padding: `--space-3`
|
|
85
|
+
- **MultiLine**: `attachments → quotation → [textarea / footer]` 세로
|
|
86
|
+
- **SingleLine**: `attachments → quotation → [attach · input · model · send]` 가로 한 줄
|
|
87
|
+
- Attach/Model/Send: footer 안에서 좌측(attach) 우측(model+send) 분리
|
|
88
|
+
|
|
89
|
+
### 상태 매트릭스
|
|
90
|
+
| 상태 | 트리거 | 시각 |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| Normal | 빈 입력 | placeholder, send=`bg-subtle` |
|
|
93
|
+
| Active | 포커스 | focus-within ring |
|
|
94
|
+
| ActiveSendBtn | `value.trim() || attachments` | send=`primary` |
|
|
95
|
+
| FileUpload | `attachments.length > 0` | attachments 바 노출 |
|
|
96
|
+
| Quotation | `quotation != null` | quotation bar 노출 |
|
|
97
|
+
| Streaming | `isStreaming && onStop` | send 자리에 stop (square icon) |
|
|
98
|
+
| Disabled | `disabled` | opacity 0.5, pointer-events none |
|
|
99
|
+
|
|
100
|
+
<!-- component-contract -->
|
|
101
|
+
```json
|
|
102
|
+
{"roles":["chat-input"],"native":[],"hints":[],"requires":["ThemeController"]}
|
|
103
|
+
```
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# CheckboxCard
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
카드 전체가 선택 타겟인 컨트롤. title·description으로 옵션을 서술해야 할 때 [[components/radio]]·[[components/checkbox]]의 라벨만으로 부족한 경우 사용. native `<input type="radio|checkbox">`를 label 안에 숨겨 시맨틱과 폼 전송을 그대로 받는다.
|
|
5
|
+
|
|
6
|
+
### Do
|
|
7
|
+
- **옵션 서술이 필요할 때만**: title 한 줄로 충분하면 Radio·Checkbox. description이 있어야 뜻이 분명해질 때 CheckboxCard.
|
|
8
|
+
- **같은 그룹은 같은 `name`**: 시맨틱 그룹은 `role="radiogroup"` 래퍼 권장 (mode="radio"·"icon").
|
|
9
|
+
- **mode 선택**: 단일 선택은 `radio` 또는 `icon`, 다중 선택은 `checkbox`. `icon`은 아이콘이 옵션 성격을 즉시 알려줄 때만.
|
|
10
|
+
- **카드 간 간격 `space-3`**: 카드끼리 붙지 않도록 vertical stack의 gap은 최소 `space-3`.
|
|
11
|
+
- **상단 잘림 방지**: 카드는 hover 시 `translateY(-1px)`로 살짝 뜬다. 부모 컨테이너가 `overflow: hidden`이거나 카드가 컨테이너 top에 정확히 붙어있으면 뜨는 순간 상단이 잘린다. 컴포넌트가 `margin-top: var(--hairline)`로 1차 방어하지만, 리스트 컨테이너에도 `padding-top` 최소 `space-1` 확보 또는 `overflow: visible` 유지 권장.
|
|
12
|
+
|
|
13
|
+
### Don't
|
|
14
|
+
- 인디케이터를 카드 밖에 두지 않는다 — leading 슬롯 고정.
|
|
15
|
+
- title/description 밖의 커스텀 콘텐츠(폼 필드, 버튼)를 카드 안에 넣지 않는다. 그건 [[components/callout]] 또는 별도 카드.
|
|
16
|
+
- 옵션이 6개를 넘기면 Select/Combobox 검토. CheckboxCard는 "한 화면에 나열되는 소수 옵션"용.
|
|
17
|
+
- `mode="icon"`에 `icon` 미지정 금지 — 좌측 슬롯이 비어 정렬이 무너진다.
|
|
18
|
+
|
|
19
|
+
### Fallback
|
|
20
|
+
`mode` 미지정 시 `radio`. `icon` 미지정이면 mode="radio" 강제 fallback.
|
|
21
|
+
|
|
22
|
+
### 관련
|
|
23
|
+
- [[components/radio]] — 텍스트 한 줄 옵션. CheckboxCard의 native input 시맨틱 형제.
|
|
24
|
+
- [[components/checkbox]] — 다중 선택 인디케이터 원본.
|
|
25
|
+
- [[components/callout]] — 안내 카드. 선택 대상이 아님.
|
|
26
|
+
- [[tokens/color]] — checked 상태의 `--fg`, `--primary` 토큰.
|
|
27
|
+
|
|
28
|
+
### Props 시그니처
|
|
29
|
+
```tsx
|
|
30
|
+
<CheckboxCard
|
|
31
|
+
mode="radio | checkbox | icon" // default: radio
|
|
32
|
+
title={ReactNode} // required
|
|
33
|
+
description={ReactNode}
|
|
34
|
+
icon={IconName} // mode="icon" 필수
|
|
35
|
+
name / value / checked / defaultChecked / onChange / disabled ...
|
|
36
|
+
/>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Variant 매트릭스
|
|
40
|
+
| mode | leading 슬롯 | 선택 정책 | 용도 |
|
|
41
|
+
|---|---|---|---|
|
|
42
|
+
| `radio` | 라디오 도트 | 그룹 내 단일 | 옵션 뜻을 title+description으로 설명해야 하는 단일 선택 |
|
|
43
|
+
| `checkbox` | 체크 박스 | 다중 | 여러 항목 동시 선택 (기능 토글, 필터 세트) |
|
|
44
|
+
| `icon` | Icon 컴포넌트 | 그룹 내 단일 | 아이콘이 옵션 성격을 즉시 전달하는 단일 선택 |
|
|
45
|
+
|
|
46
|
+
**금지 조합**
|
|
47
|
+
- `mode="checkbox"` + 상호배타 그룹 로직 → 의미 충돌. radio를 쓴다.
|
|
48
|
+
- `mode="icon"` + `icon` 미지정 → leading 슬롯 공백.
|
|
49
|
+
|
|
50
|
+
### 조합 예시
|
|
51
|
+
```tsx
|
|
52
|
+
<div role="radiogroup" style={{ display: "grid", gap: "var(--space-3)" }}>
|
|
53
|
+
<CheckboxCard
|
|
54
|
+
name="agent-mode"
|
|
55
|
+
value="leaf"
|
|
56
|
+
title="Leaf"
|
|
57
|
+
description="Works alone in one turn."
|
|
58
|
+
defaultChecked
|
|
59
|
+
/>
|
|
60
|
+
<CheckboxCard
|
|
61
|
+
name="agent-mode"
|
|
62
|
+
value="supervisor"
|
|
63
|
+
title="Supervisor"
|
|
64
|
+
description="Splits the task across sub-workers it spawns."
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
<!-- component-contract -->
|
|
70
|
+
```json
|
|
71
|
+
{"roles":["checkbox-card"],"native":[],"hints":[],"requires":[]}
|
|
72
|
+
```
|