@hivcd-printshop/design-system 1.0.0 → 1.1.0

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.
@@ -0,0 +1,3 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M5 8.3335L10 13.3335L15 8.3335" stroke="#121212" stroke-width="1.5" stroke-linecap="square"/>
3
+ </svg>
@@ -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>
@@ -0,0 +1,4 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="8" cy="8" r="7" stroke="#121212"/>
3
+ <circle cx="8" cy="8" r="4" fill="#121212"/>
4
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="8" cy="8" r="7" stroke="#B4B9C2"/>
3
+ </svg>
package/dist/index.d.mts CHANGED
@@ -1,5 +1,11 @@
1
1
  import * as react from 'react';
2
2
 
3
+ interface BackButtonProps {
4
+ onClick?: () => void;
5
+ className?: string;
6
+ }
7
+ declare const BackButton: ({ onClick, className }: BackButtonProps) => react.JSX.Element;
8
+
3
9
  interface CTAProps {
4
10
  primary?: boolean;
5
11
  variable: CTAVariable;
@@ -10,4 +16,158 @@ interface CTAProps {
10
16
  type CTAVariable = "disabled" | "default" | "pressed";
11
17
  declare const CTA: ({ primary, variable, label, onClick, className, }: CTAProps) => react.JSX.Element;
12
18
 
13
- export { CTA, type CTAProps };
19
+ interface CategorySegmentProps {
20
+ selected?: boolean;
21
+ label: string;
22
+ className?: string;
23
+ onClick?: () => void;
24
+ }
25
+ declare const CategorySegment: ({ selected, label, className, onClick, }: CategorySegmentProps) => react.JSX.Element;
26
+
27
+ interface CategorySegmentedControlProps {
28
+ variable: "info" | "archive" | "notice" | "infoTag";
29
+ setSelectedCategory: (label: string) => void;
30
+ selectedCategory: string;
31
+ className?: string;
32
+ }
33
+ declare const CategorySegmentedControl: ({ variable, setSelectedCategory, selectedCategory, className, }: CategorySegmentedControlProps) => react.JSX.Element;
34
+
35
+ interface TitleInputProps {
36
+ title?: string;
37
+ onChange: (value: string) => void;
38
+ className?: string;
39
+ }
40
+ declare const TitleInput: ({ title, onChange, className }: TitleInputProps) => react.JSX.Element;
41
+
42
+ interface NoticeBadgeProps {
43
+ variable: NoticeBadgeVariable;
44
+ className?: string;
45
+ onClick?: () => void;
46
+ }
47
+ type NoticeBadgeVariable = "urgent" | "common";
48
+ declare const NoticeBadge: ({ variable, className, onClick }: NoticeBadgeProps) => react.JSX.Element;
49
+
50
+ interface NoticeBarProps {
51
+ variable: NoticeBarVariable;
52
+ badgeVariable: NoticeBarBadgeVariable;
53
+ title: string;
54
+ date: string;
55
+ className?: string;
56
+ onClick?: () => void;
57
+ }
58
+ type NoticeBarVariable = "default" | "hover" | "pressed";
59
+ type NoticeBarBadgeVariable = "urgent" | "common";
60
+ declare const NoticeBar: ({ variable, badgeVariable, title, date, className, onClick, }: NoticeBarProps) => react.JSX.Element;
61
+
62
+ interface SearchBarProps {
63
+ value?: string;
64
+ onChange?: (value: string) => void;
65
+ className?: string;
66
+ }
67
+ declare const SearchBar: ({ value, onChange, className }: SearchBarProps) => react.JSX.Element;
68
+
69
+ type PrintColor$1 = "Plotter" | "Printer" | "Riso" | "Fluorescent" | "UV" | "Seet Cutting" | "Laser Cutting";
70
+ type RadioToggle = {
71
+ title: string;
72
+ content: string;
73
+ badges?: string[];
74
+ /** 선택됐을 때 라디오 행에 입힐 배경색. 없으면 회색(gray00)으로 표시 */
75
+ printColor?: PrintColor$1;
76
+ labelTextButton?: string;
77
+ onClickTextButton?: () => void;
78
+ };
79
+ interface SideRadioAccordionProps {
80
+ step: number;
81
+ title: string;
82
+ radioToggleList: RadioToggle[];
83
+ /** 처음에 선택돼 있을 항목의 title */
84
+ defaultSelected?: string;
85
+ onSelect?: (title: string) => void;
86
+ quantityLimitLabel?: string;
87
+ onClickQuantityLimit?: () => void;
88
+ className?: string;
89
+ }
90
+ declare const SideRadioAccordion: ({ step, title, radioToggleList, defaultSelected, onSelect, quantityLimitLabel, onClickQuantityLimit, className, }: SideRadioAccordionProps) => react.JSX.Element;
91
+
92
+ interface TagProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
93
+ className?: string;
94
+ children: string | React.ReactNode;
95
+ selected?: boolean;
96
+ onClick?: () => void;
97
+ bgColor?: string;
98
+ }
99
+ declare const Tag: ({ className, children, selected, disabled, bgColor, onClick, ...props }: TagProps) => react.JSX.Element;
100
+
101
+ type Week = "thisWeek" | "nextWeek" | "twoWeeksLater";
102
+ interface WeekNavigationProps {
103
+ /** 표시 중인 주의 월요일(ISO "YYYY-MM-DD"). 범위 라벨(~금요일)을 여기서 계산한다. */
104
+ date: string;
105
+ week: Week;
106
+ onPrevWeek?: () => void;
107
+ onNextWeek?: () => void;
108
+ className?: string;
109
+ }
110
+ declare const WeekNavigation: ({ date, week, onPrevWeek, onNextWeek, className, }: WeekNavigationProps) => react.JSX.Element;
111
+
112
+ type PrintColor = "Plotter" | "Printer" | "Riso" | "Fluorescent" | "UV" | "Seet Cutting" | "Laser Cutting";
113
+ type TimeSlotState = "none" | "default" | "disabled" | "selected";
114
+ interface TimeSlot {
115
+ time: string;
116
+ state: TimeSlotState;
117
+ /** state가 "default"/"selected"일 때만 사용되는 hover 색상 */
118
+ printColor?: PrintColor;
119
+ }
120
+ interface DayColumn {
121
+ /** 해당 요일의 ISO 날짜("YYYY-MM-DD") */
122
+ date: string;
123
+ slots: TimeSlot[];
124
+ }
125
+ interface TimetableProps {
126
+ /** 표시 중인 주의 월요일(ISO "YYYY-MM-DD") */
127
+ weekStart: string;
128
+ week: Week;
129
+ /** 월~금 5개, 왼쪽부터 순서대로 */
130
+ days: DayColumn[];
131
+ onPrevWeek?: () => void;
132
+ onNextWeek?: () => void;
133
+ onSelectSlot?: (date: string, time: string) => void;
134
+ className?: string;
135
+ }
136
+ declare const Timetable: ({ weekStart, week, days, onPrevWeek, onNextWeek, onSelectSlot, className, }: TimetableProps) => react.JSX.Element;
137
+
138
+ type NavIcon = {
139
+ src: string;
140
+ alt?: string;
141
+ onClick?: () => void;
142
+ /** true면 아이콘 배경을 검게 채워 강조한다(예: 알림/마이페이지 진입 상태) */
143
+ selected?: boolean;
144
+ className?: string;
145
+ };
146
+ type LowerPartItem = {
147
+ label: string;
148
+ onClick?: () => void;
149
+ };
150
+ type UpperPartItem = {
151
+ label: string;
152
+ /** 이 상단 탭이 선택됐을 때 아래에 노출할 하위 메뉴 */
153
+ lowerPartItemList: LowerPartItem[];
154
+ };
155
+ interface TNBProps {
156
+ logo: NavIcon;
157
+ upperPartItemList: UpperPartItem[];
158
+ /** 우측 알림/마이페이지 등 아이콘 목록(로고 제외) */
159
+ upperPartIconList: NavIcon[];
160
+ /** 처음에 선택돼 있을 상단 탭의 label */
161
+ defaultSelected?: string;
162
+ onSelectItem?: (label: string) => void;
163
+ className?: string;
164
+ }
165
+ declare const TNB: ({ logo, upperPartItemList, upperPartIconList, defaultSelected, onSelectItem, className, }: TNBProps) => react.JSX.Element;
166
+
167
+ interface ToastProps {
168
+ message: string;
169
+ className?: string;
170
+ }
171
+ declare const Toast: ({ message, className }: ToastProps) => react.JSX.Element;
172
+
173
+ export { BackButton, type BackButtonProps, CTA, type CTAProps, type CTAVariable, CategorySegment, type CategorySegmentProps, CategorySegmentedControl, type CategorySegmentedControlProps, type DayColumn, 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,5 +1,11 @@
1
1
  import * as react from 'react';
2
2
 
3
+ interface BackButtonProps {
4
+ onClick?: () => void;
5
+ className?: string;
6
+ }
7
+ declare const BackButton: ({ onClick, className }: BackButtonProps) => react.JSX.Element;
8
+
3
9
  interface CTAProps {
4
10
  primary?: boolean;
5
11
  variable: CTAVariable;
@@ -10,4 +16,158 @@ interface CTAProps {
10
16
  type CTAVariable = "disabled" | "default" | "pressed";
11
17
  declare const CTA: ({ primary, variable, label, onClick, className, }: CTAProps) => react.JSX.Element;
12
18
 
13
- export { CTA, type CTAProps };
19
+ interface CategorySegmentProps {
20
+ selected?: boolean;
21
+ label: string;
22
+ className?: string;
23
+ onClick?: () => void;
24
+ }
25
+ declare const CategorySegment: ({ selected, label, className, onClick, }: CategorySegmentProps) => react.JSX.Element;
26
+
27
+ interface CategorySegmentedControlProps {
28
+ variable: "info" | "archive" | "notice" | "infoTag";
29
+ setSelectedCategory: (label: string) => void;
30
+ selectedCategory: string;
31
+ className?: string;
32
+ }
33
+ declare const CategorySegmentedControl: ({ variable, setSelectedCategory, selectedCategory, className, }: CategorySegmentedControlProps) => react.JSX.Element;
34
+
35
+ interface TitleInputProps {
36
+ title?: string;
37
+ onChange: (value: string) => void;
38
+ className?: string;
39
+ }
40
+ declare const TitleInput: ({ title, onChange, className }: TitleInputProps) => react.JSX.Element;
41
+
42
+ interface NoticeBadgeProps {
43
+ variable: NoticeBadgeVariable;
44
+ className?: string;
45
+ onClick?: () => void;
46
+ }
47
+ type NoticeBadgeVariable = "urgent" | "common";
48
+ declare const NoticeBadge: ({ variable, className, onClick }: NoticeBadgeProps) => react.JSX.Element;
49
+
50
+ interface NoticeBarProps {
51
+ variable: NoticeBarVariable;
52
+ badgeVariable: NoticeBarBadgeVariable;
53
+ title: string;
54
+ date: string;
55
+ className?: string;
56
+ onClick?: () => void;
57
+ }
58
+ type NoticeBarVariable = "default" | "hover" | "pressed";
59
+ type NoticeBarBadgeVariable = "urgent" | "common";
60
+ declare const NoticeBar: ({ variable, badgeVariable, title, date, className, onClick, }: NoticeBarProps) => react.JSX.Element;
61
+
62
+ interface SearchBarProps {
63
+ value?: string;
64
+ onChange?: (value: string) => void;
65
+ className?: string;
66
+ }
67
+ declare const SearchBar: ({ value, onChange, className }: SearchBarProps) => react.JSX.Element;
68
+
69
+ type PrintColor$1 = "Plotter" | "Printer" | "Riso" | "Fluorescent" | "UV" | "Seet Cutting" | "Laser Cutting";
70
+ type RadioToggle = {
71
+ title: string;
72
+ content: string;
73
+ badges?: string[];
74
+ /** 선택됐을 때 라디오 행에 입힐 배경색. 없으면 회색(gray00)으로 표시 */
75
+ printColor?: PrintColor$1;
76
+ labelTextButton?: string;
77
+ onClickTextButton?: () => void;
78
+ };
79
+ interface SideRadioAccordionProps {
80
+ step: number;
81
+ title: string;
82
+ radioToggleList: RadioToggle[];
83
+ /** 처음에 선택돼 있을 항목의 title */
84
+ defaultSelected?: string;
85
+ onSelect?: (title: string) => void;
86
+ quantityLimitLabel?: string;
87
+ onClickQuantityLimit?: () => void;
88
+ className?: string;
89
+ }
90
+ declare const SideRadioAccordion: ({ step, title, radioToggleList, defaultSelected, onSelect, quantityLimitLabel, onClickQuantityLimit, className, }: SideRadioAccordionProps) => react.JSX.Element;
91
+
92
+ interface TagProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
93
+ className?: string;
94
+ children: string | React.ReactNode;
95
+ selected?: boolean;
96
+ onClick?: () => void;
97
+ bgColor?: string;
98
+ }
99
+ declare const Tag: ({ className, children, selected, disabled, bgColor, onClick, ...props }: TagProps) => react.JSX.Element;
100
+
101
+ type Week = "thisWeek" | "nextWeek" | "twoWeeksLater";
102
+ interface WeekNavigationProps {
103
+ /** 표시 중인 주의 월요일(ISO "YYYY-MM-DD"). 범위 라벨(~금요일)을 여기서 계산한다. */
104
+ date: string;
105
+ week: Week;
106
+ onPrevWeek?: () => void;
107
+ onNextWeek?: () => void;
108
+ className?: string;
109
+ }
110
+ declare const WeekNavigation: ({ date, week, onPrevWeek, onNextWeek, className, }: WeekNavigationProps) => react.JSX.Element;
111
+
112
+ type PrintColor = "Plotter" | "Printer" | "Riso" | "Fluorescent" | "UV" | "Seet Cutting" | "Laser Cutting";
113
+ type TimeSlotState = "none" | "default" | "disabled" | "selected";
114
+ interface TimeSlot {
115
+ time: string;
116
+ state: TimeSlotState;
117
+ /** state가 "default"/"selected"일 때만 사용되는 hover 색상 */
118
+ printColor?: PrintColor;
119
+ }
120
+ interface DayColumn {
121
+ /** 해당 요일의 ISO 날짜("YYYY-MM-DD") */
122
+ date: string;
123
+ slots: TimeSlot[];
124
+ }
125
+ interface TimetableProps {
126
+ /** 표시 중인 주의 월요일(ISO "YYYY-MM-DD") */
127
+ weekStart: string;
128
+ week: Week;
129
+ /** 월~금 5개, 왼쪽부터 순서대로 */
130
+ days: DayColumn[];
131
+ onPrevWeek?: () => void;
132
+ onNextWeek?: () => void;
133
+ onSelectSlot?: (date: string, time: string) => void;
134
+ className?: string;
135
+ }
136
+ declare const Timetable: ({ weekStart, week, days, onPrevWeek, onNextWeek, onSelectSlot, className, }: TimetableProps) => react.JSX.Element;
137
+
138
+ type NavIcon = {
139
+ src: string;
140
+ alt?: string;
141
+ onClick?: () => void;
142
+ /** true면 아이콘 배경을 검게 채워 강조한다(예: 알림/마이페이지 진입 상태) */
143
+ selected?: boolean;
144
+ className?: string;
145
+ };
146
+ type LowerPartItem = {
147
+ label: string;
148
+ onClick?: () => void;
149
+ };
150
+ type UpperPartItem = {
151
+ label: string;
152
+ /** 이 상단 탭이 선택됐을 때 아래에 노출할 하위 메뉴 */
153
+ lowerPartItemList: LowerPartItem[];
154
+ };
155
+ interface TNBProps {
156
+ logo: NavIcon;
157
+ upperPartItemList: UpperPartItem[];
158
+ /** 우측 알림/마이페이지 등 아이콘 목록(로고 제외) */
159
+ upperPartIconList: NavIcon[];
160
+ /** 처음에 선택돼 있을 상단 탭의 label */
161
+ defaultSelected?: string;
162
+ onSelectItem?: (label: string) => void;
163
+ className?: string;
164
+ }
165
+ declare const TNB: ({ logo, upperPartItemList, upperPartIconList, defaultSelected, onSelectItem, className, }: TNBProps) => react.JSX.Element;
166
+
167
+ interface ToastProps {
168
+ message: string;
169
+ className?: string;
170
+ }
171
+ declare const Toast: ({ message, className }: ToastProps) => react.JSX.Element;
172
+
173
+ export { BackButton, type BackButtonProps, CTA, type CTAProps, type CTAVariable, CategorySegment, type CategorySegmentProps, CategorySegmentedControl, type CategorySegmentedControlProps, type DayColumn, 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 };