@hivcd-printshop/design-system 1.5.1 → 1.6.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.
- package/dist/index.d.mts +21 -4
- package/dist/index.d.ts +21 -4
- package/dist/index.js +96 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +94 -4
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -262,16 +262,17 @@ interface TagProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
262
262
|
}
|
|
263
263
|
declare const Tag: ({ className, children, selected, disabled, bgColor, onClick, ...props }: TagProps) => react.JSX.Element;
|
|
264
264
|
|
|
265
|
+
type AllowedTagChild = React.ReactElement<TagProps> | React.ReactElement<TagProps>[];
|
|
265
266
|
interface ListProps extends Omit<React.HTMLAttributes<HTMLLIElement>, "children"> {
|
|
266
267
|
className?: string;
|
|
267
268
|
label1?: string;
|
|
268
269
|
label2?: string;
|
|
269
|
-
label2OnClick?: () => void;
|
|
270
|
+
label2OnClick?: (e: React.MouseEvent<HTMLLabelElement>) => void;
|
|
270
271
|
label3?: string;
|
|
271
272
|
disabled?: boolean;
|
|
272
273
|
selected?: boolean;
|
|
273
|
-
onClick?: () => void;
|
|
274
|
-
children?:
|
|
274
|
+
onClick?: (e: React.MouseEvent<HTMLLIElement>) => void;
|
|
275
|
+
children?: AllowedTagChild | AllowedTagChild[];
|
|
275
276
|
}
|
|
276
277
|
declare function List({ className, label1, label2, label2OnClick, label3, disabled, selected, onClick, children, ...props }: ListProps): react.JSX.Element;
|
|
277
278
|
|
|
@@ -629,4 +630,20 @@ interface HeaderBarProps {
|
|
|
629
630
|
}
|
|
630
631
|
declare const HeaderBar: ({ className, children, onClick, active, ...props }: HeaderBarProps) => react.JSX.Element;
|
|
631
632
|
|
|
632
|
-
|
|
633
|
+
interface EmptyStateProps {
|
|
634
|
+
className?: string;
|
|
635
|
+
children?: React.ReactNode;
|
|
636
|
+
}
|
|
637
|
+
declare const EmptyState: ({ className, children }: EmptyStateProps) => react.JSX.Element;
|
|
638
|
+
|
|
639
|
+
interface SlotButtonProps {
|
|
640
|
+
isEditing?: boolean;
|
|
641
|
+
reserved?: boolean;
|
|
642
|
+
blocked?: boolean;
|
|
643
|
+
onClick?: () => void;
|
|
644
|
+
color?: string;
|
|
645
|
+
className?: string;
|
|
646
|
+
}
|
|
647
|
+
declare const SlotButton: ({ onClick, isEditing, reserved, blocked, color, className, }: SlotButtonProps) => react.JSX.Element;
|
|
648
|
+
|
|
649
|
+
export { Accordion, type AccordionProps, BackButton, type BackButtonProps, Badge, type BadgeProps, type BadgeVariant, BasicFormField, type BasicFormFieldProps, CTA, type CTAProps, CategorySegment, type CategorySegmentProps, CategorySegmentedControl, type CategorySegmentedControlProps, Column, ColumnContentContainer, type ColumnContentContainerProps, ColumnDescription, ColumnDescriptionList, type ColumnDescriptionListProps, type ColumnDescriptionProps, ColumnLabel, type ColumnLabelProps, type ColumnProps, ColumnSubTitle, type ColumnSubTitleProps, ColumnText, type ColumnTextProps, ColumnTextStyle, type DayColumn, Dropdown, type DropdownProps, EmptyState, type EmptyStateProps, FormCheckBox, type FormCheckBoxProps, FormColor, type FormColorProps, FormFile, type FormFileProps, FormNumber, type FormNumberProps, FormPassword, type FormPasswordProps, FormSelectBox, type FormSelectBoxProps, FormTel, type FormTelProps, FormText, FormTextArea, type FormTextAreaProps, type FormTextProps, HeaderBar, type HeaderBarProps, IconCheck, IconChevronDownXS, IconClose, IconCompass, IconExclamation, IconInfo, IconRadioSelected, IconRadioUnselected, type LinkComponent, List, type ListProps, type LowerPartItem, Modal, type ModalProps, ModalText, type ModalTextProps, ModalTextStyle, MultiColumn, type NavIcon, NoticeBadge, type NoticeBadgeProps, type NoticeBadgeVariable, NoticeBar, type NoticeBarBadgeVariable, type NoticeBarProps, type NoticeBarVariable, type RadioToggle, SearchBar, type SearchBarProps, SelectBoxOption, type SelectBoxOptionProps, SideRadioAccordion, type PrintColor$1 as SideRadioAccordionPrintColor, type SideRadioAccordionProps, SlotButton, type SlotButtonProps, TNB, type TNBProps, TabSwitch, type TabSwitchItem, type TabSwitchProps, Tag, type TagProps, TextButton, type TextButtonProps, type TimeSlot, type TimeSlotState, Timetable, type PrintColor as TimetablePrintColor, type TimetableProps, TitleInput, type TitleInputProps, Toast, type ToastProps, type UpperPartItem, type Week, WeekNavigation, type WeekNavigationProps, getInputStyles };
|
package/dist/index.d.ts
CHANGED
|
@@ -262,16 +262,17 @@ interface TagProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
262
262
|
}
|
|
263
263
|
declare const Tag: ({ className, children, selected, disabled, bgColor, onClick, ...props }: TagProps) => react.JSX.Element;
|
|
264
264
|
|
|
265
|
+
type AllowedTagChild = React.ReactElement<TagProps> | React.ReactElement<TagProps>[];
|
|
265
266
|
interface ListProps extends Omit<React.HTMLAttributes<HTMLLIElement>, "children"> {
|
|
266
267
|
className?: string;
|
|
267
268
|
label1?: string;
|
|
268
269
|
label2?: string;
|
|
269
|
-
label2OnClick?: () => void;
|
|
270
|
+
label2OnClick?: (e: React.MouseEvent<HTMLLabelElement>) => void;
|
|
270
271
|
label3?: string;
|
|
271
272
|
disabled?: boolean;
|
|
272
273
|
selected?: boolean;
|
|
273
|
-
onClick?: () => void;
|
|
274
|
-
children?:
|
|
274
|
+
onClick?: (e: React.MouseEvent<HTMLLIElement>) => void;
|
|
275
|
+
children?: AllowedTagChild | AllowedTagChild[];
|
|
275
276
|
}
|
|
276
277
|
declare function List({ className, label1, label2, label2OnClick, label3, disabled, selected, onClick, children, ...props }: ListProps): react.JSX.Element;
|
|
277
278
|
|
|
@@ -629,4 +630,20 @@ interface HeaderBarProps {
|
|
|
629
630
|
}
|
|
630
631
|
declare const HeaderBar: ({ className, children, onClick, active, ...props }: HeaderBarProps) => react.JSX.Element;
|
|
631
632
|
|
|
632
|
-
|
|
633
|
+
interface EmptyStateProps {
|
|
634
|
+
className?: string;
|
|
635
|
+
children?: React.ReactNode;
|
|
636
|
+
}
|
|
637
|
+
declare const EmptyState: ({ className, children }: EmptyStateProps) => react.JSX.Element;
|
|
638
|
+
|
|
639
|
+
interface SlotButtonProps {
|
|
640
|
+
isEditing?: boolean;
|
|
641
|
+
reserved?: boolean;
|
|
642
|
+
blocked?: boolean;
|
|
643
|
+
onClick?: () => void;
|
|
644
|
+
color?: string;
|
|
645
|
+
className?: string;
|
|
646
|
+
}
|
|
647
|
+
declare const SlotButton: ({ onClick, isEditing, reserved, blocked, color, className, }: SlotButtonProps) => react.JSX.Element;
|
|
648
|
+
|
|
649
|
+
export { Accordion, type AccordionProps, BackButton, type BackButtonProps, Badge, type BadgeProps, type BadgeVariant, BasicFormField, type BasicFormFieldProps, CTA, type CTAProps, CategorySegment, type CategorySegmentProps, CategorySegmentedControl, type CategorySegmentedControlProps, Column, ColumnContentContainer, type ColumnContentContainerProps, ColumnDescription, ColumnDescriptionList, type ColumnDescriptionListProps, type ColumnDescriptionProps, ColumnLabel, type ColumnLabelProps, type ColumnProps, ColumnSubTitle, type ColumnSubTitleProps, ColumnText, type ColumnTextProps, ColumnTextStyle, type DayColumn, Dropdown, type DropdownProps, EmptyState, type EmptyStateProps, FormCheckBox, type FormCheckBoxProps, FormColor, type FormColorProps, FormFile, type FormFileProps, FormNumber, type FormNumberProps, FormPassword, type FormPasswordProps, FormSelectBox, type FormSelectBoxProps, FormTel, type FormTelProps, FormText, FormTextArea, type FormTextAreaProps, type FormTextProps, HeaderBar, type HeaderBarProps, IconCheck, IconChevronDownXS, IconClose, IconCompass, IconExclamation, IconInfo, IconRadioSelected, IconRadioUnselected, type LinkComponent, List, type ListProps, type LowerPartItem, Modal, type ModalProps, ModalText, type ModalTextProps, ModalTextStyle, MultiColumn, type NavIcon, NoticeBadge, type NoticeBadgeProps, type NoticeBadgeVariable, NoticeBar, type NoticeBarBadgeVariable, type NoticeBarProps, type NoticeBarVariable, type RadioToggle, SearchBar, type SearchBarProps, SelectBoxOption, type SelectBoxOptionProps, SideRadioAccordion, type PrintColor$1 as SideRadioAccordionPrintColor, type SideRadioAccordionProps, SlotButton, type SlotButtonProps, TNB, type TNBProps, TabSwitch, type TabSwitchItem, type TabSwitchProps, Tag, type TagProps, TextButton, type TextButtonProps, type TimeSlot, type TimeSlotState, Timetable, type PrintColor as TimetablePrintColor, type TimetableProps, TitleInput, type TitleInputProps, Toast, type ToastProps, type UpperPartItem, type Week, WeekNavigation, type WeekNavigationProps, getInputStyles };
|
package/dist/index.js
CHANGED
|
@@ -37,6 +37,7 @@ __export(index_exports, {
|
|
|
37
37
|
ColumnText: () => ColumnText,
|
|
38
38
|
ColumnTextStyle: () => ColumnTextStyle,
|
|
39
39
|
Dropdown: () => Dropdown,
|
|
40
|
+
EmptyState: () => EmptyState,
|
|
40
41
|
FormCheckBox: () => FormCheckBox,
|
|
41
42
|
FormColor: () => FormColor,
|
|
42
43
|
FormFile: () => FormFile,
|
|
@@ -65,6 +66,7 @@ __export(index_exports, {
|
|
|
65
66
|
SearchBar: () => SearchBar,
|
|
66
67
|
SelectBoxOption: () => SelectBoxOption,
|
|
67
68
|
SideRadioAccordion: () => SideRadioAccordion,
|
|
69
|
+
SlotButton: () => SlotButton,
|
|
68
70
|
TNB: () => TNB,
|
|
69
71
|
TabSwitch: () => TabSwitch,
|
|
70
72
|
Tag: () => Tag,
|
|
@@ -353,6 +355,20 @@ var IconClose = ({ className, stroke }) => {
|
|
|
353
355
|
}
|
|
354
356
|
);
|
|
355
357
|
};
|
|
358
|
+
var IconMinus = ({ className, stroke }) => {
|
|
359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
360
|
+
"svg",
|
|
361
|
+
{
|
|
362
|
+
className,
|
|
363
|
+
width: "20",
|
|
364
|
+
height: "20",
|
|
365
|
+
viewBox: "0 0 20 20",
|
|
366
|
+
fill: "none",
|
|
367
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
368
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M16.6673 10.0013H3.33398", stroke: stroke || "currentColor" })
|
|
369
|
+
}
|
|
370
|
+
);
|
|
371
|
+
};
|
|
356
372
|
|
|
357
373
|
// src/components/Accordion/Accordion.tsx
|
|
358
374
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
@@ -2236,11 +2252,10 @@ var Toast = (0, import_react12.forwardRef)(function Toast2({ message, open, dura
|
|
|
2236
2252
|
role: "status",
|
|
2237
2253
|
"aria-live": "polite",
|
|
2238
2254
|
className: cn(
|
|
2239
|
-
"w-full h-fit py-2.5 bg-gray08",
|
|
2240
|
-
"mt-7 mx-8",
|
|
2255
|
+
"w-full h-fit py-2.5 px-4 bg-gray08",
|
|
2241
2256
|
"text-white text-center text-body1-regular",
|
|
2242
2257
|
"shadow-[0_2px_15px_rgba(0,0,0,0.18)]",
|
|
2243
|
-
controlled && "transition-opacity
|
|
2258
|
+
controlled && "transition-opacity",
|
|
2244
2259
|
controlled && (visible ? "opacity-100" : "opacity-0"),
|
|
2245
2260
|
className
|
|
2246
2261
|
),
|
|
@@ -2252,7 +2267,7 @@ var Toast = (0, import_react12.forwardRef)(function Toast2({ message, open, dura
|
|
|
2252
2267
|
"div",
|
|
2253
2268
|
{
|
|
2254
2269
|
className: cn(
|
|
2255
|
-
"fixed inset-x-0 z-5000 pointer-events-none",
|
|
2270
|
+
"fixed inset-x-0 z-5000 pointer-events-none h-full my-7 mx-8",
|
|
2256
2271
|
position === "top" ? "top-0" : "bottom-0"
|
|
2257
2272
|
),
|
|
2258
2273
|
children: banner
|
|
@@ -2297,6 +2312,81 @@ var HeaderBar = ({ className, children, onClick, active, ...props }) => {
|
|
|
2297
2312
|
}
|
|
2298
2313
|
);
|
|
2299
2314
|
};
|
|
2315
|
+
|
|
2316
|
+
// src/components/EmptyState/EmptyState.tsx
|
|
2317
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2318
|
+
var EmptyState = ({ className, children }) => {
|
|
2319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2320
|
+
"div",
|
|
2321
|
+
{
|
|
2322
|
+
className: cn(
|
|
2323
|
+
"empty-state",
|
|
2324
|
+
"flex items-center justify-center h-full w-full",
|
|
2325
|
+
"text-body3-regular text-strong",
|
|
2326
|
+
className
|
|
2327
|
+
),
|
|
2328
|
+
children: children ?? "No content available."
|
|
2329
|
+
}
|
|
2330
|
+
);
|
|
2331
|
+
};
|
|
2332
|
+
|
|
2333
|
+
// src/components/SlotButton/SlotButton.tsx
|
|
2334
|
+
var import_react13 = require("react");
|
|
2335
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2336
|
+
var SlotButton = ({
|
|
2337
|
+
onClick,
|
|
2338
|
+
isEditing,
|
|
2339
|
+
reserved,
|
|
2340
|
+
blocked,
|
|
2341
|
+
color,
|
|
2342
|
+
className
|
|
2343
|
+
}) => {
|
|
2344
|
+
const [isHovered, setIsHovered] = (0, import_react13.useState)(false);
|
|
2345
|
+
const showMinusIcon = isEditing && isHovered;
|
|
2346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
2347
|
+
"button",
|
|
2348
|
+
{
|
|
2349
|
+
onClick,
|
|
2350
|
+
onMouseEnter: isEditing ? () => setIsHovered(true) : void 0,
|
|
2351
|
+
onMouseLeave: isEditing ? () => setIsHovered(false) : void 0,
|
|
2352
|
+
style: !showMinusIcon && color ? { backgroundColor: color } : void 0,
|
|
2353
|
+
className: cn(
|
|
2354
|
+
// 자식 요소들을 겹치기 위해 relative 추가
|
|
2355
|
+
"relative h-7 w-7 rounded-full flex items-center justify-center transition-colors",
|
|
2356
|
+
showMinusIcon ? "bg-gray09 cursor-pointer" : cn(
|
|
2357
|
+
!color && "bg-black",
|
|
2358
|
+
blocked && "bg-white box-border border border-gray03",
|
|
2359
|
+
className
|
|
2360
|
+
)
|
|
2361
|
+
),
|
|
2362
|
+
children: [
|
|
2363
|
+
!reserved && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2364
|
+
"div",
|
|
2365
|
+
{
|
|
2366
|
+
className: cn(
|
|
2367
|
+
// absolute로 위치를 고정하고 투명도로 애니메이션 처리
|
|
2368
|
+
"absolute h-3.5 w-3.5 rounded-full bg-white transition-opacity",
|
|
2369
|
+
blocked && "box-border border border-gray03",
|
|
2370
|
+
showMinusIcon ? "opacity-0" : "opacity-100"
|
|
2371
|
+
// 호버 시 스르륵 사라짐
|
|
2372
|
+
)
|
|
2373
|
+
}
|
|
2374
|
+
),
|
|
2375
|
+
isEditing && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2376
|
+
IconMinus,
|
|
2377
|
+
{
|
|
2378
|
+
className: cn(
|
|
2379
|
+
// absolute로 위치를 고정하고 투명도로 애니메이션 처리
|
|
2380
|
+
"absolute text-white w-5 h-5 transition-opacity",
|
|
2381
|
+
showMinusIcon ? "opacity-100" : "opacity-0"
|
|
2382
|
+
// 호버 시 스르륵 나타남
|
|
2383
|
+
)
|
|
2384
|
+
}
|
|
2385
|
+
)
|
|
2386
|
+
]
|
|
2387
|
+
}
|
|
2388
|
+
);
|
|
2389
|
+
};
|
|
2300
2390
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2301
2391
|
0 && (module.exports = {
|
|
2302
2392
|
Accordion,
|
|
@@ -2315,6 +2405,7 @@ var HeaderBar = ({ className, children, onClick, active, ...props }) => {
|
|
|
2315
2405
|
ColumnText,
|
|
2316
2406
|
ColumnTextStyle,
|
|
2317
2407
|
Dropdown,
|
|
2408
|
+
EmptyState,
|
|
2318
2409
|
FormCheckBox,
|
|
2319
2410
|
FormColor,
|
|
2320
2411
|
FormFile,
|
|
@@ -2343,6 +2434,7 @@ var HeaderBar = ({ className, children, onClick, active, ...props }) => {
|
|
|
2343
2434
|
SearchBar,
|
|
2344
2435
|
SelectBoxOption,
|
|
2345
2436
|
SideRadioAccordion,
|
|
2437
|
+
SlotButton,
|
|
2346
2438
|
TNB,
|
|
2347
2439
|
TabSwitch,
|
|
2348
2440
|
Tag,
|