@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
|
@@ -25,6 +25,7 @@ import type {
|
|
|
25
25
|
DensityValue,
|
|
26
26
|
IconFamily,
|
|
27
27
|
LangValue,
|
|
28
|
+
MaterialValue,
|
|
28
29
|
MotionValue,
|
|
29
30
|
PaletteSet,
|
|
30
31
|
ShapeValue,
|
|
@@ -50,6 +51,7 @@ export type AppliedConfig = {
|
|
|
50
51
|
brand: string;
|
|
51
52
|
paletteSet: PaletteSet;
|
|
52
53
|
mono: boolean;
|
|
54
|
+
material: MaterialValue;
|
|
53
55
|
shape: ShapeValue;
|
|
54
56
|
density: DensityValue;
|
|
55
57
|
motion: MotionValue;
|
|
@@ -150,6 +152,8 @@ export async function applyOnboarding(
|
|
|
150
152
|
config: AppliedConfig,
|
|
151
153
|
options: { overwrite?: boolean; lang?: Lang } = {}
|
|
152
154
|
): Promise<ApplyResult> {
|
|
155
|
+
// Older integrations may omit the newly added axis. Persist a valid default.
|
|
156
|
+
config = { ...config, material: config.material === "glass" ? "glass" : "solid" };
|
|
153
157
|
const lang: Lang = options.lang ?? "ko";
|
|
154
158
|
const msg = ERROR_MESSAGES[lang];
|
|
155
159
|
|
|
@@ -220,6 +224,7 @@ ${themeLine}
|
|
|
220
224
|
| Brand | \`${c.brand}\` | ${t.brandDesc} |
|
|
221
225
|
| Palette Set | \`${c.paletteSet}\` | ${paletteSetDesc(c.paletteSet, lang)} |
|
|
222
226
|
| Mono | \`${String(c.mono)}\` | ${c.mono ? t.monoOn : t.monoOff} |
|
|
227
|
+
| Material | \`${c.material}\` | ${c.material === "glass" ? (lang === "ko" ? "떠 있는 표면의 반투명 글래스" : "Translucent floating surfaces") : (lang === "ko" ? "불투명 표면" : "Opaque surfaces")} |
|
|
223
228
|
| Shape | \`${c.shape}\` | ${shapeDesc(c.shape, lang)} |
|
|
224
229
|
| Density | \`${c.density}\` | ${densityDesc(c.density, lang)} |
|
|
225
230
|
| Motion | \`${c.motion}\` | ${motionDesc(c.motion, lang)} |
|
|
@@ -38,3 +38,11 @@
|
|
|
38
38
|
--onb-mode-light: #FFFFFF;
|
|
39
39
|
--onb-mode-dark: #1A1A1A;
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
:root {
|
|
43
|
+
--onb-preview-bg: #E8E0D7;
|
|
44
|
+
--onb-preview-line: #B5A49B;
|
|
45
|
+
--onb-preview-glass: rgba(255, 255, 255, 0.55);
|
|
46
|
+
--onb-preview-blur: 12px;
|
|
47
|
+
--onb-preview-compact-blur: 3px;
|
|
48
|
+
}
|
|
@@ -164,8 +164,8 @@ const VIBE_CHOICES_I18N: ReadonlyArray<{
|
|
|
164
164
|
id: "playful",
|
|
165
165
|
title: { ko: "활력 있고 통통 튀는", en: "Energetic and bouncy" },
|
|
166
166
|
hint: {
|
|
167
|
-
ko: "
|
|
168
|
-
en: "Rounded corners
|
|
167
|
+
ko: "둥근 모서리와 탄력 있는 모션. 친근하고 경쾌한 화면.",
|
|
168
|
+
en: "Rounded corners and springy motion for a friendly, energetic feel.",
|
|
169
169
|
},
|
|
170
170
|
examples: {
|
|
171
171
|
ko: "스타트업 프로덕트, 마케팅 사이트, 온보딩·튜토리얼",
|
|
@@ -226,8 +226,8 @@ const PALETTE_CHOICES_I18N: ReadonlyArray<{
|
|
|
226
226
|
id: "analogous",
|
|
227
227
|
title: { ko: "잔잔한 조화", en: "Analogous" },
|
|
228
228
|
hint: {
|
|
229
|
-
ko: "
|
|
230
|
-
en: "
|
|
229
|
+
ko: "가까운 색으로 차분하게",
|
|
230
|
+
en: "Neighboring hues, calm palette.",
|
|
231
231
|
},
|
|
232
232
|
examples: {
|
|
233
233
|
ko: "SaaS, 관리 도구, 포털",
|
|
@@ -238,8 +238,8 @@ const PALETTE_CHOICES_I18N: ReadonlyArray<{
|
|
|
238
238
|
id: "triadic",
|
|
239
239
|
title: { ko: "강한 대비", en: "Triadic" },
|
|
240
240
|
hint: {
|
|
241
|
-
ko: "
|
|
242
|
-
en: "
|
|
241
|
+
ko: "서로 다른 색으로 또렷하게",
|
|
242
|
+
en: "Distinct hues, clear separation.",
|
|
243
243
|
},
|
|
244
244
|
examples: {
|
|
245
245
|
ko: "브랜드 사이트, 마케팅, 캠페인",
|
|
@@ -250,8 +250,8 @@ const PALETTE_CHOICES_I18N: ReadonlyArray<{
|
|
|
250
250
|
id: "split",
|
|
251
251
|
title: { ko: "보색 분할", en: "Split-complementary" },
|
|
252
252
|
hint: {
|
|
253
|
-
ko: "
|
|
254
|
-
en: "
|
|
253
|
+
ko: "반대편 색으로 균형 있게",
|
|
254
|
+
en: "Base hue with contrasting accents.",
|
|
255
255
|
},
|
|
256
256
|
examples: {
|
|
257
257
|
ko: "데이터 대시보드, 콘텐츠 플랫폼",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
transition: opacity var(--duration-fast) var(--ease-out);
|
|
9
9
|
/* 초기값 1 — active=true로 mount되는 자리에서 fade-in 깜빡임 방지. active=false면 아래 룰이 0으로 밀어냄. */
|
|
10
10
|
opacity: 1;
|
|
11
|
-
--_pb-bar: var(--
|
|
11
|
+
--_pb-bar: var(--primary);
|
|
12
12
|
}
|
|
13
13
|
.root:not([data-active]) {
|
|
14
14
|
opacity: 0;
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
white-space: nowrap;
|
|
43
43
|
}
|
|
44
44
|
.output {
|
|
45
|
+
margin-inline-start: auto;
|
|
45
46
|
color: var(--fg-muted);
|
|
46
47
|
flex-shrink: 0;
|
|
47
48
|
font-variant-numeric: tabular-nums;
|
|
@@ -49,17 +50,19 @@
|
|
|
49
50
|
|
|
50
51
|
/* Track — 흐린 배경(bar 색의 저알파)으로 "얼마 남았는지" 시각 신호.
|
|
51
52
|
determinate 60%일 때 뒤 40%가 희미하게 보여야 비율감이 생김.
|
|
52
|
-
bar와 같은
|
|
53
|
+
bar와 같은 포인트 색의 저알파 — 테마 변경 시 track도 자동 추종. */
|
|
53
54
|
.track {
|
|
54
55
|
position: relative;
|
|
55
56
|
height: var(--_pb-height);
|
|
56
57
|
background: color-mix(in oklch, var(--_pb-bar) 15%, transparent);
|
|
57
58
|
overflow: hidden;
|
|
59
|
+
corner-shape: var(--progressbar-corner-shape, var(--corner-shape));
|
|
58
60
|
border-radius: var(--radius-full);
|
|
59
61
|
}
|
|
60
62
|
/* fixed 자리는 트랙 배경 없이(화면 상단 overlay가 콘텐츠에 겹침). */
|
|
61
63
|
.root[data-position="fixed"] .track {
|
|
62
64
|
background: transparent;
|
|
65
|
+
corner-shape: var(--progressbar-corner-shape, var(--corner-shape));
|
|
63
66
|
border-radius: 0;
|
|
64
67
|
}
|
|
65
68
|
|
|
@@ -70,22 +73,19 @@
|
|
|
70
73
|
.bar {
|
|
71
74
|
height: 100%;
|
|
72
75
|
background: var(--_pb-bar);
|
|
76
|
+
corner-shape: var(--progressbar-corner-shape, var(--corner-shape));
|
|
73
77
|
border-radius: var(--radius-full);
|
|
74
|
-
/* determinate width 변화는 duration-base로 부드럽게. background는
|
|
78
|
+
/* determinate width 변화는 duration-base로 부드럽게. background는 테마 전환용. */
|
|
75
79
|
transition:
|
|
76
80
|
width var(--duration-base) var(--ease-out),
|
|
77
81
|
background var(--duration-base) var(--ease-out);
|
|
78
82
|
}
|
|
79
83
|
/* fixed 자리는 왼쪽만 flat(화면 상단 밀착), 오른쪽만 둥글게. */
|
|
80
84
|
.root[data-position="fixed"] .bar {
|
|
85
|
+
corner-shape: var(--progressbar-corner-shape, var(--corner-shape));
|
|
81
86
|
border-radius: 0 var(--radius-full) var(--radius-full) 0;
|
|
82
87
|
}
|
|
83
88
|
|
|
84
|
-
/* Status 색 — 기본은 fg-strong, 나머지는 각 상태 색. track 배경은 color-mix로 자동 추종. */
|
|
85
|
-
.root[data-status="success"] { --_pb-bar: var(--success); }
|
|
86
|
-
.root[data-status="warning"] { --_pb-bar: var(--warning); }
|
|
87
|
-
.root[data-status="danger"] { --_pb-bar: var(--destructive); }
|
|
88
|
-
|
|
89
89
|
.root[data-mode="determinate"] .bar {
|
|
90
90
|
transform-origin: left center;
|
|
91
91
|
}
|
|
@@ -125,3 +125,37 @@
|
|
|
125
125
|
transition: none;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
+
|
|
129
|
+
/* Flow — Canvas 연결선처럼 양끝이 희미한 빛이 지나간다. value는 ARIA에만 반영. */
|
|
130
|
+
.root[data-variant="flow"] {
|
|
131
|
+
--_pb-flow-duration: var(--duration-flow);
|
|
132
|
+
--_pb-flow-easing: var(--ease-flow);
|
|
133
|
+
--_pb-flow-span: 35%;
|
|
134
|
+
--_pb-flow-fade: 12%;
|
|
135
|
+
}
|
|
136
|
+
.root[data-variant="flow"] .track {
|
|
137
|
+
background: transparent;
|
|
138
|
+
mask-image: linear-gradient(to right, transparent, black var(--_pb-flow-fade), black calc(100% - var(--_pb-flow-fade)), transparent);
|
|
139
|
+
}
|
|
140
|
+
.root[data-variant="flow"] .bar {
|
|
141
|
+
width: var(--_pb-flow-span);
|
|
142
|
+
background: linear-gradient(to right, transparent, var(--_pb-bar), transparent);
|
|
143
|
+
animation: pb-flow var(--_pb-flow-duration) var(--_pb-flow-easing) infinite;
|
|
144
|
+
transition: none;
|
|
145
|
+
}
|
|
146
|
+
@keyframes pb-flow {
|
|
147
|
+
0%, 8% { transform: translateX(-100%); }
|
|
148
|
+
92%, 100% { transform: translateX(286%); }
|
|
149
|
+
}
|
|
150
|
+
:global([data-motion="none"]) .root[data-variant="flow"] .bar {
|
|
151
|
+
animation: none;
|
|
152
|
+
transform: translateX(93%);
|
|
153
|
+
opacity: 0.5;
|
|
154
|
+
}
|
|
155
|
+
@media (prefers-reduced-motion: reduce) {
|
|
156
|
+
.root[data-variant="flow"] .bar {
|
|
157
|
+
animation: none;
|
|
158
|
+
transform: translateX(93%);
|
|
159
|
+
opacity: 0.5;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -5,7 +5,6 @@ import styles from "./ProgressBar.module.css";
|
|
|
5
5
|
|
|
6
6
|
export type ProgressBarSize = "sm" | "md";
|
|
7
7
|
export type ProgressBarPosition = "fixed" | "inline";
|
|
8
|
-
export type ProgressBarStatus = "default" | "success" | "warning" | "danger";
|
|
9
8
|
|
|
10
9
|
export interface ProgressBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
11
10
|
/**
|
|
@@ -13,12 +12,12 @@ export interface ProgressBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
13
12
|
* 실제 %가 없는 라우팅/네트워크 로딩용.
|
|
14
13
|
*/
|
|
15
14
|
value?: number;
|
|
15
|
+
/** flow는 진행률 길이 대신 부드러운 빛의 흐름을 반복한다. value는 접근성 진행률로 유지한다. */
|
|
16
|
+
variant?: "progress" | "flow";
|
|
16
17
|
/** 트랙 두께. sm=2px, md=4px. 기본 md. */
|
|
17
18
|
size?: ProgressBarSize;
|
|
18
19
|
/** fixed는 화면 최상단 overlay, inline은 흐름 안에 앉음. 기본 inline. */
|
|
19
20
|
position?: ProgressBarPosition;
|
|
20
|
-
/** 상태색. 기본 default(fg-strong 중성). success/warning/danger는 업로드 완료·멈춤·실패에. */
|
|
21
|
-
status?: ProgressBarStatus;
|
|
22
21
|
/** 표시 여부. false면 즉시 숨김 + fade-out. */
|
|
23
22
|
active?: boolean;
|
|
24
23
|
/** 좌측 라벨 (예: "업로드 중"). 공급 시 자체 Label 슬롯 렌더. */
|
|
@@ -38,9 +37,9 @@ const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(
|
|
|
38
37
|
(
|
|
39
38
|
{
|
|
40
39
|
value,
|
|
40
|
+
variant = "progress",
|
|
41
41
|
size = "md",
|
|
42
42
|
position = "inline",
|
|
43
|
-
status = "default",
|
|
44
43
|
active = true,
|
|
45
44
|
label,
|
|
46
45
|
output,
|
|
@@ -60,9 +59,9 @@ const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(
|
|
|
60
59
|
aria-valuemin={0}
|
|
61
60
|
aria-valuemax={100}
|
|
62
61
|
aria-valuenow={clamped}
|
|
62
|
+
data-variant={variant}
|
|
63
63
|
data-position={position}
|
|
64
64
|
data-size={size}
|
|
65
|
-
data-status={status}
|
|
66
65
|
data-active={active || undefined}
|
|
67
66
|
data-mode={isDeterminate ? "determinate" : "indeterminate"}
|
|
68
67
|
className={[styles.root, className ?? ""].filter(Boolean).join(" ")}
|
|
@@ -77,7 +76,7 @@ const ProgressBar = forwardRef<HTMLDivElement, ProgressBarProps>(
|
|
|
77
76
|
<div className={styles.track}>
|
|
78
77
|
<div
|
|
79
78
|
className={styles.bar}
|
|
80
|
-
style={isDeterminate ? { width: `${clamped}%` } : undefined}
|
|
79
|
+
style={isDeterminate && variant !== "flow" ? { width: `${clamped}%` } : undefined}
|
|
81
80
|
/>
|
|
82
81
|
</div>
|
|
83
82
|
</div>
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
|
|
10
10
|
background: var(--bg-subtle);
|
|
11
11
|
border: 0;
|
|
12
|
+
corner-shape: var(--corner-shape);
|
|
12
13
|
border-radius: var(--radius-md);
|
|
13
14
|
color: var(--fg);
|
|
14
15
|
font-size: var(--text-sm);
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
border: 0;
|
|
41
42
|
background: transparent;
|
|
42
43
|
color: var(--fg-muted);
|
|
44
|
+
corner-shape: var(--corner-shape);
|
|
43
45
|
border-radius: var(--radius-sm);
|
|
44
46
|
cursor: pointer;
|
|
45
47
|
transition: var(--transition-colors);
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
width: var(--size-4);
|
|
36
36
|
height: var(--size-4);
|
|
37
37
|
margin-top: calc((var(--lh-base) - var(--size-4)) / 2);
|
|
38
|
+
corner-shape: round;
|
|
38
39
|
border-radius: var(--radius-full);
|
|
39
40
|
border: 1px solid var(--border-strong);
|
|
40
41
|
background: var(--bg);
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
content: "";
|
|
50
51
|
position: absolute;
|
|
51
52
|
inset: 25%;
|
|
53
|
+
corner-shape: round;
|
|
52
54
|
border-radius: var(--radius-full);
|
|
53
55
|
background: var(--selected-fg);
|
|
54
56
|
transform: scale(0);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* RadioCard ────────────────────────────────────────────────
|
|
2
2
|
온보딩·유저 타입 선택·문서 지도 등 큰 선택지/네비게이션 카드.
|
|
3
|
-
-
|
|
3
|
+
- RadioCard: radio(단일) | link(네비게이션), CheckboxCard: checkbox(다중)
|
|
4
4
|
- layout: vertical(아이콘 위 · 텍스트 아래 가운데) | horizontal(아이콘 왼쪽 · 텍스트 오른쪽 좌측정렬)
|
|
5
5
|
|
|
6
6
|
구조 · 상태 처리 · 접근성은 [[CheckboxCard]]와 동일한 패턴:
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
user-select: none;
|
|
17
17
|
color: var(--fg);
|
|
18
18
|
font-family: var(--font-sans);
|
|
19
|
+
corner-shape: var(--card-corner-shape);
|
|
19
20
|
border-radius: var(--radius-lg);
|
|
20
21
|
transition: var(--transition-colors), var(--transition-press);
|
|
21
22
|
/* Hover translateY 상단 잘림 방지 */
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
.surface {
|
|
31
32
|
position: absolute;
|
|
32
33
|
inset: 0;
|
|
34
|
+
corner-shape: inherit;
|
|
33
35
|
border-radius: inherit;
|
|
34
36
|
background: transparent;
|
|
35
37
|
border: 1px solid var(--border);
|
|
@@ -64,7 +66,7 @@
|
|
|
64
66
|
min-width: 0;
|
|
65
67
|
}
|
|
66
68
|
|
|
67
|
-
/* ── Align:
|
|
69
|
+
/* ── Align: center는 아이콘과 텍스트를 위아래 중앙 정렬 ── */
|
|
68
70
|
.root[data-layout="vertical"][data-align="center"] .content {
|
|
69
71
|
align-items: center;
|
|
70
72
|
text-align: center;
|
|
@@ -86,10 +88,16 @@
|
|
|
86
88
|
align-items: flex-start;
|
|
87
89
|
}
|
|
88
90
|
.root[data-layout="horizontal"][data-align="center"] .content {
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
align-items: center;
|
|
89
93
|
text-align: center;
|
|
90
|
-
|
|
94
|
+
gap: var(--space-1);
|
|
95
|
+
}
|
|
96
|
+
.root[data-layout="horizontal"][data-align="center"] .icon {
|
|
97
|
+
align-self: center;
|
|
91
98
|
}
|
|
92
99
|
.root[data-layout="horizontal"][data-align="center"] .text {
|
|
100
|
+
flex: initial;
|
|
93
101
|
align-items: center;
|
|
94
102
|
}
|
|
95
103
|
|
|
@@ -206,3 +214,88 @@
|
|
|
206
214
|
.root[data-mode="link"] .description {
|
|
207
215
|
color: var(--fg-muted);
|
|
208
216
|
}
|
|
217
|
+
|
|
218
|
+
/* 공유 선택 표시: RadioCard는 dot, CheckboxCard는 check. */
|
|
219
|
+
.indicator {
|
|
220
|
+
display: inline-flex;
|
|
221
|
+
align-items: center;
|
|
222
|
+
justify-content: center;
|
|
223
|
+
flex-shrink: 0;
|
|
224
|
+
height: var(--lh-sm);
|
|
225
|
+
}
|
|
226
|
+
/* Radio dot — 선택 전 배경 없음(부모 표면 노출). */
|
|
227
|
+
.radioDot {
|
|
228
|
+
display: inline-block;
|
|
229
|
+
width: var(--size-4);
|
|
230
|
+
height: var(--size-4);
|
|
231
|
+
corner-shape: round;
|
|
232
|
+
border-radius: var(--radius-full);
|
|
233
|
+
box-shadow: inset 0 0 0 1px var(--border-strong);
|
|
234
|
+
background: transparent;
|
|
235
|
+
transition:
|
|
236
|
+
box-shadow var(--duration-slow) var(--ease-out),
|
|
237
|
+
background var(--duration-slow) var(--ease-out);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* Checkbox — 선택 전 배경 없음(부모 표면 노출). */
|
|
241
|
+
.checkBox {
|
|
242
|
+
display: inline-flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
justify-content: center;
|
|
245
|
+
width: var(--size-4);
|
|
246
|
+
height: var(--size-4);
|
|
247
|
+
corner-shape: var(--corner-shape);
|
|
248
|
+
border-radius: var(--radius-xs);
|
|
249
|
+
border: 1px solid var(--border-strong);
|
|
250
|
+
background: transparent;
|
|
251
|
+
color: transparent;
|
|
252
|
+
transition: var(--transition-colors);
|
|
253
|
+
}
|
|
254
|
+
.checkBox > svg {
|
|
255
|
+
width: 100%;
|
|
256
|
+
height: 100%;
|
|
257
|
+
display: block;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
/* Radio dot — checked 시 안쪽 도트를 accent 색으로. stroke는 항상 1px.
|
|
262
|
+
바깥은 투명(부모 표면 노출). */
|
|
263
|
+
.input:checked ~ .content .radioDot {
|
|
264
|
+
box-shadow: inset 0 0 0 1px var(--selected-fg);
|
|
265
|
+
background: radial-gradient(
|
|
266
|
+
circle at center,
|
|
267
|
+
var(--selected-fg) 0,
|
|
268
|
+
var(--selected-fg) 30%,
|
|
269
|
+
transparent 31%
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/* Checkbox — checked 시 배경/경계/체크 색이 accent로 반전. */
|
|
274
|
+
.input:checked ~ .content .checkBox {
|
|
275
|
+
background: var(--selected-fg);
|
|
276
|
+
border-color: var(--selected-fg);
|
|
277
|
+
color: var(--bg);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
.root[data-layout="horizontal"][data-align="start"] .indicator {
|
|
282
|
+
align-self: flex-start;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.root[data-mode="button"] {
|
|
286
|
+
appearance: none;
|
|
287
|
+
padding: 0;
|
|
288
|
+
border: 0;
|
|
289
|
+
background: transparent;
|
|
290
|
+
font: inherit;
|
|
291
|
+
text-align: start;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.root[data-mode="button"]:focus-visible {
|
|
295
|
+
outline: none;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.root[data-mode="button"]:focus-visible .surface {
|
|
299
|
+
background: var(--hover);
|
|
300
|
+
border-color: var(--border-strong);
|
|
301
|
+
}
|
|
@@ -1,70 +1,83 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import Link from "next/link";
|
|
4
|
-
import { forwardRef, type AnchorHTMLAttributes, type InputHTMLAttributes, type ReactNode } from "react";
|
|
4
|
+
import { forwardRef, type AnchorHTMLAttributes, type ButtonHTMLAttributes, type InputHTMLAttributes, type ReactNode } from "react";
|
|
5
5
|
|
|
6
6
|
import { Icon, type IconName } from "../Icon";
|
|
7
7
|
|
|
8
8
|
import styles from "./RadioCard.module.css";
|
|
9
9
|
|
|
10
|
-
export type RadioCardMode = "radio" | "
|
|
10
|
+
export type RadioCardMode = "radio" | "link" | "button";
|
|
11
|
+
type ChoiceCardMode = RadioCardMode | "checkbox";
|
|
11
12
|
export type RadioCardLayout = "vertical" | "horizontal";
|
|
12
13
|
export type RadioCardSize = "md" | "lg";
|
|
13
14
|
export type RadioCardAlign = "start" | "center";
|
|
14
15
|
|
|
15
|
-
type
|
|
16
|
+
export type ChoiceCardCommonProps = {
|
|
16
17
|
/**
|
|
17
18
|
* radio: 단일 선택 (RadioGroup으로 묶기).
|
|
18
|
-
*
|
|
19
|
+
* 다중 선택은 CheckboxCard 사용.
|
|
19
20
|
* link: 네비게이션 카드 (`<a>` 렌더, href 필수, 선택 상태 없음).
|
|
21
|
+
* button: 선택 상태 없이 onClick을 실행하는 카드 (`<button>` 렌더).
|
|
20
22
|
*/
|
|
21
|
-
mode?:
|
|
23
|
+
mode?: ChoiceCardMode;
|
|
22
24
|
/**
|
|
23
25
|
* vertical: 아이콘 위·텍스트 아래 (온보딩·유저 타입 선택 등 페이지 중앙 큰 선택지).
|
|
24
26
|
* horizontal: 아이콘 왼쪽·텍스트 오른쪽 (문서 지도·설정 라우트 등 네비게이션 리스트).
|
|
25
|
-
*
|
|
27
|
+
* align="center"이면 layout과 관계없이 아이콘 위·텍스트 아래로 가운데 정렬.
|
|
26
28
|
*/
|
|
27
29
|
layout?: RadioCardLayout;
|
|
30
|
+
/** 선택 표시. 미지정 시 아이콘 없는 선택 카드에 표시한다. */
|
|
31
|
+
indicator?: boolean;
|
|
28
32
|
/**
|
|
29
33
|
* md(기본): padding space-4, title text-sm, icon size-md.
|
|
30
34
|
* lg: padding space-5, title text-md, icon size-lg. 큰 중앙 선택지에.
|
|
31
35
|
*/
|
|
32
36
|
size?: RadioCardSize;
|
|
33
37
|
/**
|
|
34
|
-
* start: 좌측정렬. center: 가운데 정렬.
|
|
38
|
+
* start: 좌측정렬. center: 아이콘 위·텍스트 아래 가운데 정렬.
|
|
35
39
|
* 미지정 시 layout의 자연 정렬을 따른다 (vertical→center, horizontal→start).
|
|
36
40
|
*/
|
|
37
41
|
align?: RadioCardAlign;
|
|
38
42
|
/**
|
|
39
43
|
* IconName 문자열이면 기본 Icon을 렌더. ReactNode를 넘기면 그대로 슬롯에 꽂아
|
|
40
44
|
* fill variant·커스텀 색 Icon·이미지·로고 등을 자유롭게 사용할 수 있다.
|
|
41
|
-
* 생략 시 아이콘
|
|
45
|
+
* 생략 시 아이콘 영역은 사라지며 indicator 기본값은 true.
|
|
42
46
|
*/
|
|
43
47
|
icon?: IconName | ReactNode;
|
|
44
48
|
title: ReactNode;
|
|
45
49
|
description?: ReactNode;
|
|
46
50
|
};
|
|
47
51
|
|
|
48
|
-
type InputChoiceProps =
|
|
52
|
+
type InputChoiceProps = ChoiceCardCommonProps &
|
|
49
53
|
Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "title"> & {
|
|
50
54
|
mode?: "radio" | "checkbox";
|
|
51
55
|
href?: never;
|
|
52
56
|
};
|
|
53
57
|
|
|
54
|
-
type LinkChoiceProps =
|
|
58
|
+
type LinkChoiceProps = ChoiceCardCommonProps &
|
|
55
59
|
Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "title"> & {
|
|
56
60
|
mode: "link";
|
|
57
61
|
href: string;
|
|
58
62
|
};
|
|
59
63
|
|
|
60
|
-
|
|
64
|
+
type ButtonChoiceProps = ChoiceCardCommonProps &
|
|
65
|
+
Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "size" | "title"> & {
|
|
66
|
+
mode: "button";
|
|
67
|
+
href?: never;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type ChoiceCardInputProps = InputChoiceProps;
|
|
71
|
+
type ChoiceCardProps = InputChoiceProps | LinkChoiceProps | ButtonChoiceProps;
|
|
72
|
+
export type RadioCardProps = (Omit<InputChoiceProps, "mode"> & { mode?: "radio" }) | LinkChoiceProps | ButtonChoiceProps;
|
|
61
73
|
|
|
62
|
-
const
|
|
74
|
+
export const ChoiceCard = forwardRef<HTMLInputElement | HTMLAnchorElement | HTMLButtonElement, ChoiceCardProps>(
|
|
63
75
|
(props, ref) => {
|
|
64
76
|
const {
|
|
65
77
|
className,
|
|
66
78
|
mode = "radio",
|
|
67
|
-
layout
|
|
79
|
+
layout: requestedLayout,
|
|
80
|
+
indicator: requestedIndicator,
|
|
68
81
|
size = "md",
|
|
69
82
|
align,
|
|
70
83
|
icon,
|
|
@@ -72,6 +85,8 @@ const RadioCard = forwardRef<HTMLInputElement | HTMLAnchorElement, RadioCardProp
|
|
|
72
85
|
description,
|
|
73
86
|
} = props;
|
|
74
87
|
|
|
88
|
+
const indicator = (mode === "radio" || mode === "checkbox") && (requestedIndicator ?? (icon == null || icon === false));
|
|
89
|
+
const layout = requestedLayout ?? (indicator ? "horizontal" : "vertical");
|
|
75
90
|
const resolvedAlign: RadioCardAlign =
|
|
76
91
|
align ?? (layout === "vertical" ? "center" : "start");
|
|
77
92
|
const rootClass = [styles.root, className ?? ""].filter(Boolean).join(" ");
|
|
@@ -81,6 +96,13 @@ const RadioCard = forwardRef<HTMLInputElement | HTMLAnchorElement, RadioCardProp
|
|
|
81
96
|
<>
|
|
82
97
|
<span className={styles.surface} aria-hidden />
|
|
83
98
|
<span className={styles.content}>
|
|
99
|
+
{indicator && (
|
|
100
|
+
<span className={styles.indicator} aria-hidden>
|
|
101
|
+
{mode === "checkbox" ? (
|
|
102
|
+
<span className={styles.checkBox}><Icon name="check" /></span>
|
|
103
|
+
) : <span className={styles.radioDot} />}
|
|
104
|
+
</span>
|
|
105
|
+
)}
|
|
84
106
|
{hasIcon && (
|
|
85
107
|
<span className={styles.icon} aria-hidden>
|
|
86
108
|
{typeof icon === "string" ? <Icon name={icon as IconName} /> : icon}
|
|
@@ -99,8 +121,10 @@ const RadioCard = forwardRef<HTMLInputElement | HTMLAnchorElement, RadioCardProp
|
|
|
99
121
|
if (mode === "link") {
|
|
100
122
|
const {
|
|
101
123
|
href,
|
|
124
|
+
className: _className,
|
|
102
125
|
mode: _m,
|
|
103
126
|
layout: _l,
|
|
127
|
+
indicator: _indicator,
|
|
104
128
|
size: _s,
|
|
105
129
|
align: _a,
|
|
106
130
|
icon: _i,
|
|
@@ -124,9 +148,43 @@ const RadioCard = forwardRef<HTMLInputElement | HTMLAnchorElement, RadioCardProp
|
|
|
124
148
|
);
|
|
125
149
|
}
|
|
126
150
|
|
|
151
|
+
if (mode === "button") {
|
|
152
|
+
const {
|
|
153
|
+
mode: _mode,
|
|
154
|
+
className: _className,
|
|
155
|
+
layout: _layout,
|
|
156
|
+
indicator: _indicator,
|
|
157
|
+
size: _size,
|
|
158
|
+
align: _align,
|
|
159
|
+
icon: _icon,
|
|
160
|
+
title: _title,
|
|
161
|
+
description: _description,
|
|
162
|
+
disabled,
|
|
163
|
+
...rest
|
|
164
|
+
} = props as ButtonChoiceProps;
|
|
165
|
+
return (
|
|
166
|
+
<button
|
|
167
|
+
{...rest}
|
|
168
|
+
ref={ref as React.Ref<HTMLButtonElement>}
|
|
169
|
+
type="button"
|
|
170
|
+
className={rootClass}
|
|
171
|
+
data-layout={layout}
|
|
172
|
+
data-size={size}
|
|
173
|
+
data-align={resolvedAlign}
|
|
174
|
+
data-mode="button"
|
|
175
|
+
data-disabled={disabled ? "true" : "false"}
|
|
176
|
+
disabled={disabled}
|
|
177
|
+
>
|
|
178
|
+
{inner}
|
|
179
|
+
</button>
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
127
183
|
const {
|
|
184
|
+
className: _className,
|
|
128
185
|
mode: _m,
|
|
129
186
|
layout: _l,
|
|
187
|
+
indicator: _indicator,
|
|
130
188
|
size: _s,
|
|
131
189
|
align: _a,
|
|
132
190
|
icon: _i,
|
|
@@ -159,6 +217,11 @@ const RadioCard = forwardRef<HTMLInputElement | HTMLAnchorElement, RadioCardProp
|
|
|
159
217
|
},
|
|
160
218
|
);
|
|
161
219
|
|
|
220
|
+
ChoiceCard.displayName = "ChoiceCard";
|
|
221
|
+
|
|
222
|
+
const RadioCard = forwardRef<HTMLInputElement | HTMLAnchorElement | HTMLButtonElement, RadioCardProps>(
|
|
223
|
+
(props, ref) => <ChoiceCard {...props} ref={ref} />,
|
|
224
|
+
);
|
|
162
225
|
RadioCard.displayName = "RadioCard";
|
|
163
226
|
|
|
164
227
|
export { RadioCard };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { RadioCard } from "./RadioCard";
|
|
2
|
-
export type { RadioCardProps, RadioCardMode, RadioCardLayout } from "./RadioCard";
|
|
2
|
+
export type { RadioCardProps, RadioCardMode, RadioCardLayout, RadioCardSize, RadioCardAlign } from "./RadioCard";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
.root {
|
|
2
|
+
--chart-enter-duration: calc(var(--duration-slower) * 2);
|
|
3
|
+
--chart-enter-easing: cubic-bezier(0.22, 1.12, 0.36, 1); /* lint-hardcoded: ignore */
|
|
2
4
|
--segmented-secondary-fg: color-mix(in oklch, var(--fg-muted) 70%, var(--fg-subtle));
|
|
3
5
|
--segmented-radius: max(var(--hairline), calc(var(--radius-xs) / 4));
|
|
4
6
|
--segmented-color-1: color-mix(in oklch, var(--primary) 24%, var(--bg-muted));
|
|
@@ -61,6 +63,7 @@
|
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
.track {
|
|
66
|
+
transform-origin: left center;
|
|
64
67
|
display: flex;
|
|
65
68
|
height: var(--size-3);
|
|
66
69
|
gap: var(--space-0_5);
|
|
@@ -68,6 +71,7 @@
|
|
|
68
71
|
|
|
69
72
|
.track[data-empty] {
|
|
70
73
|
background: var(--bg-muted);
|
|
74
|
+
corner-shape: var(--corner-shape);
|
|
71
75
|
border-radius: var(--segmented-radius);
|
|
72
76
|
}
|
|
73
77
|
|
|
@@ -75,6 +79,7 @@
|
|
|
75
79
|
flex-basis: 0;
|
|
76
80
|
min-width: 0;
|
|
77
81
|
background: var(--segment-color);
|
|
82
|
+
corner-shape: var(--corner-shape);
|
|
78
83
|
border-radius: var(--segmented-radius);
|
|
79
84
|
transform: translateY(0);
|
|
80
85
|
transition: var(--transition-press);
|
|
@@ -155,6 +160,7 @@
|
|
|
155
160
|
width: var(--size-2);
|
|
156
161
|
height: var(--size-2);
|
|
157
162
|
flex-shrink: 0;
|
|
163
|
+
corner-shape: var(--corner-shape);
|
|
158
164
|
border-radius: var(--radius-xs);
|
|
159
165
|
background: var(--segment-color);
|
|
160
166
|
}
|
|
@@ -219,3 +225,13 @@
|
|
|
219
225
|
text-align: start;
|
|
220
226
|
}
|
|
221
227
|
}
|
|
228
|
+
|
|
229
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
230
|
+
.root[data-entrance="pending"] .track:not([data-empty]) {
|
|
231
|
+
visibility: hidden;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
:global([data-motion="none"]) .root[data-entrance="pending"] .track {
|
|
235
|
+
visibility: visible;
|
|
236
|
+
}
|
|
237
|
+
}
|