@hivcd-printshop/design-system 1.5.2 → 1.7.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 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?: React.ReactElement<TagProps> | React.ReactElement<TagProps>[];
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,26 @@ interface HeaderBarProps {
629
630
  }
630
631
  declare const HeaderBar: ({ className, children, onClick, active, ...props }: HeaderBarProps) => react.JSX.Element;
631
632
 
632
- 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, 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, 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 };
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
+ interface SlotAddButtonProps {
650
+ onClick?: () => void;
651
+ className?: string;
652
+ }
653
+ declare const SlotAddButton: ({ onClick, className }: SlotAddButtonProps) => react.JSX.Element;
654
+
655
+ 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, SlotAddButton, type SlotAddButtonProps, 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?: React.ReactElement<TagProps> | React.ReactElement<TagProps>[];
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,26 @@ interface HeaderBarProps {
629
630
  }
630
631
  declare const HeaderBar: ({ className, children, onClick, active, ...props }: HeaderBarProps) => react.JSX.Element;
631
632
 
632
- 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, 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, 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 };
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
+ interface SlotAddButtonProps {
650
+ onClick?: () => void;
651
+ className?: string;
652
+ }
653
+ declare const SlotAddButton: ({ onClick, className }: SlotAddButtonProps) => react.JSX.Element;
654
+
655
+ 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, SlotAddButton, type SlotAddButtonProps, 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,8 @@ __export(index_exports, {
65
66
  SearchBar: () => SearchBar,
66
67
  SelectBoxOption: () => SelectBoxOption,
67
68
  SideRadioAccordion: () => SideRadioAccordion,
69
+ SlotAddButton: () => SlotAddButton,
70
+ SlotButton: () => SlotButton,
68
71
  TNB: () => TNB,
69
72
  TabSwitch: () => TabSwitch,
70
73
  Tag: () => Tag,
@@ -353,6 +356,37 @@ var IconClose = ({ className, stroke }) => {
353
356
  }
354
357
  );
355
358
  };
359
+ var IconPlus = ({ className, stroke }) => {
360
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
361
+ "svg",
362
+ {
363
+ className,
364
+ width: "20",
365
+ height: "20",
366
+ viewBox: "0 0 20 20",
367
+ fill: "none",
368
+ xmlns: "http://www.w3.org/2000/svg",
369
+ children: [
370
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M16.6673 10.0013H3.33398", stroke: stroke || "currentColor" }),
371
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M9.99902 3.33203V16.6654", stroke: stroke || "currentColor" })
372
+ ]
373
+ }
374
+ );
375
+ };
376
+ var IconMinus = ({ className, stroke }) => {
377
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
378
+ "svg",
379
+ {
380
+ className,
381
+ width: "20",
382
+ height: "20",
383
+ viewBox: "0 0 20 20",
384
+ fill: "none",
385
+ xmlns: "http://www.w3.org/2000/svg",
386
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M16.6673 10.0013H3.33398", stroke: stroke || "currentColor" })
387
+ }
388
+ );
389
+ };
356
390
 
357
391
  // src/components/Accordion/Accordion.tsx
358
392
  var import_jsx_runtime2 = require("react/jsx-runtime");
@@ -2296,6 +2330,104 @@ var HeaderBar = ({ className, children, onClick, active, ...props }) => {
2296
2330
  }
2297
2331
  );
2298
2332
  };
