@hivcd-printshop/design-system 1.1.0 → 1.1.1
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/dist/index.d.mts +125 -18
- package/dist/index.d.ts +125 -18
- package/dist/index.js +411 -173
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +416 -174
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { ComponentType, AnchorHTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
3
|
|
|
3
4
|
interface BackButtonProps {
|
|
4
5
|
onClick?: () => void;
|
|
@@ -6,15 +7,16 @@ interface BackButtonProps {
|
|
|
6
7
|
}
|
|
7
8
|
declare const BackButton: ({ onClick, className }: BackButtonProps) => react.JSX.Element;
|
|
8
9
|
|
|
9
|
-
interface CTAProps {
|
|
10
|
+
interface CTAProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
10
11
|
primary?: boolean;
|
|
11
|
-
|
|
12
|
+
alert?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
12
14
|
label: string;
|
|
13
15
|
onClick?: () => void;
|
|
14
16
|
className?: string;
|
|
17
|
+
forModal?: boolean;
|
|
15
18
|
}
|
|
16
|
-
|
|
17
|
-
declare const CTA: ({ primary, variable, label, onClick, className, }: CTAProps) => react.JSX.Element;
|
|
19
|
+
declare const CTA: ({ primary, alert, disabled, label, onClick, className, forModal, ...props }: CTAProps) => react.JSX.Element;
|
|
18
20
|
|
|
19
21
|
interface CategorySegmentProps {
|
|
20
22
|
selected?: boolean;
|
|
@@ -70,9 +72,21 @@ type PrintColor$1 = "Plotter" | "Printer" | "Riso" | "Fluorescent" | "UV" | "See
|
|
|
70
72
|
type RadioToggle = {
|
|
71
73
|
title: string;
|
|
72
74
|
content: string;
|
|
75
|
+
/**
|
|
76
|
+
* 선택 상태를 식별할 값. 표시 텍스트(title)와 분리하고 싶을 때 사용한다.
|
|
77
|
+
* 생략하면 title이 식별자로 쓰인다. onSelect도 이 값을 넘겨준다.
|
|
78
|
+
*/
|
|
79
|
+
value?: string;
|
|
73
80
|
badges?: string[];
|
|
74
|
-
/** 선택됐을 때 라디오 행에 입힐
|
|
81
|
+
/** 선택됐을 때 라디오 행에 입힐 배경색(팔레트). `color`가 있으면 무시된다. */
|
|
75
82
|
printColor?: PrintColor$1;
|
|
83
|
+
/**
|
|
84
|
+
* 선택됐을 때 라디오 행에 입힐 임의 배경색(hex/rgb/CSS 변수 등).
|
|
85
|
+
* 고정 팔레트(printColor) 밖의 색이 필요할 때 사용한다.
|
|
86
|
+
*/
|
|
87
|
+
color?: string;
|
|
88
|
+
/** 라디오 행(button)에 덧붙일 클래스. 보더/그룹 구분 등 앱별 커스터마이징 훅. */
|
|
89
|
+
className?: string;
|
|
76
90
|
labelTextButton?: string;
|
|
77
91
|
onClickTextButton?: () => void;
|
|
78
92
|
};
|
|
@@ -80,14 +94,26 @@ interface SideRadioAccordionProps {
|
|
|
80
94
|
step: number;
|
|
81
95
|
title: string;
|
|
82
96
|
radioToggleList: RadioToggle[];
|
|
83
|
-
/**
|
|
97
|
+
/** controlled: 현재 선택된 항목의 value(없으면 title). `null`이면 미선택. */
|
|
98
|
+
selected?: string | null;
|
|
99
|
+
/** uncontrolled 초기 선택값. `selected`를 함께 주면 무시된다. */
|
|
84
100
|
defaultSelected?: string;
|
|
85
|
-
|
|
101
|
+
/** 선택이 바뀔 때 호출. 인자는 항목의 value(없으면 title). */
|
|
102
|
+
onSelect?: (value: string) => void;
|
|
103
|
+
/** 헤더(Stepper)를 스크롤 컨테이너 상단에 고정한다. */
|
|
104
|
+
stickyHeader?: boolean;
|
|
105
|
+
/** 헤더 클릭으로 접기/펼치기를 허용할지. false면 항상 펼쳐지고 chevron도 감춘다. 기본 true. */
|
|
106
|
+
collapsible?: boolean;
|
|
107
|
+
/** uncontrolled 펼침 초기값. 기본 true. */
|
|
108
|
+
defaultOpen?: boolean;
|
|
109
|
+
/** controlled 펼침 상태. */
|
|
110
|
+
open?: boolean;
|
|
111
|
+
onOpenChange?: (open: boolean) => void;
|
|
86
112
|
quantityLimitLabel?: string;
|
|
87
113
|
onClickQuantityLimit?: () => void;
|
|
88
114
|
className?: string;
|
|
89
115
|
}
|
|
90
|
-
declare const SideRadioAccordion:
|
|
116
|
+
declare const SideRadioAccordion: react.ForwardRefExoticComponent<SideRadioAccordionProps & react.RefAttributes<HTMLDivElement>>;
|
|
91
117
|
|
|
92
118
|
interface TagProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
93
119
|
className?: string;
|
|
@@ -102,20 +128,30 @@ type Week = "thisWeek" | "nextWeek" | "twoWeeksLater";
|
|
|
102
128
|
interface WeekNavigationProps {
|
|
103
129
|
/** 표시 중인 주의 월요일(ISO "YYYY-MM-DD"). 범위 라벨(~금요일)을 여기서 계산한다. */
|
|
104
130
|
date: string;
|
|
105
|
-
|
|
131
|
+
/** 3주 모델에 매핑되는 주차. `label`을 직접 주면 생략 가능. */
|
|
132
|
+
week?: Week;
|
|
133
|
+
/** 가운데 텍스트를 직접 지정(주어지면 week 기반 자동 라벨을 대체). */
|
|
134
|
+
label?: string;
|
|
135
|
+
/** 이전/다음 버튼 노출 여부를 명시적으로 제어. 생략 시 week로 자동 판단(thisWeek↔twoWeeksLater 경계). */
|
|
136
|
+
canPrev?: boolean;
|
|
137
|
+
canNext?: boolean;
|
|
106
138
|
onPrevWeek?: () => void;
|
|
107
139
|
onNextWeek?: () => void;
|
|
108
140
|
className?: string;
|
|
109
141
|
}
|
|
110
|
-
declare const WeekNavigation:
|
|
142
|
+
declare const WeekNavigation: react.ForwardRefExoticComponent<WeekNavigationProps & react.RefAttributes<HTMLDivElement>>;
|
|
111
143
|
|
|
112
144
|
type PrintColor = "Plotter" | "Printer" | "Riso" | "Fluorescent" | "UV" | "Seet Cutting" | "Laser Cutting";
|
|
113
145
|
type TimeSlotState = "none" | "default" | "disabled" | "selected";
|
|
114
146
|
interface TimeSlot {
|
|
115
147
|
time: string;
|
|
116
148
|
state: TimeSlotState;
|
|
117
|
-
/** state가 "default"/"selected"일 때만 사용되는 hover 색상 */
|
|
149
|
+
/** state가 "default"/"selected"일 때만 사용되는 hover 색상(팔레트). `color`가 있으면 무시. */
|
|
118
150
|
printColor?: PrintColor;
|
|
151
|
+
/** 고정 팔레트 밖의 임의 hover 색상(hex/rgb/CSS 변수 등). */
|
|
152
|
+
color?: string;
|
|
153
|
+
/** 셀(div)에 덧붙일 클래스. 보더/그룹 구분 등 앱별 커스터마이징 훅. */
|
|
154
|
+
className?: string;
|
|
119
155
|
}
|
|
120
156
|
interface DayColumn {
|
|
121
157
|
/** 해당 요일의 ISO 날짜("YYYY-MM-DD") */
|
|
@@ -131,24 +167,63 @@ interface TimetableProps {
|
|
|
131
167
|
onPrevWeek?: () => void;
|
|
132
168
|
onNextWeek?: () => void;
|
|
133
169
|
onSelectSlot?: (date: string, time: string) => void;
|
|
170
|
+
/**
|
|
171
|
+
* true면 열 너비가 고정폭(72px) 대신 컨테이너 폭에 맞춰 균등하게 늘어난다.
|
|
172
|
+
* 기존 고정폭 레이아웃이 필요하면 생략한다.
|
|
173
|
+
*/
|
|
174
|
+
fluid?: boolean;
|
|
175
|
+
/** 상단 주간 네비게이션을 숨긴다(외부에서 별도로 렌더링할 때). */
|
|
176
|
+
hideWeekNavigation?: boolean;
|
|
177
|
+
/** 주간 네비게이션의 이전/다음 버튼 노출을 명시적으로 제어(생략 시 week로 자동 판단). */
|
|
178
|
+
canPrevWeek?: boolean;
|
|
179
|
+
canNextWeek?: boolean;
|
|
134
180
|
className?: string;
|
|
135
181
|
}
|
|
136
|
-
declare const Timetable:
|
|
182
|
+
declare const Timetable: react.ForwardRefExoticComponent<TimetableProps & react.RefAttributes<HTMLDivElement>>;
|
|
137
183
|
|
|
184
|
+
/**
|
|
185
|
+
* href가 있는 항목을 실제 링크로 렌더링하기 위해 주입하는 컴포넌트.
|
|
186
|
+
* Next.js라면 `next/link`를 그대로 넘기면 된다.
|
|
187
|
+
* 주입하지 않으면 순수 `<a>`로 렌더링된다.
|
|
188
|
+
*/
|
|
189
|
+
type LinkComponent = ComponentType<Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "className" | "onClick" | "aria-current"> & {
|
|
190
|
+
children: ReactNode;
|
|
191
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
192
|
+
}>;
|
|
138
193
|
type NavIcon = {
|
|
139
|
-
|
|
194
|
+
/** 아이콘 이미지 URL. `icon`(ReactNode)과 택일해서 사용한다. */
|
|
195
|
+
src?: string;
|
|
196
|
+
/** 인라인 SVG 등 커스텀 노드. `src` 대신 사용한다. 선택 상태 대비를 위해 `currentColor` 사용을 권장. */
|
|
197
|
+
icon?: ReactNode;
|
|
140
198
|
alt?: string;
|
|
199
|
+
/** 아이콘 옆에 함께 노출할 텍스트 라벨(예: "피드백"). 아이콘 없이 라벨만도 가능. */
|
|
200
|
+
label?: string;
|
|
201
|
+
/** key/상태 식별용 안정적 id(권장). 없으면 `src` → `label` 순으로 대체한다. */
|
|
202
|
+
id?: string;
|
|
203
|
+
/** 지정하면 `<a>`(또는 주입된 LinkComponent)로 렌더링된다. */
|
|
204
|
+
href?: string;
|
|
141
205
|
onClick?: () => void;
|
|
142
|
-
/** true면 아이콘 배경을 검게 채워 강조한다(예: 알림/마이페이지 진입 상태) */
|
|
206
|
+
/** true면 아이콘 배경을 검게 채워 강조한다(예: 알림/마이페이지 진입 상태). */
|
|
143
207
|
selected?: boolean;
|
|
208
|
+
/** 알림 개수 등 우상단 뱃지. `true`면 점(dot)만 표시. */
|
|
209
|
+
badge?: ReactNode;
|
|
144
210
|
className?: string;
|
|
211
|
+
/** 렌더링된 `<a>`/`<button>` 엘리먼트로 전달되는 ref(외부 클릭 감지 등에 사용). */
|
|
212
|
+
ref?: Ref<HTMLElement>;
|
|
145
213
|
};
|
|
146
214
|
type LowerPartItem = {
|
|
147
215
|
label: string;
|
|
216
|
+
/** key/상태 식별용 안정적 id(권장). 없으면 `label`을 사용한다. */
|
|
217
|
+
id?: string;
|
|
218
|
+
/** 지정하면 `<a>`(또는 주입된 LinkComponent)로 렌더링된다. */
|
|
219
|
+
href?: string;
|
|
148
220
|
onClick?: () => void;
|
|
149
221
|
};
|
|
150
222
|
type UpperPartItem = {
|
|
151
223
|
label: string;
|
|
224
|
+
id?: string;
|
|
225
|
+
href?: string;
|
|
226
|
+
onClick?: () => void;
|
|
152
227
|
/** 이 상단 탭이 선택됐을 때 아래에 노출할 하위 메뉴 */
|
|
153
228
|
lowerPartItemList: LowerPartItem[];
|
|
154
229
|
};
|
|
@@ -157,17 +232,49 @@ interface TNBProps {
|
|
|
157
232
|
upperPartItemList: UpperPartItem[];
|
|
158
233
|
/** 우측 알림/마이페이지 등 아이콘 목록(로고 제외) */
|
|
159
234
|
upperPartIconList: NavIcon[];
|
|
160
|
-
/**
|
|
235
|
+
/**
|
|
236
|
+
* controlled: 현재 선택된 상단 탭의 label.
|
|
237
|
+
* `null`을 넘기면 "선택된 탭 없음"(홈 등)으로 표시된다.
|
|
238
|
+
*/
|
|
239
|
+
selected?: string | null;
|
|
240
|
+
/** uncontrolled 초기값. `selected`를 함께 넘기면 무시된다. 지정하지 않으면 선택된 탭이 없다. */
|
|
161
241
|
defaultSelected?: string;
|
|
242
|
+
onSelectedChange?: (label: string) => void;
|
|
243
|
+
/** controlled: 현재 선택된 하위 메뉴 label. `null`이면 미선택. */
|
|
244
|
+
selectedLower?: string | null;
|
|
245
|
+
/** uncontrolled 초기값. */
|
|
246
|
+
defaultSelectedLower?: string;
|
|
247
|
+
onSelectedLowerChange?: (label: string) => void;
|
|
248
|
+
/** @deprecated `onSelectedChange`를 사용하세요. 하위 호환용 별칭입니다. */
|
|
162
249
|
onSelectItem?: (label: string) => void;
|
|
250
|
+
/** href가 있는 항목을 렌더링할 링크 컴포넌트(Next.js면 `next/link`). */
|
|
251
|
+
linkComponent?: LinkComponent;
|
|
252
|
+
/** nav 랜드마크의 접근성 라벨. */
|
|
253
|
+
"aria-label"?: string;
|
|
163
254
|
className?: string;
|
|
164
255
|
}
|
|
165
|
-
declare const TNB:
|
|
256
|
+
declare const TNB: react.ForwardRefExoticComponent<TNBProps & react.RefAttributes<HTMLElement>>;
|
|
166
257
|
|
|
167
258
|
interface ToastProps {
|
|
168
259
|
message: string;
|
|
260
|
+
/**
|
|
261
|
+
* 표시 여부(controlled). 생략하면 항상 표시되는 순수 렌더 모드(하위 호환).
|
|
262
|
+
* `true`/`false`를 넘기면 페이드 인/아웃 + 언마운트를 컴포넌트가 스스로 처리한다.
|
|
263
|
+
*/
|
|
264
|
+
open?: boolean;
|
|
265
|
+
/**
|
|
266
|
+
* 자동 소멸까지의 시간(ms). `0`/`null`이면 자동 소멸하지 않는다. 기본 3000.
|
|
267
|
+
* `open`이 `true`로 바뀔 때마다 타이머가 재시작된다.
|
|
268
|
+
*/
|
|
269
|
+
duration?: number | null;
|
|
270
|
+
/** 자동 소멸 시각 또는 (배너 클릭 시) 호출. controlled 모드에서 `open`을 false로 되돌리는 데 사용. */
|
|
271
|
+
onClose?: () => void;
|
|
272
|
+
/**
|
|
273
|
+
* 화면 고정 위치. `"none"`이면 위치 스타일을 붙이지 않고 부모 레이아웃에 맡긴다(하위 호환 기본값).
|
|
274
|
+
*/
|
|
275
|
+
position?: "top" | "bottom" | "none";
|
|
169
276
|
className?: string;
|
|
170
277
|
}
|
|
171
|
-
declare const Toast:
|
|
278
|
+
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<HTMLDivElement>>;
|
|
172
279
|
|
|
173
|
-
export { BackButton, type BackButtonProps, CTA, type CTAProps,
|
|
280
|
+
export { BackButton, type BackButtonProps, CTA, type CTAProps, CategorySegment, type CategorySegmentProps, CategorySegmentedControl, type CategorySegmentedControlProps, type DayColumn, type LinkComponent, type LowerPartItem, type NavIcon, NoticeBadge, type NoticeBadgeProps, type NoticeBadgeVariable, NoticeBar, type NoticeBarBadgeVariable, type NoticeBarProps, type NoticeBarVariable, type RadioToggle, SearchBar, type SearchBarProps, SideRadioAccordion, type PrintColor$1 as SideRadioAccordionPrintColor, type SideRadioAccordionProps, TNB, type TNBProps, Tag, type TagProps, type TimeSlot, type TimeSlotState, Timetable, type PrintColor as TimetablePrintColor, type TimetableProps, TitleInput, type TitleInputProps, Toast, type ToastProps, type UpperPartItem, type Week, WeekNavigation, type WeekNavigationProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { ComponentType, AnchorHTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
3
|
|
|
3
4
|
interface BackButtonProps {
|
|
4
5
|
onClick?: () => void;
|
|
@@ -6,15 +7,16 @@ interface BackButtonProps {
|
|
|
6
7
|
}
|
|
7
8
|
declare const BackButton: ({ onClick, className }: BackButtonProps) => react.JSX.Element;
|
|
8
9
|
|
|
9
|
-
interface CTAProps {
|
|
10
|
+
interface CTAProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
10
11
|
primary?: boolean;
|
|
11
|
-
|
|
12
|
+
alert?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
12
14
|
label: string;
|
|
13
15
|
onClick?: () => void;
|
|
14
16
|
className?: string;
|
|
17
|
+
forModal?: boolean;
|
|
15
18
|
}
|
|
16
|
-
|
|
17
|
-
declare const CTA: ({ primary, variable, label, onClick, className, }: CTAProps) => react.JSX.Element;
|
|
19
|
+
declare const CTA: ({ primary, alert, disabled, label, onClick, className, forModal, ...props }: CTAProps) => react.JSX.Element;
|
|
18
20
|
|
|
19
21
|
interface CategorySegmentProps {
|
|
20
22
|
selected?: boolean;
|
|
@@ -70,9 +72,21 @@ type PrintColor$1 = "Plotter" | "Printer" | "Riso" | "Fluorescent" | "UV" | "See
|
|
|
70
72
|
type RadioToggle = {
|
|
71
73
|
title: string;
|
|
72
74
|
content: string;
|
|
75
|
+
/**
|
|
76
|
+
* 선택 상태를 식별할 값. 표시 텍스트(title)와 분리하고 싶을 때 사용한다.
|
|
77
|
+
* 생략하면 title이 식별자로 쓰인다. onSelect도 이 값을 넘겨준다.
|
|
78
|
+
*/
|
|
79
|
+
value?: string;
|
|
73
80
|
badges?: string[];
|
|
74
|
-
/** 선택됐을 때 라디오 행에 입힐
|
|
81
|
+
/** 선택됐을 때 라디오 행에 입힐 배경색(팔레트). `color`가 있으면 무시된다. */
|
|
75
82
|
printColor?: PrintColor$1;
|
|
83
|
+
/**
|
|
84
|
+
* 선택됐을 때 라디오 행에 입힐 임의 배경색(hex/rgb/CSS 변수 등).
|
|
85
|
+
* 고정 팔레트(printColor) 밖의 색이 필요할 때 사용한다.
|
|
86
|
+
*/
|
|
87
|
+
color?: string;
|
|
88
|
+
/** 라디오 행(button)에 덧붙일 클래스. 보더/그룹 구분 등 앱별 커스터마이징 훅. */
|
|
89
|
+
className?: string;
|
|
76
90
|
labelTextButton?: string;
|
|
77
91
|
onClickTextButton?: () => void;
|
|
78
92
|
};
|
|
@@ -80,14 +94,26 @@ interface SideRadioAccordionProps {
|
|
|
80
94
|
step: number;
|
|
81
95
|
title: string;
|
|
82
96
|
radioToggleList: RadioToggle[];
|
|
83
|
-
/**
|
|
97
|
+
/** controlled: 현재 선택된 항목의 value(없으면 title). `null`이면 미선택. */
|
|
98
|
+
selected?: string | null;
|
|
99
|
+
/** uncontrolled 초기 선택값. `selected`를 함께 주면 무시된다. */
|
|
84
100
|
defaultSelected?: string;
|
|
85
|
-
|
|
101
|
+
/** 선택이 바뀔 때 호출. 인자는 항목의 value(없으면 title). */
|
|
102
|
+
onSelect?: (value: string) => void;
|
|
103
|
+
/** 헤더(Stepper)를 스크롤 컨테이너 상단에 고정한다. */
|
|
104
|
+
stickyHeader?: boolean;
|
|
105
|
+
/** 헤더 클릭으로 접기/펼치기를 허용할지. false면 항상 펼쳐지고 chevron도 감춘다. 기본 true. */
|
|
106
|
+
collapsible?: boolean;
|
|
107
|
+
/** uncontrolled 펼침 초기값. 기본 true. */
|
|
108
|
+
defaultOpen?: boolean;
|
|
109
|
+
/** controlled 펼침 상태. */
|
|
110
|
+
open?: boolean;
|
|
111
|
+
onOpenChange?: (open: boolean) => void;
|
|
86
112
|
quantityLimitLabel?: string;
|
|
87
113
|
onClickQuantityLimit?: () => void;
|
|
88
114
|
className?: string;
|
|
89
115
|
}
|
|
90
|
-
declare const SideRadioAccordion:
|
|
116
|
+
declare const SideRadioAccordion: react.ForwardRefExoticComponent<SideRadioAccordionProps & react.RefAttributes<HTMLDivElement>>;
|
|
91
117
|
|
|
92
118
|
interface TagProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
93
119
|
className?: string;
|
|
@@ -102,20 +128,30 @@ type Week = "thisWeek" | "nextWeek" | "twoWeeksLater";
|
|
|
102
128
|
interface WeekNavigationProps {
|
|
103
129
|
/** 표시 중인 주의 월요일(ISO "YYYY-MM-DD"). 범위 라벨(~금요일)을 여기서 계산한다. */
|
|
104
130
|
date: string;
|
|
105
|
-
|
|
131
|
+
/** 3주 모델에 매핑되는 주차. `label`을 직접 주면 생략 가능. */
|
|
132
|
+
week?: Week;
|
|
133
|
+
/** 가운데 텍스트를 직접 지정(주어지면 week 기반 자동 라벨을 대체). */
|
|
134
|
+
label?: string;
|
|
135
|
+
/** 이전/다음 버튼 노출 여부를 명시적으로 제어. 생략 시 week로 자동 판단(thisWeek↔twoWeeksLater 경계). */
|
|
136
|
+
canPrev?: boolean;
|
|
137
|
+
canNext?: boolean;
|
|
106
138
|
onPrevWeek?: () => void;
|
|
107
139
|
onNextWeek?: () => void;
|
|
108
140
|
className?: string;
|
|
109
141
|
}
|
|
110
|
-
declare const WeekNavigation:
|
|
142
|
+
declare const WeekNavigation: react.ForwardRefExoticComponent<WeekNavigationProps & react.RefAttributes<HTMLDivElement>>;
|
|
111
143
|
|
|
112
144
|
type PrintColor = "Plotter" | "Printer" | "Riso" | "Fluorescent" | "UV" | "Seet Cutting" | "Laser Cutting";
|
|
113
145
|
type TimeSlotState = "none" | "default" | "disabled" | "selected";
|
|
114
146
|
interface TimeSlot {
|
|
115
147
|
time: string;
|
|
116
148
|
state: TimeSlotState;
|
|
117
|
-
/** state가 "default"/"selected"일 때만 사용되는 hover 색상 */
|
|
149
|
+
/** state가 "default"/"selected"일 때만 사용되는 hover 색상(팔레트). `color`가 있으면 무시. */
|
|
118
150
|
printColor?: PrintColor;
|
|
151
|
+
/** 고정 팔레트 밖의 임의 hover 색상(hex/rgb/CSS 변수 등). */
|
|
152
|
+
color?: string;
|
|
153
|
+
/** 셀(div)에 덧붙일 클래스. 보더/그룹 구분 등 앱별 커스터마이징 훅. */
|
|
154
|
+
className?: string;
|
|
119
155
|
}
|
|
120
156
|
interface DayColumn {
|
|
121
157
|
/** 해당 요일의 ISO 날짜("YYYY-MM-DD") */
|
|
@@ -131,24 +167,63 @@ interface TimetableProps {
|
|
|
131
167
|
onPrevWeek?: () => void;
|
|
132
168
|
onNextWeek?: () => void;
|
|
133
169
|
onSelectSlot?: (date: string, time: string) => void;
|
|
170
|
+
/**
|
|
171
|
+
* true면 열 너비가 고정폭(72px) 대신 컨테이너 폭에 맞춰 균등하게 늘어난다.
|
|
172
|
+
* 기존 고정폭 레이아웃이 필요하면 생략한다.
|
|
173
|
+
*/
|
|
174
|
+
fluid?: boolean;
|
|
175
|
+
/** 상단 주간 네비게이션을 숨긴다(외부에서 별도로 렌더링할 때). */
|
|
176
|
+
hideWeekNavigation?: boolean;
|
|
177
|
+
/** 주간 네비게이션의 이전/다음 버튼 노출을 명시적으로 제어(생략 시 week로 자동 판단). */
|
|
178
|
+
canPrevWeek?: boolean;
|
|
179
|
+
canNextWeek?: boolean;
|
|
134
180
|
className?: string;
|
|
135
181
|
}
|
|
136
|
-
declare const Timetable:
|
|
182
|
+
declare const Timetable: react.ForwardRefExoticComponent<TimetableProps & react.RefAttributes<HTMLDivElement>>;
|
|
137
183
|
|
|
184
|
+
/**
|
|
185
|
+
* href가 있는 항목을 실제 링크로 렌더링하기 위해 주입하는 컴포넌트.
|
|
186
|
+
* Next.js라면 `next/link`를 그대로 넘기면 된다.
|
|
187
|
+
* 주입하지 않으면 순수 `<a>`로 렌더링된다.
|
|
188
|
+
*/
|
|
189
|
+
type LinkComponent = ComponentType<Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "className" | "onClick" | "aria-current"> & {
|
|
190
|
+
children: ReactNode;
|
|
191
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
192
|
+
}>;
|
|
138
193
|
type NavIcon = {
|
|
139
|
-
|
|
194
|
+
/** 아이콘 이미지 URL. `icon`(ReactNode)과 택일해서 사용한다. */
|
|
195
|
+
src?: string;
|
|
196
|
+
/** 인라인 SVG 등 커스텀 노드. `src` 대신 사용한다. 선택 상태 대비를 위해 `currentColor` 사용을 권장. */
|
|
197
|
+
icon?: ReactNode;
|
|
140
198
|
alt?: string;
|
|
199
|
+
/** 아이콘 옆에 함께 노출할 텍스트 라벨(예: "피드백"). 아이콘 없이 라벨만도 가능. */
|
|
200
|
+
label?: string;
|
|
201
|
+
/** key/상태 식별용 안정적 id(권장). 없으면 `src` → `label` 순으로 대체한다. */
|
|
202
|
+
id?: string;
|
|
203
|
+
/** 지정하면 `<a>`(또는 주입된 LinkComponent)로 렌더링된다. */
|
|
204
|
+
href?: string;
|
|
141
205
|
onClick?: () => void;
|
|
142
|
-
/** true면 아이콘 배경을 검게 채워 강조한다(예: 알림/마이페이지 진입 상태) */
|
|
206
|
+
/** true면 아이콘 배경을 검게 채워 강조한다(예: 알림/마이페이지 진입 상태). */
|
|
143
207
|
selected?: boolean;
|
|
208
|
+
/** 알림 개수 등 우상단 뱃지. `true`면 점(dot)만 표시. */
|
|
209
|
+
badge?: ReactNode;
|
|
144
210
|
className?: string;
|
|
211
|
+
/** 렌더링된 `<a>`/`<button>` 엘리먼트로 전달되는 ref(외부 클릭 감지 등에 사용). */
|
|
212
|
+
ref?: Ref<HTMLElement>;
|
|
145
213
|
};
|
|
146
214
|
type LowerPartItem = {
|
|
147
215
|
label: string;
|
|
216
|
+
/** key/상태 식별용 안정적 id(권장). 없으면 `label`을 사용한다. */
|
|
217
|
+
id?: string;
|
|
218
|
+
/** 지정하면 `<a>`(또는 주입된 LinkComponent)로 렌더링된다. */
|
|
219
|
+
href?: string;
|
|
148
220
|
onClick?: () => void;
|
|
149
221
|
};
|
|
150
222
|
type UpperPartItem = {
|
|
151
223
|
label: string;
|
|
224
|
+
id?: string;
|
|
225
|
+
href?: string;
|
|
226
|
+
onClick?: () => void;
|
|
152
227
|
/** 이 상단 탭이 선택됐을 때 아래에 노출할 하위 메뉴 */
|
|
153
228
|
lowerPartItemList: LowerPartItem[];
|
|
154
229
|
};
|
|
@@ -157,17 +232,49 @@ interface TNBProps {
|
|
|
157
232
|
upperPartItemList: UpperPartItem[];
|
|
158
233
|
/** 우측 알림/마이페이지 등 아이콘 목록(로고 제외) */
|
|
159
234
|
upperPartIconList: NavIcon[];
|
|
160
|
-
/**
|
|
235
|
+
/**
|
|
236
|
+
* controlled: 현재 선택된 상단 탭의 label.
|
|
237
|
+
* `null`을 넘기면 "선택된 탭 없음"(홈 등)으로 표시된다.
|
|
238
|
+
*/
|
|
239
|
+
selected?: string | null;
|
|
240
|
+
/** uncontrolled 초기값. `selected`를 함께 넘기면 무시된다. 지정하지 않으면 선택된 탭이 없다. */
|
|
161
241
|
defaultSelected?: string;
|
|
242
|
+
onSelectedChange?: (label: string) => void;
|
|
243
|
+
/** controlled: 현재 선택된 하위 메뉴 label. `null`이면 미선택. */
|
|
244
|
+
selectedLower?: string | null;
|
|
245
|
+
/** uncontrolled 초기값. */
|
|
246
|
+
defaultSelectedLower?: string;
|
|
247
|
+
onSelectedLowerChange?: (label: string) => void;
|
|
248
|
+
/** @deprecated `onSelectedChange`를 사용하세요. 하위 호환용 별칭입니다. */
|
|
162
249
|
onSelectItem?: (label: string) => void;
|
|
250
|
+
/** href가 있는 항목을 렌더링할 링크 컴포넌트(Next.js면 `next/link`). */
|
|
251
|
+
linkComponent?: LinkComponent;
|
|
252
|
+
/** nav 랜드마크의 접근성 라벨. */
|
|
253
|
+
"aria-label"?: string;
|
|
163
254
|
className?: string;
|
|
164
255
|
}
|
|
165
|
-
declare const TNB:
|
|
256
|
+
declare const TNB: react.ForwardRefExoticComponent<TNBProps & react.RefAttributes<HTMLElement>>;
|
|
166
257
|
|
|
167
258
|
interface ToastProps {
|
|
168
259
|
message: string;
|
|
260
|
+
/**
|
|
261
|
+
* 표시 여부(controlled). 생략하면 항상 표시되는 순수 렌더 모드(하위 호환).
|
|
262
|
+
* `true`/`false`를 넘기면 페이드 인/아웃 + 언마운트를 컴포넌트가 스스로 처리한다.
|
|
263
|
+
*/
|
|
264
|
+
open?: boolean;
|
|
265
|
+
/**
|
|
266
|
+
* 자동 소멸까지의 시간(ms). `0`/`null`이면 자동 소멸하지 않는다. 기본 3000.
|
|
267
|
+
* `open`이 `true`로 바뀔 때마다 타이머가 재시작된다.
|
|
268
|
+
*/
|
|
269
|
+
duration?: number | null;
|
|
270
|
+
/** 자동 소멸 시각 또는 (배너 클릭 시) 호출. controlled 모드에서 `open`을 false로 되돌리는 데 사용. */
|
|
271
|
+
onClose?: () => void;
|
|
272
|
+
/**
|
|
273
|
+
* 화면 고정 위치. `"none"`이면 위치 스타일을 붙이지 않고 부모 레이아웃에 맡긴다(하위 호환 기본값).
|
|
274
|
+
*/
|
|
275
|
+
position?: "top" | "bottom" | "none";
|
|
169
276
|
className?: string;
|
|
170
277
|
}
|
|
171
|
-
declare const Toast:
|
|
278
|
+
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<HTMLDivElement>>;
|
|
172
279
|
|
|
173
|
-
export { BackButton, type BackButtonProps, CTA, type CTAProps,
|
|
280
|
+
export { BackButton, type BackButtonProps, CTA, type CTAProps, CategorySegment, type CategorySegmentProps, CategorySegmentedControl, type CategorySegmentedControlProps, type DayColumn, type LinkComponent, type LowerPartItem, type NavIcon, NoticeBadge, type NoticeBadgeProps, type NoticeBadgeVariable, NoticeBar, type NoticeBarBadgeVariable, type NoticeBarProps, type NoticeBarVariable, type RadioToggle, SearchBar, type SearchBarProps, SideRadioAccordion, type PrintColor$1 as SideRadioAccordionPrintColor, type SideRadioAccordionProps, TNB, type TNBProps, Tag, type TagProps, type TimeSlot, type TimeSlotState, Timetable, type PrintColor as TimetablePrintColor, type TimetableProps, TitleInput, type TitleInputProps, Toast, type ToastProps, type UpperPartItem, type Week, WeekNavigation, type WeekNavigationProps };
|