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
@@ -2,18 +2,40 @@
2
2
 
3
3
  > 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
4
4
 
5
+ ### SDatePickerMonthListbox
6
+
7
+ #### Props
8
+
9
+ | Prop | Type | Default | Description |
10
+ |------|------|---------|-------------|
11
+ | `value?` | `string \| null` | — | 선택 월 (YYYY-MM) |
12
+ | `anchorYear?` | `number` | — | 연도 리스트가 처음 열릴 때 중앙에 둘 연도. 기본값은 올해 |
13
+ | `selectable?` | `[string, string]` | — | 선택 가능 범위 [시작, 종료] |
14
+ | `className?` | `string` | — | |
15
+ | `style?` | `CSSProperties` | — | |
16
+
17
+ #### Events
18
+
19
+ | Event | Type | Description |
20
+ |-------|------|-------------|
21
+ | `onValueChange` | `(value: string) => void` | |
22
+ | `onMonthSelect` | `(value: string) => void` | 월 컬럼에서 월을 선택했을 때 호출 |
23
+
5
24
  ### SDatePicker
6
25
 
7
26
  #### Props
8
27
 
9
28
  | Prop | Type | Default | Description |
10
29
  |------|------|---------|-------------|
11
- | `value?` | `string \| null` | — | 선택 날짜 (YYYY-MM-DD) |
30
+ | `value?` | `string \| null` | — | 선택 (date: YYYY-MM-DD, month: YYYY-MM, year: YYYY) |
31
+ | `mode?` | `SDatePickerMode` | `'date'` | 선택 모드 |
12
32
  | `size?` | `SDatePickerSize` | `'sm'` | |
13
- | `placeholder?` | `string` | `'YYYY-MM-DD'` | |
33
+ | `placeholder?` | `string` | | |
14
34
  | `selectable?` | `[string, string]` | — | 선택 가능 범위 [시작, 종료] |
15
35
  | `disabled?` | `boolean` | `false` | |
16
- | `width?` | `number \| string` | — | |
36
+ | `clearable?` | `boolean` | `false` | 선택값 지우기 버튼. 값이 있을 때만 나타나고, 누르면 `onValueChange` 로 `null` 이 온다. **필수 입력 필드에는 켜지 않는다** 지우면 다시 고르기 전까지 폼이 통과하지 못한다. `STimePicker` · `STimeRangePicker` · `SSelect` 의 `clearable` 과 같은 규칙이다. |
37
+ | `width?` | `SFieldWidth` | — | 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이. 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다. 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다. |
38
+ | `maxWidth?` | `SFieldWidth` | — | 컨트롤 최대 너비 — 폭 등급 · 숫자=px · CSS 길이. 지정하지 않으면 값 길이(`YYYY-MM-DD`)에 맞춘 내장 상한(`size='md'` → `lg`, `'sm'` → `md`)이 걸려, `width="100%"` 를 받아도 행 전체로 늘어나지 않는다. 팝오버처럼 폭이 이미 좁게 정해진 자리에서 그 폭을 그대로 채워야 하면 `width="100%"` 와 함께 `maxWidth="100%"` 를 준다. `0` 은 상한을 아예 걸지 않는다 — 부모보다 넓어지는 것까지 허용해야 할 때만 쓴다. |
17
39
  | `name?` | `string` | — | |
18
40
  | `rules?` | `Rule[]` | — | |
19
41
  | `status?` | `SFieldStatus` | — | |
@@ -35,9 +57,41 @@
35
57
 
36
58
  | Event | Type | Description |
37
59
  |-------|------|-------------|
38
- | `onValueChange` | `(date: string) => void` | 선택 변경 (sdUpdate) |
60
+ | `onValueChange` | `(value: string \| null) => void` | 선택 변경 (sdUpdate). `clearable` 로 지우면 `null` 이 온다 |
39
61
  | `onViewChange` | `(view: { year: number; month: number }) => void` | 보이는 연·월 변경 (sdViewChange) |
40
62
 
