@hivcd-printshop/design-system 1.2.3 → 1.3.1
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 +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +339 -259
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +328 -249
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
// src/components/Accordion/Accordion.tsx
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
|
|
3
6
|
// src/lib/cn.ts
|
|
4
7
|
import { clsx } from "clsx";
|
|
5
8
|
import { extendTailwindMerge } from "tailwind-merge";
|
|
@@ -27,6 +30,21 @@ function cn(...inputs) {
|
|
|
27
30
|
return twMerge(clsx(inputs));
|
|
28
31
|
}
|
|
29
32
|
|
|
33
|
+
// src/lib/useControllableState.ts
|
|
34
|
+
import { useCallback, useState } from "react";
|
|
35
|
+
function useControllableState(controlled, defaultValue) {
|
|
36
|
+
const isControlled = controlled !== void 0;
|
|
37
|
+
const [uncontrolled, setUncontrolled] = useState(defaultValue);
|
|
38
|
+
const value = isControlled ? controlled : uncontrolled;
|
|
39
|
+
const setValue = useCallback(
|
|
40
|
+
(next) => {
|
|
41
|
+
if (!isControlled) setUncontrolled(next);
|
|
42
|
+
},
|
|
43
|
+
[isControlled]
|
|
44
|
+
);
|
|
45
|
+
return [value, setValue, isControlled];
|
|
46
|
+
}
|
|
47
|
+
|
|
30
48
|
// src/assets/svgs/Icons.tsx
|
|
31
49
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
32
50
|
var IconChevronDownXS = ({
|
|
@@ -190,8 +208,8 @@ var IconRadioSelected = ({
|
|
|
190
208
|
fill: "none",
|
|
191
209
|
xmlns: "http://www.w3.org/2000/svg",
|
|
192
210
|
children: [
|
|
193
|
-
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "7", stroke: stroke || "#121212" }),
|
|
194
|
-
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "
|
|
211
|
+
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "7", stroke: stroke || "#121212", strokeWidth: "1.5" }),
|
|
212
|
+
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "3.5", fill: fill || "#121212" })
|
|
195
213
|
]
|
|
196
214
|
}
|
|
197
215
|
);
|
|
@@ -209,7 +227,7 @@ var IconRadioUnselected = ({
|
|
|
209
227
|
viewBox: "0 0 16 16",
|
|
210
228
|
fill: "none",
|
|
211
229
|
xmlns: "http://www.w3.org/2000/svg",
|
|
212
|
-
children: /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "7", stroke: stroke || "#
|
|
230
|
+
children: /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "7", stroke: stroke || "#505865", strokeWidth: "1.5" })
|
|
213
231
|
}
|
|
214
232
|
);
|
|
215
233
|
};
|
|
@@ -259,10 +277,88 @@ var IconClose = ({ className, stroke }) => {
|
|
|
259
277
|
);
|
|
260
278
|
};
|
|
261
279
|
|
|
280
|
+
// src/components/Accordion/Accordion.tsx
|
|
281
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
282
|
+
var Accordion = forwardRef(function Accordion2({
|
|
283
|
+
step,
|
|
284
|
+
title,
|
|
285
|
+
children,
|
|
286
|
+
headerRight,
|
|
287
|
+
collapsible = true,
|
|
288
|
+
defaultOpen = true,
|
|
289
|
+
open,
|
|
290
|
+
onOpenChange,
|
|
291
|
+
stickyHeader = false,
|
|
292
|
+
className,
|
|
293
|
+
headerClassName,
|
|
294
|
+
contentClassName
|
|
295
|
+
}, ref) {
|
|
296
|
+
const [isOpen, setIsOpen] = useControllableState(open, defaultOpen);
|
|
297
|
+
const expanded = collapsible ? isOpen : true;
|
|
298
|
+
const toggleOpen = () => {
|
|
299
|
+
if (!collapsible) return;
|
|
300
|
+
const next = !isOpen;
|
|
301
|
+
setIsOpen(next);
|
|
302
|
+
onOpenChange?.(next);
|
|
303
|
+
};
|
|
304
|
+
return /* @__PURE__ */ jsxs2("div", { ref, className: cn("w-full bg-white", className), children: [
|
|
305
|
+
/* @__PURE__ */ jsx2(
|
|
306
|
+
AccordionHeader,
|
|
307
|
+
{
|
|
308
|
+
step,
|
|
309
|
+
title,
|
|
310
|
+
headerRight,
|
|
311
|
+
isOpen: expanded,
|
|
312
|
+
collapsible,
|
|
313
|
+
onClick: toggleOpen,
|
|
314
|
+
className: cn(stickyHeader && "sticky top-0 z-10", headerClassName)
|
|
315
|
+
}
|
|
316
|
+
),
|
|
317
|
+
expanded && /* @__PURE__ */ jsx2("div", { className: contentClassName, children })
|
|
318
|
+
] });
|
|
319
|
+
});
|
|
320
|
+
var AccordionHeader = ({
|
|
321
|
+
step,
|
|
322
|
+
title,
|
|
323
|
+
headerRight,
|
|
324
|
+
isOpen,
|
|
325
|
+
collapsible,
|
|
326
|
+
onClick,
|
|
327
|
+
className
|
|
328
|
+
}) => {
|
|
329
|
+
const label = /* @__PURE__ */ jsxs2("span", { className: "truncate", children: [
|
|
330
|
+
step,
|
|
331
|
+
" | ",
|
|
332
|
+
title
|
|
333
|
+
] });
|
|
334
|
+
const base = "w-full flex items-center justify-between gap-3 px-5 py-2.5 text-head3-medium text-primary text-left bg-white border-b border-gray02";
|
|
335
|
+
if (!collapsible) {
|
|
336
|
+
return /* @__PURE__ */ jsxs2("div", { className: cn(base, className), children: [
|
|
337
|
+
label,
|
|
338
|
+
headerRight
|
|
339
|
+
] });
|
|
340
|
+
}
|
|
341
|
+
return /* @__PURE__ */ jsxs2(
|
|
342
|
+
"button",
|
|
343
|
+
{
|
|
344
|
+
type: "button",
|
|
345
|
+
onClick,
|
|
346
|
+
className: cn(base, "cursor-pointer hover:bg-gray00 active:bg-gray01", className),
|
|
347
|
+
children: [
|
|
348
|
+
label,
|
|
349
|
+
/* @__PURE__ */ jsxs2("span", { className: "flex shrink-0 items-center gap-3", children: [
|
|
350
|
+
headerRight,
|
|
351
|
+
/* @__PURE__ */ jsx2(IconChevronDownXS, { className: cn("transition-transform", isOpen && "rotate-180") })
|
|
352
|
+
] })
|
|
353
|
+
]
|
|
354
|
+
}
|
|
355
|
+
);
|
|
356
|
+
};
|
|
357
|
+
|
|
262
358
|
// src/components/BackButton/BackButton.tsx
|
|
263
|
-
import { jsx as
|
|
359
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
264
360
|
var BackButton = ({ onClick, className }) => {
|
|
265
|
-
return /* @__PURE__ */
|
|
361
|
+
return /* @__PURE__ */ jsx3(
|
|
266
362
|
"button",
|
|
267
363
|
{
|
|
268
364
|
type: "button",
|
|
@@ -275,13 +371,13 @@ var BackButton = ({ onClick, className }) => {
|
|
|
275
371
|
"cursor-pointer",
|
|
276
372
|
className
|
|
277
373
|
),
|
|
278
|
-
children: /* @__PURE__ */
|
|
374
|
+
children: /* @__PURE__ */ jsx3(IconGoBack, {})
|
|
279
375
|
}
|
|
280
376
|
);
|
|
281
377
|
};
|
|
282
378
|
|
|
283
379
|
// src/components/CTA/CTA.tsx
|
|
284
|
-
import { jsx as
|
|
380
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
285
381
|
var CTA = ({
|
|
286
382
|
primary = false,
|
|
287
383
|
alert = false,
|
|
@@ -292,7 +388,7 @@ var CTA = ({
|
|
|
292
388
|
forModal = false,
|
|
293
389
|
...props
|
|
294
390
|
}) => {
|
|
295
|
-
return /* @__PURE__ */
|
|
391
|
+
return /* @__PURE__ */ jsx4(
|
|
296
392
|
"button",
|
|
297
393
|
{
|
|
298
394
|
type: "button",
|
|
@@ -320,22 +416,22 @@ var CTA = ({
|
|
|
320
416
|
};
|
|
321
417
|
|
|
322
418
|
// src/components/Column/MultiColumn.tsx
|
|
323
|
-
import { jsx as
|
|
419
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
324
420
|
var MultiColumnMain = ({ children, className }) => {
|
|
325
|
-
return /* @__PURE__ */
|
|
421
|
+
return /* @__PURE__ */ jsx5("div", { className: cn("flex flex-col w-full h-full", className), children });
|
|
326
422
|
};
|
|
327
423
|
var Columns = ({ children, className }) => {
|
|
328
424
|
return (
|
|
329
425
|
// flex 래퍼를 사용하고 하위 Column들이 flex-1을 가지게 하거나,
|
|
330
426
|
// grid를 사용하여 열을 나눌 수 있어. 여기서는 flex를 활용한 균등 분할 예시야.
|
|
331
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ jsx5("div", { className: cn("flex w-full h-full divide-x divide-gray02", className), children })
|
|
332
428
|
);
|
|
333
429
|
};
|
|
334
430
|
var CTAs = ({ children, className }) => {
|
|
335
431
|
if (!children) return null;
|
|
336
432
|
return (
|
|
337
433
|
// CTA 버튼들을 중앙에 배치하는 예시 (우측 정렬이 필요하면 justify-end 사용)
|
|
338
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ jsx5("div", { className: cn("flex flex-col w-full h-fit", className), children })
|
|
339
435
|
);
|
|
340
436
|
};
|
|
341
437
|
var MultiColumn = Object.assign(MultiColumnMain, {
|
|
@@ -344,78 +440,78 @@ var MultiColumn = Object.assign(MultiColumnMain, {
|
|
|
344
440
|
});
|
|
345
441
|
|
|
346
442
|
// src/components/Column/Column.tsx
|
|
347
|
-
import { jsx as
|
|
443
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
348
444
|
var Column = ({ className, children, header }) => {
|
|
349
|
-
return /* @__PURE__ */
|
|
350
|
-
header && /* @__PURE__ */
|
|
445
|
+
return /* @__PURE__ */ jsxs3("div", { className: cn("flex flex-col gap-5", "h-full w-full px-5 py-3", className), children: [
|
|
446
|
+
header && /* @__PURE__ */ jsx6("h1", { className: cn("text-body1-medium text-primary"), children: header }),
|
|
351
447
|
children
|
|
352
448
|
] });
|
|
353
449
|
};
|
|
354
450
|
|
|
355
451
|
// src/components/Column/ColumnContentContainer.tsx
|
|
356
|
-
import { jsx as
|
|
452
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
357
453
|
var ColumnContentContainer = ({ className, children }) => {
|
|
358
|
-
return /* @__PURE__ */
|
|
454
|
+
return /* @__PURE__ */ jsx7("div", { className: cn("flex flex-col gap-1.5 w-full h-fit", className), children });
|
|
359
455
|
};
|
|
360
456
|
|
|
361
457
|
// src/components/Column/ColumnLabel.tsx
|
|
362
|
-
import { jsx as
|
|
458
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
363
459
|
var ColumnLabel = ({ className, children, subLabel, htmlFor }) => {
|
|
364
|
-
return /* @__PURE__ */
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
subLabel && /* @__PURE__ */
|
|
460
|
+
return /* @__PURE__ */ jsxs4("label", { htmlFor, className: cn("flex gap-1.5 items-end", className), children: [
|
|
461
|
+
/* @__PURE__ */ jsx8("span", { className: cn("text-body2-regular text-tertiary"), children }),
|
|
462
|
+
subLabel && /* @__PURE__ */ jsx8("span", { className: cn("text-caption-book text-quaternary"), children: subLabel })
|
|
367
463
|
] });
|
|
368
464
|
};
|
|
369
465
|
|
|
370
466
|
// src/components/Column/ColumnText.tsx
|
|
371
|
-
import { jsx as
|
|
467
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
372
468
|
var ColumnTextStyle = "text-body3-book text-strong";
|
|
373
469
|
var ModalTextStyle = "text-body1-regular text-primary";
|
|
374
470
|
var ColumnText = ({ className, alert = false, children, onClick }) => {
|
|
375
|
-
return /* @__PURE__ */
|
|
471
|
+
return /* @__PURE__ */ jsx9("div", { className: cn(ColumnTextStyle, alert && "text-danger", className), onClick, children: children ? children : "-" });
|
|
376
472
|
};
|
|
377
473
|
|
|
378
474
|
// src/components/Column/ColumnSubTitle.tsx
|
|
379
|
-
import { jsx as
|
|
475
|
+
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
380
476
|
var ColumnSubTitle = ({
|
|
381
477
|
className,
|
|
382
478
|
children,
|
|
383
479
|
action,
|
|
384
480
|
as: Tag2 = "h2"
|
|
385
481
|
}) => {
|
|
386
|
-
return /* @__PURE__ */
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
action && /* @__PURE__ */
|
|
482
|
+
return /* @__PURE__ */ jsxs5(Tag2, { className: cn("flex items-center justify-between gap-1.5", "w-full", className), children: [
|
|
483
|
+
/* @__PURE__ */ jsx10("span", { className: cn("text-body1-medium text-primary"), children }),
|
|
484
|
+
action && /* @__PURE__ */ jsx10("span", { className: "flex shrink-0 items-center", children: action })
|
|
389
485
|
] });
|
|
390
486
|
};
|
|
391
487
|
|
|
392
488
|
// src/components/Column/ColumnDescription.tsx
|
|
393
|
-
import { jsx as
|
|
489
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
394
490
|
var ColumnDescription = ({
|
|
395
491
|
className,
|
|
396
492
|
children,
|
|
397
493
|
bullet = true
|
|
398
494
|
}) => {
|
|
399
|
-
return /* @__PURE__ */
|
|
400
|
-
bullet && /* @__PURE__ */
|
|
401
|
-
/* @__PURE__ */
|
|
495
|
+
return /* @__PURE__ */ jsxs6("div", { className: cn("flex items-start gap-3", className), children: [
|
|
496
|
+
bullet && /* @__PURE__ */ jsx11("span", { className: "flex shrink-0 items-center py-1", children: /* @__PURE__ */ jsx11(IconCompass, { className: "size-4" }) }),
|
|
497
|
+
/* @__PURE__ */ jsx11("div", { className: "min-w-0 flex-1 whitespace-pre-line text-body3-book text-primary", children })
|
|
402
498
|
] });
|
|
403
499
|
};
|
|
404
500
|
var ColumnDescriptionList = ({ className, children }) => {
|
|
405
|
-
return /* @__PURE__ */
|
|
501
|
+
return /* @__PURE__ */ jsx11("div", { className: cn("flex flex-col gap-4", className), children });
|
|
406
502
|
};
|
|
407
503
|
|
|
408
504
|
// src/components/Form/BasicFormField.tsx
|
|
409
|
-
import { jsx as
|
|
505
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
410
506
|
var BasicFormField = ({
|
|
411
507
|
children,
|
|
412
508
|
isDanger,
|
|
413
509
|
dangerText,
|
|
414
510
|
className
|
|
415
511
|
}) => {
|
|
416
|
-
return /* @__PURE__ */
|
|
512
|
+
return /* @__PURE__ */ jsxs7("div", { className: cn("flex flex-col gap-1.5", className), children: [
|
|
417
513
|
children,
|
|
418
|
-
isDanger && dangerText && /* @__PURE__ */
|
|
514
|
+
isDanger && dangerText && /* @__PURE__ */ jsx12("span", { className: "text-caption-book text-danger", children: dangerText })
|
|
419
515
|
] });
|
|
420
516
|
};
|
|
421
517
|
var getInputStyles = (isDanger, additionalClass) => {
|
|
@@ -434,15 +530,15 @@ var getInputStyles = (isDanger, additionalClass) => {
|
|
|
434
530
|
};
|
|
435
531
|
|
|
436
532
|
// src/components/Form/FormText.tsx
|
|
437
|
-
import { jsx as
|
|
533
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
438
534
|
var FormText = ({ className, isDanger, dangerText, ...props }) => {
|
|
439
|
-
return /* @__PURE__ */
|
|
535
|
+
return /* @__PURE__ */ jsx13(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ jsx13("input", { type: "text", className: getInputStyles(isDanger, className), ...props }) });
|
|
440
536
|
};
|
|
441
537
|
|
|
442
538
|
// src/components/Form/FormTextArea.tsx
|
|
443
|
-
import { jsx as
|
|
539
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
444
540
|
var FormTextArea = ({ className, isDanger, dangerText, ...props }) => {
|
|
445
|
-
return /* @__PURE__ */
|
|
541
|
+
return /* @__PURE__ */ jsx14(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ jsx14(
|
|
446
542
|
"textarea",
|
|
447
543
|
{
|
|
448
544
|
className: getInputStyles(isDanger, "resize-none h-30 px-4 py-2.5 " + (className || "")),
|
|
@@ -452,19 +548,19 @@ var FormTextArea = ({ className, isDanger, dangerText, ...props }) => {
|
|
|
452
548
|
};
|
|
453
549
|
|
|
454
550
|
// src/components/Form/FormNumber.tsx
|
|
455
|
-
import { jsx as
|
|
551
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
456
552
|
var FormNumber = ({ className, isDanger, dangerText, ...props }) => {
|
|
457
|
-
return /* @__PURE__ */
|
|
553
|
+
return /* @__PURE__ */ jsx15(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ jsx15("input", { type: "number", className: getInputStyles(isDanger, className), ...props }) });
|
|
458
554
|
};
|
|
459
555
|
|
|
460
556
|
// src/components/Form/FormPassword.tsx
|
|
461
|
-
import { jsx as
|
|
557
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
462
558
|
var FormPassword = ({ className, isDanger, dangerText, ...props }) => {
|
|
463
|
-
return /* @__PURE__ */
|
|
559
|
+
return /* @__PURE__ */ jsx16(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ jsx16("input", { type: "password", className: getInputStyles(isDanger, className), ...props }) });
|
|
464
560
|
};
|
|
465
561
|
|
|
466
562
|
// src/components/Form/FormTel.tsx
|
|
467
|
-
import { jsx as
|
|
563
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
468
564
|
var FormTel = ({ className, isDanger, dangerText, onChange, ...props }) => {
|
|
469
565
|
const handlePhoneChange = (e) => {
|
|
470
566
|
const rawValue = e.target.value.replace(/[^0-9]/g, "");
|
|
@@ -476,7 +572,7 @@ var FormTel = ({ className, isDanger, dangerText, onChange, ...props }) => {
|
|
|
476
572
|
e.target.value = formattedValue;
|
|
477
573
|
if (onChange) onChange(e);
|
|
478
574
|
};
|
|
479
|
-
return /* @__PURE__ */
|
|
575
|
+
return /* @__PURE__ */ jsx17(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ jsx17(
|
|
480
576
|
"input",
|
|
481
577
|
{
|
|
482
578
|
type: "tel",
|
|
@@ -489,8 +585,8 @@ var FormTel = ({ className, isDanger, dangerText, onChange, ...props }) => {
|
|
|
489
585
|
};
|
|
490
586
|
|
|
491
587
|
// src/components/Form/FormColor.tsx
|
|
492
|
-
import { useState } from "react";
|
|
493
|
-
import { jsx as
|
|
588
|
+
import { useState as useState2 } from "react";
|
|
589
|
+
import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
494
590
|
var FormColor = ({
|
|
495
591
|
className,
|
|
496
592
|
isDanger,
|
|
@@ -500,7 +596,7 @@ var FormColor = ({
|
|
|
500
596
|
onChange,
|
|
501
597
|
...props
|
|
502
598
|
}) => {
|
|
503
|
-
const [internalColor, setInternalColor] =
|
|
599
|
+
const [internalColor, setInternalColor] = useState2(
|
|
504
600
|
value || defaultValue || "#000000"
|
|
505
601
|
);
|
|
506
602
|
const color = value !== void 0 ? value : internalColor;
|
|
@@ -508,7 +604,7 @@ var FormColor = ({
|
|
|
508
604
|
setInternalColor(e.target.value);
|
|
509
605
|
onChange?.(e);
|
|
510
606
|
};
|
|
511
|
-
return /* @__PURE__ */
|
|
607
|
+
return /* @__PURE__ */ jsx18(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ jsxs8(
|
|
512
608
|
"label",
|
|
513
609
|
{
|
|
514
610
|
className: getInputStyles(
|
|
@@ -517,7 +613,7 @@ var FormColor = ({
|
|
|
517
613
|
"flex items-center gap-2 relative focus-within:border-black focus-within:hover:bg-white" + (className || "")
|
|
518
614
|
),
|
|
519
615
|
children: [
|
|
520
|
-
/* @__PURE__ */
|
|
616
|
+
/* @__PURE__ */ jsx18("div", { className: "w-6 h-6 shrink-0 overflow-hidden", style: { backgroundColor: color }, children: /* @__PURE__ */ jsx18(
|
|
521
617
|
"input",
|
|
522
618
|
{
|
|
523
619
|
type: "color",
|
|
@@ -527,15 +623,15 @@ var FormColor = ({
|
|
|
527
623
|
...props
|
|
528
624
|
}
|
|
529
625
|
) }),
|
|
530
|
-
/* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ jsx18("span", { className: "text-primary text-body3-regular uppercase flex-1 select-none", children: color })
|
|
531
627
|
]
|
|
532
628
|
}
|
|
533
629
|
) });
|
|
534
630
|
};
|
|
535
631
|
|
|
536
632
|
// src/components/Form/FormFile.tsx
|
|
537
|
-
import { useState as
|
|
538
|
-
import { jsx as
|
|
633
|
+
import { useState as useState3 } from "react";
|
|
634
|
+
import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
539
635
|
var FormFile = ({
|
|
540
636
|
className,
|
|
541
637
|
isDanger,
|
|
@@ -545,7 +641,7 @@ var FormFile = ({
|
|
|
545
641
|
onChange,
|
|
546
642
|
...props
|
|
547
643
|
}) => {
|
|
548
|
-
const [selectedFile, setSelectedFile] =
|
|
644
|
+
const [selectedFile, setSelectedFile] = useState3(null);
|
|
549
645
|
const handleFileChange = (e) => {
|
|
550
646
|
const originalFile = e.target.files?.[0];
|
|
551
647
|
if (!originalFile) {
|
|
@@ -596,7 +692,7 @@ var FormFile = ({
|
|
|
596
692
|
}
|
|
597
693
|
};
|
|
598
694
|
const displayFileName = selectedFile?.name || (fileUrl ? fileUrl.split("/").pop() : null);
|
|
599
|
-
return /* @__PURE__ */
|
|
695
|
+
return /* @__PURE__ */ jsx19(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ jsxs9(
|
|
600
696
|
"div",
|
|
601
697
|
{
|
|
602
698
|
className: getInputStyles(
|
|
@@ -609,7 +705,7 @@ var FormFile = ({
|
|
|
609
705
|
)
|
|
610
706
|
),
|
|
611
707
|
children: [
|
|
612
|
-
displayFileName && /* @__PURE__ */
|
|
708
|
+
displayFileName && /* @__PURE__ */ jsx19(
|
|
613
709
|
"span",
|
|
614
710
|
{
|
|
615
711
|
onClick: handleDownload,
|
|
@@ -618,9 +714,9 @@ var FormFile = ({
|
|
|
618
714
|
children: displayFileName
|
|
619
715
|
}
|
|
620
716
|
),
|
|
621
|
-
/* @__PURE__ */
|
|
622
|
-
/* @__PURE__ */
|
|
623
|
-
/* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ jsxs9("label", { className: "shrink-0 px-1 -mx-1 cursor-pointer", children: [
|
|
718
|
+
/* @__PURE__ */ jsx19("div", { className: "text-primary text-caption-regular underline", children: displayFileName ? "\uB2E4\uC2DC \uCCA8\uBD80" : "\uD30C\uC77C \uCCA8\uBD80" }),
|
|
719
|
+
/* @__PURE__ */ jsx19("input", { type: "file", className: "hidden", onChange: handleFileChange, ...props })
|
|
624
720
|
] })
|
|
625
721
|
]
|
|
626
722
|
}
|
|
@@ -628,7 +724,7 @@ var FormFile = ({
|
|
|
628
724
|
};
|
|
629
725
|
|
|
630
726
|
// src/components/Form/FormCheckBox.tsx
|
|
631
|
-
import { jsx as
|
|
727
|
+
import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
632
728
|
var FormCheckBox = ({
|
|
633
729
|
isChecked,
|
|
634
730
|
setIsChecked,
|
|
@@ -637,7 +733,7 @@ var FormCheckBox = ({
|
|
|
637
733
|
textStyle,
|
|
638
734
|
...props
|
|
639
735
|
}) => {
|
|
640
|
-
return /* @__PURE__ */
|
|
736
|
+
return /* @__PURE__ */ jsxs10(
|
|
641
737
|
"label",
|
|
642
738
|
{
|
|
643
739
|
className: cn(
|
|
@@ -648,7 +744,7 @@ var FormCheckBox = ({
|
|
|
648
744
|
className
|
|
649
745
|
),
|
|
650
746
|
children: [
|
|
651
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ jsx20(
|
|
652
748
|
"input",
|
|
653
749
|
{
|
|
654
750
|
type: "checkbox",
|
|
@@ -658,14 +754,14 @@ var FormCheckBox = ({
|
|
|
658
754
|
...props
|
|
659
755
|
}
|
|
660
756
|
),
|
|
661
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ jsx20(
|
|
662
758
|
"div",
|
|
663
759
|
{
|
|
664
760
|
className: cn(
|
|
665
761
|
"flex items-center justify-center w-5 h-5 shrink-0 rounded transition-colors",
|
|
666
762
|
"group-hover:bg-gray00 group-active:bg-gray01"
|
|
667
763
|
),
|
|
668
|
-
children: /* @__PURE__ */
|
|
764
|
+
children: /* @__PURE__ */ jsx20(
|
|
669
765
|
"div",
|
|
670
766
|
{
|
|
671
767
|
className: cn(
|
|
@@ -675,29 +771,29 @@ var FormCheckBox = ({
|
|
|
675
771
|
// 💡 3. 키보드 Tab 이동 시 접근성 향상 (포커스 링 표시)
|
|
676
772
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-black peer-focus-visible:ring-offset-1"
|
|
677
773
|
),
|
|
678
|
-
children: isChecked && /* @__PURE__ */
|
|
774
|
+
children: isChecked && /* @__PURE__ */ jsx20(IconCheck, {})
|
|
679
775
|
}
|
|
680
776
|
)
|
|
681
777
|
}
|
|
682
778
|
),
|
|
683
|
-
children && /* @__PURE__ */
|
|
779
|
+
children && /* @__PURE__ */ jsx20("span", { className: cn("text-body3-book text-primary", textStyle), children })
|
|
684
780
|
]
|
|
685
781
|
}
|
|
686
782
|
);
|
|
687
783
|
};
|
|
688
784
|
|
|
689
785
|
// src/components/Form/FormSelectBox.tsx
|
|
690
|
-
import { useEffect, useRef, useState as
|
|
786
|
+
import { useEffect, useRef, useState as useState4 } from "react";
|
|
691
787
|
|
|
692
788
|
// src/components/Form/SelectBoxOption.tsx
|
|
693
|
-
import { jsx as
|
|
789
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
694
790
|
var SelectBoxOption = ({
|
|
695
791
|
label,
|
|
696
792
|
onClick,
|
|
697
793
|
// selectedLabel,
|
|
698
794
|
className
|
|
699
795
|
}) => {
|
|
700
|
-
return /* @__PURE__ */
|
|
796
|
+
return /* @__PURE__ */ jsx21(
|
|
701
797
|
"li",
|
|
702
798
|
{
|
|
703
799
|
onClick,
|
|
@@ -719,7 +815,7 @@ var SelectBoxOption = ({
|
|
|
719
815
|
};
|
|
720
816
|
|
|
721
817
|
// src/components/Form/FormSelectBox.tsx
|
|
722
|
-
import { jsx as
|
|
818
|
+
import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
723
819
|
var FormSelectBox = ({
|
|
724
820
|
options,
|
|
725
821
|
value,
|
|
@@ -729,7 +825,7 @@ var FormSelectBox = ({
|
|
|
729
825
|
dangerText,
|
|
730
826
|
className
|
|
731
827
|
}) => {
|
|
732
|
-
const [isOpen, setIsOpen] =
|
|
828
|
+
const [isOpen, setIsOpen] = useState4(false);
|
|
733
829
|
const containerRef = useRef(null);
|
|
734
830
|
useEffect(() => {
|
|
735
831
|
const handleClickOutside = (event) => {
|
|
@@ -742,8 +838,8 @@ var FormSelectBox = ({
|
|
|
742
838
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
743
839
|
};
|
|
744
840
|
}, []);
|
|
745
|
-
return /* @__PURE__ */
|
|
746
|
-
/* @__PURE__ */
|
|
841
|
+
return /* @__PURE__ */ jsx22(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ jsxs11("div", { ref: containerRef, className: "relative w-full", children: [
|
|
842
|
+
/* @__PURE__ */ jsxs11(
|
|
747
843
|
"div",
|
|
748
844
|
{
|
|
749
845
|
tabIndex: 0,
|
|
@@ -763,8 +859,8 @@ var FormSelectBox = ({
|
|
|
763
859
|
setIsOpen((prev) => !prev);
|
|
764
860
|
},
|
|
765
861
|
children: [
|
|
766
|
-
/* @__PURE__ */
|
|
767
|
-
/* @__PURE__ */
|
|
862
|
+
/* @__PURE__ */ jsx22("span", { className: value ? "text-primary" : "text-quaternary", children: value || placeholder }),
|
|
863
|
+
/* @__PURE__ */ jsx22(
|
|
768
864
|
IconChevronDownXS,
|
|
769
865
|
{
|
|
770
866
|
className: cn("text-gray06 transition-transform", isOpen && "rotate-180"),
|
|
@@ -774,7 +870,7 @@ var FormSelectBox = ({
|
|
|
774
870
|
]
|
|
775
871
|
}
|
|
776
872
|
),
|
|
777
|
-
isOpen && /* @__PURE__ */
|
|
873
|
+
isOpen && /* @__PURE__ */ jsx22(
|
|
778
874
|
"ul",
|
|
779
875
|
{
|
|
780
876
|
className: cn(
|
|
@@ -784,7 +880,7 @@ var FormSelectBox = ({
|
|
|
784
880
|
"max-h-50 overflow-y-auto"
|
|
785
881
|
// 항목이 너무 많으면 스크롤 생성 (디자인 스펙: 그림자 없음)
|
|
786
882
|
),
|
|
787
|
-
children: options.map((option) => /* @__PURE__ */
|
|
883
|
+
children: options.map((option) => /* @__PURE__ */ jsx22(
|
|
788
884
|
SelectBoxOption,
|
|
789
885
|
{
|
|
790
886
|
label: option,
|
|
@@ -801,7 +897,7 @@ var FormSelectBox = ({
|
|
|
801
897
|
};
|
|
802
898
|
|
|
803
899
|
// src/components/TextButton/TextButton.tsx
|
|
804
|
-
import { Fragment, jsx as
|
|
900
|
+
import { Fragment, jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
805
901
|
var TextButton = ({
|
|
806
902
|
children,
|
|
807
903
|
icon,
|
|
@@ -811,10 +907,10 @@ var TextButton = ({
|
|
|
811
907
|
className,
|
|
812
908
|
...props
|
|
813
909
|
}) => {
|
|
814
|
-
const content = /* @__PURE__ */
|
|
815
|
-
icon && iconPosition === "left" && /* @__PURE__ */
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
icon && iconPosition === "right" && /* @__PURE__ */
|
|
910
|
+
const content = /* @__PURE__ */ jsxs12(Fragment, { children: [
|
|
911
|
+
icon && iconPosition === "left" && /* @__PURE__ */ jsx23("span", { className: "flex shrink-0 items-center", children: icon }),
|
|
912
|
+
/* @__PURE__ */ jsx23("span", { className: cn(underline && "underline underline-offset-2"), children }),
|
|
913
|
+
icon && iconPosition === "right" && /* @__PURE__ */ jsx23("span", { className: "flex shrink-0 items-center", children: icon })
|
|
818
914
|
] });
|
|
819
915
|
const classes = cn(
|
|
820
916
|
"inline-flex w-fit items-center gap-1 px-1 -mx-1",
|
|
@@ -829,17 +925,17 @@ var TextButton = ({
|
|
|
829
925
|
);
|
|
830
926
|
if (props.href !== void 0) {
|
|
831
927
|
const { href, ...rest } = props;
|
|
832
|
-
return /* @__PURE__ */
|
|
928
|
+
return /* @__PURE__ */ jsx23("a", { href, className: classes, ...rest, children: content });
|
|
833
929
|
}
|
|
834
930
|
const buttonProps = props;
|
|
835
|
-
return /* @__PURE__ */
|
|
931
|
+
return /* @__PURE__ */ jsx23("button", { type: "button", className: classes, ...buttonProps, children: content });
|
|
836
932
|
};
|
|
837
933
|
|
|
838
934
|
// src/components/Dropdown/Dropdown.tsx
|
|
839
|
-
import { useEffect as useEffect2, useRef as useRef2, useState as
|
|
840
|
-
import { jsx as
|
|
935
|
+
import { useEffect as useEffect2, useRef as useRef2, useState as useState5 } from "react";
|
|
936
|
+
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
841
937
|
var Dropdown = ({ selectedLabel, setSelectedLabel, labels, className }) => {
|
|
842
|
-
const [isOpen, setIsOpen] =
|
|
938
|
+
const [isOpen, setIsOpen] = useState5(false);
|
|
843
939
|
const containerRef = useRef2(null);
|
|
844
940
|
useEffect2(() => {
|
|
845
941
|
const handleClickOutside = (event) => {
|
|
@@ -852,8 +948,8 @@ var Dropdown = ({ selectedLabel, setSelectedLabel, labels, className }) => {
|
|
|
852
948
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
853
949
|
};
|
|
854
950
|
}, []);
|
|
855
|
-
return /* @__PURE__ */
|
|
856
|
-
/* @__PURE__ */
|
|
951
|
+
return /* @__PURE__ */ jsxs13("div", { ref: containerRef, className: "relative", children: [
|
|
952
|
+
/* @__PURE__ */ jsxs13(
|
|
857
953
|
"div",
|
|
858
954
|
{
|
|
859
955
|
className: cn(
|
|
@@ -866,8 +962,8 @@ var Dropdown = ({ selectedLabel, setSelectedLabel, labels, className }) => {
|
|
|
866
962
|
),
|
|
867
963
|
onClick: () => setIsOpen((prev) => !prev),
|
|
868
964
|
children: [
|
|
869
|
-
/* @__PURE__ */
|
|
870
|
-
/* @__PURE__ */
|
|
965
|
+
/* @__PURE__ */ jsx24("p", { children: selectedLabel }),
|
|
966
|
+
/* @__PURE__ */ jsx24(
|
|
871
967
|
IconChevronDownXS,
|
|
872
968
|
{
|
|
873
969
|
className: cn("text-gray06 transition-transform", isOpen && "rotate-180"),
|
|
@@ -877,7 +973,7 @@ var Dropdown = ({ selectedLabel, setSelectedLabel, labels, className }) => {
|
|
|
877
973
|
]
|
|
878
974
|
}
|
|
879
975
|
),
|
|
880
|
-
isOpen && /* @__PURE__ */
|
|
976
|
+
isOpen && /* @__PURE__ */ jsx24("div", { className: cn("absolute top-full right-0 z-10", "box-border border border-gray02"), children: labels.map((label) => /* @__PURE__ */ jsx24(
|
|
881
977
|
SelectBoxOption,
|
|
882
978
|
{
|
|
883
979
|
label,
|
|
@@ -893,7 +989,7 @@ var Dropdown = ({ selectedLabel, setSelectedLabel, labels, className }) => {
|
|
|
893
989
|
};
|
|
894
990
|
|
|
895
991
|
// src/components/ListView/List.tsx
|
|
896
|
-
import { jsx as
|
|
992
|
+
import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
897
993
|
function List({
|
|
898
994
|
className,
|
|
899
995
|
label1,
|
|
@@ -906,7 +1002,7 @@ function List({
|
|
|
906
1002
|
children,
|
|
907
1003
|
...props
|
|
908
1004
|
}) {
|
|
909
|
-
return /* @__PURE__ */
|
|
1005
|
+
return /* @__PURE__ */ jsxs14(
|
|
910
1006
|
"li",
|
|
911
1007
|
{
|
|
912
1008
|
className: cn(
|
|
@@ -921,11 +1017,11 @@ function List({
|
|
|
921
1017
|
...props,
|
|
922
1018
|
onClick,
|
|
923
1019
|
children: [
|
|
924
|
-
/* @__PURE__ */
|
|
925
|
-
/* @__PURE__ */
|
|
926
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ jsxs14("section", { className: cn("flex items-center gap-4"), children: [
|
|
1021
|
+
/* @__PURE__ */ jsx25("label", { className: cn("text-body2-regular"), children: label1 ? label1 : "-" }),
|
|
1022
|
+
/* @__PURE__ */ jsx25("div", { className: cn("flex items-center gap-2"), children })
|
|
927
1023
|
] }),
|
|
928
|
-
/* @__PURE__ */
|
|
1024
|
+
/* @__PURE__ */ jsx25(
|
|
929
1025
|
"label",
|
|
930
1026
|
{
|
|
931
1027
|
className: cn(
|
|
@@ -937,18 +1033,18 @@ function List({
|
|
|
937
1033
|
children: label2 ? label2 : "-"
|
|
938
1034
|
}
|
|
939
1035
|
),
|
|
940
|
-
/* @__PURE__ */
|
|
1036
|
+
/* @__PURE__ */ jsx25("label", { className: cn("text-body3-regular text-right"), children: label3 ? label3 : "-" })
|
|
941
1037
|
]
|
|
942
1038
|
}
|
|
943
1039
|
);
|
|
944
1040
|
}
|
|
945
1041
|
|
|
946
1042
|
// src/components/Modal/Modal.tsx
|
|
947
|
-
import { jsx as
|
|
1043
|
+
import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
948
1044
|
var ModalBase = ({ isVisible, header, children, className, onClose }) => {
|
|
949
1045
|
if (!isVisible) return null;
|
|
950
|
-
return /* @__PURE__ */
|
|
951
|
-
/* @__PURE__ */
|
|
1046
|
+
return /* @__PURE__ */ jsxs15("div", { className: cn("fixed inset-0 z-50"), children: [
|
|
1047
|
+
/* @__PURE__ */ jsx26(
|
|
952
1048
|
"div",
|
|
953
1049
|
{
|
|
954
1050
|
"aria-hidden": true,
|
|
@@ -956,7 +1052,7 @@ var ModalBase = ({ isVisible, header, children, className, onClose }) => {
|
|
|
956
1052
|
className: cn("fixed inset-0 z-1000 bg-[#212121]/30", onClose && "cursor-pointer")
|
|
957
1053
|
}
|
|
958
1054
|
),
|
|
959
|
-
/* @__PURE__ */
|
|
1055
|
+
/* @__PURE__ */ jsx26("div", { className: "fixed inset-0 z-1001 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxs15(
|
|
960
1056
|
"main",
|
|
961
1057
|
{
|
|
962
1058
|
role: "dialog",
|
|
@@ -969,7 +1065,7 @@ var ModalBase = ({ isVisible, header, children, className, onClose }) => {
|
|
|
969
1065
|
className
|
|
970
1066
|
),
|
|
971
1067
|
children: [
|
|
972
|
-
onClose && /* @__PURE__ */
|
|
1068
|
+
onClose && /* @__PURE__ */ jsx26(
|
|
973
1069
|
"button",
|
|
974
1070
|
{
|
|
975
1071
|
type: "button",
|
|
@@ -979,10 +1075,10 @@ var ModalBase = ({ isVisible, header, children, className, onClose }) => {
|
|
|
979
1075
|
"absolute right-3 top-3 flex size-8 items-center justify-center",
|
|
980
1076
|
"text-tertiary transition-colors hover:bg-gray00 active:bg-gray01 cursor-pointer"
|
|
981
1077
|
),
|
|
982
|
-
children: /* @__PURE__ */
|
|
1078
|
+
children: /* @__PURE__ */ jsx26(IconClose, {})
|
|
983
1079
|
}
|
|
984
1080
|
),
|
|
985
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ jsx26("h1", { className: cn("text-strong font-[500] text-[24px] leading-[32px]"), children: header }),
|
|
986
1082
|
children
|
|
987
1083
|
]
|
|
988
1084
|
}
|
|
@@ -990,7 +1086,7 @@ var ModalBase = ({ isVisible, header, children, className, onClose }) => {
|
|
|
990
1086
|
] });
|
|
991
1087
|
};
|
|
992
1088
|
var Contents = ({ children, className }) => {
|
|
993
|
-
return /* @__PURE__ */
|
|
1089
|
+
return /* @__PURE__ */ jsx26(
|
|
994
1090
|
"div",
|
|
995
1091
|
{
|
|
996
1092
|
className: cn(
|
|
@@ -1007,7 +1103,7 @@ var CTAs2 = ({ children, className, row = false }) => {
|
|
|
1007
1103
|
if (!children) return null;
|
|
1008
1104
|
return (
|
|
1009
1105
|
// CTA 버튼들을 중앙에 배치하는 예시 (우측 정렬이 필요하면 justify-end 사용)
|
|
1010
|
-
/* @__PURE__ */
|
|
1106
|
+
/* @__PURE__ */ jsx26(
|
|
1011
1107
|
"div",
|
|
1012
1108
|
{
|
|
1013
1109
|
className: cn(
|
|
@@ -1026,9 +1122,9 @@ var Modal = Object.assign(ModalBase, {
|
|
|
1026
1122
|
});
|
|
1027
1123
|
|
|
1028
1124
|
// src/components/Modal/ModalText.tsx
|
|
1029
|
-
import { jsx as
|
|
1125
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1030
1126
|
var ModalText = ({ children, className }) => {
|
|
1031
|
-
return /* @__PURE__ */
|
|
1127
|
+
return /* @__PURE__ */ jsx27(
|
|
1032
1128
|
"div",
|
|
1033
1129
|
{
|
|
1034
1130
|
className: cn(
|
|
@@ -1044,14 +1140,14 @@ var ModalText = ({ children, className }) => {
|
|
|
1044
1140
|
};
|
|
1045
1141
|
|
|
1046
1142
|
// src/components/createPost/CategorySegment.tsx
|
|
1047
|
-
import { jsx as
|
|
1143
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1048
1144
|
var CategorySegment = ({
|
|
1049
1145
|
selected = false,
|
|
1050
1146
|
label,
|
|
1051
1147
|
className,
|
|
1052
1148
|
onClick
|
|
1053
1149
|
}) => {
|
|
1054
|
-
return /* @__PURE__ */
|
|
1150
|
+
return /* @__PURE__ */ jsx28(
|
|
1055
1151
|
"div",
|
|
1056
1152
|
{
|
|
1057
1153
|
className: cn(
|
|
@@ -1071,7 +1167,7 @@ var CategorySegment = ({
|
|
|
1071
1167
|
};
|
|
1072
1168
|
|
|
1073
1169
|
// src/components/createPost/CategorySegmentedControl.tsx
|
|
1074
|
-
import { jsx as
|
|
1170
|
+
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1075
1171
|
var categorySegments = {
|
|
1076
1172
|
info: ["\uACF5\uC6A9 \uBB3C\uD488", "\uC77C\uBC18 \uAE30\uC790\uC7AC", "\uD2B9\uC218 \uAE30\uC790\uC7AC"],
|
|
1077
1173
|
archive: ["\uD504\uB9B0\uD2B8\uC2E4", "\uD64D\uC775\uC2DC\uB514"],
|
|
@@ -1085,8 +1181,8 @@ var CategorySegmentedControl = ({
|
|
|
1085
1181
|
className
|
|
1086
1182
|
}) => {
|
|
1087
1183
|
const segments = categorySegments[variable];
|
|
1088
|
-
return /* @__PURE__ */
|
|
1089
|
-
/* @__PURE__ */
|
|
1184
|
+
return /* @__PURE__ */ jsxs16("div", { className: cn("w-full h-fit flex items-center justify-start", className), children: [
|
|
1185
|
+
/* @__PURE__ */ jsx29(
|
|
1090
1186
|
"div",
|
|
1091
1187
|
{
|
|
1092
1188
|
className: cn(
|
|
@@ -1099,7 +1195,7 @@ var CategorySegmentedControl = ({
|
|
|
1099
1195
|
children: variable === "infoTag" ? "\uD0DC\uADF8 \uC120\uD0DD" : "\uCE74\uD14C\uACE0\uB9AC \uC120\uD0DD"
|
|
1100
1196
|
}
|
|
1101
1197
|
),
|
|
1102
|
-
segments.map((label) => /* @__PURE__ */
|
|
1198
|
+
segments.map((label) => /* @__PURE__ */ jsx29(
|
|
1103
1199
|
CategorySegment,
|
|
1104
1200
|
{
|
|
1105
1201
|
label,
|
|
@@ -1112,9 +1208,9 @@ var CategorySegmentedControl = ({
|
|
|
1112
1208
|
};
|
|
1113
1209
|
|
|
1114
1210
|
// src/components/createPost/TitleInput.tsx
|
|
1115
|
-
import { jsx as
|
|
1211
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1116
1212
|
var TitleInput = ({ title, onChange, className }) => {
|
|
1117
|
-
return /* @__PURE__ */
|
|
1213
|
+
return /* @__PURE__ */ jsx30(
|
|
1118
1214
|
"input",
|
|
1119
1215
|
{
|
|
1120
1216
|
type: "text",
|
|
@@ -1134,9 +1230,9 @@ var TitleInput = ({ title, onChange, className }) => {
|
|
|
1134
1230
|
};
|
|
1135
1231
|
|
|
1136
1232
|
// src/components/notice/NoticeBadge.tsx
|
|
1137
|
-
import { jsx as
|
|
1233
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1138
1234
|
var NoticeBadge = ({ variable, className, onClick }) => {
|
|
1139
|
-
return /* @__PURE__ */
|
|
1235
|
+
return /* @__PURE__ */ jsx31(
|
|
1140
1236
|
"button",
|
|
1141
1237
|
{
|
|
1142
1238
|
type: "button",
|
|
@@ -1157,7 +1253,7 @@ var NoticeBadge = ({ variable, className, onClick }) => {
|
|
|
1157
1253
|
};
|
|
1158
1254
|
|
|
1159
1255
|
// src/components/notice/NoticeBar.tsx
|
|
1160
|
-
import { jsx as
|
|
1256
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1161
1257
|
var NoticeBar = ({
|
|
1162
1258
|
variable = "default",
|
|
1163
1259
|
badgeVariable,
|
|
@@ -1166,7 +1262,7 @@ var NoticeBar = ({
|
|
|
1166
1262
|
className,
|
|
1167
1263
|
onClick
|
|
1168
1264
|
}) => {
|
|
1169
|
-
return /* @__PURE__ */
|
|
1265
|
+
return /* @__PURE__ */ jsxs17(
|
|
1170
1266
|
"div",
|
|
1171
1267
|
{
|
|
1172
1268
|
className: cn(
|
|
@@ -1178,20 +1274,20 @@ var NoticeBar = ({
|
|
|
1178
1274
|
),
|
|
1179
1275
|
onClick,
|
|
1180
1276
|
children: [
|
|
1181
|
-
/* @__PURE__ */
|
|
1182
|
-
/* @__PURE__ */
|
|
1183
|
-
/* @__PURE__ */
|
|
1277
|
+
/* @__PURE__ */ jsxs17("section", { className: "flex items-center gap-3", children: [
|
|
1278
|
+
/* @__PURE__ */ jsx32(NoticeBadge, { variable: badgeVariable }),
|
|
1279
|
+
/* @__PURE__ */ jsx32("h1", { className: "text-head1-medium text-strong", children: title })
|
|
1184
1280
|
] }),
|
|
1185
|
-
/* @__PURE__ */
|
|
1281
|
+
/* @__PURE__ */ jsx32("p", { className: "text-body3-book text-tertiary", children: date })
|
|
1186
1282
|
]
|
|
1187
1283
|
}
|
|
1188
1284
|
);
|
|
1189
1285
|
};
|
|
1190
1286
|
|
|
1191
1287
|
// src/components/SearchBar/SearchBar.tsx
|
|
1192
|
-
import { jsx as
|
|
1288
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1193
1289
|
var SearchBar = ({ value, onChange, className }) => {
|
|
1194
|
-
return /* @__PURE__ */
|
|
1290
|
+
return /* @__PURE__ */ jsxs18(
|
|
1195
1291
|
"label",
|
|
1196
1292
|
{
|
|
1197
1293
|
className: cn(
|
|
@@ -1202,8 +1298,8 @@ var SearchBar = ({ value, onChange, className }) => {
|
|
|
1202
1298
|
className
|
|
1203
1299
|
),
|
|
1204
1300
|
children: [
|
|
1205
|
-
/* @__PURE__ */
|
|
1206
|
-
/* @__PURE__ */
|
|
1301
|
+
/* @__PURE__ */ jsx33(IconSearch, {}),
|
|
1302
|
+
/* @__PURE__ */ jsx33(
|
|
1207
1303
|
"input",
|
|
1208
1304
|
{
|
|
1209
1305
|
type: "text",
|
|
@@ -1222,25 +1318,8 @@ var SearchBar = ({ value, onChange, className }) => {
|
|
|
1222
1318
|
};
|
|
1223
1319
|
|
|
1224
1320
|
// src/components/SideRadioAccordion/SideRadioAccordion.tsx
|
|
1225
|
-
import { forwardRef } from "react";
|
|
1226
|
-
|
|
1227
|
-
// src/lib/useControllableState.ts
|
|
1228
|
-
import { useCallback, useState as useState5 } from "react";
|
|
1229
|
-
function useControllableState(controlled, defaultValue) {
|
|
1230
|
-
const isControlled = controlled !== void 0;
|
|
1231
|
-
const [uncontrolled, setUncontrolled] = useState5(defaultValue);
|
|
1232
|
-
const value = isControlled ? controlled : uncontrolled;
|
|
1233
|
-
const setValue = useCallback(
|
|
1234
|
-
(next) => {
|
|
1235
|
-
if (!isControlled) setUncontrolled(next);
|
|
1236
|
-
},
|
|
1237
|
-
[isControlled]
|
|
1238
|
-
);
|
|
1239
|
-
return [value, setValue, isControlled];
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
// src/components/SideRadioAccordion/SideRadioAccordion.tsx
|
|
1243
|
-
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1321
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
1322
|
+
import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1244
1323
|
var printColorBgClass = {
|
|
1245
1324
|
Plotter: "bg-print-plotter",
|
|
1246
1325
|
Printer: "bg-print-printer",
|
|
@@ -1251,7 +1330,7 @@ var printColorBgClass = {
|
|
|
1251
1330
|
"Laser Cutting": "bg-print-laser-cutting"
|
|
1252
1331
|
};
|
|
1253
1332
|
var itemKey = (item) => item.value ?? item.title;
|
|
1254
|
-
var SideRadioAccordion =
|
|
1333
|
+
var SideRadioAccordion = forwardRef2(
|
|
1255
1334
|
function SideRadioAccordion2({
|
|
1256
1335
|
step,
|
|
1257
1336
|
title,
|
|
@@ -1284,8 +1363,8 @@ var SideRadioAccordion = forwardRef(
|
|
|
1284
1363
|
setIsOpen(next);
|
|
1285
1364
|
onOpenChange?.(next);
|
|
1286
1365
|
};
|
|
1287
|
-
return /* @__PURE__ */
|
|
1288
|
-
/* @__PURE__ */
|
|
1366
|
+
return /* @__PURE__ */ jsxs19("div", { ref, className: cn("w-full border-r border-gray02 bg-white", className), children: [
|
|
1367
|
+
/* @__PURE__ */ jsx34(
|
|
1289
1368
|
Stepper,
|
|
1290
1369
|
{
|
|
1291
1370
|
step,
|
|
@@ -1296,8 +1375,8 @@ var SideRadioAccordion = forwardRef(
|
|
|
1296
1375
|
className: cn(stickyHeader && "sticky top-0 z-10")
|
|
1297
1376
|
}
|
|
1298
1377
|
),
|
|
1299
|
-
expanded && /* @__PURE__ */
|
|
1300
|
-
radioToggleList.map((item) => /* @__PURE__ */
|
|
1378
|
+
expanded && /* @__PURE__ */ jsxs19("div", { className: "flex flex-col divide-y divide-gray02", children: [
|
|
1379
|
+
radioToggleList.map((item) => /* @__PURE__ */ jsx34(
|
|
1301
1380
|
RadioToggleItem,
|
|
1302
1381
|
{
|
|
1303
1382
|
...item,
|
|
@@ -1306,22 +1385,22 @@ var SideRadioAccordion = forwardRef(
|
|
|
1306
1385
|
},
|
|
1307
1386
|
itemKey(item)
|
|
1308
1387
|
)),
|
|
1309
|
-
quantityLimitLabel && /* @__PURE__ */
|
|
1388
|
+
quantityLimitLabel && /* @__PURE__ */ jsx34("div", { className: "px-5 py-4", children: /* @__PURE__ */ jsx34(TextButton2, { label: quantityLimitLabel, onClick: onClickQuantityLimit }) })
|
|
1310
1389
|
] })
|
|
1311
1390
|
] });
|
|
1312
1391
|
}
|
|
1313
1392
|
);
|
|
1314
1393
|
var Stepper = ({ step, title, isOpen, collapsible, onClick, className }) => {
|
|
1315
|
-
const label = /* @__PURE__ */
|
|
1394
|
+
const label = /* @__PURE__ */ jsxs19("span", { children: [
|
|
1316
1395
|
step,
|
|
1317
1396
|
" | ",
|
|
1318
1397
|
title
|
|
1319
1398
|
] });
|
|
1320
1399
|
const base = "w-full flex items-center justify-between px-5 py-2.5 text-head3-medium text-primary text-left bg-white border-b border-gray02";
|
|
1321
1400
|
if (!collapsible) {
|
|
1322
|
-
return /* @__PURE__ */
|
|
1401
|
+
return /* @__PURE__ */ jsx34("div", { className: cn(base, className), children: label });
|
|
1323
1402
|
}
|
|
1324
|
-
return /* @__PURE__ */
|
|
1403
|
+
return /* @__PURE__ */ jsxs19(
|
|
1325
1404
|
"button",
|
|
1326
1405
|
{
|
|
1327
1406
|
type: "button",
|
|
@@ -1329,7 +1408,7 @@ var Stepper = ({ step, title, isOpen, collapsible, onClick, className }) => {
|
|
|
1329
1408
|
className: cn(base, "cursor-pointer hover:bg-gray00 active:bg-gray01", className),
|
|
1330
1409
|
children: [
|
|
1331
1410
|
label,
|
|
1332
|
-
/* @__PURE__ */
|
|
1411
|
+
/* @__PURE__ */ jsx34(IconChevronDownXS, { className: cn("transition-transform", isOpen && "rotate-180") })
|
|
1333
1412
|
]
|
|
1334
1413
|
}
|
|
1335
1414
|
);
|
|
@@ -1343,40 +1422,41 @@ var RadioToggleItem = ({
|
|
|
1343
1422
|
className,
|
|
1344
1423
|
labelTextButton,
|
|
1345
1424
|
onClickTextButton,
|
|
1425
|
+
textButtonIcon = false,
|
|
1346
1426
|
open,
|
|
1347
1427
|
onSelect
|
|
1348
1428
|
}) => {
|
|
1349
1429
|
const rowBg = !open ? "bg-white hover:bg-gray00" : color ? void 0 : printColor ? printColorBgClass[printColor] : "bg-gray00";
|
|
1350
1430
|
const style = open && color ? { backgroundColor: color } : void 0;
|
|
1351
|
-
return /* @__PURE__ */
|
|
1352
|
-
/* @__PURE__ */
|
|
1431
|
+
return /* @__PURE__ */ jsxs19("div", { className: "w-full", children: [
|
|
1432
|
+
/* @__PURE__ */ jsxs19(
|
|
1353
1433
|
"button",
|
|
1354
1434
|
{
|
|
1355
1435
|
type: "button",
|
|
1356
1436
|
onClick: onSelect,
|
|
1357
1437
|
style,
|
|
1358
1438
|
className: cn(
|
|
1359
|
-
"group w-full flex items-center
|
|
1439
|
+
"group w-full flex items-center p-3",
|
|
1360
1440
|
"text-body1-regular text-left cursor-pointer",
|
|
1361
1441
|
open ? "text-strong" : "text-secondary",
|
|
1362
1442
|
rowBg,
|
|
1363
1443
|
className
|
|
1364
1444
|
),
|
|
1365
1445
|
children: [
|
|
1366
|
-
/* @__PURE__ */
|
|
1367
|
-
/* @__PURE__ */
|
|
1446
|
+
/* @__PURE__ */ jsx34(Radio, { selected: open }),
|
|
1447
|
+
/* @__PURE__ */ jsx34("span", { children: title })
|
|
1368
1448
|
]
|
|
1369
1449
|
}
|
|
1370
1450
|
),
|
|
1371
|
-
open && /* @__PURE__ */
|
|
1372
|
-
/* @__PURE__ */
|
|
1373
|
-
badges && badges.length > 0 && /* @__PURE__ */
|
|
1374
|
-
labelTextButton && /* @__PURE__ */
|
|
1451
|
+
open && /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-2 px-3 py-3 bg-white", children: [
|
|
1452
|
+
/* @__PURE__ */ jsx34("p", { className: "text-caption-regular text-secondary", children: content }),
|
|
1453
|
+
badges && badges.length > 0 && /* @__PURE__ */ jsx34("div", { className: "flex flex-wrap gap-1", children: badges.map((badge) => /* @__PURE__ */ jsx34(Badge, { label: badge }, badge)) }),
|
|
1454
|
+
labelTextButton && /* @__PURE__ */ jsx34(
|
|
1375
1455
|
TextButton2,
|
|
1376
1456
|
{
|
|
1377
1457
|
label: labelTextButton,
|
|
1378
1458
|
onClick: onClickTextButton,
|
|
1379
|
-
showIcon:
|
|
1459
|
+
showIcon: textButtonIcon,
|
|
1380
1460
|
className: "self-end"
|
|
1381
1461
|
}
|
|
1382
1462
|
)
|
|
@@ -1386,9 +1466,10 @@ var RadioToggleItem = ({
|
|
|
1386
1466
|
var Radio = ({ selected = false, className }) => {
|
|
1387
1467
|
const Icon = selected ? IconRadioSelected : IconRadioUnselected;
|
|
1388
1468
|
return (
|
|
1389
|
-
// 디자인 스펙(Figma "radio" 5:781):
|
|
1390
|
-
// 24px 원형 배경 칩만 나타난다(gray00/gray01).
|
|
1391
|
-
|
|
1469
|
+
// 디자인 스펙(Figma "radio" 5:781): 24px 히트 영역 안에 10px 원만 중앙에 그려진다.
|
|
1470
|
+
// 아이콘 자체 색은 고정, hover/pressed 시 24px 원형 배경 칩만 나타난다(gray00/gray01).
|
|
1471
|
+
// 부모 버튼의 group-hover/active로 동기화.
|
|
1472
|
+
/* @__PURE__ */ jsx34(
|
|
1392
1473
|
"span",
|
|
1393
1474
|
{
|
|
1394
1475
|
className: cn(
|
|
@@ -1396,13 +1477,13 @@ var Radio = ({ selected = false, className }) => {
|
|
|
1396
1477
|
"group-hover:bg-gray00 group-active:bg-gray01",
|
|
1397
1478
|
className
|
|
1398
1479
|
),
|
|
1399
|
-
children: /* @__PURE__ */
|
|
1480
|
+
children: /* @__PURE__ */ jsx34(Icon, { className: "size-2.5" })
|
|
1400
1481
|
}
|
|
1401
1482
|
)
|
|
1402
1483
|
);
|
|
1403
1484
|
};
|
|
1404
1485
|
var TextButton2 = ({ label, onClick, showIcon = false, className }) => {
|
|
1405
|
-
return /* @__PURE__ */
|
|
1486
|
+
return /* @__PURE__ */ jsxs19(
|
|
1406
1487
|
"button",
|
|
1407
1488
|
{
|
|
1408
1489
|
type: "button",
|
|
@@ -1415,14 +1496,14 @@ var TextButton2 = ({ label, onClick, showIcon = false, className }) => {
|
|
|
1415
1496
|
className
|
|
1416
1497
|
),
|
|
1417
1498
|
children: [
|
|
1418
|
-
showIcon && /* @__PURE__ */
|
|
1499
|
+
showIcon && /* @__PURE__ */ jsx34(IconExclamation, {}),
|
|
1419
1500
|
label
|
|
1420
1501
|
]
|
|
1421
1502
|
}
|
|
1422
1503
|
);
|
|
1423
1504
|
};
|
|
1424
1505
|
var Badge = ({ label, className }) => {
|
|
1425
|
-
return /* @__PURE__ */
|
|
1506
|
+
return /* @__PURE__ */ jsx34(
|
|
1426
1507
|
"div",
|
|
1427
1508
|
{
|
|
1428
1509
|
className: cn(
|
|
@@ -1436,7 +1517,7 @@ var Badge = ({ label, className }) => {
|
|
|
1436
1517
|
};
|
|
1437
1518
|
|
|
1438
1519
|
// src/components/Tag/Tag.tsx
|
|
1439
|
-
import { jsx as
|
|
1520
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1440
1521
|
var Tag = ({
|
|
1441
1522
|
className,
|
|
1442
1523
|
children,
|
|
@@ -1446,7 +1527,7 @@ var Tag = ({
|
|
|
1446
1527
|
onClick,
|
|
1447
1528
|
...props
|
|
1448
1529
|
}) => {
|
|
1449
|
-
return /* @__PURE__ */
|
|
1530
|
+
return /* @__PURE__ */ jsx35(
|
|
1450
1531
|
"button",
|
|
1451
1532
|
{
|
|
1452
1533
|
className: cn(
|
|
@@ -1465,16 +1546,16 @@ var Tag = ({
|
|
|
1465
1546
|
disabled,
|
|
1466
1547
|
style: bgColor ? { backgroundColor: bgColor, border: "none" } : void 0,
|
|
1467
1548
|
...props,
|
|
1468
|
-
children: /* @__PURE__ */
|
|
1549
|
+
children: /* @__PURE__ */ jsx35("span", { children })
|
|
1469
1550
|
}
|
|
1470
1551
|
);
|
|
1471
1552
|
};
|
|
1472
1553
|
|
|
1473
1554
|
// src/components/Timetable/Timetable.tsx
|
|
1474
|
-
import { forwardRef as
|
|
1555
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
1475
1556
|
|
|
1476
1557
|
// src/components/Timetable/WeekNavigation.tsx
|
|
1477
|
-
import { forwardRef as
|
|
1558
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
1478
1559
|
|
|
1479
1560
|
// src/components/Timetable/dateUtils.ts
|
|
1480
1561
|
var KOREAN_WEEKDAYS = ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"];
|
|
@@ -1507,18 +1588,18 @@ var formatWeekRange = (weekStart) => {
|
|
|
1507
1588
|
};
|
|
1508
1589
|
|
|
1509
1590
|
// src/components/Timetable/WeekNavigation.tsx
|
|
1510
|
-
import { jsx as
|
|
1591
|
+
import { jsx as jsx36, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1511
1592
|
var weekLabel = {
|
|
1512
1593
|
thisWeek: "\uC774\uBC88 \uC8FC",
|
|
1513
1594
|
nextWeek: "\uB2E4\uC74C \uC8FC",
|
|
1514
1595
|
twoWeeksLater: "\uB2E4\uB2E4\uC74C \uC8FC"
|
|
1515
1596
|
};
|
|
1516
|
-
var WeekNavigation =
|
|
1597
|
+
var WeekNavigation = forwardRef3(
|
|
1517
1598
|
function WeekNavigation2({ date, week, label, canPrev, canNext, onPrevWeek, onNextWeek, className }, ref) {
|
|
1518
1599
|
const showPrev = canPrev ?? (week ? week !== "thisWeek" : true);
|
|
1519
1600
|
const showNext = canNext ?? (week ? week !== "twoWeeksLater" : true);
|
|
1520
1601
|
const text = label ?? (week ? `${weekLabel[week]} (${formatWeekRange(date)})` : formatWeekRange(date));
|
|
1521
|
-
return /* @__PURE__ */
|
|
1602
|
+
return /* @__PURE__ */ jsxs20(
|
|
1522
1603
|
"div",
|
|
1523
1604
|
{
|
|
1524
1605
|
ref,
|
|
@@ -1530,26 +1611,22 @@ var WeekNavigation = forwardRef2(
|
|
|
1530
1611
|
className
|
|
1531
1612
|
),
|
|
1532
1613
|
children: [
|
|
1533
|
-
/* @__PURE__ */
|
|
1534
|
-
/* @__PURE__ */
|
|
1535
|
-
/* @__PURE__ */
|
|
1614
|
+
/* @__PURE__ */ jsx36(ArrowButton, { direction: "left", visible: showPrev, onClick: onPrevWeek }),
|
|
1615
|
+
/* @__PURE__ */ jsx36("span", { className: "flex flex-1 items-center justify-center text-center", children: text }),
|
|
1616
|
+
/* @__PURE__ */ jsx36(ArrowButton, { direction: "right", visible: showNext, onClick: onNextWeek })
|
|
1536
1617
|
]
|
|
1537
1618
|
}
|
|
1538
1619
|
);
|
|
1539
1620
|
}
|
|
1540
1621
|
);
|
|
1541
1622
|
var ArrowButton = ({ direction, visible, onClick }) => {
|
|
1542
|
-
const divider = /* @__PURE__ */
|
|
1623
|
+
const divider = /* @__PURE__ */ jsx36("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" });
|
|
1543
1624
|
if (!visible) {
|
|
1544
|
-
return /* @__PURE__ */
|
|
1545
|
-
direction === "right" && divider,
|
|
1546
|
-
/* @__PURE__ */ jsx35("span", { className: "w-[42px]" }),
|
|
1547
|
-
direction === "left" && divider
|
|
1548
|
-
] });
|
|
1625
|
+
return /* @__PURE__ */ jsx36("span", { "aria-hidden": true, className: "w-[43px]" });
|
|
1549
1626
|
}
|
|
1550
|
-
return /* @__PURE__ */
|
|
1627
|
+
return /* @__PURE__ */ jsxs20("div", { className: "flex items-stretch", children: [
|
|
1551
1628
|
direction === "right" && divider,
|
|
1552
|
-
/* @__PURE__ */
|
|
1629
|
+
/* @__PURE__ */ jsx36(
|
|
1553
1630
|
"button",
|
|
1554
1631
|
{
|
|
1555
1632
|
type: "button",
|
|
@@ -1559,7 +1636,7 @@ var ArrowButton = ({ direction, visible, onClick }) => {
|
|
|
1559
1636
|
"text-gray06 cursor-pointer transition-colors",
|
|
1560
1637
|
"hover:bg-gray00 active:bg-gray01"
|
|
1561
1638
|
),
|
|
1562
|
-
children: /* @__PURE__ */
|
|
1639
|
+
children: /* @__PURE__ */ jsx36(
|
|
1563
1640
|
IconChevronDownXS,
|
|
1564
1641
|
{
|
|
1565
1642
|
className: direction === "left" ? "rotate-90" : "-rotate-90",
|
|
@@ -1573,7 +1650,7 @@ var ArrowButton = ({ direction, visible, onClick }) => {
|
|
|
1573
1650
|
};
|
|
1574
1651
|
|
|
1575
1652
|
// src/components/Timetable/Timetable.tsx
|
|
1576
|
-
import { jsx as
|
|
1653
|
+
import { jsx as jsx37, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1577
1654
|
var printColorHoverClass = {
|
|
1578
1655
|
Plotter: "hover:bg-print-plotter",
|
|
1579
1656
|
Printer: "hover:bg-print-printer",
|
|
@@ -1583,7 +1660,7 @@ var printColorHoverClass = {
|
|
|
1583
1660
|
"Seet Cutting": "hover:bg-print-seet-cutting",
|
|
1584
1661
|
"Laser Cutting": "hover:bg-print-laser-cutting"
|
|
1585
1662
|
};
|
|
1586
|
-
var Timetable =
|
|
1663
|
+
var Timetable = forwardRef4(function Timetable2({
|
|
1587
1664
|
weekStart,
|
|
1588
1665
|
week,
|
|
1589
1666
|
days,
|
|
@@ -1596,8 +1673,8 @@ var Timetable = forwardRef3(function Timetable2({
|
|
|
1596
1673
|
canNextWeek,
|
|
1597
1674
|
className
|
|
1598
1675
|
}, ref) {
|
|
1599
|
-
return /* @__PURE__ */
|
|
1600
|
-
!hideWeekNavigation && /* @__PURE__ */
|
|
1676
|
+
return /* @__PURE__ */ jsxs21("div", { ref, className: cn(fluid && "w-full", className), children: [
|
|
1677
|
+
!hideWeekNavigation && /* @__PURE__ */ jsx37(
|
|
1601
1678
|
WeekNavigation,
|
|
1602
1679
|
{
|
|
1603
1680
|
date: weekStart,
|
|
@@ -1608,7 +1685,7 @@ var Timetable = forwardRef3(function Timetable2({
|
|
|
1608
1685
|
onNextWeek
|
|
1609
1686
|
}
|
|
1610
1687
|
),
|
|
1611
|
-
/* @__PURE__ */
|
|
1688
|
+
/* @__PURE__ */ jsx37("div", { className: cn("flex divide-x divide-gray02", fluid && "w-full"), children: days.map((day) => /* @__PURE__ */ jsx37(
|
|
1612
1689
|
DailyTimetable,
|
|
1613
1690
|
{
|
|
1614
1691
|
date: day.date,
|
|
@@ -1621,9 +1698,9 @@ var Timetable = forwardRef3(function Timetable2({
|
|
|
1621
1698
|
] });
|
|
1622
1699
|
});
|
|
1623
1700
|
var DailyTimetable = ({ date, slots, fluid, onSelectTime, className }) => {
|
|
1624
|
-
return /* @__PURE__ */
|
|
1625
|
-
/* @__PURE__ */
|
|
1626
|
-
slots.map((slot) => /* @__PURE__ */
|
|
1701
|
+
return /* @__PURE__ */ jsxs21("div", { className: cn("flex flex-col", fluid ? "flex-1 min-w-0" : "w-18", className), children: [
|
|
1702
|
+
/* @__PURE__ */ jsx37("div", { className: "h-12 flex items-center justify-center border-b border-gray02 text-body1-regular text-secondary", children: formatDayLabel(date) }),
|
|
1703
|
+
slots.map((slot) => /* @__PURE__ */ jsx37(
|
|
1627
1704
|
TimeItem,
|
|
1628
1705
|
{
|
|
1629
1706
|
state: slot.state,
|
|
@@ -1649,16 +1726,17 @@ var TimeItem = ({
|
|
|
1649
1726
|
}) => {
|
|
1650
1727
|
const clickable = (state === "default" || state === "selected") && !!onClick;
|
|
1651
1728
|
const style = state === "default" && color ? { "--tt-hover": color } : void 0;
|
|
1652
|
-
return /* @__PURE__ */
|
|
1729
|
+
return /* @__PURE__ */ jsx37(
|
|
1653
1730
|
"div",
|
|
1654
1731
|
{
|
|
1655
1732
|
onClick: clickable ? onClick : void 0,
|
|
1656
1733
|
style,
|
|
1657
1734
|
className: cn(
|
|
1658
|
-
"h-18 flex items-center justify-center
|
|
1735
|
+
"h-18 flex items-center justify-center",
|
|
1659
1736
|
fluid ? "w-full" : "w-18",
|
|
1660
1737
|
"text-body1-medium text-center bg-white text-primary",
|
|
1661
|
-
|
|
1738
|
+
// "none"(일정 없음)은 구분선을 그리지 않아 연속된 빈 칸이 하나의 덩어리로 보이게 한다.
|
|
1739
|
+
state === "none" ? "bg-gray00 text-transparent" : "border-b border-gray02",
|
|
1662
1740
|
state === "selected" && "bg-black text-white hover:cursor-pointer",
|
|
1663
1741
|
state === "disabled" && "bg-gray00 text-gray03",
|
|
1664
1742
|
state === "default" && [
|
|
@@ -1675,11 +1753,11 @@ var TimeItem = ({
|
|
|
1675
1753
|
// src/components/TNB/TNB.tsx
|
|
1676
1754
|
import {
|
|
1677
1755
|
Fragment as Fragment2,
|
|
1678
|
-
forwardRef as
|
|
1756
|
+
forwardRef as forwardRef5,
|
|
1679
1757
|
useCallback as useCallback2,
|
|
1680
1758
|
useState as useState6
|
|
1681
1759
|
} from "react";
|
|
1682
|
-
import { jsx as
|
|
1760
|
+
import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1683
1761
|
function useControllableState2(controlled, defaultValue) {
|
|
1684
1762
|
const isControlled = controlled !== void 0;
|
|
1685
1763
|
const [uncontrolled, setUncontrolled] = useState6(defaultValue);
|
|
@@ -1692,7 +1770,7 @@ function useControllableState2(controlled, defaultValue) {
|
|
|
1692
1770
|
);
|
|
1693
1771
|
return [value, setValue, isControlled];
|
|
1694
1772
|
}
|
|
1695
|
-
var TNB =
|
|
1773
|
+
var TNB = forwardRef5(function TNB2({
|
|
1696
1774
|
logo,
|
|
1697
1775
|
upperPartItemList,
|
|
1698
1776
|
upperPartIconList,
|
|
@@ -1731,8 +1809,8 @@ var TNB = forwardRef4(function TNB2({
|
|
|
1731
1809
|
setLowerValue(label);
|
|
1732
1810
|
onSelectedLowerChange?.(label);
|
|
1733
1811
|
};
|
|
1734
|
-
return /* @__PURE__ */
|
|
1735
|
-
/* @__PURE__ */
|
|
1812
|
+
return /* @__PURE__ */ jsxs22("nav", { ref, "aria-label": ariaLabel, className: cn("w-full bg-white", className), children: [
|
|
1813
|
+
/* @__PURE__ */ jsx38(
|
|
1736
1814
|
UpperPart,
|
|
1737
1815
|
{
|
|
1738
1816
|
logo,
|
|
@@ -1743,7 +1821,7 @@ var TNB = forwardRef4(function TNB2({
|
|
|
1743
1821
|
linkComponent
|
|
1744
1822
|
}
|
|
1745
1823
|
),
|
|
1746
|
-
/* @__PURE__ */
|
|
1824
|
+
/* @__PURE__ */ jsx38(
|
|
1747
1825
|
LowerPart,
|
|
1748
1826
|
{
|
|
1749
1827
|
lowerPartItemList: currentLowerItemList,
|
|
@@ -1754,11 +1832,11 @@ var TNB = forwardRef4(function TNB2({
|
|
|
1754
1832
|
)
|
|
1755
1833
|
] });
|
|
1756
1834
|
});
|
|
1757
|
-
var NavClickable =
|
|
1835
|
+
var NavClickable = forwardRef5(function NavClickable2({ href, onClick, linkComponent: Link, current, disabled, className, children }, ref) {
|
|
1758
1836
|
const ariaCurrent = current ? "page" : void 0;
|
|
1759
1837
|
if (href && !disabled) {
|
|
1760
1838
|
if (Link) {
|
|
1761
|
-
return /* @__PURE__ */
|
|
1839
|
+
return /* @__PURE__ */ jsx38(
|
|
1762
1840
|
Link,
|
|
1763
1841
|
{
|
|
1764
1842
|
href,
|
|
@@ -1770,7 +1848,7 @@ var NavClickable = forwardRef4(function NavClickable2({ href, onClick, linkCompo
|
|
|
1770
1848
|
}
|
|
1771
1849
|
);
|
|
1772
1850
|
}
|
|
1773
|
-
return /* @__PURE__ */
|
|
1851
|
+
return /* @__PURE__ */ jsx38(
|
|
1774
1852
|
"a",
|
|
1775
1853
|
{
|
|
1776
1854
|
href,
|
|
@@ -1782,7 +1860,7 @@ var NavClickable = forwardRef4(function NavClickable2({ href, onClick, linkCompo
|
|
|
1782
1860
|
}
|
|
1783
1861
|
);
|
|
1784
1862
|
}
|
|
1785
|
-
return /* @__PURE__ */
|
|
1863
|
+
return /* @__PURE__ */ jsx38(
|
|
1786
1864
|
"button",
|
|
1787
1865
|
{
|
|
1788
1866
|
type: "button",
|
|
@@ -1804,7 +1882,7 @@ var UpperPart = ({
|
|
|
1804
1882
|
linkComponent,
|
|
1805
1883
|
className
|
|
1806
1884
|
}) => {
|
|
1807
|
-
return /* @__PURE__ */
|
|
1885
|
+
return /* @__PURE__ */ jsxs22(
|
|
1808
1886
|
"div",
|
|
1809
1887
|
{
|
|
1810
1888
|
className: cn(
|
|
@@ -1812,12 +1890,12 @@ var UpperPart = ({
|
|
|
1812
1890
|
className
|
|
1813
1891
|
),
|
|
1814
1892
|
children: [
|
|
1815
|
-
/* @__PURE__ */
|
|
1816
|
-
/* @__PURE__ */
|
|
1817
|
-
/* @__PURE__ */
|
|
1818
|
-
/* @__PURE__ */
|
|
1819
|
-
upperPartItemList.map((item) => /* @__PURE__ */
|
|
1820
|
-
/* @__PURE__ */
|
|
1893
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-stretch", children: [
|
|
1894
|
+
/* @__PURE__ */ jsx38("div", { className: "flex w-14 shrink-0 items-center justify-center px-3", children: /* @__PURE__ */ jsx38(NavIconButton, { ...logo, linkComponent }) }),
|
|
1895
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-stretch", children: [
|
|
1896
|
+
/* @__PURE__ */ jsx38("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" }),
|
|
1897
|
+
upperPartItemList.map((item) => /* @__PURE__ */ jsxs22(Fragment2, { children: [
|
|
1898
|
+
/* @__PURE__ */ jsx38(
|
|
1821
1899
|
UpperPartTab,
|
|
1822
1900
|
{
|
|
1823
1901
|
label: item.label,
|
|
@@ -1830,15 +1908,15 @@ var UpperPart = ({
|
|
|
1830
1908
|
}
|
|
1831
1909
|
}
|
|
1832
1910
|
),
|
|
1833
|
-
/* @__PURE__ */
|
|
1911
|
+
/* @__PURE__ */ jsx38("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" })
|
|
1834
1912
|
] }, item.id ?? item.label))
|
|
1835
1913
|
] })
|
|
1836
1914
|
] }),
|
|
1837
|
-
/* @__PURE__ */
|
|
1838
|
-
/* @__PURE__ */
|
|
1839
|
-
upperPartIconList.map((icon, index) => /* @__PURE__ */
|
|
1840
|
-
/* @__PURE__ */
|
|
1841
|
-
/* @__PURE__ */
|
|
1915
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-stretch", children: [
|
|
1916
|
+
/* @__PURE__ */ jsx38("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" }),
|
|
1917
|
+
upperPartIconList.map((icon, index) => /* @__PURE__ */ jsxs22(Fragment2, { children: [
|
|
1918
|
+
/* @__PURE__ */ jsx38(NavIconButton, { ...icon, linkComponent }),
|
|
1919
|
+
/* @__PURE__ */ jsx38("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" })
|
|
1842
1920
|
] }, icon.id ?? icon.src ?? icon.label ?? index))
|
|
1843
1921
|
] })
|
|
1844
1922
|
]
|
|
@@ -1853,7 +1931,7 @@ var UpperPartTab = ({
|
|
|
1853
1931
|
linkComponent,
|
|
1854
1932
|
className
|
|
1855
1933
|
}) => {
|
|
1856
|
-
return /* @__PURE__ */
|
|
1934
|
+
return /* @__PURE__ */ jsxs22(
|
|
1857
1935
|
NavClickable,
|
|
1858
1936
|
{
|
|
1859
1937
|
href,
|
|
@@ -1868,17 +1946,17 @@ var UpperPartTab = ({
|
|
|
1868
1946
|
className
|
|
1869
1947
|
),
|
|
1870
1948
|
children: [
|
|
1871
|
-
/* @__PURE__ */
|
|
1872
|
-
/* @__PURE__ */
|
|
1949
|
+
/* @__PURE__ */ jsx38("span", { className: cn("px-5 text-head1-medium", selected ? "text-strong" : "text-quaternary"), children: label }),
|
|
1950
|
+
/* @__PURE__ */ jsx38("span", { className: cn("h-0.5 w-full", selected ? "bg-black" : "bg-transparent") })
|
|
1873
1951
|
]
|
|
1874
1952
|
}
|
|
1875
1953
|
);
|
|
1876
1954
|
};
|
|
1877
|
-
var NavIconButton =
|
|
1955
|
+
var NavIconButton = forwardRef5(
|
|
1878
1956
|
function NavIconButton2({ src, icon, alt, label, href, onClick, selected, badge, className, linkComponent }, forwardedRef) {
|
|
1879
1957
|
const interactive = Boolean(onClick || href);
|
|
1880
1958
|
const showBadge = badge !== void 0 && badge !== null && badge !== false;
|
|
1881
|
-
return /* @__PURE__ */
|
|
1959
|
+
return /* @__PURE__ */ jsxs22(
|
|
1882
1960
|
NavClickable,
|
|
1883
1961
|
{
|
|
1884
1962
|
ref: forwardedRef,
|
|
@@ -1894,9 +1972,9 @@ var NavIconButton = forwardRef4(
|
|
|
1894
1972
|
className
|
|
1895
1973
|
),
|
|
1896
1974
|
children: [
|
|
1897
|
-
icon ? /* @__PURE__ */
|
|
1898
|
-
label ? /* @__PURE__ */
|
|
1899
|
-
showBadge ? /* @__PURE__ */
|
|
1975
|
+
icon ? /* @__PURE__ */ jsx38("span", { className: "inline-flex h-6 w-6 items-center justify-center", children: icon }) : src ? /* @__PURE__ */ jsx38("img", { src, alt: alt ?? label ?? "", className: "h-6 w-6" }) : null,
|
|
1976
|
+
label ? /* @__PURE__ */ jsx38("span", { className: cn("text-body2-regular", selected ? "text-white" : "text-secondary"), children: label }) : null,
|
|
1977
|
+
showBadge ? /* @__PURE__ */ jsx38(
|
|
1900
1978
|
"span",
|
|
1901
1979
|
{
|
|
1902
1980
|
"aria-hidden": badge === true,
|
|
@@ -1922,14 +2000,14 @@ var LowerPart = ({
|
|
|
1922
2000
|
if (lowerPartItemList.length === 0) {
|
|
1923
2001
|
return null;
|
|
1924
2002
|
}
|
|
1925
|
-
return /* @__PURE__ */
|
|
2003
|
+
return /* @__PURE__ */ jsxs22(
|
|
1926
2004
|
"div",
|
|
1927
2005
|
{
|
|
1928
2006
|
className: cn("w-full h-[42px] pl-14 flex items-stretch border-b border-gray02", className),
|
|
1929
2007
|
children: [
|
|
1930
|
-
/* @__PURE__ */
|
|
1931
|
-
lowerPartItemList.map((item) => /* @__PURE__ */
|
|
1932
|
-
/* @__PURE__ */
|
|
2008
|
+
/* @__PURE__ */ jsx38("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" }),
|
|
2009
|
+
lowerPartItemList.map((item) => /* @__PURE__ */ jsxs22(Fragment2, { children: [
|
|
2010
|
+
/* @__PURE__ */ jsx38(
|
|
1933
2011
|
LowerPartItemButton,
|
|
1934
2012
|
{
|
|
1935
2013
|
label: item.label,
|
|
@@ -1942,7 +2020,7 @@ var LowerPart = ({
|
|
|
1942
2020
|
}
|
|
1943
2021
|
}
|
|
1944
2022
|
),
|
|
1945
|
-
/* @__PURE__ */
|
|
2023
|
+
/* @__PURE__ */ jsx38("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" })
|
|
1946
2024
|
] }, item.id ?? item.label))
|
|
1947
2025
|
]
|
|
1948
2026
|
}
|
|
@@ -1956,7 +2034,7 @@ var LowerPartItemButton = ({
|
|
|
1956
2034
|
linkComponent,
|
|
1957
2035
|
className
|
|
1958
2036
|
}) => {
|
|
1959
|
-
return /* @__PURE__ */
|
|
2037
|
+
return /* @__PURE__ */ jsx38(
|
|
1960
2038
|
NavClickable,
|
|
1961
2039
|
{
|
|
1962
2040
|
href,
|
|
@@ -1975,10 +2053,10 @@ var LowerPartItemButton = ({
|
|
|
1975
2053
|
};
|
|
1976
2054
|
|
|
1977
2055
|
// src/components/Toast/Toast.tsx
|
|
1978
|
-
import { forwardRef as
|
|
1979
|
-
import { jsx as
|
|
2056
|
+
import { forwardRef as forwardRef6, useEffect as useEffect3, useState as useState7 } from "react";
|
|
2057
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1980
2058
|
var EXIT_MS = 300;
|
|
1981
|
-
var Toast =
|
|
2059
|
+
var Toast = forwardRef6(function Toast2({ message, open, duration = 3e3, onClose, position = "none", className }, ref) {
|
|
1982
2060
|
const controlled = open !== void 0;
|
|
1983
2061
|
const [mounted, setMounted] = useState7(!controlled || open);
|
|
1984
2062
|
const [visible, setVisible] = useState7(!controlled || open);
|
|
@@ -1999,7 +2077,7 @@ var Toast = forwardRef5(function Toast2({ message, open, duration = 3e3, onClose
|
|
|
1999
2077
|
return () => clearTimeout(timer);
|
|
2000
2078
|
}, [controlled, open, duration, onClose]);
|
|
2001
2079
|
if (!mounted) return null;
|
|
2002
|
-
const banner = /* @__PURE__ */
|
|
2080
|
+
const banner = /* @__PURE__ */ jsx39(
|
|
2003
2081
|
"div",
|
|
2004
2082
|
{
|
|
2005
2083
|
ref,
|
|
@@ -2017,7 +2095,7 @@ var Toast = forwardRef5(function Toast2({ message, open, duration = 3e3, onClose
|
|
|
2017
2095
|
}
|
|
2018
2096
|
);
|
|
2019
2097
|
if (position === "none") return banner;
|
|
2020
|
-
return /* @__PURE__ */
|
|
2098
|
+
return /* @__PURE__ */ jsx39(
|
|
2021
2099
|
"div",
|
|
2022
2100
|
{
|
|
2023
2101
|
className: cn(
|
|
@@ -2029,6 +2107,7 @@ var Toast = forwardRef5(function Toast2({ message, open, duration = 3e3, onClose
|
|
|
2029
2107
|
);
|
|
2030
2108
|
});
|
|
2031
2109
|
export {
|
|
2110
|
+
Accordion,
|
|
2032
2111
|
BackButton,
|
|
2033
2112
|
BasicFormField,
|
|
2034
2113
|
CTA,
|