sellmate-design-system-react 9.0.0-beta.3 → 9.0.0-beta.30

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 (164) hide show
  1. package/AGENTS.md +599 -94
  2. package/README.md +111 -9
  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 +326 -13
  14. package/dist/components/SChipFilter/SChipFilter.d.ts +137 -58
  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/SChipInput/index.d.ts +1 -1
  19. package/dist/components/SCircleProgress/README.md +8 -0
  20. package/dist/components/SConfirmModal/README.md +17 -1
  21. package/dist/components/SConfirmModal/SConfirmModal.d.ts +2 -2
  22. package/dist/components/SConfirmModal/index.d.ts +1 -1
  23. package/dist/components/SDatePicker/README.md +57 -2
  24. package/dist/components/SDatePicker/SDatePicker.d.ts +57 -4
  25. package/dist/components/SDatePicker/index.d.ts +1 -1
  26. package/dist/components/SDateRangePicker/README.md +17 -2
  27. package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +16 -3
  28. package/dist/components/SDivider/README.md +5 -0
  29. package/dist/components/SDivider/SDivider.d.ts +11 -0
  30. package/dist/components/SDraggableItem/README.md +37 -0
  31. package/dist/components/SDraggableItem/SDraggableItem.d.ts +2 -0
  32. package/dist/components/SDraggableItem/index.d.ts +1 -1
  33. package/dist/components/SDraggableList/README.md +30 -0
  34. package/dist/components/SDraggableList/SDraggableList.d.ts +11 -0
  35. package/dist/components/SDraggableList/index.d.ts +1 -1
  36. package/dist/components/SDrawer/README.md +8 -0
  37. package/dist/components/SDropdownButton/README.md +19 -0
  38. package/dist/components/SEditor/EditorBody.d.ts +36 -0
  39. package/dist/components/SEditor/EditorToolbar.d.ts +93 -0
  40. package/dist/components/SEditor/README.md +203 -0
  41. package/dist/components/SEditor/SEditor.d.ts +114 -0
  42. package/dist/components/SEditor/editor-icons.d.ts +63 -0
  43. package/dist/components/SEditor/editor.config.d.ts +119 -0
  44. package/dist/components/SEditor/index.d.ts +8 -0
  45. package/dist/components/SEditor/tiptap-api.d.ts +29 -0
  46. package/dist/components/SEditor/use-is-mobile.d.ts +14 -0
  47. package/dist/components/SExpansionItem/README.md +36 -0
  48. package/dist/components/SExpansionItem/index.d.ts +1 -1
  49. package/dist/components/SField/README.md +27 -2
  50. package/dist/components/SField/SField.d.ts +22 -4
  51. package/dist/components/SFilePicker/README.md +15 -1
  52. package/dist/components/SFilePicker/SFilePicker.d.ts +7 -1
  53. package/dist/components/SFooter/README.md +25 -0
  54. package/dist/components/SFooter/SFooter.d.ts +4 -3
  55. package/dist/components/SForm/README.md +11 -0
  56. package/dist/components/SGhostButton/README.md +20 -4
  57. package/dist/components/SGnb/README.md +51 -0
  58. package/dist/components/SGnb/SGnb.d.ts +22 -0
  59. package/dist/components/SGnb/gnb.config.d.ts +7 -0
  60. package/dist/components/SGnb/index.d.ts +1 -1
  61. package/dist/components/SGnbSystem/README.md +121 -0
  62. package/dist/components/SGnbSystem/SGnbSystem.d.ts +93 -0
  63. package/dist/components/SGnbSystem/gnbSystem.config.d.ts +89 -0
  64. package/dist/components/SGnbSystem/index.d.ts +2 -0
  65. package/dist/components/SGuide/README.md +15 -0
  66. package/dist/components/SIcon/README.md +8 -0
  67. package/dist/components/SIcon/SIcon.d.ts +1 -1
  68. package/dist/components/SIcon/icons.gen.d.ts +2 -0
  69. package/dist/components/SImage/README.md +14 -0
  70. package/dist/components/SInput/README.md +3 -1
  71. package/dist/components/SInput/SInput.d.ts +7 -1
  72. package/dist/components/SKeyValueTable/README.md +87 -0
  73. package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +14 -3
  74. package/dist/components/SKeyValueTable/index.d.ts +1 -1
  75. package/dist/components/SLayout/README.md +16 -0
  76. package/dist/components/SLayout/index.d.ts +1 -1
  77. package/dist/components/SLinearProgress/README.md +15 -0
  78. package/dist/components/SLinearProgress/SLinearProgress.d.ts +3 -0
  79. package/dist/components/SLinearProgress/index.d.ts +1 -1
  80. package/dist/components/SList/README.md +5 -1
  81. package/dist/components/SList/SList.d.ts +0 -2
  82. package/dist/components/SListItem/README.md +41 -0
  83. package/dist/components/SListItem/index.d.ts +1 -1
  84. package/dist/components/SLoadingModal/README.md +9 -1
  85. package/dist/components/SLoadingModal/SLoadingModal.d.ts +2 -2
  86. package/dist/components/SLoadingModal/index.d.ts +1 -1
  87. package/dist/components/SNumberInput/README.md +9 -1
  88. package/dist/components/SNumberInput/SNumberInput.d.ts +7 -1
  89. package/dist/components/SPage/README.md +41 -1
  90. package/dist/components/SPage/SPage.d.ts +24 -2
  91. package/dist/components/SPage/index.d.ts +1 -1
  92. package/dist/components/SPage/page.config.d.ts +8 -0
  93. package/dist/components/SPopover/README.md +15 -0
  94. package/dist/components/SPopup/README.md +19 -0
  95. package/dist/components/SPortal/README.md +14 -0
  96. package/dist/components/SRadio/README.md +20 -0
  97. package/dist/components/SRadioButton/README.md +18 -0
  98. package/dist/components/SRadioButton/SRadioButton.d.ts +1 -1
  99. package/dist/components/SRadioCard/README.md +78 -0
  100. package/dist/components/SRadioCard/SRadioCard.d.ts +29 -0
  101. package/dist/components/SRadioCard/SRadioCardGroup.d.ts +36 -0
  102. package/dist/components/SRadioCard/index.d.ts +2 -0
  103. package/dist/components/SScrollArea/README.md +14 -0
  104. package/dist/components/SSearchInput/README.md +63 -0
  105. package/dist/components/SSearchInput/SSearchInput.d.ts +52 -0
  106. package/dist/components/SSearchInput/index.d.ts +1 -0
  107. package/dist/components/SSectionHeaderCard/README.md +44 -20
  108. package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +31 -14
  109. package/dist/components/SSectionHeaderCard/index.d.ts +1 -1
  110. package/dist/components/SSelect/README.md +24 -4
  111. package/dist/components/SSelect/SSelect.d.ts +14 -2
  112. package/dist/components/SSplitter/README.md +15 -0
  113. package/dist/components/SStepper/README.md +26 -0
  114. package/dist/components/SSwitch/README.md +13 -0
  115. package/dist/components/SSystemActionButton/README.md +134 -0
  116. package/dist/components/SSystemActionButton/SSystemActionButton.d.ts +79 -0
  117. package/dist/components/SSystemActionButton/index.d.ts +2 -0
  118. package/dist/components/SSystemActionButton/systemActionButton.config.d.ts +87 -0
  119. package/dist/components/STable/README.md +87 -1
  120. package/dist/components/STable/STable.d.ts +141 -11
  121. package/dist/components/STable/index.d.ts +1 -1
  122. package/dist/components/STabs/README.md +12 -1
  123. package/dist/components/STabs/STabs.d.ts +2 -4
  124. package/dist/components/STabs/index.d.ts +1 -1
  125. package/dist/components/STabs/tabs.config.d.ts +3 -4
  126. package/dist/components/STag/README.md +52 -0
  127. package/dist/components/STag/STag.d.ts +3 -1
  128. package/dist/components/STextLink/README.md +17 -0
  129. package/dist/components/STextLink/STextLink.d.ts +2 -0
  130. package/dist/components/STextarea/README.md +1 -1
  131. package/dist/components/STextarea/STextarea.d.ts +7 -1
  132. package/dist/components/STimePicker/README.md +15 -1
  133. package/dist/components/STimePicker/STimePicker.d.ts +7 -1
  134. package/dist/components/STimePicker/timepicker.config.d.ts +7 -0
  135. package/dist/components/STimeRangePicker/README.md +27 -1
  136. package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +7 -1
  137. package/dist/components/SToast/README.md +24 -0
  138. package/dist/components/SToggle/README.md +8 -0
  139. package/dist/components/SToggle/index.d.ts +1 -1
  140. package/dist/components/STooltip/README.md +22 -0
  141. package/dist/components/STree/README.md +41 -0
  142. package/dist/components/STree/STree.d.ts +8 -0
  143. package/dist/components/STree/index.d.ts +1 -1
  144. package/dist/index.cjs +5483 -1150
  145. package/dist/index.cjs.map +1 -1
  146. package/dist/index.d.ts +6 -0
  147. package/dist/index.js +5458 -1149
  148. package/dist/index.js.map +1 -1
  149. package/dist/lib/field-width.d.ts +31 -0
  150. package/dist/lib/floating-height.d.ts +15 -0
  151. package/dist/lib/story-docs.d.ts +19 -3
  152. package/dist/lib/truncated-value-tooltip.d.ts +18 -0
  153. package/dist/llms-full.txt +2813 -193
  154. package/dist/llms.txt +604 -96
  155. package/dist/styles.css +1249 -135
  156. package/dist/theme.css +142 -16
  157. package/eslint/index.mjs +14 -0
  158. package/eslint/lib/table-column.mjs +26 -0
  159. package/eslint/rules/divider-vertical-height.mjs +137 -0
  160. package/eslint/rules/field-width-grade.d.mts +41 -0
  161. package/eslint/rules/field-width-grade.mjs +311 -0
  162. package/eslint/rules/table-column-width.mjs +110 -0
  163. package/eslint/scale.gen.mjs +5 -2
  164. package/package.json +11 -1
