@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.mjs CHANGED
@@ -276,6 +276,23 @@ var IconClose = ({ className, stroke }) => {
276
276
  }
277
277
  );
278
278
  };
279
+ var IconPlus = ({ className, stroke }) => {
280
+ return /* @__PURE__ */ jsxs(
281
+ "svg",
282
+ {
283
+ className,
284
+ width: "20",
285
+ height: "20",
286
+ viewBox: "0 0 20 20",
287
+ fill: "none",
288
+ xmlns: "http://www.w3.org/2000/svg",
289
+ children: [
290
+ /* @__PURE__ */ jsx("path", { d: "M16.6673 10.0013H3.33398", stroke: stroke || "currentColor" }),
291
+ /* @__PURE__ */ jsx("path", { d: "M9.99902 3.33203V16.6654", stroke: stroke || "currentColor" })
292
+ ]
293
+ }
294
+ );
295
+ };
279
296
  var IconMinus = ({ className, stroke }) => {
280
297
  return /* @__PURE__ */ jsx(
281
298
  "svg",
@@ -1559,6 +1576,7 @@ var Badge2 = ({ label, className }) => {
1559
1576
  };
1560
1577
 
1561
1578
  // src/components/Tag/Tag.tsx
1579
+ import chroma from "chroma-js";
1562
1580
  import { jsx as jsx36 } from "react/jsx-runtime";
1563
1581
  var Tag = ({
1564
1582
  className,
@@ -1569,6 +1587,11 @@ var Tag = ({
1569
1587
  onClick,
1570
1588
  ...props
1571
1589
  }) => {
1590
+ const customStyles = bgColor ? {
1591
+ "--tag-bg": bgColor,
1592
+ "--tag-bg-hover": chroma(bgColor).set("hsl.l", "-0.07").css(),
1593
+ "--tag-bg-active": chroma(bgColor).set("hsl.l", "-0.12").css()
1594
+ } : void 0;
1572
1595
  return /* @__PURE__ */ jsx36(
1573
1596
  "button",
1574
1597
  {
@@ -1576,17 +1599,19 @@ var Tag = ({
1576
1599
  "tag",
1577
1600
  "w-fit h-8 px-2.5",
1578
1601
  "text-primary text-body2-regular transition-colors",
1579
- "box-border border border-gray02",
1580
- "bg-white",
1581
- // bgColor && `bg-[${bgColor}] border-none`,
1582
- onClick && "cursor-pointer hover:bg-gray00 active:bg-gray01 cursor-pointer has-clickable",
1602
+ "box-border",
1603
+ bgColor ? "bg-[var(--tag-bg)] border-none" : "bg-white border border-gray02",
1604
+ onClick && [
1605
+ "cursor-pointer has-clickable",
1606
+ bgColor ? "hover:bg-[var(--tag-bg-hover)] active:bg-[var(--tag-bg-active)]" : "hover:bg-gray00 active:bg-gray01"
1607
+ ],
1583
1608
  selected && "text-white bg-black border-black hover:bg-black active:bg-black",
1584
1609
  "disabled:text-gray04 disabled:bg-gray02 disabled:border-gray02 disabled:cursor-not-allowed",
1585
1610
  className
1586
1611
  ),
1587
1612
  onClick,
1588
1613
  disabled,
1589
- style: bgColor ? { backgroundColor: bgColor, border: "none" } : void 0,
1614
+ style: customStyles,
1590
1615
  ...props,
1591
1616
  children: /* @__PURE__ */ jsx36("span", { children })
1592
1617
  }
@@ -2279,23 +2304,18 @@ var SlotButton = ({
2279
2304
  className: cn(
2280
2305
  // 자식 요소들을 겹치기 위해 relative 추가
2281
2306
  "relative h-7 w-7 rounded-full flex items-center justify-center transition-colors",
2282
- showMinusIcon ? "bg-gray09 cursor-pointer" : cn(
2283
- !color && "bg-black",
2284
- blocked && "bg-white box-border border border-gray03",
2285
- className
2286
- )
2307
+ reserved && "box-border border border-gray08",
2308
+ showMinusIcon ? "border-transparent bg-gray08 active:bg-gray09 cursor-pointer" : cn(!color && "bg-black", className)
2287
2309
  ),
2288
2310
  children: [
2289
- !reserved && /* @__PURE__ */ jsx44(
2290
- "div",
2311
+ blocked && /* @__PURE__ */ jsx44(
2312
+ "span",
2291
2313
  {
2292
2314
  className: cn(
2293
- // absolute로 위치를 고정하고 투명도로 애니메이션 처리
2294
- "absolute h-3.5 w-3.5 rounded-full bg-white transition-opacity",
2295
- blocked && "box-border border border-gray03",
2315
+ "absolute text-head4-regular text-gray08 transition-opacity",
2296
2316
  showMinusIcon ? "opacity-0" : "opacity-100"
2297
- // 호버 시 스르륵 사라짐
2298
- )
2317
+ ),
2318
+ children: "!"
2299
2319
  }
2300
2320
  ),
2301
2321
  isEditing && /* @__PURE__ */ jsx44(
@@ -2313,6 +2333,29 @@ var SlotButton = ({
2313
2333
  }
2314
2334
  );
2315
2335
  };
2336
+
2337
+ // src/components/SlotButton/SlotAddButton.tsx
2338
+ import { jsx as jsx45 } from "react/jsx-runtime";
2339
+ var SlotAddButton = ({ onClick, className }) => {
2340
+ return /* @__PURE__ */ jsx45(
2341
+ "button",
2342
+ {
2343
+ onClick,
2344
+ className: cn(
2345
+ "group",
2346
+ // 1. 부모에 group 클래스 추가!
2347
+ "h-7 w-7 rounded-full flex items-center justify-center",
2348
+ "bg-white box-border border border-gray03",
2349
+ "hover:bg-gray08 hover:border-transparent",
2350
+ // border-none 대신 border-transparent가 레이아웃 덜 흔들려!
2351
+ "active:bg-gray09 active:border-transparent",
2352
+ "transition-colors cursor-pointer",
2353
+ className
2354
+ ),
2355
+ children: /* @__PURE__ */ jsx45(IconPlus, { className: "text-gray04 group-hover:text-white w-5 h-5" })
2356
+ }
2357
+ );
2358
+ };
2316
2359
  export {
2317
2360
  Accordion,
2318
2361
  BackButton,
@@ -2359,6 +2402,7 @@ export {
2359
2402
  SearchBar,
2360
2403
  SelectBoxOption,
2361
2404
  SideRadioAccordion,
2405
+ SlotAddButton,
2362
2406
  SlotButton,
2363
2407
  TNB,
2364
2408
  TabSwitch,