@hivcd-printshop/design-system 1.0.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/ChevronDown-XSALXCW4.svg +3 -0
- package/dist/Exclamation-IUYZYYC4.svg +4 -0
- package/dist/RadioSelected-DOLVV7ZM.svg +4 -0
- package/dist/RadioUnselected-QN74EU46.svg +3 -0
- package/dist/index.d.mts +272 -5
- package/dist/index.d.ts +272 -5
- package/dist/index.js +1122 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1112 -16
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +14 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M6.41438 7.18735H5.57954L5.50175 3.10938H6.49218L6.41438 7.18735ZM5.40001 8.3313C5.39801 8.23061 5.42395 8.13738 5.47781 8.05161C5.53167 7.96583 5.60448 7.89777 5.69624 7.84743C5.79 7.79708 5.89174 7.77191 6.00145 7.77191C6.10718 7.77191 6.20592 7.79708 6.29768 7.84743C6.38945 7.89777 6.46226 7.96583 6.51612 8.05161C6.57197 8.13738 6.5999 8.23061 6.5999 8.3313C6.5999 8.43199 6.57197 8.52522 6.51612 8.611C6.46226 8.69677 6.38945 8.76483 6.29768 8.81518C6.20592 8.86552 6.10718 8.89069 6.00145 8.89069C5.89174 8.89069 5.79 8.86552 5.69624 8.81518C5.60448 8.76483 5.53167 8.69677 5.47781 8.611C5.42395 8.52522 5.39801 8.43199 5.40001 8.3313Z" fill="#505865"/>
|
|
3
|
+
<circle cx="6" cy="6" r="4.5" stroke="#505865"/>
|
|
4
|
+
</svg>
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,280 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { ComponentType, AnchorHTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
3
|
|
|
3
|
-
interface
|
|
4
|
+
interface BackButtonProps {
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const BackButton: ({ onClick, className }: BackButtonProps) => react.JSX.Element;
|
|
9
|
+
|
|
10
|
+
interface CTAProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
11
|
primary?: boolean;
|
|
5
|
-
|
|
12
|
+
alert?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
label: string;
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
forModal?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const CTA: ({ primary, alert, disabled, label, onClick, className, forModal, ...props }: CTAProps) => react.JSX.Element;
|
|
20
|
+
|
|
21
|
+
interface CategorySegmentProps {
|
|
22
|
+
selected?: boolean;
|
|
6
23
|
label: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
onClick?: () => void;
|
|
26
|
+
}
|
|
27
|
+
declare const CategorySegment: ({ selected, label, className, onClick, }: CategorySegmentProps) => react.JSX.Element;
|
|
28
|
+
|
|
29
|
+
interface CategorySegmentedControlProps {
|
|
30
|
+
variable: "info" | "archive" | "notice" | "infoTag";
|
|
31
|
+
setSelectedCategory: (label: string) => void;
|
|
32
|
+
selectedCategory: string;
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
declare const CategorySegmentedControl: ({ variable, setSelectedCategory, selectedCategory, className, }: CategorySegmentedControlProps) => react.JSX.Element;
|
|
36
|
+
|
|
37
|
+
interface TitleInputProps {
|
|
38
|
+
title?: string;
|
|
39
|
+
onChange: (value: string) => void;
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
declare const TitleInput: ({ title, onChange, className }: TitleInputProps) => react.JSX.Element;
|
|
43
|
+
|
|
44
|
+
interface NoticeBadgeProps {
|
|
45
|
+
variable: NoticeBadgeVariable;
|
|
46
|
+
className?: string;
|
|
47
|
+
onClick?: () => void;
|
|
48
|
+
}
|
|
49
|
+
type NoticeBadgeVariable = "urgent" | "common";
|
|
50
|
+
declare const NoticeBadge: ({ variable, className, onClick }: NoticeBadgeProps) => react.JSX.Element;
|
|
51
|
+
|
|
52
|
+
interface NoticeBarProps {
|
|
53
|
+
variable: NoticeBarVariable;
|
|
54
|
+
badgeVariable: NoticeBarBadgeVariable;
|
|
55
|
+
title: string;
|
|
56
|
+
date: string;
|
|
57
|
+
className?: string;
|
|
7
58
|
onClick?: () => void;
|
|
59
|
+
}
|
|
60
|
+
type NoticeBarVariable = "default" | "hover" | "pressed";
|
|
61
|
+
type NoticeBarBadgeVariable = "urgent" | "common";
|
|
62
|
+
declare const NoticeBar: ({ variable, badgeVariable, title, date, className, onClick, }: NoticeBarProps) => react.JSX.Element;
|
|
63
|
+
|
|
64
|
+
interface SearchBarProps {
|
|
65
|
+
value?: string;
|
|
66
|
+
onChange?: (value: string) => void;
|
|
67
|
+
className?: string;
|
|
68
|
+
}
|
|
69
|
+
declare const SearchBar: ({ value, onChange, className }: SearchBarProps) => react.JSX.Element;
|
|
70
|
+
|
|
71
|
+
type PrintColor$1 = "Plotter" | "Printer" | "Riso" | "Fluorescent" | "UV" | "Seet Cutting" | "Laser Cutting";
|
|
72
|
+
type RadioToggle = {
|
|
73
|
+
title: string;
|
|
74
|
+
content: string;
|
|
75
|
+
/**
|
|
76
|
+
* 선택 상태를 식별할 값. 표시 텍스트(title)와 분리하고 싶을 때 사용한다.
|
|
77
|
+
* 생략하면 title이 식별자로 쓰인다. onSelect도 이 값을 넘겨준다.
|
|
78
|
+
*/
|
|
79
|
+
value?: string;
|
|
80
|
+
badges?: string[];
|
|
81
|
+
/** 선택됐을 때 라디오 행에 입힐 배경색(팔레트). `color`가 있으면 무시된다. */
|
|
82
|
+
printColor?: PrintColor$1;
|
|
83
|
+
/**
|
|
84
|
+
* 선택됐을 때 라디오 행에 입힐 임의 배경색(hex/rgb/CSS 변수 등).
|
|
85
|
+
* 고정 팔레트(printColor) 밖의 색이 필요할 때 사용한다.
|
|
86
|
+
*/
|
|
87
|
+
color?: string;
|
|
88
|
+
/** 라디오 행(button)에 덧붙일 클래스. 보더/그룹 구분 등 앱별 커스터마이징 훅. */
|
|
89
|
+
className?: string;
|
|
90
|
+
labelTextButton?: string;
|
|
91
|
+
onClickTextButton?: () => void;
|
|
92
|
+
};
|
|
93
|
+
interface SideRadioAccordionProps {
|
|
94
|
+
step: number;
|
|
95
|
+
title: string;
|
|
96
|
+
radioToggleList: RadioToggle[];
|
|
97
|
+
/** controlled: 현재 선택된 항목의 value(없으면 title). `null`이면 미선택. */
|
|
98
|
+
selected?: string | null;
|
|
99
|
+
/** uncontrolled 초기 선택값. `selected`를 함께 주면 무시된다. */
|
|
100
|
+
defaultSelected?: string;
|
|
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;
|
|
112
|
+
quantityLimitLabel?: string;
|
|
113
|
+
onClickQuantityLimit?: () => void;
|
|
114
|
+
className?: string;
|
|
115
|
+
}
|
|
116
|
+
declare const SideRadioAccordion: react.ForwardRefExoticComponent<SideRadioAccordionProps & react.RefAttributes<HTMLDivElement>>;
|
|
117
|
+
|
|
118
|
+
interface TagProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
119
|
+
className?: string;
|
|
120
|
+
children: string | React.ReactNode;
|
|
121
|
+
selected?: boolean;
|
|
122
|
+
onClick?: () => void;
|
|
123
|
+
bgColor?: string;
|
|
124
|
+
}
|
|
125
|
+
declare const Tag: ({ className, children, selected, disabled, bgColor, onClick, ...props }: TagProps) => react.JSX.Element;
|
|
126
|
+
|
|
127
|
+
type Week = "thisWeek" | "nextWeek" | "twoWeeksLater";
|
|
128
|
+
interface WeekNavigationProps {
|
|
129
|
+
/** 표시 중인 주의 월요일(ISO "YYYY-MM-DD"). 범위 라벨(~금요일)을 여기서 계산한다. */
|
|
130
|
+
date: string;
|
|
131
|
+
/** 3주 모델에 매핑되는 주차. `label`을 직접 주면 생략 가능. */
|
|
132
|
+
week?: Week;
|
|
133
|
+
/** 가운데 텍스트를 직접 지정(주어지면 week 기반 자동 라벨을 대체). */
|
|
134
|
+
label?: string;
|
|
135
|
+
/** 이전/다음 버튼 노출 여부를 명시적으로 제어. 생략 시 week로 자동 판단(thisWeek↔twoWeeksLater 경계). */
|
|
136
|
+
canPrev?: boolean;
|
|
137
|
+
canNext?: boolean;
|
|
138
|
+
onPrevWeek?: () => void;
|
|
139
|
+
onNextWeek?: () => void;
|
|
140
|
+
className?: string;
|
|
141
|
+
}
|
|
142
|
+
declare const WeekNavigation: react.ForwardRefExoticComponent<WeekNavigationProps & react.RefAttributes<HTMLDivElement>>;
|
|
143
|
+
|
|
144
|
+
type PrintColor = "Plotter" | "Printer" | "Riso" | "Fluorescent" | "UV" | "Seet Cutting" | "Laser Cutting";
|
|
145
|
+
type TimeSlotState = "none" | "default" | "disabled" | "selected";
|
|
146
|
+
interface TimeSlot {
|
|
147
|
+
time: string;
|
|
148
|
+
state: TimeSlotState;
|
|
149
|
+
/** state가 "default"/"selected"일 때만 사용되는 hover 색상(팔레트). `color`가 있으면 무시. */
|
|
150
|
+
printColor?: PrintColor;
|
|
151
|
+
/** 고정 팔레트 밖의 임의 hover 색상(hex/rgb/CSS 변수 등). */
|
|
152
|
+
color?: string;
|
|
153
|
+
/** 셀(div)에 덧붙일 클래스. 보더/그룹 구분 등 앱별 커스터마이징 훅. */
|
|
154
|
+
className?: string;
|
|
155
|
+
}
|
|
156
|
+
interface DayColumn {
|
|
157
|
+
/** 해당 요일의 ISO 날짜("YYYY-MM-DD") */
|
|
158
|
+
date: string;
|
|
159
|
+
slots: TimeSlot[];
|
|
160
|
+
}
|
|
161
|
+
interface TimetableProps {
|
|
162
|
+
/** 표시 중인 주의 월요일(ISO "YYYY-MM-DD") */
|
|
163
|
+
weekStart: string;
|
|
164
|
+
week: Week;
|
|
165
|
+
/** 월~금 5개, 왼쪽부터 순서대로 */
|
|
166
|
+
days: DayColumn[];
|
|
167
|
+
onPrevWeek?: () => void;
|
|
168
|
+
onNextWeek?: () => void;
|
|
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;
|
|
180
|
+
className?: string;
|
|
181
|
+
}
|
|
182
|
+
declare const Timetable: react.ForwardRefExoticComponent<TimetableProps & react.RefAttributes<HTMLDivElement>>;
|
|
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
|
+
}>;
|
|
193
|
+
type NavIcon = {
|
|
194
|
+
/** 아이콘 이미지 URL. `icon`(ReactNode)과 택일해서 사용한다. */
|
|
195
|
+
src?: string;
|
|
196
|
+
/** 인라인 SVG 등 커스텀 노드. `src` 대신 사용한다. 선택 상태 대비를 위해 `currentColor` 사용을 권장. */
|
|
197
|
+
icon?: ReactNode;
|
|
198
|
+
alt?: string;
|
|
199
|
+
/** 아이콘 옆에 함께 노출할 텍스트 라벨(예: "피드백"). 아이콘 없이 라벨만도 가능. */
|
|
200
|
+
label?: string;
|
|
201
|
+
/** key/상태 식별용 안정적 id(권장). 없으면 `src` → `label` 순으로 대체한다. */
|
|
202
|
+
id?: string;
|
|
203
|
+
/** 지정하면 `<a>`(또는 주입된 LinkComponent)로 렌더링된다. */
|
|
204
|
+
href?: string;
|
|
205
|
+
onClick?: () => void;
|
|
206
|
+
/** true면 아이콘 배경을 검게 채워 강조한다(예: 알림/마이페이지 진입 상태). */
|
|
207
|
+
selected?: boolean;
|
|
208
|
+
/** 알림 개수 등 우상단 뱃지. `true`면 점(dot)만 표시. */
|
|
209
|
+
badge?: ReactNode;
|
|
210
|
+
className?: string;
|
|
211
|
+
/** 렌더링된 `<a>`/`<button>` 엘리먼트로 전달되는 ref(외부 클릭 감지 등에 사용). */
|
|
212
|
+
ref?: Ref<HTMLElement>;
|
|
213
|
+
};
|
|
214
|
+
type LowerPartItem = {
|
|
215
|
+
label: string;
|
|
216
|
+
/** key/상태 식별용 안정적 id(권장). 없으면 `label`을 사용한다. */
|
|
217
|
+
id?: string;
|
|
218
|
+
/** 지정하면 `<a>`(또는 주입된 LinkComponent)로 렌더링된다. */
|
|
219
|
+
href?: string;
|
|
220
|
+
onClick?: () => void;
|
|
221
|
+
};
|
|
222
|
+
type UpperPartItem = {
|
|
223
|
+
label: string;
|
|
224
|
+
id?: string;
|
|
225
|
+
href?: string;
|
|
226
|
+
onClick?: () => void;
|
|
227
|
+
/** 이 상단 탭이 선택됐을 때 아래에 노출할 하위 메뉴 */
|
|
228
|
+
lowerPartItemList: LowerPartItem[];
|
|
229
|
+
};
|
|
230
|
+
interface TNBProps {
|
|
231
|
+
logo: NavIcon;
|
|
232
|
+
upperPartItemList: UpperPartItem[];
|
|
233
|
+
/** 우측 알림/마이페이지 등 아이콘 목록(로고 제외) */
|
|
234
|
+
upperPartIconList: NavIcon[];
|
|
235
|
+
/**
|
|
236
|
+
* controlled: 현재 선택된 상단 탭의 label.
|
|
237
|
+
* `null`을 넘기면 "선택된 탭 없음"(홈 등)으로 표시된다.
|
|
238
|
+
*/
|
|
239
|
+
selected?: string | null;
|
|
240
|
+
/** uncontrolled 초기값. `selected`를 함께 넘기면 무시된다. 지정하지 않으면 선택된 탭이 없다. */
|
|
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`를 사용하세요. 하위 호환용 별칭입니다. */
|
|
249
|
+
onSelectItem?: (label: string) => void;
|
|
250
|
+
/** href가 있는 항목을 렌더링할 링크 컴포넌트(Next.js면 `next/link`). */
|
|
251
|
+
linkComponent?: LinkComponent;
|
|
252
|
+
/** nav 랜드마크의 접근성 라벨. */
|
|
253
|
+
"aria-label"?: string;
|
|
254
|
+
className?: string;
|
|
255
|
+
}
|
|
256
|
+
declare const TNB: react.ForwardRefExoticComponent<TNBProps & react.RefAttributes<HTMLElement>>;
|
|
257
|
+
|
|
258
|
+
interface ToastProps {
|
|
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";
|
|
8
276
|
className?: string;
|
|
9
277
|
}
|
|
10
|
-
|
|
11
|
-
declare const CTA: ({ primary, variable, label, onClick, className, }: CTAProps) => react.JSX.Element;
|
|
278
|
+
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<HTMLDivElement>>;
|
|
12
279
|
|
|
13
|
-
export { 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,13 +1,280 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { ComponentType, AnchorHTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
3
|
|
|
3
|
-
interface
|
|
4
|
+
interface BackButtonProps {
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const BackButton: ({ onClick, className }: BackButtonProps) => react.JSX.Element;
|
|
9
|
+
|
|
10
|
+
interface CTAProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
11
|
primary?: boolean;
|
|
5
|
-
|
|
12
|
+
alert?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
label: string;
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
forModal?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const CTA: ({ primary, alert, disabled, label, onClick, className, forModal, ...props }: CTAProps) => react.JSX.Element;
|
|
20
|
+
|
|
21
|
+
interface CategorySegmentProps {
|
|
22
|
+
selected?: boolean;
|
|
6
23
|
label: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
onClick?: () => void;
|
|
26
|
+
}
|
|
27
|
+
declare const CategorySegment: ({ selected, label, className, onClick, }: CategorySegmentProps) => react.JSX.Element;
|
|
28
|
+
|
|
29
|
+
interface CategorySegmentedControlProps {
|
|
30
|
+
variable: "info" | "archive" | "notice" | "infoTag";
|
|
31
|
+
setSelectedCategory: (label: string) => void;
|
|
32
|
+
selectedCategory: string;
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
declare const CategorySegmentedControl: ({ variable, setSelectedCategory, selectedCategory, className, }: CategorySegmentedControlProps) => react.JSX.Element;
|
|
36
|
+
|
|
37
|
+
interface TitleInputProps {
|
|
38
|
+
title?: string;
|
|
39
|
+
onChange: (value: string) => void;
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
declare const TitleInput: ({ title, onChange, className }: TitleInputProps) => react.JSX.Element;
|
|
43
|
+
|
|
44
|
+
interface NoticeBadgeProps {
|
|
45
|
+
variable: NoticeBadgeVariable;
|
|
46
|
+
className?: string;
|
|
47
|
+
onClick?: () => void;
|
|
48
|
+
}
|
|
49
|
+
type NoticeBadgeVariable = "urgent" | "common";
|
|
50
|
+
declare const NoticeBadge: ({ variable, className, onClick }: NoticeBadgeProps) => react.JSX.Element;
|
|
51
|
+
|
|
52
|
+
interface NoticeBarProps {
|
|
53
|
+
variable: NoticeBarVariable;
|
|
54
|
+
badgeVariable: NoticeBarBadgeVariable;
|
|
55
|
+
title: string;
|
|
56
|
+
date: string;
|
|
57
|
+
className?: string;
|
|
7
58
|
onClick?: () => void;
|
|
59
|
+
}
|
|
60
|
+
type NoticeBarVariable = "default" | "hover" | "pressed";
|
|
61
|
+
type NoticeBarBadgeVariable = "urgent" | "common";
|
|
62
|
+
declare const NoticeBar: ({ variable, badgeVariable, title, date, className, onClick, }: NoticeBarProps) => react.JSX.Element;
|
|
63
|
+
|
|
64
|
+
interface SearchBarProps {
|
|
65
|
+
value?: string;
|
|
66
|
+
onChange?: (value: string) => void;
|
|
67
|
+
className?: string;
|
|
68
|
+
}
|
|
69
|
+
declare const SearchBar: ({ value, onChange, className }: SearchBarProps) => react.JSX.Element;
|
|
70
|
+
|
|
71
|
+
type PrintColor$1 = "Plotter" | "Printer" | "Riso" | "Fluorescent" | "UV" | "Seet Cutting" | "Laser Cutting";
|
|
72
|
+
type RadioToggle = {
|
|
73
|
+
title: string;
|
|
74
|
+
content: string;
|
|
75
|
+
/**
|
|
76
|
+
* 선택 상태를 식별할 값. 표시 텍스트(title)와 분리하고 싶을 때 사용한다.
|
|
77
|
+
* 생략하면 title이 식별자로 쓰인다. onSelect도 이 값을 넘겨준다.
|
|
78
|
+
*/
|
|
79
|
+
value?: string;
|
|
80
|
+
badges?: string[];
|
|
81
|
+
/** 선택됐을 때 라디오 행에 입힐 배경색(팔레트). `color`가 있으면 무시된다. */
|
|
82
|
+
printColor?: PrintColor$1;
|
|
83
|
+
/**
|
|
84
|
+
* 선택됐을 때 라디오 행에 입힐 임의 배경색(hex/rgb/CSS 변수 등).
|
|
85
|
+
* 고정 팔레트(printColor) 밖의 색이 필요할 때 사용한다.
|
|
86
|
+
*/
|
|
87
|
+
color?: string;
|
|
88
|
+
/** 라디오 행(button)에 덧붙일 클래스. 보더/그룹 구분 등 앱별 커스터마이징 훅. */
|
|
89
|
+
className?: string;
|
|
90
|
+
labelTextButton?: string;
|
|
91
|
+
onClickTextButton?: () => void;
|
|
92
|
+
};
|
|
93
|
+
interface SideRadioAccordionProps {
|
|
94
|
+
step: number;
|
|
95
|
+
title: string;
|
|
96
|
+
radioToggleList: RadioToggle[];
|
|
97
|
+
/** controlled: 현재 선택된 항목의 value(없으면 title). `null`이면 미선택. */
|
|
98
|
+
selected?: string | null;
|
|
99
|
+
/** uncontrolled 초기 선택값. `selected`를 함께 주면 무시된다. */
|
|
100
|
+
defaultSelected?: string;
|
|
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;
|
|
112
|
+
quantityLimitLabel?: string;
|
|
113
|
+
onClickQuantityLimit?: () => void;
|
|
114
|
+
className?: string;
|
|
115
|
+
}
|
|
116
|
+
declare const SideRadioAccordion: react.ForwardRefExoticComponent<SideRadioAccordionProps & react.RefAttributes<HTMLDivElement>>;
|
|
117
|
+
|
|
118
|
+
interface TagProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
119
|
+
className?: string;
|
|
120
|
+
children: string | React.ReactNode;
|
|
121
|
+
selected?: boolean;
|
|
122
|
+
onClick?: () => void;
|
|
123
|
+
bgColor?: string;
|
|
124
|
+
}
|
|
125
|
+
declare const Tag: ({ className, children, selected, disabled, bgColor, onClick, ...props }: TagProps) => react.JSX.Element;
|
|
126
|
+
|
|
127
|
+
type Week = "thisWeek" | "nextWeek" | "twoWeeksLater";
|
|
128
|
+
interface WeekNavigationProps {
|
|
129
|
+
/** 표시 중인 주의 월요일(ISO "YYYY-MM-DD"). 범위 라벨(~금요일)을 여기서 계산한다. */
|
|
130
|
+
date: string;
|
|
131
|
+
/** 3주 모델에 매핑되는 주차. `label`을 직접 주면 생략 가능. */
|
|
132
|
+
week?: Week;
|
|
133
|
+
/** 가운데 텍스트를 직접 지정(주어지면 week 기반 자동 라벨을 대체). */
|
|
134
|
+
label?: string;
|
|
135
|
+
/** 이전/다음 버튼 노출 여부를 명시적으로 제어. 생략 시 week로 자동 판단(thisWeek↔twoWeeksLater 경계). */
|
|
136
|
+
canPrev?: boolean;
|
|
137
|
+
canNext?: boolean;
|
|
138
|
+
onPrevWeek?: () => void;
|
|
139
|
+
onNextWeek?: () => void;
|
|
140
|
+
className?: string;
|
|
141
|
+
}
|
|
142
|
+
declare const WeekNavigation: react.ForwardRefExoticComponent<WeekNavigationProps & react.RefAttributes<HTMLDivElement>>;
|
|
143
|
+
|
|
144
|
+
type PrintColor = "Plotter" | "Printer" | "Riso" | "Fluorescent" | "UV" | "Seet Cutting" | "Laser Cutting";
|
|
145
|
+
type TimeSlotState = "none" | "default" | "disabled" | "selected";
|
|
146
|
+
interface TimeSlot {
|
|
147
|
+
time: string;
|
|
148
|
+
state: TimeSlotState;
|
|
149
|
+
/** state가 "default"/"selected"일 때만 사용되는 hover 색상(팔레트). `color`가 있으면 무시. */
|
|
150
|
+
printColor?: PrintColor;
|
|
151
|
+
/** 고정 팔레트 밖의 임의 hover 색상(hex/rgb/CSS 변수 등). */
|
|
152
|
+
color?: string;
|
|
153
|
+
/** 셀(div)에 덧붙일 클래스. 보더/그룹 구분 등 앱별 커스터마이징 훅. */
|
|
154
|
+
className?: string;
|
|
155
|
+
}
|
|
156
|
+
interface DayColumn {
|
|
157
|
+
/** 해당 요일의 ISO 날짜("YYYY-MM-DD") */
|
|
158
|
+
date: string;
|
|
159
|
+
slots: TimeSlot[];
|
|
160
|
+
}
|
|
161
|
+
interface TimetableProps {
|
|
162
|
+
/** 표시 중인 주의 월요일(ISO "YYYY-MM-DD") */
|
|
163
|
+
weekStart: string;
|
|
164
|
+
week: Week;
|
|
165
|
+
/** 월~금 5개, 왼쪽부터 순서대로 */
|
|
166
|
+
days: DayColumn[];
|
|
167
|
+
onPrevWeek?: () => void;
|
|
168
|
+
onNextWeek?: () => void;
|
|
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;
|
|
180
|
+
className?: string;
|
|
181
|
+
}
|
|
182
|
+
declare const Timetable: react.ForwardRefExoticComponent<TimetableProps & react.RefAttributes<HTMLDivElement>>;
|
|
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
|
+
}>;
|
|
193
|
+
type NavIcon = {
|
|
194
|
+
/** 아이콘 이미지 URL. `icon`(ReactNode)과 택일해서 사용한다. */
|
|
195
|
+
src?: string;
|
|
196
|
+
/** 인라인 SVG 등 커스텀 노드. `src` 대신 사용한다. 선택 상태 대비를 위해 `currentColor` 사용을 권장. */
|
|
197
|
+
icon?: ReactNode;
|
|
198
|
+
alt?: string;
|
|
199
|
+
/** 아이콘 옆에 함께 노출할 텍스트 라벨(예: "피드백"). 아이콘 없이 라벨만도 가능. */
|
|
200
|
+
label?: string;
|
|
201
|
+
/** key/상태 식별용 안정적 id(권장). 없으면 `src` → `label` 순으로 대체한다. */
|
|
202
|
+
id?: string;
|
|
203
|
+
/** 지정하면 `<a>`(또는 주입된 LinkComponent)로 렌더링된다. */
|
|
204
|
+
href?: string;
|
|
205
|
+
onClick?: () => void;
|
|
206
|
+
/** true면 아이콘 배경을 검게 채워 강조한다(예: 알림/마이페이지 진입 상태). */
|
|
207
|
+
selected?: boolean;
|
|
208
|
+
/** 알림 개수 등 우상단 뱃지. `true`면 점(dot)만 표시. */
|
|
209
|
+
badge?: ReactNode;
|
|
210
|
+
className?: string;
|
|
211
|
+
/** 렌더링된 `<a>`/`<button>` 엘리먼트로 전달되는 ref(외부 클릭 감지 등에 사용). */
|
|
212
|
+
ref?: Ref<HTMLElement>;
|
|
213
|
+
};
|
|
214
|
+
type LowerPartItem = {
|
|
215
|
+
label: string;
|
|
216
|
+
/** key/상태 식별용 안정적 id(권장). 없으면 `label`을 사용한다. */
|
|
217
|
+
id?: string;
|
|
218
|
+
/** 지정하면 `<a>`(또는 주입된 LinkComponent)로 렌더링된다. */
|
|
219
|
+
href?: string;
|
|
220
|
+
onClick?: () => void;
|
|
221
|
+
};
|
|
222
|
+
type UpperPartItem = {
|
|
223
|
+
label: string;
|
|
224
|
+
id?: string;
|
|
225
|
+
href?: string;
|
|
226
|
+
onClick?: () => void;
|
|
227
|
+
/** 이 상단 탭이 선택됐을 때 아래에 노출할 하위 메뉴 */
|
|
228
|
+
lowerPartItemList: LowerPartItem[];
|
|
229
|
+
};
|
|
230
|
+
interface TNBProps {
|
|
231
|
+
logo: NavIcon;
|
|
232
|
+
upperPartItemList: UpperPartItem[];
|
|
233
|
+
/** 우측 알림/마이페이지 등 아이콘 목록(로고 제외) */
|
|
234
|
+
upperPartIconList: NavIcon[];
|
|
235
|
+
/**
|
|
236
|
+
* controlled: 현재 선택된 상단 탭의 label.
|
|
237
|
+
* `null`을 넘기면 "선택된 탭 없음"(홈 등)으로 표시된다.
|
|
238
|
+
*/
|
|
239
|
+
selected?: string | null;
|
|
240
|
+
/** uncontrolled 초기값. `selected`를 함께 넘기면 무시된다. 지정하지 않으면 선택된 탭이 없다. */
|
|
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`를 사용하세요. 하위 호환용 별칭입니다. */
|
|
249
|
+
onSelectItem?: (label: string) => void;
|
|
250
|
+
/** href가 있는 항목을 렌더링할 링크 컴포넌트(Next.js면 `next/link`). */
|
|
251
|
+
linkComponent?: LinkComponent;
|
|
252
|
+
/** nav 랜드마크의 접근성 라벨. */
|
|
253
|
+
"aria-label"?: string;
|
|
254
|
+
className?: string;
|
|
255
|
+
}
|
|
256
|
+
declare const TNB: react.ForwardRefExoticComponent<TNBProps & react.RefAttributes<HTMLElement>>;
|
|
257
|
+
|
|
258
|
+
interface ToastProps {
|
|
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";
|
|
8
276
|
className?: string;
|
|
9
277
|
}
|
|
10
|
-
|
|
11
|
-
declare const CTA: ({ primary, variable, label, onClick, className, }: CTAProps) => react.JSX.Element;
|
|
278
|
+
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<HTMLDivElement>>;
|
|
12
279
|
|
|
13
|
-
export { 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 };
|