@conscience-technology/ovenn 0.6.7 → 0.7.2
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/assets/components/AIMessage/AIMessage.module.css +23 -1
- package/assets/components/AIMessage/AIMessage.tsx +27 -7
- package/assets/components/Accordion/Accordion.module.css +3 -0
- package/assets/components/AppFrame/AppFrame.module.css +2 -0
- package/assets/components/AttachmentItem/AttachmentItem.module.css +50 -13
- package/assets/components/AttachmentItem/AttachmentItem.tsx +25 -8
- package/assets/components/AttachmentThumb/AttachmentThumb.module.css +12 -9
- package/assets/components/Avatar/Avatar.module.css +26 -11
- package/assets/components/Avatar/Avatar.tsx +1 -1
- package/assets/components/AvatarUpload/AvatarUpload.module.css +4 -3
- package/assets/components/Badge/Badge.module.css +96 -70
- package/assets/components/Badge/Badge.tsx +33 -25
- package/assets/components/Breadcrumb/Breadcrumb.module.css +8 -4
- package/assets/components/Breadcrumb/Breadcrumb.tsx +1 -1
- package/assets/components/Bubble/Bubble.module.css +6 -0
- package/assets/components/Button/Button.module.css +6 -0
- package/assets/components/Calendar/Calendar.module.css +244 -0
- package/assets/components/Calendar/Calendar.tsx +419 -0
- package/assets/components/Calendar/index.ts +2 -0
- package/assets/components/Callout/Callout.module.css +54 -7
- package/assets/components/Callout/Callout.tsx +26 -2
- package/assets/components/Callout/index.ts +1 -1
- package/assets/components/Canvas/Canvas.module.css +75 -0
- package/assets/components/Canvas/Canvas.tsx +699 -0
- package/assets/components/Canvas/alignment.ts +34 -0
- package/assets/components/Canvas/clipboard.ts +30 -0
- package/assets/components/Canvas/collision.ts +67 -0
- package/assets/components/Canvas/edgeOptions.ts +11 -0
- package/assets/components/Canvas/graph.ts +11 -0
- package/assets/components/Canvas/history.ts +41 -0
- package/assets/components/Canvas/index.ts +4 -0
- package/assets/components/Canvas/selection.ts +56 -0
- package/assets/components/Canvas/tokens.css +61 -0
- package/assets/components/Canvas/types.ts +27 -0
- package/assets/components/Canvas/useCanvasSettlement.ts +79 -0
- package/assets/components/CanvasEdge/CanvasEdge.module.css +62 -0
- package/assets/components/CanvasEdge/CanvasEdge.tsx +121 -0
- package/assets/components/CanvasEdge/geometry.ts +350 -0
- package/assets/components/CanvasEdge/index.ts +4 -0
- package/assets/components/CanvasEdge/interactions.ts +14 -0
- package/assets/components/CanvasEdge/tokens.css +29 -0
- package/assets/components/CanvasNode/CanvasNode.module.css +234 -30
- package/assets/components/CanvasNode/CanvasNode.tsx +95 -28
- package/assets/components/CanvasNode/index.ts +1 -1
- package/assets/components/CanvasNode/runningOutline.ts +59 -0
- package/assets/components/CanvasNode/tokens.css +76 -13
- package/assets/components/Card/Card.module.css +5 -0
- package/assets/components/Chart/Chart.module.css +278 -0
- package/assets/components/Chart/Chart.tsx +385 -0
- package/assets/components/Chart/entrance.tsx +57 -0
- package/assets/components/Chart/index.ts +14 -0
- package/assets/components/ChatComposer/ChatComposer.module.css +17 -0
- package/assets/components/ChatComposer/ChatComposer.tsx +131 -0
- package/assets/components/ChatComposer/index.ts +2 -0
- package/assets/components/ChatInput/ChatInput.module.css +197 -30
- package/assets/components/ChatInput/ChatInput.tsx +137 -45
- package/assets/components/ChatInput/SendButton.tsx +4 -1
- package/assets/components/ChatInput/index.ts +5 -0
- package/assets/components/ChatMessage/ChatMessage.module.css +19 -0
- package/assets/components/ChatMessage/ChatMessage.tsx +63 -0
- package/assets/components/ChatMessage/index.ts +2 -0
- package/assets/components/ChatReactions/ChatReactions.module.css +15 -0
- package/assets/components/ChatReactions/ChatReactions.tsx +58 -0
- package/assets/components/ChatReactions/index.ts +2 -0
- package/assets/components/Checkbox/Checkbox.module.css +39 -0
- package/assets/components/Checkbox/Checkbox.tsx +99 -14
- package/assets/components/Checkbox/index.ts +1 -1
- package/assets/components/CheckboxCard/CheckboxCard.module.css +1 -177
- package/assets/components/CheckboxCard/CheckboxCard.tsx +6 -72
- package/assets/components/Chip/Chip.module.css +20 -30
- package/assets/components/Code/Code.module.css +1 -0
- package/assets/components/CodeBlock/CodeBlock.module.css +113 -13
- package/assets/components/CodeBlock/CodeBlock.tsx +114 -29
- package/assets/components/CodeBlock/SyntaxHighlight.tsx +20 -0
- package/assets/components/CodeBlock/diff-lines.ts +21 -0
- package/assets/components/CodeBlock/index.ts +2 -1
- package/assets/components/CodeBlock/line-preview.ts +7 -0
- package/assets/components/CodeBlock/syntax-highlighter.ts +96 -0
- package/assets/components/CodeBlock/use-syntax-tokens.ts +17 -0
- package/assets/components/ColorArea/ColorArea.module.css +3 -0
- package/assets/components/ColorField/ColorField.module.css +19 -190
- package/assets/components/ColorField/ColorField.tsx +116 -107
- package/assets/components/ColorPicker/ColorPicker.module.css +310 -0
- package/assets/components/ColorPicker/ColorPicker.tsx +387 -0
- package/assets/components/ColorPicker/index.ts +16 -0
- package/assets/components/ColorSlider/ColorSlider.module.css +15 -12
- package/assets/components/ColorSlider/ColorSlider.tsx +3 -3
- package/assets/components/ColorSwatch/ColorSwatch.module.css +2 -2
- package/assets/components/ColorSwatchPicker/ColorSwatchPicker.module.css +4 -3
- package/assets/components/Combobox/Combobox.module.css +21 -4
- package/assets/components/Combobox/Combobox.tsx +38 -22
- package/assets/components/CommandPalette/CommandPalette.module.css +19 -24
- package/assets/components/CommandPalette/CommandPalette.tsx +7 -5
- package/assets/components/Comment/Comment.module.css +25 -0
- package/assets/components/Comment/Comment.tsx +44 -0
- package/assets/components/Comment/CommentComposer.module.css +26 -0
- package/assets/components/Comment/CommentComposer.tsx +56 -0
- package/assets/components/Comment/CommentEditor.module.css +8 -0
- package/assets/components/Comment/CommentEditor.tsx +43 -0
- package/assets/components/Comment/CommentMentionInput.module.css +9 -0
- package/assets/components/Comment/CommentMentionInput.tsx +150 -0
- package/assets/components/Comment/index.ts +9 -0
- package/assets/components/Comment/types.ts +1 -0
- package/assets/components/ContextMenu/ContextMenu.module.css +5 -2
- package/assets/components/ContextMenu/ContextMenu.tsx +5 -0
- package/assets/components/ControlGroup/ControlGroup.module.css +20 -7
- package/assets/components/DataTable/DataTable.module.css +2 -0
- package/assets/components/DatePicker/DateField.tsx +72 -25
- package/assets/components/DatePicker/DatePicker.module.css +56 -54
- package/assets/components/DatePicker/DatePicker.tsx +86 -40
- package/assets/components/DatePicker/TimeSelector.tsx +1 -1
- package/assets/components/Disclosure/Disclosure.module.css +1 -0
- package/assets/components/Drawer/Drawer.module.css +23 -19
- package/assets/components/Drawer/Drawer.tsx +20 -24
- package/assets/components/DropdownMenu/DropdownMenu.tsx +5 -0
- package/assets/components/EmojiPicker/EmojiGlyph.module.css +2 -0
- package/assets/components/EmojiPicker/EmojiGlyph.tsx +12 -0
- package/assets/components/EmojiPicker/EmojiPicker.module.css +43 -0
- package/assets/components/EmojiPicker/EmojiPicker.tsx +143 -0
- package/assets/components/EmojiPicker/UNICODE-LICENSE.txt +39 -0
- package/assets/components/EmojiPicker/data.ts +41 -0
- package/assets/components/EmojiPicker/emojiData-0.json +1 -0
- package/assets/components/EmojiPicker/emojiData-1.json +1 -0
- package/assets/components/EmojiPicker/emojiData-2.json +1 -0
- package/assets/components/EmojiPicker/emojiData-3.json +1 -0
- package/assets/components/EmojiPicker/emojiData.sources.json +35 -0
- package/assets/components/EmojiPicker/emojiData.ts +8 -0
- package/assets/components/EmojiPicker/emojiFallbacks.json +1 -0
- package/assets/components/EmojiPicker/index.ts +4 -0
- package/assets/components/EmptyState/EmptyState.module.css +2 -2
- package/assets/components/EventChip/EventChip.module.css +120 -53
- package/assets/components/EventChip/EventChip.tsx +54 -6
- package/assets/components/EventChip/index.ts +1 -1
- package/assets/components/EventListItem/EventListItem.module.css +3 -0
- package/assets/components/EventListItem/EventListItem.tsx +15 -8
- package/assets/components/FileIcon/FileIcon.module.css +6 -6
- package/assets/components/FileUpload/FileUpload.module.css +10 -3
- package/assets/components/FileUpload/FileUpload.tsx +5 -9
- package/assets/components/FileUpload/FileUploadItem.tsx +34 -0
- package/assets/components/GalleryItem/GalleryItem.module.css +16 -19
- package/assets/components/GeneratedImage/GeneratedImage.module.css +2 -0
- package/assets/components/Icon/Icon.tsx +264 -1088
- package/assets/components/Icon/LucideFamilyIcon.tsx +436 -0
- package/assets/components/Icon/MissingIcon.tsx +25 -0
- package/assets/components/Icon/SolarFamilyIcon.tsx +443 -0
- package/assets/components/Icon/catalogNames.ts +8 -0
- package/assets/components/Icon/context.tsx +1 -1
- package/assets/components/Icon/index.ts +2 -0
- package/assets/components/Icon/lucideCatalog.ts +11358 -0
- package/assets/components/Icon/phosphorCatalog.ts +3052 -0
- package/assets/components/Icon/solarCatalog.ts +16064 -0
- package/assets/components/IconButton/IconButton.module.css +3 -2
- package/assets/components/Input/Input.module.css +63 -22
- package/assets/components/Input/Input.tsx +21 -10
- package/assets/components/Kanban/Kanban.module.css +6 -0
- package/assets/components/ListItem/ListItem.module.css +9 -6
- package/assets/components/MenuItem/MenuItem.module.css +24 -22
- package/assets/components/MenuItem/MenuItem.tsx +12 -12
- package/assets/components/MessageActions/MessageActions.module.css +38 -2
- package/assets/components/MessageActions/MessageActions.tsx +53 -28
- package/assets/components/MessageQuote/MessageQuote.module.css +1 -0
- package/assets/components/MessageSources/MessageSources.module.css +2 -0
- package/assets/components/MessageState/MessageState.module.css +1 -1
- package/assets/components/MetricCard/MetricCard.module.css +96 -108
- package/assets/components/MetricCard/MetricCard.tsx +45 -23
- package/assets/components/MetricCard/tokens.css +10 -0
- package/assets/components/MiniCalendar/MiniCalendar.module.css +130 -0
- package/assets/components/MiniCalendar/MiniCalendar.tsx +161 -0
- package/assets/components/MiniCalendar/index.ts +2 -0
- package/assets/components/Modal/Modal.module.css +13 -4
- package/assets/components/Modal/Modal.tsx +4 -0
- package/assets/components/Onboarding/LayoutBuilder.tsx +12 -50
- package/assets/components/Onboarding/Onboarding.module.css +211 -278
- package/assets/components/Onboarding/OnboardingAxisPanel.tsx +81 -125
- package/assets/components/Onboarding/OnboardingPage.tsx +244 -467
- package/assets/components/Onboarding/actions.ts +5 -0
- package/assets/components/Onboarding/palette.css +8 -0
- package/assets/components/Onboarding/wizardData.ts +8 -8
- package/assets/components/ProgressBar/ProgressBar.module.css +42 -8
- package/assets/components/ProgressBar/ProgressBar.tsx +5 -6
- package/assets/components/ProgressBar/index.ts +0 -1
- package/assets/components/QuotationBar/QuotationBar.module.css +2 -0
- package/assets/components/Radio/Radio.module.css +2 -0
- package/assets/components/RadioCard/RadioCard.module.css +96 -3
- package/assets/components/RadioCard/RadioCard.tsx +76 -13
- package/assets/components/RadioCard/index.ts +1 -1
- package/assets/components/SegmentedChart/SegmentedChart.module.css +16 -0
- package/assets/components/SegmentedChart/SegmentedChart.tsx +25 -8
- package/assets/components/Select/Select.module.css +9 -7
- package/assets/components/Select/Select.tsx +22 -6
- package/assets/components/Shortcut/Shortcut.module.css +2 -0
- package/assets/components/Sidebar/Sidebar.module.css +1 -0
- package/assets/components/Sidebar/Sidebar.tsx +2 -2
- package/assets/components/Skeleton/Skeleton.module.css +33 -0
- package/assets/components/Skeleton/Skeleton.tsx +20 -0
- package/assets/components/Skeleton/index.ts +2 -0
- package/assets/components/Skeleton/tokens.css +11 -0
- package/assets/components/Slider/Slider.module.css +3 -0
- package/assets/components/Slider/Slider.tsx +7 -2
- package/assets/components/Spinner/LottiePlayer.tsx +4 -4
- package/assets/components/Spinner/Spinner.module.css +3 -0
- package/assets/components/Spinner/lottieManifest.ts +3 -0
- package/assets/components/Stepper/Stepper.module.css +56 -8
- package/assets/components/Stepper/Stepper.tsx +13 -4
- package/assets/components/Switch/Switch.module.css +55 -42
- package/assets/components/Switch/Switch.tsx +6 -2
- package/assets/components/Switch/index.ts +1 -1
- package/assets/components/TabStrip/TabStrip.module.css +5 -1
- package/assets/components/TableCell/TableCell.module.css +8 -1
- package/assets/components/TableCell/TableCellBadge.tsx +7 -3
- package/assets/components/TableCell/TableCellImage.tsx +1 -1
- package/assets/components/TableCell/TableCellTag.tsx +23 -0
- package/assets/components/TableCell/index.ts +3 -0
- package/assets/components/TableHeader/TableHeader.module.css +4 -0
- package/assets/components/TableRow/TableRow.module.css +3 -0
- package/assets/components/TableRowEdit/TableRowEdit.module.css +2 -0
- package/assets/components/TableToolbar/TableToolbar.module.css +1 -0
- package/assets/components/Tabs/Tabs.module.css +23 -8
- package/assets/components/Tabs/Tabs.tsx +4 -3
- package/assets/components/Tag/Tag.module.css +101 -0
- package/assets/components/Tag/Tag.tsx +55 -0
- package/assets/components/Tag/index.ts +2 -0
- package/assets/components/TemplateBoundary/TemplateBoundary.tsx +22 -18
- package/assets/components/TemplateBoundary/types.ts +2 -0
- package/assets/components/Textarea/Textarea.module.css +30 -226
- package/assets/components/Textarea/Textarea.tsx +2 -2
- package/assets/components/ThemeController.tsx +30 -3
- package/assets/components/TimePicker/TimePicker.module.css +17 -4
- package/assets/components/TimePicker/TimePicker.tsx +102 -23
- package/assets/components/TimelineView/TimelineEventBar.tsx +109 -0
- package/assets/components/TimelineView/TimelineView.module.css +203 -0
- package/assets/components/TimelineView/TimelineView.tsx +137 -0
- package/assets/components/TimelineView/axis.ts +62 -0
- package/assets/components/TimelineView/index.ts +3 -0
- package/assets/components/TimelineView/layout.ts +56 -0
- package/assets/components/TimelineView/move.ts +51 -0
- package/assets/components/TimelineView/useTimelineDrag.ts +215 -0
- package/assets/components/TimelineView/useTimelineZoom.ts +92 -0
- package/assets/components/Toast/Toast.module.css +20 -0
- package/assets/components/Toast/Toast.tsx +1 -1
- package/assets/components/Toolbar/Toolbar.module.css +31 -24
- package/assets/components/Toolbar/Toolbar.tsx +4 -3
- package/assets/components/Tooltip/Tooltip.module.css +10 -0
- package/assets/components/Tooltip/Tooltip.tsx +50 -15
- package/assets/components/TopLoader/TopLoader.module.css +1 -0
- package/assets/components/TreeNav/TreeNav.module.css +1 -0
- package/assets/components/UserMessage/UserMessage.module.css +110 -1
- package/assets/components/UserMessage/UserMessage.tsx +138 -16
- package/assets/components/UserMessage/index.ts +4 -0
- package/assets/components/_color.ts +2 -2
- package/assets/components/_data.ts +37 -31
- package/assets/components/_utils.css +36 -5
- package/assets/components/axisOptions.ts +2 -0
- package/assets/components/component-registry.json +1731 -94
- package/assets/components/index.ts +23 -0
- package/assets/components/materialScope.tsx +11 -0
- package/assets/components/reset.css +1 -0
- package/assets/components/themeBootScript.ts +3 -2
- package/assets/components/tokens.css +308 -71
- package/assets/components/useChartEntrance.ts +119 -0
- package/assets/prompts/ASSEMBLY.md +20 -7
- package/assets/prompts/CATALOG.md +110 -92
- package/assets/prompts/FEEDBACK_PROCESS.md +19 -0
- package/assets/prompts/PRINCIPLES.md +25 -1
- package/assets/prompts/TEMPLATE_PREVIEWS.md +21 -0
- package/assets/prompts/WORKFLOW_DESIGN.md +48 -70
- package/assets/prompts/axes/font.md +12 -1
- package/assets/prompts/axes/icon.md +6 -4
- package/assets/prompts/axes/material.md +40 -0
- package/assets/prompts/axes/motion.md +2 -0
- package/assets/prompts/axes/palette.md +10 -2
- package/assets/prompts/axes/shape.md +8 -0
- package/assets/prompts/axes/voice.md +4 -0
- package/assets/prompts/components/README.md +3 -3
- package/assets/prompts/components/_variants.md +35 -35
- package/assets/prompts/components/accordion.md +15 -15
- package/assets/prompts/components/ai-message.md +14 -12
- package/assets/prompts/components/app-frame.md +16 -16
- package/assets/prompts/components/attachment-item.md +38 -31
- package/assets/prompts/components/attachment-thumb.md +14 -12
- package/assets/prompts/components/avatar-upload.md +10 -10
- package/assets/prompts/components/avatar.md +16 -16
- package/assets/prompts/components/badge.md +32 -97
- package/assets/prompts/components/breadcrumb.md +25 -24
- package/assets/prompts/components/bubble.md +13 -13
- package/assets/prompts/components/button-group.md +1 -1
- package/assets/prompts/components/button.md +36 -36
- package/assets/prompts/components/calendar.md +151 -0
- package/assets/prompts/components/callout.md +39 -23
- package/assets/prompts/components/canvas-edge.md +70 -0
- package/assets/prompts/components/canvas-node.md +27 -10
- package/assets/prompts/components/canvas.md +85 -0
- package/assets/prompts/components/card.md +31 -31
- package/assets/prompts/components/chart-bar.md +77 -0
- package/assets/prompts/components/chart-pie.md +63 -0
- package/assets/prompts/components/chart-radar.md +56 -0
- package/assets/prompts/components/chart-radial.md +56 -0
- package/assets/prompts/components/chart.md +129 -0
- package/assets/prompts/components/chat-composer.md +71 -0
- package/assets/prompts/components/chat-input.md +82 -27
- package/assets/prompts/components/chat-message.md +48 -0
- package/assets/prompts/components/chat-reactions.md +38 -0
- package/assets/prompts/components/checkbox-card.md +26 -45
- package/assets/prompts/components/checkbox.md +40 -17
- package/assets/prompts/components/chip.md +34 -34
- package/assets/prompts/components/code-block.md +109 -65
- package/assets/prompts/components/code.md +4 -4
- package/assets/prompts/components/color-area.md +9 -9
- package/assets/prompts/components/color-field.md +17 -13
- package/assets/prompts/components/color-picker.md +173 -0
- package/assets/prompts/components/color-slider.md +14 -14
- package/assets/prompts/components/color-swatch-picker.md +8 -8
- package/assets/prompts/components/color-swatch.md +9 -9
- package/assets/prompts/components/combobox.md +5 -2
- package/assets/prompts/components/command-palette.md +31 -30
- package/assets/prompts/components/comment.md +75 -0
- package/assets/prompts/components/context-menu.md +28 -25
- package/assets/prompts/components/control-group.md +4 -4
- package/assets/prompts/components/data-table.md +9 -0
- package/assets/prompts/components/date-picker.md +41 -23
- package/assets/prompts/components/disclosure.md +10 -10
- package/assets/prompts/components/drawer.md +29 -18
- package/assets/prompts/components/dropdown-menu.md +23 -21
- package/assets/prompts/components/emoji-picker.md +45 -0
- package/assets/prompts/components/empty-state.md +20 -18
- package/assets/prompts/components/event-chip.md +70 -28
- package/assets/prompts/components/event-list-item.md +32 -28
- package/assets/prompts/components/file-icon.md +18 -19
- package/assets/prompts/components/file-upload.md +1 -1
- package/assets/prompts/components/gallery-item.md +24 -23
- package/assets/prompts/components/generated-image.md +10 -10
- package/assets/prompts/components/hint.md +19 -19
- package/assets/prompts/components/icon-button.md +16 -16
- package/assets/prompts/components/icon.md +42 -17
- package/assets/prompts/components/input.md +49 -46
- package/assets/prompts/components/kanban.md +35 -35
- package/assets/prompts/components/list-item.md +50 -41
- package/assets/prompts/components/menu-item.md +49 -44
- package/assets/prompts/components/message-actions.md +15 -6
- package/assets/prompts/components/message-quote.md +7 -7
- package/assets/prompts/components/message-sources.md +10 -10
- package/assets/prompts/components/message-state.md +17 -17
- package/assets/prompts/components/message-table.md +5 -5
- package/assets/prompts/components/metric-card.md +57 -109
- package/assets/prompts/components/mini-calendar.md +77 -0
- package/assets/prompts/components/modal.md +40 -39
- package/assets/prompts/components/multi-select.md +4 -1
- package/assets/prompts/components/onboarding.md +23 -19
- package/assets/prompts/components/page-header.md +42 -33
- package/assets/prompts/components/pagination.md +17 -17
- package/assets/prompts/components/progress-bar.md +26 -13
- package/assets/prompts/components/quotation-bar.md +10 -10
- package/assets/prompts/components/radio-card.md +34 -117
- package/assets/prompts/components/radio.md +9 -9
- package/assets/prompts/components/segmented-chart.md +19 -5
- package/assets/prompts/components/select.md +29 -25
- package/assets/prompts/components/shortcut.md +11 -11
- package/assets/prompts/components/sidebar.md +67 -58
- package/assets/prompts/components/skeleton.md +47 -0
- package/assets/prompts/components/slider.md +18 -18
- package/assets/prompts/components/spinner.md +16 -16
- package/assets/prompts/components/stepper.md +29 -15
- package/assets/prompts/components/switch.md +30 -26
- package/assets/prompts/components/tab-strip.md +32 -31
- package/assets/prompts/components/table-cell.md +9 -7
- package/assets/prompts/components/table-header.md +16 -16
- package/assets/prompts/components/table-row-edit.md +19 -19
- package/assets/prompts/components/table-row-select.md +9 -9
- package/assets/prompts/components/table-row.md +29 -20
- package/assets/prompts/components/table-toolbar.md +9 -0
- package/assets/prompts/components/tabs.md +30 -27
- package/assets/prompts/components/tag.md +54 -0
- package/assets/prompts/components/textarea.md +16 -15
- package/assets/prompts/components/time-picker.md +22 -14
- package/assets/prompts/components/timeline-view.md +129 -0
- package/assets/prompts/components/toast.md +43 -42
- package/assets/prompts/components/toolbar.md +36 -23
- package/assets/prompts/components/tooltip.md +36 -17
- package/assets/prompts/components/top-loader.md +12 -12
- package/assets/prompts/components/topbar.md +43 -34
- package/assets/prompts/components/tree-nav.md +10 -10
- package/assets/prompts/components/user-message.md +23 -12
- package/assets/prompts/design-examples/README.md +1 -1
- package/assets/prompts/design-examples/ai-chat-full-page.png +0 -0
- package/assets/prompts/design-examples/catalog.json +124 -1
- package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.module.css +346 -0
- package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.tsx +375 -0
- package/assets/prompts/design-examples/sources/ai-chat-full-page/FullPageChat.tsx +8 -0
- package/assets/prompts/design-examples/sources/ai-chat-full-page/REFERENCE.md +19 -0
- package/assets/prompts/design-examples/sources/ai-chat-full-page/useChatDemo.ts +139 -0
- package/assets/prompts/design-examples/sources/ai-chat-full-page/useDemoTextStream.ts +30 -0
- package/assets/prompts/primitives/emerge.md +2 -0
- package/assets/prompts/templates/README.md +1 -1
- package/assets/prompts/templates/ains.md +9 -1
- package/assets/prompts/templates/aurora.md +5 -4
- package/assets/prompts/templates/minimal.md +14 -6
- package/assets/prompts/templates/onboarding.md +156 -0
- package/assets/prompts/templates/workspace.md +16 -11
- package/assets/prompts/tokens/color.md +11 -4
- package/assets/prompts/tokens/material.md +51 -0
- package/assets/prompts/tokens/radius.md +34 -0
- package/assets/prompts/tokens/typography.md +24 -2
- package/assets/prompts/use-cases/chart-chart-area.md +1334 -0
- package/assets/prompts/use-cases/chart-chart-bar.md +1886 -0
- package/assets/prompts/use-cases/chart-chart-pie.md +1031 -0
- package/assets/prompts/use-cases/chart-chart-radar.md +785 -0
- package/assets/prompts/use-cases/chart-chart-radial.md +988 -0
- package/assets/prompts/use-cases/chart-segmented-chart.md +262 -0
- package/assets/prompts/use-cases/chat-chat-composer.md +529 -0
- package/assets/prompts/use-cases/chat-chat-input.md +1766 -0
- package/assets/prompts/use-cases/data-comment.md +360 -0
- package/assets/prompts/use-cases/data-data-table.md +249 -0
- package/assets/prompts/use-cases/data-list-item.md +1056 -0
- package/assets/prompts/use-cases/data-metric-card.md +673 -0
- package/assets/prompts/use-cases/data-table-row.md +966 -0
- package/assets/prompts/use-cases/data-table-toolbar.md +481 -0
- package/assets/prompts/use-cases/feedback-drawer.md +1168 -0
- package/assets/prompts/use-cases/feedback-progress-bar.md +432 -0
- package/assets/prompts/use-cases/general-toolbar.md +854 -0
- package/assets/prompts/use-cases/general-tooltip.md +652 -0
- package/assets/prompts/use-cases/input-checkbox.md +443 -0
- package/assets/prompts/use-cases/structure-card.md +603 -0
- package/assets/prompts/use-cases/structure-page-header.md +755 -0
- package/assets/prompts/use-cases/structure-sidebar.md +1132 -0
- package/assets/prompts/use-cases/structure-topbar.md +1196 -0
- package/assets/public/ovenn-wordmark.svg +19 -0
- package/assets/skills/ovenn-wireframe/SKILL.md +17 -4
- package/package.json +10 -2
- package/src/commands/info.js +1 -1
- package/src/utils/design-examples.js +3 -4
- package/assets/prompts/templates/glass-button.md +0 -336
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
# Card 사용 사례 소스
|
|
2
|
+
|
|
3
|
+
<!-- Generated by scripts/build-use-cases.mjs. Edit original TSX/CSS, then regenerate. -->
|
|
4
|
+
|
|
5
|
+
### 사례 목록
|
|
6
|
+
|
|
7
|
+
- Deal pipeline card
|
|
8
|
+
|
|
9
|
+
문서: /en/components/structure/card#use-cases
|
|
10
|
+
|
|
11
|
+
문서 페이지에서 렌더하는 사례입니다.
|
|
12
|
+
|
|
13
|
+
### 조회 방법
|
|
14
|
+
|
|
15
|
+
get_guide(topic="use-cases/structure-card", sections=["사례 목록", "파일 목록"])로 먼저 확인하고, 필요한 Section 또는 Source 파일 헤딩만 sections로 조회하세요. 전체 문서는 문서 페이지의 다른 예제도 포함합니다. 공용 컴포넌트 계약은 get_component로 읽고, 예제의 docs 전용 셸·locale·import 경로는 대상 프로젝트에 맞게 조합하세요. 이 연결은 디자인 승인이나 기능 검증을 뜻하지 않습니다.
|
|
16
|
+
|
|
17
|
+
### 파일 목록
|
|
18
|
+
|
|
19
|
+
- `web/app/[lang]/components/structure/card/_strings.tsx`
|
|
20
|
+
- `web/app/[lang]/components/structure/card/page.module.css`
|
|
21
|
+
- `web/app/[lang]/components/structure/card/page.tsx`
|
|
22
|
+
- `web/examples/PipelineCardExample.module.css`
|
|
23
|
+
- `web/examples/PipelineCardExample.tsx`
|
|
24
|
+
|
|
25
|
+
### Section: web/app/[lang]/components/structure/card/page.tsx#use-cases
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
<section id="use-cases" className={styles.useCases}>
|
|
29
|
+
<h2>{t.useCases.heading}</h2>
|
|
30
|
+
<h3>{t.useCases.pipeline}</h3>
|
|
31
|
+
<ExampleBlock>
|
|
32
|
+
<PipelineCardExample lang="en" />
|
|
33
|
+
</ExampleBlock>
|
|
34
|
+
</section>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Source: web/app/[lang]/components/structure/card/_strings.tsx
|
|
38
|
+
|
|
39
|
+
````tsx
|
|
40
|
+
import { Code } from "@/components/Code";
|
|
41
|
+
import type { ReactNode } from "react";
|
|
42
|
+
|
|
43
|
+
type Strings = {
|
|
44
|
+
title: string;
|
|
45
|
+
lead: ReactNode;
|
|
46
|
+
usage: { heading: string; desc: ReactNode };
|
|
47
|
+
useCases: { heading: string; pipeline: string };
|
|
48
|
+
playgroundDesc: string;
|
|
49
|
+
variants: { heading: string; desc: ReactNode };
|
|
50
|
+
sizes: { heading: string; desc: ReactNode };
|
|
51
|
+
api: {
|
|
52
|
+
heading: string;
|
|
53
|
+
columns: { prop: string; type: string; default: string; desc: string };
|
|
54
|
+
rows: { variant: string; size: string; interactive: string };
|
|
55
|
+
};
|
|
56
|
+
basic: { title: string; body: string };
|
|
57
|
+
projectSummary: {
|
|
58
|
+
title: string;
|
|
59
|
+
desc: string;
|
|
60
|
+
inProgress: string;
|
|
61
|
+
waiting: string;
|
|
62
|
+
done: string;
|
|
63
|
+
};
|
|
64
|
+
variantHints: { line: string; soft: string; elevated: string; framed: string };
|
|
65
|
+
sizeHints: { sm: string; md: string; lg: string; xl: string };
|
|
66
|
+
sizesPaddingNote: string;
|
|
67
|
+
widthLabel: string;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const en: Strings = {
|
|
71
|
+
useCases: { pipeline: "Deal pipeline card", heading: "Use cases" },
|
|
72
|
+
title: "Card",
|
|
73
|
+
lead: (
|
|
74
|
+
<>
|
|
75
|
+
The <strong>surface</strong> for a content group. Three jobs only: background, radius,
|
|
76
|
+
padding. Card doesn't know what's inside it; the inner structure (title,
|
|
77
|
+
description, actions) belongs to dedicated vocabulary like PageHeader, ListItem, or
|
|
78
|
+
MetricCard.
|
|
79
|
+
</>
|
|
80
|
+
),
|
|
81
|
+
usage: {
|
|
82
|
+
heading: "Usage",
|
|
83
|
+
desc: (
|
|
84
|
+
<>
|
|
85
|
+
Any ReactNode as children. Default is <Code>line</Code> and <Code>md</Code>.
|
|
86
|
+
</>
|
|
87
|
+
),
|
|
88
|
+
},
|
|
89
|
+
playgroundDesc:
|
|
90
|
+
"Mix variant, size, and shape. The Shape axis is overridden only inside this demo.",
|
|
91
|
+
variants: {
|
|
92
|
+
heading: "Variants",
|
|
93
|
+
desc: (
|
|
94
|
+
<>
|
|
95
|
+
Four tones. <Code>line</Code> border only, <Code>soft</Code> bg-subtle only,
|
|
96
|
+
<Code>elevated</Code> shadow only, <Code>framed</Code> shadow plus hairline. line and soft
|
|
97
|
+
use border-led and fill-led defaults; combined surfaces require the very subtle colour difference in PRINCIPLES §5b; elevated and framed let shadow carry the look.
|
|
98
|
+
</>
|
|
99
|
+
),
|
|
100
|
+
},
|
|
101
|
+
sizes: {
|
|
102
|
+
heading: "Sizes",
|
|
103
|
+
desc: (
|
|
104
|
+
<>
|
|
105
|
+
A padding + radius set. Card does not set its own width; pick size by{" "}
|
|
106
|
+
<strong>recommended outer width</strong>: <Code>sm</Code> ≤ 240px,{" "}
|
|
107
|
+
<Code>md</Code> 240 to 480px, <Code>lg</Code> 480 to 720px, <Code>xl</Code> ≥ 720px.
|
|
108
|
+
Radius responds to the Shape axis. Use the playground shape toggle to compare.
|
|
109
|
+
</>
|
|
110
|
+
),
|
|
111
|
+
},
|
|
112
|
+
api: {
|
|
113
|
+
heading: "API Reference",
|
|
114
|
+
columns: { prop: "Prop", type: "Type", default: "Default", desc: "Description" },
|
|
115
|
+
rows: {
|
|
116
|
+
variant:
|
|
117
|
+
"Tone. line and soft use border-led and fill-led defaults (surface changes follow PRINCIPLES §5b), elevated is shadow only, framed is shadow plus border.",
|
|
118
|
+
size: "A padding + radius set. Inner gap is supplied by the consumer.",
|
|
119
|
+
interactive: "Supplies hover, active, and focus feedback. Use for link or button roles.",
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
basic: { title: "Project files", body: "Proposals, quotes and contracts" },
|
|
123
|
+
projectSummary: {
|
|
124
|
+
title: "Project summary",
|
|
125
|
+
desc: "Work in progress this quarter.",
|
|
126
|
+
inProgress: "In progress",
|
|
127
|
+
waiting: "Waiting",
|
|
128
|
+
done: "Done",
|
|
129
|
+
},
|
|
130
|
+
variantHints: {
|
|
131
|
+
line: "A quiet grouping. The most common.",
|
|
132
|
+
soft: "Separates by a bg-subtle tone shift.",
|
|
133
|
+
elevated: "Lifted by shadow.",
|
|
134
|
+
framed: "Shadow plus hairline. shadcn tone.",
|
|
135
|
+
},
|
|
136
|
+
sizeHints: {
|
|
137
|
+
sm: "sm: tight lists, compact",
|
|
138
|
+
md: "md: general section (default)",
|
|
139
|
+
lg: "lg: wide single-column block",
|
|
140
|
+
xl: "xl: landing or main block",
|
|
141
|
+
},
|
|
142
|
+
sizesPaddingNote: "Inner padding and radius swap naturally per size.",
|
|
143
|
+
widthLabel: "width",
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const ko: Strings = {
|
|
147
|
+
useCases: { pipeline: "거래 파이프라인 카드", heading: "사용 사례" },
|
|
148
|
+
title: "Card",
|
|
149
|
+
lead: (
|
|
150
|
+
<>
|
|
151
|
+
콘텐츠 묶음의 <strong>표면</strong>. 역할은 셋뿐 (배경, radius, padding). 안쪽에
|
|
152
|
+
뭐가 들어가든 Card는 모르고, 제목이나 설명, 액션 같은 안쪽 구조는 전용 어휘(PageHeader,
|
|
153
|
+
ListItem, MetricCard 등)가 담당해요.
|
|
154
|
+
</>
|
|
155
|
+
),
|
|
156
|
+
usage: {
|
|
157
|
+
heading: "사용법",
|
|
158
|
+
desc: (
|
|
159
|
+
<>
|
|
160
|
+
children은 자유. 어떤 ReactNode든 Card 안에. 기본은 <Code>line</Code>, <Code>md</Code>.
|
|
161
|
+
</>
|
|
162
|
+
),
|
|
163
|
+
},
|
|
164
|
+
playgroundDesc: "variant, size, shape를 조합해 보세요. shape 축은 이 데모 안에서만 override돼요.",
|
|
165
|
+
variants: {
|
|
166
|
+
heading: "표현",
|
|
167
|
+
desc: (
|
|
168
|
+
<>
|
|
169
|
+
네 가지 톤. <Code>line</Code> 테두리만, <Code>soft</Code> bg-subtle만,
|
|
170
|
+
<Code>elevated</Code> shadow만, <Code>framed</Code> shadow + hairline.
|
|
171
|
+
line과 soft는 각각 선·배경 중심 기본형(조합은 PRINCIPLES §5b 적용), elevated와 framed는 shadow가 주인공.
|
|
172
|
+
</>
|
|
173
|
+
),
|
|
174
|
+
},
|
|
175
|
+
sizes: {
|
|
176
|
+
heading: "크기",
|
|
177
|
+
desc: (
|
|
178
|
+
<>
|
|
179
|
+
padding + radius 세트. Card는 폭을 결정하지 않고 size는 <strong>추천 바깥 폭</strong>에
|
|
180
|
+
따라 선택: <Code>sm</Code> ≤ 240px, <Code>md</Code> 240~480px,{" "}
|
|
181
|
+
<Code>lg</Code> 480~720px, <Code>xl</Code> ≥ 720px. Shape 축에 따라 radius가
|
|
182
|
+
자동 반응해요. Playground의 shape 토글로 비교해 보세요.
|
|
183
|
+
</>
|
|
184
|
+
),
|
|
185
|
+
},
|
|
186
|
+
api: {
|
|
187
|
+
heading: "속성",
|
|
188
|
+
columns: { prop: "속성", type: "타입", default: "기본값", desc: "설명" },
|
|
189
|
+
rows: {
|
|
190
|
+
variant:
|
|
191
|
+
"톤. line과 soft는 각각 선·배경 중심 기본형(조합은 PRINCIPLES §5b 적용), elevated는 shadow만, framed는 shadow+border 조합.",
|
|
192
|
+
size: "padding + radius 세트. 안쪽 gap은 소비처가 공급.",
|
|
193
|
+
interactive: "호버, active, focus 피드백 공급. 링크나 버튼 역할일 때.",
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
basic: { title: "프로젝트 자료", body: "제안서, 견적서, 계약서" },
|
|
197
|
+
projectSummary: {
|
|
198
|
+
title: "프로젝트 요약",
|
|
199
|
+
desc: "이번 분기 진행 중인 작업.",
|
|
200
|
+
inProgress: "진행 중",
|
|
201
|
+
waiting: "대기",
|
|
202
|
+
done: "완료",
|
|
203
|
+
},
|
|
204
|
+
variantHints: {
|
|
205
|
+
line: "조용한 묶음. 가장 자주.",
|
|
206
|
+
soft: "bg-subtle 톤 차이로 분리.",
|
|
207
|
+
elevated: "shadow로 들어올림.",
|
|
208
|
+
framed: "shadow + hairline. shadcn 톤.",
|
|
209
|
+
},
|
|
210
|
+
sizeHints: {
|
|
211
|
+
sm: "sm. 좁은 리스트, compact",
|
|
212
|
+
md: "md. 일반 섹션 (기본)",
|
|
213
|
+
lg: "lg. 넓은 1컬럼 블록",
|
|
214
|
+
xl: "xl. 랜딩, 메인 블록",
|
|
215
|
+
},
|
|
216
|
+
sizesPaddingNote: "안쪽 padding과 radius가 size별로 자연스럽게 스왑돼요.",
|
|
217
|
+
widthLabel: "폭",
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
export const strings = { en, ko };
|
|
221
|
+
export type { Strings };
|
|
222
|
+
````
|
|
223
|
+
|
|
224
|
+
### Source: web/app/[lang]/components/structure/card/page.module.css
|
|
225
|
+
|
|
226
|
+
````css
|
|
227
|
+
.useCases :global(.example-preview) {
|
|
228
|
+
padding: var(--space-4);
|
|
229
|
+
}
|
|
230
|
+
````
|
|
231
|
+
|
|
232
|
+
### Source: web/app/[lang]/components/structure/card/page.tsx
|
|
233
|
+
|
|
234
|
+
````tsx
|
|
235
|
+
"use client";
|
|
236
|
+
|
|
237
|
+
import { Tag } from "@/components/Tag";
|
|
238
|
+
import { useState } from "react";
|
|
239
|
+
import { usePathname } from "next/navigation";
|
|
240
|
+
import { Card, type CardVariant, type CardSize } from "@/components/Card";
|
|
241
|
+
import { PipelineCardExample } from "@/examples/PipelineCardExample";
|
|
242
|
+
import { Code } from "@/components/Code";
|
|
243
|
+
import { ExampleBlock } from "../../../../_components/ExampleBlock";
|
|
244
|
+
import { Playground } from "../../../../_components/Playground";
|
|
245
|
+
import { DocsTable } from "../../../../_components/DocsTable";
|
|
246
|
+
import { localeFromPathname } from "../../../../_dict";
|
|
247
|
+
import { strings, type Strings } from "./_strings";
|
|
248
|
+
import styles from "./page.module.css";
|
|
249
|
+
|
|
250
|
+
const VARIANT_OPTIONS = ["line", "soft", "elevated", "framed"] as const;
|
|
251
|
+
const SIZE_OPTIONS = ["sm", "md", "lg", "xl"] as const;
|
|
252
|
+
const SHAPE_OPTIONS = ["soft", "standard", "crisp"] as const;
|
|
253
|
+
type Shape = (typeof SHAPE_OPTIONS)[number];
|
|
254
|
+
|
|
255
|
+
export default function CardPage() {
|
|
256
|
+
const pathname = usePathname() ?? "/";
|
|
257
|
+
const t = strings[localeFromPathname(pathname)];
|
|
258
|
+
const [variant, setVariant] = useState<CardVariant>("line");
|
|
259
|
+
const [size, setSize] = useState<CardSize>("md");
|
|
260
|
+
const [shape, setShape] = useState<Shape>("standard");
|
|
261
|
+
const [interactive, setInteractive] = useState(false);
|
|
262
|
+
|
|
263
|
+
const SIZE_SAMPLES: { size: CardSize; width: string; hint: string }[] = [
|
|
264
|
+
{ size: "sm", width: "240px", hint: strings.en.sizeHints.sm },
|
|
265
|
+
{ size: "md", width: "360px", hint: strings.en.sizeHints.md },
|
|
266
|
+
{ size: "lg", width: "560px", hint: strings.en.sizeHints.lg },
|
|
267
|
+
{ size: "xl", width: "800px", hint: strings.en.sizeHints.xl },
|
|
268
|
+
];
|
|
269
|
+
|
|
270
|
+
// Hook check_card_size.py literally greps for <Card ... size="lg|xl">.
|
|
271
|
+
// Compose the code example from a split tag so the pattern never appears in source.
|
|
272
|
+
const cardTag = "<" + "Card";
|
|
273
|
+
const sizesExampleCode = [
|
|
274
|
+
`${cardTag} size="sm"> {/* ${strings.en.sizeHints.sm} */}`,
|
|
275
|
+
`${cardTag} size="md"> {/* ${strings.en.sizeHints.md} */}`,
|
|
276
|
+
`${cardTag} size="lg"> {/* ${strings.en.sizeHints.lg} */}`,
|
|
277
|
+
`${cardTag} size="xl"> {/* ${strings.en.sizeHints.xl} */}`,
|
|
278
|
+
].join("\n");
|
|
279
|
+
|
|
280
|
+
return (
|
|
281
|
+
<>
|
|
282
|
+
<h1 className="page-title">{t.title}</h1>
|
|
283
|
+
<p className="page-lead">{t.lead}</p>
|
|
284
|
+
|
|
285
|
+
{/* USAGE */}
|
|
286
|
+
<section id="usage" className="section-first">
|
|
287
|
+
<h2>{t.usage.heading}</h2>
|
|
288
|
+
<p className="desc">{t.usage.desc}</p>
|
|
289
|
+
<ExampleBlock
|
|
290
|
+
align="column"
|
|
291
|
+
code={`import { Card } from "@/components/Card";
|
|
292
|
+
|
|
293
|
+
<Card>
|
|
294
|
+
<h3>${strings.en.basic.title}</h3>
|
|
295
|
+
<p>${strings.en.basic.body}</p>
|
|
296
|
+
</Card>`}
|
|
297
|
+
>
|
|
298
|
+
<Card>
|
|
299
|
+
<div style={stackStyle("var(--space-1)")}>
|
|
300
|
+
<h3 style={titleStyle}>{strings.en.basic.title}</h3>
|
|
301
|
+
<p style={mutedStyle}>{strings.en.basic.body}</p>
|
|
302
|
+
</div>
|
|
303
|
+
</Card>
|
|
304
|
+
</ExampleBlock>
|
|
305
|
+
</section>
|
|
306
|
+
|
|
307
|
+
{/* PLAYGROUND */}
|
|
308
|
+
<Playground
|
|
309
|
+
desc={t.playgroundDesc}
|
|
310
|
+
axes={[
|
|
311
|
+
{
|
|
312
|
+
label: "variant",
|
|
313
|
+
value: variant,
|
|
314
|
+
onChange: (v) => setVariant(v as CardVariant),
|
|
315
|
+
options: VARIANT_OPTIONS,
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
label: "size",
|
|
319
|
+
value: size,
|
|
320
|
+
onChange: (v) => setSize(v as CardSize),
|
|
321
|
+
options: SIZE_OPTIONS,
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
label: "shape",
|
|
325
|
+
value: shape,
|
|
326
|
+
onChange: (v) => setShape(v as Shape),
|
|
327
|
+
options: SHAPE_OPTIONS,
|
|
328
|
+
},
|
|
329
|
+
]}
|
|
330
|
+
toggles={[
|
|
331
|
+
{ label: "interactive", value: interactive, onChange: setInteractive },
|
|
332
|
+
]}
|
|
333
|
+
>
|
|
334
|
+
<div data-shape={shape} style={{ width: "100%" }}>
|
|
335
|
+
<Card variant={variant} size={size} interactive={interactive}>
|
|
336
|
+
<div style={stackStyle("var(--space-2)")}>
|
|
337
|
+
<h3 style={titleStyle}>{strings.en.projectSummary.title}</h3>
|
|
338
|
+
<p style={mutedStyle}>{strings.en.projectSummary.desc}</p>
|
|
339
|
+
<div style={stackStyle("var(--space-1_5)")}>
|
|
340
|
+
<SettingRow label={strings.en.projectSummary.inProgress} value="12" />
|
|
341
|
+
<SettingRow label={strings.en.projectSummary.waiting} value="5" />
|
|
342
|
+
<SettingRow label={strings.en.projectSummary.done} value="38" />
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
</Card>
|
|
346
|
+
</div>
|
|
347
|
+
</Playground>
|
|
348
|
+
|
|
349
|
+
{/* VARIANTS */}
|
|
350
|
+
<section id="variants">
|
|
351
|
+
<h2>{t.variants.heading}</h2>
|
|
352
|
+
<p className="desc">{t.variants.desc}</p>
|
|
353
|
+
<ExampleBlock
|
|
354
|
+
align="column"
|
|
355
|
+
code={`<Card variant="line">...</Card>
|
|
356
|
+
<Card variant="soft">...</Card>
|
|
357
|
+
<Card variant="elevated">...</Card>
|
|
358
|
+
<Card variant="framed">...</Card>`}
|
|
359
|
+
>
|
|
360
|
+
<div style={stackStyle("var(--space-3)")}>
|
|
361
|
+
{VARIANT_OPTIONS.map((v) => (
|
|
362
|
+
<Card key={v} variant={v}>
|
|
363
|
+
<div style={headerRowStyle}>
|
|
364
|
+
<div style={stackStyle("var(--space-0_5)")}>
|
|
365
|
+
<strong
|
|
366
|
+
style={{
|
|
367
|
+
fontWeight: "var(--font-weight-medium)",
|
|
368
|
+
color: "var(--fg-strong)",
|
|
369
|
+
}}
|
|
370
|
+
>
|
|
371
|
+
variant = {v}
|
|
372
|
+
</strong>
|
|
373
|
+
<span style={mutedStyle}>{variantHint(v, strings.en)}</span>
|
|
374
|
+
</div>
|
|
375
|
+
<Tag variant="soft">{v}</Tag>
|
|
376
|
+
</div>
|
|
377
|
+
</Card>
|
|
378
|
+
))}
|
|
379
|
+
</div>
|
|
380
|
+
</ExampleBlock>
|
|
381
|
+
</section>
|
|
382
|
+
|
|
383
|
+
{/* SIZES */}
|
|
384
|
+
<section id="sizes">
|
|
385
|
+
<h2>{t.sizes.heading}</h2>
|
|
386
|
+
<p className="desc">{t.sizes.desc}</p>
|
|
387
|
+
<ExampleBlock align="column" code={sizesExampleCode}>
|
|
388
|
+
<div
|
|
389
|
+
style={{
|
|
390
|
+
display: "flex",
|
|
391
|
+
flexDirection: "column",
|
|
392
|
+
gap: "var(--space-3)",
|
|
393
|
+
alignItems: "flex-start",
|
|
394
|
+
width: "100%",
|
|
395
|
+
}}
|
|
396
|
+
>
|
|
397
|
+
{SIZE_SAMPLES.map(({ size: sz, width, hint }) => (
|
|
398
|
+
<div key={sz} style={{ width, maxWidth: "100%" }}>
|
|
399
|
+
<div
|
|
400
|
+
style={{
|
|
401
|
+
color: "var(--fg-subtle)",
|
|
402
|
+
fontSize: "var(--text-xs)",
|
|
403
|
+
marginBottom: "var(--space-1)",
|
|
404
|
+
}}
|
|
405
|
+
>
|
|
406
|
+
size={sz} · {strings.en.widthLabel} {width}
|
|
407
|
+
</div>
|
|
408
|
+
<Card size={sz}>
|
|
409
|
+
<div
|
|
410
|
+
style={stackStyle(
|
|
411
|
+
sz === "sm" ? "var(--space-0_5)" : "var(--space-1)",
|
|
412
|
+
)}
|
|
413
|
+
>
|
|
414
|
+
<strong
|
|
415
|
+
style={{
|
|
416
|
+
fontWeight: "var(--font-weight-medium)",
|
|
417
|
+
fontSize:
|
|
418
|
+
sz === "sm"
|
|
419
|
+
? "var(--label-sm-size)"
|
|
420
|
+
: "var(--text-base)",
|
|
421
|
+
color: "var(--fg-strong)",
|
|
422
|
+
}}
|
|
423
|
+
>
|
|
424
|
+
{hint}
|
|
425
|
+
</strong>
|
|
426
|
+
<span
|
|
427
|
+
style={{
|
|
428
|
+
color: "var(--fg-muted)",
|
|
429
|
+
fontSize:
|
|
430
|
+
sz === "sm" ? "var(--text-xs)" : "var(--text-sm)",
|
|
431
|
+
}}
|
|
432
|
+
>
|
|
433
|
+
{strings.en.sizesPaddingNote}
|
|
434
|
+
</span>
|
|
435
|
+
</div>
|
|
436
|
+
</Card>
|
|
437
|
+
</div>
|
|
438
|
+
))}
|
|
439
|
+
</div>
|
|
440
|
+
</ExampleBlock>
|
|
441
|
+
</section>
|
|
442
|
+
|
|
443
|
+
<section id="use-cases" className={styles.useCases}>
|
|
444
|
+
<h2>{t.useCases.heading}</h2>
|
|
445
|
+
<h3>{t.useCases.pipeline}</h3>
|
|
446
|
+
<ExampleBlock>
|
|
447
|
+
<PipelineCardExample lang="en" />
|
|
448
|
+
</ExampleBlock>
|
|
449
|
+
</section>
|
|
450
|
+
|
|
451
|
+
{/* API REFERENCE */}
|
|
452
|
+
<section id="api">
|
|
453
|
+
<h2>{t.api.heading}</h2>
|
|
454
|
+
<DocsTable
|
|
455
|
+
columns={[
|
|
456
|
+
{ key: "prop", label: t.api.columns.prop, width: 160 },
|
|
457
|
+
{ key: "type", label: t.api.columns.type, flex: true, minWidth: 200 },
|
|
458
|
+
{ key: "default", label: t.api.columns.default, width: 120 },
|
|
459
|
+
{ key: "desc", label: t.api.columns.desc, flex: true, minWidth: 240 },
|
|
460
|
+
]}
|
|
461
|
+
rows={[
|
|
462
|
+
{
|
|
463
|
+
prop: <Code>variant</Code>,
|
|
464
|
+
type: (
|
|
465
|
+
<Code>
|
|
466
|
+
'line' | 'soft' | 'elevated' | 'framed'
|
|
467
|
+
</Code>
|
|
468
|
+
),
|
|
469
|
+
default: <Code>'line'</Code>,
|
|
470
|
+
desc: t.api.rows.variant,
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
prop: <Code>size</Code>,
|
|
474
|
+
type: (
|
|
475
|
+
<Code>
|
|
476
|
+
'sm' | 'md' | 'lg' | 'xl'
|
|
477
|
+
</Code>
|
|
478
|
+
),
|
|
479
|
+
default: <Code>'md'</Code>,
|
|
480
|
+
desc: t.api.rows.size,
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
prop: <Code>interactive</Code>,
|
|
484
|
+
type: <Code>boolean</Code>,
|
|
485
|
+
default: <Code>false</Code>,
|
|
486
|
+
desc: t.api.rows.interactive,
|
|
487
|
+
},
|
|
488
|
+
]}
|
|
489
|
+
/>
|
|
490
|
+
</section>
|
|
491
|
+
</>
|
|
492
|
+
);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/* ───────── 데모 전용 로컬 헬퍼 ───────── */
|
|
496
|
+
|
|
497
|
+
const titleStyle: React.CSSProperties = {
|
|
498
|
+
fontSize: "var(--text-base)",
|
|
499
|
+
fontWeight: "var(--font-weight-medium)",
|
|
500
|
+
color: "var(--fg-strong)",
|
|
501
|
+
margin: 0,
|
|
502
|
+
};
|
|
503
|
+
const mutedStyle: React.CSSProperties = {
|
|
504
|
+
color: "var(--fg-muted)",
|
|
505
|
+
fontSize: "var(--text-sm)",
|
|
506
|
+
margin: 0,
|
|
507
|
+
};
|
|
508
|
+
const headerRowStyle: React.CSSProperties = {
|
|
509
|
+
display: "flex",
|
|
510
|
+
alignItems: "flex-start",
|
|
511
|
+
justifyContent: "space-between",
|
|
512
|
+
gap: "var(--space-2)",
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
function stackStyle(gap: string): React.CSSProperties {
|
|
516
|
+
return {
|
|
517
|
+
display: "flex",
|
|
518
|
+
flexDirection: "column",
|
|
519
|
+
gap,
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
function SettingRow({ label, value }: { label: string; value: string }) {
|
|
524
|
+
return (
|
|
525
|
+
<div
|
|
526
|
+
style={{
|
|
527
|
+
display: "flex",
|
|
528
|
+
alignItems: "baseline",
|
|
529
|
+
justifyContent: "space-between",
|
|
530
|
+
gap: "var(--space-2)",
|
|
531
|
+
}}
|
|
532
|
+
>
|
|
533
|
+
<span style={{ color: "var(--fg-muted)" }}>{label}</span>
|
|
534
|
+
<span style={{ fontWeight: "var(--font-weight-book)" }}>{value}</span>
|
|
535
|
+
</div>
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
function variantHint(v: CardVariant, t: Strings): string {
|
|
540
|
+
if (v === "line") return t.variantHints.line;
|
|
541
|
+
if (v === "soft") return t.variantHints.soft;
|
|
542
|
+
if (v === "elevated") return t.variantHints.elevated;
|
|
543
|
+
return t.variantHints.framed;
|
|
544
|
+
}
|
|
545
|
+
````
|
|
546
|
+
|
|
547
|
+
### Source: web/examples/PipelineCardExample.module.css
|
|
548
|
+
|
|
549
|
+
````css
|
|
550
|
+
.card {
|
|
551
|
+
display: grid;
|
|
552
|
+
gap: var(--space-4);
|
|
553
|
+
width: 100%;
|
|
554
|
+
max-width: calc(var(--size-24) * 4);
|
|
555
|
+
min-width: 0;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.card.pipelineCard {
|
|
559
|
+
gap: var(--space-2);
|
|
560
|
+
padding-top: var(--space-6);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.card.pipelineCard h3 {
|
|
564
|
+
font-size: var(--text-base);
|
|
565
|
+
line-height: var(--lh-tight);
|
|
566
|
+
}
|
|
567
|
+
````
|
|
568
|
+
|
|
569
|
+
### Source: web/examples/PipelineCardExample.tsx
|
|
570
|
+
|
|
571
|
+
````tsx
|
|
572
|
+
"use client";
|
|
573
|
+
|
|
574
|
+
import { Card } from "@/components/Card";
|
|
575
|
+
import { SegmentedChart } from "@/components/SegmentedChart";
|
|
576
|
+
import styles from "./PipelineCardExample.module.css";
|
|
577
|
+
|
|
578
|
+
export const pipelineSource = [
|
|
579
|
+
{ id: "discovery", label: "Discovery", en: "Discovery", value: 12600, count: 12 },
|
|
580
|
+
{ id: "review", label: "Review", en: "Review", value: 9800, count: 8 },
|
|
581
|
+
{ id: "proposal", label: "Proposal", en: "Proposal", value: 12400, count: 7 },
|
|
582
|
+
{ id: "negotiation", label: "Negotiation", en: "Negotiation", value: 8000, count: 5 },
|
|
583
|
+
];
|
|
584
|
+
|
|
585
|
+
export function PipelineCardExample({ lang = "ko" }: { lang?: "ko" | "en" }) {
|
|
586
|
+
const en = lang === "en";
|
|
587
|
+
const title = "Deal pipeline";
|
|
588
|
+
const data = pipelineSource.map((item) => ({
|
|
589
|
+
id: item.id,
|
|
590
|
+
label: item.en,
|
|
591
|
+
value: item.value,
|
|
592
|
+
description: `${item.count} deals`,
|
|
593
|
+
}));
|
|
594
|
+
const count = pipelineSource.reduce((sum, item) => sum + item.count, 0);
|
|
595
|
+
|
|
596
|
+
return (
|
|
597
|
+
<Card variant="framed" className={`${styles.card} ${styles.pipelineCard}`}>
|
|
598
|
+
<SegmentedChart title={title} showSummary data={data} unit={"× ₩10k"}
|
|
599
|
+
caption={`${count} deals total`} aria-label={title} />
|
|
600
|
+
</Card>
|
|
601
|
+
);
|
|
602
|
+
}
|
|
603
|
+
````
|