sellmate-design-system-react 9.0.0-beta.2 → 9.0.0-beta.20
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 +463 -89
- package/README.md +101 -0
- package/dist/components/SBadge/README.md +24 -0
- package/dist/components/SBadge/SBadge.d.ts +1 -1
- package/dist/components/SBarcodeInput/README.md +9 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +7 -1
- package/dist/components/SButton/README.md +36 -0
- package/dist/components/SCalendar/README.md +13 -0
- package/dist/components/SCallout/README.md +15 -0
- package/dist/components/SCard/SCard.d.ts +1 -1
- package/dist/components/SCheckbox/README.md +8 -0
- package/dist/components/SChipFilter/README.md +288 -5
- package/dist/components/SChipFilter/SChipFilter.d.ts +95 -40
- package/dist/components/SChipFilter/index.d.ts +1 -1
- package/dist/components/SChipInput/README.md +15 -1
- package/dist/components/SChipInput/SChipInput.d.ts +7 -1
- package/dist/components/SCircleProgress/README.md +8 -0
- package/dist/components/SConfirmModal/README.md +16 -0
- package/dist/components/SDatePicker/README.md +60 -4
- package/dist/components/SDatePicker/SDatePicker.d.ts +61 -5
- package/dist/components/SDatePicker/index.d.ts +1 -1
- package/dist/components/SDateRangePicker/README.md +17 -2
- package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +16 -3
- package/dist/components/SDivider/README.md +4 -0
- package/dist/components/SDraggableItem/README.md +37 -0
- package/dist/components/SDraggableItem/SDraggableItem.d.ts +2 -0
- package/dist/components/SDraggableList/README.md +29 -0
- package/dist/components/SDraggableList/SDraggableList.d.ts +10 -0
- package/dist/components/SDraggableList/index.d.ts +1 -1
- package/dist/components/SDrawer/README.md +8 -0
- package/dist/components/SDropdownButton/README.md +19 -0
- package/dist/components/SEditor/EditorBody.d.ts +40 -0
- package/dist/components/SEditor/EditorToolbar.d.ts +87 -0
- package/dist/components/SEditor/README.md +230 -0
- package/dist/components/SEditor/SEditor.d.ts +124 -0
- package/dist/components/SEditor/editor-icons.d.ts +59 -0
- package/dist/components/SEditor/editor.config.d.ts +85 -0
- package/dist/components/SEditor/index.d.ts +2 -0
- package/dist/components/SEditor/tiptap-api.d.ts +29 -0
- package/dist/components/SEditor/use-is-mobile.d.ts +14 -0
- package/dist/components/SExpansionItem/README.md +36 -0
- package/dist/components/SField/README.md +27 -2
- package/dist/components/SField/SField.d.ts +22 -4
- package/dist/components/SFilePicker/README.md +15 -1
- package/dist/components/SFilePicker/SFilePicker.d.ts +7 -1
- package/dist/components/SFooter/README.md +21 -0
- package/dist/components/SForm/README.md +11 -0
- package/dist/components/SGhostButton/README.md +20 -2
- package/dist/components/SGnb/README.md +45 -0
- package/dist/components/SGnb/gnb.config.d.ts +7 -0
- package/dist/components/SGuide/README.md +15 -0
- package/dist/components/SIcon/README.md +4 -0
- package/dist/components/SIcon/SIcon.d.ts +1 -1
- package/dist/components/SIcon/icons.gen.d.ts +2 -0
- package/dist/components/SImage/README.md +14 -0
- package/dist/components/SInput/README.md +3 -1
- package/dist/components/SInput/SInput.d.ts +7 -1
- package/dist/components/SKeyValueTable/README.md +87 -0
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +14 -3
- package/dist/components/SLayout/README.md +16 -0
- package/dist/components/SLinearProgress/README.md +8 -0
- package/dist/components/SList/README.md +5 -1
- package/dist/components/SList/SList.d.ts +0 -2
- package/dist/components/SListItem/README.md +41 -0
- package/dist/components/SLoadingModal/README.md +8 -0
- package/dist/components/SNumberInput/README.md +9 -1
- package/dist/components/SNumberInput/SNumberInput.d.ts +7 -1
- package/dist/components/SPage/README.md +41 -1
- package/dist/components/SPage/SPage.d.ts +24 -2
- package/dist/components/SPage/index.d.ts +1 -1
- package/dist/components/SPage/page.config.d.ts +8 -0
- package/dist/components/SPopover/README.md +15 -0
- package/dist/components/SPopup/README.md +19 -0
- package/dist/components/SPortal/README.md +14 -0
- package/dist/components/SRadio/README.md +20 -0
- package/dist/components/SRadioButton/README.md +18 -0
- package/dist/components/SScrollArea/README.md +14 -0
- package/dist/components/SSearchInput/README.md +61 -0
- package/dist/components/SSearchInput/SSearchInput.d.ts +52 -0
- package/dist/components/SSearchInput/index.d.ts +1 -0
- package/dist/components/SSectionHeaderCard/README.md +39 -20
- package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +21 -14
- package/dist/components/SSectionHeaderCard/index.d.ts +1 -1
- package/dist/components/SSelect/README.md +25 -3
- package/dist/components/SSelect/SSelect.d.ts +13 -1
- package/dist/components/SSplitter/README.md +15 -0
- package/dist/components/SStepper/README.md +26 -0
- package/dist/components/SSwitch/README.md +13 -0
- package/dist/components/STable/README.md +72 -1
- package/dist/components/STable/STable.d.ts +129 -11
- package/dist/components/STable/index.d.ts +1 -1
- package/dist/components/STabs/README.md +12 -1
- package/dist/components/STabs/STabs.d.ts +2 -4
- package/dist/components/STabs/index.d.ts +1 -1
- package/dist/components/STabs/tabs.config.d.ts +3 -4
- package/dist/components/STag/README.md +47 -0
- package/dist/components/STextLink/README.md +17 -0
- package/dist/components/STextLink/STextLink.d.ts +2 -0
- package/dist/components/STextarea/README.md +1 -1
- package/dist/components/STextarea/STextarea.d.ts +7 -1
- package/dist/components/STimePicker/README.md +15 -1
- package/dist/components/STimePicker/STimePicker.d.ts +7 -1
- package/dist/components/STimePicker/timepicker.config.d.ts +7 -0
- package/dist/components/STimeRangePicker/README.md +27 -1
- package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +7 -1
- package/dist/components/SToast/README.md +24 -0
- package/dist/components/SToggle/README.md +8 -0
- package/dist/components/STooltip/README.md +22 -0
- package/dist/components/STree/README.md +41 -0
- package/dist/components/STree/STree.d.ts +8 -0
- package/dist/components/STree/index.d.ts +1 -1
- package/dist/index.cjs +3987 -496
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3970 -496
- package/dist/index.js.map +1 -1
- package/dist/lib/field-width.d.ts +31 -0
- package/dist/lib/story-docs.d.ts +19 -3
- package/dist/lib/truncated-value-tooltip.d.ts +18 -0
- package/dist/llms-full.txt +2312 -198
- package/dist/llms.txt +465 -91
- package/dist/styles.css +672 -41
- package/dist/theme.css +22 -6
- package/eslint/index.mjs +10 -0
- package/eslint/lib/table-column.mjs +26 -0
- package/eslint/rules/field-width-grade.d.mts +41 -0
- package/eslint/rules/field-width-grade.mjs +311 -0
- package/eslint/rules/table-column-width.mjs +110 -0
- package/eslint/scale.gen.mjs +3 -0
- package/package.json +13 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* SEditor 서식 툴바 아이콘 (로컬 전용).
|
|
4
|
+
*
|
|
5
|
+
* 공용 아이콘 셋(`SIcon` / `icons.gen.tsx`)은 디자인팀 소유이고 서식(bold·italic·정렬·목록 …)
|
|
6
|
+
* 아이콘이 아직 없다. 여기 있는 것들은 그 자리를 메우는 임시 도형이며, 정식 아이콘이 셋에
|
|
7
|
+
* 들어오면 이 파일을 지우고 `SIcon` 으로 교체한다. **다른 컴포넌트에서 import 하지 않는다.**
|
|
8
|
+
*
|
|
9
|
+
* 도형은 tiptap Simple Editor 템플릿의 아이콘 셋을 그대로 옮겼다
|
|
10
|
+
* (ueberdosis/tiptap-ui-components, MIT © 2025 Tiptap — `apps/web/src/components/tiptap-icons`).
|
|
11
|
+
* 24×24 격자에 획 굵기 2 의 면(fill) 도형이고 색은 전부 `currentColor` 를 따른다 — 버튼이
|
|
12
|
+
* 토큰으로 정한 색이 그대로 내려온다. 새 아이콘을 더할 때도 이 격자·굵기를 지킨다.
|
|
13
|
+
*
|
|
14
|
+
* 템플릿에 없어 직접 그린 것은 `IconTextColor`·`IconHorizontalRule` 둘뿐이다 (아래 주석 참고).
|
|
15
|
+
*/
|
|
16
|
+
export type SEditorIconProps = {
|
|
17
|
+
size?: number | string;
|
|
18
|
+
} & SVGProps<SVGSVGElement>;
|
|
19
|
+
/** 제목 — 지금 단계의 도형을 보여 준다 (본문이면 단계 없는 H) */
|
|
20
|
+
export declare const IconHeading: ({ level, ...p }: SEditorIconProps & {
|
|
21
|
+
level?: 0 | 1 | 2 | 3;
|
|
22
|
+
}) => import("react").JSX.Element;
|
|
23
|
+
export declare const IconBold: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
24
|
+
export declare const IconItalic: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
25
|
+
export declare const IconUnderline: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
26
|
+
export declare const IconStrike: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
27
|
+
/** 인라인 코드 */
|
|
28
|
+
export declare const IconCode: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
29
|
+
export declare const IconCodeBlock: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
30
|
+
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
|
+
export declare const IconAlignLeft: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
36
|
+
export declare const IconAlignCenter: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
37
|
+
export declare const IconAlignRight: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
38
|
+
export declare const IconAlignJustify: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
39
|
+
export declare const IconBulletList: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
40
|
+
export declare const IconOrderedList: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
41
|
+
export declare const IconTaskList: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
42
|
+
export declare const IconLink: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
43
|
+
/** 좁은 화면 툴바의 하위 뷰에서 되돌아가기 */
|
|
44
|
+
export declare const IconArrowLeft: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
45
|
+
export declare const IconUndo: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
46
|
+
export declare const IconRedo: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
47
|
+
/**
|
|
48
|
+
* 글자색 — 템플릿에 없어 직접 그렸다 (Simple Editor 에는 글자색 항목이 없다).
|
|
49
|
+
*
|
|
50
|
+
* 나머지 아이콘이 면 도형이라 A 도 같은 굵기(2)로 보이도록 획으로 긋고 끝을 둥글렸다 —
|
|
51
|
+
* 템플릿의 막대(`rx=1` 인 2px 사각형)와 같은 인상이다. 지금 고른 색은 형광펜과 마찬가지로
|
|
52
|
+
* 툴바 버튼이 아이콘 아래 막대로 보여 준다.
|
|
53
|
+
*/
|
|
54
|
+
export declare const IconTextColor: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
55
|
+
/**
|
|
56
|
+
* 구분선 — 템플릿에 없어 직접 그렸다 (Simple Editor 는 구분선 노드는 있지만 툴바 항목이 없다).
|
|
57
|
+
* 막대는 템플릿의 정렬 아이콘과 같은 규격(높이 2, `rx=1`)이다.
|
|
58
|
+
*/
|
|
59
|
+
export declare const IconHorizontalRule: (p: SEditorIconProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { SColor } from '../../lib/color';
|
|
3
|
+
/** 툴바에 놓을 수 있는 항목. `'|'` 는 구분선이다. */
|
|
4
|
+
export declare const SEDITOR_TOOLBAR_ITEMS: readonly ["heading", "fontSize", "bold", "italic", "underline", "strike", "code", "color", "highlight", "superscript", "subscript", "alignLeft", "alignCenter", "alignRight", "alignJustify", "bulletList", "orderedList", "taskList", "list", "blockquote", "codeBlock", "horizontalRule", "link", "image", "undo", "redo"];
|
|
5
|
+
export type SEditorToolbarAction = (typeof SEDITOR_TOOLBAR_ITEMS)[number];
|
|
6
|
+
export type SEditorToolbarItem = SEditorToolbarAction | '|';
|
|
7
|
+
/**
|
|
8
|
+
* 기본 툴바 — tiptap Simple Editor 템플릿과 같은 순서다.
|
|
9
|
+
*
|
|
10
|
+
* 이력 → 블록(제목·목록·인용·코드블록) → 서식 → 첨자 → 정렬 → 삽입. 목록 셋은 `list`
|
|
11
|
+
* 드롭다운 하나로 묶여 있다(개별 버튼으로 펼치려면 `bulletList`·`orderedList`·`taskList`).
|
|
12
|
+
*
|
|
13
|
+
* 전체 항목(`SEDITOR_TOOLBAR_ITEMS`) 중 `fontSize`·`horizontalRule` 만 기본에서 빠져 있다 —
|
|
14
|
+
* 필요한 화면에서 `toolbar` 로 켠다. 글자색(`color`)은 템플릿에 없지만 공지·안내문에서
|
|
15
|
+
* 자주 쓰여 형광펜 옆에 함께 둔다.
|
|
16
|
+
*
|
|
17
|
+
* `image` 는 `onImageUpload` 를 받았을 때만 그려진다 (훅이 없으면 저장할 곳이 없다).
|
|
18
|
+
*/
|
|
19
|
+
export declare const SEDITOR_DEFAULT_TOOLBAR: SEditorToolbarItem[];
|
|
20
|
+
/**
|
|
21
|
+
* 기본 버블 메뉴 — 글을 선택했을 때 그 위에 뜨는 판의 구성.
|
|
22
|
+
*
|
|
23
|
+
* tiptap Simple Editor 에는 버블 메뉴가 없다. 그래서 구성은 템플릿 툴바의 **서식 묶음**을
|
|
24
|
+
* 그대로 가져왔다 — 선택한 글에 바로 걸 수 있는 것만 남기고 블록(제목·목록·인용)·정렬·
|
|
25
|
+
* 삽입은 뺐다. 그것들은 커서만 있어도 되므로 막대에서 누르는 편이 낫다.
|
|
26
|
+
*
|
|
27
|
+
* 판은 선택 영역 위에 뜨는 한 줄이라 줄바꿈하지 않는다 — 항목을 늘릴 때 폭을 함께 본다.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SEDITOR_DEFAULT_BUBBLE_MENU: SEditorToolbarItem[];
|
|
30
|
+
/** 제목 단계 — 본문 12px 위로 14 / 16 / 18 (DS 타이포 heading sm·md·lg) */
|
|
31
|
+
export declare const SEDITOR_HEADING_LEVELS: readonly [1, 2, 3];
|
|
32
|
+
export type SEditorHeadingLevel = (typeof SEDITOR_HEADING_LEVELS)[number];
|
|
33
|
+
export declare const SEDITOR_HEADING_LABELS: Record<SEditorHeadingLevel | 0, string>;
|
|
34
|
+
/**
|
|
35
|
+
* 글자 크기 선택지 (px). DS 타이포 스케일(`--text-*`)에서 본문에 쓰이는 단계만 추렸다.
|
|
36
|
+
* 이 서비스는 정보 밀도가 높아 본문이 12px 다 (AGENTS.md §2-1).
|
|
37
|
+
*/
|
|
38
|
+
export declare const SEDITOR_FONT_SIZES: readonly [11, 12, 14, 16, 18];
|
|
39
|
+
/** 크기를 지정하지 않은 문단이 실제로 보이는 크기 — 드롭다운의 선택 표시 기준이다. */
|
|
40
|
+
export declare const SEDITOR_DEFAULT_FONT_SIZE = 12;
|
|
41
|
+
export interface SEditorColorOption {
|
|
42
|
+
/** 팔레트 칸의 접근성 레이블·툴팁 */
|
|
43
|
+
label: string;
|
|
44
|
+
/** 팔레트 키(`red_75` …) 또는 CSS 색상 문자열 */
|
|
45
|
+
color: SColor;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 기본 글자색 팔레트 — 역할 토큰(`--color-fg-*`)을 그대로 쓴다.
|
|
49
|
+
*
|
|
50
|
+
* 저장되는 HTML 에 `style="color: var(--color-fg-danger)"` 형태로 남으므로 토큰이 바뀌면
|
|
51
|
+
* 이미 저장된 글도 따라간다. 대신 **DS `theme.css` 가 없는 환경(메일 본문 등)으로 그대로
|
|
52
|
+
* 내보내면 색이 풀린다** — 그런 용도라면 `colors` 에 hex 를 직접 넘긴다.
|
|
53
|
+
*/
|
|
54
|
+
export declare const SEDITOR_DEFAULT_COLORS: SEditorColorOption[];
|
|
55
|
+
/** 기본 형광펜 팔레트 — 글자가 그 위에서 읽혀야 하므로 팔레트의 밝은 단계만 쓴다. */
|
|
56
|
+
export declare const SEDITOR_DEFAULT_HIGHLIGHTS: SEditorColorOption[];
|
|
57
|
+
/** ProseMirror 가 만드는 요소에 붙는 클래스 — 자식 선택자의 기준점이 된다. */
|
|
58
|
+
export declare const TASK_LIST_CLASS = "sd-editor-task-list";
|
|
59
|
+
export declare const TASK_ITEM_CLASS = "sd-editor-task-item";
|
|
60
|
+
export declare const IMAGE_CLASS = "sd-editor-image";
|
|
61
|
+
export interface SEditorExtensionOptions {
|
|
62
|
+
/** 빈 문서에 보일 문구를 그때그때 읽어 오는 게터 */
|
|
63
|
+
getPlaceholder: () => string;
|
|
64
|
+
/** 따옴표·하이픈·화살표 자동 치환 (Typography) */
|
|
65
|
+
typography: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* 편집 영역 안쪽 서식 스타일.
|
|
69
|
+
*
|
|
70
|
+
* ProseMirror 가 만드는 자식 요소(h1·ul·blockquote …)는 JSX 에 없어 클래스를 달 수 없고,
|
|
71
|
+
* Tailwind preflight 가 목록·제목의 기본 스타일을 지워 버린다. 이 패키지에는 컴포넌트 CSS
|
|
72
|
+
* 파일이 없으므로 arbitrary variant 로 자식 선택자를 직접 쓴다.
|
|
73
|
+
*/
|
|
74
|
+
export declare const SEDITOR_CONTENT_CLASS: string;
|
|
75
|
+
export interface SEditorContentStyleOptions {
|
|
76
|
+
minHeight?: number | string;
|
|
77
|
+
maxHeight?: number | string;
|
|
78
|
+
disabled?: boolean;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 편집 영역(그리고 엔진을 불러오는 동안 그 자리를 대신하는 빈 영역)의 상자·타이포.
|
|
82
|
+
*
|
|
83
|
+
* 두 곳이 같은 값을 써야 로딩이 끝나는 순간 글이 튀지 않는다.
|
|
84
|
+
*/
|
|
85
|
+
export declare const editorContentStyle: ({ minHeight, maxHeight, disabled, }: SEditorContentStyleOptions) => CSSProperties;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { SEditor, type SEditorProps, type SEditorHandle } from './SEditor';
|
|
2
|
+
export { SEDITOR_TOOLBAR_ITEMS, SEDITOR_DEFAULT_TOOLBAR, SEDITOR_DEFAULT_BUBBLE_MENU, SEDITOR_HEADING_LEVELS, SEDITOR_HEADING_LABELS, SEDITOR_FONT_SIZES, SEDITOR_DEFAULT_FONT_SIZE, SEDITOR_DEFAULT_COLORS, SEDITOR_DEFAULT_HIGHLIGHTS, type SEditorToolbarAction, type SEditorToolbarItem, type SEditorHeadingLevel, type SEditorColorOption, } from './editor.config';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AnyExtension } from '@tiptap/core';
|
|
2
|
+
import { type SEditorExtensionOptions } from './editor.config';
|
|
3
|
+
type TiptapReact = typeof import('@tiptap/react');
|
|
4
|
+
type TiptapMenus = typeof import('@tiptap/react/menus');
|
|
5
|
+
/** 동적으로 불러온 tiptap — 이 객체를 거치지 않고는 에디터 코드가 tiptap 을 만지지 않는다. */
|
|
6
|
+
export interface TiptapApi {
|
|
7
|
+
useEditor: TiptapReact['useEditor'];
|
|
8
|
+
useEditorState: TiptapReact['useEditorState'];
|
|
9
|
+
EditorContent: TiptapReact['EditorContent'];
|
|
10
|
+
/** 선택 영역 위에 뜨는 판 — 자리는 floating-ui 가 잡는다 */
|
|
11
|
+
BubbleMenu: TiptapMenus['BubbleMenu'];
|
|
12
|
+
/** tiptap 확장 구성 — 아래 createExtensions 주석 참고 */
|
|
13
|
+
createExtensions: (options: SEditorExtensionOptions) => AnyExtension[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* tiptap 을 불러온다 (이미 불러왔으면 같은 약속을 돌려준다).
|
|
17
|
+
*
|
|
18
|
+
* 실패하면 캐시를 비워 다음 마운트가 다시 시도하게 한다 — 잠깐의 네트워크 문제로
|
|
19
|
+
* 그 세션 내내 에디터가 뜨지 않는 일을 막는다.
|
|
20
|
+
*/
|
|
21
|
+
export declare const loadTiptapApi: () => Promise<TiptapApi>;
|
|
22
|
+
/**
|
|
23
|
+
* 불러온 tiptap. 아직 준비되지 않았으면 `null`.
|
|
24
|
+
*
|
|
25
|
+
* 두 번째 마운트부터는 첫 렌더에 바로 값이 있어 빈 자리가 보이지 않는다.
|
|
26
|
+
* 서버 렌더에서는 언제나 `null` 이라 하이드레이션이 어긋나지 않는다.
|
|
27
|
+
*/
|
|
28
|
+
export declare const useTiptapApi: () => TiptapApi | null;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 좁은 화면인가 (SEditor 전용 — 다른 컴포넌트에서 import 하지 않는다).
|
|
3
|
+
*
|
|
4
|
+
* 이 DS 에는 브레이크포인트 개념이 없다. 여기에 필요한 이유는 하나뿐이라서 — 손가락으로
|
|
5
|
+
* 쓰는 좁은 화면에서는 툴바 위에 뜨는 팝오버(형광펜 팔레트·링크 입력)가 화면 밖으로
|
|
6
|
+
* 밀리거나 소프트 키보드에 가린다 — 공용 `lib/` 로 올리지 않고 이 폴더에 둔다. 나중에
|
|
7
|
+
* DS 차원의 브레이크포인트가 생기면 그걸로 갈아끼운다.
|
|
8
|
+
*
|
|
9
|
+
* **뷰포트 폭**을 본다. 필드 자신의 폭이 아니다 — 넓은 화면에서 좁은 칸에 놓인 에디터는
|
|
10
|
+
* 팝오버를 띄울 자리가 옆에 얼마든지 있으므로 하위 뷰로 바꿀 이유가 없다.
|
|
11
|
+
*
|
|
12
|
+
* 서버 렌더와 첫 렌더에서는 언제나 `false` 다 (하이드레이션이 어긋나지 않게).
|
|
13
|
+
*/
|
|
14
|
+
export declare const useIsMobile: () => boolean;
|
|
@@ -31,6 +31,42 @@
|
|
|
31
31
|
|-------|------|-------------|
|
|
32
32
|
| `onToggle` | `(expanded: boolean, event: MouseEvent<HTMLButtonElement>) => void` | |
|
|
33
33
|
|
|
34
|
+
## Types
|
|
35
|
+
|
|
36
|
+
### SExpansionItemSupportingTextPosition
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
export type SExpansionItemSupportingTextPosition = 'right' | 'bottom';
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### SExpansionItemRenderProp
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
export type SExpansionItemRenderProp = (state: SExpansionItemRenderState) => ReactNode;
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### SExpansionItemInteraction
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
export type SExpansionItemInteraction = 'chevron';
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### SExpansionItemSize
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
export type SExpansionItemSize = 'sm' | 'md';
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### SExpansionItemRenderState
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
export interface SExpansionItemRenderState {
|
|
64
|
+
expanded: boolean;
|
|
65
|
+
selected: boolean;
|
|
66
|
+
disabled: boolean;
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
34
70
|
## Dependencies
|
|
35
71
|
|
|
36
72
|
### Used by
|
|
@@ -28,8 +28,9 @@
|
|
|
28
28
|
| `hint?` | `string` | `''` | 하단 힌트 |
|
|
29
29
|
| `disabled?` | `boolean` | `false` | 비활성 |
|
|
30
30
|
| `readOnly?` | `boolean` | `false` | 읽기 전용 (회색 배경) |
|
|
31
|
-
| `width?` | `
|
|
32
|
-
| `minWidth?` | `
|
|
31
|
+
| `width?` | `SFieldWidth` | — | 컨트롤 너비. 지정하면 필드가 부모 폭을 다 먹지 않고 (레이블 + width) 만큼만 차지한다. 다른 요소와 나란히 놓으려면 부모를 flex 로 두면 된다. **폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`)으로 준다** — `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다. 등급은 `maxLength`(= 스키마 상한)로 고르고, 상한이 `xl` 을 넘거나 상한이 없으면 `"100%"` 로 둔다. (`sellmate/field-width-grade` 가 검사한다) 숫자는 px, 그 밖의 문자열은 CSS 길이 그대로다. |
|
|
32
|
+
| `minWidth?` | `SFieldWidth` | — | 컨트롤 최소 너비 (등급 · 숫자=px · CSS 길이). 하한선만 지정하며 필드는 계속 부모 폭을 채운다 |
|
|
33
|
+
| `maxWidth?` | `SFieldWidth` | — | 컨트롤 최대 너비 (등급 · 숫자=px · CSS 길이). 상한선만 지정하며 필드는 그 아래에서 부모 폭을 채운다. `width` 와 달리 hug 로 전환하지 않는다 — 부모가 좁으면 같이 좁아지고, 넓어도 여기서 멈춘다. 값 길이가 정해진 컨트롤(날짜·시간)이 `width="100%"` 를 받아 행 전체로 늘어나는 것을 막는 데 쓴다. **라벨은 상한에 들어가지 않는다** — 라벨은 컨트롤의 형제라 이 상한 밖이다. `addonLabel` 은 테두리 박스 안이라 상한을 나눠 먹으므로, `labelWidth`(= addon 폭)만큼 상한을 자동으로 늘린다. addon 이 있는데 `labelWidth` 가 없으면 폭을 알 수 없어 상한을 걸지 않는다 — 컨트롤이 잘리는 것보다 넓은 편이 낫다. |
|
|
33
34
|
| `multiline?` | `boolean` | `false` | 멀티라인(textarea) — 컨트롤 높이를 고정하지 않고 min-height만 적용 |
|
|
34
35
|
| `borderless?` | `boolean` | `false` | 테두리 박스 제거 (inline 컨트롤용) — border/배경/hover·focus 강조만 사라지고 label·hint·errorMessage 등 나머지 필드 구성은 그대로 동작한다. |
|
|
35
36
|
| `children?` | `ReactNode` | — | 실제 컨트롤 (input/select 등) — 테두리 없이 렌더, 테두리는 SField가 제공 |
|
|
@@ -49,6 +50,26 @@
|
|
|
49
50
|
|--------|------|-------------|
|
|
50
51
|
| `focus` | `() => void` | 내부 컨트롤에 포커스하고 필드를 화면에 스크롤합니다. |
|
|
51
52
|
|
|
53
|
+
## Types
|
|
54
|
+
|
|
55
|
+
### SFieldSize
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
export type SFieldSize = 'sm' | 'md';
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### SFieldAddonAlign
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
export type SFieldAddonAlign = 'start' | 'center' | 'end';
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### SFieldStatus
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
export type SFieldStatus = 'default' | 'pass' | 'error';
|
|
71
|
+
```
|
|
72
|
+
|
|
52
73
|
## Dependencies
|
|
53
74
|
|
|
54
75
|
### Used by
|
|
@@ -57,9 +78,11 @@
|
|
|
57
78
|
- [SChipInput](../SChipInput)
|
|
58
79
|
- [SDatePicker](../SDatePicker)
|
|
59
80
|
- [SDateRangePicker](../SDateRangePicker)
|
|
81
|
+
- [SEditor](../SEditor)
|
|
60
82
|
- [SFilePicker](../SFilePicker)
|
|
61
83
|
- [SInput](../SInput)
|
|
62
84
|
- [SNumberInput](../SNumberInput)
|
|
85
|
+
- [SSearchInput](../SSearchInput)
|
|
63
86
|
- [SSelect](../SSelect)
|
|
64
87
|
- [STextarea](../STextarea)
|
|
65
88
|
- [STimePicker](../STimePicker)
|
|
@@ -80,9 +103,11 @@ graph TD;
|
|
|
80
103
|
SChipInput --> SField
|
|
81
104
|
SDatePicker --> SField
|
|
82
105
|
SDateRangePicker --> SField
|
|
106
|
+
SEditor --> SField
|
|
83
107
|
SFilePicker --> SField
|
|
84
108
|
SInput --> SField
|
|
85
109
|
SNumberInput --> SField
|
|
110
|
+
SSearchInput --> SField
|
|
86
111
|
SSelect --> SField
|
|
87
112
|
STextarea --> SField
|
|
88
113
|
STimePicker --> SField
|
|
@@ -3,6 +3,7 @@ import { type SIconName } from '../SIcon';
|
|
|
3
3
|
import { type STooltipProps } from '../STooltip';
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
6
|
+
import { type SFieldWidth } from '../../lib/field-width';
|
|
6
7
|
export type SFieldSize = 'sm' | 'md';
|
|
7
8
|
export type SFieldAddonAlign = 'start' | 'center' | 'end';
|
|
8
9
|
export type SFieldStatus = 'default' | 'pass' | 'error';
|
|
@@ -57,12 +58,29 @@ export interface SFieldProps {
|
|
|
57
58
|
/** 읽기 전용 (회색 배경) */
|
|
58
59
|
readOnly?: boolean;
|
|
59
60
|
/**
|
|
60
|
-
* 컨트롤
|
|
61
|
+
* 컨트롤 너비. 지정하면 필드가 부모 폭을 다 먹지 않고 (레이블 + width) 만큼만 차지한다.
|
|
61
62
|
* 다른 요소와 나란히 놓으려면 부모를 flex 로 두면 된다.
|
|
63
|
+
*
|
|
64
|
+
* **폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`)으로 준다** — `--cmp-field-width-*` 토큰으로 풀리므로
|
|
65
|
+
* 토큰이 바뀌면 화면이 따라간다. 등급은 `maxLength`(= 스키마 상한)로 고르고, 상한이 `xl` 을
|
|
66
|
+
* 넘거나 상한이 없으면 `"100%"` 로 둔다. (`sellmate/field-width-grade` 가 검사한다)
|
|
67
|
+
* 숫자는 px, 그 밖의 문자열은 CSS 길이 그대로다.
|
|
62
68
|
*/
|
|
63
|
-
width?:
|
|
64
|
-
/** 컨트롤 최소 너비 (숫자=px). 하한선만 지정하며 필드는 계속 부모 폭을 채운다 */
|
|
65
|
-
minWidth?:
|
|
69
|
+
width?: SFieldWidth;
|
|
70
|
+
/** 컨트롤 최소 너비 (등급 · 숫자=px · CSS 길이). 하한선만 지정하며 필드는 계속 부모 폭을 채운다 */
|
|
71
|
+
minWidth?: SFieldWidth;
|
|
72
|
+
/**
|
|
73
|
+
* 컨트롤 최대 너비 (등급 · 숫자=px · CSS 길이). 상한선만 지정하며 필드는 그 아래에서 부모 폭을 채운다.
|
|
74
|
+
*
|
|
75
|
+
* `width` 와 달리 hug 로 전환하지 않는다 — 부모가 좁으면 같이 좁아지고, 넓어도 여기서 멈춘다.
|
|
76
|
+
* 값 길이가 정해진 컨트롤(날짜·시간)이 `width="100%"` 를 받아 행 전체로 늘어나는 것을 막는 데 쓴다.
|
|
77
|
+
*
|
|
78
|
+
* **라벨은 상한에 들어가지 않는다** — 라벨은 컨트롤의 형제라 이 상한 밖이다.
|
|
79
|
+
* `addonLabel` 은 테두리 박스 안이라 상한을 나눠 먹으므로, `labelWidth`(= addon 폭)만큼
|
|
80
|
+
* 상한을 자동으로 늘린다. addon 이 있는데 `labelWidth` 가 없으면 폭을 알 수 없어 상한을
|
|
81
|
+
* 걸지 않는다 — 컨트롤이 잘리는 것보다 넓은 편이 낫다.
|
|
82
|
+
*/
|
|
83
|
+
maxWidth?: SFieldWidth;
|
|
66
84
|
/** 멀티라인(textarea) — 컨트롤 높이를 고정하지 않고 min-height만 적용 */
|
|
67
85
|
multiline?: boolean;
|
|
68
86
|
/**
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
| `hint?` | `string` | — | |
|
|
36
36
|
| `error?` | `boolean` | — | |
|
|
37
37
|
| `errorMessage?` | `string` | — | |
|
|
38
|
-
| `width?` | `
|
|
38
|
+
| `width?` | `SFieldWidth` | — | 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이. 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다. 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다. |
|
|
39
39
|
| `className?` | `string` | — | |
|
|
40
40
|
| `style?` | `CSSProperties` | — | |
|
|
41
41
|
|
|
@@ -46,6 +46,20 @@
|
|
|
46
46
|
| `onValueChange` | `(value: SFilePickerValue) => void` | 파일 변경 (sdUpdate) |
|
|
47
47
|
| `onReject` | `(detail: { files: File[]; reason: SFilePickerRejectReason }) => void` | 제한 초과 거부 (sdReject) |
|
|
48
48
|
|
|
49
|
+
## Types
|
|
50
|
+
|
|
51
|
+
### SFilePickerValue
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
export type SFilePickerValue = File[] | File | null;
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### SFilePickerRejectReason
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
export type SFilePickerRejectReason = 'max-file-size' | 'max-total-size' | 'max-files';
|
|
61
|
+
```
|
|
62
|
+
|
|
49
63
|
## Dependencies
|
|
50
64
|
|
|
51
65
|
### Used by
|
|
@@ -4,6 +4,7 @@ import { type SIconName } from '../SIcon';
|
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
6
6
|
import { type STooltipProps } from '../STooltip';
|
|
7
|
+
import { type SFieldWidth } from '../../lib/field-width';
|
|
7
8
|
export type SFilePickerValue = File[] | File | null;
|
|
8
9
|
export type SFilePickerRejectReason = 'max-file-size' | 'max-total-size' | 'max-files';
|
|
9
10
|
export interface SFilePickerProps {
|
|
@@ -45,7 +46,12 @@ export interface SFilePickerProps {
|
|
|
45
46
|
hint?: string;
|
|
46
47
|
error?: boolean;
|
|
47
48
|
errorMessage?: string;
|
|
48
|
-
|
|
49
|
+
/**
|
|
50
|
+
* 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이.
|
|
51
|
+
* 등급은 `--cmp-field-width-*` 토큰으로 풀리므로 토큰이 바뀌면 화면이 따라간다.
|
|
52
|
+
* 값 길이에 상한이 없으면 `"100%"` 로 두어 행 전체를 쓴다.
|
|
53
|
+
*/
|
|
54
|
+
width?: SFieldWidth;
|
|
49
55
|
className?: string;
|
|
50
56
|
style?: CSSProperties;
|
|
51
57
|
}
|
|
@@ -16,6 +16,27 @@
|
|
|
16
16
|
| `leftClassName?` | `string` | — | |
|
|
17
17
|
| `style?` | `CSSProperties` | — | |
|
|
18
18
|
|
|
19
|
+
## Types
|
|
20
|
+
|
|
21
|
+
### SFooterBg
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
export type SFooterBg = 'white' | 'grey';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### SFooterButton
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
export interface SFooterButton {
|
|
31
|
+
label?: string;
|
|
32
|
+
color?: SButtonColor;
|
|
33
|
+
outline?: boolean;
|
|
34
|
+
size?: SButtonSize;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
onClick?: () => void;
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
19
40
|
## Dependencies
|
|
20
41
|
|
|
21
42
|
### Used by
|
|
@@ -29,3 +29,14 @@
|
|
|
29
29
|
| `reset` | `() => void` | resetValidation 별칭 — sd-form sdReset 대응. 값 리셋은 소비자(value/onChange) 책임 |
|
|
30
30
|
| `focusFirstInvalid` | `() => void` | 첫 번째 실패 필드로 포커스 이동 |
|
|
31
31
|
|
|
32
|
+
## Types
|
|
33
|
+
|
|
34
|
+
### SFormValidationError
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
export interface SFormValidationError {
|
|
38
|
+
/** 검증에 실패한 필드 name 목록 (DOM 순서) */
|
|
39
|
+
names: string[];
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
@@ -27,6 +27,20 @@
|
|
|
27
27
|
|-------|------|-------------|
|
|
28
28
|
| `onClick` | `(e: MouseEvent<HTMLButtonElement>) => void` | 클릭 (sdClick) |
|
|
29
29
|
|
|
30
|
+
## Types
|
|
31
|
+
|
|
32
|
+
### SGhostButtonSize
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
export type SGhostButtonSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### SGhostButtonIntent
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
export type SGhostButtonIntent = 'default' | 'danger' | 'action' | 'subAction' | 'inverse';
|
|
42
|
+
```
|
|
43
|
+
|
|
30
44
|
## Dependencies
|
|
31
45
|
|
|
32
46
|
### Used by
|
|
@@ -35,6 +49,7 @@
|
|
|
35
49
|
- [SCalendar](../SCalendar)
|
|
36
50
|
- [SChip](../SChip)
|
|
37
51
|
- [SChipFilter](../SChipFilter)
|
|
52
|
+
- [SDatePicker](../SDatePicker)
|
|
38
53
|
- [SDateRangePicker](../SDateRangePicker)
|
|
39
54
|
- [SFilePicker](../SFilePicker)
|
|
40
55
|
- [SGnb](../SGnb)
|
|
@@ -44,7 +59,8 @@
|
|
|
44
59
|
- [SOverlayHeader](../SOverlayHeader)
|
|
45
60
|
- [SPage](../SPage)
|
|
46
61
|
- [SPopover](../SPopover)
|
|
47
|
-
- [
|
|
62
|
+
- [SSearchInput](../SSearchInput)
|
|
63
|
+
- [STable](../STable)
|
|
48
64
|
- [STimePicker](../STimePicker)
|
|
49
65
|
- [STimeRangePicker](../STimeRangePicker)
|
|
50
66
|
- [SToast](../SToast)
|
|
@@ -66,6 +82,7 @@ graph TD;
|
|
|
66
82
|
SCalendar --> SGhostButton
|
|
67
83
|
SChip --> SGhostButton
|
|
68
84
|
SChipFilter --> SGhostButton
|
|
85
|
+
SDatePicker --> SGhostButton
|
|
69
86
|
SDateRangePicker --> SGhostButton
|
|
70
87
|
SFilePicker --> SGhostButton
|
|
71
88
|
SGnb --> SGhostButton
|
|
@@ -75,7 +92,8 @@ graph TD;
|
|
|
75
92
|
SOverlayHeader --> SGhostButton
|
|
76
93
|
SPage --> SGhostButton
|
|
77
94
|
SPopover --> SGhostButton
|
|
78
|
-
|
|
95
|
+
SSearchInput --> SGhostButton
|
|
96
|
+
STable --> SGhostButton
|
|
79
97
|
STimePicker --> SGhostButton
|
|
80
98
|
STimeRangePicker --> SGhostButton
|
|
81
99
|
SToast --> SGhostButton
|
|
@@ -38,6 +38,51 @@
|
|
|
38
38
|
| `onLauncherClick` | `() => void` | 앱런처(그리드) 버튼 클릭. 미지정 시 런처 버튼을 렌더하지 않는다. 접힘 레일(fix)에는 폴드 버튼만 남으므로 표시되지 않는다. |
|
|
39
39
|
| `onMenuWidthChange` | `(width: number) => void` | 메뉴 폭이 확정될 때(드래그를 놓거나 방향키 조작). 드래그하는 동안에는 오지 않는다 |
|
|
40
40
|
|
|
41
|
+
## Types
|
|
42
|
+
|
|
43
|
+
### SGnbType
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
/** 메뉴 스타일: box = 라운드/좁은 들여쓰기, belt = 풀폭 행/넓은 들여쓰기 */
|
|
47
|
+
export type SGnbType = 'box' | 'belt';
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### SGnbHeader
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
/** 상단바 구조: fix = GNB 폭에 고정, full = 레이아웃 전폭 */
|
|
54
|
+
export type SGnbHeader = 'fix' | 'full';
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### SGnbColor
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
/** 색상(테마): light / dark */
|
|
61
|
+
export type SGnbColor = 'light' | 'dark';
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### SGnbMenuItem
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
/** GNB 메뉴 아이템 (재귀 트리). depth1 → depth2 → depth3. */
|
|
68
|
+
export interface SGnbMenuItem {
|
|
69
|
+
/** 표시 텍스트 */
|
|
70
|
+
label: string;
|
|
71
|
+
/** 고유 식별값 (선택 상태 비교 기준) */
|
|
72
|
+
value: string;
|
|
73
|
+
/** depth1 전용 아이콘명 */
|
|
74
|
+
icon?: SIconName;
|
|
75
|
+
/** 우측 Tag 뱃지 텍스트 */
|
|
76
|
+
tag?: string;
|
|
77
|
+
/** 뱃지 색. 미지정 시 blue. */
|
|
78
|
+
tagColor?: STagColor;
|
|
79
|
+
/** 비활성 여부 */
|
|
80
|
+
disabled?: boolean;
|
|
81
|
+
/** 하위 아이템 (있으면 펼침/접힘 대상) */
|
|
82
|
+
children?: SGnbMenuItem[];
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
41
86
|
## Dependencies
|
|
42
87
|
|
|
43
88
|
### Depends on
|
|
@@ -48,6 +48,8 @@ export declare const GNB_MENU: Record<SGnbType, {
|
|
|
48
48
|
depth1FontWeight: number;
|
|
49
49
|
itemFontSize: number;
|
|
50
50
|
itemLineHeight: number;
|
|
51
|
+
itemFontWeight: number;
|
|
52
|
+
itemFontWeightSelected: number;
|
|
51
53
|
}>;
|
|
52
54
|
/**
|
|
53
55
|
* 색상(color 축). light → --cmp-gnb-light-* 색, dark → --cmp-gnb-dark-* 색
|
|
@@ -160,3 +162,8 @@ export declare function findGnbRailValue(items: SGnbMenuItem[], value: string):
|
|
|
160
162
|
export declare function findGnbSiblingValues(items: SGnbMenuItem[], value: string): string[];
|
|
161
163
|
/** value 로 선택된 아이템의 조상 value 목록(자기 자신 제외)을 반환 → 자동 펼침용 */
|
|
162
164
|
export declare function findGnbAncestors(items: SGnbMenuItem[], value: string): string[];
|
|
165
|
+
/**
|
|
166
|
+
* value 를 가진 아이템 아래의 **하위 가지**(children 을 가진 자손) value 목록을 반환.
|
|
167
|
+
* 부모를 펼칠 때 그 아래 가지도 전부 함께 펼치는 용도 — 리프는 펼침 대상이 아니라 제외한다.
|
|
168
|
+
*/
|
|
169
|
+
export declare function findGnbDescendantBranchValues(items: SGnbMenuItem[], value: string): string[];
|
|
@@ -17,6 +17,21 @@
|
|
|
17
17
|
| `className?` | `string` | — | |
|
|
18
18
|
| `style?` | `CSSProperties` | — | |
|
|
19
19
|
|
|
20
|
+
## Types
|
|
21
|
+
|
|
22
|
+
### SGuideType
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
export type SGuideType = 'tip' | 'notion';
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### SGuideMessage
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
/** 중첩 배열로 depth 표현 (원본 renderListItem 대응). 예: ['상위', ['하위1', '하위2']] */
|
|
32
|
+
export type SGuideMessage = string | SGuideMessage[];
|
|
33
|
+
```
|
|
34
|
+
|
|
20
35
|
## Dependencies
|
|
21
36
|
|
|
22
37
|
### Depends on
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
- [SDateRangePicker](../SDateRangePicker)
|
|
31
31
|
- [SDraggableItem](../SDraggableItem)
|
|
32
32
|
- [SDropdownButton](../SDropdownButton)
|
|
33
|
+
- [SEditor](../SEditor)
|
|
33
34
|
- [SExpansionItem](../SExpansionItem)
|
|
34
35
|
- [SField](../SField)
|
|
35
36
|
- [SFilePicker](../SFilePicker)
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
- [SNumberInput](../SNumberInput)
|
|
44
45
|
- [SPagination](../SPagination)
|
|
45
46
|
- [SPopover](../SPopover)
|
|
47
|
+
- [SSearchInput](../SSearchInput)
|
|
46
48
|
- [SSectionHeaderCard](../SSectionHeaderCard)
|
|
47
49
|
- [SSelect](../SSelect)
|
|
48
50
|
- [SStepper](../SStepper)
|
|
@@ -68,6 +70,7 @@ graph TD;
|
|
|
68
70
|
SDateRangePicker --> SIcon
|
|
69
71
|
SDraggableItem --> SIcon
|
|
70
72
|
SDropdownButton --> SIcon
|
|
73
|
+
SEditor --> SIcon
|
|
71
74
|
SExpansionItem --> SIcon
|
|
72
75
|
SField --> SIcon
|
|
73
76
|
SFilePicker --> SIcon
|
|
@@ -81,6 +84,7 @@ graph TD;
|
|
|
81
84
|
SNumberInput --> SIcon
|
|
82
85
|
SPagination --> SIcon
|
|
83
86
|
SPopover --> SIcon
|
|
87
|
+
SSearchInput --> SIcon
|
|
84
88
|
SSectionHeaderCard --> SIcon
|
|
85
89
|
SSelect --> SIcon
|
|
86
90
|
SStepper --> SIcon
|
|
@@ -17,6 +17,6 @@ export interface SIconProps {
|
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* SIcon — sd-icon 포팅.
|
|
20
|
-
*
|
|
20
|
+
* icons.gen.tsx 의 SVG 를 currentColor 기반으로 렌더한다.
|
|
21
21
|
*/
|
|
22
22
|
export declare const SIcon: import("react").ForwardRefExoticComponent<SIconProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -39,6 +39,7 @@ export declare const ICONS: {
|
|
|
39
39
|
readonly clockFill: (p: IconRenderProps) => import("react").JSX.Element;
|
|
40
40
|
readonly clockOutline: (p: IconRenderProps) => import("react").JSX.Element;
|
|
41
41
|
readonly close: (p: IconRenderProps) => import("react").JSX.Element;
|
|
42
|
+
readonly company: (p: IconRenderProps) => import("react").JSX.Element;
|
|
42
43
|
readonly copy: (p: IconRenderProps) => import("react").JSX.Element;
|
|
43
44
|
readonly coupon: (p: IconRenderProps) => import("react").JSX.Element;
|
|
44
45
|
readonly dashboard: (p: IconRenderProps) => import("react").JSX.Element;
|
|
@@ -76,6 +77,7 @@ export declare const ICONS: {
|
|
|
76
77
|
readonly reset: (p: IconRenderProps) => import("react").JSX.Element;
|
|
77
78
|
readonly robot: (p: IconRenderProps) => import("react").JSX.Element;
|
|
78
79
|
readonly row: (p: IconRenderProps) => import("react").JSX.Element;
|
|
80
|
+
readonly rowDense: (p: IconRenderProps) => import("react").JSX.Element;
|
|
79
81
|
readonly save: (p: IconRenderProps) => import("react").JSX.Element;
|
|
80
82
|
readonly search: (p: IconRenderProps) => import("react").JSX.Element;
|
|
81
83
|
readonly send: (p: IconRenderProps) => import("react").JSX.Element;
|