sellmate-design-system-react 9.0.0-beta.4 → 9.0.0-beta.41

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 (196) hide show
  1. package/AGENTS.md +670 -95
  2. package/README.md +111 -9
  3. package/dist/components/SAccountListBox/AccountListBoxPortal.d.ts +31 -0
  4. package/dist/components/SAccountListBox/README.md +86 -0
  5. package/dist/components/SAccountListBox/SAccountListBox.d.ts +79 -0
  6. package/dist/components/SAccountListBox/SystemMenuPortal.d.ts +58 -0
  7. package/dist/components/SAccountListBox/accountListBox.config.d.ts +64 -0
  8. package/dist/components/SAccountListBox/index.d.ts +2 -0
  9. package/dist/components/SBadge/README.md +26 -0
  10. package/dist/components/SBadge/SBadge.d.ts +1 -1
  11. package/dist/components/SBarcodeInput/README.md +12 -4
  12. package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +10 -2
  13. package/dist/components/SButton/README.md +38 -0
  14. package/dist/components/SCalendar/README.md +13 -0
  15. package/dist/components/SCalendarBoard/CalendarDayCard.d.ts +38 -0
  16. package/dist/components/SCalendarBoard/CalendarDayEventListBox.d.ts +26 -0
  17. package/dist/components/SCalendarBoard/CalendarEventButton.d.ts +13 -0
  18. package/dist/components/SCalendarBoard/CalendarMoreButton.d.ts +12 -0
  19. package/dist/components/SCalendarBoard/README.md +137 -0
  20. package/dist/components/SCalendarBoard/SCalendarBoard.d.ts +68 -0
  21. package/dist/components/SCalendarBoard/calendarBoard.config.d.ts +33 -0
  22. package/dist/components/SCalendarBoard/index.d.ts +3 -0
  23. package/dist/components/SCalendarBoard/types.d.ts +31 -0
  24. package/dist/components/SCallout/README.md +16 -1
  25. package/dist/components/SCallout/SCallout.d.ts +9 -4
  26. package/dist/components/SCard/README.md +16 -0
  27. package/dist/components/SCard/SCard.d.ts +17 -2
  28. package/dist/components/SCheckbox/README.md +8 -0
  29. package/dist/components/SChipFilter/README.md +339 -14
  30. package/dist/components/SChipFilter/SChipFilter.d.ts +150 -60
  31. package/dist/components/SChipFilter/index.d.ts +1 -1
  32. package/dist/components/SChipInput/README.md +16 -2
  33. package/dist/components/SChipInput/SChipInput.d.ts +8 -2
  34. package/dist/components/SChipInput/index.d.ts +1 -1
  35. package/dist/components/SCircleProgress/README.md +8 -0
  36. package/dist/components/SConfirmModal/README.md +11 -3
  37. package/dist/components/SConfirmModal/SConfirmModal.d.ts +16 -8
  38. package/dist/components/SDatePicker/README.md +20 -2
  39. package/dist/components/SDatePicker/SDatePicker.d.ts +27 -4
  40. package/dist/components/SDateRangePicker/README.md +19 -4
  41. package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +19 -6
  42. package/dist/components/SDivider/README.md +7 -0
  43. package/dist/components/SDivider/SDivider.d.ts +11 -0
  44. package/dist/components/SDraggableItem/README.md +37 -0
  45. package/dist/components/SDraggableItem/SDraggableItem.d.ts +2 -0
  46. package/dist/components/SDraggableItem/index.d.ts +1 -1
  47. package/dist/components/SDraggableList/README.md +30 -0
  48. package/dist/components/SDraggableList/SDraggableList.d.ts +11 -0
  49. package/dist/components/SDraggableList/index.d.ts +1 -1
  50. package/dist/components/SDrawer/README.md +8 -0
  51. package/dist/components/SDropdownButton/README.md +19 -0
  52. package/dist/components/SEditor/EditorBody.d.ts +36 -0
  53. package/dist/components/SEditor/EditorToolbar.d.ts +93 -0
  54. package/dist/components/SEditor/README.md +203 -0
  55. package/dist/components/SEditor/SEditor.d.ts +114 -0
  56. package/dist/components/SEditor/editor-icons.d.ts +63 -0
  57. package/dist/components/SEditor/editor.config.d.ts +119 -0
  58. package/dist/components/SEditor/index.d.ts +8 -0
  59. package/dist/components/SEditor/tiptap-api.d.ts +29 -0
  60. package/dist/components/SEditor/use-is-mobile.d.ts +14 -0
  61. package/dist/components/SExpansionItem/README.md +36 -0
  62. package/dist/components/SExpansionItem/index.d.ts +1 -1
  63. package/dist/components/SField/README.md +29 -5
  64. package/dist/components/SField/SField.d.ts +20 -8
  65. package/dist/components/SFilePicker/README.md +18 -4
  66. package/dist/components/SFilePicker/SFilePicker.d.ts +11 -5
  67. package/dist/components/SFooter/README.md +25 -0
  68. package/dist/components/SFooter/SFooter.d.ts +4 -3
  69. package/dist/components/SForm/README.md +12 -1
  70. package/dist/components/SForm/SForm.d.ts +2 -2
  71. package/dist/components/SGhostButton/README.md +22 -4
  72. package/dist/components/SGnb/README.md +57 -6
  73. package/dist/components/SGnb/SGnb.d.ts +58 -8
  74. package/dist/components/SGnb/gnb.config.d.ts +12 -5
  75. package/dist/components/SGnb/index.d.ts +1 -1
  76. package/dist/components/SGnbSystem/README.md +186 -0
  77. package/dist/components/SGnbSystem/SGnbSystem.d.ts +179 -0
  78. package/dist/components/SGnbSystem/gnbSystem.config.d.ts +122 -0
  79. package/dist/components/SGnbSystem/index.d.ts +2 -0
  80. package/dist/components/SGuide/README.md +15 -0
  81. package/dist/components/SIcon/README.md +10 -0
  82. package/dist/components/SIcon/SIcon.d.ts +1 -1
  83. package/dist/components/SIcon/icons.gen.d.ts +4 -0
  84. package/dist/components/SImage/README.md +15 -1
  85. package/dist/components/SImage/SImage.d.ts +2 -2
  86. package/dist/components/SInput/README.md +6 -4
  87. package/dist/components/SInput/SInput.d.ts +10 -4
  88. package/dist/components/SKeyValueTable/README.md +86 -0
  89. package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +6 -2
  90. package/dist/components/SKeyValueTable/index.d.ts +1 -1
  91. package/dist/components/SLayout/README.md +22 -1
  92. package/dist/components/SLayout/SLayout.d.ts +6 -2
  93. package/dist/components/SLayout/index.d.ts +1 -1
  94. package/dist/components/SLinearProgress/README.md +15 -0
  95. package/dist/components/SLinearProgress/SLinearProgress.d.ts +3 -0
  96. package/dist/components/SLinearProgress/index.d.ts +1 -1
  97. package/dist/components/SList/README.md +15 -3
  98. package/dist/components/SList/SList.d.ts +7 -5
  99. package/dist/components/SList/index.d.ts +1 -1
  100. package/dist/components/SListItem/README.md +41 -0
  101. package/dist/components/SListItem/index.d.ts +1 -1
  102. package/dist/components/SLoadingContainer/loading.d.ts +18 -2
  103. package/dist/components/SLoadingModal/README.md +10 -2
  104. package/dist/components/SLoadingModal/SLoadingModal.d.ts +4 -4
  105. package/dist/components/SLoadingModal/index.d.ts +1 -1
  106. package/dist/components/SModal/README.md +1 -1
  107. package/dist/components/SNumberInput/README.md +14 -6
  108. package/dist/components/SNumberInput/SNumberInput.d.ts +12 -4
  109. package/dist/components/SPage/README.md +87 -5
  110. package/dist/components/SPage/SPage.d.ts +29 -9
  111. package/dist/components/SPage/SPageHeader.d.ts +31 -13
  112. package/dist/components/SPage/index.d.ts +2 -2
  113. package/dist/components/SPage/page-column.d.ts +34 -0
  114. package/dist/components/SPage/page-width.d.ts +23 -0
  115. package/dist/components/SPage/page.config.d.ts +18 -0
  116. package/dist/components/SPopover/README.md +15 -0
  117. package/dist/components/SPopup/README.md +27 -2
  118. package/dist/components/SPopup/SPopup.d.ts +7 -3
  119. package/dist/components/SPopup/index.d.ts +1 -1
  120. package/dist/components/SPortal/README.md +18 -0
  121. package/dist/components/SRadio/README.md +20 -0
  122. package/dist/components/SRadioButton/README.md +18 -0
  123. package/dist/components/SRadioButton/SRadioButton.d.ts +1 -1
  124. package/dist/components/SRadioCard/README.md +78 -0
  125. package/dist/components/SRadioCard/SRadioCard.d.ts +29 -0
  126. package/dist/components/SRadioCard/SRadioCardGroup.d.ts +36 -0
  127. package/dist/components/SRadioCard/index.d.ts +2 -0
  128. package/dist/components/SScrollArea/README.md +27 -0
  129. package/dist/components/SSearchInput/README.md +63 -0
  130. package/dist/components/SSearchInput/SSearchInput.d.ts +52 -0
  131. package/dist/components/SSearchInput/index.d.ts +1 -0
  132. package/dist/components/SSectionHeaderCard/README.md +37 -0
  133. package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +10 -0
  134. package/dist/components/SSelect/README.md +29 -11
  135. package/dist/components/SSelect/SSelect.d.ts +28 -8
  136. package/dist/components/SSplitter/README.md +17 -2
  137. package/dist/components/SSplitter/SSplitter.d.ts +7 -3
  138. package/dist/components/SStepper/README.md +26 -0
  139. package/dist/components/SSwitch/README.md +13 -1
  140. package/dist/components/SSwitch/SSwitch.d.ts +1 -3
  141. package/dist/components/SSystemActionButton/README.md +221 -0
  142. package/dist/components/SSystemActionButton/SSystemActionButton.d.ts +161 -0
  143. package/dist/components/SSystemActionButton/index.d.ts +2 -0
  144. package/dist/components/SSystemActionButton/systemActionButton.config.d.ts +93 -0
  145. package/dist/components/STable/README.md +94 -10
  146. package/dist/components/STable/STable.d.ts +130 -22
  147. package/dist/components/STable/index.d.ts +1 -1
  148. package/dist/components/STabs/README.md +13 -2
  149. package/dist/components/STabs/STabs.d.ts +3 -5
  150. package/dist/components/STabs/index.d.ts +1 -1
  151. package/dist/components/STabs/tabs.config.d.ts +3 -4
  152. package/dist/components/STag/README.md +52 -0
  153. package/dist/components/STag/STag.d.ts +3 -1
  154. package/dist/components/STextLink/README.md +19 -1
  155. package/dist/components/STextLink/STextLink.d.ts +5 -1
  156. package/dist/components/STextarea/README.md +4 -4
  157. package/dist/components/STextarea/STextarea.d.ts +10 -4
  158. package/dist/components/STimePicker/README.md +16 -2
  159. package/dist/components/STimePicker/STimePicker.d.ts +11 -5
  160. package/dist/components/STimePicker/timepicker.config.d.ts +4 -2
  161. package/dist/components/STimeRangePicker/README.md +28 -2
  162. package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +11 -5
  163. package/dist/components/SToast/README.md +25 -1
  164. package/dist/components/SToast/SToast.d.ts +2 -2
  165. package/dist/components/SToggle/README.md +8 -0
  166. package/dist/components/SToggle/index.d.ts +1 -1
  167. package/dist/components/STooltip/README.md +25 -1
  168. package/dist/components/STooltip/STooltip.d.ts +1 -1
  169. package/dist/components/STree/README.md +44 -3
  170. package/dist/components/STree/STree.d.ts +24 -4
  171. package/dist/components/STree/index.d.ts +1 -1
  172. package/dist/docs/Gallery.d.ts +9 -0
  173. package/dist/docs/gallery-previews.d.ts +24 -0
  174. package/dist/index.cjs +10890 -5322
  175. package/dist/index.cjs.map +1 -1
  176. package/dist/index.d.ts +8 -0
  177. package/dist/index.js +10852 -5322
  178. package/dist/index.js.map +1 -1
  179. package/dist/lib/doc-sections.d.ts +35 -0
  180. package/dist/lib/field-width.d.ts +31 -0
  181. package/dist/lib/floating-height.d.ts +15 -0
  182. package/dist/lib/story-docs.d.ts +19 -3
  183. package/dist/lib/truncated-value-tooltip.d.ts +18 -0
  184. package/dist/llms-full.txt +3396 -297
  185. package/dist/llms.txt +675 -97
  186. package/dist/playground/categories.d.ts +19 -0
  187. package/dist/styles.css +1731 -166
  188. package/dist/theme.css +216 -24
  189. package/eslint/index.mjs +14 -0
  190. package/eslint/lib/table-column.mjs +26 -0
  191. package/eslint/rules/divider-vertical-height.mjs +137 -0
  192. package/eslint/rules/field-width-grade.d.mts +41 -0
  193. package/eslint/rules/field-width-grade.mjs +311 -0
  194. package/eslint/rules/table-column-width.mjs +110 -0
  195. package/eslint/scale.gen.mjs +5 -2
  196. package/package.json +13 -1
