sellmate-design-system-react 9.0.0-beta.4 → 9.0.0-beta.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +670 -95
- package/README.md +111 -9
- package/dist/components/SAccountListBox/AccountListBoxPortal.d.ts +31 -0
- package/dist/components/SAccountListBox/README.md +86 -0
- package/dist/components/SAccountListBox/SAccountListBox.d.ts +79 -0
- package/dist/components/SAccountListBox/SystemMenuPortal.d.ts +58 -0
- package/dist/components/SAccountListBox/accountListBox.config.d.ts +64 -0
- package/dist/components/SAccountListBox/index.d.ts +2 -0
- package/dist/components/SBadge/README.md +26 -0
- package/dist/components/SBadge/SBadge.d.ts +1 -1
- package/dist/components/SBarcodeInput/README.md +12 -4
- package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +10 -2
- package/dist/components/SButton/README.md +38 -0
- package/dist/components/SCalendar/README.md +13 -0
- package/dist/components/SCalendarBoard/CalendarDayCard.d.ts +38 -0
- package/dist/components/SCalendarBoard/CalendarDayEventListBox.d.ts +26 -0
- package/dist/components/SCalendarBoard/CalendarEventButton.d.ts +13 -0
- package/dist/components/SCalendarBoard/CalendarMoreButton.d.ts +12 -0
- package/dist/components/SCalendarBoard/README.md +137 -0
- package/dist/components/SCalendarBoard/SCalendarBoard.d.ts +68 -0
- package/dist/components/SCalendarBoard/calendarBoard.config.d.ts +33 -0
- package/dist/components/SCalendarBoard/index.d.ts +3 -0
- package/dist/components/SCalendarBoard/types.d.ts +31 -0
- package/dist/components/SCallout/README.md +16 -1
- package/dist/components/SCallout/SCallout.d.ts +9 -4
- package/dist/components/SCard/README.md +16 -0
- package/dist/components/SCard/SCard.d.ts +17 -2
- package/dist/components/SCheckbox/README.md +8 -0
- package/dist/components/SChipFilter/README.md +339 -14
- package/dist/components/SChipFilter/SChipFilter.d.ts +150 -60
- package/dist/components/SChipFilter/index.d.ts +1 -1
- package/dist/components/SChipInput/README.md +16 -2
- package/dist/components/SChipInput/SChipInput.d.ts +8 -2
- package/dist/components/SChipInput/index.d.ts +1 -1
- package/dist/components/SCircleProgress/README.md +8 -0
- package/dist/components/SConfirmModal/README.md +11 -3
- package/dist/components/SConfirmModal/SConfirmModal.d.ts +16 -8
- package/dist/components/SDatePicker/README.md +20 -2
- package/dist/components/SDatePicker/SDatePicker.d.ts +27 -4
- package/dist/components/SDateRangePicker/README.md +19 -4
- package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +19 -6
- package/dist/components/SDivider/README.md +7 -0
- package/dist/components/SDivider/SDivider.d.ts +11 -0
- package/dist/components/SDraggableItem/README.md +37 -0
- package/dist/components/SDraggableItem/SDraggableItem.d.ts +2 -0
- package/dist/components/SDraggableItem/index.d.ts +1 -1
- package/dist/components/SDraggableList/README.md +30 -0
- package/dist/components/SDraggableList/SDraggableList.d.ts +11 -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 +36 -0
- package/dist/components/SEditor/EditorToolbar.d.ts +93 -0
- package/dist/components/SEditor/README.md +203 -0
- package/dist/components/SEditor/SEditor.d.ts +114 -0
- package/dist/components/SEditor/editor-icons.d.ts +63 -0
- package/dist/components/SEditor/editor.config.d.ts +119 -0
- package/dist/components/SEditor/index.d.ts +8 -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/SExpansionItem/index.d.ts +1 -1
- package/dist/components/SField/README.md +29 -5
- package/dist/components/SField/SField.d.ts +20 -8
- package/dist/components/SFilePicker/README.md +18 -4
- package/dist/components/SFilePicker/SFilePicker.d.ts +11 -5
- package/dist/components/SFooter/README.md +25 -0
- package/dist/components/SFooter/SFooter.d.ts +4 -3
- package/dist/components/SForm/README.md +12 -1
- package/dist/components/SForm/SForm.d.ts +2 -2
- package/dist/components/SGhostButton/README.md +22 -4
- package/dist/components/SGnb/README.md +57 -6
- package/dist/components/SGnb/SGnb.d.ts +58 -8
- package/dist/components/SGnb/gnb.config.d.ts +12 -5
- package/dist/components/SGnb/index.d.ts +1 -1
- package/dist/components/SGnbSystem/README.md +186 -0
- package/dist/components/SGnbSystem/SGnbSystem.d.ts +179 -0
- package/dist/components/SGnbSystem/gnbSystem.config.d.ts +122 -0
- package/dist/components/SGnbSystem/index.d.ts +2 -0
- package/dist/components/SGuide/README.md +15 -0
- package/dist/components/SIcon/README.md +10 -0
- package/dist/components/SIcon/SIcon.d.ts +1 -1
- package/dist/components/SIcon/icons.gen.d.ts +4 -0
- package/dist/components/SImage/README.md +15 -1
- package/dist/components/SImage/SImage.d.ts +2 -2
- package/dist/components/SInput/README.md +6 -4
- package/dist/components/SInput/SInput.d.ts +10 -4
- package/dist/components/SKeyValueTable/README.md +86 -0
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +6 -2
- package/dist/components/SKeyValueTable/index.d.ts +1 -1
- package/dist/components/SLayout/README.md +22 -1
- package/dist/components/SLayout/SLayout.d.ts +6 -2
- package/dist/components/SLayout/index.d.ts +1 -1
- package/dist/components/SLinearProgress/README.md +15 -0
- package/dist/components/SLinearProgress/SLinearProgress.d.ts +3 -0
- package/dist/components/SLinearProgress/index.d.ts +1 -1
- package/dist/components/SList/README.md +15 -3
- package/dist/components/SList/SList.d.ts +7 -5
- package/dist/components/SList/index.d.ts +1 -1
- package/dist/components/SListItem/README.md +41 -0
- package/dist/components/SListItem/index.d.ts +1 -1
- package/dist/components/SLoadingContainer/loading.d.ts +18 -2
- package/dist/components/SLoadingModal/README.md +10 -2
- package/dist/components/SLoadingModal/SLoadingModal.d.ts +4 -4
- package/dist/components/SLoadingModal/index.d.ts +1 -1
- package/dist/components/SModal/README.md +1 -1
- package/dist/components/SNumberInput/README.md +14 -6
- package/dist/components/SNumberInput/SNumberInput.d.ts +12 -4
- package/dist/components/SPage/README.md +87 -5
- package/dist/components/SPage/SPage.d.ts +29 -9
- package/dist/components/SPage/SPageHeader.d.ts +31 -13
- package/dist/components/SPage/index.d.ts +2 -2
- package/dist/components/SPage/page-column.d.ts +34 -0
- package/dist/components/SPage/page-width.d.ts +23 -0
- package/dist/components/SPage/page.config.d.ts +18 -0
- package/dist/components/SPopover/README.md +15 -0
- package/dist/components/SPopup/README.md +27 -2
- package/dist/components/SPopup/SPopup.d.ts +7 -3
- package/dist/components/SPopup/index.d.ts +1 -1
- package/dist/components/SPortal/README.md +18 -0
- package/dist/components/SRadio/README.md +20 -0
- package/dist/components/SRadioButton/README.md +18 -0
- package/dist/components/SRadioButton/SRadioButton.d.ts +1 -1
- package/dist/components/SRadioCard/README.md +78 -0
- package/dist/components/SRadioCard/SRadioCard.d.ts +29 -0
- package/dist/components/SRadioCard/SRadioCardGroup.d.ts +36 -0
- package/dist/components/SRadioCard/index.d.ts +2 -0
- package/dist/components/SScrollArea/README.md +27 -0
- package/dist/components/SSearchInput/README.md +63 -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 +37 -0
- package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +10 -0
- package/dist/components/SSelect/README.md +29 -11
- package/dist/components/SSelect/SSelect.d.ts +28 -8
- package/dist/components/SSplitter/README.md +17 -2
- package/dist/components/SSplitter/SSplitter.d.ts +7 -3
- package/dist/components/SStepper/README.md +26 -0
- package/dist/components/SSwitch/README.md +13 -1
- package/dist/components/SSwitch/SSwitch.d.ts +1 -3
- package/dist/components/SSystemActionButton/README.md +221 -0
- package/dist/components/SSystemActionButton/SSystemActionButton.d.ts +161 -0
- package/dist/components/SSystemActionButton/index.d.ts +2 -0
- package/dist/components/SSystemActionButton/systemActionButton.config.d.ts +93 -0
- package/dist/components/STable/README.md +94 -10
- package/dist/components/STable/STable.d.ts +130 -22
- package/dist/components/STable/index.d.ts +1 -1
- package/dist/components/STabs/README.md +13 -2
- package/dist/components/STabs/STabs.d.ts +3 -5
- 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 +52 -0
- package/dist/components/STag/STag.d.ts +3 -1
- package/dist/components/STextLink/README.md +19 -1
- package/dist/components/STextLink/STextLink.d.ts +5 -1
- package/dist/components/STextarea/README.md +4 -4
- package/dist/components/STextarea/STextarea.d.ts +10 -4
- package/dist/components/STimePicker/README.md +16 -2
- package/dist/components/STimePicker/STimePicker.d.ts +11 -5
- package/dist/components/STimePicker/timepicker.config.d.ts +4 -2
- package/dist/components/STimeRangePicker/README.md +28 -2
- package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +11 -5
- package/dist/components/SToast/README.md +25 -1
- package/dist/components/SToast/SToast.d.ts +2 -2
- package/dist/components/SToggle/README.md +8 -0
- package/dist/components/SToggle/index.d.ts +1 -1
- package/dist/components/STooltip/README.md +25 -1
- package/dist/components/STooltip/STooltip.d.ts +1 -1
- package/dist/components/STree/README.md +44 -3
- package/dist/components/STree/STree.d.ts +24 -4
- package/dist/components/STree/index.d.ts +1 -1
- package/dist/docs/Gallery.d.ts +9 -0
- package/dist/docs/gallery-previews.d.ts +24 -0
- package/dist/index.cjs +10890 -5322
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +10852 -5322
- package/dist/index.js.map +1 -1
- package/dist/lib/doc-sections.d.ts +35 -0
- package/dist/lib/field-width.d.ts +31 -0
- package/dist/lib/floating-height.d.ts +15 -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 +3396 -297
- package/dist/llms.txt +675 -97
- package/dist/playground/categories.d.ts +19 -0
- package/dist/styles.css +1731 -166
- package/dist/theme.css +216 -24
- package/eslint/index.mjs +14 -0
- package/eslint/lib/table-column.mjs +26 -0
- package/eslint/rules/divider-vertical-height.mjs +137 -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 +5 -2
- package/package.json +13 -1
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
| `min?` | `number` | `Number.NEGATIVE_INFINITY` | 최솟값 |
|
|
14
14
|
| `max?` | `number` | `Number.POSITIVE_INFINITY` | 최댓값 |
|
|
15
15
|
| `step?` | `number` | `1` | 스텝 단위 |
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
16
|
+
| `showButton?` | `boolean` | `false` | 증감 버튼 표시 |
|
|
17
|
+
| `allowDecimal?` | `boolean` | `false` | 소수점 입력 허용 |
|
|
18
18
|
| `maxDecimalLength?` | `number` | — | 소수점 이하 최대 자리수 |
|
|
19
19
|
| `inputPrefix?` | `string` | `''` | 입력 앞 접두 텍스트 |
|
|
20
20
|
| `inputSuffix?` | `string` | `''` | 입력 뒤 접미 텍스트 |
|
|
21
|
-
| `
|
|
21
|
+
| `inputClassName?` | `string` | — | 네이티브 input className |
|
|
22
22
|
| `inputStyle?` | `CSSProperties` | — | 네이티브 input style |
|
|
23
23
|
| `autoFocus?` | `boolean` | — | 마운트 시 자동 포커스 |
|
|
24
24
|
| `name?` | `string` | — | 폼 연동 name |
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
| `readOnly?` | `boolean` | `false` | |
|
|
28
28
|
| `rules?` | `Rule[]` | — | 유효성 규칙 — blur 시 검증 |
|
|
29
29
|
| `status?` | `SFieldStatus` | — | |
|
|
30
|
-
| `focused?` | `boolean` | — |
|
|
31
|
-
| `hovered?` | `boolean` | — |
|
|
30
|
+
| `focused?` | `boolean` | — | 포커스 상태를 밖에서 지정한다 — 강조 테두리·링이 즉시 걸린다 (SField 로 그대로 넘어간다) |
|
|
31
|
+
| `hovered?` | `boolean` | — | 호버 상태를 밖에서 지정한다 — 강조는 `focused` 와 같다 (SField 로 그대로 넘어간다) |
|
|
32
32
|
| `label?` | `string` | — | |
|
|
33
33
|
| `labelWidth?` | `number \| string` | — | |
|
|
34
34
|
| `icon?` | `SIconName` | — | |
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
| `hint?` | `string` | — | |
|
|
41
41
|
| `error?` | `boolean` | — | |
|
|
42
42
|
| `errorMessage?` | `string` | — | |
|
|
43
|
-
| `width?` | `
|
|
43
|
+
| `width?` | `SFieldWidth` | — | 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이. 등급은 `--cmp-field-width-*` 토큰으로 풀리며 `max`(= 스키마 상한)로 고른다. 상한이 `xl` 을 넘거나 상한이 없으면 `"100%"`. (`sellmate/field-width-grade` 가 검사한다) |
|
|
44
44
|
| `className?` | `string` | — | |
|
|
45
45
|
| `style?` | `CSSProperties` | — | |
|
|
46
46
|
|
|
@@ -52,6 +52,14 @@
|
|
|
52
52
|
| `onFocus` | `(e: React.FocusEvent<HTMLInputElement>) => void` | 포커스 이벤트 (sdFocus) |
|
|
53
53
|
| `onBlur` | `(e: React.FocusEvent<HTMLInputElement>) => void` | 블러 이벤트 (sdBlur) |
|
|
54
54
|
|
|
55
|
+
## Types
|
|
56
|
+
|
|
57
|
+
### SNumberInputSize
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
export type SNumberInputSize = SFieldSize;
|
|
61
|
+
```
|
|
62
|
+
|
|
55
63
|
## Dependencies
|
|
56
64
|
|
|
57
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 SNumberInputSize = SFieldSize;
|
|
8
9
|
export interface SNumberInputProps {
|
|
9
10
|
/** 입력 값 */
|
|
@@ -19,9 +20,9 @@ export interface SNumberInputProps {
|
|
|
19
20
|
/** 스텝 단위 */
|
|
20
21
|
step?: number;
|
|
21
22
|
/** 증감 버튼 표시 */
|
|
22
|
-
|
|
23
|
+
showButton?: boolean;
|
|
23
24
|
/** 소수점 입력 허용 */
|
|
24
|
-
|
|
25
|
+
allowDecimal?: boolean;
|
|
25
26
|
/** 소수점 이하 최대 자리수 */
|
|
26
27
|
maxDecimalLength?: number;
|
|
27
28
|
/** 입력 앞 접두 텍스트 */
|
|
@@ -29,7 +30,7 @@ export interface SNumberInputProps {
|
|
|
29
30
|
/** 입력 뒤 접미 텍스트 */
|
|
30
31
|
inputSuffix?: string;
|
|
31
32
|
/** 네이티브 input className */
|
|
32
|
-
|
|
33
|
+
inputClassName?: string;
|
|
33
34
|
/** 네이티브 input style */
|
|
34
35
|
inputStyle?: CSSProperties;
|
|
35
36
|
/** 마운트 시 자동 포커스 */
|
|
@@ -46,7 +47,9 @@ export interface SNumberInputProps {
|
|
|
46
47
|
/** 유효성 규칙 — blur 시 검증 */
|
|
47
48
|
rules?: Rule[];
|
|
48
49
|
status?: SFieldStatus;
|
|
50
|
+
/** 포커스 상태를 밖에서 지정한다 — 강조 테두리·링이 즉시 걸린다 (SField 로 그대로 넘어간다) */
|
|
49
51
|
focused?: boolean;
|
|
52
|
+
/** 호버 상태를 밖에서 지정한다 — 강조는 `focused` 와 같다 (SField 로 그대로 넘어간다) */
|
|
50
53
|
hovered?: boolean;
|
|
51
54
|
label?: string;
|
|
52
55
|
labelWidth?: number | string;
|
|
@@ -59,7 +62,12 @@ export interface SNumberInputProps {
|
|
|
59
62
|
hint?: string;
|
|
60
63
|
error?: boolean;
|
|
61
64
|
errorMessage?: string;
|
|
62
|
-
|
|
65
|
+
/**
|
|
66
|
+
* 컨트롤 너비 — 폭 등급(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) · 숫자=px · CSS 길이.
|
|
67
|
+
* 등급은 `--cmp-field-width-*` 토큰으로 풀리며 `max`(= 스키마 상한)로 고른다.
|
|
68
|
+
* 상한이 `xl` 을 넘거나 상한이 없으면 `"100%"`. (`sellmate/field-width-grade` 가 검사한다)
|
|
69
|
+
*/
|
|
70
|
+
width?: SFieldWidth;
|
|
63
71
|
className?: string;
|
|
64
72
|
style?: CSSProperties;
|
|
65
73
|
}
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
| Prop | Type | Default | Description |
|
|
10
10
|
|------|------|---------|-------------|
|
|
11
11
|
| `title` | `string` | — | 타이틀 (필수) |
|
|
12
|
-
| `subText?` | `string` | — | 서브 텍스트.
|
|
13
|
-
| `
|
|
12
|
+
| `subText?` | `string` | — | 서브 텍스트. `bar` 면 타이틀 오른쪽에, `plain` 이면 타이틀 아래에 놓인다. |
|
|
13
|
+
| `variant` | `SPageHeaderVariant` | — | 제목 영역의 모양 — **필수다.** - `plain`: 최소 높이(상하 패딩 안에서 타이틀 한 줄 높이로 결정) + 구분선 없음, 서브 텍스트가 타이틀 아래로 내려간다. - `bar`: 높이 고정 + 하단 구분선, 서브 텍스트가 타이틀과 같은 줄. 기본값을 두지 않는 이유는 이 값이 **앱 전체에서 하나로 고정돼야 하는 값**이기 때문이다. 기본값이 있으면 안 준 페이지만 조용히 다른 모양이 되어, 메뉴를 옮길 때 제목 줄의 높이와 구분선이 페이지마다 튄다. 셸을 한 번 감싸 쓰면(§4-1 AppShell) 지정하는 자리도 한 곳이다. 배경은 두 베리에이션 모두 흰 면이다. `SLayout` 의 `header`(`'fix' | 'full'`)와는 다른 축이다 — 그쪽은 상단바가 GNB 컬럼 안에 있는지 화면 전폭인지를 정한다. |
|
|
14
14
|
| `slot?` | `ReactNode` | — | 오른쪽 끝 커스텀 슬롯. 가이드 링크·액션 버튼 등 페이지마다 다른 것이 온다. |
|
|
15
|
-
| `scrolled?` | `boolean` |
|
|
15
|
+
| `scrolled?` | `boolean` | — | 아래 콘텐츠가 스크롤을 시작했는지. `plain` 일 때만 의미가 있다: 스크롤이 시작되면 그림자(floating)가 들어가 스크롤되는 콘텐츠 위에 뜬 것처럼 보인다. 배경은 흰 면 그대로다 — scrolled 가 더하는 것은 그림자뿐이다. `SLayout` 안에 놓았으면 **주지 않는다** — 같은 열의 `SPage` 가 자기 스크롤 상태를 올려 자동으로 들어온다. 스크롤 컨테이너를 앱이 직접 쥔 단독 배치에서만 `onScroll` 에서 준다. |
|
|
16
16
|
|
|
17
17
|
#### Events
|
|
18
18
|
|
|
@@ -27,12 +27,93 @@
|
|
|
27
27
|
| Prop | Type | Default | Description |
|
|
28
28
|
|------|------|---------|-------------|
|
|
29
29
|
| `background?` | `SPageBackground` | `'frame'` | 페이지 배경 표면. frame=흰 콘텐츠 면, neutral=옅은 회색 면, screen=앱 바탕. 스크롤바 처리도 여기 묶여 있다 — 셋 다 구분선+트랙 배경이고, 트랙 색만 neutral 에서 흰색이 된다. |
|
|
30
|
-
| `scrollEndSpacing?` | `boolean` | `
|
|
30
|
+
| `scrollEndSpacing?` | `boolean` | `false` | 스크롤 끝 여백. 마지막 항목이 창 하단에 붙어 "여기서 끝"이 안 읽히는 것을 막는다. **기본은 꺼져 있다.** 페이지 스크롤 자체가 예외이기 때문이다 — 대부분의 화면은 본문이 창을 꽉 채우고 스크롤은 각 영역 안에서 일어난다. 여백을 조건 없이 붙이면 내용이 화면에 거의 딱 맞는 페이지까지 그 여백 때문에 스크롤되게 만든다. 페이지가 실제로 스크롤되는 화면(`contentHeight="auto"` + 내용이 창보다 김)에서만 켠다. 페이지네이션처럼 끝을 알려주는 것이 이미 있으면 켜지 않는다. |
|
|
31
|
+
| `overlayScrollbar?` | `boolean` | `false` | true면 네이티브 스크롤바를 숨기고 SPage 위에 오버레이 스크롤바를 얹는다. 스크롤바가 레이아웃 폭을 차지하지 않아 내부 콘텐츠 폭이 줄어들지 않는다. |
|
|
31
32
|
| `contentHeight?` | `SPageContentHeight` | `'auto'` | 본문 높이 모드. 기본은 `auto` — 콘텐츠가 흐르고 넘치면 페이지가 스크롤한다. `fill` 은 본문이 남은 높이를 정확히 채우고 페이지는 스크롤하지 않는다. 표가 자기 안에서 스크롤하고 페이지네이션이 하단에 고정되는 목록 화면용이다. 본문 루트에 `h-full` 이 먹으므로 `<div className="flex h-full min-h-0 flex-col">` + `<STable className="min-h-0 flex-1" />` 구성이 성립한다. `fill` 에서는 페이지가 스크롤하지 않으므로 `scrollEndSpacing` 이 무시된다. |
|
|
32
|
-
| `
|
|
33
|
+
| `contentWidth?` | `SPageContentWidth` | `'full'` | 본문 가로 폭 모드. 기본은 `full` — 창이 넓어지면 본문도 같이 넓어진다(반응형). `fixed`·`fixedCenter` 는 본문을 **레이아웃 최소 폭일 때의 폭**으로 고정한다. 최소 폭 기준으로 그린 시안이 넓은 모니터에서 늘어나 성기어지는 것을 막는 모드다. 남는 폭은 `fixed` 면 오른쪽에, `fixedCenter` 면 좌우로 나뉘어 페이지 배경으로 남는다. 고정 폭은 GNB 폭·접힘을 반영해 저절로 따라오므로 앱이 숫자를 쓸 일은 없다. 창이 최소 폭보다 좁아지면 세 모드가 모두 같다 — 남는 폭이 없어 규칙이 꺼지고, 모자란 몫을 지금까지처럼 이 영역이 가로 스크롤로 삼킨다. 같은 열에 `SPageHeader` 가 있으면 헤더도 같은 폭·정렬을 따른다(제목과 본문의 좌우 끝이 맞는다). `SLayout` 밖에서는 기준이 될 최소 폭이 없으므로 무시된다. |
|
|
34
|
+
|
|
35
|
+
## Types
|
|
36
|
+
|
|
37
|
+
### SPageHeaderVariant
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
export type SPageHeaderVariant = (typeof PAGE_HEADER_VARIANTS)[number];
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### SPageBackground
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
export type SPageBackground = (typeof PAGE_BACKGROUNDS)[number];
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### SPageContentHeight
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
export type SPageContentHeight = (typeof PAGE_CONTENT_HEIGHTS)[number];
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### SPageContentWidth
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
export type SPageContentWidth = (typeof PAGE_CONTENT_WIDTHS)[number];
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### PAGE_HEADER_VARIANTS
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
/**
|
|
65
|
+
* 페이지 제목 영역의 모양 — 문서와 디자인이 부르는 이름을 그대로 쓴다.
|
|
66
|
+
* 기본값은 없다. 앱 전체에서 하나로 고정할 값이라 `SPageHeader` 가 매번 지정하게 한다.
|
|
67
|
+
* - plain: 최소 높이(상하 패딩 안에서 타이틀 한 줄), 구분선 없음, 서브 텍스트가 타이틀 아래
|
|
68
|
+
* - bar: 높이 고정 + 하단 구분선, 서브 텍스트가 타이틀과 같은 줄
|
|
69
|
+
*/
|
|
70
|
+
export const PAGE_HEADER_VARIANTS = ['plain', 'bar'] as const;
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### PAGE_BACKGROUNDS
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
/**
|
|
77
|
+
* 페이지 배경 — 표면의 역할로 이름을 붙인다(리터럴 색이 아니다).
|
|
78
|
+
* - frame: 콘텐츠를 얹는 흰 표면 (sys.color.bg.frame)
|
|
79
|
+
* - neutral: 한 단계 눌러앉은 회색 표면 (sys.color.bg.neutralLight)
|
|
80
|
+
* - screen: 카드·패널이 떠 있는 앱 바탕 (sys.color.bg.screen)
|
|
81
|
+
*/
|
|
82
|
+
export const PAGE_BACKGROUNDS = ['frame', 'neutral', 'screen'] as const;
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### PAGE_CONTENT_HEIGHTS
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
/**
|
|
89
|
+
* 본문 높이 모드 — 페이지가 스크롤할지, 본문이 남은 높이를 채울지.
|
|
90
|
+
* - auto: 콘텐츠가 흐르고, 넘치면 페이지가 스크롤한다
|
|
91
|
+
* - fill: 본문이 남은 높이를 정확히 채우고 페이지는 스크롤하지 않는다.
|
|
92
|
+
* 표가 자기 안에서 스크롤하고 페이지네이션이 하단에 고정되는 목록 화면용.
|
|
93
|
+
*/
|
|
94
|
+
export const PAGE_CONTENT_HEIGHTS = ['auto', 'fill'] as const;
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### PAGE_CONTENT_WIDTHS
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
/**
|
|
101
|
+
* 본문 가로 폭 모드 — 창이 레이아웃 최소 폭보다 **넓을 때** 본문이 어떻게 설지.
|
|
102
|
+
* - full: 남는 폭을 본문이 다 쓴다 (반응형)
|
|
103
|
+
* - fixed: 창이 최소 폭일 때의 본문 폭 그대로 고정하고 왼쪽에 붙인다
|
|
104
|
+
* - fixedCenter: 같은 폭으로 고정하고 가운데 놓는다
|
|
105
|
+
*
|
|
106
|
+
* 창이 최소 폭보다 좁아지면 세 모드가 모두 같다 — 모자란 몫은 SPage 가 가로 스크롤로 삼킨다.
|
|
107
|
+
*/
|
|
108
|
+
export const PAGE_CONTENT_WIDTHS = ['full', 'fixed', 'fixedCenter'] as const;
|
|
109
|
+
```
|
|
33
110
|
|
|
34
111
|
## Dependencies
|
|
35
112
|
|
|
113
|
+
### Used by
|
|
114
|
+
|
|
115
|
+
- [SLayout](../SLayout)
|
|
116
|
+
|
|
36
117
|
### Depends on
|
|
37
118
|
|
|
38
119
|
- [SGhostButton](../SGhostButton)
|
|
@@ -44,5 +125,6 @@
|
|
|
44
125
|
graph TD;
|
|
45
126
|
SPage --> SGhostButton
|
|
46
127
|
SPage --> SLayout
|
|
128
|
+
SLayout --> SPage
|
|
47
129
|
style SPage fill:#f9f,stroke:#333,stroke-width:4px
|
|
48
130
|
```
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'react';
|
|
2
|
-
import type { SPageBackground, SPageContentHeight } from './page.config';
|
|
3
|
-
import { type SPageHeaderProps } from './SPageHeader';
|
|
2
|
+
import type { SPageBackground, SPageContentHeight, SPageContentWidth } from './page.config';
|
|
4
3
|
export interface SPageProps extends HTMLAttributes<HTMLElement> {
|
|
5
4
|
/**
|
|
6
5
|
* 페이지 배경 표면. frame=흰 콘텐츠 면, neutral=옅은 회색 면, screen=앱 바탕.
|
|
@@ -9,9 +8,20 @@ export interface SPageProps extends HTMLAttributes<HTMLElement> {
|
|
|
9
8
|
background?: SPageBackground;
|
|
10
9
|
/**
|
|
11
10
|
* 스크롤 끝 여백. 마지막 항목이 창 하단에 붙어 "여기서 끝"이 안 읽히는 것을 막는다.
|
|
12
|
-
*
|
|
11
|
+
*
|
|
12
|
+
* **기본은 꺼져 있다.** 페이지 스크롤 자체가 예외이기 때문이다 — 대부분의 화면은 본문이
|
|
13
|
+
* 창을 꽉 채우고 스크롤은 각 영역 안에서 일어난다. 여백을 조건 없이 붙이면 내용이 화면에
|
|
14
|
+
* 거의 딱 맞는 페이지까지 그 여백 때문에 스크롤되게 만든다.
|
|
15
|
+
*
|
|
16
|
+
* 페이지가 실제로 스크롤되는 화면(`contentHeight="auto"` + 내용이 창보다 김)에서만 켠다.
|
|
17
|
+
* 페이지네이션처럼 끝을 알려주는 것이 이미 있으면 켜지 않는다.
|
|
13
18
|
*/
|
|
14
19
|
scrollEndSpacing?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* true면 네이티브 스크롤바를 숨기고 SPage 위에 오버레이 스크롤바를 얹는다.
|
|
22
|
+
* 스크롤바가 레이아웃 폭을 차지하지 않아 내부 콘텐츠 폭이 줄어들지 않는다.
|
|
23
|
+
*/
|
|
24
|
+
overlayScrollbar?: boolean;
|
|
15
25
|
/**
|
|
16
26
|
* 본문 높이 모드. 기본은 `auto` — 콘텐츠가 흐르고 넘치면 페이지가 스크롤한다.
|
|
17
27
|
*
|
|
@@ -24,10 +34,20 @@ export interface SPageProps extends HTMLAttributes<HTMLElement> {
|
|
|
24
34
|
*/
|
|
25
35
|
contentHeight?: SPageContentHeight;
|
|
26
36
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
37
|
+
* 본문 가로 폭 모드. 기본은 `full` — 창이 넓어지면 본문도 같이 넓어진다(반응형).
|
|
38
|
+
*
|
|
39
|
+
* `fixed`·`fixedCenter` 는 본문을 **레이아웃 최소 폭일 때의 폭**으로 고정한다. 최소 폭 기준으로
|
|
40
|
+
* 그린 시안이 넓은 모니터에서 늘어나 성기어지는 것을 막는 모드다. 남는 폭은 `fixed` 면 오른쪽에,
|
|
41
|
+
* `fixedCenter` 면 좌우로 나뉘어 페이지 배경으로 남는다. 고정 폭은 GNB 폭·접힘을 반영해
|
|
42
|
+
* 저절로 따라오므로 앱이 숫자를 쓸 일은 없다.
|
|
43
|
+
*
|
|
44
|
+
* 창이 최소 폭보다 좁아지면 세 모드가 모두 같다 — 남는 폭이 없어 규칙이 꺼지고, 모자란 몫을
|
|
45
|
+
* 지금까지처럼 이 영역이 가로 스크롤로 삼킨다.
|
|
46
|
+
*
|
|
47
|
+
* 같은 열에 `SPageHeader` 가 있으면 헤더도 같은 폭·정렬을 따른다(제목과 본문의 좌우 끝이 맞는다).
|
|
48
|
+
* `SLayout` 밖에서는 기준이 될 최소 폭이 없으므로 무시된다.
|
|
29
49
|
*/
|
|
30
|
-
|
|
50
|
+
contentWidth?: SPageContentWidth;
|
|
31
51
|
}
|
|
32
52
|
/**
|
|
33
53
|
* SPage — SLayout 안에서 남은 공간을 채우는 스크롤 콘텐츠 영역.
|
|
@@ -39,8 +59,8 @@ export interface SPageProps extends HTMLAttributes<HTMLElement> {
|
|
|
39
59
|
* - header="full": SLayout 이 깐 grid 의 "page" 영역 = 상단바 아래·메뉴 오른쪽 자리를 차지한다.
|
|
40
60
|
* 좌표가 아니라 이름으로 잡으므로 프레임의 열·행 구성이 바뀌어도 여기는 그대로다.
|
|
41
61
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
62
|
+
* **페이지 제목은 `SLayout` 안에서 앞에 놓은 `SPageHeader` 가 만든다.** 그때 SLayout 이 헤더와
|
|
63
|
+
* 이 페이지를 한 열로 묶으므로(page-column.tsx) 여기서는 자리를 잡지 않고, 대신 자기 스크롤
|
|
64
|
+
* 상태를 그 열에 올린다 — 헤더가 그 값으로 floating 그림자를 켠다.
|
|
45
65
|
*/
|
|
46
66
|
export declare const SPage: import("react").ForwardRefExoticComponent<SPageProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,32 +1,50 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import type { SPageHeaderVariant } from './page.config';
|
|
2
3
|
export interface SPageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'slot' | 'title'> {
|
|
3
4
|
/** 타이틀 (필수) */
|
|
4
5
|
title: string;
|
|
5
|
-
/** 서브 텍스트.
|
|
6
|
+
/** 서브 텍스트. `bar` 면 타이틀 오른쪽에, `plain` 이면 타이틀 아래에 놓인다. */
|
|
6
7
|
subText?: string;
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* 제목 영역의 모양 — **필수다.**
|
|
10
|
+
*
|
|
11
|
+
* - `plain`: 최소 높이(상하 패딩 안에서 타이틀 한 줄 높이로 결정) + 구분선 없음,
|
|
12
|
+
* 서브 텍스트가 타이틀 아래로 내려간다.
|
|
13
|
+
* - `bar`: 높이 고정 + 하단 구분선, 서브 텍스트가 타이틀과 같은 줄.
|
|
14
|
+
*
|
|
15
|
+
* 기본값을 두지 않는 이유는 이 값이 **앱 전체에서 하나로 고정돼야 하는 값**이기 때문이다.
|
|
16
|
+
* 기본값이 있으면 안 준 페이지만 조용히 다른 모양이 되어, 메뉴를 옮길 때 제목 줄의 높이와
|
|
17
|
+
* 구분선이 페이지마다 튄다. 셸을 한 번 감싸 쓰면(§4-1 AppShell) 지정하는 자리도 한 곳이다.
|
|
18
|
+
*
|
|
19
|
+
* 배경은 두 베리에이션 모두 흰 면이다. `SLayout` 의 `header`(`'fix' | 'full'`)와는 다른 축이다 —
|
|
20
|
+
* 그쪽은 상단바가 GNB 컬럼 안에 있는지 화면 전폭인지를 정한다.
|
|
11
21
|
*/
|
|
12
|
-
|
|
22
|
+
variant: SPageHeaderVariant;
|
|
13
23
|
/** 뒤로가기 클릭 핸들러. 지정하면 왼쪽에 뒤로가기 버튼이 나타난다. */
|
|
14
24
|
onBack?: () => void;
|
|
15
25
|
/** 오른쪽 끝 커스텀 슬롯. 가이드 링크·액션 버튼 등 페이지마다 다른 것이 온다. */
|
|
16
26
|
slot?: ReactNode;
|
|
17
27
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
28
|
+
* 아래 콘텐츠가 스크롤을 시작했는지. `plain` 일 때만 의미가 있다: 스크롤이 시작되면
|
|
29
|
+
* 그림자(floating)가 들어가 스크롤되는 콘텐츠 위에 뜬 것처럼 보인다. 배경은 흰 면 그대로다 —
|
|
30
|
+
* scrolled 가 더하는 것은 그림자뿐이다.
|
|
31
|
+
*
|
|
32
|
+
* `SLayout` 안에 놓았으면 **주지 않는다** — 같은 열의 `SPage` 가 자기 스크롤 상태를 올려
|
|
33
|
+
* 자동으로 들어온다. 스크롤 컨테이너를 앱이 직접 쥔 단독 배치에서만 `onScroll` 에서 준다.
|
|
23
34
|
*/
|
|
24
35
|
scrolled?: boolean;
|
|
25
36
|
}
|
|
26
37
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* fix 로 bar(높이 고정·흰 배경) / plain(투명·최소 높이) 두 베리에이션을 고른다.
|
|
38
|
+
* 페이지 타이틀 영역(pageHeader 포팅).
|
|
39
|
+
* `variant` 로 bar(높이 고정·하단 구분선) / plain(최소 높이) 두 베리에이션을 고른다 — 배경은 둘 다 흰 면이다.
|
|
30
40
|
* 뒤로가기 버튼은 onBack 유무로 나타나며, 없을 때는 타이틀 쪽에 4px 여백이 대신 들어간다.
|
|
41
|
+
*
|
|
42
|
+
* **셸 안에서는 `SLayout` 의 자식으로 `SGnb` 와 `SPage` 사이에 놓는다.** SLayout 이 이 헤더부터
|
|
43
|
+
* 뒤를 하나의 페이지 열로 묶어(page-column.tsx) 스크롤·페이지 패딩 밖 상단에 고정하고,
|
|
44
|
+
* plain 일 때 `SPage` 가 올린 스크롤 상태를 열이 대신 물려준다. 같은 경로로 `SPage` 의
|
|
45
|
+
* `contentWidth` 도 물려받아, 본문이 고정 폭이면 제목 줄도 같은 폭·정렬로 선다(면은 늘 전폭이다).
|
|
46
|
+
*
|
|
47
|
+
* 셸 밖에 직접 놓을 수도 있다 — 스크롤 컨테이너를 앱이 쥐고 있는 단독 화면이다. 그때는 그림자만
|
|
48
|
+
* 앱 몫이 된다: 스크롤 컨테이너의 `onScroll` 에서 `scrolled` 를 넣어야 뜬다.
|
|
31
49
|
*/
|
|
32
50
|
export declare const SPageHeader: import("react").ForwardRefExoticComponent<SPageHeaderProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { SPage, type SPageProps } from './SPage';
|
|
2
|
-
export { PAGE_BACKGROUNDS, type SPageBackground, PAGE_CONTENT_HEIGHTS, type SPageContentHeight, } from './page.config';
|
|
3
|
-
export { type SPageHeaderProps } from './SPageHeader';
|
|
2
|
+
export { PAGE_BACKGROUNDS, type SPageBackground, PAGE_CONTENT_HEIGHTS, type SPageContentHeight, PAGE_CONTENT_WIDTHS, type SPageContentWidth, PAGE_HEADER_VARIANTS, type SPageHeaderVariant, } from './page.config';
|
|
3
|
+
export { SPageHeader, type SPageHeaderProps } from './SPageHeader';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { SPageContentWidth } from './page.config';
|
|
3
|
+
/**
|
|
4
|
+
* 페이지 열이 `SPageHeader` 와 `SPage` 사이에서 중개하는 것.
|
|
5
|
+
*
|
|
6
|
+
* 둘은 형제라 서로를 볼 수 없는데, 헤더의 그림자는 페이지의 스크롤에서, 헤더의 가로 정렬은
|
|
7
|
+
* 페이지의 폭 모드에서 나온다. 열이 그 사이에 서서 값을 옮긴다 —
|
|
8
|
+
* 아래(SPage)가 올리고 위(SPageHeader)가 읽는다.
|
|
9
|
+
*/
|
|
10
|
+
export interface SPageColumnValue {
|
|
11
|
+
/** 페이지가 스크롤을 시작했는지. `SPage` 가 올리고 `SPageHeader` 가 그림자로 쓴다. */
|
|
12
|
+
scrolled: boolean;
|
|
13
|
+
/** `SPage` 가 자기 스크롤 상태를 올린다. */
|
|
14
|
+
setScrolled: (scrolled: boolean) => void;
|
|
15
|
+
/**
|
|
16
|
+
* 페이지 본문의 가로 폭 모드. `SPage` 가 올리고 `SPageHeader` 가 자기 내용물을 같은 폭·정렬로 맞춘다.
|
|
17
|
+
* 헤더는 페이지 위에 서는 같은 열의 일부라, 본문만 가운데로 가면 제목과 본문 좌우 끝이 어긋난다.
|
|
18
|
+
*/
|
|
19
|
+
contentWidth: SPageContentWidth;
|
|
20
|
+
/** `SPage` 가 자기 폭 모드를 올린다. */
|
|
21
|
+
setContentWidth: (contentWidth: SPageContentWidth) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const SPageColumnContext: import("react").Context<SPageColumnValue | null>;
|
|
24
|
+
/**
|
|
25
|
+
* 페이지 열 — `SLayout` 이 `SPageHeader` 자식을 보면 그 자식부터 뒤를 이 열로 묶는다.
|
|
26
|
+
* 헤더는 위에 고정되고(자기 shrink-0) 그 아래 `SPage` 가 남은 높이를 먹는다.
|
|
27
|
+
*
|
|
28
|
+
* 자리(그리드 area)는 프레임이 정한다. 열 자체는 배경을 칠하지 않는다 — 헤더도 `SPage` 도
|
|
29
|
+
* 자기 면을 스스로 칠하므로 열의 배경은 어디에서도 드러나지 않는다.
|
|
30
|
+
*/
|
|
31
|
+
export declare function SPageColumn({ full, children }: {
|
|
32
|
+
full: boolean;
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { SPageContentWidth } from './page.config';
|
|
3
|
+
/**
|
|
4
|
+
* 콘텐츠 상자의 최소 폭 — SLayout 이 보장하는 레이아웃 최소 폭을 이 상자가 대신 삼킨다.
|
|
5
|
+
*
|
|
6
|
+
* `100cqw` 는 SLayout 프레임의 폭, `100%` 는 이 상자를 담은 영역의 콘텐츠 폭이다.
|
|
7
|
+
* "프레임이 최소 폭보다 좁은 만큼" 콘텐츠를 넓히므로, GNB 폭·접힘·header 구성이 어떻든
|
|
8
|
+
* [GNB + 스크롤 끝까지 민 페이지] 합이 정확히 최소 폭이 된다. 패딩을 덮어써도 100% 가 따라온다.
|
|
9
|
+
*
|
|
10
|
+
* SLayout 밖이면 변수가 없어(폴백 0) 값이 음수가 되고, 음수 min-width 는 0 으로 클램프돼 규칙이 꺼진다.
|
|
11
|
+
*/
|
|
12
|
+
export declare const MIN_CONTENT_WIDTH = "calc(var(--s-layout-min-width, 0px) - 100cqw + 100%)";
|
|
13
|
+
/**
|
|
14
|
+
* 고정 폭 모드가 남는 폭을 어디로 미는지 — 폭을 직접 주지 않고 여백으로 민다.
|
|
15
|
+
* 그래서 남는 폭이 0 인 구간(창이 최소 폭 이하)에서는 아무 일도 하지 않고,
|
|
16
|
+
* 넓어진 만큼만 상자가 "최소 폭일 때의 폭"으로 되돌아간다.
|
|
17
|
+
*
|
|
18
|
+
* `full` 은 아무것도 하지 않는다 — 남는 폭을 본문이 그대로 쓴다.
|
|
19
|
+
*
|
|
20
|
+
* **SLayout 밖에서는 호출하지 않는다.** 최소 폭 변수가 없으면 남는 폭이 프레임 폭 전체가 되어
|
|
21
|
+
* 본문이 사라진다. 호출하는 쪽이 SLayout 안임을 확인하고 부른다.
|
|
22
|
+
*/
|
|
23
|
+
export declare const contentWidthStyle: (mode: SPageContentWidth) => CSSProperties | undefined;
|
|
@@ -14,3 +14,21 @@ export type SPageBackground = (typeof PAGE_BACKGROUNDS)[number];
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const PAGE_CONTENT_HEIGHTS: readonly ["auto", "fill"];
|
|
16
16
|
export type SPageContentHeight = (typeof PAGE_CONTENT_HEIGHTS)[number];
|
|
17
|
+
/**
|
|
18
|
+
* 본문 가로 폭 모드 — 창이 레이아웃 최소 폭보다 **넓을 때** 본문이 어떻게 설지.
|
|
19
|
+
* - full: 남는 폭을 본문이 다 쓴다 (반응형)
|
|
20
|
+
* - fixed: 창이 최소 폭일 때의 본문 폭 그대로 고정하고 왼쪽에 붙인다
|
|
21
|
+
* - fixedCenter: 같은 폭으로 고정하고 가운데 놓는다
|
|
22
|
+
*
|
|
23
|
+
* 창이 최소 폭보다 좁아지면 세 모드가 모두 같다 — 모자란 몫은 SPage 가 가로 스크롤로 삼킨다.
|
|
24
|
+
*/
|
|
25
|
+
export declare const PAGE_CONTENT_WIDTHS: readonly ["full", "fixed", "fixedCenter"];
|
|
26
|
+
export type SPageContentWidth = (typeof PAGE_CONTENT_WIDTHS)[number];
|
|
27
|
+
/**
|
|
28
|
+
* 페이지 제목 영역의 모양 — 문서와 디자인이 부르는 이름을 그대로 쓴다.
|
|
29
|
+
* 기본값은 없다. 앱 전체에서 하나로 고정할 값이라 `SPageHeader` 가 매번 지정하게 한다.
|
|
30
|
+
* - plain: 최소 높이(상하 패딩 안에서 타이틀 한 줄), 구분선 없음, 서브 텍스트가 타이틀 아래
|
|
31
|
+
* - bar: 높이 고정 + 하단 구분선, 서브 텍스트가 타이틀과 같은 줄
|
|
32
|
+
*/
|
|
33
|
+
export declare const PAGE_HEADER_VARIANTS: readonly ["plain", "bar"];
|
|
34
|
+
export type SPageHeaderVariant = (typeof PAGE_HEADER_VARIANTS)[number];
|
|
@@ -33,6 +33,21 @@
|
|
|
33
33
|
| `onLeftLinkClick` | `() => void` | 하단 좌측 링크 클릭 |
|
|
34
34
|
| `onButtonClick` | `() => void` | 하단 우측 버튼 클릭 |
|
|
35
35
|
|
|
36
|
+
## Types
|
|
37
|
+
|
|
38
|
+
### SPopoverPlacement
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
export type SPopoverPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### SPopoverType
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
/** 색상 타입 — default: 다크 배경 / danger·warning·accent: 라이트 배경 (component.popover 토큰) */
|
|
48
|
+
export type SPopoverType = 'default' | 'danger' | 'warning' | 'accent';
|
|
49
|
+
```
|
|
50
|
+
|
|
36
51
|
## Dependencies
|
|
37
52
|
|
|
38
53
|
### Depends on
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
|------|------|---------|-------------|
|
|
11
11
|
| `popupTitle?` | `string` | `''` | 헤더 제목 |
|
|
12
12
|
| `type?` | `SPopupType` | `'default'` | 타입 (헤더 색상) |
|
|
13
|
-
| `
|
|
13
|
+
| `showFooter?` | `boolean` | `false` | 하단 footer 표시 여부 |
|
|
14
14
|
| `submitButton?` | `SPopupSubmitButton` | — | 확인 버튼 설정 |
|
|
15
15
|
| `footerLeft?` | `ReactNode` | — | footer 좌측 영역 |
|
|
16
|
-
| `
|
|
16
|
+
| `padding?` | `SPopupBodyPadding` | `'default'` | 본문 안쪽 여백. 기본은 `default` — 표를 가장자리까지 채우는 등 본문이 여백을 직접 다룰 때만 `none`. (`SList` 의 `padding` 과 같은 이름이지만 기본값이 반대다 — 각 면의 성격이 다르다) |
|
|
17
17
|
| `children?` | `ReactNode` | — | 본문 |
|
|
18
18
|
| `className?` | `string` | — | |
|
|
19
19
|
| `style?` | `CSSProperties` | — | |
|
|
@@ -24,6 +24,31 @@
|
|
|
24
24
|
|-------|------|-------------|
|
|
25
25
|
| `onSubmit` | `() => void` | 확인 버튼 클릭 (sdSubmit) |
|
|
26
26
|
|
|
27
|
+
## Types
|
|
28
|
+
|
|
29
|
+
### SPopupType
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
export type SPopupType = 'default' | 'light';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### SPopupSubmitButton
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
export interface SPopupSubmitButton {
|
|
39
|
+
label?: string;
|
|
40
|
+
color?: SButtonColor;
|
|
41
|
+
outline?: boolean;
|
|
42
|
+
size?: SButtonSize;
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### SPopupBodyPadding
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
export type SPopupBodyPadding = 'default' | 'none';
|
|
50
|
+
```
|
|
51
|
+
|
|
27
52
|
## Dependencies
|
|
28
53
|
|
|
29
54
|
### Depends on
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ReactNode, type CSSProperties } from 'react';
|
|
2
2
|
import { type SButtonColor, type SButtonSize } from '../SButton';
|
|
3
3
|
export type SPopupType = 'default' | 'light';
|
|
4
|
+
export type SPopupBodyPadding = 'default' | 'none';
|
|
4
5
|
export interface SPopupSubmitButton {
|
|
5
6
|
label?: string;
|
|
6
7
|
color?: SButtonColor;
|
|
@@ -13,15 +14,18 @@ export interface SPopupProps {
|
|
|
13
14
|
/** 타입 (헤더 색상) */
|
|
14
15
|
type?: SPopupType;
|
|
15
16
|
/** 하단 footer 표시 여부 */
|
|
16
|
-
|
|
17
|
+
showFooter?: boolean;
|
|
17
18
|
/** 확인 버튼 설정 */
|
|
18
19
|
submitButton?: SPopupSubmitButton;
|
|
19
20
|
/** 확인 버튼 클릭 (sdSubmit) */
|
|
20
21
|
onSubmit?: () => void;
|
|
21
22
|
/** footer 좌측 영역 */
|
|
22
23
|
footerLeft?: ReactNode;
|
|
23
|
-
/**
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* 본문 안쪽 여백. 기본은 `default` — 표를 가장자리까지 채우는 등 본문이 여백을 직접
|
|
26
|
+
* 다룰 때만 `none`. (`SList` 의 `padding` 과 같은 이름이지만 기본값이 반대다 — 각 면의 성격이 다르다)
|
|
27
|
+
*/
|
|
28
|
+
padding?: SPopupBodyPadding;
|
|
25
29
|
/** 본문 */
|
|
26
30
|
children?: ReactNode;
|
|
27
31
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SPopup, type SPopupProps, type SPopupType, type SPopupSubmitButton } from './SPopup';
|
|
1
|
+
export { SPopup, type SPopupBodyPadding, type SPopupProps, type SPopupType, type SPopupSubmitButton, } from './SPopup';
|
|
@@ -34,18 +34,36 @@
|
|
|
34
34
|
| `onCloseAutoFocus` | `(event: Event) => void` | 닫힐 때 포커스 복귀 처리 (기본은 Radix가 앵커로 포커스를 되돌림). e.preventDefault()로 막을 수 있다. |
|
|
35
35
|
| `onPointerDownOutside` | `(event: Event) => void` | 바깥 영역 pointerdown 으로 닫힘이 시작될 때 (앵커 위 클릭·persistent 는 제외). |
|
|
36
36
|
|
|
37
|
+
## Types
|
|
38
|
+
|
|
39
|
+
### SPortalPlacement
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
export type SPortalPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### SPortalAlign
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
export type SPortalAlign = 'start' | 'center' | 'end';
|
|
49
|
+
```
|
|
50
|
+
|
|
37
51
|
## Dependencies
|
|
38
52
|
|
|
39
53
|
### Used by
|
|
40
54
|
|
|
55
|
+
- [SAccountListBox](../SAccountListBox)
|
|
41
56
|
- [SChipInput](../SChipInput)
|
|
57
|
+
- [SGnbSystem](../SGnbSystem)
|
|
42
58
|
- [SSelect](../SSelect)
|
|
43
59
|
|
|
44
60
|
### Graph
|
|
45
61
|
|
|
46
62
|
```mermaid
|
|
47
63
|
graph TD;
|
|
64
|
+
SAccountListBox --> SPortal
|
|
48
65
|
SChipInput --> SPortal
|
|
66
|
+
SGnbSystem --> SPortal
|
|
49
67
|
SSelect --> SPortal
|
|
50
68
|
style SPortal fill:#f9f,stroke:#333,stroke-width:4px
|
|
51
69
|
```
|
|
@@ -42,6 +42,26 @@
|
|
|
42
42
|
|-------|------|-------------|
|
|
43
43
|
| `onValueChange` | `(val: SRadioValue) => void` | 선택 변경 (sdUpdate) — 선택된 val 전달 |
|
|
44
44
|
|
|
45
|
+
## Types
|
|
46
|
+
|
|
47
|
+
### SRadioOption
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
export interface SRadioOption {
|
|
51
|
+
/** 옵션 값 (sd-radio-group SRadioOption.value) */
|
|
52
|
+
value: SRadioValue;
|
|
53
|
+
label: string;
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### SRadioValue
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
/** 라디오 값 타입 (sd-radio SRadioValue) */
|
|
62
|
+
export type SRadioValue = string | number | boolean;
|
|
63
|
+
```
|
|
64
|
+
|
|
45
65
|
## Dependencies
|
|
46
66
|
|
|
47
67
|
### Used by
|
|
@@ -22,6 +22,24 @@
|
|
|
22
22
|
|-------|------|-------------|
|
|
23
23
|
| `onValueChange` | `(value: string \| number) => void` | 변경 (sdUpdate) |
|
|
24
24
|
|
|
25
|
+
## Types
|
|
26
|
+
|
|
27
|
+
### SRadioButtonOption
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
export interface SRadioButtonOption {
|
|
31
|
+
value: string | number;
|
|
32
|
+
label: string;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### SRadioButtonSize
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
export type SRadioButtonSize = 'xs' | 'sm' | 'md';
|
|
41
|
+
```
|
|
42
|
+
|
|
25
43
|
## Dependencies
|
|
26
44
|
|
|
27
45
|
### Used by
|