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.
Files changed (132) hide show
  1. package/AGENTS.md +488 -90
  2. package/README.md +101 -0
  3. package/dist/components/SBadge/README.md +24 -0
  4. package/dist/components/SBadge/SBadge.d.ts +1 -1
  5. package/dist/components/SBarcodeInput/README.md +9 -1
  6. package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +7 -1
  7. package/dist/components/SButton/README.md +36 -0
  8. package/dist/components/SCalendar/README.md +13 -0
  9. package/dist/components/SCallout/README.md +15 -0
  10. package/dist/components/SCard/README.md +16 -0
  11. package/dist/components/SCard/SCard.d.ts +17 -2
  12. package/dist/components/SCheckbox/README.md +8 -0
  13. package/dist/components/SChipFilter/README.md +288 -5
  14. package/dist/components/SChipFilter/SChipFilter.d.ts +95 -40
  15. package/dist/components/SChipFilter/index.d.ts +1 -1
  16. package/dist/components/SChipInput/README.md +15 -1
  17. package/dist/components/SChipInput/SChipInput.d.ts +7 -1
  18. package/dist/components/SCircleProgress/README.md +8 -0
  19. package/dist/components/SConfirmModal/README.md +16 -0
  20. package/dist/components/SDatePicker/README.md +60 -4
  21. package/dist/components/SDatePicker/SDatePicker.d.ts +61 -5
  22. package/dist/components/SDatePicker/index.d.ts +1 -1
  23. package/dist/components/SDateRangePicker/README.md +17 -2
  24. package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +16 -3
  25. package/dist/components/SDivider/README.md +4 -0
  26. package/dist/components/SDraggableItem/README.md +37 -0
  27. package/dist/components/SDraggableItem/SDraggableItem.d.ts +2 -0
  28. package/dist/components/SDraggableList/README.md +29 -0
  29. package/dist/components/SDraggableList/SDraggableList.d.ts +10 -0
  30. package/dist/components/SDraggableList/index.d.ts +1 -1
  31. package/dist/components/SDrawer/README.md +8 -0
  32. package/dist/components/SDropdownButton/README.md +19 -0
  33. package/dist/components/SEditor/EditorBody.d.ts +40 -0
  34. package/dist/components/SEditor/EditorToolbar.d.ts +87 -0
  35. package/dist/components/SEditor/README.md +230 -0
  36. package/dist/components/SEditor/SEditor.d.ts +124 -0
  37. package/dist/components/SEditor/editor-icons.d.ts +59 -0
  38. package/dist/components/SEditor/editor.config.d.ts +85 -0
  39. package/dist/components/SEditor/index.d.ts +2 -0
  40. package/dist/components/SEditor/tiptap-api.d.ts +29 -0
  41. package/dist/components/SEditor/use-is-mobile.d.ts +14 -0
  42. package/dist/components/SExpansionItem/README.md +36 -0
  43. package/dist/components/SField/README.md +27 -2
  44. package/dist/components/SField/SField.d.ts +22 -4
  45. package/dist/components/SFilePicker/README.md +15 -1
  46. package/dist/components/SFilePicker/SFilePicker.d.ts +7 -1
  47. package/dist/components/SFooter/README.md +25 -0
  48. package/dist/components/SFooter/SFooter.d.ts +4 -3
  49. package/dist/components/SForm/README.md +11 -0
  50. package/dist/components/SGhostButton/README.md +20 -2
  51. package/dist/components/SGnb/README.md +45 -0
  52. package/dist/components/SGnb/gnb.config.d.ts +7 -0
  53. package/dist/components/SGuide/README.md +15 -0
  54. package/dist/components/SIcon/README.md +4 -0
  55. package/dist/components/SIcon/SIcon.d.ts +1 -1
  56. package/dist/components/SIcon/icons.gen.d.ts +2 -0
  57. package/dist/components/SImage/README.md +14 -0
  58. package/dist/components/SInput/README.md +3 -1
  59. package/dist/components/SInput/SInput.d.ts +7 -1
  60. package/dist/components/SKeyValueTable/README.md +87 -0
  61. package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +14 -3
  62. package/dist/components/SLayout/README.md +16 -0
  63. package/dist/components/SLinearProgress/README.md +8 -0
  64. package/dist/components/SList/README.md +5 -1
  65. package/dist/components/SList/SList.d.ts +0 -2
  66. package/dist/components/SListItem/README.md +41 -0
  67. package/dist/components/SLoadingModal/README.md +8 -0
  68. package/dist/components/SNumberInput/README.md +9 -1
  69. package/dist/components/SNumberInput/SNumberInput.d.ts +7 -1
  70. package/dist/components/SPage/README.md +41 -1
  71. package/dist/components/SPage/SPage.d.ts +24 -2
  72. package/dist/components/SPage/index.d.ts +1 -1
  73. package/dist/components/SPage/page.config.d.ts +8 -0
  74. package/dist/components/SPopover/README.md +15 -0
  75. package/dist/components/SPopup/README.md +19 -0
  76. package/dist/components/SPortal/README.md +14 -0
  77. package/dist/components/SRadio/README.md +20 -0
  78. package/dist/components/SRadioButton/README.md +18 -0
  79. package/dist/components/SScrollArea/README.md +14 -0
  80. package/dist/components/SSearchInput/README.md +61 -0
  81. package/dist/components/SSearchInput/SSearchInput.d.ts +52 -0
  82. package/dist/components/SSearchInput/index.d.ts +1 -0
  83. package/dist/components/SSectionHeaderCard/README.md +44 -20
  84. package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +31 -14
  85. package/dist/components/SSectionHeaderCard/index.d.ts +1 -1
  86. package/dist/components/SSelect/README.md +23 -3
  87. package/dist/components/SSelect/SSelect.d.ts +13 -1
  88. package/dist/components/SSplitter/README.md +15 -0
  89. package/dist/components/SStepper/README.md +26 -0
  90. package/dist/components/SSwitch/README.md +13 -0
  91. package/dist/components/STable/README.md +72 -1
  92. package/dist/components/STable/STable.d.ts +129 -11
  93. package/dist/components/STable/index.d.ts +1 -1
  94. package/dist/components/STabs/README.md +12 -1
  95. package/dist/components/STabs/STabs.d.ts +2 -4
  96. package/dist/components/STabs/index.d.ts +1 -1
  97. package/dist/components/STabs/tabs.config.d.ts +3 -4
  98. package/dist/components/STag/README.md +47 -0
  99. package/dist/components/STextLink/README.md +17 -0
  100. package/dist/components/STextLink/STextLink.d.ts +2 -0
  101. package/dist/components/STextarea/README.md +1 -1
  102. package/dist/components/STextarea/STextarea.d.ts +7 -1
  103. package/dist/components/STimePicker/README.md +15 -1
  104. package/dist/components/STimePicker/STimePicker.d.ts +7 -1
  105. package/dist/components/STimePicker/timepicker.config.d.ts +7 -0
  106. package/dist/components/STimeRangePicker/README.md +27 -1
  107. package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +7 -1
  108. package/dist/components/SToast/README.md +24 -0
  109. package/dist/components/SToggle/README.md +8 -0
  110. package/dist/components/STooltip/README.md +22 -0
  111. package/dist/components/STree/README.md +41 -0
  112. package/dist/components/STree/STree.d.ts +8 -0
  113. package/dist/components/STree/index.d.ts +1 -1
  114. package/dist/index.cjs +4266 -750
  115. package/dist/index.cjs.map +1 -1
  116. package/dist/index.d.ts +3 -0
  117. package/dist/index.js +4249 -750
  118. package/dist/index.js.map +1 -1
  119. package/dist/lib/field-width.d.ts +31 -0
  120. package/dist/lib/story-docs.d.ts +19 -3
  121. package/dist/lib/truncated-value-tooltip.d.ts +18 -0
  122. package/dist/llms-full.txt +2337 -183
  123. package/dist/llms.txt +490 -92
  124. package/dist/styles.css +684 -41
  125. package/dist/theme.css +22 -6
  126. package/eslint/index.mjs +10 -0
  127. package/eslint/lib/table-column.mjs +26 -0
  128. package/eslint/rules/field-width-grade.d.mts +41 -0
  129. package/eslint/rules/field-width-grade.mjs +311 -0
  130. package/eslint/rules/table-column-width.mjs +110 -0
  131. package/eslint/scale.gen.mjs +3 -0
  132. package/package.json +13 -1
