@hivcd-printshop/design-system 1.6.0 → 1.8.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 +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +72 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +61 -17
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -1
package/dist/index.d.mts
CHANGED
|
@@ -646,4 +646,10 @@ interface SlotButtonProps {
|
|
|
646
646
|
}
|
|
647
647
|
declare const SlotButton: ({ onClick, isEditing, reserved, blocked, color, className, }: SlotButtonProps) => react.JSX.Element;
|
|
648
648
|
|
|
649
|
-
|
|
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
|
@@ -646,4 +646,10 @@ interface SlotButtonProps {
|
|
|
646
646
|
}
|
|
647
647
|
declare const SlotButton: ({ onClick, isEditing, reserved, blocked, color, className, }: SlotButtonProps) => react.JSX.Element;
|
|
648
648
|
|
|
649
|
-
|
|
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
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __export = (target, all) => {
|
|
8
10
|
for (var name in all)
|
|
@@ -16,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
18
|
}
|
|
17
19
|
return to;
|
|
18
20
|
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
19
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
30
|
|
|
21
31
|
// src/index.ts
|
|
@@ -66,6 +76,7 @@ __export(index_exports, {
|
|
|
66
76
|
SearchBar: () => SearchBar,
|
|
67
77
|
SelectBoxOption: () => SelectBoxOption,
|
|
68
78
|
SideRadioAccordion: () => SideRadioAccordion,
|
|
79
|
+
SlotAddButton: () => SlotAddButton,
|
|
69
80
|
SlotButton: () => SlotButton,
|
|
70
81
|
TNB: () => TNB,
|
|
71
82
|
TabSwitch: () => TabSwitch,
|
|
@@ -355,6 +366,23 @@ var IconClose = ({ className, stroke }) => {
|
|
|
355
366
|
}
|
|
356
367
|
);
|
|
357
368
|
};
|
|
369
|
+
var IconPlus = ({ className, stroke }) => {
|
|
370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
371
|
+
"svg",
|
|
372
|
+
{
|
|
373
|
+
className,
|
|
374
|
+
width: "20",
|
|
375
|
+
height: "20",
|
|
376
|
+
viewBox: "0 0 20 20",
|
|
377
|
+
fill: "none",
|
|
378
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
379
|
+
children: [
|
|
380
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M16.6673 10.0013H3.33398", stroke: stroke || "currentColor" }),
|
|
381
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M9.99902 3.33203V16.6654", stroke: stroke || "currentColor" })
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
);
|
|
385
|
+
};
|
|
358
386
|
var IconMinus = ({ className, stroke }) => {
|
|
359
387
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
360
388
|
"svg",
|
|
@@ -1638,6 +1666,7 @@ var Badge2 = ({ label, className }) => {
|
|
|
1638
1666
|
};
|
|
1639
1667
|
|
|
1640
1668
|
// src/components/Tag/Tag.tsx
|
|
1669
|
+
var import_chroma_js = __toESM(require("chroma-js"));
|
|
1641
1670
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1642
1671
|
var Tag = ({
|
|
1643
1672
|
className,
|
|
@@ -1648,6 +1677,11 @@ var Tag = ({
|
|
|
1648
1677
|
onClick,
|
|
1649
1678
|
...props
|
|
1650
1679
|
}) => {
|
|
1680
|
+
const customStyles = bgColor ? {
|
|
1681
|
+
"--tag-bg": bgColor,
|
|
1682
|
+
"--tag-bg-hover": (0, import_chroma_js.default)(bgColor).set("hsl.l", "-0.07").css(),
|
|
1683
|
+
"--tag-bg-active": (0, import_chroma_js.default)(bgColor).set("hsl.l", "-0.12").css()
|
|
1684
|
+
} : void 0;
|
|
1651
1685
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1652
1686
|
"button",
|
|
1653
1687
|
{
|
|
@@ -1655,17 +1689,19 @@ var Tag = ({
|
|
|
1655
1689
|
"tag",
|
|
1656
1690
|
"w-fit h-8 px-2.5",
|
|
1657
1691
|
"text-primary text-body2-regular transition-colors",
|
|
1658
|
-
"box-border
|
|
1659
|
-
"bg-white",
|
|
1660
|
-
|
|
1661
|
-
|
|
1692
|
+
"box-border",
|
|
1693
|
+
bgColor ? "bg-[var(--tag-bg)] border-none" : "bg-white border border-gray02",
|
|
1694
|
+
onClick && [
|
|
1695
|
+
"cursor-pointer has-clickable",
|
|
1696
|
+
bgColor ? "hover:bg-[var(--tag-bg-hover)] active:bg-[var(--tag-bg-active)]" : "hover:bg-gray00 active:bg-gray01"
|
|
1697
|
+
],
|
|
1662
1698
|
selected && "text-white bg-black border-black hover:bg-black active:bg-black",
|
|
1663
1699
|
"disabled:text-gray04 disabled:bg-gray02 disabled:border-gray02 disabled:cursor-not-allowed",
|
|
1664
1700
|
className
|
|
1665
1701
|
),
|
|
1666
1702
|
onClick,
|
|
1667
1703
|
disabled,
|
|
1668
|
-
style:
|
|
1704
|
+
style: customStyles,
|
|
1669
1705
|
...props,
|
|
1670
1706
|
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children })
|
|
1671
1707
|
}
|
|
@@ -2353,23 +2389,18 @@ var SlotButton = ({
|
|
|
2353
2389
|
className: cn(
|
|
2354
2390
|
// 자식 요소들을 겹치기 위해 relative 추가
|
|
2355
2391
|
"relative h-7 w-7 rounded-full flex items-center justify-center transition-colors",
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
blocked && "bg-white box-border border border-gray03",
|
|
2359
|
-
className
|
|
2360
|
-
)
|
|
2392
|
+
reserved && "box-border border border-gray08",
|
|
2393
|
+
showMinusIcon ? "border-transparent bg-gray08 active:bg-gray09 cursor-pointer" : cn(!color && "bg-black", className)
|
|
2361
2394
|
),
|
|
2362
2395
|
children: [
|
|
2363
|
-
|
|
2364
|
-
"
|
|
2396
|
+
blocked && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2397
|
+
"span",
|
|
2365
2398
|
{
|
|
2366
2399
|
className: cn(
|
|
2367
|
-
|
|
2368
|
-
"absolute h-3.5 w-3.5 rounded-full bg-white transition-opacity",
|
|
2369
|
-
blocked && "box-border border border-gray03",
|
|
2400
|
+
"absolute text-head4-regular text-gray08 transition-opacity",
|
|
2370
2401
|
showMinusIcon ? "opacity-0" : "opacity-100"
|
|
2371
|
-
|
|
2372
|
-
|
|
2402
|
+
),
|
|
2403
|
+
children: "!"
|
|
2373
2404
|
}
|
|
2374
2405
|
),
|
|
2375
2406
|
isEditing && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
@@ -2387,6 +2418,29 @@ var SlotButton = ({
|
|
|
2387
2418
|
}
|
|
2388
2419
|
);
|
|
2389
2420
|
};
|
|
2421
|
+
|
|
2422
|
+
// src/components/SlotButton/SlotAddButton.tsx
|
|
2423
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2424
|
+
var SlotAddButton = ({ onClick, className }) => {
|
|
2425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2426
|
+
"button",
|
|
2427
|
+
{
|
|
2428
|
+
onClick,
|
|
2429
|
+
className: cn(
|
|
2430
|
+
"group",
|
|
2431
|
+
// 1. 부모에 group 클래스 추가!
|
|
2432
|
+
"h-7 w-7 rounded-full flex items-center justify-center",
|
|
2433
|
+
"bg-white box-border border border-gray03",
|
|
2434
|
+
"hover:bg-gray08 hover:border-transparent",
|
|
2435
|
+
// border-none 대신 border-transparent가 레이아웃 덜 흔들려!
|
|
2436
|
+
"active:bg-gray09 active:border-transparent",
|
|
2437
|
+
"transition-colors cursor-pointer",
|
|
2438
|
+
className
|
|
2439
|
+
),
|
|
2440
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(IconPlus, { className: "text-gray04 group-hover:text-white w-5 h-5" })
|
|
2441
|
+
}
|
|
2442
|
+
);
|
|
2443
|
+
};
|
|
2390
2444
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2391
2445
|
0 && (module.exports = {
|
|
2392
2446
|
Accordion,
|
|
@@ -2434,6 +2488,7 @@ var SlotButton = ({
|
|
|
2434
2488
|
SearchBar,
|
|
2435
2489
|
SelectBoxOption,
|
|
2436
2490
|
SideRadioAccordion,
|
|
2491
|
+
SlotAddButton,
|
|
2437
2492
|
SlotButton,
|
|
2438
2493
|
TNB,
|
|
2439
2494
|
TabSwitch,
|