sellmate-design-system-react 9.0.0-beta.22 → 9.0.0-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +44 -4
- package/dist/components/SChipFilter/README.md +87 -64
- package/dist/components/SChipFilter/SChipFilter.d.ts +43 -25
- package/dist/components/SChipFilter/index.d.ts +1 -1
- package/dist/components/SDraggableList/README.md +1 -0
- package/dist/components/SDraggableList/SDraggableList.d.ts +1 -0
- package/dist/components/SEditor/EditorBody.d.ts +4 -8
- package/dist/components/SEditor/EditorToolbar.d.ts +16 -10
- package/dist/components/SEditor/README.md +4 -31
- package/dist/components/SEditor/SEditor.d.ts +9 -19
- package/dist/components/SEditor/editor-icons.d.ts +11 -7
- package/dist/components/SEditor/editor.config.d.ts +52 -18
- package/dist/components/SEditor/index.d.ts +7 -1
- package/dist/components/SEditor/use-is-mobile.d.ts +1 -1
- package/dist/components/SIcon/README.md +2 -0
- package/dist/components/SSystemActionButton/README.md +129 -0
- package/dist/components/SSystemActionButton/SSystemActionButton.d.ts +79 -0
- package/dist/components/SSystemActionButton/index.d.ts +2 -0
- package/dist/components/SSystemActionButton/systemActionButton.config.d.ts +87 -0
- package/dist/components/STag/README.md +2 -0
- package/dist/index.cjs +813 -472
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +808 -467
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +265 -99
- package/dist/llms.txt +48 -6
- package/dist/styles.css +443 -38
- package/dist/theme.css +89 -1
- package/eslint/scale.gen.mjs +2 -2
- package/package.json +2 -4
|
@@ -13,16 +13,12 @@
|
|
|
13
13
|
| `defaultValue?` | `string` | — | |
|
|
14
14
|
| `htmlRef` | `RefObject<string>` | — | 지금 화면에 있는 HTML. 껍데기(SEditor)가 규칙 검증·폼 제출에 쓴다 |
|
|
15
15
|
| `placeholder` | `string` | — | |
|
|
16
|
-
| `typography` | `boolean` | — | |
|
|
17
16
|
| `editable` | `boolean` | — | |
|
|
18
17
|
| `disabled` | `boolean` | — | |
|
|
19
18
|
| `minHeight?` | `number \| string` | — | |
|
|
20
19
|
| `maxHeight?` | `number \| string` | — | |
|
|
21
|
-
| `toolbar` | `SEditorToolbarItem[]
|
|
22
|
-
| `bubbleMenu` | `SEditorToolbarItem[]
|
|
23
|
-
| `fontSizes` | `number[]` | — | |
|
|
24
|
-
| `colors` | `SEditorColorOption[]` | — | |
|
|
25
|
-
| `highlights` | `SEditorColorOption[]` | — | |
|
|
20
|
+
| `toolbar` | `SEditorToolbarItem[]` | — | |
|
|
21
|
+
| `bubbleMenu` | `SEditorToolbarItem[]` | — | 선택 영역 위에 뜨는 서식 판 — 편집할 수 있으면 언제나 뜬다 (SEditor 주석 참고) |
|
|
26
22
|
| `editorClass?` | `string` | — | |
|
|
27
23
|
| `editorStyle?` | `CSSProperties` | — | |
|
|
28
24
|
|
|
@@ -44,9 +40,6 @@
|
|
|
44
40
|
| `state` | `EditorToolbarState` | — | 눌림 표시 — 에디터가 아직 없으면 `IDLE_TOOLBAR_STATE` |
|
|
45
41
|
| `editor` | `Editor \| null` | — | 없으면 버튼을 눌러도 아무 일도 하지 않는다 (그때는 disabled 로 함께 잠근다) |
|
|
46
42
|
| `items` | `SEditorToolbarItem[]` | — | |
|
|
47
|
-
| `fontSizes` | `readonly number[]` | — | |
|
|
48
|
-
| `colors` | `SEditorColorOption[]` | — | |
|
|
49
|
-
| `highlights` | `SEditorColorOption[]` | — | |
|
|
50
43
|
| `disabled` | `boolean` | — | 편집 불가(비활성·읽기전용·엔진 로딩 중) — 모든 버튼을 잠근다 |
|
|
51
44
|
| `variant?` | `'bar' \| 'bubble'` | `'bar'` | `'bar'` 는 편집 영역 위에 붙는 막대, `'bubble'` 은 선택 영역 위에 뜨는 판이다. 그리는 버튼은 같고 담는 상자와 줄바꿈만 다르다. |
|
|
52
45
|
|
|
@@ -67,12 +60,7 @@
|
|
|
67
60
|
| `placeholder?` | `string` | `'내용을 입력해 주세요.'` | 빈 문서에 보일 안내 문구 |
|
|
68
61
|
| `minHeight?` | `number \| string` | `200` | 편집 영역 최소 높이 (숫자=px) |
|
|
69
62
|
| `maxHeight?` | `number \| string` | — | 편집 영역 최대 높이 (숫자=px). 넘으면 편집 영역 안에서만 스크롤한다 |
|
|
70
|
-
| `
|
|
71
|
-
| `bubbleMenu?` | `SEditorToolbarItem[] \| false` | `SEDITOR_DEFAULT_BUBBLE_MENU` | 글을 선택했을 때 그 위에 뜨는 서식 판의 구성. `false` 면 뜨지 않는다. 읽기 전용·비활성일 때는 어차피 뜨지 않는다. 좁은 칸에 놓인 에디터라면 판이 필드 밖으로 넘칠 수 있으니 항목을 줄이거나 `false` 로 끈다. |
|
|
72
|
-
| `fontSizes?` | `number[]` | `[...SEDITOR_FONT_SIZES]` | 글자 크기 드롭다운 선택지 (px) |
|
|
73
|
-
| `colors?` | `SEditorColorOption[]` | `SEDITOR_DEFAULT_COLORS` | 글자색 팔레트 |
|
|
74
|
-
| `highlights?` | `SEditorColorOption[]` | `SEDITOR_DEFAULT_HIGHLIGHTS` | 형광펜(배경색) 팔레트 |
|
|
75
|
-
| `typography?` | `boolean` | `false` | 따옴표·하이픈·화살표 자동 치환 (`"` → `“”`, `--` → `—`, `->` → `→`). 상품 코드·규격 문자열이 입력한 그대로 남아야 하는 화면이 많아 기본은 끔이다. **마운트 시점에만 반영된다** — 값이 바뀌어도 이미 만들어진 에디터에는 적용되지 않는다. |
|
|
63
|
+
| `simple?` | `boolean` | `false` | **글자에 거는 서식만** 남긴다 — 목록·정렬·인용·코드·링크·이미지·구분선이 빠진다. 막대와 버블 메뉴 양쪽에 함께 걸린다 (한쪽에만 남으면 아무것도 막지 못한다). 받은 글의 문단 구조까지 작성자를 따라가면 곤란한 자리 — 좁은 칸의 메모·사유·짧은 안내문 — 에 쓴다. 반대로 서식이 아예 필요 없다면 `SEditor` 가 아니라 `STextarea` 다. |
|
|
76
64
|
| `rules?` | `Rule[]` | — | 유효성 규칙 — blur 시 자동 검증 |
|
|
77
65
|
| `status?` | `SFieldStatus` | — | 필드 상태 ('default' | 'pass' | 'error') |
|
|
78
66
|
| `focused?` | `boolean` | — | 포커스 상태 (제어/반영) |
|
|
@@ -141,17 +129,6 @@ export interface TiptapApi {
|
|
|
141
129
|
export type SEditorToolbarItem = SEditorToolbarAction | '|';
|
|
142
130
|
```
|
|
143
131
|
|
|
144
|
-
### SEditorColorOption
|
|
145
|
-
|
|
146
|
-
```ts
|
|
147
|
-
export interface SEditorColorOption {
|
|
148
|
-
/** 팔레트 칸의 접근성 레이블·툴팁 */
|
|
149
|
-
label: string;
|
|
150
|
-
/** 팔레트 키(`red_75` …) 또는 CSS 색상 문자열 */
|
|
151
|
-
color: SColor;
|
|
152
|
-
}
|
|
153
|
-
```
|
|
154
|
-
|
|
155
132
|
### EditorToolbarState
|
|
156
133
|
|
|
157
134
|
```ts
|
|
@@ -164,8 +141,6 @@ export type EditorToolbarState = ReturnType<typeof readEditorState>;
|
|
|
164
141
|
export interface SEditorExtensionOptions {
|
|
165
142
|
/** 빈 문서에 보일 문구를 그때그때 읽어 오는 게터 */
|
|
166
143
|
getPlaceholder: () => string;
|
|
167
|
-
/** 따옴표·하이픈·화살표 자동 치환 (Typography) */
|
|
168
|
-
typography: boolean;
|
|
169
144
|
}
|
|
170
145
|
```
|
|
171
146
|
|
|
@@ -188,9 +163,6 @@ export const SEDITOR_TOOLBAR_ITEMS = [
|
|
|
188
163
|
'strike',
|
|
189
164
|
'code',
|
|
190
165
|
'color',
|
|
191
|
-
'highlight',
|
|
192
|
-
'superscript',
|
|
193
|
-
'subscript',
|
|
194
166
|
'alignLeft',
|
|
195
167
|
'alignCenter',
|
|
196
168
|
'alignRight',
|
|
@@ -204,6 +176,7 @@ export const SEDITOR_TOOLBAR_ITEMS = [
|
|
|
204
176
|
'horizontalRule',
|
|
205
177
|
'link',
|
|
206
178
|
'image',
|
|
179
|
+
'table',
|
|
207
180
|
'undo',
|
|
208
181
|
'redo',
|
|
209
182
|
] as const;
|
|
@@ -6,7 +6,6 @@ import { type Rule } from '../../lib/form';
|
|
|
6
6
|
import { type SFieldAddonAlign, type SFieldStatus } from '../SField';
|
|
7
7
|
import { type SIconName } from '../SIcon';
|
|
8
8
|
import { type STooltipProps } from '../STooltip';
|
|
9
|
-
import { type SEditorColorOption, type SEditorToolbarItem } from './editor.config';
|
|
10
9
|
/** ref 로 노출되는 조작 메서드 */
|
|
11
10
|
export interface SEditorHandle {
|
|
12
11
|
/** 편집 영역에 포커스 */
|
|
@@ -37,33 +36,20 @@ export interface SEditorProps {
|
|
|
37
36
|
minHeight?: number | string;
|
|
38
37
|
/** 편집 영역 최대 높이 (숫자=px). 넘으면 편집 영역 안에서만 스크롤한다 */
|
|
39
38
|
maxHeight?: number | string;
|
|
40
|
-
/** 툴바 구성. `false` 면 툴바 없이 본문만 (읽기 화면·간단 메모용) */
|
|
41
|
-
toolbar?: SEditorToolbarItem[] | false;
|
|
42
39
|
/**
|
|
43
|
-
*
|
|
40
|
+
* **글자에 거는 서식만** 남긴다 — 목록·정렬·인용·코드·링크·이미지·구분선이 빠진다.
|
|
41
|
+
* 막대와 버블 메뉴 양쪽에 함께 걸린다 (한쪽에만 남으면 아무것도 막지 못한다).
|
|
44
42
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
43
|
+
* 받은 글의 문단 구조까지 작성자를 따라가면 곤란한 자리 — 좁은 칸의 메모·사유·짧은
|
|
44
|
+
* 안내문 — 에 쓴다. 반대로 서식이 아예 필요 없다면 `SEditor` 가 아니라 `STextarea` 다.
|
|
47
45
|
*/
|
|
48
|
-
|
|
49
|
-
/** 글자 크기 드롭다운 선택지 (px) */
|
|
50
|
-
fontSizes?: number[];
|
|
51
|
-
/** 글자색 팔레트 */
|
|
52
|
-
colors?: SEditorColorOption[];
|
|
53
|
-
/** 형광펜(배경색) 팔레트 */
|
|
54
|
-
highlights?: SEditorColorOption[];
|
|
46
|
+
simple?: boolean;
|
|
55
47
|
/**
|
|
56
48
|
* 이미지 업로드 — 고른 파일을 저장하고 **표시할 URL 을 돌려준다.**
|
|
57
49
|
* 저장 위치는 앱마다 다르므로 DS 가 정하지 않는다. 이 훅이 없으면 툴바에서
|
|
58
50
|
* 이미지 항목이 빠진다 (본문에 base64 를 박지 않는다 — HTML 이 그대로 DB 로 실려 간다).
|
|
59
51
|
*/
|
|
60
52
|
onImageUpload?: (file: File) => Promise<string>;
|
|
61
|
-
/**
|
|
62
|
-
* 따옴표·하이픈·화살표 자동 치환 (`"` → `“”`, `--` → `—`, `->` → `→`).
|
|
63
|
-
* 상품 코드·규격 문자열이 입력한 그대로 남아야 하는 화면이 많아 기본은 끔이다.
|
|
64
|
-
* **마운트 시점에만 반영된다** — 값이 바뀌어도 이미 만들어진 에디터에는 적용되지 않는다.
|
|
65
|
-
*/
|
|
66
|
-
typography?: boolean;
|
|
67
53
|
/** 유효성 규칙 — blur 시 자동 검증 */
|
|
68
54
|
rules?: Rule[];
|
|
69
55
|
/** 필드 상태 ('default' | 'pass' | 'error') */
|
|
@@ -116,6 +102,10 @@ export interface SEditorProps {
|
|
|
116
102
|
* 테두리 박스·라벨·에러 표시는 `SField`(multiline) 가 소유하고, 이 컴포넌트는 그 안에
|
|
117
103
|
* 툴바와 편집 영역만 세로로 쌓는다.
|
|
118
104
|
*
|
|
105
|
+
* 글을 선택했을 때 그 위에 뜨는 서식 판(버블 메뉴)은 **끄고 켜는 것이 아니다** — 편집할 수
|
|
106
|
+
* 있으면 언제나 뜬다. 툴바까지 커서를 옮기지 않고 바로 서식을 거는 길이라 화면마다 있고
|
|
107
|
+
* 없고가 달라지면 그 자체가 학습 비용이 된다. 구성은 `simple` 이 툴바와 함께 정한다.
|
|
108
|
+
*
|
|
119
109
|
* tiptap 은 **마운트한 뒤에 불러온다** — 정적으로 묶으면 SEditor 를 한 번도 쓰지 않는 소비
|
|
120
110
|
* 앱까지 tiptap·prosemirror 를 번들에 지고 간다 (`tiptap-api.ts` 주석 참고). 불러오는 동안은
|
|
121
111
|
* 같은 크기의 빈 편집 영역이 자리를 지키므로 화면이 튀지 않고, 그 사이 `ref` 의 메서드는
|
|
@@ -11,7 +11,8 @@ import type { SVGProps } from 'react';
|
|
|
11
11
|
* 24×24 격자에 획 굵기 2 의 면(fill) 도형이고 색은 전부 `currentColor` 를 따른다 — 버튼이
|
|
12
12
|
* 토큰으로 정한 색이 그대로 내려온다. 새 아이콘을 더할 때도 이 격자·굵기를 지킨다.
|
|
13
13
|
*
|
|
14
|
-
* 템플릿에 없어 직접 그린 것은 `IconTextColor`·`IconHorizontalRule`
|
|
14
|
+
* 템플릿에 없어 직접 그린 것은 `IconTextColor`·`IconHorizontalRule`·`IconTable` 뿐이다
|
|
15
|
+
* (각 주석 참고).
|
|
15
16
|
*/
|
|
16
17
|
export type SEditorIconProps = {
|
|
17
18
|
size?: number | string;
|
|
@@ -28,10 +29,6 @@ export declare const IconStrike: (p: SEditorIconProps) => import("react").JSX.El
|
|
|
28
29
|
export declare const IconCode: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
29
30
|
export declare const IconCodeBlock: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
30
31
|
export declare const IconBlockquote: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
31
|
-
/** 형광펜 — 지금 고른 색은 툴바 버튼이 아이콘 아래 막대로 따로 보여 준다 */
|
|
32
|
-
export declare const IconHighlight: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
33
|
-
export declare const IconSuperscript: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
34
|
-
export declare const IconSubscript: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
35
32
|
export declare const IconAlignLeft: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
36
33
|
export declare const IconAlignCenter: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
37
34
|
export declare const IconAlignRight: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
@@ -48,10 +45,17 @@ export declare const IconRedo: (p: SEditorIconProps) => import("react").JSX.Elem
|
|
|
48
45
|
* 글자색 — 템플릿에 없어 직접 그렸다 (Simple Editor 에는 글자색 항목이 없다).
|
|
49
46
|
*
|
|
50
47
|
* 나머지 아이콘이 면 도형이라 A 도 같은 굵기(2)로 보이도록 획으로 긋고 끝을 둥글렸다 —
|
|
51
|
-
* 템플릿의 막대(`rx=1` 인 2px 사각형)와 같은 인상이다. 지금 고른 색은
|
|
52
|
-
*
|
|
48
|
+
* 템플릿의 막대(`rx=1` 인 2px 사각형)와 같은 인상이다. 지금 고른 색은 툴바 버튼이 아이콘
|
|
49
|
+
* 아래 막대로 따로 보여 준다.
|
|
53
50
|
*/
|
|
54
51
|
export declare const IconTextColor: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
52
|
+
/**
|
|
53
|
+
* 표 — 템플릿에 없어 직접 그렸다 (Simple Editor 에는 표가 없다).
|
|
54
|
+
*
|
|
55
|
+
* 테두리를 획으로 긋지 않고 **칸 네 개를 면으로 찍는다** — 다른 아이콘이 모두 면 도형이라
|
|
56
|
+
* 16px 에서 획으로 그린 격자만 유독 흐려 보인다. 첫 줄이 헤더라 한 덩어리로 이어 붙였다.
|
|
57
|
+
*/
|
|
58
|
+
export declare const IconTable: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
55
59
|
/**
|
|
56
60
|
* 구분선 — 템플릿에 없어 직접 그렸다 (Simple Editor 는 구분선 노드는 있지만 툴바 항목이 없다).
|
|
57
61
|
* 막대는 템플릿의 정렬 아이콘과 같은 규격(높이 2, `rx=1`)이다.
|
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
import type { SColor } from '../../lib/color';
|
|
3
3
|
/** 툴바에 놓을 수 있는 항목. `'|'` 는 구분선이다. */
|
|
4
|
-
export declare const SEDITOR_TOOLBAR_ITEMS: readonly ["heading", "fontSize", "bold", "italic", "underline", "strike", "code", "color", "
|
|
4
|
+
export declare const SEDITOR_TOOLBAR_ITEMS: readonly ["heading", "fontSize", "bold", "italic", "underline", "strike", "code", "color", "alignLeft", "alignCenter", "alignRight", "alignJustify", "bulletList", "orderedList", "taskList", "list", "blockquote", "codeBlock", "horizontalRule", "link", "image", "table", "undo", "redo"];
|
|
5
5
|
export type SEditorToolbarAction = (typeof SEDITOR_TOOLBAR_ITEMS)[number];
|
|
6
6
|
export type SEditorToolbarItem = SEditorToolbarAction | '|';
|
|
7
7
|
/**
|
|
8
|
-
* 기본 툴바 — tiptap Simple Editor
|
|
8
|
+
* 기본 툴바 — 쓸 수 있는 것을 **모두** 보인다. 순서는 tiptap Simple Editor 템플릿을 따른다.
|
|
9
9
|
*
|
|
10
|
-
* 이력 → 블록(
|
|
11
|
-
* 드롭다운 하나로 묶여 있다(개별 버튼으로 펼치려면 `bulletList`·`orderedList`·`taskList`).
|
|
10
|
+
* 이력 → 블록(제목·글자 크기·목록·인용·코드블록) → 서식 → 정렬 → 삽입.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* 빠진 것은 `bulletList`·`orderedList`·`taskList` 뿐인데, 이 셋은 `list` 드롭다운 하나로
|
|
13
|
+
* 이미 들어와 있다 — 함께 놓으면 같은 명령이 툴바에 두 번 나온다. 목록을 드롭다운이 아니라
|
|
14
|
+
* 버튼 셋으로 펼치고 싶은 화면만 `toolbar` 로 직접 조합한다.
|
|
16
15
|
*
|
|
17
16
|
* `image` 는 `onImageUpload` 를 받았을 때만 그려진다 (훅이 없으면 저장할 곳이 없다).
|
|
18
17
|
*/
|
|
19
18
|
export declare const SEDITOR_DEFAULT_TOOLBAR: SEditorToolbarItem[];
|
|
19
|
+
/**
|
|
20
|
+
* 간단 툴바 (`simple`) — **글자에 거는 서식만** 남긴다.
|
|
21
|
+
*
|
|
22
|
+
* 목록·정렬·인용·코드·링크·이미지·구분선처럼 **글의 구조를 바꾸는** 항목을 뺀 구성이다.
|
|
23
|
+
* 받은 글이 다시 화면에 그려질 때 문단 구조까지 작성자를 따라가면 곤란한 자리 — 좁은 칸에
|
|
24
|
+
* 놓인 메모·사유·짧은 안내문 — 를 위한 것이다.
|
|
25
|
+
*
|
|
26
|
+
* 제목·글자 크기는 남긴다. 둘 다 글의 뼈대가 아니라 **글자의 크기**를 정하는 항목이라
|
|
27
|
+
* 강조를 거는 데 쓰이고, 이것까지 빼면 남는 것이 굵게·색뿐이라 `STextarea` 와 다를 바 없다.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SEDITOR_SIMPLE_TOOLBAR: SEditorToolbarItem[];
|
|
20
30
|
/**
|
|
21
31
|
* 기본 버블 메뉴 — 글을 선택했을 때 그 위에 뜨는 판의 구성.
|
|
22
32
|
*
|
|
@@ -27,16 +37,33 @@ export declare const SEDITOR_DEFAULT_TOOLBAR: SEditorToolbarItem[];
|
|
|
27
37
|
* 판은 선택 영역 위에 뜨는 한 줄이라 줄바꿈하지 않는다 — 항목을 늘릴 때 폭을 함께 본다.
|
|
28
38
|
*/
|
|
29
39
|
export declare const SEDITOR_DEFAULT_BUBBLE_MENU: SEditorToolbarItem[];
|
|
40
|
+
/**
|
|
41
|
+
* 간단 모드(`simple`)의 버블 메뉴 — 막대와 같은 범위로 맞춘다.
|
|
42
|
+
*
|
|
43
|
+
* 막대에서 링크·코드를 뺐는데 판에는 남아 있으면 간단 모드가 아무것도 막지 못한다.
|
|
44
|
+
* 선택한 글에 걸 수 있는 것은 두 곳이 같아야 한다.
|
|
45
|
+
*/
|
|
46
|
+
export declare const SEDITOR_SIMPLE_BUBBLE_MENU: SEditorToolbarItem[];
|
|
30
47
|
/** 제목 단계 — 본문 12px 위로 14 / 16 / 18 (DS 타이포 heading sm·md·lg) */
|
|
31
48
|
export declare const SEDITOR_HEADING_LEVELS: readonly [1, 2, 3];
|
|
32
49
|
export type SEditorHeadingLevel = (typeof SEDITOR_HEADING_LEVELS)[number];
|
|
33
50
|
export declare const SEDITOR_HEADING_LABELS: Record<SEditorHeadingLevel | 0, string>;
|
|
34
51
|
/**
|
|
35
|
-
* 글자 크기 선택지 (px)
|
|
36
|
-
*
|
|
52
|
+
* 글자 크기 선택지 (px) — 워드프로세서의 눈금과 같은 단계다.
|
|
53
|
+
*
|
|
54
|
+
* 화면의 본문 리듬은 DS 타이포 스케일(`--text-*`)이 잡는다. 이 목록은 그 리듬이 아니라
|
|
55
|
+
* **작성자가 글 안에서 직접 크기를 지정할 때** 쓰는 눈금이라 훨씬 넓다 — 24 이상은 안내문
|
|
56
|
+
* 표지·행사 배너처럼 본문이 아닌 글을 위한 것이다.
|
|
57
|
+
*
|
|
58
|
+
* **눈금을 좁히는 prop 은 없다** — 화면마다 고를 수 있는 크기가 다르면 같은 글이 어디에
|
|
59
|
+
* 붙느냐에 따라 다르게 보인다. 작성자가 리듬(AGENTS.md §2-1: 본문 12px)을 벗어나면 곤란한
|
|
60
|
+
* 자리라면 애초에 `SEditor` 가 아니라 `STextarea` 가 맞는 자리인지 먼저 본다.
|
|
61
|
+
*/
|
|
62
|
+
export declare const SEDITOR_FONT_SIZES: readonly [8, 9, 10, 11, 12, 14, 16, 18, 24, 30, 36, 48, 60, 72];
|
|
63
|
+
/**
|
|
64
|
+
* 크기를 지정하지 않은 문단이 실제로 보이는 크기 — 드롭다운의 `기본` 항목이 되돌리는 자리다.
|
|
65
|
+
* 제목(h1~h3)은 자기 크기를 따로 가지므로 이 값과 무관하다.
|
|
37
66
|
*/
|
|
38
|
-
export declare const SEDITOR_FONT_SIZES: readonly [11, 12, 14, 16, 18];
|
|
39
|
-
/** 크기를 지정하지 않은 문단이 실제로 보이는 크기 — 드롭다운의 선택 표시 기준이다. */
|
|
40
67
|
export declare const SEDITOR_DEFAULT_FONT_SIZE = 12;
|
|
41
68
|
export interface SEditorColorOption {
|
|
42
69
|
/** 팔레트 칸의 접근성 레이블·툴팁 */
|
|
@@ -45,24 +72,31 @@ export interface SEditorColorOption {
|
|
|
45
72
|
color: SColor;
|
|
46
73
|
}
|
|
47
74
|
/**
|
|
48
|
-
*
|
|
75
|
+
* 글자색 팔레트 — 역할 토큰(`--color-fg-*`)을 그대로 쓴다. 바꾸는 prop 은 없다.
|
|
49
76
|
*
|
|
50
77
|
* 저장되는 HTML 에 `style="color: var(--color-fg-danger)"` 형태로 남으므로 토큰이 바뀌면
|
|
51
78
|
* 이미 저장된 글도 따라간다. 대신 **DS `theme.css` 가 없는 환경(메일 본문 등)으로 그대로
|
|
52
|
-
* 내보내면 색이 풀린다** — 그런
|
|
79
|
+
* 내보내면 색이 풀린다** — 그런 반출이 필요하면 내보내는 쪽에서 토큰을 실제 색으로 푼다.
|
|
53
80
|
*/
|
|
54
81
|
export declare const SEDITOR_DEFAULT_COLORS: SEditorColorOption[];
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
|
|
82
|
+
/**
|
|
83
|
+
* ProseMirror 가 만드는 요소에 붙는 클래스 — 자식 선택자의 기준점이 된다.
|
|
84
|
+
*
|
|
85
|
+
* **아래 `SEDITOR_CONTENT_CLASS` 에서는 이 상수를 끼워 넣지 말고 이름을 그대로 적는다.**
|
|
86
|
+
* Tailwind 는 소스를 글자로 훑을 뿐 코드를 돌려 보지 않아 `` `[&_.${TASK_LIST_CLASS}]:pl-0` ``
|
|
87
|
+
* 같은 문자열에서는 클래스 후보를 찾지 못하고, 그 규칙이 통째로 CSS 에서 빠진다 — 화면에는
|
|
88
|
+
* 아무 에러 없이 스타일만 사라진다 (표 테두리가 통째로 없던 실제 사고).
|
|
89
|
+
*/
|
|
58
90
|
export declare const TASK_LIST_CLASS = "sd-editor-task-list";
|
|
59
91
|
export declare const TASK_ITEM_CLASS = "sd-editor-task-item";
|
|
60
92
|
export declare const IMAGE_CLASS = "sd-editor-image";
|
|
93
|
+
export declare const TABLE_CLASS = "sd-editor-table";
|
|
94
|
+
export declare const TABLE_ROW_CLASS = "sd-editor-table-row";
|
|
95
|
+
export declare const TABLE_HEADER_CLASS = "sd-editor-table-header";
|
|
96
|
+
export declare const TABLE_CELL_CLASS = "sd-editor-table-cell";
|
|
61
97
|
export interface SEditorExtensionOptions {
|
|
62
98
|
/** 빈 문서에 보일 문구를 그때그때 읽어 오는 게터 */
|
|
63
99
|
getPlaceholder: () => string;
|
|
64
|
-
/** 따옴표·하이픈·화살표 자동 치환 (Typography) */
|
|
65
|
-
typography: boolean;
|
|
66
100
|
}
|
|
67
101
|
/**
|
|
68
102
|
* 편집 영역 안쪽 서식 스타일.
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export { SEditor, type SEditorProps, type SEditorHandle } from './SEditor';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* 여기 남은 것은 **저장된 HTML 이 어떻게 보이는지**를 알려 주는 값뿐이다 — 읽기 화면을
|
|
4
|
+
* 직접 그릴 때 쓴다. 툴바 구성(`SEDITOR_*_TOOLBAR`·`SEditorToolbarItem` …)·글자색
|
|
5
|
+
* 팔레트·글자 크기 눈금처럼 **에디터에 넘기던 값**은 그것을 바꾸는 prop 이 모두 없어져
|
|
6
|
+
* 내보내지 않는다. 툴바 구성은 `simple` 로만 고른다.
|
|
7
|
+
*/
|
|
8
|
+
export { SEDITOR_HEADING_LEVELS, SEDITOR_HEADING_LABELS, SEDITOR_DEFAULT_FONT_SIZE, type SEditorHeadingLevel, } from './editor.config';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 좁은 화면인가 (SEditor 전용 — 다른 컴포넌트에서 import 하지 않는다).
|
|
3
3
|
*
|
|
4
4
|
* 이 DS 에는 브레이크포인트 개념이 없다. 여기에 필요한 이유는 하나뿐이라서 — 손가락으로
|
|
5
|
-
* 쓰는 좁은 화면에서는 툴바 위에 뜨는 팝오버(
|
|
5
|
+
* 쓰는 좁은 화면에서는 툴바 위에 뜨는 팝오버(글자색 팔레트·링크 입력)가 화면 밖으로
|
|
6
6
|
* 밀리거나 소프트 키보드에 가린다 — 공용 `lib/` 로 올리지 않고 이 폴더에 둔다. 나중에
|
|
7
7
|
* DS 차원의 브레이크포인트가 생기면 그걸로 갈아끼운다.
|
|
8
8
|
*
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
- [SSectionHeaderCard](../SSectionHeaderCard)
|
|
49
49
|
- [SSelect](../SSelect)
|
|
50
50
|
- [SStepper](../SStepper)
|
|
51
|
+
- [SSystemActionButton](../SSystemActionButton)
|
|
51
52
|
- [STable](../STable)
|
|
52
53
|
- [STag](../STag)
|
|
53
54
|
- [STextLink](../STextLink)
|
|
@@ -88,6 +89,7 @@ graph TD;
|
|
|
88
89
|
SSectionHeaderCard --> SIcon
|
|
89
90
|
SSelect --> SIcon
|
|
90
91
|
SStepper --> SIcon
|
|
92
|
+
SSystemActionButton --> SIcon
|
|
91
93
|
STable --> SIcon
|
|
92
94
|
STag --> SIcon
|
|
93
95
|
STextLink --> SIcon
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# SSystemActionButton
|
|
2
|
+
|
|
3
|
+
> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.
|
|
4
|
+
|
|
5
|
+
### SSystemActionButtonAccount
|
|
6
|
+
|
|
7
|
+
#### Props
|
|
8
|
+
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------|------|---------|-------------|
|
|
11
|
+
| `type` | `'account'` | — | 계정 행 |
|
|
12
|
+
| `label?` | `string` | — | 라벨 텍스트 |
|
|
13
|
+
| `option?` | `never` | — | 아이콘이 `user` 로 고정이라 받을 것이 없다 |
|
|
14
|
+
|
|
15
|
+
### SSystemActionButtonBase
|
|
16
|
+
|
|
17
|
+
#### Props
|
|
18
|
+
|
|
19
|
+
| Prop | Type | Default | Description |
|
|
20
|
+
|------|------|---------|-------------|
|
|
21
|
+
| `color?` | `SSystemActionButtonColor` | — | 색상(놓이는 표면). light = 흰 면, dark = 오션블루 면, darker = 네이비 면. 기본 `'light'` |
|
|
22
|
+
| `disabled?` | `boolean` | — | 비활성 여부. 기본 `false` |
|
|
23
|
+
|
|
24
|
+
### SSystemActionButtonSelect
|
|
25
|
+
|
|
26
|
+
#### Props
|
|
27
|
+
|
|
28
|
+
| Prop | Type | Default | Description |
|
|
29
|
+
|------|------|---------|-------------|
|
|
30
|
+
| `type` | `'select'` | — | 화살표만 붙는 행 |
|
|
31
|
+
| `label?` | `string` | — | 라벨 텍스트 |
|
|
32
|
+
| `option` | `SSystemActionButtonIconOption` | — | 선행 아이콘 |
|
|
33
|
+
|
|
34
|
+
### SSystemActionButtonStatus
|
|
35
|
+
|
|
36
|
+
#### Props
|
|
37
|
+
|
|
38
|
+
| Prop | Type | Default | Description |
|
|
39
|
+
|------|------|---------|-------------|
|
|
40
|
+
| `type` | `'status'` | — | 라벨 자리에 상태 태그가 들어가는 행 |
|
|
41
|
+
| `label?` | `never` | — | 태그가 라벨 자리를 차지하므로 받지 않는다 |
|
|
42
|
+
| `option?` | `SSystemActionButtonStatusOption` | — | 상태 태그 |
|
|
43
|
+
|
|
44
|
+
### SSystemActionButtonText
|
|
45
|
+
|
|
46
|
+
#### Props
|
|
47
|
+
|
|
48
|
+
| Prop | Type | Default | Description |
|
|
49
|
+
|------|------|---------|-------------|
|
|
50
|
+
| `type` | `'switch' \| 'subSelect'` | — | 우측에 문구가 붙는 행. switch = 보조 조작 문구, subSelect = 지금 선택된 값 |
|
|
51
|
+
| `label?` | `string` | — | 라벨 텍스트 |
|
|
52
|
+
| `option` | `SSystemActionButtonTextOption` | — | 선행 아이콘 + 우측 액션 텍스트 |
|
|
53
|
+
|
|
54
|
+
## Types
|
|
55
|
+
|
|
56
|
+
### SSystemActionButtonColor
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
export type SSystemActionButtonColor = (typeof SYSTEM_ACTION_BUTTON_COLORS)[number];
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### SSystemActionButtonIconOption
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
/** 선행 아이콘만 받는 타입(`select`)의 option */
|
|
66
|
+
export interface SSystemActionButtonIconOption {
|
|
67
|
+
/** 선행 아이콘명 */
|
|
68
|
+
icon: SIconName;
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### SSystemActionButtonStatusOption
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
/** `status` 타입의 option — 라벨 자리에 들어가는 상태 태그 */
|
|
76
|
+
export interface SSystemActionButtonStatusOption {
|
|
77
|
+
/** 상태 태그 색 */
|
|
78
|
+
color?: STagColor;
|
|
79
|
+
/** 상태 태그 텍스트 */
|
|
80
|
+
label?: string;
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### SSystemActionButtonTextOption
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
/** 우측 액션 텍스트까지 받는 타입(`switch` · `subSelect`)의 option */
|
|
88
|
+
export interface SSystemActionButtonTextOption extends SSystemActionButtonIconOption {
|
|
89
|
+
/** 우측 액션 텍스트 */
|
|
90
|
+
text?: string;
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### SYSTEM_ACTION_BUTTON_COLORS
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
/**
|
|
98
|
+
* SSystemActionButton 설정.
|
|
99
|
+
*
|
|
100
|
+
* 토큰은 GNB system 패널 한 벌(`--cmp-gnb-system-*`)을 그대로 쓴다.
|
|
101
|
+
* 행 공통(높이·라운드·아이콘 프레임·라벨) → --cmp-gnb-system-item-*
|
|
102
|
+
* 색(color 축) light / dark / darker → --cmp-gnb-system-item-<color>-*
|
|
103
|
+
* 우측 액션(패딩·간격·아이콘·텍스트색) → --cmp-gnb-system-actionButton-*
|
|
104
|
+
*
|
|
105
|
+
* 타이포그래피는 CSS 변수가 아니라 `.typo-*` 프리셋으로 나온다.
|
|
106
|
+
* item.label → typo-body-sm-semibold (12/600/20)
|
|
107
|
+
* actionButton.switch → typo-field-sm-default (12/400/20)
|
|
108
|
+
* actionButton.selectData → typo-control-xs-medium (12/500/20)
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
/** 색상(표면). light = 흰 면, dark = 오션블루 면, darker = 네이비 면 */
|
|
112
|
+
export const SYSTEM_ACTION_BUTTON_COLORS = ['light', 'dark', 'darker'] as const;
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Dependencies
|
|
116
|
+
|
|
117
|
+
### Depends on
|
|
118
|
+
|
|
119
|
+
- [SIcon](../SIcon)
|
|
120
|
+
- [STag](../STag)
|
|
121
|
+
|
|
122
|
+
### Graph
|
|
123
|
+
|
|
124
|
+
```mermaid
|
|
125
|
+
graph TD;
|
|
126
|
+
SSystemActionButton --> SIcon
|
|
127
|
+
SSystemActionButton --> STag
|
|
128
|
+
style SSystemActionButton fill:#f9f,stroke:#333,stroke-width:4px
|
|
129
|
+
```
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { type SIconName } from '../SIcon';
|
|
3
|
+
import { type STagColor } from '../STag';
|
|
4
|
+
import { type SSystemActionButtonColor } from './systemActionButton.config';
|
|
5
|
+
/** 선행 아이콘만 받는 타입(`select`)의 option */
|
|
6
|
+
export interface SSystemActionButtonIconOption {
|
|
7
|
+
/** 선행 아이콘명 */
|
|
8
|
+
icon: SIconName;
|
|
9
|
+
}
|
|
10
|
+
/** 우측 액션 텍스트까지 받는 타입(`switch` · `subSelect`)의 option */
|
|
11
|
+
export interface SSystemActionButtonTextOption extends SSystemActionButtonIconOption {
|
|
12
|
+
/** 우측 액션 텍스트 */
|
|
13
|
+
text?: string;
|
|
14
|
+
}
|
|
15
|
+
/** `status` 타입의 option — 라벨 자리에 들어가는 상태 태그 */
|
|
16
|
+
export interface SSystemActionButtonStatusOption {
|
|
17
|
+
/** 상태 태그 색 */
|
|
18
|
+
color?: STagColor;
|
|
19
|
+
/** 상태 태그 텍스트 */
|
|
20
|
+
label?: string;
|
|
21
|
+
}
|
|
22
|
+
/** 모든 타입이 공통으로 받는 props */
|
|
23
|
+
export interface SSystemActionButtonBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'type' | 'children'> {
|
|
24
|
+
/** 색상(놓이는 표면). light = 흰 면, dark = 오션블루 면, darker = 네이비 면. 기본 `'light'` */
|
|
25
|
+
color?: SSystemActionButtonColor;
|
|
26
|
+
/** 비활성 여부. 기본 `false` */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** 계정 행 — 아이콘이 `user` 로 고정이고 우측 액션이 없다 */
|
|
30
|
+
export interface SSystemActionButtonAccountProps extends SSystemActionButtonBaseProps {
|
|
31
|
+
/** 계정 행 */
|
|
32
|
+
type: 'account';
|
|
33
|
+
/** 라벨 텍스트 */
|
|
34
|
+
label?: string;
|
|
35
|
+
/** 아이콘이 `user` 로 고정이라 받을 것이 없다 */
|
|
36
|
+
option?: never;
|
|
37
|
+
}
|
|
38
|
+
/** 화살표만 붙는 행 — 눌러 들어간다는 뜻 */
|
|
39
|
+
export interface SSystemActionButtonSelectProps extends SSystemActionButtonBaseProps {
|
|
40
|
+
/** 화살표만 붙는 행 */
|
|
41
|
+
type: 'select';
|
|
42
|
+
/** 라벨 텍스트 */
|
|
43
|
+
label?: string;
|
|
44
|
+
/** 선행 아이콘 */
|
|
45
|
+
option: SSystemActionButtonIconOption;
|
|
46
|
+
}
|
|
47
|
+
/** 우측에 문구가 붙는 행 — `switch` 는 보조 조작 문구, `subSelect` 는 지금 선택된 값 */
|
|
48
|
+
export interface SSystemActionButtonTextProps extends SSystemActionButtonBaseProps {
|
|
49
|
+
/** 우측에 문구가 붙는 행. switch = 보조 조작 문구, subSelect = 지금 선택된 값 */
|
|
50
|
+
type: 'switch' | 'subSelect';
|
|
51
|
+
/** 라벨 텍스트 */
|
|
52
|
+
label?: string;
|
|
53
|
+
/** 선행 아이콘 + 우측 액션 텍스트 */
|
|
54
|
+
option: SSystemActionButtonTextOption;
|
|
55
|
+
}
|
|
56
|
+
/** 라벨 자리에 상태 태그가 들어가는 행 */
|
|
57
|
+
export interface SSystemActionButtonStatusProps extends SSystemActionButtonBaseProps {
|
|
58
|
+
/** 라벨 자리에 상태 태그가 들어가는 행 */
|
|
59
|
+
type: 'status';
|
|
60
|
+
/** 태그가 라벨 자리를 차지하므로 받지 않는다 */
|
|
61
|
+
label?: never;
|
|
62
|
+
/** 상태 태그 */
|
|
63
|
+
option?: SSystemActionButtonStatusOption;
|
|
64
|
+
}
|
|
65
|
+
/** `type` 으로 갈리는 판별 유니온. 타입에 맞지 않는 option 은 컴파일 단계에서 막힌다. */
|
|
66
|
+
export type SSystemActionButtonProps = SSystemActionButtonAccountProps | SSystemActionButtonSelectProps | SSystemActionButtonTextProps | SSystemActionButtonStatusProps;
|
|
67
|
+
/**
|
|
68
|
+
* SSystemActionButton — GNB system 패널의 한 줄짜리 액션 버튼.
|
|
69
|
+
*
|
|
70
|
+
* 아이콘 프레임 + 라벨 + 우측 액션이 한 행에 붙고, 행 전체가 버튼이다. 무엇이 그려지는지는
|
|
71
|
+
* `type` 이 정하고(`account` `switch` `select` `subSelect` `status`), 타입마다 다른 값만
|
|
72
|
+
* `option` 으로 받는다. 선행 아이콘은 항상 있다 — `account` 는 `user` 고정, `status` 는 태그가
|
|
73
|
+
* 자리를 차지해 아이콘이 없고, 나머지는 `option.icon` 이 필수다.
|
|
74
|
+
*
|
|
75
|
+
* hover 하면 표면색이 한 단계 바뀌고, 어두운 색에서는 아이콘 프레임이 흰색으로 떠오른다.
|
|
76
|
+
* 상태는 default·hover 둘뿐이다 — 토큰에 selected 가 없다.
|
|
77
|
+
* 토큰은 `--cmp-gnb-system-item-*` · `--cmp-gnb-system-actionButton-*`.
|
|
78
|
+
*/
|
|
79
|
+
export declare const SSystemActionButton: import("react").ForwardRefExoticComponent<SSystemActionButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { SSystemActionButton, type SSystemActionButtonProps, type SSystemActionButtonBaseProps, type SSystemActionButtonAccountProps, type SSystemActionButtonSelectProps, type SSystemActionButtonTextProps, type SSystemActionButtonStatusProps, type SSystemActionButtonIconOption, type SSystemActionButtonTextOption, type SSystemActionButtonStatusOption, } from './SSystemActionButton';
|
|
2
|
+
export { SYSTEM_ACTION_BUTTON_COLORS, SYSTEM_ACTION_BUTTON_TYPES, SYSTEM_ACTION_BUTTON_COLOR_CONFIG, SYSTEM_ACTION_BUTTON_TYPE_CONFIG, SYSTEM_ACTION_BUTTON_LAYOUT, type SSystemActionButtonColor, type SSystemActionButtonType, } from './systemActionButton.config';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { SIconName } from '../SIcon';
|
|
2
|
+
/**
|
|
3
|
+
* SSystemActionButton 설정.
|
|
4
|
+
*
|
|
5
|
+
* 토큰은 GNB system 패널 한 벌(`--cmp-gnb-system-*`)을 그대로 쓴다.
|
|
6
|
+
* 행 공통(높이·라운드·아이콘 프레임·라벨) → --cmp-gnb-system-item-*
|
|
7
|
+
* 색(color 축) light / dark / darker → --cmp-gnb-system-item-<color>-*
|
|
8
|
+
* 우측 액션(패딩·간격·아이콘·텍스트색) → --cmp-gnb-system-actionButton-*
|
|
9
|
+
*
|
|
10
|
+
* 타이포그래피는 CSS 변수가 아니라 `.typo-*` 프리셋으로 나온다.
|
|
11
|
+
* item.label → typo-body-sm-semibold (12/600/20)
|
|
12
|
+
* actionButton.switch → typo-field-sm-default (12/400/20)
|
|
13
|
+
* actionButton.selectData → typo-control-xs-medium (12/500/20)
|
|
14
|
+
*/
|
|
15
|
+
/** 색상(표면). light = 흰 면, dark = 오션블루 면, darker = 네이비 면 */
|
|
16
|
+
export declare const SYSTEM_ACTION_BUTTON_COLORS: readonly ["light", "dark", "darker"];
|
|
17
|
+
export type SSystemActionButtonColor = (typeof SYSTEM_ACTION_BUTTON_COLORS)[number];
|
|
18
|
+
/**
|
|
19
|
+
* 행 구성.
|
|
20
|
+
* - `account` — 계정 행. 아이콘이 `user` 로 고정이고 우측 액션이 없다
|
|
21
|
+
* - `switch` — 보조 조작 문구 + 새로고침 아이콘
|
|
22
|
+
* - `select` — 화살표만. 눌러 들어간다는 뜻
|
|
23
|
+
* - `subSelect` — 지금 선택돼 있는 값 + 화살표
|
|
24
|
+
* - `status` — 라벨 자리에 상태 태그가 들어가고 화살표가 붙는다
|
|
25
|
+
*/
|
|
26
|
+
export declare const SYSTEM_ACTION_BUTTON_TYPES: readonly ["account", "switch", "select", "subSelect", "status"];
|
|
27
|
+
export type SSystemActionButtonType = (typeof SYSTEM_ACTION_BUTTON_TYPES)[number];
|
|
28
|
+
/** 우측 액션 텍스트의 색·타이포가 어느 토큰 그룹을 쓰는지 (토큰의 하위 그룹명과 같다) */
|
|
29
|
+
export type SystemActionButtonActionTextToken = 'switch' | 'selectData';
|
|
30
|
+
export interface SystemActionButtonColorTokens {
|
|
31
|
+
/** 행 배경 (기본) */
|
|
32
|
+
bg: string;
|
|
33
|
+
/** 행 배경 (hover·selected) */
|
|
34
|
+
bgHover: string;
|
|
35
|
+
/** 아이콘 프레임 배경 (기본) */
|
|
36
|
+
iconBg: string;
|
|
37
|
+
/** 아이콘 프레임 배경 (hover·selected) */
|
|
38
|
+
iconBgHover: string;
|
|
39
|
+
/** 아이콘 글리프색 (기본) */
|
|
40
|
+
iconGlyph: string;
|
|
41
|
+
/** 아이콘 글리프색 (hover·selected) */
|
|
42
|
+
iconGlyphHover: string;
|
|
43
|
+
/** 라벨 텍스트색 */
|
|
44
|
+
text: string;
|
|
45
|
+
/** 우측 액션 텍스트색 (토큰 그룹별) */
|
|
46
|
+
actionText: Record<SystemActionButtonActionTextToken, string>;
|
|
47
|
+
/** 우측 액션 아이콘색 */
|
|
48
|
+
actionIcon: string;
|
|
49
|
+
}
|
|
50
|
+
export declare const SYSTEM_ACTION_BUTTON_COLOR_CONFIG: Record<SSystemActionButtonColor, SystemActionButtonColorTokens>;
|
|
51
|
+
export interface SystemActionButtonTypeSpec {
|
|
52
|
+
/** 선행 아이콘 고정값. 있으면 `option.icon` 을 받지 않는다 */
|
|
53
|
+
fixedIcon?: SIconName;
|
|
54
|
+
/** 우측 액션 텍스트의 색·타이포. 없으면 텍스트를 그리지 않는다 */
|
|
55
|
+
actionText?: {
|
|
56
|
+
token: SystemActionButtonActionTextToken;
|
|
57
|
+
typo: string;
|
|
58
|
+
};
|
|
59
|
+
/** 우측 액션 아이콘. 타입이 정하므로 밖에서 바꾸지 않는다 */
|
|
60
|
+
actionIcon?: {
|
|
61
|
+
name: SIconName;
|
|
62
|
+
size: string;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/** 타입이 정하는 고정 구성 — 무엇이 그려지는가 */
|
|
66
|
+
export declare const SYSTEM_ACTION_BUTTON_TYPE_CONFIG: Record<SSystemActionButtonType, SystemActionButtonTypeSpec>;
|
|
67
|
+
/** 치수 — 전부 토큰 참조 */
|
|
68
|
+
export declare const SYSTEM_ACTION_BUTTON_LAYOUT: {
|
|
69
|
+
/** 행 높이 */
|
|
70
|
+
readonly height: string;
|
|
71
|
+
/** 행 라운드 */
|
|
72
|
+
readonly radius: string;
|
|
73
|
+
/** 아이콘 프레임 한 변 */
|
|
74
|
+
readonly iconFrame: string;
|
|
75
|
+
/** 아이콘 글리프 크기 */
|
|
76
|
+
readonly iconGlyph: string;
|
|
77
|
+
/** 아이콘 프레임 라운드 */
|
|
78
|
+
readonly iconRadius: string;
|
|
79
|
+
/** 아이콘 프레임 ↔ 라벨 간격 */
|
|
80
|
+
readonly iconLabelGap: string;
|
|
81
|
+
/** 좌측 여백 */
|
|
82
|
+
readonly paddingLeft: string;
|
|
83
|
+
/** 우측 여백 */
|
|
84
|
+
readonly paddingRight: string;
|
|
85
|
+
/** 액션 텍스트 ↔ 액션 아이콘 간격 */
|
|
86
|
+
readonly actionGap: string;
|
|
87
|
+
};
|