@@ -3,6 +3,7 @@ import { type SIconName } from '../SIcon';
3
3
  import { type STooltipProps } from '../STooltip';
4
4
  import { type SColor } from '../../lib/color';
5
5
  import { type Rule } from '../../lib/form';
6
+ import { type SFieldWidth } from '../../lib/field-width';
6
7
  export type SFieldSize = 'sm' | 'md';
7
8
  export type SFieldAddonAlign = 'start' | 'center' | 'end';
8
9
  export type SFieldStatus = 'default' | 'pass' | 'error';
@@ -57,12 +58,29 @@ export interface SFieldProps {
57
58
  /** 읽기 전용 (회색 배경) */
58
59
  readOnly?: boolean;
59
60
  /**
60
- * 컨트롤 너비 (숫자=px). 지정하면 필드가 부모 폭을 다 먹지 않고 (레이블 + width) 만큼만 차지한다.
61
+ * 컨트롤 너비. 지정하면 필드가 부모 폭을 다 먹지 않고 (레이블 + width) 만큼만 차지한다.
61
62
  * 다른 요소와 나란히 놓으려면 부모를 flex 로 두면 된다.
63
+ *
64
+ * **폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`)으로 준다** — `--cmp-field-width-*` 토큰으로 풀리므로
65
+ * 토큰이 바뀌면 화면이 따라간다. 등급은 `maxLength`(= 스키마 상한)로 고르고, 상한이 `xl` 을
66
+ * 넘거나 상한이 없으면 `"100%"` 로 둔다. (`sellmate/field-width-grade` 가 검사한다)
67
+ * 숫자는 px, 그 밖의 문자열은 CSS 길이 그대로다.
62
68
  */
63
- width?: number | string;
64
- /** 컨트롤 최소 너비 (숫자=px). 하한선만 지정하며 필드는 계속 부모 폭을 채운다 */
65
- minWidth?: number | string;
69
+ width?: SFieldWidth;
70
+ /** 컨트롤 최소 너비 (등급 · 숫자=px · CSS 길이). 하한선만 지정하며 필드는 계속 부모 폭을 채운다 */
71
+ minWidth?: SFieldWidth;
72
+ /**
73
+ * 컨트롤 최대 너비 (등급 · 숫자=px · CSS 길이). 상한선만 지정하며 필드는 그 아래에서 부모 폭을 채운다.
74
+ *
75
+ * `width` 와 달리 hug 로 전환하지 않는다 — 부모가 좁으면 같이 좁아지고, 넓어도 여기서 멈춘다.
76
+ * 값 길이가 정해진 컨트롤(날짜·시간)이 `width="100%"` 를 받아 행 전체로 늘어나는 것을 막는 데 쓴다.
77
+ *
78
+ * **라벨은 상한에 들어가지 않는다** — 라벨은 컨트롤의 형제라 이 상한 밖이다.
79
+ * `addonLabel` 은 테두리 박스 안이라 상한을 나눠 먹으므로, `labelWidth`(= addon 폭)만큼
80
+ * 상한을 자동으로 늘린다. addon 이 있는데 `labelWidth` 가 없으면 폭을 알 수 없어 상한을
81
+ * 걸지 않는다 — 컨트롤이 잘리는 것보다 넓은 편이 낫다.
82
+ */
83
+ maxWidth?: SFieldWidth;
66
84
  /** 멀티라인(textarea) — 컨트롤 높이를 고정하지 않고 min-height만 적용 */
67
85
  multiline?: boolean;
68
86
  /**
@@ -35,7 +35,7 @@
35
35
  | `hint?` | `string` | — | |
36
36
  | `error?` | `boolean` | — | |
37
37
  | `errorMessage?` | `string` | — | |
38
- | `width?` | `number \| string` | — | |
38
+ | `width?` | `SFieldWidth` | | 컨트롤 너비 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이. 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다. 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다. |
39
39
  | `className?` | `string` | — | |
40
40
  | `style?` | `CSSProperties` | — | |
41
41
 
@@ -46,6 +46,20 @@
46
46
  | `onValueChange` | `(value: SFilePickerValue) => void` | 파일 변경 (sdUpdate) |
47
47
  | `onReject` | `(detail: { files: File[]; reason: SFilePickerRejectReason }) => void` | 제한 초과 거부 (sdReject) |
48
48
 
49
+ ## Types
50
+
51
+ ### SFilePickerValue
52
+
53
+ ```ts
54
+ export type SFilePickerValue = File[] | File | null;
55
+ ```
56
+
57
+ ### SFilePickerRejectReason
58
+
59
+ ```ts
60
+ export type SFilePickerRejectReason = 'max-file-size' | 'max-total-size' | 'max-files';
61
+ ```
62
+
49
63
  ## Dependencies
50
64
 
51
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 SFilePickerValue = File[] | File | null;
8
9
  export type SFilePickerRejectReason = 'max-file-size' | 'max-total-size' | 'max-files';
9
10
  export interface SFilePickerProps {
@@ -45,7 +46,12 @@ export interface SFilePickerProps {
45
46
  hint?: string;
46
47
  error?: boolean;
47
48
  errorMessage?: string;
48
- width?: number | string;
49
+ /**
50
+ * 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이.
51
+ * 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다.
52
+ * 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다.
53
+ */
54
+ width?: SFieldWidth;
49
55
  className?: string;
50
56
  style?: CSSProperties;
51
57
  }