@@ -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
@@ -34,7 +48,7 @@
34
48
  - [SBarcodeInput](../SBarcodeInput)
35
49
  - [SCalendar](../SCalendar)
36
50
  - [SChip](../SChip)
37
- - [SChipFilter](../SChipFilter)
51
+ - [SDatePicker](../SDatePicker)
38
52
  - [SDateRangePicker](../SDateRangePicker)
39
53
  - [SFilePicker](../SFilePicker)
40
54
  - [SGnb](../SGnb)
@@ -44,7 +58,8 @@
44
58
  - [SOverlayHeader](../SOverlayHeader)
45
59
  - [SPage](../SPage)
46
60
  - [SPopover](../SPopover)
47
- - [SSelect](../SSelect)
61
+ - [SSearchInput](../SSearchInput)
62
+ - [STable](../STable)
48
63
  - [STimePicker](../STimePicker)
49
64
  - [STimeRangePicker](../STimeRangePicker)
50
65
  - [SToast](../SToast)
@@ -65,7 +80,7 @@ graph TD;
65
80
  SBarcodeInput --> SGhostButton
66
81
  SCalendar --> SGhostButton
67
82
  SChip --> SGhostButton
68
- SChipFilter --> SGhostButton
83
+ SDatePicker --> SGhostButton
69
84
  SDateRangePicker --> SGhostButton