63
+ ### SDatePickerYearListbox
64
+
65
+ #### Props
66
+
67
+ | Prop | Type | Default | Description |
68
+ |------|------|---------|-------------|
69
+ | `value?` | `string \| null` | — | 선택 연도 (YYYY) |
70
+ | `anchorYear?` | `number` | — | 리스트가 처음 열릴 때 중앙에 둘 연도. 기본값은 올해 |
71
+ | `selectable?` | `[string, string]` | — | 선택 가능 범위 [시작, 종료] |
72
+ | `className?` | `string` | — | |
73
+ | `style?` | `CSSProperties` | — | |
74
+
75
+ #### Events
76
+
77
+ | Event | Type | Description |
78
+ |-------|------|-------------|
79
+ | `onValueChange` | `(year: string) => void` | |
80
+
81
+ ## Types
82
+
83
+ ### SDatePickerMode
84
+
85
+ ```ts
86
+ export type SDatePickerMode = 'date' | 'month' | 'year';
87
+ ```
88
+
89
+ ### SDatePickerSize
90
+
91
+ ```ts
92
+ export type SDatePickerSize = SFieldSize;
93
+ ```
94
+
41
95
  ## Dependencies
42
96
 
43
97
  ### Used by
@@ -49,6 +103,7 @@
49
103
 
50
104
  - [SCalendar](../SCalendar)
51
105
  - [SField](../SField)
106
+ - [SGhostButton](../SGhostButton)
52
107
  - [SIcon](../SIcon)
53
108
 
54
109
  ### Graph
@@ -57,6 +112,7 @@
57
112
  graph TD;
58
113
  SDatePicker --> SCalendar
59
114
  SDatePicker --> SField
115
+ SDatePicker --> SGhostButton
60
116
  SDatePicker --> SIcon
61
117
  SChipFilter --> SDatePicker
62
118
  SKeyValueTable --> SDatePicker