@@ -16,13 +16,36 @@
16
16
  | `leftClassName?` | `string` | — | |
17
17
  | `style?` | `CSSProperties` | — | |
18
18
 
19
+ ## Types
20
+
21
+ ### SFooterBg
22
+
23
+ ```ts
24
+ export type SFooterBg = 'white' | 'grey';
25
+ ```
26
+
27
+ ### SFooterButton
28
+
29
+ ```ts
30
+ export interface SFooterButton {
31
+ label?: string;
32
+ color?: SButtonColor;
33
+ outline?: boolean;
34
+ size?: SButtonSize;
35
+ disabled?: boolean;
36
+ onClick?: () => void;
37
+ }
38
+ ```
39
+
19
40
  ## Dependencies
20
41
 
21
42
  ### Used by
22
43
 
23
44
  - [SActionModal](../SActionModal)
45
+ - [SCard](../SCard)
24
46
  - [SDrawer](../SDrawer)
25
47
  - [SPopup](../SPopup)
48
+ - [SSectionHeaderCard](../SSectionHeaderCard)
26
49
 
27
50
  ### Depends on
28
51
 
@@ -34,7 +57,9 @@
34
57
  graph TD;
35
58
  SFooter --> SButton
36
59
  SActionModal --> SFooter
60
+ SCard --> SFooter
37
61
  SDrawer --> SFooter
