sellmate-design-system-react 9.0.0-beta.64 → 9.0.0-beta.66
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/AGENTS.md +28 -3
- package/dist/components/SBarChart/README.md +2 -0
- package/dist/components/SBarChart/SBarChart.d.ts +4 -0
- package/dist/components/SBarChart/barChart.config.d.ts +12 -5
- package/dist/components/SBarcodeInput/README.md +1 -0
- package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +8 -1
- package/dist/components/SChipInput/README.md +1 -0
- package/dist/components/SChipInput/SChipInput.d.ts +8 -1
- package/dist/components/SContextAlert/README.md +51 -0
- package/dist/components/SContextAlert/SContextAlert.d.ts +38 -0
- package/dist/components/SContextAlert/contextAlert.config.d.ts +29 -0
- package/dist/components/SContextAlert/index.d.ts +2 -0
- package/dist/components/SDatePicker/README.md +1 -0
- package/dist/components/SDatePicker/SDatePicker.d.ts +9 -2
- package/dist/components/SDateRangePicker/README.md +1 -0
- package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +9 -2
- package/dist/components/SDonutChart/README.md +14 -0
- package/dist/components/SDonutChart/SDonutChart.d.ts +12 -0
- package/dist/components/SEditor/README.md +1 -0
- package/dist/components/SEditor/SEditor.d.ts +8 -1
- package/dist/components/SField/README.md +7 -0
- package/dist/components/SField/SField.d.ts +13 -0
- package/dist/components/SField/index.d.ts +1 -1
- package/dist/components/SFilePicker/README.md +1 -0
- package/dist/components/SFilePicker/SFilePicker.d.ts +9 -2
- package/dist/components/SIcon/README.md +2 -0
- package/dist/components/SInput/README.md +1 -0
- package/dist/components/SInput/SInput.d.ts +3 -1
- package/dist/components/SLineChart/README.md +10 -0
- package/dist/components/SLineChart/SLineChart.d.ts +8 -0
- package/dist/components/SLineChart/lineChart.config.d.ts +49 -33
- package/dist/components/SNumberInput/README.md +1 -0
- package/dist/components/SNumberInput/SNumberInput.d.ts +8 -1
- package/dist/components/SPieChart/README.md +2 -0
- package/dist/components/SPieChart/SPieChart.d.ts +4 -0
- package/dist/components/SSelect/README.md +1 -0
- package/dist/components/SSelect/SSelect.d.ts +8 -1
- package/dist/components/STextarea/README.md +1 -0
- package/dist/components/STextarea/STextarea.d.ts +8 -1
- package/dist/components/STimePicker/README.md +1 -0
- package/dist/components/STimePicker/STimePicker.d.ts +9 -2
- package/dist/components/STimeRangePicker/README.md +1 -0
- package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +9 -2
- package/dist/index.cjs +451 -175
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +447 -176
- package/dist/index.js.map +1 -1
- package/dist/lib/chart/frame.d.ts +5 -1
- package/dist/lib/chart/legend.d.ts +8 -2
- package/dist/lib/chart/palette.d.ts +15 -13
- package/dist/lib/chart/radial.d.ts +20 -10
- package/dist/llms-full.txt +126 -4
- package/dist/llms.txt +32 -6
- package/dist/styles.css +162 -15
- package/dist/theme.css +104 -6
- package/eslint/scale.gen.mjs +1 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
| **레이아웃** | `SLayout` `SGnb` `SGnbSystem` `SSystemActionButton`(GNB system 패널에 한 줄씩 쌓는 액션 행 — 버튼 고르기는 §3-5) `SAccountListBox`(계정 행을 눌러 뜨는 계정 패널) `SLauncherListBox`(런처 버튼을 눌러 뜨는 서비스 목록) `SPage` `SPageHeader`(페이지 제목 영역 — `SLayout` 안에서 `SPage` 앞에 둔다) `SSectionHeaderCard` `SCard` `SLoginCard`(통합 계정 로그인 화면의 카드) `SDivider` `SSplitter` `SScrollArea` `SExpansionItem` |
|
|
47
47
|
| **내비게이션** | `STabs` `SPagination` `SStepper` |
|
|
48
48
|
| **차트** | `SBarChart`(막대 그래프 — 항목끼리 크기를 견준다. `stacked` 로 항목 안의 구성까지) `SLineChart`(꺾은선 그래프 — 순서가 있는 항목의 추이를 본다. `area` 로 크기까지, `stacked` 로 구성까지) `SPieChart`(원그래프 — 한 시점의 전체를 몇 개의 몫으로 나눈다) `SDonutChart`(도넛 그래프 — 가운데가 빈 원그래프. 구멍에 글자를 두지 않는다) |
|
|
49
|
-
| **표시·상태** | `STag` `SBadge` `SIcon` `SLogo`(브랜드 로고를 아이콘처럼 — size 는 높이다) `SImage` `SCallout` `SGuide` |
|
|
49
|
+
| **표시·상태** | `STag` `SBadge` `SIcon` `SLogo`(브랜드 로고를 아이콘처럼 — size 는 높이다) `SImage` `SCallout` `SContextAlert`(한 줄짜리 맥락 알림 — 오른쪽에 후속 동작 버튼) `SGuide` |
|
|
50
50
|
| **진행·로딩** | `SLinearProgress` `SCircleProgress` `SLoadingContainer` `SLoadingModal` |
|
|
51
51
|
| **오버레이** | `STooltip` `SPopover` `SPopup` `SDrawer` `SPortal` |
|
|
52
52
|
| **모달** | `SModal.confirm()` `SModal.create()` + `SActionModal` `SConfirmModal` `SModalOutlet`(앱 루트 1회) |
|
|
@@ -167,7 +167,7 @@ Tailwind 유틸리티는 **토큰 스케일에 있는 값만** 사용한다.
|
|
|
167
167
|
| 층 | 무엇인가 | 컴포넌트 |
|
|
168
168
|
| --- | --- | --- |
|
|
169
169
|
| **셸** | 앱 전체 뼈대. 페이지가 바뀌어도 남는다 | `SLayout` `SGnb` `SGnbSystem`(GNB 맨 아래 판 · 전폭 상단바 오른쪽 끝) `SPage` `SPageHeader`(`SLayout` 안에서 `SPage` 앞에 둔다) |
|
|
170
|
-
| **블록** | `SPage` 의 직계 자식. 페이지를 세로로 쌓는 단위 | `SSectionHeaderCard` `SCard` `SChatMessage` `SChatSystemMessage` `SChatInput` `SLoginCard`(유일하게 `SPage` 밖에 선다 — 로그인 화면 자체가 자기 자리다, §4-6) `SForm` `SSplitter` `SScrollArea` `SCalendarBoard` `STable` `STableBar` `SChipFilter` `SKeyValueTable` `SList` `SExpansionList` `SDraggableList` `STree` `SCallout` `SBarChart` `SLineChart` `SPieChart` `SDonutChart` `STabs` `SStepper` `SPagination` `SDivider` |
|
|
170
|
+
| **블록** | `SPage` 의 직계 자식. 페이지를 세로로 쌓는 단위 | `SSectionHeaderCard` `SCard` `SChatMessage` `SChatSystemMessage` `SChatInput` `SLoginCard`(유일하게 `SPage` 밖에 선다 — 로그인 화면 자체가 자기 자리다, §4-6) `SForm` `SSplitter` `SScrollArea` `SCalendarBoard` `STable` `STableBar` `SChipFilter` `SKeyValueTable` `SList` `SExpansionList` `SDraggableList` `STree` `SCallout` `SContextAlert` `SBarChart` `SLineChart` `SPieChart` `SDonutChart` `STabs` `SStepper` `SPagination` `SDivider` |
|
|
171
171
|
| **요소** | 블록 **안에** 놓이는 컨트롤. 혼자 페이지에 서지 않는다 | `SButton` `SGhostButton` `SMeatballButton` `SDropdownButton` `SSystemActionButton` `SField` `SInput` `SSearchInput` `SNumberInput` `STextarea` `SEditor` `SSelect` `SCheckbox` `SRadio` `SRadioGroup` `SRadioButton` `SRadioCard` `SRadioCardGroup` `SSwitch` `SToggle` `SChipInput` `SBarcodeInput` `SFilePicker` `SDatePicker` `SDatePickerYearListbox` `SDatePickerMonthListbox` `SDateRangePicker` `STimePicker` `STimeRangePicker` `SCalendar` `SListItem` `SExpansionItem` `SDraggableItem` `SChatAttachedFile` `SChatFile` `SImage` `SLinearProgress` `SCircleProgress` |
|
|
172
172
|
| **인라인** | 텍스트 흐름·셀·라벨 안에 섞인다. 혼자 블록이 되지 않는다 | `STag` `SBadge` `SIcon` `SLogo` `STextLink` `SChip` |
|
|
173
173
|
| **레이어** | 문서 흐름 **밖**에 떠서 그려진다. 어느 층에서 띄우든 레이아웃에 영향이 없다 | `SModal` `SActionModal` `SConfirmModal` `SPopup` `SDrawer` `SPopover` `STooltip` `SPortal` `SAccountListBox`(계정 행에 붙어 뜬다 — 직접 띄우지 않는다) `SLauncherListBox`(런처 버튼에 붙어 뜬다 — 직접 띄우지 않는다) `SToast` `SLoadingModal` `SLoadingContainer` `SGuide` |
|
|
@@ -642,6 +642,7 @@ Tailwind 유틸리티는 **토큰 스케일에 있는 값만** 사용한다.
|
|
|
642
642
|
| 하려는 일 | 컴포넌트 | 갈림 |
|
|
643
643
|
| --- | --- | --- |
|
|
644
644
|
| 화면에 상시 노출되는 안내·경고를 둔다 | `SCallout` | §3-2 |
|
|
645
|
+
| 한 자리에 붙는 **한 줄** 알림 + 후속 동작 버튼을 둔다 | `SContextAlert` | §3-2 |
|
|
645
646
|
| 작업 결과를 일시적으로 알린다 | `SToast` | §3-2 |
|
|
646
647
|
| 기능 온보딩·도움말을 붙인다 | `SGuide` | §3-2 |
|
|
647
648
|
|
|
@@ -675,7 +676,8 @@ Tailwind 유틸리티는 **토큰 스케일에 있는 값만** 사용한다.
|
|
|
675
676
|
|
|
676
677
|
| 상황 | 사용 |
|
|
677
678
|
| --- | --- |
|
|
678
|
-
| 화면에 **상시 노출**되는 안내·경고 문구 | `SCallout` — `type` + `message` 배열(중첩 = 들여쓰기) |
|
|
679
|
+
| 화면에 **상시 노출**되는 안내·경고 문구 (여러 줄 목록) | `SCallout` — `type` + `message` 배열(중첩 = 들여쓰기) |
|
|
680
|
+
| 한 자리의 상태를 **한 줄**로 알리고, 필요하면 후속 동작 버튼을 붙임 | `SContextAlert` — `intent` + `messages` 배열(한 줄씩) + `action` 슬롯 |
|
|
679
681
|
| 작업 결과를 **일시적으로** 알림 | `SToast` (+ 루트에 `SToastContainer`) |
|
|
680
682
|
| 진행 전 **확인/취소**를 받아야 할 때 | `SModal.confirm({...}).onOk(...)` — 무엇을 할지가 모달 밖에서 이미 정해진 경우다 (§3-3-2) |
|
|
681
683
|
| 특정 UI 요소에 대한 **온보딩·기능 안내** | `SGuide` |
|
|
@@ -689,6 +691,22 @@ Tailwind 유틸리티는 **토큰 스케일에 있는 값만** 사용한다.
|
|
|
689
691
|
| `white` | 회색 면 위 (`background="neutral"`·`"screen"`) — 그 위에서는 `default` 가 배경에 묻힌다 |
|
|
690
692
|
| `danger` | 경고. 좌측에 "주의사항" 타이틀이 붙으므로 단순 안내에는 쓰지 않는다. 주변에 이미 경고 맥락(제목 등)이 있어 타이틀이 중복되면 `showTitle={false}` 로 타이틀만 뺀다 — 경고 면은 유지된다 |
|
|
691
693
|
|
|
694
|
+
#### 3-2-1. SCallout vs SContextAlert
|
|
695
|
+
|
|
696
|
+
**둘은 면·테두리·패딩이 같은 상자다.** 색만 보고 고르면 같은 화면에서 같은 모양의 상자가 서로 다른 규칙으로 늘어난다. **무엇을 담는지**로 고른다.
|
|
697
|
+
|
|
698
|
+
| | `SCallout` | `SContextAlert` |
|
|
699
|
+
| --- | --- | --- |
|
|
700
|
+
| 담는 것 | 읽을 **문장들** — 여러 줄, 중첩 들여쓰기 | 지금 상태 **한 줄** |
|
|
701
|
+
| 후속 동작 | 없다 | `action` 슬롯에 버튼 하나 |
|
|
702
|
+
| 고르는 축 | `type` — **놓이는 면**이 정한다(위 표) | `intent` — **알림의 성격**이 정한다 |
|
|
703
|
+
| 자리 | 페이지·섹션 머리의 상시 안내 | 그 알림이 가리키는 **대상 바로 옆** |
|
|
704
|
+
|
|
705
|
+
- **`SContextAlert` 는 대상 옆에 둔다.** 페이지 맨 위에 놓고 "아래 어딘가의 이야기"를 하면 그건 `SCallout` 이 할 일이다.
|
|
706
|
+
- **`action` 에는 `SButton size="xs"` 를 넣는다.** 그 높이가 곧 상자의 콘텐츠 높이라, 더 큰 버튼을 넣으면 상자가 세로로 늘어나 한 줄 알림의 리듬이 깨진다. 버튼이 둘 이상 필요하면 한 줄로 끝날 이야기가 아니다 — 모달(§3-3)을 본다.
|
|
707
|
+
- **`messages` 는 줄을 나누는 용도지 문장을 자르는 용도가 아니다.** 한 문장이 길어 넘치는 것은 그냥 두면 줄바꿈된다. 서로 다른 사실일 때만 배열로 나눈다.
|
|
708
|
+
- **아이콘은 기본값을 그대로 둔다.** 인텐트 6종이 같은 아이콘을 쓰는 것이 시안의 규칙이다. `icon` 을 바꾸면 면의 색과 아이콘의 뜻이 따로 논다.
|
|
709
|
+
|
|
692
710
|
### 3-3. 플로팅/오버레이류
|
|
693
711
|
|
|
694
712
|
| 상황 | 사용 |
|
|
@@ -2459,6 +2477,13 @@ const [initialDense] = useState(() => loadPref('list.dense', true));
|
|
|
2459
2477
|
- **버튼 순서: 취소·닫기가 왼쪽, 저장·등록·수정·삭제가 오른쪽.** 이 순서는 모든 화면에서 동일하다.
|
|
2460
2478
|
- **폼 페이지도 `contentHeight="fill"` 이 기본이다**(§2-2). 폼이 길어 페이지가 실제로 스크롤되는 화면에서만 `auto` + `scrollEndSpacing` 을 켠다.
|
|
2461
2479
|
- **필드 폭은 등급으로 준다** — `width="md"` 처럼 `'xs' | 'sm' | 'md' | 'lg' | 'xl'` 중 하나다. px 를 직접 적지 않는다. 등급은 `maxLength`(= 스키마 상한)로 고르고, 상한이 `xl` 을 넘거나 상한이 없으면 `width="100%"` 로 행 전체를 쓴다 (§6 `field-width-grade`).
|
|
2480
|
+
- **이 골격에서는 `labelPosition` 을 쓰지 않는다.** 라벨은 컨트롤이 아니라 `SKeyValueTable` 의 왼쪽 칸이 그리므로, 컨트롤에는 `label` 자체가 가지 않아 아무 일도 일어나지 않는다.
|
|
2481
|
+
|
|
2482
|
+
**라벨을 컨트롤 위에 두는 자리 — `labelPosition="top"`.** 표 밖에서 컨트롤이 **제 `label` 을 직접 들고 설 때만** 쓴다. 모달 안의 짧은 폼, 좁은 단처럼 라벨과 컨트롤을 한 줄에 같이 세우면 컨트롤이 너무 좁아지는 자리다. `SField` 를 쓰는 입력 컨트롤 전부가 같은 이름으로 받는다.
|
|
2483
|
+
|
|
2484
|
+
- **한 폼 안에서는 섞지 않는다.** 라벨 시작점과 컨트롤 윗변이 행마다 어긋나 세로 정렬이 깨진다. 한 폼은 통째로 `left`(기본) 이거나 통째로 `top` 이다.
|
|
2485
|
+
- **간격을 직접 주지 않는다** — 라벨과 컨트롤 사이는 `SField` 가 `--sys-space-field-vertical-gap` 으로 넣는다. `size` 에 따라 달라지지 않는다.
|
|
2486
|
+
- **`labelWidth`·`labelHeight` 는 함께 쓰지 않는다.** 둘 다 라벨을 열로 줄 세우는 장치라 위에 선 라벨에는 뜻이 없고, 주더라도 무시된다. (`addonLabel` 의 폭에는 그대로 적용된다 — addon 은 테두리 박스 안이라 배치와 무관하다.)
|
|
2462
2487
|
|
|
2463
2488
|
**날짜·시간 피커는 값 길이에 맞춘 폭 상한을 스스로 갖는다.** 표가 모든 컨트롤에 `width="100%"` 를 넘기지만 이 넷만 자기 상한에서 멈춘다 — `SDatePicker` · `SDateRangePicker` · `STimePicker` · `STimeRangePicker`. 그래서 한 행에 이런 필드가 섞이면 **왼쪽 끝만 맞고 오른쪽 끝이 어긋나** 보인다. 이것이 폼이 들쭉날쭉해 보이는 가장 흔한 원인이다.
|
|
2464
2489
|
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|------|------|---------|-------------|
|
|
11
11
|
| `categories` | `string[]` | — | 가로축(가로 막대면 세로축)에 놓일 항목 이름 |
|
|
12
12
|
| `series` | `SBarChartSeries[]` | — | 계열 목록. 각 `data` 는 `categories` 와 같은 순서다 |
|
|
13
|
+
| `title?` | `string` | — | 차트 제목 — 왼쪽 위에 놓인다 |
|
|
14
|
+
| `unit?` | `string` | — | 단위 — 오른쪽 위에 "단위 : " 를 붙여 놓는다 |
|
|
13
15
|
| `direction?` | `SBarChartDirection` | `'vertical'` | 막대가 자라는 방향 |
|
|
14
16
|
| `stacked?` | `boolean` | `false` | 계열을 나란히 놓는 대신 **한 막대에 쌓는다**. 항목의 크기와 그 안의 구성을 함께 볼 때 쓴다. 첫 계열이 기준선에 붙고, 값 라벨은 조각마다가 아니라 **항목의 합계**를 한 번 적는다. 음수는 0 아래로 따로 쌓이며, 값 축도 개별 값이 아닌 항목별 합계로 잡힌다 |
|
|
15
17
|
| `palette?` | `SBarChartPalette` | `'default'` | 색 팔레트. 계열이 하나면 계열 대신 **항목**마다 색이 바뀐다. `custom` 일 때만 `colors` 를 본다 |
|
|
@@ -46,6 +46,10 @@ export interface SBarChartProps {
|
|
|
46
46
|
categories: string[];
|
|
47
47
|
/** 계열 목록. 각 `data` 는 `categories` 와 같은 순서다 */
|
|
48
48
|
series: SBarChartSeries[];
|
|
49
|
+
/** 차트 제목 — 왼쪽 위에 놓인다 */
|
|
50
|
+
title?: string;
|
|
51
|
+
/** 단위 — 오른쪽 위에 "단위 : " 를 붙여 놓는다 */
|
|
52
|
+
unit?: string;
|
|
49
53
|
/** 막대가 자라는 방향 */
|
|
50
54
|
direction?: SBarChartDirection;
|
|
51
55
|
/**
|
|
@@ -17,15 +17,22 @@ export declare const BAR_GAP = 6;
|
|
|
17
17
|
export declare const GROUP_PADDING_MIN = 8;
|
|
18
18
|
/** 막대 묶음 좌우 여백의 상한(px) — 시안 `bar group paddingX max : 24`. */
|
|
19
19
|
export declare const GROUP_PADDING_MAX = 24;
|
|
20
|
-
/**
|
|
21
|
-
|
|
20
|
+
/**
|
|
21
|
+
* 막대 끝과 값 라벨 사이 간격(px) — 토큰 `chart.dataLabel.gap`(점·막대 ↔ 값 라벨).
|
|
22
|
+
* 라벨 자리를 좌표로 잡으므로 `var()` 가 아니라 같은 값을 손으로 맞춰 둔다.
|
|
23
|
+
*/
|
|
24
|
+
export declare const VALUE_LABEL_GAP = 4;
|
|
22
25
|
/**
|
|
23
26
|
* 막대 모서리 반경(px). SVG 경로를 좌표로 계산하므로 `var(--cmp-chart-bar-radius)`
|
|
24
27
|
* 문자열이 아니라 **숫자**여야 한다 — 시안의 clipPath 도 같은 이유로 8 을 좌표에
|
|
25
28
|
* 박아 두고 있다. 토큰(`chart.bar.radius`)과 같은 값을 손으로 맞춰 둔 유일한 자리다.
|
|
26
29
|
*/
|
|
27
30
|
export declare const BAR_RADIUS = 8;
|
|
28
|
-
|
|
31
|
+
/**
|
|
32
|
+
* 기본 불투명도는 막대만의 값이 아니라 차트 공용(`chart.opacity.default`)이다 —
|
|
33
|
+
* 도넛·파이도 같은 값을 쓴다. 흐려진 상태만 막대 고유(`chart.bar.opacity.dimmed`)다.
|
|
34
|
+
*/
|
|
35
|
+
export declare const BAR_OPACITY_DEFAULT = "var(--cmp-chart-opacity-default)";
|
|
29
36
|
export declare const BAR_OPACITY_DIMMED = "var(--cmp-chart-bar-opacity-dimmed)";
|
|
30
37
|
/**
|
|
31
38
|
* 호버한 항목의 막대 — 완전히 불투명하다.
|
|
@@ -34,12 +41,12 @@ export declare const BAR_OPACITY_DIMMED = "var(--cmp-chart-bar-opacity-dimmed)";
|
|
|
34
41
|
* 디자인 토큰으로 두지 않는 쪽이 맞으므로, 여기서는 토큰 대신 1 을 쓴다.
|
|
35
42
|
*/
|
|
36
43
|
export declare const BAR_OPACITY_HOVER = 1;
|
|
37
|
-
export declare const BAR_DATA_LABEL_COLOR = "var(--cmp-chart-
|
|
44
|
+
export declare const BAR_DATA_LABEL_COLOR = "var(--cmp-chart-dataLabel-color-default)";
|
|
38
45
|
/**
|
|
39
46
|
* 값 라벨의 타이포 — 호버한 항목만 굵고 크게 뜬다.
|
|
40
47
|
*
|
|
41
48
|
* 타이포 토큰은 `--cmp-*` 변수로 나오지 않고 `.typo-*` 유틸로만 나오므로,
|
|
42
|
-
* `chart.
|
|
49
|
+
* `chart.dataLabel.typography.default`(`body.sm.medium`) ·
|
|
43
50
|
* `.hover`(`body.md.bold`) 에 대응하는 클래스를 여기서 짝지어 둔다.
|
|
44
51
|
*/
|
|
45
52
|
export declare const BAR_DATA_LABEL_TYPO = "typo-body-sm-medium";
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
| `inputClassName?` | `string` | — | |
|
|
26
26
|
| `inputStyle?` | `CSSProperties` | — | |
|
|
27
27
|
| `label?` | `string` | — | |
|
|
28
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다). |
|
|
28
29
|
| `labelWidth?` | `number \| string` | — | |
|
|
29
30
|
| `icon?` | `SIconName` | — | |
|
|
30
31
|
| `iconColor?` | `SColor` | — | |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
-
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus } from '../SField';
|
|
2
|
+
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus, type SFieldLabelPosition } from '../SField';
|
|
3
3
|
import { type SIconName } from '../SIcon';
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
@@ -32,6 +32,13 @@ export interface SBarcodeInputProps {
|
|
|
32
32
|
inputClassName?: string;
|
|
33
33
|
inputStyle?: CSSProperties;
|
|
34
34
|
label?: string;
|
|
35
|
+
/**
|
|
36
|
+
* 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다).
|
|
37
|
+
*
|
|
38
|
+
* @nodemo SField 에서 내려오는 공통 필드 옵션이다 — 같은 데모를 컨트롤마다 복제하지 않고
|
|
39
|
+
* 대표 컨트롤 `SInput` 과 `SField` 에 한 번 둔다 (scripts/check-docs-coverage.mjs 머리말).
|
|
40
|
+
*/
|
|
41
|
+
labelPosition?: SFieldLabelPosition;
|
|
35
42
|
labelWidth?: number | string;
|
|
36
43
|
icon?: SIconName;
|
|
37
44
|
iconColor?: SColor;
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
| `loadingRecommendedItems?` | `boolean` | `false` | |
|
|
28
28
|
| `dropdownMinWidth?` | `number \| string` | `200` | 드롭다운 최소 너비 (숫자=px) |
|
|
29
29
|
| `label?` | `string` | — | |
|
|
30
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다). |
|
|
30
31
|
| `labelWidth?` | `number \| string` | — | |
|
|
31
32
|
| `hint?` | `string` | — | |
|
|
32
33
|
| `errorMessage?` | `string` | — | |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
|
-
import { type SFieldSize, type SFieldStatus } from '../SField';
|
|
2
|
+
import { type SFieldSize, type SFieldStatus, type SFieldLabelPosition } from '../SField';
|
|
3
3
|
import { type SIconName } from '../SIcon';
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
@@ -48,6 +48,13 @@ export interface SChipInputProps {
|
|
|
48
48
|
/** 드롭다운 최소 너비 (숫자=px) */
|
|
49
49
|
dropdownMinWidth?: number | string;
|
|
50
50
|
label?: string;
|
|
51
|
+
/**
|
|
52
|
+
* 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다).
|
|
53
|
+
*
|
|
54
|
+
* @nodemo SField 에서 내려오는 공통 필드 옵션이다 — 같은 데모를 컨트롤마다 복제하지 않고
|
|
55
|
+
* 대표 컨트롤 `SInput` 과 `SField` 에 한 번 둔다 (scripts/check-docs-coverage.mjs 머리말).
|
|
56
|
+
*/
|
|
57
|
+
labelPosition?: SFieldLabelPosition;
|
|
51
58
|
labelWidth?: number | string;
|
|
52
59
|
hint?: string;
|
|
53
60
|
errorMessage?: string;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# SContextAlert
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SContextAlert
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `intent?` | `SContextAlertIntent` | `'default'` | 알림의 성격 — 면과 테두리 색이 바뀐다. 아이콘과 본문색은 인텐트와 무관하게 같다. `default` 안내 · `danger` 오류 · `warning` 주의 · `success` 완료 · `accent` 강조 · `discovery` 새 기능 |
|
|
12
|
+
| `messages?` | `string[]` | `[]` | 본문. 각 문자열이 한 줄이 되고, 인라인 HTML(`<b>` · `<a>` 등)을 허용한다 — `sanitizeInlineHtml` 로 살균한 뒤 렌더하므로 스크립트·위험 스킴은 제거된다. |
|
|
13
|
+
| `icon?` | `SIconName` | `CONTEXT_ALERT_DEFAULT_ICON` | 왼쪽 아이콘. 시안은 인텐트와 무관하게 원 안 느낌표 하나를 쓴다 |
|
|
14
|
+
| `action?` | `ReactNode` | — | 오른쪽에 붙는 후속 동작. **`SButton size="xs"` 를 넣는다** — 그 높이(24px)가 곧 이 상자의 콘텐츠 높이라 시안의 40px 가 그대로 나온다. 더 큰 버튼을 넣으면 상자가 그만큼 세로로 늘어난다. |
|
|
15
|
+
| `className?` | `string` | — | |
|
|
16
|
+
| `style?` | `CSSProperties` | — | |
|
|
17
|
+
|
|
18
|
+
## Types
|
|
19
|
+
|
|
20
|
+
### SContextAlertIntent
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
export type SContextAlertIntent = (typeof CONTEXT_ALERT_INTENTS)[number];
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### CONTEXT_ALERT_INTENTS
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
export const CONTEXT_ALERT_INTENTS = [
|
|
30
|
+
'default',
|
|
31
|
+
'danger',
|
|
32
|
+
'warning',
|
|
33
|
+
'success',
|
|
34
|
+
'accent',
|
|
35
|
+
'discovery',
|
|
36
|
+
] as const;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Dependencies
|
|
40
|
+
|
|
41
|
+
### Depends on
|
|
42
|
+
|
|
43
|
+
- [SIcon](../SIcon)
|
|
44
|
+
|
|
45
|
+
### Graph
|
|
46
|
+
|
|
47
|
+
```mermaid
|
|
48
|
+
graph TD;
|
|
49
|
+
SContextAlert --> SIcon
|
|
50
|
+
style SContextAlert fill:#f9f,stroke:#333,stroke-width:4px
|
|
51
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type SIconName } from '../SIcon';
|
|
3
|
+
import { type SContextAlertIntent } from './contextAlert.config';
|
|
4
|
+
export interface SContextAlertProps {
|
|
5
|
+
/**
|
|
6
|
+
* 알림의 성격 — 면과 테두리 색이 바뀐다. 아이콘과 본문색은 인텐트와 무관하게 같다.
|
|
7
|
+
*
|
|
8
|
+
* `default` 안내 · `danger` 오류 · `warning` 주의 · `success` 완료 · `accent` 강조 · `discovery` 새 기능
|
|
9
|
+
*/
|
|
10
|
+
intent?: SContextAlertIntent;
|
|
11
|
+
/**
|
|
12
|
+
* 본문. 각 문자열이 한 줄이 되고, 인라인 HTML(`<b>` · `<a>` 등)을 허용한다 —
|
|
13
|
+
* `sanitizeInlineHtml` 로 살균한 뒤 렌더하므로 스크립트·위험 스킴은 제거된다.
|
|
14
|
+
*/
|
|
15
|
+
messages?: string[];
|
|
16
|
+
/** 왼쪽 아이콘. 시안은 인텐트와 무관하게 원 안 느낌표 하나를 쓴다 */
|
|
17
|
+
icon?: SIconName;
|
|
18
|
+
/**
|
|
19
|
+
* 오른쪽에 붙는 후속 동작.
|
|
20
|
+
*
|
|
21
|
+
* **`SButton size="xs"` 를 넣는다** — 그 높이(24px)가 곧 이 상자의 콘텐츠 높이라 시안의
|
|
22
|
+
* 40px 가 그대로 나온다. 더 큰 버튼을 넣으면 상자가 그만큼 세로로 늘어난다.
|
|
23
|
+
*/
|
|
24
|
+
action?: ReactNode;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* SContextAlert — 한 줄짜리 맥락 알림.
|
|
30
|
+
*
|
|
31
|
+
* 화면의 특정 자리에 붙어 "지금 이 맥락에서 알아야 할 것"을 한 줄로 알리고, 필요하면
|
|
32
|
+
* 오른쪽에 후속 동작 버튼을 둔다. 여러 줄 목록으로 안내를 쌓는 자리는 `SCallout` 이다
|
|
33
|
+
* (AGENTS.md §3-2) — 두 컴포넌트는 면·테두리·패딩 토큰이 같고 **무엇을 담는지**가 다르다.
|
|
34
|
+
*
|
|
35
|
+
* 색은 `--cmp-contextAlert-*` 토큰이 정한다. 아이콘 색만 전용 토큰이 없어 시스템 토큰을
|
|
36
|
+
* 빌려 쓴다(`contextAlert.config.ts` 참고).
|
|
37
|
+
*/
|
|
38
|
+
export declare const SContextAlert: import("react").ForwardRefExoticComponent<SContextAlertProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SIconName } from '../SIcon';
|
|
2
|
+
export declare const CONTEXT_ALERT_INTENTS: readonly ["default", "danger", "warning", "success", "accent", "discovery"];
|
|
3
|
+
export type SContextAlertIntent = (typeof CONTEXT_ALERT_INTENTS)[number];
|
|
4
|
+
/**
|
|
5
|
+
* 인텐트별 표면 — 배경·테두리.
|
|
6
|
+
*
|
|
7
|
+
* `--cmp-contextAlert-<intent>-*` 로 이름을 조립하지 않고 표로 둔다. 조립하면 어떤 인텐트가
|
|
8
|
+
* 실제로 토큰을 갖고 있는지가 코드에서 사라지고, `check:refs` 도 접두어 존재만 확인하게 된다.
|
|
9
|
+
*
|
|
10
|
+
* **본문색은 여기 없다** — 전 인텐트 공통(`--cmp-contextAlert-content`)이라 컴포넌트가 직접 쓴다.
|
|
11
|
+
*/
|
|
12
|
+
export declare const CONTEXT_ALERT_SURFACE: Record<SContextAlertIntent, {
|
|
13
|
+
bg: string;
|
|
14
|
+
border: string;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* 기본 아이콘 — 원 안 느낌표.
|
|
18
|
+
*
|
|
19
|
+
* 시안은 인텐트 6종 모두 같은 글리프를 쓴다. 인텐트마다 아이콘을 바꾸는 매핑은 없다.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CONTEXT_ALERT_DEFAULT_ICON: SIconName;
|
|
22
|
+
/**
|
|
23
|
+
* 아이콘 색 — 본문(`--cmp-contextAlert-content`)보다 한 단계 옅다.
|
|
24
|
+
*
|
|
25
|
+
* ⚠️ contextAlert 토큰 그룹에 아이콘 **색**이 없다(크기만 있다). 시안의 값과 같은 시스템
|
|
26
|
+
* 토큰을 빌려 쓴다 — 디자인팀이 전용 토큰을 내면 이 한 줄을 그것으로 갈아끼운다
|
|
27
|
+
* (토큰 키는 만들지 않는다). `SCallout` 의 `white` 타입이 같은 방식으로 버티고 있다.
|
|
28
|
+
*/
|
|
29
|
+
export declare const CONTEXT_ALERT_ICON_COLOR = "var(--sys-color-fg-tertiary)";
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
| `rules?` | `Rule[]` | — | |
|
|
41
41
|
| `status?` | `SFieldStatus` | — | |
|
|
42
42
|
| `label?` | `string` | — | |
|
|
43
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다). |
|
|
43
44
|
| `labelWidth?` | `number \| string` | — | |
|
|
44
45
|
| `icon?` | `SIconName` | — | |
|
|
45
46
|
| `iconColor?` | `SColor` | — | |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
|
-
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus } from '../SField';
|
|
2
|
+
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus, type SFieldLabelPosition } from '../SField';
|
|
3
3
|
import { type SIconName } from '../SIcon';
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
@@ -51,6 +51,13 @@ export interface SDatePickerProps {
|
|
|
51
51
|
rules?: Rule[];
|
|
52
52
|
status?: SFieldStatus;
|
|
53
53
|
label?: string;
|
|
54
|
+
/**
|
|
55
|
+
* 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다).
|
|
56
|
+
*
|
|
57
|
+
* @nodemo SField 에서 내려오는 공통 필드 옵션이다 — 같은 데모를 컨트롤마다 복제하지 않고
|
|
58
|
+
* 대표 컨트롤 `SInput` 과 `SField` 에 한 번 둔다 (scripts/check-docs-coverage.mjs 머리말).
|
|
59
|
+
*/
|
|
60
|
+
labelPosition?: SFieldLabelPosition;
|
|
54
61
|
labelWidth?: number | string;
|
|
55
62
|
icon?: SIconName;
|
|
56
63
|
iconColor?: SColor;
|
|
@@ -95,4 +102,4 @@ export interface SDatePickerMonthListboxProps {
|
|
|
95
102
|
* 자체 트리거/팝오버 없이 연도+월 리스트만 필요한 커스텀 조합에 재사용한다. */
|
|
96
103
|
export declare function SDatePickerMonthListbox({ value, anchorYear, selectable, onValueChange, onMonthSelect, className, style, }: SDatePickerMonthListboxProps): import("react").JSX.Element;
|
|
97
104
|
/** SDatePicker — sd-date-picker 포팅. SField + SPopover(SCalendar). */
|
|
98
|
-
export declare function SDatePicker({ value, onValueChange, onViewChange, mode, size, placeholder, selectable, disabled, clearable, width, maxWidth, name, rules, status, label, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: SDatePickerProps): import("react").JSX.Element;
|
|
105
|
+
export declare function SDatePicker({ value, onValueChange, onViewChange, mode, size, placeholder, selectable, disabled, clearable, width, maxWidth, name, rules, status, label, labelPosition, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: SDatePickerProps): import("react").JSX.Element;
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
| `rules?` | `Rule[]` | — | |
|
|
23
23
|
| `status?` | `SFieldStatus` | — | |
|
|
24
24
|
| `label?` | `string` | — | |
|
|
25
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다). |
|
|
25
26
|
| `labelWidth?` | `number \| string` | — | |
|
|
26
27
|
| `icon?` | `SIconName` | — | |
|
|
27
28
|
| `iconColor?` | `SColor` | — | |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
|
-
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus } from '../SField';
|
|
2
|
+
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus, type SFieldLabelPosition } from '../SField';
|
|
3
3
|
import { type SIconName } from '../SIcon';
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
@@ -54,6 +54,13 @@ export interface SDateRangePickerProps {
|
|
|
54
54
|
rules?: Rule[];
|
|
55
55
|
status?: SFieldStatus;
|
|
56
56
|
label?: string;
|
|
57
|
+
/**
|
|
58
|
+
* 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다).
|
|
59
|
+
*
|
|
60
|
+
* @nodemo SField 에서 내려오는 공통 필드 옵션이다 — 같은 데모를 컨트롤마다 복제하지 않고
|
|
61
|
+
* 대표 컨트롤 `SInput` 과 `SField` 에 한 번 둔다 (scripts/check-docs-coverage.mjs 머리말).
|
|
62
|
+
*/
|
|
63
|
+
labelPosition?: SFieldLabelPosition;
|
|
57
64
|
labelWidth?: number | string;
|
|
58
65
|
icon?: SIconName;
|
|
59
66
|
iconColor?: SColor;
|
|
@@ -84,4 +91,4 @@ export interface SRangeCalendarProps {
|
|
|
84
91
|
* 캘린더 그리드만 필요한 커스텀 조합(예: 다른 트리거에 팝오버로 얹는 경우)에 재사용한다. */
|
|
85
92
|
export declare function RangeCalendar({ value, selectable, maxRange, showTimePicker, onSelect, onPendingStartChange, onViewChange, }: SRangeCalendarProps): import("react").JSX.Element;
|
|
86
93
|
/** SDateRangePicker — sd-date-range-picker 포팅. SField + SPopover(범위 캘린더). */
|
|
87
|
-
export declare function SDateRangePicker({ value, onValueChange, onViewChange, size, placeholder, selectable, maxRange, showTimePicker, disabled, clearable, width, maxWidth, name, rules, status, label, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: SDateRangePickerProps): import("react").JSX.Element;
|
|
94
|
+
export declare function SDateRangePicker({ value, onValueChange, onViewChange, size, placeholder, selectable, maxRange, showTimePicker, disabled, clearable, width, maxWidth, name, rules, status, label, labelPosition, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: SDateRangePickerProps): import("react").JSX.Element;
|
|
@@ -9,11 +9,14 @@
|
|
|
9
9
|
| Prop | Type | Default | Description |
|
|
10
10
|
|------|------|---------|-------------|
|
|
11
11
|
| `data` | `SDonutChartSlice[]` | — | 조각 목록. 주는 순서대로 12시에서 시계 방향으로 그린다 — 보통 큰 순으로 준다 |
|
|
12
|
+
| `title?` | `string` | — | 차트 제목 — 왼쪽 위에 놓인다 |
|
|
13
|
+
| `unit?` | `string` | — | 단위 — 오른쪽 위에 "단위 : " 를 붙여 놓는다 |
|
|
12
14
|
| `palette?` | `SDonutChartPalette` | `'multi'` | 색 팔레트. `custom` 일 때만 `colors` 를 본다 |
|
|
13
15
|
| `colors?` | `SDonutChartColor[]` | — | `palette='custom'` 에서 쓸 색 이름을 조각 순서대로. 조각보다 짧으면 앞에서부터 순환하고, 비어 있으면 `multi` 로 그린다 |
|
|
14
16
|
| `showValueLabel?` | `boolean` | `false` | 고리 위에 몫(%)을 적는다. 좁은 조각은 글자가 넘치므로 적지 않는다 |
|
|
15
17
|
| `showLegend?` | `boolean` | `true` | 범례를 보인다 |
|
|
16
18
|
| `legendPosition?` | `SDonutChartLegendPosition` | `'top'` | 범례 위치 |
|
|
19
|
+
| `legendVariant?` | `SDonutChartLegendVariant` | `'simple'` | 범례 모양. `simple` 이름만 가로로 · `default` 이름+값을 세로로 쌓는 목록 |
|
|
17
20
|
| `showTooltip?` | `boolean` | `true` | 조각에 마우스를 올리면 값 상자를 띄운다 |
|
|
18
21
|
| `formatValue?` | `(value: number) => string` | — | 값 표시 형식 |
|
|
19
22
|
| `tooltipFooter?` | `(slice: SDonutChartSlicePoint) => ReactNode` | — | 툴팁의 값 아래에 덧붙일 내용. 짚은 조각을 받아 그린다 — 몫·값만으로 모자란 맥락 (전월 대비, 건수 등)을 적는다. 툴팁은 누를 수 없으므로 버튼·링크는 넣지 않는다 |
|
|
@@ -75,6 +78,17 @@ export type SDonutChartColor =
|
|
|
75
78
|
export type SDonutChartLegendPosition = 'top' | 'bottom';
|
|
76
79
|
```
|
|
77
80
|
|
|
81
|
+
### SDonutChartLegendVariant
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
/**
|
|
85
|
+
* 범례 모양.
|
|
86
|
+
* - `simple` 이름만 가로로 나열한다 (값 없음)
|
|
87
|
+
* - `default` 이름 뒤에 값을 적어 세로로 쌓는 목록이다
|
|
88
|
+
*/
|
|
89
|
+
export type SDonutChartLegendVariant = 'simple' | 'default';
|
|
90
|
+
```
|
|
91
|
+
|
|
78
92
|
### SDonutChartSlicePoint
|
|
79
93
|
|
|
80
94
|
```ts
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
2
|
/** 범례 위치. */
|
|
3
3
|
export type SDonutChartLegendPosition = 'top' | 'bottom';
|
|
4
|
+
/**
|
|
5
|
+
* 범례 모양.
|
|
6
|
+
* - `simple` 이름만 가로로 나열한다 (값 없음)
|
|
7
|
+
* - `default` 이름 뒤에 값을 적어 세로로 쌓는 목록이다
|
|
8
|
+
*/
|
|
9
|
+
export type SDonutChartLegendVariant = 'simple' | 'default';
|
|
4
10
|
/**
|
|
5
11
|
* 색 팔레트. 조각마다 색이 달라야 하므로 한 색(`default`)은 없다.
|
|
6
12
|
* - `multi` 서로 무관한 항목(11색)을 순서대로
|
|
@@ -32,6 +38,10 @@ export interface SDonutChartSlicePoint {
|
|
|
32
38
|
export interface SDonutChartProps {
|
|
33
39
|
/** 조각 목록. 주는 순서대로 12시에서 시계 방향으로 그린다 — 보통 큰 순으로 준다 */
|
|
34
40
|
data: SDonutChartSlice[];
|
|
41
|
+
/** 차트 제목 — 왼쪽 위에 놓인다 */
|
|
42
|
+
title?: string;
|
|
43
|
+
/** 단위 — 오른쪽 위에 "단위 : " 를 붙여 놓는다 */
|
|
44
|
+
unit?: string;
|
|
35
45
|
/** 색 팔레트. `custom` 일 때만 `colors` 를 본다 */
|
|
36
46
|
palette?: SDonutChartPalette;
|
|
37
47
|
/** `palette='custom'` 에서 쓸 색 이름을 조각 순서대로. 조각보다 짧으면 앞에서부터 순환하고, 비어 있으면 `multi` 로 그린다 */
|
|
@@ -42,6 +52,8 @@ export interface SDonutChartProps {
|
|
|
42
52
|
showLegend?: boolean;
|
|
43
53
|
/** 범례 위치 */
|
|
44
54
|
legendPosition?: SDonutChartLegendPosition;
|
|
55
|
+
/** 범례 모양. `simple` 이름만 가로로 · `default` 이름+값을 세로로 쌓는 목록 */
|
|
56
|
+
legendVariant?: SDonutChartLegendVariant;
|
|
45
57
|
/** 조각에 마우스를 올리면 값 상자를 띄운다 */
|
|
46
58
|
showTooltip?: boolean;
|
|
47
59
|
/** 값 표시 형식 */
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
| `editorClassName?` | `string` | — | 편집 영역 className |
|
|
70
70
|
| `editorStyle?` | `CSSProperties` | — | 편집 영역 style |
|
|
71
71
|
| `label?` | `string` | — | |
|
|
72
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다). |
|
|
72
73
|
| `labelWidth?` | `number \| string` | — | |
|
|
73
74
|
| `icon?` | `SIconName` | — | 레이블 영역 아이콘 |
|
|
74
75
|
| `iconColor?` | `SColor` | — | |
|
|
@@ -3,7 +3,7 @@ import type { Editor } from '@tiptap/core';
|
|
|
3
3
|
import { type SColor } from '../../lib/color';
|
|
4
4
|
import { type SFieldWidth } from '../../lib/field-width';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
6
|
-
import { type SFieldAddonAlign, type SFieldStatus } from '../SField';
|
|
6
|
+
import { type SFieldAddonAlign, type SFieldStatus, type SFieldLabelPosition } from '../SField';
|
|
7
7
|
import { type SIconName } from '../SIcon';
|
|
8
8
|
import { type STooltipProps } from '../STooltip';
|
|
9
9
|
/** ref 로 노출되는 조작 메서드 */
|
|
@@ -69,6 +69,13 @@ export interface SEditorProps {
|
|
|
69
69
|
/** 포커스 이탈 */
|
|
70
70
|
onBlur?: () => void;
|
|
71
71
|
label?: string;
|
|
72
|
+
/**
|
|
73
|
+
* 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다).
|
|
74
|
+
*
|
|
75
|
+
* @nodemo SField 에서 내려오는 공통 필드 옵션이다 — 같은 데모를 컨트롤마다 복제하지 않고
|
|
76
|
+
* 대표 컨트롤 `SInput` 과 `SField` 에 한 번 둔다 (scripts/check-docs-coverage.mjs 머리말).
|
|
77
|
+
*/
|
|
78
|
+
labelPosition?: SFieldLabelPosition;
|
|
72
79
|
labelWidth?: number | string;
|
|
73
80
|
/** 레이블 영역 아이콘 */
|
|
74
81
|
icon?: SIconName;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
| `iconColor?` | `SColor` | — | 레이블 영역 아이콘 색상. 미지정 시 currentColor 상속 |
|
|
15
15
|
| `labelTooltip?` | `string` | `''` | 레이블 툴팁 텍스트 |
|
|
16
16
|
| `labelTooltipProps?` | `Partial<STooltipProps>` | — | 레이블 툴팁 상세 옵션 (SdTooltipProps 대응) |
|
|
17
|
+
| `labelPosition?` | `SFieldLabelPosition` | `'left'` | 레이블을 컨트롤 **왼쪽**에 둘지 **위**에 둘지. 기본은 `left` — 이 서비스의 폼은 라벨 열을 세로로 맞춰 읽는다. 라벨이 길거나 컨트롤이 좁아 한 줄에 같이 세우기 어려울 때(모달 안의 폼, 한 줄짜리 칸) `top` 을 쓴다. **한 폼 안에서는 섞지 않는다** — 라벨 시작점이 행마다 어긋나 세로 정렬이 깨진다. `top` 이면 라벨과 컨트롤 사이 간격은 `--sys-space-field-vertical-gap` 이 정한다 (sm·md 구분 없이 고정). 라벨을 줄 세우는 장치인 `labelWidth`·`labelHeight` 는 위에 선 라벨에는 뜻이 없어 무시된다 — `addonLabel` 의 폭에는 그대로 적용된다. |
|
|
17
18
|
| `labelWidth?` | `number \| string` | — | 레이블/어드온 레이블 너비 (숫자=px). label·addonLabel 폭에 공통 적용 |
|
|
18
19
|
| `labelHeight?` | `number \| string` | — | 레이블 박스 높이 (숫자=px). 미지정 시 size별 기본값 사용. 컨트롤 박스가 기본 필드 높이보다 큰 경우(multiline 등) 첫 행에 세로 중앙 정렬을 맞추기 위해 컨트롤 박스 높이를 넘겨받는다. |
|
|
19
20
|
| `size?` | `SFieldSize` | `'sm'` | 필드 크기 |
|
|
@@ -52,6 +53,12 @@
|
|
|
52
53
|
|
|
53
54
|
## Types
|
|
54
55
|
|
|
56
|
+
### SFieldLabelPosition
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
export type SFieldLabelPosition = 'left' | 'top';
|
|
60
|
+
```
|
|
61
|
+
|
|
55
62
|
### SFieldSize
|
|
56
63
|
|
|
57
64
|
```ts
|
|
@@ -7,6 +7,7 @@ import { type SFieldWidth } from '../../lib/field-width';
|
|
|
7
7
|
export type SFieldSize = 'sm' | 'md';
|
|
8
8
|
export type SFieldAddonAlign = 'start' | 'center' | 'end';
|
|
9
9
|
export type SFieldStatus = 'default' | 'pass' | 'error';
|
|
10
|
+
export type SFieldLabelPosition = 'left' | 'top';
|
|
10
11
|
/** ref로 노출되는 UX 메서드 (sd-field @Method sdFocus 대응) */
|
|
11
12
|
export interface SFieldHandle {
|
|
12
13
|
/** 내부 컨트롤에 포커스하고 필드를 화면에 스크롤합니다. */
|
|
@@ -25,6 +26,18 @@ export interface SFieldProps {
|
|
|
25
26
|
labelTooltip?: string;
|
|
26
27
|
/** 레이블 툴팁 상세 옵션 (SdTooltipProps 대응) */
|
|
27
28
|
labelTooltipProps?: Partial<STooltipProps>;
|
|
29
|
+
/**
|
|
30
|
+
* 레이블을 컨트롤 **왼쪽**에 둘지 **위**에 둘지.
|
|
31
|
+
*
|
|
32
|
+
* 기본은 `left` — 이 서비스의 폼은 라벨 열을 세로로 맞춰 읽는다. 라벨이 길거나 컨트롤이
|
|
33
|
+
* 좁아 한 줄에 같이 세우기 어려울 때(모달 안의 폼, 한 줄짜리 칸) `top` 을 쓴다.
|
|
34
|
+
* **한 폼 안에서는 섞지 않는다** — 라벨 시작점이 행마다 어긋나 세로 정렬이 깨진다.
|
|
35
|
+
*
|
|
36
|
+
* `top` 이면 라벨과 컨트롤 사이 간격은 `--sys-space-field-vertical-gap` 이 정한다
|
|
37
|
+
* (sm·md 구분 없이 고정). 라벨을 줄 세우는 장치인 `labelWidth`·`labelHeight` 는
|
|
38
|
+
* 위에 선 라벨에는 뜻이 없어 무시된다 — `addonLabel` 의 폭에는 그대로 적용된다.
|
|
39
|
+
*/
|
|
40
|
+
labelPosition?: SFieldLabelPosition;
|
|
28
41
|
/** 레이블/어드온 레이블 너비 (숫자=px). label·addonLabel 폭에 공통 적용 */
|
|
29
42
|
labelWidth?: number | string;
|
|
30
43
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SField, type SFieldHandle, type SFieldProps, type SFieldSize, type SFieldAddonAlign, type SFieldStatus, } from './SField';
|
|
1
|
+
export { SField, type SFieldHandle, type SFieldProps, type SFieldSize, type SFieldAddonAlign, type SFieldStatus, type SFieldLabelPosition, } from './SField';
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
| `status?` | `SFieldStatus` | — | |
|
|
26
26
|
| `size?` | `SFieldSize` | `'sm'` | |
|
|
27
27
|
| `label?` | `string` | — | |
|
|
28
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다). |
|
|
28
29
|
| `labelWidth?` | `number \| string` | — | |
|
|
29
30
|
| `icon?` | `SIconName` | — | |
|
|
30
31
|
| `iconColor?` | `SColor` | — | |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
|
-
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus } from '../SField';
|
|
2
|
+
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus, type SFieldLabelPosition } from '../SField';
|
|
3
3
|
import { type SIconName } from '../SIcon';
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
@@ -36,6 +36,13 @@ export interface SFilePickerProps {
|
|
|
36
36
|
status?: SFieldStatus;
|
|
37
37
|
size?: SFieldSize;
|
|
38
38
|
label?: string;
|
|
39
|
+
/**
|
|
40
|
+
* 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다).
|
|
41
|
+
*
|
|
42
|
+
* @nodemo SField 에서 내려오는 공통 필드 옵션이다 — 같은 데모를 컨트롤마다 복제하지 않고
|
|
43
|
+
* 대표 컨트롤 `SInput` 과 `SField` 에 한 번 둔다 (scripts/check-docs-coverage.mjs 머리말).
|
|
44
|
+
*/
|
|
45
|
+
labelPosition?: SFieldLabelPosition;
|
|
39
46
|
labelWidth?: number | string;
|
|
40
47
|
icon?: SIconName;
|
|
41
48
|
iconColor?: SColor;
|
|
@@ -56,4 +63,4 @@ export interface SFilePickerProps {
|
|
|
56
63
|
style?: CSSProperties;
|
|
57
64
|
}
|
|
58
65
|
/** SFilePicker — sd-file-picker 포팅. 단일/다중 파일 + 크기·개수 검증 + 칩 목록. */
|
|
59
|
-
export declare function SFilePicker({ value, onValueChange, onReject, placeholder, disabled, focused, hovered, inline, multiple, showMultipleListBox, accept, maxFileSize, maxTotalSize, maxFiles, name, rules, status, size, label, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, width, className, style, }: SFilePickerProps): import("react").JSX.Element;
|
|
66
|
+
export declare function SFilePicker({ value, onValueChange, onReject, placeholder, disabled, focused, hovered, inline, multiple, showMultipleListBox, accept, maxFileSize, maxTotalSize, maxFiles, name, rules, status, size, label, labelPosition, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, width, className, style, }: SFilePickerProps): import("react").JSX.Element;
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
- [SChipFilter](../SChipFilter)
|
|
31
31
|
- [SChipInput](../SChipInput)
|
|
32
32
|
- [SConfirmModal](../SConfirmModal)
|
|
33
|
+
- [SContextAlert](../SContextAlert)
|
|
33
34
|
- [SDatePicker](../SDatePicker)
|
|
34
35
|
- [SDateRangePicker](../SDateRangePicker)
|
|
35
36
|
- [SDraggableItem](../SDraggableItem)
|
|
@@ -77,6 +78,7 @@ graph TD;
|
|
|
77
78
|
SChipFilter --> SIcon
|
|
78
79
|
SChipInput --> SIcon
|
|
79
80
|
SConfirmModal --> SIcon
|
|
81
|
+
SContextAlert --> SIcon
|
|
80
82
|
SDatePicker --> SIcon
|
|
81
83
|
SDateRangePicker --> SIcon
|
|
82
84
|
SDraggableItem --> SIcon
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
| `inputClassName?` | `string` | — | 내부 input 요소 className |
|
|
24
24
|
| `inputStyle?` | `CSSProperties` | — | 내부 input 요소 style |
|
|
25
25
|
| `label?` | `string` | — | |
|
|
26
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다) |
|
|
26
27
|
| `labelWidth?` | `number \| string` | — | |
|
|
27
28
|
| `labelTooltip?` | `string` | — | 레이블 툴팁 텍스트 |
|
|
28
29
|
| `labelTooltipProps?` | `Partial<STooltipProps>` | — | 레이블 툴팁 상세 옵션 |
|