@@ -4,23 +4,49 @@ 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 SDatePickerSize = SFieldSize;
9
+ export type SDatePickerMode = 'date' | 'month' | 'year';
8
10
  export interface SDatePickerProps {
9
- /** 선택 날짜 (YYYY-MM-DD) */
11
+ /** 선택 (date: YYYY-MM-DD, month: YYYY-MM, year: YYYY) */
10
12
  value?: string | null;
11
- /** 선택 변경 (sdUpdate) */
12
- onValueChange?: (date: string) => void;
13
+ /** 선택 변경 (sdUpdate). `clearable` 로 지우면 `null` 이 온다 */
14
+ onValueChange?: (value: string | null) => void;
13
15
  /** 보이는 연·월 변경 (sdViewChange) */
14
16
  onViewChange?: (view: {
15
17
  year: number;
16
18
  month: number;
17
19
  }) => void;
20
+ /** 선택 모드 */
21
+ mode?: SDatePickerMode;
18
22
  size?: SDatePickerSize;
19
23
  placeholder?: string;
20
24
  /** 선택 가능 범위 [시작, 종료] */
21
25
  selectable?: [string, string];
22
26
  disabled?: boolean;
23
- width?: number | string;
27
+ /**
28
+ * 선택값 지우기 버튼. 값이 있을 때만 나타나고, 누르면 `onValueChange` 로 `null` 이 온다.
29
+ *
30
+ * **필수 입력 필드에는 켜지 않는다** — 지우면 다시 고르기 전까지 폼이 통과하지 못한다.
31
+ * `STimePicker` · `STimeRangePicker` · `SSelect` 의 `clearable` 과 같은 규칙이다.
32
+ */
33
+ clearable?: boolean;
34
+ /**
35
+ * 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이.
36
+ * 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다.
37
+ * 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다.
38
+ */
39
+ width?: SFieldWidth;
40
+ /**
41
+ * 컨트롤 최대 너비 — 폭 등급 · 숫자=px · CSS 길이. 지정하지 않으면 값 길이(`YYYY-MM-DD`)에 맞춘
42
+ * 내장 상한(`size='md'` → `lg`, `'sm'` → `md`)이 걸려, `width="100%"` 를 받아도 행 전체로
43
+ * 늘어나지 않는다.
44
+ *
45
+ * 팝오버처럼 폭이 이미 좁게 정해진 자리에서 그 폭을 그대로 채워야 하면 `width="100%"` 와 함께
46
+ * `maxWidth="100%"` 를 준다. `0` 은 상한을 아예 걸지 않는다 — 부모보다 넓어지는 것까지 허용해야
47
+ * 할 때만 쓴다.
48
+ */
49
+ maxWidth?: SFieldWidth;
24
50
  name?: string;
25
51
  rules?: Rule[];
26
52
  status?: SFieldStatus;
@@ -38,5 +64,35 @@ export interface SDatePickerProps {
38
64
  className?: string;
39
65
  style?: CSSProperties;
40
66
  }
67
+ export interface SDatePickerYearListboxProps {
68
+ /** 선택 연도 (YYYY) */
69
+ value?: string | null;
70
+ /** 리스트가 처음 열릴 때 중앙에 둘 연도. 기본값은 올해 */
71
+ anchorYear?: number;
72
+ /** 선택 가능 범위 [시작, 종료] */
73
+ selectable?: [string, string];
74
+ onValueChange?: (year: string) => void;
75
+ className?: string;
76
+ style?: CSSProperties;
77
+ }
78
+ /** SDatePickerYearListbox — SDatePicker의 연도 선택 listbox 조각.
79
+ * 자체 트리거/팝오버 없이 연도 리스트만 필요한 커스텀 조합에 재사용한다. */
80
+ export declare function SDatePickerYearListbox({ value, anchorYear, selectable, onValueChange, className, style, }: SDatePickerYearListboxProps): import("react").JSX.Element;
81
+ export interface SDatePickerMonthListboxProps {
82
+ /** 선택 월 (YYYY-MM) */
83
+ value?: string | null;
84
+ /** 연도 리스트가 처음 열릴 때 중앙에 둘 연도. 기본값은 올해 */
85
+ anchorYear?: number;
86
+ /** 선택 가능 범위 [시작, 종료] */
87
+ selectable?: [string, string];
88
+ onValueChange?: (value: string) => void;
89
+ /** 월 컬럼에서 월을 선택했을 때 호출 */
90
+ onMonthSelect?: (value: string) => void;
91
+ className?: string;
92
+ style?: CSSProperties;
93
+ }
94
+ /** SDatePickerMonthListbox — SDatePicker의 월 선택 listbox 조각.
95
+ * 자체 트리거/팝오버 없이 연도+월 리스트만 필요한 커스텀 조합에 재사용한다. */
96
+ export declare function SDatePickerMonthListbox({ value, anchorYear, selectable, onValueChange, onMonthSelect, className, style, }: SDatePickerMonthListboxProps): import("react").JSX.Element;
41
97
  /** SDatePicker — sd-date-picker 포팅. SField + SPopover(SCalendar). */
42
- export declare function SDatePicker({ value, onValueChange, onViewChange, size, placeholder, selectable, disabled, width, name, rules, status, label, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: SDatePickerProps): import("react").JSX.Element;
98
+ export declare function SDatePicker({ value, onValueChange, onViewChange, mode, size, placeholder, selectable, disabled, clearable, width, maxWidth, name, rules, status, label, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: SDatePickerProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- export { SDatePicker, type SDatePickerProps, type SDatePickerSize } from './SDatePicker';
1
+ export { SDatePicker, SDatePickerMonthListbox, SDatePickerYearListbox, type SDatePickerMode, type SDatePickerMonthListboxProps, type SDatePickerProps, type SDatePickerSize, type SDatePickerYearListboxProps, } from './SDatePicker';
@@ -15,7 +15,8 @@
15
15
  | `maxRange?` | `number` | — | 최대 선택 일수 |
16
16
  | `useTimePicker?` | `boolean` | `false` | 시간(시:분) 선택 푸터 사용 여부. true이면 value는 "YYYY-MM-DD HH:mm" 형식이 되고, 캘린더 하단에 시작·종료 시간 입력이 표시된다. |
17
17
  | `disabled?` | `boolean` | `false` | |
18
- | `width?` | `number \| string` | — | |
18
+ | `clearable?` | `boolean` | `false` | 선택값 지우기 버튼. 값이 있을 때만 나타나고, 누르면 `onValueChange` 로 `null` 이 온다. **필수 입력 필드에는 켜지 않는다** 지우면 다시 고르기 전까지 폼이 통과하지 못한다. `SDatePicker` · `STimePicker` · `SSelect` 의 `clearable` 과 같은 규칙이다. |
19
+ | `width?` | `SFieldWidth` | — | 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이. 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다. 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다. |
19
20
  | `name?` | `string` | — | |
20
21
  | `rules?` | `Rule[]` | — | |
21
22
  | `status?` | `SFieldStatus` | — | |
@@ -37,7 +38,7 @@
37
38
 
38
39
  | Event | Type | Description |
39
40
  |-------|------|-------------|
40
- | `onValueChange` | `(range: SDateRangeValue) => void` | 선택 변경 (sdUpdate) — [start, end] |
41
+ | `onValueChange` | `(range: SDateRangeValue) => void` | 선택 변경 (sdUpdate) — [start, end]. `clearable` 로 지우면 `null` 이 온다 |
41
42
  | `onViewChange` | `(view: { year: number; month: number }) => void` | 보이는 연·월 변경 (sdViewChange) |
42
43
 
43
44
  ### SRangeCalendar
@@ -59,6 +60,20 @@
59
60
  | `onPendingStartChange` | `(start: string \| null) => void` | 시작일만 선택된(종료일 대기) 상태를 상위로 전달 — 트리거에 `start ~` 프리뷰 표시용 |
60
61
  | `onViewChange` | `(view: { year: number; month: number }) => void` | |
61
62
 
63
+ ## Types
64
+
65
+ ### SDateRangeValue
66
+
67
+ ```ts
68
+ export type SDateRangeValue = [string, string] | null;
69
+ ```
70
+
71
+ ### SDateRangePickerSize
72
+
73
+ ```ts
74
+ export type SDateRangePickerSize = SFieldSize;
75
+ ```
76
+
62
77
  ## Dependencies
63
78
 
64
79
  ### Used by
@@ -4,11 +4,12 @@ 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 SDateRangeValue = [string, string] | null;
8
9
  export type SDateRangePickerSize = SFieldSize;
9
10
  export interface SDateRangePickerProps {
10
11
  value?: SDateRangeValue;
11
- /** 선택 변경 (sdUpdate) — [start, end] */
12
+ /** 선택 변경 (sdUpdate) — [start, end]. `clearable` 로 지우면 `null` 이 온다 */
12
13
  onValueChange?: (range: SDateRangeValue) => void;
13
14
  /** 보이는 연·월 변경 (sdViewChange) */
14
15
  onViewChange?: (view: {
@@ -26,7 +27,19 @@ export interface SDateRangePickerProps {
26
27
  */
27
28
  useTimePicker?: boolean;
28
29
  disabled?: boolean;
29
- width?: number | string;
30
+ /**
31
+ * 선택값 지우기 버튼. 값이 있을 때만 나타나고, 누르면 `onValueChange` 로 `null` 이 온다.
32
+ *
33
+ * **필수 입력 필드에는 켜지 않는다** — 지우면 다시 고르기 전까지 폼이 통과하지 못한다.
34
+ * `SDatePicker` · `STimePicker` · `SSelect` 의 `clearable` 과 같은 규칙이다.
35
+ */
36
+ clearable?: boolean;
37
+ /**
38
+ * 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이.
39
+ * 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다.
40
+ * 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다.
41
+ */
42
+ width?: SFieldWidth;
30
43
  name?: string;
31
44
  rules?: Rule[];
32
45
  status?: SFieldStatus;
@@ -61,4 +74,4 @@ export interface SRangeCalendarProps {
61
74
  * 캘린더 그리드만 필요한 커스텀 조합(예: 다른 트리거에 팝오버로 얹는 경우)에 재사용한다. */
62
75
  export declare function RangeCalendar({ value, selectable, maxRange, useTimePicker, onSelect, onPendingStartChange, onViewChange, }: SRangeCalendarProps): import("react").JSX.Element;
63
76
  /** SDateRangePicker — sd-date-range-picker 포팅. SField + SPopover(범위 캘린더). */
64
- export declare function SDateRangePicker({ value, onValueChange, onViewChange, size, placeholder, selectable, maxRange, useTimePicker, disabled, width, name, rules, status, label, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: SDateRangePickerProps): import("react").JSX.Element;
77
+ export declare function SDateRangePicker({ value, onValueChange, onViewChange, size, placeholder, selectable, maxRange, useTimePicker, disabled, clearable, width, name, rules, status, label, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: SDateRangePickerProps): import("react").JSX.Element;
@@ -16,6 +16,8 @@
16
16
 
17
17
  - [SCalendar](../SCalendar)
18
18
  - [SDateRangePicker](../SDateRangePicker)
19
+ - [SList](../SList)
20
+ - [STable](../STable)
19
21
  - [STableBar](../STableBar)
20
22
 
21
23
  ### Graph
@@ -24,6 +26,8 @@
24
26
  graph TD;
25
27
  SCalendar --> SDivider
26
28
  SDateRangePicker --> SDivider
29
+ SList --> SDivider
30
+ STable --> SDivider
27
31
  STableBar --> SDivider
28
32
  style SDivider fill:#f9f,stroke:#333,stroke-width:4px
29
33
  ```
@@ -12,6 +12,7 @@
12
12
  | `supportingText?` | `SDraggableItemSlot` | — | 제목을 보조하는 텍스트 |
13
13
  | `supportingTextPosition?` | `SDraggableItemSupportingTextPosition` | `'right'` | 보조 텍스트 위치 |
14
14
  | `trailing?` | `SDraggableItemSlot` | — | 타이틀 뒤에 표시할 태그/콘텐츠 |
15
+ | `depth?` | `number` | `1` | 중첩 단계. `SListItem`·`SExpansionItem` 과 같은 들여쓰기 간격을 사용한다 |
15
16
  | `accentStripe?` | `boolean` | `false` | 아이템 왼쪽 accent stripe 표시 여부 |
16
17
  | `bordered?` | `boolean` | `false` | 외곽 테두리 사용 여부 |
17
18
  | `selected?` | `boolean` | `false` | 선택 상태 여부 |
@@ -29,6 +30,42 @@
29
30
  |-------|------|-------------|
30
31
  | `onDragHandleMouseDown` | `(event: MouseEvent<HTMLDivElement>) => void` | 드래그 핸들 mouse down 이벤트 |
31
32
 
33
+ ## Types
34
+
35
+ ### SDraggableItemSlot
36
+
37
+ ```ts
38
+ export type SDraggableItemSlot = ReactNode | SDraggableItemRenderProp;
39
+ ```
40
+
41
+ ### SDraggableItemSupportingTextPosition
42
+
43
+ ```ts
44
+ export type SDraggableItemSupportingTextPosition = 'right' | 'bottom';
45
+ ```
46
+
47
+ ### SDraggableItemSize
48
+
49
+ ```ts
50
+ export type SDraggableItemSize = 'sm' | 'md';
51
+ ```
52
+
53
+ ### SDraggableItemRenderProp
54
+
55
+ ```ts
56
+ export type SDraggableItemRenderProp = (state: SDraggableItemRenderState) => ReactNode;
57
+ ```
58
+
59
+ ### SDraggableItemRenderState
60
+
61
+ ```ts
62
+ export interface SDraggableItemRenderState {
63
+ hovered: boolean;
64
+ dragging: boolean;
65
+ disabled: boolean;
66
+ }
67
+ ```
68
+
32
69
  ## Dependencies
33
70
 
34
71
  ### Depends on
@@ -17,6 +17,8 @@ export interface SDraggableItemProps extends Omit<HTMLAttributes<HTMLDivElement>
17
17
  supportingTextPosition?: SDraggableItemSupportingTextPosition;
18
18
  /** 타이틀 뒤에 표시할 태그/콘텐츠 */
19
19
  trailing?: SDraggableItemSlot;
20
+ /** 중첩 단계. `SListItem`·`SExpansionItem` 과 같은 들여쓰기 간격을 사용한다 */
21
+ depth?: number;
20
22
  /** 아이템 왼쪽 accent stripe 표시 여부 */
21
23
  accentStripe?: boolean;
22
24
  /** 외곽 테두리 사용 여부 */
@@ -28,6 +28,10 @@
28
28
  | `selectedKey?` | `string` | — | 외부에서 제어하는 selected 아이템 key |
29
29
  | `defaultSelectedKey?` | `string` | — | 초기 selected 아이템 key |
30
30
  | `getDisabled?` | `(item: T, index: number) => boolean` | — | disabled 아이템은 선택 및 드래그에서 제외 |
31
+ | `getDepth?` | `(item: T, index: number) => number` | — | 아이템의 중첩 단계. 기본값은 1 |
32
+ | `setDepth?` | `(item: T, depth: number) => T` | — | depth 변경이 필요한 드롭에서 다음 아이템을 만드는 함수 |
33
+ | `getCanHaveChildren?` | `(item: T, index: number) => boolean` | — | 하위 depth 를 가질 수 있는 아이템인지 판정 |
34
+ | `maxDepth?` | `number` | `3` | 허용할 최대 depth |
31
35
  | `listId?` | `string` | — | Provider 안에서 사용할 리스트 식별자 |
32
36
  | `group?` | `string` | — | 같은 group 값을 가진 리스트끼리 드래그 이벤트를 공유 |
33
37
 
@@ -46,6 +50,31 @@
46
50
  |------|------|---------|-------------|
47
51
  | `children` | `ReactNode` | — | |
48
52
 
53
+ ## Types
54
+
55
+ ### SDraggableGroupMoveEvent
56
+
57
+ ```ts
58
+ export interface SDraggableGroupMoveEvent {
59
+ group: string;
60
+ itemKey: string;
61
+ fromListId: string;
62
+ fromIndex: number;
63
+ toListId: string;
64
+ toIndex: number;
65
+ }
66
+ ```
67
+
68
+ ### SDraggableListRenderState
69
+
70
+ ```ts
71
+ export interface SDraggableListRenderState {
72
+ onDragHandleMouseDown: (event: MouseEvent<HTMLDivElement>) => void;
73
+ selected: boolean;
74
+ depth: number;
75
+ }
76
+ ```
77
+
49
78
  ## Dependencies
50
79
 
51
80
  ### Depends on
@@ -3,7 +3,9 @@ import { type SListProps } from '../SList';
3
3
  export interface SDraggableListRenderState {
4
4
  onDragHandleMouseDown: (event: MouseEvent<HTMLDivElement>) => void;
5
5
  selected: boolean;
6
+ depth: number;
6
7
  }
8
+ export type SDraggableListDropIntent = 'before' | 'inside' | 'after';
7
9
  export interface SDraggableListProps<T> extends Omit<SListProps, 'children' | 'onChange'> {
8
10
  /** 현재 순서대로 렌더링할 아이템 목록 */
9
11
  items: T[];
@@ -21,6 +23,14 @@ export interface SDraggableListProps<T> extends Omit<SListProps, 'children' | 'o
21
23
  onSelectedKeyChange?: (key: string) => void;
22
24
  /** disabled 아이템은 선택 및 드래그에서 제외 */
23
25
  getDisabled?: (item: T, index: number) => boolean;
26
+ /** 아이템의 중첩 단계. 기본값은 1 */
27
+ getDepth?: (item: T, index: number) => number;
28
+ /** depth 변경이 필요한 드롭에서 다음 아이템을 만드는 함수 */
29
+ setDepth?: (item: T, depth: number) => T;
30
+ /** 하위 depth 를 가질 수 있는 아이템인지 판정 */
31
+ getCanHaveChildren?: (item: T, index: number) => boolean;
32
+ /** 허용할 최대 depth */
33
+ maxDepth?: number;
24
34
  /** Provider 안에서 사용할 리스트 식별자 */
25
35
  listId?: string;
26
36
  /** 같은 group 값을 가진 리스트끼리 드래그 이벤트를 공유 */
@@ -1,2 +1,2 @@
1
- export { SDraggableList, type SDraggableListProps, type SDraggableListRenderState, } from './SDraggableList';
1
+ export { SDraggableList, type SDraggableListDropIntent, type SDraggableListProps, type SDraggableListRenderState, } from './SDraggableList';
2
2
  export { SDraggableProvider, SDraggableGroup, type SDraggableGroupMoveEvent, type SDraggableGroupProps, type SDraggableProviderProps, } from './SDraggableGroup';
@@ -29,6 +29,14 @@
29
29
  | `onClose` | `() => void` | 닫기(X) 버튼 클릭 |
30
30
  | `onWidthChange` | `(width: number) => void` | 너비가 확정될 때(드래그를 놓거나 방향키 조작). 드래그하는 동안에는 오지 않는다 |
31
31
 
32
+ ## Types
33
+
34
+ ### SDrawerButton
35
+
36
+ ```ts
37
+ export type SDrawerButton = SFooterButton;
38
+ ```
39
+
32
40
  ## Dependencies
33
41
 
34
42
  ### Depends on
@@ -33,6 +33,25 @@
33
33
  | `open` | `() => void` | 드롭다운 열기 (sdOpen) |
34
34
  | `close` | `() => void` | 드롭다운 닫기 (sdClose) |
35
35
 
36
+ ## Types
37
+
38
+ ### SDropdownButtonSize
39
+
40
+ ```ts
41
+ export type SDropdownButtonSize = 'xs' | 'sm' | 'md';
42
+ ```
43
+
44
+ ### SDropdownButtonItem
45
+
46
+ ```ts
47
+ export interface SDropdownButtonItem {
48
+ value: string | number;
49
+ label: string;
50
+ icon?: SIconName;
51
+ disabled?: boolean;
52
+ }
53
+ ```
54
+
36
55
  ## Dependencies
37
56
 
38
57
  ### Depends on
@@ -0,0 +1,40 @@
1
+ import { type CSSProperties, type RefObject } from 'react';
2
+ import { type SEditorColorOption, type SEditorToolbarItem } from './editor.config';
3
+ import type { SEditorHandle } from './SEditor';
4
+ import type { TiptapApi } from './tiptap-api';
5
+ export interface EditorBodyProps {
6
+ /** 다 불러온 tiptap — 이 컴포넌트는 준비된 뒤에만 마운트된다 */
7
+ api: TiptapApi;
8
+ value?: string;
9
+ defaultValue?: string;
10
+ /** 지금 화면에 있는 HTML. 껍데기(SEditor)가 규칙 검증·폼 제출에 쓴다 */
11
+ htmlRef: RefObject<string>;
12
+ /** 사용자가 고쳐서 값이 바뀌었다 (setHTML·clear 같은 프로그램 조작은 제외) */
13
+ onInput: (html: string) => void;
14
+ onFocusChange: (focused: boolean) => void;
15
+ /** 에디터 인스턴스가 생겼다 — 껍데기가 밀린 focus() 를 흘려보낸다 */
16
+ onReady: () => void;
17
+ placeholder: string;
18
+ typography: boolean;
19
+ editable: boolean;
20
+ disabled: boolean;
21
+ minHeight?: number | string;
22
+ maxHeight?: number | string;
23
+ toolbar: SEditorToolbarItem[] | false;
24
+ /** 선택 영역 위에 뜨는 서식 판. `false` 면 그리지 않는다 */
25
+ bubbleMenu: SEditorToolbarItem[] | false;
26
+ fontSizes: number[];
27
+ colors: SEditorColorOption[];
28
+ highlights: SEditorColorOption[];
29
+ onImageUpload?: (file: File) => Promise<string>;
30
+ editorClass?: string;
31
+ editorStyle?: CSSProperties;
32
+ }
33
+ /**
34
+ * SEditor 의 편집 영역 (내부 전용 — 배럴로 내보내지 않는다).
35
+ *
36
+ * tiptap 을 실제로 부리는 곳은 여기뿐이고, 그 tiptap 조차 `api` prop 으로 받는다.
37
+ * 이 파일이 `@tiptap/*` 을 정적으로 import 하면 그 순간 SEditor 를 쓰지 않는 소비 앱까지
38
+ * tiptap 이 번들에 남는다 (tiptap-api.ts 주석 참고) — 타입만 가져온다.
39
+ */
40
+ export declare const EditorBody: import("react").ForwardRefExoticComponent<EditorBodyProps & import("react").RefAttributes<SEditorHandle>>;
@@ -0,0 +1,87 @@
1
+ import type { Editor } from '@tiptap/core';
2
+ import { type SEditorColorOption, type SEditorHeadingLevel, type SEditorToolbarItem } from './editor.config';
3
+ import type { TiptapApi } from './tiptap-api';
4
+ /** 툴바 막대 — 엔진을 불러오는 동안 SEditor 가 같은 높이를 잡아 두는 데도 쓴다 */
5
+ export declare const TOOLBAR_BAR_CLASS = "flex flex-wrap items-center gap-[2px] border-b border-solid px-[8px] py-[4px]";
6
+ export declare const TOOLBAR_BAR_STYLE: {
7
+ borderBottomColor: string;
8
+ };
9
+ /** 버튼의 눌림 표시에 필요한 것만 추린 에디터 상태 */
10
+ declare const readEditorState: (e: Editor) => {
11
+ heading: SEditorHeadingLevel | 0;
12
+ bold: boolean;
13
+ italic: boolean;
14
+ underline: boolean;
15
+ strike: boolean;
16
+ code: boolean;
17
+ superscript: boolean;
18
+ subscript: boolean;
19
+ alignLeft: boolean;
20
+ alignCenter: boolean;
21
+ alignRight: boolean;
22
+ alignJustify: boolean;
23
+ bulletList: boolean;
24
+ orderedList: boolean;
25
+ taskList: boolean;
26
+ blockquote: boolean;
27
+ codeBlock: boolean;
28
+ link: boolean;
29
+ linkHref: string;
30
+ color: string;
31
+ highlight: string;
32
+ fontSize: string;
33
+ canUndo: boolean;
34
+ canRedo: boolean;
35
+ };
36
+ export type EditorToolbarState = ReturnType<typeof readEditorState>;
37
+ /** 에디터가 아직 없을 때의 상태 — 아무것도 켜져 있지 않고 되돌릴 것도 없다 */
38
+ export declare const IDLE_TOOLBAR_STATE: EditorToolbarState;
39
+ export interface EditorToolbarBarProps {
40
+ /** 눌림 표시 — 에디터가 아직 없으면 `IDLE_TOOLBAR_STATE` */
41
+ state: EditorToolbarState;
42
+ /** 없으면 버튼을 눌러도 아무 일도 하지 않는다 (그때는 disabled 로 함께 잠근다) */
43
+ editor: Editor | null;
44
+ items: SEditorToolbarItem[];
45
+ fontSizes: readonly number[];
46
+ colors: SEditorColorOption[];
47
+ highlights: SEditorColorOption[];
48
+ /** 이미지 업로드 훅. 없으면 `image` 항목을 그리지 않는다 */
49
+ onImageUpload?: (file: File) => Promise<string>;
50
+ /** 편집 불가(비활성·읽기전용·엔진 로딩 중) — 모든 버튼을 잠근다 */
51
+ disabled: boolean;
52
+ /**
53
+ * `'bar'` 는 편집 영역 위에 붙는 막대, `'bubble'` 은 선택 영역 위에 뜨는 판이다.
54
+ * 그리는 버튼은 같고 담는 상자와 줄바꿈만 다르다.
55
+ */
56
+ variant?: 'bar' | 'bubble';
57
+ }
58
+ interface EditorToolbarProps extends Omit<EditorToolbarBarProps, 'state'> {
59
+ /** 동적으로 불러온 tiptap (useEditorState) */
60
+ api: TiptapApi;
61
+ }
62
+ /**
63
+ * 툴바 막대 (내부 전용 — 배럴로 내보내지 않는다).
64
+ *
65
+ * tiptap 을 모른다 — 눌림 상태는 `state` 로 받고 명령은 `editor` 가 있을 때만 나간다.
66
+ * 그래서 엔진을 불러오는 동안에도 SEditor 가 같은 막대를 그려 자리를 지킬 수 있다.
67
+ * 버튼 개수·아이콘이 같아야 줄바꿈까지 같아, 엔진이 붙는 순간 화면이 밀리지 않는다.
68
+ */
69
+ export declare function EditorToolbarBar({ state, editor, items, fontSizes, colors, highlights, onImageUpload, disabled, variant, }: EditorToolbarBarProps): import("react").JSX.Element;
70
+ /**
71
+ * 버블 메뉴 — 글을 선택하면 그 위에 서식 판이 뜬다.
72
+ *
73
+ * tiptap Simple Editor 에는 없는 것이다(템플릿은 막대 하나뿐이다). 막대와 같은 버튼을
74
+ * 같은 코드로 그리고 담는 상자만 바꾼다 — 두 곳의 눌림 표시가 어긋날 일이 없다.
75
+ *
76
+ * 판은 `appendTo` 로 소속 모달(없으면 `body`)에 붙인다. 그대로 두면 tiptap 이 편집 영역의
77
+ * 부모에 붙이는데, 그 부모는 `maxHeight` 를 받으면 스크롤 상자가 되어 판 위쪽이 잘린다.
78
+ */
79
+ export declare function EditorBubbleMenu({ api, editor, ...rest }: EditorToolbarProps): import("react").JSX.Element | null;
80
+ /**
81
+ * SEditor 툴바 — 눌림 상태를 tiptap 에서 구독해 막대에 넘긴다.
82
+ *
83
+ * `useEditorState` 를 거치는 이유: tiptap v3 는 트랜잭션마다 리렌더하지 않으므로, 이걸
84
+ * 거치지 않으면 커서를 굵은 글자 위로 옮겨도 B 버튼이 켜지지 않는다.
85
+ */
86
+ export declare function EditorToolbar({ api, editor, ...rest }: EditorToolbarProps): import("react").JSX.Element;
87
+ export {};