sellmate-design-system-react 3.0.0 → 3.1.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/AGENTS.md +661 -0
- package/README.md +85 -0
- package/dist/components/SActionModal/README.md +41 -0
- package/dist/components/SBadge/README.md +25 -0
- package/dist/components/SBarcodeInput/README.md +64 -0
- package/dist/components/SButton/README.md +49 -0
- package/dist/components/SCalendar/README.md +42 -0
- package/dist/components/SCallout/README.md +29 -0
- package/dist/components/SCard/README.md +12 -0
- package/dist/components/SCheckbox/README.md +44 -0
- package/dist/components/SChip/README.md +57 -0
- package/dist/components/SChipInput/README.md +77 -0
- package/dist/components/SCircleProgress/README.md +35 -0
- package/dist/components/SConfirmModal/README.md +61 -0
- package/dist/components/SDatePicker/README.md +62 -0
- package/dist/components/SDateRangePicker/README.md +64 -0
- package/dist/components/SDivider/README.md +25 -0
- package/dist/components/SDraggableItem/README.md +40 -0
- package/dist/components/SDropdownButton/README.md +50 -0
- package/dist/components/SExpansionItem/README.md +40 -0
- package/dist/components/SField/README.md +91 -0
- package/dist/components/SFilePicker/README.md +72 -0
- package/dist/components/SForm/README.md +31 -0
- package/dist/components/SGhostButton/README.md +76 -0
- package/dist/components/SGnb/README.md +56 -0
- package/dist/components/SGuide/README.md +34 -0
- package/dist/components/SIcon/README.md +91 -0
- package/dist/components/SInput/README.md +66 -0
- package/dist/components/SKeyValueTable/README.md +59 -0
- package/dist/components/SLayout/README.md +42 -0
- package/dist/components/SLinearProgress/README.md +17 -0
- package/dist/components/SList/README.md +14 -0
- package/dist/components/SListItem/README.md +19 -0
- package/dist/components/SLoadingContainer/README.md +29 -0
- package/dist/components/SLoadingModal/README.md +52 -0
- package/dist/components/SModal/README.md +192 -0
- package/dist/components/SModalContainer/README.md +49 -0
- package/dist/components/SNumberInput/README.md +74 -0
- package/dist/components/SPage/README.md +25 -0
- package/dist/components/SPagination/README.md +40 -0
- package/dist/components/SPopover/README.md +54 -0
- package/dist/components/SPopup/README.md +38 -0
- package/dist/components/SPortal/README.md +51 -0
- package/dist/components/SRadio/README.md +57 -0
- package/dist/components/SRadioButton/README.md +24 -0
- package/dist/components/SScrollArea/README.md +16 -0
- package/dist/components/SSectionHeaderCard/README.md +51 -0
- package/dist/components/SSelect/README.md +79 -0
- package/dist/components/SStepper/README.md +30 -0
- package/dist/components/SSwitch/README.md +24 -0
- package/dist/components/STable/README.md +82 -0
- package/dist/components/STableBar/README.md +28 -0
- package/dist/components/STabs/README.md +37 -0
- package/dist/components/STag/README.md +44 -0
- package/dist/components/STextLink/README.md +48 -0
- package/dist/components/STextarea/README.md +60 -0
- package/dist/components/STimePicker/README.md +65 -0
- package/dist/components/STimeRangePicker/README.md +63 -0
- package/dist/components/SToast/README.md +70 -0
- package/dist/components/SToggle/README.md +22 -0
- package/dist/components/STooltip/README.md +57 -0
- package/dist/llms.txt +3496 -0
- package/dist/styles.css +209 -0
- package/dist/theme.css +8 -0
- package/eslint/index.mjs +66 -0
- package/eslint/lib/class-names.mjs +119 -0
- package/eslint/lib/table-column.mjs +53 -0
- package/eslint/rules/no-arbitrary-class.mjs +91 -0
- package/eslint/rules/no-off-scale-spacing.mjs +67 -0
- package/eslint/rules/no-raw-html-control.mjs +117 -0
- package/eslint/rules/prefer-typo-preset.mjs +73 -0
- package/eslint/rules/require-locale-number.mjs +78 -0
- package/eslint/rules/table-numeric-align.mjs +93 -0
- package/eslint/scale.gen.mjs +16 -0
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -105,6 +105,91 @@ export function Example() {
|
|
|
105
105
|
|
|
106
106
|
`SButton` 은 텍스트를 **`label`(문자열)로만** 받습니다 — `children` 은 받지 않으며, 아이콘은 `icon`/`rightIcon` 을 씁니다. 색상 prop 은 `color` 입니다(`variant` 아님).
|
|
107
107
|
|
|
108
|
+
## 화면 작성 규칙 (AI 에이전트 포함)
|
|
109
|
+
|
|
110
|
+
컴포넌트 조합·간격·타이포 등 **화면을 만들 때 지켜야 할 규칙**은 패키지에 함께 배포됩니다.
|
|
111
|
+
|
|
112
|
+
| 파일 | 용도 |
|
|
113
|
+
| --- | --- |
|
|
114
|
+
| `node_modules/sellmate-design-system-react/AGENTS.md` | 사람이 읽는 사용 규칙서 |
|
|
115
|
+
| `node_modules/sellmate-design-system-react/dist/llms.txt` | 규칙 + 토큰 어휘 + 전체 컴포넌트 Props 를 합친 AI 참조용 단일 문서 |
|
|
116
|
+
| `node_modules/sellmate-design-system-react/dist/components/<이름>/README.md` | 컴포넌트별 Props/Events |
|
|
117
|
+
|
|
118
|
+
Claude 등 AI 에이전트를 쓴다면 소비 앱의 `CLAUDE.md` 에 다음 한 줄을 넣어두면 됩니다.
|
|
119
|
+
|
|
120
|
+
```md
|
|
121
|
+
UI 작업 전 `node_modules/sellmate-design-system-react/dist/llms.txt` 를 먼저 읽을 것.
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## ESLint 설정
|
|
125
|
+
|
|
126
|
+
위 규칙 중 **정적으로 검출 가능한 것**은 린트로 강제할 수 있습니다. 소비 앱의 `eslint.config.mjs` 에 추가하세요.
|
|
127
|
+
|
|
128
|
+
```js
|
|
129
|
+
// eslint.config.mjs
|
|
130
|
+
import sellmate from 'sellmate-design-system-react/eslint';
|
|
131
|
+
|
|
132
|
+
export default [
|
|
133
|
+
// ... 기존 설정
|
|
134
|
+
...sellmate.configs.recommended,
|
|
135
|
+
];
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
| 규칙 | 기본 | 검출 대상 |
|
|
139
|
+
| --- | --- | --- |
|
|
140
|
+
| `sellmate/no-raw-html-control` | error | 대응 컴포넌트가 있는 생 HTML (`<button>` `<input>` `<select>` `<textarea>` `<table>` `<form>` `<dialog>` `<hr>` `<details>` `<progress>`), `alert()`/`confirm()` |
|
|
141
|
+
| `sellmate/no-arbitrary-class` | error | **토큰이 있는 속성**(색·타이포·간격·모서리)의 임의 값 — `text-[14px]`, `bg-[#eee]`, `gap-[13px]`, `rounded-[5px]` |
|
|
142
|
+
| `sellmate/no-off-scale-spacing` | error | 스케일 밖 간격 (`gap-13`, `p-15`) — Tailwind v4 에서 **조용히 무시되는** 값이라 눈으로 찾기 어렵다 |
|
|
143
|
+
| `sellmate/table-numeric-align` | error | 숫자 컬럼(금액·수량 등)에 `align: 'right'` 누락 — **`--fix` 로 자동 교정** |
|
|
144
|
+
| `sellmate/require-locale-number` | error | 숫자 컬럼의 `toLocaleString()` 누락 — 세 자리 콤마는 필수 |
|
|
145
|
+
| `sellmate/prefer-typo-preset` | warn | `text-14 font-bold` 같은 낱개 조합 → `typo-*` 프리셋 |
|
|
146
|
+
|
|
147
|
+
`className` 뿐 아니라 `cn()`/`clsx()` 인자, 템플릿 리터럴, 객체 키 안까지 검사합니다.
|
|
148
|
+
|
|
149
|
+
### 일부러 잡지 않는 것
|
|
150
|
+
|
|
151
|
+
과검출을 피하려고 다음은 기본 설정에서 **통과**시킵니다.
|
|
152
|
+
|
|
153
|
+
```tsx
|
|
154
|
+
// 디자인 토큰이 없는 앱 고유 레이아웃 치수 — 정당한 사용
|
|
155
|
+
<div className="w-[280px] max-w-[1200px] grid-cols-[200px_1fr] top-[64px]" />
|
|
156
|
+
|
|
157
|
+
// 토큰을 var() 로 참조하는 형태
|
|
158
|
+
<div className="h-[var(--sys-size-control-md-height)]" />
|
|
159
|
+
|
|
160
|
+
// 시각 요소가 없어 대체 컴포넌트가 없다
|
|
161
|
+
<input type="hidden" name="csrf" />
|
|
162
|
+
|
|
163
|
+
// 로고 SVG·본문 안 시맨틱 목록·DS 밖 컨트롤의 레이블
|
|
164
|
+
<svg viewBox="0 0 24 24" />
|
|
165
|
+
<ul><li>…</li></ul>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
핵심은 **"디자인 토큰을 하드코딩하지 마라"** 이지 "임의 값을 절대 쓰지 마라" 가 아닙니다.
|
|
169
|
+
|
|
170
|
+
### 더 엄격하게 / 더 느슨하게
|
|
171
|
+
|
|
172
|
+
`configs.strict` 는 전 규칙을 error 로 올리고 `<ul>` `<ol>` `<li>` `<svg>` `<label>` 까지 검사합니다.
|
|
173
|
+
|
|
174
|
+
```js
|
|
175
|
+
export default [...sellmate.configs.strict];
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
규칙별 예외도 줄 수 있습니다.
|
|
179
|
+
|
|
180
|
+
```js
|
|
181
|
+
{
|
|
182
|
+
rules: {
|
|
183
|
+
// strict 를 쓰되 로고 SVG 는 허용
|
|
184
|
+
'sellmate/no-raw-html-control': ['error', { strict: true, allow: ['svg'] }],
|
|
185
|
+
// 그림자만 임의 값 허용
|
|
186
|
+
'sellmate/no-arbitrary-class': ['error', { ignorePrefixes: ['shadow'] }],
|
|
187
|
+
},
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
허용 값 스케일은 `theme.css` 에서 **빌드 시 자동 추출**되므로 토큰이 바뀌면 규칙도 따라갑니다.
|
|
192
|
+
|
|
108
193
|
## 제공 컴포넌트
|
|
109
194
|
|
|
110
195
|
분류는 `src/index.ts` 의 export 그룹과 동일합니다.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# SActionModal
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SActionModal
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `open?` | `boolean` | — | |
|
|
12
|
+
| `persistent?` | `boolean` | — | true면 백드롭·ESC로 안 닫히고 흔들림 (sd-modal-container persistent) |
|
|
13
|
+
| `modalTitle?` | `string` | `''` | |
|
|
14
|
+
| `button?` | `SActionModalButton` | — | 하단 액션 버튼 (주 액션 1개). 의도적으로 단수다 — 보조 버튼(취소·삭제 등)은 `footerLeft` 슬롯에 직접 배치한다. |
|
|
15
|
+
| `footerLeft?` | `ReactNode` | — | footer 좌측 영역 (sd-action-modal 의 bottom-sub-content 슬롯). 보조 버튼이나 안내 문구를 넣는다. 버튼을 하나 더 쓰고 싶을 때 여기에 SButton 을 넣는다. |
|
|
16
|
+
| `width?` | `number \| string` | — | |
|
|
17
|
+
| `height?` | `number \| string` | — | |
|
|
18
|
+
| `children?` | `ReactNode` | — | |
|
|
19
|
+
|
|
20
|
+
#### Events
|
|
21
|
+
|
|
22
|
+
| Event | Type | Description |
|
|
23
|
+
|-------|------|-------------|
|
|
24
|
+
| `onOpenChange` | `(open: boolean) => void` | |
|
|
25
|
+
| `onClose` | `() => void` | 닫기(X) 버튼 클릭 (sdClose) |
|
|
26
|
+
|
|
27
|
+
## Dependencies
|
|
28
|
+
|
|
29
|
+
### Depends on
|
|
30
|
+
|
|
31
|
+
- [SButton](../SButton)
|
|
32
|
+
- [SModalContainer](../SModalContainer)
|
|
33
|
+
|
|
34
|
+
### Graph
|
|
35
|
+
|
|
36
|
+
```mermaid
|
|
37
|
+
graph TD;
|
|
38
|
+
SActionModal --> SButton
|
|
39
|
+
SActionModal --> SModalContainer
|
|
40
|
+
style SActionModal fill:#f9f,stroke:#333,stroke-width:4px
|
|
41
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# SBadge
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SBadge
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `color?` | `SBadgeColor` | `'blue'` | 뱃지 색상 |
|
|
12
|
+
|
|
13
|
+
## Dependencies
|
|
14
|
+
|
|
15
|
+
### Used by
|
|
16
|
+
|
|
17
|
+
- [SList](../SList)
|
|
18
|
+
|
|
19
|
+
### Graph
|
|
20
|
+
|
|
21
|
+
```mermaid
|
|
22
|
+
graph TD;
|
|
23
|
+
SList --> SBadge
|
|
24
|
+
style SBadge fill:#f9f,stroke:#333,stroke-width:4px
|
|
25
|
+
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# SBarcodeInput
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SBarcodeInput
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `value?` | `string \| number \| null` | — | |
|
|
12
|
+
| `size?` | `SBarcodeInputSize` | `'sm'` | |
|
|
13
|
+
| `clearable?` | `boolean` | `false` | |
|
|
14
|
+
| `autoFocus?` | `boolean` | — | |
|
|
15
|
+
| `name?` | `string` | — | |
|
|
16
|
+
| `placeholder?` | `string` | `'입력해 주세요.'` | |
|
|
17
|
+
| `disabled?` | `boolean` | `false` | |
|
|
18
|
+
| `readOnly?` | `boolean` | `false` | |
|
|
19
|
+
| `rules?` | `Rule[]` | — | |
|
|
20
|
+
| `status?` | `SFieldStatus` | — | |
|
|
21
|
+
| `focused?` | `boolean` | — | |
|
|
22
|
+
| `hovered?` | `boolean` | — | |
|
|
23
|
+
| `prefix?` | `ReactNode` | — | 입력 앞 슬롯 |
|
|
24
|
+
| `suffix?` | `ReactNode` | — | 입력 뒤 슬롯 |
|
|
25
|
+
| `inputClass?` | `string` | — | |
|
|
26
|
+
| `inputStyle?` | `CSSProperties` | — | |
|
|
27
|
+
| `label?` | `string` | — | |
|
|
28
|
+
| `labelWidth?` | `number \| string` | — | |
|
|
29
|
+
| `icon?` | `SIconName` | — | |
|
|
30
|
+
| `iconColor?` | `SColor` | — | |
|
|
31
|
+
| `labelTooltip?` | `string` | — | |
|
|
32
|
+
| `labelTooltipProps?` | `Partial<STooltipProps>` | — | |
|
|
33
|
+
| `addonLabel?` | `string` | — | |
|
|
34
|
+
| `addonAlign?` | `SFieldAddonAlign` | — | |
|
|
35
|
+
| `hint?` | `string` | — | |
|
|
36
|
+
| `error?` | `boolean` | — | |
|
|
37
|
+
| `errorMessage?` | `string` | — | |
|
|
38
|
+
| `width?` | `number \| string` | — | |
|
|
39
|
+
| `className?` | `string` | — | |
|
|
40
|
+
| `style?` | `CSSProperties` | — | |
|
|
41
|
+
|
|
42
|
+
#### Events
|
|
43
|
+
|
|
44
|
+
| Event | Type | Description |
|
|
45
|
+
|-------|------|-------------|
|
|
46
|
+
| `onValueChange` | `(value: string) => void` | 값 변경 (sdUpdate) |
|
|
47
|
+
| `onFocus` | `() => void` | |
|
|
48
|
+
| `onBlur` | `() => void` | |
|
|
49
|
+
|
|
50
|
+
## Dependencies
|
|
51
|
+
|
|
52
|
+
### Depends on
|
|
53
|
+
|
|
54
|
+
- [SField](../SField)
|
|
55
|
+
- [SGhostButton](../SGhostButton)
|
|
56
|
+
|
|
57
|
+
### Graph
|
|
58
|
+
|
|
59
|
+
```mermaid
|
|
60
|
+
graph TD;
|
|
61
|
+
SBarcodeInput --> SField
|
|
62
|
+
SBarcodeInput --> SGhostButton
|
|
63
|
+
style SBarcodeInput fill:#f9f,stroke:#333,stroke-width:4px
|
|
64
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# SButton
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SButton
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `color?` | `SButtonColor` | `'primary'` | 색상 — sd-button preset의 색 계열 |
|
|
12
|
+
| `outline?` | `boolean` | `false` | 아웃라인(테두리) 스타일. primary·neutral·danger 만 지원 (secondary 는 무시) |
|
|
13
|
+
| `size?` | `SButtonSize` | `'sm'` | 크기 |
|
|
14
|
+
| `icon?` | `SIconName` | — | 레이블 왼쪽 아이콘 |
|
|
15
|
+
| `rightIcon?` | `SIconName` | — | 레이블 오른쪽 아이콘 |
|
|
16
|
+
| `label?` | `string` | — | 버튼 텍스트 (문자열만 — 아이콘은 icon/rightIcon 사용) |
|
|
17
|
+
|
|
18
|
+
## Dependencies
|
|
19
|
+
|
|
20
|
+
### Used by
|
|
21
|
+
|
|
22
|
+
- [SActionModal](../SActionModal)
|
|
23
|
+
- [SConfirmModal](../SConfirmModal)
|
|
24
|
+
- [SDropdownButton](../SDropdownButton)
|
|
25
|
+
- [SKeyValueTable](../SKeyValueTable)
|
|
26
|
+
- [SLoadingModal](../SLoadingModal)
|
|
27
|
+
- [SPopover](../SPopover)
|
|
28
|
+
- [SPopup](../SPopup)
|
|
29
|
+
- [SToast](../SToast)
|
|
30
|
+
|
|
31
|
+
### Depends on
|
|
32
|
+
|
|
33
|
+
- [SIcon](../SIcon)
|
|
34
|
+
|
|
35
|
+
### Graph
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
graph TD;
|
|
39
|
+
SButton --> SIcon
|
|
40
|
+
SActionModal --> SButton
|
|
41
|
+
SConfirmModal --> SButton
|
|
42
|
+
SDropdownButton --> SButton
|
|
43
|
+
SKeyValueTable --> SButton
|
|
44
|
+
SLoadingModal --> SButton
|
|
45
|
+
SPopover --> SButton
|
|
46
|
+
SPopup --> SButton
|
|
47
|
+
SToast --> SButton
|
|
48
|
+
style SButton fill:#f9f,stroke:#333,stroke-width:4px
|
|
49
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# SCalendar
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SCalendar
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `value?` | `string \| null` | — | 선택 날짜 (YYYY-MM-DD) |
|
|
12
|
+
| `selectable?` | `[string, string]` | — | 선택 가능 범위 [시작, 종료] (빈 문자열이면 제한 없음) |
|
|
13
|
+
| `events?` | `SCalendarEventGroup[]` | — | 이벤트 그룹 (날짜별 점) |
|
|
14
|
+
| `elevated?` | `boolean` | `false` | 카드 그림자 |
|
|
15
|
+
| `className?` | `string` | — | |
|
|
16
|
+
| `style?` | `CSSProperties` | — | |
|
|
17
|
+
|
|
18
|
+
#### Events
|
|
19
|
+
|
|
20
|
+
| Event | Type | Description |
|
|
21
|
+
|-------|------|-------------|
|
|
22
|
+
| `onValueChange` | `(date: string) => void` | 선택 변경 (sdUpdate) |
|
|
23
|
+
| `onViewChange` | `(v: { year: number; month: number }) => void` | 보이는 연·월 변경 (sdViewChange) |
|
|
24
|
+
|
|
25
|
+
## Dependencies
|
|
26
|
+
|
|
27
|
+
### Used by
|
|
28
|
+
|
|
29
|
+
- [SDatePicker](../SDatePicker)
|
|
30
|
+
|
|
31
|
+
### Depends on
|
|
32
|
+
|
|
33
|
+
- [SGhostButton](../SGhostButton)
|
|
34
|
+
|
|
35
|
+
### Graph
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
graph TD;
|
|
39
|
+
SCalendar --> SGhostButton
|
|
40
|
+
SDatePicker --> SCalendar
|
|
41
|
+
style SCalendar fill:#f9f,stroke:#333,stroke-width:4px
|
|
42
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# SCallout
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SCallout
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `type?` | `SCalloutType` | `'default'` | 콜아웃 타입 (색상·아이콘·타이틀 결정) |
|
|
12
|
+
| `message?` | `SCalloutMessage[]` | `[]` | 표시할 메시지 목록 (배열 중첩으로 depth 표현). 각 문자열은 인라인 HTML(`<b>`, `<a>` 등)을 허용하며 sanitizeInlineHtml 로 살균 후 렌더된다. |
|
|
13
|
+
| `children?` | `ReactNode` | — | message 대신 직접 본문을 넣을 때 |
|
|
14
|
+
| `className?` | `string` | — | |
|
|
15
|
+
| `style?` | `CSSProperties` | — | |
|
|
16
|
+
|
|
17
|
+
## Dependencies
|
|
18
|
+
|
|
19
|
+
### Depends on
|
|
20
|
+
|
|
21
|
+
- [SIcon](../SIcon)
|
|
22
|
+
|
|
23
|
+
### Graph
|
|
24
|
+
|
|
25
|
+
```mermaid
|
|
26
|
+
graph TD;
|
|
27
|
+
SCallout --> SIcon
|
|
28
|
+
style SCallout fill:#f9f,stroke:#333,stroke-width:4px
|
|
29
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# SCard
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SCard
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `bordered?` | `boolean` | `false` | 테두리 표시 여부 |
|
|
12
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# SCheckbox
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SCheckbox
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `value?` | `SCheckboxValue` | `false` | 선택 상태. boolean(단일) / 배열(그룹) / null(indeterminate) |
|
|
12
|
+
| `val?` | `unknown` | — | 배열(그룹) 모드에서 이 체크박스의 값 |
|
|
13
|
+
| `label?` | `string` | `''` | 라벨 |
|
|
14
|
+
| `disabled?` | `boolean` | `false` | 비활성 |
|
|
15
|
+
| `inverse?` | `boolean` | `false` | 어두운 배경용 흰색 스타일 |
|
|
16
|
+
| `className?` | `string` | — | |
|
|
17
|
+
| `style?` | `CSSProperties` | — | |
|
|
18
|
+
|
|
19
|
+
#### Events
|
|
20
|
+
|
|
21
|
+
| Event | Type | Description |
|
|
22
|
+
|-------|------|-------------|
|
|
23
|
+
| `onValueChange` | `(value: boolean \| unknown[]) => void` | 값 변경 (sdUpdate) |
|
|
24
|
+
|
|
25
|
+
## Dependencies
|
|
26
|
+
|
|
27
|
+
### Used by
|
|
28
|
+
|
|
29
|
+
- [SKeyValueTable](../SKeyValueTable)
|
|
30
|
+
- [STable](../STable)
|
|
31
|
+
|
|
32
|
+
### Depends on
|
|
33
|
+
|
|
34
|
+
- [SIcon](../SIcon)
|
|
35
|
+
|
|
36
|
+
### Graph
|
|
37
|
+
|
|
38
|
+
```mermaid
|
|
39
|
+
graph TD;
|
|
40
|
+
SCheckbox --> SIcon
|
|
41
|
+
SKeyValueTable --> SCheckbox
|
|
42
|
+
STable --> SCheckbox
|
|
43
|
+
style SCheckbox fill:#f9f,stroke:#333,stroke-width:4px
|
|
44
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# SChip
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SChip
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `name?` | `string` | — | 폼 연동용 name |
|
|
12
|
+
| `value?` | `string` | `''` | 칩 텍스트 값 |
|
|
13
|
+
| `error?` | `boolean` | — | 에러 상태 |
|
|
14
|
+
| `disabled?` | `boolean` | `false` | 비활성 |
|
|
15
|
+
| `editable?` | `boolean` | `false` | 인라인 편집 가능 (기본값 false) |
|
|
16
|
+
| `showRemove?` | `boolean` | `true` | 닫기 버튼 표시 |
|
|
17
|
+
| `placeholder?` | `string` | `''` | 편집 중 placeholder |
|
|
18
|
+
| `rules?` | `Rule[]` | — | 유효성 규칙 |
|
|
19
|
+
| `className?` | `string` | — | |
|
|
20
|
+
| `style?` | `CSSProperties` | — | |
|
|
21
|
+
|
|
22
|
+
#### Events
|
|
23
|
+
|
|
24
|
+
| Event | Type | Description |
|
|
25
|
+
|-------|------|-------------|
|
|
26
|
+
| `onValueChange` | `(value: string) => void` | 편집 완료 (sdUpdate) |
|
|
27
|
+
| `onRemove` | `() => void` | 삭제 (sdRemove) |
|
|
28
|
+
| `onFocus` | `() => void` | 편집 진입 (sdFocus) |
|
|
29
|
+
| `onBlur` | `() => void` | 편집 이탈 (sdBlur) |
|
|
30
|
+
|
|
31
|
+
#### Methods (ref)
|
|
32
|
+
|
|
33
|
+
| Method | Type | Description |
|
|
34
|
+
|--------|------|-------------|
|
|
35
|
+
| `focus` | `() => void` | 편집 input에 포커스합니다. |
|
|
36
|
+
| `getNativeElement` | `() => HTMLElement \| null` | 네이티브 편집 엘리먼트를 반환합니다. |
|
|
37
|
+
|
|
38
|
+
## Dependencies
|
|
39
|
+
|
|
40
|
+
### Used by
|
|
41
|
+
|
|
42
|
+
- [SChipInput](../SChipInput)
|
|
43
|
+
- [SFilePicker](../SFilePicker)
|
|
44
|
+
|
|
45
|
+
### Depends on
|
|
46
|
+
|
|
47
|
+
- [SGhostButton](../SGhostButton)
|
|
48
|
+
|
|
49
|
+
### Graph
|
|
50
|
+
|
|
51
|
+
```mermaid
|
|
52
|
+
graph TD;
|
|
53
|
+
SChip --> SGhostButton
|
|
54
|
+
SChipInput --> SChip
|
|
55
|
+
SFilePicker --> SChip
|
|
56
|
+
style SChip fill:#f9f,stroke:#333,stroke-width:4px
|
|
57
|
+
```
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# SChipInput
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SChipInput
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `values?` | `string[]` | `[]` | 칩 값 목록 |
|
|
12
|
+
| `errors?` | `boolean[] \| ((value: string) => boolean)` | `[]` | 칩별 에러 (배열 또는 판별 함수) |
|
|
13
|
+
| `disabledChips?` | `boolean[] \| ((value: string) => boolean)` | `[]` | 칩별 비활성 (배열 또는 판별 함수) |
|
|
14
|
+
| `size?` | `SChipInputSize` | `'sm'` | |
|
|
15
|
+
| `disabled?` | `boolean` | `false` | |
|
|
16
|
+
| `placeholder?` | `string` | `'태그 입력 (Enter로 등록 / 콤마로 구분 / 띄어쓰기 불가)'` | |
|
|
17
|
+
| `name?` | `string` | — | |
|
|
18
|
+
| `rules?` | `Rule[]` | — | |
|
|
19
|
+
| `error?` | `boolean` | — | |
|
|
20
|
+
| `useReset?` | `boolean` | `false` | 입력 초기화 버튼 표시 |
|
|
21
|
+
| `maxCount?` | `number` | — | 최대 칩 개수 |
|
|
22
|
+
| `metaPlacement?` | `SChipInputMetaPlacement` | `'end'` | 최대 개수·초기화 meta 위치 |
|
|
23
|
+
| `duplicateLabel?` | `string` | — | 중복 에러 메시지 항목명 |
|
|
24
|
+
| `suggestions?` | `string[]` | `[]` | 자동완성 후보 |
|
|
25
|
+
| `loadingSuggestions?` | `boolean` | `false` | |
|
|
26
|
+
| `recommendedItems?` | `string[]` | `[]` | 추천 항목 (입력값 없을 때) |
|
|
27
|
+
| `loadingRecommendedItems?` | `boolean` | `false` | |
|
|
28
|
+
| `dropdownMinWidth?` | `number \| string` | `200` | 드롭다운 최소 너비 (숫자=px) |
|
|
29
|
+
| `label?` | `string` | — | |
|
|
30
|
+
| `labelWidth?` | `number \| string` | — | |
|
|
31
|
+
| `hint?` | `string` | — | |
|
|
32
|
+
| `errorMessage?` | `string` | — | |
|
|
33
|
+
| `width?` | `number \| string` | — | |
|
|
34
|
+
| `status?` | `SFieldStatus` | — | |
|
|
35
|
+
| `icon?` | `SIconName` | — | |
|
|
36
|
+
| `iconColor?` | `SColor` | — | |
|
|
37
|
+
| `labelTooltip?` | `string` | — | |
|
|
38
|
+
| `labelTooltipProps?` | `Partial<STooltipProps>` | — | |
|
|
39
|
+
| `className?` | `string` | — | |
|
|
40
|
+
| `style?` | `CSSProperties` | — | |
|
|
41
|
+
|
|
42
|
+
#### Events
|
|
43
|
+
|
|
44
|
+
| Event | Type | Description |
|
|
45
|
+
|-------|------|-------------|
|
|
46
|
+
| `onValueChange` | `(values: string[]) => void` | 값 변경 (sdUpdate) — 전체 배열 |
|
|
47
|
+
| `onInput` | `(value: string) => void` | 입력 중 문자열 변경 (sdInput) |
|
|
48
|
+
| `onFocus` | `() => void` | |
|
|
49
|
+
| `onBlur` | `() => void` | |
|
|
50
|
+
|
|
51
|
+
#### Methods (ref)
|
|
52
|
+
|
|
53
|
+
| Method | Type | Description |
|
|
54
|
+
|--------|------|-------------|
|
|
55
|
+
| `focus` | `() => void` | 입력 필드에 포커스를 이동합니다. |
|
|
56
|
+
|
|
57
|
+
## Dependencies
|
|
58
|
+
|
|
59
|
+
### Depends on
|
|
60
|
+
|
|
61
|
+
- [SChip](../SChip)
|
|
62
|
+
- [SField](../SField)
|
|
63
|
+
- [SIcon](../SIcon)
|
|
64
|
+
- [SPortal](../SPortal)
|
|
65
|
+
- [STextLink](../STextLink)
|
|
66
|
+
|
|
67
|
+
### Graph
|
|
68
|
+
|
|
69
|
+
```mermaid
|
|
70
|
+
graph TD;
|
|
71
|
+
SChipInput --> SChip
|
|
72
|
+
SChipInput --> SField
|
|
73
|
+
SChipInput --> SIcon
|
|
74
|
+
SChipInput --> SPortal
|
|
75
|
+
SChipInput --> STextLink
|
|
76
|
+
style SChipInput fill:#f9f,stroke:#333,stroke-width:4px
|
|
77
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# SCircleProgress
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SCircleProgress
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `value?` | `number` | `0` | 진행률 (0–100) |
|
|
12
|
+
| `type?` | `SCircleProgressType` | `'primary'` | 색상 테마 |
|
|
13
|
+
| `indeterminate?` | `boolean` | `false` | 불확정(스피너) 모드 — value 무시 |
|
|
14
|
+
| `label?` | `string` | — | 하단 레이블 |
|
|
15
|
+
| `innerValue?` | `boolean` | `false` | true면 퍼센트를 원 아래가 아닌 원 가운데에 표시 |
|
|
16
|
+
| `className?` | `string` | — | |
|
|
17
|
+
| `style?` | `CSSProperties` | — | |
|
|
18
|
+
|
|
19
|
+
## Dependencies
|
|
20
|
+
|
|
21
|
+
### Used by
|
|
22
|
+
|
|
23
|
+
- [SLoadingContainer](../SLoadingContainer)
|
|
24
|
+
- [SLoadingModal](../SLoadingModal)
|
|
25
|
+
- [STable](../STable)
|
|
26
|
+
|
|
27
|
+
### Graph
|
|
28
|
+
|
|
29
|
+
```mermaid
|
|
30
|
+
graph TD;
|
|
31
|
+
SLoadingContainer --> SCircleProgress
|
|
32
|
+
SLoadingModal --> SCircleProgress
|
|
33
|
+
STable --> SCircleProgress
|
|
34
|
+
style SCircleProgress fill:#f9f,stroke:#333,stroke-width:4px
|
|
35
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# SConfirmModal
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SConfirmModal
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `open?` | `boolean` | — | |
|
|
12
|
+
| `persistent?` | `boolean` | — | true면 백드롭·ESC로 안 닫히고 흔들림 (sd-modal-container persistent) |
|
|
13
|
+
| `type?` | `SConfirmModalType` | `'positive'` | 타입 (아이콘·메인버튼 색 결정) |
|
|
14
|
+
| `modalTitle?` | `string` | `''` | |
|
|
15
|
+
| `titleClass?` | `string` | — | 제목 엘리먼트에 추가할 클래스 (sd-confirm-modal titleClass) |
|
|
16
|
+
| `topMessage?` | `string[]` | `[]` | 콘텐츠 박스 상단 메시지 목록 (각 항목이 한 줄, HTML 문자열 허용 — innerHTML 렌더링) |
|
|
17
|
+
| `bottomMessage?` | `string[]` | `[]` | 콘텐츠 박스 하단 메시지 목록 (각 항목이 한 줄, HTML 문자열 허용 — innerHTML 렌더링) |
|
|
18
|
+
| `tagLabel?` | `string` | — | tag 슬롯 기본 태그 레이블 (tagSlot 미지정 시) |
|
|
19
|
+
| `tagShape?` | `STagShape` | `'square'` | 태그 프리셋 (shape/size/color) — sd-confirm-modal tagPreset 대응 |
|
|
20
|
+
| `tagSize?` | `STagSize` | `'sm'` | |
|
|
21
|
+
| `tagColor?` | `STagColor` | `'grey'` | |
|
|
22
|
+
| `slotLabel?` | `string` | — | 콘텐츠 박스에서 태그 오른쪽에 오는 텍스트 (optionSlot 미지정 시) |
|
|
23
|
+
| `tagSlot?` | `ReactNode` | — | 콘텐츠 박스 tag 위치 커스텀 콘텐츠 (미지정 시 tagLabel 기반 STag) |
|
|
24
|
+
| `optionSlot?` | `ReactNode` | — | 콘텐츠 박스에서 태그 오른쪽 커스텀 콘텐츠 (미지정 시 slotLabel 텍스트) |
|
|
25
|
+
| `mainButtonLabel?` | `string` | `'확인'` | 메인 버튼 |
|
|
26
|
+
| `mainButtonName?` | `ConfirmModalMainButton` | — | 확인 버튼 프리셋 (없으면 type에 따라 자동 결정) |
|
|
27
|
+
| `subButtonLabel?` | `string` | — | 서브(취소) 버튼 |
|
|
28
|
+
|
|
29
|
+
#### Events
|
|
30
|
+
|
|
31
|
+
| Event | Type | Description |
|
|
32
|
+
|-------|------|-------------|
|
|
33
|
+
| `onOpenChange` | `(open: boolean) => void` | |
|
|
34
|
+
| `onOk` | `() => void` | 확인 버튼 클릭 (sdOk) |
|
|
35
|
+
| `onCancel` | `() => void` | |
|
|
36
|
+
| `onClose` | `() => void` | 닫기(X) 버튼 클릭 (sdClose) |
|
|
37
|
+
|
|
38
|
+
## Dependencies
|
|
39
|
+
|
|
40
|
+
### Used by
|
|
41
|
+
|
|
42
|
+
- [SModal](../SModal)
|
|
43
|
+
|
|
44
|
+
### Depends on
|
|
45
|
+
|
|
46
|
+
- [SButton](../SButton)
|
|
47
|
+
- [SIcon](../SIcon)
|
|
48
|
+
- [SModalContainer](../SModalContainer)
|
|
49
|
+
- [STag](../STag)
|
|
50
|
+
|
|
51
|
+
### Graph
|
|
52
|
+
|
|
53
|
+
```mermaid
|
|
54
|
+
graph TD;
|
|
55
|
+
SConfirmModal --> SButton
|
|
56
|
+
SConfirmModal --> SIcon
|
|
57
|
+
SConfirmModal --> SModalContainer
|
|
58
|
+
SConfirmModal --> STag
|
|
59
|
+
SModal --> SConfirmModal
|
|
60
|
+
style SConfirmModal fill:#f9f,stroke:#333,stroke-width:4px
|
|
61
|
+
```
|