70
85
  SFilePicker --> SGhostButton
71
86
  SGnb --> SGhostButton
@@ -75,7 +90,8 @@ graph TD;
75
90
  SOverlayHeader --> SGhostButton
76
91
  SPage --> SGhostButton
77
92
  SPopover --> SGhostButton
78
- SSelect --> SGhostButton
93
+ SSearchInput --> SGhostButton
94
+ STable --> SGhostButton
79
95
  STimePicker --> SGhostButton
80
96
  STimeRangePicker --> SGhostButton
81
97
  SToast --> SGhostButton
@@ -26,6 +26,7 @@
26
26
  | `resizable?` | `boolean` | `false` | 메뉴 폭을 드래그로 조절할 수 있게 한다. 레일 폭은 고정이고 **메뉴 컬럼만** 늘고 준다. 조절선은 GNB 컬럼의 오른쪽 경계 전체다 — fix 는 상단바 높이까지, full 은 상단바가 전폭이라 본문 높이까지. 접혀 있거나 깔 메뉴가 없으면(레일 리프가 활성) 조절선이 나오지 않는다. |
27
27
  | `menuWidth?` | `number` | — | 메뉴 폭(px). 주면 controlled — onMenuWidthChange 로 직접 갱신해야 움직인다 |
28
28
  | `defaultMenuWidth?` | `number` | — | 메뉴 초기 폭(px). uncontrolled |
29
+ | `system?` | `ReactNode` | — | GNB 맨 아래에 붙는 system 패널(`SGnbSystem`) 슬롯. 펼치면 메뉴 컬럼 바닥에, 접히면(header="fix" 레일) `foldedFooter` 아래 레일 바닥에 여백 없이 붙는다. 색·형태(펼침/접힘)는 GNB 가 내려주므로 SGnbSystem 에 다시 넘기지 않아도 된다. useRail 에서 메뉴가 없는 레일 아이템이 활성이면 메뉴 컬럼째 사라지므로 이 슬롯도 함께 빠진다. |
29
30
  | `ariaLabel?` | `string` | `'global navigation'` | 메뉴 landmark(nav) 의 접근성 레이블. 한 화면에 nav 가 여럿일 때 구분한다. |
30
31
 
31
32
  #### Events
@@ -38,8 +39,57 @@
38
39
  | `onLauncherClick` | `() => void` | 앱런처(그리드) 버튼 클릭. 미지정 시 런처 버튼을 렌더하지 않는다. 접힘 레일(fix)에는 폴드 버튼만 남으므로 표시되지 않는다. |
39
40
  | `onMenuWidthChange` | `(width: number) => void` | 메뉴 폭이 확정될 때(드래그를 놓거나 방향키 조작). 드래그하는 동안에는 오지 않는다 |
40
41
 
42
+ ## Types
43
+
44
+ ### SGnbType
45
+
46
+ ```ts
47
+ /** 메뉴 스타일: box = 라운드/좁은 들여쓰기, belt = 풀폭 행/넓은 들여쓰기 */
48
+ export type SGnbType = 'box' | 'belt';
49
+ ```
50
+
51
+ ### SGnbHeader
52
+
53
+ ```ts
54
+ /** 상단바 구조: fix = GNB 폭에 고정, full = 레이아웃 전폭 */
55
+ export type SGnbHeader = 'fix' | 'full';
56
+ ```
57
+
58
+ ### SGnbColor
59
+
60
+ ```ts
61
+ /** 색상(테마): light / dark */
62
+ export type SGnbColor = 'light' | 'dark';
63
+ ```
64
+
65
+ ### SGnbMenuItem
66
+
67
+ ```ts
68
+ /** GNB 메뉴 아이템 (재귀 트리). depth1 → depth2 → depth3. */
69
+ export interface SGnbMenuItem {
70
+ /** 표시 텍스트 */
71
+ label: string;
72
+ /** 고유 식별값 (선택 상태 비교 기준) */
73
+ value: string;
74
+ /** depth1 전용 아이콘명 */
75
+ icon?: SIconName;
76
+ /** 우측 Tag 뱃지 텍스트 */
77
+ tag?: string;
78
+ /** 뱃지 색. 미지정 시 blue. */
79
+ tagColor?: STagColor;
80
+ /** 비활성 여부 */
81
+ disabled?: boolean;
82
+ /** 하위 아이템 (있으면 펼침/접힘 대상) */
83
+ children?: SGnbMenuItem[];
84
+ }
85
+ ```
86
+
41
87
  ## Dependencies