38
62
  SPopup --> SFooter
63
+ SSectionHeaderCard --> SFooter
39
64
  style SFooter fill:#f9f,stroke:#333,stroke-width:4px
40
65
  ```
@@ -11,7 +11,7 @@ export interface SFooterButton {
11
11
  }
12
12
  /**
13
13
  * @internal
14
- * 모달·드로어·팝업 하단 영역 공통 props.
14
+ * 모달·드로어·팝업·카드 하단 영역 공통 props.
15
15
  */
16
16
  export interface SFooterProps {
17
17
  /** 배경색 */
@@ -27,10 +27,11 @@ export interface SFooterProps {
27
27
  style?: CSSProperties;
28
28
  }
29
29
  /**
30
- * SFooter — overlay 계열 내부 전용 footer.
30
+ * SFooter — 오버레이·카드 내부 전용 footer.
31
31
  *
32
32
  * @internal
33
- * SActionModal/SConfirmModal/SDrawer/SPopup 의 하단 액션 영역만 공통화한다.
33
+ * SActionModal/SConfirmModal/SDrawer/SPopup 과 SCard/SSectionHeaderCard 의 하단 액션 영역만
34
+ * 공통화한다. 소비자는 호스트 컴포넌트의 `footerLeft`·`button` prop 으로만 닿는다 —
34
35
  * 패키지 public export 에 추가하지 말 것.
35
36
  */
36
37
  export declare function SFooter({ bg, left, button, children, className, leftClassName, style, }: SFooterProps): import("react").JSX.Element;
@@ -29,3 +29,14 @@
29
29
  | `reset` | `() => void` | resetValidation 별칭 — sd-form sdReset 대응. 값 리셋은 소비자(value/onChange) 책임 |
30
30
  | `focusFirstInvalid` | `() => void` | 첫 번째 실패 필드로 포커스 이동 |
31
31
 
32
+ ## Types
33
+
34
+ ### SFormValidationError
35
+
36
+ ```ts
37
+ export interface SFormValidationError {
38
+ /** 검증에 실패한 필드 name 목록 (DOM 순서) */
39
+ names: string[];
40
+ }
41
+ ```
42
+
@@ -27,6 +27,20 @@
27
27
  |-------|------|-------------|
28
28
  | `onClick` | `(e: MouseEvent<HTMLButtonElement>) => void` | 클릭 (sdClick) |
29
29
 
30
+ ## Types
31
+
32
+ ### SGhostButtonSize
33
+
34
+ ```ts
35
+ export type SGhostButtonSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
36
+ ```
37
+
38
+ ### SGhostButtonIntent
39
+
40
+ ```ts
41
+ export type SGhostButtonIntent = 'default' | 'danger' | 'action' | 'subAction' | 'inverse';
42
+ ```
43
+
30
44
  ## Dependencies
31
45
 
32
46
  ### Used by
@@ -35,6 +49,7 @@
35
49
  - [SCalendar](../SCalendar)
36
50
  - [SChip](../SChip)
37
51
  - [SChipFilter](../SChipFilter)
52
+ - [SDatePicker](../SDatePicker)
38
53
  - [SDateRangePicker](../SDateRangePicker)
39
54
  - [SFilePicker](../SFilePicker)
40
55
  - [SGnb](../SGnb)
@@ -44,7 +59,8 @@
44
59
  - [SOverlayHeader](../SOverlayHeader)
45
60
  - [SPage](../SPage)
46
61
  - [SPopover](../SPopover)
47
- - [SSelect](../SSelect)
62
+ - [SSearchInput](../SSearchInput)
63
+ - [STable](../STable)
48
64
  - [STimePicker](../STimePicker)
49
65
  - [STimeRangePicker](../STimeRangePicker)
50
66
  - [SToast](../SToast)
@@ -66,6 +82,7 @@ graph TD;
66
82
  SCalendar --> SGhostButton
67
83
  SChip --> SGhostButton
68
84
  SChipFilter --> SGhostButton
85
+ SDatePicker --> SGhostButton
69
86
  SDateRangePicker --> SGhostButton
70
87
  SFilePicker --> SGhostButton
71
88
  SGnb --> SGhostButton
@@ -75,7 +92,8 @@ graph TD;
75
92
  SOverlayHeader --> SGhostButton
76
93
  SPage --> SGhostButton
77
94
  SPopover --> SGhostButton
78
- SSelect --> SGhostButton
95
+ SSearchInput --> SGhostButton
96
+ STable --> SGhostButton
79
97
  STimePicker --> SGhostButton
80
98
  STimeRangePicker --> SGhostButton
81
99
  SToast --> SGhostButton
@@ -38,6 +38,51 @@
38
38
  | `onLauncherClick` | `() => void` | 앱런처(그리드) 버튼 클릭. 미지정 시 런처 버튼을 렌더하지 않는다. 접힘 레일(fix)에는 폴드 버튼만 남으므로 표시되지 않는다. |
39
39
  | `onMenuWidthChange` | `(width: number) => void` | 메뉴 폭이 확정될 때(드래그를 놓거나 방향키 조작). 드래그하는 동안에는 오지 않는다 |
40
40
 
41
+ ## Types
42
+
43
+ ### SGnbType
44
+
45
+ ```ts
46
+ /** 메뉴 스타일: box = 라운드/좁은 들여쓰기, belt = 풀폭 행/넓은 들여쓰기 */
47
+ export type SGnbType = 'box' | 'belt';
48
+ ```
49
+
50
+ ### SGnbHeader
51
+
52
+ ```ts
53
+ /** 상단바 구조: fix = GNB 폭에 고정, full = 레이아웃 전폭 */
54
+ export type SGnbHeader = 'fix' | 'full';
55
+ ```
56
+
57
+ ### SGnbColor
58
+
59
+ ```ts
60
+ /** 색상(테마): light / dark */
61
+ export type SGnbColor = 'light' | 'dark';
62
+ ```
63
+
64
+ ### SGnbMenuItem
65
+
66
+ ```ts
67
+ /** GNB 메뉴 아이템 (재귀 트리). depth1 → depth2 → depth3. */
68
+ export interface SGnbMenuItem {
69
+ /** 표시 텍스트 */
70
+ label: string;
71
+ /** 고유 식별값 (선택 상태 비교 기준) */
72
+ value: string;
73
+ /** depth1 전용 아이콘명 */
74
+ icon?: SIconName;
75
+ /** 우측 Tag 뱃지 텍스트 */
76
+ tag?: string;
77
+ /** 뱃지 색. 미지정 시 blue. */
78
+ tagColor?: STagColor;
79
+ /** 비활성 여부 */
80
+ disabled?: boolean;
81
+ /** 하위 아이템 (있으면 펼침/접힘 대상) */
82
+ children?: SGnbMenuItem[];
83
+ }
84
+ ```
85
+
41
86
  ## Dependencies
42
87
 
43
88
  ### Depends on
@@ -48,6 +48,8 @@ export declare const GNB_MENU: Record<SGnbType, {
48
48
  depth1FontWeight: number;
49
49
  itemFontSize: number;
50
50
  itemLineHeight: number;
51
+ itemFontWeight: number;
52
+ itemFontWeightSelected: number;
51
53
  }>;
52
54
  /**
53
55
  * 색상(color 축). light → --cmp-gnb-light-* 색, dark → --cmp-gnb-dark-* 색
@@ -160,3 +162,8 @@ export declare function findGnbRailValue(items: SGnbMenuItem[], value: string):
160
162
  export declare function findGnbSiblingValues(items: SGnbMenuItem[], value: string): string[];
161
163
  /** value 로 선택된 아이템의 조상 value 목록(자기 자신 제외)을 반환 → 자동 펼침용 */
162
164
  export declare function findGnbAncestors(items: SGnbMenuItem[], value: string): string[];
165
+ /**
166
+ * value 를 가진 아이템 아래의 **하위 가지**(children 을 가진 자손) value 목록을 반환.
167
+ * 부모를 펼칠 때 그 아래 가지도 전부 함께 펼치는 용도 — 리프는 펼침 대상이 아니라 제외한다.
168
+ */
169
+ export declare function findGnbDescendantBranchValues(items: SGnbMenuItem[], value: string): string[];
@@ -17,6 +17,21 @@
17
17
  | `className?` | `string` | — | |
18
18
  | `style?` | `CSSProperties` | — | |
19
19
 
20
+ ## Types
21
+
22
+ ### SGuideType
23
+
24
+ ```ts
25
+ export type SGuideType = 'tip' | 'notion';
26
+ ```
27
+
28
+ ### SGuideMessage
29
+
30
+ ```ts
31
+ /** 중첩 배열로 depth 표현 (원본 renderListItem 대응). 예: ['상위', ['하위1', '하위2']] */
32
+ export type SGuideMessage = string | SGuideMessage[];
33
+ ```
34
+
20
35
  ## Dependencies
21
36
 
22
37
  ### Depends on
@@ -30,6 +30,7 @@
30
30
  - [SDateRangePicker](../SDateRangePicker)
31
31
  - [SDraggableItem](../SDraggableItem)
32
32
  - [SDropdownButton](../SDropdownButton)
33
+ - [SEditor](../SEditor)
33
34
  - [SExpansionItem](../SExpansionItem)
34
35
  - [SField](../SField)
35
36
  - [SFilePicker](../SFilePicker)
@@ -43,6 +44,7 @@
43
44
  - [SNumberInput](../SNumberInput)
44
45
  - [SPagination](../SPagination)
45
46
  - [SPopover](../SPopover)
47
+ - [SSearchInput](../SSearchInput)
46
48
  - [SSectionHeaderCard](../SSectionHeaderCard)
47
49
  - [SSelect](../SSelect)
48
50
  - [SStepper](../SStepper)
@@ -68,6 +70,7 @@ graph TD;
68
70
  SDateRangePicker --> SIcon
69
71
  SDraggableItem --> SIcon
70
72
  SDropdownButton --> SIcon
73
+ SEditor --> SIcon
71
74
  SExpansionItem --> SIcon
72
75
  SField --> SIcon
73
76
  SFilePicker --> SIcon
@@ -81,6 +84,7 @@ graph TD;
81
84
  SNumberInput --> SIcon
82
85
  SPagination --> SIcon
83
86
  SPopover --> SIcon
87
+ SSearchInput --> SIcon
84
88
  SSectionHeaderCard --> SIcon
85
89
  SSelect --> SIcon
86
90
  SStepper --> SIcon
@@ -17,6 +17,6 @@ export interface SIconProps {
17
17
  }
18
18
  /**
19
19
  * SIcon — sd-icon 포팅.
20
- * 94개 SVG(icons.gen.tsx)를 currentColor 기반으로 렌더한다.
20
+ * icons.gen.tsx 의 SVG 를 currentColor 기반으로 렌더한다.
21
21
  */
22
22
  export declare const SIcon: import("react").ForwardRefExoticComponent<SIconProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -39,6 +39,7 @@ export declare const ICONS: {
39
39
  readonly clockFill: (p: IconRenderProps) => import("react").JSX.Element;
40
40
  readonly clockOutline: (p: IconRenderProps) => import("react").JSX.Element;
41
41
  readonly close: (p: IconRenderProps) => import("react").JSX.Element;
42
+ readonly company: (p: IconRenderProps) => import("react").JSX.Element;
42
43
  readonly copy: (p: IconRenderProps) => import("react").JSX.Element;
43
44
  readonly coupon: (p: IconRenderProps) => import("react").JSX.Element;
44
45
  readonly dashboard: (p: IconRenderProps) => import("react").JSX.Element;
@@ -76,6 +77,7 @@ export declare const ICONS: {
76
77
  readonly reset: (p: IconRenderProps) => import("react").JSX.Element;
77
78
  readonly robot: (p: IconRenderProps) => import("react").JSX.Element;
78
79
  readonly row: (p: IconRenderProps) => import("react").JSX.Element;
80
+ readonly rowDense: (p: IconRenderProps) => import("react").JSX.Element;
79
81
  readonly save: (p: IconRenderProps) => import("react").JSX.Element;
80
82
  readonly search: (p: IconRenderProps) => import("react").JSX.Element;
81
83
  readonly send: (p: IconRenderProps) => import("react").JSX.Element;
@@ -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?` | `number \| string` | — | |
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
- width?: number | string;
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
@@ -15,3 +15,11 @@
15
15
  | `className?` | `string` | — | |
16
16
  | `style?` | `CSSProperties` | — | |
17
17
 
18
+ ## Types
19
+
20
+ ### SLinearProgressType
21
+
22
+ ```ts
23
+ export type SLinearProgressType = 'primary' | 'error' | 'complete';
24
+ ```
25
+