sellmate-design-system-react 9.0.0-beta.2 → 9.0.0-beta.21
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 +488 -90
- package/README.md +101 -0
- package/dist/components/SBadge/README.md +24 -0
- package/dist/components/SBadge/SBadge.d.ts +1 -1
- package/dist/components/SBarcodeInput/README.md +9 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +7 -1
- package/dist/components/SButton/README.md +36 -0
- package/dist/components/SCalendar/README.md +13 -0
- package/dist/components/SCallout/README.md +15 -0
- package/dist/components/SCard/README.md +16 -0
- package/dist/components/SCard/SCard.d.ts +17 -2
- package/dist/components/SCheckbox/README.md +8 -0
- package/dist/components/SChipFilter/README.md +288 -5
- package/dist/components/SChipFilter/SChipFilter.d.ts +95 -40
- package/dist/components/SChipFilter/index.d.ts +1 -1
- package/dist/components/SChipInput/README.md +15 -1
- package/dist/components/SChipInput/SChipInput.d.ts +7 -1
- package/dist/components/SCircleProgress/README.md +8 -0
- package/dist/components/SConfirmModal/README.md +16 -0
- package/dist/components/SDatePicker/README.md +60 -4
- package/dist/components/SDatePicker/SDatePicker.d.ts +61 -5
- package/dist/components/SDatePicker/index.d.ts +1 -1
- package/dist/components/SDateRangePicker/README.md +17 -2
- package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +16 -3
- package/dist/components/SDivider/README.md +4 -0
- package/dist/components/SDraggableItem/README.md +37 -0
- package/dist/components/SDraggableItem/SDraggableItem.d.ts +2 -0
- package/dist/components/SDraggableList/README.md +29 -0
- package/dist/components/SDraggableList/SDraggableList.d.ts +10 -0
- package/dist/components/SDraggableList/index.d.ts +1 -1
- package/dist/components/SDrawer/README.md +8 -0
- package/dist/components/SDropdownButton/README.md +19 -0
- package/dist/components/SEditor/EditorBody.d.ts +40 -0
- package/dist/components/SEditor/EditorToolbar.d.ts +87 -0
- package/dist/components/SEditor/README.md +230 -0
- package/dist/components/SEditor/SEditor.d.ts +124 -0
- package/dist/components/SEditor/editor-icons.d.ts +59 -0
- package/dist/components/SEditor/editor.config.d.ts +85 -0
- package/dist/components/SEditor/index.d.ts +2 -0
- package/dist/components/SEditor/tiptap-api.d.ts +29 -0
- package/dist/components/SEditor/use-is-mobile.d.ts +14 -0
- package/dist/components/SExpansionItem/README.md +36 -0
- package/dist/components/SField/README.md +27 -2
- package/dist/components/SField/SField.d.ts +22 -4
- package/dist/components/SFilePicker/README.md +15 -1
- package/dist/components/SFilePicker/SFilePicker.d.ts +7 -1
- package/dist/components/SFooter/README.md +25 -0
- package/dist/components/SFooter/SFooter.d.ts +4 -3
- package/dist/components/SForm/README.md +11 -0
- package/dist/components/SGhostButton/README.md +20 -2
- package/dist/components/SGnb/README.md +45 -0
- package/dist/components/SGnb/gnb.config.d.ts +7 -0
- package/dist/components/SGuide/README.md +15 -0
- package/dist/components/SIcon/README.md +4 -0
- package/dist/components/SIcon/SIcon.d.ts +1 -1
- package/dist/components/SIcon/icons.gen.d.ts +2 -0
- package/dist/components/SImage/README.md +14 -0
- package/dist/components/SInput/README.md +3 -1
- package/dist/components/SInput/SInput.d.ts +7 -1
- package/dist/components/SKeyValueTable/README.md +87 -0
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +14 -3
- package/dist/components/SLayout/README.md +16 -0
- package/dist/components/SLinearProgress/README.md +8 -0
- package/dist/components/SList/README.md +5 -1
- package/dist/components/SList/SList.d.ts +0 -2
- package/dist/components/SListItem/README.md +41 -0
- package/dist/components/SLoadingModal/README.md +8 -0
- package/dist/components/SNumberInput/README.md +9 -1
- package/dist/components/SNumberInput/SNumberInput.d.ts +7 -1
- package/dist/components/SPage/README.md +41 -1
- package/dist/components/SPage/SPage.d.ts +24 -2
- package/dist/components/SPage/index.d.ts +1 -1
- package/dist/components/SPage/page.config.d.ts +8 -0
- package/dist/components/SPopover/README.md +15 -0
- package/dist/components/SPopup/README.md +19 -0
- package/dist/components/SPortal/README.md +14 -0
- package/dist/components/SRadio/README.md +20 -0
- package/dist/components/SRadioButton/README.md +18 -0
- package/dist/components/SScrollArea/README.md +14 -0
- package/dist/components/SSearchInput/README.md +61 -0
- package/dist/components/SSearchInput/SSearchInput.d.ts +52 -0
- package/dist/components/SSearchInput/index.d.ts +1 -0
- package/dist/components/SSectionHeaderCard/README.md +44 -20
- package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +31 -14
- package/dist/components/SSectionHeaderCard/index.d.ts +1 -1
- package/dist/components/SSelect/README.md +23 -3
- package/dist/components/SSelect/SSelect.d.ts +13 -1
- package/dist/components/SSplitter/README.md +15 -0
- package/dist/components/SStepper/README.md +26 -0
- package/dist/components/SSwitch/README.md +13 -0
- package/dist/components/STable/README.md +72 -1
- package/dist/components/STable/STable.d.ts +129 -11
- package/dist/components/STable/index.d.ts +1 -1
- package/dist/components/STabs/README.md +12 -1
- package/dist/components/STabs/STabs.d.ts +2 -4
- package/dist/components/STabs/index.d.ts +1 -1
- package/dist/components/STabs/tabs.config.d.ts +3 -4
- package/dist/components/STag/README.md +47 -0
- package/dist/components/STextLink/README.md +17 -0
- package/dist/components/STextLink/STextLink.d.ts +2 -0
- package/dist/components/STextarea/README.md +1 -1
- package/dist/components/STextarea/STextarea.d.ts +7 -1
- package/dist/components/STimePicker/README.md +15 -1
- package/dist/components/STimePicker/STimePicker.d.ts +7 -1
- package/dist/components/STimePicker/timepicker.config.d.ts +7 -0
- package/dist/components/STimeRangePicker/README.md +27 -1
- package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +7 -1
- package/dist/components/SToast/README.md +24 -0
- package/dist/components/SToggle/README.md +8 -0
- package/dist/components/STooltip/README.md +22 -0
- package/dist/components/STree/README.md +41 -0
- package/dist/components/STree/STree.d.ts +8 -0
- package/dist/components/STree/index.d.ts +1 -1
- package/dist/index.cjs +4266 -750
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4249 -750
- package/dist/index.js.map +1 -1
- package/dist/lib/field-width.d.ts +31 -0
- package/dist/lib/story-docs.d.ts +19 -3
- package/dist/lib/truncated-value-tooltip.d.ts +18 -0
- package/dist/llms-full.txt +2337 -183
- package/dist/llms.txt +490 -92
- package/dist/styles.css +684 -41
- package/dist/theme.css +22 -6
- package/eslint/index.mjs +10 -0
- package/eslint/lib/table-column.mjs +26 -0
- package/eslint/rules/field-width-grade.d.mts +41 -0
- package/eslint/rules/field-width-grade.mjs +311 -0
- package/eslint/rules/table-column-width.mjs +110 -0
- package/eslint/scale.gen.mjs +3 -0
- package/package.json +13 -1
|
@@ -16,6 +16,53 @@
|
|
|
16
16
|
| `iconLeft?` | `boolean` | `true` | 아이콘을 레이블 왼쪽에 배치 |
|
|
17
17
|
| `width?` | `string \| number` | — | 태그 너비 (숫자면 px, 문자열이면 그대로 적용). 미지정 시 콘텐츠 크기 |
|
|
18
18
|
|
|
19
|
+
## Types
|
|
20
|
+
|
|
21
|
+
### STagShape
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
export type STagShape = (typeof TAG_SHAPES)[number];
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### STagSize
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
export type STagSize = (typeof TAG_SIZES)[number];
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### STagColor
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
export type STagColor = (typeof TAG_COLORS)[number];
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### TAG_SHAPES
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
export const TAG_SHAPES = ['square', 'pill'] as const;
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### TAG_SIZES
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
export const TAG_SIZES = ['xs', 'sm', 'md'] as const;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### TAG_COLORS
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
export const TAG_COLORS = [
|
|
55
|
+
'grey',
|
|
56
|
+
'red',
|
|
57
|
+
'orange',
|
|
58
|
+
'yellow',
|
|
59
|
+
'green',
|
|
60
|
+
'blue',
|
|
61
|
+
'darkblue',
|
|
62
|
+
'indigo',
|
|
63
|
+
] as const;
|
|
64
|
+
```
|
|
65
|
+
|
|
19
66
|
## Dependencies
|
|
20
67
|
|
|
21
68
|
### Used by
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
| `label?` | `string` | `''` | 레이블 |
|
|
12
12
|
| `icon?` | `SIconName` | — | 좌측 아이콘 |
|
|
13
13
|
| `iconColor?` | `SColor` | — | 좌측 아이콘 색상. 팔레트 키(`grey_65`, `red_95` …) 또는 임의 CSS 색상 |
|
|
14
|
+
| `iconRotate?` | `0 \| 90 \| 180 \| 270` | — | 좌측 아이콘 회전 각도. 같은 아이콘을 방향만 바꿔 쓸 때 (`SIcon` 의 `rotate` 로 그대로 간다) |
|
|
14
15
|
| `labelClass?` | `string` | — | 레이블 span에 추가할 클래스 |
|
|
15
16
|
| `rightArrow?` | `STextLinkArrow` | `'none'` | 우측 화살표 |
|
|
16
17
|
| `underline?` | `boolean` | `false` | 밑줄 여부 |
|
|
@@ -24,6 +25,20 @@
|
|
|
24
25
|
|-------|------|-------------|
|
|
25
26
|
| `onClick` | `() => void` | |
|
|
26
27
|
|
|
28
|
+
## Types
|
|
29
|
+
|
|
30
|
+
### STextLinkArrow
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
export type STextLinkArrow = 'none' | 'chevron' | 'caret';
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### STextLinkSize
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
export type STextLinkSize = 'sm' | 'md' | 'lg';
|
|
40
|
+
```
|
|
41
|
+
|
|
27
42
|
## Dependencies
|
|
28
43
|
|
|
29
44
|
### Used by
|
|
@@ -31,6 +46,7 @@
|
|
|
31
46
|
- [SChipFilter](../SChipFilter)
|
|
32
47
|
- [SChipInput](../SChipInput)
|
|
33
48
|
- [SPopover](../SPopover)
|
|
49
|
+
- [STable](../STable)
|
|
34
50
|
|
|
35
51
|
### Depends on
|
|
36
52
|
|
|
@@ -46,5 +62,6 @@ graph TD;
|
|
|
46
62
|
SChipFilter --> STextLink
|
|
47
63
|
SChipInput --> STextLink
|
|
48
64
|
SPopover --> STextLink
|
|
65
|
+
STable --> STextLink
|
|
49
66
|
style STextLink fill:#f9f,stroke:#333,stroke-width:4px
|
|
50
67
|
```
|
|
@@ -10,6 +10,8 @@ export interface STextLinkProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'o
|
|
|
10
10
|
icon?: SIconName;
|
|
11
11
|
/** 좌측 아이콘 색상. 팔레트 키(`grey_65`, `red_95` …) 또는 임의 CSS 색상 */
|
|
12
12
|
iconColor?: SColor;
|
|
13
|
+
/** 좌측 아이콘 회전 각도. 같은 아이콘을 방향만 바꿔 쓸 때 (`SIcon` 의 `rotate` 로 그대로 간다) */
|
|
14
|
+
iconRotate?: 0 | 90 | 180 | 270;
|
|
13
15
|
/** 레이블 span에 추가할 클래스 */
|
|
14
16
|
labelClass?: string;
|
|
15
17
|
/** 우측 화살표 */
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
| `hint?` | `string` | — | |
|
|
28
28
|
| `error?` | `boolean` | — | |
|
|
29
29
|
| `errorMessage?` | `string` | — | |
|
|
30
|
-
| `width?` | `
|
|
30
|
+
| `width?` | `SFieldWidth` | — | 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이. 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다. 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다. |
|
|
31
31
|
| `disabled?` | `boolean` | `false` | |
|
|
32
32
|
| `readOnly?` | `boolean` | `false` | |
|
|
33
33
|
| `className?` | `string` | — | |
|
|
@@ -4,6 +4,7 @@ import { type SIconName } from '../SIcon';
|
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
6
6
|
import { type STooltipProps } from '../STooltip';
|
|
7
|
+
import { type SFieldWidth } from '../../lib/field-width';
|
|
7
8
|
export interface STextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'onChange'> {
|
|
8
9
|
/** 값 (제어) */
|
|
9
10
|
value?: string;
|
|
@@ -41,7 +42,12 @@ export interface STextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextArea
|
|
|
41
42
|
hint?: string;
|
|
42
43
|
error?: boolean;
|
|
43
44
|
errorMessage?: string;
|
|
44
|
-
|
|
45
|
+
/**
|
|
46
|
+
* 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이.
|
|
47
|
+
* 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다.
|
|
48
|
+
* 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다.
|
|
49
|
+
*/
|
|
50
|
+
width?: SFieldWidth;
|
|
45
51
|
disabled?: boolean;
|
|
46
52
|
readOnly?: boolean;
|
|
47
53
|
className?: string;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
| `clearable?` | `boolean` | `false` | |
|
|
17
17
|
| `useMeridiem?` | `boolean` | — | 오전/오후 선택 표시 여부. 지정하지 않으면 type="midday"일 때만 켜집니다. |
|
|
18
18
|
| `minuteStep?` | `number` | `1` | |
|
|
19
|
-
| `width?` | `
|
|
19
|
+
| `width?` | `SFieldWidth` | — | 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이. 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다. 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다. |
|
|
20
20
|
| `name?` | `string` | — | |
|
|
21
21
|
| `rules?` | `Rule[]` | — | |
|
|
22
22
|
| `status?` | `SFieldStatus` | — | |
|
|
@@ -41,6 +41,20 @@
|
|
|
41
41
|
| `onValueChange` | `(time: string \| null) => void` | 선택 변경 (sdUpdate) |
|
|
42
42
|
| `onOpenChange` | `(open: boolean) => void` | 열림/닫힘 변경 (sdDropDownShow) |
|
|
43
43
|
|
|
44
|
+
## Types
|
|
45
|
+
|
|
46
|
+
### STimePickerType
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
export type STimePickerType = 'default' | 'midday';
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### STimePickerSize
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
export type STimePickerSize = 'sm' | 'md';
|
|
56
|
+
```
|
|
57
|
+
|
|
44
58
|
## Dependencies
|
|
45
59
|
|
|
46
60
|
### Used by
|
|
@@ -5,6 +5,7 @@ import { type SColor } from '../../lib/color';
|
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
6
6
|
import { type STooltipProps } from '../STooltip';
|
|
7
7
|
import { type STimePickerSize, type STimePickerType } from './timepicker.config';
|
|
8
|
+
import { type SFieldWidth } from '../../lib/field-width';
|
|
8
9
|
export type { STimePickerSize, STimePickerType } from './timepicker.config';
|
|
9
10
|
export interface STimePickerProps {
|
|
10
11
|
/** 선택 시간 (HH:mm) */
|
|
@@ -22,7 +23,12 @@ export interface STimePickerProps {
|
|
|
22
23
|
/** 오전/오후 선택 표시 여부. 지정하지 않으면 type="midday"일 때만 켜집니다. */
|
|
23
24
|
useMeridiem?: boolean;
|
|
24
25
|
minuteStep?: number;
|
|
25
|
-
|
|
26
|
+
/**
|
|
27
|
+
* 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이.
|
|
28
|
+
* 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다.
|
|
29
|
+
* 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다.
|
|
30
|
+
*/
|
|
31
|
+
width?: SFieldWidth;
|
|
26
32
|
name?: string;
|
|
27
33
|
rules?: Rule[];
|
|
28
34
|
status?: SFieldStatus;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type SFieldWidthGrade } from '../../lib/field-width';
|
|
1
2
|
export type STimePickerSize = 'sm' | 'md';
|
|
2
3
|
export type STimePickerType = 'default' | 'midday';
|
|
3
4
|
export type STimePickerMeridiem = 'AM' | 'PM';
|
|
@@ -12,6 +13,12 @@ export declare const TIMEPICKER_SIZE_CONFIG: Record<STimePickerSize, {
|
|
|
12
13
|
lineHeight: number;
|
|
13
14
|
minWidth: number;
|
|
14
15
|
fieldMinWidth: number;
|
|
16
|
+
/**
|
|
17
|
+
* 필드 상한(폭 등급). 값 길이가 HH:mm 으로 정해져 있어, width="100%" 를 받아도 행 전체로
|
|
18
|
+
* 늘어나지 않게 막는다 (SKeyValueTable 이 모든 컨트롤에 100% 를 넘긴다).
|
|
19
|
+
* px 가 아니라 등급으로 두어 `--cmp-field-width-*` 가 바뀌면 함께 따라가게 한다.
|
|
20
|
+
*/
|
|
21
|
+
fieldMaxWidth: SFieldWidthGrade;
|
|
15
22
|
}>;
|
|
16
23
|
export declare function clampTimePart(value: number, min: number, max: number): number;
|
|
17
24
|
export declare function padTimePart(value: number): string;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
| `useMeridiem?` | `boolean` | — | 오전/오후 선택 표시 여부. 지정하지 않으면 type="midday"일 때만 켜집니다. |
|
|
18
18
|
| `minuteStep?` | `number` | `1` | |
|
|
19
19
|
| `rangeOrder?` | `STimeRangePickerRangeOrder` | `'strict'` | 범위 순서 정책. strict는 시작 시간이 종료 시간보다 늦어지지 않도록 보정합니다. |
|
|
20
|
-
| `width?` | `
|
|
20
|
+
| `width?` | `SFieldWidth` | — | 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이. 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다. 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다. |
|
|
21
21
|
| `name?` | `string` | — | |
|
|
22
22
|
| `rules?` | `Rule[]` | — | |
|
|
23
23
|
| `status?` | `SFieldStatus` | — | |
|
|
@@ -42,6 +42,32 @@
|
|
|
42
42
|
| `onValueChange` | `(range: STimeRangeValue) => void` | 선택 변경 (sdUpdate) |
|
|
43
43
|
| `onOpenChange` | `(open: boolean) => void` | 열림/닫힘 변경 (sdDropDownShow) |
|
|
44
44
|
|
|
45
|
+
## Types
|
|
46
|
+
|
|
47
|
+
### STimeRangeValue
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
export type STimeRangeValue = [string, string] | null;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### STimeRangePickerType
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
export type STimeRangePickerType = STimePickerType;
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### STimeRangePickerSize
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
export type STimeRangePickerSize = STimePickerSize;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### STimeRangePickerRangeOrder
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
export type STimeRangePickerRangeOrder = 'strict' | 'allow-cross-day';
|
|
69
|
+
```
|
|
70
|
+
|
|
45
71
|
## Dependencies
|
|
46
72
|
|
|
47
73
|
### Depends on
|
|
@@ -6,6 +6,7 @@ import { type Rule } from '../../lib/form';
|
|
|
6
6
|
import { type STooltipProps } from '../STooltip';
|
|
7
7
|
import { type STimeRangePickerRangeOrder, type STimeRangePickerSize, type STimeRangePickerType, type STimeRangeValue } from './time-range-picker.config';
|
|
8
8
|
export type { STimeRangePickerSize, STimeRangePickerRangeOrder, STimeRangePickerType, STimeRangeValue, } from './time-range-picker.config';
|
|
9
|
+
import { type SFieldWidth } from '../../lib/field-width';
|
|
9
10
|
export interface STimeRangePickerProps {
|
|
10
11
|
/** 선택 시간 범위 [시작, 종료] (HH:mm) */
|
|
11
12
|
value?: STimeRangeValue;
|
|
@@ -24,7 +25,12 @@ export interface STimeRangePickerProps {
|
|
|
24
25
|
minuteStep?: number;
|
|
25
26
|
/** 범위 순서 정책. strict는 시작 시간이 종료 시간보다 늦어지지 않도록 보정합니다. */
|
|
26
27
|
rangeOrder?: STimeRangePickerRangeOrder;
|
|
27
|
-
|
|
28
|
+
/**
|
|
29
|
+
* 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이.
|
|
30
|
+
* 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다.
|
|
31
|
+
* 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다.
|
|
32
|
+
*/
|
|
33
|
+
width?: SFieldWidth;
|
|
28
34
|
name?: string;
|
|
29
35
|
rules?: Rule[];
|
|
30
36
|
status?: SFieldStatus;
|
|
@@ -51,6 +51,30 @@
|
|
|
51
51
|
| `onClose` | `() => void` | 닫기 (sdClose) |
|
|
52
52
|
| `onButtonClick` | `(e: MouseEvent) => void` | 버튼 클릭 (sdButtonClick) |
|
|
53
53
|
|
|
54
|
+
## Types
|
|
55
|
+
|
|
56
|
+
### SToastPosition
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
export type SToastPosition =
|
|
60
|
+
'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### SToastNotifyOptions
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
export interface SToastNotifyOptions extends Omit<SToastProps, 'onClose'> {
|
|
67
|
+
/** 자동 닫힘 지연(ms). 0이면 자동 닫힘 없음 (없으면 defaultDuration) */
|
|
68
|
+
duration?: number;
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### SToastType
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
export type SToastType = 'default' | 'danger' | 'caution' | 'complete' | 'accent' | 'info';
|
|
76
|
+
```
|
|
77
|
+
|
|
54
78
|
## Dependencies
|
|
55
79
|
|
|
56
80
|
### Depends on
|
|
@@ -40,6 +40,26 @@
|
|
|
40
40
|
| `show` | `() => void` | 툴팁을 표시합니다. |
|
|
41
41
|
| `hide` | `() => void` | 툴팁을 숨깁니다. |
|
|
42
42
|
|
|
43
|
+
## Types
|
|
44
|
+
|
|
45
|
+
### STooltipTrigger
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
export type STooltipTrigger = 'hover' | 'click' | 'none';
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### STooltipPlacement
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
export type STooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### STooltipType
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
export type STooltipType = 'default' | 'danger' | 'warning' | 'accent';
|
|
61
|
+
```
|
|
62
|
+
|
|
43
63
|
## Dependencies
|
|
44
64
|
|
|
45
65
|
### Used by
|
|
@@ -49,6 +69,7 @@
|
|
|
49
69
|
- [SKeyValueTable](../SKeyValueTable)
|
|
50
70
|
- [SSectionHeaderCard](../SSectionHeaderCard)
|
|
51
71
|
- [SStepper](../SStepper)
|
|
72
|
+
- [STable](../STable)
|
|
52
73
|
|
|
53
74
|
### Depends on
|
|
54
75
|
|
|
@@ -66,5 +87,6 @@ graph TD;
|
|
|
66
87
|
SKeyValueTable --> STooltip
|
|
67
88
|
SSectionHeaderCard --> STooltip
|
|
68
89
|
SStepper --> STooltip
|
|
90
|
+
STable --> STooltip
|
|
69
91
|
style STooltip fill:#f9f,stroke:#333,stroke-width:4px
|
|
70
92
|
```
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
| `border?` | `boolean` | `true` | 아이템 하단 border 표시 여부 |
|
|
19
19
|
| `indeterminate?` | `boolean` | `false` | 일부 선택 상태 |
|
|
20
20
|
| `selectable?` | `boolean` | `true` | 체크박스 표시 여부 |
|
|
21
|
+
| `size?` | `STreeSize` | `'sm'` | 타이포그래피 크기 |
|
|
21
22
|
| `leading?` | `ReactNode \| ((state: STreeItemRenderState) => ReactNode)` | — | 사용자 지정 leading 콘텐츠 |
|
|
22
23
|
| `trailing?` | `ReactNode \| ((state: STreeItemRenderState) => ReactNode)` | — | 사용자 지정 trailing 콘텐츠 |
|
|
23
24
|
|
|
@@ -40,6 +41,8 @@
|
|
|
40
41
|
| `expandedIds?` | `string[]` | — | 펼쳐진 노드 ID 목록 |
|
|
41
42
|
| `defaultExpandedIds?` | `string[]` | — | 비제어 펼침 초기값 |
|
|
42
43
|
| `selectable?` | `boolean` | `true` | 체크박스 표시 여부 |
|
|
44
|
+
| `size?` | `STreeSize` | `'sm'` | 타이포그래피 크기 |
|
|
45
|
+
| `useAll?` | `boolean` | `false` | 체크박스 사용 시 최상단 전체 선택 아이템 표시 여부 |
|
|
43
46
|
| `guideline?` | `boolean` | `true` | depth 연결선 표시 여부 |
|
|
44
47
|
| `border?` | `boolean` | `true` | 아이템 하단 border 표시 여부 |
|
|
45
48
|
| `cascadeSelection?` | `boolean` | `true` | 부모 선택 시 하위 노드까지 함께 토글 |
|
|
@@ -53,6 +56,44 @@
|
|
|
53
56
|
| `onValueChange` | `(value: string[], node: STreeNode) => void` | 선택 변경 |
|
|
54
57
|
| `onExpandedChange` | `(expandedIds: string[], node: STreeNode) => void` | 펼침 변경 |
|
|
55
58
|
|
|
59
|
+
## Types
|
|
60
|
+
|
|
61
|
+
### STreeNode
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
export interface STreeNode {
|
|
65
|
+
/** 노드 고유 ID */
|
|
66
|
+
id: string;
|
|
67
|
+
/** 노드 라벨 */
|
|
68
|
+
label: ReactNode;
|
|
69
|
+
/** 하위 노드 */
|
|
70
|
+
children?: STreeNode[];
|
|
71
|
+
/** 비활성 상태 */
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### STreeSize
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
export type STreeSize = 'sm' | 'md';
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### STreeItemRenderState
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
export interface STreeItemRenderState {
|
|
86
|
+
node: STreeNode;
|
|
87
|
+
depth: number;
|
|
88
|
+
size: STreeSize;
|
|
89
|
+
expanded: boolean;
|
|
90
|
+
selected: boolean;
|
|
91
|
+
indeterminate: boolean;
|
|
92
|
+
disabled: boolean;
|
|
93
|
+
hasChildren: boolean;
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
56
97
|
## Dependencies
|
|
57
98
|
|
|
58
99
|
### Depends on
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes, type MouseEvent, type ReactNode } from 'react';
|
|
2
|
+
export type STreeSize = 'sm' | 'md';
|
|
2
3
|
export interface STreeNode {
|
|
3
4
|
/** 노드 고유 ID */
|
|
4
5
|
id: string;
|
|
@@ -12,6 +13,7 @@ export interface STreeNode {
|
|
|
12
13
|
export interface STreeItemRenderState {
|
|
13
14
|
node: STreeNode;
|
|
14
15
|
depth: number;
|
|
16
|
+
size: STreeSize;
|
|
15
17
|
expanded: boolean;
|
|
16
18
|
selected: boolean;
|
|
17
19
|
indeterminate: boolean;
|
|
@@ -39,6 +41,8 @@ export interface STreeItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'ch
|
|
|
39
41
|
indeterminate?: boolean;
|
|
40
42
|
/** 체크박스 표시 여부 */
|
|
41
43
|
selectable?: boolean;
|
|
44
|
+
/** 타이포그래피 크기 */
|
|
45
|
+
size?: STreeSize;
|
|
42
46
|
/** 사용자 지정 leading 콘텐츠 */
|
|
43
47
|
leading?: ReactNode | ((state: STreeItemRenderState) => ReactNode);
|
|
44
48
|
/** 사용자 지정 trailing 콘텐츠 */
|
|
@@ -61,6 +65,10 @@ export interface STreeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'childr
|
|
|
61
65
|
defaultExpandedIds?: string[];
|
|
62
66
|
/** 체크박스 표시 여부 */
|
|
63
67
|
selectable?: boolean;
|
|
68
|
+
/** 타이포그래피 크기 */
|
|
69
|
+
size?: STreeSize;
|
|
70
|
+
/** 체크박스 사용 시 최상단 전체 선택 아이템 표시 여부 */
|
|
71
|
+
useAll?: boolean;
|
|
64
72
|
/** depth 연결선 표시 여부 */
|
|
65
73
|
guideline?: boolean;
|
|
66
74
|
/** 아이템 하단 border 표시 여부 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { STree, STreeItem, type STreeItemProps, type STreeItemRenderState, type STreeNode, type STreeProps, } from './STree';
|
|
1
|
+
export { STree, STreeItem, type STreeItemProps, type STreeItemRenderState, type STreeNode, type STreeProps, type STreeSize, } from './STree';
|