package/README.md CHANGED
@@ -178,15 +178,18 @@ export default [
178
178
 
179
179
  **`error` 는 "지키지 않으면 깨지는 것" 에만 씁니다.** 앱 화면을 Tailwind 로 자유롭게 만드는 것은 정상이고, 디자인 시스템이 그 자유까지 막지 않습니다. 나머지는 권고(`warn`)입니다.
180
180
 
181
- | 규칙 | 기본 | 검출 대상 |
182
- | -------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
183
- | `sellmate/no-off-scale-spacing` | **error** | 스케일 밖 디자인 시스템 간격 (`gap-sd-13`) — Tailwind v4 에서 **조용히 무시되어** 스타일이 사라진다 |
184
- | `sellmate/no-raw-html-control` | **error** | 대응 컴포넌트가 있는 생 HTML (`<button>` `<input>` `<select>` `<textarea>` `<table>` `<form>` `<dialog>` `<hr>` `<details>` `<progress>`), `alert()`/`confirm()` — 디자인 시스템을 통째로 우회하는 경우 |
185
- | `sellmate/prefer-typo-preset` | warn | `text-14 font-bold` 같은 낱개 조합 → `typo-*` 프리셋 |
186
- | `sellmate/component-group-gap` | warn | 같은 컴포넌트를 나열할 때의 그룹 간격 — 배열 방향에 따라 값이 다르다(체크박스 가로 24 / 세로 8) |
187
- | `sellmate/table-numeric-align` | warn | 수량 컬럼(금액·수량 등)에 `align: 'right'` 누락 — **`--fix` 로 자동 교정** |
188
- | `sellmate/require-locale-number` | warn | 수량 컬럼의 `toLocaleString()` 누락 — 세 자리 콤마 |
189
- | `sellmate/no-arbitrary-class` | **off** | 토큰이 있는 속성(색·타이포·간격·모서리)의 임의 값 — `text-[14px]`, `bg-[#eee]`. 앱 고유 화면에는 정당한 사용이 많아 기본값은 끕니다 |
181
+ | 규칙 | 기본 | 검출 대상 |
182
+ | ---------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
183
+ | `sellmate/no-off-scale-spacing` | **error** | 스케일 밖 디자인 시스템 간격 (`gap-sd-13`) — Tailwind v4 에서 **조용히 무시되어** 스타일이 사라진다 |
184
+ | `sellmate/no-raw-html-control` | **error** | 대응 컴포넌트가 있는 생 HTML (`<button>` `<input>` `<select>` `<textarea>` `<table>` `<form>` `<dialog>` `<hr>` `<details>` `<progress>`), `alert()`/`confirm()` — 디자인 시스템을 통째로 우회하는 경우 |
185
+ | `sellmate/divider-vertical-height` | **error** | 세로 `SDivider` 의 높이를 `className="h-*"` 로 준 경우 — `align-self: stretch` 가 무효가 되어 선이 줄 맨 위에 붙는다. `height` prop 으로 준다(**`--fix` 로 치환**) |
186
+ | `sellmate/prefer-typo-preset` | warn | `text-14 font-bold` 같은 낱개 조합 → `typo-*` 프리셋 |
187
+ | `sellmate/component-group-gap` | warn | 같은 컴포넌트를 나열할 때의 그룹 간격 — 배열 방향에 따라 값이 다르다(체크박스 가로 24 / 세로 8) |
188
+ | `sellmate/table-numeric-align` | warn | 수량 컬럼(금액·수량 등)에 `align: 'right'` 누락 — **`--fix` 로 자동 교정** |
189
+ | `sellmate/require-locale-number` | warn | 수량 컬럼의 `toLocaleString()` 누락 — 세 자리 콤마 |
190
+ | `sellmate/field-width-grade` | warn | 필드 폭이 `maxLength`(스키마 상한)와 어긋남 — 등급 미지정 · 등급 밖 폭 · 상한 대비 과부족 · 등급 px 직접 지정(**`--fix` 로 등급 이름 치환**) |
191
+ | `sellmate/table-column-width` | warn | 컬럼 폭 미지정(기본 120px 이 조용히 들어감) · px 아닌 폭(`%` `clamp()`) · 값을 그리는 열의 `autoWidth` 오용 |
192
+ | `sellmate/no-arbitrary-class` | **off** | 토큰이 있는 속성(색·타이포·간격·모서리)의 임의 값 — `text-[14px]`, `bg-[#eee]`. 앱 고유 화면에는 정당한 사용이 많아 기본값은 끕니다 |
190
193
 
191
194
  `className` 뿐 아니라 `cn()`/`clsx()` 인자, 템플릿 리터럴, 객체 키 안까지 검사합니다.
192
195
 
@@ -237,6 +240,105 @@ export default [
237
240
  'sellmate/table-numeric-align': ['error', { allow: ['rank'] }],
238
241
  ```
239
242
 
243
+ ### 필드 폭 등급 (`field-width-grade`)
244
+
245
+ 필드 너비는 **`maxLength`(= 스키마 상한)로 정합니다.** 상한이 등급 안에 들어오면 그 등급으로 고정하고,
246
+ 등급 상한(`xl`)을 넘거나 상한이 아예 없으면 행 전체(`width="100%"` 또는 생략)로 둡니다.
247
+
248
+ **폭은 등급 이름으로 줍니다** — `width="md"` 처럼 씁니다. 등급은 `--cmp-field-width-*` 토큰으로
249
+ 풀리므로 토큰이 바뀌면 화면이 따라갑니다. 같은 값을 px 로 적으면 그 화면만 옛 값에 남습니다.
250
+
251
+ | 등급 | 쓰는 곳 |
252
+ | ---- | ------------- |
253
+ | `xs` | 숫자 필드 전용 |
254
+ | `sm` | |
255
+ | `md` | |
256
+ | `lg` | |
257
+ | `xl` | 정책상 상한 |
258
+
259
+ ```tsx
260
+ // 상한이 등급 안에 들어온다 → 그 등급으로 고정
261
+ <SInput name="code" label="코드" maxLength={10} width="md" />
262
+
263
+ // 상한이 xl 로도 안 담긴다 → 행 전체
264
+ <SInput name="desc" label="설명" maxLength={100} width="100%" />
265
+
266
+ // 숫자 필드의 상한은 maxLength 가 아니라 max 다 (천단위 콤마도 폭을 먹는다)
267
+ <SNumberInput name="qty" label="수량" max={99} width="xs" />
268
+
269
+ // 등급 값과 같은 px 를 적으면 등급 이름으로 자동 수정됩니다 (--fix)
270
+ <SInput name="code" label="코드" maxLength={10} width={160} /> // → width="md"
271
+ ```
272
+
273
+ 대상은 `SInput` · `SNumberInput` · `SBarcodeInput` 입니다. `STextarea` 는 여러 줄로 접혀 상한이 폭을
274
+ 정하지 않고, 셀렉트 계열은 상한 개념이 없어 목록 최장값으로 폭을 정하며, 날짜·시간 계열은 컴포넌트가
275
+ 자체 상한을 갖습니다.
276
+
277
+ **상한도 폭도 변수로 넘기면 검사하지 않습니다.** 정적으로 알 수 없는 것을 위반으로 보고하지 않습니다.
278
+
279
+ ```tsx
280
+ <SInput maxLength={LIMIT} width={fieldWidth} /> // 통과
281
+ <SInput maxLength={10} {...rest} /> // 통과 (spread 안에 width 가 있을 수 있다)
282
+ ```
283
+
284
+ #### 글자수 환산
285
+
286
+ 등급이 몇 글자를 담는지는 토큰 값(글꼴 크기 · 좌우 패딩 · 테두리 · 스테퍼)에서 계산합니다.
287
+ 한글은 전각이라 영숫자의 약 두 배를 먹으므로 **두 기준 사이에는 아무것도 보고하지 않습니다** —
288
+ 영숫자로 채워도 넘칠 때만 "좁다", 한글로 채워도 남을 때만 "넓다" 로 판정합니다.
289
+
290
+ | 등급 | `SInput` (sm) | `SInput` (md) | `SNumberInput` (sm) | `SNumberInput` (sm, `useButton`) |
291
+ | ---- | ------------------- | ------------------- | ------------------- | -------------------------------- |
292
+ | `xs` | — | — | 영숫자 8 | 영숫자 2 |
293
+ | `sm` | 영숫자 14 / 한글 7 | 영숫자 11 / 한글 6 | 영숫자 14 | 영숫자 8 |
294
+ | `md` | 영숫자 20 / 한글 11 | 영숫자 16 / 한글 9 | 영숫자 20 | 영숫자 14 |
295
+ | `lg` | 영숫자 32 / 한글 17 | 영숫자 26 / 한글 14 | 영숫자 32 | 영숫자 26 |
296
+ | `xl` | 영숫자 68 / 한글 37 | 영숫자 57 / 한글 31 | 영숫자 68 | 영숫자 62 |
297
+
298
+ `SNumberInput` 은 `useButton` 여부로 글자 자리가 크게 갈립니다 — 스테퍼가 없으면 좌우 패딩이
299
+ 두 배가 되고(기본값), 있으면 버튼 두 개와 간격이 폭을 먹습니다. 규칙은 JSX 의 `useButton` 을 읽어
300
+ 둘을 구분합니다.
301
+
302
+ 등급 폭은 `--cmp-field-width-*` 토큰에서 읽으므로 규칙과 컴포넌트가 같은 값을 봅니다.
303
+ 글자수 환산 비율이 팀 기준과 다르면 옵션으로 덮습니다(등급 폭도 덮을 수 있지만, 토큰과 어긋나게 됩니다).
304
+
305
+ ```js
306
+ 'sellmate/field-width-grade': ['warn', {
307
+ charRatio: { narrow: 0.55, wide: 1 },
308
+ }],
309
+ ```
310
+
311
+ ### 컬럼 폭 (`table-column-width`)
312
+
313
+ `STable` 의 컬럼 폭은 `<colgroup>` 의 `<col width>` 로 들어가고 테이블이 `table-fixed` 라,
314
+ **px 이 아닌 값은 에러 없이 화면만 틀어집니다** — `'30%'` 는 `30`(px)으로 읽히고, `clamp()` 같은
315
+ 함수형 값은 폭이 통째로 무효가 된 뒤 auto 로 떨어집니다.
316
+
317
+ ```tsx
318
+ // 내용이 들어가는 열은 전부 폭을 명시한다 (생략하면 기본 120px 이 조용히 들어간다)
319
+ { name: 'name', label: '이름', field: 'name', width: 160 }
320
+ { name: 'code', label: '코드', field: 'code', width: '120px' }
321
+
322
+ // autoWidth 는 남은 폭을 흡수하는 스페이서 열 하나에만 (값을 그리지 않으므로 field 도 없다)
323
+ { name: 'spacer', label: '', autoWidth: true }
324
+
325
+ // ❌ 조용히 깨진다
326
+ { name: 'ratio', label: '비율', field: 'ratio', width: '30%' }
327
+ // ❌ 값을 그리는 열의 autoWidth — 폭이 다른 열에 좌우돼 화면마다 달라진다
328
+ { name: 'title', label: '상품명', field: 'title', autoWidth: true, render: r => r.title }
329
+ ```
330
+
331
+ 검사 대상은 `name`(문자열 리터럴) · `label` 에 더해 **`field` 또는 `autoWidth` 를 가진 객체**입니다.
332
+ 검색 필터 필드나 상세 모달의 키-값 필드가 컬럼과 같은 `{ name, label, ... }` 모양이라, 그 둘만으로
333
+ 판정하면 표와 무관한 객체가 대부분 걸리기 때문입니다. 대신 `{ ...base, name, label }` 처럼 `field` 가
334
+ 스프레드로 들어오는 컬럼은 보고하지 않습니다 — 정적으로 필터 필드와 구분되지 않습니다.
335
+
336
+ 예외는 컬럼 `name` 을 `allow` 로 지정해 뺍니다.
337
+
338
+ ```js
339
+ 'sellmate/table-column-width': ['warn', { allow: ['spacer'] }],
340
+ ```
341
+
240
342
  ### 더 엄격하게 / 더 느슨하게
241
343
 
242
344
  `configs.strict` 는 전 규칙을 error 로 올리고, `<ul>` `<ol>` `<li>` `<svg>` `<label>` 까지 검사하며, 간격 유틸리티에 `sd-` 접두를 강제합니다(`requirePrefix`). 디자인 시스템 규칙을 처음부터 전면 적용하는 신규 프로젝트용입니다.
@@ -0,0 +1,31 @@
1
+ import { type RefObject } from 'react';
2
+ import { type SAccountListBoxContent } from './SAccountListBox';
3
+ /**
4
+ * 계정 행이 놓인 자리. 리스트박스가 어느 방향으로 펼쳐질지를 **이것만** 정한다.
5
+ * - `panel` — GNB 바닥의 세로 판(접힌 레일 포함). 계정 행이 맨 아래라 위로 편다.
6
+ * - `top` — 전폭 상단바 오른쪽 끝. 줄이 화면 맨 위라 아래로 편다.
7
+ */
8
+ type AccountListBoxAnchor = 'panel' | 'top';
9
+ export declare const AccountListBoxAnchorProvider: import("react").Provider<AccountListBoxAnchor>;
10
+ /**
11
+ * 계정 리스트박스를 앵커에 붙여 띄우는 내부 래퍼.
12
+ *
13
+ * 계정 행은 GNB 판(펼침)·레일(접힘)·상단바 세 자리에 서고, 세 자리 모두 "누르면 같은 패널이
14
+ * 뜬다". 그 여는 방식(위치 · SPortal 설정 · 행을 고르면 닫기)을 한 곳에 모아 두어야 자리마다
15
+ * 동작이 갈리지 않는다. 공개 API 가 아니므로 index.ts 로 내보내지 않는다 —
16
+ * 앱은 `SSystemActionButton` 의 `option` 이나 `SGnbSystem` 의 `account.listBox` 로 닿는다.
17
+ */
18
+ interface AccountListBoxPortalOptions {
19
+ /** 표시 여부 */
20
+ open: boolean;
21
+ /** 표시 상태 변경 */
22
+ onOpenChange: (open: boolean) => void;
23
+ /** 붙을 트리거 엘리먼트 */
24
+ anchorRef: RefObject<HTMLElement | null>;
25
+ /** 접근성 이름 */
26
+ ariaLabel?: string;
27
+ /** 패널에 담기는 내용 */
28
+ content: SAccountListBoxContent;
29
+ }
30
+ export declare function AccountListBoxPortal({ open, onOpenChange, anchorRef, ariaLabel, content, }: AccountListBoxPortalOptions): import("react").JSX.Element;
31
+ export {};
@@ -0,0 +1,86 @@
1
+ # SAccountListBox
2
+
3
+ > 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
4
+
5
+ ### SAccountListBox
6
+
7
+ #### Props
8
+
9
+ | Prop | Type | Default | Description |
10
+ |------|------|---------|-------------|
11
+ | `email?` | `string` | — | 로그인한 계정의 이메일 |
12
+ | `name?` | `string` | — | 로그인한 계정의 이름 |
13
+ | `authority?` | `string` | — | 권한. 이름 오른쪽 끝에 붙는다. 없으면 이름만 남는다. (`role` 이 아닌 이유 — 그 이름은 DOM 의 ARIA 속성이라 소비 앱의 a11y lint 가 값을 ARIA 롤로 읽는다) |
14
+ | `accountSetting?` | `SAccountListBoxItem` | — | 계정 설정 행. 주지 않으면 행이 빠진다 |
15
+ | `language?` | `SAccountListBoxLanguage` | — | 언어 변경 행. 주지 않으면 행이 빠진다 |
16
+ | `logout?` | `SAccountListBoxItem` | — | 로그아웃 행. 이 행은 늘 있고, 라벨과 클릭만 받는다 |
17
+
18
+ ## Types
19
+
20
+ ### SAccountListBoxItem
21
+
22
+ ```ts
23
+ /** 리스트박스의 한 행 — 라벨은 기본값이 있고 클릭만 앱이 준다 */
24
+ export interface SAccountListBoxItem {
25
+ /** 라벨 텍스트. 행마다 기본값이 있다 */
26
+ label?: string;
27
+ /** 클릭 */
28
+ onClick?: () => void;
29
+ }
30
+ ```
31
+
32
+ ### SAccountListBoxLanguage
33
+
34
+ ```ts
35
+ /** 언어 변경 행 — 지금 쓰는 언어가 우측에 붙고, 고를 것이 있으면 눌러서 편다 */
36
+ export interface SAccountListBoxLanguage extends SAccountListBoxItem {
37
+ /**
38
+ * 지금 선택돼 있는 언어. 우측에 브랜드색으로 붙는다.
39
+ * `options` 를 함께 주면 그 목록에서 같은 `value` 를 찾아 `label` 로 적는다.
40
+ */
41
+ value?: string;
42
+ /**
43
+ * 고를 수 있는 언어. 주면 행을 눌렀을 때 **하위 메뉴가 우측 아래로 펼쳐지고**,
44
+ * 그동안 계정 패널은 닫히지 않는다. 주지 않으면 행을 누르는 것 자체가 액션이라
45
+ * `onClick` 만 돌고 패널이 닫힌다 — 언어 화면을 따로 두는 앱이 그렇다.
46
+ */
47
+ options?: SAccountListBoxLanguageOption[];
48
+ /** 하위 메뉴에서 언어를 고름. 고르면 하위 메뉴와 계정 패널이 함께 닫힌다 */
49
+ onChange?: (value: string) => void;
50
+ }
51
+ ```
52
+
53
+ ### SAccountListBoxLanguageOption
54
+
55
+ ```ts
56
+ /** 언어 변경 하위 메뉴의 한 칸 */
57
+ export interface SAccountListBoxLanguageOption {
58
+ /** 값. `SAccountListBoxLanguage.value` 와 맞춰 지금 언어를 가린다 */
59
+ value: string;
60
+ /** 화면에 적히는 언어명 */
61
+ label: string;
62
+ }
63
+ ```
64
+
65
+ ## Dependencies
66
+
67
+ ### Used by
68
+
69
+ - [SGnbSystem](../SGnbSystem)
70
+ - [SSystemActionButton](../SSystemActionButton)
71
+
72
+ ### Depends on
73
+
74
+ - [SIcon](../SIcon)
75
+ - [SPortal](../SPortal)
76
+
77
+ ### Graph
78
+
79
+ ```mermaid
80
+ graph TD;
81
+ SAccountListBox --> SIcon
82
+ SAccountListBox --> SPortal
83
+ SGnbSystem --> SAccountListBox
84
+ SSystemActionButton --> SAccountListBox
85
+ style SAccountListBox fill:#f9f,stroke:#333,stroke-width:4px
86
+ ```
@@ -0,0 +1,79 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ /** 리스트박스의 한 행 — 라벨은 기본값이 있고 클릭만 앱이 준다 */
3
+ export interface SAccountListBoxItem {
4
+ /** 라벨 텍스트. 행마다 기본값이 있다 */
5
+ label?: string;
6
+ /** 클릭 */
7
+ onClick?: () => void;
8
+ }
9
+ /** 언어 변경 하위 메뉴의 한 칸 */
10
+ export interface SAccountListBoxLanguageOption {
11
+ /** 값. `SAccountListBoxLanguage.value` 와 맞춰 지금 언어를 가린다 */
12
+ value: string;
13
+ /** 화면에 적히는 언어명 */
14
+ label: string;
15
+ }
16
+ /** 언어 변경 행 — 지금 쓰는 언어가 우측에 붙고, 고를 것이 있으면 눌러서 편다 */
17
+ export interface SAccountListBoxLanguage extends SAccountListBoxItem {
18
+ /**
19
+ * 지금 선택돼 있는 언어. 우측에 브랜드색으로 붙는다.
20
+ * `options` 를 함께 주면 그 목록에서 같은 `value` 를 찾아 `label` 로 적는다.
21
+ */
22
+ value?: string;
23
+ /**
24
+ * 고를 수 있는 언어. 주면 행을 눌렀을 때 **하위 메뉴가 우측 아래로 펼쳐지고**,
25
+ * 그동안 계정 패널은 닫히지 않는다. 주지 않으면 행을 누르는 것 자체가 액션이라
26
+ * `onClick` 만 돌고 패널이 닫힌다 — 언어 화면을 따로 두는 앱이 그렇다.
27
+ */
28
+ options?: SAccountListBoxLanguageOption[];
29
+ /** 하위 메뉴에서 언어를 고름. 고르면 하위 메뉴와 계정 패널이 함께 닫힌다 */
30
+ onChange?: (value: string) => void;
31
+ }
32
+ export interface SAccountListBoxProps extends HTMLAttributes<HTMLDivElement> {
33
+ /** 로그인한 계정의 이메일 */
34
+ email?: string;
35
+ /** 로그인한 계정의 이름 */
36
+ name?: string;
37
+ /**
38
+ * 권한. 이름 오른쪽 끝에 붙는다. 없으면 이름만 남는다.
39
+ * (`role` 이 아닌 이유 — 그 이름은 DOM 의 ARIA 속성이라 소비 앱의 a11y lint 가 값을 ARIA 롤로 읽는다)
40
+ */
41
+ authority?: string;
42
+ /** 계정 설정 행. 주지 않으면 행이 빠진다 */
43
+ accountSetting?: SAccountListBoxItem;
44
+ /** 언어 변경 행. 주지 않으면 행이 빠진다 */
45
+ language?: SAccountListBoxLanguage;
46
+ /** 로그아웃 행. 이 행은 늘 있고, 라벨과 클릭만 받는다 */
47
+ logout?: SAccountListBoxItem;
48
+ }
49
+ /**
50
+ * 리스트박스에 **담기는 내용**만 추린 것.
51
+ * 팝오버로 띄우는 쪽(`SSystemActionButton` 의 `option` · `SGnbSystem` 의 `account.listBox`)이
52
+ * 이 덩어리째 넘겨받으므로, 패널의 DOM 속성(className·style …)과 분리해 둔다.
53
+ */
54
+ export type SAccountListBoxContent = Pick<SAccountListBoxProps, 'email' | 'name' | 'authority' | 'accountSetting' | 'language' | 'logout'>;
55
+ /**
56
+ * SAccountListBox — GNB system 의 계정 행을 눌렀을 때 뜨는 계정 리스트박스.
57
+ *
58
+ * 판에서는 계정 행이 맨 아래에 있어 **행 위로 · 행 왼쪽 끝에 맞춰**, 전폭 상단바에서는 **행 아래로 ·
59
+ * 오른쪽 끝에 맞춰** 펼쳐진다. 이 방향은 고정이라 앱이 고르지 않는다.
60
+ *
61
+ * 위에서부터 [사용자정보(이메일 · 이름 + 권한)] · [계정 설정] · [언어 변경] · [계정 로그아웃] 이다.
62
+ * **권한(`authority`) · 계정 설정 · 언어 변경은 옵션**이고, 사용자정보와 로그아웃은 늘 있다 — 이 패널이 존재하는
63
+ * 이유가 "지금 누구로 로그인해 있는가"와 "나가기"이기 때문이다. 옵션을 빼면 그 줄이 통째로 사라지고
64
+ * 나머지가 위로 붙는다.
65
+ *
66
+ * 폭은 토큰이 정하는 고정값(240px)이라 앱이 늘리지 않는다 — 이 패널은 GNB 폭에 맞춰 뜬다.
67
+ * 행 라벨·아이콘은 무엇을 하는 행인지가 곧 정체라 아이콘을 밖에서 바꾸지 않고, 라벨만 바꿀 수 있다.
68
+ *
69
+ * **언어 변경만 하위 메뉴를 가질 수 있다.** `language.options` 를 주면 그 행이 우측 값 아래로
70
+ * 목록을 펴고, 고를 때까지 계정 패널은 열려 있는다. 주지 않으면 행을 누르는 것 자체가 액션이라
71
+ * `onClick` 만 돌고 패널이 닫힌다 — 언어를 고르는 화면을 따로 두는 앱이 그렇다.
72
+ *
73
+ * **이 컴포넌트는 패널만 그린다.** 계정 행에 붙여 띄우는 것은 `SSystemActionButton` 의
74
+ * `type="account"` 이 맡으므로(`option` 에 이 내용을 넘긴다 — 필수다), 앱이 직접 팝오버를 조립할
75
+ * 일은 없다. 계정 행은 예외 없이 이 패널의 트리거다.
76
+ *
77
+ * 토큰은 `--cmp-gnb-system-accountListBox-*` · `--cmp-gnb-system-accountButton-*`.
78
+ */
79
+ export declare const SAccountListBox: import("react").ForwardRefExoticComponent<SAccountListBoxProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,58 @@
1
+ import { type RefObject } from 'react';
2
+ import { type SPortalAlign, type SPortalPlacement } from '../SPortal';
3
+ import { type STagColor } from '../STag';
4
+ /**
5
+ * 시스템 메뉴의 한 칸.
6
+ *
7
+ * `color` 를 주면 그 칸은 **상태 칸**이 되어 점과 글자가 같은 색으로 물든다(시안) — 상태는 색 자체가
8
+ * 뜻이라, 고르는 자리에서도 그 색을 보고 고른다. 주지 않으면 글자만 있는 칸이고, 지금 값만
9
+ * 브랜드색으로 떠오른다.
10
+ */
11
+ export interface SystemMenuOption {
12
+ /** 값. 지금 값과 맞춰 어느 칸이 선택돼 있는지를 가린다 */
13
+ value: string;
14
+ /** 화면에 적히는 이름 */
15
+ label: string;
16
+ /** 상태 칸의 색. 주면 점 + 같은 색 글자로 그린다 */
17
+ color?: STagColor;
18
+ }
19
+ interface SystemMenuPortalProps {
20
+ /** 표시 여부 */
21
+ open: boolean;
22
+ /** 표시 상태 변경 */
23
+ onOpenChange: (open: boolean) => void;
24
+ /** 붙을 자리 — 값 아래로 펼 때는 **바뀌는 값**(우측 값 묶음 · 상태 태그), 옆으로 펼 때는 행 자체 */
25
+ anchorRef: RefObject<HTMLElement | null>;
26
+ /** 뜨는 방향. 기본 `'bottom'`(앵커 아래) */
27
+ placement?: SPortalPlacement;
28
+ /** 교차축 정렬. 아래로 펼 때는 값이 놓인 쪽 끝, 옆으로 펼 때는 위쪽 끝(`start`) */
29
+ align: SPortalAlign;
30
+ /**
31
+ * 메뉴를 여는 행. 이 행 위의 클릭은 행이 스스로 토글하므로 여기서 닫지 않는다 —
32
+ * 앵커는 행이 아니라 그 안의 값이라, 값 밖(라벨 쪽)을 누르면 닫혔다가 곧바로 다시 열린다.
33
+ */
34
+ triggerRef?: RefObject<HTMLElement | null>;
35
+ /** 접근성 이름 — 무엇을 고르는 메뉴인지 */
36
+ ariaLabel?: string;
37
+ /** 지금 값 */
38
+ value?: string;
39
+ /** 고를 수 있는 칸 */
40
+ options: SystemMenuOption[];
41
+ /** 칸을 고름 */
42
+ onSelect: (value: string) => void;
43
+ }
44
+ /**
45
+ * GNB system 의 값 고르기 메뉴.
46
+ *
47
+ * 계정 패널의 언어 변경 행 · `SSystemActionButton` 의 `subSelect` · `status` 가 모두 이것을 연다 —
48
+ * 세 자리 모두 "지금 값이 적혀 있고, 눌러서 다른 값으로 바꾼다" 는 같은 일이라, 뜨는 자리와 닫히는
49
+ * 시점을 한 곳에 모아 두지 않으면 자리마다 동작이 갈린다.
50
+ *
51
+ * **뜨는 자리는 부르는 쪽이 정한다.** 계정 패널 안의 행처럼 판 안에서 열리는 자리는 바꾸는 대상인
52
+ * 값 바로 아래로, 값이 놓인 쪽 끝에 맞춰 편다(패널 폭 안에 갇혀 있어 옆이 없다). 판 없이 행 하나로
53
+ * 서는 자리는 행 오른쪽으로 편다 — 행 아래는 다음 행이 이어지는 자리라 메뉴가 그 위를 덮는다.
54
+ *
55
+ * 공개 API 가 아니므로 index.ts 로 내보내지 않는다 — 앱은 각 행의 `options` 로 닿는다.
56
+ */
57
+ export declare function SystemMenuPortal({ open, onOpenChange, anchorRef, placement, align, triggerRef, ariaLabel, value, options, onSelect, }: SystemMenuPortalProps): import("react").JSX.Element;
58
+ export {};
@@ -0,0 +1,64 @@
1
+ /** 행의 성격. default = 보통 행, negative = 되돌릴 수 없는 행(로그아웃) */
2
+ export declare const ACCOUNT_LIST_BOX_ITEM_TONES: readonly ["default", "negative"];
3
+ export type SAccountListBoxItemTone = (typeof ACCOUNT_LIST_BOX_ITEM_TONES)[number];
4
+ /** 행마다 정해져 있는 아이콘 — 무엇을 하는 행인지가 아이콘으로 읽히므로 밖에서 바꾸지 않는다 */
5
+ export declare const ACCOUNT_LIST_BOX_ICONS: {
6
+ readonly accountSetting: "account";
7
+ readonly language: "global";
8
+ readonly logout: "logout";
9
+ };
10
+ /** 행 라벨 기본값 — 시안 문구. 앱이 바꿀 수 있다 */
11
+ export declare const ACCOUNT_LIST_BOX_LABELS: {
12
+ readonly accountSetting: "계정 설정";
13
+ readonly language: "언어 변경";
14
+ readonly logout: "계정 로그아웃";
15
+ };
16
+ /** 행 성격별 색 */
17
+ export declare const ACCOUNT_LIST_BOX_TONE_CONFIG: Record<SAccountListBoxItemTone, {
18
+ bg: string;
19
+ bgHover: string;
20
+ text: string;
21
+ icon: string;
22
+ }>;
23
+ /** 치수·색 — 전부 토큰 참조 */
24
+ export declare const ACCOUNT_LIST_BOX_LAYOUT: {
25
+ /** 패널 고정 폭 */
26
+ readonly width: string;
27
+ /** 패널 배경 */
28
+ readonly bg: string;
29
+ /** 패널 라운드 */
30
+ readonly radius: string;
31
+ /** 사용자정보 영역 배경 */
32
+ readonly userdataBg: string;
33
+ /** 사용자정보 영역 좌우 여백 */
34
+ readonly userdataPaddingX: string;
35
+ /** 사용자정보 영역 상하 여백 */
36
+ readonly userdataPaddingY: string;
37
+ /** 이메일 글자색 */
38
+ readonly emailColor: string;
39
+ /** 이름 글자색 */
40
+ readonly nameColor: string;
41
+ /** 권한 글자색 */
42
+ readonly roleColor: string;
43
+ /** 행 묶음의 상하 여백 */
44
+ readonly listPaddingY: string;
45
+ /** 행 좌우 여백 */
46
+ readonly itemPaddingX: string;
47
+ /** 행 상하 여백 */
48
+ readonly itemPaddingY: string;
49
+ /** 행 아이콘 ↔ 라벨 간격 */
50
+ readonly itemGap: string;
51
+ /** 행 아이콘 크기 */
52
+ readonly itemIcon: string;
53
+ /** 우측 값 ↔ 화살표 간격 */
54
+ readonly selectDataGap: string;
55
+ /** 우측 화살표 크기 */
56
+ readonly selectDataIcon: string;
57
+ /** 우측 값 글자색 */
58
+ readonly selectDataText: string;
59
+ /** 시스템 메뉴에서 지금 값인 칸의 글자색 — 계정 행이 아니라 목록 항목이라
60
+ * listBoxItem 의 선택 색을 그대로 따른다(다른 목록의 선택 표시와 같은 색) */
61
+ readonly menuSelectedText: string;
62
+ /** 우측 화살표색 */
63
+ readonly selectDataIconColor: string;
64
+ };
@@ -0,0 +1,2 @@
1
+ export { SAccountListBox, type SAccountListBoxProps, type SAccountListBoxContent, type SAccountListBoxItem, type SAccountListBoxLanguage, type SAccountListBoxLanguageOption, } from './SAccountListBox';
2
+ export { ACCOUNT_LIST_BOX_ICONS, ACCOUNT_LIST_BOX_ITEM_TONES, ACCOUNT_LIST_BOX_LABELS, ACCOUNT_LIST_BOX_LAYOUT, ACCOUNT_LIST_BOX_TONE_CONFIG, type SAccountListBoxItemTone, } from './accountListBox.config';
@@ -10,16 +10,42 @@
10
10
  |------|------|---------|-------------|
11
11
  | `color?` | `SBadgeColor` | `'blue'` | 뱃지 색상 |
12
12
 
13
+ ## Types
14
+
15
+ ### SBadgeColor
16
+
17
+ ```ts
18
+ export type SBadgeColor = (typeof BADGE_COLORS)[number];
19
+ ```
20
+
21
+ ### BADGE_COLORS
22
+
23
+ ```ts
24
+ export const BADGE_COLORS = [
25
+ 'red',
26
+ 'orange',
27
+ 'yellow',
28
+ 'green',
29
+ 'lightblue',
30
+ 'blue',
31
+ 'darkblue',
32
+ 'indigo',
33
+ 'grey',
34
+ ] as const;
35
+ ```
36
+
13
37
  ## Dependencies
14
38
 
15
39
  ### Used by
16
40
 
41
+ - [SCalendarBoard](../SCalendarBoard)
17
42
  - [SSectionHeaderCard](../SSectionHeaderCard)
18
43
 
19
44
  ### Graph
20
45
 
21
46
  ```mermaid
22
47
  graph TD;
48
+ SCalendarBoard --> SBadge
23
49
  SSectionHeaderCard --> SBadge
24
50
  style SBadge fill:#f9f,stroke:#333,stroke-width:4px
25
51
  ```
@@ -1,5 +1,5 @@
1
1
  import { type HTMLAttributes } from 'react';
2
- export declare const BADGE_COLORS: readonly ["red", "orange", "yellow", "green", "blue", "darkblue", "indigo", "grey"];
2
+ export declare const BADGE_COLORS: readonly ["red", "orange", "yellow", "green", "lightblue", "blue", "darkblue", "indigo", "grey"];
3
3
  export type SBadgeColor = (typeof BADGE_COLORS)[number];
4
4
  export interface SBadgeProps extends HTMLAttributes<HTMLSpanElement> {
5
5
  /** 뱃지 색상 */
@@ -18,11 +18,11 @@
18
18
  | `readOnly?` | `boolean` | `false` | |
19
19
  | `rules?` | `Rule[]` | — | |
20
20
  | `status?` | `SFieldStatus` | — | |
21
- | `focused?` | `boolean` | — | |
22
- | `hovered?` | `boolean` | — | |
21
+ | `focused?` | `boolean` | — | 포커스 상태를 밖에서 지정한다 — 강조 테두리·링이 즉시 걸린다 (SField 로 그대로 넘어간다) |
22
+ | `hovered?` | `boolean` | — | 호버 상태를 밖에서 지정한다 — 강조는 `focused` 와 같다 (SField 로 그대로 넘어간다) |
23
23
  | `prefix?` | `ReactNode` | — | 입력 앞 슬롯 |
24
24
  | `suffix?` | `ReactNode` | — | 입력 뒤 슬롯 |
25
- | `inputClass?` | `string` | — | |
25
+ | `inputClassName?` | `string` | — | |
26
26
  | `inputStyle?` | `CSSProperties` | — | |
27
27
  | `label?` | `string` | — | |
28
28
  | `labelWidth?` | `number \| string` | — | |
@@ -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-*` 토큰으로 풀리며 `maxLength`(= 스키마 상한)로 고른다. 상한이 `xl` 을 넘거나 상한이 없으면 `"100%"`. (`sellmate/field-width-grade` 가 검사한다) |
39
39
  | `className?` | `string` | — | |
40
40
  | `style?` | `CSSProperties` | — | |
41
41
 
@@ -47,6 +47,14 @@
47
47
  | `onFocus` | `() => void` | |
48
48
  | `onBlur` | `() => void` | |
49
49
 
50
+ ## Types
51
+
52
+ ### SBarcodeInputSize
53
+
54
+ ```ts
55
+ export type SBarcodeInputSize = SFieldSize;
56
+ ```
57
+
50
58
  ## Dependencies
51
59
 
52
60
  ### Depends on
@@ -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 SBarcodeInputSize = SFieldSize;
8
9
  export interface SBarcodeInputProps {
9
10
  value?: string | number | null;
@@ -20,13 +21,15 @@ export interface SBarcodeInputProps {
20
21
  readOnly?: boolean;
21
22
  rules?: Rule[];
22
23
  status?: SFieldStatus;
24
+ /** 포커스 상태를 밖에서 지정한다 — 강조 테두리·링이 즉시 걸린다 (SField 로 그대로 넘어간다) */
23
25
  focused?: boolean;
26
+ /** 호버 상태를 밖에서 지정한다 — 강조는 `focused` 와 같다 (SField 로 그대로 넘어간다) */
24
27
  hovered?: boolean;
25
28
  /** 입력 앞 슬롯 */
26
29
  prefix?: ReactNode;
27
30
  /** 입력 뒤 슬롯 */
28
31
  suffix?: ReactNode;
29
- inputClass?: string;
32
+ inputClassName?: string;
30
33
  inputStyle?: CSSProperties;
31
34
  label?: string;
32
35
  labelWidth?: number | string;
@@ -39,7 +42,12 @@ export interface SBarcodeInputProps {
39
42
  hint?: string;
40
43
  error?: boolean;
41
44
  errorMessage?: string;
42
- width?: number | string;
45
+ /**
46
+ * 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이.
47
+ * 등급은 `--cmp-field-width-*` 토큰으로 풀리며 `maxLength`(= 스키마 상한)로 고른다.
48
+ * 상한이 `xl` 을 넘거나 상한이 없으면 `"100%"`. (`sellmate/field-width-grade` 가 검사한다)
49
+ */
50
+ width?: SFieldWidth;
43
51
  className?: string;
44
52
  style?: CSSProperties;
45
53
  }
@@ -15,12 +15,48 @@
15
15
  | `rightIcon?` | `SIconName` | — | 레이블 오른쪽 아이콘 |
16
16
  | `label?` | `string` | — | 버튼 텍스트 (문자열만 — 아이콘은 icon/rightIcon 사용) |
17
17
 
18
+ ## Types
19
+
20
+ ### SButtonColor
21
+
22
+ ```ts
23
+ export type SButtonColor = (typeof BUTTON_COLORS)[number];
24
+ ```
25
+
26
+ ### SButtonSize
27
+
28
+ ```ts
29
+ export type SButtonSize = (typeof BUTTON_SIZES)[number];
30
+ ```
31
+
32
+ ### BUTTON_COLORS
33
+
34
+ ```ts
35
+ /**
36
+ * SButton 색상/사이즈 설정 — sd-button(component.button 토큰) 충실 포팅.
37
+ * Stencil `name`(예: primary_sm)의 preset을 color + outline(boolean) + size 로 분리.
38
+ * - primary / danger : solid·outline 모두 지원
39
+ * - secondary : solid 전용 (outline 스타일 없음 → outline 무시)
40
+ * - neutral : 흰 배경 고정, outline 은 회색 테두리만 추가(solid = 테두리 없는 흰 버튼)
41
+ * 색상은 theme.css의 `--cmp-button-*` CSS 변수를 참조한다.
42
+ */
43
+ export const BUTTON_COLORS = ['primary', 'secondary', 'neutral', 'danger'] as const;
44
+ ```
45
+
46
+ ### BUTTON_SIZES
47
+
48
+ ```ts
49
+ export const BUTTON_SIZES = ['xs', 'sm', 'md', 'lg'] as const;
50
+ ```
51
+
18
52
  ## Dependencies
19
53
 
20
54
  ### Used by
21
55
 
56
+ - [SCalendarBoard](../SCalendarBoard)
22
57
  - [SConfirmModal](../SConfirmModal)
23
58
  - [SDropdownButton](../SDropdownButton)
59
+ - [SEditor](../SEditor)
24
60
  - [SFooter](../SFooter)
25
61
  - [SKeyValueTable](../SKeyValueTable)
26
62
  - [SLoadingModal](../SLoadingModal)
@@ -36,8 +72,10 @@
36
72
  ```mermaid
37
73
  graph TD;
38
74
  SButton --> SIcon
75
+ SCalendarBoard --> SButton
39
76
  SConfirmModal --> SButton
40
77
  SDropdownButton --> SButton
78
+ SEditor --> SButton
41
79
  SFooter --> SButton
42
80
  SKeyValueTable --> SButton
43
81
  SLoadingModal --> SButton