@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
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
# SegmentedChart
|
|
2
2
|
|
|
3
3
|
### 원칙
|
|
4
|
-
전체의 구성비를 하나의 분할 막대와 수치 목록으로 보여준다.
|
|
4
|
+
전체의 구성비를 하나의 분할 막대와 수치 목록으로 보여준다. 기본형은 제목·합계 없이 막대와 범례만 표시하며, 제목과 합계는 필요한 조합에서 선택한다. 막대 폭은 `value / 합계`이며 단계 간 전환율이나 퍼널 이탈률을 뜻하지 않는다.
|
|
5
|
+
|
|
6
|
+
### 진입 모션
|
|
7
|
+
- 기본으로 화면에 처음 들어올 때 분할 막대만 왼쪽부터 부드럽게 차오른다. 제목·수치·범례는 이동하지 않는다. `animateIn={false}`로 끈다.
|
|
8
|
+
- `--chart-enter-duration`(기본2×duration-slower)과 `--chart-enter-easing`을 사용하며 `motion=none` 및 reduced-motion은 JS/WAAPI까지 즉시 정지한다. 빈 데이터와 전체0값은 애니메이션을 생략한다. 재진입·선택 변경은 처음 등장 모션을 반복하지 않는다.
|
|
5
9
|
|
|
6
10
|
### Do
|
|
7
11
|
- `data`의 고유한 `id`, `label`, 음이 아닌 유한한 `value`를 공급한다. 합계와 막대는 같은 데이터에서 계산한다.
|
|
@@ -10,9 +14,9 @@
|
|
|
10
14
|
- 범례 단계명·금액·단위는 `text-sm`로, 보조 건수(`description`)는 한 단계 작은 `text-xs`로 표시한다. 금액과 단위는 같은 크기·색을 유지한다. 건수·금액·단위의 기본색은 `fg-muted`이다.
|
|
11
15
|
- 기본색은 primary 명도 단계다. 다른 범주 색은 `color: "var(--chart-1)"`처럼 토큰을 전달한다. 기본 5색을 초과하면 색이 반복되므로 항목을 묶거나 별도 색 토큰을 지정한다.
|
|
12
16
|
- 상세 행동이 있을 때만 `onSegmentClick`을 전달한다. 목록은 Button ghost/md로 바뀌며 Tab·Enter·Space를 지원한다. `selectedId`를 함께 제어하면 선택 상태가 표시된다.
|
|
13
|
-
- 선택 가능한 타입의 상단 금액은 선택 항목의 값으로 바뀌고 해제 시 전체 합계로 복원된다. `title`을 제공하면 선택 시 범례명, 해제 시 원래 제목을 표시한다. 제목이 없으면 금액만 바뀐다. 선택값0은0으로 표시하며 잘못된 id는 합계로 복원한다. `caption`은 소비자가 제공한 보조 문구를 유지하므로 선택 항목의 건수도 바꿔야 하면 같은 selectedId에서 파생한다.
|
|
17
|
+
- `showSummary`는 기본 false이며 true일 때만 상단 합계·단위·caption을 표시한다. 합계를 켠 선택 가능한 타입의 상단 금액은 선택 항목의 값으로 바뀌고 해제 시 전체 합계로 복원된다. `title`을 제공하면 선택 시 범례명, 해제 시 원래 제목을 표시한다. 제목이 없으면 금액만 바뀐다. 선택값0은0으로 표시하며 잘못된 id는 합계로 복원한다. `caption`은 소비자가 제공한 보조 문구를 유지하므로 선택 항목의 건수도 바꿔야 하면 같은 selectedId에서 파생한다.
|
|
14
18
|
- 선택 가능한 범례의 단계명은 선택 여부와 무관하게 `fg`를 유지한다. 건수·금액·단위만 미선택 시 `--segmented-secondary-fg`(`fg-muted` 70%와 `fg-subtle` 혼합), 선택 시 `fg-strong`으로 표시한다. 선택 해제하면 해당 수치가 다시 연해진다.
|
|
15
|
-
-
|
|
19
|
+
- 합계를 켠 경우 `text-2xl`로 표시한다. 모든 구간의 색·비중을 유지하며 선택한 구간만 `space-0_5`(기본 2px) 올라간 상태로 유지한다. 선택 해제 시 제자리로 돌아온다. 유효하지 않은 선택·0값 항목 선택은 구간을 올리지 않는다. 진입·해제는 `transition-press`를 사용하며 `prefers-reduced-motion`에서는 전환 없이 위치만 반영한다.
|
|
16
20
|
- 제목은 선택적 `title`로, 표면은 소비자가 Card 등으로 조립한다. 접근 가능한 차트 이름은 `aria-label`로 지정한다.
|
|
17
21
|
- 좁은 컨테이너(320px 이하)에서는 범례명·보조 건수를 첫 줄, 금액을 다음 줄에 표시해 긴 항목명이 한 글자씩 분절되지 않게 한다. 데스크톱의 한 줄 배치는 유지한다.
|
|
18
22
|
- 범례 목록 전체를 좌우 `space-1`씩 확장해 카드보다 바깥 여백을 4px 적게 둔다. 행 내부 좌우 패딩 `space-2`는 유지한다. 막대는 트랙 전체를 둥글게 자르지 않고 각 구간에 작은 모서리를 적용한다. 선택은 목록 배경과 `aria-pressed`로 표시하며 막대에 검정 테두리를 추가하지 않는다.
|
|
@@ -25,10 +29,10 @@
|
|
|
25
29
|
- 음수·NaN·Infinity를 유효한 비중으로 쓰지 않는다. 방어적으로 0으로 정규화하며 금융 손익처럼 음수 의미가 필요한 데이터는 Bar Chart를 쓴다.
|
|
26
30
|
|
|
27
31
|
### 카드 조합 참고
|
|
28
|
-
닥스 기본 사용·Playground
|
|
32
|
+
닥스 기본 사용·Playground는 제목·합계를 끈 차트 단독으로 시작한다. 사용 사례의 거래 파이프라인과 거래 파이프라인 카드는 `showSummary`를 명시하여 기존 제목·합계·거래 건수 구성을 유지한다. 별도 **사용 사례 → 거래 파이프라인 카드**가 Card와의 조합을 보여준다. Card 닥스에서도 같은 `web/examples/PipelineCardExample.tsx`를 직접 렌더한다. 이 기존 조합은 사용자가 여백감·텍스트 높이에 따른 상하 패딩 보정·전체 밸런스의 모범 사례로 지정했다. `web/examples/PipelineCardExample.module.css`의 `.card.pipelineCard`와 [[components/card]]의 해당 사용 사례를 참고하며, 차트 안에 표면을 내장하거나 상하 보정을 일괄 대칭화하지 않는다.
|
|
29
33
|
|
|
30
34
|
### Fallback
|
|
31
|
-
빈 배열은 합계·막대를 렌더하지 않고 EmptyState로 `emptyLabel`을 표시한다. 모든 값이 0이면
|
|
35
|
+
빈 배열은 합계·막대를 렌더하지 않고 EmptyState로 `emptyLabel`을 표시한다. 모든 값이 0이면 목록과 활성화된 합계를 유지하고 비어 있는 중립 트랙을 표시한다. 데이터가 없는 상태와 측정값이 0인 상태를 구별한다. loading/error 및 실제 다음 행동은 데이터를 준비하는 소비자 영역에서 처리한다.
|
|
32
36
|
|
|
33
37
|
### Props 시그니처
|
|
34
38
|
```tsx
|
|
@@ -42,6 +46,7 @@ type SegmentedChartItem = {
|
|
|
42
46
|
|
|
43
47
|
<SegmentedChart
|
|
44
48
|
title="거래 파이프라인"
|
|
49
|
+
showSummary={true} // default false
|
|
45
50
|
data={items}
|
|
46
51
|
unit="만 원"
|
|
47
52
|
caption="총 32건"
|
|
@@ -63,3 +68,12 @@ type SegmentedChartItem = {
|
|
|
63
68
|
```json
|
|
64
69
|
{"roles":["chart"],"native":[],"hints":[],"requires":[]}
|
|
65
70
|
```
|
|
71
|
+
|
|
72
|
+
<!-- generated-use-cases:start -->
|
|
73
|
+
### 사용 사례 연결
|
|
74
|
+
|
|
75
|
+
- Deal pipeline · Deal pipeline card
|
|
76
|
+
- 문서: /en/components/chart/segmented-chart#use-cases
|
|
77
|
+
- 참조 원본: [Segmented Chart 사례](../use-cases/chart-segmented-chart.md)
|
|
78
|
+
- AI 조회: `get_guide(topic="use-cases/chart-segmented-chart", sections=["사례 목록", "파일 목록"])` 후 필요한 `Section:` / `Source:` 헤딩을 선택한다.
|
|
79
|
+
<!-- generated-use-cases:end -->
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
**구조는 Radix 호환 compound**: `Select.Trigger` + `Select.Content` + `Select.Item`이 **모두 필수**. 셋 중 하나라도 빠지면 Radix가 런타임에 throw. Item만 넣는 간이 형태는 지원하지 않는다.
|
|
7
7
|
|
|
8
8
|
### Do
|
|
9
|
+
- 시각 속성의 선택 옵션은 [[PRINCIPLES]] §5d **선택 옵션 시각화**를 적용한다.
|
|
9
10
|
- Trigger에 전달한 외부 `aria-describedby`를 Root의 설명·오류 ID와 합친다. warning이 있으면 invalid를 유지한다. Trigger의 키보드 포커스는 공유 Input field ring 토큰을 사용한다.
|
|
10
11
|
- Input 옆에 나란히 놓을 땐 size·variant를 **반드시 통일**.
|
|
11
12
|
- `width`는 Input의 InputWidth 규약 그대로: `"fill" | "md" | "lg" | number`.
|
|
@@ -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"
|
|
@@ -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]}>
|
|
@@ -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,44 @@
|
|
|
1
|
+
# Skeleton
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
콘텐츠가 들어올 자리를 실제 크기와 구조에 맞춰 확보하는 장식용 로딩 placeholder. 원형·사각형·텍스트 줄을 조합한다. 비어 있거나 실패한 결과를 대신하지 않는다.
|
|
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
|
+
### 관련
|
|
37
|
+
- [[components/card]] — 콘텐츠 조합
|
|
38
|
+
- [[components/canvas-node]] — 미디어·텍스트 로딩 소비처
|
|
39
|
+
- [[components/spinner]] — 자리를 미리 그릴 수 없는 짧은 작업
|
|
40
|
+
|
|
41
|
+
<!-- component-contract -->
|
|
42
|
+
```json
|
|
43
|
+
{"roles":["loading-placeholder"],"native":[],"requires":[]}
|
|
44
|
+
```
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
다단계 프로세스의 진행 위치를 시각적으로 보여주는 컴포넌트. 각 스텝은 `upcoming | active | done` 세 상태를 가지며, 상태 대비로 사용자가 "지금 어디에 있고 얼마나 남았는지"를 즉시 파악하게 한다. Rail·툴바 같은 껍데기(브랜드 슬롯·푸터)는 이 컴포넌트가 담지 않는다 — Stepper는 **스텝 리스트만** 담당.
|
|
5
5
|
|
|
6
6
|
### Do
|
|
7
|
+
- `indicator="marker"`, `variant="md"`, `tone="neutral"`의 완료 마커는 `--stepper-marker`(기본 `--fg`) 배경과 `--stepper-marker-fg`(기본 `--bg`)의 반전된 체크 색을 사용한다. 라이트에서는 검정 바탕·흰 체크로 표시한다.
|
|
8
|
+
- `indicator="line"`은 점 대신 단계별로 분리된 선을 표시한다. 가로형은 제목 위, 세로형은 제목 왼쪽에 선을 둔다. `variant="md | sm"`으로 선 두께를 선택한다. 기본 `indicator="marker"`는 기존 원형 마커다.
|
|
7
9
|
- 보조 패널은 `spacing="compact"`, 긴 rail은 `default` 또는 `relaxed`로 시작한다. `variant`는 marker 크기이며 간격과 독립이다.
|
|
8
10
|
- **기본은 `orientation="vertical"`**. 온보딩·설정·긴 폼처럼 화면 좌측 사이드에 붙는 표준 케이스.
|
|
9
11
|
- **좁은 헤더·상단 배너에는 `orientation="horizontal"`**. 세로 공간이 부족하고 스텝 개수가 3~5개일 때.
|
|
@@ -39,7 +41,8 @@ orientation 애매하면 `vertical`, marker 애매하면 `dot`. 스텝 6개 초
|
|
|
39
41
|
<Stepper
|
|
40
42
|
activeIndex={number}
|
|
41
43
|
orientation="vertical | horizontal" // default: vertical
|
|
42
|
-
|
|
44
|
+
indicator="marker | line" // default: marker
|
|
45
|
+
variant="md | sm" // marker 크기 또는 line 두께
|
|
43
46
|
spacing="compact | default | relaxed" // item 간격, default: default
|
|
44
47
|
lineStyle="dashed | solid"
|
|
45
48
|
marker="dot | number" // default: dot
|
|
@@ -59,6 +62,17 @@ orientation 애매하면 `vertical`, marker 애매하면 `dot`. 스텝 6개 초
|
|
|
59
62
|
|
|
60
63
|
### 밀도 선택
|
|
61
64
|
|
|
65
|
+
선형 인디케이터는 완료·현재·예정 상태와 클릭·disabled·`aria-current="step"` 계약을 그대로 유지한다. 완료·현재 선은 강조색, 예정 선은 중립색이며 현재 제목 굵기로 활성 단계를 구분한다. 가로 선 사이 간격은 `--space-1_5`, 세로 선 사이 간격은 `spacing`별 항목 간격의 절반이며 예정 단계의 제목·힌트는 완료·현재보다 연하게 표시한다. 선형에서는 `marker`의 숫자·체크와 `lineStyle`의 연결선을 표시하지 않는다. 선형은 단계 단위 표시이며 연속형 진행률(%)은 ProgressBar를 사용한다.
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
<Stepper activeIndex={1} orientation="horizontal" indicator="line">
|
|
69
|
+
<Stepper.Item title="Style" hint="Shape & icons" />
|
|
70
|
+
<Stepper.Item title="Color" hint="Brand palette" />
|
|
71
|
+
<Stepper.Item title="Density" hint="Spacing" />
|
|
72
|
+
<Stepper.Item title="Layout" hint="Navigation" />
|
|
73
|
+
</Stepper>
|
|
74
|
+
```
|
|
75
|
+
|
|
62
76
|
marker 크기(`variant`)와 항목 간격(`spacing`)은 독립이다. sm을 골라도 더 넓은 gap을 강제하지 않는다. 긴 설명/힌트가 있는 rail은 relaxed, 진행 요약 같은 작은 보조 영역은 compact를 검토한다. 로컬 skin과 토큰 변경도 [[PRINCIPLES]] 안에서 가능하다.
|
|
63
77
|
|
|
64
78
|
### 색 오버라이드 예 (특수 팔레트)
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
### 원칙
|
|
4
4
|
**즉시 적용되는 on/off** 컨트롤. 토글하는 순간 상태가 변한다 — 저장 버튼이 따로 없는 자리에 쓴다.
|
|
5
|
-
시맨틱은 `role="switch"`가 붙은 native checkbox. 시각은
|
|
5
|
+
시맨틱은 `role="switch"`가 붙은 native checkbox. 시각은 둥근 사각 트랙 + 가로로 넓은 둥근 사각 썸과 은은한 그림자 — 켜지면 트랙이 `--primary`로 채워지고 썸이 우측으로 이동.
|
|
6
6
|
|
|
7
7
|
### Do
|
|
8
|
+
- 곡률은 전역 Shape 축과 독립적이다. 기본 `variant="soft"`, 각진 모서리는 `variant="crisp"`를 사용한다.
|
|
8
9
|
- 모션 축소 또는 motion=none에서는 눌림 상태의 thumb 가로 확대를 적용하지 않는다. 선택 상태의 위치와 정적인 상태 표시는 유지한다.
|
|
9
10
|
- **즉시 반영에만**: 다크모드, 알림 on/off, 자동 저장, 필터 옵션. 토글 → 부작용까지 즉시.
|
|
10
11
|
- **"선택 여부"가 아니라 "상태 전환"에만**: 폼 제출 후 반영되는 옵션은 [[components/checkbox]].
|
|
@@ -30,7 +31,8 @@ size 애매하면 `md`.
|
|
|
30
31
|
### Props 시그니처
|
|
31
32
|
```tsx
|
|
32
33
|
<Switch
|
|
33
|
-
|
|
34
|
+
variant="soft | crisp" // default: soft, Shape 축과 독립
|
|
35
|
+
size="md | lg" // default: md
|
|
34
36
|
invalid={boolean} // 폼 검증 실패 — track·focus ring destructive
|
|
35
37
|
checked / defaultChecked // native input props
|
|
36
38
|
onCheckedChange={(on) => void} // 편의 콜백 (boolean 바로 옴)
|
|
@@ -43,11 +45,11 @@ size 애매하면 `md`.
|
|
|
43
45
|
### 상태 매트릭스
|
|
44
46
|
| 상태 | 트랙 | 썸 |
|
|
45
47
|
|---|---|---|
|
|
46
|
-
| off · default | `--bg-muted` | `--bg`
|
|
48
|
+
| off · default | `--bg-muted` | `--bg` 넓은 둥근 사각 썸 + 전용 그림자 |
|
|
47
49
|
| off · hover | **`--hover`** (미세 밝아짐 — 클릭 가능 신호) | 동일 |
|
|
48
50
|
| on · default | `--primary` fill | 우측 이동 |
|
|
49
51
|
| on · hover | `--primary-hover` | 동일 |
|
|
50
|
-
| pressed (어느 상태든) | 그대로 |
|
|
52
|
+
| pressed (어느 상태든) | 그대로 | 가로 표면 확장 — 트랙 안쪽으로만 20% 넓어짐 |
|
|
51
53
|
| focus-visible | `--ring-shadow-field` | 동일 |
|
|
52
54
|
| **invalid** (off) | `--destructive-subtle` | 그대로 |
|
|
53
55
|
| **invalid** (on) | `--destructive` solid | 그대로 |
|
|
@@ -57,14 +59,17 @@ size 애매하면 `md`.
|
|
|
57
59
|
### Size 가이드
|
|
58
60
|
| size | 트랙 (w × h) | 언제 |
|
|
59
61
|
|---|---|---|
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
|
|
62
|
+
| `md` | ((size-4 + size-0-5) × 13/6) × (size-4 + size-0-5) | **기본.** 설정 페이지, 일반 폼 |
|
|
63
|
+
| `lg` | (size-5 × 13/6) × size-5 | 더 큰 옵션 컨트롤 |
|
|
64
|
+
|
|
65
|
+
기본 Density에서 트랙 높이는 md=18px, lg=20px이다. 크기 값은 유지하고 이전 sm을 md, 이전 md를 lg로 이름만 변경했다. sm은 제공하지 않는다.
|
|
66
|
+
|
|
67
|
+
트랙·썸 곡률은 컴포넌트 내부 토큰으로 고정한다. soft는 반경 비율 .44와 superellipse(1.2), crisp는 .16과 superellipse(2.4)다. 전역 Shape를 참조하지 않으며 Density·Motion·Palette 및 native 동작은 유지한다.
|
|
63
68
|
|
|
64
69
|
### 인터랙션
|
|
65
70
|
- **unchecked hover 신호** — track이 `--hover` 톤으로 미세하게 밝아져 "클릭 가능"을 알림. HeroUI 패턴 참고.
|
|
66
|
-
- **Thumb pressed 스쿼시** — 꾹 누르면
|
|
67
|
-
- **ease-emphasized** 트랜지션 — thumb
|
|
71
|
+
- **Thumb pressed 스쿼시** — 손잡이 위치와 눌림 표면을 분리한다. 꾹 누르면 off는 오른쪽, on은 왼쪽으로 표면만 20% 넓어져 바깥 여백을 지킨다. 표면의 left/right inset을 같은 easing으로 복구한다. 상태별 transform-origin 전환이나 중앙 scale로 위치 튐·트랙 경계 침범을 만들지 않는다. 세로 크기는 유지한다.
|
|
72
|
+
- **ease-emphasized** 트랜지션 — thumb 표면의 inset 전환에 적용되어 Motion 축에 반응 (bouncy=overshoot, standard=매끈한 pop).
|
|
68
73
|
|
|
69
74
|
### 접근성
|
|
70
75
|
- `role="switch"` + native `input type="checkbox"` → 스크린리더가 "스위치, 켜짐/꺼짐"으로 읽음.
|
|
@@ -78,7 +83,7 @@ size 애매하면 `md`.
|
|
|
78
83
|
// 툴바 안 옵션 토글 — 그룹이 라벨 역할, aria-label로만 시맨틱 라벨
|
|
79
84
|
<div className="toolbar-group">
|
|
80
85
|
<span>Time</span>
|
|
81
|
-
<Switch size="
|
|
86
|
+
<Switch size="md" checked={withTime} onCheckedChange={setWithTime} aria-label="Time" />
|
|
82
87
|
</div>
|
|
83
88
|
|
|
84
89
|
// 폼 안 옵션 — 텍스트 라벨과 세트
|
|
@@ -21,6 +21,7 @@ const [activeId, setActiveId] = useState<string>(openDocs[0].id);
|
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
### Do
|
|
24
|
+
- 탭 라벨은 sm/md 크기에 맞는 label 줄 높이를 사용해 가로 스크롤·marquee 마스크 안에서 글자 하단이 잘리지 않게 한다.
|
|
24
25
|
- **각 탭 = 독립 문서/라우트**. 라우팅이나 외부 상태 저장소에 반영 (`?doc=portfolio` 또는 workspace store).
|
|
25
26
|
- **leadingIcon에 자유롭게** — [[components/icon]], `<img>`(파일 썸네일), `<svg>`(브랜드 로고) 전부 ReactNode로 받는다. Figma 파일 탭의 작은 썸네일, VSCode 파일 아이콘 패턴.
|
|
26
27
|
- **닫기는 `closable` prop으로**. x 버튼은 `absolute`로 오른쪽에 띄워 **왼쪽에서 bg-muted 그라데이션으로 라벨 위를 덮으며 등장** — Chrome 긴 탭 패턴. **hover 시에만** fade-in (활성 탭도 hover 아니면 숨김) — 평상시 시각 노이즈 최소화.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- 첫·마지막 셀을 포함한 좌우 `--space-2_5` 패딩은 Header/Row가 관리한다. 포맷터에 중복 적용하지 않는다.
|
|
8
8
|
- 일반 텍스트는 `TableCellText`, 아이콘을 함께 보이려면 `icon={<Icon ... />}`을 사용한다. 아이콘은 장식으로 처리되므로 의미는 텍스트로 전달한다.
|
|
9
9
|
- 숫자는 `TableCellNumber`의 `tabular-nums`와 Intl 포맷을 사용한다.
|
|
10
|
-
- 상태는 `
|
|
10
|
+
- 상태는 `TableCellTag`를 사용한다. 공통 [[components/tag]]를 그대로 조합하며 기본 `size="md"`, `variant="soft"`, `shape="rounded"`다 — 표/목록 셀에서 알약이 모여 "알약 바다"가 되지 않도록 셀 안 Tag는 rounded를 기본으로 쓴다. 필요하면 variant를 `outline`으로 바꿔 fill 없는 테두리 라벨로 조립한다.
|
|
11
11
|
- Avatar는 label/sublabel로 이름과 보조 정보를 구분한다.
|
|
12
12
|
- Meter는 바를 주 정보로, 오른쪽 수치를 `--text-2xs`·`--fg-subtle`의 보조 정보로 표시한다.
|
|
13
13
|
- 행 이동은 TableRow의 href/onClick을 사용한다. 셀 안 보조 링크가 필요하면 기존 링크/버튼 부품을 조합하고 행 이벤트와 분리한다.
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
</TableCellText>
|
|
34
34
|
<TableCellNumber value={1234} format={{ maximumFractionDigits: 0 }} locale="ko-KR" unit="건" />
|
|
35
35
|
<TableCellImage src={src} alt="제품" size={24} shape="rounded" label="제품명" />
|
|
36
|
-
<
|
|
36
|
+
<TableCellTag status="success" variant="soft" size="md">활성</TableCellTag>
|
|
37
37
|
<TableCellAvatar name="김희영" label="김희영" sublabel="디자이너" status="online" />
|
|
38
38
|
<TableCellMeter value={72} tone="success" labelPosition="right" format={(value) => `${value}%`} />
|
|
39
39
|
```
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
| 일반 텍스트·아이콘과 텍스트 | TableCellText, 선택적 icon 슬롯 |
|
|
45
45
|
| 금액·개수·비율 | TableCellNumber |
|
|
46
46
|
| 썸네일과 라벨 | TableCellImage |
|
|
47
|
-
| 단일 상태·여러 메타 라벨 |
|
|
47
|
+
| 단일 상태·여러 메타 라벨 | TableCellTag (공통 Tag 조합) |
|
|
48
48
|
| 사람·팀 식별 | TableCellAvatar |
|
|
49
49
|
| 진행률·사용량 바 | TableCellMeter |
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ const columns: TableRowColumn<User>[] = [
|
|
|
54
54
|
{ key: "name", label: "이름", flex: true, minWidth: 180,
|
|
55
55
|
render: (user) => <TableCellText icon={<Icon name="user" size={16} />}>{user.name}</TableCellText> },
|
|
56
56
|
{ key: "status", label: "상태", width: 120,
|
|
57
|
-
render: (user) => <
|
|
57
|
+
render: (user) => <TableCellTag status={user.active ? "success" : "warning"}>{user.active ? "활성" : "휴면"}</TableCellTag> },
|
|
58
58
|
];
|
|
59
59
|
<TableRow columns={columns} data={user} />
|
|
60
60
|
```
|
|
@@ -63,3 +63,5 @@ const columns: TableRowColumn<User>[] = [
|
|
|
63
63
|
```json
|
|
64
64
|
{"roles":["table-cell"],"native":[],"hints":[],"requires":["ThemeController"]}
|
|
65
65
|
```
|
|
66
|
+
|
|
67
|
+
`TableCellTag`는 분류·텍스트 상태를 렌더링한다. 기존 `TableCellBadge`는 호환용으로 유지하며 일반 텍스트 상태는 내부 Tag로 전달하고 dot/circle 카운트만 Badge로 유지한다.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
### 원칙
|
|
4
4
|
데이터 그리드의 한 행. [[components/table-header]]와 같은 `columns` 스펙을 공유해 폭·정렬·순서가 자동으로 맞도록 설계된다. 이번 버전은 **navigate 모드** — 행 전체가 클릭 요소가 되어 상세 라우팅·패널 오픈을 담당한다. select 모드(Google Drive 스타일 체크박스 토글), edit 모드(Notion·Excel 스타일 셀 편집)는 각각 [[components/table-row-select]], [[components/table-row-edit]]로 분리.
|
|
5
5
|
|
|
6
|
-
행 자체는 레이아웃만 통제한다 — 셀 안쪽 콘텐츠는 [[components/table-cell]] 세트(`TableCellText`/`TableCellNumber`/`
|
|
6
|
+
행 자체는 레이아웃만 통제한다 — 셀 안쪽 콘텐츠는 [[components/table-cell]] 세트(`TableCellText`/`TableCellNumber`/`TableCellTag`/`TableCellImage`/`TableCellAvatar`/`TableCellMeter`)로 꽂아 쓴다. 콘텐츠 포맷터와 행 레이아웃을 분리해 셀 타입이 늘어도 Row API는 흔들리지 않는다.
|
|
7
7
|
|
|
8
8
|
### Do
|
|
9
9
|
- **좌우 여백 통일**: `line`/`plate`, 선택·편집 모드 모두 첫·마지막 셀의 좌우 `--space-2_5` 패딩을 유지한다. 선택 체크박스도 좌우 여백을 갖는다. 읽기 행의 선택 체크박스 영역에는 세로 구분선을 그리지 않는다. 패딩은 Header/Row가 관리하고 `TableCell*` 콘텐츠 포맷터에 중복 적용하지 않는다.
|
|
@@ -147,12 +147,12 @@ selected는 체크박스 선택이며 행 전체 primary-subtle 배경과 aria-s
|
|
|
147
147
|
|
|
148
148
|
// columns에 render 콜백을 심는 방식
|
|
149
149
|
const rowCols: TableRowColumn<LegalRow>[] = [
|
|
150
|
-
{ ...headerCols[0], render: (d) => <
|
|
150
|
+
{ ...headerCols[0], render: (d) => <TableCellTag status={d.typeStatus}>{d.typeLabel}</TableCellTag> },
|
|
151
151
|
{ ...headerCols[1], render: (d) => <TableCellText tone="muted">{d.ourRef}</TableCellText> },
|
|
152
152
|
{ ...headerCols[2], render: (d) => <TableCellText tone="strong">{d.title}</TableCellText> },
|
|
153
153
|
{ ...headerCols[3], render: (d) => (
|
|
154
154
|
<span style={{ display: "inline-flex", gap: "var(--space-1)" }}>
|
|
155
|
-
{d.tags.map((t) => <
|
|
155
|
+
{d.tags.map((t) => <TableCellTag key={t} status="info">{t}</TableCellTag>)}
|
|
156
156
|
</span>
|
|
157
157
|
),
|
|
158
158
|
},
|
|
@@ -173,3 +173,12 @@ const rowCols: TableRowColumn<LegalRow>[] = [
|
|
|
173
173
|
|
|
174
174
|
### 선택 열 고정
|
|
175
175
|
`selectionPinned`는 기본 true로 선택 체크박스 열을 가로 스크롤 중 고정한다. false면 선택 열도 함께 스크롤된다. `selectable`은 표시 여부, `selectionPinned`는 고정 여부다. DataTable은 헤더/행에 같은 값을 전달한다. 직접 조립할 때도 Header와 Row/RowEdit에 동일한 값을 사용한다. 고정 해제 시 pinned-left 열의 기준에서 선택 열 폭을 제외한다. 헤더 선택 셀은 불투명 헤더 표면과 상위 레이어로 글자나 드래그에 가려지지 않게 한다.
|
|
176
|
+
|
|
177
|
+
<!-- generated-use-cases:start -->
|
|
178
|
+
### 사용 사례 연결
|
|
179
|
+
|
|
180
|
+
- In Uses
|
|
181
|
+
- 문서: /en/components/data/table-row#in-uses
|
|
182
|
+
- 참조 원본: [Table Row 사례](../use-cases/data-table-row.md)
|
|
183
|
+
- AI 조회: `get_guide(topic="use-cases/data-table-row", sections=["사례 목록", "파일 목록"])` 후 필요한 `Section:` / `Source:` 헤딩을 선택한다.
|
|
184
|
+
<!-- generated-use-cases:end -->
|
|
@@ -92,3 +92,12 @@ Status는 children으로 자체 요약 문구도 받을 수 있다. Root/Group/S
|
|
|
92
92
|
```json
|
|
93
93
|
{"roles":["table-toolbar"],"native":[],"hints":[],"requires":["ThemeController"]}
|
|
94
94
|
```
|
|
95
|
+
|
|
96
|
+
<!-- generated-use-cases:start -->
|
|
97
|
+
### 사용 사례 연결
|
|
98
|
+
|
|
99
|
+
- Tabs with search and actions on the right · Tabs with multiple filters · Search and filters · Search · Selection + bulk action · Filters without search · Disabled · Narrow container
|
|
100
|
+
- 문서: /en/components/data/table-toolbar#compose
|
|
101
|
+
- 참조 원본: [Table Toolbar 사례](../use-cases/data-table-toolbar.md)
|
|
102
|
+
- AI 조회: `get_guide(topic="use-cases/data-table-toolbar", sections=["사례 목록", "파일 목록"])` 후 필요한 `Section:` / `Source:` 헤딩을 선택한다.
|
|
103
|
+
<!-- generated-use-cases:end -->
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
- **`text`** — 컨테이너·라인·인디케이터 전부 없음. 색과 weight만으로 위계 표현. **공간을 거의 안 먹어야 할 때** — 페이지 헤더 sub-nav, 카드 안 미니 스위처, 목록 상단 상태 필터.
|
|
9
9
|
|
|
10
10
|
### Do
|
|
11
|
+
- sm/md/lg 라벨은 각 label 크기의 줄 높이를 적용해 말줄임 영역에서도 g·p·y 하단 공간을 확보한다. 컨트롤 높이와 탭 전환 동작은 유지한다.
|
|
11
12
|
- Root는 기본적으로 내용 너비(`inline-flex`/`fit-content`)를 사용하며 부모보다 넓어지지 않는다. 전체 폭의 패널·페이지 탭 영역이 필요할 때만 `<Tabs stretch>`를 명시한다. 툴바·작은 뷰 스위처를 위해 width:100%를 강제하지 않는다.
|
|
12
|
-
-
|
|
13
|
+
- `text` 타입의 미선택 글자는 `--tabs-text-inactive`(fg-muted 40%와 fg-subtle 혼합)로 더 연하게 표시한다. 선택·hover 색상과 다른 타입의 기본 fg-muted는 유지한다.
|
|
13
14
|
- **variant는 목적으로 고른다** — 콘텐츠 전환은 `underline`, 옵션 스위처는 `segmented`, 최소 무게 필터·sub-nav는 `text`. 예쁘다는 이유로 뒤바꾸지 말 것.
|
|
14
15
|
- **선택된 값은 URL query·라우터에 반영** (`?tab=activity`). 새로고침·공유·뒤로가기가 자연스러워짐.
|
|
15
16
|
- **아이콘은 라벨을 도울 때만**. 3자 이하 라벨 옆에 아이콘 없이도 인지될 때는 아이콘 없이. segmented는 좁으니 아이콘+긴 라벨 조합은 피한다.
|
|
@@ -45,7 +46,7 @@ variant 애매하면 `underline`, size 애매하면 `md`.
|
|
|
45
46
|
<Tabs
|
|
46
47
|
stretch={boolean} // default: false. true면 부모 전체 폭
|
|
47
48
|
variant="underline | segmented | text" // default: underline
|
|
48
|
-
size="sm | md | lg" // default: md
|
|
49
|
+
size="xs | sm | md | lg" // default: md
|
|
49
50
|
orientation="horizontal | vertical" // default: horizontal. vertical은 좌측 탭 + 우측 패널
|
|
50
51
|
value={string} // controlled
|
|
51
52
|
defaultValue={string} // uncontrolled 초기값
|
|
@@ -75,6 +76,7 @@ variant 애매하면 `underline`, size 애매하면 `md`.
|
|
|
75
76
|
### Size 가이드
|
|
76
77
|
| size | height (control-h) | 언제 |
|
|
77
78
|
|---|---|---|
|
|
79
|
+
| `xs` | 24px (segmented 내부20px + 상하2px) | 작은 패널 표시 형식 전환. 라벨 좌우8px |
|
|
78
80
|
| `sm` | control-h-sm | 밀도 높은 대시보드, 사이드 패널 안, 카드 헤더 |
|
|
79
81
|
| `md` | control-h-md | **기본.** 페이지 섹션 탭, 대부분의 스위처 |
|
|
80
82
|
| `lg` | control-h-lg | 랜딩·마케팅 상단, 태블릿·터치 |
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Tag
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
분류·속성·텍스트 상태를 표시하는 정적인 라벨. Badge는 수량·알림·상태 dot, Tag는 `Design`, `API`, `Completed` 같은 이름을 담당한다. 선택·제거·클릭이 필요한 필터는 [[components/chip]]을 쓴다.
|
|
5
|
+
|
|
6
|
+
### Do
|
|
7
|
+
- `soft` 기본, 배경 없는 분류는 `outline`, 강한 상태 표시는 `solid`. outline 테두리는 neutral(회색)에서 기본 border 토큰을 사용하고, 상태색은 글자색(currentColor)의 30% 불투명도를 사용한다. 텍스트 자체는 흐리게 만들지 않는다.
|
|
8
|
+
- `status="neutral | success | warning | destructive | info"`는 텍스트 상태색을 지정한다. 기본 neutral. 작은 글자의 대비를 위해 상태색을 foreground와 혼합한 로컬 잉크를 사용하고, solid는 모드에 맞는 반전 텍스트를 적용한다.
|
|
9
|
+
- 기본 `rounded`는 Chip과 같은 `radius-pill-sm` 반경과 `corner-shape` 곡률을 사용해 모든 크기에서 Shape 축에 반응한다. `pill`은 축과 무관한 완전한 round 캡슐이다.
|
|
10
|
+
- size sm/md/lg의 글자는 `font-weight-medium`(명목 500, 언어별 전역 보정 적용). 수량은 같은 크기의 Badge를 사용한다.
|
|
11
|
+
|
|
12
|
+
### Don't
|
|
13
|
+
- 알림 숫자·언리드 수·dot에 사용하지 않는다 — [[components/badge]].
|
|
14
|
+
- onClick으로 버튼처럼 쓰지 않는다 — [[components/chip]]이나 [[components/button]].
|
|
15
|
+
- 의미 없이 성공/경고색을 분류 장식으로 쓰지 않는다.
|
|
16
|
+
|
|
17
|
+
### Fallback
|
|
18
|
+
size가 애매하면 md, 표현은 soft·neutral·rounded부터 시작한다.
|
|
19
|
+
|
|
20
|
+
### 관련
|
|
21
|
+
- [[components/badge]] — 수량·알림·상태 dot
|
|
22
|
+
- [[components/chip]] — 선택·제거
|
|
23
|
+
- [[components/table-cell]] — TableCellTag
|
|
24
|
+
|
|
25
|
+
### Props 시그니처
|
|
26
|
+
```tsx
|
|
27
|
+
<Tag size="sm | md | lg" variant="soft | outline | solid"
|
|
28
|
+
status="neutral | success | warning | destructive | info" shape="rounded | pill">
|
|
29
|
+
Completed
|
|
30
|
+
</Tag>
|
|
31
|
+
```
|
|
32
|
+
기본값: md / soft / neutral / rounded. 네이티브 span 속성과 ref를 전달한다. 상태가 바뀔 때 라이브 알림이 필요하면 소비자가 적절한 role/live 영역을 조립한다.
|
|
33
|
+
|
|
34
|
+
### Size
|
|
35
|
+
- sm: text-2xs + 세로 space-1 / 가로 space-1_5, 기본 높이22px.
|
|
36
|
+
- md(기본): text-xs + 세로 space-1과 space-1_5의 중간값 / 가로 space-2, 기본 높이25px.
|
|
37
|
+
- lg: text-sm + 세로 space-1_5 / 가로 space-2, 기본 높이28.5px.
|
|
38
|
+
- sm은 기존 md 크기를 유지한다. 밀도가 높은 속성·목록에서는 sm을 명시한다. Badge의 사이즈는 별도 계약이다.
|
|
39
|
+
|
|
40
|
+
### 조합 예시
|
|
41
|
+
```tsx
|
|
42
|
+
<Tag>Design</Tag>
|
|
43
|
+
<Tag variant="outline">API</Tag>
|
|
44
|
+
<Tag status="success">Completed</Tag>
|
|
45
|
+
<Tag status="warning" variant="solid">Needs review</Tag>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### data-slot
|
|
49
|
+
- `tag-root` — 정적인 span. 자체 모양은 `data-tag-shape`로 노출하며 전역 Shape 축을 덮어쓰지 않는다.
|
|
50
|
+
|
|
51
|
+
<!-- component-contract -->
|
|
52
|
+
```json
|
|
53
|
+
{"roles":["tag","status"],"native":[],"hints":["categoryTag","textStatus"],"requires":[]}
|
|
54
|
+
```
|
|
@@ -79,6 +79,7 @@ format 애매하면 `24h` (한국 자리는 24h가 더 흔함). step 애매하
|
|
|
79
79
|
- TimeValue는 `{hours, minutes}` 로컬 벽시계 값이다. 날짜·UTC offset·시간대를 포함하지 않는다. 서버의 날짜/시간대 변환은 호스트 책임이다.
|
|
80
80
|
- AM/PM 입력의 시간은 1부터 12까지만 허용한다. 13pm·0am을 허용하지 않는다.
|
|
81
81
|
- step은 양의 정수로 정규화하며 유효하지 않으면 기본 간격을 사용한다. minTime/maxTime은 같은 날의 포함 경계다. 자정을 넘는 구간은 지원하지 않는다.
|
|
82
|
+
- 분 입력을 step에 맞춰 반올림한 결과가 60이면 다음 시간으로 이월하고, 24시는 00시로 순환한 뒤 minTime/maxTime 경계를 적용한다.
|
|
82
83
|
|
|
83
84
|
<!-- component-contract -->
|
|
84
85
|
```json
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Timeline View
|
|
2
|
+
|
|
3
|
+
### 원칙
|
|
4
|
+
일정의 시작·종료·겹침을 명시적으로 선택한 시간 또는 날짜 축에서 비교하는 컴포넌트. 월 단위 날짜 탐색은 [[components/calendar]], 활동 기록은 목록으로 구분한다.
|
|
5
|
+
|
|
6
|
+
### Do
|
|
7
|
+
- start/end에 표시 구간의 Date, events에 id/title/start/end/tone을 전달한다. 시간 문자열을 계산에 사용하지 않는다.
|
|
8
|
+
- 겹치는 일정은 자동으로 다른 행에 배치하고 맞닿은 일정은 같은 행을 재사용한다.
|
|
9
|
+
- 범위를 가로지르는 일정은 시각적으로 잘라 표시하되 접근 가능한 이름과 title에는 실제 시작·종료를 유지한다.
|
|
10
|
+
- currentTime은 호스트가 갱신한다. 생략하거나 범위를 벗어나면 선을 숨긴다.
|
|
11
|
+
- onEventClick이 있으면 Button으로 클릭·Enter·Space를 지원한다. onEventsChange를 제공하면 드래그 편집도 지원한다. 둘 다 없으면 읽기 전용이다.
|
|
12
|
+
- 좁은 화면에서는 컴포넌트 안에서 가로 스크롤한다. 시간축을 압축해 글자를 겹치게 만들지 않는다.
|
|
13
|
+
- EventChip의 7개 tone과 Shape/Density 토큰을 재사용한다. 뷰 전환·필터·추가 액션은 호스트 툴바가 담당한다.
|
|
14
|
+
|
|
15
|
+
### Don't
|
|
16
|
+
- 막대 너비를 제목 길이에 맞춰 바꾸지 않는다. 너비는 실제 기간이다.
|
|
17
|
+
- 계산 불가능한 표시용 문자열을 시작·종료 값으로 넣지 않는다.
|
|
18
|
+
- 기능 없는 추가·필터 버튼이나 총 일정 수를 장식으로 넣지 않는다.
|
|
19
|
+
|
|
20
|
+
### Fallback
|
|
21
|
+
빈 구간은 축과 EmptyState로 표시한다. 잘못된 날짜와 종료≤시작 일정은 제외한다. 잘못된 start/end 표시 범위는 RangeError를 발생시킨다. 시간·날짜 단위 이동을 지원하며 양끝 핸들로 시작·종료 길이 편집을 지원한다.
|
|
22
|
+
|
|
23
|
+
### Props
|
|
24
|
+
```tsx
|
|
25
|
+
import { TimelineView, type TimelineViewEvent } from "@/components/TimelineView";
|
|
26
|
+
|
|
27
|
+
<TimelineView
|
|
28
|
+
size="sm | md | lg" // default md40px, sm36px, lg44px
|
|
29
|
+
unit="time | date" // default time; zoom never changes unit
|
|
30
|
+
zoom={zoom} // optional controlled scale fit–4
|
|
31
|
+
defaultZoom={1} // optional; omitted fits full range
|
|
32
|
+
onZoomChange={setZoom}
|
|
33
|
+
start={new Date(2026, 10, 5, 8)}
|
|
34
|
+
end={new Date(2026, 10, 5, 20)}
|
|
35
|
+
events={events}
|
|
36
|
+
onEventsChange={setEvents} // controlled editing
|
|
37
|
+
resizable={true} // edge resize, requires onEventsChange
|
|
38
|
+
draggable={true} // requires onEventsChange
|
|
39
|
+
snapMinutes={15} // date uses calendar days
|
|
40
|
+
currentTime={now}
|
|
41
|
+
selectedEventId={selectedId}
|
|
42
|
+
onEventClick={(event) => setSelectedId(event.id)}
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
type TimelineViewEvent = {
|
|
46
|
+
id: string;
|
|
47
|
+
title: string;
|
|
48
|
+
start: Date;
|
|
49
|
+
end: Date;
|
|
50
|
+
row?: number; // preferred lane
|
|
51
|
+
leadingSlot?: ReactNode; // non-interactive Icon or Avatar
|
|
52
|
+
trailingSlot?: ReactNode;
|
|
53
|
+
tone?: "default" | "neutral" | "accent" | "success" | "warning" | "danger" | "info";
|
|
54
|
+
};
|
|
55
|
+
// currentTime?: Date | null; selectedEventId?: string | null;
|
|
56
|
+
// onEventClick?: (event: TimelineViewEvent) => void; emptyContent?: ReactNode;
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 관련
|
|
60
|
+
- [[components/event-chip]] — 일정의 제목·시간·톤.
|
|
61
|
+
- [[components/calendar]] — 월간 캘린더와 같은 원천 데이터를 투영해 전환.
|
|
62
|
+
- [[components/tabs]] — 호스트의 뷰 전환.
|
|
63
|
+
|
|
64
|
+
<!-- component-contract -->
|
|
65
|
+
```json
|
|
66
|
+
{"roles":["timeline-view"],"native":[],"hints":[],"requires":["ThemeController"]}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 크기와 슬롯
|
|
70
|
+
기본 `size="md"`는40px 막대와14.5px 글자다. `sm`은 이전 md의36px 막대·13px 글자이며 `lg`는44px 막대·14.5px 글자다. 기본 Density 기준이다. 일정의 leadingSlot/trailingSlot을 EventChip으로 전달하며 시간(선택) → 앞 슬롯 → 제목 → 뒤 슬롯 순서로 표시한다. 슬롯에 중첩 버튼·링크·입력을 넣지 않는다. 현재 시각 라벨도 squircle이다.
|
|
71
|
+
|
|
72
|
+
### 짧은 일정과 시간 표시
|
|
73
|
+
시간 태그(켜진 경우)·앞뒤 슬롯·제목 앞 5개 grapheme(짧은 제목은 전체)·말줄임표·간격까지 담지 못하는 경우에만 콘텐츠를 여유가 더 큰 좌우 바깥에 표시한다. 그 이상은 막대 안에서 제목을 말줄임한다. 최소 콘텐츠 폭을 실제 렌더링에서 측정하며 바깥 라벨은 canvas 양끝을 넘지 않는 폭에서 말줄임하며 앞/뒤 시각적 폭도 행 배치에서 예약해 뒤 일정과 겹치지 않는다. 아주 긴 바깥 라벨은 최대 폭에서 말줄임하고 전체 내용은 title·접근 가능한 이름으로 유지한다. `showTime` 기본값은 false이며 켜면 시작 시간이 맨 왼쪽에 표시된다. 시간축 눈금과 현재 시각 선은 이 옵션과 별개다. 화면에서 시간을 숨겨도 접근 가능한 이름의 시작·종료는 유지한다.
|
|
74
|
+
|
|
75
|
+
### 표면
|
|
76
|
+
`appearance="outline"`이 기본이며 흰 표면·강한 테두리·그림자를 사용한다. `filled`는 브랜드 배경·흰 글자다. 일정별 `appearance`가 TimelineView 전역 값보다 우선한다. 짧은 일정의 바깥 라벨은 두 표면 모두 페이지 전경색으로 표시하고 배경·테두리·그림자를 붙이지 않는다. 그림자는 clipping 바깥의 실제 기간 wrapper에 한 번만 적용한다.
|
|
77
|
+
|
|
78
|
+
시간 표시는 기존 Tag를 재사용하며 맨 왼쪽, 아이콘·아바타보다 앞에 둔다. outline은 연한 회색 태그 배경, filled는 흰 태그 배경과 브랜드 잉크를 사용한다. sm 타임라인에는 sm Tag, md/lg에는 md Tag를 쓴다. 타임라인의 showTime 기본값은 계속 false다.
|
|
79
|
+
|
|
80
|
+
막대는 실제 기간의 100% 너비를 사용하며 바깥 라벨로 바뀌어도 줄이지 않는다. 시간축 canvas 너비도 시간 간격과 viewport로만 정한다. 겹친 아바타는 leadingSlot 또는 trailingSlot에 기존 `<AvatarGroup size="xs"><Avatar ... />...</AvatarGroup>`를 전달하며 스택의 자연 너비를 보존한다.
|
|
81
|
+
|
|
82
|
+
세로 간격은 sm/md 행 사이8px, lg12px이며 트랙 위아래는8px이다. 시간 눈금 아래와 세로 가이드 시작 사이는8px로 유지하고 눈금 위쪽 여백도4px로 둔다. 눈금 line-height에 맞춰 ruler 높이를 계산하며 현재 시간 라벨의 텍스트 정렬을 보존한다. 기본 Density 기준이다.
|
|
83
|
+
|
|
84
|
+
양끝 시간 눈금도 가운데 정렬하며 viewport 좌우32px 여백으로 잘림을 방지한다. lg 막대는44px이며 타임라인 제목은 sm20px, md/lg22px line-height를 사용해 하강 글자의 잘림을 피한다.
|
|
85
|
+
|
|
86
|
+
시간축 세로 가이드는 border-strong을50%로 옅게 혼합한1px 점선으로 표시한다.
|
|
87
|
+
|
|
88
|
+
TimelineViewSize는 EventChipSize를 그대로 사용하며 sm/md/lg를 EventChip에 변환 없이 전달한다. 칩의 크기·글자·슬롯 스타일은 EventChip 원본이 담당한다.
|
|
89
|
+
|
|
90
|
+
바깥 라벨도 같은 일정 버튼으로 실행하지만 hover overlay와 키보드 focus ring은 실제 기간 막대의 폭에만 표시한다. 바깥 글자는 평소 fg-muted, hover/focus에서 fg로 진해지며 밑줄 없이 라벨 영역 전체에 넓은 칩 배경을 그리지 않는다.
|
|
91
|
+
|
|
92
|
+
### Zoom / Unit
|
|
93
|
+
`unit="time"`은 시·분, `unit="date"`는 월·일 눈금이다. 단위는 사용자가 명시적으로 선택하며 확대·축소로 전환하지 않는다. 눈금이 겹치지 않도록 같은 단위 안에서 표시 간격만 조정한다. Date 값과 기간, 일정 선택은 배율에 따라 바뀌지 않는다. 날짜 경계는 로컬 달력의 자정으로 계산하고 DST 경계에서도 날짜 눈금을 유지한다. 막대 위치·폭은 실제 경과 시간 비율을 따른다.
|
|
94
|
+
|
|
95
|
+
트랙패드 pinch는 `ctrlKey` wheel의 비수동 리스너로 처리하며 일반 두 손가락 스크롤은 가로·세로 스크롤에 남긴다. Safari gesturestart/change/end도 처리하며 같은 gesture 중 wheel은 중복 적용하지 않는다. 배율은 전체 구간 맞춤부터400%까지 제한하고 pointer 아래의 시점을 기준으로 폭을 변경한다. 포커스된 타임라인에서 +/− 키는 중앙 기준 확대·축소, 0 키는 전체 구간 맞춤이다.
|
|
96
|
+
|
|
97
|
+
내부 줌 툴바는 제공하지 않는다. `zoom`/`onZoomChange`로 제어하거나 `defaultZoom`으로 초기값을 정한다. 미지정 시 전체 구간을 화면에 맞춘다. 최소 배율은 viewport 내용 너비와 실제 CSS 단위 폭으로 계산하며 canvas가 화면보다 짧아질 만큼 축소할 수 없다. 긴 구간은25%보다 작아져도 전체가 들어오도록 최소 배율을 계산한다. 화면·Density·단위 변경 시 한계를 갱신하며 최대 배율은4다. 배율은 가로 기하만 바꾸고 카드 높이·글자·time/date 단위는 바꾸지 않는다. `showTime`을 켜면 선택 단위의 시작 시간 또는 날짜 Tag를 표시한다.
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### 이동과 충돌
|
|
101
|
+
`onEventsChange`에 갱신된 배열을 반영하면 드래그로 일정의 시간·날짜와 행을 옮길 수 있다. `draggable` 기본 true지만 콜백이 없으면 이동을 활성화하지 않는다. 시간 모드는 원래 시작 시간에서 `snapMinutes`(기본15분) 간격, 날짜 모드는 로컬 달력 하루 단위로 움직인다. 기간은 유지하며 표시 범위 안으로 제한한다. 날짜 모드에서는 DST를 넘어도 로컬 시각을 보존한다. 행만 이동하면 원래 기간을 그대로 유지한다.
|
|
102
|
+
|
|
103
|
+
짧은 일정의 바깥 라벨도 같은 버튼으로 이동한다. 마우스·펜 드래그 임계값은5px이고 드래그 후 선택 클릭을 억제한다. 터치는 칩 위에서도 세로 스크롤·가로 탐색을 유지한다. 터치 드래그 편집은 제공하지 않으며 마우스·펜 또는 키보드로 이동한다. 가장자리에서는 가로 자동 스크롤한다. 원래 행을 기준으로 미리 보이며 드래그한 일정의 목적 행을 먼저 확보한다. 겹침은 바깥 라벨 폭까지 고려하여 가까운 행으로 정리하고 놓을 때 빈 행을 압축한다. 행의 세로 이동만 짧게 전환하며 reduced-motion을 따른다.
|
|
104
|
+
|
|
105
|
+
포인터를 놓으면 한 번만 `onEventsChange`를 호출한다. Escape·pointercancel·capture 손실·window blur·외부 데이터/범위/배율 변경은 취소한다. Alt+좌우 방향키는 시간/날짜, Alt+위아래는 행을 옮긴다. 이동 결과는 스크린리더 상태 영역으로 알린다. 호스트가 반환된 `row`를 유지하면 정리된 행이 보존된다. 서버 저장은 호스트 책임이다.
|
|
106
|
+
|
|
107
|
+
타임라인의 hit Button은 누를 때 scale 변형을 적용하지 않는다. 기간 막대와 같은 크기의 overlay를 유지해 좌우 여백이 생기지 않게 한다. 바깥 라벨은 기존대로 기간 막대만 칠한다.
|
|
108
|
+
|
|
109
|
+
날짜 모드의 현재 날짜 라벨은 같은 로컬 연·월·일의 눈금 라벨을 대체한다. 자정 눈금과 현재 시각의 거리가 확대 시 벌어져도 같은 날짜를 두 번 표시하지 않는다.
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### 길이 조절
|
|
113
|
+
`resizable` 기본 true이며 `onEventsChange`가 있어야 활성화된다. `draggable`과 독립적으로 켜고 끈다. 실제 기간 막대 양끝에 공유 Button 핸들을 두며 범위 밖으로 잘린 실제 경계는 핸들을 숨긴다. 한쪽 경계를 조절할 때 반대 경계와 선호 행은 고정하며, 겹친 일정만 기존 배치 규칙으로 정리한다. 같은 콜백에 변경된 start/end/row를 한 번 반영한다.
|
|
114
|
+
|
|
115
|
+
시간은 snapMinutes(기본15분), 날짜는 로컬 달력 하루 단위로 해당 경계를 조절한다. 경계는 viewport 안으로 제한하며 시작과 종료가 역전되지 않는다. 기존 끝점의 snap offset을 유지해 짧은 기간을 늘린 뒤 줄여도 원래 길이로 돌아올 수 있다. 날짜 이동은 로컬 시각과 DST를 따른다.
|
|
116
|
+
|
|
117
|
+
핸들에서 좌우 방향키로 같은 간격을 조절하고 Escape·pointercancel·capture 손실·외부 데이터 변경은 드래그 취소다. 핸들은 touch-action:none으로 터치 조절을 담당하고 본체 터치 스크롤은 유지한다. 핸들은 막대 너비의 절반을 넘지 않으며 아주 짧은 막대는 먼저 확대하거나 키보드로 조절한다. 밖으로 나온 제목은 본체 이동 대상이며 길이 조절 핸들은 실제 막대 끝에만 둔다.
|
|
118
|
+
|
|
119
|
+
outline 선택은 실제 테두리를 primary로 바꾸고 기간 wrapper 경계 바깥에 hairline outline을 더한다. 안쪽 inset 선택 링은 사용하지 않으며 키보드 focus shadow를 보존한다. filled 선택은 기존 흰색 inset 링을 유지한다.
|
|
120
|
+
|
|
121
|
+
리사이즈 손잡이 선은 hover/focus/drag 및 터치에서 opacity0.12로 매우 옅게 표시한다. 조작 영역과 키보드 focus 표시는 유지한다.
|
|
122
|
+
|
|
123
|
+
빠르게 놓아도 마지막 pointerup 좌표를 다시 계산하여 길이·위치를 확정한다. 중간 pointermove가 생략되어도 반영하며 리사이즈 핸들의 이동 임계값은1px, 본체 이동은5px다.
|
|
124
|
+
|
|
125
|
+
드래그 임계값을 넘으면 재배치되는 칩 대신 고정된 viewport가 포인터를 캡처한다. 다른 요소의 capture 손실은 현재 드래그를 취소하지 않으며 viewport 자체의 capture 손실·Escape·pointercancel·blur는 취소한다. 단순 클릭은 캡처하지 않는다.
|
|
126
|
+
|
|
127
|
+
이전 드래그의 지연된 capture 손실 알림이 새 드래그를 취소하지 않도록, 현재 세션이 활성화됐고 viewport가 실제 캡처를 잃은 경우에만 취소한다. 새로 잡기 전이나 새 캡처를 이미 유지하는 동안의 이전 알림은 무시한다.
|
|
128
|
+
|
|
129
|
+
드래그 후 클릭 억제는 시간 제한이 아닌 현재 포인터 시퀀스 한 번에 적용한다. 키보드(detail0) 클릭은 통과하고 다음 primary pointerdown에서 초기화한다. 동일한 id/start/end/row의 새 배열은 드래그를 취소하지 않으며 확정 시 최신 제목·슬롯 등 메타데이터를 보존한다. 실제 경계·행 데이터 변경은 취소한다.
|