@conscience-technology/ovenn 0.6.7 → 0.7.0
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 +2 -1
- 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 +9 -3
- package/assets/components/AttachmentThumb/AttachmentThumb.module.css +4 -0
- 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 +1 -0
- 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/ChatInput/ChatInput.module.css +5 -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 +7 -3
- package/assets/components/ColorArea/ColorArea.module.css +3 -0
- package/assets/components/ColorField/ColorField.module.css +6 -0
- package/assets/components/ColorField/ColorField.tsx +3 -1
- 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 +1 -1
- package/assets/components/Combobox/Combobox.tsx +1 -1
- package/assets/components/CommandPalette/CommandPalette.module.css +18 -23
- 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 +7 -1
- package/assets/components/DataTable/DataTable.module.css +2 -0
- package/assets/components/DatePicker/DatePicker.module.css +36 -3
- package/assets/components/DatePicker/DatePicker.tsx +11 -1
- package/assets/components/DatePicker/TimeSelector.tsx +1 -1
- package/assets/components/Disclosure/Disclosure.module.css +1 -0
- package/assets/components/Drawer/Drawer.module.css +11 -4
- package/assets/components/Drawer/Drawer.tsx +5 -1
- package/assets/components/DropdownMenu/DropdownMenu.tsx +5 -0
- 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 +2 -0
- 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 +434 -0
- package/assets/components/Icon/MissingIcon.tsx +25 -0
- package/assets/components/Icon/SolarFamilyIcon.tsx +439 -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 +30 -12
- package/assets/components/Input/Input.tsx +1 -1
- 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 +36 -0
- 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 +8 -8
- package/assets/components/ProgressBar/ProgressBar.tsx +0 -5
- 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 +78 -3
- package/assets/components/RadioCard/RadioCard.tsx +34 -12
- 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.tsx +7 -4
- 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 +22 -7
- package/assets/components/Tabs/Tabs.tsx +2 -1
- 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 +7 -0
- package/assets/components/ThemeController.tsx +30 -3
- package/assets/components/TimePicker/TimePicker.module.css +1 -0
- package/assets/components/TimePicker/TimePicker.tsx +37 -16
- 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 +2 -0
- 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 +17 -8
- package/assets/components/TopLoader/TopLoader.module.css +1 -0
- package/assets/components/TreeNav/TreeNav.module.css +1 -0
- package/assets/components/_color.ts +2 -2
- package/assets/components/_data.ts +33 -32
- package/assets/components/_utils.css +5 -0
- package/assets/components/axisOptions.ts +2 -0
- package/assets/components/component-registry.json +151 -2
- package/assets/components/index.ts +16 -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 +225 -71
- package/assets/components/useChartEntrance.ts +119 -0
- package/assets/prompts/ASSEMBLY.md +9 -7
- package/assets/prompts/CATALOG.md +18 -4
- package/assets/prompts/FEEDBACK_PROCESS.md +19 -0
- package/assets/prompts/PRINCIPLES.md +14 -0
- package/assets/prompts/WORKFLOW_DESIGN.md +46 -70
- package/assets/prompts/axes/font.md +6 -1
- package/assets/prompts/axes/icon.md +6 -4
- package/assets/prompts/axes/material.md +40 -0
- package/assets/prompts/axes/palette.md +2 -1
- package/assets/prompts/axes/shape.md +8 -0
- package/assets/prompts/components/attachment-item.md +2 -1
- package/assets/prompts/components/badge.md +32 -97
- package/assets/prompts/components/breadcrumb.md +1 -0
- package/assets/prompts/components/calendar.md +151 -0
- package/assets/prompts/components/canvas-edge.md +67 -0
- package/assets/prompts/components/canvas-node.md +25 -8
- package/assets/prompts/components/canvas.md +82 -0
- package/assets/prompts/components/card.md +10 -10
- 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/checkbox-card.md +26 -45
- package/assets/prompts/components/checkbox.md +23 -0
- package/assets/prompts/components/chip.md +6 -6
- package/assets/prompts/components/code-block.md +1 -0
- package/assets/prompts/components/color-picker.md +173 -0
- package/assets/prompts/components/color-slider.md +7 -7
- package/assets/prompts/components/command-palette.md +7 -6
- package/assets/prompts/components/comment.md +72 -0
- package/assets/prompts/components/context-menu.md +6 -3
- package/assets/prompts/components/data-table.md +9 -0
- package/assets/prompts/components/date-picker.md +10 -0
- package/assets/prompts/components/drawer.md +10 -0
- package/assets/prompts/components/dropdown-menu.md +3 -1
- package/assets/prompts/components/event-chip.md +60 -18
- package/assets/prompts/components/event-list-item.md +14 -10
- package/assets/prompts/components/file-upload.md +1 -1
- package/assets/prompts/components/gallery-item.md +5 -4
- package/assets/prompts/components/icon.md +30 -8
- package/assets/prompts/components/kanban.md +1 -1
- package/assets/prompts/components/list-item.md +11 -2
- package/assets/prompts/components/menu-item.md +8 -3
- package/assets/prompts/components/message-actions.md +9 -0
- package/assets/prompts/components/metric-card.md +57 -109
- package/assets/prompts/components/mini-calendar.md +72 -0
- package/assets/prompts/components/modal.md +1 -0
- package/assets/prompts/components/onboarding.md +11 -7
- package/assets/prompts/components/page-header.md +11 -2
- package/assets/prompts/components/progress-bar.md +12 -2
- package/assets/prompts/components/radio-card.md +33 -117
- package/assets/prompts/components/segmented-chart.md +19 -5
- package/assets/prompts/components/select.md +1 -0
- package/assets/prompts/components/sidebar.md +12 -3
- package/assets/prompts/components/skeleton.md +44 -0
- package/assets/prompts/components/stepper.md +15 -1
- package/assets/prompts/components/switch.md +15 -10
- package/assets/prompts/components/tab-strip.md +1 -0
- package/assets/prompts/components/table-cell.md +6 -4
- package/assets/prompts/components/table-row.md +12 -3
- package/assets/prompts/components/table-toolbar.md +9 -0
- package/assets/prompts/components/tabs.md +4 -2
- package/assets/prompts/components/tag.md +54 -0
- package/assets/prompts/components/time-picker.md +1 -0
- package/assets/prompts/components/timeline-view.md +129 -0
- package/assets/prompts/components/toast.md +1 -1
- package/assets/prompts/components/toolbar.md +17 -4
- package/assets/prompts/components/tooltip.md +21 -3
- package/assets/prompts/components/top-loader.md +1 -1
- package/assets/prompts/components/topbar.md +9 -0
- package/assets/prompts/components/tree-nav.md +1 -1
- package/assets/prompts/templates/ains.md +2 -1
- package/assets/prompts/templates/aurora.md +5 -4
- package/assets/prompts/templates/glass-button.md +6 -5
- package/assets/prompts/templates/minimal.md +8 -6
- package/assets/prompts/templates/workspace.md +3 -3
- package/assets/prompts/tokens/color.md +4 -2
- package/assets/prompts/tokens/material.md +51 -0
- package/assets/prompts/tokens/radius.md +12 -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/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 +1163 -0
- package/assets/prompts/use-cases/feedback-progress-bar.md +427 -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 +1200 -0
- package/assets/public/ovenn-wordmark.svg +19 -0
- package/package.json +6 -2
- package/src/commands/info.js +1 -1
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
/* isGenerating — 한 글자씩 통통 wave. Spinner+텍스트 세로 중앙 정렬. */
|
|
30
30
|
.root[data-generating="true"] .body {
|
|
31
31
|
color: var(--fg-muted);
|
|
32
|
-
font-weight: var(--font-weight-
|
|
32
|
+
font-weight: var(--font-weight-book);
|
|
33
33
|
display: inline-flex;
|
|
34
34
|
align-items: center;
|
|
35
35
|
gap: var(--space-2);
|
|
@@ -118,6 +118,7 @@
|
|
|
118
118
|
/* CodeBlock 안쪽 code 요소는 글로벌 bg를 받지 않도록 리셋. */
|
|
119
119
|
.body :global(pre) :global(code) {
|
|
120
120
|
background: none;
|
|
121
|
+
corner-shape: var(--corner-shape);
|
|
121
122
|
border-radius: 0;
|
|
122
123
|
padding: 0;
|
|
123
124
|
font-size: inherit;
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
}
|
|
75
75
|
.root[data-variant="card"] .item {
|
|
76
76
|
border: var(--hairline) solid var(--border);
|
|
77
|
+
corner-shape: var(--corner-shape);
|
|
77
78
|
border-radius: var(--radius-md);
|
|
78
79
|
background: var(--bg);
|
|
79
80
|
overflow: hidden;
|
|
@@ -83,6 +84,7 @@
|
|
|
83
84
|
"카드 영역처럼" 좌우 숨 공간 가지고 깔리도록. radius도 추가해 둥근 모서리. */
|
|
84
85
|
.root[data-variant="bare"] .trigger,
|
|
85
86
|
.root[data-variant="line"] .trigger {
|
|
87
|
+
corner-shape: var(--corner-shape);
|
|
86
88
|
border-radius: var(--radius-sm);
|
|
87
89
|
}
|
|
88
90
|
|
|
@@ -127,6 +129,7 @@
|
|
|
127
129
|
.trigger:focus-visible {
|
|
128
130
|
outline: none;
|
|
129
131
|
box-shadow: var(--ring-shadow-nav);
|
|
132
|
+
corner-shape: var(--corner-shape);
|
|
130
133
|
border-radius: var(--radius-sm);
|
|
131
134
|
}
|
|
132
135
|
|
|
@@ -159,6 +159,7 @@
|
|
|
159
159
|
|
|
160
160
|
.root[data-variant="floating"] .sidebarSlot {
|
|
161
161
|
background: var(--bg);
|
|
162
|
+
corner-shape: var(--corner-shape);
|
|
162
163
|
border-radius: var(--radius-lg);
|
|
163
164
|
box-shadow: var(--shadow-sm);
|
|
164
165
|
}
|
|
@@ -167,6 +168,7 @@
|
|
|
167
168
|
.root[data-variant="floating"] .tabsSlot,
|
|
168
169
|
.root[data-variant="floating"] .contentSlot {
|
|
169
170
|
background: var(--app-frame-bg);
|
|
171
|
+
corner-shape: var(--corner-shape);
|
|
170
172
|
border-radius: var(--radius-lg);
|
|
171
173
|
box-shadow: var(--shadow-sm);
|
|
172
174
|
}
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
padding: var(--space-1) var(--space-1) var(--space-1) var(--space-2);
|
|
24
24
|
gap: var(--space-1_5);
|
|
25
25
|
font-size: var(--text-xs);
|
|
26
|
+
corner-shape: var(--corner-shape);
|
|
26
27
|
border-radius: var(--radius-md);
|
|
27
28
|
width: calc(var(--size-unit) * 55);
|
|
28
29
|
}
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
padding: var(--space-1_5) var(--space-1_5) var(--space-1_5) var(--space-2_5);
|
|
31
32
|
gap: var(--space-2);
|
|
32
33
|
font-size: var(--text-sm);
|
|
34
|
+
corner-shape: var(--corner-shape);
|
|
33
35
|
border-radius: var(--radius-md);
|
|
34
36
|
width: calc(var(--size-unit) * 55);
|
|
35
37
|
}
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
padding: var(--space-2_5) var(--space-1_5) var(--space-2_5) var(--space-2_5);
|
|
38
40
|
gap: var(--space-2_5);
|
|
39
41
|
font-size: var(--text-sm);
|
|
42
|
+
corner-shape: var(--corner-shape);
|
|
40
43
|
border-radius: var(--radius-lg);
|
|
41
44
|
width: var(--input-w-lg);
|
|
42
45
|
}
|
|
@@ -62,8 +65,11 @@
|
|
|
62
65
|
text-overflow: ellipsis;
|
|
63
66
|
white-space: nowrap;
|
|
64
67
|
color: var(--fg-strong);
|
|
65
|
-
font-weight: var(--font-weight-
|
|
66
|
-
line-height:
|
|
68
|
+
font-weight: var(--font-weight-book);
|
|
69
|
+
line-height: var(--lh-sm);
|
|
70
|
+
}
|
|
71
|
+
.sizeSm .label {
|
|
72
|
+
line-height: var(--lh-xs);
|
|
67
73
|
}
|
|
68
74
|
.sizeLg .label {
|
|
69
75
|
font-size: var(--text-sm);
|
|
@@ -74,7 +80,7 @@
|
|
|
74
80
|
min-width: 0;
|
|
75
81
|
color: var(--fg-subtle);
|
|
76
82
|
font-weight: var(--font-weight-regular);
|
|
77
|
-
line-height:
|
|
83
|
+
line-height: var(--lh-xs);
|
|
78
84
|
overflow: hidden;
|
|
79
85
|
text-overflow: ellipsis;
|
|
80
86
|
white-space: nowrap;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
justify-content: center;
|
|
11
11
|
width: var(--at-size);
|
|
12
12
|
height: var(--at-size);
|
|
13
|
+
corner-shape: var(--corner-shape);
|
|
13
14
|
border-radius: calc(var(--at-size) * 0.25);
|
|
14
15
|
flex: 0 0 auto;
|
|
15
16
|
user-select: none;
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
height: 100%;
|
|
45
46
|
object-fit: cover;
|
|
46
47
|
display: block;
|
|
48
|
+
corner-shape: inherit;
|
|
47
49
|
border-radius: inherit;
|
|
48
50
|
}
|
|
49
51
|
|
|
@@ -71,6 +73,7 @@
|
|
|
71
73
|
var(--bg-muted) 100%
|
|
72
74
|
);
|
|
73
75
|
background-size: 220% 220%;
|
|
76
|
+
corner-shape: inherit;
|
|
74
77
|
border-radius: inherit;
|
|
75
78
|
animation: at-shimmer calc(var(--duration-slower) * 6) var(--ease-in-out) infinite;
|
|
76
79
|
}
|
|
@@ -99,6 +102,7 @@
|
|
|
99
102
|
justify-content: center;
|
|
100
103
|
padding: 0;
|
|
101
104
|
border: 0;
|
|
105
|
+
corner-shape: var(--corner-shape);
|
|
102
106
|
border-radius: var(--radius-full);
|
|
103
107
|
background: var(--bg);
|
|
104
108
|
color: var(--fg);
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/* Shape ─────────────────────────────────────────────────── */
|
|
24
|
-
.circle { border-radius: var(--radius-full); }
|
|
24
|
+
.circle { corner-shape: round; border-radius: var(--radius-full); }
|
|
25
25
|
|
|
26
26
|
/* rounded는 size에 맞춰 radius 크기가 자연스럽게 커짐.
|
|
27
27
|
xs/sm은 컨테이너 자체가 작아 xs radius, md는 sm, lg는 md, xl은 lg. */
|
|
28
|
-
.rounded.xs { border-radius: var(--radius-xs); }
|
|
29
|
-
.rounded.sm { border-radius: var(--radius-sm); }
|
|
30
|
-
.rounded.md { border-radius: var(--radius-md); }
|
|
31
|
-
.rounded.lg { border-radius: var(--radius-lg); }
|
|
32
|
-
.rounded.xl { border-radius: var(--radius-xl); }
|
|
28
|
+
.rounded.xs { corner-shape: var(--corner-shape); border-radius: var(--radius-xs); }
|
|
29
|
+
.rounded.sm { corner-shape: var(--corner-shape); border-radius: var(--radius-sm); }
|
|
30
|
+
.rounded.md { corner-shape: var(--corner-shape); border-radius: var(--radius-md); }
|
|
31
|
+
.rounded.lg { corner-shape: var(--corner-shape); border-radius: var(--radius-lg); }
|
|
32
|
+
.rounded.xl { corner-shape: var(--corner-shape); border-radius: var(--radius-xl); }
|
|
33
33
|
|
|
34
34
|
/* Sizes ────────────────────────────────────────────────────
|
|
35
35
|
space-* 스케일에 붙여 다른 컨트롤과 정렬 유지.
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
object-fit: cover;
|
|
76
76
|
display: block;
|
|
77
77
|
opacity: 0;
|
|
78
|
+
corner-shape: inherit;
|
|
78
79
|
border-radius: inherit; /* root의 shape를 그대로 따라감 */
|
|
79
80
|
}
|
|
80
81
|
.image[data-loaded="true"] { opacity: 1; }
|
|
@@ -125,7 +126,7 @@
|
|
|
125
126
|
.overflow {
|
|
126
127
|
background: var(--bg-muted);
|
|
127
128
|
color: var(--fg-subtle);
|
|
128
|
-
font-weight: var(--font-weight-
|
|
129
|
+
font-weight: var(--font-weight-book);
|
|
129
130
|
}
|
|
130
131
|
.overflow.xs { font-size: calc(var(--size-4) * 0.42); }
|
|
131
132
|
.overflow.sm { font-size: calc(var(--size-6) * 0.36); }
|
|
@@ -182,20 +183,34 @@
|
|
|
182
183
|
.anchor[data-anchor-position="top-start"] > [data-anchored] {
|
|
183
184
|
top: 0;
|
|
184
185
|
inset-inline-start: 0;
|
|
185
|
-
|
|
186
|
+
--_anchor-x: calc(-1 * var(--_anchor-overlap));
|
|
187
|
+
--_anchor-y: calc(-1 * var(--_anchor-overlap));
|
|
188
|
+
transform: translate(var(--_anchor-x), var(--_anchor-y));
|
|
186
189
|
}
|
|
187
190
|
.anchor[data-anchor-position="top-end"] > [data-anchored] {
|
|
188
191
|
top: 0;
|
|
189
192
|
inset-inline-end: 0;
|
|
190
|
-
|
|
193
|
+
--_anchor-x: var(--_anchor-overlap);
|
|
194
|
+
--_anchor-y: calc(-1 * var(--_anchor-overlap));
|
|
195
|
+
transform: translate(var(--_anchor-x), var(--_anchor-y));
|
|
191
196
|
}
|
|
192
197
|
.anchor[data-anchor-position="bottom-start"] > [data-anchored] {
|
|
193
198
|
bottom: 0;
|
|
194
199
|
inset-inline-start: 0;
|
|
195
|
-
|
|
200
|
+
--_anchor-x: calc(-1 * var(--_anchor-overlap));
|
|
201
|
+
--_anchor-y: var(--_anchor-overlap);
|
|
202
|
+
transform: translate(var(--_anchor-x), var(--_anchor-y));
|
|
196
203
|
}
|
|
197
204
|
.anchor[data-anchor-position="bottom-end"] > [data-anchored] {
|
|
198
205
|
bottom: 0;
|
|
199
206
|
inset-inline-end: 0;
|
|
200
|
-
|
|
207
|
+
--_anchor-x: var(--_anchor-overlap);
|
|
208
|
+
--_anchor-y: var(--_anchor-overlap);
|
|
209
|
+
transform: translate(var(--_anchor-x), var(--_anchor-y));
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* Position Badge before its independent scale, so entrance scaling cannot move its center. */
|
|
213
|
+
.anchor > [data-slot="badge-root"][data-anchored] {
|
|
214
|
+
transform: none;
|
|
215
|
+
translate: var(--_anchor-x) var(--_anchor-y);
|
|
201
216
|
}
|
|
@@ -201,7 +201,7 @@ const AvatarGroup = forwardRef<HTMLSpanElement, AvatarGroupProps>(
|
|
|
201
201
|
const total = visible.length + (overflow > 0 ? 1 : 0);
|
|
202
202
|
|
|
203
203
|
return (
|
|
204
|
-
<span ref={ref} className={cls} {...rest}>
|
|
204
|
+
<span ref={ref} className={cls} data-slot="avatar-group" {...rest}>
|
|
205
205
|
{visible.map((child, i) =>
|
|
206
206
|
cloneElement(child, {
|
|
207
207
|
key: child.key ?? i,
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
}
|
|
32
32
|
/* trigger는 안쪽 Avatar와 border-radius를 맞춰야 focus ring이 정확한 모양으로 감쌈.
|
|
33
33
|
circle이면 full, rounded면 Avatar와 동일한 size별 radius. */
|
|
34
|
-
.circle .trigger { border-radius: var(--radius-full); }
|
|
35
|
-
.rounded.lg .trigger { border-radius: var(--radius-md); }
|
|
36
|
-
.rounded.xl .trigger { border-radius: var(--radius-lg); }
|
|
34
|
+
.circle .trigger { corner-shape: round; border-radius: var(--radius-full); }
|
|
35
|
+
.rounded.lg .trigger { corner-shape: var(--corner-shape); border-radius: var(--radius-md); }
|
|
36
|
+
.rounded.xl .trigger { corner-shape: var(--corner-shape); border-radius: var(--radius-lg); }
|
|
37
37
|
.trigger:focus-visible {
|
|
38
38
|
outline: none;
|
|
39
39
|
box-shadow: var(--ring-shadow-nav);
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
justify-content: center;
|
|
54
54
|
background: var(--scrim);
|
|
55
55
|
color: var(--scrim-fg);
|
|
56
|
+
corner-shape: inherit;
|
|
56
57
|
border-radius: inherit;
|
|
57
58
|
opacity: 0;
|
|
58
59
|
pointer-events: none;
|
|
@@ -3,15 +3,19 @@
|
|
|
3
3
|
숫자(12·3) 또는 짧은 문자열(new·beta) 모두 대응. 콘텐츠 폭 그대로 흐르되
|
|
4
4
|
1글자 숫자면 min-width로 원형에 가깝게 유지. */
|
|
5
5
|
.root {
|
|
6
|
+
--badge-font-weight: var(--font-weight-medium);
|
|
7
|
+
--badge-enter-duration: calc(var(--duration-slow) * 2.5);
|
|
8
|
+
--badge-enter-scale-from: 0;
|
|
9
|
+
--badge-enter-scale-peak: 1.08;
|
|
10
|
+
--badge-enter-blur: var(--space-1);
|
|
6
11
|
position: relative;
|
|
12
|
+
box-sizing: border-box;
|
|
7
13
|
display: inline-flex;
|
|
8
14
|
align-items: center;
|
|
9
15
|
justify-content: center;
|
|
10
16
|
flex-shrink: 0;
|
|
11
17
|
font-family: var(--label-font);
|
|
12
|
-
|
|
13
|
-
md(12px)부터 medium으로 올려 라벨 성격 강화. 수치 뱃지(solid)는 색상이 강조를 담당. */
|
|
14
|
-
font-weight: var(--font-weight-regular);
|
|
18
|
+
font-weight: var(--badge-font-weight);
|
|
15
19
|
line-height: 1;
|
|
16
20
|
letter-spacing: var(--label-tracking);
|
|
17
21
|
white-space: nowrap;
|
|
@@ -25,58 +29,57 @@
|
|
|
25
29
|
box-shadow: 0 0 0 var(--hairline) var(--bg);
|
|
26
30
|
}
|
|
27
31
|
|
|
28
|
-
|
|
29
|
-
--bg 92% + variant 8%를 직접 믹스 — "8% over bg" 효과를 알파 없는 solid 색으로 재구성.
|
|
30
|
-
(--info-subtle 자체를 바로 섞으면 투명 알파가 유지돼 효과 없음.) */
|
|
31
|
-
.root[data-anchored].soft.success {
|
|
32
|
-
background: color-mix(in srgb, var(--bg) 92%, var(--success));
|
|
33
|
-
}
|
|
34
|
-
.root[data-anchored].soft.warning {
|
|
35
|
-
background: color-mix(in srgb, var(--bg) 92%, var(--warning));
|
|
36
|
-
}
|
|
37
|
-
.root[data-anchored].soft.destructive {
|
|
38
|
-
background: color-mix(in srgb, var(--bg) 92%, var(--destructive));
|
|
39
|
-
}
|
|
40
|
-
.root[data-anchored].soft.info {
|
|
41
|
-
background: color-mix(in srgb, var(--bg) 92%, var(--info));
|
|
42
|
-
}
|
|
43
|
-
.root[data-anchored].soft.neutral {
|
|
44
|
-
background: color-mix(in srgb, var(--bg) 92%, var(--fg));
|
|
45
|
-
}
|
|
46
|
-
.root[data-anchored].soft:not(.success):not(.warning):not(.destructive):not(.info):not(.neutral) {
|
|
32
|
+
.root[data-anchored].soft {
|
|
47
33
|
background: color-mix(in srgb, var(--bg) 92%, var(--primary));
|
|
48
34
|
}
|
|
49
35
|
|
|
50
36
|
/* Sizes ──────────────────────────────────────────────────────── */
|
|
51
37
|
/* 텍스트 크기에 맞춘 사각 라벨. radius는 size 별로 차등.
|
|
52
38
|
높이는 폰트 line-height + 세로 padding으로 자연히 결정. */
|
|
53
|
-
.root {
|
|
39
|
+
.root {
|
|
40
|
+
corner-shape: var(--corner-shape-mini);
|
|
41
|
+
border-radius: var(--radius-mini-sm);
|
|
42
|
+
}
|
|
54
43
|
.sm {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
44
|
+
--_badge-height: calc(
|
|
45
|
+
var(--text-2xs) + var(--space-0_5) * 2 + var(--hairline) * 2
|
|
46
|
+
);
|
|
47
|
+
padding-block: var(--space-0_5); /* 2 */
|
|
48
|
+
padding-inline: var(--space-1); /* 4 */
|
|
49
|
+
font-size: var(--text-2xs); /* 12 */
|
|
50
|
+
font-weight: var(--badge-font-weight);
|
|
59
51
|
}
|
|
60
52
|
.md {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
53
|
+
--_badge-height: calc(
|
|
54
|
+
var(--text-2xs) + var(--space-1) * 2 + var(--hairline) * 2
|
|
55
|
+
);
|
|
56
|
+
padding-block: var(--space-1); /* 4 */
|
|
57
|
+
padding-inline: var(--space-1_5); /* 6 */
|
|
58
|
+
font-size: var(--text-2xs); /* 12 */
|
|
59
|
+
font-weight: var(--badge-font-weight);
|
|
65
60
|
}
|
|
66
61
|
|
|
67
62
|
/* Shape ──────────────────────────────────────────────────────
|
|
68
|
-
|
|
69
|
-
circle은
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
rounded는 미니 반경을 사용, pill은 --radius-full로 강제.
|
|
64
|
+
circle은 한 글자를 고정 정사각형 안에 중앙 정렬한다. 긴 텍스트는 TSX에서 pill로 전환. */
|
|
65
|
+
.pill {
|
|
66
|
+
corner-shape: round;
|
|
67
|
+
border-radius: var(--radius-full);
|
|
68
|
+
min-width: var(--_badge-height);
|
|
69
|
+
}
|
|
70
|
+
.rounded {
|
|
71
|
+
corner-shape: var(--corner-shape-mini);
|
|
72
|
+
border-radius: var(--radius-badge-rounded);
|
|
73
|
+
}
|
|
73
74
|
.circle {
|
|
75
|
+
corner-shape: round;
|
|
74
76
|
border-radius: var(--radius-full);
|
|
77
|
+
width: var(--_badge-height);
|
|
78
|
+
min-width: var(--_badge-height);
|
|
79
|
+
height: var(--_badge-height);
|
|
75
80
|
aspect-ratio: 1 / 1;
|
|
76
|
-
padding
|
|
81
|
+
padding: 0;
|
|
77
82
|
}
|
|
78
|
-
.circle.sm { padding-inline: var(--space-0_5); }
|
|
79
|
-
.circle.md { padding-inline: var(--space-1); }
|
|
80
83
|
|
|
81
84
|
/* Variants ───────────────────────────────────────────────────── */
|
|
82
85
|
/* solid — primary로 완전히 채움. 강조 상위 위계.
|
|
@@ -93,7 +96,7 @@
|
|
|
93
96
|
}
|
|
94
97
|
/* outline — 배경 없이 테두리와 텍스트가 같은 중립 톤.
|
|
95
98
|
표/목록 셀에서 "fill 없이 분류만" 담고 싶을 때. 글자 색은 테두리와 같은 색으로 묶어
|
|
96
|
-
한 조형처럼 읽히게 한다.
|
|
99
|
+
한 조형처럼 읽히게 한다. 텍스트 상태는 Tag가 담당하므로 outline에 status를 얹어도
|
|
97
100
|
상태색을 끌어오지 않는다. */
|
|
98
101
|
.outline {
|
|
99
102
|
background: transparent;
|
|
@@ -109,6 +112,7 @@
|
|
|
109
112
|
height: var(--_dot-size, var(--size-2-5));
|
|
110
113
|
padding: 0;
|
|
111
114
|
min-width: 0;
|
|
115
|
+
corner-shape: round;
|
|
112
116
|
border-radius: var(--radius-full);
|
|
113
117
|
background: var(--primary);
|
|
114
118
|
color: transparent;
|
|
@@ -117,36 +121,58 @@
|
|
|
117
121
|
white-space: nowrap;
|
|
118
122
|
}
|
|
119
123
|
/* dot + status — 상태 색 solid 원형 */
|
|
120
|
-
.dot.success {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
.dot.
|
|
124
|
+
.dot.success {
|
|
125
|
+
background: var(--success);
|
|
126
|
+
}
|
|
127
|
+
.dot.warning {
|
|
128
|
+
background: var(--warning);
|
|
129
|
+
}
|
|
130
|
+
.dot.destructive {
|
|
131
|
+
background: var(--destructive);
|
|
132
|
+
}
|
|
133
|
+
.dot.info {
|
|
134
|
+
background: var(--info);
|
|
135
|
+
}
|
|
124
136
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
soft + status는 상태색 8% 배경 + 상태색 텍스트. */
|
|
128
|
-
.soft.success {
|
|
129
|
-
background: var(--success-subtle);
|
|
130
|
-
color: var(--success);
|
|
131
|
-
}
|
|
132
|
-
.soft.warning {
|
|
133
|
-
background: var(--warning-subtle);
|
|
134
|
-
color: var(--warning);
|
|
135
|
-
}
|
|
136
|
-
.soft.destructive {
|
|
137
|
-
background: var(--destructive-subtle);
|
|
138
|
-
color: var(--destructive);
|
|
139
|
-
}
|
|
140
|
-
.soft.info {
|
|
141
|
-
background: var(--info-subtle);
|
|
142
|
-
color: var(--info);
|
|
143
|
-
}
|
|
144
|
-
/* soft + neutral — "상태 없음·대기 중" 조용한 중립 라벨.
|
|
145
|
-
표/목록 셀의 "미제출/대기/draft"처럼 상태색을 쓰면 안 되는 자리. */
|
|
146
|
-
.soft.neutral {
|
|
147
|
-
background: var(--hover);
|
|
148
|
-
color: var(--fg);
|
|
137
|
+
.dot.neutral {
|
|
138
|
+
background: var(--fg-muted);
|
|
149
139
|
}
|
|
150
140
|
|
|
151
|
-
/*
|
|
152
|
-
|
|
141
|
+
/* Grow around the badge center without directional travel. */
|
|
142
|
+
.root[data-enter] {
|
|
143
|
+
transform-origin: center;
|
|
144
|
+
animation: badge-pop var(--badge-enter-duration) var(--ease-emphasized) both;
|
|
145
|
+
}
|
|
146
|
+
@keyframes badge-pop {
|
|
147
|
+
from {
|
|
148
|
+
opacity: 0;
|
|
149
|
+
scale: var(--badge-enter-scale-from);
|
|
150
|
+
filter: blur(var(--badge-enter-blur));
|
|
151
|
+
}
|
|
152
|
+
60% {
|
|
153
|
+
opacity: 1;
|
|
154
|
+
scale: var(--badge-enter-scale-peak);
|
|
155
|
+
filter: blur(0);
|
|
156
|
+
}
|
|
157
|
+
to {
|
|
158
|
+
opacity: 1;
|
|
159
|
+
scale: 1;
|
|
160
|
+
filter: blur(0);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
:global([data-motion="calm"]) .root,
|
|
164
|
+
.root[data-motion="calm"] {
|
|
165
|
+
--badge-enter-duration: var(--duration-base);
|
|
166
|
+
--badge-enter-scale-from: 0.9;
|
|
167
|
+
--badge-enter-scale-peak: 1;
|
|
168
|
+
--badge-enter-blur: 0px;
|
|
169
|
+
}
|
|
170
|
+
:global([data-motion="none"]) .root[data-enter],
|
|
171
|
+
.root[data-motion="none"][data-enter] {
|
|
172
|
+
animation: none;
|
|
173
|
+
}
|
|
174
|
+
@media (prefers-reduced-motion: reduce) {
|
|
175
|
+
.root[data-enter] {
|
|
176
|
+
animation: none;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -4,16 +4,24 @@ import styles from "./Badge.module.css";
|
|
|
4
4
|
|
|
5
5
|
export type BadgeSize = "sm" | "md";
|
|
6
6
|
export type BadgeVariant = "solid" | "soft" | "outline" | "dot";
|
|
7
|
-
export type BadgeStatus =
|
|
7
|
+
export type BadgeStatus =
|
|
8
|
+
| "neutral"
|
|
9
|
+
| "success"
|
|
10
|
+
| "warning"
|
|
11
|
+
| "destructive"
|
|
12
|
+
| "info";
|
|
8
13
|
/** Badge 모양.
|
|
9
14
|
* - pill: 좌우 둥근 알약. 텍스트 폭에 따라 가로로 늘어남 (기본)
|
|
10
|
-
* - rounded: 작은
|
|
11
|
-
* - circle:
|
|
15
|
+
* - rounded: 호환용 작은 모서리. 분류/텍스트 상태는 Tag 사용.
|
|
16
|
+
* - circle: 한 글자를 고정 정원으로 표시. 여러 글자는 pill로 표시. */
|
|
12
17
|
export type BadgeShape = "pill" | "rounded" | "circle";
|
|
13
18
|
|
|
14
19
|
export type BadgeProps = HTMLAttributes<HTMLSpanElement> & {
|
|
20
|
+
/** Play the entrance animation on mount. Does not replay on value changes. */
|
|
21
|
+
animate?: boolean;
|
|
15
22
|
size?: BadgeSize;
|
|
16
23
|
variant?: BadgeVariant;
|
|
24
|
+
/** Only applies to variant="dot". Use Tag for a text status. */
|
|
17
25
|
status?: BadgeStatus;
|
|
18
26
|
shape?: BadgeShape;
|
|
19
27
|
/** Avatar·IconButton 등 anchor 위에 겹쳐 붙을 때 켬. Badge 바깥에 --bg 색 1px ring이 생겨
|
|
@@ -48,35 +56,33 @@ const shapeClassMap: Record<BadgeShape, string> = {
|
|
|
48
56
|
circle: styles.circle,
|
|
49
57
|
};
|
|
50
58
|
|
|
51
|
-
/*
|
|
52
|
-
원형이 유지되지 않고 어색한 세로 알약이 된다. 가드: shape=circle인데 children이 1자 초과면
|
|
53
|
-
pill로 자동 fallback + warning. 문자열 길이만 체크 — ReactNode(아이콘 등)는 통과. */
|
|
59
|
+
/* Single-character circles keep a stable square; longer counts retain pill padding. */
|
|
54
60
|
function resolveShape(shape: BadgeShape, children: ReactNode): BadgeShape {
|
|
55
61
|
if (shape !== "circle") return shape;
|
|
56
|
-
if (typeof children !== "string" && typeof children !== "number")
|
|
62
|
+
if (typeof children !== "string" && typeof children !== "number")
|
|
63
|
+
return shape;
|
|
57
64
|
const text = String(children);
|
|
58
65
|
if (text.length <= 1) return shape;
|
|
59
|
-
if (process.env.NODE_ENV !== "production") {
|
|
60
|
-
console.warn(
|
|
61
|
-
`[Badge] shape="circle" only accepts a single character or digit. ` +
|
|
62
|
-
`Got children=${JSON.stringify(text)}, falling back to pill. ` +
|
|
63
|
-
`Use shape="pill" for 2+ digit counts (12, 99+) or labels (PRO, new).`,
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
66
|
return "pill";
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
const Badge = forwardRef<HTMLSpanElement, BadgeProps>(
|
|
70
|
-
(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
70
|
+
(
|
|
71
|
+
{
|
|
72
|
+
className,
|
|
73
|
+
animate = true,
|
|
74
|
+
size = "sm",
|
|
75
|
+
variant = "solid",
|
|
76
|
+
status,
|
|
77
|
+
shape = "pill",
|
|
78
|
+
anchored,
|
|
79
|
+
children,
|
|
80
|
+
...rest
|
|
81
|
+
},
|
|
82
|
+
ref,
|
|
83
|
+
) => {
|
|
84
|
+
// Status colors belong to dot badges; text statuses use Tag.
|
|
85
|
+
const effectiveStatus = variant === "dot" ? status : undefined;
|
|
80
86
|
const resolvedShape = resolveShape(shape, children);
|
|
81
87
|
const cls = [
|
|
82
88
|
styles.root,
|
|
@@ -93,12 +99,14 @@ const Badge = forwardRef<HTMLSpanElement, BadgeProps>(
|
|
|
93
99
|
ref={ref}
|
|
94
100
|
className={cls}
|
|
95
101
|
data-slot="badge-root"
|
|
102
|
+
data-enter={animate || undefined}
|
|
96
103
|
data-anchored={anchored || undefined}
|
|
97
104
|
data-variant={variant}
|
|
105
|
+
role={variant === "dot" && rest["aria-label"] ? "img" : undefined}
|
|
98
106
|
data-shape={resolvedShape}
|
|
99
107
|
{...rest}
|
|
100
108
|
>
|
|
101
|
-
{children}
|
|
109
|
+
{variant === "dot" ? null : children}
|
|
102
110
|
</span>
|
|
103
111
|
);
|
|
104
112
|
},
|
|
@@ -51,11 +51,12 @@
|
|
|
51
51
|
gap: var(--space-1);
|
|
52
52
|
height: var(--control-h-xs);
|
|
53
53
|
padding-inline: var(--space-1);
|
|
54
|
+
corner-shape: var(--corner-shape);
|
|
54
55
|
border-radius: var(--radius-xs);
|
|
55
56
|
font-family: var(--label-font);
|
|
56
57
|
font-weight: var(--font-weight-regular);
|
|
57
58
|
font-size: var(--label-sm-size);
|
|
58
|
-
line-height: var(--
|
|
59
|
+
line-height: var(--label-sm-line-height);
|
|
59
60
|
letter-spacing: var(--label-tracking);
|
|
60
61
|
color: var(--fg-muted);
|
|
61
62
|
background: transparent;
|
|
@@ -101,7 +102,7 @@
|
|
|
101
102
|
font-family: var(--label-font);
|
|
102
103
|
font-weight: var(--font-weight-regular);
|
|
103
104
|
font-size: var(--label-sm-size);
|
|
104
|
-
line-height: var(--
|
|
105
|
+
line-height: var(--label-sm-line-height);
|
|
105
106
|
letter-spacing: var(--label-tracking);
|
|
106
107
|
color: var(--fg-strong);
|
|
107
108
|
min-width: 0;
|
|
@@ -138,13 +139,14 @@
|
|
|
138
139
|
height: var(--control-h-xs);
|
|
139
140
|
padding-inline: var(--space-1);
|
|
140
141
|
border: 1px solid transparent;
|
|
142
|
+
corner-shape: var(--corner-shape);
|
|
141
143
|
border-radius: var(--radius-xs);
|
|
142
144
|
background: transparent;
|
|
143
145
|
color: var(--fg-muted);
|
|
144
146
|
font-family: var(--label-font);
|
|
145
147
|
font-weight: var(--font-weight-regular);
|
|
146
148
|
font-size: var(--label-sm-size);
|
|
147
|
-
line-height: var(--
|
|
149
|
+
line-height: var(--label-sm-line-height);
|
|
148
150
|
letter-spacing: var(--label-tracking);
|
|
149
151
|
cursor: pointer;
|
|
150
152
|
user-select: none;
|
|
@@ -176,13 +178,14 @@
|
|
|
176
178
|
height: var(--control-h-xs);
|
|
177
179
|
padding-inline: var(--space-1);
|
|
178
180
|
border: 1px solid transparent;
|
|
181
|
+
corner-shape: var(--corner-shape);
|
|
179
182
|
border-radius: var(--radius-xs);
|
|
180
183
|
background: transparent;
|
|
181
184
|
color: var(--fg-muted);
|
|
182
185
|
font-family: var(--label-font);
|
|
183
186
|
font-weight: var(--font-weight-regular);
|
|
184
187
|
font-size: var(--label-sm-size);
|
|
185
|
-
line-height: var(--
|
|
188
|
+
line-height: var(--label-sm-line-height);
|
|
186
189
|
letter-spacing: var(--label-tracking);
|
|
187
190
|
cursor: pointer;
|
|
188
191
|
user-select: none;
|
|
@@ -264,6 +267,7 @@
|
|
|
264
267
|
cursor: pointer;
|
|
265
268
|
color: inherit;
|
|
266
269
|
text-decoration: none;
|
|
270
|
+
corner-shape: var(--corner-shape);
|
|
267
271
|
border-radius: var(--radius-xs);
|
|
268
272
|
}
|
|
269
273
|
.popoverItemLink:focus-visible,
|
|
@@ -190,7 +190,7 @@ function PopoverMenuContent({
|
|
|
190
190
|
const trailing = item.active ? [<Icon key="check" name="check" size={14} />] : undefined;
|
|
191
191
|
const inner = (
|
|
192
192
|
<MenuItem
|
|
193
|
-
size="
|
|
193
|
+
size="sm"
|
|
194
194
|
disabled={item.disabled}
|
|
195
195
|
leadingActions={leading}
|
|
196
196
|
trailingActions={trailing}
|
|
@@ -22,24 +22,30 @@
|
|
|
22
22
|
|
|
23
23
|
/* Shape */
|
|
24
24
|
.shapeRounded {
|
|
25
|
+
corner-shape: var(--corner-shape);
|
|
25
26
|
border-radius: var(--radius-md);
|
|
26
27
|
}
|
|
27
28
|
.shapeSquare {
|
|
29
|
+
corner-shape: var(--corner-shape);
|
|
28
30
|
border-radius: var(--radius-sm);
|
|
29
31
|
}
|
|
30
32
|
.shapeCircular {
|
|
33
|
+
corner-shape: round;
|
|
31
34
|
border-radius: var(--radius-full);
|
|
32
35
|
}
|
|
33
36
|
/* circular-drop — 세 코너는 radius-xl, tail 방향 한 코너만 radius-sm.
|
|
34
37
|
data-tail="end" → 오른쪽 상단만 각짐 (user 메시지, 오른쪽 정렬 꼬리). 기본.
|
|
35
38
|
data-tail="start" → 왼쪽 상단만 각짐 (assistant 메시지, 왼쪽 정렬 꼬리). */
|
|
36
39
|
.shapeCircularDrop {
|
|
40
|
+
corner-shape: round;
|
|
37
41
|
border-radius: var(--radius-md);
|
|
38
42
|
}
|
|
39
43
|
.shapeCircularDrop[data-tail="end"] {
|
|
44
|
+
corner-shape: round;
|
|
40
45
|
border-top-right-radius: 0;
|
|
41
46
|
}
|
|
42
47
|
.shapeCircularDrop[data-tail="start"] {
|
|
48
|
+
corner-shape: round;
|
|
43
49
|
border-top-left-radius: 0;
|
|
44
50
|
}
|
|
45
51
|
|