@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
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
# Sidebar
|
|
4
4
|
|
|
5
5
|
### 원칙
|
|
6
|
-
좌측 세로 nav. **라우팅
|
|
6
|
+
좌측 세로 nav. **라우팅 전용**: Tabs/필터는 쓸 곳이 아님. Header(고정) + Body(스크롤) + Footer(고정) 3영역 세로 쉘에, Brand + Section + Item + Separator + Profile을 compound로 조합. `collapsed`로 icon-only 축소. Item은 [[components/menu-item]]을 그대로 어댑트: 시각·상태 규칙 공유.
|
|
7
7
|
|
|
8
|
-
**2단 쉘(Rail + Main)**: VS Code·Linear 스타일 "활동 바 + 사이드 패널" 조합이 필요할 땐 `<Sidebar.Rail>` + `<Sidebar.Main>`을 쓴다. Rail은 좁은 세로 아이콘 트랙(영구 collapsed 어휘), Main은 기존 Header/Body/Footer를 담는 wrapper. Rail 없이 쓰면 Main도 생략해 지금처럼 Header/Body/Footer를 Sidebar 직속에 둘 수 있다(기존 호환). **구 `SidebarSplit`은
|
|
8
|
+
**2단 쉘(Rail + Main)**: VS Code·Linear 스타일 "활동 바 + 사이드 패널" 조합이 필요할 땐 `<Sidebar.Rail>` + `<Sidebar.Main>`을 쓴다. Rail은 좁은 세로 아이콘 트랙(영구 collapsed 어휘), Main은 기존 Header/Body/Footer를 담는 wrapper. Rail 없이 쓰면 Main도 생략해 지금처럼 Header/Body/Footer를 Sidebar 직속에 둘 수 있다(기존 호환). **구 `SidebarSplit`은 폐기**: 섹션들이 flex-shrink로 뭉개지는 함정이 있어 `Sidebar.Rail`로 완전 대체.
|
|
9
9
|
|
|
10
10
|
### 좌우/상하 축 공급 (중요)
|
|
11
11
|
**벤더 Sidebar는 좌우/상하 padding을 공급하지 않는다**. `.root/.header/.body/.footer` 어디에도 `padding-inline`·`padding-block`을 깔지 않음. preset(`.brand/.profile/.section`)도 자체 padding 없음. `--sidebar-pad-x`·`--sidebar-pad-y` 토큰은 폐기.
|
|
@@ -17,31 +17,31 @@
|
|
|
17
17
|
|
|
18
18
|
**금지**:
|
|
19
19
|
- Sidebar 큰 컨테이너(root/Header/Body/Footer wrapper)에 `padding-inline` 금지. 벤더가 공급 안 하므로 중첩 함정은 없지만, "큰 컨테이너에 padding" 자체가 스크롤 트랙·안쪽 요소 정렬을 틀어뜨리는 패턴.
|
|
20
|
-
- Body에 직접 `padding-inline`
|
|
20
|
+
- Body에 직접 `padding-inline` 금지: 스크롤바가 가장자리와 떨어진다. Body 안쪽에 inner div 두고 거기에.
|
|
21
21
|
|
|
22
22
|
### 섹션 묶음 룰 (중요)
|
|
23
23
|
|
|
24
24
|
Section은 Favorites·Projects 같은 분류 제목에 사용한다. 프로젝트·폴더처럼 개별 탐색 대상인 행은 일반 md MenuItem으로 구현한다. 폴더를 섹션 헤더로 바꾼 뒤 크기를 CSS로 보정하지 않는다. 즐겨찾기 해제 별은 장식 Icon이 아니라 IconButton이며, 항목 이동과 클릭·키보드 이벤트를 분리한다.
|
|
25
|
-
Body 안 메뉴 리스트는 **반드시 `MenuItem.Section`으로 묶어서** 쓴다. `MenuItem variant="section"` 헤더 + 그 아래 아이템 열을 **flat하게 나열하는 조립
|
|
25
|
+
Body 안 메뉴 리스트는 **반드시 `MenuItem.Section`으로 묶어서** 쓴다. `MenuItem variant="section"` 헤더 + 그 아래 아이템 열을 **flat하게 나열하는 조립 금지**: DOM이 평면이면 "섹션 안 간격 vs 섹션 간 간격"의 책임이 헤더 margin 하나에만 걸려 리듬이 쉽게 깨진다. `MenuItem.Section`은 wrapper `<div class="sectionGroup">`을 자동으로 깔아 Gestalt proximity를 구조에 박는다.
|
|
26
26
|
|
|
27
27
|
사이드바 안쪽 세로 간격 (고정):
|
|
28
28
|
- **섹션 제목 ↔ 첫 아이템**: 2~4px(기본 4px), MenuItem.Section의 `--menu-section-gap`이 담당한다. 제목 margin을 추가해 이중 간격을 만들지 않는다.
|
|
29
|
-
- **그룹 사이** (다음 섹션과의 거리): `--space-3
|
|
30
|
-
- 비율 3:1 유지. 라벨 톤 다운만으론 섹션 identity
|
|
31
|
-
- 이중 여백 금지 ([[feedback_no_double_spacing]])
|
|
29
|
+
- **그룹 사이** (다음 섹션과의 거리): `--space-3`: Body 안쪽 콘텐츠 wrapper의 flex gap이 담당.
|
|
30
|
+
- 비율 3:1 유지. 라벨 톤 다운만으론 섹션 identity 부족: 간격 비율이 결정적.
|
|
31
|
+
- 이중 여백 금지 ([[feedback_no_double_spacing]]): 그룹 wrapper에 추가 margin 공급 금지, 부모 gap 하나만 쓸 것.
|
|
32
32
|
|
|
33
33
|
### 사이드바 안의 Input
|
|
34
|
-
사이드바 내부 Input(검색 등)은 **`variant="outline"` 기본**. 흰색·연한 배경에서는 `filled`를 사용하지 않는다([[PRINCIPLES]] §5c). `line`도
|
|
34
|
+
사이드바 내부 Input(검색 등)은 **`variant="outline"` 기본**. 흰색·연한 배경에서는 `filled`를 사용하지 않는다([[PRINCIPLES]] §5c). `line`도 금지: ghost MenuItem 사이에서 밑줄이 흐름에 섞여 검색창의 경계가 불분명해진다.
|
|
35
35
|
|
|
36
|
-
**size는 `md` 기본**. 사이드바가 narrow라서 sm으로 좁히지 말
|
|
36
|
+
**size는 `md` 기본**. 사이드바가 narrow라서 sm으로 좁히지 말 것: 사이드바 밀도는 Item 쪽이 담당하고(ghost 리듬), 검색 Input은 "쓰기·읽기 둘 다 자연스러운" md가 더 어울림. Ovenn 전체 컴포넌트가 md 기본이라 그 리듬과도 어긋나지 않음.
|
|
37
37
|
|
|
38
38
|
### Body에 fade mask 금지 (중요)
|
|
39
|
-
`Sidebar.Body`에 `mask-image: linear-gradient(...)` 류의 상단 fade **금지**. "스크롤 콘텐츠가 Header 아래로 자연스럽게 사라지도록" 넣는 fade지만, 소비처는 Body 안 최상단에 **고정 블록**(예: primary "새 대화" 버튼 + 검색 Input)을 꽂는 경우가 흔하다. 이때 fade가 그 블록 상단 ~10
|
|
39
|
+
`Sidebar.Body`에 `mask-image: linear-gradient(...)` 류의 상단 fade **금지**. "스크롤 콘텐츠가 Header 아래로 자연스럽게 사라지도록" 넣는 fade지만, 소비처는 Body 안 최상단에 **고정 블록**(예: primary "새 대화" 버튼 + 검색 Input)을 꽂는 경우가 흔하다. 이때 fade가 그 블록 상단 ~10~15px를 투명하게 깎아 **primary solid 버튼 위에 "흰 입체 바"가 올라간 착시**를 만든다. computed style엔 shadow·gradient 하나도 없는데 입체감이 보이면 100% 이 원인. Header와 Body의 분리는 Header padding-bottom과 border로만 처리.
|
|
40
40
|
|
|
41
41
|
### Footer 위 분리선 (조건부)
|
|
42
|
-
`Sidebar.Footer`는 **기본은 상단 border
|
|
42
|
+
`Sidebar.Footer`는 **기본은 상단 border 없음**: 사이드바 안쪽은 ghost 리듬이라 가로선 하나가 들어가면 구획이 과해져 밸런스가 깨짐. **Body가 스크롤 가능할 때만**(`SidebarRoot`가 ResizeObserver로 감지해 Footer에 `data-overflow` 토글) 상단 hairline이 자동으로 켜진다: 스크롤되는 콘텐츠가 Footer 뒤로 깔릴 때만 분리가 필요하기 때문. 짧은 메뉴에서는 선 없이 깔끔. 소비처가 수동으로 `border-top`을 꽂지 말 것.
|
|
43
43
|
|
|
44
|
-
line-heavy 톤(spare 같은 콘솔형 Theme)에서 Footer 분리선을 항상 보여주고 싶으면 Theme CSS에서 `.sidebar-footer { border-top: ... }` 같은 override로
|
|
44
|
+
line-heavy 톤(spare 같은 콘솔형 Theme)에서 Footer 분리선을 항상 보여주고 싶으면 Theme CSS에서 `.sidebar-footer { border-top: ... }` 같은 override로 해결: 컴포넌트 기본은 조건부 유지.
|
|
45
45
|
|
|
46
46
|
### Profile trailing에 IconButton 허용
|
|
47
47
|
`Sidebar.Profile`은 MenuItem(role="button" div) preset이라 **`trailing`에 `IconButton`을 자유롭게** 넣을 수 있다 (nested button 아님). 내부 액션 클릭은 `e.stopPropagation()`으로 root click과 분리. 전체를 DropdownMenu로 열려면 Profile 자체를 `DropdownMenu.Trigger asChild`로 감쌈.
|
|
@@ -77,7 +77,7 @@ Header는 **가로 행**이기 때문에 Section을 넣으면 nav 전체가 가
|
|
|
77
77
|
</Sidebar.Body>
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
- **`<Sidebar.Item>` 과 `<Sidebar.Section>`** export도 존재하지만 **일반 메뉴에는 쓰지
|
|
80
|
+
- **`<Sidebar.Item>` 과 `<Sidebar.Section>`** export도 존재하지만 **일반 메뉴에는 쓰지 않는다**: brand/profile preset의 뼈대 공유용 내부 요소. 일반 네비게이션 자리는 `MenuItem.Section` + `MenuItem` 하나로 통일 ([[components/menu-item]]).
|
|
81
81
|
- Section 안 Item 사이 세로 리듬·active 톤·leading/trailing 슬롯이 전부 MenuItem에 녹아 있어 수작업 조립이 불필요.
|
|
82
82
|
|
|
83
83
|
### AppFrame.Sidebar 슬롯 안에 넣는다 (중요)
|
|
@@ -85,43 +85,43 @@ Header는 **가로 행**이기 때문에 Section을 넣으면 nav 전체가 가
|
|
|
85
85
|
|
|
86
86
|
```tsx
|
|
87
87
|
<AppFrame layout="topbar-first" variant="outlined">
|
|
88
|
-
<AppFrame.Topbar><Topbar
|
|
88
|
+
<AppFrame.Topbar><Topbar>콘텐츠</Topbar></AppFrame.Topbar>
|
|
89
89
|
<AppFrame.Sidebar>
|
|
90
|
-
<Sidebar
|
|
90
|
+
<Sidebar>콘텐츠</Sidebar> {/* 벤더가 자동으로 폭·높이·overflow 받음 */}
|
|
91
91
|
</AppFrame.Sidebar>
|
|
92
|
-
<AppFrame.Content
|
|
92
|
+
<AppFrame.Content>콘텐츠</AppFrame.Content>
|
|
93
93
|
</AppFrame>
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
AppFrame 밖에서 바깥 수제 grid(`grid-template-columns: 260px 1fr` 등)에 Sidebar를 그대로
|
|
96
|
+
AppFrame 밖에서 바깥 수제 grid(`grid-template-columns: 260px 1fr` 등)에 Sidebar를 그대로 꽂으면: Body가 자기 scroll container 높이를 못 잡아 **섹션들이 flex-shrink로 뭉개지거나, Body가 0 높이로 접혀 메뉴 전체가 안 보임**. [[feedback_sidebar_scroll]] 함정 그대로.
|
|
97
97
|
|
|
98
|
-
**2단 쉘(Rail + Main)**: `<Sidebar>` 안에서 `<Sidebar.Rail>`과 `<Sidebar.Main>`을 compound로 조합. AppFrame.Sidebar 슬롯이 Sidebar를 그대로 담고, Sidebar 벤더가 자체 `.root:has(.rail)` CSS로 flex row 전환·폭 합산을 처리. 과거 바깥 수제 flex 조립은
|
|
98
|
+
**2단 쉘(Rail + Main)**: `<Sidebar>` 안에서 `<Sidebar.Rail>`과 `<Sidebar.Main>`을 compound로 조합. AppFrame.Sidebar 슬롯이 Sidebar를 그대로 담고, Sidebar 벤더가 자체 `.root:has(.rail)` CSS로 flex row 전환·폭 합산을 처리. 과거 바깥 수제 flex 조립은 폐기: 이젠 Sidebar 자체가 2단을 안다.
|
|
99
99
|
|
|
100
100
|
### Do
|
|
101
101
|
- 파일함·다단계 탐색 본문은 [[components/tree-nav]]를 조합한다. TreeNav가 MenuItem 행·펼침·선택·들여쓰기 가이드선을 관리하고 Sidebar는 헤더·본문·하단 셸을 맡는다.
|
|
102
|
-
- **Header/Footer의 워크스페이스·프로필·조직 트리거는 반드시 [[components/menu-item]] (avatar + description + align="center" preset)
|
|
103
|
-
- Section·Separator는 반드시 **`Sidebar.Body` 안에**
|
|
104
|
-
- 라우트 이동은 Item에 `asChild` + Next `<Link>`. 단, `asChild`일 땐 라벨 truncation이 `<Link>` 쪽 책임이 된다 ([[components/menu-item]] Slot 동작)
|
|
102
|
+
- **Header/Footer의 워크스페이스·프로필·조직 트리거는 반드시 [[components/menu-item]] (avatar + description + align="center" preset)**: Select·Input Dropdown·수제 Button+span 조합 전부 금지. Avatar + 2줄 라벨 + trailing 뼈대가 고정. Footer 프로필은 `Sidebar.Profile`(=이 preset의 래퍼) 사용.
|
|
103
|
+
- Section·Separator는 반드시 **`Sidebar.Body` 안에** 둔다: Body만 스크롤되는 영역.
|
|
104
|
+
- 라우트 이동은 Item에 `asChild` + Next `<Link>`. 단, `asChild`일 땐 라벨 truncation이 `<Link>` 쪽 책임이 된다 ([[components/menu-item]] Slot 동작): 긴 라벨이면 Link에 `truncate` 유틸 또는 `title` 속성을 걸 것.
|
|
105
105
|
- 현재 라우트는 `active`로 명시 (MenuItem의 active 시각 그대로).
|
|
106
106
|
- Brand는 Home 링크 자리로. `symbol`(항상 노출) + `wordmark`(expanded만).
|
|
107
107
|
- Section 묶음은 `title`로 그룹. collapsed일 땐 title 자동 숨김.
|
|
108
108
|
- `collapsed` 상태에서는 `aria-label`과 `title`을 자동으로 걸어 접근성 유지.
|
|
109
|
-
- 콘텐츠 영역과의 **경계선은 [[components/app-frame]] `variant="outlined"`** 가
|
|
109
|
+
- 콘텐츠 영역과의 **경계선은 [[components/app-frame]] `variant="outlined"`** 가 그린다: Sidebar 자체는 border를 그리지 않음. 사이드바가 녹아 보이면 AppFrame variant부터 확인.
|
|
110
110
|
|
|
111
111
|
### Don't
|
|
112
|
-
- **워크스페이스/프로필 트리거에 Select·Input Dropdown
|
|
113
|
-
- **수제 Button + span 조립
|
|
114
|
-
- **Header에 Section·Item·nav를 넣지
|
|
115
|
-
- 페이지 안 뷰 전환에 쓰지
|
|
112
|
+
- **워크스페이스/프로필 트리거에 Select·Input Dropdown 금지**: 폼 값 선택과 네비게이션 액션은 다른 역할. MenuItem(avatar + align="center") + DropdownMenu 조합이 유일한 표준 ([[antipattern_workspace_switcher]]).
|
|
113
|
+
- **수제 Button + span 조립 금지**: 매번 레이아웃·폰트·collapsed 전환이 어긋나서 일관성이 깨짐. MenuItem preset 하나로 끝.
|
|
114
|
+
- **Header에 Section·Item·nav를 넣지 않는다**: Header는 가로 flex 행이라 세로 nav가 깔리면 전부 눌려 겹친다. Brand 전용.
|
|
115
|
+
- 페이지 안 뷰 전환에 쓰지 않는다: 그건 [[components/tabs]].
|
|
116
116
|
- Item 안에 variant로 다른 톤을 쓰지 않는다. active 외의 강조 금지.
|
|
117
117
|
- Sidebar 자체에 padding/width를 CSS로 덮지 않는다. `--sidebar-w*` 토큰 경유.
|
|
118
|
-
- `.root`에 padding을 꽂지
|
|
118
|
+
- `.root`에 padding을 꽂지 않는다: Body가 스크롤 컨테이너라 스크롤바가 안쪽으로 밀려 가장자리에 안 붙는다 ([[project_scroll_rule]]).
|
|
119
119
|
- **Sidebar 큰 컨테이너(root/Header/Body/Footer wrapper)에 좌우 패딩 금지**. 좌우/상하 축은 preset slot(`data-sidebar-slot`) 또는 안쪽 콘텐츠 래퍼에 공급. `--sidebar-pad-x`·`--sidebar-pad-y` 토큰 사용 금지(벤더에서 폐기됨).
|
|
120
|
-
- **Sidebar 내부 Input은 `outline`
|
|
120
|
+
- **Sidebar 내부 Input은 `outline` 기본**: `line` 금지, 흰색·연한 배경의 `filled` 금지.
|
|
121
121
|
- **액티브바는 기본적으로 사용하지 않는다.** 선택 표면·텍스트 위계로 표시한다. 필요한 바를 둥근 행의 border·inset shadow에 붙여 곡선으로 만드는 구현은 금지한다([[PRINCIPLES]] §5c).
|
|
122
122
|
- Brand symbol·wordmark 크기 override 금지. `--sidebar-brand-symbol-max`·`--sidebar-brand-wordmark-max` 상한 안에서만.
|
|
123
123
|
- **Body 안 섹션 리스트가 길어서 스크롤이 필요할 때**, 섹션들에 `flex-shrink`를 그대로 두지 않는다. Body는 `display:flex column`이라 자식(Section)이 기본 `flex-shrink:1`로 수축되어 header가 몇 px로 뭉개지고 아이템이 사라져 보인다. 해결: Body 직속 자식에 `flex: 0 0 auto`를 걸어 각 섹션이 자기 콘텐츠 전체 높이를 유지하게 하고, 스크롤은 Body의 `overflow-y:auto`가 담당하게 한다.
|
|
124
|
-
- **2단 쉘(아이콘 Rail + Sidebar) 조립 시 바깥 수제 flex
|
|
124
|
+
- **2단 쉘(아이콘 Rail + Sidebar) 조립 시 바깥 수제 flex 금지**: `<Sidebar.Rail>` + `<Sidebar.Main>` compound를 쓴다. `.root:has(.rail)` CSS가 자동으로 flex row로 전환하고 Rail/Main 폭·경계선·높이를 벤더가 공급. 과거 `SidebarSplit`는 panel이 자체 flex 체인으로 섹션들을 짓눌러 header가 4px로 뭉개지는 함정이 있어 폐기됨.
|
|
125
125
|
|
|
126
126
|
### Fallback
|
|
127
127
|
collapsed 결정 애매하면 `false`. Section title 애매하면 생략. 경계선 애매하면 AppFrame `variant="outlined"`.
|
|
@@ -131,47 +131,47 @@ collapsed 결정 애매하면 `false`. Section title 애매하면 생략. 경계
|
|
|
131
131
|
Rail은 "영구적으로 collapsed인 영역"이란 의미. 안쪽 Sidebar.Item·Sidebar.Brand는 자동으로 icon-only + Tooltip 모드로 전환된다 (Context가 `railCollapsed: true` 공급). 그래서 Rail 안쪽 어휘는 **엄격히 제한**된다.
|
|
132
132
|
|
|
133
133
|
**Rail 안에 들어갈 수 있는 것**
|
|
134
|
-
- `Sidebar.Brand
|
|
135
|
-
- `Sidebar.RailGroup
|
|
136
|
-
- `Sidebar.Item
|
|
137
|
-
- `Sidebar.RailDivider
|
|
138
|
-
- `Sidebar.RailFooter
|
|
134
|
+
- `Sidebar.Brand`: Rail 상단 로고(symbol만 자동 노출, wordmark 자동 숨김)
|
|
135
|
+
- `Sidebar.RailGroup`: Item 묶음 (role="group" 자동). 2개 이상 그룹을 둘 땐 `aria-label`로 구분
|
|
136
|
+
- `Sidebar.Item`: icon + label(Tooltip로 자동 노출) + active + onClick. label은 꼭 지정(aria-label·Tooltip 콘텐츠로 쓰임)
|
|
137
|
+
- `Sidebar.RailDivider`: 그룹 사이 hairline
|
|
138
|
+
- `Sidebar.RailFooter`: 바닥 고정 영역(collapse 토글·설정 등)
|
|
139
139
|
|
|
140
140
|
**Rail 안에 넣지 않는 것**
|
|
141
141
|
- 라벨 텍스트(Tooltip로만 노출됨), Input/SearchField, 2줄 요소(Sidebar.Profile 등 avatar+description preset)
|
|
142
|
-
- `Sidebar.Header/Body/Footer
|
|
142
|
+
- `Sidebar.Header/Body/Footer`: 이건 Main 안쪽 자리
|
|
143
143
|
- Trailing badge 가로 배치(세로 트랙 리듬에 안 맞음). Badge anchored(모서리) 1개는 OK
|
|
144
144
|
|
|
145
|
-
**아이콘 자리에 글자/이니셜도 OK**: 워크스페이스 스위처처럼 `icon={<span>T</span>}` 또는 Avatar 넣을 수
|
|
145
|
+
**아이콘 자리에 글자/이니셜도 OK**: 워크스페이스 스위처처럼 `icon={<span>T</span>}` 또는 Avatar 넣을 수 있음: Sidebar.Item leading은 ReactNode라 자유.
|
|
146
146
|
|
|
147
147
|
### Rail 생략 가능
|
|
148
148
|
`<Sidebar.Rail>` 없이 `<Sidebar>` 바로 아래 Header/Body/Footer를 두는 1단 패턴은 기존 그대로 작동한다. Rail은 **활동 바가 필요할 때만 추가**하는 선택적 compound.
|
|
149
149
|
|
|
150
150
|
### 관련
|
|
151
|
-
- [[components/menu-item]]
|
|
152
|
-
- [[components/avatar]]
|
|
153
|
-
- [[components/app-frame]]
|
|
154
|
-
- [[axes/density]]
|
|
155
|
-
- [[tokens/color]]
|
|
151
|
+
- [[components/menu-item]]: Item·Profile(avatar + description + align="center" preset) 시각·상태 전부 재사용
|
|
152
|
+
- [[components/avatar]]: Profile 왼쪽 아바타
|
|
153
|
+
- [[components/app-frame]]: Sidebar를 담는 grid 쉘
|
|
154
|
+
- [[axes/density]]: `--sidebar-w*` 토큰·control-h가 Density에 반응
|
|
155
|
+
- [[tokens/color]]: `--fg`·`--primary`·active 상태 매핑
|
|
156
156
|
|
|
157
157
|
### Props 시그니처
|
|
158
158
|
```tsx
|
|
159
159
|
<Sidebar collapsed={boolean}> // default: false
|
|
160
160
|
|
|
161
|
-
{/* ─ 선택: 2단
|
|
161
|
+
{/* ─ 선택: 2단 쉘: Rail(활동 바) + Main(기존 3영역).
|
|
162
162
|
Rail 없이 쓸 땐 Rail/Main 블록 둘 다 생략하고 Header/Body/Footer를
|
|
163
163
|
Sidebar 직속으로 두면 됨. */}
|
|
164
164
|
<Sidebar.Rail>
|
|
165
165
|
<Sidebar.Brand symbol={<Icon />} /> // wordmark 자동 숨김
|
|
166
166
|
|
|
167
167
|
<Sidebar.RailGroup aria-label="프로덕트">
|
|
168
|
-
<Sidebar.Item icon={<Icon />} label="
|
|
168
|
+
<Sidebar.Item icon={<Icon />} label="항목 이름" active />
|
|
169
169
|
</Sidebar.RailGroup>
|
|
170
170
|
|
|
171
171
|
<Sidebar.RailDivider />
|
|
172
172
|
|
|
173
173
|
<Sidebar.RailGroup role="tablist">
|
|
174
|
-
<Sidebar.Item icon={<Icon />} label="
|
|
174
|
+
<Sidebar.Item icon={<Icon />} label="항목 이름" />
|
|
175
175
|
</Sidebar.RailGroup>
|
|
176
176
|
|
|
177
177
|
<Sidebar.RailFooter>
|
|
@@ -182,12 +182,12 @@ Rail은 "영구적으로 collapsed인 영역"이란 의미. 안쪽 Sidebar.Item
|
|
|
182
182
|
<Sidebar.Main>
|
|
183
183
|
{/* ─ 또는 Rail 없이 Sidebar 직속으로 ─ */}
|
|
184
184
|
|
|
185
|
-
{/* Header
|
|
185
|
+
{/* Header: 고정, 가로 행. Brand 전용. */}
|
|
186
186
|
<Sidebar.Header>
|
|
187
187
|
<Sidebar.Brand symbol={<Icon />} wordmark={<Logo /> | "Ovenn"} />
|
|
188
188
|
</Sidebar.Header>
|
|
189
189
|
|
|
190
|
-
{/* Body
|
|
190
|
+
{/* Body: 세로 스크롤 트랙. Section·Separator 전부 여기. 여러 개 두면 각자 독립 스크롤. */}
|
|
191
191
|
<Sidebar.Body>
|
|
192
192
|
<Sidebar.Section title="워크스페이스">
|
|
193
193
|
<Sidebar.Item
|
|
@@ -206,13 +206,13 @@ Rail은 "영구적으로 collapsed인 영역"이란 의미. 안쪽 Sidebar.Item
|
|
|
206
206
|
<Sidebar.Separator />
|
|
207
207
|
</Sidebar.Body>
|
|
208
208
|
|
|
209
|
-
{/* Footer
|
|
209
|
+
{/* Footer: 고정, 하단. Profile 또는 보조 액션. */}
|
|
210
210
|
<Sidebar.Footer>
|
|
211
211
|
<Sidebar.Profile
|
|
212
212
|
name="희영"
|
|
213
213
|
sub="admin@ovenn.dev"
|
|
214
214
|
avatar={{ src, status }} // Avatar props 패스스루
|
|
215
|
-
trailing={<Icon name="caret-up" />} // non-interactive
|
|
215
|
+
trailing={<Icon name="caret-up" />} // non-interactive만: IconButton 중첩 금지
|
|
216
216
|
/>
|
|
217
217
|
</Sidebar.Footer>
|
|
218
218
|
</Sidebar.Main>
|
|
@@ -224,7 +224,7 @@ Rail은 "영구적으로 collapsed인 영역"이란 의미. 안쪽 Sidebar.Item
|
|
|
224
224
|
|---|---|
|
|
225
225
|
| expanded (기본) | 폭 `--sidebar-w`, 모든 자식 라벨·wordmark·trailing 노출 |
|
|
226
226
|
| collapsed | 폭 `--sidebar-w-collapsed`, Item은 icon-only, wordmark·Section title·Profile 텍스트·trailing 숨김 |
|
|
227
|
-
| Item active | MenuItem active
|
|
227
|
+
| Item active | MenuItem active 그대로: `--bg-muted` 배경 + `fg-strong` + medium weight |
|
|
228
228
|
|
|
229
229
|
### 조합 예시
|
|
230
230
|
```tsx
|
|
@@ -234,7 +234,7 @@ Rail은 "영구적으로 collapsed인 영역"이란 의미. 안쪽 Sidebar.Item
|
|
|
234
234
|
<DropdownMenu>
|
|
235
235
|
<DropdownMenu.Trigger asChild>
|
|
236
236
|
<MenuItem
|
|
237
|
-
size="
|
|
237
|
+
size="sm"
|
|
238
238
|
align="center"
|
|
239
239
|
avatar={{ initials: "T", shape: "rounded" }}
|
|
240
240
|
description="Project Workspace"
|
|
@@ -299,7 +299,7 @@ Rail은 "영구적으로 collapsed인 영역"이란 의미. 안쪽 Sidebar.Item
|
|
|
299
299
|
</DropdownMenu>
|
|
300
300
|
</Sidebar.Footer>
|
|
301
301
|
|
|
302
|
-
// 4. Collapsed
|
|
302
|
+
// 4. Collapsed: icon-only (Sidebar.Profile 자동으로 아바타만 남음)
|
|
303
303
|
<Sidebar collapsed>
|
|
304
304
|
<Sidebar.Header>
|
|
305
305
|
<Sidebar.Brand symbol={<Icon name="rocket-launch" />} />
|
|
@@ -311,7 +311,7 @@ Rail은 "영구적으로 collapsed인 영역"이란 의미. 안쪽 Sidebar.Item
|
|
|
311
311
|
</Sidebar.Body>
|
|
312
312
|
</Sidebar>
|
|
313
313
|
|
|
314
|
-
// 5. 2단
|
|
314
|
+
// 5. 2단 쉘: Rail(활동 바) + Main (VS Code·Linear 스타일)
|
|
315
315
|
<Sidebar>
|
|
316
316
|
<Sidebar.Rail>
|
|
317
317
|
<Sidebar.Brand symbol={<Icon name="rocket-launch" />} />
|
|
@@ -374,13 +374,13 @@ Rail은 "영구적으로 collapsed인 영역"이란 의미. 안쪽 Sidebar.Item
|
|
|
374
374
|
</Sidebar.RailGroup>
|
|
375
375
|
</Sidebar.Rail>
|
|
376
376
|
|
|
377
|
-
<Sidebar.Main
|
|
377
|
+
<Sidebar.Main>콘텐츠</Sidebar.Main>
|
|
378
378
|
</Sidebar>
|
|
379
379
|
```
|
|
380
380
|
|
|
381
381
|
### 사용 사례
|
|
382
382
|
|
|
383
|
-
#### AI
|
|
383
|
+
#### AI 챗: 대화 이력
|
|
384
384
|
```jsx
|
|
385
385
|
<AppFrame variant="flat" className={`${styles.useCaseFrame} ${styles.chatLayout}`}>
|
|
386
386
|
<AppFrame.Sidebar>
|
|
@@ -425,7 +425,7 @@ Rail은 "영구적으로 collapsed인 영역"이란 의미. 안쪽 Sidebar.Item
|
|
|
425
425
|
</AppFrame>
|
|
426
426
|
```
|
|
427
427
|
|
|
428
|
-
####
|
|
428
|
+
#### 워크스페이스: 팀과 프로젝트
|
|
429
429
|
```jsx
|
|
430
430
|
<AppFrame variant="flat" className={`${styles.useCaseFrame} ${styles.workspaceLayout}`}>
|
|
431
431
|
<AppFrame.Sidebar>
|
|
@@ -450,7 +450,7 @@ Rail은 "영구적으로 collapsed인 영역"이란 의미. 안쪽 Sidebar.Item
|
|
|
450
450
|
<div role="group" className={styles.useCaseBody} aria-label={workspace.name}>
|
|
451
451
|
<MenuItem.Section title="즐겨찾기" collapsible={false}>
|
|
452
452
|
{workspace.favorites.map(project => (
|
|
453
|
-
<MenuItem key={project.id} role="group" tabIndex={-1} size="
|
|
453
|
+
<MenuItem key={project.id} role="group" tabIndex={-1} size="sm" active={project.id === selectedId} leadingActions={[
|
|
454
454
|
<IconButton key="favorite" size="sm" variant="ghost" icon={<Icon name="star" weight="fill" />} aria-label={`즐겨찾기 해제: ${project.name}`} onClick={event => { event.stopPropagation(); removeFavorite(project.id); }} />,
|
|
455
455
|
]}>
|
|
456
456
|
<a className={styles.favoriteLink} href={`/projects/${project.id}`} onClick={event => event.stopPropagation()}>{project.name}</a>
|
|
@@ -461,7 +461,7 @@ Rail은 "영구적으로 collapsed인 영역"이란 의미. 안쪽 Sidebar.Item
|
|
|
461
461
|
<div className={styles.workspaceTree}>
|
|
462
462
|
{workspace.projects.map(project => (
|
|
463
463
|
<div key={project.id} className={styles.workspaceProject}>
|
|
464
|
-
<MenuItem role="button" size="
|
|
464
|
+
<MenuItem role="button" size="sm" aria-expanded={!!openProjects[project.id]} aria-controls={`project-pages-${project.id}`} leadingActions={[<Icon name="folder" />]} trailingActions={[<Icon name={openProjects[project.id] ? "caret-down" : "caret-right"} />]} onClick={() => setOpenProjects(previous => ({ ...previous, [project.id]: !previous[project.id] }))}>
|
|
465
465
|
{project.name}
|
|
466
466
|
</MenuItem>
|
|
467
467
|
<div id={`project-pages-${project.id}`} className={styles.workspaceProjectPanel} hidden={!openProjects[project.id]}>
|
|
@@ -487,7 +487,7 @@ Rail은 "영구적으로 collapsed인 영역"이란 의미. 안쪽 Sidebar.Item
|
|
|
487
487
|
</AppFrame>
|
|
488
488
|
```
|
|
489
489
|
|
|
490
|
-
####
|
|
490
|
+
#### 파일함: 폴더 계층
|
|
491
491
|
```jsx
|
|
492
492
|
<AppFrame variant="flat" className={`${styles.useCaseFrame} ${styles.fileLayout}`}>
|
|
493
493
|
<AppFrame.Sidebar>
|
|
@@ -526,3 +526,12 @@ Rail은 "영구적으로 collapsed인 영역"이란 의미. 안쪽 Sidebar.Item
|
|
|
526
526
|
```json
|
|
527
527
|
{"roles":["navigation-shell","sidebar-footer"],"native":[],"hints":["sidebar","sidebarBottom","sideFooter","profile"],"requires":["ThemeController"]}
|
|
528
528
|
```
|
|
529
|
+
|
|
530
|
+
<!-- generated-use-cases:start -->
|
|
531
|
+
### 사용 사례 연결
|
|
532
|
+
|
|
533
|
+
- AI chat: conversations · Workspace: teams and projects · File cabinet: folder hierarchy
|
|
534
|
+
- 문서: /en/components/structure/sidebar#use-cases
|
|
535
|
+
- 참조 원본: [Sidebar 사례](../use-cases/structure-sidebar.md)
|
|
536
|
+
- AI 조회: `get_guide(topic="use-cases/structure-sidebar", sections=["사례 목록", "파일 목록"])` 후 필요한 `Section:` / `Source:` 헤딩을 선택한다.
|
|
537
|
+
<!-- generated-use-cases:end -->
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Skeleton
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
로딩할 콘텐츠의 크기와 배치를 미리 확보하는 장식 요소다. 원형, 사각형, 텍스트 줄을 조합하며 오류나 빈 결과를 대신하지 않는다.
|
|
5
|
+
|
|
6
|
+
### Props
|
|
7
|
+
- `shape?: 'rect' | 'circle' | 'text'`: 기본 rect. circle은 정사각 크기, text는 얇은 줄이다.
|
|
8
|
+
- `animation?: 'shimmer' | 'pulse' | 'none'`: 기본 shimmer. reduced-motion 또는 motion=none에서는 반복 모션을 멈춘다.
|
|
9
|
+
- `className`, `style`, span 속성과 ref. 크기·색·라운드는 실제 로딩 콘텐츠에 맞춰 CSS 토큰으로 조정한다. children이나 조작 요소는 넣지 않는다.
|
|
10
|
+
|
|
11
|
+
### 조합
|
|
12
|
+
Skeleton은 aria-hidden인 span이며 포커스나 로딩 상태를 따로 만들지 않는다. 호스트 영역에 aria-busy와 필요한 상태 라벨을 제공한다. 레이아웃과 실제 콘텐츠 영역은 기존 Card·목록 부품으로 조립한다. 사진이나 가짜 텍스트를 추가하지 않는다. 색·크기·시간은 tokens.css의 skeleton 변수를 사용한다.
|
|
13
|
+
|
|
14
|
+
### Do
|
|
15
|
+
- 로딩 전후 크기와 정렬을 맞춰 화면 이동을 줄인다.
|
|
16
|
+
- 필요한 로딩 영역만 대체하고 미디어·텍스트 줄의 비율을 맞춘다.
|
|
17
|
+
- 시스템 모션 축소 설정을 유지한다.
|
|
18
|
+
|
|
19
|
+
### Don't
|
|
20
|
+
- Skeleton에 버튼·링크·tabIndex를 넣거나 가짜 콘텐츠로 읽히게 하지 않는다.
|
|
21
|
+
- 오류나 빈 상태를 영구 로딩으로 가리지 않는다.
|
|
22
|
+
- 로딩마다 상태 알림을 중복 낭독하지 않는다.
|
|
23
|
+
|
|
24
|
+
### Fallback
|
|
25
|
+
콘텐츠 형태를 모르면 기본 `rect` 하나로 영역만 확보한다. 애니메이션은 기본 `shimmer`이며 모션 축소 환경에서는 자동으로 멈춘다. 로딩 시간이 짧거나 자리를 미리 알 수 없으면 Skeleton 대신 [[components/spinner]]를 쓴다. 로딩이 실패하면 Skeleton을 유지하지 않고 오류·빈 상태로 전환한다.
|
|
26
|
+
|
|
27
|
+
### 예시
|
|
28
|
+
```tsx
|
|
29
|
+
<div aria-busy="true" aria-label="콘텐츠를 불러오는 중">
|
|
30
|
+
<Skeleton shape="circle" />
|
|
31
|
+
<Skeleton shape="text" />
|
|
32
|
+
<Skeleton />
|
|
33
|
+
</div>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Fallback
|
|
37
|
+
구조를 미리 정하기 어려운 짧은 로딩에는 Spinner를 사용한다. 로딩이 끝나면 실제 콘텐츠로 바꾸며, 오류나 빈 결과는 별도 상태로 안내한다.
|
|
38
|
+
|
|
39
|
+
### 관련
|
|
40
|
+
- [[components/card]]: 콘텐츠 조합
|
|
41
|
+
- [[components/canvas-node]]: 미디어·텍스트 로딩 소비처
|
|
42
|
+
- [[components/spinner]]: 자리를 미리 그릴 수 없는 짧은 작업
|
|
43
|
+
|
|
44
|
+
<!-- component-contract -->
|
|
45
|
+
```json
|
|
46
|
+
{"roles":["loading-placeholder"],"native":[],"requires":[]}
|
|
47
|
+
```
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
# Slider
|
|
2
2
|
|
|
3
3
|
### 원칙
|
|
4
|
-
|
|
4
|
+
연속된 값이나 범위를 조절하는 컨트롤이다. 음량, 밝기, 확대율처럼 근사값을 고르는 작업에 사용한다.
|
|
5
5
|
|
|
6
6
|
Radix Slider 어댑터 위에 Ovenn 디자인을 얹음. 키보드(← → Home End PageUp/PageDown), 포커스·ARIA·drag 전부 Radix가 처리. Ovenn은 모양과 상태 전환만 책임.
|
|
7
7
|
|
|
8
8
|
### Do
|
|
9
|
-
- **연속·근사 조정에만
|
|
9
|
+
- **연속·근사 조정에만 씀**: 볼륨, 밝기, 오프셋, 확대율, 가격 범위처럼 "대략 이 정도" 조작이 자연스러운 값.
|
|
10
10
|
- **정확한 값 입력이 필요하면 [[components/input]]** (`type="number"`) 과 병행.
|
|
11
11
|
- **현재 값을 어딘가엔 표시**. 슬라이더 옆에 `<span>{value}</span>` 같은 라벨.
|
|
12
12
|
- **step은 의미 있는 최소 단위**. px면 1, 확대율이면 0.1, 가격이면 10/100.
|
|
13
|
-
- **범위는 `value={[a, b]}
|
|
14
|
-
- **size는 자리의 비중으로
|
|
13
|
+
- **범위는 `value={[a, b]}`**: 가격 범위, 날짜 범위 등. 콜백도 튜플로 옴.
|
|
14
|
+
- **size는 자리의 비중으로 선택**: 폼·설정은 `md`(알약), 터치·메인 UI 강조는 `lg`(원형).
|
|
15
15
|
|
|
16
16
|
### Don't
|
|
17
|
-
- **불연속 3~5개 옵션 선택에 쓰지
|
|
18
|
-
- **On/Off 두 값에 쓰지
|
|
19
|
-
- 썸 크기·fill 띠 두께를 CSS로 덮어쓰지
|
|
20
|
-
- range 썸 둘을 교차시키려 하지
|
|
21
|
-
- 세로 방향으로 쓰려 하지
|
|
17
|
+
- **불연속 3~5개 옵션 선택에 쓰지 않는다**: [[components/tabs]] `segmented` 또는 토글 [[components/chip]].
|
|
18
|
+
- **On/Off 두 값에 쓰지 않는다**: [[components/switch]].
|
|
19
|
+
- 썸 크기·fill 띠 두께를 CSS로 덮어쓰지 않는다: 수치 밴드 리듬이 깨짐.
|
|
20
|
+
- range 썸 둘을 교차시키려 하지 않는다: Radix가 자동으로 막음.
|
|
21
|
+
- 세로 방향으로 쓰려 하지 않는다: 이 컴포넌트는 가로 전용. 세로 공간이 필요한 자리는 다른 패턴을 찾는 신호.
|
|
22
22
|
|
|
23
23
|
### Fallback
|
|
24
24
|
size 애매하면 `md`, step 애매하면 `1`.
|
|
25
25
|
|
|
26
26
|
### 관련
|
|
27
|
-
- [[axes/density]]
|
|
28
|
-
- [[axes/shape]]
|
|
29
|
-
- [[axes/motion]]
|
|
30
|
-
- [[axes/palette]]
|
|
31
|
-
- [[tokens/color]]
|
|
32
|
-
- [[components/input]]
|
|
27
|
+
- [[axes/density]]: `--space-*`가 트랙·fill·썸 비례에 매핑
|
|
28
|
+
- [[axes/shape]]: 모든 radius `--radius-full` 고정 (Shape 축 영향 없음)
|
|
29
|
+
- [[axes/motion]]: hover·drag 전환이 `--ease-emphasized`로 Motion 축에 반응 (spring/linear/표준 성격이 바뀜)
|
|
30
|
+
- [[axes/palette]]: fill `--primary`, hover halo `--primary` 18% alpha
|
|
31
|
+
- [[tokens/color]]: `--primary` (fill), `--bg-muted` (바 바탕), `--border-strong` (썸 경계)
|
|
32
|
+
- [[components/input]]: 정확한 수치 입력 병행
|
|
33
33
|
|
|
34
34
|
### Props 시그니처
|
|
35
35
|
```tsx
|
|
@@ -42,7 +42,7 @@ size 애매하면 `md`, step 애매하면 `1`.
|
|
|
42
42
|
defaultValue={number | [number, number]}
|
|
43
43
|
onValueChange={(v) => void} // 입력과 같은 shape
|
|
44
44
|
disabled
|
|
45
|
-
aria-label="
|
|
45
|
+
aria-label="음량" // 시각 라벨 없으면 필수
|
|
46
46
|
/>
|
|
47
47
|
```
|
|
48
48
|
|
|
@@ -59,7 +59,7 @@ size 애매하면 `md`, step 애매하면 `1`.
|
|
|
59
59
|
- 색 변화(`border-color`, `background-color`): `--duration-slow` + `--ease-in-out`
|
|
60
60
|
- 형태 변화(`transform`): `--duration-base` + `--ease-emphasized`
|
|
61
61
|
- Halo·ring (`box-shadow`): `--duration-base` + `--ease-emphasized`
|
|
62
|
-
- Range fill 위치: Radix 담당 (transition
|
|
62
|
+
- Range fill 위치: Radix 담당 (transition 없음: 즉시)
|
|
63
63
|
|
|
64
64
|
Motion 축에 따라 **expressive**(spring 오버슛) · **pure**(Linear ease-out) · **spare**(표준 ease-out)로 성격이 자동 전환.
|
|
65
65
|
|
|
@@ -75,7 +75,7 @@ Motion 축에 따라 **expressive**(spring 오버슛) · **pure**(Linear ease-ou
|
|
|
75
75
|
|
|
76
76
|
### 접근성
|
|
77
77
|
- Radix Slider가 ARIA(role, valuemin/max/now), 키보드(← → PageUp/PageDown Home End), 드래그·터치, focus-visible 전부 처리.
|
|
78
|
-
- range일 때 각 썸에 자동 라벨 ("Minimum"/"Maximum")
|
|
78
|
+
- range일 때 각 썸에 자동 라벨 ("Minimum"/"Maximum") 부여됨: override하려면 Thumb를 직접 조립.
|
|
79
79
|
- 시각 라벨이 없으면 `aria-label` 필수.
|
|
80
80
|
|
|
81
81
|
### 조합 예시
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
# Spinner
|
|
2
2
|
|
|
3
3
|
### 원칙
|
|
4
|
-
짧은 비동기 작업의 **로딩 신호**. 색은 currentColor로 묶여 부모 톤을 그대로 승계. **variant 미지정이
|
|
4
|
+
짧은 비동기 작업의 **로딩 신호**. 색은 currentColor로 묶여 부모 톤을 그대로 승계. **variant 미지정이 기본**: [[axes/motion]] 축의 `--loader-style`을 따라가서 bouncy=dots-bounce / standard=ring / calm=dots-fade로 자동 스왑. "버튼 안 로딩이 테마 바꾸면 같이 바뀌는" 축 추종 구조가 설계의 핵심이다. 라우팅·네트워크 전환 신호는 [[components/top-loader]], 긴 작업의 진행률(%)은 ProgressBar(추후 신설).
|
|
5
5
|
|
|
6
6
|
### Do
|
|
7
|
-
- Button `loading` prop이 자동으로 Spinner를 중앙에 overlay
|
|
8
|
-
- 색이 필요하면 부모 요소에 `color: var(--accent)` 식으로
|
|
7
|
+
- Button `loading` prop이 자동으로 Spinner를 중앙에 overlay: 소비자가 직접 Spinner 꽂을 필요 없음.
|
|
8
|
+
- 색이 필요하면 부모 요소에 `color: var(--accent)` 식으로 지정: Spinner는 그대로 승계.
|
|
9
9
|
- 페이지 로딩이면 중앙에 size=`lg` 하나로 충분. 과한 fullscreen overlay는 피한다.
|
|
10
|
-
- variant 미지정이 default
|
|
10
|
+
- variant 미지정이 default: Motion 축 바꾸면 모든 로더가 함께 바뀌는 게 설계 의도.
|
|
11
11
|
|
|
12
12
|
### Don't
|
|
13
|
-
- 진행률(퍼센트) 로딩에 쓰지
|
|
14
|
-
- 스켈레톤 자리에 Spinner 쓰지
|
|
13
|
+
- 진행률(퍼센트) 로딩에 쓰지 않는다: ProgressBar(추후 신설). 라우팅 신호는 [[components/top-loader]].
|
|
14
|
+
- 스켈레톤 자리에 Spinner 쓰지 않는다: 레이아웃이 이미 그려지는 자리면 shimmer skeleton이 맞음.
|
|
15
15
|
- 색을 하드코딩하지 않는다. currentColor가 부모 색을 승계하도록 두거나, 부모에 토큰 색을 걸 것.
|
|
16
16
|
- `size="xs"`는 아이콘 크기 로더 전용(Button xs 안쪽). 독립적으로 쓸 땐 sm 이상.
|
|
17
|
-
- variant를 소비 측에서 자꾸 override하지
|
|
17
|
+
- variant를 소비 측에서 자꾸 override하지 않는다: 축 추종이 "브랜드 톤 일관성"의 유일한 보장.
|
|
18
18
|
|
|
19
19
|
### Fallback
|
|
20
20
|
`size="sm"`, variant 미지정(= Motion 축 따라감), `label="Loading"`.
|
|
21
21
|
|
|
22
22
|
### 관련
|
|
23
|
-
- [[axes/motion]]
|
|
24
|
-
- [[components/button]]
|
|
25
|
-
- [[components/top-loader]]
|
|
23
|
+
- [[axes/motion]]: `--loader-style` 토큰을 축이 스왑
|
|
24
|
+
- [[components/button]]: `loading` prop이 Spinner를 자동 overlay
|
|
25
|
+
- [[components/top-loader]]: 라우팅·네트워크 로딩 신호 바 (Spinner와 역할 분리)
|
|
26
26
|
|
|
27
27
|
### Props 시그니처
|
|
28
28
|
```tsx
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
| ring | 회전 반원 테두리 | 표준·중립. standard motion 자동 매핑 |
|
|
44
44
|
| dots-bounce | 3 dot 순차 bounce | 표현력. bouncy motion 자동 매핑 |
|
|
45
45
|
| dots-fade | 3 dot 순차 fade (위치 고정) | 미니멀. calm motion 자동 매핑 |
|
|
46
|
-
| pulse | 단일 원 scale pulse | 특수(온보딩·대기 신호). 자동 매핑
|
|
46
|
+
| pulse | 단일 원 scale pulse | 특수(온보딩·대기 신호). 자동 매핑 없음: 명시 지정만 |
|
|
47
47
|
| `lottie-<name>` | 번들된 Lottie 로티 | 성격 있는 자리(AI 생성·온보딩·브랜드) |
|
|
48
48
|
|
|
49
49
|
### Lottie 로티 (8종 번들)
|
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
|
|
63
63
|
**colorBind=✓** 로티는 Palette 축을 바꾸면 로더 색도 자동 추종. **✗** 로티는 작가 의도된 다색이 그대로 유지됨.
|
|
64
64
|
|
|
65
|
-
**사이즈 주의**: Lottie는 vectorized라 size가 작으면 디테일 뭉개짐. `size="md"` 이상 권장. Button loading 안에 Lottie 쓰는 건
|
|
65
|
+
**사이즈 주의**: Lottie는 vectorized라 size가 작으면 디테일 뭉개짐. `size="md"` 이상 권장. Button loading 안에 Lottie 쓰는 건 비권장: 기본 variant(dots/ring)가 적합.
|
|
66
66
|
|
|
67
67
|
### Size 매트릭스
|
|
68
|
-
IconButton 박스 크기와 1:1
|
|
68
|
+
IconButton 박스 크기와 1:1 매칭: 로더가 들어가는 자리의 IconButton·Button 박스와 같은 size로.
|
|
69
69
|
|
|
70
70
|
| size | 실제 크기 | 쓰임 |
|
|
71
71
|
|---|---|---|
|
|
@@ -74,7 +74,7 @@ IconButton 박스 크기와 1:1 매칭 — 로더가 들어가는 자리의 Icon
|
|
|
74
74
|
| lg | 32px | **기본**. 조금 더 강조된 영역 |
|
|
75
75
|
| xl | 40px | 페이지 중앙 로딩, 모달 바디 로딩, Button loading(전 사이즈) |
|
|
76
76
|
|
|
77
|
-
Lottie 로더는 캔버스 충전율이 다르므로 `visualScale`로 bounds를 꽉 채우도록
|
|
77
|
+
Lottie 로더는 캔버스 충전율이 다르므로 `visualScale`로 bounds를 꽉 채우도록 보정됨: size만 고르면 체감이 일관되게 맞아야 함. 특정 Lottie가 작아 보이면 `lottieManifest.ts`의 `visualScale`을 올려 글로벌 보정, 사용처에서 size를 올리지 말 것.
|
|
78
78
|
|
|
79
79
|
### 축 추종 매핑 (variant 미지정 시)
|
|
80
80
|
| Motion | Spinner 자동 variant |
|
|
@@ -90,11 +90,11 @@ Spinner는 `currentColor` 바인딩. 즉:
|
|
|
90
90
|
- Button outline 안에서는 fg 기본색
|
|
91
91
|
- 커스텀 자리에 색이 필요하면 부모에 `color: var(--accent)` 식으로 걸 것
|
|
92
92
|
|
|
93
|
-
Palette 축이 바뀌어도 Spinner는 자동
|
|
93
|
+
Palette 축이 바뀌어도 Spinner는 자동 추종: 별도 색 지정 금지.
|
|
94
94
|
|
|
95
95
|
### 조합 예시
|
|
96
96
|
```tsx
|
|
97
|
-
// Button loading
|
|
97
|
+
// Button loading: 소비자가 신경쓸 거 없음 (Button이 자동 처리)
|
|
98
98
|
<Button loading>저장</Button>
|
|
99
99
|
|
|
100
100
|
// 페이지 중앙 로딩
|