@hivcd-printshop/design-system 1.2.3 → 1.3.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 +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +331 -249
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +320 -239
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
// src/index.ts
|
|
22
22
|
var index_exports = {};
|
|
23
23
|
__export(index_exports, {
|
|
24
|
+
Accordion: () => Accordion,
|
|
24
25
|
BackButton: () => BackButton,
|
|
25
26
|
BasicFormField: () => BasicFormField,
|
|
26
27
|
CTA: () => CTA,
|
|
@@ -73,6 +74,9 @@ __export(index_exports, {
|
|
|
73
74
|
});
|
|
74
75
|
module.exports = __toCommonJS(index_exports);
|
|
75
76
|
|
|
77
|
+
// src/components/Accordion/Accordion.tsx
|
|
78
|
+
var import_react2 = require("react");
|
|
79
|
+
|
|
76
80
|
// src/lib/cn.ts
|
|
77
81
|
var import_clsx = require("clsx");
|
|
78
82
|
var import_tailwind_merge = require("tailwind-merge");
|
|
@@ -100,6 +104,21 @@ function cn(...inputs) {
|
|
|
100
104
|
return twMerge((0, import_clsx.clsx)(inputs));
|
|
101
105
|
}
|
|
102
106
|
|
|
107
|
+
// src/lib/useControllableState.ts
|
|
108
|
+
var import_react = require("react");
|
|
109
|
+
function useControllableState(controlled, defaultValue) {
|
|
110
|
+
const isControlled = controlled !== void 0;
|
|
111
|
+
const [uncontrolled, setUncontrolled] = (0, import_react.useState)(defaultValue);
|
|
112
|
+
const value = isControlled ? controlled : uncontrolled;
|
|
113
|
+
const setValue = (0, import_react.useCallback)(
|
|
114
|
+
(next) => {
|
|
115
|
+
if (!isControlled) setUncontrolled(next);
|
|
116
|
+
},
|
|
117
|
+
[isControlled]
|
|
118
|
+
);
|
|
119
|
+
return [value, setValue, isControlled];
|
|
120
|
+
}
|
|
121
|
+
|
|
103
122
|
// src/assets/svgs/Icons.tsx
|
|
104
123
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
105
124
|
var IconChevronDownXS = ({
|
|
@@ -332,10 +351,88 @@ var IconClose = ({ className, stroke }) => {
|
|
|
332
351
|
);
|
|
333
352
|
};
|
|
334
353
|
|
|
335
|
-
// src/components/
|
|
354
|
+
// src/components/Accordion/Accordion.tsx
|
|
336
355
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
356
|
+
var Accordion = (0, import_react2.forwardRef)(function Accordion2({
|
|
357
|
+
step,
|
|
358
|
+
title,
|
|
359
|
+
children,
|
|
360
|
+
headerRight,
|
|
361
|
+
collapsible = true,
|
|
362
|
+
defaultOpen = true,
|
|
363
|
+
open,
|
|
364
|
+
onOpenChange,
|
|
365
|
+
stickyHeader = false,
|
|
366
|
+
className,
|
|
367
|
+
headerClassName,
|
|
368
|
+
contentClassName
|
|
369
|
+
}, ref) {
|
|
370
|
+
const [isOpen, setIsOpen] = useControllableState(open, defaultOpen);
|
|
371
|
+
const expanded = collapsible ? isOpen : true;
|
|
372
|
+
const toggleOpen = () => {
|
|
373
|
+
if (!collapsible) return;
|
|
374
|
+
const next = !isOpen;
|
|
375
|
+
setIsOpen(next);
|
|
376
|
+
onOpenChange?.(next);
|
|
377
|
+
};
|
|
378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ref, className: cn("w-full bg-white", className), children: [
|
|
379
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
380
|
+
AccordionHeader,
|
|
381
|
+
{
|
|
382
|
+
step,
|
|
383
|
+
title,
|
|
384
|
+
headerRight,
|
|
385
|
+
isOpen: expanded,
|
|
386
|
+
collapsible,
|
|
387
|
+
onClick: toggleOpen,
|
|
388
|
+
className: cn(stickyHeader && "sticky top-0 z-10", headerClassName)
|
|
389
|
+
}
|
|
390
|
+
),
|
|
391
|
+
expanded && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: contentClassName, children })
|
|
392
|
+
] });
|
|
393
|
+
});
|
|
394
|
+
var AccordionHeader = ({
|
|
395
|
+
step,
|
|
396
|
+
title,
|
|
397
|
+
headerRight,
|
|
398
|
+
isOpen,
|
|
399
|
+
collapsible,
|
|
400
|
+
onClick,
|
|
401
|
+
className
|
|
402
|
+
}) => {
|
|
403
|
+
const label = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "truncate", children: [
|
|
404
|
+
step,
|
|
405
|
+
" | ",
|
|
406
|
+
title
|
|
407
|
+
] });
|
|
408
|
+
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";
|
|
409
|
+
if (!collapsible) {
|
|
410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: cn(base, className), children: [
|
|
411
|
+
label,
|
|
412
|
+
headerRight
|
|
413
|
+
] });
|
|
414
|
+
}
|
|
415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
416
|
+
"button",
|
|
417
|
+
{
|
|
418
|
+
type: "button",
|
|
419
|
+
onClick,
|
|
420
|
+
className: cn(base, "cursor-pointer hover:bg-gray00 active:bg-gray01", className),
|
|
421
|
+
children: [
|
|
422
|
+
label,
|
|
423
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "flex shrink-0 items-center gap-3", children: [
|
|
424
|
+
headerRight,
|
|
425
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconChevronDownXS, { className: cn("transition-transform", isOpen && "rotate-180") })
|
|
426
|
+
] })
|
|
427
|
+
]
|
|
428
|
+
}
|
|
429
|
+
);
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
// src/components/BackButton/BackButton.tsx
|
|
433
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
337
434
|
var BackButton = ({ onClick, className }) => {
|
|
338
|
-
return /* @__PURE__ */ (0,
|
|
435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
339
436
|
"button",
|
|
340
437
|
{
|
|
341
438
|
type: "button",
|
|
@@ -348,13 +445,13 @@ var BackButton = ({ onClick, className }) => {
|
|
|
348
445
|
"cursor-pointer",
|
|
349
446
|
className
|
|
350
447
|
),
|
|
351
|
-
children: /* @__PURE__ */ (0,
|
|
448
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconGoBack, {})
|
|
352
449
|
}
|
|
353
450
|
);
|
|
354
451
|
};
|
|
355
452
|
|
|
356
453
|
// src/components/CTA/CTA.tsx
|
|
357
|
-
var
|
|
454
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
358
455
|
var CTA = ({
|
|
359
456
|
primary = false,
|
|
360
457
|
alert = false,
|
|
@@ -365,7 +462,7 @@ var CTA = ({
|
|
|
365
462
|
forModal = false,
|
|
366
463
|
...props
|
|
367
464
|
}) => {
|
|
368
|
-
return /* @__PURE__ */ (0,
|
|
465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
369
466
|
"button",
|
|
370
467
|
{
|
|
371
468
|
type: "button",
|
|
@@ -393,22 +490,22 @@ var CTA = ({
|
|
|
393
490
|
};
|
|
394
491
|
|
|
395
492
|
// src/components/Column/MultiColumn.tsx
|
|
396
|
-
var
|
|
493
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
397
494
|
var MultiColumnMain = ({ children, className }) => {
|
|
398
|
-
return /* @__PURE__ */ (0,
|
|
495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: cn("flex flex-col w-full h-full", className), children });
|
|
399
496
|
};
|
|
400
497
|
var Columns = ({ children, className }) => {
|
|
401
498
|
return (
|
|
402
499
|
// flex 래퍼를 사용하고 하위 Column들이 flex-1을 가지게 하거나,
|
|
403
500
|
// grid를 사용하여 열을 나눌 수 있어. 여기서는 flex를 활용한 균등 분할 예시야.
|
|
404
|
-
/* @__PURE__ */ (0,
|
|
501
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: cn("flex w-full h-full divide-x divide-gray02", className), children })
|
|
405
502
|
);
|
|
406
503
|
};
|
|
407
504
|
var CTAs = ({ children, className }) => {
|
|
408
505
|
if (!children) return null;
|
|
409
506
|
return (
|
|
410
507
|
// CTA 버튼들을 중앙에 배치하는 예시 (우측 정렬이 필요하면 justify-end 사용)
|
|
411
|
-
/* @__PURE__ */ (0,
|
|
508
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: cn("flex flex-col w-full h-fit", className), children })
|
|
412
509
|
);
|
|
413
510
|
};
|
|
414
511
|
var MultiColumn = Object.assign(MultiColumnMain, {
|
|
@@ -417,78 +514,78 @@ var MultiColumn = Object.assign(MultiColumnMain, {
|
|
|
417
514
|
});
|
|
418
515
|
|
|
419
516
|
// src/components/Column/Column.tsx
|
|
420
|
-
var
|
|
517
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
421
518
|
var Column = ({ className, children, header }) => {
|
|
422
|
-
return /* @__PURE__ */ (0,
|
|
423
|
-
header && /* @__PURE__ */ (0,
|
|
519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: cn("flex flex-col gap-5", "h-full w-full px-5 py-3", className), children: [
|
|
520
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h1", { className: cn("text-body1-medium text-primary"), children: header }),
|
|
424
521
|
children
|
|
425
522
|
] });
|
|
426
523
|
};
|
|
427
524
|
|
|
428
525
|
// src/components/Column/ColumnContentContainer.tsx
|
|
429
|
-
var
|
|
526
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
430
527
|
var ColumnContentContainer = ({ className, children }) => {
|
|
431
|
-
return /* @__PURE__ */ (0,
|
|
528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: cn("flex flex-col gap-1.5 w-full h-fit", className), children });
|
|
432
529
|
};
|
|
433
530
|
|
|
434
531
|
// src/components/Column/ColumnLabel.tsx
|
|
435
|
-
var
|
|
532
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
436
533
|
var ColumnLabel = ({ className, children, subLabel, htmlFor }) => {
|
|
437
|
-
return /* @__PURE__ */ (0,
|
|
438
|
-
/* @__PURE__ */ (0,
|
|
439
|
-
subLabel && /* @__PURE__ */ (0,
|
|
534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { htmlFor, className: cn("flex gap-1.5 items-end", className), children: [
|
|
535
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: cn("text-body2-regular text-tertiary"), children }),
|
|
536
|
+
subLabel && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: cn("text-caption-book text-quaternary"), children: subLabel })
|
|
440
537
|
] });
|
|
441
538
|
};
|
|
442
539
|
|
|
443
540
|
// src/components/Column/ColumnText.tsx
|
|
444
|
-
var
|
|
541
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
445
542
|
var ColumnTextStyle = "text-body3-book text-strong";
|
|
446
543
|
var ModalTextStyle = "text-body1-regular text-primary";
|
|
447
544
|
var ColumnText = ({ className, alert = false, children, onClick }) => {
|
|
448
|
-
return /* @__PURE__ */ (0,
|
|
545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: cn(ColumnTextStyle, alert && "text-danger", className), onClick, children: children ? children : "-" });
|
|
449
546
|
};
|
|
450
547
|
|
|
451
548
|
// src/components/Column/ColumnSubTitle.tsx
|
|
452
|
-
var
|
|
549
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
453
550
|
var ColumnSubTitle = ({
|
|
454
551
|
className,
|
|
455
552
|
children,
|
|
456
553
|
action,
|
|
457
554
|
as: Tag2 = "h2"
|
|
458
555
|
}) => {
|
|
459
|
-
return /* @__PURE__ */ (0,
|
|
460
|
-
/* @__PURE__ */ (0,
|
|
461
|
-
action && /* @__PURE__ */ (0,
|
|
556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Tag2, { className: cn("flex items-center justify-between gap-1.5", "w-full", className), children: [
|
|
557
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: cn("text-body1-medium text-primary"), children }),
|
|
558
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "flex shrink-0 items-center", children: action })
|
|
462
559
|
] });
|
|
463
560
|
};
|
|
464
561
|
|
|
465
562
|
// src/components/Column/ColumnDescription.tsx
|
|
466
|
-
var
|
|
563
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
467
564
|
var ColumnDescription = ({
|
|
468
565
|
className,
|
|
469
566
|
children,
|
|
470
567
|
bullet = true
|
|
471
568
|
}) => {
|
|
472
|
-
return /* @__PURE__ */ (0,
|
|
473
|
-
bullet && /* @__PURE__ */ (0,
|
|
474
|
-
/* @__PURE__ */ (0,
|
|
569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cn("flex items-start gap-3", className), children: [
|
|
570
|
+
bullet && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "flex shrink-0 items-center py-1", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconCompass, { className: "size-4" }) }),
|
|
571
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "min-w-0 flex-1 whitespace-pre-line text-body3-book text-primary", children })
|
|
475
572
|
] });
|
|
476
573
|
};
|
|
477
574
|
var ColumnDescriptionList = ({ className, children }) => {
|
|
478
|
-
return /* @__PURE__ */ (0,
|
|
575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: cn("flex flex-col gap-4", className), children });
|
|
479
576
|
};
|
|
480
577
|
|
|
481
578
|
// src/components/Form/BasicFormField.tsx
|
|
482
|
-
var
|
|
579
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
483
580
|
var BasicFormField = ({
|
|
484
581
|
children,
|
|
485
582
|
isDanger,
|
|
486
583
|
dangerText,
|
|
487
584
|
className
|
|
488
585
|
}) => {
|
|
489
|
-
return /* @__PURE__ */ (0,
|
|
586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: cn("flex flex-col gap-1.5", className), children: [
|
|
490
587
|
children,
|
|
491
|
-
isDanger && dangerText && /* @__PURE__ */ (0,
|
|
588
|
+
isDanger && dangerText && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-caption-book text-danger", children: dangerText })
|
|
492
589
|
] });
|
|
493
590
|
};
|
|
494
591
|
var getInputStyles = (isDanger, additionalClass) => {
|
|
@@ -507,15 +604,15 @@ var getInputStyles = (isDanger, additionalClass) => {
|
|
|
507
604
|
};
|
|
508
605
|
|
|
509
606
|
// src/components/Form/FormText.tsx
|
|
510
|
-
var
|
|
607
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
511
608
|
var FormText = ({ className, isDanger, dangerText, ...props }) => {
|
|
512
|
-
return /* @__PURE__ */ (0,
|
|
609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", { type: "text", className: getInputStyles(isDanger, className), ...props }) });
|
|
513
610
|
};
|
|
514
611
|
|
|
515
612
|
// src/components/Form/FormTextArea.tsx
|
|
516
|
-
var
|
|
613
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
517
614
|
var FormTextArea = ({ className, isDanger, dangerText, ...props }) => {
|
|
518
|
-
return /* @__PURE__ */ (0,
|
|
615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
519
616
|
"textarea",
|
|
520
617
|
{
|
|
521
618
|
className: getInputStyles(isDanger, "resize-none h-30 px-4 py-2.5 " + (className || "")),
|
|
@@ -525,19 +622,19 @@ var FormTextArea = ({ className, isDanger, dangerText, ...props }) => {
|
|
|
525
622
|
};
|
|
526
623
|
|
|
527
624
|
// src/components/Form/FormNumber.tsx
|
|
528
|
-
var
|
|
625
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
529
626
|
var FormNumber = ({ className, isDanger, dangerText, ...props }) => {
|
|
530
|
-
return /* @__PURE__ */ (0,
|
|
627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { type: "number", className: getInputStyles(isDanger, className), ...props }) });
|
|
531
628
|
};
|
|
532
629
|
|
|
533
630
|
// src/components/Form/FormPassword.tsx
|
|
534
|
-
var
|
|
631
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
535
632
|
var FormPassword = ({ className, isDanger, dangerText, ...props }) => {
|
|
536
|
-
return /* @__PURE__ */ (0,
|
|
633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("input", { type: "password", className: getInputStyles(isDanger, className), ...props }) });
|
|
537
634
|
};
|
|
538
635
|
|
|
539
636
|
// src/components/Form/FormTel.tsx
|
|
540
|
-
var
|
|
637
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
541
638
|
var FormTel = ({ className, isDanger, dangerText, onChange, ...props }) => {
|
|
542
639
|
const handlePhoneChange = (e) => {
|
|
543
640
|
const rawValue = e.target.value.replace(/[^0-9]/g, "");
|
|
@@ -549,7 +646,7 @@ var FormTel = ({ className, isDanger, dangerText, onChange, ...props }) => {
|
|
|
549
646
|
e.target.value = formattedValue;
|
|
550
647
|
if (onChange) onChange(e);
|
|
551
648
|
};
|
|
552
|
-
return /* @__PURE__ */ (0,
|
|
649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
553
650
|
"input",
|
|
554
651
|
{
|
|
555
652
|
type: "tel",
|
|
@@ -562,8 +659,8 @@ var FormTel = ({ className, isDanger, dangerText, onChange, ...props }) => {
|
|
|
562
659
|
};
|
|
563
660
|
|
|
564
661
|
// src/components/Form/FormColor.tsx
|
|
565
|
-
var
|
|
566
|
-
var
|
|
662
|
+
var import_react3 = require("react");
|
|
663
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
567
664
|
var FormColor = ({
|
|
568
665
|
className,
|
|
569
666
|
isDanger,
|
|
@@ -573,7 +670,7 @@ var FormColor = ({
|
|
|
573
670
|
onChange,
|
|
574
671
|
...props
|
|
575
672
|
}) => {
|
|
576
|
-
const [internalColor, setInternalColor] = (0,
|
|
673
|
+
const [internalColor, setInternalColor] = (0, import_react3.useState)(
|
|
577
674
|
value || defaultValue || "#000000"
|
|
578
675
|
);
|
|
579
676
|
const color = value !== void 0 ? value : internalColor;
|
|
@@ -581,7 +678,7 @@ var FormColor = ({
|
|
|
581
678
|
setInternalColor(e.target.value);
|
|
582
679
|
onChange?.(e);
|
|
583
680
|
};
|
|
584
|
-
return /* @__PURE__ */ (0,
|
|
681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
585
682
|
"label",
|
|
586
683
|
{
|
|
587
684
|
className: getInputStyles(
|
|
@@ -590,7 +687,7 @@ var FormColor = ({
|
|
|
590
687
|
"flex items-center gap-2 relative focus-within:border-black focus-within:hover:bg-white" + (className || "")
|
|
591
688
|
),
|
|
592
689
|
children: [
|
|
593
|
-
/* @__PURE__ */ (0,
|
|
690
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w-6 h-6 shrink-0 overflow-hidden", style: { backgroundColor: color }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
594
691
|
"input",
|
|
595
692
|
{
|
|
596
693
|
type: "color",
|
|
@@ -600,15 +697,15 @@ var FormColor = ({
|
|
|
600
697
|
...props
|
|
601
698
|
}
|
|
602
699
|
) }),
|
|
603
|
-
/* @__PURE__ */ (0,
|
|
700
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-primary text-body3-regular uppercase flex-1 select-none", children: color })
|
|
604
701
|
]
|
|
605
702
|
}
|
|
606
703
|
) });
|
|
607
704
|
};
|
|
608
705
|
|
|
609
706
|
// src/components/Form/FormFile.tsx
|
|
610
|
-
var
|
|
611
|
-
var
|
|
707
|
+
var import_react4 = require("react");
|
|
708
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
612
709
|
var FormFile = ({
|
|
613
710
|
className,
|
|
614
711
|
isDanger,
|
|
@@ -618,7 +715,7 @@ var FormFile = ({
|
|
|
618
715
|
onChange,
|
|
619
716
|
...props
|
|
620
717
|
}) => {
|
|
621
|
-
const [selectedFile, setSelectedFile] = (0,
|
|
718
|
+
const [selectedFile, setSelectedFile] = (0, import_react4.useState)(null);
|
|
622
719
|
const handleFileChange = (e) => {
|
|
623
720
|
const originalFile = e.target.files?.[0];
|
|
624
721
|
if (!originalFile) {
|
|
@@ -669,7 +766,7 @@ var FormFile = ({
|
|
|
669
766
|
}
|
|
670
767
|
};
|
|
671
768
|
const displayFileName = selectedFile?.name || (fileUrl ? fileUrl.split("/").pop() : null);
|
|
672
|
-
return /* @__PURE__ */ (0,
|
|
769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
673
770
|
"div",
|
|
674
771
|
{
|
|
675
772
|
className: getInputStyles(
|
|
@@ -682,7 +779,7 @@ var FormFile = ({
|
|
|
682
779
|
)
|
|
683
780
|
),
|
|
684
781
|
children: [
|
|
685
|
-
displayFileName && /* @__PURE__ */ (0,
|
|
782
|
+
displayFileName && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
686
783
|
"span",
|
|
687
784
|
{
|
|
688
785
|
onClick: handleDownload,
|
|
@@ -691,9 +788,9 @@ var FormFile = ({
|
|
|
691
788
|
children: displayFileName
|
|
692
789
|
}
|
|
693
790
|
),
|
|
694
|
-
/* @__PURE__ */ (0,
|
|
695
|
-
/* @__PURE__ */ (0,
|
|
696
|
-
/* @__PURE__ */ (0,
|
|
791
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: "shrink-0 px-1 -mx-1 cursor-pointer", children: [
|
|
792
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "text-primary text-caption-regular underline", children: displayFileName ? "\uB2E4\uC2DC \uCCA8\uBD80" : "\uD30C\uC77C \uCCA8\uBD80" }),
|
|
793
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", { type: "file", className: "hidden", onChange: handleFileChange, ...props })
|
|
697
794
|
] })
|
|
698
795
|
]
|
|
699
796
|
}
|
|
@@ -701,7 +798,7 @@ var FormFile = ({
|
|
|
701
798
|
};
|
|
702
799
|
|
|
703
800
|
// src/components/Form/FormCheckBox.tsx
|
|
704
|
-
var
|
|
801
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
705
802
|
var FormCheckBox = ({
|
|
706
803
|
isChecked,
|
|
707
804
|
setIsChecked,
|
|
@@ -710,7 +807,7 @@ var FormCheckBox = ({
|
|
|
710
807
|
textStyle,
|
|
711
808
|
...props
|
|
712
809
|
}) => {
|
|
713
|
-
return /* @__PURE__ */ (0,
|
|
810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
714
811
|
"label",
|
|
715
812
|
{
|
|
716
813
|
className: cn(
|
|
@@ -721,7 +818,7 @@ var FormCheckBox = ({
|
|
|
721
818
|
className
|
|
722
819
|
),
|
|
723
820
|
children: [
|
|
724
|
-
/* @__PURE__ */ (0,
|
|
821
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
725
822
|
"input",
|
|
726
823
|
{
|
|
727
824
|
type: "checkbox",
|
|
@@ -731,14 +828,14 @@ var FormCheckBox = ({
|
|
|
731
828
|
...props
|
|
732
829
|
}
|
|
733
830
|
),
|
|
734
|
-
/* @__PURE__ */ (0,
|
|
831
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
735
832
|
"div",
|
|
736
833
|
{
|
|
737
834
|
className: cn(
|
|
738
835
|
"flex items-center justify-center w-5 h-5 shrink-0 rounded transition-colors",
|
|
739
836
|
"group-hover:bg-gray00 group-active:bg-gray01"
|
|
740
837
|
),
|
|
741
|
-
children: /* @__PURE__ */ (0,
|
|
838
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
742
839
|
"div",
|
|
743
840
|
{
|
|
744
841
|
className: cn(
|
|
@@ -748,29 +845,29 @@ var FormCheckBox = ({
|
|
|
748
845
|
// 💡 3. 키보드 Tab 이동 시 접근성 향상 (포커스 링 표시)
|
|
749
846
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-black peer-focus-visible:ring-offset-1"
|
|
750
847
|
),
|
|
751
|
-
children: isChecked && /* @__PURE__ */ (0,
|
|
848
|
+
children: isChecked && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IconCheck, {})
|
|
752
849
|
}
|
|
753
850
|
)
|
|
754
851
|
}
|
|
755
852
|
),
|
|
756
|
-
children && /* @__PURE__ */ (0,
|
|
853
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: cn("text-body3-book text-primary", textStyle), children })
|
|
757
854
|
]
|
|
758
855
|
}
|
|
759
856
|
);
|
|
760
857
|
};
|
|
761
858
|
|
|
762
859
|
// src/components/Form/FormSelectBox.tsx
|
|
763
|
-
var
|
|
860
|
+
var import_react5 = require("react");
|
|
764
861
|
|
|
765
862
|
// src/components/Form/SelectBoxOption.tsx
|
|
766
|
-
var
|
|
863
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
767
864
|
var SelectBoxOption = ({
|
|
768
865
|
label,
|
|
769
866
|
onClick,
|
|
770
867
|
// selectedLabel,
|
|
771
868
|
className
|
|
772
869
|
}) => {
|
|
773
|
-
return /* @__PURE__ */ (0,
|
|
870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
774
871
|
"li",
|
|
775
872
|
{
|
|
776
873
|
onClick,
|
|
@@ -792,7 +889,7 @@ var SelectBoxOption = ({
|
|
|
792
889
|
};
|
|
793
890
|
|
|
794
891
|
// src/components/Form/FormSelectBox.tsx
|
|
795
|
-
var
|
|
892
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
796
893
|
var FormSelectBox = ({
|
|
797
894
|
options,
|
|
798
895
|
value,
|
|
@@ -802,9 +899,9 @@ var FormSelectBox = ({
|
|
|
802
899
|
dangerText,
|
|
803
900
|
className
|
|
804
901
|
}) => {
|
|
805
|
-
const [isOpen, setIsOpen] = (0,
|
|
806
|
-
const containerRef = (0,
|
|
807
|
-
(0,
|
|
902
|
+
const [isOpen, setIsOpen] = (0, import_react5.useState)(false);
|
|
903
|
+
const containerRef = (0, import_react5.useRef)(null);
|
|
904
|
+
(0, import_react5.useEffect)(() => {
|
|
808
905
|
const handleClickOutside = (event) => {
|
|
809
906
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
810
907
|
setIsOpen(false);
|
|
@@ -815,8 +912,8 @@ var FormSelectBox = ({
|
|
|
815
912
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
816
913
|
};
|
|
817
914
|
}, []);
|
|
818
|
-
return /* @__PURE__ */ (0,
|
|
819
|
-
/* @__PURE__ */ (0,
|
|
915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BasicFormField, { isDanger, dangerText, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { ref: containerRef, className: "relative w-full", children: [
|
|
916
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
820
917
|
"div",
|
|
821
918
|
{
|
|
822
919
|
tabIndex: 0,
|
|
@@ -836,8 +933,8 @@ var FormSelectBox = ({
|
|
|
836
933
|
setIsOpen((prev) => !prev);
|
|
837
934
|
},
|
|
838
935
|
children: [
|
|
839
|
-
/* @__PURE__ */ (0,
|
|
840
|
-
/* @__PURE__ */ (0,
|
|
936
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: value ? "text-primary" : "text-quaternary", children: value || placeholder }),
|
|
937
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
841
938
|
IconChevronDownXS,
|
|
842
939
|
{
|
|
843
940
|
className: cn("text-gray06 transition-transform", isOpen && "rotate-180"),
|
|
@@ -847,7 +944,7 @@ var FormSelectBox = ({
|
|
|
847
944
|
]
|
|
848
945
|
}
|
|
849
946
|
),
|
|
850
|
-
isOpen && /* @__PURE__ */ (0,
|
|
947
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
851
948
|
"ul",
|
|
852
949
|
{
|
|
853
950
|
className: cn(
|
|
@@ -857,7 +954,7 @@ var FormSelectBox = ({
|
|
|
857
954
|
"max-h-50 overflow-y-auto"
|
|
858
955
|
// 항목이 너무 많으면 스크롤 생성 (디자인 스펙: 그림자 없음)
|
|
859
956
|
),
|
|
860
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
957
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
861
958
|
SelectBoxOption,
|
|
862
959
|
{
|
|
863
960
|
label: option,
|
|
@@ -874,7 +971,7 @@ var FormSelectBox = ({
|
|
|
874
971
|
};
|
|
875
972
|
|
|
876
973
|
// src/components/TextButton/TextButton.tsx
|
|
877
|
-
var
|
|
974
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
878
975
|
var TextButton = ({
|
|
879
976
|
children,
|
|
880
977
|
icon,
|
|
@@ -884,10 +981,10 @@ var TextButton = ({
|
|
|
884
981
|
className,
|
|
885
982
|
...props
|
|
886
983
|
}) => {
|
|
887
|
-
const content = /* @__PURE__ */ (0,
|
|
888
|
-
icon && iconPosition === "left" && /* @__PURE__ */ (0,
|
|
889
|
-
/* @__PURE__ */ (0,
|
|
890
|
-
icon && iconPosition === "right" && /* @__PURE__ */ (0,
|
|
984
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
985
|
+
icon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "flex shrink-0 items-center", children: icon }),
|
|
986
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: cn(underline && "underline underline-offset-2"), children }),
|
|
987
|
+
icon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "flex shrink-0 items-center", children: icon })
|
|
891
988
|
] });
|
|
892
989
|
const classes = cn(
|
|
893
990
|
"inline-flex w-fit items-center gap-1 px-1 -mx-1",
|
|
@@ -902,19 +999,19 @@ var TextButton = ({
|
|
|
902
999
|
);
|
|
903
1000
|
if (props.href !== void 0) {
|
|
904
1001
|
const { href, ...rest } = props;
|
|
905
|
-
return /* @__PURE__ */ (0,
|
|
1002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href, className: classes, ...rest, children: content });
|
|
906
1003
|
}
|
|
907
1004
|
const buttonProps = props;
|
|
908
|
-
return /* @__PURE__ */ (0,
|
|
1005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { type: "button", className: classes, ...buttonProps, children: content });
|
|
909
1006
|
};
|
|
910
1007
|
|
|
911
1008
|
// src/components/Dropdown/Dropdown.tsx
|
|
912
|
-
var
|
|
913
|
-
var
|
|
1009
|
+
var import_react6 = require("react");
|
|
1010
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
914
1011
|
var Dropdown = ({ selectedLabel, setSelectedLabel, labels, className }) => {
|
|
915
|
-
const [isOpen, setIsOpen] = (0,
|
|
916
|
-
const containerRef = (0,
|
|
917
|
-
(0,
|
|
1012
|
+
const [isOpen, setIsOpen] = (0, import_react6.useState)(false);
|
|
1013
|
+
const containerRef = (0, import_react6.useRef)(null);
|
|
1014
|
+
(0, import_react6.useEffect)(() => {
|
|
918
1015
|
const handleClickOutside = (event) => {
|
|
919
1016
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
920
1017
|
setIsOpen(false);
|
|
@@ -925,8 +1022,8 @@ var Dropdown = ({ selectedLabel, setSelectedLabel, labels, className }) => {
|
|
|
925
1022
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
926
1023
|
};
|
|
927
1024
|
}, []);
|
|
928
|
-
return /* @__PURE__ */ (0,
|
|
929
|
-
/* @__PURE__ */ (0,
|
|
1025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { ref: containerRef, className: "relative", children: [
|
|
1026
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
930
1027
|
"div",
|
|
931
1028
|
{
|
|
932
1029
|
className: cn(
|
|
@@ -939,8 +1036,8 @@ var Dropdown = ({ selectedLabel, setSelectedLabel, labels, className }) => {
|
|
|
939
1036
|
),
|
|
940
1037
|
onClick: () => setIsOpen((prev) => !prev),
|
|
941
1038
|
children: [
|
|
942
|
-
/* @__PURE__ */ (0,
|
|
943
|
-
/* @__PURE__ */ (0,
|
|
1039
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { children: selectedLabel }),
|
|
1040
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
944
1041
|
IconChevronDownXS,
|
|
945
1042
|
{
|
|
946
1043
|
className: cn("text-gray06 transition-transform", isOpen && "rotate-180"),
|
|
@@ -950,7 +1047,7 @@ var Dropdown = ({ selectedLabel, setSelectedLabel, labels, className }) => {
|
|
|
950
1047
|
]
|
|
951
1048
|
}
|
|
952
1049
|
),
|
|
953
|
-
isOpen && /* @__PURE__ */ (0,
|
|
1050
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: cn("absolute top-full right-0 z-10", "box-border border border-gray02"), children: labels.map((label) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
954
1051
|
SelectBoxOption,
|
|
955
1052
|
{
|
|
956
1053
|
label,
|
|
@@ -966,7 +1063,7 @@ var Dropdown = ({ selectedLabel, setSelectedLabel, labels, className }) => {
|
|
|
966
1063
|
};
|
|
967
1064
|
|
|
968
1065
|
// src/components/ListView/List.tsx
|
|
969
|
-
var
|
|
1066
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
970
1067
|
function List({
|
|
971
1068
|
className,
|
|
972
1069
|
label1,
|
|
@@ -979,7 +1076,7 @@ function List({
|
|
|
979
1076
|
children,
|
|
980
1077
|
...props
|
|
981
1078
|
}) {
|
|
982
|
-
return /* @__PURE__ */ (0,
|
|
1079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
983
1080
|
"li",
|
|
984
1081
|
{
|
|
985
1082
|
className: cn(
|
|
@@ -994,11 +1091,11 @@ function List({
|
|
|
994
1091
|
...props,
|
|
995
1092
|
onClick,
|
|
996
1093
|
children: [
|
|
997
|
-
/* @__PURE__ */ (0,
|
|
998
|
-
/* @__PURE__ */ (0,
|
|
999
|
-
/* @__PURE__ */ (0,
|
|
1094
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("section", { className: cn("flex items-center gap-4"), children: [
|
|
1095
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { className: cn("text-body2-regular"), children: label1 ? label1 : "-" }),
|
|
1096
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: cn("flex items-center gap-2"), children })
|
|
1000
1097
|
] }),
|
|
1001
|
-
/* @__PURE__ */ (0,
|
|
1098
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1002
1099
|
"label",
|
|
1003
1100
|
{
|
|
1004
1101
|
className: cn(
|
|
@@ -1010,18 +1107,18 @@ function List({
|
|
|
1010
1107
|
children: label2 ? label2 : "-"
|
|
1011
1108
|
}
|
|
1012
1109
|
),
|
|
1013
|
-
/* @__PURE__ */ (0,
|
|
1110
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { className: cn("text-body3-regular text-right"), children: label3 ? label3 : "-" })
|
|
1014
1111
|
]
|
|
1015
1112
|
}
|
|
1016
1113
|
);
|
|
1017
1114
|
}
|
|
1018
1115
|
|
|
1019
1116
|
// src/components/Modal/Modal.tsx
|
|
1020
|
-
var
|
|
1117
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1021
1118
|
var ModalBase = ({ isVisible, header, children, className, onClose }) => {
|
|
1022
1119
|
if (!isVisible) return null;
|
|
1023
|
-
return /* @__PURE__ */ (0,
|
|
1024
|
-
/* @__PURE__ */ (0,
|
|
1120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: cn("fixed inset-0 z-50"), children: [
|
|
1121
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1025
1122
|
"div",
|
|
1026
1123
|
{
|
|
1027
1124
|
"aria-hidden": true,
|
|
@@ -1029,7 +1126,7 @@ var ModalBase = ({ isVisible, header, children, className, onClose }) => {
|
|
|
1029
1126
|
className: cn("fixed inset-0 z-1000 bg-[#212121]/30", onClose && "cursor-pointer")
|
|
1030
1127
|
}
|
|
1031
1128
|
),
|
|
1032
|
-
/* @__PURE__ */ (0,
|
|
1129
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "fixed inset-0 z-1001 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1033
1130
|
"main",
|
|
1034
1131
|
{
|
|
1035
1132
|
role: "dialog",
|
|
@@ -1042,7 +1139,7 @@ var ModalBase = ({ isVisible, header, children, className, onClose }) => {
|
|
|
1042
1139
|
className
|
|
1043
1140
|
),
|
|
1044
1141
|
children: [
|
|
1045
|
-
onClose && /* @__PURE__ */ (0,
|
|
1142
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1046
1143
|
"button",
|
|
1047
1144
|
{
|
|
1048
1145
|
type: "button",
|
|
@@ -1052,10 +1149,10 @@ var ModalBase = ({ isVisible, header, children, className, onClose }) => {
|
|
|
1052
1149
|
"absolute right-3 top-3 flex size-8 items-center justify-center",
|
|
1053
1150
|
"text-tertiary transition-colors hover:bg-gray00 active:bg-gray01 cursor-pointer"
|
|
1054
1151
|
),
|
|
1055
|
-
children: /* @__PURE__ */ (0,
|
|
1152
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(IconClose, {})
|
|
1056
1153
|
}
|
|
1057
1154
|
),
|
|
1058
|
-
/* @__PURE__ */ (0,
|
|
1155
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h1", { className: cn("text-strong font-[500] text-[24px] leading-[32px]"), children: header }),
|
|
1059
1156
|
children
|
|
1060
1157
|
]
|
|
1061
1158
|
}
|
|
@@ -1063,7 +1160,7 @@ var ModalBase = ({ isVisible, header, children, className, onClose }) => {
|
|
|
1063
1160
|
] });
|
|
1064
1161
|
};
|
|
1065
1162
|
var Contents = ({ children, className }) => {
|
|
1066
|
-
return /* @__PURE__ */ (0,
|
|
1163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1067
1164
|
"div",
|
|
1068
1165
|
{
|
|
1069
1166
|
className: cn(
|
|
@@ -1080,7 +1177,7 @@ var CTAs2 = ({ children, className, row = false }) => {
|
|
|
1080
1177
|
if (!children) return null;
|
|
1081
1178
|
return (
|
|
1082
1179
|
// CTA 버튼들을 중앙에 배치하는 예시 (우측 정렬이 필요하면 justify-end 사용)
|
|
1083
|
-
/* @__PURE__ */ (0,
|
|
1180
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1084
1181
|
"div",
|
|
1085
1182
|
{
|
|
1086
1183
|
className: cn(
|
|
@@ -1099,9 +1196,9 @@ var Modal = Object.assign(ModalBase, {
|
|
|
1099
1196
|
});
|
|
1100
1197
|
|
|
1101
1198
|
// src/components/Modal/ModalText.tsx
|
|
1102
|
-
var
|
|
1199
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1103
1200
|
var ModalText = ({ children, className }) => {
|
|
1104
|
-
return /* @__PURE__ */ (0,
|
|
1201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1105
1202
|
"div",
|
|
1106
1203
|
{
|
|
1107
1204
|
className: cn(
|
|
@@ -1117,14 +1214,14 @@ var ModalText = ({ children, className }) => {
|
|
|
1117
1214
|
};
|
|
1118
1215
|
|
|
1119
1216
|
// src/components/createPost/CategorySegment.tsx
|
|
1120
|
-
var
|
|
1217
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1121
1218
|
var CategorySegment = ({
|
|
1122
1219
|
selected = false,
|
|
1123
1220
|
label,
|
|
1124
1221
|
className,
|
|
1125
1222
|
onClick
|
|
1126
1223
|
}) => {
|
|
1127
|
-
return /* @__PURE__ */ (0,
|
|
1224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1128
1225
|
"div",
|
|
1129
1226
|
{
|
|
1130
1227
|
className: cn(
|
|
@@ -1144,7 +1241,7 @@ var CategorySegment = ({
|
|
|
1144
1241
|
};
|
|
1145
1242
|
|
|
1146
1243
|
// src/components/createPost/CategorySegmentedControl.tsx
|
|
1147
|
-
var
|
|
1244
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1148
1245
|
var categorySegments = {
|
|
1149
1246
|
info: ["\uACF5\uC6A9 \uBB3C\uD488", "\uC77C\uBC18 \uAE30\uC790\uC7AC", "\uD2B9\uC218 \uAE30\uC790\uC7AC"],
|
|
1150
1247
|
archive: ["\uD504\uB9B0\uD2B8\uC2E4", "\uD64D\uC775\uC2DC\uB514"],
|
|
@@ -1158,8 +1255,8 @@ var CategorySegmentedControl = ({
|
|
|
1158
1255
|
className
|
|
1159
1256
|
}) => {
|
|
1160
1257
|
const segments = categorySegments[variable];
|
|
1161
|
-
return /* @__PURE__ */ (0,
|
|
1162
|
-
/* @__PURE__ */ (0,
|
|
1258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: cn("w-full h-fit flex items-center justify-start", className), children: [
|
|
1259
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1163
1260
|
"div",
|
|
1164
1261
|
{
|
|
1165
1262
|
className: cn(
|
|
@@ -1172,7 +1269,7 @@ var CategorySegmentedControl = ({
|
|
|
1172
1269
|
children: variable === "infoTag" ? "\uD0DC\uADF8 \uC120\uD0DD" : "\uCE74\uD14C\uACE0\uB9AC \uC120\uD0DD"
|
|
1173
1270
|
}
|
|
1174
1271
|
),
|
|
1175
|
-
segments.map((label) => /* @__PURE__ */ (0,
|
|
1272
|
+
segments.map((label) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1176
1273
|
CategorySegment,
|
|
1177
1274
|
{
|
|
1178
1275
|
label,
|
|
@@ -1185,9 +1282,9 @@ var CategorySegmentedControl = ({
|
|
|
1185
1282
|
};
|
|
1186
1283
|
|
|
1187
1284
|
// src/components/createPost/TitleInput.tsx
|
|
1188
|
-
var
|
|
1285
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1189
1286
|
var TitleInput = ({ title, onChange, className }) => {
|
|
1190
|
-
return /* @__PURE__ */ (0,
|
|
1287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1191
1288
|
"input",
|
|
1192
1289
|
{
|
|
1193
1290
|
type: "text",
|
|
@@ -1207,9 +1304,9 @@ var TitleInput = ({ title, onChange, className }) => {
|
|
|
1207
1304
|
};
|
|
1208
1305
|
|
|
1209
1306
|
// src/components/notice/NoticeBadge.tsx
|
|
1210
|
-
var
|
|
1307
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1211
1308
|
var NoticeBadge = ({ variable, className, onClick }) => {
|
|
1212
|
-
return /* @__PURE__ */ (0,
|
|
1309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1213
1310
|
"button",
|
|
1214
1311
|
{
|
|
1215
1312
|
type: "button",
|
|
@@ -1230,7 +1327,7 @@ var NoticeBadge = ({ variable, className, onClick }) => {
|
|
|
1230
1327
|
};
|
|
1231
1328
|
|
|
1232
1329
|
// src/components/notice/NoticeBar.tsx
|
|
1233
|
-
var
|
|
1330
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1234
1331
|
var NoticeBar = ({
|
|
1235
1332
|
variable = "default",
|
|
1236
1333
|
badgeVariable,
|
|
@@ -1239,7 +1336,7 @@ var NoticeBar = ({
|
|
|
1239
1336
|
className,
|
|
1240
1337
|
onClick
|
|
1241
1338
|
}) => {
|
|
1242
|
-
return /* @__PURE__ */ (0,
|
|
1339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1243
1340
|
"div",
|
|
1244
1341
|
{
|
|
1245
1342
|
className: cn(
|
|
@@ -1251,20 +1348,20 @@ var NoticeBar = ({
|
|
|
1251
1348
|
),
|
|
1252
1349
|
onClick,
|
|
1253
1350
|
children: [
|
|
1254
|
-
/* @__PURE__ */ (0,
|
|
1255
|
-
/* @__PURE__ */ (0,
|
|
1256
|
-
/* @__PURE__ */ (0,
|
|
1351
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("section", { className: "flex items-center gap-3", children: [
|
|
1352
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(NoticeBadge, { variable: badgeVariable }),
|
|
1353
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h1", { className: "text-head1-medium text-strong", children: title })
|
|
1257
1354
|
] }),
|
|
1258
|
-
/* @__PURE__ */ (0,
|
|
1355
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-body3-book text-tertiary", children: date })
|
|
1259
1356
|
]
|
|
1260
1357
|
}
|
|
1261
1358
|
);
|
|
1262
1359
|
};
|
|
1263
1360
|
|
|
1264
1361
|
// src/components/SearchBar/SearchBar.tsx
|
|
1265
|
-
var
|
|
1362
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1266
1363
|
var SearchBar = ({ value, onChange, className }) => {
|
|
1267
|
-
return /* @__PURE__ */ (0,
|
|
1364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1268
1365
|
"label",
|
|
1269
1366
|
{
|
|
1270
1367
|
className: cn(
|
|
@@ -1275,8 +1372,8 @@ var SearchBar = ({ value, onChange, className }) => {
|
|
|
1275
1372
|
className
|
|
1276
1373
|
),
|
|
1277
1374
|
children: [
|
|
1278
|
-
/* @__PURE__ */ (0,
|
|
1279
|
-
/* @__PURE__ */ (0,
|
|
1375
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(IconSearch, {}),
|
|
1376
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1280
1377
|
"input",
|
|
1281
1378
|
{
|
|
1282
1379
|
type: "text",
|
|
@@ -1295,25 +1392,8 @@ var SearchBar = ({ value, onChange, className }) => {
|
|
|
1295
1392
|
};
|
|
1296
1393
|
|
|
1297
1394
|
// src/components/SideRadioAccordion/SideRadioAccordion.tsx
|
|
1298
|
-
var
|
|
1299
|
-
|
|
1300
|
-
// src/lib/useControllableState.ts
|
|
1301
|
-
var import_react5 = require("react");
|
|
1302
|
-
function useControllableState(controlled, defaultValue) {
|
|
1303
|
-
const isControlled = controlled !== void 0;
|
|
1304
|
-
const [uncontrolled, setUncontrolled] = (0, import_react5.useState)(defaultValue);
|
|
1305
|
-
const value = isControlled ? controlled : uncontrolled;
|
|
1306
|
-
const setValue = (0, import_react5.useCallback)(
|
|
1307
|
-
(next) => {
|
|
1308
|
-
if (!isControlled) setUncontrolled(next);
|
|
1309
|
-
},
|
|
1310
|
-
[isControlled]
|
|
1311
|
-
);
|
|
1312
|
-
return [value, setValue, isControlled];
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
// src/components/SideRadioAccordion/SideRadioAccordion.tsx
|
|
1316
|
-
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1395
|
+
var import_react7 = require("react");
|
|
1396
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1317
1397
|
var printColorBgClass = {
|
|
1318
1398
|
Plotter: "bg-print-plotter",
|
|
1319
1399
|
Printer: "bg-print-printer",
|
|
@@ -1324,7 +1404,7 @@ var printColorBgClass = {
|
|
|
1324
1404
|
"Laser Cutting": "bg-print-laser-cutting"
|
|
1325
1405
|
};
|
|
1326
1406
|
var itemKey = (item) => item.value ?? item.title;
|
|
1327
|
-
var SideRadioAccordion = (0,
|
|
1407
|
+
var SideRadioAccordion = (0, import_react7.forwardRef)(
|
|
1328
1408
|
function SideRadioAccordion2({
|
|
1329
1409
|
step,
|
|
1330
1410
|
title,
|
|
@@ -1357,8 +1437,8 @@ var SideRadioAccordion = (0, import_react6.forwardRef)(
|
|
|
1357
1437
|
setIsOpen(next);
|
|
1358
1438
|
onOpenChange?.(next);
|
|
1359
1439
|
};
|
|
1360
|
-
return /* @__PURE__ */ (0,
|
|
1361
|
-
/* @__PURE__ */ (0,
|
|
1440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { ref, className: cn("w-full border-r border-gray02 bg-white", className), children: [
|
|
1441
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1362
1442
|
Stepper,
|
|
1363
1443
|
{
|
|
1364
1444
|
step,
|
|
@@ -1369,8 +1449,8 @@ var SideRadioAccordion = (0, import_react6.forwardRef)(
|
|
|
1369
1449
|
className: cn(stickyHeader && "sticky top-0 z-10")
|
|
1370
1450
|
}
|
|
1371
1451
|
),
|
|
1372
|
-
expanded && /* @__PURE__ */ (0,
|
|
1373
|
-
radioToggleList.map((item) => /* @__PURE__ */ (0,
|
|
1452
|
+
expanded && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col divide-y divide-gray02", children: [
|
|
1453
|
+
radioToggleList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1374
1454
|
RadioToggleItem,
|
|
1375
1455
|
{
|
|
1376
1456
|
...item,
|
|
@@ -1379,22 +1459,22 @@ var SideRadioAccordion = (0, import_react6.forwardRef)(
|
|
|
1379
1459
|
},
|
|
1380
1460
|
itemKey(item)
|
|
1381
1461
|
)),
|
|
1382
|
-
quantityLimitLabel && /* @__PURE__ */ (0,
|
|
1462
|
+
quantityLimitLabel && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "px-5 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TextButton2, { label: quantityLimitLabel, onClick: onClickQuantityLimit }) })
|
|
1383
1463
|
] })
|
|
1384
1464
|
] });
|
|
1385
1465
|
}
|
|
1386
1466
|
);
|
|
1387
1467
|
var Stepper = ({ step, title, isOpen, collapsible, onClick, className }) => {
|
|
1388
|
-
const label = /* @__PURE__ */ (0,
|
|
1468
|
+
const label = /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { children: [
|
|
1389
1469
|
step,
|
|
1390
1470
|
" | ",
|
|
1391
1471
|
title
|
|
1392
1472
|
] });
|
|
1393
1473
|
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";
|
|
1394
1474
|
if (!collapsible) {
|
|
1395
|
-
return /* @__PURE__ */ (0,
|
|
1475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn(base, className), children: label });
|
|
1396
1476
|
}
|
|
1397
|
-
return /* @__PURE__ */ (0,
|
|
1477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1398
1478
|
"button",
|
|
1399
1479
|
{
|
|
1400
1480
|
type: "button",
|
|
@@ -1402,7 +1482,7 @@ var Stepper = ({ step, title, isOpen, collapsible, onClick, className }) => {
|
|
|
1402
1482
|
className: cn(base, "cursor-pointer hover:bg-gray00 active:bg-gray01", className),
|
|
1403
1483
|
children: [
|
|
1404
1484
|
label,
|
|
1405
|
-
/* @__PURE__ */ (0,
|
|
1485
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(IconChevronDownXS, { className: cn("transition-transform", isOpen && "rotate-180") })
|
|
1406
1486
|
]
|
|
1407
1487
|
}
|
|
1408
1488
|
);
|
|
@@ -1421,8 +1501,8 @@ var RadioToggleItem = ({
|
|
|
1421
1501
|
}) => {
|
|
1422
1502
|
const rowBg = !open ? "bg-white hover:bg-gray00" : color ? void 0 : printColor ? printColorBgClass[printColor] : "bg-gray00";
|
|
1423
1503
|
const style = open && color ? { backgroundColor: color } : void 0;
|
|
1424
|
-
return /* @__PURE__ */ (0,
|
|
1425
|
-
/* @__PURE__ */ (0,
|
|
1504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "w-full", children: [
|
|
1505
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1426
1506
|
"button",
|
|
1427
1507
|
{
|
|
1428
1508
|
type: "button",
|
|
@@ -1436,15 +1516,15 @@ var RadioToggleItem = ({
|
|
|
1436
1516
|
className
|
|
1437
1517
|
),
|
|
1438
1518
|
children: [
|
|
1439
|
-
/* @__PURE__ */ (0,
|
|
1440
|
-
/* @__PURE__ */ (0,
|
|
1519
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Radio, { selected: open }),
|
|
1520
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: title })
|
|
1441
1521
|
]
|
|
1442
1522
|
}
|
|
1443
1523
|
),
|
|
1444
|
-
open && /* @__PURE__ */ (0,
|
|
1445
|
-
/* @__PURE__ */ (0,
|
|
1446
|
-
badges && badges.length > 0 && /* @__PURE__ */ (0,
|
|
1447
|
-
labelTextButton && /* @__PURE__ */ (0,
|
|
1524
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col gap-2 px-3 py-3 bg-white", children: [
|
|
1525
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-caption-regular text-secondary", children: content }),
|
|
1526
|
+
badges && badges.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-wrap gap-1", children: badges.map((badge) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Badge, { label: badge }, badge)) }),
|
|
1527
|
+
labelTextButton && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1448
1528
|
TextButton2,
|
|
1449
1529
|
{
|
|
1450
1530
|
label: labelTextButton,
|
|
@@ -1461,7 +1541,7 @@ var Radio = ({ selected = false, className }) => {
|
|
|
1461
1541
|
return (
|
|
1462
1542
|
// 디자인 스펙(Figma "radio" 5:781): 아이콘 자체 색은 고정, hover/pressed 시
|
|
1463
1543
|
// 24px 원형 배경 칩만 나타난다(gray00/gray01). 부모 버튼의 group-hover/active로 동기화.
|
|
1464
|
-
/* @__PURE__ */ (0,
|
|
1544
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1465
1545
|
"span",
|
|
1466
1546
|
{
|
|
1467
1547
|
className: cn(
|
|
@@ -1469,13 +1549,13 @@ var Radio = ({ selected = false, className }) => {
|
|
|
1469
1549
|
"group-hover:bg-gray00 group-active:bg-gray01",
|
|
1470
1550
|
className
|
|
1471
1551
|
),
|
|
1472
|
-
children: /* @__PURE__ */ (0,
|
|
1552
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { className: "size-6" })
|
|
1473
1553
|
}
|
|
1474
1554
|
)
|
|
1475
1555
|
);
|
|
1476
1556
|
};
|
|
1477
1557
|
var TextButton2 = ({ label, onClick, showIcon = false, className }) => {
|
|
1478
|
-
return /* @__PURE__ */ (0,
|
|
1558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1479
1559
|
"button",
|
|
1480
1560
|
{
|
|
1481
1561
|
type: "button",
|
|
@@ -1488,14 +1568,14 @@ var TextButton2 = ({ label, onClick, showIcon = false, className }) => {
|
|
|
1488
1568
|
className
|
|
1489
1569
|
),
|
|
1490
1570
|
children: [
|
|
1491
|
-
showIcon && /* @__PURE__ */ (0,
|
|
1571
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(IconExclamation, {}),
|
|
1492
1572
|
label
|
|
1493
1573
|
]
|
|
1494
1574
|
}
|
|
1495
1575
|
);
|
|
1496
1576
|
};
|
|
1497
1577
|
var Badge = ({ label, className }) => {
|
|
1498
|
-
return /* @__PURE__ */ (0,
|
|
1578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1499
1579
|
"div",
|
|
1500
1580
|
{
|
|
1501
1581
|
className: cn(
|
|
@@ -1509,7 +1589,7 @@ var Badge = ({ label, className }) => {
|
|
|
1509
1589
|
};
|
|
1510
1590
|
|
|
1511
1591
|
// src/components/Tag/Tag.tsx
|
|
1512
|
-
var
|
|
1592
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1513
1593
|
var Tag = ({
|
|
1514
1594
|
className,
|
|
1515
1595
|
children,
|
|
@@ -1519,7 +1599,7 @@ var Tag = ({
|
|
|
1519
1599
|
onClick,
|
|
1520
1600
|
...props
|
|
1521
1601
|
}) => {
|
|
1522
|
-
return /* @__PURE__ */ (0,
|
|
1602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1523
1603
|
"button",
|
|
1524
1604
|
{
|
|
1525
1605
|
className: cn(
|
|
@@ -1538,16 +1618,16 @@ var Tag = ({
|
|
|
1538
1618
|
disabled,
|
|
1539
1619
|
style: bgColor ? { backgroundColor: bgColor, border: "none" } : void 0,
|
|
1540
1620
|
...props,
|
|
1541
|
-
children: /* @__PURE__ */ (0,
|
|
1621
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children })
|
|
1542
1622
|
}
|
|
1543
1623
|
);
|
|
1544
1624
|
};
|
|
1545
1625
|
|
|
1546
1626
|
// src/components/Timetable/Timetable.tsx
|
|
1547
|
-
var
|
|
1627
|
+
var import_react9 = require("react");
|
|
1548
1628
|
|
|
1549
1629
|
// src/components/Timetable/WeekNavigation.tsx
|
|
1550
|
-
var
|
|
1630
|
+
var import_react8 = require("react");
|
|
1551
1631
|
|
|
1552
1632
|
// src/components/Timetable/dateUtils.ts
|
|
1553
1633
|
var KOREAN_WEEKDAYS = ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"];
|
|
@@ -1580,18 +1660,18 @@ var formatWeekRange = (weekStart) => {
|
|
|
1580
1660
|
};
|
|
1581
1661
|
|
|
1582
1662
|
// src/components/Timetable/WeekNavigation.tsx
|
|
1583
|
-
var
|
|
1663
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1584
1664
|
var weekLabel = {
|
|
1585
1665
|
thisWeek: "\uC774\uBC88 \uC8FC",
|
|
1586
1666
|
nextWeek: "\uB2E4\uC74C \uC8FC",
|
|
1587
1667
|
twoWeeksLater: "\uB2E4\uB2E4\uC74C \uC8FC"
|
|
1588
1668
|
};
|
|
1589
|
-
var WeekNavigation = (0,
|
|
1669
|
+
var WeekNavigation = (0, import_react8.forwardRef)(
|
|
1590
1670
|
function WeekNavigation2({ date, week, label, canPrev, canNext, onPrevWeek, onNextWeek, className }, ref) {
|
|
1591
1671
|
const showPrev = canPrev ?? (week ? week !== "thisWeek" : true);
|
|
1592
1672
|
const showNext = canNext ?? (week ? week !== "twoWeeksLater" : true);
|
|
1593
1673
|
const text = label ?? (week ? `${weekLabel[week]} (${formatWeekRange(date)})` : formatWeekRange(date));
|
|
1594
|
-
return /* @__PURE__ */ (0,
|
|
1674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
1595
1675
|
"div",
|
|
1596
1676
|
{
|
|
1597
1677
|
ref,
|
|
@@ -1603,26 +1683,26 @@ var WeekNavigation = (0, import_react7.forwardRef)(
|
|
|
1603
1683
|
className
|
|
1604
1684
|
),
|
|
1605
1685
|
children: [
|
|
1606
|
-
/* @__PURE__ */ (0,
|
|
1607
|
-
/* @__PURE__ */ (0,
|
|
1608
|
-
/* @__PURE__ */ (0,
|
|
1686
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ArrowButton, { direction: "left", visible: showPrev, onClick: onPrevWeek }),
|
|
1687
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "flex flex-1 items-center justify-center text-center", children: text }),
|
|
1688
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ArrowButton, { direction: "right", visible: showNext, onClick: onNextWeek })
|
|
1609
1689
|
]
|
|
1610
1690
|
}
|
|
1611
1691
|
);
|
|
1612
1692
|
}
|
|
1613
1693
|
);
|
|
1614
1694
|
var ArrowButton = ({ direction, visible, onClick }) => {
|
|
1615
|
-
const divider = /* @__PURE__ */ (0,
|
|
1695
|
+
const divider = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" });
|
|
1616
1696
|
if (!visible) {
|
|
1617
|
-
return /* @__PURE__ */ (0,
|
|
1697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-stretch", children: [
|
|
1618
1698
|
direction === "right" && divider,
|
|
1619
|
-
/* @__PURE__ */ (0,
|
|
1699
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "w-[42px]" }),
|
|
1620
1700
|
direction === "left" && divider
|
|
1621
1701
|
] });
|
|
1622
1702
|
}
|
|
1623
|
-
return /* @__PURE__ */ (0,
|
|
1703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-stretch", children: [
|
|
1624
1704
|
direction === "right" && divider,
|
|
1625
|
-
/* @__PURE__ */ (0,
|
|
1705
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1626
1706
|
"button",
|
|
1627
1707
|
{
|
|
1628
1708
|
type: "button",
|
|
@@ -1632,7 +1712,7 @@ var ArrowButton = ({ direction, visible, onClick }) => {
|
|
|
1632
1712
|
"text-gray06 cursor-pointer transition-colors",
|
|
1633
1713
|
"hover:bg-gray00 active:bg-gray01"
|
|
1634
1714
|
),
|
|
1635
|
-
children: /* @__PURE__ */ (0,
|
|
1715
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1636
1716
|
IconChevronDownXS,
|
|
1637
1717
|
{
|
|
1638
1718
|
className: direction === "left" ? "rotate-90" : "-rotate-90",
|
|
@@ -1646,7 +1726,7 @@ var ArrowButton = ({ direction, visible, onClick }) => {
|
|
|
1646
1726
|
};
|
|
1647
1727
|
|
|
1648
1728
|
// src/components/Timetable/Timetable.tsx
|
|
1649
|
-
var
|
|
1729
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1650
1730
|
var printColorHoverClass = {
|
|
1651
1731
|
Plotter: "hover:bg-print-plotter",
|
|
1652
1732
|
Printer: "hover:bg-print-printer",
|
|
@@ -1656,7 +1736,7 @@ var printColorHoverClass = {
|
|
|
1656
1736
|
"Seet Cutting": "hover:bg-print-seet-cutting",
|
|
1657
1737
|
"Laser Cutting": "hover:bg-print-laser-cutting"
|
|
1658
1738
|
};
|
|
1659
|
-
var Timetable = (0,
|
|
1739
|
+
var Timetable = (0, import_react9.forwardRef)(function Timetable2({
|
|
1660
1740
|
weekStart,
|
|
1661
1741
|
week,
|
|
1662
1742
|
days,
|
|
@@ -1669,8 +1749,8 @@ var Timetable = (0, import_react8.forwardRef)(function Timetable2({
|
|
|
1669
1749
|
canNextWeek,
|
|
1670
1750
|
className
|
|
1671
1751
|
}, ref) {
|
|
1672
|
-
return /* @__PURE__ */ (0,
|
|
1673
|
-
!hideWeekNavigation && /* @__PURE__ */ (0,
|
|
1752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { ref, className: cn(fluid && "w-full", className), children: [
|
|
1753
|
+
!hideWeekNavigation && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1674
1754
|
WeekNavigation,
|
|
1675
1755
|
{
|
|
1676
1756
|
date: weekStart,
|
|
@@ -1681,7 +1761,7 @@ var Timetable = (0, import_react8.forwardRef)(function Timetable2({
|
|
|
1681
1761
|
onNextWeek
|
|
1682
1762
|
}
|
|
1683
1763
|
),
|
|
1684
|
-
/* @__PURE__ */ (0,
|
|
1764
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn("flex", fluid && "w-full"), children: days.map((day) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1685
1765
|
DailyTimetable,
|
|
1686
1766
|
{
|
|
1687
1767
|
date: day.date,
|
|
@@ -1694,9 +1774,9 @@ var Timetable = (0, import_react8.forwardRef)(function Timetable2({
|
|
|
1694
1774
|
] });
|
|
1695
1775
|
});
|
|
1696
1776
|
var DailyTimetable = ({ date, slots, fluid, onSelectTime, className }) => {
|
|
1697
|
-
return /* @__PURE__ */ (0,
|
|
1698
|
-
/* @__PURE__ */ (0,
|
|
1699
|
-
slots.map((slot) => /* @__PURE__ */ (0,
|
|
1777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn("flex flex-col", fluid ? "flex-1 min-w-0" : "w-18", className), children: [
|
|
1778
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "h-12 flex items-center justify-center border-b border-gray02 text-body1-regular text-secondary", children: formatDayLabel(date) }),
|
|
1779
|
+
slots.map((slot) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1700
1780
|
TimeItem,
|
|
1701
1781
|
{
|
|
1702
1782
|
state: slot.state,
|
|
@@ -1722,16 +1802,17 @@ var TimeItem = ({
|
|
|
1722
1802
|
}) => {
|
|
1723
1803
|
const clickable = (state === "default" || state === "selected") && !!onClick;
|
|
1724
1804
|
const style = state === "default" && color ? { "--tt-hover": color } : void 0;
|
|
1725
|
-
return /* @__PURE__ */ (0,
|
|
1805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1726
1806
|
"div",
|
|
1727
1807
|
{
|
|
1728
1808
|
onClick: clickable ? onClick : void 0,
|
|
1729
1809
|
style,
|
|
1730
1810
|
className: cn(
|
|
1731
|
-
"h-18 flex items-center justify-center
|
|
1811
|
+
"h-18 flex items-center justify-center",
|
|
1732
1812
|
fluid ? "w-full" : "w-18",
|
|
1733
1813
|
"text-body1-medium text-center bg-white text-primary",
|
|
1734
|
-
|
|
1814
|
+
// "none"(일정 없음)은 구분선을 그리지 않아 연속된 빈 칸이 하나의 덩어리로 보이게 한다.
|
|
1815
|
+
state === "none" ? "bg-gray00 text-transparent" : "border-b border-gray02",
|
|
1735
1816
|
state === "selected" && "bg-black text-white hover:cursor-pointer",
|
|
1736
1817
|
state === "disabled" && "bg-gray00 text-gray03",
|
|
1737
1818
|
state === "default" && [
|
|
@@ -1746,13 +1827,13 @@ var TimeItem = ({
|
|
|
1746
1827
|
};
|
|
1747
1828
|
|
|
1748
1829
|
// src/components/TNB/TNB.tsx
|
|
1749
|
-
var
|
|
1750
|
-
var
|
|
1830
|
+
var import_react10 = require("react");
|
|
1831
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1751
1832
|
function useControllableState2(controlled, defaultValue) {
|
|
1752
1833
|
const isControlled = controlled !== void 0;
|
|
1753
|
-
const [uncontrolled, setUncontrolled] = (0,
|
|
1834
|
+
const [uncontrolled, setUncontrolled] = (0, import_react10.useState)(defaultValue);
|
|
1754
1835
|
const value = isControlled ? controlled : uncontrolled;
|
|
1755
|
-
const setValue = (0,
|
|
1836
|
+
const setValue = (0, import_react10.useCallback)(
|
|
1756
1837
|
(next) => {
|
|
1757
1838
|
if (!isControlled) setUncontrolled(next);
|
|
1758
1839
|
},
|
|
@@ -1760,7 +1841,7 @@ function useControllableState2(controlled, defaultValue) {
|
|
|
1760
1841
|
);
|
|
1761
1842
|
return [value, setValue, isControlled];
|
|
1762
1843
|
}
|
|
1763
|
-
var TNB = (0,
|
|
1844
|
+
var TNB = (0, import_react10.forwardRef)(function TNB2({
|
|
1764
1845
|
logo,
|
|
1765
1846
|
upperPartItemList,
|
|
1766
1847
|
upperPartIconList,
|
|
@@ -1799,8 +1880,8 @@ var TNB = (0, import_react9.forwardRef)(function TNB2({
|
|
|
1799
1880
|
setLowerValue(label);
|
|
1800
1881
|
onSelectedLowerChange?.(label);
|
|
1801
1882
|
};
|
|
1802
|
-
return /* @__PURE__ */ (0,
|
|
1803
|
-
/* @__PURE__ */ (0,
|
|
1883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("nav", { ref, "aria-label": ariaLabel, className: cn("w-full bg-white", className), children: [
|
|
1884
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1804
1885
|
UpperPart,
|
|
1805
1886
|
{
|
|
1806
1887
|
logo,
|
|
@@ -1811,7 +1892,7 @@ var TNB = (0, import_react9.forwardRef)(function TNB2({
|
|
|
1811
1892
|
linkComponent
|
|
1812
1893
|
}
|
|
1813
1894
|
),
|
|
1814
|
-
/* @__PURE__ */ (0,
|
|
1895
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1815
1896
|
LowerPart,
|
|
1816
1897
|
{
|
|
1817
1898
|
lowerPartItemList: currentLowerItemList,
|
|
@@ -1822,11 +1903,11 @@ var TNB = (0, import_react9.forwardRef)(function TNB2({
|
|
|
1822
1903
|
)
|
|
1823
1904
|
] });
|
|
1824
1905
|
});
|
|
1825
|
-
var NavClickable = (0,
|
|
1906
|
+
var NavClickable = (0, import_react10.forwardRef)(function NavClickable2({ href, onClick, linkComponent: Link, current, disabled, className, children }, ref) {
|
|
1826
1907
|
const ariaCurrent = current ? "page" : void 0;
|
|
1827
1908
|
if (href && !disabled) {
|
|
1828
1909
|
if (Link) {
|
|
1829
|
-
return /* @__PURE__ */ (0,
|
|
1910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1830
1911
|
Link,
|
|
1831
1912
|
{
|
|
1832
1913
|
href,
|
|
@@ -1838,7 +1919,7 @@ var NavClickable = (0, import_react9.forwardRef)(function NavClickable2({ href,
|
|
|
1838
1919
|
}
|
|
1839
1920
|
);
|
|
1840
1921
|
}
|
|
1841
|
-
return /* @__PURE__ */ (0,
|
|
1922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1842
1923
|
"a",
|
|
1843
1924
|
{
|
|
1844
1925
|
href,
|
|
@@ -1850,7 +1931,7 @@ var NavClickable = (0, import_react9.forwardRef)(function NavClickable2({ href,
|
|
|
1850
1931
|
}
|
|
1851
1932
|
);
|
|
1852
1933
|
}
|
|
1853
|
-
return /* @__PURE__ */ (0,
|
|
1934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1854
1935
|
"button",
|
|
1855
1936
|
{
|
|
1856
1937
|
type: "button",
|
|
@@ -1872,7 +1953,7 @@ var UpperPart = ({
|
|
|
1872
1953
|
linkComponent,
|
|
1873
1954
|
className
|
|
1874
1955
|
}) => {
|
|
1875
|
-
return /* @__PURE__ */ (0,
|
|
1956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
1876
1957
|
"div",
|
|
1877
1958
|
{
|
|
1878
1959
|
className: cn(
|
|
@@ -1880,12 +1961,12 @@ var UpperPart = ({
|
|
|
1880
1961
|
className
|
|
1881
1962
|
),
|
|
1882
1963
|
children: [
|
|
1883
|
-
/* @__PURE__ */ (0,
|
|
1884
|
-
/* @__PURE__ */ (0,
|
|
1885
|
-
/* @__PURE__ */ (0,
|
|
1886
|
-
/* @__PURE__ */ (0,
|
|
1887
|
-
upperPartItemList.map((item) => /* @__PURE__ */ (0,
|
|
1888
|
-
/* @__PURE__ */ (0,
|
|
1964
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-stretch", children: [
|
|
1965
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex w-14 shrink-0 items-center justify-center px-3", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(NavIconButton, { ...logo, linkComponent }) }),
|
|
1966
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-stretch", children: [
|
|
1967
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" }),
|
|
1968
|
+
upperPartItemList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react10.Fragment, { children: [
|
|
1969
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1889
1970
|
UpperPartTab,
|
|
1890
1971
|
{
|
|
1891
1972
|
label: item.label,
|
|
@@ -1898,15 +1979,15 @@ var UpperPart = ({
|
|
|
1898
1979
|
}
|
|
1899
1980
|
}
|
|
1900
1981
|
),
|
|
1901
|
-
/* @__PURE__ */ (0,
|
|
1982
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" })
|
|
1902
1983
|
] }, item.id ?? item.label))
|
|
1903
1984
|
] })
|
|
1904
1985
|
] }),
|
|
1905
|
-
/* @__PURE__ */ (0,
|
|
1906
|
-
/* @__PURE__ */ (0,
|
|
1907
|
-
upperPartIconList.map((icon, index) => /* @__PURE__ */ (0,
|
|
1908
|
-
/* @__PURE__ */ (0,
|
|
1909
|
-
/* @__PURE__ */ (0,
|
|
1986
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-stretch", children: [
|
|
1987
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" }),
|
|
1988
|
+
upperPartIconList.map((icon, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react10.Fragment, { children: [
|
|
1989
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(NavIconButton, { ...icon, linkComponent }),
|
|
1990
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" })
|
|
1910
1991
|
] }, icon.id ?? icon.src ?? icon.label ?? index))
|
|
1911
1992
|
] })
|
|
1912
1993
|
]
|
|
@@ -1921,7 +2002,7 @@ var UpperPartTab = ({
|
|
|
1921
2002
|
linkComponent,
|
|
1922
2003
|
className
|
|
1923
2004
|
}) => {
|
|
1924
|
-
return /* @__PURE__ */ (0,
|
|
2005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
1925
2006
|
NavClickable,
|
|
1926
2007
|
{
|
|
1927
2008
|
href,
|
|
@@ -1936,17 +2017,17 @@ var UpperPartTab = ({
|
|
|
1936
2017
|
className
|
|
1937
2018
|
),
|
|
1938
2019
|
children: [
|
|
1939
|
-
/* @__PURE__ */ (0,
|
|
1940
|
-
/* @__PURE__ */ (0,
|
|
2020
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: cn("px-5 text-head1-medium", selected ? "text-strong" : "text-quaternary"), children: label }),
|
|
2021
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: cn("h-0.5 w-full", selected ? "bg-black" : "bg-transparent") })
|
|
1941
2022
|
]
|
|
1942
2023
|
}
|
|
1943
2024
|
);
|
|
1944
2025
|
};
|
|
1945
|
-
var NavIconButton = (0,
|
|
2026
|
+
var NavIconButton = (0, import_react10.forwardRef)(
|
|
1946
2027
|
function NavIconButton2({ src, icon, alt, label, href, onClick, selected, badge, className, linkComponent }, forwardedRef) {
|
|
1947
2028
|
const interactive = Boolean(onClick || href);
|
|
1948
2029
|
const showBadge = badge !== void 0 && badge !== null && badge !== false;
|
|
1949
|
-
return /* @__PURE__ */ (0,
|
|
2030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
1950
2031
|
NavClickable,
|
|
1951
2032
|
{
|
|
1952
2033
|
ref: forwardedRef,
|
|
@@ -1962,9 +2043,9 @@ var NavIconButton = (0, import_react9.forwardRef)(
|
|
|
1962
2043
|
className
|
|
1963
2044
|
),
|
|
1964
2045
|
children: [
|
|
1965
|
-
icon ? /* @__PURE__ */ (0,
|
|
1966
|
-
label ? /* @__PURE__ */ (0,
|
|
1967
|
-
showBadge ? /* @__PURE__ */ (0,
|
|
2046
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "inline-flex h-6 w-6 items-center justify-center", children: icon }) : src ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("img", { src, alt: alt ?? label ?? "", className: "h-6 w-6" }) : null,
|
|
2047
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: cn("text-body2-regular", selected ? "text-white" : "text-secondary"), children: label }) : null,
|
|
2048
|
+
showBadge ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1968
2049
|
"span",
|
|
1969
2050
|
{
|
|
1970
2051
|
"aria-hidden": badge === true,
|
|
@@ -1990,14 +2071,14 @@ var LowerPart = ({
|
|
|
1990
2071
|
if (lowerPartItemList.length === 0) {
|
|
1991
2072
|
return null;
|
|
1992
2073
|
}
|
|
1993
|
-
return /* @__PURE__ */ (0,
|
|
2074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
1994
2075
|
"div",
|
|
1995
2076
|
{
|
|
1996
2077
|
className: cn("w-full h-[42px] pl-14 flex items-stretch border-b border-gray02", className),
|
|
1997
2078
|
children: [
|
|
1998
|
-
/* @__PURE__ */ (0,
|
|
1999
|
-
lowerPartItemList.map((item) => /* @__PURE__ */ (0,
|
|
2000
|
-
/* @__PURE__ */ (0,
|
|
2079
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" }),
|
|
2080
|
+
lowerPartItemList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react10.Fragment, { children: [
|
|
2081
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2001
2082
|
LowerPartItemButton,
|
|
2002
2083
|
{
|
|
2003
2084
|
label: item.label,
|
|
@@ -2010,7 +2091,7 @@ var LowerPart = ({
|
|
|
2010
2091
|
}
|
|
2011
2092
|
}
|
|
2012
2093
|
),
|
|
2013
|
-
/* @__PURE__ */ (0,
|
|
2094
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" })
|
|
2014
2095
|
] }, item.id ?? item.label))
|
|
2015
2096
|
]
|
|
2016
2097
|
}
|
|
@@ -2024,7 +2105,7 @@ var LowerPartItemButton = ({
|
|
|
2024
2105
|
linkComponent,
|
|
2025
2106
|
className
|
|
2026
2107
|
}) => {
|
|
2027
|
-
return /* @__PURE__ */ (0,
|
|
2108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2028
2109
|
NavClickable,
|
|
2029
2110
|
{
|
|
2030
2111
|
href,
|
|
@@ -2043,14 +2124,14 @@ var LowerPartItemButton = ({
|
|
|
2043
2124
|
};
|
|
2044
2125
|
|
|
2045
2126
|
// src/components/Toast/Toast.tsx
|
|
2046
|
-
var
|
|
2047
|
-
var
|
|
2127
|
+
var import_react11 = require("react");
|
|
2128
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2048
2129
|
var EXIT_MS = 300;
|
|
2049
|
-
var Toast = (0,
|
|
2130
|
+
var Toast = (0, import_react11.forwardRef)(function Toast2({ message, open, duration = 3e3, onClose, position = "none", className }, ref) {
|
|
2050
2131
|
const controlled = open !== void 0;
|
|
2051
|
-
const [mounted, setMounted] = (0,
|
|
2052
|
-
const [visible, setVisible] = (0,
|
|
2053
|
-
(0,
|
|
2132
|
+
const [mounted, setMounted] = (0, import_react11.useState)(!controlled || open);
|
|
2133
|
+
const [visible, setVisible] = (0, import_react11.useState)(!controlled || open);
|
|
2134
|
+
(0, import_react11.useEffect)(() => {
|
|
2054
2135
|
if (!controlled) return;
|
|
2055
2136
|
if (open) {
|
|
2056
2137
|
setMounted(true);
|
|
@@ -2061,13 +2142,13 @@ var Toast = (0, import_react10.forwardRef)(function Toast2({ message, open, dura
|
|
|
2061
2142
|
const timer = setTimeout(() => setMounted(false), EXIT_MS);
|
|
2062
2143
|
return () => clearTimeout(timer);
|
|
2063
2144
|
}, [controlled, open]);
|
|
2064
|
-
(0,
|
|
2145
|
+
(0, import_react11.useEffect)(() => {
|
|
2065
2146
|
if (!controlled || !open || !duration) return;
|
|
2066
2147
|
const timer = setTimeout(() => onClose?.(), duration);
|
|
2067
2148
|
return () => clearTimeout(timer);
|
|
2068
2149
|
}, [controlled, open, duration, onClose]);
|
|
2069
2150
|
if (!mounted) return null;
|
|
2070
|
-
const banner = /* @__PURE__ */ (0,
|
|
2151
|
+
const banner = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2071
2152
|
"div",
|
|
2072
2153
|
{
|
|
2073
2154
|
ref,
|
|
@@ -2085,7 +2166,7 @@ var Toast = (0, import_react10.forwardRef)(function Toast2({ message, open, dura
|
|
|
2085
2166
|
}
|
|
2086
2167
|
);
|
|
2087
2168
|
if (position === "none") return banner;
|
|
2088
|
-
return /* @__PURE__ */ (0,
|
|
2169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2089
2170
|
"div",
|
|
2090
2171
|
{
|
|
2091
2172
|
className: cn(
|
|
@@ -2098,6 +2179,7 @@ var Toast = (0, import_react10.forwardRef)(function Toast2({ message, open, dura
|
|
|
2098
2179
|
});
|
|
2099
2180
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2100
2181
|
0 && (module.exports = {
|
|
2182
|
+
Accordion,
|
|
2101
2183
|
BackButton,
|
|
2102
2184
|
BasicFormField,
|
|
2103
2185
|
CTA,
|