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
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
| `value?` | `boolean` | `false` | on/off ์ํ |
|
|
12
12
|
| `leftLabel?` | `string` | โ | ์ค์์น ์ข์ธก ๋ผ๋ฒจ |
|
|
13
13
|
| `rightLabel?` | `string` | โ | ์ค์์น ์ฐ์ธก ๋ผ๋ฒจ |
|
|
14
|
-
| `label?` | `string` | โ | |
|
|
15
14
|
| `disabled?` | `boolean` | `false` | ๋นํ์ฑ |
|
|
16
15
|
| `className?` | `string` | โ | |
|
|
17
16
|
| `style?` | `CSSProperties` | โ | |
|
|
@@ -22,3 +21,16 @@
|
|
|
22
21
|
|-------|------|-------------|
|
|
23
22
|
| `onValueChange` | `(value: boolean) => void` | ๋ณ๊ฒฝ (sdUpdate) |
|
|
24
23
|
|
|
24
|
+
## Dependencies
|
|
25
|
+
|
|
26
|
+
### Used by
|
|
27
|
+
|
|
28
|
+
- [SKeyValueTable](../SKeyValueTable)
|
|
29
|
+
|
|
30
|
+
### Graph
|
|
31
|
+
|
|
32
|
+
```mermaid
|
|
33
|
+
graph TD;
|
|
34
|
+
SKeyValueTable --> SSwitch
|
|
35
|
+
style SSwitch fill:#f9f,stroke:#333,stroke-width:4px
|
|
36
|
+
```
|
|
@@ -6,8 +6,6 @@ export interface SSwitchProps {
|
|
|
6
6
|
leftLabel?: string;
|
|
7
7
|
/** ์ค์์น ์ฐ์ธก ๋ผ๋ฒจ */
|
|
8
8
|
rightLabel?: string;
|
|
9
|
-
/** @deprecated `rightLabel` ์ฌ์ฉ. ์ฐ์ธก ๋ผ๋ฒจ(ํ์ํธํ) */
|
|
10
|
-
label?: string;
|
|
11
9
|
/** ๋นํ์ฑ */
|
|
12
10
|
disabled?: boolean;
|
|
13
11
|
/** ๋ณ๊ฒฝ (sdUpdate) */
|
|
@@ -16,4 +14,4 @@ export interface SSwitchProps {
|
|
|
16
14
|
style?: CSSProperties;
|
|
17
15
|
}
|
|
18
16
|
/** SSwitch โ sd-switch ํฌํ
(Radix SSwitch). 32ร20 ํธ๋, 16 ๋
ธ๋ธ. ์ข/์ฐ ๋ผ๋ฒจ ์ง์. */
|
|
19
|
-
export declare function SSwitch({ value, leftLabel, rightLabel,
|
|
17
|
+
export declare function SSwitch({ value, leftLabel, rightLabel, disabled, onValueChange, className, style, }: SSwitchProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,221 @@
|
|
|
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` | `SSystemActionButtonAccountOption` | โ | ๋๋ฅด๋ฉด ๋จ๋ ๊ณ์ ๋ฆฌ์คํธ๋ฐ์ค. **ํ์๋ค** โ ๊ณ์ ํ์ ๋ ์ด ํจ๋์ ํธ๋ฆฌ๊ฑฐ์ด๊ณ , ๋๋ฌ๋ ์๋ฌด๊ฒ๋ ๋จ์ง ์๋ ๊ณ์ ํ์ ์๋ค. ์์ด์ฝ์ `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
|
+
### SSystemActionButtonSubSelect
|
|
45
|
+
|
|
46
|
+
#### Props
|
|
47
|
+
|
|
48
|
+
| Prop | Type | Default | Description |
|
|
49
|
+
|------|------|---------|-------------|
|
|
50
|
+
| `type` | `'subSelect'` | โ | ์ฐ์ธก์ ์ง๊ธ ์ ํ๋ ๊ฐ์ด ๋ถ๋ ํ |
|
|
51
|
+
| `label?` | `string` | โ | ๋ผ๋ฒจ ํ
์คํธ |
|
|
52
|
+
| `option` | `SSystemActionButtonSubSelectOption` | โ | ์ ํ ์์ด์ฝ + ์ฐ์ธก ๊ฐ + ๊ณ ๋ฅผ ๋ชฉ๋ก |
|
|
53
|
+
|
|
54
|
+
### SSystemActionButtonSwitch
|
|
55
|
+
|
|
56
|
+
#### Props
|
|
57
|
+
|
|
58
|
+
| Prop | Type | Default | Description |
|
|
59
|
+
|------|------|---------|-------------|
|
|
60
|
+
| `type` | `'switch'` | โ | ์ฐ์ธก์ ๋ณด์กฐ ์กฐ์ ๋ฌธ๊ตฌ๊ฐ ๋ถ๋ ํ |
|
|
61
|
+
| `label?` | `string` | โ | ๋ผ๋ฒจ ํ
์คํธ |
|
|
62
|
+
| `option` | `SSystemActionButtonTextOption` | โ | ์ ํ ์์ด์ฝ + ์ฐ์ธก ์ก์
ํ
์คํธ |
|
|
63
|
+
|
|
64
|
+
## Types
|
|
65
|
+
|
|
66
|
+
### SSystemActionButtonAccountOption
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
/**
|
|
70
|
+
* `account` ํ์
์ option โ ํ์ ๋๋ ์ ๋ ๋จ๋ ๊ณ์ ๋ฆฌ์คํธ๋ฐ์ค.
|
|
71
|
+
* ๋ด์ฉ(์ด๋ฉ์ผยท์ด๋ฆยท๊ถํยทํ๋ค)์ `SAccountListBox` ์ ๊ฐ๋ค.
|
|
72
|
+
*
|
|
73
|
+
* **๋จ๋ ์๋ฆฌ๋ ๋ฐ์ง ์๋๋ค.** ๊ณ์ ํ์ด ๋์ธ ์๋ฆฌ๊ฐ ์ ํ๋ค โ ํ์ด๋ฉด ํ ์๋ก ยท ์ผ์ชฝ ๋์ ๋ง์ถฐ,
|
|
74
|
+
* ์ ํญ ์๋จ๋ฐ๋ฉด ํ ์๋๋ก ยท ์ค๋ฅธ์ชฝ ๋์ ๋ง์ถฐ ํผ์น๋ค(์์). ํ๋ฉด๋ง๋ค ๊ณ ๋ฅผ ๊ฐ์ด ์๋๋ผ,
|
|
75
|
+
* prop ์ผ๋ก ์ด๋ฉด ๊ฐ์ ๊ณ์ ํ์ด ์ฑ๋ง๋ค ๋ค๋ฅธ ๋ฐฉํฅ์ผ๋ก ๋ฌ๋ค.
|
|
76
|
+
*/
|
|
77
|
+
export interface SSystemActionButtonAccountOption extends SAccountListBoxContent {
|
|
78
|
+
/**
|
|
79
|
+
* ๋ฆฌ์คํธ๋ฐ์ค ์ด๋ฆผ ์ํ๋ฅผ ๋ฐ์์ ์ฅ๋ค(controlled). ์ฃผ์ง ์์ผ๋ฉด ๋ฒํผ์ด ์ค์ค๋ก ์ฌ๋ซ๋๋ค.
|
|
80
|
+
* ํ์ ๋ด์ ์ชฝ์ด ๋ซ์์ผ ํ๋ ์๋ฆฌ๊ฐ ์์ด ์ด์ด ๋ ํต๋ก๋ค โ ๋ฆฌ์คํธ๋ฐ์ค๋ SPortal ๋ก ๋ ์์ด
|
|
81
|
+
* ํธ๋ฆฌ๊ฑฐ๊ฐ ํ๋ฉด์์ ๋น ์ ธ๋(GNB ๋ฅผ ์ ์ผ๋ฉด ๋ฉ๋ด ์ปฌ๋ผ์ด ๋ฏธ๋๋ฌ์ ธ ๋๊ฐ๋ค) ๋ฐ๋ผ ์ฌ๋ผ์ง์ง ์๋๋ค.
|
|
82
|
+
*/
|
|
83
|
+
open?: boolean;
|
|
84
|
+
/** ๋ฆฌ์คํธ๋ฐ์ค ์ด๋ฆผ/๋ซํ ๋ณ๊ฒฝ */
|
|
85
|
+
onOpenChange?: (open: boolean) => void;
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### SSystemActionButtonColor
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
export type SSystemActionButtonColor = (typeof SYSTEM_ACTION_BUTTON_COLORS)[number];
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### SSystemActionButtonIconOption
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
/** ์ ํ ์์ด์ฝ๋ง ๋ฐ๋ ํ์
(`select`)์ option */
|
|
99
|
+
export interface SSystemActionButtonIconOption {
|
|
100
|
+
/** ์ ํ ์์ด์ฝ๋ช
*/
|
|
101
|
+
icon: SIconName;
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### SSystemActionButtonStatusOption
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
/**
|
|
109
|
+
* `status` ํ์
์ option โ ๋ผ๋ฒจ ์๋ฆฌ์ ๋ค์ด๊ฐ๋ ์ํ ํ๊ทธ + ๊ณ ๋ฅผ ๋ชฉ๋ก.
|
|
110
|
+
*
|
|
111
|
+
* `options` ๋ **ํ์๋ค** โ ์ํ ํ์ ๋ ๊ทธ ์ํ๋ฅผ ๋ฐ๊พธ๋ ๋ฉ๋ด์ ํธ๋ฆฌ๊ฑฐ์ด๊ณ , ์ง๊ธ ์ํ(`value`)์
|
|
112
|
+
* ํด๋นํ๋ ์นธ์ ์ยท์ด๋ฆ์ด ๊ณง ํ๊ทธ๊ฐ ๋๋ค. ๋ณด์ฌ์ฃผ๊ธฐ๋ง ํ๋ ์ํ ์ค์ด ํ์ํ๋ฉด ์ด ๋ฒํผ์ด ์๋๋ผ
|
|
113
|
+
* `STag` ๋ฅผ ์ด๋ค.
|
|
114
|
+
*/
|
|
115
|
+
export interface SSystemActionButtonStatusOption {
|
|
116
|
+
/** ์ง๊ธ ์ํ. `options` ์์ ๊ฐ์ `value` ๋ฅผ ์ฐพ์ ๊ทธ ์ยท์ด๋ฆ์ผ๋ก ํ๊ทธ๋ฅผ ๊ทธ๋ฆฐ๋ค */
|
|
117
|
+
value?: string;
|
|
118
|
+
/** ๊ณ ๋ฅผ ์ ์๋ ์ํ. **ํ์๋ค** โ ์ด ๋ชฉ๋ก์ด ํ ์ค๋ฅธ์ชฝ์ผ๋ก ํผ์ณ์ง๋ค */
|
|
119
|
+
options: SSystemActionButtonStatusMenuOption[];
|
|
120
|
+
/** ๋ฉ๋ด์์ ์ํ๋ฅผ ๊ณ ๋ฆ. ๊ณ ๋ฅด๋ฉด ๋ฉ๋ด๊ฐ ๋ซํ๋ค */
|
|
121
|
+
onChange?: (value: string) => void;
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### SSystemActionButtonSubSelectOption
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
/**
|
|
129
|
+
* `subSelect` ํ์
์ option โ ์ง๊ธ ๊ฐ + ๊ณ ๋ฅผ ๋ชฉ๋ก.
|
|
130
|
+
*
|
|
131
|
+
* `options` ๋ **ํ์๋ค** โ `subSelect` ๋ "์ง๊ธ ๊ฐ์ด ์ ํ ์๊ณ ๋๋ฌ์ ๋ฐ๊พธ๋ ํ"์ด๋ผ, ๋๋ฌ๋
|
|
132
|
+
* ์๋ฌด๊ฒ๋ ๋จ์ง ์์ผ๋ฉด ๊ทธ๊ฒ์ `select`(๋๋ฌ ๋ค์ด๊ฐ๋ ํ)์ด์ง `subSelect` ๊ฐ ์๋๋ค.
|
|
133
|
+
*/
|
|
134
|
+
export interface SSystemActionButtonSubSelectOption extends SSystemActionButtonIconOption {
|
|
135
|
+
/**
|
|
136
|
+
* ์ง๊ธ ๊ฐ. `options` ์์ ๊ฐ์ `value` ๋ฅผ ์ฐพ์ ์ฐ์ธก์ ๊ทธ `label` ๋ก ์ ๋๋ค
|
|
137
|
+
* (๋ชป ์ฐพ์ผ๋ฉด `value` ๊ฐ ๊ทธ๋๋ก ๋จ๋๋ค).
|
|
138
|
+
*/
|
|
139
|
+
value?: string;
|
|
140
|
+
/** ๊ณ ๋ฅผ ์ ์๋ ๊ฐ. **ํ์๋ค** โ ์ด ๋ชฉ๋ก์ด ํ ์ค๋ฅธ์ชฝ์ผ๋ก ํผ์ณ์ง๋ค */
|
|
141
|
+
options: SSystemActionButtonMenuOption[];
|
|
142
|
+
/** ๋ฉ๋ด์์ ๊ฐ์ ๊ณ ๋ฆ. ๊ณ ๋ฅด๋ฉด ๋ฉ๋ด๊ฐ ๋ซํ๋ค */
|
|
143
|
+
onChange?: (value: string) => void;
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### SSystemActionButtonTextOption
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
/** ์ฐ์ธก ์ก์
ํ
์คํธ๊น์ง ๋ฐ๋ ํ์
(`switch` ยท `subSelect`)์ option */
|
|
151
|
+
export interface SSystemActionButtonTextOption extends SSystemActionButtonIconOption {
|
|
152
|
+
/** ์ฐ์ธก ์ก์
ํ
์คํธ */
|
|
153
|
+
text?: string;
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### SYSTEM_ACTION_BUTTON_COLORS
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
/**
|
|
161
|
+
* SSystemActionButton ์ค์ .
|
|
162
|
+
*
|
|
163
|
+
* ํ ํฐ์ GNB system ํจ๋ ํ ๋ฒ(`--cmp-gnb-system-*`)์ ๊ทธ๋๋ก ์ด๋ค.
|
|
164
|
+
* ํ ๊ณตํต(๋์ดยท๋ผ์ด๋ยท์์ด์ฝ ํ๋ ์ยท๋ผ๋ฒจ) โ --cmp-gnb-system-item-*
|
|
165
|
+
* ์(color ์ถ) light / dark / darker โ --cmp-gnb-system-item-<color>-*
|
|
166
|
+
* ์ฐ์ธก ์ก์
(ํจ๋ฉยท๊ฐ๊ฒฉยท์์ด์ฝยทํ
์คํธ์) โ --cmp-gnb-system-actionButton-*
|
|
167
|
+
*
|
|
168
|
+
* ํ์ดํฌ๊ทธ๋ํผ๋ CSS ๋ณ์๊ฐ ์๋๋ผ `.typo-*` ํ๋ฆฌ์
์ผ๋ก ๋์จ๋ค.
|
|
169
|
+
* item.label โ typo-body-sm-semibold (12/600/20)
|
|
170
|
+
* actionButton.switch โ typo-field-sm-default (12/400/20)
|
|
171
|
+
* actionButton.selectData โ typo-control-xs-medium (12/500/20)
|
|
172
|
+
*/
|
|
173
|
+
|
|
174
|
+
/** ์์(ํ๋ฉด). light = ํฐ ๋ฉด, dark = ์ค์
๋ธ๋ฃจ ๋ฉด, darker = ๋ค์ด๋น ๋ฉด */
|
|
175
|
+
export const SYSTEM_ACTION_BUTTON_COLORS = ['light', 'dark', 'darker'] as const;
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### SSystemActionButtonStatusMenuOption
|
|
179
|
+
|
|
180
|
+
```ts
|
|
181
|
+
/** ์ํ ๋ฉ๋ด์ ํ ์นธ โ ์ ๊ณผ ๊ธ์๊ฐ ๊ทธ ์ํ์ ์์ผ๋ก ํจ๊ป ๋ฌผ๋ ๋ค */
|
|
182
|
+
export interface SSystemActionButtonStatusMenuOption extends SSystemActionButtonMenuOption {
|
|
183
|
+
/** ์ํ ์. ๊ธฐ๋ณธ `'blue'` */
|
|
184
|
+
color?: STagColor;
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### SSystemActionButtonMenuOption
|
|
189
|
+
|
|
190
|
+
```ts
|
|
191
|
+
/** ๊ฐ ๊ณ ๋ฅด๊ธฐ ๋ฉ๋ด์ ํ ์นธ */
|
|
192
|
+
export interface SSystemActionButtonMenuOption {
|
|
193
|
+
/** ๊ฐ. `option.value` ์ ๋ง์ถฐ ์ง๊ธ ๊ฐ์ ๊ฐ๋ฆฐ๋ค */
|
|
194
|
+
value: string;
|
|
195
|
+
/** ํ๋ฉด์ ์ ํ๋ ์ด๋ฆ */
|
|
196
|
+
label: string;
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Dependencies
|
|
201
|
+
|
|
202
|
+
### Used by
|
|
203
|
+
|
|
204
|
+
- [SGnbSystem](../SGnbSystem)
|
|
205
|
+
|
|
206
|
+
### Depends on
|
|
207
|
+
|
|
208
|
+
- [SAccountListBox](../SAccountListBox)
|
|
209
|
+
- [SIcon](../SIcon)
|
|
210
|
+
- [STag](../STag)
|
|
211
|
+
|
|
212
|
+
### Graph
|
|
213
|
+
|
|
214
|
+
```mermaid
|
|
215
|
+
graph TD;
|
|
216
|
+
SSystemActionButton --> SAccountListBox
|
|
217
|
+
SSystemActionButton --> SIcon
|
|
218
|
+
SSystemActionButton --> STag
|
|
219
|
+
SGnbSystem --> SSystemActionButton
|
|
220
|
+
style SSystemActionButton fill:#f9f,stroke:#333,stroke-width:4px
|
|
221
|
+
```
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { type SAccountListBoxContent } from '../SAccountListBox';
|
|
3
|
+
import { type SIconName } from '../SIcon';
|
|
4
|
+
import { type STagColor } from '../STag';
|
|
5
|
+
import { type SSystemActionButtonColor } from './systemActionButton.config';
|
|
6
|
+
/** ์ ํ ์์ด์ฝ๋ง ๋ฐ๋ ํ์
(`select`)์ option */
|
|
7
|
+
export interface SSystemActionButtonIconOption {
|
|
8
|
+
/** ์ ํ ์์ด์ฝ๋ช
*/
|
|
9
|
+
icon: SIconName;
|
|
10
|
+
}
|
|
11
|
+
/** ์ฐ์ธก ์ก์
ํ
์คํธ๊น์ง ๋ฐ๋ ํ์
(`switch` ยท `subSelect`)์ option */
|
|
12
|
+
export interface SSystemActionButtonTextOption extends SSystemActionButtonIconOption {
|
|
13
|
+
/** ์ฐ์ธก ์ก์
ํ
์คํธ */
|
|
14
|
+
text?: string;
|
|
15
|
+
}
|
|
16
|
+
/** ๊ฐ ๊ณ ๋ฅด๊ธฐ ๋ฉ๋ด์ ํ ์นธ */
|
|
17
|
+
export interface SSystemActionButtonMenuOption {
|
|
18
|
+
/** ๊ฐ. `option.value` ์ ๋ง์ถฐ ์ง๊ธ ๊ฐ์ ๊ฐ๋ฆฐ๋ค */
|
|
19
|
+
value: string;
|
|
20
|
+
/** ํ๋ฉด์ ์ ํ๋ ์ด๋ฆ */
|
|
21
|
+
label: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* `subSelect` ํ์
์ option โ ์ง๊ธ ๊ฐ + ๊ณ ๋ฅผ ๋ชฉ๋ก.
|
|
25
|
+
*
|
|
26
|
+
* `options` ๋ **ํ์๋ค** โ `subSelect` ๋ "์ง๊ธ ๊ฐ์ด ์ ํ ์๊ณ ๋๋ฌ์ ๋ฐ๊พธ๋ ํ"์ด๋ผ, ๋๋ฌ๋
|
|
27
|
+
* ์๋ฌด๊ฒ๋ ๋จ์ง ์์ผ๋ฉด ๊ทธ๊ฒ์ `select`(๋๋ฌ ๋ค์ด๊ฐ๋ ํ)์ด์ง `subSelect` ๊ฐ ์๋๋ค.
|
|
28
|
+
*/
|
|
29
|
+
export interface SSystemActionButtonSubSelectOption extends SSystemActionButtonIconOption {
|
|
30
|
+
/**
|
|
31
|
+
* ์ง๊ธ ๊ฐ. `options` ์์ ๊ฐ์ `value` ๋ฅผ ์ฐพ์ ์ฐ์ธก์ ๊ทธ `label` ๋ก ์ ๋๋ค
|
|
32
|
+
* (๋ชป ์ฐพ์ผ๋ฉด `value` ๊ฐ ๊ทธ๋๋ก ๋จ๋๋ค).
|
|
33
|
+
*/
|
|
34
|
+
value?: string;
|
|
35
|
+
/** ๊ณ ๋ฅผ ์ ์๋ ๊ฐ. **ํ์๋ค** โ ์ด ๋ชฉ๋ก์ด ํ ์ค๋ฅธ์ชฝ์ผ๋ก ํผ์ณ์ง๋ค */
|
|
36
|
+
options: SSystemActionButtonMenuOption[];
|
|
37
|
+
/** ๋ฉ๋ด์์ ๊ฐ์ ๊ณ ๋ฆ. ๊ณ ๋ฅด๋ฉด ๋ฉ๋ด๊ฐ ๋ซํ๋ค */
|
|
38
|
+
onChange?: (value: string) => void;
|
|
39
|
+
}
|
|
40
|
+
/** ์ํ ๋ฉ๋ด์ ํ ์นธ โ ์ ๊ณผ ๊ธ์๊ฐ ๊ทธ ์ํ์ ์์ผ๋ก ํจ๊ป ๋ฌผ๋ ๋ค */
|
|
41
|
+
export interface SSystemActionButtonStatusMenuOption extends SSystemActionButtonMenuOption {
|
|
42
|
+
/** ์ํ ์. ๊ธฐ๋ณธ `'blue'` */
|
|
43
|
+
color?: STagColor;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* `status` ํ์
์ option โ ๋ผ๋ฒจ ์๋ฆฌ์ ๋ค์ด๊ฐ๋ ์ํ ํ๊ทธ + ๊ณ ๋ฅผ ๋ชฉ๋ก.
|
|
47
|
+
*
|
|
48
|
+
* `options` ๋ **ํ์๋ค** โ ์ํ ํ์ ๋ ๊ทธ ์ํ๋ฅผ ๋ฐ๊พธ๋ ๋ฉ๋ด์ ํธ๋ฆฌ๊ฑฐ์ด๊ณ , ์ง๊ธ ์ํ(`value`)์
|
|
49
|
+
* ํด๋นํ๋ ์นธ์ ์ยท์ด๋ฆ์ด ๊ณง ํ๊ทธ๊ฐ ๋๋ค. ๋ณด์ฌ์ฃผ๊ธฐ๋ง ํ๋ ์ํ ์ค์ด ํ์ํ๋ฉด ์ด ๋ฒํผ์ด ์๋๋ผ
|
|
50
|
+
* `STag` ๋ฅผ ์ด๋ค.
|
|
51
|
+
*/
|
|
52
|
+
export interface SSystemActionButtonStatusOption {
|
|
53
|
+
/** ์ง๊ธ ์ํ. `options` ์์ ๊ฐ์ `value` ๋ฅผ ์ฐพ์ ๊ทธ ์ยท์ด๋ฆ์ผ๋ก ํ๊ทธ๋ฅผ ๊ทธ๋ฆฐ๋ค */
|
|
54
|
+
value?: string;
|
|
55
|
+
/** ๊ณ ๋ฅผ ์ ์๋ ์ํ. **ํ์๋ค** โ ์ด ๋ชฉ๋ก์ด ํ ์ค๋ฅธ์ชฝ์ผ๋ก ํผ์ณ์ง๋ค */
|
|
56
|
+
options: SSystemActionButtonStatusMenuOption[];
|
|
57
|
+
/** ๋ฉ๋ด์์ ์ํ๋ฅผ ๊ณ ๋ฆ. ๊ณ ๋ฅด๋ฉด ๋ฉ๋ด๊ฐ ๋ซํ๋ค */
|
|
58
|
+
onChange?: (value: string) => void;
|
|
59
|
+
}
|
|
60
|
+
/** ๋ชจ๋ ํ์
์ด ๊ณตํต์ผ๋ก ๋ฐ๋ props */
|
|
61
|
+
export interface SSystemActionButtonBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'type' | 'children'> {
|
|
62
|
+
/** ์์(๋์ด๋ ํ๋ฉด). light = ํฐ ๋ฉด, dark = ์ค์
๋ธ๋ฃจ ๋ฉด, darker = ๋ค์ด๋น ๋ฉด. ๊ธฐ๋ณธ `'light'` */
|
|
63
|
+
color?: SSystemActionButtonColor;
|
|
64
|
+
/** ๋นํ์ฑ ์ฌ๋ถ. ๊ธฐ๋ณธ `false` */
|
|
65
|
+
disabled?: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* `account` ํ์
์ option โ ํ์ ๋๋ ์ ๋ ๋จ๋ ๊ณ์ ๋ฆฌ์คํธ๋ฐ์ค.
|
|
69
|
+
* ๋ด์ฉ(์ด๋ฉ์ผยท์ด๋ฆยท๊ถํยทํ๋ค)์ `SAccountListBox` ์ ๊ฐ๋ค.
|
|
70
|
+
*
|
|
71
|
+
* **๋จ๋ ์๋ฆฌ๋ ๋ฐ์ง ์๋๋ค.** ๊ณ์ ํ์ด ๋์ธ ์๋ฆฌ๊ฐ ์ ํ๋ค โ ํ์ด๋ฉด ํ ์๋ก ยท ์ผ์ชฝ ๋์ ๋ง์ถฐ,
|
|
72
|
+
* ์ ํญ ์๋จ๋ฐ๋ฉด ํ ์๋๋ก ยท ์ค๋ฅธ์ชฝ ๋์ ๋ง์ถฐ ํผ์น๋ค(์์). ํ๋ฉด๋ง๋ค ๊ณ ๋ฅผ ๊ฐ์ด ์๋๋ผ,
|
|
73
|
+
* prop ์ผ๋ก ์ด๋ฉด ๊ฐ์ ๊ณ์ ํ์ด ์ฑ๋ง๋ค ๋ค๋ฅธ ๋ฐฉํฅ์ผ๋ก ๋ฌ๋ค.
|
|
74
|
+
*/
|
|
75
|
+
export interface SSystemActionButtonAccountOption extends SAccountListBoxContent {
|
|
76
|
+
/**
|
|
77
|
+
* ๋ฆฌ์คํธ๋ฐ์ค ์ด๋ฆผ ์ํ๋ฅผ ๋ฐ์์ ์ฅ๋ค(controlled). ์ฃผ์ง ์์ผ๋ฉด ๋ฒํผ์ด ์ค์ค๋ก ์ฌ๋ซ๋๋ค.
|
|
78
|
+
* ํ์ ๋ด์ ์ชฝ์ด ๋ซ์์ผ ํ๋ ์๋ฆฌ๊ฐ ์์ด ์ด์ด ๋ ํต๋ก๋ค โ ๋ฆฌ์คํธ๋ฐ์ค๋ SPortal ๋ก ๋ ์์ด
|
|
79
|
+
* ํธ๋ฆฌ๊ฑฐ๊ฐ ํ๋ฉด์์ ๋น ์ ธ๋(GNB ๋ฅผ ์ ์ผ๋ฉด ๋ฉ๋ด ์ปฌ๋ผ์ด ๋ฏธ๋๋ฌ์ ธ ๋๊ฐ๋ค) ๋ฐ๋ผ ์ฌ๋ผ์ง์ง ์๋๋ค.
|
|
80
|
+
*/
|
|
81
|
+
open?: boolean;
|
|
82
|
+
/** ๋ฆฌ์คํธ๋ฐ์ค ์ด๋ฆผ/๋ซํ ๋ณ๊ฒฝ */
|
|
83
|
+
onOpenChange?: (open: boolean) => void;
|
|
84
|
+
}
|
|
85
|
+
/** ๊ณ์ ํ โ ์์ด์ฝ์ด `user` ๋ก ๊ณ ์ ์ด๊ณ ์ฐ์ธก ์ก์
์ด ์๋ค */
|
|
86
|
+
export interface SSystemActionButtonAccountProps extends SSystemActionButtonBaseProps {
|
|
87
|
+
/** ๊ณ์ ํ */
|
|
88
|
+
type: 'account';
|
|
89
|
+
/** ๋ผ๋ฒจ ํ
์คํธ */
|
|
90
|
+
label?: string;
|
|
91
|
+
/**
|
|
92
|
+
* ๋๋ฅด๋ฉด ๋จ๋ ๊ณ์ ๋ฆฌ์คํธ๋ฐ์ค. **ํ์๋ค** โ ๊ณ์ ํ์ ๋ ์ด ํจ๋์ ํธ๋ฆฌ๊ฑฐ์ด๊ณ , ๋๋ฌ๋ ์๋ฌด๊ฒ๋
|
|
93
|
+
* ๋จ์ง ์๋ ๊ณ์ ํ์ ์๋ค. ์์ด์ฝ์ `user` ๋ก ๊ณ ์ ์ด๋ผ ์ฌ๊ธฐ์ ๋ฐ์ง ์๋๋ค.
|
|
94
|
+
*/
|
|
95
|
+
option: SSystemActionButtonAccountOption;
|
|
96
|
+
}
|
|
97
|
+
/** ํ์ดํ๋ง ๋ถ๋ ํ โ ๋๋ฌ ๋ค์ด๊ฐ๋ค๋ ๋ป */
|
|
98
|
+
export interface SSystemActionButtonSelectProps extends SSystemActionButtonBaseProps {
|
|
99
|
+
/** ํ์ดํ๋ง ๋ถ๋ ํ */
|
|
100
|
+
type: 'select';
|
|
101
|
+
/** ๋ผ๋ฒจ ํ
์คํธ */
|
|
102
|
+
label?: string;
|
|
103
|
+
/** ์ ํ ์์ด์ฝ */
|
|
104
|
+
option: SSystemActionButtonIconOption;
|
|
105
|
+
}
|
|
106
|
+
/** ์ฐ์ธก์ ๋ณด์กฐ ์กฐ์ ๋ฌธ๊ตฌ๊ฐ ๋ถ๋ ํ โ ์ง๊ธ ๋ถ์ด ์๋ ๋์์ ๊ฐ์ ๋ผ์ด๋ค */
|
|
107
|
+
export interface SSystemActionButtonSwitchProps extends SSystemActionButtonBaseProps {
|
|
108
|
+
/** ์ฐ์ธก์ ๋ณด์กฐ ์กฐ์ ๋ฌธ๊ตฌ๊ฐ ๋ถ๋ ํ */
|
|
109
|
+
type: 'switch';
|
|
110
|
+
/** ๋ผ๋ฒจ ํ
์คํธ */
|
|
111
|
+
label?: string;
|
|
112
|
+
/** ์ ํ ์์ด์ฝ + ์ฐ์ธก ์ก์
ํ
์คํธ */
|
|
113
|
+
option: SSystemActionButtonTextOption;
|
|
114
|
+
}
|
|
115
|
+
/** ์ฐ์ธก์ ์ง๊ธ ์ ํ๋ ๊ฐ์ด ๋ถ๋ ํ โ `options` ๋ฅผ ์ฃผ๋ฉด ํ ์ค๋ฅธ์ชฝ์ผ๋ก ๋ฉ๋ด๊ฐ ํผ์ณ์ง๋ค */
|
|
116
|
+
export interface SSystemActionButtonSubSelectProps extends SSystemActionButtonBaseProps {
|
|
117
|
+
/** ์ฐ์ธก์ ์ง๊ธ ์ ํ๋ ๊ฐ์ด ๋ถ๋ ํ */
|
|
118
|
+
type: 'subSelect';
|
|
119
|
+
/** ๋ผ๋ฒจ ํ
์คํธ */
|
|
120
|
+
label?: string;
|
|
121
|
+
/** ์ ํ ์์ด์ฝ + ์ฐ์ธก ๊ฐ + ๊ณ ๋ฅผ ๋ชฉ๋ก */
|
|
122
|
+
option: SSystemActionButtonSubSelectOption;
|
|
123
|
+
}
|
|
124
|
+
/** ์ฐ์ธก์ ๋ฌธ๊ตฌ๊ฐ ๋ถ๋ ๋ ํ์
์ ํจ๊ป ๊ฐ๋ฆฌํจ๋ค โ `switch` ยท `subSelect` */
|
|
125
|
+
export type SSystemActionButtonTextProps = SSystemActionButtonSwitchProps | SSystemActionButtonSubSelectProps;
|
|
126
|
+
/** ๋ผ๋ฒจ ์๋ฆฌ์ ์ํ ํ๊ทธ๊ฐ ๋ค์ด๊ฐ๋ ํ โ `options` ๋ฅผ ์ฃผ๋ฉด ํ ์ค๋ฅธ์ชฝ์ผ๋ก ๋ฉ๋ด๊ฐ ํผ์ณ์ง๋ค */
|
|
127
|
+
export interface SSystemActionButtonStatusProps extends SSystemActionButtonBaseProps {
|
|
128
|
+
/** ๋ผ๋ฒจ ์๋ฆฌ์ ์ํ ํ๊ทธ๊ฐ ๋ค์ด๊ฐ๋ ํ */
|
|
129
|
+
type: 'status';
|
|
130
|
+
/** ํ๊ทธ๊ฐ ๋ผ๋ฒจ ์๋ฆฌ๋ฅผ ์ฐจ์งํ๋ฏ๋ก ๋ฐ์ง ์๋๋ค */
|
|
131
|
+
label?: never;
|
|
132
|
+
/**
|
|
133
|
+
* ์ํ ํ๊ทธ + ๊ณ ๋ฅผ ๋ชฉ๋ก. **ํ์๋ค** โ ์ํ ํ์ ๋ ๊ทธ ์ํ๋ฅผ ๋ฐ๊พธ๋ ๋ฉ๋ด์ ํธ๋ฆฌ๊ฑฐ๋ค.
|
|
134
|
+
*/
|
|
135
|
+
option: SSystemActionButtonStatusOption;
|
|
136
|
+
}
|
|
137
|
+
/** `type` ์ผ๋ก ๊ฐ๋ฆฌ๋ ํ๋ณ ์ ๋์จ. ํ์
์ ๋ง์ง ์๋ option ์ ์ปดํ์ผ ๋จ๊ณ์์ ๋งํ๋ค. */
|
|
138
|
+
export type SSystemActionButtonProps = SSystemActionButtonAccountProps | SSystemActionButtonSelectProps | SSystemActionButtonSwitchProps | SSystemActionButtonSubSelectProps | SSystemActionButtonStatusProps;
|
|
139
|
+
/**
|
|
140
|
+
* SSystemActionButton โ GNB system ํจ๋์ ํ ์ค์ง๋ฆฌ ์ก์
๋ฒํผ.
|
|
141
|
+
*
|
|
142
|
+
* ์์ด์ฝ ํ๋ ์ + ๋ผ๋ฒจ + ์ฐ์ธก ์ก์
์ด ํ ํ์ ๋ถ๊ณ , ํ ์ ์ฒด๊ฐ ๋ฒํผ์ด๋ค. ๋ฌด์์ด ๊ทธ๋ ค์ง๋์ง๋
|
|
143
|
+
* `type` ์ด ์ ํ๊ณ (`account` `switch` `select` `subSelect` `status`), ํ์
๋ง๋ค ๋ค๋ฅธ ๊ฐ๋ง
|
|
144
|
+
* `option` ์ผ๋ก ๋ฐ๋๋ค. ์ ํ ์์ด์ฝ์ ํญ์ ์๋ค โ `account` ๋ `user` ๊ณ ์ , `status` ๋ ํ๊ทธ๊ฐ
|
|
145
|
+
* ์๋ฆฌ๋ฅผ ์ฐจ์งํด ์์ด์ฝ์ด ์๊ณ , ๋๋จธ์ง๋ `option.icon` ์ด ํ์๋ค.
|
|
146
|
+
*
|
|
147
|
+
* `account` ๋ **์ธ์ ๋ ๊ณ์ ๋ฆฌ์คํธ๋ฐ์ค(`SAccountListBox`)์ ํธ๋ฆฌ๊ฑฐ**๋ค โ ๋๋ฌ๋ ์๋ฌด๊ฒ๋ ๋จ์ง
|
|
148
|
+
* ์๋ ๊ณ์ ํ์ ์์ผ๋ฏ๋ก `option` ์ด ํ์์ด๊ณ , ๋๋ฅด๋ฉด ์ด๋ฉ์ผยท์ด๋ฆยท๊ถํ๊ณผ ๊ณ์ ์ค์ ยท์ธ์ด ๋ณ๊ฒฝยท
|
|
149
|
+
* ๋ก๊ทธ์์์ ๋ณด์ฌ์ฃผ๊ณ ํ์ ๊ณ ๋ฅด๋ฉด ๋ซํ๋ค. ๋จ๋ ์๋ฆฌ๋ ๋ฐ์ง ์๊ณ ๋์ธ ์๋ฆฌ๊ฐ ์ ํ๋ค
|
|
150
|
+
* (ํ์ด๋ฉด ํ ์๋ก ยท ์ผ์ชฝ ๋, ์ ํญ ์๋จ๋ฐ๋ฉด ํ ์๋๋ก ยท ์ค๋ฅธ์ชฝ ๋).
|
|
151
|
+
*
|
|
152
|
+
* `subSelect` ยท `status` ๋ **์ธ์ ๋ ๊ฐ ๊ณ ๋ฅด๊ธฐ ๋ฉ๋ด์ ํธ๋ฆฌ๊ฑฐ**๋ค โ ์ง๊ธ ๊ฐ์ด ์ ํ ์๋ ํ์ด๋ผ
|
|
153
|
+
* ๋๋ฅด๋ฉด ๊ทธ ๊ฐ์ ๋ฐ๊พธ๋ ๋ฉ๋ด๊ฐ ๋ฌ๋ค. ๊ทธ๋์ `option.options` ๊ฐ ํ์์ด๊ณ , ๋ฉ๋ด๋ ํ ์ค๋ฅธ์ชฝ์ผ๋ก
|
|
154
|
+
* (ํ ์์ชฝ ๋์ ๋ง์ถฐ) ํผ์ณ์ง๋ฉฐ ๊ณ ๋ฅด๋ฉด `option.onChange(value)` ๊ฐ ๋๊ณ ๋ซํ๋ค.
|
|
155
|
+
* ๋๋ฌ์ ๊ฐ ๊ณ ๋ฅด๋ ํ๋ฉด์ผ๋ก ๋ณด๋ผ ๊ฒ์ด๋ฉด `select`, ๋ณด์ฌ์ฃผ๊ธฐ๋ง ํ ๊ฒ์ด๋ฉด `STag` ๋ค.
|
|
156
|
+
*
|
|
157
|
+
* hover ํ๋ฉด ํ๋ฉด์์ด ํ ๋จ๊ณ ๋ฐ๋๊ณ , ์ด๋์ด ์์์๋ ์์ด์ฝ ํ๋ ์์ด ํฐ์์ผ๋ก ๋ ์ค๋ฅธ๋ค.
|
|
158
|
+
* ์ํ๋ defaultยทhover ๋๋ฟ์ด๋ค โ ํ ํฐ์ selected ๊ฐ ์๋ค.
|
|
159
|
+
* ํ ํฐ์ `--cmp-gnb-system-item-*` ยท `--cmp-gnb-system-actionButton-*`.
|
|
160
|
+
*/
|
|
161
|
+
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 SSystemActionButtonAccountOption, type SSystemActionButtonSelectProps, type SSystemActionButtonTextProps, type SSystemActionButtonSwitchProps, type SSystemActionButtonSubSelectProps, type SSystemActionButtonStatusProps, type SSystemActionButtonIconOption, type SSystemActionButtonTextOption, type SSystemActionButtonSubSelectOption, type SSystemActionButtonMenuOption, type SSystemActionButtonStatusOption, type SSystemActionButtonStatusMenuOption, } 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,93 @@
|
|
|
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
|
+
/**
|
|
88
|
+
* ์ก์
์์ด์ฝ ๊ธ๋ฆฌํ ํ ๋ณ. ํ๋ ์ ํ ๋ณ์ ํ์
๋ณ ํ ํฐ(`actionButton.*-icon`)์ด ์ ํ๊ณ
|
|
89
|
+
* ๊ทธ ์์ ๊ธ๋ฆฌํ๊ฐ ์ด ํฌ๊ธฐ๋ก ๋์ธ๋ค โ ์ ํ ์์ด์ฝ์ ํ๋ ์(24)/๊ธ๋ฆฌํ(20) ๊ณผ ๊ฐ์ ๊ตฌ์กฐ๋ค.
|
|
90
|
+
* ๋์ ํ ํฐ์ด ์์ด ๋์์ธ ๊ฐ์ ๊ทธ๋๋ก ์ด๋ค.
|
|
91
|
+
*/
|
|
92
|
+
readonly actionIconGlyph: "12px";
|
|
93
|
+
};
|