2333
+
2334
+ // src/components/EmptyState/EmptyState.tsx
2335
+ var import_jsx_runtime43 = require("react/jsx-runtime");
2336
+ var EmptyState = ({ className, children }) => {
2337
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2338
+ "div",
2339
+ {
2340
+ className: cn(
2341
+ "empty-state",
2342
+ "flex items-center justify-center h-full w-full",
2343
+ "text-body3-regular text-strong",
2344
+ className
2345
+ ),
2346
+ children: children ?? "No content available."
2347
+ }
2348
+ );
2349
+ };
2350
+
2351
+ // src/components/SlotButton/SlotButton.tsx
2352
+ var import_react13 = require("react");
2353
+ var import_jsx_runtime44 = require("react/jsx-runtime");
2354
+ var SlotButton = ({
2355
+ onClick,
2356
+ isEditing,
2357
+ reserved,
2358
+ blocked,
2359
+ color,
2360
+ className
2361
+ }) => {
2362
+ const [isHovered, setIsHovered] = (0, import_react13.useState)(false);
2363
+ const showMinusIcon = isEditing && isHovered;
2364
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
2365
+ "button",
2366
+ {
2367
+ onClick,
2368
+ onMouseEnter: isEditing ? () => setIsHovered(true) : void 0,
2369
+ onMouseLeave: isEditing ? () => setIsHovered(false) : void 0,
2370
+ style: !showMinusIcon && color ? { backgroundColor: color } : void 0,
2371
+ className: cn(
2372
+ // 자식 요소들을 겹치기 위해 relative 추가
2373
+ "relative h-7 w-7 rounded-full flex items-center justify-center transition-colors",
2374
+ showMinusIcon ? "bg-gray09 cursor-pointer" : cn(
2375
+ !color && "bg-black",
2376
+ blocked && "bg-white box-border border border-gray03",
2377
+ className
2378
+ )
2379
+ ),
2380
+ children: [
2381
+ !reserved && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2382
+ "div",
2383
+ {
2384
+ className: cn(
2385
+ // absolute로 위치를 고정하고 투명도로 애니메이션 처리
2386
+ "absolute h-3.5 w-3.5 rounded-full bg-white transition-opacity",
2387
+ blocked && "box-border border border-gray03",
2388
+ showMinusIcon ? "opacity-0" : "opacity-100"
2389
+ // 호버 시 스르륵 사라짐
2390
+ )
2391
+ }
2392
+ ),
2393
+ isEditing && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2394
+ IconMinus,
2395
+ {
2396
+ className: cn(
2397
+ // absolute로 위치를 고정하고 투명도로 애니메이션 처리
2398
+ "absolute text-white w-5 h-5 transition-opacity",
2399
+ showMinusIcon ? "opacity-100" : "opacity-0"
2400
+ // 호버 시 스르륵 나타남
2401
+ )
2402
+ }
2403
+ )
2404
+ ]
2405
+ }
2406
+ );
2407
+ };
2408
+
2409
+ // src/components/SlotButton/SlotAddButton.tsx
2410
+ var import_jsx_runtime45 = require("react/jsx-runtime");
2411
+ var SlotAddButton = ({ onClick, className }) => {
2412
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
2413
+ "button",
2414
+ {
2415
+ onClick,
2416
+ className: cn(
2417
+ "group",
2418
+ // 1. 부모에 group 클래스 추가!
2419
+ "h-7 w-7 rounded-full flex items-center justify-center",
2420
+ "bg-white box-border border border-gray03",
2421
+ "hover:bg-gray08 hover:border-transparent",
2422
+ // border-none 대신 border-transparent가 레이아웃 덜 흔들려!
2423
+ "active:bg-gray09 active:border-transparent",
2424
+ "transition-colors cursor-pointer",
2425
+ className
2426
+ ),
2427
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(IconPlus, { className: "text-gray04 group-hover:text-white w-5 h-5" })
2428
+ }
2429
+ );
2430
+ };
2299
2431
  // Annotate the CommonJS export names for ESM import in node:
2300
2432
  0 && (module.exports = {
2301
2433
  Accordion,
@@ -2314,6 +2446,7 @@ var HeaderBar = ({ className, children, onClick, active, ...props }) => {
2314
2446
  ColumnText,
2315
2447
  ColumnTextStyle,
2316
2448
  Dropdown,
2449
+ EmptyState,
2317
2450
  FormCheckBox,
2318
2451
  FormColor,
2319
2452
  FormFile,
@@ -2342,6 +2475,8 @@ var HeaderBar = ({ className, children, onClick, active, ...props }) => {
2342
2475
  SearchBar,
2343
2476
  SelectBoxOption,
2344
2477
  SideRadioAccordion,
2478
+ SlotAddButton,
2479
+ SlotButton,
2345
2480
  TNB,
2346
2481
  TabSwitch,
2347
2482
  Tag,