@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 +27 -4
- package/dist/index.d.ts +27 -4
- package/dist/index.js +135 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +132 -0
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -276,6 +276,37 @@ 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
|
+
};
|
|
296
|
+
var IconMinus = ({ className, stroke }) => {
|
|
297
|
+
return /* @__PURE__ */ jsx(
|
|
298
|
+
"svg",
|
|
299
|
+
{
|
|
300
|
+
className,
|
|
301
|
+
width: "20",
|
|
302
|
+
height: "20",
|
|
303
|
+
viewBox: "0 0 20 20",
|
|
304
|
+
fill: "none",
|
|
305
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
306
|
+
children: /* @__PURE__ */ jsx("path", { d: "M16.6673 10.0013H3.33398", stroke: stroke || "currentColor" })
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
};
|
|
279
310
|
|
|
280
311
|
// src/components/Accordion/Accordion.tsx
|
|
281
312
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -2224,6 +2255,104 @@ var HeaderBar = ({ className, children, onClick, active, ...props }) => {
|
|
|
2224
2255
|
}
|
|
2225
2256
|
);
|
|
2226
2257
|
};
|
|
2258
|
+
|
|
2259
|
+
// src/components/EmptyState/EmptyState.tsx
|
|
2260
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2261
|
+
var EmptyState = ({ className, children }) => {
|
|
2262
|
+
return /* @__PURE__ */ jsx43(
|
|
2263
|
+
"div",
|
|
2264
|
+
{
|
|
2265
|
+
className: cn(
|
|
2266
|
+
"empty-state",
|
|
2267
|
+
"flex items-center justify-center h-full w-full",
|
|
2268
|
+
"text-body3-regular text-strong",
|
|
2269
|
+
className
|
|
2270
|
+
),
|
|
2271
|
+
children: children ?? "No content available."
|
|
2272
|
+
}
|
|
2273
|
+
);
|
|
2274
|
+
};
|
|
2275
|
+
|
|
2276
|
+
// src/components/SlotButton/SlotButton.tsx
|
|
2277
|
+
import { useState as useState8 } from "react";
|
|
2278
|
+
import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2279
|
+
var SlotButton = ({
|
|
2280
|
+
onClick,
|
|
2281
|
+
isEditing,
|
|
2282
|
+
reserved,
|
|
2283
|
+
blocked,
|
|
2284
|
+
color,
|
|
2285
|
+
className
|
|
2286
|
+
}) => {
|
|
2287
|
+
const [isHovered, setIsHovered] = useState8(false);
|
|
2288
|
+
const showMinusIcon = isEditing && isHovered;
|
|
2289
|
+
return /* @__PURE__ */ jsxs25(
|
|
2290
|
+
"button",
|
|
2291
|
+
{
|
|
2292
|
+
onClick,
|
|
2293
|
+
onMouseEnter: isEditing ? () => setIsHovered(true) : void 0,
|
|
2294
|
+
onMouseLeave: isEditing ? () => setIsHovered(false) : void 0,
|
|
2295
|
+
style: !showMinusIcon && color ? { backgroundColor: color } : void 0,
|
|
2296
|
+
className: cn(
|
|
2297
|
+
// 자식 요소들을 겹치기 위해 relative 추가
|
|
2298
|
+
"relative h-7 w-7 rounded-full flex items-center justify-center transition-colors",
|
|
2299
|
+
showMinusIcon ? "bg-gray09 cursor-pointer" : cn(
|
|
2300
|
+
!color && "bg-black",
|
|
2301
|
+
blocked && "bg-white box-border border border-gray03",
|
|
2302
|
+
className
|
|
2303
|
+
)
|
|
2304
|
+
),
|
|
2305
|
+
children: [
|
|
2306
|
+
!reserved && /* @__PURE__ */ jsx44(
|
|
2307
|
+
"div",
|
|
2308
|
+
{
|
|
2309
|
+
className: cn(
|
|
2310
|
+
// absolute로 위치를 고정하고 투명도로 애니메이션 처리
|
|
2311
|
+
"absolute h-3.5 w-3.5 rounded-full bg-white transition-opacity",
|
|
2312
|
+
blocked && "box-border border border-gray03",
|
|
2313
|
+
showMinusIcon ? "opacity-0" : "opacity-100"
|
|
2314
|
+
// 호버 시 스르륵 사라짐
|
|
2315
|
+
)
|
|
2316
|
+
}
|
|
2317
|
+
),
|
|
2318
|
+
isEditing && /* @__PURE__ */ jsx44(
|
|
2319
|
+
IconMinus,
|
|
2320
|
+
{
|
|
2321
|
+
className: cn(
|
|
2322
|
+
// absolute로 위치를 고정하고 투명도로 애니메이션 처리
|
|
2323
|
+
"absolute text-white w-5 h-5 transition-opacity",
|
|
2324
|
+
showMinusIcon ? "opacity-100" : "opacity-0"
|
|
2325
|
+
// 호버 시 스르륵 나타남
|
|
2326
|
+
)
|
|
2327
|
+
}
|
|
2328
|
+
)
|
|
2329
|
+
]
|
|
2330
|
+
}
|
|
2331
|
+
);
|
|
2332
|
+
};
|
|
2333
|
+
|
|
2334
|
+
// src/components/SlotButton/SlotAddButton.tsx
|
|
2335
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2336
|
+
var SlotAddButton = ({ onClick, className }) => {
|
|
2337
|
+
return /* @__PURE__ */ jsx45(
|
|
2338
|
+
"button",
|
|
2339
|
+
{
|
|
2340
|
+
onClick,
|
|
2341
|
+
className: cn(
|
|
2342
|
+
"group",
|
|
2343
|
+
// 1. 부모에 group 클래스 추가!
|
|
2344
|
+
"h-7 w-7 rounded-full flex items-center justify-center",
|
|
2345
|
+
"bg-white box-border border border-gray03",
|
|
2346
|
+
"hover:bg-gray08 hover:border-transparent",
|
|
2347
|
+
// border-none 대신 border-transparent가 레이아웃 덜 흔들려!
|
|
2348
|
+
"active:bg-gray09 active:border-transparent",
|
|
2349
|
+
"transition-colors cursor-pointer",
|
|
2350
|
+
className
|
|
2351
|
+
),
|
|
2352
|
+
children: /* @__PURE__ */ jsx45(IconPlus, { className: "text-gray04 group-hover:text-white w-5 h-5" })
|
|
2353
|
+
}
|
|
2354
|
+
);
|
|
2355
|
+
};
|
|
2227
2356
|
export {
|
|
2228
2357
|
Accordion,
|
|
2229
2358
|
BackButton,
|
|
@@ -2241,6 +2370,7 @@ export {
|
|
|
2241
2370
|
ColumnText,
|
|
2242
2371
|
ColumnTextStyle,
|
|
2243
2372
|
Dropdown,
|
|
2373
|
+
EmptyState,
|
|
2244
2374
|
FormCheckBox,
|
|
2245
2375
|
FormColor,
|
|
2246
2376
|
FormFile,
|
|
@@ -2269,6 +2399,8 @@ export {
|
|
|
2269
2399
|
SearchBar,
|
|
2270
2400
|
SelectBoxOption,
|
|
2271
2401
|
SideRadioAccordion,
|
|
2402
|
+
SlotAddButton,
|
|
2403
|
+
SlotButton,
|
|
2272
2404
|
TNB,
|
|
2273
2405
|
TabSwitch,
|
|
2274
2406
|
Tag,
|