42
88
 
89
+ ### Used by
90
+
91
+ - [SGnbSystem](../SGnbSystem)
92
+
43
93
  ### Depends on
44
94
 
45
95
  - [SGhostButton](../SGhostButton)
@@ -55,5 +105,6 @@ graph TD;
55
105
  SGnb --> SIcon
56
106
  SGnb --> SLayout
57
107
  SGnb --> STag
108
+ SGnbSystem --> SGnb
58
109
  style SGnb fill:#f9f,stroke:#333,stroke-width:4px
59
110
  ```
@@ -1,5 +1,20 @@
1
1
  import { type HTMLAttributes, type ReactNode } from 'react';
2
2
  import { type SGnbType, type SGnbHeader, type SGnbColor, type SGnbMenuItem } from './gnb.config';
3
+ /**
4
+ * SGnb 가 `system` 슬롯에 내려주는 값. 슬롯에 놓인 SGnbSystem 이 이걸 읽어
5
+ * 색과 형태(펼침/접힘)를 GNB 에 맞춘다 — 앱이 같은 값을 두 번 넘기지 않게 한다.
6
+ *
7
+ * `folded` 는 GNB 의 접힘 상태가 아니라 **그 자리가 접힌 레일인지**다. 슬롯은 두 곳에 놓이고
8
+ * (메뉴 컬럼 바닥 · 접힘 레일 바닥) 각 자리가 자기 형태를 못 박으므로, 접는 동안 아직 미끄러져
9
+ * 나가는 중인 메뉴 컬럼의 패널이 min 형태로 튀지 않는다.
10
+ */
11
+ export interface SGnbSystemContextValue {
12
+ /** GNB 색 */
13
+ color: SGnbColor;
14
+ /** 이 자리가 접힌(48px) 레일인지 */
15
+ folded: boolean;
16
+ }
17
+ export declare const SGnbSystemContext: import("react").Context<SGnbSystemContextValue | null>;
3
18
  export interface SGnbProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
4
19
  /** 메뉴 스타일: box(라운드) / belt(풀폭 행). 미지정 시 SLayout 의 type 을 따른다. */
5
20
  type?: SGnbType;
@@ -80,6 +95,13 @@ export interface SGnbProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>
80
95
  defaultMenuWidth?: number;
81
96
  /** 메뉴 폭이 확정될 때(드래그를 놓거나 방향키 조작). 드래그하는 동안에는 오지 않는다 */
82
97
  onMenuWidthChange?: (width: number) => void;
98
+ /**
99
+ * GNB 맨 아래에 붙는 system 패널(`SGnbSystem`) 슬롯. 펼치면 메뉴 컬럼 바닥에,
100
+ * 접히면(header="fix" 레일) `foldedFooter` 아래 레일 바닥에 여백 없이 붙는다.
101
+ * 색·형태(펼침/접힘)는 GNB 가 내려주므로 SGnbSystem 에 다시 넘기지 않아도 된다.
102
+ * useRail 에서 메뉴가 없는 레일 아이템이 활성이면 메뉴 컬럼째 사라지므로 이 슬롯도 함께 빠진다.
103
+ */
104
+ system?: ReactNode;
83
105
  /** 메뉴 landmark(nav) 의 접근성 레이블. 한 화면에 nav 가 여럿일 때 구분한다. */
84
106
  ariaLabel?: string;
85
107
  }
@@ -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[];
@@ -1,2 +1,2 @@
1
- export { SGnb, type SGnbProps } from './SGnb';
1
+ export { SGnb, SGnbSystemContext, type SGnbProps, type SGnbSystemContextValue } from './SGnb';
2
2
  export { GNB_HEADER, GNB_MENU, GNB_COLORS, GNB_COMMON, GNB_FOLD_MS, GNB_FULL_LOGO_WIDTH, GNB_MENU_WIDTH, GNB_RAIL, GNB_RAIL_WIDTH, findGnbAncestors, findGnbRailValue, type SGnbType, type SGnbHeader, type SGnbColor, type SGnbMenuItem, } from './gnb.config';
@@ -0,0 +1,121 @@
1
+ # SGnbSystem
2
+
3
+ > 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
4
+
5
+ ### SGnbSystem
6
+
7
+ #### Props
8
+
9
+ | Prop | Type | Default | Description |
10
+ |------|------|---------|-------------|
11
+ | `color?` | `SGnbSystemColor` | — | 색상(패널 표면). light = 흰 면, dark = 오션블루 면. 미지정 시 자기를 담은 SGnb 의 color 를 따른다(단독으로 쓰면 `'light'`). |
12
+ | `folded?` | `boolean` | — | 접힌(min) 형태 — 48px 레일 폭에 맞춰 알림·계정 아이콘만 남는다. 미지정 시 자기를 담은 SGnb 의 접힘 상태를 따른다. |
13
+ | `actions?` | `SGnbSystemAction[]` | — | 패널 상단에 쌓는 행 목록. 각 원소는 `SSystemActionButton` 의 props 다(`color` 제외). 아래에 다른 조각이 있으면 그 사이에 구분선이 그어진다. 접히면 자리가 없어 렌더되지 않는다. |
14
+ | `domain?` | `string` | — | 도메인 태그 텍스트. 접히면 자리가 없어 렌더되지 않는다 |
15
+ | `alert?` | `SGnbSystemAlert` | — | 알림 버튼. 없으면 렌더하지 않는다. 설정과 나란히 서면 남는 폭을 먹고, 혼자면 폭을 다 먹는다 |
16
+ | `setting?` | `SGnbSystemSetting` | — | 설정 버튼. 없으면 렌더하지 않는다. 알림과 나란히 서면 제 폭만 갖고, 혼자면 폭을 다 먹는다. 접히면 자리가 없어 렌더되지 않는다 — 접힌 상태에서도 닿아야 하면 SGnb 의 `foldedFooter` 에 둔다. |
17
+ | `account?` | `SGnbSystemAccount` | — | 계정 행. 없으면 렌더하지 않는다 |
18
+
19
+ ## Types
20
+
21
+ ### SGnbSystemColor
22
+
23
+ ```ts
24
+ export type SGnbSystemColor = (typeof GNB_SYSTEM_COLORS)[number];
25
+ ```
26
+
27
+ ### SGnbSystemAction
28
+
29
+ ```ts
30
+ /**
31
+ * 패널 상단에 쌓이는 행 하나. `SSystemActionButton` 의 props 를 그대로 받는다 —
32
+ * 단 `color` 는 패널이 정하므로 받지 않고, 목록 key 로 쓸 `value` 만 더한다.
33
+ */
34
+ export type SGnbSystemAction = DistributiveOmit<SSystemActionButtonProps, 'color'> & {
35
+ /** 목록 key. 없으면 순서를 key 로 쓴다 */
36
+ value?: string;
37
+ };
38
+ ```
39
+
40
+ ### SGnbSystemAlert
41
+
42
+ ```ts
43
+ /** 알림 버튼 */
44
+ export interface SGnbSystemAlert {
45
+ /** 라벨 텍스트. 기본 `'알림'` */
46
+ label?: string;
47
+ /**
48
+ * 읽지 않은 알림 개수. 1 이상이면 벨이 울리는 아이콘·강조색으로 바뀌고 개수(접히면 점)가 붙는다.
49
+ * 표기는 컴포넌트가 맡는다 — 세 자리마다 콤마를 넣어 그리므로 앱이 포맷한 문자열을 넘기지 않는다.
50
+ */
51
+ count?: number;
52
+ /** 클릭 */
53
+ onClick?: () => void;
54
+ }
55
+ ```
56
+
57
+ ### SGnbSystemSetting
58
+
59
+ ```ts
60
+ /** 설정 버튼 */
61
+ export interface SGnbSystemSetting {
62
+ /** 라벨 텍스트. 기본 `'설정'` */
63
+ label?: string;
64
+ /** 클릭 */
65
+ onClick?: () => void;
66
+ }
67
+ ```
68
+
69
+ ### SGnbSystemAccount
70
+
71
+ ```ts
72
+ /** 계정 행 */
73
+ export interface SGnbSystemAccount {
74
+ /** 계정 이름 */
75
+ label?: string;
76
+ /** 클릭 */
77
+ onClick?: () => void;
78
+ }
79
+ ```
80
+
81
+ ### GNB_SYSTEM_COLORS
82
+
83
+ ```ts
84
+ /**
85
+ * SGnbSystem 설정.
86
+ *
87
+ * 토큰은 GNB system 패널 한 벌(`--cmp-gnb-system-*`)이다.
88
+ * 패널(배경·경계·구분선·간격) → --cmp-gnb-system-panel-*
89
+ * 도메인 태그 → --cmp-gnb-system-domainTag-*
90
+ * 행 공통(높이·라운드·아이콘 프레임) → --cmp-gnb-system-item-* (SSystemActionButton 과 공유)
91
+ * 알림 버튼 → --cmp-gnb-system-alertButton-*
92
+ * 설정 버튼 → --cmp-gnb-system-setting-*
93
+ * 펼침·접힘 패널 여백 → --cmp-gnb-system-project-padding · --cmp-gnb-system-min-padding
94
+ *
95
+ * 타이포그래피는 CSS 변수가 아니라 `.typo-*` 프리셋으로 나온다.
96
+ * domainTag.typography → typo-body-sm-medium (12/500/20)
97
+ * item.label.typography → typo-body-sm-semibold (12/600/20)
98
+ * alertButton.count → typo-body-md-bold (13/700/22)
99
+ */
100
+
101
+ /** 색상(표면). light = 흰 면, dark = 오션블루 면. GNB 의 color 를 그대로 따라간다 */
102
+ export const GNB_SYSTEM_COLORS = ['light', 'dark'] as const;
103
+ ```
104
+
105
+ ## Dependencies
106
+
107
+ ### Depends on
108
+
109
+ - [SGnb](../SGnb)
110
+ - [SIcon](../SIcon)
111
+ - [SSystemActionButton](../SSystemActionButton)
112
+
113
+ ### Graph
114
+
115
+ ```mermaid
116
+ graph TD;
117
+ SGnbSystem --> SGnb
118
+ SGnbSystem --> SIcon
119
+ SGnbSystem --> SSystemActionButton
120
+ style SGnbSystem fill:#f9f,stroke:#333,stroke-width:4px
121
+ ```
@@ -0,0 +1,93 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ import { type SSystemActionButtonProps } from '../SSystemActionButton';
3
+ import { type SGnbSystemColor } from './gnbSystem.config';
4
+ /** 유니온을 유지한 채 키를 걷어낸다 — 그냥 Omit 하면 판별 유니온이 한 덩어리로 뭉개진다. */
5
+ type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
6
+ /**
7
+ * 패널 상단에 쌓이는 행 하나. `SSystemActionButton` 의 props 를 그대로 받는다 —
8
+ * 단 `color` 는 패널이 정하므로 받지 않고, 목록 key 로 쓸 `value` 만 더한다.
9
+ */
10
+ export type SGnbSystemAction = DistributiveOmit<SSystemActionButtonProps, 'color'> & {
11
+ /** 목록 key. 없으면 순서를 key 로 쓴다 */
12
+ value?: string;
13
+ };
14
+ /** 알림 버튼 */
15
+ export interface SGnbSystemAlert {
16
+ /** 라벨 텍스트. 기본 `'알림'` */
17
+ label?: string;
18
+ /**
19
+ * 읽지 않은 알림 개수. 1 이상이면 벨이 울리는 아이콘·강조색으로 바뀌고 개수(접히면 점)가 붙는다.
20
+ * 표기는 컴포넌트가 맡는다 — 세 자리마다 콤마를 넣어 그리므로 앱이 포맷한 문자열을 넘기지 않는다.
21
+ */
22
+ count?: number;
23
+ /** 클릭 */
24
+ onClick?: () => void;
25
+ }
26
+ /** 설정 버튼 */
27
+ export interface SGnbSystemSetting {
28
+ /** 라벨 텍스트. 기본 `'설정'` */
29
+ label?: string;
30
+ /** 클릭 */
31
+ onClick?: () => void;
32
+ }
33
+ /** 계정 행 */
34
+ export interface SGnbSystemAccount {
35
+ /** 계정 이름 */
36
+ label?: string;
37
+ /** 클릭 */
38
+ onClick?: () => void;
39
+ }
40
+ export interface SGnbSystemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
41
+ /**
42
+ * 색상(패널 표면). light = 흰 면, dark = 오션블루 면.
43
+ * 미지정 시 자기를 담은 SGnb 의 color 를 따른다(단독으로 쓰면 `'light'`).
44
+ */
45
+ color?: SGnbSystemColor;
46
+ /**
47
+ * 접힌(min) 형태 — 48px 레일 폭에 맞춰 알림·계정 아이콘만 남는다.
48
+ * 미지정 시 자기를 담은 SGnb 의 접힘 상태를 따른다.
49
+ */
50
+ folded?: boolean;
51
+ /**
52
+ * 패널 상단에 쌓는 행 목록. 각 원소는 `SSystemActionButton` 의 props 다(`color` 제외).
53
+ * 아래에 다른 조각이 있으면 그 사이에 구분선이 그어진다. 접히면 자리가 없어 렌더되지 않는다.
54
+ */
55
+ actions?: SGnbSystemAction[];
56
+ /** 도메인 태그 텍스트. 접히면 자리가 없어 렌더되지 않는다 */
57
+ domain?: string;
58
+ /** 알림 버튼. 없으면 렌더하지 않는다. 설정과 나란히 서면 남는 폭을 먹고, 혼자면 폭을 다 먹는다 */
59
+ alert?: SGnbSystemAlert;
60
+ /**
61
+ * 설정 버튼. 없으면 렌더하지 않는다. 알림과 나란히 서면 제 폭만 갖고, 혼자면 폭을 다 먹는다.
62
+ * 접히면 자리가 없어 렌더되지 않는다 — 접힌 상태에서도 닿아야 하면 SGnb 의 `foldedFooter` 에 둔다.
63
+ */
64
+ setting?: SGnbSystemSetting;
65
+ /** 계정 행. 없으면 렌더하지 않는다 */
66
+ account?: SGnbSystemAccount;
67
+ }
68
+ /**
69
+ * SGnbSystem — GNB 맨 아래에 붙는 system 패널.
70
+ *
71
+ * 위에서부터 [행 목록(`actions`)] · 구분선 · [도메인 태그] · [알림 | 설정] · [계정] 을 쌓는다.
72
+ * 각 조각은 해당 prop 을 줄 때만 나타나므로, 서비스마다 필요한 만큼만 켜서 쓴다 — 계정만, 알림만,
73
+ * 설정만, 알림+계정 … 어떤 부분집합이어도 그 조합만으로 판이 성립하도록 다음을 지킨다.
74
+ *
75
+ * - **구분선은 위아래 양쪽에 내용이 있을 때만** 긋는다. `actions` 만 주면 바닥에 뜻 없는 선이 남지 않는다.
76
+ * - **알림·설정은 혼자 서면 폭을 다 먹는다.** 둘이 나란히 서면 알림이 남는 폭을, 설정이 제 폭을 갖고
77
+ * 사이에 세로선이 놓인다. 어느 쪽이 빠져도 왼쪽 끝은 위아래 행과 맞는다.
78
+ * - **켜진 조각이 하나도 없으면 아무것도 렌더하지 않는다** — 빈 판은 GNB 바닥에 정체 모를 경계선만 남긴다.
79
+ *
80
+ * 알림·설정·계정은 늘 함께 붙어 다니는 한 덩어리라 사이를 띄우지 않고, 그 위 조각들만 간격을 갖는다.
81
+ *
82
+ * `folded` 면 48px 레일 폭에 맞춘 min 형태가 된다 — **알림·계정 아이콘만** 남고 라벨·태그·행 목록·설정은
83
+ * 빠진다(시안). 알림 개수는 적을 자리가 없어 점 배지로 바뀐다. 둘 다 없는 조합(설정만 쓰는 앱 등)이면
84
+ * 접힌 패널은 렌더되지 않으므로, 접힌 상태에서도 닿아야 하는 것은 SGnb 의 `foldedTop`·`foldedFooter` 에 둔다.
85
+ *
86
+ * `alert.count` 가 1 이상이면 벨이 울리는 아이콘(`alert`)과 강조색으로 바뀐다 — light 는 파랑,
87
+ * dark 는 노랑(토큰이 정한다). 0 이거나 없으면 조용한 벨(`bell`)에 기본 색이다.
88
+ *
89
+ * SGnb 의 `system` 슬롯에 넣으면 `color` 와 `folded` 를 GNB 에서 받아오므로 앱이 다시 넘길 필요가 없다.
90
+ * 단독으로 쓰면 두 prop 을 직접 준다. 폭은 늘 부모를 가득 채운다 — 좁은 GNB 컬럼에 놓이는 패널이다.
91
+ */
92
+ export declare const SGnbSystem: import("react").ForwardRefExoticComponent<SGnbSystemProps & import("react").RefAttributes<HTMLDivElement>>;
93
+ export {};
@@ -0,0 +1,89 @@
1
+ import type { SSystemActionButtonColor } from '../SSystemActionButton';
2
+ /**
3
+ * SGnbSystem 설정.
4
+ *
5
+ * 토큰은 GNB system 패널 한 벌(`--cmp-gnb-system-*`)이다.
6
+ * 패널(배경·경계·구분선·간격) → --cmp-gnb-system-panel-*
7
+ * 도메인 태그 → --cmp-gnb-system-domainTag-*
8
+ * 행 공통(높이·라운드·아이콘 프레임) → --cmp-gnb-system-item-* (SSystemActionButton 과 공유)
9
+ * 알림 버튼 → --cmp-gnb-system-alertButton-*
10
+ * 설정 버튼 → --cmp-gnb-system-setting-*
11
+ * 펼침·접힘 패널 여백 → --cmp-gnb-system-project-padding · --cmp-gnb-system-min-padding
12
+ *
13
+ * 타이포그래피는 CSS 변수가 아니라 `.typo-*` 프리셋으로 나온다.
14
+ * domainTag.typography → typo-body-sm-medium (12/500/20)
15
+ * item.label.typography → typo-body-sm-semibold (12/600/20)
16
+ * alertButton.count → typo-body-md-bold (13/700/22)
17
+ */
18
+ /** 색상(표면). light = 흰 면, dark = 오션블루 면. GNB 의 color 를 그대로 따라간다 */
19
+ export declare const GNB_SYSTEM_COLORS: readonly ["light", "dark"];
20
+ export type SGnbSystemColor = (typeof GNB_SYSTEM_COLORS)[number];
21
+ /**
22
+ * 패널 색이 곧 행 색이다 — 행(아이콘 프레임·라벨·hover)은 SSystemActionButton 과 같은
23
+ * `--cmp-gnb-system-item-*` 토큰을 쓰므로, 그 색표를 그대로 빌려 두 컴포넌트가 어긋나지 않게 한다.
24
+ * `darker`(패널 없이 어두운 GNB 면에 바로 얹는 색)는 패널에 대응 토큰이 없어 노출하지 않는다.
25
+ */
26
+ export type GnbSystemItemColor = SSystemActionButtonColor;
27
+ export interface GnbSystemColorTokens {
28
+ /** 패널 배경 */
29
+ bg: string;
30
+ /**
31
+ * 패널 위쪽 경계 (GNB 본문과 나누는 선). 배경만으로 경계가 읽히는 색에서는 없다.
32
+ * 토큰에는 light·dark 모두 정의돼 있지만, dark 는 시안이 선을 긋지 않는다 — 아래 주석 참고.
33
+ */
34
+ border?: string;
35
+ /** 패널 안 구분선 (가로 divider · 알림↔설정 세로선) */
36
+ divider: string;
37
+ /** 도메인 태그 배경 */
38
+ domainBg: string;
39
+ /** 도메인 태그 글자색 */
40
+ domainText: string;
41
+ /** 알림이 있을 때의 벨 글리프색 */
42
+ alertIcon: string;
43
+ /** 알림 개수(펼침) · 점 배지(접힘) 색 */
44
+ alertCount: string;
45
+ /** 알림이 있을 때의 hover 배경. 없으면 행 기본 hover 를 쓴다 */
46
+ alertHoverBg?: string;
47
+ }
48
+ export declare const GNB_SYSTEM_COLOR_CONFIG: Record<SGnbSystemColor, GnbSystemColorTokens>;
49
+ /** 치수 — 전부 토큰 참조 */
50
+ export declare const GNB_SYSTEM_LAYOUT: {
51
+ /** 펼친 패널의 안쪽 여백 */
52
+ readonly padding: "var(--cmp-gnb-system-project-padding)";
53
+ /** 접힌(min) 패널의 안쪽 여백 */
54
+ readonly foldedPadding: "var(--cmp-gnb-system-min-padding)";
55
+ /**
56
+ * 패널이 쌓는 블록 사이 간격. 알림↔설정 사이의 가로 간격도 전용 토큰이 없어 이 값을 쓴다
57
+ * (시안에서 두 간격이 같다).
58
+ */
59
+ readonly gap: string;
60
+ /** 행 높이 */
61
+ readonly itemHeight: string;
62
+ /** 행 라운드 */
63
+ readonly itemRadius: string;
64
+ /** 아이콘 프레임 한 변 */
65
+ readonly iconFrame: string;
66
+ /** 아이콘 글리프 크기 */
67
+ readonly iconGlyph: string;
68
+ /** 아이콘 프레임 라운드 */
69
+ readonly iconRadius: string;
70
+ /** 아이콘 프레임 ↔ 라벨 간격 */
71
+ readonly iconLabelGap: string;
72
+ /** 알림 버튼 좌우 여백 */
73
+ readonly alertPaddingX: string;
74
+ /** 설정 버튼 좌우 여백 */
75
+ readonly settingPaddingX: "var(--cmp-gnb-system-setting-paddingX)";
76
+ /** 도메인 태그 */
77
+ readonly domainPaddingX: string;
78
+ readonly domainPaddingY: string;
79
+ readonly domainRadius: string;
80
+ };
81
+ /**
82
+ * 알림 점 배지 지름(px). 접힌 패널에는 개수를 적을 자리가 없어 점만 찍는다.
83
+ * 전용 토큰이 없어 시안 값을 상수로 둔다.
84
+ */
85
+ export declare const GNB_SYSTEM_ALERT_DOT_SIZE = 6;
86
+ /** 알림 버튼 기본 라벨 */
87
+ export declare const GNB_SYSTEM_ALERT_LABEL = "\uC54C\uB9BC";
88
+ /** 설정 버튼 기본 라벨 */
89
+ export declare const GNB_SYSTEM_SETTING_LABEL = "\uC124\uC815";
@@ -0,0 +1,2 @@
1
+ export { SGnbSystem, type SGnbSystemProps, type SGnbSystemAction, type SGnbSystemAlert, type SGnbSystemSetting, type SGnbSystemAccount, } from './SGnbSystem';
2
+ export { GNB_SYSTEM_COLORS, GNB_SYSTEM_COLOR_CONFIG, GNB_SYSTEM_LAYOUT, type SGnbSystemColor, type GnbSystemColorTokens, } from './gnbSystem.config';
@@ -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,11 +30,13 @@
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)
36
37
  - [SGhostButton](../SGhostButton)
37
38
  - [SGnb](../SGnb)
39
+ - [SGnbSystem](../SGnbSystem)
38
40
  - [SGuide](../SGuide)
39
41
  - [SImage](../SImage)
40
42
  - [SKeyValueTable](../SKeyValueTable)
@@ -43,9 +45,11 @@
43
45
  - [SNumberInput](../SNumberInput)
44
46
  - [SPagination](../SPagination)
45
47
  - [SPopover](../SPopover)
48
+ - [SSearchInput](../SSearchInput)
46
49
  - [SSectionHeaderCard](../SSectionHeaderCard)
47
50
  - [SSelect](../SSelect)
48
51
  - [SStepper](../SStepper)
52
+ - [SSystemActionButton](../SSystemActionButton)
49
53
  - [STable](../STable)
50
54
  - [STag](../STag)
51
55
  - [STextLink](../STextLink)
@@ -68,11 +72,13 @@ graph TD;
68
72
  SDateRangePicker --> SIcon
69
73
  SDraggableItem --> SIcon
70
74
  SDropdownButton --> SIcon
75
+ SEditor --> SIcon
71
76
  SExpansionItem --> SIcon
72
77
  SField --> SIcon
73
78
  SFilePicker --> SIcon
74
79
  SGhostButton --> SIcon
75
80
  SGnb --> SIcon
81
+ SGnbSystem --> SIcon
76
82
  SGuide --> SIcon
77
83
  SImage --> SIcon
78
84
  SKeyValueTable --> SIcon
@@ -81,9 +87,11 @@ graph TD;
81
87
  SNumberInput --> SIcon
82
88
  SPagination --> SIcon
83
89
  SPopover --> SIcon
90
+ SSearchInput --> SIcon
84
91
  SSectionHeaderCard --> SIcon
85
92
  SSelect --> SIcon
86
93
  SStepper --> SIcon
94
+ SSystemActionButton --> SIcon
87
95
  STable --> SIcon
88
96
  STag --> SIcon
89
97
  STextLink --> 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;