sellmate-design-system-react 9.0.0-beta.30 → 9.0.0-beta.32
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 +111 -21
- 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/SChipFilter/README.md +16 -3
- package/dist/components/SChipFilter/SChipFilter.d.ts +22 -4
- package/dist/components/SGnb/README.md +1 -1
- package/dist/components/SGnb/SGnb.d.ts +29 -7
- package/dist/components/SGnbSystem/README.md +29 -6
- package/dist/components/SGnbSystem/SGnbSystem.d.ts +57 -17
- package/dist/components/SGnbSystem/gnbSystem.config.d.ts +34 -1
- package/dist/components/SGnbSystem/index.d.ts +1 -1
- package/dist/components/SIcon/README.md +2 -0
- package/dist/components/SIcon/icons.gen.d.ts +2 -0
- package/dist/components/SPortal/README.md +2 -0
- package/dist/components/SSystemActionButton/README.md +96 -9
- package/dist/components/SSystemActionButton/SSystemActionButton.d.ts +97 -15
- package/dist/components/SSystemActionButton/index.d.ts +1 -1
- package/dist/index.cjs +1131 -398
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1125 -400
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +333 -40
- package/dist/llms.txt +113 -23
- package/dist/styles.css +66 -26
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { type SAccountListBoxContent } from '../SAccountListBox';
|
|
2
3
|
import { type SIconName } from '../SIcon';
|
|
3
4
|
import { type STagColor } from '../STag';
|
|
4
5
|
import { type SSystemActionButtonColor } from './systemActionButton.config';
|
|
@@ -12,12 +13,49 @@ export interface SSystemActionButtonTextOption extends SSystemActionButtonIconOp
|
|
|
12
13
|
/** 우측 액션 텍스트 */
|
|
13
14
|
text?: string;
|
|
14
15
|
}
|
|
15
|
-
/**
|
|
16
|
-
export interface
|
|
17
|
-
/**
|
|
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'` */
|
|
18
43
|
color?: STagColor;
|
|
19
|
-
|
|
20
|
-
|
|
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;
|
|
21
59
|
}
|
|
22
60
|
/** 모든 타입이 공통으로 받는 props */
|
|
23
61
|
export interface SSystemActionButtonBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'type' | 'children'> {
|
|
@@ -26,14 +64,35 @@ export interface SSystemActionButtonBaseProps extends Omit<ButtonHTMLAttributes<
|
|
|
26
64
|
/** 비활성 여부. 기본 `false` */
|
|
27
65
|
disabled?: boolean;
|
|
28
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
|
+
}
|
|
29
85
|
/** 계정 행 — 아이콘이 `user` 로 고정이고 우측 액션이 없다 */
|
|
30
86
|
export interface SSystemActionButtonAccountProps extends SSystemActionButtonBaseProps {
|
|
31
87
|
/** 계정 행 */
|
|
32
88
|
type: 'account';
|
|
33
89
|
/** 라벨 텍스트 */
|
|
34
90
|
label?: string;
|
|
35
|
-
/**
|
|
36
|
-
|
|
91
|
+
/**
|
|
92
|
+
* 누르면 뜨는 계정 리스트박스. **필수다** — 계정 행은 늘 이 패널의 트리거이고, 눌러도 아무것도
|
|
93
|
+
* 뜨지 않는 계정 행은 없다. 아이콘은 `user` 로 고정이라 여기서 받지 않는다.
|
|
94
|
+
*/
|
|
95
|
+
option: SSystemActionButtonAccountOption;
|
|
37
96
|
}
|
|
38
97
|
/** 화살표만 붙는 행 — 눌러 들어간다는 뜻 */
|
|
39
98
|
export interface SSystemActionButtonSelectProps extends SSystemActionButtonBaseProps {
|
|
@@ -44,26 +103,39 @@ export interface SSystemActionButtonSelectProps extends SSystemActionButtonBaseP
|
|
|
44
103
|
/** 선행 아이콘 */
|
|
45
104
|
option: SSystemActionButtonIconOption;
|
|
46
105
|
}
|
|
47
|
-
/** 우측에 문구가 붙는 행 —
|
|
48
|
-
export interface
|
|
49
|
-
/** 우측에
|
|
50
|
-
type: 'switch'
|
|
106
|
+
/** 우측에 보조 조작 문구가 붙는 행 — 지금 붙어 있는 대상을 갈아 끼운다 */
|
|
107
|
+
export interface SSystemActionButtonSwitchProps extends SSystemActionButtonBaseProps {
|
|
108
|
+
/** 우측에 보조 조작 문구가 붙는 행 */
|
|
109
|
+
type: 'switch';
|
|
51
110
|
/** 라벨 텍스트 */
|
|
52
111
|
label?: string;
|
|
53
112
|
/** 선행 아이콘 + 우측 액션 텍스트 */
|
|
54
113
|
option: SSystemActionButtonTextOption;
|
|
55
114
|
}
|
|
56
|
-
/**
|
|
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` 를 주면 행 오른쪽으로 메뉴가 펼쳐진다 */
|
|
57
127
|
export interface SSystemActionButtonStatusProps extends SSystemActionButtonBaseProps {
|
|
58
128
|
/** 라벨 자리에 상태 태그가 들어가는 행 */
|
|
59
129
|
type: 'status';
|
|
60
130
|
/** 태그가 라벨 자리를 차지하므로 받지 않는다 */
|
|
61
131
|
label?: never;
|
|
62
|
-
/**
|
|
63
|
-
|
|
132
|
+
/**
|
|
133
|
+
* 상태 태그 + 고를 목록. **필수다** — 상태 행은 늘 그 상태를 바꾸는 메뉴의 트리거다.
|
|
134
|
+
*/
|
|
135
|
+
option: SSystemActionButtonStatusOption;
|
|
64
136
|
}
|
|
65
137
|
/** `type` 으로 갈리는 판별 유니온. 타입에 맞지 않는 option 은 컴파일 단계에서 막힌다. */
|
|
66
|
-
export type SSystemActionButtonProps = SSystemActionButtonAccountProps | SSystemActionButtonSelectProps |
|
|
138
|
+
export type SSystemActionButtonProps = SSystemActionButtonAccountProps | SSystemActionButtonSelectProps | SSystemActionButtonSwitchProps | SSystemActionButtonSubSelectProps | SSystemActionButtonStatusProps;
|
|
67
139
|
/**
|
|
68
140
|
* SSystemActionButton — GNB system 패널의 한 줄짜리 액션 버튼.
|
|
69
141
|
*
|
|
@@ -72,6 +144,16 @@ export type SSystemActionButtonProps = SSystemActionButtonAccountProps | SSystem
|
|
|
72
144
|
* `option` 으로 받는다. 선행 아이콘은 항상 있다 — `account` 는 `user` 고정, `status` 는 태그가
|
|
73
145
|
* 자리를 차지해 아이콘이 없고, 나머지는 `option.icon` 이 필수다.
|
|
74
146
|
*
|
|
147
|
+
* `account` 는 **언제나 계정 리스트박스(`SAccountListBox`)의 트리거**다 — 눌러도 아무것도 뜨지
|
|
148
|
+
* 않는 계정 행은 없으므로 `option` 이 필수이고, 누르면 이메일·이름·권한과 계정 설정·언어 변경·
|
|
149
|
+
* 로그아웃을 보여주고 행을 고르면 닫힌다. 뜨는 자리는 받지 않고 놓인 자리가 정한다
|
|
150
|
+
* (판이면 행 위로 · 왼쪽 끝, 전폭 상단바면 행 아래로 · 오른쪽 끝).
|
|
151
|
+
*
|
|
152
|
+
* `subSelect` · `status` 는 **언제나 값 고르기 메뉴의 트리거**다 — 지금 값이 적혀 있는 행이라
|
|
153
|
+
* 누르면 그 값을 바꾸는 메뉴가 뜬다. 그래서 `option.options` 가 필수이고, 메뉴는 행 오른쪽으로
|
|
154
|
+
* (행 위쪽 끝에 맞춰) 펼쳐지며 고르면 `option.onChange(value)` 가 돌고 닫힌다.
|
|
155
|
+
* 눌러서 값 고르는 화면으로 보낼 것이면 `select`, 보여주기만 할 것이면 `STag` 다.
|
|
156
|
+
*
|
|
75
157
|
* hover 하면 표면색이 한 단계 바뀌고, 어두운 색에서는 아이콘 프레임이 흰색으로 떠오른다.
|
|
76
158
|
* 상태는 default·hover 둘뿐이다 — 토큰에 selected 가 없다.
|
|
77
159
|
* 토큰은 `--cmp-gnb-system-item-*` · `--cmp-gnb-system-actionButton-*`.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SSystemActionButton, type SSystemActionButtonProps, type SSystemActionButtonBaseProps, type SSystemActionButtonAccountProps, type SSystemActionButtonSelectProps, type SSystemActionButtonTextProps, type SSystemActionButtonStatusProps, type SSystemActionButtonIconOption, type SSystemActionButtonTextOption, type SSystemActionButtonStatusOption, } from './SSystemActionButton';
|
|
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
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';
|