sellmate-design-system-react 9.0.0-beta.2 → 9.0.0-beta.20
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 +463 -89
- 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/SCard.d.ts +1 -1
- 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 +21 -0
- 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 +39 -20
- package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +21 -14
- package/dist/components/SSectionHeaderCard/index.d.ts +1 -1
- package/dist/components/SSelect/README.md +25 -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 +3987 -496
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3970 -496
- 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 +2312 -198
- package/dist/llms.txt +465 -91
- package/dist/styles.css +672 -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
|
@@ -27,6 +27,20 @@
|
|
|
27
27
|
| `onLoad` | `(src: string) => void` | 로드 완료. 로드된 src 를 넘긴다 |
|
|
28
28
|
| `onError` | `(event: SyntheticEvent<HTMLImageElement>) => void` | 로드 실패 |
|
|
29
29
|
|
|
30
|
+
## Types
|
|
31
|
+
|
|
32
|
+
### SImageFit
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
export type SImageFit = (typeof IMAGE_FITS)[number];
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### IMAGE_FITS
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
export const IMAGE_FITS = ['cover', 'contain', 'fill', 'none', 'scale-down'] as const;
|
|
42
|
+
```
|
|
43
|
+
|
|
30
44
|
## Dependencies
|
|
31
45
|
|
|
32
46
|
### Depends on
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
| `errorMessage?` | `string` | — | |
|
|
32
32
|
| `addonLabel?` | `string` | — | |
|
|
33
33
|
| `addonAlign?` | `SFieldAddonAlign` | — | 어드온 정렬 |
|
|
34
|
-
| `width?` | `
|
|
34
|
+
| `width?` | `SFieldWidth` | — | 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이. 등급은 `--cmp-field-width-*` 토큰으로 풀리며 `maxLength`(= 스키마 상한)로 고른다. 상한이 `xl` 을 넘거나 상한이 없으면 `"100%"`. (`sellmate/field-width-grade` 가 검사한다) |
|
|
35
35
|
| `disabled?` | `boolean` | `false` | |
|
|
36
36
|
| `readOnly?` | `boolean` | `false` | |
|
|
37
37
|
| `className?` | `string` | — | |
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
|
|
49
49
|
### Used by
|
|
50
50
|
|
|
51
|
+
- [SEditor](../SEditor)
|
|
51
52
|
- [SKeyValueTable](../SKeyValueTable)
|
|
52
53
|
|
|
53
54
|
### Depends on
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
graph TD;
|
|
62
63
|
SInput --> SField
|
|
63
64
|
SInput --> SGhostButton
|
|
65
|
+
SEditor --> SInput
|
|
64
66
|
SKeyValueTable --> SInput
|
|
65
67
|
style SInput fill:#f9f,stroke:#333,stroke-width:4px
|
|
66
68
|
```
|
|
@@ -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 SInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'value' | 'onChange' | 'type' | 'prefix' | 'suffix'> {
|
|
8
9
|
/** 값 (제어) */
|
|
9
10
|
value?: string | number;
|
|
@@ -49,7 +50,12 @@ export interface SInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
49
50
|
addonLabel?: string;
|
|
50
51
|
/** 어드온 정렬 */
|
|
51
52
|
addonAlign?: SFieldAddonAlign;
|
|
52
|
-
|
|
53
|
+
/**
|
|
54
|
+
* 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이.
|
|
55
|
+
* 등급은 `--cmp-field-width-*` 토큰으로 풀리며 `maxLength`(= 스키마 상한)로 고른다.
|
|
56
|
+
* 상한이 `xl` 을 넘거나 상한이 없으면 `"100%"`. (`sellmate/field-width-grade` 가 검사한다)
|
|
57
|
+
*/
|
|
58
|
+
width?: SFieldWidth;
|
|
53
59
|
disabled?: boolean;
|
|
54
60
|
readOnly?: boolean;
|
|
55
61
|
className?: string;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
| `values?` | `Record<string, unknown>` | `{}` | field name을 key로 하는 값 객체 (`{ [name]: value }`). 지정 시 해당 field의 값으로 사용되며, field별 `options.value`보다 우선합니다. `onChange`의 `detail.values`와 함께 controlled 패턴으로 사용합니다. |
|
|
13
13
|
| `search?` | `boolean` | `false` | 우측 검색 패널 |
|
|
14
14
|
| `radius?` | `'default' \| 'useTop' \| 'full'` | `'default'` | border-radius 제어 |
|
|
15
|
+
| `bordered?` | `boolean` | `true` | 바깥 테두리. 기본은 `true`. `SSectionHeaderCard` 의 `padding="none"` 안에 넣어 카드 가장자리까지 채울 때 `false` 로 끈다 — 카드가 이미 바깥 테두리를 그리므로, 켜 두면 1px 두 개가 나란히 놓여 그 변만 2px 로 보인다. |
|
|
15
16
|
| `className?` | `string` | — | |
|
|
16
17
|
| `style?` | `CSSProperties` | — | |
|
|
17
18
|
|
|
@@ -22,6 +23,90 @@
|
|
|
22
23
|
| `onChange` | `(detail: SKeyValueChangeDetail) => void` | 값 변경 (sdChange) |
|
|
23
24
|
| `onSearch` | `() => void` | 검색 클릭 (sdSearch) |
|
|
24
25
|
|
|
26
|
+
## Types
|
|
27
|
+
|
|
28
|
+
### SKeyValueField
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
export type SKeyValueField = SKeyValueFieldBase & SKeyValueFieldByType;
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### SKeyValueChangeDetail
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
/**
|
|
38
|
+
* `onChange` 콜백 detail.
|
|
39
|
+
* 제네릭 `V`에 폼 값 형태(`{ [name]: value }`)를 넘기면 `name`/`value`/`values`가 정밀하게 타이핑됩니다.
|
|
40
|
+
* 미지정 시 `value`는 {@link SKeyValueFieldValue} 유니온으로 잡힙니다.
|
|
41
|
+
*/
|
|
42
|
+
export interface SKeyValueChangeDetail<
|
|
43
|
+
V extends Record<string, SKeyValueFieldValue> = Record<string, SKeyValueFieldValue>,
|
|
44
|
+
> {
|
|
45
|
+
/** 변경된 field의 name */
|
|
46
|
+
name: Extract<keyof V, string>;
|
|
47
|
+
/** 변경된 field의 새 값 */
|
|
48
|
+
value: V[Extract<keyof V, string>];
|
|
49
|
+
/** 변경이 반영된 전체 값 객체 (`{ [name]: value }`). controlled 패턴에서 그대로 상태에 반영하면 됩니다. */
|
|
50
|
+
values: V;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### SKeyValueFieldBase
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
/** field type과 무관한 공통 속성 (레이아웃·레이블·스팬 등) */
|
|
58
|
+
export interface SKeyValueFieldBase {
|
|
59
|
+
name: string;
|
|
60
|
+
label?: string;
|
|
61
|
+
required?: boolean;
|
|
62
|
+
helpText?: string[];
|
|
63
|
+
hideTh?: boolean;
|
|
64
|
+
thRowSpan?: number;
|
|
65
|
+
thColSpan?: number;
|
|
66
|
+
tdRowSpan?: number;
|
|
67
|
+
tdColSpan?: number;
|
|
68
|
+
thWidth?: number | string;
|
|
69
|
+
thClass?: string;
|
|
70
|
+
tdClass?: string;
|
|
71
|
+
/** 셀 커스텀 렌더 (React 확장). 지정 시 type/options는 무시되고 이 노드가 그대로 렌더됩니다. */
|
|
72
|
+
render?: ReactNode;
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### SKeyValueFieldByType
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
/**
|
|
80
|
+
* `type`에 따라 `options`가 해당 컴포넌트의 props로 좁혀지는 discriminated union.
|
|
81
|
+
* `type` 생략 시 `text`로 동작합니다.
|
|
82
|
+
*/
|
|
83
|
+
export type SKeyValueFieldByType =
|
|
84
|
+
| { type?: 'text'; options?: { value?: ReactNode } }
|
|
85
|
+
| { type: 'input'; options?: FieldOptions<SInputProps> }
|
|
86
|
+
| { type: 'textarea'; options?: FieldOptions<STextareaProps> }
|
|
87
|
+
| { type: 'number-input'; options?: FieldOptions<SNumberInputProps> }
|
|
88
|
+
| { type: 'select'; options?: FieldOptions<SSelectProps> }
|
|
89
|
+
| { type: 'radio'; options?: FieldOptions<SRadioGroupProps> }
|
|
90
|
+
| { type: 'checkbox'; options?: FieldOptions<SCheckboxProps> }
|
|
91
|
+
| { type: 'switch'; options?: FieldOptions<SSwitchProps> }
|
|
92
|
+
| { type: 'date-picker'; options?: FieldOptions<SDatePickerProps> }
|
|
93
|
+
| { type: 'date-range-picker'; options?: FieldOptions<SDateRangePickerProps> }
|
|
94
|
+
| { type: 'file-picker'; options?: FieldOptions<SFilePickerProps> };
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### SKeyValueFieldValue
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
/**
|
|
101
|
+
* field type별 `onChange`로 올라오는 값 타입.
|
|
102
|
+
* - `string`: input · textarea · select · radio · date-picker
|
|
103
|
+
* - `number`: number-input
|
|
104
|
+
* - `boolean`: checkbox · switch
|
|
105
|
+
* - `string[]`: date-range-picker
|
|
106
|
+
*/
|
|
107
|
+
export type SKeyValueFieldValue = string | number | boolean | string[];
|
|
108
|
+
```
|
|
109
|
+
|
|
25
110
|
## Dependencies
|
|
26
111
|
|
|
27
112
|
### Depends on
|
|
@@ -36,6 +121,7 @@
|
|
|
36
121
|
- [SNumberInput](../SNumberInput)
|
|
37
122
|
- [SRadio](../SRadio)
|
|
38
123
|
- [SSelect](../SSelect)
|
|
124
|
+
- [SSwitch](../SSwitch)
|
|
39
125
|
- [STextarea](../STextarea)
|
|
40
126
|
- [STooltip](../STooltip)
|
|
41
127
|
|
|
@@ -53,6 +139,7 @@ graph TD;
|
|
|
53
139
|
SKeyValueTable --> SNumberInput
|
|
54
140
|
SKeyValueTable --> SRadio
|
|
55
141
|
SKeyValueTable --> SSelect
|
|
142
|
+
SKeyValueTable --> SSwitch
|
|
56
143
|
SKeyValueTable --> STextarea
|
|
57
144
|
SKeyValueTable --> STooltip
|
|
58
145
|
style SKeyValueTable fill:#f9f,stroke:#333,stroke-width:4px
|
|
@@ -5,10 +5,11 @@ import { type SNumberInputProps } from '../SNumberInput';
|
|
|
5
5
|
import { type SSelectProps } from '../SSelect';
|
|
6
6
|
import { type SRadioGroupProps } from '../SRadio';
|
|
7
7
|
import { type SCheckboxProps } from '../SCheckbox';
|
|
8
|
+
import { type SSwitchProps } from '../SSwitch';
|
|
8
9
|
import { type SDatePickerProps } from '../SDatePicker';
|
|
9
10
|
import { type SDateRangePickerProps } from '../SDateRangePicker';
|
|
10
11
|
import { type SFilePickerProps } from '../SFilePicker';
|
|
11
|
-
export type SKeyValueFieldType = 'text' | 'input' | 'textarea' | 'number-input' | 'select' | 'radio' | 'checkbox' | 'date-picker' | 'date-range-picker' | 'file-picker';
|
|
12
|
+
export type SKeyValueFieldType = 'text' | 'input' | 'textarea' | 'number-input' | 'select' | 'radio' | 'checkbox' | 'switch' | 'date-picker' | 'date-range-picker' | 'file-picker';
|
|
12
13
|
/** field type과 무관한 공통 속성 (레이아웃·레이블·스팬 등) */
|
|
13
14
|
export interface SKeyValueFieldBase {
|
|
14
15
|
name: string;
|
|
@@ -59,6 +60,9 @@ export type SKeyValueFieldByType = {
|
|
|
59
60
|
} | {
|
|
60
61
|
type: 'checkbox';
|
|
61
62
|
options?: FieldOptions<SCheckboxProps>;
|
|
63
|
+
} | {
|
|
64
|
+
type: 'switch';
|
|
65
|
+
options?: FieldOptions<SSwitchProps>;
|
|
62
66
|
} | {
|
|
63
67
|
type: 'date-picker';
|
|
64
68
|
options?: FieldOptions<SDatePickerProps>;
|
|
@@ -74,7 +78,7 @@ export type SKeyValueField = SKeyValueFieldBase & SKeyValueFieldByType;
|
|
|
74
78
|
* field type별 `onChange`로 올라오는 값 타입.
|
|
75
79
|
* - `string`: input · textarea · select · radio · date-picker
|
|
76
80
|
* - `number`: number-input
|
|
77
|
-
* - `boolean`: checkbox
|
|
81
|
+
* - `boolean`: checkbox · switch
|
|
78
82
|
* - `string[]`: date-range-picker
|
|
79
83
|
*/
|
|
80
84
|
export type SKeyValueFieldValue = string | number | boolean | string[];
|
|
@@ -104,6 +108,13 @@ export interface SKeyValueTableProps {
|
|
|
104
108
|
search?: boolean;
|
|
105
109
|
/** border-radius 제어 */
|
|
106
110
|
radius?: 'default' | 'useTop' | 'full';
|
|
111
|
+
/**
|
|
112
|
+
* 바깥 테두리. 기본은 `true`.
|
|
113
|
+
*
|
|
114
|
+
* `SSectionHeaderCard` 의 `padding="none"` 안에 넣어 카드 가장자리까지 채울 때 `false` 로 끈다 —
|
|
115
|
+
* 카드가 이미 바깥 테두리를 그리므로, 켜 두면 1px 두 개가 나란히 놓여 그 변만 2px 로 보인다.
|
|
116
|
+
*/
|
|
117
|
+
bordered?: boolean;
|
|
107
118
|
/** 값 변경 (sdChange) */
|
|
108
119
|
onChange?: (detail: SKeyValueChangeDetail) => void;
|
|
109
120
|
/** 검색 클릭 (sdSearch) */
|
|
@@ -112,5 +123,5 @@ export interface SKeyValueTableProps {
|
|
|
112
123
|
style?: CSSProperties;
|
|
113
124
|
}
|
|
114
125
|
/** SKeyValueTable — sd-key-value-table 포팅. th/td 폼 레이아웃 + 필드 렌더러. */
|
|
115
|
-
export declare function SKeyValueTable({ fields, values, search, radius, onChange, onSearch, className, style, }: SKeyValueTableProps): import("react").JSX.Element | null;
|
|
126
|
+
export declare function SKeyValueTable({ fields, values, search, radius, bordered, onChange, onSearch, className, style, }: SKeyValueTableProps): import("react").JSX.Element | null;
|
|
116
127
|
export {};
|
|
@@ -20,6 +20,22 @@
|
|
|
20
20
|
|-------|------|-------------|
|
|
21
21
|
| `onFoldedChange` | `(folded: boolean) => void` | 접힘 상태 변경 |
|
|
22
22
|
|
|
23
|
+
## Types
|
|
24
|
+
|
|
25
|
+
### SLayoutType
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
/** 메뉴 스타일: box(라운드) / belt(풀폭 행) — 자식 SGnb 의 메뉴 모양 */
|
|
29
|
+
export type SLayoutType = SGnbType;
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### SLayoutHeader
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
/** 레이아웃 구조: fix(좌측 GNB + 페이지 가로 분할) / full(풀폭 상단바 + 아래에 메뉴|페이지) */
|
|
36
|
+
export type SLayoutHeader = SGnbHeader;
|
|
37
|
+
```
|
|
38
|
+
|
|
23
39
|
## Dependencies
|
|
24
40
|
|
|
25
41
|
### Used by
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
| `children?` | `ReactNode` | — | 리스트 컨테이너 내부에 렌더링할 내용 |
|
|
12
12
|
| `useGap?` | `boolean` | `false` | 리스트 아이템 사이 gap 토큰 적용 여부 |
|
|
13
13
|
| `usePadding?` | `boolean` | `false` | 리스트 컨테이너 padding 토큰 적용 여부 |
|
|
14
|
-
| `separator?` | `boolean` | `false` | 아이템 하단 구분선 표시 여부. 테두리를 가진 아이템(`bordered`)에는 쓰지 않는다 |
|
|
15
14
|
|
|
16
15
|
## Dependencies
|
|
17
16
|
|
|
@@ -20,10 +19,15 @@
|
|
|
20
19
|
- [SDraggableList](../SDraggableList)
|
|
21
20
|
- [SExpansionList](../SExpansionList)
|
|
22
21
|
|
|
22
|
+
### Depends on
|
|
23
|
+
|
|
24
|
+
- [SDivider](../SDivider)
|
|
25
|
+
|
|
23
26
|
### Graph
|
|
24
27
|
|
|
25
28
|
```mermaid
|
|
26
29
|
graph TD;
|
|
30
|
+
SList --> SDivider
|
|
27
31
|
SDraggableList --> SList
|
|
28
32
|
SExpansionList --> SList
|
|
29
33
|
style SList fill:#f9f,stroke:#333,stroke-width:4px
|
|
@@ -6,7 +6,5 @@ export interface SListProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
useGap?: boolean;
|
|
7
7
|
/** 리스트 컨테이너 padding 토큰 적용 여부 */
|
|
8
8
|
usePadding?: boolean;
|
|
9
|
-
/** 아이템 하단 구분선 표시 여부. 테두리를 가진 아이템(`bordered`)에는 쓰지 않는다 */
|
|
10
|
-
separator?: boolean;
|
|
11
9
|
}
|
|
12
10
|
export declare const SList: import("react").ForwardRefExoticComponent<SListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -23,6 +23,47 @@
|
|
|
23
23
|
| `size?` | `SListItemSize` | `'sm'` | 타이포그래피 크기 |
|
|
24
24
|
| `disabled?` | `boolean` | `false` | 비활성 상태 여부 |
|
|
25
25
|
|
|
26
|
+
## Types
|
|
27
|
+
|
|
28
|
+
### SListItemSlot
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
export type SListItemSlot = ReactNode | SListItemRenderProp;
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### SListItemSupportingTextPosition
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
export type SListItemSupportingTextPosition = 'right' | 'bottom';
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### SListItemInteraction
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
export type SListItemInteraction = 'chevron';
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### SListItemSize
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
export type SListItemSize = 'sm' | 'md';
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### SListItemRenderProp
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
export type SListItemRenderProp = (state: SListItemRenderState) => ReactNode;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### SListItemRenderState
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
export interface SListItemRenderState {
|
|
62
|
+
hovered: boolean;
|
|
63
|
+
disabled: boolean;
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
26
67
|
## Dependencies
|
|
27
68
|
|
|
28
69
|
### Used by
|
|
@@ -26,6 +26,14 @@
|
|
|
26
26
|
| `onClose` | `() => void` | 닫기(X) 버튼 클릭 (sdClose) — error 상태에서만 노출 |
|
|
27
27
|
| `onButtonClick` | `() => void` | 버튼 클릭 (sdClick) |
|
|
28
28
|
|
|
29
|
+
## Types
|
|
30
|
+
|
|
31
|
+
### LoadingModalState
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
export type LoadingModalState = 'loading' | 'error';
|
|
35
|
+
```
|
|
36
|
+
|
|
29
37
|
## Dependencies
|
|
30
38
|
|
|
31
39
|
### Used by
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
| `hint?` | `string` | — | |
|
|
41
41
|
| `error?` | `boolean` | — | |
|
|
42
42
|
| `errorMessage?` | `string` | — | |
|
|
43
|
-
| `width?` | `
|
|
43
|
+
| `width?` | `SFieldWidth` | — | 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이. 등급은 `--cmp-field-width-*` 토큰으로 풀리며 `max`(= 스키마 상한)로 고른다. 상한이 `xl` 을 넘거나 상한이 없으면 `"100%"`. (`sellmate/field-width-grade` 가 검사한다) |
|
|
44
44
|
| `className?` | `string` | — | |
|
|
45
45
|
| `style?` | `CSSProperties` | — | |
|
|
46
46
|
|
|
@@ -52,6 +52,14 @@
|
|
|
52
52
|
| `onFocus` | `(e: React.FocusEvent<HTMLInputElement>) => void` | 포커스 이벤트 (sdFocus) |
|
|
53
53
|
| `onBlur` | `(e: React.FocusEvent<HTMLInputElement>) => void` | 블러 이벤트 (sdBlur) |
|
|
54
54
|
|
|
55
|
+
## Types
|
|
56
|
+
|
|
57
|
+
### SNumberInputSize
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
export type SNumberInputSize = SFieldSize;
|
|
61
|
+
```
|
|
62
|
+
|
|
55
63
|
## Dependencies
|
|
56
64
|
|
|
57
65
|
### Used by
|
|
@@ -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 type SNumberInputSize = SFieldSize;
|
|
8
9
|
export interface SNumberInputProps {
|
|
9
10
|
/** 입력 값 */
|
|
@@ -59,7 +60,12 @@ export interface SNumberInputProps {
|
|
|
59
60
|
hint?: string;
|
|
60
61
|
error?: boolean;
|
|
61
62
|
errorMessage?: string;
|
|
62
|
-
|
|
63
|
+
/**
|
|
64
|
+
* 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이.
|
|
65
|
+
* 등급은 `--cmp-field-width-*` 토큰으로 풀리며 `max`(= 스키마 상한)로 고른다.
|
|
66
|
+
* 상한이 `xl` 을 넘거나 상한이 없으면 `"100%"`. (`sellmate/field-width-grade` 가 검사한다)
|
|
67
|
+
*/
|
|
68
|
+
width?: SFieldWidth;
|
|
63
69
|
className?: string;
|
|
64
70
|
style?: CSSProperties;
|
|
65
71
|
}
|
|
@@ -27,9 +27,49 @@
|
|
|
27
27
|
| Prop | Type | Default | Description |
|
|
28
28
|
|------|------|---------|-------------|
|
|
29
29
|
| `background?` | `SPageBackground` | `'frame'` | 페이지 배경 표면. frame=흰 콘텐츠 면, neutral=옅은 회색 면, screen=앱 바탕. 스크롤바 처리도 여기 묶여 있다 — 셋 다 구분선+트랙 배경이고, 트랙 색만 neutral 에서 흰색이 된다. |
|
|
30
|
-
| `scrollEndSpacing?` | `boolean` | `
|
|
30
|
+
| `scrollEndSpacing?` | `boolean` | `false` | 스크롤 끝 여백. 마지막 항목이 창 하단에 붙어 "여기서 끝"이 안 읽히는 것을 막는다. **기본은 꺼져 있다.** 페이지 스크롤 자체가 예외이기 때문이다 — 대부분의 화면은 본문이 창을 꽉 채우고 스크롤은 각 영역 안에서 일어난다. 여백을 조건 없이 붙이면 내용이 화면에 거의 딱 맞는 페이지까지 그 여백 때문에 스크롤되게 만든다. 페이지가 실제로 스크롤되는 화면(`contentHeight="auto"` + 내용이 창보다 김)에서만 켠다. 페이지네이션처럼 끝을 알려주는 것이 이미 있으면 켜지 않는다. |
|
|
31
|
+
| `overlayScrollbar?` | `boolean` | `false` | true면 네이티브 스크롤바를 숨기고 SPage 위에 오버레이 스크롤바를 얹는다. 스크롤바가 레이아웃 폭을 차지하지 않아 내부 콘텐츠 폭이 줄어들지 않는다. |
|
|
32
|
+
| `contentHeight?` | `SPageContentHeight` | `'auto'` | 본문 높이 모드. 기본은 `auto` — 콘텐츠가 흐르고 넘치면 페이지가 스크롤한다. `fill` 은 본문이 남은 높이를 정확히 채우고 페이지는 스크롤하지 않는다. 표가 자기 안에서 스크롤하고 페이지네이션이 하단에 고정되는 목록 화면용이다. 본문 루트에 `h-full` 이 먹으므로 `<div className="flex h-full min-h-0 flex-col">` + `<STable className="min-h-0 flex-1" />` 구성이 성립한다. `fill` 에서는 페이지가 스크롤하지 않으므로 `scrollEndSpacing` 이 무시된다. |
|
|
31
33
|
| `header?` | `SPageHeaderProps` | — | 페이지 타이틀 영역(pageHeader 포팅). 주면 스크롤·페이지 패딩 밖으로 빼내 상단에 고정 배치한다. `children` 은 항상 본문이다 — header 유무와 무관하게 같은 자리에 같은 뜻으로 들어간다. |
|
|
32
34
|
|
|
35
|
+
## Types
|
|
36
|
+
|
|
37
|
+
### SPageBackground
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
export type SPageBackground = (typeof PAGE_BACKGROUNDS)[number];
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### SPageContentHeight
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
export type SPageContentHeight = (typeof PAGE_CONTENT_HEIGHTS)[number];
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### PAGE_BACKGROUNDS
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
/**
|
|
53
|
+
* 페이지 배경 — 표면의 역할로 이름을 붙인다(리터럴 색이 아니다).
|
|
54
|
+
* - frame: 콘텐츠를 얹는 흰 표면 (sys.color.bg.frame)
|
|
55
|
+
* - neutral: 한 단계 눌러앉은 회색 표면 (sys.color.bg.neutralLight)
|
|
56
|
+
* - screen: 카드·패널이 떠 있는 앱 바탕 (sys.color.bg.screen)
|
|
57
|
+
*/
|
|
58
|
+
export const PAGE_BACKGROUNDS = ['frame', 'neutral', 'screen'] as const;
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### PAGE_CONTENT_HEIGHTS
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
/**
|
|
65
|
+
* 본문 높이 모드 — 페이지가 스크롤할지, 본문이 남은 높이를 채울지.
|
|
66
|
+
* - auto: 콘텐츠가 흐르고, 넘치면 페이지가 스크롤한다
|
|
67
|
+
* - fill: 본문이 남은 높이를 정확히 채우고 페이지는 스크롤하지 않는다.
|
|
68
|
+
* 표가 자기 안에서 스크롤하고 페이지네이션이 하단에 고정되는 목록 화면용.
|
|
69
|
+
*/
|
|
70
|
+
export const PAGE_CONTENT_HEIGHTS = ['auto', 'fill'] as const;
|
|
71
|
+
```
|
|
72
|
+
|
|
33
73
|
## Dependencies
|
|
34
74
|
|
|
35
75
|
### Depends on
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'react';
|
|
2
|
-
import type { SPageBackground } from './page.config';
|
|
2
|
+
import type { SPageBackground, SPageContentHeight } from './page.config';
|
|
3
3
|
import { type SPageHeaderProps } from './SPageHeader';
|
|
4
4
|
export interface SPageProps extends HTMLAttributes<HTMLElement> {
|
|
5
5
|
/**
|
|
@@ -9,9 +9,31 @@ export interface SPageProps extends HTMLAttributes<HTMLElement> {
|
|
|
9
9
|
background?: SPageBackground;
|
|
10
10
|
/**
|
|
11
11
|
* 스크롤 끝 여백. 마지막 항목이 창 하단에 붙어 "여기서 끝"이 안 읽히는 것을 막는다.
|
|
12
|
-
*
|
|
12
|
+
*
|
|
13
|
+
* **기본은 꺼져 있다.** 페이지 스크롤 자체가 예외이기 때문이다 — 대부분의 화면은 본문이
|
|
14
|
+
* 창을 꽉 채우고 스크롤은 각 영역 안에서 일어난다. 여백을 조건 없이 붙이면 내용이 화면에
|
|
15
|
+
* 거의 딱 맞는 페이지까지 그 여백 때문에 스크롤되게 만든다.
|
|
16
|
+
*
|
|
17
|
+
* 페이지가 실제로 스크롤되는 화면(`contentHeight="auto"` + 내용이 창보다 김)에서만 켠다.
|
|
18
|
+
* 페이지네이션처럼 끝을 알려주는 것이 이미 있으면 켜지 않는다.
|
|
13
19
|
*/
|
|
14
20
|
scrollEndSpacing?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* true면 네이티브 스크롤바를 숨기고 SPage 위에 오버레이 스크롤바를 얹는다.
|
|
23
|
+
* 스크롤바가 레이아웃 폭을 차지하지 않아 내부 콘텐츠 폭이 줄어들지 않는다.
|
|
24
|
+
*/
|
|
25
|
+
overlayScrollbar?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 본문 높이 모드. 기본은 `auto` — 콘텐츠가 흐르고 넘치면 페이지가 스크롤한다.
|
|
28
|
+
*
|
|
29
|
+
* `fill` 은 본문이 남은 높이를 정확히 채우고 페이지는 스크롤하지 않는다. 표가 자기 안에서
|
|
30
|
+
* 스크롤하고 페이지네이션이 하단에 고정되는 목록 화면용이다. 본문 루트에 `h-full` 이 먹으므로
|
|
31
|
+
* `<div className="flex h-full min-h-0 flex-col">` + `<STable className="min-h-0 flex-1" />`
|
|
32
|
+
* 구성이 성립한다.
|
|
33
|
+
*
|
|
34
|
+
* `fill` 에서는 페이지가 스크롤하지 않으므로 `scrollEndSpacing` 이 무시된다.
|
|
35
|
+
*/
|
|
36
|
+
contentHeight?: SPageContentHeight;
|
|
15
37
|
/**
|
|
16
38
|
* 페이지 타이틀 영역(pageHeader 포팅). 주면 스크롤·페이지 패딩 밖으로 빼내 상단에 고정 배치한다.
|
|
17
39
|
* `children` 은 항상 본문이다 — header 유무와 무관하게 같은 자리에 같은 뜻으로 들어간다.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { SPage, type SPageProps } from './SPage';
|
|
2
|
-
export { PAGE_BACKGROUNDS, type SPageBackground } from './page.config';
|
|
2
|
+
export { PAGE_BACKGROUNDS, type SPageBackground, PAGE_CONTENT_HEIGHTS, type SPageContentHeight, } from './page.config';
|
|
3
3
|
export { type SPageHeaderProps } from './SPageHeader';
|
|
@@ -6,3 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const PAGE_BACKGROUNDS: readonly ["frame", "neutral", "screen"];
|
|
8
8
|
export type SPageBackground = (typeof PAGE_BACKGROUNDS)[number];
|
|
9
|
+
/**
|
|
10
|
+
* 본문 높이 모드 — 페이지가 스크롤할지, 본문이 남은 높이를 채울지.
|
|
11
|
+
* - auto: 콘텐츠가 흐르고, 넘치면 페이지가 스크롤한다
|
|
12
|
+
* - fill: 본문이 남은 높이를 정확히 채우고 페이지는 스크롤하지 않는다.
|
|
13
|
+
* 표가 자기 안에서 스크롤하고 페이지네이션이 하단에 고정되는 목록 화면용.
|
|
14
|
+
*/
|
|
15
|
+
export declare const PAGE_CONTENT_HEIGHTS: readonly ["auto", "fill"];
|
|
16
|
+
export type SPageContentHeight = (typeof PAGE_CONTENT_HEIGHTS)[number];
|
|
@@ -33,6 +33,21 @@
|
|
|
33
33
|
| `onLeftLinkClick` | `() => void` | 하단 좌측 링크 클릭 |
|
|
34
34
|
| `onButtonClick` | `() => void` | 하단 우측 버튼 클릭 |
|
|
35
35
|
|
|
36
|
+
## Types
|
|
37
|
+
|
|
38
|
+
### SPopoverPlacement
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
export type SPopoverPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### SPopoverType
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
/** 색상 타입 — default: 다크 배경 / danger·warning·accent: 라이트 배경 (component.popover 토큰) */
|
|
48
|
+
export type SPopoverType = 'default' | 'danger' | 'warning' | 'accent';
|
|
49
|
+
```
|
|
50
|
+
|
|
36
51
|
## Dependencies
|
|
37
52
|
|
|
38
53
|
### Depends on
|
|
@@ -24,6 +24,25 @@
|
|
|
24
24
|
|-------|------|-------------|
|
|
25
25
|
| `onSubmit` | `() => void` | 확인 버튼 클릭 (sdSubmit) |
|
|
26
26
|
|
|
27
|
+
## Types
|
|
28
|
+
|
|
29
|
+
### SPopupType
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
export type SPopupType = 'default' | 'light';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### SPopupSubmitButton
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
export interface SPopupSubmitButton {
|
|
39
|
+
label?: string;
|
|
40
|
+
color?: SButtonColor;
|
|
41
|
+
outline?: boolean;
|
|
42
|
+
size?: SButtonSize;
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
27
46
|
## Dependencies
|
|
28
47
|
|
|
29
48
|
### Depends on
|
|
@@ -34,6 +34,20 @@
|
|
|
34
34
|
| `onCloseAutoFocus` | `(event: Event) => void` | 닫힐 때 포커스 복귀 처리 (기본은 Radix가 앵커로 포커스를 되돌림). e.preventDefault()로 막을 수 있다. |
|
|
35
35
|
| `onPointerDownOutside` | `(event: Event) => void` | 바깥 영역 pointerdown 으로 닫힘이 시작될 때 (앵커 위 클릭·persistent 는 제외). |
|
|
36
36
|
|
|
37
|
+
## Types
|
|
38
|
+
|
|
39
|
+
### SPortalPlacement
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
export type SPortalPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### SPortalAlign
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
export type SPortalAlign = 'start' | 'center' | 'end';
|
|
49
|
+
```
|
|
50
|
+
|
|
37
51
|
## Dependencies
|
|
38
52
|
|
|
39
53
|
### Used by
|
|
@@ -42,6 +42,26 @@
|
|
|
42
42
|
|-------|------|-------------|
|
|
43
43
|
| `onValueChange` | `(val: SRadioValue) => void` | 선택 변경 (sdUpdate) — 선택된 val 전달 |
|
|
44
44
|
|
|
45
|
+
## Types
|
|
46
|
+
|
|
47
|
+
### SRadioOption
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
export interface SRadioOption {
|
|
51
|
+
/** 옵션 값 (sd-radio-group SRadioOption.value) */
|
|
52
|
+
value: SRadioValue;
|
|
53
|
+
label: string;
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### SRadioValue
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
/** 라디오 값 타입 (sd-radio SRadioValue) */
|
|
62
|
+
export type SRadioValue = string | number | boolean;
|
|
63
|
+
```
|
|
64
|
+
|
|
45
65
|
## Dependencies
|
|
46
66
|
|
|
47
67
|
### Used by
|
|
@@ -22,6 +22,24 @@
|
|
|
22
22
|
|-------|------|-------------|
|
|
23
23
|
| `onValueChange` | `(value: string \| number) => void` | 변경 (sdUpdate) |
|
|
24
24
|
|
|
25
|
+
## Types
|
|
26
|
+
|
|
27
|
+
### SRadioButtonOption
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
export interface SRadioButtonOption {
|
|
31
|
+
value: string | number;
|
|
32
|
+
label: string;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### SRadioButtonSize
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
export type SRadioButtonSize = 'xs' | 'sm';
|
|
41
|
+
```
|
|
42
|
+
|
|
25
43
|
## Dependencies
|
|
26
44
|
|
|
27
45
|
### Used by
|
|
@@ -14,3 +14,17 @@
|
|
|
14
14
|
| `maxHeight?` | `string` | — | viewport 최대 높이 (예: '400px'). 비우면 부모 크기를 따른다. |
|
|
15
15
|
| `maxWidth?` | `string` | — | viewport 최대 너비 (예: '480px'). 비우면 부모 크기를 따른다. |
|
|
16
16
|
|
|
17
|
+
## Types
|
|
18
|
+
|
|
19
|
+
### SScrollAreaAxis
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
export type SScrollAreaAxis = (typeof SCROLL_AREA_AXES)[number];
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### SCROLL_AREA_AXES
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
export const SCROLL_AREA_AXES = ['vertical', 'horizontal', 'both'] as const;
|
|
29
|
+
```
|
|
30
|
+
|